@ape.swap/bonds-sdk 7.0.0-test.0 → 7.0.0-test.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,7 @@ The chain libraries are **optional peer dependencies**: npm doesn't install them
59
59
  Notes:
60
60
 
61
61
  - **LiFi:** `@lifi/widget` v3 itself requires `wagmi`, `@mysten/dapp-kit` and `@solana/wallet-adapter-react`, whichever chains you show. If you want an app without EVM or Sui packages, don't register `lifiAdapter`; the buy flows then simply hide the bridge option.
62
+ - **LiFi is lazy-loaded:** the widget (about 1 MB gzipped) is only downloaded when a user opens the "Swap & Bridge" modal (or hovers its button), not on page load, provided your bundler supports dynamic `import()` (Vite, webpack, Next.js and Rollup all do). Nothing changes on your side: `@lifi/widget` and its peers must still be installed when you register `lifiAdapter`.
62
63
  - **Solana** needs a custom RPC: see [Custom RPCs](#custom-rpcs). The Solana adapter sets the `Buffer` global its libraries need, so you don't need a polyfill.
63
64
  - **Aptos** runs on Aptos **testnet** unless `NEXT_PUBLIC_APTOS_NETWORK=mainnet` is set in your build environment.
64
65
  - `@tanstack/react-query`'s `QueryClientProvider` must wrap the SDK in every setup; the SDK shares your `QueryClient` (its query keys are prefixed with `ApeBond-SDK-`).
@@ -394,7 +394,7 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
394
394
  return bondData ? (jsx(Flex, { className: "modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5", style: { ...MCBuyComponentStyles[bondData?.marketingCampaign] }, children: jsxs(Flex, { className: "modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5", children: [jsx(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: SDKConfig?.referenceId === 'apebond' }), jsx(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx(Flex, { className: clsx('ape:w-full', isProjectView ? 'ape:flex ape:md:hidden!' : 'ape:flex'), children: jsx(BondCards, { bondData: bondData, isDoingMaxBuy: exceedsSafeMaxBuy && !exceedsRealMaxBuy }) }), jsx(Estimations, { depositAmount: depositAmount, inputValue: inputValue, inputTokenPrice: inputTokenPrice, bondData: bondData, youSpendString: youSpendString, isZap: isZapSupported, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: handleMaxButton, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData?.chainId, enableZap: isZapSupported, bondPrincipalToken: bondData?.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice, inputDisabled: isUserRestricted, marketingCampaign: bondData?.marketingCampaign, isConnected: !!account }), SDKConfig.useTiers &&
395
395
  userTier !== LaunchBondTiers.Mythical &&
396
396
  bondData?.billVersion === BillVersion.V4 &&
397
- account && (jsx(PointsLeftForNextTier, { bond: bondData, inputAmount: inputValue, setInputValue: setInputValue, inputTokenPrice: inputTokenPrice, inputTokenDecimals: inputToken === 'NATIVE' ? 18 : (inputToken?.decimals?.[bondData?.chainId] ?? 18) })), bondData?.warningCard && (jsx(Flex, { className: "ape:w-full ape:rounded-normal ape:p-[2px_10px]", style: { background: '#DE62F366' }, children: jsx(Text, { as: "div", size: "12px", className: "ape:font-normal ape:flex ape:items-center ape:leading-5.5!", children: jsx(SafeHTMLComponent, { html: bondData?.warningCard }) }) })), jsx(Flex, { className: "modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between", children: jsx(Flex, { className: "button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full", children: !account ? (jsx(ConnectButton, {})) : (jsxs(Flex, { className: "ape:w-full ape:gap-[10px] ape:flex-col ape:md:flex-row", children: [jsx(Button, { variant: "secondary", onClick: () => canBridge ? onOpenBridgeModal() : bondChain === ChainId.L1X ? onOpenl1xIframe() : openExternal(), className: "ape:w-full ape:md:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!", children: canBridge
397
+ account && (jsx(PointsLeftForNextTier, { bond: bondData, inputAmount: inputValue, setInputValue: setInputValue, inputTokenPrice: inputTokenPrice, inputTokenDecimals: inputToken === 'NATIVE' ? 18 : (inputToken?.decimals?.[bondData?.chainId] ?? 18) })), bondData?.warningCard && (jsx(Flex, { className: "ape:w-full ape:rounded-normal ape:p-[2px_10px]", style: { background: '#DE62F366' }, children: jsx(Text, { as: "div", size: "12px", className: "ape:font-normal ape:flex ape:items-center ape:leading-5.5!", children: jsx(SafeHTMLComponent, { html: bondData?.warningCard }) }) })), jsx(Flex, { className: "modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between", children: jsx(Flex, { className: "button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full", children: !account ? (jsx(ConnectButton, {})) : (jsxs(Flex, { className: "ape:w-full ape:gap-[10px] ape:flex-col ape:md:flex-row", children: [jsx(Button, { variant: "secondary", onClick: () => canBridge ? onOpenBridgeModal() : bondChain === ChainId.L1X ? onOpenl1xIframe() : openExternal(), onMouseEnter: canBridge ? bridge.preload : undefined, onFocus: canBridge ? bridge.preload : undefined, className: "ape:w-full ape:md:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!", children: canBridge
398
398
  ? isProjectView
399
399
  ? 'Bridge funds'
400
400
  : `Bridge to ${SHORT_NETWORK_LABEL[bondData?.chainId]}`
@@ -1 +1 @@
1
- {"version":3,"file":"BuyComponent.js","sources":["../../../src/adapters/evm/BuyComponent.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport { convertToBigish } from '../../utils/convertToBigish'\nimport { mulDivRound, toFixedString } from '../../utils/fixedPoint'\nimport ABI_DEPOSIT from '../../config/abi/deposit.json'\nimport ABI_DEPOSIT_SIG from '../../config/abi/depositSig.json'\nimport type { ChainBuyComponentProps } from '../types'\nimport {\n useChainId,\n useSendTransaction,\n useWriteContract,\n // useConfig\n} from 'wagmi'\nimport useModal from '../../hooks/useModal'\n// import ZapModal from '../ZapModal'\nimport { BillVersion, ChainId, LaunchBondTiers, MarketingCampaign } from '@ape.swap/apeswap-lists'\nimport TokenSelectorPanel from '../../components/TokenSelectorPanel'\nimport { useApproval } from './useAllowance'\nimport { SoulZapTokenManager } from '../../config/constants/addresses'\nimport useSoulZapBondQuote from './useSoulZapBondQuote'\nimport { parseEther } from 'viem'\nimport useBondsData from '../../state/bonds/useBondsData'\nimport useTokenFromZapList from '../../hooks/useTokenFromZapList'\nimport { useMonitorTx } from './useMonitorTx'\nimport { usePopups } from '../../state/popups/usePopups'\nimport {\n formatUSDNumber,\n getMaxBuy,\n getPayoutAmount,\n getPrincipalAmount,\n getRawBonus,\n} from '../../utils/displayHelpers'\nimport { useSDKConfig } from '../../state/useSDKConfig'\nimport { zapSupported, ZapSupportedChainId } from '../../config/constants/variables'\nimport { getSymbol } from '../../utils/getNativeTicker'\nimport { useSendReferenceId } from '../../hooks/useSendReferenceId'\nimport ConnectButton from '../../components/ConnectButton'\nimport BondModalHeader from '../../views/BuyBond/components/BondModalHeader'\nimport BondCards from '../../views/BuyBond/components/BondCards/BondCards'\nimport Estimations from '../../views/BuyBond/components/Estimations'\nimport ProjectDescription from '../../views/BuyBond/components/ProjectDescription'\nimport track from '../../utils/track'\nimport { remove0xPrefix } from '../../utils/remove0xPrefix'\nimport useTierPoints from '../../state/tiers/useTierPoints'\nimport { getUserTier, Promotions, TIERS_WEIGHT } from '../../state/tiers/tiers'\nimport NewRateModal from '../../views/BuyBond/components/NewRateModal/NewRateModal'\nimport NoBonusModal from '../../views/BuyBond/components/NoBonusModal/NoBonusModal'\nimport useTierProofSignature from './useTierProofSignature'\nimport PointsLeftForNextTier from '../../views/BuyBond/components/PointsLeftForNextTier/PointsLeftForNextTier'\nimport SafeHTMLComponent from '../../components/SafeHTMLComponent'\nimport useSortedZapList from '../../hooks/useSortedZapList'\nimport TransactionModal from './TransactionModal'\nimport { reportError } from '../../utils/reportError'\nimport { findHighestTrueBondPrice } from '../../utils/bondPriceHelpers'\nimport { MCBuyComponentStyles } from '../../utils/campaignStyles'\nimport useEVMAccount from './useEVMAccount'\nimport { getBridgeAdapter } from '../registry'\n// import useTierOptimizationPreview from '../../state/zap/useTierOptimizationPreview'\nimport { SHORT_NETWORK_LABEL } from '../../config/constants/chains'\nimport Flex from '../../components/uikit-sdk/Flex'\nimport Text from '../../components/uikit-sdk/Text'\nimport Button from '../../components/uikit-sdk/Button/Button'\nimport { formatNumberSI } from '../../utils/formatNumber'\nimport L1xIframe from '../../views/BuyBond/components/L1xIframe/L1xIframe'\n// import { simulateContract } from 'wagmi/actions'\n\nexport type BuyComponentProps = ChainBuyComponentProps\n\nconst PROMOTION_TRACKING_SUFFIXES: Partial<Record<Promotions, string>> = {\n [Promotions.WelcomeBonus]: 'welcome-bonus',\n [Promotions.BonusWeek]: 'bonus-week',\n}\n\nconst getPromotionTrackingSuffix = (promotion?: Promotions | null): string => {\n if (!promotion) return ''\n return PROMOTION_TRACKING_SUFFIXES[promotion] ?? ''\n}\n\nconst BuyComponent: React.FC<BuyComponentProps> = ({\n onDismiss,\n bondAddress,\n bondChain,\n handlePurchasedBond,\n setBillId,\n isProjectView,\n}) => {\n // Hooks\n // const config = useConfig()\n const SDKConfig = useSDKConfig()\n const userChainId = useChainId()\n const { address: account } = useEVMAccount()\n const { writeContractAsync } = useWriteContract()\n const { sendTransactionAsync } = useSendTransaction()\n const { data: bonds, refetch: refetchBondState } = useBondsData()\n const sendReferenceId = useSendReferenceId()\n const { data: tierPointsState } = useTierPoints()\n const { promotionalPoints, promotion, eligibleChains, onChainPoints } = tierPointsState || {}\n // if promotion comes with eligibleChains undefined means it should be used for every chain\n const isBondEligibleForPromotion = eligibleChains === undefined || eligibleChains?.includes(bondChain as ChainId)\n const pointsToBeUsed = isBondEligibleForPromotion ? promotionalPoints : onChainPoints\n // Bond To be used\n const bondData = useMemo(() => {\n return bonds?.find((bond) => bond?.contractAddress?.[bond.chainId]?.toLowerCase() === bondAddress?.toLowerCase())!\n }, [bonds, bondAddress])\n\n // Tier Gating\n const userTier = getUserTier(pointsToBeUsed ?? '0')\n const minTier = bondData?.minTier !== undefined ? bondData.minTier : null\n const isUserRestricted = minTier !== null && (userTier === null || userTier < minTier)\n const trueBondPriceData = findHighestTrueBondPrice(pointsToBeUsed, bondData?.trueBondPrices)\n const trueBondPrice = trueBondPriceData?.trueBondPrice\n const { data: tierProofSig } = useTierProofSignature(bondAddress, bondChain, isUserRestricted)\n\n // State\n const [buyTxHash, setBuyTxHash] = useState<string | undefined>()\n const [inputValue, setInputValue] = useState('')\n const [inputTokenString, setInputTokenString] = useState(bondData?.lpToken?.address?.[bondData.chainId])\n\n // On-chain Data\n const inputToken = useTokenFromZapList(inputTokenString, bondData?.chainId, bondData?.lpToken)\n const isZapSupported = zapSupported.includes(bondData?.chainId as ZapSupportedChainId)\n\n const [fetchingZapQuote, zapData, zapDepositAmount, zapError, zapTrueBondPrice] = useSoulZapBondQuote(\n inputValue,\n inputToken,\n bondData,\n account,\n tierProofSig ?? undefined,\n )\n\n const { sortedZapList, isFetched: zapListFetched } = useSortedZapList(bondChain, bondData?.lpToken)\n const enrichedTokenData = sortedZapList.find((item) =>\n item.token === 'NATIVE' || inputToken === 'NATIVE'\n ? item.token === inputToken\n : item?.token?.address?.[bondChain as ChainId]?.toLowerCase() ===\n inputToken?.address?.[bondChain as ChainId]?.toLowerCase(),\n )\n const inputCurrencyBalance = enrichedTokenData?.balance\n const inputTokenPrice = enrichedTokenData?.price\n const rateChanged = parseFloat(zapTrueBondPrice ?? '0') > parseFloat(trueBondPrice ?? '0') * 1.01 && isZapSupported\n const promotionTrackingSuffix = getPromotionTrackingSuffix(promotion)\n const getTrackingCategory = useCallback(\n (baseCategory: string) => (promotionTrackingSuffix ? `${baseCategory}-${promotionTrackingSuffix}` : baseCategory),\n [promotionTrackingSuffix],\n )\n\n // Estimations\n const depositAmount = isZapSupported ? zapDepositAmount : inputValue\n const youSpendString = `${formatNumberSI(inputValue)} ${getSymbol(inputToken, bondData?.chainId)} = \n $${formatUSDNumber((parseFloat(inputValue) * (inputTokenPrice ?? 0)).toString())}`\n\n // Validations\n const exceedsRealMaxBuy = getMaxBuy(bondData, true) <= getPayoutAmount(bondData, depositAmount, pointsToBeUsed)\n const exceedsSafeMaxBuy =\n getMaxBuy(bondData, false) * (isZapSupported ? 0.995 : 0.9995) <=\n getPayoutAmount(bondData, depositAmount, pointsToBeUsed)\n const exceedsBalance = Number(inputCurrencyBalance ?? '0') < Number(inputValue)\n const isPrincipalTokenLP = bondData?.lpToken?.symbol?.includes('-')\n\n // Loading State\n const [loadingTx, setLoadingTx] = useState(false)\n const { addToastError } = usePopups()\n const { isLoading: isConfirming, isSuccess: isConfirmed, data: buyTxReceipt } = useMonitorTx(buyTxHash, userChainId)\n\n // Once the buy tx is confirmed, report the new bill id (the last topic of the bill NFT's log), like the other chain\n // families do, so the bond list can open it in YourBondsModal.\n useEffect(() => {\n if (!buyTxReceipt || !setBillId) return\n try {\n const billNftAddress = bondData?.billNnftAddress?.[bondData?.chainId]?.toLowerCase()\n const billNftLog = buyTxReceipt.logs.find((log) => log.address.toLowerCase() === billNftAddress)\n const billIdTopic = billNftLog?.topics[billNftLog.topics.length - 1]\n if (billIdTopic) setBillId(parseInt(billIdTopic, 16).toString())\n } catch (e) {\n console.log(e)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [buyTxReceipt])\n const load = loadingTx || (isConfirming && !isConfirmed)\n\n // State Handlers\n const handleCurrencySelect = useCallback((newInputToken: string) => {\n setInputValue('')\n setInputTokenString(newInputToken)\n }, [])\n\n const handleMaxButton = useCallback(() => {\n const balance = Number(inputCurrencyBalance ?? '0')\n const maxBuyAmount = getMaxBuy(bondData, SDKConfig.showLowValueBonds)\n\n if (!isZapSupported) {\n const maxPossibleUserPurchase = getPayoutAmount(bondData, balance.toString(), pointsToBeUsed)\n const principalDecimals = bondData?.lpToken?.decimals?.[bondData?.chainId] ?? 18\n if (maxPossibleUserPurchase > maxBuyAmount) {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), pointsToBeUsed)\n setInputValue(toFixedString(principalForMaxBuy, principalDecimals))\n } else {\n setInputValue(toFixedString(balance, principalDecimals))\n }\n } else {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), pointsToBeUsed)\n const principalForMaxBuyUSD = principalForMaxBuy * Number(bondData?.principalTokenPrice ?? 0)\n const maxBuyAmountInSelectedToken = principalForMaxBuyUSD / (inputTokenPrice ?? 0)\n const decimals =\n enrichedTokenData?.token === 'NATIVE' ? 18 : (enrichedTokenData?.token.decimals[bondData?.chainId] ?? 18)\n\n if (balance >= maxBuyAmountInSelectedToken) {\n setInputValue(toFixedString(maxBuyAmountInSelectedToken, decimals))\n } else {\n setInputValue(toFixedString(balance, decimals))\n }\n }\n }, [\n bondData,\n isZapSupported,\n pointsToBeUsed,\n SDKConfig.showLowValueBonds,\n inputTokenPrice,\n enrichedTokenData?.token,\n inputCurrencyBalance,\n ])\n\n // Approve & Purchase Functions\n const [approvalState, approveCallback] = useApproval(\n inputValue,\n inputToken ?? null,\n (isZapSupported\n ? SoulZapTokenManager?.[bondData?.chainId as ZapSupportedChainId]\n : bondData?.contractAddress?.[bondData.chainId]) ?? null,\n account ?? null,\n bondData?.chainId ?? null,\n )\n const handleApprove = async () => {\n return approveCallback().then(() => {\n track({\n event: 'approveBondClick',\n chain: userChainId,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n },\n })\n })\n }\n\n const handleBuyCallback = async () => {\n const billAddress: `0x${string}` = bondData?.contractAddress?.[bondData.chainId] as `0x${string}`\n const decimals = bondData?.lpToken.decimals?.[bondData?.chainId] ?? 18\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n try {\n const maxPrice = mulDivRound(BigInt(trueBondPrice ?? '0'), 102n, 100n, 'halfUp').toString() // multiply it by 1.02\n const amount = convertToBigish(inputValue, decimals)\n\n const shouldUseSig = bondData?.billVersion === BillVersion.V4 && SDKConfig.useTiers\n const args = shouldUseSig ? [amount, maxPrice, account, tierProofSig] : [amount, maxPrice, account]\n\n // const simulationResult = await simulateContract(config, {\n // address: billAddress,\n // abi: ABI_DEPOSIT_SIG,\n // functionName: 'deposit',\n // args: args,\n // chainId: bondData?.chainId as any,\n // account,\n // })\n // .then((e) => console.log('success!', e))\n // .catch((e) => {\n // console.error(e)\n // })\n\n const hash = await writeContractAsync({\n address: billAddress,\n abi: shouldUseSig ? ABI_DEPOSIT_SIG : ABI_DEPOSIT,\n functionName: 'deposit',\n args: args,\n chain: bondData?.chainId as any,\n account,\n })\n if (hash) {\n setBuyTxHash(hash)\n await sendReferenceId(billAddress, userChainId, hash)\n\n // lostProfit\n const bonusString = getRawBonus(bondData, depositAmount, TIERS_WEIGHT[LaunchBondTiers.Mythical])\n const noTierAmount = getRawBonus(bondData, depositAmount, '0')\n const lostProfit = parseFloat(bonusString) - parseFloat(noTierAmount)\n\n handlePurchasedBond?.({\n buyTxHash: hash,\n lostProfit: SDKConfig.useTiers && !userTier && lostProfit > 0.01 ? lostProfit.toFixed(2) : undefined,\n })\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: getTrackingCategory('lp-buy'),\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n } catch (error: any) {\n console.error('Buy error', error)\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error,\n extraInfo: { type: 'buyBond', bondData, error },\n chainId: bondChain,\n account,\n })\n addToastError(error.shortMessage)\n }\n }\n\n const handleZapCallback = async () => {\n if (zapData && zapData?.txData?.to && zapData?.txData?.data) {\n console.log('Attempting zap tx')\n track({\n event: 'buyBondClick',\n chain: bondData?.chainId,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol ?? '',\n value: zapData.lpQuote.fromAmountUSD,\n },\n })\n try {\n console.log(zapData)\n const validated18DecimalAmount = toFixedString(inputValue ?? '0', 18, 'trunc')\n const parsedValue = parseEther(validated18DecimalAmount)\n\n const hash = await sendTransactionAsync({\n to: zapData.txData.to,\n data: zapData.txData.data,\n value: inputToken === 'NATIVE' ? parsedValue : undefined,\n })\n if (hash) {\n setBuyTxHash(hash)\n await sendReferenceId(bondData?.contractAddress?.[bondData.chainId] ?? '', userChainId, hash)\n\n // lostProfit\n const bonusString = getRawBonus(bondData, depositAmount, TIERS_WEIGHT[LaunchBondTiers.Mythical])\n const noTierAmount = getRawBonus(bondData, depositAmount, '0')\n const lostProfit = parseFloat(bonusString) - parseFloat(noTierAmount)\n\n handlePurchasedBond?.({\n buyTxHash: hash,\n lostProfit: SDKConfig.useTiers && !userTier && lostProfit > 0.01 ? lostProfit.toFixed(2) : undefined,\n })\n track({\n event: 'zap',\n chain: bondChain,\n data: {\n cat: 'bill',\n token1: getSymbol(inputToken),\n token2: `${bondData?.lpToken.symbol ?? ''}`,\n amount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: getTrackingCategory('zap-buy'),\n type: bondData?.billType ?? '',\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n amount: inputValue,\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n } catch (e: any) {\n console.log(e)\n addToastError(e.shortMessage)\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: e,\n extraInfo: { type: 'zapBuyBond', bondData, zapData, e },\n chainId: bondChain,\n account,\n })\n }\n }\n }\n\n const handleBothPurchases = () => {\n setLoadingTx(true)\n if (isZapSupported) {\n handleZapCallback().finally(() => setLoadingTx(false))\n } else {\n handleBuyCallback().finally(() => setLoadingTx(false))\n }\n }\n\n const handleOpenModal = () => {\n const bonus = trueBondPriceData?.bonusWithFee ?? 0\n if (bonus <= 0) {\n openNoBonusModal()\n } else {\n openTxModal()\n }\n }\n\n const openExternal = () => {\n if (bondData?.lpToken?.getLpUrl?.[bondData?.chainId]) {\n window.open(bondData.lpToken.getLpUrl?.[bondData?.chainId], '_blank')\n } else {\n window.open(\n `https://ape.bond/swap?outputcurrency=${bondData?.lpToken.address[bondData?.chainId]}&outputChain=${bondData?.chainId}`,\n '_blank',\n )\n }\n }\n\n // Modals\n const [onOpenl1xIframe] = useModal(<L1xIframe />)\n\n // Optional bridge (LiFi adapter); without it the secondary button falls back to its non-bridge options.\n const bridge = getBridgeAdapter()\n const canBridge = !!bridge && !!bondChain && bridge.supportsChain(bondChain)\n const [onOpenBridgeModal] = useModal(\n canBridge ? (\n <bridge.BridgeModal\n bondChain={bondChain}\n principalToken={isPrincipalTokenLP ? 'ETH' : bondData?.lpToken?.address?.[bondData?.chainId]}\n />\n ) : null,\n )\n\n const [openNewRateModal] = useModal(\n <NewRateModal\n bond={bondData}\n zapTrueBondPrice={zapTrueBondPrice}\n depositAmount={depositAmount}\n youSpendString={youSpendString}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n />,\n true,\n false,\n 'newRateModal',\n )\n\n const [openTxModal] = useModal(\n <TransactionModal\n txChain={bondChain}\n approvalState={approvalState}\n approveCallback={handleApprove}\n loadingTx={loadingTx}\n txCallback={handleBothPurchases}\n bondData={bondData!}\n inputToken={inputToken}\n inputValue={inputValue}\n depositAmount={depositAmount}\n buyTxHash={buyTxHash}\n rateChanged={rateChanged}\n />,\n false,\n true,\n 'transactionModal',\n )\n\n const [openNoBonusModal] = useModal(\n <NoBonusModal onAcknowledge={openTxModal} showcaseTokenName={bondData?.showcaseTokenName} />,\n true,\n true,\n 'NoBonusModal',\n )\n\n // Effects\n const [hasChecked, setHasChecked] = useState(false)\n useEffect(() => {\n if (zapListFetched && !hasChecked) {\n if (parseFloat(inputCurrencyBalance ?? '0') < 0.0001) {\n setInputTokenString(\n sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain as ChainId],\n )\n }\n setHasChecked(true)\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [inputCurrencyBalance, zapListFetched])\n\n // If rateChanged meaning the zap quote has a >1% difference from the true bond price, we let the user know and we update state\n useEffect(() => {\n if (rateChanged) {\n console.log('rate changed, refetch state and let user know')\n openNewRateModal()\n refetchBondState()\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [rateChanged])\n\n return bondData ? (\n <Flex\n className=\"modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5\"\n style={{ ...MCBuyComponentStyles[bondData?.marketingCampaign as MarketingCampaign] }}\n >\n <Flex className=\"modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5\">\n <BondModalHeader\n bondData={bondData}\n onDismiss={onDismiss}\n showProjectInfoButton={SDKConfig?.referenceId === 'apebond'}\n />\n <ProjectDescription description={bondData.shortDescription} isProjectView />\n <Flex className={clsx('ape:w-full', isProjectView ? 'ape:flex ape:md:hidden!' : 'ape:flex')}>\n <BondCards bondData={bondData} isDoingMaxBuy={exceedsSafeMaxBuy && !exceedsRealMaxBuy} />\n </Flex>\n <Estimations\n depositAmount={depositAmount}\n inputValue={inputValue}\n inputTokenPrice={inputTokenPrice}\n bondData={bondData}\n youSpendString={youSpendString}\n isZap={isZapSupported}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n />\n <TokenSelectorPanel\n typedValue={inputValue}\n setTypedValue={setInputValue}\n selectedToken={inputToken}\n handleValueBtn={handleMaxButton}\n handleCurrencySelect={handleCurrencySelect}\n bondChainId={bondData?.chainId}\n enableZap={isZapSupported}\n bondPrincipalToken={bondData?.lpToken}\n tokenBalance={inputCurrencyBalance}\n selectedTokenPrice={inputTokenPrice}\n inputDisabled={isUserRestricted}\n marketingCampaign={bondData?.marketingCampaign}\n isConnected={!!account}\n />\n {SDKConfig.useTiers &&\n userTier !== LaunchBondTiers.Mythical &&\n bondData?.billVersion === BillVersion.V4 &&\n account && (\n <PointsLeftForNextTier\n bond={bondData}\n inputAmount={inputValue}\n setInputValue={setInputValue}\n inputTokenPrice={inputTokenPrice}\n inputTokenDecimals={inputToken === 'NATIVE' ? 18 : (inputToken?.decimals?.[bondData?.chainId] ?? 18)}\n />\n )}\n {bondData?.warningCard && (\n <Flex className=\"ape:w-full ape:rounded-normal ape:p-[2px_10px]\" style={{ background: '#DE62F366' }}>\n <Text as=\"div\" size=\"12px\" className=\"ape:font-normal ape:flex ape:items-center ape:leading-5.5!\">\n <SafeHTMLComponent html={bondData?.warningCard} />\n </Text>\n </Flex>\n )}\n <Flex className=\"modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between\">\n <Flex className=\"button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full\">\n {!account ? (\n <ConnectButton />\n ) : (\n <Flex className=\"ape:w-full ape:gap-[10px] ape:flex-col ape:md:flex-row\">\n <Button\n variant=\"secondary\"\n onClick={() =>\n canBridge ? onOpenBridgeModal() : bondChain === ChainId.L1X ? onOpenl1xIframe() : openExternal()\n }\n className=\"ape:w-full ape:md:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!\"\n >\n {canBridge\n ? isProjectView\n ? 'Bridge funds'\n : `Bridge to ${SHORT_NETWORK_LABEL[bondData?.chainId as ChainId]}`\n : `Get ${getSymbol(bondData?.lpToken, bondData?.chainId)}`}\n </Button>\n {isUserRestricted ? (\n <Button className=\"action-button ape:w-full\" disabled>\n INSUFFICIENT TIER\n </Button>\n ) : (\n <Button\n className=\"action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!\"\n load={load || fetchingZapQuote}\n disabled={\n load ||\n bondData?.soldOut ||\n !account ||\n !inputValue ||\n parseFloat(inputValue) === 0 ||\n fetchingZapQuote ||\n zapError ||\n exceedsRealMaxBuy ||\n exceedsBalance ||\n (isZapSupported && !zapData) ||\n SDKConfig.blockSales\n }\n onClick={handleOpenModal}\n >\n {SDKConfig.blockSales\n ? 'Complete KYC to Buy'\n : exceedsRealMaxBuy\n ? 'Exceeds Max Buy. Reduce amount'\n : exceedsBalance\n ? 'Exceeds balance'\n : zapError\n ? 'something went wrong'\n : !inputValue || parseFloat(inputValue) === 0\n ? 'Insert amount'\n : `buy`}\n </Button>\n )}\n </Flex>\n )}\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n ) : (\n <></>\n )\n}\nexport default React.memo(BuyComponent)\n"],"names":["_jsx","L1xIframe","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,MAAM,2BAA2B,GAAwC;AACvE,IAAA,CAAC,UAAU,CAAC,YAAY,GAAG,eAAe;AAC1C,IAAA,CAAC,UAAU,CAAC,SAAS,GAAG,YAAY;CACrC;AAED,MAAM,0BAA0B,GAAG,CAAC,SAA6B,KAAY;AAC3E,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,EAAE;AACzB,IAAA,OAAO,2BAA2B,CAAC,SAAS,CAAC,IAAI,EAAE;AACrD,CAAC;AAED,MAAM,YAAY,GAAgC,CAAC,EACjD,SAAS,EACT,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,aAAa,GACd,KAAI;;;AAGH,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAChC,IAAA,MAAM,WAAW,GAAG,UAAU,EAAE;IAChC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE;AAC5C,IAAA,MAAM,EAAE,kBAAkB,EAAE,GAAG,gBA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"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport { convertToBigish } from '../../utils/convertToBigish'\nimport { mulDivRound, toFixedString } from '../../utils/fixedPoint'\nimport ABI_DEPOSIT from '../../config/abi/deposit.json'\nimport ABI_DEPOSIT_SIG from '../../config/abi/depositSig.json'\nimport type { ChainBuyComponentProps } from '../types'\nimport {\n useChainId,\n useSendTransaction,\n useWriteContract,\n // useConfig\n} from 'wagmi'\nimport useModal from '../../hooks/useModal'\n// import ZapModal from '../ZapModal'\nimport { BillVersion, ChainId, LaunchBondTiers, MarketingCampaign } from '@ape.swap/apeswap-lists'\nimport TokenSelectorPanel from '../../components/TokenSelectorPanel'\nimport { useApproval } from './useAllowance'\nimport { SoulZapTokenManager } from '../../config/constants/addresses'\nimport useSoulZapBondQuote from './useSoulZapBondQuote'\nimport { parseEther } from 'viem'\nimport useBondsData from '../../state/bonds/useBondsData'\nimport useTokenFromZapList from '../../hooks/useTokenFromZapList'\nimport { useMonitorTx } from './useMonitorTx'\nimport { usePopups } from '../../state/popups/usePopups'\nimport {\n formatUSDNumber,\n getMaxBuy,\n getPayoutAmount,\n getPrincipalAmount,\n getRawBonus,\n} from '../../utils/displayHelpers'\nimport { useSDKConfig } from '../../state/useSDKConfig'\nimport { zapSupported, ZapSupportedChainId } from '../../config/constants/variables'\nimport { getSymbol } from '../../utils/getNativeTicker'\nimport { useSendReferenceId } from '../../hooks/useSendReferenceId'\nimport ConnectButton from '../../components/ConnectButton'\nimport BondModalHeader from '../../views/BuyBond/components/BondModalHeader'\nimport BondCards from '../../views/BuyBond/components/BondCards/BondCards'\nimport Estimations from '../../views/BuyBond/components/Estimations'\nimport ProjectDescription from '../../views/BuyBond/components/ProjectDescription'\nimport track from '../../utils/track'\nimport { remove0xPrefix } from '../../utils/remove0xPrefix'\nimport useTierPoints from '../../state/tiers/useTierPoints'\nimport { getUserTier, Promotions, TIERS_WEIGHT } from '../../state/tiers/tiers'\nimport NewRateModal from '../../views/BuyBond/components/NewRateModal/NewRateModal'\nimport NoBonusModal from '../../views/BuyBond/components/NoBonusModal/NoBonusModal'\nimport useTierProofSignature from './useTierProofSignature'\nimport PointsLeftForNextTier from '../../views/BuyBond/components/PointsLeftForNextTier/PointsLeftForNextTier'\nimport SafeHTMLComponent from '../../components/SafeHTMLComponent'\nimport useSortedZapList from '../../hooks/useSortedZapList'\nimport TransactionModal from './TransactionModal'\nimport { reportError } from '../../utils/reportError'\nimport { findHighestTrueBondPrice } from '../../utils/bondPriceHelpers'\nimport { MCBuyComponentStyles } from '../../utils/campaignStyles'\nimport useEVMAccount from './useEVMAccount'\nimport { getBridgeAdapter } from '../registry'\n// import useTierOptimizationPreview from '../../state/zap/useTierOptimizationPreview'\nimport { SHORT_NETWORK_LABEL } from '../../config/constants/chains'\nimport Flex from '../../components/uikit-sdk/Flex'\nimport Text from '../../components/uikit-sdk/Text'\nimport Button from '../../components/uikit-sdk/Button/Button'\nimport { formatNumberSI } from '../../utils/formatNumber'\nimport L1xIframe from '../../views/BuyBond/components/L1xIframe/L1xIframe'\n// import { simulateContract } from 'wagmi/actions'\n\nexport type BuyComponentProps = ChainBuyComponentProps\n\nconst PROMOTION_TRACKING_SUFFIXES: Partial<Record<Promotions, string>> = {\n [Promotions.WelcomeBonus]: 'welcome-bonus',\n [Promotions.BonusWeek]: 'bonus-week',\n}\n\nconst getPromotionTrackingSuffix = (promotion?: Promotions | null): string => {\n if (!promotion) return ''\n return PROMOTION_TRACKING_SUFFIXES[promotion] ?? ''\n}\n\nconst BuyComponent: React.FC<BuyComponentProps> = ({\n onDismiss,\n bondAddress,\n bondChain,\n handlePurchasedBond,\n setBillId,\n isProjectView,\n}) => {\n // Hooks\n // const config = useConfig()\n const SDKConfig = useSDKConfig()\n const userChainId = useChainId()\n const { address: account } = useEVMAccount()\n const { writeContractAsync } = useWriteContract()\n const { sendTransactionAsync } = useSendTransaction()\n const { data: bonds, refetch: refetchBondState } = useBondsData()\n const sendReferenceId = useSendReferenceId()\n const { data: tierPointsState } = useTierPoints()\n const { promotionalPoints, promotion, eligibleChains, onChainPoints } = tierPointsState || {}\n // if promotion comes with eligibleChains undefined means it should be used for every chain\n const isBondEligibleForPromotion = eligibleChains === undefined || eligibleChains?.includes(bondChain as ChainId)\n const pointsToBeUsed = isBondEligibleForPromotion ? promotionalPoints : onChainPoints\n // Bond To be used\n const bondData = useMemo(() => {\n return bonds?.find((bond) => bond?.contractAddress?.[bond.chainId]?.toLowerCase() === bondAddress?.toLowerCase())!\n }, [bonds, bondAddress])\n\n // Tier Gating\n const userTier = getUserTier(pointsToBeUsed ?? '0')\n const minTier = bondData?.minTier !== undefined ? bondData.minTier : null\n const isUserRestricted = minTier !== null && (userTier === null || userTier < minTier)\n const trueBondPriceData = findHighestTrueBondPrice(pointsToBeUsed, bondData?.trueBondPrices)\n const trueBondPrice = trueBondPriceData?.trueBondPrice\n const { data: tierProofSig } = useTierProofSignature(bondAddress, bondChain, isUserRestricted)\n\n // State\n const [buyTxHash, setBuyTxHash] = useState<string | undefined>()\n const [inputValue, setInputValue] = useState('')\n const [inputTokenString, setInputTokenString] = useState(bondData?.lpToken?.address?.[bondData.chainId])\n\n // On-chain Data\n const inputToken = useTokenFromZapList(inputTokenString, bondData?.chainId, bondData?.lpToken)\n const isZapSupported = zapSupported.includes(bondData?.chainId as ZapSupportedChainId)\n\n const [fetchingZapQuote, zapData, zapDepositAmount, zapError, zapTrueBondPrice] = useSoulZapBondQuote(\n inputValue,\n inputToken,\n bondData,\n account,\n tierProofSig ?? undefined,\n )\n\n const { sortedZapList, isFetched: zapListFetched } = useSortedZapList(bondChain, bondData?.lpToken)\n const enrichedTokenData = sortedZapList.find((item) =>\n item.token === 'NATIVE' || inputToken === 'NATIVE'\n ? item.token === inputToken\n : item?.token?.address?.[bondChain as ChainId]?.toLowerCase() ===\n inputToken?.address?.[bondChain as ChainId]?.toLowerCase(),\n )\n const inputCurrencyBalance = enrichedTokenData?.balance\n const inputTokenPrice = enrichedTokenData?.price\n const rateChanged = parseFloat(zapTrueBondPrice ?? '0') > parseFloat(trueBondPrice ?? '0') * 1.01 && isZapSupported\n const promotionTrackingSuffix = getPromotionTrackingSuffix(promotion)\n const getTrackingCategory = useCallback(\n (baseCategory: string) => (promotionTrackingSuffix ? `${baseCategory}-${promotionTrackingSuffix}` : baseCategory),\n [promotionTrackingSuffix],\n )\n\n // Estimations\n const depositAmount = isZapSupported ? zapDepositAmount : inputValue\n const youSpendString = `${formatNumberSI(inputValue)} ${getSymbol(inputToken, bondData?.chainId)} = \n $${formatUSDNumber((parseFloat(inputValue) * (inputTokenPrice ?? 0)).toString())}`\n\n // Validations\n const exceedsRealMaxBuy = getMaxBuy(bondData, true) <= getPayoutAmount(bondData, depositAmount, pointsToBeUsed)\n const exceedsSafeMaxBuy =\n getMaxBuy(bondData, false) * (isZapSupported ? 0.995 : 0.9995) <=\n getPayoutAmount(bondData, depositAmount, pointsToBeUsed)\n const exceedsBalance = Number(inputCurrencyBalance ?? '0') < Number(inputValue)\n const isPrincipalTokenLP = bondData?.lpToken?.symbol?.includes('-')\n\n // Loading State\n const [loadingTx, setLoadingTx] = useState(false)\n const { addToastError } = usePopups()\n const { isLoading: isConfirming, isSuccess: isConfirmed, data: buyTxReceipt } = useMonitorTx(buyTxHash, userChainId)\n\n // Once the buy tx is confirmed, report the new bill id (the last topic of the bill NFT's log), like the other chain\n // families do, so the bond list can open it in YourBondsModal.\n useEffect(() => {\n if (!buyTxReceipt || !setBillId) return\n try {\n const billNftAddress = bondData?.billNnftAddress?.[bondData?.chainId]?.toLowerCase()\n const billNftLog = buyTxReceipt.logs.find((log) => log.address.toLowerCase() === billNftAddress)\n const billIdTopic = billNftLog?.topics[billNftLog.topics.length - 1]\n if (billIdTopic) setBillId(parseInt(billIdTopic, 16).toString())\n } catch (e) {\n console.log(e)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [buyTxReceipt])\n const load = loadingTx || (isConfirming && !isConfirmed)\n\n // State Handlers\n const handleCurrencySelect = useCallback((newInputToken: string) => {\n setInputValue('')\n setInputTokenString(newInputToken)\n }, [])\n\n const handleMaxButton = useCallback(() => {\n const balance = Number(inputCurrencyBalance ?? '0')\n const maxBuyAmount = getMaxBuy(bondData, SDKConfig.showLowValueBonds)\n\n if (!isZapSupported) {\n const maxPossibleUserPurchase = getPayoutAmount(bondData, balance.toString(), pointsToBeUsed)\n const principalDecimals = bondData?.lpToken?.decimals?.[bondData?.chainId] ?? 18\n if (maxPossibleUserPurchase > maxBuyAmount) {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), pointsToBeUsed)\n setInputValue(toFixedString(principalForMaxBuy, principalDecimals))\n } else {\n setInputValue(toFixedString(balance, principalDecimals))\n }\n } else {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), pointsToBeUsed)\n const principalForMaxBuyUSD = principalForMaxBuy * Number(bondData?.principalTokenPrice ?? 0)\n const maxBuyAmountInSelectedToken = principalForMaxBuyUSD / (inputTokenPrice ?? 0)\n const decimals =\n enrichedTokenData?.token === 'NATIVE' ? 18 : (enrichedTokenData?.token.decimals[bondData?.chainId] ?? 18)\n\n if (balance >= maxBuyAmountInSelectedToken) {\n setInputValue(toFixedString(maxBuyAmountInSelectedToken, decimals))\n } else {\n setInputValue(toFixedString(balance, decimals))\n }\n }\n }, [\n bondData,\n isZapSupported,\n pointsToBeUsed,\n SDKConfig.showLowValueBonds,\n inputTokenPrice,\n enrichedTokenData?.token,\n inputCurrencyBalance,\n ])\n\n // Approve & Purchase Functions\n const [approvalState, approveCallback] = useApproval(\n inputValue,\n inputToken ?? null,\n (isZapSupported\n ? SoulZapTokenManager?.[bondData?.chainId as ZapSupportedChainId]\n : bondData?.contractAddress?.[bondData.chainId]) ?? null,\n account ?? null,\n bondData?.chainId ?? null,\n )\n const handleApprove = async () => {\n return approveCallback().then(() => {\n track({\n event: 'approveBondClick',\n chain: userChainId,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n },\n })\n })\n }\n\n const handleBuyCallback = async () => {\n const billAddress: `0x${string}` = bondData?.contractAddress?.[bondData.chainId] as `0x${string}`\n const decimals = bondData?.lpToken.decimals?.[bondData?.chainId] ?? 18\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n try {\n const maxPrice = mulDivRound(BigInt(trueBondPrice ?? '0'), 102n, 100n, 'halfUp').toString() // multiply it by 1.02\n const amount = convertToBigish(inputValue, decimals)\n\n const shouldUseSig = bondData?.billVersion === BillVersion.V4 && SDKConfig.useTiers\n const args = shouldUseSig ? [amount, maxPrice, account, tierProofSig] : [amount, maxPrice, account]\n\n // const simulationResult = await simulateContract(config, {\n // address: billAddress,\n // abi: ABI_DEPOSIT_SIG,\n // functionName: 'deposit',\n // args: args,\n // chainId: bondData?.chainId as any,\n // account,\n // })\n // .then((e) => console.log('success!', e))\n // .catch((e) => {\n // console.error(e)\n // })\n\n const hash = await writeContractAsync({\n address: billAddress,\n abi: shouldUseSig ? ABI_DEPOSIT_SIG : ABI_DEPOSIT,\n functionName: 'deposit',\n args: args,\n chain: bondData?.chainId as any,\n account,\n })\n if (hash) {\n setBuyTxHash(hash)\n await sendReferenceId(billAddress, userChainId, hash)\n\n // lostProfit\n const bonusString = getRawBonus(bondData, depositAmount, TIERS_WEIGHT[LaunchBondTiers.Mythical])\n const noTierAmount = getRawBonus(bondData, depositAmount, '0')\n const lostProfit = parseFloat(bonusString) - parseFloat(noTierAmount)\n\n handlePurchasedBond?.({\n buyTxHash: hash,\n lostProfit: SDKConfig.useTiers && !userTier && lostProfit > 0.01 ? lostProfit.toFixed(2) : undefined,\n })\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: getTrackingCategory('lp-buy'),\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n } catch (error: any) {\n console.error('Buy error', error)\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error,\n extraInfo: { type: 'buyBond', bondData, error },\n chainId: bondChain,\n account,\n })\n addToastError(error.shortMessage)\n }\n }\n\n const handleZapCallback = async () => {\n if (zapData && zapData?.txData?.to && zapData?.txData?.data) {\n console.log('Attempting zap tx')\n track({\n event: 'buyBondClick',\n chain: bondData?.chainId,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol ?? '',\n value: zapData.lpQuote.fromAmountUSD,\n },\n })\n try {\n console.log(zapData)\n const validated18DecimalAmount = toFixedString(inputValue ?? '0', 18, 'trunc')\n const parsedValue = parseEther(validated18DecimalAmount)\n\n const hash = await sendTransactionAsync({\n to: zapData.txData.to,\n data: zapData.txData.data,\n value: inputToken === 'NATIVE' ? parsedValue : undefined,\n })\n if (hash) {\n setBuyTxHash(hash)\n await sendReferenceId(bondData?.contractAddress?.[bondData.chainId] ?? '', userChainId, hash)\n\n // lostProfit\n const bonusString = getRawBonus(bondData, depositAmount, TIERS_WEIGHT[LaunchBondTiers.Mythical])\n const noTierAmount = getRawBonus(bondData, depositAmount, '0')\n const lostProfit = parseFloat(bonusString) - parseFloat(noTierAmount)\n\n handlePurchasedBond?.({\n buyTxHash: hash,\n lostProfit: SDKConfig.useTiers && !userTier && lostProfit > 0.01 ? lostProfit.toFixed(2) : undefined,\n })\n track({\n event: 'zap',\n chain: bondChain,\n data: {\n cat: 'bill',\n token1: getSymbol(inputToken),\n token2: `${bondData?.lpToken.symbol ?? ''}`,\n amount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: getTrackingCategory('zap-buy'),\n type: bondData?.billType ?? '',\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n amount: inputValue,\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n } catch (e: any) {\n console.log(e)\n addToastError(e.shortMessage)\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: e,\n extraInfo: { type: 'zapBuyBond', bondData, zapData, e },\n chainId: bondChain,\n account,\n })\n }\n }\n }\n\n const handleBothPurchases = () => {\n setLoadingTx(true)\n if (isZapSupported) {\n handleZapCallback().finally(() => setLoadingTx(false))\n } else {\n handleBuyCallback().finally(() => setLoadingTx(false))\n }\n }\n\n const handleOpenModal = () => {\n const bonus = trueBondPriceData?.bonusWithFee ?? 0\n if (bonus <= 0) {\n openNoBonusModal()\n } else {\n openTxModal()\n }\n }\n\n const openExternal = () => {\n if (bondData?.lpToken?.getLpUrl?.[bondData?.chainId]) {\n window.open(bondData.lpToken.getLpUrl?.[bondData?.chainId], '_blank')\n } else {\n window.open(\n `https://ape.bond/swap?outputcurrency=${bondData?.lpToken.address[bondData?.chainId]}&outputChain=${bondData?.chainId}`,\n '_blank',\n )\n }\n }\n\n // Modals\n const [onOpenl1xIframe] = useModal(<L1xIframe />)\n\n // Optional bridge (LiFi adapter); without it the secondary button falls back to its non-bridge options.\n const bridge = getBridgeAdapter()\n const canBridge = !!bridge && !!bondChain && bridge.supportsChain(bondChain)\n const [onOpenBridgeModal] = useModal(\n canBridge ? (\n <bridge.BridgeModal\n bondChain={bondChain}\n principalToken={isPrincipalTokenLP ? 'ETH' : bondData?.lpToken?.address?.[bondData?.chainId]}\n />\n ) : null,\n )\n\n const [openNewRateModal] = useModal(\n <NewRateModal\n bond={bondData}\n zapTrueBondPrice={zapTrueBondPrice}\n depositAmount={depositAmount}\n youSpendString={youSpendString}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n />,\n true,\n false,\n 'newRateModal',\n )\n\n const [openTxModal] = useModal(\n <TransactionModal\n txChain={bondChain}\n approvalState={approvalState}\n approveCallback={handleApprove}\n loadingTx={loadingTx}\n txCallback={handleBothPurchases}\n bondData={bondData!}\n inputToken={inputToken}\n inputValue={inputValue}\n depositAmount={depositAmount}\n buyTxHash={buyTxHash}\n rateChanged={rateChanged}\n />,\n false,\n true,\n 'transactionModal',\n )\n\n const [openNoBonusModal] = useModal(\n <NoBonusModal onAcknowledge={openTxModal} showcaseTokenName={bondData?.showcaseTokenName} />,\n true,\n true,\n 'NoBonusModal',\n )\n\n // Effects\n const [hasChecked, setHasChecked] = useState(false)\n useEffect(() => {\n if (zapListFetched && !hasChecked) {\n if (parseFloat(inputCurrencyBalance ?? '0') < 0.0001) {\n setInputTokenString(\n sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain as ChainId],\n )\n }\n setHasChecked(true)\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [inputCurrencyBalance, zapListFetched])\n\n // If rateChanged meaning the zap quote has a >1% difference from the true bond price, we let the user know and we update state\n useEffect(() => {\n if (rateChanged) {\n console.log('rate changed, refetch state and let user know')\n openNewRateModal()\n refetchBondState()\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [rateChanged])\n\n return bondData ? (\n <Flex\n className=\"modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5\"\n style={{ ...MCBuyComponentStyles[bondData?.marketingCampaign as MarketingCampaign] }}\n >\n <Flex className=\"modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5\">\n <BondModalHeader\n bondData={bondData}\n onDismiss={onDismiss}\n showProjectInfoButton={SDKConfig?.referenceId === 'apebond'}\n />\n <ProjectDescription description={bondData.shortDescription} isProjectView />\n <Flex className={clsx('ape:w-full', isProjectView ? 'ape:flex ape:md:hidden!' : 'ape:flex')}>\n <BondCards bondData={bondData} isDoingMaxBuy={exceedsSafeMaxBuy && !exceedsRealMaxBuy} />\n </Flex>\n <Estimations\n depositAmount={depositAmount}\n inputValue={inputValue}\n inputTokenPrice={inputTokenPrice}\n bondData={bondData}\n youSpendString={youSpendString}\n isZap={isZapSupported}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n />\n <TokenSelectorPanel\n typedValue={inputValue}\n setTypedValue={setInputValue}\n selectedToken={inputToken}\n handleValueBtn={handleMaxButton}\n handleCurrencySelect={handleCurrencySelect}\n bondChainId={bondData?.chainId}\n enableZap={isZapSupported}\n bondPrincipalToken={bondData?.lpToken}\n tokenBalance={inputCurrencyBalance}\n selectedTokenPrice={inputTokenPrice}\n inputDisabled={isUserRestricted}\n marketingCampaign={bondData?.marketingCampaign}\n isConnected={!!account}\n />\n {SDKConfig.useTiers &&\n userTier !== LaunchBondTiers.Mythical &&\n bondData?.billVersion === BillVersion.V4 &&\n account && (\n <PointsLeftForNextTier\n bond={bondData}\n inputAmount={inputValue}\n setInputValue={setInputValue}\n inputTokenPrice={inputTokenPrice}\n inputTokenDecimals={inputToken === 'NATIVE' ? 18 : (inputToken?.decimals?.[bondData?.chainId] ?? 18)}\n />\n )}\n {bondData?.warningCard && (\n <Flex className=\"ape:w-full ape:rounded-normal ape:p-[2px_10px]\" style={{ background: '#DE62F366' }}>\n <Text as=\"div\" size=\"12px\" className=\"ape:font-normal ape:flex ape:items-center ape:leading-5.5!\">\n <SafeHTMLComponent html={bondData?.warningCard} />\n </Text>\n </Flex>\n )}\n <Flex className=\"modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between\">\n <Flex className=\"button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full\">\n {!account ? (\n <ConnectButton />\n ) : (\n <Flex className=\"ape:w-full ape:gap-[10px] ape:flex-col ape:md:flex-row\">\n <Button\n variant=\"secondary\"\n onClick={() =>\n canBridge ? onOpenBridgeModal() : bondChain === ChainId.L1X ? onOpenl1xIframe() : openExternal()\n }\n onMouseEnter={canBridge ? bridge.preload : undefined}\n onFocus={canBridge ? bridge.preload : undefined}\n className=\"ape:w-full ape:md:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!\"\n >\n {canBridge\n ? isProjectView\n ? 'Bridge funds'\n : `Bridge to ${SHORT_NETWORK_LABEL[bondData?.chainId as ChainId]}`\n : `Get ${getSymbol(bondData?.lpToken, bondData?.chainId)}`}\n </Button>\n {isUserRestricted ? (\n <Button className=\"action-button ape:w-full\" disabled>\n INSUFFICIENT TIER\n </Button>\n ) : (\n <Button\n className=\"action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!\"\n load={load || fetchingZapQuote}\n disabled={\n load ||\n bondData?.soldOut ||\n !account ||\n !inputValue ||\n parseFloat(inputValue) === 0 ||\n fetchingZapQuote ||\n zapError ||\n exceedsRealMaxBuy ||\n exceedsBalance ||\n (isZapSupported && !zapData) ||\n SDKConfig.blockSales\n }\n onClick={handleOpenModal}\n >\n {SDKConfig.blockSales\n ? 'Complete KYC to Buy'\n : exceedsRealMaxBuy\n ? 'Exceeds Max Buy. Reduce amount'\n : exceedsBalance\n ? 'Exceeds balance'\n : zapError\n ? 'something went wrong'\n : !inputValue || parseFloat(inputValue) === 0\n ? 'Insert amount'\n : `buy`}\n </Button>\n )}\n </Flex>\n )}\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n ) : (\n <></>\n )\n}\nexport default React.memo(BuyComponent)\n"],"names":["_jsx","L1xIframe","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,MAAM,2BAA2B,GAAwC;AACvE,IAAA,CAAC,UAAU,CAAC,YAAY,GAAG,eAAe;AAC1C,IAAA,CAAC,UAAU,CAAC,SAAS,GAAG,YAAY;CACrC;AAED,MAAM,0BAA0B,GAAG,CAAC,SAA6B,KAAY;AAC3E,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,EAAE;AACzB,IAAA,OAAO,2BAA2B,CAAC,SAAS,CAA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EvB,SAAS,CAAC;AACT,0CAAE;AACF,0CAAE;AACA,8CAAE;AACF,8CAAE;AACA,kDAAE;AACF,kDAAE;AACA,sDAAE;sDACA,CAAC,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK;AAC1C,0DAAE;AACF,0DAAE,CAAA,GAAA,CAAK,EAAA,CACV,CACV,CAAA,EAAA,CACI,CACR,EAAA,CACI,EAAA,CACF,CAAA,EAAA,CACF,EAAA,CACF,KAEPA,GAAA,CAAAG,QAAA,EAAA,EAAA,CAAK,CACN;AACH,CAAC;AACD,qBAAe,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;;;;"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { BridgeModalProps } from '../types';
3
+ export declare const loadLifiWidget: () => Promise<typeof import("./LifiWidgetContent")>;
3
4
  declare const LifiModal: React.FC<BridgeModalProps>;
4
5
  export default LifiModal;
@@ -1,71 +1,55 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { LiFiWidget } from '@lifi/widget';
3
- import { ChainId } from '@ape.swap/apeswap-lists';
2
+ import React, { useState } from 'react';
4
3
  import Modal from '../../components/uikit-sdk/Modal/index.js';
5
4
  import ModalHeader from '../../components/uikit-sdk/Modal/ModalHeader.js';
5
+ import Spinner from '../../components/uikit-sdk/Spinner/index.js';
6
+ import Button from '../../components/uikit-sdk/Button/Button.js';
7
+ import Text from '../../components/uikit-sdk/Text/index.js';
6
8
 
7
- // LiFi identifies Solana with its own chain id instead of ApeBond's ChainId.SOL.
8
- const LIFI_SOLANA_CHAIN_ID = 1151111081099710;
9
- const toLifiChainId = (chainId) => (chainId === ChainId.SOL ? LIFI_SOLANA_CHAIN_ID : chainId);
10
- const getFees = async (fromTokenSymbol, toTokenSymbol) => {
11
- const stableCoins = ['FRAX', 'USDC', 'USDT', 'DAI', 'BUSD', 'TUSD', 'USDD', 'FDUSD'];
12
- const isFromStable = stableCoins.includes(fromTokenSymbol);
13
- const isToStable = stableCoins.includes(toTokenSymbol);
14
- if (toTokenSymbol.toLowerCase() === 'abond') {
15
- return 0;
9
+ // The LiFi widget is about 1 MB gzipped, so it's loaded on demand: the modal frame opens instantly and the widget
10
+ // streams in. The promise is shared, so `lifiAdapter.preload()` (hover/focus on the bridge buttons) and the modal
11
+ // reuse one download; a failed download is forgotten so the next attempt retries it.
12
+ let widgetModule = null;
13
+ const loadLifiWidget = () => {
14
+ if (!widgetModule) {
15
+ widgetModule = import('./LifiWidgetContent.js').catch((error) => {
16
+ widgetModule = null;
17
+ throw error;
18
+ });
16
19
  }
17
- return isFromStable && isToStable ? 0.001 : 0.003;
20
+ return widgetModule;
18
21
  };
22
+ // React.lazy caches a rejection forever, so retrying needs a new lazy component.
23
+ const createLazyWidget = () => React.lazy(loadLifiWidget);
24
+ let LazyLifiWidget = createLazyWidget();
25
+ // Roughly the compact widget's size, so the modal doesn't jump when it loads.
26
+ const WIDGET_BOX = 'ape:flex ape:flex-col ape:items-center ape:justify-center ape:w-[416px] ape:max-w-full ape:min-h-[480px]';
27
+ class WidgetErrorBoundary extends React.Component {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.state = { failed: false };
31
+ }
32
+ static getDerivedStateFromError() {
33
+ return { failed: true };
34
+ }
35
+ componentDidCatch(error) {
36
+ console.error('[ApeBond SDK] The LiFi widget failed to load', error);
37
+ }
38
+ render() {
39
+ if (!this.state.failed)
40
+ return this.props.children;
41
+ return (jsxs("div", { className: `${WIDGET_BOX} ape:gap-4 ape:px-6`, children: [jsx(Text, { className: "ape:text-center", children: "Couldn't load Swap & Bridge. Check your connection and try again." }), jsx(Button, { onClick: this.props.onRetry, children: "Retry" })] }));
42
+ }
43
+ }
19
44
  const LifiModal = ({ bondChain, principalToken, onDismiss }) => {
20
- const config = {
21
- appearance: 'dark',
22
- loadFonts: false,
23
- theme: {
24
- typography: {
25
- fontFamily: 'Poppins',
26
- },
27
- colorSchemes: {
28
- dark: {
29
- palette: {
30
- background: {
31
- default: '#161420',
32
- paper: '#1F1D29',
33
- },
34
- primary: {
35
- main: '#6560C5',
36
- },
37
- secondary: {
38
- main: '#6560C5',
39
- },
40
- },
41
- },
42
- },
43
- container: {
44
- boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
45
- borderRadius: '16px',
46
- },
47
- },
48
- // fromToken: 'BNB',
49
- // fromChain: ChainId.BSC,
50
- toChain: toLifiChainId(bondChain),
51
- toToken: principalToken,
52
- sdkConfig: {
53
- rpcUrls: {
54
- [LIFI_SOLANA_CHAIN_ID]: [
55
- 'https://ancient-cold-sailboat.solana-mainnet.quiknode.pro/da13400ad8d0035313f3e71c6a37c107d0d0334b',
56
- ],
57
- },
58
- },
59
- variant: 'compact',
60
- integrator: 'apeswap',
61
- feeConfig: {
62
- calculateFee: async (params) => {
63
- return getFees(params.fromToken.symbol, params.toToken.symbol);
64
- },
65
- },
45
+ // Remounts the boundary (and the new lazy component) on retry.
46
+ const [attempt, setAttempt] = useState(0);
47
+ const retry = () => {
48
+ LazyLifiWidget = createLazyWidget();
49
+ setAttempt((n) => n + 1);
66
50
  };
67
- return (jsxs(Modal, { className: "lifi-bridge-modal ape:justify-center ape:items-center ape:p-0! ape:h-fit!", children: [jsx(ModalHeader, { className: "ape:px-6 ape:pt-4", onDismiss: onDismiss, hideDivider: true, children: "Swap & Bridge with LIFI" }), jsx(LiFiWidget, { ...config })] }));
51
+ return (jsxs(Modal, { className: "lifi-bridge-modal ape:justify-center ape:items-center ape:p-0! ape:h-fit!", children: [jsx(ModalHeader, { className: "ape:px-6 ape:pt-4", onDismiss: onDismiss, hideDivider: true, children: "Swap & Bridge with LIFI" }), jsx(WidgetErrorBoundary, { onRetry: retry, children: jsx(React.Suspense, { fallback: jsx("div", { className: WIDGET_BOX, children: jsx(Spinner, { size: 40, title: "Loading Swap & Bridge" }) }), children: jsx(LazyLifiWidget, { bondChain: bondChain, principalToken: principalToken }) }) }, attempt)] }));
68
52
  };
69
53
 
70
- export { LifiModal as default };
54
+ export { LifiModal as default, loadLifiWidget };
71
55
  //# sourceMappingURL=LifiModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LifiModal.js","sources":["../../../src/adapters/lifi/LifiModal.tsx"],"sourcesContent":["import React from 'react'\nimport { LiFiWidget } from '@lifi/widget'\nimport { ChainId } from '@ape.swap/apeswap-lists'\nimport Modal from '../../components/uikit-sdk/Modal'\nimport ModalHeader from '../../components/uikit-sdk/Modal/ModalHeader'\nimport type { BridgeModalProps } from '../types'\n\n// LiFi identifies Solana with its own chain id instead of ApeBond's ChainId.SOL.\nconst LIFI_SOLANA_CHAIN_ID = 1151111081099710\n\nconst toLifiChainId = (chainId: ChainId): number => (chainId === ChainId.SOL ? LIFI_SOLANA_CHAIN_ID : chainId)\n\nconst getFees = async (fromTokenSymbol: string, toTokenSymbol: string): Promise<number> => {\n const stableCoins = ['FRAX', 'USDC', 'USDT', 'DAI', 'BUSD', 'TUSD', 'USDD', 'FDUSD']\n const isFromStable = stableCoins.includes(fromTokenSymbol)\n const isToStable = stableCoins.includes(toTokenSymbol)\n if (toTokenSymbol.toLowerCase() === 'abond') {\n return 0\n }\n return isFromStable && isToStable ? 0.001 : 0.003\n}\n\nconst LifiModal: React.FC<BridgeModalProps> = ({ bondChain, principalToken, onDismiss }) => {\n const config = {\n appearance: 'dark' as const,\n loadFonts: false,\n theme: {\n typography: {\n fontFamily: 'Poppins',\n },\n colorSchemes: {\n dark: {\n palette: {\n background: {\n default: '#161420',\n paper: '#1F1D29',\n },\n primary: {\n main: '#6560C5',\n },\n secondary: {\n main: '#6560C5',\n },\n },\n },\n },\n container: {\n boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',\n borderRadius: '16px',\n },\n },\n // fromToken: 'BNB',\n // fromChain: ChainId.BSC,\n toChain: toLifiChainId(bondChain),\n toToken: principalToken,\n sdkConfig: {\n rpcUrls: {\n [LIFI_SOLANA_CHAIN_ID]: [\n 'https://ancient-cold-sailboat.solana-mainnet.quiknode.pro/da13400ad8d0035313f3e71c6a37c107d0d0334b',\n ],\n },\n },\n variant: 'compact' as const,\n integrator: 'apeswap',\n feeConfig: {\n calculateFee: async (params: any) => {\n return getFees(params.fromToken.symbol, params.toToken.symbol)\n },\n },\n }\n\n return (\n <Modal className=\"lifi-bridge-modal ape:justify-center ape:items-center ape:p-0! ape:h-fit!\">\n <ModalHeader className=\"ape:px-6 ape:pt-4\" onDismiss={onDismiss} hideDivider>\n Swap & Bridge with LIFI\n </ModalHeader>\n <LiFiWidget {...config} />\n </Modal>\n )\n}\n\nexport default LifiModal\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAOA;AACA,MAAM,oBAAoB,GAAG,gBAAgB;AAE7C,MAAM,aAAa,GAAG,CAAC,OAAgB,MAAc,OAAO,KAAK,OAAO,CAAC,GAAG,GAAG,oBAAoB,GAAG,OAAO,CAAC;AAE9G,MAAM,OAAO,GAAG,OAAO,eAAuB,EAAE,aAAqB,KAAqB;AACxF,IAAA,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;IACpF,MAAM,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC;AACtD,IAAA,IAAI,aAAa,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE;AAC3C,QAAA,OAAO,CAAC;IACV;IACA,OAAO,YAAY,IAAI,UAAU,GAAG,KAAK,GAAG,KAAK;AACnD,CAAC;AAED,MAAM,SAAS,GAA+B,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,KAAI;AACzF,IAAA,MAAM,MAAM,GAAG;AACb,QAAA,UAAU,EAAE,MAAe;AAC3B,QAAA,SAAS,EAAE,KAAK;AAChB,QAAA,KAAK,EAAE;AACL,YAAA,UAAU,EAAE;AACV,gBAAA,UAAU,EAA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EAAA,CACpB;AAEZ;;;;"}
1
+ {"version":3,"file":"LifiModal.js","sources":["../../../src/adapters/lifi/LifiModal.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport Modal from '../../components/uikit-sdk/Modal'\nimport ModalHeader from '../../components/uikit-sdk/Modal/ModalHeader'\nimport Spinner from '../../components/uikit-sdk/Spinner'\nimport Button from '../../components/uikit-sdk/Button/Button'\nimport Text from '../../components/uikit-sdk/Text'\nimport type { BridgeModalProps } from '../types'\n\n// The LiFi widget is about 1 MB gzipped, so it's loaded on demand: the modal frame opens instantly and the widget\n// streams in. The promise is shared, so `lifiAdapter.preload()` (hover/focus on the bridge buttons) and the modal\n// reuse one download; a failed download is forgotten so the next attempt retries it.\nlet widgetModule: Promise<typeof import('./LifiWidgetContent')> | null = null\n\nexport const loadLifiWidget = () => {\n if (!widgetModule) {\n widgetModule = import('./LifiWidgetContent').catch((error) => {\n widgetModule = null\n throw error\n })\n }\n return widgetModule\n}\n\n// React.lazy caches a rejection forever, so retrying needs a new lazy component.\nconst createLazyWidget = () => React.lazy(loadLifiWidget)\nlet LazyLifiWidget = createLazyWidget()\n\n// Roughly the compact widget's size, so the modal doesn't jump when it loads.\nconst WIDGET_BOX = 'ape:flex ape:flex-col ape:items-center ape:justify-center ape:w-[416px] ape:max-w-full ape:min-h-[480px]'\n\nclass WidgetErrorBoundary extends React.Component<\n { onRetry: () => void; children: React.ReactNode },\n { failed: boolean }\n> {\n state = { failed: false }\n\n static getDerivedStateFromError() {\n return { failed: true }\n }\n\n componentDidCatch(error: unknown) {\n console.error('[ApeBond SDK] The LiFi widget failed to load', error)\n }\n\n render() {\n if (!this.state.failed) return this.props.children\n return (\n <div className={`${WIDGET_BOX} ape:gap-4 ape:px-6`}>\n <Text className=\"ape:text-center\">Couldn&apos;t load Swap & Bridge. Check your connection and try again.</Text>\n <Button onClick={this.props.onRetry}>Retry</Button>\n </div>\n )\n }\n}\n\nconst LifiModal: React.FC<BridgeModalProps> = ({ bondChain, principalToken, onDismiss }) => {\n // Remounts the boundary (and the new lazy component) on retry.\n const [attempt, setAttempt] = useState(0)\n\n const retry = () => {\n LazyLifiWidget = createLazyWidget()\n setAttempt((n) => n + 1)\n }\n\n return (\n <Modal className=\"lifi-bridge-modal ape:justify-center ape:items-center ape:p-0! ape:h-fit!\">\n <ModalHeader className=\"ape:px-6 ape:pt-4\" onDismiss={onDismiss} hideDivider>\n Swap & Bridge with LIFI\n </ModalHeader>\n <WidgetErrorBoundary key={attempt} onRetry={retry}>\n <React.Suspense\n fallback={\n <div className={WIDGET_BOX}>\n <Spinner size={40} title=\"Loading Swap & Bridge\" />\n </div>\n }\n >\n <LazyLifiWidget bondChain={bondChain} principalToken={principalToken} />\n </React.Suspense>\n </WidgetErrorBoundary>\n </Modal>\n )\n}\n\nexport default LifiModal\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA,IAAI,YAAY,GAAyD,IAAI;AAEtE,MAAM,cAAc,GAAG,MAAK;IACjC,IAAI,CAAC,YAAY,EAAE;QACjB,YAAY,GAAG,OAAO,wBAAqB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAI;YAC3D,YAAY,GAAG,IAAI;AACnB,YAAA,MAAM,KAAK;AACb,QAAA,CAAC,CAAC;IACJ;AACA,IAAA,OAAO,YAAY;AACrB;AAEA;AACA,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;AACzD,IAAI,cAAc,GAAG,gBAAgB,EAAE;AAEvC;AACA,MAAM,UAAU,GAAG,0GAA0G;AAE7H,MAAM,mBAAoB,SAAQ,KAAK,CAAC,SAGvC,CAAA;AAHD,IAAA,WAAA,GAAA;;AAIE,QAAA,IAAA,CAAA,KAAK,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE;IAmB3B;AAjBE,IAAA,OAAO,wBAAwB,GAAA;AAC7B,QAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;IACzB;AAEA,IA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NA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,UAAU,EAAA,QAAA,EACxBA,IAAC,OAAO,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,uBAAuB,GAAG,EAAA,CAC/C,EAAA,QAAA,EAGRA,GAAA,CAAC,cAAc,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,GACzD,EAAA,EATO,OAAO,CAUX,CAAA,EAAA,CAChB;AAEZ;;;;"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ChainId } from '@ape.swap/apeswap-lists';
3
+ export interface LifiWidgetContentProps {
4
+ bondChain: ChainId;
5
+ principalToken?: string;
6
+ }
7
+ declare const LifiWidgetContent: React.FC<LifiWidgetContentProps>;
8
+ export default LifiWidgetContent;
@@ -0,0 +1,69 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { LiFiWidget } from '@lifi/widget';
3
+ import { ChainId } from '@ape.swap/apeswap-lists';
4
+
5
+ // LiFi identifies Solana with its own chain id instead of ApeBond's ChainId.SOL.
6
+ const LIFI_SOLANA_CHAIN_ID = 1151111081099710;
7
+ const toLifiChainId = (chainId) => (chainId === ChainId.SOL ? LIFI_SOLANA_CHAIN_ID : chainId);
8
+ const getFees = async (fromTokenSymbol, toTokenSymbol) => {
9
+ const stableCoins = ['FRAX', 'USDC', 'USDT', 'DAI', 'BUSD', 'TUSD', 'USDD', 'FDUSD'];
10
+ const isFromStable = stableCoins.includes(fromTokenSymbol);
11
+ const isToStable = stableCoins.includes(toTokenSymbol);
12
+ if (toTokenSymbol.toLowerCase() === 'abond') {
13
+ return 0;
14
+ }
15
+ return isFromStable && isToStable ? 0.001 : 0.003;
16
+ };
17
+ const LifiWidgetContent = ({ bondChain, principalToken }) => {
18
+ const config = {
19
+ appearance: 'dark',
20
+ loadFonts: false,
21
+ theme: {
22
+ typography: {
23
+ fontFamily: 'Poppins',
24
+ },
25
+ colorSchemes: {
26
+ dark: {
27
+ palette: {
28
+ background: {
29
+ default: '#161420',
30
+ paper: '#1F1D29',
31
+ },
32
+ primary: {
33
+ main: '#6560C5',
34
+ },
35
+ secondary: {
36
+ main: '#6560C5',
37
+ },
38
+ },
39
+ },
40
+ },
41
+ container: {
42
+ boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
43
+ borderRadius: '16px',
44
+ },
45
+ },
46
+ // fromToken: 'BNB',
47
+ // fromChain: ChainId.BSC,
48
+ toChain: toLifiChainId(bondChain),
49
+ toToken: principalToken,
50
+ sdkConfig: {
51
+ rpcUrls: {
52
+ [LIFI_SOLANA_CHAIN_ID]: [
53
+ 'https://ancient-cold-sailboat.solana-mainnet.quiknode.pro/da13400ad8d0035313f3e71c6a37c107d0d0334b',
54
+ ],
55
+ },
56
+ },
57
+ variant: 'compact',
58
+ integrator: 'apeswap',
59
+ feeConfig: {
60
+ calculateFee: async (params) => {
61
+ return getFees(params.fromToken.symbol, params.toToken.symbol);
62
+ },
63
+ },
64
+ };
65
+ return jsx(LiFiWidget, { ...config });
66
+ };
67
+
68
+ export { LifiWidgetContent as default };
69
+ //# sourceMappingURL=LifiWidgetContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LifiWidgetContent.js","sources":["../../../src/adapters/lifi/LifiWidgetContent.tsx"],"sourcesContent":["// The only module that imports @lifi/widget. LifiModal loads it with a dynamic import, so the widget (and the\n// packages it pulls in) is only downloaded when the \"Swap & Bridge\" modal opens. Keep it that way: a static import of\n// this file or of @lifi/widget from anywhere else puts the widget back in every consumer's entry chunk.\nimport React from 'react'\nimport { LiFiWidget } from '@lifi/widget'\nimport { ChainId } from '@ape.swap/apeswap-lists'\n\n// LiFi identifies Solana with its own chain id instead of ApeBond's ChainId.SOL.\nconst LIFI_SOLANA_CHAIN_ID = 1151111081099710\n\nconst toLifiChainId = (chainId: ChainId): number => (chainId === ChainId.SOL ? LIFI_SOLANA_CHAIN_ID : chainId)\n\nconst getFees = async (fromTokenSymbol: string, toTokenSymbol: string): Promise<number> => {\n const stableCoins = ['FRAX', 'USDC', 'USDT', 'DAI', 'BUSD', 'TUSD', 'USDD', 'FDUSD']\n const isFromStable = stableCoins.includes(fromTokenSymbol)\n const isToStable = stableCoins.includes(toTokenSymbol)\n if (toTokenSymbol.toLowerCase() === 'abond') {\n return 0\n }\n return isFromStable && isToStable ? 0.001 : 0.003\n}\n\nexport interface LifiWidgetContentProps {\n bondChain: ChainId\n principalToken?: string\n}\n\nconst LifiWidgetContent: React.FC<LifiWidgetContentProps> = ({ bondChain, principalToken }) => {\n const config = {\n appearance: 'dark' as const,\n loadFonts: false,\n theme: {\n typography: {\n fontFamily: 'Poppins',\n },\n colorSchemes: {\n dark: {\n palette: {\n background: {\n default: '#161420',\n paper: '#1F1D29',\n },\n primary: {\n main: '#6560C5',\n },\n secondary: {\n main: '#6560C5',\n },\n },\n },\n },\n container: {\n boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',\n borderRadius: '16px',\n },\n },\n // fromToken: 'BNB',\n // fromChain: ChainId.BSC,\n toChain: toLifiChainId(bondChain),\n toToken: principalToken,\n sdkConfig: {\n rpcUrls: {\n [LIFI_SOLANA_CHAIN_ID]: [\n 'https://ancient-cold-sailboat.solana-mainnet.quiknode.pro/da13400ad8d0035313f3e71c6a37c107d0d0334b',\n ],\n },\n },\n variant: 'compact' as const,\n integrator: 'apeswap',\n feeConfig: {\n calculateFee: async (params: any) => {\n return getFees(params.fromToken.symbol, params.toToken.symbol)\n },\n },\n }\n\n return <LiFiWidget {...config} />\n}\n\nexport default LifiWidgetContent\n"],"names":["_jsx"],"mappings":";;;;AAOA;AACA,MAAM,oBAAoB,GAAG,gBAAgB;AAE7C,MAAM,aAAa,GAAG,CAAC,OAAgB,MAAc,OAAO,KAAK,OAAO,CAAC,GAAG,GAAG,oBAAoB,GAAG,OAAO,CAAC;AAE9G,MAAM,OAAO,GAAG,OAAO,eAAuB,EAAE,aAAqB,KAAqB;AACxF,IAA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gBACP,CAAC,oBAAoB,GAAG;oBACtB,oGAAoG;AACrG,iBAAA;AACF,aAAA;AACF,SAAA;AACD,QAAA,OAAO,EAAE,SAAkB;AAC3B,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,SAAS,EAAE;AACT,YAAA,YAAY,EAAE,OAAO,MAAW,KAAI;AAClC,gBAAA,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;YAChE,CAAC;AACF,SAAA;KACF;AAED,IAAA,OAAOA,GAAA,CAAC,UAAU,EAAA,EAAA,GAAK,MAAM,GAAI;AACnC;;;;"}
@@ -1,6 +1,7 @@
1
1
  import type { BridgeAdapter } from '../types';
2
2
  /**
3
3
  * Cross-chain "Swap & Bridge" through the LiFi widget (v3). Optional: without it, the buy flows fall back to their
4
- * non-bridge options. Requires `@lifi/widget` and its peers (see docs/PLAN_CHAIN_ADAPTERS.md, section 3.2).
4
+ * non-bridge options. Requires `@lifi/widget` and its peers (see the README). The widget itself is lazy-loaded when the
5
+ * modal opens (see LifiModal).
5
6
  */
6
7
  export declare const lifiAdapter: BridgeAdapter;
@@ -1,5 +1,5 @@
1
1
  import { ChainId } from '@ape.swap/apeswap-lists';
2
- import LifiModal from './LifiModal.js';
2
+ import LifiModal, { loadLifiWidget } from './LifiModal.js';
3
3
 
4
4
  // Bond chains the LiFi widget can bridge funds to.
5
5
  const LIFI_SUPPORTED_CHAINS = [
@@ -22,12 +22,17 @@ const LIFI_SUPPORTED_CHAINS = [
22
22
  ];
23
23
  /**
24
24
  * Cross-chain "Swap & Bridge" through the LiFi widget (v3). Optional: without it, the buy flows fall back to their
25
- * non-bridge options. Requires `@lifi/widget` and its peers (see docs/PLAN_CHAIN_ADAPTERS.md, section 3.2).
25
+ * non-bridge options. Requires `@lifi/widget` and its peers (see the README). The widget itself is lazy-loaded when the
26
+ * modal opens (see LifiModal).
26
27
  */
27
28
  const lifiAdapter = {
28
29
  kind: 'lifi',
29
30
  supportsChain: (chainId) => LIFI_SUPPORTED_CHAINS.includes(chainId),
30
31
  BridgeModal: LifiModal,
32
+ // Load failures are handled (with a retry) when the modal renders the widget.
33
+ preload: () => {
34
+ loadLifiWidget().catch(() => undefined);
35
+ },
31
36
  };
32
37
 
33
38
  export { lifiAdapter };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/adapters/lifi/index.ts"],"sourcesContent":["import { ChainId } from '@ape.swap/apeswap-lists'\nimport type { BridgeAdapter } from '../types'\nimport LifiModal from './LifiModal'\n\n// Bond chains the LiFi widget can bridge funds to.\nconst LIFI_SUPPORTED_CHAINS: ChainId[] = [\n ChainId.MAINNET,\n ChainId.MATIC,\n ChainId.BSC,\n ChainId.BASE,\n ChainId.ARBITRUM,\n ChainId.HYPEREVM,\n ChainId.ROBINHOOD,\n ChainId.LINEA,\n ChainId.AVAX,\n ChainId.BLAST,\n ChainId.SONIC,\n ChainId.BERACHAIN,\n ChainId.UNICHAIN,\n ChainId.MONAD,\n ChainId.KATANA,\n ChainId.SOL,\n]\n\n/**\n * Cross-chain \"Swap & Bridge\" through the LiFi widget (v3). Optional: without it, the buy flows fall back to their\n * non-bridge options. Requires `@lifi/widget` and its peers (see docs/PLAN_CHAIN_ADAPTERS.md, section 3.2).\n */\nexport const lifiAdapter: BridgeAdapter = {\n kind: 'lifi',\n supportsChain: (chainId) => LIFI_SUPPORTED_CHAINS.includes(chainId),\n BridgeModal: LifiModal,\n}\n"],"names":[],"mappings":";;;AAIA;AACA,MAAM,qBAAqB,GAAc;AACvC,IAAA,OAAO,CAAC,OAAO;AACf,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,GAAG;AACX,IAAA,OAAO,CAAC,IAAI;AACZ,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,SAAS;AACjB,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,IAAI;AACZ,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,SAAS;AACjB,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,MAAM;AACd,IAAA,OAAO,CAAC,GAAG;CACZ;AAED;;;AAGG;AACI,MAAM,WAAW,GAAkB;AACxC,IAAA,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,CAAC,OAAO,KAAK,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC;AACnE,IAAA,WAAW,EAAE,SAAS;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/adapters/lifi/index.ts"],"sourcesContent":["import { ChainId } from '@ape.swap/apeswap-lists'\nimport type { BridgeAdapter } from '../types'\nimport LifiModal, { loadLifiWidget } from './LifiModal'\n\n// Bond chains the LiFi widget can bridge funds to.\nconst LIFI_SUPPORTED_CHAINS: ChainId[] = [\n ChainId.MAINNET,\n ChainId.MATIC,\n ChainId.BSC,\n ChainId.BASE,\n ChainId.ARBITRUM,\n ChainId.HYPEREVM,\n ChainId.ROBINHOOD,\n ChainId.LINEA,\n ChainId.AVAX,\n ChainId.BLAST,\n ChainId.SONIC,\n ChainId.BERACHAIN,\n ChainId.UNICHAIN,\n ChainId.MONAD,\n ChainId.KATANA,\n ChainId.SOL,\n]\n\n/**\n * Cross-chain \"Swap & Bridge\" through the LiFi widget (v3). Optional: without it, the buy flows fall back to their\n * non-bridge options. Requires `@lifi/widget` and its peers (see the README). The widget itself is lazy-loaded when the\n * modal opens (see LifiModal).\n */\nexport const lifiAdapter: BridgeAdapter = {\n kind: 'lifi',\n supportsChain: (chainId) => LIFI_SUPPORTED_CHAINS.includes(chainId),\n BridgeModal: LifiModal,\n // Load failures are handled (with a retry) when the modal renders the widget.\n preload: () => {\n loadLifiWidget().catch(() => undefined)\n },\n}\n"],"names":[],"mappings":";;;AAIA;AACA,MAAM,qBAAqB,GAAc;AACvC,IAAA,OAAO,CAAC,OAAO;AACf,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,GAAG;AACX,IAAA,OAAO,CAAC,IAAI;AACZ,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,SAAS;AACjB,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,IAAI;AACZ,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,SAAS;AACjB,IAAA,OAAO,CAAC,QAAQ;AAChB,IAAA,OAAO,CAAC,KAAK;AACb,IAAA,OAAO,CAAC,MAAM;AACd,IAAA,OAAO,CAAC,GAAG;CACZ;AAED;;;;AAIG;AACI,MAAM,WAAW,GAAkB;AACxC,IAAA,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,CAAC,OAAO,KAAK,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC;AACnE,IAAA,WAAW,EAAE,SAAS;;IAEtB,OAAO,EAAE,MAAK;QACZ,cAAc,EAAE,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC;IACzC,CAAC;;;;;"}
@@ -590,7 +590,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
590
590
  }
591
591
  /* eslint-disable react-hooks/exhaustive-deps */
592
592
  }, [inputCurrencyBalance, zapListFetched]);
593
- return bondData ? (jsx(Flex, { className: "modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5", style: { ...MCBuyComponentStyles[bondData?.marketingCampaign] }, children: jsxs(Flex, { className: "modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5", children: [jsx(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, hidePromotionUi: true }), jsx(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx(Flex, { className: clsx('ape:w-full', isProjectView ? 'ape:hidden ape:lg:flex' : 'ape:flex'), children: jsx(BondCards, { bondData: bondData, isDoingMaxBuy: exceedsSafeMaxBuy && !exceedsRealMaxBuy }) }), jsx(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError, hidePromotionUi: true }), jsx(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: handleMaxButton, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData?.chainId, enableZap: true, bondPrincipalToken: bondData?.lpToken, tokenBalance: inputCurrencyBalance ?? undefined, selectedTokenPrice: inputTokenPrice, isConnected: !!accountSolana }), bondData?.warningCard && (jsx(Flex, { className: "ape:w-full ape:justify-center ape:mt-[10px] ape:rounded-normal ape:p-[2px_10px]", style: { background: '#DE62F366' }, children: jsxs(Text, { as: "div", size: "12px", className: "ape:font-normal ape:flex ape:items-center ape:gap-[10px]", children: [jsx(SafeHTMLComponent, { html: bondData?.warningCard }), bondData?.chainId === ChainId.SONIC && bondData?.earnToken.symbol.toLowerCase() === 'moon' && (jsx(TooltipBubble, { className: "tooltip-bubble", body: jsx(Text, { className: "ape:normal-case", children: "Open the 'cog' icon menu in the top right and set the Slippage Tolerance to 5% or more." }), width: "315px", placement: "topRight", transformTip: "translate(9%, -10%)", children: jsx(QuestionCircle, { width: 14, color: "textDisabledButton" }) }))] }) })), jsx(Flex, { className: "modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between", children: jsx(Flex, { className: "button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full", children: !accountSolana ? (jsx(ConnectSolanaWallet, {})) : (jsxs(Flex, { className: "ape:w-full ape:gap-[10px] ape:flex-col ape:lg:flex-row", children: [canBridge && (jsx(Button, { variant: "secondary", onClick: () => onOpenBridgeModal(), className: "ape:w-full ape:lg:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!", children: "bridge to sol" })), jsx(Button, { className: clsx('action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!', canBridge && 'ape:lg:w-[65%]'), load: load, disabled: load ||
593
+ return bondData ? (jsx(Flex, { className: "modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5", style: { ...MCBuyComponentStyles[bondData?.marketingCampaign] }, children: jsxs(Flex, { className: "modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5", children: [jsx(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, hidePromotionUi: true }), jsx(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx(Flex, { className: clsx('ape:w-full', isProjectView ? 'ape:hidden ape:lg:flex' : 'ape:flex'), children: jsx(BondCards, { bondData: bondData, isDoingMaxBuy: exceedsSafeMaxBuy && !exceedsRealMaxBuy }) }), jsx(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError, hidePromotionUi: true }), jsx(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: handleMaxButton, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData?.chainId, enableZap: true, bondPrincipalToken: bondData?.lpToken, tokenBalance: inputCurrencyBalance ?? undefined, selectedTokenPrice: inputTokenPrice, isConnected: !!accountSolana }), bondData?.warningCard && (jsx(Flex, { className: "ape:w-full ape:justify-center ape:mt-[10px] ape:rounded-normal ape:p-[2px_10px]", style: { background: '#DE62F366' }, children: jsxs(Text, { as: "div", size: "12px", className: "ape:font-normal ape:flex ape:items-center ape:gap-[10px]", children: [jsx(SafeHTMLComponent, { html: bondData?.warningCard }), bondData?.chainId === ChainId.SONIC && bondData?.earnToken.symbol.toLowerCase() === 'moon' && (jsx(TooltipBubble, { className: "tooltip-bubble", body: jsx(Text, { className: "ape:normal-case", children: "Open the 'cog' icon menu in the top right and set the Slippage Tolerance to 5% or more." }), width: "315px", placement: "topRight", transformTip: "translate(9%, -10%)", children: jsx(QuestionCircle, { width: 14, color: "textDisabledButton" }) }))] }) })), jsx(Flex, { className: "modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between", children: jsx(Flex, { className: "button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full", children: !accountSolana ? (jsx(ConnectSolanaWallet, {})) : (jsxs(Flex, { className: "ape:w-full ape:gap-[10px] ape:flex-col ape:lg:flex-row", children: [canBridge && (jsx(Button, { variant: "secondary", onClick: () => onOpenBridgeModal(), onMouseEnter: bridge.preload, onFocus: bridge.preload, className: "ape:w-full ape:lg:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!", children: "bridge to sol" })), jsx(Button, { className: clsx('action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!', canBridge && 'ape:lg:w-[65%]'), load: load, disabled: load ||
594
594
  bondData?.soldOut ||
595
595
  !accountSolana ||
596
596
  !inputValue ||
@@ -1 +1 @@
1
- {"version":3,"file":"BuyComponentSolana.js","sources":["../../../src/adapters/solana/BuyComponentSolana.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react'\nimport clsx from 'clsx'\nimport useModal from '../../hooks/useModal'\nimport { ChainId, MarketingCampaign } from '@ape.swap/apeswap-lists'\nimport TokenSelectorPanel from '../../components/TokenSelectorPanel'\nimport useBondsData from '../../state/bonds/useBondsData'\nimport useTokenFromZapList from '../../hooks/useTokenFromZapList'\nimport { usePopups } from '../../state/popups/usePopups'\nimport { formatUSDNumber, getMaxBuy, getPayoutAmount, getPrincipalAmount } from '../../utils/displayHelpers'\nimport { useSDKConfig } from '../../state/useSDKConfig'\nimport { useSlippage } from '../../state/slippage/useSlippage'\nimport { getSymbol } from '../../utils/getNativeTicker'\nimport BondModalHeader from '../../views/BuyBond/components/BondModalHeader'\nimport BondCards from '../../views/BuyBond/components/BondCards/BondCards'\nimport Estimations from '../../views/BuyBond/components/Estimations'\nimport ProjectDescription from '../../views/BuyBond/components/ProjectDescription'\nimport NoBonusModal from '../../views/BuyBond/components/NoBonusModal/NoBonusModal'\nimport useJupiterSolanaQuote from './useJupiterSolanaQuote'\nimport useSortedZapList from '../../hooks/useSortedZapList'\n\n// Solana\nimport ConnectSolanaWalletButton from './ConnectSolanaWalletButton'\nimport {\n PublicKey,\n SystemProgram,\n SYSVAR_INSTRUCTIONS_PUBKEY,\n Keypair,\n Transaction,\n Connection,\n TransactionInstruction,\n} from '@solana/web3.js'\nimport { createJupiterApiClient } from '@jup-ag/api'\nimport { derivePda } from './derivePda'\nimport {\n getAssociatedTokenAddress,\n ASSOCIATED_TOKEN_PROGRAM_ID,\n createAssociatedTokenAccountInstruction,\n getAccount,\n} from '@solana/spl-token'\nimport { getBondIssuanceAccountSolana } from './getSolanaAccount'\nimport { getU64Codec } from '@solana/kit'\nimport { DEPOSIT_DISCRIMINATOR, MPL_CORE_PROGRAM_ID, PROGRAM_ID } from './solanaConstants'\nimport { Buffer } from 'buffer'\nimport { BondsData } from '../../types/bonds'\nimport { BondIssuanceAccount } from './codecs'\nimport { getRPC } from '../../config/constants/networks'\nimport { reportError } from '../../utils/reportError'\nimport SafeHTMLComponent from '../../components/SafeHTMLComponent'\nimport { findHighestTrueBondPrice } from '../../utils/bondPriceHelpers'\nimport track from '../../utils/track'\nimport { remove0xPrefix } from '../../utils/remove0xPrefix'\nimport { MCBuyComponentStyles } from '../../utils/campaignStyles'\nimport useSOLAccount from './useSOLAccount'\nimport { useSendReferenceId } from '../../hooks/useSendReferenceId'\nimport { getBridgeAdapter } from '../registry'\nimport { getAtaWithCreateInstruction, getTokenProgramForMint } from './solanaAtaHelper'\nimport Flex from '../../components/uikit-sdk/Flex'\nimport Text from '../../components/uikit-sdk/Text'\nimport TooltipBubble from '../../components/uikit-sdk/TooltipBubble'\nimport Button from '../../components/uikit-sdk/Button/Button'\nimport { formatNumberSI } from '../../utils/formatNumber'\nimport QuestionCircle from '../../components/uikit-sdk/Svg/Icons/QuestionCircle'\nimport { mulDivRound, parseUnits, toFixedString } from '../../utils/fixedPoint'\n\n// price * (100 + slippage) / (100 * 1e6), scaled by 1e6 to preserve fractional slippage\n// percentages without a float precompute (matches this bond program's price scale).\nconst slippageMaxPriceSolana = (priceBig: bigint, slippage: number): bigint =>\n mulDivRound(priceBig, parseUnits(String(100 + slippage), 6), parseUnits('100', 6) * 1_000_000n, 'halfUp')\n\ninterface BuyComponentSolanaProps {\n onDismiss?: () => void // this is only the modal\n bondAddress?: string\n bondChain?: number\n setBillId?: (id: string) => void\n isProjectView?: boolean\n}\n\nconst BuyComponentSolana: React.FC<BuyComponentSolanaProps> = ({\n onDismiss,\n bondAddress,\n bondChain,\n isProjectView,\n setBillId,\n}) => {\n const SDKConfig = useSDKConfig()\n\n // Hooks\n const { publicKey: accountSolana, signTransaction } = useSOLAccount()\n const { data: bonds } = useBondsData()\n const { addToastError, addToastSuccess } = usePopups()\n const { solSlippage: slippage } = useSlippage()\n const sendReferenceId = useSendReferenceId()\n\n const bondData: BondsData | undefined = bonds?.find(\n (bond) => bond?.contractAddress?.[bond?.chainId]?.toLowerCase() === bondAddress?.toLowerCase(),\n )\n\n // Tier Gating\n const trueBondPriceData = findHighestTrueBondPrice('0', bondData?.trueBondPrices)\n\n // State\n const [inputValue, setInputValue] = useState('')\n const [inputTokenString, setInputTokenString] = useState(bondData?.lpToken?.address?.[bondData.chainId])\n\n // On-chain Data\n const inputToken = useTokenFromZapList(inputTokenString, bondData?.chainId, bondData?.lpToken)\n const isZap = inputTokenString?.toLowerCase() !== bondData?.lpToken?.address?.[bondData?.chainId]?.toLowerCase()\n\n const [\n fetchingZapQuote,\n jupiterQuote,\n zapDepositAmount,\n zapError,\n isDirectRoute,\n minimumDepositAmount,\n wrapAndUnwrapSol,\n ] = useJupiterSolanaQuote(inputValue, inputToken, bondData, accountSolana?.toBase58(), true, slippage)\n\n const { sortedZapList, isFetched: zapListFetched } = useSortedZapList(bondChain, bondData?.lpToken)\n const enrichedTokenData = sortedZapList.find((item) =>\n item.token === 'NATIVE' || inputToken === 'NATIVE'\n ? item.token === inputToken\n : item?.token?.address?.[bondChain as ChainId]?.toLowerCase() ===\n inputToken?.address?.[bondChain as ChainId]?.toLowerCase(),\n )\n const inputCurrencyBalance = enrichedTokenData?.balance\n const inputTokenPrice = enrichedTokenData?.price\n\n // Estimations - use zapDepositAmount if swapping\n const depositAmount = isZap ? zapDepositAmount : inputValue\n const youSpendString = `${formatNumberSI(inputValue)} ${getSymbol(inputToken, bondData?.chainId)} = \n $${formatUSDNumber((parseFloat(inputValue) * (inputTokenPrice ?? 0)).toString())}`\n\n const exceedsRealMaxBuy = getMaxBuy(bondData, true) <= getPayoutAmount(bondData, depositAmount, '0')\n const exceedsSafeMaxBuy =\n getMaxBuy(bondData, false) * (isZap ? 0.995 : 0.9995) <= getPayoutAmount(bondData, depositAmount, '0')\n const exceedsBalance = Number(inputCurrencyBalance ?? '0') < Number(inputValue)\n\n // Loading State - include zap loading\n const [loadingTx, setLoadingTx] = useState(false)\n const load = loadingTx || (fetchingZapQuote && !!inputValue)\n\n // State Handlers\n const handleCurrencySelect = useCallback((newInputToken: string) => {\n setInputValue('')\n setInputTokenString(newInputToken)\n }, [])\n\n const handleMaxButton = () => {\n const balance = Number(inputCurrencyBalance ?? '0')\n const principalDecimals = bondData?.lpToken?.decimals?.[bondData?.chainId] ?? 18\n const maxBuyAmount = getMaxBuy(bondData, SDKConfig.showLowValueBonds)\n\n if (!isZap) {\n const maxPossibleUserPurchase = getPayoutAmount(bondData, balance.toString(), '0')\n if (maxPossibleUserPurchase > maxBuyAmount) {\n console.log('user balance exceeds max buy limit, setting to max buy')\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), '0')\n setInputValue(toFixedString(principalForMaxBuy, principalDecimals))\n } else {\n console.log('balance is ok, can be used')\n setInputValue(toFixedString(balance, principalDecimals))\n }\n } else {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), '0')\n const principalForMaxBuyUSD = principalForMaxBuy * Number(bondData?.principalTokenPrice ?? 0)\n const maxBuyAmountInSelectedToken = principalForMaxBuyUSD / (inputTokenPrice ?? 0)\n const decimals =\n enrichedTokenData?.token === 'NATIVE' ? 18 : (enrichedTokenData?.token.decimals[bondData?.chainId!] ?? 18)\n\n if (balance >= maxBuyAmountInSelectedToken) {\n setInputValue(toFixedString(maxBuyAmountInSelectedToken, decimals))\n } else {\n setInputValue(toFixedString(balance, decimals))\n }\n }\n }\n\n const handleBuyCallback = async () => {\n if (!accountSolana || !bondData || !inputValue || !inputToken || !bondData) return\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n try {\n setLoadingTx(true)\n\n const connection = new Connection(getRPC(ChainId.SOL), 'confirmed')\n\n // Convert input value\n const amountBigInt = parseUnits(inputValue, bondData.lpToken.decimals[ChainId.SOL]!)\n\n const user = accountSolana\n\n const trueBondPriceWithoutFee = bondData?.trueBondPrices?.[0]?.trueBondPrice\n\n const maxPrice = slippageMaxPriceSolana(BigInt(trueBondPriceWithoutFee ?? '0'), slippage).toString()\n\n // Static addresses\n const bondIssuancePda = new PublicKey(bondData.contractAddress[bondData.chainId]!)\n const principalMint = new PublicKey(bondData.lpToken.address[bondData.chainId]!)\n const payoutMint = new PublicKey(bondData.earnToken.address[bondData.chainId]!)\n const collection = new PublicKey(bondData.billNnftAddress[bondData.chainId]!)\n\n // Detect token programs for both mints (supports Token-2022)\n const [principalTokenProgram, payoutTokenProgram] = await Promise.all([\n getTokenProgramForMint(connection, principalMint),\n getTokenProgramForMint(connection, payoutMint),\n ])\n\n // Fetch Bond Issuance Account\n const bondIssuanceAccounts = (await getBondIssuanceAccountSolana([\n bondIssuancePda.toBase58(),\n ])) as BondIssuanceAccount[]\n if (!bondIssuanceAccounts) return\n const bondIssuanceAccount = bondIssuanceAccounts[0]\n const feeRecipient = new PublicKey(bondIssuanceAccount.feePrincipalRecipient)\n const partnerRecipient = new PublicKey(bondIssuanceAccount.partnerPrincipalRecipient)\n const feePayoutRecipient = new PublicKey(bondIssuanceAccount.feePayoutRecipient) // ADDED\n\n // Derive PDAs\n const bondTermPda = derivePda('bond_term', bondIssuancePda, PROGRAM_ID)\n const bondPricingPda = derivePda('bond_pricing', bondIssuancePda, PROGRAM_ID)\n\n // Create NFT mint\n const nftMint = Keypair.generate()\n\n const [bondPda] = PublicKey.findProgramAddressSync(\n [Buffer.from('bond'), bondIssuancePda.toBuffer(), nftMint.publicKey.toBuffer()],\n PROGRAM_ID,\n )\n\n // ATAs - use correct token program for each mint\n const userPrincipalAta = await getAssociatedTokenAddress(principalMint, user, true, principalTokenProgram)\n const treasuryAta = await getAssociatedTokenAddress(payoutMint, bondIssuancePda, true, payoutTokenProgram)\n const feePrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n feeRecipient,\n true,\n principalTokenProgram,\n )\n const partnerPrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n partnerRecipient,\n true,\n principalTokenProgram,\n )\n\n const { address: feePayoutRecipientAta, createInstruction: createPayoutFeeRecipientAtaIx } =\n await getAtaWithCreateInstruction(connection, payoutMint, feePayoutRecipient, user)\n\n // Encode args\n const u64Codec = getU64Codec()\n const amountEncoded = Buffer.from(u64Codec.encode(amountBigInt))\n const maxPriceEncoded = Buffer.from(u64Codec.encode(BigInt(maxPrice)))\n const instructionData = Buffer.concat([DEPOSIT_DISCRIMINATOR, amountEncoded, maxPriceEncoded])\n\n // Instruction\n const keys = [\n { pubkey: bondPda, isSigner: false, isWritable: true },\n { pubkey: nftMint.publicKey, isSigner: true, isWritable: true },\n { pubkey: user, isSigner: true, isWritable: true },\n { pubkey: bondPricingPda, isSigner: false, isWritable: true },\n { pubkey: bondTermPda, isSigner: false, isWritable: true },\n { pubkey: bondIssuancePda, isSigner: false, isWritable: true },\n { pubkey: collection, isSigner: false, isWritable: true },\n { pubkey: userPrincipalAta, isSigner: false, isWritable: true },\n { pubkey: feePrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: partnerPrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: feePayoutRecipientAta, isSigner: false, isWritable: true },\n { pubkey: treasuryAta, isSigner: false, isWritable: true },\n { pubkey: principalMint, isSigner: false, isWritable: false },\n { pubkey: payoutMint, isSigner: false, isWritable: false },\n { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: principalTokenProgram, isSigner: false, isWritable: false }, // principal_token_program (dynamic)\n { pubkey: payoutTokenProgram, isSigner: false, isWritable: false }, // payout_token_program (dynamic)\n { pubkey: ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: MPL_CORE_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: SYSVAR_INSTRUCTIONS_PUBKEY, isSigner: false, isWritable: false },\n ]\n\n const instruction = new TransactionInstruction({\n keys,\n programId: PROGRAM_ID,\n data: instructionData,\n })\n\n // Create tx (prepend payout fee recipient ATA creation if needed)\n const transaction = new Transaction()\n if (createPayoutFeeRecipientAtaIx) transaction.add(createPayoutFeeRecipientAtaIx)\n transaction.add(instruction)\n transaction.feePayer = user\n\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n transaction.recentBlockhash = blockhash\n // Sign tx\n transaction.partialSign(nftMint)\n const signedTx = await signTransaction?.(transaction)!\n\n // Sends tx, generates hash\n const txId = await connection.sendRawTransaction(signedTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n // awaits hash confirmation on chain - commitment \"confirmed\"\n await connection.confirmTransaction(\n {\n signature: txId,\n blockhash,\n lastValidBlockHeight,\n },\n 'confirmed',\n )\n\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: 'lp-buy',\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, txId)\n\n // waits 3 seconds before triggering after-purchase flow\n await new Promise((resolve) => setTimeout(resolve, 3000))\n\n addToastSuccess(txId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n } catch (error: any) {\n console.error('Error during bond purchase:', error)\n addToastError(error?.message || 'Unknown error')\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: error.message,\n extraInfo: { type: 'solanaBuyBond', error: error.message },\n chainId: bondChain,\n account: accountSolana.toString(),\n })\n } finally {\n setLoadingTx(false)\n }\n }\n\n // Helper: Build Jupiter swap instructions from API response\n const buildSwapInstructions = (swapResult: any) => {\n const swapInstruction = new TransactionInstruction({\n programId: new PublicKey(swapResult.swapInstruction.programId),\n keys: swapResult.swapInstruction.accounts.map((key: any) => ({\n pubkey: new PublicKey(key.pubkey),\n isSigner: key.isSigner,\n isWritable: key.isWritable,\n })),\n data: Buffer.from(swapResult.swapInstruction.data, 'base64'),\n })\n\n const setupInstructions = (swapResult.setupInstructions || []).map(\n (ix: any) =>\n new TransactionInstruction({\n programId: new PublicKey(ix.programId),\n keys: ix.accounts.map((key: any) => ({\n pubkey: new PublicKey(key.pubkey),\n isSigner: key.isSigner,\n isWritable: key.isWritable,\n })),\n data: Buffer.from(ix.data, 'base64'),\n }),\n )\n\n return { setupInstructions, swapInstruction }\n }\n\n // Helper: Build bond instruction with specified amount\n const buildBondInstruction = (amount: bigint, maxPriceEncoded: Buffer, bondKeys: any[]) => {\n const u64Codec = getU64Codec()\n const amountEncoded = Buffer.from(u64Codec.encode(amount))\n const instructionData = Buffer.concat([DEPOSIT_DISCRIMINATOR, amountEncoded, maxPriceEncoded])\n\n return new TransactionInstruction({\n keys: bondKeys,\n programId: PROGRAM_ID,\n data: instructionData,\n })\n }\n\n // Helper: Ensure user's principal token account exists\n const ensureUserPrincipalAtaExists = async (\n connection: Connection,\n payer: PublicKey,\n principalMint: PublicKey,\n user: PublicKey,\n tokenProgram: PublicKey,\n ): Promise<{ ataAddress: PublicKey; createInstruction: TransactionInstruction | null }> => {\n const userPrincipalAta = await getAssociatedTokenAddress(principalMint, user, true, tokenProgram)\n\n try {\n // Check if account exists\n await getAccount(connection, userPrincipalAta, undefined, tokenProgram)\n return { ataAddress: userPrincipalAta, createInstruction: null }\n } catch {\n // Account doesn't exist, return instruction to create it\n const createAtaIx = createAssociatedTokenAccountInstruction(\n payer, // fee payer\n userPrincipalAta, // ATA to create\n user, // owner of ATA\n principalMint, // mint\n tokenProgram, // token program\n )\n return { ataAddress: userPrincipalAta, createInstruction: createAtaIx }\n }\n }\n\n // Helper: Track zap events\n const trackZapEvents = (txType: 'single-tx' | 'two-tx') => {\n track({\n event: 'zap',\n chain: bondChain,\n data: {\n cat: 'bond',\n token1: getSymbol(inputToken),\n token2: bondData?.lpToken.symbol ?? '',\n amount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: `zap-buy-${txType}`,\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n\n const handleZapCallback = async () => {\n if (loadingTx || !accountSolana || !bondData || !jupiterQuote || !signTransaction) return\n\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n try {\n setLoadingTx(true)\n const connection = new Connection(getRPC(ChainId.SOL), 'confirmed')\n const jupiterApi = createJupiterApiClient()\n\n // STEP 1: Calculate bond parameters and prepare accounts\n const trueBondPriceWithoutFee = bondData?.trueBondPrices?.[0]?.trueBondPrice\n const maxPrice = slippageMaxPriceSolana(BigInt(trueBondPriceWithoutFee ?? '0'), slippage).toString()\n console.log(isDirectRoute ? 'Using direct route' : 'Using multi-hop route')\n const depositAmountForBond = isDirectRoute ? minimumDepositAmount : zapDepositAmount\n\n const amountBigInt = parseUnits(depositAmountForBond, bondData.lpToken.decimals[ChainId.SOL]!)\n\n const bondIssuancePda = new PublicKey(bondData.contractAddress[bondData.chainId]!)\n const principalMint = new PublicKey(bondData.lpToken.address[bondData.chainId]!)\n const payoutMint = new PublicKey(bondData.earnToken.address[bondData.chainId]!)\n const collection = new PublicKey(bondData.billNnftAddress[bondData.chainId]!)\n\n // Detect token programs for both mints (supports Token-2022)\n const [principalTokenProgram, payoutTokenProgram] = await Promise.all([\n getTokenProgramForMint(connection, principalMint),\n getTokenProgramForMint(connection, payoutMint),\n ])\n\n const bondIssuanceAccounts = (await getBondIssuanceAccountSolana([\n bondIssuancePda.toBase58(),\n ])) as BondIssuanceAccount[]\n if (!bondIssuanceAccounts) throw new Error('Failed to fetch bond issuance account')\n\n const bondIssuanceAccount = bondIssuanceAccounts[0]\n const feeRecipient = new PublicKey(bondIssuanceAccount.feePrincipalRecipient)\n const partnerRecipient = new PublicKey(bondIssuanceAccount.partnerPrincipalRecipient)\n const feePayoutRecipient = new PublicKey(bondIssuanceAccount.feePayoutRecipient)\n\n const bondTermPda = derivePda('bond_term', bondIssuancePda, PROGRAM_ID)\n const bondPricingPda = derivePda('bond_pricing', bondIssuancePda, PROGRAM_ID)\n\n const nftMint = Keypair.generate()\n const [bondPda] = PublicKey.findProgramAddressSync(\n [Buffer.from('bond'), bondIssuancePda.toBuffer(), nftMint.publicKey.toBuffer()],\n PROGRAM_ID,\n )\n\n // Ensure user's USDC account exists, get creation instruction if needed\n const { ataAddress: userPrincipalAta, createInstruction: createPrincipalAtaIx } =\n await ensureUserPrincipalAtaExists(\n connection,\n accountSolana,\n principalMint,\n accountSolana,\n principalTokenProgram,\n )\n const treasuryAta = await getAssociatedTokenAddress(payoutMint, bondIssuancePda, true, payoutTokenProgram)\n const feePrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n feeRecipient,\n true,\n principalTokenProgram,\n )\n const partnerPrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n partnerRecipient,\n true,\n principalTokenProgram,\n )\n const { address: feePayoutRecipientAta, createInstruction: createPayoutFeeRecipientAtaIx } =\n await getAtaWithCreateInstruction(connection, payoutMint, feePayoutRecipient, accountSolana)\n\n const u64Codec = getU64Codec()\n const maxPriceEncoded = Buffer.from(u64Codec.encode(BigInt(maxPrice)))\n\n const bondKeys = [\n { pubkey: bondPda, isSigner: false, isWritable: true },\n { pubkey: nftMint.publicKey, isSigner: true, isWritable: true },\n { pubkey: accountSolana, isSigner: true, isWritable: true },\n { pubkey: bondPricingPda, isSigner: false, isWritable: true },\n { pubkey: bondTermPda, isSigner: false, isWritable: true },\n { pubkey: bondIssuancePda, isSigner: false, isWritable: true },\n { pubkey: collection, isSigner: false, isWritable: true },\n { pubkey: userPrincipalAta, isSigner: false, isWritable: true },\n { pubkey: feePrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: partnerPrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: feePayoutRecipientAta, isSigner: false, isWritable: true },\n { pubkey: treasuryAta, isSigner: false, isWritable: true },\n { pubkey: principalMint, isSigner: false, isWritable: false },\n { pubkey: payoutMint, isSigner: false, isWritable: false },\n { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: principalTokenProgram, isSigner: false, isWritable: false }, // principal_token_program (dynamic)\n { pubkey: payoutTokenProgram, isSigner: false, isWritable: false }, // payout_token_program (dynamic)\n { pubkey: ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: MPL_CORE_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: SYSVAR_INSTRUCTIONS_PUBKEY, isSigner: false, isWritable: false },\n ]\n\n // Build initial bond instruction (for single-tx attempt)\n const bondInstruction = buildBondInstruction(amountBigInt, maxPriceEncoded, bondKeys)\n\n // STEP 2: Get Jupiter swap instructions\n const swapResult = await jupiterApi.swapInstructionsPost({\n swapRequest: {\n quoteResponse: jupiterQuote,\n userPublicKey: accountSolana.toBase58(),\n wrapAndUnwrapSol: wrapAndUnwrapSol,\n dynamicComputeUnitLimit: true,\n prioritizationFeeLamports: {\n priorityLevelWithMaxLamports: {\n maxLamports: 4000000,\n priorityLevel: 'veryHigh',\n },\n },\n },\n })\n\n console.log('=== TRANSACTION SIZE ANALYSIS ===')\n console.log('Route used:', jupiterQuote.routePlan?.map((r) => r.swapInfo.label).join(' -> '))\n console.log('Swap accounts:', swapResult.swapInstruction.accounts.length)\n console.log('Setup instructions count:', swapResult.setupInstructions?.length || 0)\n\n let totalAccounts = swapResult.swapInstruction.accounts.length\n swapResult.setupInstructions?.forEach((ix, i) => {\n console.log(` Setup ${i}: ${ix.accounts.length} accounts`)\n totalAccounts += ix.accounts.length\n })\n\n console.log('Bond instruction accounts:', 20)\n console.log('Total accounts:', totalAccounts + 20)\n console.log('=== END ANALYSIS ===')\n\n // STEP 3: TRY SINGLE TRANSACTION (if direct route)\n if (isDirectRoute) {\n try {\n // Build swap instructions\n const { setupInstructions, swapInstruction } = buildSwapInstructions(swapResult)\n const setupIxs = [\n ...(createPrincipalAtaIx ? [createPrincipalAtaIx] : []),\n ...(createPayoutFeeRecipientAtaIx ? [createPayoutFeeRecipientAtaIx] : []),\n ...setupInstructions,\n ]\n const allInstructions = [...setupIxs, swapInstruction, bondInstruction]\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n\n const combinedTx = new Transaction()\n combinedTx.add(...allInstructions)\n combinedTx.recentBlockhash = blockhash\n combinedTx.feePayer = accountSolana\n combinedTx.partialSign(nftMint)\n\n // Check size - account for signatures\n const messageSize = combinedTx.serializeMessage().length\n const numSignatures = combinedTx.signatures.length // Should be 2: nftMint + accountSolana\n const signatureOverhead = 1 + numSignatures * 64 // 1 byte for count + 64 bytes per signature\n const estimatedTxSize = messageSize + signatureOverhead\n\n console.log(`Combined transaction size: ${estimatedTxSize} bytes (limit: 1232 bytes)`)\n\n if (estimatedTxSize > 1232) {\n console.log('Transaction too large, falling back to two transactions')\n throw new Error('TRANSACTION_TOO_LARGE')\n }\n\n // Execute single transaction!\n console.log('Transaction fits. Executing combined swap + bond')\n const signedTx = await signTransaction(combinedTx)\n const txId = await connection.sendRawTransaction(signedTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction({ signature: txId, blockhash, lastValidBlockHeight }, 'confirmed')\n\n console.log('SINGLE transaction confirmed:', txId)\n\n // Track success\n trackZapEvents('single-tx')\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, txId)\n\n await new Promise((resolve) => setTimeout(resolve, 3000))\n addToastSuccess(txId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n return\n } catch (singleTxError: any) {\n if (singleTxError.message !== 'TRANSACTION_TOO_LARGE') {\n throw singleTxError\n }\n console.log('Falling back to two separate transactions...')\n }\n }\n\n // STEP 4: FALLBACK - TWO SEPARATE TRANSACTIONS\n console.log('Executing TWO separate transactions...')\n\n // Execute swap first\n const { setupInstructions, swapInstruction } = buildSwapInstructions(swapResult)\n const swapSetupIxs = [...(createPrincipalAtaIx ? [createPrincipalAtaIx] : []), ...setupInstructions]\n const swapTx = new Transaction().add(...swapSetupIxs, swapInstruction)\n swapTx.feePayer = accountSolana\n const { blockhash: swapBlockhash, lastValidBlockHeight: swapLastValid } =\n await connection.getLatestBlockhash('confirmed')\n swapTx.recentBlockhash = swapBlockhash\n\n const signedSwapTx = await signTransaction(swapTx)\n const swapTxId = await connection.sendRawTransaction(signedSwapTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction(\n { signature: swapTxId, blockhash: swapBlockhash, lastValidBlockHeight: swapLastValid },\n 'confirmed',\n )\n console.log('Swap transaction confirmed:', swapTxId)\n\n // QUERY ACTUAL BALANCE RECEIVED FROM SWAP\n const principalTokenBalance = await connection.getTokenAccountBalance(userPrincipalAta)\n const actualAmount = BigInt(principalTokenBalance.value.amount)\n\n // REBUILD BOND INSTRUCTION WITH ACTUAL AMOUNT\n const actualBondInstruction = buildBondInstruction(actualAmount, maxPriceEncoded, bondKeys)\n\n const bondTx = new Transaction()\n if (createPayoutFeeRecipientAtaIx) bondTx.add(createPayoutFeeRecipientAtaIx)\n bondTx.add(actualBondInstruction)\n bondTx.feePayer = accountSolana\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n bondTx.recentBlockhash = blockhash\n bondTx.partialSign(nftMint)\n\n const signedBondTx = await signTransaction(bondTx)\n const bondTxId = await connection.sendRawTransaction(signedBondTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction({ signature: bondTxId, blockhash, lastValidBlockHeight }, 'confirmed')\n console.log('Bond transaction confirmed:', bondTxId)\n\n // Track both transactions\n trackZapEvents('two-tx')\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, bondTxId)\n\n await new Promise((resolve) => setTimeout(resolve, 3000))\n addToastSuccess(bondTxId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n } catch (error: any) {\n console.error('Error during zap + bond purchase:', error)\n addToastError(error?.message || 'Unknown error during swap and bond')\n\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: error.message,\n extraInfo: {\n type: 'solanaJupiterZapBuyBond',\n error: error.message,\n isDirectRoute,\n quote: jupiterQuote,\n },\n chainId: bondChain,\n account: accountSolana.toString(),\n })\n } finally {\n setLoadingTx(false)\n }\n }\n\n const handleBothPurchases = () => {\n if (loadingTx) return // Prevent duplicate calls\n setLoadingTx(true)\n if (isZap) {\n handleZapCallback().finally(() => setLoadingTx(false))\n } else {\n handleBuyCallback().finally(() => setLoadingTx(false))\n }\n }\n\n const handleOpenModal = () => {\n const bonus = trueBondPriceData?.bonusWithFee ?? 0\n if (bonus <= 0) {\n openNoBonusModal()\n } else {\n handleBothPurchases()\n }\n }\n\n // Modals\n // Optional bridge (LiFi adapter); without it the \"bridge to sol\" button is hidden.\n const bridge = getBridgeAdapter()\n const canBridge = !!bridge && bridge.supportsChain(ChainId.SOL)\n const [onOpenBridgeModal] = useModal(\n canBridge ? (\n <bridge.BridgeModal bondChain={ChainId.SOL} principalToken={bondData?.lpToken?.address?.[bondData?.chainId]} />\n ) : null,\n true,\n false,\n 'BridgeModal',\n )\n\n const [openNoBonusModal] = useModal(\n <NoBonusModal onAcknowledge={handleBothPurchases} showcaseTokenName={bondData?.showcaseTokenName} />,\n true,\n true,\n 'NoBonusModal',\n )\n // Effects\n const [hasChecked, setHasChecked] = useState(false)\n useEffect(() => {\n if (zapListFetched && !hasChecked) {\n if (parseFloat(inputCurrencyBalance ?? '0') < 0.0001) {\n setInputTokenString(\n sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain as ChainId],\n )\n }\n setHasChecked(true)\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [inputCurrencyBalance, zapListFetched])\n\n return bondData ? (\n <Flex\n className=\"modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5\"\n style={{ ...MCBuyComponentStyles[bondData?.marketingCampaign as MarketingCampaign] }}\n >\n <Flex className=\"modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5\">\n <BondModalHeader bondData={bondData} onDismiss={onDismiss} hidePromotionUi />\n <ProjectDescription description={bondData.shortDescription} isProjectView />\n <Flex className={clsx('ape:w-full', isProjectView ? 'ape:hidden ape:lg:flex' : 'ape:flex')}>\n <BondCards bondData={bondData} isDoingMaxBuy={exceedsSafeMaxBuy && !exceedsRealMaxBuy} />\n </Flex>\n <Estimations\n depositAmount={depositAmount}\n bondData={bondData}\n youSpendString={youSpendString}\n isZap={isZap}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n hidePromotionUi\n />\n <TokenSelectorPanel\n typedValue={inputValue}\n setTypedValue={setInputValue}\n selectedToken={inputToken}\n handleValueBtn={handleMaxButton}\n handleCurrencySelect={handleCurrencySelect}\n bondChainId={bondData?.chainId}\n enableZap={true}\n bondPrincipalToken={bondData?.lpToken}\n tokenBalance={inputCurrencyBalance ?? undefined}\n selectedTokenPrice={inputTokenPrice}\n isConnected={!!accountSolana}\n />\n {bondData?.warningCard && (\n <Flex\n className=\"ape:w-full ape:justify-center ape:mt-[10px] ape:rounded-normal ape:p-[2px_10px]\"\n style={{ background: '#DE62F366' }}\n >\n <Text as=\"div\" size=\"12px\" className=\"ape:font-normal ape:flex ape:items-center ape:gap-[10px]\">\n <SafeHTMLComponent html={bondData?.warningCard} />\n {bondData?.chainId === ChainId.SONIC && bondData?.earnToken.symbol.toLowerCase() === 'moon' && (\n <TooltipBubble\n className=\"tooltip-bubble\"\n body={\n <Text className=\"ape:normal-case\">\n Open the &#39;cog&#39; icon menu in the top right and set the Slippage Tolerance to 5% or more.\n </Text>\n }\n width=\"315px\"\n placement=\"topRight\"\n transformTip=\"translate(9%, -10%)\"\n >\n <QuestionCircle width={14} color=\"textDisabledButton\" />\n </TooltipBubble>\n )}\n </Text>\n </Flex>\n )}\n <Flex className=\"modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between\">\n <Flex className=\"button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full\">\n {!accountSolana ? (\n <ConnectSolanaWalletButton />\n ) : (\n <Flex className=\"ape:w-full ape:gap-[10px] ape:flex-col ape:lg:flex-row\">\n {canBridge && (\n <Button\n variant=\"secondary\"\n onClick={() => onOpenBridgeModal()}\n className=\"ape:w-full ape:lg:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!\"\n >\n bridge to sol\n </Button>\n )}\n <Button\n className={clsx(\n 'action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!',\n canBridge && 'ape:lg:w-[65%]',\n )}\n load={load}\n disabled={\n load ||\n bondData?.soldOut ||\n !accountSolana ||\n !inputValue ||\n parseFloat(inputValue) === 0 ||\n fetchingZapQuote ||\n zapError ||\n exceedsRealMaxBuy ||\n exceedsBalance ||\n (isZap && !jupiterQuote) ||\n SDKConfig.blockSales\n }\n onClick={handleOpenModal}\n >\n {SDKConfig.blockSales\n ? 'Complete KYC to Buy'\n : exceedsRealMaxBuy\n ? 'Exceeds Max Buy. Reduce amount'\n : exceedsBalance\n ? 'Insufficient balance'\n : zapError\n ? 'Swap quote failed'\n : !inputValue || parseFloat(inputValue) === 0\n ? 'Insert amount'\n : 'buy'}\n </Button>\n </Flex>\n )}\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n ) : (\n <></>\n )\n}\n\nexport default BuyComponentSolana\n"],"names":["_jsx","_jsxs","ConnectSolanaWalletButton","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA;AACA;AACA,MAAM,sBAAsB,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAChE,WAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,QAAU,EAAE,QAAQ,CAAC;AAU3G,MAAM,kBAAkB,GAAsC,CAAC,EAC7D,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,GACV,KAAI;AACH,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;;IAGhC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,aAAa,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE;IACtC,MAAM,EAAE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A,QAAA,EACvHA,IAAC,IAAI,EAAA,EAAC,SAAS,EAAC,wFAAwF,YACrG,CAAC,aAAa,IACbA,GAAA,CAACE,mBAAyB,KAAG,KAE7BD,KAAC,IAAI,EAAA,EAAC,SAAS,EAAC,wDAAwD,EAAA,QAAA,EAAA,CACrE,SAAS,KACRD,GAAA,CAAC,MAAM,EAAA,EACL,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,MAAM,iBAAiB,EAAE,EAClC,SAAS,EAAC,gEAAgE,EAAA,QAAA,EAAA,eAAA,EAAA,CAGnE,CACV,EACDA,GAAA,CAAC,MAAM,EAAA,EACL,SAAS,EAAE,IAAI,CACb,+DAA+D,EAC/D,SAAS,IAAI,gBAAgB,CAC9B,EACD,IAAI,EAAE,IAAI,EACV,QAAQ,EACN,IAAI;AACJ,wCAAA,QAAQ,EAAE,OAAO;AACjB,wCAAA,CAAC,aAAa;AACd,wCAAA,CAAC,UAAU;AACX,wCAAA,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC;wCAC5B,gBAAgB;wCAChB,QAAQ;wCACR,iBAAiB;wCACjB,cAAc;AACd,yCAAC,KAAK,IAAI,CAAC,YAAY,CAAC;wCACxB,SAAS,CAAC,UAAU,EAEtB,OAAO,EAAE,eAAe,EAAA,QAAA,EAEvB,SAAS,CAAC;AACT,0CAAE;AACF,0CAAE;AACA,8CAAE;AACF,8CAAE;AACA,kDAAE;AACF,kDAAE;AACA,sDAAE;sDACA,CAAC,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK;AAC1C,0DAAE;AACF,0DAAE,KAAK,EAAA,CACV,CAAA,EAAA,CACJ,CACR,GACI,EAAA,CACF,CAAA,EAAA,CACF,EAAA,CACF,KAEPA,GAAA,CAAAG,QAAA,EAAA,EAAA,CAAK,CACN;AACH;;;;"}
1
+ {"version":3,"file":"BuyComponentSolana.js","sources":["../../../src/adapters/solana/BuyComponentSolana.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react'\nimport clsx from 'clsx'\nimport useModal from '../../hooks/useModal'\nimport { ChainId, MarketingCampaign } from '@ape.swap/apeswap-lists'\nimport TokenSelectorPanel from '../../components/TokenSelectorPanel'\nimport useBondsData from '../../state/bonds/useBondsData'\nimport useTokenFromZapList from '../../hooks/useTokenFromZapList'\nimport { usePopups } from '../../state/popups/usePopups'\nimport { formatUSDNumber, getMaxBuy, getPayoutAmount, getPrincipalAmount } from '../../utils/displayHelpers'\nimport { useSDKConfig } from '../../state/useSDKConfig'\nimport { useSlippage } from '../../state/slippage/useSlippage'\nimport { getSymbol } from '../../utils/getNativeTicker'\nimport BondModalHeader from '../../views/BuyBond/components/BondModalHeader'\nimport BondCards from '../../views/BuyBond/components/BondCards/BondCards'\nimport Estimations from '../../views/BuyBond/components/Estimations'\nimport ProjectDescription from '../../views/BuyBond/components/ProjectDescription'\nimport NoBonusModal from '../../views/BuyBond/components/NoBonusModal/NoBonusModal'\nimport useJupiterSolanaQuote from './useJupiterSolanaQuote'\nimport useSortedZapList from '../../hooks/useSortedZapList'\n\n// Solana\nimport ConnectSolanaWalletButton from './ConnectSolanaWalletButton'\nimport {\n PublicKey,\n SystemProgram,\n SYSVAR_INSTRUCTIONS_PUBKEY,\n Keypair,\n Transaction,\n Connection,\n TransactionInstruction,\n} from '@solana/web3.js'\nimport { createJupiterApiClient } from '@jup-ag/api'\nimport { derivePda } from './derivePda'\nimport {\n getAssociatedTokenAddress,\n ASSOCIATED_TOKEN_PROGRAM_ID,\n createAssociatedTokenAccountInstruction,\n getAccount,\n} from '@solana/spl-token'\nimport { getBondIssuanceAccountSolana } from './getSolanaAccount'\nimport { getU64Codec } from '@solana/kit'\nimport { DEPOSIT_DISCRIMINATOR, MPL_CORE_PROGRAM_ID, PROGRAM_ID } from './solanaConstants'\nimport { Buffer } from 'buffer'\nimport { BondsData } from '../../types/bonds'\nimport { BondIssuanceAccount } from './codecs'\nimport { getRPC } from '../../config/constants/networks'\nimport { reportError } from '../../utils/reportError'\nimport SafeHTMLComponent from '../../components/SafeHTMLComponent'\nimport { findHighestTrueBondPrice } from '../../utils/bondPriceHelpers'\nimport track from '../../utils/track'\nimport { remove0xPrefix } from '../../utils/remove0xPrefix'\nimport { MCBuyComponentStyles } from '../../utils/campaignStyles'\nimport useSOLAccount from './useSOLAccount'\nimport { useSendReferenceId } from '../../hooks/useSendReferenceId'\nimport { getBridgeAdapter } from '../registry'\nimport { getAtaWithCreateInstruction, getTokenProgramForMint } from './solanaAtaHelper'\nimport Flex from '../../components/uikit-sdk/Flex'\nimport Text from '../../components/uikit-sdk/Text'\nimport TooltipBubble from '../../components/uikit-sdk/TooltipBubble'\nimport Button from '../../components/uikit-sdk/Button/Button'\nimport { formatNumberSI } from '../../utils/formatNumber'\nimport QuestionCircle from '../../components/uikit-sdk/Svg/Icons/QuestionCircle'\nimport { mulDivRound, parseUnits, toFixedString } from '../../utils/fixedPoint'\n\n// price * (100 + slippage) / (100 * 1e6), scaled by 1e6 to preserve fractional slippage\n// percentages without a float precompute (matches this bond program's price scale).\nconst slippageMaxPriceSolana = (priceBig: bigint, slippage: number): bigint =>\n mulDivRound(priceBig, parseUnits(String(100 + slippage), 6), parseUnits('100', 6) * 1_000_000n, 'halfUp')\n\ninterface BuyComponentSolanaProps {\n onDismiss?: () => void // this is only the modal\n bondAddress?: string\n bondChain?: number\n setBillId?: (id: string) => void\n isProjectView?: boolean\n}\n\nconst BuyComponentSolana: React.FC<BuyComponentSolanaProps> = ({\n onDismiss,\n bondAddress,\n bondChain,\n isProjectView,\n setBillId,\n}) => {\n const SDKConfig = useSDKConfig()\n\n // Hooks\n const { publicKey: accountSolana, signTransaction } = useSOLAccount()\n const { data: bonds } = useBondsData()\n const { addToastError, addToastSuccess } = usePopups()\n const { solSlippage: slippage } = useSlippage()\n const sendReferenceId = useSendReferenceId()\n\n const bondData: BondsData | undefined = bonds?.find(\n (bond) => bond?.contractAddress?.[bond?.chainId]?.toLowerCase() === bondAddress?.toLowerCase(),\n )\n\n // Tier Gating\n const trueBondPriceData = findHighestTrueBondPrice('0', bondData?.trueBondPrices)\n\n // State\n const [inputValue, setInputValue] = useState('')\n const [inputTokenString, setInputTokenString] = useState(bondData?.lpToken?.address?.[bondData.chainId])\n\n // On-chain Data\n const inputToken = useTokenFromZapList(inputTokenString, bondData?.chainId, bondData?.lpToken)\n const isZap = inputTokenString?.toLowerCase() !== bondData?.lpToken?.address?.[bondData?.chainId]?.toLowerCase()\n\n const [\n fetchingZapQuote,\n jupiterQuote,\n zapDepositAmount,\n zapError,\n isDirectRoute,\n minimumDepositAmount,\n wrapAndUnwrapSol,\n ] = useJupiterSolanaQuote(inputValue, inputToken, bondData, accountSolana?.toBase58(), true, slippage)\n\n const { sortedZapList, isFetched: zapListFetched } = useSortedZapList(bondChain, bondData?.lpToken)\n const enrichedTokenData = sortedZapList.find((item) =>\n item.token === 'NATIVE' || inputToken === 'NATIVE'\n ? item.token === inputToken\n : item?.token?.address?.[bondChain as ChainId]?.toLowerCase() ===\n inputToken?.address?.[bondChain as ChainId]?.toLowerCase(),\n )\n const inputCurrencyBalance = enrichedTokenData?.balance\n const inputTokenPrice = enrichedTokenData?.price\n\n // Estimations - use zapDepositAmount if swapping\n const depositAmount = isZap ? zapDepositAmount : inputValue\n const youSpendString = `${formatNumberSI(inputValue)} ${getSymbol(inputToken, bondData?.chainId)} = \n $${formatUSDNumber((parseFloat(inputValue) * (inputTokenPrice ?? 0)).toString())}`\n\n const exceedsRealMaxBuy = getMaxBuy(bondData, true) <= getPayoutAmount(bondData, depositAmount, '0')\n const exceedsSafeMaxBuy =\n getMaxBuy(bondData, false) * (isZap ? 0.995 : 0.9995) <= getPayoutAmount(bondData, depositAmount, '0')\n const exceedsBalance = Number(inputCurrencyBalance ?? '0') < Number(inputValue)\n\n // Loading State - include zap loading\n const [loadingTx, setLoadingTx] = useState(false)\n const load = loadingTx || (fetchingZapQuote && !!inputValue)\n\n // State Handlers\n const handleCurrencySelect = useCallback((newInputToken: string) => {\n setInputValue('')\n setInputTokenString(newInputToken)\n }, [])\n\n const handleMaxButton = () => {\n const balance = Number(inputCurrencyBalance ?? '0')\n const principalDecimals = bondData?.lpToken?.decimals?.[bondData?.chainId] ?? 18\n const maxBuyAmount = getMaxBuy(bondData, SDKConfig.showLowValueBonds)\n\n if (!isZap) {\n const maxPossibleUserPurchase = getPayoutAmount(bondData, balance.toString(), '0')\n if (maxPossibleUserPurchase > maxBuyAmount) {\n console.log('user balance exceeds max buy limit, setting to max buy')\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), '0')\n setInputValue(toFixedString(principalForMaxBuy, principalDecimals))\n } else {\n console.log('balance is ok, can be used')\n setInputValue(toFixedString(balance, principalDecimals))\n }\n } else {\n const principalForMaxBuy = getPrincipalAmount(bondData, maxBuyAmount.toString(), '0')\n const principalForMaxBuyUSD = principalForMaxBuy * Number(bondData?.principalTokenPrice ?? 0)\n const maxBuyAmountInSelectedToken = principalForMaxBuyUSD / (inputTokenPrice ?? 0)\n const decimals =\n enrichedTokenData?.token === 'NATIVE' ? 18 : (enrichedTokenData?.token.decimals[bondData?.chainId!] ?? 18)\n\n if (balance >= maxBuyAmountInSelectedToken) {\n setInputValue(toFixedString(maxBuyAmountInSelectedToken, decimals))\n } else {\n setInputValue(toFixedString(balance, decimals))\n }\n }\n }\n\n const handleBuyCallback = async () => {\n if (!accountSolana || !bondData || !inputValue || !inputToken || !bondData) return\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n try {\n setLoadingTx(true)\n\n const connection = new Connection(getRPC(ChainId.SOL), 'confirmed')\n\n // Convert input value\n const amountBigInt = parseUnits(inputValue, bondData.lpToken.decimals[ChainId.SOL]!)\n\n const user = accountSolana\n\n const trueBondPriceWithoutFee = bondData?.trueBondPrices?.[0]?.trueBondPrice\n\n const maxPrice = slippageMaxPriceSolana(BigInt(trueBondPriceWithoutFee ?? '0'), slippage).toString()\n\n // Static addresses\n const bondIssuancePda = new PublicKey(bondData.contractAddress[bondData.chainId]!)\n const principalMint = new PublicKey(bondData.lpToken.address[bondData.chainId]!)\n const payoutMint = new PublicKey(bondData.earnToken.address[bondData.chainId]!)\n const collection = new PublicKey(bondData.billNnftAddress[bondData.chainId]!)\n\n // Detect token programs for both mints (supports Token-2022)\n const [principalTokenProgram, payoutTokenProgram] = await Promise.all([\n getTokenProgramForMint(connection, principalMint),\n getTokenProgramForMint(connection, payoutMint),\n ])\n\n // Fetch Bond Issuance Account\n const bondIssuanceAccounts = (await getBondIssuanceAccountSolana([\n bondIssuancePda.toBase58(),\n ])) as BondIssuanceAccount[]\n if (!bondIssuanceAccounts) return\n const bondIssuanceAccount = bondIssuanceAccounts[0]\n const feeRecipient = new PublicKey(bondIssuanceAccount.feePrincipalRecipient)\n const partnerRecipient = new PublicKey(bondIssuanceAccount.partnerPrincipalRecipient)\n const feePayoutRecipient = new PublicKey(bondIssuanceAccount.feePayoutRecipient) // ADDED\n\n // Derive PDAs\n const bondTermPda = derivePda('bond_term', bondIssuancePda, PROGRAM_ID)\n const bondPricingPda = derivePda('bond_pricing', bondIssuancePda, PROGRAM_ID)\n\n // Create NFT mint\n const nftMint = Keypair.generate()\n\n const [bondPda] = PublicKey.findProgramAddressSync(\n [Buffer.from('bond'), bondIssuancePda.toBuffer(), nftMint.publicKey.toBuffer()],\n PROGRAM_ID,\n )\n\n // ATAs - use correct token program for each mint\n const userPrincipalAta = await getAssociatedTokenAddress(principalMint, user, true, principalTokenProgram)\n const treasuryAta = await getAssociatedTokenAddress(payoutMint, bondIssuancePda, true, payoutTokenProgram)\n const feePrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n feeRecipient,\n true,\n principalTokenProgram,\n )\n const partnerPrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n partnerRecipient,\n true,\n principalTokenProgram,\n )\n\n const { address: feePayoutRecipientAta, createInstruction: createPayoutFeeRecipientAtaIx } =\n await getAtaWithCreateInstruction(connection, payoutMint, feePayoutRecipient, user)\n\n // Encode args\n const u64Codec = getU64Codec()\n const amountEncoded = Buffer.from(u64Codec.encode(amountBigInt))\n const maxPriceEncoded = Buffer.from(u64Codec.encode(BigInt(maxPrice)))\n const instructionData = Buffer.concat([DEPOSIT_DISCRIMINATOR, amountEncoded, maxPriceEncoded])\n\n // Instruction\n const keys = [\n { pubkey: bondPda, isSigner: false, isWritable: true },\n { pubkey: nftMint.publicKey, isSigner: true, isWritable: true },\n { pubkey: user, isSigner: true, isWritable: true },\n { pubkey: bondPricingPda, isSigner: false, isWritable: true },\n { pubkey: bondTermPda, isSigner: false, isWritable: true },\n { pubkey: bondIssuancePda, isSigner: false, isWritable: true },\n { pubkey: collection, isSigner: false, isWritable: true },\n { pubkey: userPrincipalAta, isSigner: false, isWritable: true },\n { pubkey: feePrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: partnerPrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: feePayoutRecipientAta, isSigner: false, isWritable: true },\n { pubkey: treasuryAta, isSigner: false, isWritable: true },\n { pubkey: principalMint, isSigner: false, isWritable: false },\n { pubkey: payoutMint, isSigner: false, isWritable: false },\n { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: principalTokenProgram, isSigner: false, isWritable: false }, // principal_token_program (dynamic)\n { pubkey: payoutTokenProgram, isSigner: false, isWritable: false }, // payout_token_program (dynamic)\n { pubkey: ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: MPL_CORE_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: SYSVAR_INSTRUCTIONS_PUBKEY, isSigner: false, isWritable: false },\n ]\n\n const instruction = new TransactionInstruction({\n keys,\n programId: PROGRAM_ID,\n data: instructionData,\n })\n\n // Create tx (prepend payout fee recipient ATA creation if needed)\n const transaction = new Transaction()\n if (createPayoutFeeRecipientAtaIx) transaction.add(createPayoutFeeRecipientAtaIx)\n transaction.add(instruction)\n transaction.feePayer = user\n\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n transaction.recentBlockhash = blockhash\n // Sign tx\n transaction.partialSign(nftMint)\n const signedTx = await signTransaction?.(transaction)!\n\n // Sends tx, generates hash\n const txId = await connection.sendRawTransaction(signedTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n // awaits hash confirmation on chain - commitment \"confirmed\"\n await connection.confirmTransaction(\n {\n signature: txId,\n blockhash,\n lastValidBlockHeight,\n },\n 'confirmed',\n )\n\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: 'lp-buy',\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, txId)\n\n // waits 3 seconds before triggering after-purchase flow\n await new Promise((resolve) => setTimeout(resolve, 3000))\n\n addToastSuccess(txId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n } catch (error: any) {\n console.error('Error during bond purchase:', error)\n addToastError(error?.message || 'Unknown error')\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: error.message,\n extraInfo: { type: 'solanaBuyBond', error: error.message },\n chainId: bondChain,\n account: accountSolana.toString(),\n })\n } finally {\n setLoadingTx(false)\n }\n }\n\n // Helper: Build Jupiter swap instructions from API response\n const buildSwapInstructions = (swapResult: any) => {\n const swapInstruction = new TransactionInstruction({\n programId: new PublicKey(swapResult.swapInstruction.programId),\n keys: swapResult.swapInstruction.accounts.map((key: any) => ({\n pubkey: new PublicKey(key.pubkey),\n isSigner: key.isSigner,\n isWritable: key.isWritable,\n })),\n data: Buffer.from(swapResult.swapInstruction.data, 'base64'),\n })\n\n const setupInstructions = (swapResult.setupInstructions || []).map(\n (ix: any) =>\n new TransactionInstruction({\n programId: new PublicKey(ix.programId),\n keys: ix.accounts.map((key: any) => ({\n pubkey: new PublicKey(key.pubkey),\n isSigner: key.isSigner,\n isWritable: key.isWritable,\n })),\n data: Buffer.from(ix.data, 'base64'),\n }),\n )\n\n return { setupInstructions, swapInstruction }\n }\n\n // Helper: Build bond instruction with specified amount\n const buildBondInstruction = (amount: bigint, maxPriceEncoded: Buffer, bondKeys: any[]) => {\n const u64Codec = getU64Codec()\n const amountEncoded = Buffer.from(u64Codec.encode(amount))\n const instructionData = Buffer.concat([DEPOSIT_DISCRIMINATOR, amountEncoded, maxPriceEncoded])\n\n return new TransactionInstruction({\n keys: bondKeys,\n programId: PROGRAM_ID,\n data: instructionData,\n })\n }\n\n // Helper: Ensure user's principal token account exists\n const ensureUserPrincipalAtaExists = async (\n connection: Connection,\n payer: PublicKey,\n principalMint: PublicKey,\n user: PublicKey,\n tokenProgram: PublicKey,\n ): Promise<{ ataAddress: PublicKey; createInstruction: TransactionInstruction | null }> => {\n const userPrincipalAta = await getAssociatedTokenAddress(principalMint, user, true, tokenProgram)\n\n try {\n // Check if account exists\n await getAccount(connection, userPrincipalAta, undefined, tokenProgram)\n return { ataAddress: userPrincipalAta, createInstruction: null }\n } catch {\n // Account doesn't exist, return instruction to create it\n const createAtaIx = createAssociatedTokenAccountInstruction(\n payer, // fee payer\n userPrincipalAta, // ATA to create\n user, // owner of ATA\n principalMint, // mint\n tokenProgram, // token program\n )\n return { ataAddress: userPrincipalAta, createInstruction: createAtaIx }\n }\n }\n\n // Helper: Track zap events\n const trackZapEvents = (txType: 'single-tx' | 'two-tx') => {\n track({\n event: 'zap',\n chain: bondChain,\n data: {\n cat: 'bond',\n token1: getSymbol(inputToken),\n token2: bondData?.lpToken.symbol ?? '',\n amount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n track({\n event: 'bond',\n chain: bondChain,\n data: {\n cat: `zap-buy-${txType}`,\n type: bondData?.billType ?? '',\n typedValue: inputValue,\n principalToken: bondData?.lpToken.symbol ?? '',\n earnToken: bondData?.earnToken.symbol ?? '',\n address: remove0xPrefix(bondData?.contractAddress?.[bondData.chainId]),\n usdAmount: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n }\n\n const handleZapCallback = async () => {\n if (loadingTx || !accountSolana || !bondData || !jupiterQuote || !signTransaction) return\n\n track({\n event: 'buyBondClick',\n chain: bondChain,\n data: {\n cat: bondData?.billType,\n bond: bondData?.earnToken.symbol,\n value: parseFloat(inputValue) * (inputTokenPrice ?? 0),\n },\n })\n\n try {\n setLoadingTx(true)\n const connection = new Connection(getRPC(ChainId.SOL), 'confirmed')\n const jupiterApi = createJupiterApiClient()\n\n // STEP 1: Calculate bond parameters and prepare accounts\n const trueBondPriceWithoutFee = bondData?.trueBondPrices?.[0]?.trueBondPrice\n const maxPrice = slippageMaxPriceSolana(BigInt(trueBondPriceWithoutFee ?? '0'), slippage).toString()\n console.log(isDirectRoute ? 'Using direct route' : 'Using multi-hop route')\n const depositAmountForBond = isDirectRoute ? minimumDepositAmount : zapDepositAmount\n\n const amountBigInt = parseUnits(depositAmountForBond, bondData.lpToken.decimals[ChainId.SOL]!)\n\n const bondIssuancePda = new PublicKey(bondData.contractAddress[bondData.chainId]!)\n const principalMint = new PublicKey(bondData.lpToken.address[bondData.chainId]!)\n const payoutMint = new PublicKey(bondData.earnToken.address[bondData.chainId]!)\n const collection = new PublicKey(bondData.billNnftAddress[bondData.chainId]!)\n\n // Detect token programs for both mints (supports Token-2022)\n const [principalTokenProgram, payoutTokenProgram] = await Promise.all([\n getTokenProgramForMint(connection, principalMint),\n getTokenProgramForMint(connection, payoutMint),\n ])\n\n const bondIssuanceAccounts = (await getBondIssuanceAccountSolana([\n bondIssuancePda.toBase58(),\n ])) as BondIssuanceAccount[]\n if (!bondIssuanceAccounts) throw new Error('Failed to fetch bond issuance account')\n\n const bondIssuanceAccount = bondIssuanceAccounts[0]\n const feeRecipient = new PublicKey(bondIssuanceAccount.feePrincipalRecipient)\n const partnerRecipient = new PublicKey(bondIssuanceAccount.partnerPrincipalRecipient)\n const feePayoutRecipient = new PublicKey(bondIssuanceAccount.feePayoutRecipient)\n\n const bondTermPda = derivePda('bond_term', bondIssuancePda, PROGRAM_ID)\n const bondPricingPda = derivePda('bond_pricing', bondIssuancePda, PROGRAM_ID)\n\n const nftMint = Keypair.generate()\n const [bondPda] = PublicKey.findProgramAddressSync(\n [Buffer.from('bond'), bondIssuancePda.toBuffer(), nftMint.publicKey.toBuffer()],\n PROGRAM_ID,\n )\n\n // Ensure user's USDC account exists, get creation instruction if needed\n const { ataAddress: userPrincipalAta, createInstruction: createPrincipalAtaIx } =\n await ensureUserPrincipalAtaExists(\n connection,\n accountSolana,\n principalMint,\n accountSolana,\n principalTokenProgram,\n )\n const treasuryAta = await getAssociatedTokenAddress(payoutMint, bondIssuancePda, true, payoutTokenProgram)\n const feePrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n feeRecipient,\n true,\n principalTokenProgram,\n )\n const partnerPrincipalRecipientAta = await getAssociatedTokenAddress(\n principalMint,\n partnerRecipient,\n true,\n principalTokenProgram,\n )\n const { address: feePayoutRecipientAta, createInstruction: createPayoutFeeRecipientAtaIx } =\n await getAtaWithCreateInstruction(connection, payoutMint, feePayoutRecipient, accountSolana)\n\n const u64Codec = getU64Codec()\n const maxPriceEncoded = Buffer.from(u64Codec.encode(BigInt(maxPrice)))\n\n const bondKeys = [\n { pubkey: bondPda, isSigner: false, isWritable: true },\n { pubkey: nftMint.publicKey, isSigner: true, isWritable: true },\n { pubkey: accountSolana, isSigner: true, isWritable: true },\n { pubkey: bondPricingPda, isSigner: false, isWritable: true },\n { pubkey: bondTermPda, isSigner: false, isWritable: true },\n { pubkey: bondIssuancePda, isSigner: false, isWritable: true },\n { pubkey: collection, isSigner: false, isWritable: true },\n { pubkey: userPrincipalAta, isSigner: false, isWritable: true },\n { pubkey: feePrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: partnerPrincipalRecipientAta, isSigner: false, isWritable: true },\n { pubkey: feePayoutRecipientAta, isSigner: false, isWritable: true },\n { pubkey: treasuryAta, isSigner: false, isWritable: true },\n { pubkey: principalMint, isSigner: false, isWritable: false },\n { pubkey: payoutMint, isSigner: false, isWritable: false },\n { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: principalTokenProgram, isSigner: false, isWritable: false }, // principal_token_program (dynamic)\n { pubkey: payoutTokenProgram, isSigner: false, isWritable: false }, // payout_token_program (dynamic)\n { pubkey: ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: MPL_CORE_PROGRAM_ID, isSigner: false, isWritable: false },\n { pubkey: SYSVAR_INSTRUCTIONS_PUBKEY, isSigner: false, isWritable: false },\n ]\n\n // Build initial bond instruction (for single-tx attempt)\n const bondInstruction = buildBondInstruction(amountBigInt, maxPriceEncoded, bondKeys)\n\n // STEP 2: Get Jupiter swap instructions\n const swapResult = await jupiterApi.swapInstructionsPost({\n swapRequest: {\n quoteResponse: jupiterQuote,\n userPublicKey: accountSolana.toBase58(),\n wrapAndUnwrapSol: wrapAndUnwrapSol,\n dynamicComputeUnitLimit: true,\n prioritizationFeeLamports: {\n priorityLevelWithMaxLamports: {\n maxLamports: 4000000,\n priorityLevel: 'veryHigh',\n },\n },\n },\n })\n\n console.log('=== TRANSACTION SIZE ANALYSIS ===')\n console.log('Route used:', jupiterQuote.routePlan?.map((r) => r.swapInfo.label).join(' -> '))\n console.log('Swap accounts:', swapResult.swapInstruction.accounts.length)\n console.log('Setup instructions count:', swapResult.setupInstructions?.length || 0)\n\n let totalAccounts = swapResult.swapInstruction.accounts.length\n swapResult.setupInstructions?.forEach((ix, i) => {\n console.log(` Setup ${i}: ${ix.accounts.length} accounts`)\n totalAccounts += ix.accounts.length\n })\n\n console.log('Bond instruction accounts:', 20)\n console.log('Total accounts:', totalAccounts + 20)\n console.log('=== END ANALYSIS ===')\n\n // STEP 3: TRY SINGLE TRANSACTION (if direct route)\n if (isDirectRoute) {\n try {\n // Build swap instructions\n const { setupInstructions, swapInstruction } = buildSwapInstructions(swapResult)\n const setupIxs = [\n ...(createPrincipalAtaIx ? [createPrincipalAtaIx] : []),\n ...(createPayoutFeeRecipientAtaIx ? [createPayoutFeeRecipientAtaIx] : []),\n ...setupInstructions,\n ]\n const allInstructions = [...setupIxs, swapInstruction, bondInstruction]\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n\n const combinedTx = new Transaction()\n combinedTx.add(...allInstructions)\n combinedTx.recentBlockhash = blockhash\n combinedTx.feePayer = accountSolana\n combinedTx.partialSign(nftMint)\n\n // Check size - account for signatures\n const messageSize = combinedTx.serializeMessage().length\n const numSignatures = combinedTx.signatures.length // Should be 2: nftMint + accountSolana\n const signatureOverhead = 1 + numSignatures * 64 // 1 byte for count + 64 bytes per signature\n const estimatedTxSize = messageSize + signatureOverhead\n\n console.log(`Combined transaction size: ${estimatedTxSize} bytes (limit: 1232 bytes)`)\n\n if (estimatedTxSize > 1232) {\n console.log('Transaction too large, falling back to two transactions')\n throw new Error('TRANSACTION_TOO_LARGE')\n }\n\n // Execute single transaction!\n console.log('Transaction fits. Executing combined swap + bond')\n const signedTx = await signTransaction(combinedTx)\n const txId = await connection.sendRawTransaction(signedTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction({ signature: txId, blockhash, lastValidBlockHeight }, 'confirmed')\n\n console.log('SINGLE transaction confirmed:', txId)\n\n // Track success\n trackZapEvents('single-tx')\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, txId)\n\n await new Promise((resolve) => setTimeout(resolve, 3000))\n addToastSuccess(txId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n return\n } catch (singleTxError: any) {\n if (singleTxError.message !== 'TRANSACTION_TOO_LARGE') {\n throw singleTxError\n }\n console.log('Falling back to two separate transactions...')\n }\n }\n\n // STEP 4: FALLBACK - TWO SEPARATE TRANSACTIONS\n console.log('Executing TWO separate transactions...')\n\n // Execute swap first\n const { setupInstructions, swapInstruction } = buildSwapInstructions(swapResult)\n const swapSetupIxs = [...(createPrincipalAtaIx ? [createPrincipalAtaIx] : []), ...setupInstructions]\n const swapTx = new Transaction().add(...swapSetupIxs, swapInstruction)\n swapTx.feePayer = accountSolana\n const { blockhash: swapBlockhash, lastValidBlockHeight: swapLastValid } =\n await connection.getLatestBlockhash('confirmed')\n swapTx.recentBlockhash = swapBlockhash\n\n const signedSwapTx = await signTransaction(swapTx)\n const swapTxId = await connection.sendRawTransaction(signedSwapTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction(\n { signature: swapTxId, blockhash: swapBlockhash, lastValidBlockHeight: swapLastValid },\n 'confirmed',\n )\n console.log('Swap transaction confirmed:', swapTxId)\n\n // QUERY ACTUAL BALANCE RECEIVED FROM SWAP\n const principalTokenBalance = await connection.getTokenAccountBalance(userPrincipalAta)\n const actualAmount = BigInt(principalTokenBalance.value.amount)\n\n // REBUILD BOND INSTRUCTION WITH ACTUAL AMOUNT\n const actualBondInstruction = buildBondInstruction(actualAmount, maxPriceEncoded, bondKeys)\n\n const bondTx = new Transaction()\n if (createPayoutFeeRecipientAtaIx) bondTx.add(createPayoutFeeRecipientAtaIx)\n bondTx.add(actualBondInstruction)\n bondTx.feePayer = accountSolana\n const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed')\n bondTx.recentBlockhash = blockhash\n bondTx.partialSign(nftMint)\n\n const signedBondTx = await signTransaction(bondTx)\n const bondTxId = await connection.sendRawTransaction(signedBondTx.serialize(), {\n skipPreflight: false,\n preflightCommitment: 'confirmed',\n })\n\n await connection.confirmTransaction({ signature: bondTxId, blockhash, lastValidBlockHeight }, 'confirmed')\n console.log('Bond transaction confirmed:', bondTxId)\n\n // Track both transactions\n trackZapEvents('two-tx')\n await sendReferenceId(bondData.contractAddress[bondData.chainId]!, ChainId.SOL, bondTxId)\n\n await new Promise((resolve) => setTimeout(resolve, 3000))\n addToastSuccess(bondTxId, bondChain)\n setBillId?.(nftMint.publicKey.toString())\n } catch (error: any) {\n console.error('Error during zap + bond purchase:', error)\n addToastError(error?.message || 'Unknown error during swap and bond')\n\n reportError({\n apiUrl: SDKConfig?.urls?.apiV2,\n error: error.message,\n extraInfo: {\n type: 'solanaJupiterZapBuyBond',\n error: error.message,\n isDirectRoute,\n quote: jupiterQuote,\n },\n chainId: bondChain,\n account: accountSolana.toString(),\n })\n } finally {\n setLoadingTx(false)\n }\n }\n\n const handleBothPurchases = () => {\n if (loadingTx) return // Prevent duplicate calls\n setLoadingTx(true)\n if (isZap) {\n handleZapCallback().finally(() => setLoadingTx(false))\n } else {\n handleBuyCallback().finally(() => setLoadingTx(false))\n }\n }\n\n const handleOpenModal = () => {\n const bonus = trueBondPriceData?.bonusWithFee ?? 0\n if (bonus <= 0) {\n openNoBonusModal()\n } else {\n handleBothPurchases()\n }\n }\n\n // Modals\n // Optional bridge (LiFi adapter); without it the \"bridge to sol\" button is hidden.\n const bridge = getBridgeAdapter()\n const canBridge = !!bridge && bridge.supportsChain(ChainId.SOL)\n const [onOpenBridgeModal] = useModal(\n canBridge ? (\n <bridge.BridgeModal bondChain={ChainId.SOL} principalToken={bondData?.lpToken?.address?.[bondData?.chainId]} />\n ) : null,\n true,\n false,\n 'BridgeModal',\n )\n\n const [openNoBonusModal] = useModal(\n <NoBonusModal onAcknowledge={handleBothPurchases} showcaseTokenName={bondData?.showcaseTokenName} />,\n true,\n true,\n 'NoBonusModal',\n )\n // Effects\n const [hasChecked, setHasChecked] = useState(false)\n useEffect(() => {\n if (zapListFetched && !hasChecked) {\n if (parseFloat(inputCurrencyBalance ?? '0') < 0.0001) {\n setInputTokenString(\n sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain as ChainId],\n )\n }\n setHasChecked(true)\n }\n /* eslint-disable react-hooks/exhaustive-deps */\n }, [inputCurrencyBalance, zapListFetched])\n\n return bondData ? (\n <Flex\n className=\"modal-content ape:flex ape:flex-col ape:rounded-[10px] ape:bg-white2 ape:w-full ape:p-3.75 ape:md:p-5\"\n style={{ ...MCBuyComponentStyles[bondData?.marketingCampaign as MarketingCampaign] }}\n >\n <Flex className=\"modaltable-container ape:w-full ape:flex ape:flex-col ape:relative ape:gap-2.5\">\n <BondModalHeader bondData={bondData} onDismiss={onDismiss} hidePromotionUi />\n <ProjectDescription description={bondData.shortDescription} isProjectView />\n <Flex className={clsx('ape:w-full', isProjectView ? 'ape:hidden ape:lg:flex' : 'ape:flex')}>\n <BondCards bondData={bondData} isDoingMaxBuy={exceedsSafeMaxBuy && !exceedsRealMaxBuy} />\n </Flex>\n <Estimations\n depositAmount={depositAmount}\n bondData={bondData}\n youSpendString={youSpendString}\n isZap={isZap}\n fetchingZapQuote={fetchingZapQuote}\n zapError={zapError}\n hidePromotionUi\n />\n <TokenSelectorPanel\n typedValue={inputValue}\n setTypedValue={setInputValue}\n selectedToken={inputToken}\n handleValueBtn={handleMaxButton}\n handleCurrencySelect={handleCurrencySelect}\n bondChainId={bondData?.chainId}\n enableZap={true}\n bondPrincipalToken={bondData?.lpToken}\n tokenBalance={inputCurrencyBalance ?? undefined}\n selectedTokenPrice={inputTokenPrice}\n isConnected={!!accountSolana}\n />\n {bondData?.warningCard && (\n <Flex\n className=\"ape:w-full ape:justify-center ape:mt-[10px] ape:rounded-normal ape:p-[2px_10px]\"\n style={{ background: '#DE62F366' }}\n >\n <Text as=\"div\" size=\"12px\" className=\"ape:font-normal ape:flex ape:items-center ape:gap-[10px]\">\n <SafeHTMLComponent html={bondData?.warningCard} />\n {bondData?.chainId === ChainId.SONIC && bondData?.earnToken.symbol.toLowerCase() === 'moon' && (\n <TooltipBubble\n className=\"tooltip-bubble\"\n body={\n <Text className=\"ape:normal-case\">\n Open the &#39;cog&#39; icon menu in the top right and set the Slippage Tolerance to 5% or more.\n </Text>\n }\n width=\"315px\"\n placement=\"topRight\"\n transformTip=\"translate(9%, -10%)\"\n >\n <QuestionCircle width={14} color=\"textDisabledButton\" />\n </TooltipBubble>\n )}\n </Text>\n </Flex>\n )}\n <Flex className=\"modaltable-container button-container ape:w-full ape:flex ape:relative ape:flex-row ape:justify-between\">\n <Flex className=\"button-container buy ape:justify-center ape:items-center ape:cursor-pointer ape:w-full\">\n {!accountSolana ? (\n <ConnectSolanaWalletButton />\n ) : (\n <Flex className=\"ape:w-full ape:gap-[10px] ape:flex-col ape:lg:flex-row\">\n {canBridge && (\n <Button\n variant=\"secondary\"\n onClick={() => onOpenBridgeModal()}\n onMouseEnter={bridge.preload}\n onFocus={bridge.preload}\n className=\"ape:w-full ape:lg:w-[35%] ape:text-[14px]! ape:lg:text-[16px]!\"\n >\n bridge to sol\n </Button>\n )}\n <Button\n className={clsx(\n 'action-button ape:w-full ape:text-[14px]! ape:lg:text-[16px]!',\n canBridge && 'ape:lg:w-[65%]',\n )}\n load={load}\n disabled={\n load ||\n bondData?.soldOut ||\n !accountSolana ||\n !inputValue ||\n parseFloat(inputValue) === 0 ||\n fetchingZapQuote ||\n zapError ||\n exceedsRealMaxBuy ||\n exceedsBalance ||\n (isZap && !jupiterQuote) ||\n SDKConfig.blockSales\n }\n onClick={handleOpenModal}\n >\n {SDKConfig.blockSales\n ? 'Complete KYC to Buy'\n : exceedsRealMaxBuy\n ? 'Exceeds Max Buy. Reduce amount'\n : exceedsBalance\n ? 'Insufficient balance'\n : zapError\n ? 'Swap quote failed'\n : !inputValue || parseFloat(inputValue) === 0\n ? 'Insert amount'\n : 'buy'}\n </Button>\n </Flex>\n )}\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n ) : (\n <></>\n )\n}\n\nexport default BuyComponentSolana\n"],"names":["_jsx","_jsxs","ConnectSolanaWalletButton","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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c;AACd,yCAAC,KAAK,IAAI,CAAC,YAAY,CAAC;wCACxB,SAAS,CAAC,UAAU,EAEtB,OAAO,EAAE,eAAe,EAAA,QAAA,EAEvB,SAAS,CAAC;AACT,0CAAE;AACF,0CAAE;AACA,8CAAE;AACF,8CAAE;AACA,kDAAE;AACF,kDAAE;AACA,sDAAE;sDACA,CAAC,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,KAAK;AAC1C,0DAAE;AACF,0DAAE,KAAK,EAAA,CACV,CAAA,EAAA,CACJ,CACR,GACI,EAAA,CACF,CAAA,EAAA,CACF,EAAA,CACF,KAEPA,GAAA,CAAAG,QAAA,EAAA,EAAA,CAAK,CACN;AACH;;;;"}
@@ -106,5 +106,7 @@ export interface BridgeAdapter {
106
106
  /** Chains the bridge can deliver funds to; the bridge option is hidden for other bond chains. */
107
107
  supportsChain(chainId: ChainId): boolean;
108
108
  BridgeModal: React.FC<BridgeModalProps>;
109
+ /** Starts downloading the bridge UI ahead of time (e.g. on hover of the bridge button). Safe to call repeatedly. */
110
+ preload?: () => void;
109
111
  }
110
112
  export type SDKAdapter = ChainAdapter | BridgeAdapter;
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--ape-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ape-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--ape-color-gray-300:oklch(87.2% .01 258.338);--ape-color-white:#fff;--ape-spacing:.25rem;--ape-text-sm:.875rem;--ape-text-sm--line-height:calc(1.25 / .875);--ape-text-base:1rem;--ape-text-base--line-height:calc(1.5 / 1);--ape-font-weight-light:300;--ape-font-weight-normal:400;--ape-font-weight-medium:500;--ape-font-weight-semibold:600;--ape-font-weight-bold:700;--ape-ease-out:cubic-bezier(0, 0, .2, 1);--ape-ease-in-out:cubic-bezier(.4, 0, .2, 1);--ape-default-transition-duration:.15s;--ape-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--ape-default-font-family:var(--ape-font-sans);--ape-default-mono-font-family:var(--ape-font-mono);--ape-color-white1:#0e0d16;--ape-color-white2:#161420;--ape-color-white3:#1f1d29;--ape-color-white4:#282632;--ape-color-white5:#312f3a;--ape-color-primary-button:#6560c5;--ape-color-primary-button-disable:#48475b;--ape-color-primary-button-hovered:#8480d1;--ape-color-success:#38a611;--ape-color-error:#df4141;--ape-color-text:#fafafa;--ape-color-text-disabled:#424242;--ape-color-text-disabled-button:#73728e;--ape-color-primary-bright:#fafafa;--ape-color-modal-overlay:#42424280;--ape-gradient-abond:linear-gradient(98.79deg, #6560c5 -2.37%, #e07753 100%);--ape-font-body:"Poppins", sans-serif;--ape-radius-small:6px;--ape-radius-default:16px;--ape-radius-normal:10px;--ape-radius-card:32px;--ape-z-index-dropdown:10;--ape-z-index-modal:102}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--ape-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--ape-default-font-feature-settings,normal);font-variation-settings:var(--ape-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ape-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--ape-default-mono-font-feature-settings,normal);font-variation-settings:var(--ape-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.ape-root{width:100%;min-width:0;font-family:var(--ape-font-body);-webkit-font-smoothing:antialiased;color:var(--ape-color-text);background-color:var(--ape-color-white1);scroll-behavior:smooth;font-weight:600}.ape-root a{color:var(--ape-color-text);text-decoration:none}.ape-root a:hover{color:var(--ape-color-primary-button);text-decoration:underline}.ape-root hr{background-color:var(--ape-color-white3);border:none;height:1px}.ape-root ::-webkit-scrollbar{width:6px}.ape-root ::-webkit-scrollbar-thumb{background:var(--ape-color-text);border-radius:8px}.ape-root ::-webkit-scrollbar-track{background:var(--ape-color-white2);border-radius:10px}}@layer components{@keyframes ape-ellipsis{0%{content:"."}33%{content:".."}66%{content:"..."}}.ape-ellipsis:after{content:".";text-align:left;width:1em;animation:1.25s infinite ape-ellipsis;display:inline-block}.ape-carousel-viewport{-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;-webkit-touch-callout:none}.ape-carousel-viewport::-webkit-scrollbar{display:none}.ape-you-tooltip:after{content:"";border-style:solid;border-width:6px;border-color:transparent var(--ape-color-primary-button) transparent transparent;position:absolute;top:50%;left:-11px;transform:translateY(-50%)}.ape-you-card{position:absolute;top:0;right:-45px}.ape-you-card:before{content:"";border:9px solid #0000;border-right-color:var(--ape-color-primary-button);width:0;height:0;display:block;position:absolute;top:50%;right:100%;transform:translateY(-50%)}@keyframes ape-spinner-rotation{0%{transform:rotate(40deg)}to{transform:rotate(400deg)}}.ape-spinner{box-sizing:border-box;border-radius:50%;display:inline-block}.ape-spinner-loading{animation:1s linear infinite ape-spinner-rotation;transform:rotate(40deg)}.ape-icon{fill:currentColor;transition:transform .3s linear}.ape-icon path{fill:currentColor}.ape-text-link{cursor:pointer;text-decoration:none;display:inline-block;position:relative}.ape-text-link:after{content:"";background:var(--ape-color-text);border-radius:var(--ape-radius-normal);transform-origin:100% 100%;backface-visibility:hidden;width:100%;height:1.5px;transition:transform .25s ease-out;position:absolute;bottom:0;left:0;transform:scaleX(0)}.ape-text-link:hover:after{transform-origin:0 100%;transform:scaleX(1)}.ape-tooltip-bubble{color:var(--ape-color-text);border-radius:var(--ape-radius-normal);background-color:var(--ape-tooltip-bg,var(--ape-color-white2));width:max-content;z-index:var(--ape-z-index-modal);padding:20px;font-size:12px;font-weight:600;line-height:18px;position:relative;top:15px;box-shadow:0 0 25px #c8c8c84d}.ape-tooltip-bottom-right:before,.ape-tooltip-bottom-left:before,.ape-tooltip-top-right:before,.ape-tooltip-top-left:before,.ape-tooltip-left:before{content:"";border:12px solid #0000;width:0;display:block;position:absolute}.ape-tooltip-bottom-right:before{border-top:0;border-bottom-style:solid;border-bottom-width:15px;border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));top:0;right:3%;transform:translate(-50%,-100%)}.ape-tooltip-bottom-left:before{border-top:0;border-bottom-style:solid;border-bottom-width:15px;border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));top:0;left:calc(3% + 15px);transform:translate(-50%,-100%)}.ape-tooltip-top-right:before{border-top-style:solid;border-top-width:15px;border-bottom:0;border-top-color:var(--ape-tooltip-bg,var(--ape-color-white2));bottom:0;right:3%;transform:translate(-50%,100%)}.ape-tooltip-top-left:before{border-top-style:solid;border-top-width:15px;border-bottom:0;border-top-color:var(--ape-tooltip-bg,var(--ape-color-white2));bottom:0;left:calc(3% + 15px);transform:translate(-50%,100%)}.ape-tooltip-only-container-right:before{content:"";border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));position:absolute;right:3%}.ape-tooltip-left:before{color:var(--ape-color-white2);border-right:15px solid;top:65%;left:-13px;transform:translate(-50%,-100%)}@keyframes ape-skeleton-waves{0%{left:-150px}to{left:100%}}@keyframes ape-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ape-skeleton-waves{background-color:var(--ape-color-white2);min-height:16px;display:block;position:relative;overflow:hidden;transform:translate(0)}.ape-skeleton-waves:before{content:"";background-image:linear-gradient(90deg,#0000,#f3f3f34d,#0000);width:250px;height:100%;animation:1.5s cubic-bezier(.4,0,.2,1) infinite ape-skeleton-waves;position:absolute;top:0;left:-150px}.ape-skeleton-pulse{background-color:var(--ape-color-white2);border-radius:2px;min-height:20px;animation:2s ease-out infinite ape-skeleton-pulse;display:block;transform:translate(0)}}@layer utilities{.ape\:pointer-events-none{pointer-events:none}.ape\:absolute{position:absolute}.ape\:fixed{position:fixed}.ape\:relative{position:relative}.ape\:inset-0{inset:0}.ape\:-top-\[15px\]{top:-15px}.ape\:top-0{top:0}.ape\:top-1\/2{top:50%}.ape\:top-\[-180px\]{top:-180px}.ape\:top-\[5px\]{top:5px}.ape\:top-\[12px\]{top:12px}.ape\:top-\[24px\]{top:24px}.ape\:top-\[25px\]{top:25px}.ape\:top-\[45px\]{top:45px}.ape\:top-\[50px\]{top:50px}.ape\:top-\[56\%\]{top:56%}.ape\:right-0{right:0}.ape\:right-3{right:calc(var(--ape-spacing) * 3)}.ape\:right-\[5px\]{right:5px}.ape\:right-\[6px\]{right:6px}.ape\:right-\[10px\]{right:10px}.ape\:right-\[50\%\]{right:50%}.ape\:bottom-0{bottom:0}.ape\:bottom-\[-43px\]{bottom:-43px}.ape\:bottom-\[3px\]{bottom:3px}.ape\:bottom-\[calc\(100\%-10px\)\]{bottom:calc(100% - 10px)}.ape\:bottom-\[unset\]{bottom:unset}.ape\:left-0{left:0}.ape\:left-1\/2{left:50%}.ape\:left-\[-20px\]{left:-20px}.ape\:left-\[-50px\]{left:-50px}.ape\:left-\[1px\]{left:1px}.ape\:left-\[25\%\]{left:25%}.ape\:left-\[40px\]{left:40px}.ape\:left-\[65\%\]{left:65%}.ape\:-z-\[1\]{z-index:calc(1 * -1)}.ape\:z-0{z-index:0}.ape\:z-10{z-index:10}.ape\:z-100{z-index:100}.ape\:z-\[1\]{z-index:1}.ape\:z-\[2\]{z-index:2}.ape\:z-\[5\]{z-index:5}.ape\:z-\[20\]{z-index:20}.ape\:z-\[100\]{z-index:100}.ape\:z-\[103\]{z-index:103}.ape\:z-\[121\]{z-index:121}.ape\:z-\[999\]{z-index:999}.ape\:z-\[1000\]{z-index:1000}.ape\:z-\[1001\]{z-index:1001}.ape\:z-\[5000\]{z-index:5000}.ape\:float-left{float:left}.ape\:m-0{margin:0}.ape\:m-\[0_5px_5px_0\]{margin:0 5px 5px 0}.ape\:m-\[10px_0px_15px_0px\]{margin:10px 0 15px}.ape\:m-auto{margin:auto}.ape\:mx-\[-5px\]{margin-inline:-5px}.ape\:mx-\[-8px\]{margin-inline:-8px}.ape\:mx-\[2\.5px\]{margin-inline:2.5px}.ape\:mx-\[2px\]{margin-inline:2px}.ape\:mx-\[3px\]{margin-inline:3px}.ape\:mx-\[5px\]{margin-inline:5px}.ape\:mx-\[8px\]{margin-inline:8px}.ape\:mx-\[10px\]{margin-inline:10px}.ape\:mx-\[20px\]{margin-inline:20px}.ape\:mx-\[25px\]{margin-inline:25px}.ape\:my-\[2px\]{margin-block:2px}.ape\:my-\[5px\]{margin-block:5px}.ape\:my-\[10px\]{margin-block:10px}.ape\:my-\[15px\]{margin-block:15px}.ape\:my-\[20px\]{margin-block:20px}.ape\:mt-0{margin-top:0}.ape\:mt-0\.75{margin-top:calc(var(--ape-spacing) * .75)}.ape\:mt-2{margin-top:calc(var(--ape-spacing) * 2)}.ape\:mt-2\.5{margin-top:calc(var(--ape-spacing) * 2.5)}.ape\:mt-4{margin-top:calc(var(--ape-spacing) * 4)}.ape\:mt-\[-5px\]{margin-top:-5px}.ape\:mt-\[-15px\]{margin-top:-15px}.ape\:mt-\[3px\]{margin-top:3px}.ape\:mt-\[5px\]{margin-top:5px}.ape\:mt-\[10px\]{margin-top:10px}.ape\:mt-\[15px\]{margin-top:15px}.ape\:mt-\[20px\]{margin-top:20px}.ape\:mt-\[25px\]{margin-top:25px}.ape\:mt-\[30px\]{margin-top:30px}.ape\:mt-\[35px\]{margin-top:35px}.ape\:mt-\[40px\]{margin-top:40px}.ape\:mt-px{margin-top:1px}.ape\:mr-0{margin-right:0}.ape\:mr-1\.25{margin-right:calc(var(--ape-spacing) * 1.25)}.ape\:mr-\[3px\]{margin-right:3px}.ape\:mr-\[4px\]{margin-right:4px}.ape\:mr-\[5px\]{margin-right:5px}.ape\:mr-\[6px\]{margin-right:6px}.ape\:mr-\[8px\]{margin-right:8px}.ape\:mr-\[10px\]{margin-right:10px}.ape\:mr-\[15px\]{margin-right:15px}.ape\:mr-\[20px\]{margin-right:20px}.ape\:mb-1\.25{margin-bottom:calc(var(--ape-spacing) * 1.25)}.ape\:mb-2\.5{margin-bottom:calc(var(--ape-spacing) * 2.5)}.ape\:mb-5{margin-bottom:calc(var(--ape-spacing) * 5)}.ape\:mb-\[1px\]{margin-bottom:1px}.ape\:mb-\[3px\]{margin-bottom:3px}.ape\:mb-\[5px\]{margin-bottom:5px}.ape\:mb-\[8px\]{margin-bottom:8px}.ape\:mb-\[10px\]{margin-bottom:10px}.ape\:mb-\[14px\]{margin-bottom:14px}.ape\:mb-\[15px\]{margin-bottom:15px}.ape\:mb-\[20px\]{margin-bottom:20px}.ape\:mb-\[30px\]{margin-bottom:30px}.ape\:mb-\[50px\]{margin-bottom:50px}.ape\:ml-0{margin-left:0}.ape\:ml-1{margin-left:var(--ape-spacing)}.ape\:ml-3\.5{margin-left:calc(var(--ape-spacing) * 3.5)}.ape\:ml-3\.75{margin-left:calc(var(--ape-spacing) * 3.75)}.ape\:ml-5{margin-left:calc(var(--ape-spacing) * 5)}.ape\:ml-\[3px\]{margin-left:3px}.ape\:ml-\[4px\]{margin-left:4px}.ape\:ml-\[5px\]{margin-left:5px}.ape\:ml-\[6px\]{margin-left:6px}.ape\:ml-\[7px\]{margin-left:7px}.ape\:ml-\[10px\]{margin-left:10px}.ape\:ml-\[15px\]{margin-left:15px}.ape\:ml-\[20px\]{margin-left:20px}.ape\:ml-\[30px\]{margin-left:30px}.ape\:line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ape\:block{display:block}.ape\:block\!{display:block!important}.ape\:flex{display:flex}.ape\:hidden{display:none}.ape\:hidden\!{display:none!important}.ape\:inline-flex{display:inline-flex}.ape\:aspect-\[1\/0\.56\]{aspect-ratio:1/.56}.ape\:size-full{width:100%;height:100%}.ape\:h-7\.5{height:calc(var(--ape-spacing) * 7.5)}.ape\:h-8{height:calc(var(--ape-spacing) * 8)}.ape\:h-10{height:calc(var(--ape-spacing) * 10)}.ape\:h-11\.25{height:calc(var(--ape-spacing) * 11.25)}.ape\:h-\[2px\]{height:2px}.ape\:h-\[3px\]{height:3px}.ape\:h-\[5px\]{height:5px}.ape\:h-\[14px\]{height:14px}.ape\:h-\[15px\]{height:15px}.ape\:h-\[18px\]{height:18px}.ape\:h-\[20px\]{height:20px}.ape\:h-\[21px\]{height:21px}.ape\:h-\[22px\]{height:22px}.ape\:h-\[24px\]{height:24px}.ape\:h-\[25px\]{height:25px}.ape\:h-\[26px\]{height:26px}.ape\:h-\[30px\]{height:30px}.ape\:h-\[30vh\]{height:30vh}.ape\:h-\[31px\]{height:31px}.ape\:h-\[32px\]{height:32px}.ape\:h-\[34px\]{height:34px}.ape\:h-\[35px\]{height:35px}.ape\:h-\[36px\]{height:36px}.ape\:h-\[36px\]\!{height:36px!important}.ape\:h-\[40px\]{height:40px}.ape\:h-\[45px\]{height:45px}.ape\:h-\[49px\]{height:49px}.ape\:h-\[60px\]{height:60px}.ape\:h-\[70px\]{height:70px}.ape\:h-\[75px\]{height:75px}.ape\:h-\[84px\]{height:84px}.ape\:h-\[91px\]{height:91px}.ape\:h-\[125px\]{height:125px}.ape\:h-\[300px\]{height:300px}.ape\:h-\[400px\]{height:400px}.ape\:h-\[725px\]{height:725px}.ape\:h-\[calc\(100\%\+20px\)\]{height:calc(100% + 20px)}.ape\:h-\[calc\(100\%-150px\)\]{height:calc(100% - 150px)}.ape\:h-\[unset\]{height:unset}.ape\:h-auto{height:auto}.ape\:h-fit{height:fit-content}.ape\:h-fit\!{height:fit-content!important}.ape\:h-full{height:100%}.ape\:h-px{height:1px}.ape\:h-screen{height:100vh}.ape\:max-h-\[32px\]{max-height:32px}.ape\:max-h-\[48px\]{max-height:48px}.ape\:max-h-\[95vh\]{max-height:95vh}.ape\:max-h-\[300px\]{max-height:300px}.ape\:max-h-none{max-height:none}.ape\:min-h-4{min-height:calc(var(--ape-spacing) * 4)}.ape\:min-h-23{min-height:calc(var(--ape-spacing) * 23)}.ape\:min-h-\[27px\]{min-height:27px}.ape\:min-h-\[30px\]{min-height:30px}.ape\:min-h-\[40px\]{min-height:40px}.ape\:min-h-\[47\.45px\]{min-height:47.45px}.ape\:min-h-\[90px\]{min-height:90px}.ape\:min-h-\[160px\]{min-height:160px}.ape\:min-h-\[225px\]{min-height:225px}.ape\:min-h-\[330px\]{min-height:330px}.ape\:w-1\/2{width:50%}.ape\:w-1\/5{width:20%}.ape\:w-7\!{width:calc(var(--ape-spacing) * 7)!important}.ape\:w-43\.75{width:calc(var(--ape-spacing) * 43.75)}.ape\:w-85{width:calc(var(--ape-spacing) * 85)}.ape\:w-95{width:calc(var(--ape-spacing) * 95)}.ape\:w-\[6px\]{width:6px}.ape\:w-\[8px\]{width:8px}.ape\:w-\[14px\]{width:14px}.ape\:w-\[15px\]{width:15px}.ape\:w-\[20px\]{width:20px}.ape\:w-\[25px\]{width:25px}.ape\:w-\[30px\]{width:30px}.ape\:w-\[32\%\]{width:32%}.ape\:w-\[34\%\]{width:34%}.ape\:w-\[35px\]{width:35px}.ape\:w-\[36\%\]{width:36%}.ape\:w-\[40px\]{width:40px}.ape\:w-\[45\%\]{width:45%}.ape\:w-\[49\%\]{width:49%}.ape\:w-\[50px\]{width:50px}.ape\:w-\[55px\]{width:55px}.ape\:w-\[60px\]{width:60px}.ape\:w-\[65\%\]{width:65%}.ape\:w-\[75\%\]{width:75%}.ape\:w-\[85px\]{width:85px}.ape\:w-\[98vw\]{width:98vw}.ape\:w-\[100px\]{width:100px}.ape\:w-\[110px\]{width:110px}.ape\:w-\[115px\]{width:115px}.ape\:w-\[120px\]{width:120px}.ape\:w-\[122px\]{width:122px}.ape\:w-\[125px\]{width:125px}.ape\:w-\[127px\]{width:127px}.ape\:w-\[130px\]{width:130px}.ape\:w-\[135px\]{width:135px}.ape\:w-\[144px\]{width:144px}.ape\:w-\[155px\]{width:155px}.ape\:w-\[160px\]{width:160px}.ape\:w-\[170px\]{width:170px}.ape\:w-\[175px\]{width:175px}.ape\:w-\[190px\]{width:190px}.ape\:w-\[210px\]{width:210px}.ape\:w-\[220px\]{width:220px}.ape\:w-\[235px\]{width:235px}.ape\:w-\[300px\]{width:300px}.ape\:w-\[380px\]{width:380px}.ape\:w-\[380px\]\!{width:380px!important}.ape\:w-\[400px\]{width:400px}.ape\:w-\[420px\]{width:420px}.ape\:w-\[450px\]{width:450px}.ape\:w-\[480px\]{width:480px}.ape\:w-\[500px\]{width:500px}.ape\:w-\[740px\]\!{width:740px!important}.ape\:w-\[calc\(33\.33\%-20px\)\]{width:calc(33.33% - 20px)}.ape\:w-\[calc\(50vw-25px\)\]{width:calc(50vw - 25px)}.ape\:w-\[calc\(100\%\+40px\)\]{width:calc(100% + 40px)}.ape\:w-\[calc\(100\%-2px\)\]{width:calc(100% - 2px)}.ape\:w-auto{width:auto}.ape\:w-fit{width:fit-content}.ape\:w-full{width:100%}.ape\:w-max{width:max-content}.ape\:w-screen{width:100vw}.ape\:max-w-75{max-width:calc(var(--ape-spacing) * 75)}.ape\:max-w-85{max-width:calc(var(--ape-spacing) * 85)}.ape\:max-w-\[95vw\]{max-width:95vw}.ape\:max-w-\[100px\]{max-width:100px}.ape\:max-w-\[300px\]{max-width:300px}.ape\:max-w-full{max-width:100%}.ape\:min-w-\[10px\]{min-width:10px}.ape\:min-w-\[14px\]{min-width:14px}.ape\:min-w-\[20px\]{min-width:20px}.ape\:min-w-\[25px\]{min-width:25px}.ape\:min-w-\[30px\]{min-width:30px}.ape\:min-w-\[33px\]{min-width:33px}.ape\:min-w-\[40px\]{min-width:40px}.ape\:min-w-\[48px\]{min-width:48px}.ape\:min-w-\[65px\]{min-width:65px}.ape\:min-w-\[100px\]{min-width:100px}.ape\:min-w-\[120px\]{min-width:120px}.ape\:min-w-\[148px\]{min-width:148px}.ape\:min-w-\[250px\]{min-width:250px}.ape\:min-w-\[700px\]{min-width:700px}.ape\:min-w-\[unset\]{min-width:unset}.ape\:min-w-full{min-width:100%}.ape\:\[flex\:0_0_100\%\]{flex:0 0 100%}.ape\:flex-1{flex:1}.ape\:shrink-0{flex-shrink:0}.ape\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:translate-x-1\/2{--tw-translate-x:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:translate-x-\[50\%\]{--tw-translate-x:50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:scale-\[0\.5\]{scale:.5}.ape\:rotate-\[-45deg\]{rotate:-45deg}.ape\:cursor-\[unset\]{cursor:unset}.ape\:cursor-pointer{cursor:pointer}.ape\:snap-center{scroll-snap-align:center}.ape\:list-none{list-style-type:none}.ape\:appearance-none{appearance:none}.ape\:flex-col{flex-direction:column}.ape\:flex-col-reverse{flex-direction:column-reverse}.ape\:flex-row{flex-direction:row}.ape\:flex-row-reverse{flex-direction:row-reverse}.ape\:flex-wrap{flex-wrap:wrap}.ape\:items-center{align-items:center}.ape\:items-end{align-items:flex-end}.ape\:items-start{align-items:flex-start}.ape\:items-stretch{align-items:stretch}.ape\:justify-around{justify-content:space-around}.ape\:justify-between{justify-content:space-between}.ape\:justify-center{justify-content:center}.ape\:justify-end{justify-content:flex-end}.ape\:justify-start{justify-content:flex-start}.ape\:gap-1{gap:var(--ape-spacing)}.ape\:gap-2\.5{gap:calc(var(--ape-spacing) * 2.5)}.ape\:gap-\[1px\]{gap:1px}.ape\:gap-\[3px\]{gap:3px}.ape\:gap-\[5px\]{gap:5px}.ape\:gap-\[7px\]{gap:7px}.ape\:gap-\[8px\]{gap:8px}.ape\:gap-\[10px\]{gap:10px}.ape\:gap-\[14px\]{gap:14px}.ape\:gap-\[15px\]{gap:15px}.ape\:gap-\[20px\]{gap:20px}.ape\:overflow-hidden{overflow:hidden}.ape\:overflow-x-auto{overflow-x:auto}.ape\:overflow-x-hidden{overflow-x:hidden}.ape\:overflow-x-visible{overflow-x:visible}.ape\:\[overflow-y\:unset\]\!{overflow-y:unset!important}.ape\:overflow-y-auto{overflow-y:auto}.ape\:overflow-y-hidden{overflow-y:hidden}.ape\:overflow-y-scroll{overflow-y:scroll}.ape\:rounded-\[0_0_10px_10px\],.ape\:rounded-\[0px_0px_10px_10px\]{border-radius:0 0 10px 10px}.ape\:rounded-\[0px_10px_10px_0px\]{border-radius:0 10px 10px 0}.ape\:rounded-\[4px\]{border-radius:4px}.ape\:rounded-\[5px\]{border-radius:5px}.ape\:rounded-\[6px\]{border-radius:6px}.ape\:rounded-\[6px_6px_0px_0px\]{border-radius:6px 6px 0 0}.ape\:rounded-\[8px\]{border-radius:8px}.ape\:rounded-\[10px\]{border-radius:10px}.ape\:rounded-\[10px_0px_10px_0px\]{border-radius:10px 0}.ape\:rounded-\[10px_10px_0_0\],.ape\:rounded-\[10px_10px_0px_0px\]{border-radius:10px 10px 0 0}.ape\:rounded-\[14px\]{border-radius:14px}.ape\:rounded-\[40px\]{border-radius:40px}.ape\:rounded-\[50\%\]{border-radius:50%}.ape\:rounded-\[50px\]{border-radius:50px}.ape\:rounded-full{border-radius:3.40282e38px}.ape\:rounded-none{border-radius:0}.ape\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:rounded-small{border-radius:var(--ape-radius-small)}.ape\:rounded-tl-\[10px\]{border-top-left-radius:10px}.ape\:rounded-br-\[8px\]{border-bottom-right-radius:8px}.ape\:border{border-style:var(--tw-border-style);border-width:1px}.ape\:border-0{border-style:var(--tw-border-style);border-width:0}.ape\:border-2{border-style:var(--tw-border-style);border-width:2px}.ape\:border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.ape\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ape\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ape\:border-none{--tw-border-style:none;border-style:none}.ape\:border-solid{--tw-border-style:solid;border-style:solid}.ape\:border-\[\#9960C5\]{border-color:#9960c5}.ape\:border-\[\#222222\]{border-color:#222}.ape\:border-\[grey\]{border-color:gray}.ape\:border-primary-button{border-color:var(--ape-color-primary-button)}.ape\:border-success{border-color:var(--ape-color-success)}.ape\:border-text{border-color:var(--ape-color-text)}.ape\:border-white2{border-color:var(--ape-color-white2)}.ape\:border-white3{border-color:var(--ape-color-white3)}.ape\:border-white4{border-color:var(--ape-color-white4)}.ape\:bg-\[\#38A6110D\]{background-color:#38a6110d}.ape\:bg-\[\#9960C5\]{background-color:#9960c5}.ape\:bg-\[\#DE62F366\]{background-color:#de62f366}.ape\:bg-\[grey\]{background-color:gray}.ape\:bg-modal-overlay{background-color:var(--ape-color-modal-overlay)}.ape\:bg-primary-button{background-color:var(--ape-color-primary-button)}.ape\:bg-text{background-color:var(--ape-color-text)}.ape\:bg-text-disabled{background-color:var(--ape-color-text-disabled)}.ape\:bg-transparent{background-color:#0000}.ape\:bg-transparent\!{background-color:#0000!important}.ape\:bg-white{background-color:var(--ape-color-white)}.ape\:bg-white1{background-color:var(--ape-color-white1)}.ape\:bg-white2{background-color:var(--ape-color-white2)}.ape\:bg-white2\!{background-color:var(--ape-color-white2)!important}.ape\:bg-white3{background-color:var(--ape-color-white3)}.ape\:bg-white4{background-color:var(--ape-color-white4)}.ape\:bg-\[image\:var\(--ape-gradient-abond\)\]{background-image:var(--ape-gradient-abond)}.ape\:bg-\[image\:var\(--banner-bg-mobile\)\]{background-image:var(--banner-bg-mobile)}.ape\:bg-\[linear-gradient\(180deg\,\#FFFFFF_50\%\,\#666666_100\%\)\]{background-image:linear-gradient(#fff 50%,#666 100%)}.ape\:bg-cover{background-size:cover}.ape\:bg-clip-text{-webkit-background-clip:text;background-clip:text}.ape\:bg-no-repeat{background-repeat:no-repeat}.ape\:object-contain{object-fit:contain}.ape\:object-cover{object-fit:cover}.ape\:p-0{padding:0}.ape\:p-0\!{padding:0!important}.ape\:p-2{padding:calc(var(--ape-spacing) * 2)}.ape\:p-2\.5{padding:calc(var(--ape-spacing) * 2.5)}.ape\:p-3{padding:calc(var(--ape-spacing) * 3)}.ape\:p-3\.75{padding:calc(var(--ape-spacing) * 3.75)}.ape\:p-4{padding:calc(var(--ape-spacing) * 4)}.ape\:p-5{padding:calc(var(--ape-spacing) * 5)}.ape\:p-\[0_1px\]{padding:0 1px}.ape\:p-\[0_20px_20px_20px\]{padding:0 20px 20px}.ape\:p-\[0px_8px\]\!{padding:0 8px!important}.ape\:p-\[2\.5px_5px\]{padding:2.5px 5px}.ape\:p-\[2px\]{padding:2px}.ape\:p-\[2px_5px\]{padding:2px 5px}.ape\:p-\[2px_6px\]{padding:2px 6px}.ape\:p-\[2px_8px\]{padding:2px 8px}.ape\:p-\[2px_10px\]{padding:2px 10px}.ape\:p-\[2px_10px_2px_5px\]{padding:2px 10px 2px 5px}.ape\:p-\[3px_6px\]{padding:3px 6px}.ape\:p-\[4px_2px\]{padding:4px 2px}.ape\:p-\[4px_6px\]{padding:4px 6px}.ape\:p-\[4px_10px\]{padding:4px 10px}.ape\:p-\[5px\]{padding:5px}.ape\:p-\[5px_10px\]{padding:5px 10px}.ape\:p-\[5px_15px\]{padding:5px 15px}.ape\:p-\[5px_20px\]{padding:5px 20px}.ape\:p-\[6px\]{padding:6px}.ape\:p-\[6px_12px\]{padding:6px 12px}.ape\:p-\[8px\]{padding:8px}.ape\:p-\[8px_4px_4px_4px\]{padding:8px 4px 4px}.ape\:p-\[8px_10px\]{padding:8px 10px}.ape\:p-\[8px_12px\]{padding:8px 12px}.ape\:p-\[8px_16px\]{padding:8px 16px}.ape\:p-\[10px\]{padding:10px}.ape\:p-\[15px\]{padding:15px}.ape\:p-\[15px_20px_5px_20px\]{padding:15px 20px 5px}.ape\:p-\[16px\]{padding:16px}.ape\:p-\[20px\]{padding:20px}.ape\:p-px{padding:1px}.ape\:px-2\.5{padding-inline:calc(var(--ape-spacing) * 2.5)}.ape\:px-6{padding-inline:calc(var(--ape-spacing) * 6)}.ape\:px-\[3px\]{padding-inline:3px}.ape\:px-\[4px\]{padding-inline:4px}.ape\:px-\[5px\]{padding-inline:5px}.ape\:px-\[6px\]{padding-inline:6px}.ape\:px-\[8px\]{padding-inline:8px}.ape\:px-\[10px\]{padding-inline:10px}.ape\:px-\[14px\]{padding-inline:14px}.ape\:px-\[15px\]{padding-inline:15px}.ape\:px-\[19px\]{padding-inline:19px}.ape\:py-2\.5{padding-block:calc(var(--ape-spacing) * 2.5)}.ape\:py-\[2px\]{padding-block:2px}.ape\:py-\[3px\]{padding-block:3px}.ape\:py-\[5px\]{padding-block:5px}.ape\:py-\[6px\]{padding-block:6px}.ape\:py-\[10px\]{padding-block:10px}.ape\:py-\[14px\]{padding-block:14px}.ape\:pt-1\.25{padding-top:calc(var(--ape-spacing) * 1.25)}.ape\:pt-3\!{padding-top:calc(var(--ape-spacing) * 3)!important}.ape\:pt-4{padding-top:calc(var(--ape-spacing) * 4)}.ape\:pt-\[2px\]{padding-top:2px}.ape\:pt-\[3px\]{padding-top:3px}.ape\:pt-\[5px\]{padding-top:5px}.ape\:pt-\[10px\]{padding-top:10px}.ape\:pt-\[15px\]{padding-top:15px}.ape\:pt-\[20px\]{padding-top:20px}.ape\:pt-\[100px\]{padding-top:100px}.ape\:pr-0{padding-right:0}.ape\:pr-1\.25{padding-right:calc(var(--ape-spacing) * 1.25)}.ape\:pr-\[4px\]{padding-right:4px}.ape\:pr-\[14px\]{padding-right:14px}.ape\:pr-\[15px\]{padding-right:15px}.ape\:pr-\[20px\]{padding-right:20px}.ape\:pr-\[23px\]{padding-right:23px}.ape\:pb-\[2px\]{padding-bottom:2px}.ape\:pb-\[10px\]{padding-bottom:10px}.ape\:pb-\[20px\]{padding-bottom:20px}.ape\:pb-\[100px\]{padding-bottom:100px}.ape\:pl-0{padding-left:0}.ape\:pl-0\!{padding-left:0!important}.ape\:pl-1\.25{padding-left:calc(var(--ape-spacing) * 1.25)}.ape\:pl-\[5px\]{padding-left:5px}.ape\:pl-\[10px\]{padding-left:10px}.ape\:pl-\[15px\]{padding-left:15px}.ape\:pl-\[20px\]{padding-left:20px}.ape\:pl-\[26px\]{padding-left:26px}.ape\:pl-\[35px\]{padding-left:35px}.ape\:text-center{text-align:center}.ape\:text-left{text-align:left}.ape\:align-middle{vertical-align:middle}.ape\:align-sub{vertical-align:sub}.ape\:font-body{font-family:var(--ape-font-body)}.ape\:text-base{font-size:var(--ape-text-base);line-height:var(--tw-leading,var(--ape-text-base--line-height))}.ape\:text-sm{font-size:var(--ape-text-sm);line-height:var(--tw-leading,var(--ape-text-sm--line-height))}.ape\:text-sm\!{font-size:var(--ape-text-sm)!important;line-height:var(--tw-leading,var(--ape-text-sm--line-height))!important}.ape\:text-\[10px\]{font-size:10px}.ape\:text-\[10px\]\!{font-size:10px!important}.ape\:text-\[11px\]{font-size:11px}.ape\:text-\[12px\]{font-size:12px}.ape\:text-\[12px\]\!{font-size:12px!important}.ape\:text-\[13px\]{font-size:13px}.ape\:text-\[13px\]\!{font-size:13px!important}.ape\:text-\[14\.26px\]{font-size:14.26px}.ape\:text-\[14px\]{font-size:14px}.ape\:text-\[14px\]\!{font-size:14px!important}.ape\:text-\[16px\]{font-size:16px}.ape\:text-\[18px\]{font-size:18px}.ape\:text-\[18px\]\!{font-size:18px!important}.ape\:text-\[20px\]{font-size:20px}.ape\:text-\[22px\]{font-size:22px}.ape\:text-\[24px\]{font-size:24px}.ape\:text-\[24px\]\!{font-size:24px!important}.ape\:text-\[25\.26px\]{font-size:25.26px}.ape\:text-\[32px\]{font-size:32px}.ape\:leading-4{--tw-leading:calc(var(--ape-spacing) * 4);line-height:calc(var(--ape-spacing) * 4)}.ape\:leading-4\!{--tw-leading:calc(var(--ape-spacing) * 4)!important;line-height:calc(var(--ape-spacing) * 4)!important}.ape\:leading-5{--tw-leading:calc(var(--ape-spacing) * 5);line-height:calc(var(--ape-spacing) * 5)}.ape\:leading-5\.5\!{--tw-leading:calc(var(--ape-spacing) * 5.5)!important;line-height:calc(var(--ape-spacing) * 5.5)!important}.ape\:leading-\[11px\]{--tw-leading:11px;line-height:11px}.ape\:leading-\[12px\]{--tw-leading:12px;line-height:12px}.ape\:leading-\[13px\]{--tw-leading:13px;line-height:13px}.ape\:leading-\[14px\]{--tw-leading:14px;line-height:14px}.ape\:leading-\[15px\]{--tw-leading:15px;line-height:15px}.ape\:leading-\[18px\]{--tw-leading:18px;line-height:18px}.ape\:leading-\[18px\]\!{--tw-leading:18px!important;line-height:18px!important}.ape\:leading-\[21px\]{--tw-leading:21px;line-height:21px}.ape\:leading-\[22px\]{--tw-leading:22px;line-height:22px}.ape\:leading-\[24px\]{--tw-leading:24px;line-height:24px}.ape\:leading-\[28px\]{--tw-leading:28px;line-height:28px}.ape\:leading-\[30\.26px\]{--tw-leading:30.26px;line-height:30.26px}.ape\:leading-\[33px\]{--tw-leading:33px;line-height:33px}.ape\:font-bold{--tw-font-weight:var(--ape-font-weight-bold);font-weight:var(--ape-font-weight-bold)}.ape\:font-light{--tw-font-weight:var(--ape-font-weight-light);font-weight:var(--ape-font-weight-light)}.ape\:font-medium{--tw-font-weight:var(--ape-font-weight-medium);font-weight:var(--ape-font-weight-medium)}.ape\:font-normal{--tw-font-weight:var(--ape-font-weight-normal);font-weight:var(--ape-font-weight-normal)}.ape\:font-semibold{--tw-font-weight:var(--ape-font-weight-semibold);font-weight:var(--ape-font-weight-semibold)}.ape\:tracking-\[0\]{--tw-tracking:0;letter-spacing:0}.ape\:break-all{word-break:break-all}.ape\:text-ellipsis{text-overflow:ellipsis}.ape\:whitespace-nowrap{white-space:nowrap}.ape\:text-\[\#777\]{color:#777}.ape\:text-error{color:var(--ape-color-error)}.ape\:text-gray-300{color:var(--ape-color-gray-300)}.ape\:text-primary-bright{color:var(--ape-color-primary-bright)}.ape\:text-primary-button{color:var(--ape-color-primary-button)}.ape\:text-primary-button-disable{color:var(--ape-color-primary-button-disable)}.ape\:text-success{color:var(--ape-color-success)}.ape\:text-text{color:var(--ape-color-text)}.ape\:text-text-disabled{color:var(--ape-color-text-disabled)}.ape\:text-text-disabled-button{color:var(--ape-color-text-disabled-button)}.ape\:text-transparent{color:#0000}.ape\:text-white{color:var(--ape-color-white)}.ape\:capitalize{text-transform:capitalize}.ape\:normal-case{text-transform:none}.ape\:uppercase{text-transform:uppercase}.ape\:line-through{text-decoration-line:line-through}.ape\:no-underline{text-decoration-line:none}.ape\:underline{text-decoration-line:underline}.ape\:opacity-0{opacity:0}.ape\:opacity-20{opacity:.2}.ape\:opacity-50{opacity:.5}.ape\:opacity-60{opacity:.6}.ape\:opacity-70{opacity:.7}.ape\:opacity-80{opacity:.8}.ape\:opacity-90{opacity:.9}.ape\:shadow-\[0px_1px_4px_rgb\(0_0_0\/0\.16\)\]{--tw-shadow:0px 1px 4px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:shadow-\[rgba\(0\,0\,0\,0\.16\)_0px_1px_4px\]{--tw-shadow-color:#00000029}@supports (color:color-mix(in lab, red, red)){.ape\:shadow-\[rgba\(0\,0\,0\,0\.16\)_0px_1px_4px\]{--tw-shadow-color:color-mix(in oklab, #00000029 0px 1px 4px var(--tw-shadow-alpha), transparent)}}.ape\:blur-\[1px\]{--tw-blur:blur(1px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.ape\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ape\:duration-500{--tw-duration:.5s;transition-duration:.5s}.ape\:duration-1000{--tw-duration:1s;transition-duration:1s}.ape\:duration-\[1500ms\]{--tw-duration:1.5s;transition-duration:1.5s}.ape\:ease-\[ease\]{--tw-ease:ease;transition-timing-function:ease}.ape\:ease-in-out{--tw-ease:var(--ape-ease-in-out);transition-timing-function:var(--ape-ease-in-out)}.ape\:ease-linear{--tw-ease:linear;transition-timing-function:linear}.ape\:ease-out{--tw-ease:var(--ape-ease-out);transition-timing-function:var(--ape-ease-out)}.ape\:outline-none{--tw-outline-style:none;outline-style:none}.ape\:select-none{-webkit-user-select:none;user-select:none}.ape\:\[-webkit-text-fill-color\:transparent\]{-webkit-text-fill-color:transparent}@media (hover:hover){.ape\:group-hover\:bg-\[rgb\(20_18_29_\/_0\.25\)\]\!:is(:where(.ape\:group):hover *){background-color:#14121d40!important}.ape\:group-hover\/tooltip\:block:is(:where(.ape\:group\/tooltip):hover *){display:block}}.ape\:peer-checked\:block:is(:where(.ape\:peer):checked~*){display:block}.ape\:first\:rounded-t-normal:first-child{border-top-left-radius:var(--ape-radius-normal);border-top-right-radius:var(--ape-radius-normal)}.ape\:last\:mr-0:last-child{margin-right:0}.ape\:last\:rounded-b-normal:last-child{border-bottom-right-radius:var(--ape-radius-normal);border-bottom-left-radius:var(--ape-radius-normal)}.ape\:checked\:border-primary-button:checked{border-color:var(--ape-color-primary-button)}.ape\:checked\:bg-primary-button:checked{background-color:var(--ape-color-primary-button)}@media (hover:hover){.ape\:hover\:z-\[1000\]:hover{z-index:1000}.ape\:hover\:cursor-pointer:hover{cursor:pointer}.ape\:hover\:bg-\[rgb\(20_18_29_\/_0\.36\)\]\!:hover{background-color:#14121d5c!important}.ape\:hover\:bg-white3:hover{background-color:var(--ape-color-white3)}.ape\:hover\:bg-white4:hover{background-color:var(--ape-color-white4)}.ape\:hover\:bg-white5:hover{background-color:var(--ape-color-white5)}.ape\:hover\:underline:hover{text-decoration-line:underline}.ape\:hover\:opacity-60:hover{opacity:.6}.ape\:hover\:opacity-80:hover{opacity:.8}.ape\:hover\:opacity-90:hover{opacity:.9}.ape\:hover\:brightness-115:hover{--tw-brightness:brightness(115%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.ape\:hover\:\[backdrop-filter\:blur\(2px\)\]:hover{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.ape\:hover\:\[background\:linear-gradient\(90deg\,rgba\(49\,46\,122\,0\.70\)_0\%\,rgba\(92\,79\,174\,0\.70\)_100\%\)\]:hover{background:linear-gradient(90deg,#312e7ab3 0%,#5c4faeb3 100%)}}.ape\:focus\:outline:focus,.ape\:focus\:outline-1:focus{outline-style:var(--tw-outline-style);outline-width:1px}.ape\:focus\:outline-primary-button:focus{outline-color:var(--ape-color-primary-button)}.ape\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.ape\:focus\:not-checked\:shadow-none:focus:not(:checked){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:focus\:not-checked\:outline-none:focus:not(:checked){--tw-outline-style:none;outline-style:none}.ape\:active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}@media (hover:hover){.ape\:enabled\:hover\:border-primary-button-hovered:enabled:hover{border-color:var(--ape-color-primary-button-hovered)}.ape\:enabled\:hover\:bg-primary-button:enabled:hover{background-color:var(--ape-color-primary-button)}.ape\:enabled\:hover\:bg-primary-button-hovered:enabled:hover{background-color:var(--ape-color-primary-button-hovered)}.ape\:enabled\:hover\:text-text:enabled:hover{color:var(--ape-color-text)}.ape\:enabled\:hover\:not-checked\:border-primary-button:enabled:hover:not(:checked){border-color:var(--ape-color-primary-button)}}.ape\:active\:enabled\:scale-90:active:enabled{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.ape\:disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ape\:disabled\:border-transparent:disabled{border-color:#0000}.ape\:disabled\:bg-white3:disabled{background-color:var(--ape-color-white3)}.ape\:disabled\:text-primary-button-disable:disabled{color:var(--ape-color-primary-button-disable)}.ape\:disabled\:text-text-disabled-button:disabled{color:var(--ape-color-text-disabled-button)}.ape\:disabled\:opacity-90:disabled{opacity:.9}@media not all and (min-width:1000px){.ape\:max-\[1000px\]\:w-\[49\%\]{width:49%}}@media not all and (min-width:852px){.ape\:max-md\:mb-\[10px\]{margin-bottom:10px}}@media not all and (min-width:768px){.ape\:max-\[768px\]\:w-full{width:100%}}@media not all and (min-width:576px){.ape\:max-sm\:mb-\[10px\]{margin-bottom:10px}.ape\:max-sm\:w-1\/2{width:50%}.ape\:max-sm\:w-\[55\%\]{width:55%}.ape\:max-sm\:text-\[12px\]{font-size:12px}.ape\:max-sm\:text-\[18px\]{font-size:18px}.ape\:max-sm\:leading-\[14px\]{--tw-leading:14px;line-height:14px}.ape\:max-sm\:leading-\[21px\]{--tw-leading:21px;line-height:21px}}@media (min-width:513px){.ape\:min-\[513px\]\:justify-center{justify-content:center}.ape\:min-\[513px\]\:pl-0{padding-left:0}}@media (min-width:576px){.ape\:sm\:top-\[-240px\]{top:-240px}.ape\:sm\:ml-2{margin-left:calc(var(--ape-spacing) * 2)}.ape\:sm\:ml-5{margin-left:calc(var(--ape-spacing) * 5)}.ape\:sm\:max-w-\[190px\]{max-width:190px}.ape\:sm\:justify-start{justify-content:flex-start}.ape\:sm\:text-\[16px\]\!{font-size:16px!important}}@media (min-width:800px){.ape\:min-\[800px\]\:max-h-none{max-height:none}.ape\:min-\[800px\]\:w-\[350px\]{width:350px}.ape\:min-\[800px\]\:flex-col{flex-direction:column}.ape\:min-\[800px\]\:flex-row{flex-direction:row}.ape\:min-\[800px\]\:gap-\[5px\]{gap:5px}.ape\:min-\[800px\]\:p-\[12px\]{padding:12px}.ape\:min-\[800px\]\:p-\[20px\]{padding:20px}.ape\:min-\[800px\]\:pb-\[5px\]{padding-bottom:5px}@media not all and (min-width:1000px){.ape\:min-\[800px\]\:max-\[1000px\]\:bg-bottom{background-position:bottom}}}@media (min-width:852px){.ape\:md\:top-\[20px\]{top:20px}.ape\:md\:top-\[unset\]{top:unset}.ape\:md\:right-\[-13\%\]{right:-13%}.ape\:md\:right-\[-50px\]{right:-50px}.ape\:md\:-bottom-12\.5{bottom:calc(var(--ape-spacing) * -12.5)}.ape\:md\:bottom-\[-15px\]{bottom:-15px}.ape\:md\:bottom-\[unset\]{bottom:unset}.ape\:md\:mt-0{margin-top:0}.ape\:md\:mt-\[5px\]{margin-top:5px}.ape\:md\:mr-\[15px\]{margin-right:15px}.ape\:md\:mb-0{margin-bottom:0}.ape\:md\:ml-\[5px\]{margin-left:5px}.ape\:md\:block{display:block}.ape\:md\:flex{display:flex}.ape\:md\:flex\!{display:flex!important}.ape\:md\:hidden{display:none}.ape\:md\:hidden\!{display:none!important}.ape\:md\:h-\[200px\]{height:200px}.ape\:md\:h-\[225px\]{height:225px}.ape\:md\:max-h-\[350px\]{max-height:350px}.ape\:md\:min-h-\[430px\]{min-height:430px}.ape\:md\:w-1\/2{width:50%}.ape\:md\:w-87\.5{width:calc(var(--ape-spacing) * 87.5)}.ape\:md\:w-175{width:calc(var(--ape-spacing) * 175)}.ape\:md\:w-\[35\%\]{width:35%}.ape\:md\:w-\[150px\]{width:150px}.ape\:md\:w-\[180px\]{width:180px}.ape\:md\:w-\[200px\]{width:200px}.ape\:md\:w-\[225px\]{width:225px}.ape\:md\:w-\[300px\]{width:300px}.ape\:md\:w-\[calc\(100\%-300px\)\]{width:calc(100% - 300px)}.ape\:md\:w-\[unset\]{width:unset}.ape\:md\:w-full{width:100%}.ape\:md\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:-translate-y-3\/4{--tw-translate-y:calc(calc(3 / 4 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:scale-\[0\.4\]{scale:.4}.ape\:md\:flex-col{flex-direction:column}.ape\:md\:flex-row,.ape\:min-md\:flex-row{flex-direction:row}.ape\:md\:justify-end{justify-content:flex-end}.ape\:md\:gap-\[15px\]{gap:15px}.ape\:min-md\:gap-\[5px\]{gap:5px}.ape\:md\:rounded-\[20px\]{border-radius:20px}.ape\:md\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:md\:p-3{padding:calc(var(--ape-spacing) * 3)}.ape\:md\:p-5{padding:calc(var(--ape-spacing) * 5)}.ape\:md\:p-\[4px_10px\]{padding:4px 10px}.ape\:md\:p-\[20px\]{padding:20px}.ape\:md\:pr-\[20px\]{padding-right:20px}.ape\:md\:pb-1\.25{padding-bottom:calc(var(--ape-spacing) * 1.25)}.ape\:min-md\:pb-\[5px\]{padding-bottom:5px}.ape\:md\:pl-\[20px\]{padding-left:20px}.ape\:md\:text-\[12px\]\!{font-size:12px!important}.ape\:md\:text-\[14px\]{font-size:14px}.ape\:md\:text-\[14px\]\!{font-size:14px!important}.ape\:md\:text-\[16px\]{font-size:16px}.ape\:md\:text-\[18px\]{font-size:18px}.ape\:md\:text-\[20px\]{font-size:20px}.ape\:md\:text-\[24px\]{font-size:24px}.ape\:min-md\:text-\[16px\]{font-size:16px}.ape\:md\:leading-\[21px\]\!{--tw-leading:21px!important;line-height:21px!important}.ape\:md\:font-bold{--tw-font-weight:var(--ape-font-weight-bold);font-weight:var(--ape-font-weight-bold)}@media (hover:hover){.ape\:md\:hover\:z-\[1000\]\!:hover{z-index:1000!important}}}@media (min-width:968px){.ape\:lg\:mt-0{margin-top:0}.ape\:lg\:mr-\[10px\]{margin-right:10px}.ape\:lg\:mr-\[15px\]{margin-right:15px}.ape\:lg\:mb-0{margin-bottom:0}.ape\:lg\:ml-0{margin-left:0}.ape\:lg\:ml-\[10px\]{margin-left:10px}.ape\:lg\:flex{display:flex}.ape\:lg\:inline{display:inline}.ape\:lg\:h-\[40px\]{height:40px}.ape\:lg\:w-1\/2{width:50%}.ape\:lg\:w-\[30\%\]{width:30%}.ape\:lg\:w-\[35\%\]{width:35%}.ape\:lg\:w-\[45\%\]{width:45%}.ape\:lg\:w-\[65\%\]{width:65%}.ape\:lg\:w-\[unset\]{width:unset}.ape\:lg\:w-auto{width:auto}.ape\:lg\:max-w-\[calc\(100\%-35px\)\]{max-width:calc(100% - 35px)}.ape\:lg\:min-w-75\!{min-width:calc(var(--ape-spacing) * 75)!important}.ape\:lg\:min-w-100{min-width:calc(var(--ape-spacing) * 100)}.ape\:lg\:flex-row{flex-direction:row}.ape\:lg\:items-center{align-items:center}.ape\:lg\:gap-\[10px\]{gap:10px}.ape\:lg\:gap-\[15px\]{gap:15px}.ape\:lg\:overflow-visible{overflow:visible}.ape\:lg\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:lg\:bg-white4{background-color:var(--ape-color-white4)}.ape\:lg\:bg-\[image\:var\(--banner-bg-desktop\)\]{background-image:var(--banner-bg-desktop)}.ape\:lg\:px-\[10px\]{padding-inline:10px}.ape\:lg\:pr-\[20px\]{padding-right:20px}.ape\:lg\:pb-\[20px\]{padding-bottom:20px}.ape\:lg\:text-\[16px\]\!{font-size:16px!important}.ape\:lg\:leading-6\!{--tw-leading:calc(var(--ape-spacing) * 6)!important;line-height:calc(var(--ape-spacing) * 6)!important}}@media (min-width:1000px){.ape\:min-\[1000px\]\:absolute{position:absolute}.ape\:min-\[1000px\]\:left-\[10px\]{left:10px}.ape\:min-\[1000px\]\:mt-0{margin-top:0}.ape\:min-\[1000px\]\:flex{display:flex}.ape\:min-\[1000px\]\:hidden{display:none}.ape\:min-\[1000px\]\:h-\[70px\]{height:70px}.ape\:min-\[1000px\]\:w-\[30\%\]{width:30%}.ape\:min-\[1000px\]\:w-\[70\%\]{width:70%}.ape\:min-\[1000px\]\:w-\[130px\]{width:130px}.ape\:min-\[1000px\]\:w-\[210px\]{width:210px}.ape\:min-\[1000px\]\:w-\[300px\]{width:300px}.ape\:min-\[1000px\]\:min-w-\[300px\]{min-width:300px}.ape\:min-\[1000px\]\:flex-row{flex-direction:row}.ape\:min-\[1000px\]\:justify-between{justify-content:space-between}.ape\:min-\[1000px\]\:justify-center{justify-content:center}.ape\:min-\[1000px\]\:justify-end{justify-content:flex-end}.ape\:min-\[1000px\]\:p-0{padding:0}.ape\:min-\[1000px\]\:p-\[20px_0_10px_0\]{padding:20px 0 10px}.ape\:min-\[1000px\]\:pr-\[20px\]{padding-right:20px}}@media (min-width:1080px){.ape\:xl\:flex{display:flex}.ape\:xl\:w-\[30\%\]{width:30%}.ape\:xl\:w-\[70\%\]{width:70%}.ape\:xl\:w-\[100px\]{width:100px}.ape\:xl\:w-\[115px\]{width:115px}.ape\:xl\:w-\[135px\]{width:135px}.ape\:xl\:min-w-\[400px\]{min-width:400px}.ape\:xl\:flex-row{flex-direction:row}.ape\:xl\:justify-between{justify-content:space-between}.ape\:xl\:gap-\[30px\]{gap:30px}.ape\:xl\:p-\[20px_0_10px_0\]{padding:20px 0 10px}}@media (min-width:1200px){.ape\:xxl\:flex{display:flex}}.ape\:\[\&_\*\]\:text-\[14px\]\! *{font-size:14px!important}.ape\:\[\&_\*\]\:text-\[18px\]\! *{font-size:18px!important}.ape\:\[\&_\*\]\:text-\[24px\]\! *{font-size:24px!important}.ape\:\[\&_button\]\:ml-auto button,.ape\:\[\&_svg\]\:ml-auto svg{margin-left:auto}.ape\:\[\&_svg\]\:w-\[11px\] svg{width:11px}.ape\:\[\&_svg\]\:cursor-pointer svg{cursor:pointer}.ape\:\[\&_svg\]\:bg-transparent svg{background-color:#0000}.ape\:\[\&_svg\]\:fill-text svg{fill:var(--ape-color-text)}.ape\:\[\&\:\:-webkit-scrollbar\]\:h-\[5px\]::-webkit-scrollbar{height:5px}.ape\:\[\&\>\*\]\:h-\[31px\]\!>*{height:31px!important}.ape\:\[\&\>\*\]\:w-\[210px\]>*{width:210px}.ape\:\[\&\>\*\]\:text-\[14px\]\!>*{font-size:14px!important}@media (min-width:1080px){.ape\:xl\:\[\&\>\*\]\:w-\[100px\]>*{width:100px}}.ape\:\[\&\>div\]\:pt-0\!>div{padding-top:0!important}.ape\:\[\&\>div\:last-child\]\:mr-0>div:last-child{margin-right:0}.ape\:\[\&\>div\>div\]\:bg-white2>div>div{background-color:var(--ape-color-white2)}}.ape-root .lifi-bridge-modal [id^=widget-scrollable-container]{overflow-y:hidden!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--ape-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ape-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--ape-color-gray-300:oklch(87.2% .01 258.338);--ape-color-white:#fff;--ape-spacing:.25rem;--ape-text-sm:.875rem;--ape-text-sm--line-height:calc(1.25 / .875);--ape-text-base:1rem;--ape-text-base--line-height:calc(1.5 / 1);--ape-font-weight-light:300;--ape-font-weight-normal:400;--ape-font-weight-medium:500;--ape-font-weight-semibold:600;--ape-font-weight-bold:700;--ape-ease-out:cubic-bezier(0, 0, .2, 1);--ape-ease-in-out:cubic-bezier(.4, 0, .2, 1);--ape-default-transition-duration:.15s;--ape-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--ape-default-font-family:var(--ape-font-sans);--ape-default-mono-font-family:var(--ape-font-mono);--ape-color-white1:#0e0d16;--ape-color-white2:#161420;--ape-color-white3:#1f1d29;--ape-color-white4:#282632;--ape-color-white5:#312f3a;--ape-color-primary-button:#6560c5;--ape-color-primary-button-disable:#48475b;--ape-color-primary-button-hovered:#8480d1;--ape-color-success:#38a611;--ape-color-error:#df4141;--ape-color-text:#fafafa;--ape-color-text-disabled:#424242;--ape-color-text-disabled-button:#73728e;--ape-color-primary-bright:#fafafa;--ape-color-modal-overlay:#42424280;--ape-gradient-abond:linear-gradient(98.79deg, #6560c5 -2.37%, #e07753 100%);--ape-font-body:"Poppins", sans-serif;--ape-radius-small:6px;--ape-radius-default:16px;--ape-radius-normal:10px;--ape-radius-card:32px;--ape-z-index-dropdown:10;--ape-z-index-modal:102}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--ape-default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--ape-default-font-feature-settings,normal);font-variation-settings:var(--ape-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ape-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--ape-default-mono-font-feature-settings,normal);font-variation-settings:var(--ape-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.ape-root{width:100%;min-width:0;font-family:var(--ape-font-body);-webkit-font-smoothing:antialiased;color:var(--ape-color-text);background-color:var(--ape-color-white1);scroll-behavior:smooth;font-weight:600}.ape-root a{color:var(--ape-color-text);text-decoration:none}.ape-root a:hover{color:var(--ape-color-primary-button);text-decoration:underline}.ape-root hr{background-color:var(--ape-color-white3);border:none;height:1px}.ape-root ::-webkit-scrollbar{width:6px}.ape-root ::-webkit-scrollbar-thumb{background:var(--ape-color-text);border-radius:8px}.ape-root ::-webkit-scrollbar-track{background:var(--ape-color-white2);border-radius:10px}}@layer components{@keyframes ape-ellipsis{0%{content:"."}33%{content:".."}66%{content:"..."}}.ape-ellipsis:after{content:".";text-align:left;width:1em;animation:1.25s infinite ape-ellipsis;display:inline-block}.ape-carousel-viewport{-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;-webkit-touch-callout:none}.ape-carousel-viewport::-webkit-scrollbar{display:none}.ape-you-tooltip:after{content:"";border-style:solid;border-width:6px;border-color:transparent var(--ape-color-primary-button) transparent transparent;position:absolute;top:50%;left:-11px;transform:translateY(-50%)}.ape-you-card{position:absolute;top:0;right:-45px}.ape-you-card:before{content:"";border:9px solid #0000;border-right-color:var(--ape-color-primary-button);width:0;height:0;display:block;position:absolute;top:50%;right:100%;transform:translateY(-50%)}@keyframes ape-spinner-rotation{0%{transform:rotate(40deg)}to{transform:rotate(400deg)}}.ape-spinner{box-sizing:border-box;border-radius:50%;display:inline-block}.ape-spinner-loading{animation:1s linear infinite ape-spinner-rotation;transform:rotate(40deg)}.ape-icon{fill:currentColor;transition:transform .3s linear}.ape-icon path{fill:currentColor}.ape-text-link{cursor:pointer;text-decoration:none;display:inline-block;position:relative}.ape-text-link:after{content:"";background:var(--ape-color-text);border-radius:var(--ape-radius-normal);transform-origin:100% 100%;backface-visibility:hidden;width:100%;height:1.5px;transition:transform .25s ease-out;position:absolute;bottom:0;left:0;transform:scaleX(0)}.ape-text-link:hover:after{transform-origin:0 100%;transform:scaleX(1)}.ape-tooltip-bubble{color:var(--ape-color-text);border-radius:var(--ape-radius-normal);background-color:var(--ape-tooltip-bg,var(--ape-color-white2));width:max-content;z-index:var(--ape-z-index-modal);padding:20px;font-size:12px;font-weight:600;line-height:18px;position:relative;top:15px;box-shadow:0 0 25px #c8c8c84d}.ape-tooltip-bottom-right:before,.ape-tooltip-bottom-left:before,.ape-tooltip-top-right:before,.ape-tooltip-top-left:before,.ape-tooltip-left:before{content:"";border:12px solid #0000;width:0;display:block;position:absolute}.ape-tooltip-bottom-right:before{border-top:0;border-bottom-style:solid;border-bottom-width:15px;border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));top:0;right:3%;transform:translate(-50%,-100%)}.ape-tooltip-bottom-left:before{border-top:0;border-bottom-style:solid;border-bottom-width:15px;border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));top:0;left:calc(3% + 15px);transform:translate(-50%,-100%)}.ape-tooltip-top-right:before{border-top-style:solid;border-top-width:15px;border-bottom:0;border-top-color:var(--ape-tooltip-bg,var(--ape-color-white2));bottom:0;right:3%;transform:translate(-50%,100%)}.ape-tooltip-top-left:before{border-top-style:solid;border-top-width:15px;border-bottom:0;border-top-color:var(--ape-tooltip-bg,var(--ape-color-white2));bottom:0;left:calc(3% + 15px);transform:translate(-50%,100%)}.ape-tooltip-only-container-right:before{content:"";border-bottom-color:var(--ape-tooltip-bg,var(--ape-color-white2));position:absolute;right:3%}.ape-tooltip-left:before{color:var(--ape-color-white2);border-right:15px solid;top:65%;left:-13px;transform:translate(-50%,-100%)}@keyframes ape-skeleton-waves{0%{left:-150px}to{left:100%}}@keyframes ape-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ape-skeleton-waves{background-color:var(--ape-color-white2);min-height:16px;display:block;position:relative;overflow:hidden;transform:translate(0)}.ape-skeleton-waves:before{content:"";background-image:linear-gradient(90deg,#0000,#f3f3f34d,#0000);width:250px;height:100%;animation:1.5s cubic-bezier(.4,0,.2,1) infinite ape-skeleton-waves;position:absolute;top:0;left:-150px}.ape-skeleton-pulse{background-color:var(--ape-color-white2);border-radius:2px;min-height:20px;animation:2s ease-out infinite ape-skeleton-pulse;display:block;transform:translate(0)}}@layer utilities{.ape\:pointer-events-none{pointer-events:none}.ape\:absolute{position:absolute}.ape\:fixed{position:fixed}.ape\:relative{position:relative}.ape\:inset-0{inset:0}.ape\:-top-\[15px\]{top:-15px}.ape\:top-0{top:0}.ape\:top-1\/2{top:50%}.ape\:top-\[-180px\]{top:-180px}.ape\:top-\[5px\]{top:5px}.ape\:top-\[12px\]{top:12px}.ape\:top-\[24px\]{top:24px}.ape\:top-\[25px\]{top:25px}.ape\:top-\[45px\]{top:45px}.ape\:top-\[50px\]{top:50px}.ape\:top-\[56\%\]{top:56%}.ape\:right-0{right:0}.ape\:right-3{right:calc(var(--ape-spacing) * 3)}.ape\:right-\[5px\]{right:5px}.ape\:right-\[6px\]{right:6px}.ape\:right-\[10px\]{right:10px}.ape\:right-\[50\%\]{right:50%}.ape\:bottom-0{bottom:0}.ape\:bottom-\[-43px\]{bottom:-43px}.ape\:bottom-\[3px\]{bottom:3px}.ape\:bottom-\[calc\(100\%-10px\)\]{bottom:calc(100% - 10px)}.ape\:bottom-\[unset\]{bottom:unset}.ape\:left-0{left:0}.ape\:left-1\/2{left:50%}.ape\:left-\[-20px\]{left:-20px}.ape\:left-\[-50px\]{left:-50px}.ape\:left-\[1px\]{left:1px}.ape\:left-\[25\%\]{left:25%}.ape\:left-\[40px\]{left:40px}.ape\:left-\[65\%\]{left:65%}.ape\:-z-\[1\]{z-index:calc(1 * -1)}.ape\:z-0{z-index:0}.ape\:z-10{z-index:10}.ape\:z-100{z-index:100}.ape\:z-\[1\]{z-index:1}.ape\:z-\[2\]{z-index:2}.ape\:z-\[5\]{z-index:5}.ape\:z-\[20\]{z-index:20}.ape\:z-\[100\]{z-index:100}.ape\:z-\[103\]{z-index:103}.ape\:z-\[121\]{z-index:121}.ape\:z-\[999\]{z-index:999}.ape\:z-\[1000\]{z-index:1000}.ape\:z-\[1001\]{z-index:1001}.ape\:z-\[5000\]{z-index:5000}.ape\:float-left{float:left}.ape\:m-0{margin:0}.ape\:m-\[0_5px_5px_0\]{margin:0 5px 5px 0}.ape\:m-\[10px_0px_15px_0px\]{margin:10px 0 15px}.ape\:m-auto{margin:auto}.ape\:mx-\[-5px\]{margin-inline:-5px}.ape\:mx-\[-8px\]{margin-inline:-8px}.ape\:mx-\[2\.5px\]{margin-inline:2.5px}.ape\:mx-\[2px\]{margin-inline:2px}.ape\:mx-\[3px\]{margin-inline:3px}.ape\:mx-\[5px\]{margin-inline:5px}.ape\:mx-\[8px\]{margin-inline:8px}.ape\:mx-\[10px\]{margin-inline:10px}.ape\:mx-\[20px\]{margin-inline:20px}.ape\:mx-\[25px\]{margin-inline:25px}.ape\:my-\[2px\]{margin-block:2px}.ape\:my-\[5px\]{margin-block:5px}.ape\:my-\[10px\]{margin-block:10px}.ape\:my-\[15px\]{margin-block:15px}.ape\:my-\[20px\]{margin-block:20px}.ape\:mt-0{margin-top:0}.ape\:mt-0\.75{margin-top:calc(var(--ape-spacing) * .75)}.ape\:mt-2{margin-top:calc(var(--ape-spacing) * 2)}.ape\:mt-2\.5{margin-top:calc(var(--ape-spacing) * 2.5)}.ape\:mt-4{margin-top:calc(var(--ape-spacing) * 4)}.ape\:mt-\[-5px\]{margin-top:-5px}.ape\:mt-\[-15px\]{margin-top:-15px}.ape\:mt-\[3px\]{margin-top:3px}.ape\:mt-\[5px\]{margin-top:5px}.ape\:mt-\[10px\]{margin-top:10px}.ape\:mt-\[15px\]{margin-top:15px}.ape\:mt-\[20px\]{margin-top:20px}.ape\:mt-\[25px\]{margin-top:25px}.ape\:mt-\[30px\]{margin-top:30px}.ape\:mt-\[35px\]{margin-top:35px}.ape\:mt-\[40px\]{margin-top:40px}.ape\:mt-px{margin-top:1px}.ape\:mr-0{margin-right:0}.ape\:mr-1\.25{margin-right:calc(var(--ape-spacing) * 1.25)}.ape\:mr-\[3px\]{margin-right:3px}.ape\:mr-\[4px\]{margin-right:4px}.ape\:mr-\[5px\]{margin-right:5px}.ape\:mr-\[6px\]{margin-right:6px}.ape\:mr-\[8px\]{margin-right:8px}.ape\:mr-\[10px\]{margin-right:10px}.ape\:mr-\[15px\]{margin-right:15px}.ape\:mr-\[20px\]{margin-right:20px}.ape\:mb-1\.25{margin-bottom:calc(var(--ape-spacing) * 1.25)}.ape\:mb-2\.5{margin-bottom:calc(var(--ape-spacing) * 2.5)}.ape\:mb-5{margin-bottom:calc(var(--ape-spacing) * 5)}.ape\:mb-\[1px\]{margin-bottom:1px}.ape\:mb-\[3px\]{margin-bottom:3px}.ape\:mb-\[5px\]{margin-bottom:5px}.ape\:mb-\[8px\]{margin-bottom:8px}.ape\:mb-\[10px\]{margin-bottom:10px}.ape\:mb-\[14px\]{margin-bottom:14px}.ape\:mb-\[15px\]{margin-bottom:15px}.ape\:mb-\[20px\]{margin-bottom:20px}.ape\:mb-\[30px\]{margin-bottom:30px}.ape\:mb-\[50px\]{margin-bottom:50px}.ape\:ml-0{margin-left:0}.ape\:ml-1{margin-left:var(--ape-spacing)}.ape\:ml-3\.5{margin-left:calc(var(--ape-spacing) * 3.5)}.ape\:ml-3\.75{margin-left:calc(var(--ape-spacing) * 3.75)}.ape\:ml-5{margin-left:calc(var(--ape-spacing) * 5)}.ape\:ml-\[3px\]{margin-left:3px}.ape\:ml-\[4px\]{margin-left:4px}.ape\:ml-\[5px\]{margin-left:5px}.ape\:ml-\[6px\]{margin-left:6px}.ape\:ml-\[7px\]{margin-left:7px}.ape\:ml-\[10px\]{margin-left:10px}.ape\:ml-\[15px\]{margin-left:15px}.ape\:ml-\[20px\]{margin-left:20px}.ape\:ml-\[30px\]{margin-left:30px}.ape\:line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ape\:block{display:block}.ape\:block\!{display:block!important}.ape\:flex{display:flex}.ape\:hidden{display:none}.ape\:hidden\!{display:none!important}.ape\:inline-flex{display:inline-flex}.ape\:aspect-\[1\/0\.56\]{aspect-ratio:1/.56}.ape\:size-full{width:100%;height:100%}.ape\:h-7\.5{height:calc(var(--ape-spacing) * 7.5)}.ape\:h-8{height:calc(var(--ape-spacing) * 8)}.ape\:h-10{height:calc(var(--ape-spacing) * 10)}.ape\:h-11\.25{height:calc(var(--ape-spacing) * 11.25)}.ape\:h-\[2px\]{height:2px}.ape\:h-\[3px\]{height:3px}.ape\:h-\[5px\]{height:5px}.ape\:h-\[14px\]{height:14px}.ape\:h-\[15px\]{height:15px}.ape\:h-\[18px\]{height:18px}.ape\:h-\[20px\]{height:20px}.ape\:h-\[21px\]{height:21px}.ape\:h-\[22px\]{height:22px}.ape\:h-\[24px\]{height:24px}.ape\:h-\[25px\]{height:25px}.ape\:h-\[26px\]{height:26px}.ape\:h-\[30px\]{height:30px}.ape\:h-\[30vh\]{height:30vh}.ape\:h-\[31px\]{height:31px}.ape\:h-\[32px\]{height:32px}.ape\:h-\[34px\]{height:34px}.ape\:h-\[35px\]{height:35px}.ape\:h-\[36px\]{height:36px}.ape\:h-\[36px\]\!{height:36px!important}.ape\:h-\[40px\]{height:40px}.ape\:h-\[45px\]{height:45px}.ape\:h-\[49px\]{height:49px}.ape\:h-\[60px\]{height:60px}.ape\:h-\[70px\]{height:70px}.ape\:h-\[75px\]{height:75px}.ape\:h-\[84px\]{height:84px}.ape\:h-\[91px\]{height:91px}.ape\:h-\[125px\]{height:125px}.ape\:h-\[300px\]{height:300px}.ape\:h-\[400px\]{height:400px}.ape\:h-\[725px\]{height:725px}.ape\:h-\[calc\(100\%\+20px\)\]{height:calc(100% + 20px)}.ape\:h-\[calc\(100\%-150px\)\]{height:calc(100% - 150px)}.ape\:h-\[unset\]{height:unset}.ape\:h-auto{height:auto}.ape\:h-fit{height:fit-content}.ape\:h-fit\!{height:fit-content!important}.ape\:h-full{height:100%}.ape\:h-px{height:1px}.ape\:h-screen{height:100vh}.ape\:max-h-\[32px\]{max-height:32px}.ape\:max-h-\[48px\]{max-height:48px}.ape\:max-h-\[95vh\]{max-height:95vh}.ape\:max-h-\[300px\]{max-height:300px}.ape\:max-h-none{max-height:none}.ape\:min-h-4{min-height:calc(var(--ape-spacing) * 4)}.ape\:min-h-23{min-height:calc(var(--ape-spacing) * 23)}.ape\:min-h-\[27px\]{min-height:27px}.ape\:min-h-\[30px\]{min-height:30px}.ape\:min-h-\[40px\]{min-height:40px}.ape\:min-h-\[47\.45px\]{min-height:47.45px}.ape\:min-h-\[90px\]{min-height:90px}.ape\:min-h-\[160px\]{min-height:160px}.ape\:min-h-\[225px\]{min-height:225px}.ape\:min-h-\[330px\]{min-height:330px}.ape\:min-h-\[480px\]{min-height:480px}.ape\:w-1\/2{width:50%}.ape\:w-1\/5{width:20%}.ape\:w-7\!{width:calc(var(--ape-spacing) * 7)!important}.ape\:w-43\.75{width:calc(var(--ape-spacing) * 43.75)}.ape\:w-85{width:calc(var(--ape-spacing) * 85)}.ape\:w-95{width:calc(var(--ape-spacing) * 95)}.ape\:w-\[6px\]{width:6px}.ape\:w-\[8px\]{width:8px}.ape\:w-\[14px\]{width:14px}.ape\:w-\[15px\]{width:15px}.ape\:w-\[20px\]{width:20px}.ape\:w-\[25px\]{width:25px}.ape\:w-\[30px\]{width:30px}.ape\:w-\[32\%\]{width:32%}.ape\:w-\[34\%\]{width:34%}.ape\:w-\[35px\]{width:35px}.ape\:w-\[36\%\]{width:36%}.ape\:w-\[40px\]{width:40px}.ape\:w-\[45\%\]{width:45%}.ape\:w-\[49\%\]{width:49%}.ape\:w-\[50px\]{width:50px}.ape\:w-\[55px\]{width:55px}.ape\:w-\[60px\]{width:60px}.ape\:w-\[65\%\]{width:65%}.ape\:w-\[75\%\]{width:75%}.ape\:w-\[85px\]{width:85px}.ape\:w-\[98vw\]{width:98vw}.ape\:w-\[100px\]{width:100px}.ape\:w-\[110px\]{width:110px}.ape\:w-\[115px\]{width:115px}.ape\:w-\[120px\]{width:120px}.ape\:w-\[122px\]{width:122px}.ape\:w-\[125px\]{width:125px}.ape\:w-\[127px\]{width:127px}.ape\:w-\[130px\]{width:130px}.ape\:w-\[135px\]{width:135px}.ape\:w-\[144px\]{width:144px}.ape\:w-\[155px\]{width:155px}.ape\:w-\[160px\]{width:160px}.ape\:w-\[170px\]{width:170px}.ape\:w-\[175px\]{width:175px}.ape\:w-\[190px\]{width:190px}.ape\:w-\[210px\]{width:210px}.ape\:w-\[220px\]{width:220px}.ape\:w-\[235px\]{width:235px}.ape\:w-\[300px\]{width:300px}.ape\:w-\[380px\]{width:380px}.ape\:w-\[380px\]\!{width:380px!important}.ape\:w-\[400px\]{width:400px}.ape\:w-\[416px\]{width:416px}.ape\:w-\[420px\]{width:420px}.ape\:w-\[450px\]{width:450px}.ape\:w-\[480px\]{width:480px}.ape\:w-\[500px\]{width:500px}.ape\:w-\[740px\]\!{width:740px!important}.ape\:w-\[calc\(33\.33\%-20px\)\]{width:calc(33.33% - 20px)}.ape\:w-\[calc\(50vw-25px\)\]{width:calc(50vw - 25px)}.ape\:w-\[calc\(100\%\+40px\)\]{width:calc(100% + 40px)}.ape\:w-\[calc\(100\%-2px\)\]{width:calc(100% - 2px)}.ape\:w-auto{width:auto}.ape\:w-fit{width:fit-content}.ape\:w-full{width:100%}.ape\:w-max{width:max-content}.ape\:w-screen{width:100vw}.ape\:max-w-75{max-width:calc(var(--ape-spacing) * 75)}.ape\:max-w-85{max-width:calc(var(--ape-spacing) * 85)}.ape\:max-w-\[95vw\]{max-width:95vw}.ape\:max-w-\[100px\]{max-width:100px}.ape\:max-w-\[300px\]{max-width:300px}.ape\:max-w-full{max-width:100%}.ape\:min-w-\[10px\]{min-width:10px}.ape\:min-w-\[14px\]{min-width:14px}.ape\:min-w-\[20px\]{min-width:20px}.ape\:min-w-\[25px\]{min-width:25px}.ape\:min-w-\[30px\]{min-width:30px}.ape\:min-w-\[33px\]{min-width:33px}.ape\:min-w-\[40px\]{min-width:40px}.ape\:min-w-\[48px\]{min-width:48px}.ape\:min-w-\[65px\]{min-width:65px}.ape\:min-w-\[100px\]{min-width:100px}.ape\:min-w-\[120px\]{min-width:120px}.ape\:min-w-\[148px\]{min-width:148px}.ape\:min-w-\[250px\]{min-width:250px}.ape\:min-w-\[700px\]{min-width:700px}.ape\:min-w-\[unset\]{min-width:unset}.ape\:min-w-full{min-width:100%}.ape\:\[flex\:0_0_100\%\]{flex:0 0 100%}.ape\:flex-1{flex:1}.ape\:shrink-0{flex-shrink:0}.ape\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:translate-x-1\/2{--tw-translate-x:calc(1 / 2 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:translate-x-\[50\%\]{--tw-translate-x:50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:scale-\[0\.5\]{scale:.5}.ape\:rotate-\[-45deg\]{rotate:-45deg}.ape\:cursor-\[unset\]{cursor:unset}.ape\:cursor-pointer{cursor:pointer}.ape\:snap-center{scroll-snap-align:center}.ape\:list-none{list-style-type:none}.ape\:appearance-none{appearance:none}.ape\:flex-col{flex-direction:column}.ape\:flex-col-reverse{flex-direction:column-reverse}.ape\:flex-row{flex-direction:row}.ape\:flex-row-reverse{flex-direction:row-reverse}.ape\:flex-wrap{flex-wrap:wrap}.ape\:items-center{align-items:center}.ape\:items-end{align-items:flex-end}.ape\:items-start{align-items:flex-start}.ape\:items-stretch{align-items:stretch}.ape\:justify-around{justify-content:space-around}.ape\:justify-between{justify-content:space-between}.ape\:justify-center{justify-content:center}.ape\:justify-end{justify-content:flex-end}.ape\:justify-start{justify-content:flex-start}.ape\:gap-1{gap:var(--ape-spacing)}.ape\:gap-2\.5{gap:calc(var(--ape-spacing) * 2.5)}.ape\:gap-4{gap:calc(var(--ape-spacing) * 4)}.ape\:gap-\[1px\]{gap:1px}.ape\:gap-\[3px\]{gap:3px}.ape\:gap-\[5px\]{gap:5px}.ape\:gap-\[7px\]{gap:7px}.ape\:gap-\[8px\]{gap:8px}.ape\:gap-\[10px\]{gap:10px}.ape\:gap-\[14px\]{gap:14px}.ape\:gap-\[15px\]{gap:15px}.ape\:gap-\[20px\]{gap:20px}.ape\:overflow-hidden{overflow:hidden}.ape\:overflow-x-auto{overflow-x:auto}.ape\:overflow-x-hidden{overflow-x:hidden}.ape\:overflow-x-visible{overflow-x:visible}.ape\:\[overflow-y\:unset\]\!{overflow-y:unset!important}.ape\:overflow-y-auto{overflow-y:auto}.ape\:overflow-y-hidden{overflow-y:hidden}.ape\:overflow-y-scroll{overflow-y:scroll}.ape\:rounded-\[0_0_10px_10px\],.ape\:rounded-\[0px_0px_10px_10px\]{border-radius:0 0 10px 10px}.ape\:rounded-\[0px_10px_10px_0px\]{border-radius:0 10px 10px 0}.ape\:rounded-\[4px\]{border-radius:4px}.ape\:rounded-\[5px\]{border-radius:5px}.ape\:rounded-\[6px\]{border-radius:6px}.ape\:rounded-\[6px_6px_0px_0px\]{border-radius:6px 6px 0 0}.ape\:rounded-\[8px\]{border-radius:8px}.ape\:rounded-\[10px\]{border-radius:10px}.ape\:rounded-\[10px_0px_10px_0px\]{border-radius:10px 0}.ape\:rounded-\[10px_10px_0_0\],.ape\:rounded-\[10px_10px_0px_0px\]{border-radius:10px 10px 0 0}.ape\:rounded-\[14px\]{border-radius:14px}.ape\:rounded-\[40px\]{border-radius:40px}.ape\:rounded-\[50\%\]{border-radius:50%}.ape\:rounded-\[50px\]{border-radius:50px}.ape\:rounded-full{border-radius:3.40282e38px}.ape\:rounded-none{border-radius:0}.ape\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:rounded-small{border-radius:var(--ape-radius-small)}.ape\:rounded-tl-\[10px\]{border-top-left-radius:10px}.ape\:rounded-br-\[8px\]{border-bottom-right-radius:8px}.ape\:border{border-style:var(--tw-border-style);border-width:1px}.ape\:border-0{border-style:var(--tw-border-style);border-width:0}.ape\:border-2{border-style:var(--tw-border-style);border-width:2px}.ape\:border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.ape\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ape\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ape\:border-none{--tw-border-style:none;border-style:none}.ape\:border-solid{--tw-border-style:solid;border-style:solid}.ape\:border-\[\#9960C5\]{border-color:#9960c5}.ape\:border-\[\#222222\]{border-color:#222}.ape\:border-\[grey\]{border-color:gray}.ape\:border-primary-button{border-color:var(--ape-color-primary-button)}.ape\:border-success{border-color:var(--ape-color-success)}.ape\:border-text{border-color:var(--ape-color-text)}.ape\:border-white2{border-color:var(--ape-color-white2)}.ape\:border-white3{border-color:var(--ape-color-white3)}.ape\:border-white4{border-color:var(--ape-color-white4)}.ape\:bg-\[\#38A6110D\]{background-color:#38a6110d}.ape\:bg-\[\#9960C5\]{background-color:#9960c5}.ape\:bg-\[\#DE62F366\]{background-color:#de62f366}.ape\:bg-\[grey\]{background-color:gray}.ape\:bg-modal-overlay{background-color:var(--ape-color-modal-overlay)}.ape\:bg-primary-button{background-color:var(--ape-color-primary-button)}.ape\:bg-text{background-color:var(--ape-color-text)}.ape\:bg-text-disabled{background-color:var(--ape-color-text-disabled)}.ape\:bg-transparent{background-color:#0000}.ape\:bg-transparent\!{background-color:#0000!important}.ape\:bg-white{background-color:var(--ape-color-white)}.ape\:bg-white1{background-color:var(--ape-color-white1)}.ape\:bg-white2{background-color:var(--ape-color-white2)}.ape\:bg-white2\!{background-color:var(--ape-color-white2)!important}.ape\:bg-white3{background-color:var(--ape-color-white3)}.ape\:bg-white4{background-color:var(--ape-color-white4)}.ape\:bg-\[image\:var\(--ape-gradient-abond\)\]{background-image:var(--ape-gradient-abond)}.ape\:bg-\[image\:var\(--banner-bg-mobile\)\]{background-image:var(--banner-bg-mobile)}.ape\:bg-\[linear-gradient\(180deg\,\#FFFFFF_50\%\,\#666666_100\%\)\]{background-image:linear-gradient(#fff 50%,#666 100%)}.ape\:bg-cover{background-size:cover}.ape\:bg-clip-text{-webkit-background-clip:text;background-clip:text}.ape\:bg-no-repeat{background-repeat:no-repeat}.ape\:object-contain{object-fit:contain}.ape\:object-cover{object-fit:cover}.ape\:p-0{padding:0}.ape\:p-0\!{padding:0!important}.ape\:p-2{padding:calc(var(--ape-spacing) * 2)}.ape\:p-2\.5{padding:calc(var(--ape-spacing) * 2.5)}.ape\:p-3{padding:calc(var(--ape-spacing) * 3)}.ape\:p-3\.75{padding:calc(var(--ape-spacing) * 3.75)}.ape\:p-4{padding:calc(var(--ape-spacing) * 4)}.ape\:p-5{padding:calc(var(--ape-spacing) * 5)}.ape\:p-\[0_1px\]{padding:0 1px}.ape\:p-\[0_20px_20px_20px\]{padding:0 20px 20px}.ape\:p-\[0px_8px\]\!{padding:0 8px!important}.ape\:p-\[2\.5px_5px\]{padding:2.5px 5px}.ape\:p-\[2px\]{padding:2px}.ape\:p-\[2px_5px\]{padding:2px 5px}.ape\:p-\[2px_6px\]{padding:2px 6px}.ape\:p-\[2px_8px\]{padding:2px 8px}.ape\:p-\[2px_10px\]{padding:2px 10px}.ape\:p-\[2px_10px_2px_5px\]{padding:2px 10px 2px 5px}.ape\:p-\[3px_6px\]{padding:3px 6px}.ape\:p-\[4px_2px\]{padding:4px 2px}.ape\:p-\[4px_6px\]{padding:4px 6px}.ape\:p-\[4px_10px\]{padding:4px 10px}.ape\:p-\[5px\]{padding:5px}.ape\:p-\[5px_10px\]{padding:5px 10px}.ape\:p-\[5px_15px\]{padding:5px 15px}.ape\:p-\[5px_20px\]{padding:5px 20px}.ape\:p-\[6px\]{padding:6px}.ape\:p-\[6px_12px\]{padding:6px 12px}.ape\:p-\[8px\]{padding:8px}.ape\:p-\[8px_4px_4px_4px\]{padding:8px 4px 4px}.ape\:p-\[8px_10px\]{padding:8px 10px}.ape\:p-\[8px_12px\]{padding:8px 12px}.ape\:p-\[8px_16px\]{padding:8px 16px}.ape\:p-\[10px\]{padding:10px}.ape\:p-\[15px\]{padding:15px}.ape\:p-\[15px_20px_5px_20px\]{padding:15px 20px 5px}.ape\:p-\[16px\]{padding:16px}.ape\:p-\[20px\]{padding:20px}.ape\:p-px{padding:1px}.ape\:px-2\.5{padding-inline:calc(var(--ape-spacing) * 2.5)}.ape\:px-6{padding-inline:calc(var(--ape-spacing) * 6)}.ape\:px-\[3px\]{padding-inline:3px}.ape\:px-\[4px\]{padding-inline:4px}.ape\:px-\[5px\]{padding-inline:5px}.ape\:px-\[6px\]{padding-inline:6px}.ape\:px-\[8px\]{padding-inline:8px}.ape\:px-\[10px\]{padding-inline:10px}.ape\:px-\[14px\]{padding-inline:14px}.ape\:px-\[15px\]{padding-inline:15px}.ape\:px-\[19px\]{padding-inline:19px}.ape\:py-2\.5{padding-block:calc(var(--ape-spacing) * 2.5)}.ape\:py-\[2px\]{padding-block:2px}.ape\:py-\[3px\]{padding-block:3px}.ape\:py-\[5px\]{padding-block:5px}.ape\:py-\[6px\]{padding-block:6px}.ape\:py-\[10px\]{padding-block:10px}.ape\:py-\[14px\]{padding-block:14px}.ape\:pt-1\.25{padding-top:calc(var(--ape-spacing) * 1.25)}.ape\:pt-3\!{padding-top:calc(var(--ape-spacing) * 3)!important}.ape\:pt-4{padding-top:calc(var(--ape-spacing) * 4)}.ape\:pt-\[2px\]{padding-top:2px}.ape\:pt-\[3px\]{padding-top:3px}.ape\:pt-\[5px\]{padding-top:5px}.ape\:pt-\[10px\]{padding-top:10px}.ape\:pt-\[15px\]{padding-top:15px}.ape\:pt-\[20px\]{padding-top:20px}.ape\:pt-\[100px\]{padding-top:100px}.ape\:pr-0{padding-right:0}.ape\:pr-1\.25{padding-right:calc(var(--ape-spacing) * 1.25)}.ape\:pr-\[4px\]{padding-right:4px}.ape\:pr-\[14px\]{padding-right:14px}.ape\:pr-\[15px\]{padding-right:15px}.ape\:pr-\[20px\]{padding-right:20px}.ape\:pr-\[23px\]{padding-right:23px}.ape\:pb-\[2px\]{padding-bottom:2px}.ape\:pb-\[10px\]{padding-bottom:10px}.ape\:pb-\[20px\]{padding-bottom:20px}.ape\:pb-\[100px\]{padding-bottom:100px}.ape\:pl-0{padding-left:0}.ape\:pl-0\!{padding-left:0!important}.ape\:pl-1\.25{padding-left:calc(var(--ape-spacing) * 1.25)}.ape\:pl-\[5px\]{padding-left:5px}.ape\:pl-\[10px\]{padding-left:10px}.ape\:pl-\[15px\]{padding-left:15px}.ape\:pl-\[20px\]{padding-left:20px}.ape\:pl-\[26px\]{padding-left:26px}.ape\:pl-\[35px\]{padding-left:35px}.ape\:text-center{text-align:center}.ape\:text-left{text-align:left}.ape\:align-middle{vertical-align:middle}.ape\:align-sub{vertical-align:sub}.ape\:font-body{font-family:var(--ape-font-body)}.ape\:text-base{font-size:var(--ape-text-base);line-height:var(--tw-leading,var(--ape-text-base--line-height))}.ape\:text-sm{font-size:var(--ape-text-sm);line-height:var(--tw-leading,var(--ape-text-sm--line-height))}.ape\:text-sm\!{font-size:var(--ape-text-sm)!important;line-height:var(--tw-leading,var(--ape-text-sm--line-height))!important}.ape\:text-\[10px\]{font-size:10px}.ape\:text-\[10px\]\!{font-size:10px!important}.ape\:text-\[11px\]{font-size:11px}.ape\:text-\[12px\]{font-size:12px}.ape\:text-\[12px\]\!{font-size:12px!important}.ape\:text-\[13px\]{font-size:13px}.ape\:text-\[13px\]\!{font-size:13px!important}.ape\:text-\[14\.26px\]{font-size:14.26px}.ape\:text-\[14px\]{font-size:14px}.ape\:text-\[14px\]\!{font-size:14px!important}.ape\:text-\[16px\]{font-size:16px}.ape\:text-\[18px\]{font-size:18px}.ape\:text-\[18px\]\!{font-size:18px!important}.ape\:text-\[20px\]{font-size:20px}.ape\:text-\[22px\]{font-size:22px}.ape\:text-\[24px\]{font-size:24px}.ape\:text-\[24px\]\!{font-size:24px!important}.ape\:text-\[25\.26px\]{font-size:25.26px}.ape\:text-\[32px\]{font-size:32px}.ape\:leading-4{--tw-leading:calc(var(--ape-spacing) * 4);line-height:calc(var(--ape-spacing) * 4)}.ape\:leading-4\!{--tw-leading:calc(var(--ape-spacing) * 4)!important;line-height:calc(var(--ape-spacing) * 4)!important}.ape\:leading-5{--tw-leading:calc(var(--ape-spacing) * 5);line-height:calc(var(--ape-spacing) * 5)}.ape\:leading-5\.5\!{--tw-leading:calc(var(--ape-spacing) * 5.5)!important;line-height:calc(var(--ape-spacing) * 5.5)!important}.ape\:leading-\[11px\]{--tw-leading:11px;line-height:11px}.ape\:leading-\[12px\]{--tw-leading:12px;line-height:12px}.ape\:leading-\[13px\]{--tw-leading:13px;line-height:13px}.ape\:leading-\[14px\]{--tw-leading:14px;line-height:14px}.ape\:leading-\[15px\]{--tw-leading:15px;line-height:15px}.ape\:leading-\[18px\]{--tw-leading:18px;line-height:18px}.ape\:leading-\[18px\]\!{--tw-leading:18px!important;line-height:18px!important}.ape\:leading-\[21px\]{--tw-leading:21px;line-height:21px}.ape\:leading-\[22px\]{--tw-leading:22px;line-height:22px}.ape\:leading-\[24px\]{--tw-leading:24px;line-height:24px}.ape\:leading-\[28px\]{--tw-leading:28px;line-height:28px}.ape\:leading-\[30\.26px\]{--tw-leading:30.26px;line-height:30.26px}.ape\:leading-\[33px\]{--tw-leading:33px;line-height:33px}.ape\:font-bold{--tw-font-weight:var(--ape-font-weight-bold);font-weight:var(--ape-font-weight-bold)}.ape\:font-light{--tw-font-weight:var(--ape-font-weight-light);font-weight:var(--ape-font-weight-light)}.ape\:font-medium{--tw-font-weight:var(--ape-font-weight-medium);font-weight:var(--ape-font-weight-medium)}.ape\:font-normal{--tw-font-weight:var(--ape-font-weight-normal);font-weight:var(--ape-font-weight-normal)}.ape\:font-semibold{--tw-font-weight:var(--ape-font-weight-semibold);font-weight:var(--ape-font-weight-semibold)}.ape\:tracking-\[0\]{--tw-tracking:0;letter-spacing:0}.ape\:break-all{word-break:break-all}.ape\:text-ellipsis{text-overflow:ellipsis}.ape\:whitespace-nowrap{white-space:nowrap}.ape\:text-\[\#777\]{color:#777}.ape\:text-error{color:var(--ape-color-error)}.ape\:text-gray-300{color:var(--ape-color-gray-300)}.ape\:text-primary-bright{color:var(--ape-color-primary-bright)}.ape\:text-primary-button{color:var(--ape-color-primary-button)}.ape\:text-primary-button-disable{color:var(--ape-color-primary-button-disable)}.ape\:text-success{color:var(--ape-color-success)}.ape\:text-text{color:var(--ape-color-text)}.ape\:text-text-disabled{color:var(--ape-color-text-disabled)}.ape\:text-text-disabled-button{color:var(--ape-color-text-disabled-button)}.ape\:text-transparent{color:#0000}.ape\:text-white{color:var(--ape-color-white)}.ape\:capitalize{text-transform:capitalize}.ape\:normal-case{text-transform:none}.ape\:uppercase{text-transform:uppercase}.ape\:line-through{text-decoration-line:line-through}.ape\:no-underline{text-decoration-line:none}.ape\:underline{text-decoration-line:underline}.ape\:opacity-0{opacity:0}.ape\:opacity-20{opacity:.2}.ape\:opacity-50{opacity:.5}.ape\:opacity-60{opacity:.6}.ape\:opacity-70{opacity:.7}.ape\:opacity-80{opacity:.8}.ape\:opacity-90{opacity:.9}.ape\:shadow-\[0px_1px_4px_rgb\(0_0_0\/0\.16\)\]{--tw-shadow:0px 1px 4px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:shadow-\[rgba\(0\,0\,0\,0\.16\)_0px_1px_4px\]{--tw-shadow-color:#00000029}@supports (color:color-mix(in lab, red, red)){.ape\:shadow-\[rgba\(0\,0\,0\,0\.16\)_0px_1px_4px\]{--tw-shadow-color:color-mix(in oklab, #00000029 0px 1px 4px var(--tw-shadow-alpha), transparent)}}.ape\:blur-\[1px\]{--tw-blur:blur(1px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.ape\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ape-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ape-default-transition-duration))}.ape\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ape\:duration-500{--tw-duration:.5s;transition-duration:.5s}.ape\:duration-1000{--tw-duration:1s;transition-duration:1s}.ape\:duration-\[1500ms\]{--tw-duration:1.5s;transition-duration:1.5s}.ape\:ease-\[ease\]{--tw-ease:ease;transition-timing-function:ease}.ape\:ease-in-out{--tw-ease:var(--ape-ease-in-out);transition-timing-function:var(--ape-ease-in-out)}.ape\:ease-linear{--tw-ease:linear;transition-timing-function:linear}.ape\:ease-out{--tw-ease:var(--ape-ease-out);transition-timing-function:var(--ape-ease-out)}.ape\:outline-none{--tw-outline-style:none;outline-style:none}.ape\:select-none{-webkit-user-select:none;user-select:none}.ape\:\[-webkit-text-fill-color\:transparent\]{-webkit-text-fill-color:transparent}@media (hover:hover){.ape\:group-hover\:bg-\[rgb\(20_18_29_\/_0\.25\)\]\!:is(:where(.ape\:group):hover *){background-color:#14121d40!important}.ape\:group-hover\/tooltip\:block:is(:where(.ape\:group\/tooltip):hover *){display:block}}.ape\:peer-checked\:block:is(:where(.ape\:peer):checked~*){display:block}.ape\:first\:rounded-t-normal:first-child{border-top-left-radius:var(--ape-radius-normal);border-top-right-radius:var(--ape-radius-normal)}.ape\:last\:mr-0:last-child{margin-right:0}.ape\:last\:rounded-b-normal:last-child{border-bottom-right-radius:var(--ape-radius-normal);border-bottom-left-radius:var(--ape-radius-normal)}.ape\:checked\:border-primary-button:checked{border-color:var(--ape-color-primary-button)}.ape\:checked\:bg-primary-button:checked{background-color:var(--ape-color-primary-button)}@media (hover:hover){.ape\:hover\:z-\[1000\]:hover{z-index:1000}.ape\:hover\:cursor-pointer:hover{cursor:pointer}.ape\:hover\:bg-\[rgb\(20_18_29_\/_0\.36\)\]\!:hover{background-color:#14121d5c!important}.ape\:hover\:bg-white3:hover{background-color:var(--ape-color-white3)}.ape\:hover\:bg-white4:hover{background-color:var(--ape-color-white4)}.ape\:hover\:bg-white5:hover{background-color:var(--ape-color-white5)}.ape\:hover\:underline:hover{text-decoration-line:underline}.ape\:hover\:opacity-60:hover{opacity:.6}.ape\:hover\:opacity-80:hover{opacity:.8}.ape\:hover\:opacity-90:hover{opacity:.9}.ape\:hover\:brightness-115:hover{--tw-brightness:brightness(115%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.ape\:hover\:\[backdrop-filter\:blur\(2px\)\]:hover{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.ape\:hover\:\[background\:linear-gradient\(90deg\,rgba\(49\,46\,122\,0\.70\)_0\%\,rgba\(92\,79\,174\,0\.70\)_100\%\)\]:hover{background:linear-gradient(90deg,#312e7ab3 0%,#5c4faeb3 100%)}}.ape\:focus\:outline:focus,.ape\:focus\:outline-1:focus{outline-style:var(--tw-outline-style);outline-width:1px}.ape\:focus\:outline-primary-button:focus{outline-color:var(--ape-color-primary-button)}.ape\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.ape\:focus\:not-checked\:shadow-none:focus:not(:checked){--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ape\:focus\:not-checked\:outline-none:focus:not(:checked){--tw-outline-style:none;outline-style:none}.ape\:active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}@media (hover:hover){.ape\:enabled\:hover\:border-primary-button-hovered:enabled:hover{border-color:var(--ape-color-primary-button-hovered)}.ape\:enabled\:hover\:bg-primary-button:enabled:hover{background-color:var(--ape-color-primary-button)}.ape\:enabled\:hover\:bg-primary-button-hovered:enabled:hover{background-color:var(--ape-color-primary-button-hovered)}.ape\:enabled\:hover\:text-text:enabled:hover{color:var(--ape-color-text)}.ape\:enabled\:hover\:not-checked\:border-primary-button:enabled:hover:not(:checked){border-color:var(--ape-color-primary-button)}}.ape\:active\:enabled\:scale-90:active:enabled{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.ape\:disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ape\:disabled\:border-transparent:disabled{border-color:#0000}.ape\:disabled\:bg-white3:disabled{background-color:var(--ape-color-white3)}.ape\:disabled\:text-primary-button-disable:disabled{color:var(--ape-color-primary-button-disable)}.ape\:disabled\:text-text-disabled-button:disabled{color:var(--ape-color-text-disabled-button)}.ape\:disabled\:opacity-90:disabled{opacity:.9}@media not all and (min-width:1000px){.ape\:max-\[1000px\]\:w-\[49\%\]{width:49%}}@media not all and (min-width:852px){.ape\:max-md\:mb-\[10px\]{margin-bottom:10px}}@media not all and (min-width:768px){.ape\:max-\[768px\]\:w-full{width:100%}}@media not all and (min-width:576px){.ape\:max-sm\:mb-\[10px\]{margin-bottom:10px}.ape\:max-sm\:w-1\/2{width:50%}.ape\:max-sm\:w-\[55\%\]{width:55%}.ape\:max-sm\:text-\[12px\]{font-size:12px}.ape\:max-sm\:text-\[18px\]{font-size:18px}.ape\:max-sm\:leading-\[14px\]{--tw-leading:14px;line-height:14px}.ape\:max-sm\:leading-\[21px\]{--tw-leading:21px;line-height:21px}}@media (min-width:513px){.ape\:min-\[513px\]\:justify-center{justify-content:center}.ape\:min-\[513px\]\:pl-0{padding-left:0}}@media (min-width:576px){.ape\:sm\:top-\[-240px\]{top:-240px}.ape\:sm\:ml-2{margin-left:calc(var(--ape-spacing) * 2)}.ape\:sm\:ml-5{margin-left:calc(var(--ape-spacing) * 5)}.ape\:sm\:max-w-\[190px\]{max-width:190px}.ape\:sm\:justify-start{justify-content:flex-start}.ape\:sm\:text-\[16px\]\!{font-size:16px!important}}@media (min-width:800px){.ape\:min-\[800px\]\:max-h-none{max-height:none}.ape\:min-\[800px\]\:w-\[350px\]{width:350px}.ape\:min-\[800px\]\:flex-col{flex-direction:column}.ape\:min-\[800px\]\:flex-row{flex-direction:row}.ape\:min-\[800px\]\:gap-\[5px\]{gap:5px}.ape\:min-\[800px\]\:p-\[12px\]{padding:12px}.ape\:min-\[800px\]\:p-\[20px\]{padding:20px}.ape\:min-\[800px\]\:pb-\[5px\]{padding-bottom:5px}@media not all and (min-width:1000px){.ape\:min-\[800px\]\:max-\[1000px\]\:bg-bottom{background-position:bottom}}}@media (min-width:852px){.ape\:md\:top-\[20px\]{top:20px}.ape\:md\:top-\[unset\]{top:unset}.ape\:md\:right-\[-13\%\]{right:-13%}.ape\:md\:right-\[-50px\]{right:-50px}.ape\:md\:-bottom-12\.5{bottom:calc(var(--ape-spacing) * -12.5)}.ape\:md\:bottom-\[-15px\]{bottom:-15px}.ape\:md\:bottom-\[unset\]{bottom:unset}.ape\:md\:mt-0{margin-top:0}.ape\:md\:mt-\[5px\]{margin-top:5px}.ape\:md\:mr-\[15px\]{margin-right:15px}.ape\:md\:mb-0{margin-bottom:0}.ape\:md\:ml-\[5px\]{margin-left:5px}.ape\:md\:block{display:block}.ape\:md\:flex{display:flex}.ape\:md\:flex\!{display:flex!important}.ape\:md\:hidden{display:none}.ape\:md\:hidden\!{display:none!important}.ape\:md\:h-\[200px\]{height:200px}.ape\:md\:h-\[225px\]{height:225px}.ape\:md\:max-h-\[350px\]{max-height:350px}.ape\:md\:min-h-\[430px\]{min-height:430px}.ape\:md\:w-1\/2{width:50%}.ape\:md\:w-87\.5{width:calc(var(--ape-spacing) * 87.5)}.ape\:md\:w-175{width:calc(var(--ape-spacing) * 175)}.ape\:md\:w-\[35\%\]{width:35%}.ape\:md\:w-\[150px\]{width:150px}.ape\:md\:w-\[180px\]{width:180px}.ape\:md\:w-\[200px\]{width:200px}.ape\:md\:w-\[225px\]{width:225px}.ape\:md\:w-\[300px\]{width:300px}.ape\:md\:w-\[calc\(100\%-300px\)\]{width:calc(100% - 300px)}.ape\:md\:w-\[unset\]{width:unset}.ape\:md\:w-full{width:100%}.ape\:md\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:-translate-y-3\/4{--tw-translate-y:calc(calc(3 / 4 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ape\:md\:scale-\[0\.4\]{scale:.4}.ape\:md\:flex-col{flex-direction:column}.ape\:md\:flex-row,.ape\:min-md\:flex-row{flex-direction:row}.ape\:md\:justify-end{justify-content:flex-end}.ape\:md\:gap-\[15px\]{gap:15px}.ape\:min-md\:gap-\[5px\]{gap:5px}.ape\:md\:rounded-\[20px\]{border-radius:20px}.ape\:md\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:md\:p-3{padding:calc(var(--ape-spacing) * 3)}.ape\:md\:p-5{padding:calc(var(--ape-spacing) * 5)}.ape\:md\:p-\[4px_10px\]{padding:4px 10px}.ape\:md\:p-\[20px\]{padding:20px}.ape\:md\:pr-\[20px\]{padding-right:20px}.ape\:md\:pb-1\.25{padding-bottom:calc(var(--ape-spacing) * 1.25)}.ape\:min-md\:pb-\[5px\]{padding-bottom:5px}.ape\:md\:pl-\[20px\]{padding-left:20px}.ape\:md\:text-\[12px\]\!{font-size:12px!important}.ape\:md\:text-\[14px\]{font-size:14px}.ape\:md\:text-\[14px\]\!{font-size:14px!important}.ape\:md\:text-\[16px\]{font-size:16px}.ape\:md\:text-\[18px\]{font-size:18px}.ape\:md\:text-\[20px\]{font-size:20px}.ape\:md\:text-\[24px\]{font-size:24px}.ape\:min-md\:text-\[16px\]{font-size:16px}.ape\:md\:leading-\[21px\]\!{--tw-leading:21px!important;line-height:21px!important}.ape\:md\:font-bold{--tw-font-weight:var(--ape-font-weight-bold);font-weight:var(--ape-font-weight-bold)}@media (hover:hover){.ape\:md\:hover\:z-\[1000\]\!:hover{z-index:1000!important}}}@media (min-width:968px){.ape\:lg\:mt-0{margin-top:0}.ape\:lg\:mr-\[10px\]{margin-right:10px}.ape\:lg\:mr-\[15px\]{margin-right:15px}.ape\:lg\:mb-0{margin-bottom:0}.ape\:lg\:ml-0{margin-left:0}.ape\:lg\:ml-\[10px\]{margin-left:10px}.ape\:lg\:flex{display:flex}.ape\:lg\:inline{display:inline}.ape\:lg\:h-\[40px\]{height:40px}.ape\:lg\:w-1\/2{width:50%}.ape\:lg\:w-\[30\%\]{width:30%}.ape\:lg\:w-\[35\%\]{width:35%}.ape\:lg\:w-\[45\%\]{width:45%}.ape\:lg\:w-\[65\%\]{width:65%}.ape\:lg\:w-\[unset\]{width:unset}.ape\:lg\:w-auto{width:auto}.ape\:lg\:max-w-\[calc\(100\%-35px\)\]{max-width:calc(100% - 35px)}.ape\:lg\:min-w-75\!{min-width:calc(var(--ape-spacing) * 75)!important}.ape\:lg\:min-w-100{min-width:calc(var(--ape-spacing) * 100)}.ape\:lg\:flex-row{flex-direction:row}.ape\:lg\:items-center{align-items:center}.ape\:lg\:gap-\[10px\]{gap:10px}.ape\:lg\:gap-\[15px\]{gap:15px}.ape\:lg\:overflow-visible{overflow:visible}.ape\:lg\:rounded-normal{border-radius:var(--ape-radius-normal)}.ape\:lg\:bg-white4{background-color:var(--ape-color-white4)}.ape\:lg\:bg-\[image\:var\(--banner-bg-desktop\)\]{background-image:var(--banner-bg-desktop)}.ape\:lg\:px-\[10px\]{padding-inline:10px}.ape\:lg\:pr-\[20px\]{padding-right:20px}.ape\:lg\:pb-\[20px\]{padding-bottom:20px}.ape\:lg\:text-\[16px\]\!{font-size:16px!important}.ape\:lg\:leading-6\!{--tw-leading:calc(var(--ape-spacing) * 6)!important;line-height:calc(var(--ape-spacing) * 6)!important}}@media (min-width:1000px){.ape\:min-\[1000px\]\:absolute{position:absolute}.ape\:min-\[1000px\]\:left-\[10px\]{left:10px}.ape\:min-\[1000px\]\:mt-0{margin-top:0}.ape\:min-\[1000px\]\:flex{display:flex}.ape\:min-\[1000px\]\:hidden{display:none}.ape\:min-\[1000px\]\:h-\[70px\]{height:70px}.ape\:min-\[1000px\]\:w-\[30\%\]{width:30%}.ape\:min-\[1000px\]\:w-\[70\%\]{width:70%}.ape\:min-\[1000px\]\:w-\[130px\]{width:130px}.ape\:min-\[1000px\]\:w-\[210px\]{width:210px}.ape\:min-\[1000px\]\:w-\[300px\]{width:300px}.ape\:min-\[1000px\]\:min-w-\[300px\]{min-width:300px}.ape\:min-\[1000px\]\:flex-row{flex-direction:row}.ape\:min-\[1000px\]\:justify-between{justify-content:space-between}.ape\:min-\[1000px\]\:justify-center{justify-content:center}.ape\:min-\[1000px\]\:justify-end{justify-content:flex-end}.ape\:min-\[1000px\]\:p-0{padding:0}.ape\:min-\[1000px\]\:p-\[20px_0_10px_0\]{padding:20px 0 10px}.ape\:min-\[1000px\]\:pr-\[20px\]{padding-right:20px}}@media (min-width:1080px){.ape\:xl\:flex{display:flex}.ape\:xl\:w-\[30\%\]{width:30%}.ape\:xl\:w-\[70\%\]{width:70%}.ape\:xl\:w-\[100px\]{width:100px}.ape\:xl\:w-\[115px\]{width:115px}.ape\:xl\:w-\[135px\]{width:135px}.ape\:xl\:min-w-\[400px\]{min-width:400px}.ape\:xl\:flex-row{flex-direction:row}.ape\:xl\:justify-between{justify-content:space-between}.ape\:xl\:gap-\[30px\]{gap:30px}.ape\:xl\:p-\[20px_0_10px_0\]{padding:20px 0 10px}}@media (min-width:1200px){.ape\:xxl\:flex{display:flex}}.ape\:\[\&_\*\]\:text-\[14px\]\! *{font-size:14px!important}.ape\:\[\&_\*\]\:text-\[18px\]\! *{font-size:18px!important}.ape\:\[\&_\*\]\:text-\[24px\]\! *{font-size:24px!important}.ape\:\[\&_button\]\:ml-auto button,.ape\:\[\&_svg\]\:ml-auto svg{margin-left:auto}.ape\:\[\&_svg\]\:w-\[11px\] svg{width:11px}.ape\:\[\&_svg\]\:cursor-pointer svg{cursor:pointer}.ape\:\[\&_svg\]\:bg-transparent svg{background-color:#0000}.ape\:\[\&_svg\]\:fill-text svg{fill:var(--ape-color-text)}.ape\:\[\&\:\:-webkit-scrollbar\]\:h-\[5px\]::-webkit-scrollbar{height:5px}.ape\:\[\&\>\*\]\:h-\[31px\]\!>*{height:31px!important}.ape\:\[\&\>\*\]\:w-\[210px\]>*{width:210px}.ape\:\[\&\>\*\]\:text-\[14px\]\!>*{font-size:14px!important}@media (min-width:1080px){.ape\:xl\:\[\&\>\*\]\:w-\[100px\]>*{width:100px}}.ape\:\[\&\>div\]\:pt-0\!>div{padding-top:0!important}.ape\:\[\&\>div\:last-child\]\:mr-0>div:last-child{margin-right:0}.ape\:\[\&\>div\>div\]\:bg-white2>div>div{background-color:var(--ape-color-white2)}}.ape-root .lifi-bridge-modal [id^=widget-scrollable-container]{overflow-y:hidden!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "7.0.0-test.0",
6
+ "version": "7.0.0-test.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -123,6 +123,8 @@
123
123
  "verify:no-sui:dev": "node scripts/verify-fixture.mjs no-sui --dev",
124
124
  "verify:no-aptos:build": "node scripts/verify-fixture.mjs no-aptos",
125
125
  "verify:no-aptos:dev": "node scripts/verify-fixture.mjs no-aptos --dev",
126
+ "verify:with-lifi:build": "node scripts/verify-fixture.mjs with-lifi",
127
+ "verify:with-lifi:dev": "node scripts/verify-fixture.mjs with-lifi --dev",
126
128
  "prepare": "husky"
127
129
  },
128
130
  "lint-staged": {