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AoB,CAAA,EAAAgH,KACJ,CACAgF,MAAAuG,EAAaG,IAAA,CAAA1G,KAAU,CACvB2G,YAAAJ,EAAcG,IAAM,CAAIC,WAAC,CACzBC,aAAyCL,EAAjCG,IAAQ,CAAAG,aAAI,CACtBC,IAAA,GAAAhS,MAAA,CAAAuR,GAAAG,GAAA,CAAAO,oBAAA,KAIF,GAAApU,EAAAoB,GAAA,EAAAqS,GAAUpS,CAAA,EAAAF,SAAA,GAAAnB,EAAAoB,GAAA,EF+EM4R,GE/EN,QAMlB,EAAoB,IAAAjT,GAAA4T,EAAA,YAAAlU,CAAA,EAAAA,EAAA0M,CAAA,2DAAA1M,EAAAA,EAAA4U,CAAA,UAAAC,KAAA7U,EAAA0M,CAAA","sources":["webpack://_N_E/?0cdd","webpack://_N_E/./src/components/portfolio/not-staked.tsx","webpack://_N_E/./src/components/base/CustomRowTable.tsx","webpack://_N_E/./src/components/base/RedeemButtonTable.tsx","webpack://_N_E/./node_modules/@mui/material/TableHead/tableHeadClasses.js","webpack://_N_E/./node_modules/@mui/material/TableHead/TableHead.js","webpack://_N_E/./src/hooks/use-unlock.ts","webpack://_N_E/./src/hooks/use-user-lockup-staking-info.ts","webpack://_N_E/./src/components/portfolio/staked.tsx","webpack://_N_E/./src/components/portfolio/fix-stake.tsx","webpack://_N_E/./src/hooks/use-claim-reward.ts","webpack://_N_E/./src/hooks/use-user-flexible-staking-info.ts","webpack://_N_E/./src/hooks/use-unstake.ts","webpack://_N_E/./src/components/portfolio/unstake-dialog.tsx","webpack://_N_E/./src/hooks/use-flexible-redeem.ts","webpack://_N_E/./src/components/portfolio/unstake-position-list.tsx","webpack://_N_E/./src/components/portfolio/flexible-stake.tsx","webpack://_N_E/./src/components/portfolio/mobile/not-staked.tsx","webpack://_N_E/./src/components/portfolio/mobile/staked.tsx","webpack://_N_E/./src/components/portfolio/mobile/fix-stake.tsx","webpack://_N_E/./src/components/portfolio/mobile/unstake-position-list.tsx","webpack://_N_E/./src/components/portfolio/mobile/flexible-stake.tsx","webpack://_N_E/./src/components/portfolio/mobile/stake-balance-list.tsx","webpack://_N_E/./src/components/portfolio/mobile/view.tsx","webpack://_N_E/./src/components/portfolio/stake-balance-list.tsx","webpack://_N_E/./src/components/portfolio/view.tsx","webpack://_N_E/./src/components/portfolio/index.tsx","webpack://_N_E/./src/pages/portfolio/index.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/portfolio\",\n function () {\n return require(\"private-next-pages/portfolio/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/portfolio\"])\n });\n }\n ","import BaseButton from '@/components/base/Button'\nimport { Box, Stack, Typography } from '@mui/material'\nimport { useState } from 'react'\nimport FixedAPYDialog from '../stake/default/desktop/fixed-apy-dialog'\n\nconst NotStake = () => {\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] =\n useState(false)\n const handleCloseModalLockStake = () => {\n setShowConfirmModalLockStake(false)\n }\n\n return (\n <>\n \n \n \n \n You have no staking position open\n \n \n Let's make some $$$\n \n \n setShowConfirmModalLockStake(true)}\n >\n Stake now\n \n \n \n \n \n )\n}\n\nexport default NotStake\n","import { TableCell } from '@mui/material'\n\nexport const CustomTableCell = ({\n children, className, width,\n}: {\n children: React.ReactNode,\n className?: string,\n width?:string\n }) => (\n \n {children}\n \n)\n\nexport const CustomTableHead = ({\n children, className, width,\n}: {\n children: string,\n className?: string,\n width?:string\n}) => (\n \n {children}\n \n)\n","import BaseButton, { BaseButtonProps } from '@/components/base/Button'\n\nconst RedeemButtonTable = ({\n redeemable,\n fontSize = 'base',\n className,\n isMobile,\n isLoading = false,\n ...props\n}: {\n redeemable: boolean\n fontSize?: BaseButtonProps['fontSize']\n className?: string\n isMobile?: boolean\n isLoading?: boolean\n onClick?: () => void\n}) => {\n return (\n \n redeem\n \n )\n}\n\nexport default RedeemButtonTable\n","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTableHeadUtilityClass(slot) {\n return generateUtilityClass('MuiTableHead', slot);\n}\nconst tableHeadClasses = generateUtilityClasses('MuiTableHead', ['root']);\nexport default tableHeadClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"component\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { useDefaultProps } from '../DefaultPropsProvider';\nimport styled from '../styles/styled';\nimport { getTableHeadUtilityClass } from './tableHeadClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getTableHeadUtilityClass, classes);\n};\nconst TableHeadRoot = styled('thead', {\n name: 'MuiTableHead',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'table-header-group'\n});\nconst tablelvl2 = {\n variant: 'head'\n};\nconst defaultComponent = 'thead';\nconst TableHead = /*#__PURE__*/React.forwardRef(function TableHead(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTableHead'\n });\n const {\n className,\n component = defaultComponent\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(Tablelvl2Context.Provider, {\n value: tablelvl2,\n children: /*#__PURE__*/_jsx(TableHeadRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n role: component === defaultComponent ? null : 'rowgroup',\n ownerState: ownerState\n }, other))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TableHead.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default TableHead;","import {\n useMutation,\n useQueryClient,\n} from 'react-query'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useUnlock() {\n const {\n stakingClient,\n connection,\n mintPublicKey,\n publicKey,\n signTransaction,\n } = useSolana()\n const queryClient = useQueryClient()\n\n const mutation = useMutation(\n async ({ index, vaultIndex }: { index: number; vaultIndex: number }) => {\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return\n }\n\n if (!vaultIndex) {\n throw new Error('Vault index is required')\n }\n\n const tx = await stakingClient.unlock(index, vaultIndex)\n const latestBlockHash = await connection.getLatestBlockhash()\n tx.recentBlockhash = latestBlockHash.blockhash\n tx.feePayer = publicKey\n\n const signedTx = await signTransaction(tx)\n const signature = await connection.sendRawTransaction(\n signedTx.serialize(),\n )\n\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature,\n })\n\n return signature\n },\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['userLockupStakingInfo', publicKey])\n queryClient.invalidateQueries([\n 'tokenBalance',\n mintPublicKey?.toString() || '',\n publicKey?.toString() || '',\n ])\n },\n },\n )\n\n return mutation\n}\n","import { useQuery } from 'react-query'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useUserLockupStakingInfo() {\n const { stakingClient, connection, publicKey, signTransaction, connected, isUserPublicKey } = useSolana()\n\n const query = useQuery(['userLockupStakingInfo', publicKey], async () => {\n if (!stakingClient || !connection || !publicKey || !signTransaction || !connected || !isUserPublicKey) {\n return\n }\n\n const userLockupStakingInfo = await stakingClient.getUserLockupStakingInfo({\n unlocked: false,\n })\n return userLockupStakingInfo\n }, { enabled: !!stakingClient && !!connected && !!isUserPublicKey })\n\n return query\n}\n","import {\n useMemo,\n useState,\n} from 'react'\n\nimport Decimal from 'decimal.js'\n\nimport {\n CustomTableCell,\n CustomTableHead,\n} from '@/components/base/CustomRowTable'\nimport RedeemButtonTable from '@/components/base/RedeemButtonTable'\nimport {\n format,\n formatPercentage,\n} from '@/utils/number-helpers'\nimport {\n Table,\n TableBody,\n TableContainer,\n TableHead,\n TableRow,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport {\n SECOND_PER_DAY,\n} from '../../constants'\nimport { useLockupVaultsData } from '../../hooks/use-lockup-vault-data'\nimport { useUnlock } from '../../hooks/use-unlock'\nimport {\n useUserLockupStakingInfo,\n} from '../../hooks/use-user-lockup-staking-info'\nimport { convertRawAmountToUIAmount } from '../../utils/bn-utils'\nimport {\n calculateEstFixedReward,\n convertOnChainFixedAprToPercentage,\n} from '../../utils/staking-helpers'\nimport { formatRemainingTime } from '../../utils/time-helpers'\n\nconst Staked = () => {\n const [activeIndex, setActiveIndex] = useState(null) // To show loading only on active button\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo()\n const { data: lockupVaultsData } = useLockupVaultsData()\n\n const rows = useMemo(() => {\n if (!lockupVaultsData || !userLockupStakingInfo) return []\n\n const createData = (item: {\n bump: any\n index: any\n lockupVault: any\n lockupVaultIndex: any\n committedApy: any\n lockedAmount: any\n lockedAt: any\n unlocked: any\n }): {\n index: number\n lockedAmount: number\n estApr: number\n lockPeriod: number\n remainingTime: string\n estReward: number\n redeemable: boolean\n vaultIndex: number\n } => {\n const lockedAmount = convertRawAmountToUIAmount(\n item.lockedAmount,\n SOLCAT_DECIMALS,\n )\n\n const lockDurationInSeconds =\n lockupVaultsData[Number(item.lockupVaultIndex)].lockupDuration.toNumber()\n\n const lockPeriod = lockDurationInSeconds / SECOND_PER_DAY\n\n const remainingSeconds =\n lockDurationInSeconds - (Date.now() / 1000 - item.lockedAt)\n\n const remainingTime = formatRemainingTime(remainingSeconds)\n\n const redeemable = remainingSeconds <= 0 && !item.unlocked\n const estApr = convertOnChainFixedAprToPercentage(item.committedApy)\n\n const estReward = calculateEstFixedReward(\n estApr,\n lockedAmount,\n lockDurationInSeconds,\n )\n\n return {\n index: item.index,\n lockedAmount,\n estApr,\n lockPeriod,\n remainingTime,\n estReward,\n redeemable,\n vaultIndex: item.lockupVaultIndex,\n }\n }\n\n return userLockupStakingInfo.lockupStakingAccounts\n .filter((account) => account !== null)\n .filter((account) => account.unlocked === false)\n .map(createData)\n }, [lockupVaultsData, userLockupStakingInfo])\n\n const { mutateAsync: unlock, isLoading: isLoadingUnlock } = useUnlock()\n\n const handleRedeem = async (\n index: number,\n vaultIndex: number,\n lockedAmount: number,\n ) => {\n try {\n await unlock({ index, vaultIndex })\n } catch (error) {\n console.error('Error during redeeming:', error)\n }\n }\n\n return (\n \n \n \n \n Amount\n Est APR\n Lock Period\n Remaining time\n Est Reward\n {''}\n \n \n \n {rows.map((row) => (\n \n \n {`${format(new Decimal(row.lockedAmount), true, 2)}`}\n \n \n {`${formatPercentage(row.estApr * 100, false, 2)}`}\n \n {`${row.lockPeriod} days`}\n \n {row.remainingTime}\n \n \n {`${format(new Decimal(row.estReward), false, 2)}`}\n \n \n {\n setActiveIndex(row.index)\n handleRedeem(row.index, row.vaultIndex, row.lockedAmount)\n }}\n isLoading={isLoadingUnlock && activeIndex === row.index}\n />\n \n \n ))}\n \n
\n
\n )\n}\n\nexport default Staked\n","import { Typography } from '@mui/material'\n\nimport NotStake from './not-staked'\nimport Staked from './staked'\nimport { useUserLockupStakingInfo } from '../../hooks/use-user-lockup-staking-info'\nimport { useSolana } from '../../providers/solana'\nimport { checkIfLockupStaked } from '../../utils/staking-helpers'\n\nconst FixStake = () => {\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo()\n const { connected } = useSolana()\n\n const isStaked = checkIfLockupStaked(userLockupStakingInfo, connected)\n\n return (\n <>\n \n My fixed staking\n \n {isStaked ? : }\n \n )\n}\n\nexport default FixStake\n","import { useMutation, useQueryClient } from 'react-query'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useClaimReward() {\n const {\n stakingClient,\n connection,\n mintPublicKey,\n publicKey,\n signTransaction,\n } = useSolana()\n const queryClient = useQueryClient()\n\n const mutation = useMutation(\n async () => {\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return\n }\n\n const tx = await stakingClient.claim()\n const latestBlockHash = await connection.getLatestBlockhash()\n tx.recentBlockhash = latestBlockHash.blockhash\n tx.feePayer = publicKey\n\n const signedTx = await signTransaction(tx)\n const signature = await connection.sendRawTransaction(\n signedTx.serialize(),\n )\n\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature,\n })\n\n return signature\n },\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['userFlexibleStakingInfo', publicKey])\n queryClient.invalidateQueries([\n 'tokenBalance',\n mintPublicKey?.toString() || '',\n publicKey?.toString() || '',\n ])\n },\n },\n )\n\n return mutation\n}\n","import { useQuery } from 'react-query'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useUserFlexibleStakingInfo() {\n const { stakingClient, connection, publicKey, signTransaction, connected, isUserPublicKey } = useSolana()\n\n const query = useQuery(['userFlexibleStakingInfo', publicKey], async () => {\n if (!stakingClient || !connection || !publicKey || !signTransaction || !connected || !isUserPublicKey) {\n return\n }\n\n const userFlexibleStakingInfo =\n await stakingClient.getUserFlexibleStakingInfo({\n withdrew: false,\n })\n return userFlexibleStakingInfo\n }, { enabled: !!stakingClient && !!connected && !!isUserPublicKey })\n\n return query\n}\n","import BigNumber from 'bignumber.js'\nimport BN from 'bn.js'\nimport { useMutation, useQueryClient } from 'react-query'\n\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useUnstake() {\n const { stakingClient, connection, publicKey, signTransaction } = useSolana()\n const queryClient = useQueryClient()\n\n const mutation = useMutation(\n async (amount: string) => {\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return\n }\n\n const unstakeAmount = new BigNumber(amount).times(\n Math.pow(10, SOLCAT_DECIMALS),\n )\n const tx = await stakingClient.withdraw(new BN(unstakeAmount.toFixed(0)))\n const latestBlockHash = await connection.getLatestBlockhash()\n tx.recentBlockhash = latestBlockHash.blockhash\n tx.feePayer = publicKey\n\n const signedTx = await signTransaction(tx)\n const signature = await connection.sendRawTransaction(\n signedTx.serialize(),\n )\n\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature,\n })\n\n return signature\n },\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['userFlexibleStakingInfo', publicKey])\n },\n },\n )\n\n return mutation\n}\n","import {\n FC,\n useCallback,\n useState,\n} from 'react'\n\nimport Image from 'next/image'\n\nimport AmountInput from '@/components/base/AmountInput'\nimport BaseDialog from '@/components/base/BaseDialog'\nimport BaseButton from '@/components/base/Button'\nimport {\n Box,\n Divider,\n Stack,\n Typography,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\nimport { useWallet } from '@solana/wallet-adapter-react'\n\nimport useMobileDetection from '../../hooks/use-mobile-detection'\nimport { useUnstake } from '../../hooks/use-unstake'\nimport {\n useUserFlexibleStakingInfo,\n} from '../../hooks/use-user-flexible-staking-info'\nimport { convertRawAmountToUIAmount } from '../../utils/bn-utils'\nimport {\n IconName,\n staticImportIcon,\n} from '../../utils/static-import-icon'\nimport ConnectWallet from '../connect-wallet'\n\ntype DialogProps = {\n showModal: boolean\n onClose: () => void\n}\n\nconst UnstakeDialog: FC = ({ showModal, onClose }) => {\n const [amount, setAmount] = useState('')\n const { connected } = useWallet()\n const isMobile = useMobileDetection()\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo()\n const balance = convertRawAmountToUIAmount(\n userFlexibleStakingInfo?.totalStakedAmount,\n SOLCAT_DECIMALS,\n )\n\n const handleCloseModal = useCallback(() => {\n onClose()\n setAmount('')\n }, [onClose])\n\n const { mutate: unstake, isLoading: isLoadingUnstake } = useUnstake()\n const handleUnstake = () => {\n unstake(amount, {\n onSettled: () => {\n handleCloseModal()\n },\n })\n }\n\n return (\n \n \n \n {' '}\n \n After unstaking, LC will be deducted and there's a 15-day cooldown to claim your funds.\n \n \n \n \n {!connected ? (\n handleCloseModal()}>\n \n \n ) : (\n \n Unstake\n \n )}\n \n \n }\n />\n )\n}\n\nexport default UnstakeDialog\n","import { useMutation, useQueryClient } from 'react-query'\n\nimport { useSolana } from '../providers/solana'\n\nexport function useFlexibleRedeem() {\n const {\n stakingClient,\n connection,\n mintPublicKey,\n publicKey,\n signTransaction,\n } = useSolana()\n const queryClient = useQueryClient()\n\n const mutation = useMutation(\n async (index: number) => {\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return\n }\n\n const tx = await stakingClient.withdrawAfterDelay(index)\n const latestBlockHash = await connection.getLatestBlockhash()\n tx.recentBlockhash = latestBlockHash.blockhash\n tx.feePayer = publicKey\n\n const signedTx = await signTransaction(tx)\n const signature = await connection.sendRawTransaction(\n signedTx.serialize(),\n )\n\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature,\n })\n\n return signature\n },\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['userFlexibleStakingInfo', publicKey])\n queryClient.invalidateQueries([\n 'tokenBalance',\n mintPublicKey?.toString() || '',\n publicKey?.toString() || '',\n ])\n },\n },\n )\n\n return mutation\n}\n","import React, { useState } from 'react'\n\nimport Decimal from 'decimal.js'\n\nimport {\n CustomTableCell,\n CustomTableHead,\n} from '@/components/base/CustomRowTable'\nimport RedeemButtonTable from '@/components/base/RedeemButtonTable'\nimport { format } from '@/utils/number-helpers'\nimport {\n Table,\n TableBody,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport { useFlexibleRedeem } from '../../hooks/use-flexible-redeem'\nimport { useUserFlexibleStakingInfo } from '../../hooks/use-user-flexible-staking-info'\nimport { useSolana } from '../../providers/solana'\nimport { formatRemainingTime } from '../../utils/time-helpers'\n\nconst UnstakePositionList = () => {\n const [activeIndex, setActiveIndex] = useState(null) // To show loading only on active button\n\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo()\n const { connected } = useSolana()\n\n const withdrawPositions = userFlexibleStakingInfo?.withdrawPositions\n\n const rows =\n withdrawPositions\n ?.filter((position) => !position.claimed)\n .map((position) => ({\n index: Number(position.index),\n amount: Number(position.amount) / 10 ** SOLCAT_DECIMALS,\n remaining_time: formatRemainingTime(\n Number(position.unlockTime) - Date.now() / 1000,\n ),\n redeemable: Number(position.unlockTime) <= Date.now() / 1000,\n })) || []\n\n const { mutateAsync: redeem, isLoading: isLoadingRedeem } =\n useFlexibleRedeem()\n\n const handleRedeem = async (index: number) => {\n try {\n await redeem(index)\n } catch (error) {\n console.error('Error during redeeming:', error)\n }\n }\n\n return (\n <>\n \n Unstake Position\n \n \n \n \n \n Amount\n Remaining time\n {''}\n \n \n \n {connected &&\n rows.map((row) => (\n \n \n {`${format(new Decimal(row.amount), true, 2)}`}\n \n \n {row.remaining_time}\n \n \n {\n setActiveIndex(row.index)\n handleRedeem(row.index)\n }}\n isLoading={isLoadingRedeem && activeIndex === row.index}\n />\n \n \n ))}\n \n
\n
\n \n )\n}\n\nexport default UnstakePositionList\n","import { useState } from 'react'\n\nimport BaseButton from '@/components/base/Button'\nimport { format, formatPercentage } from '@/utils/number-helpers'\nimport { Box, Stack, Typography } from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport { useClaimReward } from '../../hooks/use-claim-reward'\nimport { useUserFlexibleStakingInfo } from '../../hooks/use-user-flexible-staking-info'\nimport { convertRawAmountToUIAmount } from '../../utils/bn-utils'\nimport UnstakeDialog from './unstake-dialog'\nimport UnstakePositionList from './unstake-position-list'\nimport { useSolana } from '../../providers/solana'\n\nconst Flexible = () => {\n const [showUnstakeModal, setShowUnstakeModal] = useState(false)\n const { connected } = useSolana()\n\n const handleCloseUnstakeModal = () => {\n setShowUnstakeModal(false)\n }\n\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo()\n\n const userStakedBalance = convertRawAmountToUIAmount(\n userFlexibleStakingInfo?.totalStakedAmount,\n SOLCAT_DECIMALS,\n )\n\n const flexibleApr = userFlexibleStakingInfo?.currentApr || 0\n\n const userPendingReward = convertRawAmountToUIAmount(\n userFlexibleStakingInfo?.pendingReward,\n SOLCAT_DECIMALS,\n )\n\n const { mutate: claimReward, isLoading: isClaimingReward } = useClaimReward()\n\n return (\n <>\n \n \n \n \n \n \n Flexible SOLCAT Staked\n \n \n {format(connected ? userStakedBalance : 0, true)}\n \n \n setShowUnstakeModal(true)}\n disabled={userStakedBalance === 0}\n >\n unstake\n \n \n \n \n Current APR\n \n \n {formatPercentage(connected ? flexibleApr : 0, true, 2)}\n \n \n \n \n \n \n \n SOLCAT Reward\n \n \n {format(connected ? userPendingReward : 0, true)}\n \n \n claimReward()}\n isLoading={isClaimingReward}\n disabled={userPendingReward === 0}\n disableCustomStyle=\"bg-transparent-black-6 text-transparent-black-25\"\n >\n Claim\n \n \n \n \n \n \n \n \n )\n}\n\nexport default Flexible\n","import BaseButton from '@/components/base/Button'\nimport { Box, Stack, Typography } from '@mui/material'\nimport { useState } from 'react'\nimport FixedAPYDialog from '../../stake/default/mobile/fixed-apy-dialog'\n\nconst NotStake = () => {\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] =\n useState(false)\n const handleCloseModalLockStake = () => {\n setShowConfirmModalLockStake(false)\n }\n return (\n <>\n \n \n \n \n You have no staking position open. Let's make some $$$\n \n \n setShowConfirmModalLockStake(true)}\n >\n Stake now\n \n \n {' '}\n {' '}\n \n )\n}\n\nexport default NotStake\n","import {\n useMemo,\n useState,\n} from 'react'\n\nimport Decimal from 'decimal.js'\n\nimport RedeemButtonTable from '@/components/base/RedeemButtonTable'\nimport {\n SECOND_PER_DAY,\n} from '@/root/src/constants'\nimport { useLockupVaultsData } from '@/root/src/hooks/use-lockup-vault-data'\nimport { useUnlock } from '@/root/src/hooks/use-unlock'\nimport {\n useUserLockupStakingInfo,\n} from '@/root/src/hooks/use-user-lockup-staking-info'\nimport { convertRawAmountToUIAmount } from '@/root/src/utils/bn-utils'\nimport {\n calculateEstFixedReward,\n convertOnChainFixedAprToPercentage,\n} from '@/root/src/utils/staking-helpers'\nimport {\n format,\n formatPercentage,\n} from '@/utils/number-helpers'\nimport {\n Box,\n Card,\n CardContent,\n Divider,\n Stack,\n Typography,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\nimport { formatRemainingTime } from '@/root/src/utils/time-helpers'\n\nconst Staked = () => {\n const [activeIndex, setActiveIndex] = useState(null) // To show loading only on active button\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo()\n const { data: lockupVaultsData } = useLockupVaultsData()\n\n const rows = useMemo(() => {\n if (!lockupVaultsData || !userLockupStakingInfo) return []\n\n const createData = (item: {\n bump: any\n index: any\n lockupVault: any\n lockupVaultIndex: any\n committedApy: any\n lockedAmount: any\n lockedAt: any\n unlocked: any\n }): {\n index: number\n lockedAmount: number\n estApr: number\n lockPeriod: number\n remainingTime: string\n estReward: number\n redeemable: boolean\n vaultIndex: number\n } => {\n const lockedAmount = convertRawAmountToUIAmount(\n item.lockedAmount,\n SOLCAT_DECIMALS,\n )\n\n const lockPeriodInSeconds =\n lockupVaultsData[Number(item.lockupVaultIndex)].lockupDuration.toNumber()\n\n const lockPeriod = lockPeriodInSeconds / SECOND_PER_DAY\n\n const remainingSeconds =\n lockPeriodInSeconds - (Date.now() / 1000 - item.lockedAt)\n\n const remainingTime = formatRemainingTime(remainingSeconds)\n\n const redeemable = remainingSeconds <= 0 && !item.unlocked\n const estApr = convertOnChainFixedAprToPercentage(item.committedApy)\n const estReward = calculateEstFixedReward(\n estApr,\n lockedAmount,\n lockPeriodInSeconds,\n )\n\n return {\n index: item.index,\n lockedAmount,\n estApr,\n lockPeriod,\n remainingTime,\n estReward,\n redeemable,\n vaultIndex: item.lockupVaultIndex,\n }\n }\n\n return userLockupStakingInfo.lockupStakingAccounts\n .filter((account) => account !== null)\n .filter((account) => account.unlocked === false)\n .map(createData)\n }, [lockupVaultsData, userLockupStakingInfo])\n\n const { mutateAsync: unlock, isLoading: isLoadingUnlock } = useUnlock()\n\n const handleRedeem = async (\n index: number,\n vaultIndex: number,\n lockedAmount: number,\n ) => {\n try {\n await unlock({ index, vaultIndex })\n } catch (error) {\n console.error('Error during redeeming:', error)\n }\n }\n\n return (\n \n {rows.map((row) => (\n \n \n \n \n Amount\n \n \n {`${format(new Decimal(row.lockedAmount), true, 2)}`}\n \n \n \n \n \n \n Est APR\n \n \n {`${formatPercentage(row.estApr * 100, false, 2)}`}\n \n \n \n \n Lock period\n \n \n {`${row.lockPeriod} days`}\n \n \n \n \n Redeem delay time\n \n \n {row.remainingTime}\n \n \n \n \n Est reward\n \n \n {`${format(new Decimal(row.estReward), false, 2)} SOLCAT`}\n \n \n \n \n {\n setActiveIndex(row.index)\n handleRedeem(row.index, row.vaultIndex, row.lockedAmount)\n }}\n isLoading={isLoadingUnlock && activeIndex === row.index}\n />\n \n \n ))}\n \n )\n}\n\nexport default Staked\n","import { Typography } from '@mui/material'\n\nimport NotStake from './not-staked'\nimport Staked from './staked'\nimport { useUserLockupStakingInfo } from '@/root/src/hooks/use-user-lockup-staking-info'\nimport { useSolana } from '@/root/src/providers/solana'\nimport { checkIfLockupStaked } from '@/root/src/utils/staking-helpers'\n\nconst FixStake = () => {\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo()\n const { connected } = useSolana()\n\n const isStaked = checkIfLockupStaked(userLockupStakingInfo, connected)\n\n return (\n <>\n \n My fixed staking\n \n {isStaked ? : }\n \n )\n}\n\nexport default FixStake\n","import React, { useState } from 'react'\n\nimport Decimal from 'decimal.js'\n\nimport RedeemButtonTable from '@/components/base/RedeemButtonTable'\nimport { useFlexibleRedeem } from '@/root/src/hooks/use-flexible-redeem'\nimport { useUserFlexibleStakingInfo } from '@/root/src/hooks/use-user-flexible-staking-info'\nimport { useSolana } from '@/root/src/providers/solana'\nimport { format } from '@/utils/number-helpers'\nimport { Card, CardContent, Divider, Stack, Typography } from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\nimport { formatRemainingTime } from '@/root/src/utils/time-helpers'\n\nconst UnstakePositionList = () => {\n const [activeIndex, setActiveIndex] = useState(null) // To show loading only on active button\n\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo()\n const { connected } = useSolana()\n\n const withdrawPositions = userFlexibleStakingInfo?.withdrawPositions\n\n const rows =\n withdrawPositions\n ?.filter((position) => !position.claimed)\n .map((position) => ({\n index: Number(position.index),\n amount: Number(position.amount) / 10 ** SOLCAT_DECIMALS,\n remaining_time: formatRemainingTime(\n Number(position.unlockTime) - Date.now() / 1000,\n ),\n redeemable: Number(position.unlockTime) <= Date.now() / 1000,\n })) || []\n\n const { mutateAsync: redeem, isLoading: isLoadingRedeem } =\n useFlexibleRedeem()\n\n const handleRedeem = async (index: number) => {\n try {\n await redeem(index)\n } catch (error) {\n console.error('Error during redeeming:', error)\n }\n }\n\n return (\n <>\n \n Unstake Position\n \n \n {connected &&\n rows.map((row) => (\n \n \n \n \n \n Amount\n \n {`${format(\n new Decimal(row.amount),\n true,\n 2,\n )}`}\n \n \n \n Remaining time\n \n \n {row.remaining_time}\n \n \n \n \n {\n setActiveIndex(row.index)\n handleRedeem(row.index)\n }}\n isLoading={isLoadingRedeem && activeIndex === row.index}\n />\n \n \n ))}\n \n \n )\n}\n\nexport default UnstakePositionList\n","import { useState } from 'react'\n\nimport Image from 'next/image'\n\nimport BaseButton from '@/components/base/Button'\nimport { useClaimReward } from '@/root/src/hooks/use-claim-reward'\nimport { useUserFlexibleStakingInfo } from '@/root/src/hooks/use-user-flexible-staking-info'\nimport { convertRawAmountToUIAmount } from '@/root/src/utils/bn-utils'\nimport { IconName, staticImportIcon } from '@/root/src/utils/static-import-icon'\nimport { format, formatPercentage } from '@/utils/number-helpers'\nimport { Box, IconButton, Stack, Typography } from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport UnstakeDialog from '../unstake-dialog'\nimport UnstakePositionList from './unstake-position-list'\nimport { useSolana } from '@/root/src/providers/solana'\n\nconst Flexible = () => {\n const [showUnstakeModal, setShowUnstakeModal] = useState(false)\n const { connected } = useSolana()\n\n const handleCloseUnstakeModal = () => {\n setShowUnstakeModal(false)\n }\n\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo()\n\n const userStakedBalance = convertRawAmountToUIAmount(\n userFlexibleStakingInfo?.totalStakedAmount,\n SOLCAT_DECIMALS,\n )\n\n const flexibleApr = userFlexibleStakingInfo?.currentApr || 0\n\n const userPendingReward = convertRawAmountToUIAmount(\n userFlexibleStakingInfo?.pendingReward,\n SOLCAT_DECIMALS,\n )\n\n const { mutate: claimReward, isLoading: isClaimingReward } = useClaimReward()\n\n return (\n <>\n \n \n \n \n \n \n Flexible SOLCAT Staked\n \n \n {format(connected ? userStakedBalance : 0, true)}\n \n \n setShowUnstakeModal(true)}>\n {' '}\n \n \n \n \n Current APR\n \n \n {formatPercentage(connected ? flexibleApr : 0, true, 2)}\n \n \n \n \n \n \n \n SOLCAT Reward\n \n \n {format(connected ? userPendingReward : 0, true)}\n \n \n claimReward()}\n isLoading={isClaimingReward}\n disabled={userPendingReward === 0}\n disableCustomStyle=\"bg-transparent-black-6 text-transparent-black-25\"\n >\n Claim\n \n \n \n \n \n \n \n \n )\n}\n\nexport default Flexible\n","import {\n useMemo,\n useState,\n} from 'react'\n\nimport Image from 'next/image'\n\nimport { useSolCatPrice } from '@/root/src/hooks/use-solcat-price'\nimport {\n useUserFlexibleStakingInfo,\n} from '@/root/src/hooks/use-user-flexible-staking-info'\nimport {\n useUserLockupStakingInfo,\n} from '@/root/src/hooks/use-user-lockup-staking-info'\nimport { useSolana } from '@/root/src/providers/solana'\nimport { convertRawAmountToUIAmount } from '@/root/src/utils/bn-utils'\nimport { format } from '@/root/src/utils/number-helpers'\nimport {\n IconName,\n staticImportIcon,\n} from '@/root/src/utils/static-import-icon'\nimport {\n Card,\n CardContent,\n Grid,\n Stack,\n Typography,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport FixedAPYDialog from '../../stake/default/desktop/fixed-apy-dialog'\nimport FlexibleAPYDialog from '../../stake/default/mobile/flexible-apy-dialog'\nimport { LC_RATIO, STAKETYPE_FLEXIBLE } from '@/root/src/constants'\n\nconst StakeBalanceList = () => {\n const [showConfirmModalStake, setShowConfirmModalStake] =\n useState(false)\n\n const handleCloseModalStake = () => {\n setShowConfirmModalStake(false)\n }\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] =\n useState(false)\n const handleCloseModalLockStake = () => {\n setShowConfirmModalLockStake(false)\n }\n\n const { connected } = useSolana()\n const { data: userFlexibleStakingData } = useUserFlexibleStakingInfo()\n const { data: userLockupStakingData } = useUserLockupStakingInfo()\n const { data: solcatPriceData } = useSolCatPrice()\n\n // flexible staking info\n const totalFlexibleStakingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.totalStakedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.totalStakedAmount, connected])\n const flexibleUnstakePendingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.unstakePending,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.unstakePending, connected])\n const flexibleRedeemPendingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.redeemPending,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.redeemPending, connected])\n // locked staking info\n const totalLockedStakingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userLockupStakingData?.totalLockedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userLockupStakingData?.totalLockedAmount, connected])\n const lockupMaturedUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userLockupStakingData?.maturedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userLockupStakingData?.maturedAmount, connected])\n\n // total staking info\n const totalStakingAmountInUSD = useMemo(() => {\n if (!connected) return 0\n const totalStakingAmountInSolcat =\n totalFlexibleStakingUIAmount + totalLockedStakingUIAmount\n const totalStakingAmountInUSD =\n totalStakingAmountInSolcat * (solcatPriceData?.price || 0)\n\n return totalStakingAmountInUSD\n }, [\n solcatPriceData?.price,\n totalFlexibleStakingUIAmount,\n totalLockedStakingUIAmount,\n connected,\n ])\n\n const LCAmount = useMemo(() => {\n const lockupLCAmount = userLockupStakingData?.lockupStakingAccounts?.reduce((acc, position) => {\n const multiplier = LC_RATIO[position?.lockupVaultIndex as unknown as keyof typeof LC_RATIO] || 0\n return acc + convertRawAmountToUIAmount(position?.lockedAmount, SOLCAT_DECIMALS) * multiplier\n }, 0)\n\n const flexibleLCAmount = totalFlexibleStakingUIAmount * LC_RATIO[STAKETYPE_FLEXIBLE]\n\n return (lockupLCAmount || 0) + flexibleLCAmount\n }, [totalFlexibleStakingUIAmount, userLockupStakingData?.lockupStakingAccounts])\n\n return (\n <>\n \n \n \n \n \n Total staked value\n \n \n ${format(totalStakingAmountInUSD, true, 2)}\n \n \n \n \n\n \n \n \n \n \n \n Flexible SOLCAT Staked\n \n \n {format(totalFlexibleStakingUIAmount, true, 2)}\n \n {connected && (\n <>\n \n {format(flexibleUnstakePendingUIAmount, true, 2)}{' '}\n Unstake pending\n \n \n {format(flexibleRedeemPendingUIAmount, true, 2)}{' '}\n Redeem pending\n \n \n )}\n \n setShowConfirmModalStake(true)}\n />{' '}\n \n \n \n \n \n \n \n \n \n \n Fixed SOLCAT Staked\n \n \n {format(totalLockedStakingUIAmount, true, 2)}\n \n {connected && (\n \n {format(lockupMaturedUIAmount, true, 2)} Matured\n \n )}\n \n setShowConfirmModalLockStake(true)}\n />{' '}\n \n \n \n \n \n \n \n \n Total LC\n \n \n {format(connected ? LCAmount : 0, true, 2)}\n \n \n \n \n \n \n \n \n )\n}\n\nexport default StakeBalanceList\n","import {\n Box,\n Button,\n Divider,\n Stack,\n Typography,\n} from '@mui/material'\n\nimport FixStake from './fix-stake'\nimport FlexStake from './flexible-stake'\nimport StakeBalanceList from './stake-balance-list'\n\nconst MobileView = (\n selectedButton: string,\n handleClick: (buttonText: string) => void,\n) => {\n return (\n \n \n \n \n \n handleClick('flexible')}\n >\n \n Flexible\n \n \n handleClick('fixed')}\n >\n \n Fixed\n \n \n \n {selectedButton === 'fixed' ? : }\n \n \n )\n}\n\nexport default MobileView\n","import {\n useMemo,\n useState,\n} from 'react'\n\nimport BaseButton from '@/components/base/Button'\nimport {\n Card,\n CardContent,\n Grid,\n Stack,\n Typography,\n} from '@mui/material'\nimport { SOLCAT_DECIMALS } from '@renec-foundation/staking-sdk'\n\nimport { useSolCatPrice } from '../../hooks/use-solcat-price'\nimport {\n useUserFlexibleStakingInfo,\n} from '../../hooks/use-user-flexible-staking-info'\nimport {\n useUserLockupStakingInfo,\n} from '../../hooks/use-user-lockup-staking-info'\nimport { useSolana } from '../../providers/solana'\nimport { convertRawAmountToUIAmount } from '../../utils/bn-utils'\nimport { format } from '../../utils/number-helpers'\nimport FixedAPYDialog from '../stake/default/desktop/fixed-apy-dialog'\nimport FlexibleAPYDialog from '../stake/default/desktop/flexible-apy-dialog'\nimport { LC_RATIO, STAKETYPE_FLEXIBLE } from '../../constants'\n\nconst StakeBalanceList = () => {\n const [showConfirmModalStake, setShowConfirmModalStake] =\n useState(false)\n const handleCloseModalStake = () => {\n setShowConfirmModalStake(false)\n }\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] =\n useState(false)\n const handleCloseModalLockStake = () => {\n setShowConfirmModalLockStake(false)\n }\n\n const { connected } = useSolana()\n const { data: userFlexibleStakingData } = useUserFlexibleStakingInfo()\n const { data: userLockupStakingData } = useUserLockupStakingInfo()\n const { data: solcatPriceData } = useSolCatPrice()\n\n // flexible staking info\n const totalFlexibleStakingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.totalStakedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.totalStakedAmount, connected])\n const flexibleUnstakePendingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.unstakePending,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.unstakePending, connected])\n const flexibleRedeemPendingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userFlexibleStakingData?.redeemPending,\n SOLCAT_DECIMALS,\n )\n }, [userFlexibleStakingData?.redeemPending, connected])\n\n // locked staking info\n const totalLockedStakingUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userLockupStakingData?.totalLockedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userLockupStakingData?.totalLockedAmount, connected])\n const lockupMaturedUIAmount = useMemo(() => {\n if (!connected) return 0\n return convertRawAmountToUIAmount(\n userLockupStakingData?.maturedAmount,\n SOLCAT_DECIMALS,\n )\n }, [userLockupStakingData?.maturedAmount, connected])\n\n // total staking info\n const totalStakingAmountInUSD = useMemo(() => {\n if (!connected) return 0\n const totalStakingAmountInSolcat =\n totalFlexibleStakingUIAmount + totalLockedStakingUIAmount\n const totalStakingAmountInUSD =\n totalStakingAmountInSolcat * (solcatPriceData?.price || 0)\n\n return totalStakingAmountInUSD\n }, [\n solcatPriceData?.price,\n totalFlexibleStakingUIAmount,\n totalLockedStakingUIAmount,\n connected,\n ])\n\n const LCAmount = useMemo(() => {\n const lockupLCAmount = userLockupStakingData?.lockupStakingAccounts?.reduce((acc, position) => {\n const multiplier = LC_RATIO[position?.lockupVaultIndex as unknown as keyof typeof LC_RATIO] || 0\n return acc + convertRawAmountToUIAmount(position?.lockedAmount, SOLCAT_DECIMALS) * multiplier\n }, 0)\n\n const flexibleLCAmount = totalFlexibleStakingUIAmount * LC_RATIO[STAKETYPE_FLEXIBLE]\n\n return (lockupLCAmount || 0) + flexibleLCAmount\n }, [totalFlexibleStakingUIAmount, userLockupStakingData?.lockupStakingAccounts])\n\n return (\n <>\n \n \n \n \n \n Total staked value\n \n \n ${format(totalStakingAmountInUSD, true, 2)}\n \n \n \n \n \n \n \n \n \n \n Flexible SOLCAT Staked\n \n \n {format(totalFlexibleStakingUIAmount, true, 2)}\n \n {connected && (\n <>\n \n {format(flexibleUnstakePendingUIAmount, true, 2)}{' '}\n Unstake pending\n \n \n {format(flexibleRedeemPendingUIAmount, true, 2)}{' '}\n Redeem pending\n \n \n )}\n \n setShowConfirmModalStake(true)}\n >\n stake\n \n \n \n \n \n \n \n \n \n \n \n Fixed SOLCAT Staked\n \n \n {format(totalLockedStakingUIAmount, true, 2)}\n \n {connected && (\n \n {format(lockupMaturedUIAmount, true, 2)} Matured\n \n )}\n \n setShowConfirmModalLockStake(true)}\n >\n stake\n \n \n \n \n \n \n \n \n \n Total LC\n \n \n {format(connected ? LCAmount : 0, true, 2)}\n \n \n \n \n \n\n \n \n \n )\n}\n\nexport default StakeBalanceList\n","import {\n useEffect,\n useState,\n} from 'react'\n\nimport { useRouter } from 'next/router'\n\nimport useMobileDetection from '@/hooks/use-mobile-detection'\nimport {\n Box,\n Button,\n Divider,\n Stack,\n Typography,\n} from '@mui/material'\n\nimport FixStake from './fix-stake'\nimport FlexStake from './flexible-stake'\nimport MobileView from './mobile/view'\nimport StakeBalanceList from './stake-balance-list'\n\nconst Content = (\n selectedButton: string,\n handleClick: (buttonText: string) => void,\n) => {\n return (\n \n \n \n \n \n handleClick('flexible')}\n >\n \n Flexible\n \n \n handleClick('fixed')}\n >\n \n Fixed\n \n \n \n {selectedButton === 'fixed' ? : }\n \n \n )\n}\n\nconst Portfolio = () => {\n const isMobile = useMobileDetection()\n\n const [selectedButton, setSelectedButton] = useState('flexible')\n\n const handleClick = (buttonText: string) => {\n setSelectedButton(buttonText)\n }\n\n const router = useRouter()\n const { stakeType } = router.query\n\n useEffect(() => {\n if (stakeType === 'fixed') {\n setSelectedButton('fixed')\n } else if (stakeType === 'flexible') {\n setSelectedButton('flexible')\n }\n }, [stakeType])\n\n return isMobile\n ? MobileView(selectedButton, handleClick)\n : Content(selectedButton, handleClick)\n}\n\nexport default Portfolio\n","export { default } from './view'\n","import Seo from '@/components/base/seo'\nimport Portfolio from '@/components/portfolio'\nimport useTrans from '@/hooks/use-trans'\nimport { MainLayout } from '@/layouts/main-layout'\n\nconst Index = () => {\n const trans = useTrans()\n\n return (\n <>\n {process.env.NEXT_PUBLIC_ENABLE_SEO === 'true' && (\n \n )}\n \n \n \n \n )\n}\n\nexport default Index\n","(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[371],{\n\n/***/ 14904:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/portfolio\",\n function () {\n return __webpack_require__(93536);\n }\n ]);\n if(false) {}\n \n\n/***/ }),\n\n/***/ 93536:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ portfolio; }\n});\n\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(85893);\n// EXTERNAL MODULE: ./src/components/base/seo.tsx\nvar seo = __webpack_require__(32857);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(67294);\n// EXTERNAL MODULE: ./node_modules/next/router.js\nvar next_router = __webpack_require__(11163);\n// EXTERNAL MODULE: ./src/hooks/use-mobile-detection.ts\nvar use_mobile_detection = __webpack_require__(73634);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Box/Box.js + 2 modules\nvar Box = __webpack_require__(5616);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Stack/Stack.js + 1 modules\nvar Stack = __webpack_require__(51233);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Divider/Divider.js\nvar Divider = __webpack_require__(67720);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Button/Button.js + 3 modules\nvar Button = __webpack_require__(69417);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Typography/Typography.js + 1 modules\nvar Typography = __webpack_require__(15861);\n// EXTERNAL MODULE: ./src/components/base/Button.tsx\nvar base_Button = __webpack_require__(2546);\n// EXTERNAL MODULE: ./src/components/stake/default/desktop/fixed-apy-dialog.tsx\nvar fixed_apy_dialog = __webpack_require__(84986);\n;// CONCATENATED MODULE: ./src/components/portfolio/not-staked.tsx\n\n\n\n\n\nconst NotStake = ()=>{\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] = (0,react.useState)(false);\n const handleCloseModalLockStake = ()=>{\n setShowConfirmModalLockStake(false);\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"mt-12 px-8 py-12 bg-white/10 rounded-[40px] w-full max-w-[747px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-white text-center\",\n children: \"You have no staking position open\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-white text-center\",\n children: \"Let's make some $$$\"\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"emphasis\",\n className: \"mt-8\",\n onClick: ()=>setShowConfirmModalLockStake(true),\n children: \"Stake now\"\n })\n ]\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(fixed_apy_dialog/* default */.Z, {\n showModal: showConfirmModalLockStake,\n onClose: handleCloseModalLockStake\n })\n ]\n });\n};\n/* harmony default export */ var not_staked = (NotStake);\n\n// EXTERNAL MODULE: ./node_modules/decimal.js/decimal.mjs\nvar decimal = __webpack_require__(90482);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableCell/TableCell.js + 1 modules\nvar TableCell = __webpack_require__(53252);\n;// CONCATENATED MODULE: ./src/components/base/CustomRowTable.tsx\n\n\nconst CustomTableCell = (param)=>/*#__PURE__*/ {\n let { children , className , width } = param;\n return (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n sx: {\n borderBottom: \"1px solid rgba(255, 255, 255, 0.12)\",\n width: width\n },\n className: \"text-xl font-dm_mono_regular \".concat(className),\n children: children\n });\n};\nconst CustomTableHead = (param)=>/*#__PURE__*/ {\n let { children , className , width } = param;\n return (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n sx: {\n borderBottom: \"1px solid rgba(255, 255, 255, 0.12)\",\n width: width\n },\n className: \"\".concat(className, \" text-white/50 font-dm_mono_regular\"),\n children: children\n });\n};\n\n;// CONCATENATED MODULE: ./src/components/base/RedeemButtonTable.tsx\n\n\nconst RedeemButtonTable = (param)=>{\n let { redeemable , fontSize =\"base\" , className , isMobile , isLoading =false , ...props } = param;\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"emphasis\",\n disabled: !redeemable || isLoading,\n fontSize: fontSize,\n className: className,\n isMobile: isMobile,\n isLoading: isLoading,\n ...props,\n children: \"redeem\"\n });\n};\n/* harmony default export */ var base_RedeemButtonTable = (RedeemButtonTable);\n\n// EXTERNAL MODULE: ./src/utils/number-helpers.ts\nvar number_helpers = __webpack_require__(72199);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableContainer/TableContainer.js + 1 modules\nvar TableContainer = __webpack_require__(72882);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Table/Table.js + 1 modules\nvar Table = __webpack_require__(7906);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(87462);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(63366);\n// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.mjs\nvar clsx = __webpack_require__(90512);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/composeClasses/composeClasses.js\nvar composeClasses = __webpack_require__(58510);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Table/Tablelvl2Context.js\nvar Tablelvl2Context = __webpack_require__(44063);\n// EXTERNAL MODULE: ./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js\nvar DefaultPropsProvider = __webpack_require__(28628);\n// EXTERNAL MODULE: ./node_modules/@mui/material/styles/styled.js\nvar styled = __webpack_require__(90948);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js\nvar generateUtilityClasses = __webpack_require__(1977);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js\nvar generateUtilityClass = __webpack_require__(8027);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/TableHead/tableHeadClasses.js\n\n\nfunction getTableHeadUtilityClass(slot) {\n return (0,generateUtilityClass/* default */.ZP)('MuiTableHead', slot);\n}\nconst tableHeadClasses = (0,generateUtilityClasses/* default */.Z)('MuiTableHead', ['root']);\n/* harmony default export */ var TableHead_tableHeadClasses = ((/* unused pure expression or super */ null && (tableHeadClasses)));\n;// CONCATENATED MODULE: ./node_modules/@mui/material/TableHead/TableHead.js\n'use client';\n\n\n\nconst _excluded = [\"className\", \"component\"];\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return (0,composeClasses/* default */.Z)(slots, getTableHeadUtilityClass, classes);\n};\nconst TableHeadRoot = (0,styled/* default */.ZP)('thead', {\n name: 'MuiTableHead',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'table-header-group'\n});\nconst tablelvl2 = {\n variant: 'head'\n};\nconst defaultComponent = 'thead';\nconst TableHead = /*#__PURE__*/react.forwardRef(function TableHead(inProps, ref) {\n const props = (0,DefaultPropsProvider/* useDefaultProps */.i)({\n props: inProps,\n name: 'MuiTableHead'\n });\n const {\n className,\n component = defaultComponent\n } = props,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded);\n const ownerState = (0,esm_extends/* default */.Z)({}, props, {\n component\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/(0,jsx_runtime.jsx)(Tablelvl2Context/* default.Provider */.Z.Provider, {\n value: tablelvl2,\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(TableHeadRoot, (0,esm_extends/* default */.Z)({\n as: component,\n className: (0,clsx/* default */.Z)(classes.root, className),\n ref: ref,\n role: component === defaultComponent ? null : 'rowgroup',\n ownerState: ownerState\n }, other))\n });\n});\n false ? 0 : void 0;\n/* harmony default export */ var TableHead_TableHead = (TableHead);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableRow/TableRow.js + 1 modules\nvar TableRow = __webpack_require__(53816);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableBody/TableBody.js + 1 modules\nvar TableBody = __webpack_require__(295);\n// EXTERNAL MODULE: ./node_modules/@renec-foundation/staking-sdk/dist/index.js\nvar dist = __webpack_require__(76267);\n// EXTERNAL MODULE: ./src/constants/index.ts\nvar constants = __webpack_require__(1880);\n// EXTERNAL MODULE: ./src/hooks/use-lockup-vault-data.ts\nvar use_lockup_vault_data = __webpack_require__(37192);\n// EXTERNAL MODULE: ./node_modules/react-query/es/index.js\nvar es = __webpack_require__(88767);\n// EXTERNAL MODULE: ./src/providers/solana/index.tsx + 1 modules\nvar solana = __webpack_require__(50452);\n;// CONCATENATED MODULE: ./src/hooks/use-unlock.ts\n\n\nfunction useUnlock() {\n const { stakingClient , connection , mintPublicKey , publicKey , signTransaction } = (0,solana/* useSolana */.X)();\n const queryClient = (0,es.useQueryClient)();\n const mutation = (0,es.useMutation)(async (param)=>{\n let { index , vaultIndex } = param;\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return;\n }\n if (!vaultIndex) {\n throw new Error(\"Vault index is required\");\n }\n const tx = await stakingClient.unlock(index, vaultIndex);\n const latestBlockHash = await connection.getLatestBlockhash();\n tx.recentBlockhash = latestBlockHash.blockhash;\n tx.feePayer = publicKey;\n const signedTx = await signTransaction(tx);\n const signature = await connection.sendRawTransaction(signedTx.serialize());\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature\n });\n return signature;\n }, {\n onSuccess: ()=>{\n queryClient.invalidateQueries([\n \"userLockupStakingInfo\",\n publicKey\n ]);\n queryClient.invalidateQueries([\n \"tokenBalance\",\n (mintPublicKey === null || mintPublicKey === void 0 ? void 0 : mintPublicKey.toString()) || \"\",\n (publicKey === null || publicKey === void 0 ? void 0 : publicKey.toString()) || \"\"\n ]);\n }\n });\n return mutation;\n}\n\n;// CONCATENATED MODULE: ./src/hooks/use-user-lockup-staking-info.ts\n\n\nfunction useUserLockupStakingInfo() {\n const { stakingClient , connection , publicKey , signTransaction , connected , isUserPublicKey } = (0,solana/* useSolana */.X)();\n const query = (0,es.useQuery)([\n \"userLockupStakingInfo\",\n publicKey\n ], async ()=>{\n if (!stakingClient || !connection || !publicKey || !signTransaction || !connected || !isUserPublicKey) {\n return;\n }\n const userLockupStakingInfo = await stakingClient.getUserLockupStakingInfo({\n unlocked: false\n });\n return userLockupStakingInfo;\n }, {\n enabled: !!stakingClient && !!connected && !!isUserPublicKey\n });\n return query;\n}\n\n// EXTERNAL MODULE: ./src/utils/bn-utils.ts\nvar bn_utils = __webpack_require__(97087);\n// EXTERNAL MODULE: ./src/utils/staking-helpers.ts\nvar staking_helpers = __webpack_require__(96395);\n// EXTERNAL MODULE: ./src/utils/time-helpers.ts\nvar time_helpers = __webpack_require__(27034);\n;// CONCATENATED MODULE: ./src/components/portfolio/staked.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Staked = ()=>{\n const [activeIndex, setActiveIndex] = (0,react.useState)(null) // To show loading only on active button\n ;\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo();\n const { data: lockupVaultsData } = (0,use_lockup_vault_data/* useLockupVaultsData */.K)();\n const rows = (0,react.useMemo)(()=>{\n if (!lockupVaultsData || !userLockupStakingInfo) return [];\n const createData = (item)=>{\n const lockedAmount = (0,bn_utils/* convertRawAmountToUIAmount */.J)(item.lockedAmount, dist.SOLCAT_DECIMALS);\n const lockDurationInSeconds = lockupVaultsData[Number(item.lockupVaultIndex)].lockupDuration.toNumber();\n const lockPeriod = lockDurationInSeconds / constants/* SECOND_PER_DAY */.rw;\n const remainingSeconds = lockDurationInSeconds - (Date.now() / 1000 - item.lockedAt);\n const remainingTime = (0,time_helpers/* formatRemainingTime */.d)(remainingSeconds);\n const redeemable = remainingSeconds <= 0 && !item.unlocked;\n const estApr = (0,staking_helpers/* convertOnChainFixedAprToPercentage */.Pw)(item.committedApy);\n const estReward = (0,staking_helpers/* calculateEstFixedReward */.RZ)(estApr, lockedAmount, lockDurationInSeconds);\n return {\n index: item.index,\n lockedAmount,\n estApr,\n lockPeriod,\n remainingTime,\n estReward,\n redeemable,\n vaultIndex: item.lockupVaultIndex\n };\n };\n return userLockupStakingInfo.lockupStakingAccounts.filter((account)=>account !== null).filter((account)=>account.unlocked === false).map(createData);\n }, [\n lockupVaultsData,\n userLockupStakingInfo\n ]);\n const { mutateAsync: unlock , isLoading: isLoadingUnlock } = useUnlock();\n const handleRedeem = async (index, vaultIndex, lockedAmount)=>{\n try {\n await unlock({\n index,\n vaultIndex\n });\n } catch (error) {\n console.error(\"Error during redeeming:\", error);\n }\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableContainer/* default */.Z, {\n className: \"mt-12\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Table/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableHead_TableHead, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(TableRow/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"18%\",\n children: \"Amount\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"18%\",\n children: \"Est APR\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"18%\",\n children: \"Lock Period\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"18%\",\n children: \"Remaining time\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"18%\",\n children: \"Est Reward\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"10%\",\n children: \"\"\n })\n ]\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableBody/* default */.Z, {\n children: rows.map((row)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(TableRow/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"18%\",\n className: \"text-white\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.lockedAmount), true, 2))\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"18%\",\n className: \"text-[#6dfcd1]\",\n children: \"\".concat((0,number_helpers/* formatPercentage */.rl)(row.estApr * 100, false, 2))\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"18%\",\n className: \"text-white\",\n children: \"\".concat(row.lockPeriod, \" days\")\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"18%\",\n className: \"text-white\",\n children: row.remainingTime\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"18%\",\n className: \"text-[#6dfcd1]\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.estReward), false, 2))\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n width: \"10%\",\n className: \"text-white\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(base_RedeemButtonTable, {\n redeemable: row.redeemable,\n onClick: ()=>{\n setActiveIndex(row.index);\n handleRedeem(row.index, row.vaultIndex, row.lockedAmount);\n },\n isLoading: isLoadingUnlock && activeIndex === row.index\n })\n })\n ]\n }, row.index))\n })\n ]\n })\n });\n};\n/* harmony default export */ var staked = (Staked);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/fix-stake.tsx\n\n\n\n\n\n\n\nconst FixStake = ()=>{\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo();\n const { connected } = (0,solana/* useSolana */.X)();\n const isStaked = (0,staking_helpers/* checkIfLockupStaked */.Rq)(userLockupStakingInfo, connected);\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-[32px] mt-12 font-cc uppercase \",\n children: \"My fixed staking\"\n }),\n isStaked ? /*#__PURE__*/ (0,jsx_runtime.jsx)(staked, {}) : /*#__PURE__*/ (0,jsx_runtime.jsx)(not_staked, {})\n ]\n });\n};\n/* harmony default export */ var fix_stake = (FixStake);\n\n;// CONCATENATED MODULE: ./src/hooks/use-claim-reward.ts\n\n\nfunction useClaimReward() {\n const { stakingClient , connection , mintPublicKey , publicKey , signTransaction } = (0,solana/* useSolana */.X)();\n const queryClient = (0,es.useQueryClient)();\n const mutation = (0,es.useMutation)(async ()=>{\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return;\n }\n const tx = await stakingClient.claim();\n const latestBlockHash = await connection.getLatestBlockhash();\n tx.recentBlockhash = latestBlockHash.blockhash;\n tx.feePayer = publicKey;\n const signedTx = await signTransaction(tx);\n const signature = await connection.sendRawTransaction(signedTx.serialize());\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature\n });\n return signature;\n }, {\n onSuccess: ()=>{\n queryClient.invalidateQueries([\n \"userFlexibleStakingInfo\",\n publicKey\n ]);\n queryClient.invalidateQueries([\n \"tokenBalance\",\n (mintPublicKey === null || mintPublicKey === void 0 ? void 0 : mintPublicKey.toString()) || \"\",\n (publicKey === null || publicKey === void 0 ? void 0 : publicKey.toString()) || \"\"\n ]);\n }\n });\n return mutation;\n}\n\n;// CONCATENATED MODULE: ./src/hooks/use-user-flexible-staking-info.ts\n\n\nfunction useUserFlexibleStakingInfo() {\n const { stakingClient , connection , publicKey , signTransaction , connected , isUserPublicKey } = (0,solana/* useSolana */.X)();\n const query = (0,es.useQuery)([\n \"userFlexibleStakingInfo\",\n publicKey\n ], async ()=>{\n if (!stakingClient || !connection || !publicKey || !signTransaction || !connected || !isUserPublicKey) {\n return;\n }\n const userFlexibleStakingInfo = await stakingClient.getUserFlexibleStakingInfo({\n withdrew: false\n });\n return userFlexibleStakingInfo;\n }, {\n enabled: !!stakingClient && !!connected && !!isUserPublicKey\n });\n return query;\n}\n\n// EXTERNAL MODULE: ./node_modules/next/image.js\nvar next_image = __webpack_require__(25675);\nvar image_default = /*#__PURE__*/__webpack_require__.n(next_image);\n// EXTERNAL MODULE: ./src/components/base/AmountInput.tsx + 2 modules\nvar AmountInput = __webpack_require__(18387);\n// EXTERNAL MODULE: ./src/components/base/BaseDialog.tsx\nvar BaseDialog = __webpack_require__(76824);\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js\nvar useWallet = __webpack_require__(54306);\n// EXTERNAL MODULE: ./node_modules/bignumber.js/bignumber.mjs\nvar bignumber = __webpack_require__(70794);\n// EXTERNAL MODULE: ./node_modules/bn.js/lib/bn.js\nvar bn = __webpack_require__(13550);\nvar bn_default = /*#__PURE__*/__webpack_require__.n(bn);\n;// CONCATENATED MODULE: ./src/hooks/use-unstake.ts\n\n\n\n\n\nfunction useUnstake() {\n const { stakingClient , connection , publicKey , signTransaction } = (0,solana/* useSolana */.X)();\n const queryClient = (0,es.useQueryClient)();\n const mutation = (0,es.useMutation)(async (amount)=>{\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return;\n }\n const unstakeAmount = new bignumber/* default */.Z(amount).times(Math.pow(10, dist.SOLCAT_DECIMALS));\n const tx = await stakingClient.withdraw(new (bn_default())(unstakeAmount.toFixed(0)));\n const latestBlockHash = await connection.getLatestBlockhash();\n tx.recentBlockhash = latestBlockHash.blockhash;\n tx.feePayer = publicKey;\n const signedTx = await signTransaction(tx);\n const signature = await connection.sendRawTransaction(signedTx.serialize());\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature\n });\n return signature;\n }, {\n onSuccess: ()=>{\n queryClient.invalidateQueries([\n \"userFlexibleStakingInfo\",\n publicKey\n ]);\n }\n });\n return mutation;\n}\n\n// EXTERNAL MODULE: ./src/utils/static-import-icon.tsx + 16 modules\nvar static_import_icon = __webpack_require__(19963);\n// EXTERNAL MODULE: ./src/components/connect-wallet/index.ts + 3 modules\nvar connect_wallet = __webpack_require__(69618);\n;// CONCATENATED MODULE: ./src/components/portfolio/unstake-dialog.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst UnstakeDialog = (param)=>{\n let { showModal , onClose } = param;\n const [amount, setAmount] = (0,react.useState)(\"\");\n const { connected } = (0,useWallet/* useWallet */.O)();\n const isMobile = (0,use_mobile_detection/* default */.Z)();\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo();\n const balance = (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.totalStakedAmount, dist.SOLCAT_DECIMALS);\n const handleCloseModal = (0,react.useCallback)(()=>{\n onClose();\n setAmount(\"\");\n }, [\n onClose\n ]);\n const { mutate: unstake , isLoading: isLoadingUnstake } = useUnstake();\n const handleUnstake = ()=>{\n unstake(amount, {\n onSettled: ()=>{\n handleCloseModal();\n }\n });\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(BaseDialog/* default */.Z, {\n handleClose: handleCloseModal,\n isOpened: showModal,\n title: \"unstake\",\n body: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(AmountInput/* default */.Z, {\n amount: amount,\n setAmount: setAmount,\n checkStakingBalance: true,\n balance: balance\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n gap: 1,\n className: \"mt-2.5\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)((image_default()), {\n src: (0,static_import_icon/* staticImportIcon */.N)(static_import_icon/* IconName.WARNING_CIRCLE */.u.WARNING_CIRCLE),\n alt: static_import_icon/* IconName.WARNING_CIRCLE */.u.WARNING_CIRCLE,\n width: 20,\n height: 20\n }),\n \" \",\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-[#ffc672]\",\n children: \"After unstaking, LC will be deducted and there's a 15-day cooldown to claim your funds.\"\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"\".concat(isMobile ? \"my-2.5\" : \"my-5\"),\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Stack/* default */.Z, {\n children: !connected ? /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n onClick: ()=>handleCloseModal(),\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(connect_wallet/* default */.Z, {})\n }) : /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"danger\",\n fontSize: \"lg\",\n disabled: !amount || isLoadingUnstake,\n onClick: handleUnstake,\n isLoading: isLoadingUnstake,\n children: \"Unstake\"\n })\n })\n ]\n })\n });\n};\n/* harmony default export */ var unstake_dialog = (UnstakeDialog);\n\n;// CONCATENATED MODULE: ./src/hooks/use-flexible-redeem.ts\n\n\nfunction useFlexibleRedeem() {\n const { stakingClient , connection , mintPublicKey , publicKey , signTransaction } = (0,solana/* useSolana */.X)();\n const queryClient = (0,es.useQueryClient)();\n const mutation = (0,es.useMutation)(async (index)=>{\n if (!stakingClient || !connection || !publicKey || !signTransaction) {\n return;\n }\n const tx = await stakingClient.withdrawAfterDelay(index);\n const latestBlockHash = await connection.getLatestBlockhash();\n tx.recentBlockhash = latestBlockHash.blockhash;\n tx.feePayer = publicKey;\n const signedTx = await signTransaction(tx);\n const signature = await connection.sendRawTransaction(signedTx.serialize());\n await connection.confirmTransaction({\n blockhash: latestBlockHash.blockhash,\n lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,\n signature: signature\n });\n return signature;\n }, {\n onSuccess: ()=>{\n queryClient.invalidateQueries([\n \"userFlexibleStakingInfo\",\n publicKey\n ]);\n queryClient.invalidateQueries([\n \"tokenBalance\",\n (mintPublicKey === null || mintPublicKey === void 0 ? void 0 : mintPublicKey.toString()) || \"\",\n (publicKey === null || publicKey === void 0 ? void 0 : publicKey.toString()) || \"\"\n ]);\n }\n });\n return mutation;\n}\n\n;// CONCATENATED MODULE: ./src/components/portfolio/unstake-position-list.tsx\n\n\n\n\n\n\n\n\n\n\n\n\nconst UnstakePositionList = ()=>{\n const [activeIndex, setActiveIndex] = (0,react.useState)(null) // To show loading only on active button\n ;\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo();\n const { connected } = (0,solana/* useSolana */.X)();\n const withdrawPositions = userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.withdrawPositions;\n const rows = (withdrawPositions === null || withdrawPositions === void 0 ? void 0 : withdrawPositions.filter((position)=>!position.claimed).map((position)=>({\n index: Number(position.index),\n amount: Number(position.amount) / 10 ** dist.SOLCAT_DECIMALS,\n remaining_time: (0,time_helpers/* formatRemainingTime */.d)(Number(position.unlockTime) - Date.now() / 1000),\n redeemable: Number(position.unlockTime) <= Date.now() / 1000\n }))) || [];\n const { mutateAsync: redeem , isLoading: isLoadingRedeem } = useFlexibleRedeem();\n const handleRedeem = async (index)=>{\n try {\n await redeem(index);\n } catch (error) {\n console.error(\"Error during redeeming:\", error);\n }\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"mt-12 text-white text-[32px] font-normal font-cc uppercase\",\n children: \"Unstake Position\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableContainer/* default */.Z, {\n className: \"mt-12\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Table/* default */.Z, {\n \"aria-label\": \"simple table\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableHead_TableHead, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(TableRow/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"45%\",\n children: \"Amount\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"45%\",\n children: \"Remaining time\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableHead, {\n width: \"10%\",\n children: \"\"\n })\n ]\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableBody/* default */.Z, {\n children: connected && rows.map((row)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(TableRow/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n className: \"text-white\",\n width: \"45%\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.amount), true, 2))\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n className: \"text-white\",\n width: \"45%\",\n children: row.remaining_time\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CustomTableCell, {\n className: \"text-white\",\n width: \"10%\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(base_RedeemButtonTable, {\n redeemable: row.redeemable,\n onClick: ()=>{\n setActiveIndex(row.index);\n handleRedeem(row.index);\n },\n isLoading: isLoadingRedeem && activeIndex === row.index\n })\n })\n ]\n }, row.index))\n })\n ]\n })\n })\n ]\n });\n};\n/* harmony default export */ var unstake_position_list = (UnstakePositionList);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/flexible-stake.tsx\n\n\n\n\n\n\n\n\n\n\n\n\nconst Flexible = ()=>{\n const [showUnstakeModal, setShowUnstakeModal] = (0,react.useState)(false);\n const { connected } = (0,solana/* useSolana */.X)();\n const handleCloseUnstakeModal = ()=>{\n setShowUnstakeModal(false);\n };\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo();\n const userStakedBalance = (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.totalStakedAmount, dist.SOLCAT_DECIMALS);\n const flexibleApr = (userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.currentApr) || 0;\n const userPendingReward = (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.pendingReward, dist.SOLCAT_DECIMALS);\n const { mutate: claimReward , isLoading: isClaimingReward } = useClaimReward();\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"mt-12 bg-white/10 rounded-[20px] w-full max-w-[683px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"h-[248px] p-8\",\n justifyContent: \"space-between\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-dm_mono_regular\",\n children: \"Flexible SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? userStakedBalance : 0, true)\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"danger-subtle\",\n fontSize: \"base\",\n onClick: ()=>setShowUnstakeModal(true),\n disabled: userStakedBalance === 0,\n children: \"unstake\"\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"h-[76px] gap-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-dm_mono_regular\",\n children: \"Current APR\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* formatPercentage */.rl)(connected ? flexibleApr : 0, true, 2)\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"h-[124px] px-8 py-6 bg-[#e4ceff] rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-[#010101] text-xl font-dm_mono_regular\",\n children: \"SOLCAT Reward\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-[#010101] text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? userPendingReward : 0, true)\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"primary\",\n onClick: ()=>claimReward(),\n isLoading: isClaimingReward,\n disabled: userPendingReward === 0,\n disableCustomStyle: \"bg-transparent-black-6 text-transparent-black-25\",\n children: \"Claim\"\n })\n ]\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(unstake_position_list, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(unstake_dialog, {\n showModal: showUnstakeModal,\n onClose: handleCloseUnstakeModal\n })\n ]\n });\n};\n/* harmony default export */ var flexible_stake = (Flexible);\n\n// EXTERNAL MODULE: ./src/components/stake/default/mobile/fixed-apy-dialog.tsx\nvar mobile_fixed_apy_dialog = __webpack_require__(24074);\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/not-staked.tsx\n\n\n\n\n\nconst not_staked_NotStake = ()=>{\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] = (0,react.useState)(false);\n const handleCloseModalLockStake = ()=>{\n setShowConfirmModalLockStake(false);\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"px-6 py-8 bg-white/10 rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n alignItems: \"center\",\n gap: 2,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Stack/* default */.Z, {\n alignItems: \"center\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-white text-center text-sm\",\n children: \"You have no staking position open. Let's make some $$$\"\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"emphasis\",\n fontSize: \"sm\",\n onClick: ()=>setShowConfirmModalLockStake(true),\n children: \"Stake now\"\n })\n ]\n })\n }),\n \" \",\n /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_fixed_apy_dialog/* default */.Z, {\n showModal: showConfirmModalLockStake,\n onClose: handleCloseModalLockStake\n }),\n \" \"\n ]\n });\n};\n/* harmony default export */ var mobile_not_staked = (not_staked_NotStake);\n\n// EXTERNAL MODULE: ./node_modules/@mui/material/Card/Card.js + 1 modules\nvar Card = __webpack_require__(66242);\n// EXTERNAL MODULE: ./node_modules/@mui/material/CardContent/CardContent.js + 1 modules\nvar CardContent = __webpack_require__(44267);\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/staked.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst staked_Staked = ()=>{\n const [activeIndex, setActiveIndex] = (0,react.useState)(null) // To show loading only on active button\n ;\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo();\n const { data: lockupVaultsData } = (0,use_lockup_vault_data/* useLockupVaultsData */.K)();\n const rows = (0,react.useMemo)(()=>{\n if (!lockupVaultsData || !userLockupStakingInfo) return [];\n const createData = (item)=>{\n const lockedAmount = (0,bn_utils/* convertRawAmountToUIAmount */.J)(item.lockedAmount, dist.SOLCAT_DECIMALS);\n const lockPeriodInSeconds = lockupVaultsData[Number(item.lockupVaultIndex)].lockupDuration.toNumber();\n const lockPeriod = lockPeriodInSeconds / constants/* SECOND_PER_DAY */.rw;\n const remainingSeconds = lockPeriodInSeconds - (Date.now() / 1000 - item.lockedAt);\n const remainingTime = (0,time_helpers/* formatRemainingTime */.d)(remainingSeconds);\n const redeemable = remainingSeconds <= 0 && !item.unlocked;\n const estApr = (0,staking_helpers/* convertOnChainFixedAprToPercentage */.Pw)(item.committedApy);\n const estReward = (0,staking_helpers/* calculateEstFixedReward */.RZ)(estApr, lockedAmount, lockPeriodInSeconds);\n return {\n index: item.index,\n lockedAmount,\n estApr,\n lockPeriod,\n remainingTime,\n estReward,\n redeemable,\n vaultIndex: item.lockupVaultIndex\n };\n };\n return userLockupStakingInfo.lockupStakingAccounts.filter((account)=>account !== null).filter((account)=>account.unlocked === false).map(createData);\n }, [\n lockupVaultsData,\n userLockupStakingInfo\n ]);\n const { mutateAsync: unlock , isLoading: isLoadingUnlock } = useUnlock();\n const handleRedeem = async (index, vaultIndex, lockedAmount)=>{\n try {\n await unlock({\n index,\n vaultIndex\n });\n } catch (error) {\n console.error(\"Error during redeeming:\", error);\n }\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(Stack/* default */.Z, {\n className: \"w-full gap-2\",\n children: rows.map((row)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"rounded-[8px] p-4 bg-transparent-white-8 border border-solid border-transparent-white-8\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"space-y-2.5 p-0\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"gap-2 p-1\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Amount\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono text-xl text-white\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.lockedAmount), true, 2))\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"w-full\",\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"px-1\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Box/* default */.Z, {\n className: \"flex justify-between py-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Est APR\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-mint-green\",\n children: \"\".concat((0,number_helpers/* formatPercentage */.rl)(row.estApr * 100, false, 2))\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Box/* default */.Z, {\n className: \"flex justify-between py-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Lock period\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white\",\n children: \"\".concat(row.lockPeriod, \" days\")\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Box/* default */.Z, {\n className: \"flex justify-between py-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Redeem delay time\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white\",\n children: row.remainingTime\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Box/* default */.Z, {\n className: \"flex justify-between py-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Est reward\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-mint-green\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.estReward), false, 2), \" SOLCAT\")\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"w-full\",\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_RedeemButtonTable, {\n redeemable: row.redeemable,\n fontSize: \"sm\",\n className: \"w-full\",\n isMobile: true,\n onClick: ()=>{\n setActiveIndex(row.index);\n handleRedeem(row.index, row.vaultIndex, row.lockedAmount);\n },\n isLoading: isLoadingUnlock && activeIndex === row.index\n })\n ]\n })\n }, row.index))\n });\n};\n/* harmony default export */ var mobile_staked = (staked_Staked);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/fix-stake.tsx\n\n\n\n\n\n\n\nconst fix_stake_FixStake = ()=>{\n const { data: userLockupStakingInfo } = useUserLockupStakingInfo();\n const { connected } = (0,solana/* useSolana */.X)();\n const isStaked = (0,staking_helpers/* checkIfLockupStaked */.Rq)(userLockupStakingInfo, connected);\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-cc uppercase \",\n children: \"My fixed staking\"\n }),\n isStaked ? /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_staked, {}) : /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_not_staked, {})\n ]\n });\n};\n/* harmony default export */ var mobile_fix_stake = (fix_stake_FixStake);\n\n// EXTERNAL MODULE: ./node_modules/@mui/material/IconButton/IconButton.js + 1 modules\nvar IconButton = __webpack_require__(93946);\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/unstake-position-list.tsx\n\n\n\n\n\n\n\n\n\n\n\nconst unstake_position_list_UnstakePositionList = ()=>{\n const [activeIndex, setActiveIndex] = (0,react.useState)(null) // To show loading only on active button\n ;\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo();\n const { connected } = (0,solana/* useSolana */.X)();\n const withdrawPositions = userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.withdrawPositions;\n const rows = (withdrawPositions === null || withdrawPositions === void 0 ? void 0 : withdrawPositions.filter((position)=>!position.claimed).map((position)=>({\n index: Number(position.index),\n amount: Number(position.amount) / 10 ** dist.SOLCAT_DECIMALS,\n remaining_time: (0,time_helpers/* formatRemainingTime */.d)(Number(position.unlockTime) - Date.now() / 1000),\n redeemable: Number(position.unlockTime) <= Date.now() / 1000\n }))) || [];\n const { mutateAsync: redeem , isLoading: isLoadingRedeem } = useFlexibleRedeem();\n const handleRedeem = async (index)=>{\n try {\n await redeem(index);\n } catch (error) {\n console.error(\"Error during redeeming:\", error);\n }\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-normal font-cc uppercase\",\n children: \"Unstake Position\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Stack/* default */.Z, {\n className: \"w-full gap-2\",\n children: connected && rows.map((row)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"rounded-[8px] p-4 bg-transparent-white-8 border border-solid border-transparent-white-8\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"space-y-2.5 p-0\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n gap: 1,\n direction: \"row\",\n className: \"justify-between\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n gap: 1,\n className: \"p-1\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Amount\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono text-xl text-white\",\n children: \"\".concat((0,number_helpers/* format */.WU)(new decimal/* default */.Z(row.amount), true, 2))\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n gap: 1,\n className: \"p-1 items-end\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono_regular text-sm text-white/50\",\n children: \"Remaining time\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"font-dm_mono text-xl text-white\",\n children: row.remaining_time\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"w-full\",\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_RedeemButtonTable, {\n redeemable: row.redeemable,\n fontSize: \"sm\",\n className: \"w-full\",\n isMobile: true,\n onClick: ()=>{\n setActiveIndex(row.index);\n handleRedeem(row.index);\n },\n isLoading: isLoadingRedeem && activeIndex === row.index\n })\n ]\n })\n }, row.index))\n })\n ]\n });\n};\n/* harmony default export */ var mobile_unstake_position_list = (unstake_position_list_UnstakePositionList);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/flexible-stake.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst flexible_stake_Flexible = ()=>{\n const [showUnstakeModal, setShowUnstakeModal] = (0,react.useState)(false);\n const { connected } = (0,solana/* useSolana */.X)();\n const handleCloseUnstakeModal = ()=>{\n setShowUnstakeModal(false);\n };\n const { data: userFlexibleStakingInfo } = useUserFlexibleStakingInfo();\n const userStakedBalance = (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.totalStakedAmount, dist.SOLCAT_DECIMALS);\n const flexibleApr = (userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.currentApr) || 0;\n const userPendingReward = (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingInfo === null || userFlexibleStakingInfo === void 0 ? void 0 : userFlexibleStakingInfo.pendingReward, dist.SOLCAT_DECIMALS);\n const { mutate: claimReward , isLoading: isClaimingReward } = useClaimReward();\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \" bg-white/10 rounded-[12px] w-full\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"p-6\",\n justifyContent: \"space-between\",\n gap: 2,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n gap: 1.25,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n gap: 1,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-sm font-dm_mono_regular\",\n children: \"Flexible SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? userStakedBalance : 0, true)\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(IconButton/* default */.Z, {\n onClick: ()=>setShowUnstakeModal(true),\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)((image_default()), {\n src: (0,static_import_icon/* staticImportIcon */.N)(static_import_icon/* IconName.MINUS */.u.MINUS),\n alt: static_import_icon/* IconName.MINUS */.u.MINUS,\n width: 32,\n height: 32\n }),\n \" \"\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"gap-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-sm font-dm_mono_regular\",\n children: \"Current APR\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* formatPercentage */.rl)(connected ? flexibleApr : 0, true, 2)\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"px-6 py-3 bg-[#e4ceff] rounded-[12px] gap={1.25}\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n gap: 1,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-black text-sm font-dm_mono_regular\",\n children: \"SOLCAT Reward\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-black text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? userPendingReward : 0, true)\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"primary\",\n isMobile: true,\n fontSize: \"sm\",\n onClick: ()=>claimReward(),\n isLoading: isClaimingReward,\n disabled: userPendingReward === 0,\n disableCustomStyle: \"bg-transparent-black-6 text-transparent-black-25\",\n children: \"Claim\"\n })\n ]\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_unstake_position_list, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(unstake_dialog, {\n showModal: showUnstakeModal,\n onClose: handleCloseUnstakeModal\n })\n ]\n });\n};\n/* harmony default export */ var mobile_flexible_stake = (flexible_stake_Flexible);\n\n// EXTERNAL MODULE: ./src/hooks/use-solcat-price.ts + 1 modules\nvar use_solcat_price = __webpack_require__(15200);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Grid/Grid.js + 2 modules\nvar Grid = __webpack_require__(86886);\n// EXTERNAL MODULE: ./src/components/stake/default/mobile/flexible-apy-dialog.tsx\nvar flexible_apy_dialog = __webpack_require__(15306);\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/stake-balance-list.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst StakeBalanceList = ()=>{\n const [showConfirmModalStake, setShowConfirmModalStake] = (0,react.useState)(false);\n const handleCloseModalStake = ()=>{\n setShowConfirmModalStake(false);\n };\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] = (0,react.useState)(false);\n const handleCloseModalLockStake = ()=>{\n setShowConfirmModalLockStake(false);\n };\n const { connected } = (0,solana/* useSolana */.X)();\n const { data: userFlexibleStakingData } = useUserFlexibleStakingInfo();\n const { data: userLockupStakingData } = useUserLockupStakingInfo();\n const { data: solcatPriceData } = (0,use_solcat_price/* useSolCatPrice */.Y)();\n // flexible staking info\n const totalFlexibleStakingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.totalStakedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.totalStakedAmount,\n connected\n ]);\n const flexibleUnstakePendingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.unstakePending, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.unstakePending,\n connected\n ]);\n const flexibleRedeemPendingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.redeemPending, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.redeemPending,\n connected\n ]);\n // locked staking info\n const totalLockedStakingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.totalLockedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.totalLockedAmount,\n connected\n ]);\n const lockupMaturedUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.maturedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.maturedAmount,\n connected\n ]);\n // total staking info\n const totalStakingAmountInUSD = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n const totalStakingAmountInSolcat = totalFlexibleStakingUIAmount + totalLockedStakingUIAmount;\n const totalStakingAmountInUSD = totalStakingAmountInSolcat * ((solcatPriceData === null || solcatPriceData === void 0 ? void 0 : solcatPriceData.price) || 0);\n return totalStakingAmountInUSD;\n }, [\n solcatPriceData === null || solcatPriceData === void 0 ? void 0 : solcatPriceData.price,\n totalFlexibleStakingUIAmount,\n totalLockedStakingUIAmount,\n connected\n ]);\n const LCAmount = (0,react.useMemo)(()=>{\n var _userLockupStakingData_lockupStakingAccounts;\n const lockupLCAmount = userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : (_userLockupStakingData_lockupStakingAccounts = userLockupStakingData.lockupStakingAccounts) === null || _userLockupStakingData_lockupStakingAccounts === void 0 ? void 0 : _userLockupStakingData_lockupStakingAccounts.reduce((acc, position)=>{\n const multiplier = constants/* LC_RATIO */.JE[position === null || position === void 0 ? void 0 : position.lockupVaultIndex] || 0;\n return acc + (0,bn_utils/* convertRawAmountToUIAmount */.J)(position === null || position === void 0 ? void 0 : position.lockedAmount, dist.SOLCAT_DECIMALS) * multiplier;\n }, 0);\n const flexibleLCAmount = totalFlexibleStakingUIAmount * constants/* LC_RATIO */.JE[constants/* STAKETYPE_FLEXIBLE */._Y];\n return (lockupLCAmount || 0) + flexibleLCAmount;\n }, [\n totalFlexibleStakingUIAmount,\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.lockupStakingAccounts\n ]);\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Grid/* default */.ZP, {\n container: true,\n spacing: 1,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"bg-white/10 rounded-[12px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"px-6 py-4 space-y-1\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: \"Total staked value\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white text-xl font-zen_dot uppercase\",\n children: [\n \"$\",\n (0,number_helpers/* format */.WU)(totalStakingAmountInUSD, true, 2)\n ]\n })\n ]\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"bg-white/10 rounded-[12px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(CardContent/* default */.Z, {\n className: \"px-6 py-4 space-y-1\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n className: \"gap-8 justify-between items-center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"gap-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: \"Flexible SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(totalFlexibleStakingUIAmount, true, 2)\n }),\n connected && /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: [\n (0,number_helpers/* format */.WU)(flexibleUnstakePendingUIAmount, true, 2),\n \" \",\n \"Unstake pending\"\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: [\n (0,number_helpers/* format */.WU)(flexibleRedeemPendingUIAmount, true, 2),\n \" \",\n \"Redeem pending\"\n ]\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)((image_default()), {\n src: (0,static_import_icon/* staticImportIcon */.N)(static_import_icon/* IconName.PLUS */.u.PLUS),\n alt: static_import_icon/* IconName.PLUS */.u.PLUS,\n width: 32,\n height: 32,\n onClick: ()=>setShowConfirmModalStake(true)\n }),\n \" \"\n ]\n })\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"bg-white/10 rounded-[12px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(CardContent/* default */.Z, {\n className: \"px-6 py-4 space-y-1\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n direction: \"row\",\n className: \"gap-8 justify-between items-center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"gap-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: \"Fixed SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(totalLockedStakingUIAmount, true, 2)\n }),\n connected && /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: [\n (0,number_helpers/* format */.WU)(lockupMaturedUIAmount, true, 2),\n \" Matured\"\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)((image_default()), {\n src: (0,static_import_icon/* staticImportIcon */.N)(static_import_icon/* IconName.PLUS */.u.PLUS),\n alt: static_import_icon/* IconName.PLUS */.u.PLUS,\n width: 32,\n height: 32,\n onClick: ()=>setShowConfirmModalLockStake(true)\n }),\n \" \"\n ]\n })\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"bg-white/10 rounded-[12px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"px-6 py-4 space-y-1\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono text-sm\",\n children: \"Total LC\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"pt-3 text-white text-xl font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? LCAmount : 0, true, 2)\n })\n ]\n })\n })\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(flexible_apy_dialog/* default */.Z, {\n showModal: showConfirmModalStake,\n onClose: handleCloseModalStake\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(fixed_apy_dialog/* default */.Z, {\n showModal: showConfirmModalLockStake,\n onClose: handleCloseModalLockStake\n })\n ]\n });\n};\n/* harmony default export */ var stake_balance_list = (StakeBalanceList);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/mobile/view.tsx\n\n\n\n\n\nconst MobileView = (selectedButton, handleClick)=>{\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"mt-1 relative rounded-[20px] bg-box-gradient p-[2px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"rounded-[20px] px-6 pt-6 pb-14 bg-gradient-page gap-6\",\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(stake_balance_list, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"w-full\",\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"p-1 bg-white/10 rounded-full gap-1\",\n direction: \"row\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n className: \"\".concat(selectedButton === \"flexible\" ? \"bg-[#dbc0ff]\" : \"\", \" px-4 py-2 rounded-full\"),\n onClick: ()=>handleClick(\"flexible\"),\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"\".concat(selectedButton === \"flexible\" ? \"text-[#010101]\" : \"text-white\", \" font-dm_mono_regular normal-case text-sm py-[2.5px] px-[7.5px\"),\n children: \"Flexible\"\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n className: \"\".concat(selectedButton === \"fixed\" ? \"bg-[#dbc0ff]\" : \"\", \" px-4 py-2 rounded-full\"),\n onClick: ()=>handleClick(\"fixed\"),\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"\".concat(selectedButton === \"fixed\" ? \"text-[#010101]\" : \"text-white\", \" font-dm_mono_regular normal-case text-sm py-[2.5px] px-[7.5px]\"),\n children: \"Fixed\"\n })\n })\n ]\n }),\n selectedButton === \"fixed\" ? /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_fix_stake, {}) : /*#__PURE__*/ (0,jsx_runtime.jsx)(mobile_flexible_stake, {})\n ]\n })\n });\n};\n/* harmony default export */ var view = (MobileView);\n\n// EXTERNAL MODULE: ./src/components/stake/default/desktop/flexible-apy-dialog.tsx\nvar desktop_flexible_apy_dialog = __webpack_require__(99805);\n;// CONCATENATED MODULE: ./src/components/portfolio/stake-balance-list.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst stake_balance_list_StakeBalanceList = ()=>{\n const [showConfirmModalStake, setShowConfirmModalStake] = (0,react.useState)(false);\n const handleCloseModalStake = ()=>{\n setShowConfirmModalStake(false);\n };\n const [showConfirmModalLockStake, setShowConfirmModalLockStake] = (0,react.useState)(false);\n const handleCloseModalLockStake = ()=>{\n setShowConfirmModalLockStake(false);\n };\n const { connected } = (0,solana/* useSolana */.X)();\n const { data: userFlexibleStakingData } = useUserFlexibleStakingInfo();\n const { data: userLockupStakingData } = useUserLockupStakingInfo();\n const { data: solcatPriceData } = (0,use_solcat_price/* useSolCatPrice */.Y)();\n // flexible staking info\n const totalFlexibleStakingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.totalStakedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.totalStakedAmount,\n connected\n ]);\n const flexibleUnstakePendingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.unstakePending, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.unstakePending,\n connected\n ]);\n const flexibleRedeemPendingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.redeemPending, dist.SOLCAT_DECIMALS);\n }, [\n userFlexibleStakingData === null || userFlexibleStakingData === void 0 ? void 0 : userFlexibleStakingData.redeemPending,\n connected\n ]);\n // locked staking info\n const totalLockedStakingUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.totalLockedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.totalLockedAmount,\n connected\n ]);\n const lockupMaturedUIAmount = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n return (0,bn_utils/* convertRawAmountToUIAmount */.J)(userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.maturedAmount, dist.SOLCAT_DECIMALS);\n }, [\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.maturedAmount,\n connected\n ]);\n // total staking info\n const totalStakingAmountInUSD = (0,react.useMemo)(()=>{\n if (!connected) return 0;\n const totalStakingAmountInSolcat = totalFlexibleStakingUIAmount + totalLockedStakingUIAmount;\n const totalStakingAmountInUSD = totalStakingAmountInSolcat * ((solcatPriceData === null || solcatPriceData === void 0 ? void 0 : solcatPriceData.price) || 0);\n return totalStakingAmountInUSD;\n }, [\n solcatPriceData === null || solcatPriceData === void 0 ? void 0 : solcatPriceData.price,\n totalFlexibleStakingUIAmount,\n totalLockedStakingUIAmount,\n connected\n ]);\n const LCAmount = (0,react.useMemo)(()=>{\n var _userLockupStakingData_lockupStakingAccounts;\n const lockupLCAmount = userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : (_userLockupStakingData_lockupStakingAccounts = userLockupStakingData.lockupStakingAccounts) === null || _userLockupStakingData_lockupStakingAccounts === void 0 ? void 0 : _userLockupStakingData_lockupStakingAccounts.reduce((acc, position)=>{\n const multiplier = constants/* LC_RATIO */.JE[position === null || position === void 0 ? void 0 : position.lockupVaultIndex] || 0;\n return acc + (0,bn_utils/* convertRawAmountToUIAmount */.J)(position === null || position === void 0 ? void 0 : position.lockedAmount, dist.SOLCAT_DECIMALS) * multiplier;\n }, 0);\n const flexibleLCAmount = totalFlexibleStakingUIAmount * constants/* LC_RATIO */.JE[constants/* STAKETYPE_FLEXIBLE */._Y];\n return (lockupLCAmount || 0) + flexibleLCAmount;\n }, [\n totalFlexibleStakingUIAmount,\n userLockupStakingData === null || userLockupStakingData === void 0 ? void 0 : userLockupStakingData.lockupStakingAccounts\n ]);\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Grid/* default */.ZP, {\n container: true,\n spacing: 1,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"h-72 bg-white/10 rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"px-12 py-10\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: \"Total staked value\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"pt-3 text-white text-[32px] font-zen_dot uppercase\",\n children: [\n \"$\",\n (0,number_helpers/* format */.WU)(totalStakingAmountInUSD, true, 2)\n ]\n })\n ]\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"h-72 bg-white/10 rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(CardContent/* default */.Z, {\n className: \"h-full px-12 py-10\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"flex flex-col justify-between h-full\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: \"Flexible SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"pt-3 text-white text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(totalFlexibleStakingUIAmount, true, 2)\n }),\n connected && /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: [\n (0,number_helpers/* format */.WU)(flexibleUnstakePendingUIAmount, true, 2),\n \" \",\n \"Unstake pending\"\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: [\n (0,number_helpers/* format */.WU)(flexibleRedeemPendingUIAmount, true, 2),\n \" \",\n \"Redeem pending\"\n ]\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"emphasis-subtle\",\n className: \"mt-6 w-fit\",\n fontSize: \"base\",\n onClick: ()=>setShowConfirmModalStake(true),\n children: \"stake\"\n })\n ]\n })\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"h-72 bg-white/10 rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(CardContent/* default */.Z, {\n className: \"h-full px-12 py-10\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"flex flex-col justify-between h-full\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: \"Fixed SOLCAT Staked\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"pt-3 text-white text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(totalLockedStakingUIAmount, true, 2)\n }),\n connected && /*#__PURE__*/ (0,jsx_runtime.jsxs)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: [\n (0,number_helpers/* format */.WU)(lockupMaturedUIAmount, true, 2),\n \" Matured\"\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(base_Button/* default */.Z, {\n customVariant: \"emphasis-subtle\",\n className: \"mt-12 w-fit\",\n fontSize: \"base\",\n onClick: ()=>setShowConfirmModalLockStake(true),\n children: \"stake\"\n })\n ]\n })\n })\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Grid/* default */.ZP, {\n item: true,\n xs: 12,\n sm: 6,\n md: 3,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Card/* default */.Z, {\n className: \"h-72 bg-white/10 rounded-[20px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(CardContent/* default */.Z, {\n className: \"px-12 py-10\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"text-white/50 font-dm_mono_regular\",\n children: \"Total LC\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"pt-3 text-white text-[32px] font-zen_dot uppercase\",\n children: (0,number_helpers/* format */.WU)(connected ? LCAmount : 0, true, 2)\n })\n ]\n })\n })\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(desktop_flexible_apy_dialog/* default */.Z, {\n showModal: showConfirmModalStake,\n onClose: handleCloseModalStake\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(fixed_apy_dialog/* default */.Z, {\n showModal: showConfirmModalLockStake,\n onClose: handleCloseModalLockStake\n })\n ]\n });\n};\n/* harmony default export */ var portfolio_stake_balance_list = (stake_balance_list_StakeBalanceList);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/view.tsx\n\n\n\n\n\n\n\n\n\nconst Content = (selectedButton, handleClick)=>{\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n className: \"mt-1 relative rounded-[40px] bg-box-gradient p-[1px]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"rounded-[40px] px-16 pt-16 pb-28 bg-gradient-page\",\n alignItems: \"center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(portfolio_stake_balance_list, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {\n className: \"my-12 w-full\",\n style: {\n height: \"2px\",\n backgroundColor: \"rgba(255, 255, 255, 0.08)\"\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(Stack/* default */.Z, {\n className: \"w-fit p-1 bg-white/10 rounded-full\",\n direction: \"row\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n className: \"\".concat(selectedButton === \"flexible\" ? \"bg-[#dbc0ff]\" : \"\", \" px-6 py-3 rounded-full\"),\n onClick: ()=>handleClick(\"flexible\"),\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"\".concat(selectedButton === \"flexible\" ? \"text-[#010101]\" : \"text-white\", \" font-dm_mono_regular normal-case\"),\n children: \"Flexible\"\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n className: \"\".concat(selectedButton === \"fixed\" ? \"bg-[#dbc0ff]\" : \"\", \" px-6 py-3 rounded-full\"),\n onClick: ()=>handleClick(\"fixed\"),\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n className: \"\".concat(selectedButton === \"fixed\" ? \"text-[#010101]\" : \"text-white\", \" font-dm_mono_regular normal-case\"),\n children: \"Fixed\"\n })\n })\n ]\n }),\n selectedButton === \"fixed\" ? /*#__PURE__*/ (0,jsx_runtime.jsx)(fix_stake, {}) : /*#__PURE__*/ (0,jsx_runtime.jsx)(flexible_stake, {})\n ]\n })\n });\n};\nconst Portfolio = ()=>{\n const isMobile = (0,use_mobile_detection/* default */.Z)();\n const [selectedButton, setSelectedButton] = (0,react.useState)(\"flexible\");\n const handleClick = (buttonText)=>{\n setSelectedButton(buttonText);\n };\n const router = (0,next_router.useRouter)();\n const { stakeType } = router.query;\n (0,react.useEffect)(()=>{\n if (stakeType === \"fixed\") {\n setSelectedButton(\"fixed\");\n } else if (stakeType === \"flexible\") {\n setSelectedButton(\"flexible\");\n }\n }, [\n stakeType\n ]);\n return isMobile ? view(selectedButton, handleClick) : Content(selectedButton, handleClick);\n};\n/* harmony default export */ var portfolio_view = (Portfolio);\n\n;// CONCATENATED MODULE: ./src/components/portfolio/index.tsx\n\n\n// EXTERNAL MODULE: ./src/hooks/use-trans.ts + 1 modules\nvar use_trans = __webpack_require__(942);\n// EXTERNAL MODULE: ./src/layouts/main-layout/index.tsx + 5 modules\nvar main_layout = __webpack_require__(35661);\n;// CONCATENATED MODULE: ./src/pages/portfolio/index.tsx\n/* provided dependency */ var process = __webpack_require__(34155);\n\n\n\n\n\nconst Index = ()=>{\n const trans = (0,use_trans/* default */.Z)();\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n process.env.NEXT_PUBLIC_ENABLE_SEO === \"true\" && /*#__PURE__*/ (0,jsx_runtime.jsx)(seo/* default */.Z, {\n data: {\n title: trans.meta.title,\n description: trans.meta.description,\n thumbnailUrl: trans.meta.thumbnail_url,\n url: \"\".concat(process.env.NEXT_PUBLIC_SITE_URL)\n }\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(main_layout/* MainLayout */.Z, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(portfolio_view, {})\n })\n ]\n });\n};\n/* harmony default export */ var portfolio = (Index);\n\n\n/***/ })\n\n},\n/******/ function(__webpack_require__) { // webpackRuntimeModules\n/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }\n/******/ __webpack_require__.O(0, [870,470,245,261,778,688,774,888,179], function() { return __webpack_exec__(14904); });\n/******/ var __webpack_exports__ = __webpack_require__.O();\n/******/ _N_E = __webpack_exports__;\n/******/ }\n]);"],"names":["self","push","__unused_webpack_module","__unused_webpack_exports","__webpack_require__","window","__NEXT_P","__webpack_exports__","r","d","portfolio","jsx_runtime","seo","react","next_router","use_mobile_detection","Box","Stack","Divider","Button","Typography","base_Button","fixed_apy_dialog","NotStake","showConfirmModalLockStake","setShowConfirmModalLockStake","useState","handleCloseModalLockStake","jsxs","Fragment","children","jsx","Z","className","alignItems","customVariant","onClick","showModal","onClose","decimal","TableCell","CustomTableCell","width","param","sx","borderBottom","concat","CustomTableHead","RedeemButtonTable","redeemable","fontSize","isMobile","isLoading","props","disabled","number_helpers","TableContainer","Table","esm_extends","objectWithoutPropertiesLoose","clsx","composeClasses","Tablelvl2Context","DefaultPropsProvider","styled","generateUtilityClasses","generateUtilityClass","getTableHeadUtilityClass","slot","ZP","_excluded","useUtilityClasses","ownerState","classes","root","TableHeadRoot","name","overridesResolver","styles","display","tablelvl2","variant","defaultComponent","TableHead","forwardRef","inProps","ref","i","component","other","Provider","value","as","role","TableRow","TableBody","dist","constants","use_lockup_vault_data","es","solana","useUnlock","stakingClient","connection","mintPublicKey","publicKey","signTransaction","X","queryClient","useQueryClient","mutation","useMutation","index","vaultIndex","tx","unlock","latestBlockHash","getLatestBlockhash","recentBlockhash","blockhash","feePayer","signedTx","signature","sendRawTransaction","serialize","confirmTransaction","lastValidBlockHeight","invalidateQueries","toString","useUserLockupStakingInfo","connected","isUserPublicKey","query","useQuery","userLockupStakingInfo","getUserLockupStakingInfo","unlocked","enabled","bn_utils","staking_helpers","time_helpers","Staked","activeIndex","setActiveIndex","data","lockupVaultsData","K","rows","useMemo","createData","lockedAmount","J","item","SOLCAT_DECIMALS","lockDurationInSeconds","Number","lockupVaultIndex","lockupDuration","toNumber","lockPeriod","rw","remainingSeconds","Date","now","lockedAt","remainingTime","estApr","Pw","committedApy","estReward","RZ","lockupStakingAccounts","filter","account","map","mutateAsync","isLoadingUnlock","handleRedeem","error","console","WU","row","rl","FixStake","isStaked","Rq","useClaimReward","claim","useUserFlexibleStakingInfo","userFlexibleStakingInfo","getUserFlexibleStakingInfo","withdrew","next_image","image_default","n","AmountInput","BaseDialog","useWallet","bignumber","bn","bn_default","static_import_icon","connect_wallet","UnstakeDialog","amount","setAmount","O","balance","totalStakedAmount","handleCloseModal","useCallback","mutate","unstake","isLoadingUnstake","useUnstake","unstakeAmount","times","Math","pow","withdraw","toFixed","handleUnstake","handleClose","isOpened","title","body","checkStakingBalance","direction","gap","src","N","u","WARNING_CIRCLE","alt","height","style","backgroundColor","useFlexibleRedeem","withdrawAfterDelay","UnstakePositionList","withdrawPositions","position","claimed","remaining_time","unlockTime","redeem","isLoadingRedeem","Flexible","showUnstakeModal","setShowUnstakeModal","handleCloseUnstakeModal","userStakedBalance","flexibleApr","currentApr","userPendingReward","pendingReward","claimReward","isClaimingReward","justifyContent","disableCustomStyle","mobile_fixed_apy_dialog","not_staked_NotStake","Card","CardContent","staked_Staked","lockPeriodInSeconds","fix_stake_FixStake","IconButton","unstake_position_list_UnstakePositionList","flexible_stake_Flexible","MINUS","use_solcat_price","Grid","flexible_apy_dialog","StakeBalanceList","showConfirmModalStake","setShowConfirmModalStake","handleCloseModalStake","userFlexibleStakingData","userLockupStakingData","solcatPriceData","Y","totalFlexibleStakingUIAmount","flexibleUnstakePendingUIAmount","unstakePending","flexibleRedeemPendingUIAmount","redeemPending","totalLockedStakingUIAmount","totalLockedAmount","lockupMaturedUIAmount","maturedAmount","totalStakingAmountInUSD","totalStakingAmountInSolcat","price","LCAmount","_userLockupStakingData_lockupStakingAccounts","lockupLCAmount","reduce","acc","multiplier","JE","flexibleLCAmount","_Y","container","spacing","xs","sm","md","PLUS","MobileView","selectedButton","handleClick","desktop_flexible_apy_dialog","stake_balance_list_StakeBalanceList","Content","Portfolio","setSelectedButton","buttonText","router","useRouter","stakeType","useEffect","view","use_trans","main_layout","process","Index","trans","env","NEXT_PUBLIC_ENABLE_SEO","meta","description","thumbnailUrl","thumbnail_url","url","NEXT_PUBLIC_SITE_URL","s","_N_E"],"sourceRoot":""}