@luno-kit/ui 0.0.12-beta.2 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/components/AccountDetailsModal/index.tsx","../src/assets/icons/Arrow.tsx","../src/assets/icons/Back.tsx","../src/assets/icons/Close.tsx","../src/assets/icons/Coin.tsx","../src/assets/icons/Copy.tsx","../src/assets/icons/DefaultNFT.tsx","../src/assets/icons/Disconnect.tsx","../src/assets/icons/EmptyWallet.tsx","../src/assets/icons/Link.tsx","../src/assets/icons/List.tsx","../src/assets/icons/Search.tsx","../src/assets/icons/Success.tsx","../src/assets/icons/Switch.tsx","../src/hooks/useAnimatedViews.ts","../src/theme/context.tsx","../src/hooks/useCSSVariableInjection.ts","../src/providers/LunoKitProvider.tsx","../src/providers/ModalContext.tsx","../src/utils/cs.ts","../src/utils/debounce.ts","../src/components/Copy/index.tsx","../src/components/Dialog/index.tsx","../src/components/AssetList/index.tsx","../src/components/AssetList/NFTList.tsx","../src/hooks/useSubscanTokens.ts","../src/components/AssetList/EmptyAsset.tsx","../src/components/AssetList/TokenList.tsx","../src/components/Icon/index.tsx","../src/components/AccountDetailsModal/AssetListView.tsx","../src/components/AccountDetailsModal/MainView.tsx","../src/components/AccountDetailsModal/SwitchAccountView.tsx","../src/components/ChainList/index.tsx","../src/components/AccountDetailsModal/SwitchChainView.tsx","../src/components/ChainModal/index.tsx","../src/components/ConnectButton/index.tsx","../src/hooks/useConnectButton.ts","../src/hooks/useWindowSize.ts","../src/components/ConnectModal/index.tsx","../src/utils/renderAppInfo.tsx","../src/components/ConnectModal/ConnectOptions.tsx","../src/components/ConnectModal/WalletView.tsx","../src/components/QRCode/index.tsx","../src/components/SpiralAnimation/index.tsx"],"sourcesContent":["export { ConnectButton } from './components';\nexport * from './providers';\n","import { useAccount, useActiveConnector } from '@luno-kit/react';\nimport type { Optional } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useCallback, useMemo } from 'react';\nimport { Back, Close } from '../../assets/icons';\nimport { useAnimatedViews } from '../../hooks/useAnimatedViews';\nimport { useAccountModal } from '../../providers';\nimport { cs } from '../../utils';\nimport { Copy } from '../Copy';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer } from '../Dialog';\nimport { AssetListView } from './AssetListView';\nimport { MainView } from './MainView';\nimport { SwitchAccountView } from './SwitchAccountView';\nimport { SwitchChainView } from './SwitchChainView';\n\nexport enum AccountModalView {\n main = 'main',\n switchAccount = 'switchAccount',\n switchChain = 'switchChain',\n assetList = 'assetList',\n}\n\ninterface AccountDetailsModalProps {\n container?: Optional<ModalContainer>;\n}\n\nexport const AccountDetailsModal: React.FC<AccountDetailsModalProps> = ({ container }) => {\n const { isOpen, close } = useAccountModal();\n const { address, account } = useAccount();\n const activeConnector = useActiveConnector();\n\n const { currentView, containerRef, currentViewRef, handleViewChange, resetView } =\n useAnimatedViews({ initialView: AccountModalView.main });\n\n const handleModalClose = useCallback(() => {\n close();\n resetView();\n }, [close]);\n\n const viewTitle = useMemo(() => {\n if (currentView === AccountModalView.switchAccount) return SwitchAccountView.title;\n if (currentView === AccountModalView.switchChain) return SwitchChainView.title;\n if (currentView === AccountModalView.assetList) return AssetListView.title;\n return null;\n }, [currentView]);\n\n const viewComponents = useMemo(\n () => ({\n [AccountModalView.main]: (\n <MainView onViewChange={handleViewChange} onModalClose={handleModalClose} />\n ),\n [AccountModalView.switchAccount]: (\n <SwitchAccountView onBack={() => handleViewChange(AccountModalView.main)} />\n ),\n [AccountModalView.switchChain]: (\n <SwitchChainView onBack={() => handleViewChange(AccountModalView.main)} />\n ),\n [AccountModalView.assetList]: <AssetListView />,\n }),\n [handleViewChange, handleModalClose]\n );\n\n return (\n <Dialog open={isOpen} onOpenChange={handleModalClose} container={container}>\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:w-full luno:md:w-[360px] luno:max-h-[512px] luno:text-modalText',\n 'luno:bg-modalBackground luno:shadow-modal',\n currentView === AccountModalView.main ? 'luno:gap-5' : 'luno:gap-3.5'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:items-stretch luno:justify-between luno:w-full luno:px-4 luno:pt-4'\n )}\n >\n {currentView === AccountModalView.main ? (\n <div className={cs('luno:flex luno:items-center luno:gap-3 luno:max-w-[80%]')}>\n {activeConnector?.icon && (\n <div\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[40px] luno:h-[40px] luno:shrink-0'\n )}\n >\n <img\n src={activeConnector.icon}\n alt=\"luno\"\n className={cs('luno:w-full luno:h-full luno:object-contain')}\n />\n </div>\n )}\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-start luno:gap-1.5 luno:max-w-full'\n )}\n >\n <DialogTitle className={'luno:sr-only'}>Account Details</DialogTitle>\n <div className={cs('luno:flex luno:items-center luno:gap-0.5 luno:w-full')}>\n <span className={cs('luno:text-base luno:text-modalText luno:font-semibold')}>\n {formatAddress(address)}\n </span>\n <Copy copyText={address} />\n </div>\n <div\n className={cs(\n 'luno:text-sm luno:leading-sm luno:text-modalTextSecondary luno:font-medium luno:text-ellipsis luno:overflow-hidden luno:whitespace-nowrap',\n account?.name && account?.name.length > 30 ? 'luno:w-[90%]' : ''\n )}\n >\n {account?.name || activeConnector?.name}\n </div>\n </div>\n </div>\n ) : (\n <>\n <button\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[30px] luno:h-[30px] luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n )}\n onClick={() => handleViewChange(AccountModalView.main)}\n aria-label=\"Back\"\n >\n <Back />\n </button>\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300'\n )}\n >\n {viewTitle}\n </DialogTitle>\n </>\n )}\n\n <DialogClose\n className={cs(\n 'luno:shrink-0 luno:z-10 luno:flex luno:items-center luno:justify-center luno:h-[30px] luno:w-[30px] luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200 luno:cursor-pointer'\n )}\n >\n <Close />\n </DialogClose>\n </div>\n\n <div ref={containerRef} className={cs('luno:relative')}>\n <div ref={currentViewRef}>{viewComponents[currentView]}</div>\n </div>\n </div>\n </Dialog>\n );\n};\n","import type { SVGProps } from 'react';\n\nconst SvgArrow = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"arrow_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z\"></path>\n </svg>\n);\nexport default SvgArrow;\n","import type { SVGProps } from 'react';\n\nconst SvgBack = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z\"></path>\n </svg>\n);\nexport default SvgBack;\n","import type { SVGProps } from 'react';\n\nconst SvgClose = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z\"></path>\n </svg>\n);\nexport default SvgClose;\n","import type { SVGProps } from 'react';\n\nconst SvgCoin = (props: SVGProps<SVGSVGElement>) => (\n <svg\n className=\"icon\"\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"13294\"\n width=\"100%\"\n height=\"100%\"\n {...props}\n >\n <path\n d=\"M170.837333 263.338667c-55.893333 25.173333-74.837333 53.333333-74.837333 72.661333 0 19.328 18.944 47.488 74.837333 72.661333 52.906667 23.808 128.256 39.338667 213.162667 39.338667 84.906667 0 160.256-15.530667 213.12-39.338667 55.893333-25.173333 74.88-53.333333 74.88-72.661333 0-19.328-18.944-47.488-74.88-72.661333C544.213333 239.573333 468.906667 224 384 224c-84.906667 0-160.256 15.573333-213.162667 39.338667zM144.64 205.013333C207.530667 176.64 292.181333 160 384 160c91.818667 0 176.469333 16.682667 239.402667 45.013333 59.904 26.922667 112.597333 70.826667 112.597333 130.986667s-52.693333 104.021333-112.597333 130.986667C560.469333 495.36 475.818667 512 384 512c-91.818667 0-176.469333-16.682667-239.402667-45.013333C84.693333 440.021333 32 396.16 32 336s52.693333-104.064 112.597333-130.986667z\"\n fill=\"currentColor\"\n p-id=\"13295\"\n ></path>\n <path\n d=\"M64 304a32 32 0 0 1 32 32v160c0 19.370667 18.944 47.530667 74.837333 72.661333 52.906667 23.808 128.213333 39.338667 213.162667 39.338667 84.949333 0 160.298667-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333v-160a32 32 0 0 1 64 0v160c0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.330667-147.626667 44.970667-239.445333 44.970667-91.861333 0-176.512-16.64-239.445333-44.970667C84.650667 600.064 32 556.202667 32 496v-160a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13296\"\n ></path>\n <path\n d=\"M256 436.010667a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0v-160a32 32 0 0 1 32-32zM672.128 383.829333a32 32 0 0 1 34.858667-28.885333c75.946667 7.082667 144.469333 25.813333 195.072 53.333333 48.810667 26.581333 89.941333 66.773333 89.941333 119.722667 0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.288-147.626667 44.970667-239.445333 44.970667-81.621333 0-157.482667-13.269333-217.173333-35.626667a32 32 0 1 1 22.4-59.946666c51.456 19.242667 119.594667 31.573333 194.773333 31.573333 84.949333 0 160.256-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333 0-16.64-13.866667-40.277333-56.533333-63.488-40.96-22.272-100.437333-39.338667-170.453334-45.866667a32 32 0 0 1-28.885333-34.816z\"\n fill=\"currentColor\"\n p-id=\"13297\"\n ></path>\n <path\n d=\"M960 496a32 32 0 0 1 32 32v160c0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.288-147.626667 44.970667-239.445333 44.970667-91.861333 0-176.512-16.64-239.445333-44.970667-59.904-26.965333-112.554667-70.826667-112.554667-131.029333v-50.773333a32 32 0 0 1 64 0v50.773333c0 19.370667 18.944 47.530667 74.837333 72.661333 52.906667 23.808 128.213333 39.338667 213.162667 39.338667 84.949333 0 160.298667-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333v-160a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13298\"\n ></path>\n <path\n d=\"M768 628.010667a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0v-160a32 32 0 0 1 32-32zM512 436.010667a32 32 0 0 1 32 32v352a32 32 0 0 1-64 0v-352a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13299\"\n ></path>\n </svg>\n);\nexport default SvgCoin;\n","import type { SVGProps } from 'react';\n\nconst SvgCopy = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"copy_svg__icon\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z\"></path>\n </svg>\n);\nexport default SvgCopy;\n","import type { SVGProps } from 'react';\n\nconst SvgDefaultNFT = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n p-id=\"8135\"\n width=\"256\"\n height=\"256\"\n {...props}\n >\n <path\n d=\"M512 64L126.26 286.74l-2.26 1.31v448L512 960l385.74-222.74L900 736V288z m353.3 652L512 920 158.7 716V308L512 104l353.3 204z\"\n p-id=\"8136\"\n fill=\"currentColor\"\n />\n <path\n d=\"M314.55 589.97l-79.49-272.91-27.3 15.82v358.24l34.65 20.05V466.46l85.64 294.07 21.15 12.19V251.18l-34.65 20.05v318.74zM403.1 803.85l34.65 20.05V529.33h186.88v-34.66H437.75v-244.5l74.05-45.03 124.92 79.79 18.64-29.22-143.16-91.37-109.1 66.29v573.22zM724.36 338.72v405.49l34.66-20.05V360.28l60.24 37.38v-40.8l-149.2-92.79-18.33 29.42 72.63 45.23z\"\n p-id=\"8137\"\n fill=\"currentColor\"\n />\n </svg>\n);\nexport default SvgDefaultNFT;\n","import type { SVGProps } from 'react';\n\nconst SvgDisconnect = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n {...props}\n >\n <path d=\"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z\"></path>\n </svg>\n);\nexport default SvgDisconnect;\n","import type { SVGProps } from 'react';\n\nconst SvgEmptyWallet = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 38 38\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M18.273 1.51489L3.90896 10.5424C2.41176 11.443 1.77589 12.1511 2.00136 12.6666H29.374L24.7431 3.04502C23.4245 0.849886 20.52 0.163352 18.273 1.51489ZM16.3185 12.54L6.91729 10.8844L19.5776 3.68595C20.5998 3.07162 21.9184 3.38322 22.5188 4.38262L25.8084 10.8844L16.3185 12.54Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M31.9757 10.1333H6.02426C3.401 10.1333 1.26666 12.217 1.26666 14.7782V33.3551C1.26666 35.9163 3.401 38 6.02426 38H31.9757C34.599 38 36.7333 35.9163 36.7333 33.3551V14.7782C36.7333 12.217 34.599 10.1333 31.9757 10.1333ZM34.1379 27.0218H24.624C22.9545 27.0218 21.5967 25.6956 21.5967 24.0666C21.5967 22.4377 22.9545 21.1115 24.624 21.1115H34.1392V27.0218H34.1379ZM34.1379 18.5782H24.624C21.5219 18.5782 19 21.0393 19 24.0666C19 27.094 21.5219 29.5551 24.6227 29.5551H34.1379V33.3551C34.1379 34.5204 33.1677 35.4666 31.9757 35.4666H6.02426C4.83233 35.4666 3.86206 34.5204 3.86206 33.3551V14.7782C3.86206 13.6128 4.83233 12.6666 6.02426 12.6666H31.9757C33.1677 12.6666 34.1379 13.6128 34.1379 14.7782V18.5782ZM23.3257 24.0666C23.3257 24.9989 24.0996 25.7551 25.0547 25.7551C26.011 25.7551 26.7849 24.9989 26.7849 24.0666C26.7849 23.1344 26.011 22.3782 25.0547 22.3782C24.0996 22.3782 23.3257 23.1344 23.3257 24.0666Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default SvgEmptyWallet;\n","import type { SVGProps } from 'react';\n\nconst SvgLink = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 256 256\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\nexport default SvgLink;\n","import type { SVGProps } from 'react';\n\nconst SvgList = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"list_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232,48V88a8,8,0,0,1-16,0V56H184a8,8,0,0,1,0-16h40A8,8,0,0,1,232,48ZM72,200H40V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16Zm152-40a8,8,0,0,0-8,8v32H184a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,224,160ZM32,96a8,8,0,0,0,8-8V56H72a8,8,0,0,0,0-16H32a8,8,0,0,0-8,8V88A8,8,0,0,0,32,96ZM188,167l-56,32a8,8,0,0,1-7.94,0L68,167A8,8,0,0,1,64,160V96a8,8,0,0,1,4-7l56-32a8,8,0,0,1,7.94,0l56,32a8,8,0,0,1,4,7v64A8,8,0,0,1,188,167ZM88.12,96,128,118.79,167.88,96,128,73.21ZM80,155.36l40,22.85V132.64L80,109.79Zm96,0V109.79l-40,22.85v45.57Z\"></path>\n </svg>\n);\nexport default SvgList;\n","import type { SVGProps } from 'react';\n\nconst SvgArrow = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"search_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z\"></path>\n {/* <path d=\"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z\"></path> */}\n </svg>\n);\nexport default SvgArrow;\n","import type { SVGProps } from 'react';\n\nconst SvgSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"success_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z\"></path>\n </svg>\n);\nexport default SvgSuccess;\n","import type { SVGProps } from 'react';\n\nconst SvgSwitch = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n className=\"switch_svg__icon\"\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M253.66,133.66l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L216,132.69V128A88,88,0,0,0,56.49,76.67a8,8,0,0,1-13-9.34A104,104,0,0,1,232,128v4.69l10.34-10.35a8,8,0,0,1,11.32,11.32Zm-41.18,55A104,104,0,0,1,24,128v-4.69L13.66,133.66A8,8,0,0,1,2.34,122.34l24-24a8,8,0,0,1,11.32,0l24,24a8,8,0,0,1-11.32,11.32L40,123.31V128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.59,79.59,0,0,1,36.08,28.78,89.68,89.68,0,0,0,5.71-7.11,8,8,0,0,1,13,9.34ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a88.2,88.2,0,0,0,53.92-18.49,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z\"></path>\n </svg>\n);\nexport default SvgSwitch;\n","import type React from 'react';\nimport { useCallback, useRef, useState } from 'react';\n\ninterface UseAnimatedViewsProps<T> {\n initialView: T;\n animationDuration?: number;\n animationEasing?: string;\n}\n\ninterface UseAnimatedViewsReturn<T> {\n currentView: T;\n isAnimating: boolean;\n containerRef: React.RefObject<HTMLDivElement>;\n currentViewRef: React.RefObject<HTMLDivElement>;\n handleViewChange: (view: T) => void;\n resetView: () => void;\n}\n\nexport function useAnimatedViews<T>({\n initialView,\n animationDuration = 200,\n animationEasing = 'ease-out',\n}: UseAnimatedViewsProps<T>): UseAnimatedViewsReturn<T> {\n const [currentView, setCurrentView] = useState<T>(initialView);\n const [isAnimating, setIsAnimating] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n const currentViewRef = useRef<HTMLDivElement>(null);\n\n const handleViewChange = useCallback(\n (view: T) => {\n if (view === currentView || isAnimating) return;\n\n setIsAnimating(true);\n\n if (!containerRef.current) {\n setCurrentView(view);\n setIsAnimating(false);\n return;\n }\n\n const container = containerRef.current;\n const currentHeight = container.offsetHeight;\n\n setCurrentView(view);\n\n requestAnimationFrame(() => {\n if (!container || !currentViewRef.current) {\n setIsAnimating(false);\n return;\n }\n\n const newHeight = currentViewRef.current.offsetHeight;\n\n container\n .animate([{ height: `${currentHeight}px` }, { height: `${newHeight}px` }], {\n duration: animationDuration,\n easing: animationEasing,\n fill: 'forwards',\n })\n .addEventListener('finish', () => {\n setIsAnimating(false);\n });\n });\n },\n [currentView, isAnimating, animationDuration, animationEasing]\n );\n\n const resetView = useCallback(() => {\n setCurrentView(initialView);\n setIsAnimating(false);\n }, [initialView]);\n\n return {\n currentView,\n isAnimating,\n containerRef,\n currentViewRef,\n handleViewChange,\n resetView,\n };\n}\n","import type { Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useCSSVariableInjection } from '../hooks/useCSSVariableInjection';\nimport type { LunokitTheme, LunokitThemeOverrides, PartialLunokitTheme, ThemeMode } from './types';\n\n// Theme preference storage\ninterface ThemePreference {\n isAuto: boolean;\n preferredTheme?: Optional<ThemeMode>;\n}\n\nconst THEME_STORAGE_KEY = 'luno.lastThemePreference';\n\nconst saveThemePreference = (preference: ThemePreference) => {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, JSON.stringify(preference));\n } catch (e) {}\n};\n\ninterface ThemeContextValue {\n themeMode: ThemeMode;\n setThemeChoice: (choice: 'light' | 'dark' | 'auto') => void; // User explicit choice\n currentTheme: LunokitTheme | null; // null for default themes\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\ninterface ThemeProviderProps {\n children: ReactNode;\n theme?: Optional<PartialLunokitTheme | LunokitThemeOverrides>;\n}\n\n// Helper function to check if theme is complete or partial\nconst isCompleteTheme = (\n theme: PartialLunokitTheme | LunokitThemeOverrides\n): theme is LunokitTheme => {\n return (\n 'colors' in theme &&\n 'fonts' in theme &&\n 'radii' in theme &&\n 'shadows' in theme &&\n 'blurs' in theme\n );\n};\n\n// Hook to detect system theme\nconst useSystemTheme = () => {\n const [systemTheme, setSystemTheme] = useState<'light' | 'dark'>(() => {\n if (typeof window === 'undefined') return 'light';\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n });\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n\n const updateTheme = (e: MediaQueryListEvent | MediaQueryList) => {\n setSystemTheme(e.matches ? 'dark' : 'light');\n };\n\n updateTheme(mediaQuery);\n mediaQuery.addEventListener('change', updateTheme);\n\n return () => mediaQuery.removeEventListener('change', updateTheme);\n }, []);\n\n return systemTheme;\n};\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n children,\n theme: themeOverrides,\n}) => {\n const systemTheme = useSystemTheme();\n\n const [themeMode, setThemeMode] = useState<ThemeMode>(() => {\n if (typeof window !== 'undefined') {\n try {\n const saved = localStorage.getItem(THEME_STORAGE_KEY);\n if (saved) {\n const preference = JSON.parse(saved);\n if (preference?.isAuto) {\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n } else if (preference?.preferredTheme) {\n return preference.preferredTheme;\n }\n }\n } catch (_e) {\n // Ignore parsing errors\n }\n }\n\n if (!themeOverrides || isCompleteTheme(themeOverrides)) {\n return 'light';\n }\n\n const overrides = themeOverrides as LunokitThemeOverrides;\n return overrides.defaultMode || 'light';\n });\n\n const [isAutoMode, setIsAutoMode] = useState<boolean>(() => {\n if (typeof window !== 'undefined') {\n try {\n const saved = localStorage.getItem(THEME_STORAGE_KEY);\n if (saved) {\n const preference = JSON.parse(saved);\n return preference?.isAuto ?? false;\n }\n } catch (_e) {\n // Ignore parsing errors\n }\n }\n\n if (!themeOverrides || isCompleteTheme(themeOverrides)) {\n return false;\n }\n\n const overrides = themeOverrides as LunokitThemeOverrides;\n return overrides.autoMode ?? false;\n });\n\n // Determine theme type and get relevant data\n const themeInfo = useMemo(() => {\n if (!themeOverrides) {\n return { type: 'default' as const, completeTheme: null, partialOverrides: null };\n }\n\n // Handle complete custom theme\n if (isCompleteTheme(themeOverrides)) {\n return { type: 'complete' as const, completeTheme: themeOverrides, partialOverrides: null };\n }\n\n // Handle theme overrides format\n const overrides = themeOverrides as LunokitThemeOverrides;\n\n // Apply complete theme override (highest priority)\n if (overrides.theme) {\n return { type: 'complete' as const, completeTheme: overrides.theme, partialOverrides: null };\n }\n\n // For partial overrides, get the current mode's overrides\n let partialOverrides: PartialLunokitTheme | null = null;\n if (themeMode === 'light' && overrides.light) {\n partialOverrides = overrides.light;\n } else if (themeMode === 'dark' && overrides.dark) {\n partialOverrides = overrides.dark;\n } else {\n partialOverrides = { ...(overrides as PartialLunokitTheme) };\n }\n\n return { type: 'partial' as const, completeTheme: null, partialOverrides };\n }, [themeMode, themeOverrides]);\n\n // Build current theme for context (only for complete themes)\n const currentTheme = useMemo(() => {\n return themeInfo.type === 'complete' ? themeInfo.completeTheme : null;\n }, [themeInfo]);\n\n // Inject CSS variables to DOM\n useCSSVariableInjection(themeInfo, themeMode);\n\n // User explicit choice handler (saves to storage)\n const setThemeChoice = useCallback(\n (choice: 'light' | 'dark' | 'auto') => {\n const isAuto = choice === 'auto';\n setIsAutoMode(isAuto);\n\n if (isAuto) {\n setThemeMode(systemTheme || 'light');\n } else {\n setThemeMode(choice);\n }\n\n const preference: ThemePreference = {\n isAuto,\n ...(isAuto ? {} : { preferredTheme: choice }),\n };\n\n saveThemePreference(preference);\n },\n [systemTheme]\n );\n\n // Only listen to system theme changes for auto mode\n useEffect(() => {\n if (isAutoMode) {\n setThemeMode(systemTheme || 'light');\n }\n }, [systemTheme, isAutoMode]);\n\n const contextValue = useMemo(\n () => ({\n themeMode,\n setThemeChoice,\n currentTheme,\n }),\n [themeMode, setThemeChoice, currentTheme]\n );\n\n return <ThemeContext.Provider value={contextValue}>{children}</ThemeContext.Provider>;\n};\n\nexport const useLunoTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error(\n 'useLunoTheme must be used within a ThemeProvider (which is part of LunoKitProvider)'\n );\n }\n return context;\n};\n","import { useEffect } from 'react';\nimport type { LunokitTheme, PartialLunokitTheme, ThemeMode } from '../theme/types';\n\n// All theme variable names for cleanup\nconst ALL_THEME_VARS = [\n '--color-accentColor',\n '--color-walletSelectItemBackground',\n '--color-walletSelectItemBackgroundHover',\n '--color-walletSelectItemText',\n '--color-connectButtonBackground',\n '--color-connectButtonInnerBackground',\n '--color-connectButtonText',\n '--color-accountActionItemBackground',\n '--color-accountActionItemBackgroundHover',\n '--color-accountActionItemText',\n '--color-accountSelectItemBackground',\n '--color-accountSelectItemBackgroundHover',\n '--color-accountSelectItemText',\n '--color-currentNetworkButtonBackground',\n '--color-currentNetworkButtonText',\n '--color-networkSelectItemBackground',\n '--color-networkSelectItemBackgroundHover',\n '--color-networkSelectItemText',\n '--color-assetSelectItemBackground',\n '--color-navigationButtonBackground',\n '--color-separatorLine',\n '--color-modalBackground',\n '--color-modalBackdrop',\n '--color-modalBorder',\n '--color-modalText',\n '--color-modalTextSecondary',\n '--color-modalControlButtonBackgroundHover',\n '--color-modalControlButtonText',\n '--color-success',\n '--color-successForeground',\n '--color-warning',\n '--color-warningForeground',\n '--color-error',\n '--color-errorForeground',\n '--color-info',\n '--color-infoForeground',\n '--color-skeleton',\n '--color-defaultIconBackground',\n '--font-body',\n '--radius-walletSelectItem',\n '--radius-connectButton',\n '--radius-modalControlButton',\n '--radius-accountActionItem',\n '--radius-accountSelectItem',\n '--radius-currentNetworkButton',\n '--radius-networkSelectItem',\n '--radius-assetSelectItem',\n '--radius-modal',\n '--radius-modalMobile',\n '--shadow-button',\n '--shadow-modal',\n '--blur-modalOverlay',\n];\n\ninterface ThemeInfo {\n type: 'default' | 'complete' | 'partial';\n completeTheme: LunokitTheme | null;\n partialOverrides: PartialLunokitTheme | null;\n}\n\nexport const useCSSVariableInjection = (themeInfo: ThemeInfo, themeMode: ThemeMode) => {\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const root = document.documentElement;\n\n if (themeInfo.type === 'complete' && themeInfo.completeTheme) {\n // Complete custom theme: inject all variables and remove data-theme\n Object.entries(themeInfo.completeTheme.colors).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--color-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.fonts).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--font-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.radii).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--radius-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.shadows).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--shadow-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.blurs).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--blur-${key}`, value);\n }\n });\n\n // Remove data-theme attribute for complete custom themes\n root.removeAttribute('data-theme');\n } else if (themeInfo.type === 'partial' && themeInfo.partialOverrides) {\n // Partial override: KEEP data-theme and inject only overridden variables\n root.setAttribute('data-theme', themeMode);\n\n // Only clear and inject if there are actual overrides\n const hasOverrides = Object.keys(themeInfo.partialOverrides).length > 0;\n if (hasOverrides) {\n // Clear all custom variables first\n ALL_THEME_VARS.forEach((varName) => {\n root.style.removeProperty(varName);\n });\n\n // Inject only the overridden variables\n if (themeInfo.partialOverrides.colors) {\n Object.entries(themeInfo.partialOverrides.colors).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--color-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.fonts) {\n Object.entries(themeInfo.partialOverrides.fonts).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--font-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.radii) {\n Object.entries(themeInfo.partialOverrides.radii).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--radius-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.shadows) {\n Object.entries(themeInfo.partialOverrides.shadows).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--shadow-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.blurs) {\n Object.entries(themeInfo.partialOverrides.blurs).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--blur-${key}`, value);\n }\n });\n }\n }\n } else {\n // Default theme: just set data-theme and clear custom variables\n root.setAttribute('data-theme', themeMode);\n\n // Clear any previously injected custom variables\n ALL_THEME_VARS.forEach((varName) => {\n root.style.removeProperty(varName);\n });\n }\n }, [themeInfo, themeMode]);\n};\n","import { LunoProvider } from '@luno-kit/react';\nimport type { Config as LunoCoreConfig, Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport type { ReactNode } from 'react';\nimport { AccountDetailsModal, ChainModal, ConnectModal } from '../components';\nimport type { ModalContainer, ModalSize } from '../components/Dialog';\nimport type { LunokitThemeOverrides, PartialLunokitTheme } from '../theme';\nimport { ThemeProvider } from '../theme';\nimport { ModalProvider } from './ModalContext';\n\nexport interface DecorativeImage {\n light: string;\n dark?: Optional<string>;\n}\n\nexport interface PolicyLinks {\n terms: string;\n privacy: string;\n target?: Optional<'_blank' | '_self'>;\n}\n\nexport interface AppInfo {\n decorativeImage?: Optional<DecorativeImage>;\n guideText?: Optional<string>;\n guideLink?: Optional<string>;\n description?: Optional<string>;\n policyLinks?: Optional<PolicyLinks>;\n}\n\nexport interface LunoKitProviderProps {\n children: ReactNode;\n config: LunoCoreConfig & {\n modalSize?: Optional<ModalSize>;\n modalContainer?: Optional<ModalContainer>;\n };\n theme?: Optional<PartialLunokitTheme | LunokitThemeOverrides>;\n appInfo?: Optional<Partial<AppInfo>>;\n}\n\nexport const LunoKitProvider: React.FC<LunoKitProviderProps> = ({\n children,\n config,\n theme,\n appInfo,\n}) => {\n return (\n <LunoProvider config={config}>\n <ThemeProvider theme={theme}>\n <ModalProvider>\n <div>{children}</div>\n <RenderModals\n appInfo={appInfo}\n modalSize={config.modalSize}\n modalContainer={config.modalContainer}\n />\n </ModalProvider>\n </ThemeProvider>\n </LunoProvider>\n );\n};\n\ninterface RenderModalsProps {\n modalSize?: Optional<ModalSize>;\n appInfo?: Optional<Partial<AppInfo>>;\n modalContainer?: Optional<ModalContainer>;\n}\n\nconst RenderModals: React.FC<RenderModalsProps> = ({\n modalSize,\n appInfo,\n modalContainer,\n}: RenderModalsProps) => {\n return (\n <>\n <ConnectModal size={modalSize} appInfo={appInfo} container={modalContainer} />\n <AccountDetailsModal container={modalContainer} />\n <ChainModal container={modalContainer} />\n </>\n );\n};\n","import { ConnectionStatus, useStatus } from '@luno-kit/react';\nimport React, {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nfunction useModalVisibility() {\n const [isOpen, setIsOpen] = useState(false);\n const open = useCallback(() => setIsOpen(true), []);\n const close = useCallback(() => setIsOpen(false), []);\n return { isOpen, open, close };\n}\n\ninterface ModalContextValue {\n isConnectModalOpen: boolean;\n openConnectModal?: () => void;\n closeConnectModal: () => void;\n\n isAccountModalOpen: boolean;\n openAccountModal?: () => void;\n closeAccountModal: () => void;\n\n isChainModalOpen: boolean;\n openChainModal?: () => void;\n closeChainModal: () => void;\n\n closeAllModals: () => void;\n}\n\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\n\ninterface ModalProviderProps {\n children: ReactNode;\n}\n\nexport const ModalProvider: React.FC<ModalProviderProps> = ({ children }) => {\n const {\n isOpen: isConnectModalOpen,\n open: openConnectModal,\n close: closeConnectModal,\n } = useModalVisibility();\n const {\n isOpen: isAccountModalOpen,\n open: openAccountModal,\n close: closeAccountModal,\n } = useModalVisibility();\n const {\n isOpen: isChainModalOpen,\n open: openChainModal,\n close: closeChainModal,\n } = useModalVisibility();\n\n const connectionStatus = useStatus();\n\n const closeAllModals = useCallback(() => {\n closeConnectModal();\n closeAccountModal();\n closeChainModal();\n }, [closeConnectModal, closeAccountModal, closeChainModal]);\n\n useEffect(() => {\n if (connectionStatus === ConnectionStatus.Disconnected) {\n closeAccountModal();\n closeChainModal();\n }\n }, [connectionStatus, closeAccountModal, closeChainModal]);\n\n const contextValue = useMemo(\n () => ({\n isConnectModalOpen,\n isAccountModalOpen,\n isChainModalOpen,\n openConnectModal:\n connectionStatus !== ConnectionStatus.Connected ? openConnectModal : undefined,\n closeConnectModal,\n openAccountModal:\n connectionStatus === ConnectionStatus.Connected ? openAccountModal : undefined,\n closeAccountModal,\n openChainModal: connectionStatus === ConnectionStatus.Connected ? openChainModal : undefined,\n closeChainModal,\n closeAllModals,\n }),\n [\n isConnectModalOpen,\n openConnectModal,\n closeConnectModal,\n isAccountModalOpen,\n openAccountModal,\n closeAccountModal,\n isChainModalOpen,\n openChainModal,\n closeChainModal,\n closeAllModals,\n connectionStatus,\n ]\n );\n\n return <ModalContext.Provider value={contextValue}>{children}</ModalContext.Provider>;\n};\n\nexport const useConnectModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useConnectModal must be used within a ModalProvider');\n\n return {\n isOpen: context.isConnectModalOpen,\n open: context.openConnectModal,\n close: context.closeConnectModal,\n };\n};\n\nexport const useAccountModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useAccountModal must be used within a ModalProvider');\n return {\n isOpen: context.isAccountModalOpen,\n open: context.openAccountModal,\n close: context.closeAccountModal,\n };\n};\n\nexport const useChainModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useChainModal must be used within a ModalProvider');\n return {\n isOpen: context.isChainModalOpen,\n open: context.openChainModal,\n close: context.closeChainModal,\n };\n};\n\nexport const useCloseAllModals = (): (() => void) => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useCloseAllModals must be used within a ModalProvider');\n return context.closeAllModals;\n};\n","import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst customTwMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'font-size': ['text-xs', 'text-sm', 'text-base', 'text-lg'],\n },\n },\n});\n\nexport function cs(...inputs: ClassValue[]) {\n return customTwMerge(clsx(inputs));\n}\n","export function debounce(fn: () => void, ms: number) {\n let timer: NodeJS.Timeout | null;\n\n return () => {\n if (timer) {\n clearTimeout(timer as number);\n }\n\n timer = setTimeout(() => {\n timer = null;\n fn();\n }, ms);\n };\n}\n","import type React from 'react';\nimport { useCallback, useState } from 'react';\nimport { Copy as CopyIcon, Success } from '../../assets/icons';\nimport { cs } from '../../utils';\n\ninterface CopyProps {\n copyText?: string;\n label?: string;\n className?: string;\n}\n\nexport const Copy: React.FC<CopyProps> = ({ copyText, label, className = '' }) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copyToClipboard = useCallback(async (text: string): Promise<boolean> => {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n return true;\n }\n return false;\n } catch (err) {\n console.error('Copy failed:', err);\n return false;\n }\n }, []);\n\n return (\n <button\n type=\"button\"\n className={cs(\n 'luno:cursor-pointer luno:bg-transparent luno:border-none luno:p-1 luno:m-0 luno:inline-flex luno:items-center luno:justify-center luno:gap-1',\n 'luno:rounded-modalControlButton luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200',\n className\n )}\n onClick={() => !isCopied && copyText && copyToClipboard(copyText)}\n aria-label=\"Copy address to clipboard\"\n disabled={isCopied}\n >\n {isCopied ? (\n <Success className=\"luno:text-accentColor\" width={16} height={16} />\n ) : (\n <CopyIcon width={16} height={16} />\n )}\n {label}\n </button>\n );\n};\n","// packages/ui/src/components/Dialog/index.tsx\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport React, { type ReactNode } from 'react';\nimport { cs } from '../../utils';\n\nexport type ModalSize = 'compact' | 'wide';\n\nexport type ModalContainer = HTMLElement | (() => HTMLElement | null) | null;\n\ninterface DialogProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n children: ReactNode;\n contentClassName?: string;\n overlayClassName?: string;\n container?: ModalContainer;\n}\n\ninterface DialogTitleProps {\n children: ReactNode;\n className?: string;\n}\n\ninterface DialogCloseProps {\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n}\n\nconst DialogRoot: React.FC<DialogProps> = ({\n open,\n onOpenChange,\n children,\n contentClassName,\n overlayClassName,\n container,\n}) => {\n const portalContainer = React.useMemo(() => {\n if (!container) return undefined;\n return typeof container === 'function' ? container() : container;\n }, [container]);\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal container={portalContainer}>\n {React.createElement(DialogPrimitive.Overlay as any, {\n className: cs(\n 'luno:fixed luno:inset-0 luno:backdrop-blur-modalOverlay luno:z-[100] luno:bg-modalBackdrop luno-kit',\n 'luno:data-[state=open]:[animation:overlay-in_150ms_ease-out]',\n overlayClassName\n ),\n })}\n <DialogPrimitive.Content\n className={cs(\n 'luno-kit luno:font-body luno:fixed luno:z-[200] luno:text-modalText luno:text-base luno:leading-base',\n 'luno:bg-modalBackground luno:shadow-modal luno:focus:outline-none luno:overflow-hidden luno:border luno:border-modalBorder',\n 'luno:transition-all luno:duration-200',\n\n 'luno:rounded-t-modalMobile luno:bottom-0 luno:left-0 luno:w-full',\n 'luno:translate-y-0 luno:-translate-x-0',\n 'luno:data-[state=open]:[animation:slide-up_200ms_ease-out]',\n\n 'luno:md:bottom-auto luno:md:left-1/2 luno:md:top-1/2 luno:md:-translate-x-1/2 luno:md:-translate-y-1/2',\n 'luno:md:w-auto luno:md:rounded-modal',\n 'luno:md:data-[state=open]:[animation:dialog-in_150ms_ease-out]',\n contentClassName\n )}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n\nconst DialogTitleWrapper: React.FC<DialogTitleProps> = ({ children, className }) =>\n React.createElement(DialogPrimitive.Title as any, { className }, children);\n\nconst DialogCloseWrapper: React.FC<DialogCloseProps> = ({ children, className, onClick }) =>\n React.createElement(DialogPrimitive.Close as any, { className, onClick }, children);\n\nexport const Dialog = DialogRoot;\nexport const DialogClose = DialogCloseWrapper;\nexport const DialogTitle = DialogTitleWrapper;\n\nexport type { DialogProps, DialogTitleProps, DialogCloseProps };\n","import type React from 'react';\nimport { useState } from 'react';\nimport { cs } from '../../utils';\nimport { NFTList } from './NFTList';\nimport { TokenList } from './TokenList';\n\nenum AssetFilter {\n tokens = 'Tokens',\n nfts = 'NFTs',\n}\n\nconst FILTER_TABS = [\n { key: AssetFilter.tokens, label: AssetFilter.tokens },\n { key: AssetFilter.nfts, label: AssetFilter.nfts },\n] as const;\n\nexport const AssetList: React.FC = () => {\n const [activeFilter, setActiveFilter] = useState<AssetFilter>(AssetFilter.tokens);\n\n return (\n <div className={cs('luno:flex luno:flex-col luno:gap-3.5 luno:p-4 luno:pt-0')}>\n <div className={cs('luno:flex luno:items-center luno:gap-1.5 luno:w-full')}>\n {FILTER_TABS.map((tab) => (\n <button\n key={tab.key}\n onClick={() => setActiveFilter(tab.key)}\n className={cs(\n 'luno:px-3.5 luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:min-w-[48px] luno:min-h-[24px] luno:rounded-networkSelectItem luno:text-[12px] luno:leading-[16px] luno:font-medium luno:transition-colors',\n activeFilter === tab.key\n ? 'luno:bg-navigationButtonBackground luno:text-modalText'\n : 'luno:bg-transparent text-modalTextSecondary luno:hover:text-modalText'\n )}\n >\n {tab.label}\n </button>\n ))}\n </div>\n\n <div className={cs('luno:overflow-y-auto luno:flex-1 luno:min-h-[350px] luno:max-h-[350px]')}>\n {activeFilter === AssetFilter.tokens ? <TokenList /> : <NFTList />}\n </div>\n </div>\n );\n};\n","import { useAccount, useChain } from '@luno-kit/react';\nimport React, { useMemo, useState } from 'react';\nimport { DefaultNFT, Link } from '../../assets/icons';\nimport { type AssetItem as AssetItemType, useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { EmptyAsset } from './EmptyAsset';\n\nexport const NFTList = React.memo(() => {\n const { data, isFetching, error } = useSubscanTokens();\n\n const listData: AssetItemType[] = useMemo(() => {\n if (!data) return [];\n\n return data.nfts;\n }, [data]);\n\n if (isFetching) {\n return (\n <div className=\"luno:flex luno:justify-center luno:w-full\">\n <div className=\"luno:flex luno:flex-wrap luno:justify-between luno:max-w-[350px] luno:w-full luno:min-h-[300px] luno:gap-y-4\">\n {[1, 2, 3, 4].map((num) => (\n <div\n key={`skeleton-${num}`}\n className=\"luno:animate-pulse luno:bg-skeleton luno:w-[155px] luno:h-[198px] luno:rounded-assetSelectItem\"\n />\n ))}\n </div>\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center luno:p-4\">\n <div className=\"luno:text-error luno:mb-2\">Failed to load assets</div>\n <div className=\"luno:text-modalTextSecondary luno:text-sm\">\n {error instanceof Error ? error.message : 'Unknown error'}\n </div>\n </div>\n );\n }\n\n if (!listData.length) {\n return <EmptyAsset type={'NFTs'} />;\n }\n\n return (\n <div className=\"luno:flex luno:justify-center luno:w-full\">\n <div className=\"luno:flex luno:flex-wrap luno:justify-between luno:max-w-[350px] luno:w-full luno:gap-y-4\">\n {listData.map((item) => (\n <NFTItem asset={item} key={`${item.symbol}-${item.balance}`} />\n ))}\n </div>\n </div>\n );\n});\n\ninterface NFTItemProps {\n asset: AssetItemType;\n}\n\nconst NFTItem: React.FC<NFTItemProps> = React.memo(({ asset }) => {\n const { chain } = useChain();\n const { address } = useAccount();\n const [isLoading, setIsLoading] = useState(!!asset.logoURI);\n const [imgSrc, setImgSrc] = useState(asset.logoURI);\n\n const linkExplorer = useMemo(() => {\n if (!chain?.subscan?.url) return '';\n\n const subscanUrl = chain.subscan.url.endsWith('/')\n ? chain.subscan.url.slice(0, -1)\n : chain.subscan.url;\n\n return `${subscanUrl}/nft_item?collection_id=${asset.assetId}&address=${address}`;\n }, [chain, asset, address]);\n\n return (\n <div\n className={cs(\n 'luno:w-[155px] luno:h-[198px] luno:flex luno:items-center luno:p-2.5 luno:rounded-assetSelectItem luno:cursor-default',\n 'luno:bg-assetSelectItemBackground',\n 'luno:transition-colors luno:duration-200'\n )}\n >\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center\">\n <div\n className={\n 'luno:relative luno:w-[135px] luno:h-[135px] luno:flex luno:items-center luno:justify-center luno:rounded-[6px] luno:overflow-hidden'\n }\n >\n {isLoading && (\n <div className=\"luno:absolute luno:inset-0 luno:flex luno:items-center luno:justify-center luno:animate-pulse luno:bg-gray-500\">\n <div className=\"luno:w-4 luno:h-4 luno:border-2 luno:border-t-transparent luno:border-white luno:rounded-full luno:animate-spin\" />\n </div>\n )}\n {imgSrc ? (\n <img\n src={imgSrc}\n alt={`${asset.symbol}-NFT`}\n className={cs(\n 'luno:w-full luno:h-full luno:object-cover',\n isLoading\n ? 'luno:opacity-0'\n : 'luno:opacity-100 luno:transition-opacity luno:duration-200'\n )}\n onLoad={() => setIsLoading(false)}\n onError={() => {\n setIsLoading(false);\n setImgSrc('');\n }}\n />\n ) : (\n <DefaultNFT className={'luno:w-full luno:h-full luno:object-cover'} />\n )}\n </div>\n\n <div className={'luno:flex luno:items-center luno:justify-between luno:w-full luno:mt-0.5'}>\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {asset.balance || '-'} NFTs\n </span>\n <button\n className=\"luno:cursor-pointer luno:bg-transparent luno:border-none luno:p-1 luno:m-0 luno:inline-flex luno:items-center luno:justify-center luno:gap-1 luno:rounded-modalControlButton luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200\"\n onClick={() => linkExplorer && window.open(linkExplorer)}\n >\n <Link />\n </button>\n </div>\n <div className=\"luno:w-full luno:text-left luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap luno:max-w-[135px] luno:overflow-hidden luno:text-ellipsis\">\n {asset.symbol || asset.assetId}\n </div>\n </div>\n </div>\n );\n});\n","import { useAccount, useChain, useConfig } from '@luno-kit/react';\nimport { formatBalance } from '@luno-kit/react/utils';\nimport { useQuery } from '@tanstack/react-query';\n\nexport interface AssetItem {\n balance: string;\n decimals: number;\n balanceFormatted: string;\n logoURI?: string;\n symbol: string;\n assetId: string;\n price?: string;\n}\n\ninterface AssetData {\n balance: string;\n decimals: number;\n token_image?: string;\n unique_id?: string;\n symbol: string;\n asset_id?: string;\n price?: string;\n}\n\nconst fetchAssets = async ({\n apiUrl,\n apiKey,\n address,\n}: {\n apiUrl: string;\n apiKey: string;\n address: string;\n}): Promise<{ nfts: AssetItem[]; tokens: AssetItem[] }> => {\n try {\n const response = await fetch(`${apiUrl}/api/scan/account/tokens`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-Key': apiKey,\n },\n body: JSON.stringify({ address }),\n });\n\n if (!response.ok) {\n throw new Error(`Subscan API error: ${response.status}`);\n }\n\n const result = await response.json();\n\n if (result.code !== 0) {\n throw new Error(`Subscan API error: ${result.message}`);\n }\n\n const assets = result.data.assets || [];\n const native = result.data.native || [];\n\n const builtin = result.data.builtin || [];\n\n const nfts = assets\n .filter((i: AssetData) => i.token_image || i.unique_id?.includes('nft'))\n .map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals),\n logoURI: i.token_image,\n symbol: i.symbol,\n assetId: i.asset_id,\n price: i.price,\n }));\n\n const tokens = assets\n .filter((i: AssetData) => !i.token_image && !i.unique_id?.includes('nft'))\n .map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: i.token_image,\n symbol: i.symbol,\n assetId: i.asset_id,\n price: i.price,\n }));\n\n const nativeTokens = native.map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: '',\n symbol: i.symbol,\n assetId: 0,\n price: i.price,\n }));\n\n const builtinTokens = builtin.map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: '',\n symbol: i.symbol,\n assetId: i.unique_id,\n price: i.price,\n }));\n\n return {\n nfts: [...nfts],\n tokens: [...nativeTokens, ...tokens, ...builtinTokens],\n };\n } catch (error) {\n console.error('Failed to fetch tokens from Subscan:', error);\n throw error;\n }\n};\n\nexport function useSubscanTokens() {\n const { address } = useAccount();\n const config = useConfig();\n const { chain } = useChain();\n\n const apiUrl = chain?.subscan?.api;\n const apiKey = config?.subscan?.apiKey;\n\n return useQuery({\n queryKey: ['subscan', 'asset-list', address, chain?.genesisHash, apiUrl, apiKey],\n queryFn: () => fetchAssets({ address: address!, apiKey: apiKey!, apiUrl: apiUrl! }),\n enabled: !!address && !!apiKey && !!apiUrl,\n staleTime: config?.subscan?.cacheTime || 60000,\n });\n}\n","import { EmptyWallet } from '../../assets/icons';\n\ninterface Props {\n type: 'Tokens' | 'NFTs';\n}\n\nexport const EmptyAsset = ({ type }: Props) => {\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1 luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center\">\n <EmptyWallet className={'luno:w-[38px] luno:h-[38px] luno:mb-2'} />\n <div className=\"luno:text-modalText luno:text-base luno:leading-base\">No {type} found</div>\n <div className=\"luno:text-sm luno:text-modalTextSecondary luno:max-w-[260px]\">\n Switch to a different network or account to view more assets\n </div>\n </div>\n );\n};\n","import React, { useMemo } from 'react';\nimport { type AssetItem as AssetItemType, useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\nimport { EmptyAsset } from './EmptyAsset';\n\nconst getAssetIconUrl = (symbol: string): string => {\n const normalizedSymbol = symbol?.toLowerCase().trim() || '';\n\n return `https://raw.githubusercontent.com/Luno-lab/luno-assets/refs/heads/main/assets/tokens/${normalizedSymbol}.webp`;\n};\n\nexport const TokenList = React.memo(() => {\n const { data, error, isFetching } = useSubscanTokens();\n\n const listData: AssetItemType[] = useMemo(() => {\n if (!data) return [];\n\n return [...data.tokens].sort((a, b) => {\n const aTotal = a.price ? (parseFloat(a.balance) / 10 ** a.decimals) * parseFloat(a.price) : 0;\n const bTotal = b.price ? (parseFloat(b.balance) / 10 ** b.decimals) * parseFloat(b.price) : 0;\n return bTotal - aTotal;\n });\n }, [data]);\n\n if (isFetching) {\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:min-h-[300px]\">\n {[1, 2, 3, 4, 5].map((num) => (\n <div\n key={`skeleton-${num}`}\n className=\"luno:animate-pulse luno:bg-skeleton luno:h-[54px] luno:rounded-assetSelectItem\"\n />\n ))}\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center luno:p-4\">\n <div className=\"luno:text-error luno:mb-2\">Failed to load assets</div>\n <div className=\"luno:text-modalTextSecondary luno:text-sm\">\n {error instanceof Error ? error.message : 'Unknown error'}\n </div>\n </div>\n );\n }\n\n if (!listData.length) {\n return <EmptyAsset type={'Tokens'} />;\n }\n\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5\">\n {listData.map((item) => (\n <TokenItem asset={item} key={`${item.symbol}-${item.assetId}`} />\n ))}\n </div>\n );\n});\n\ninterface TokenItemProps {\n asset: AssetItemType;\n}\n\nconst TokenItem: React.FC<TokenItemProps> = React.memo(({ asset }) => {\n const iconUrl = asset.logoURI || getAssetIconUrl(asset.symbol);\n\n const displayValue = React.useMemo(() => {\n if (!asset.price) return null;\n const balance = parseFloat(asset.balance) / 10 ** asset.decimals;\n const price = parseFloat(asset.price);\n const total = balance * price;\n return `$${total.toFixed(2)}`;\n }, [asset.balance, asset.decimals, asset.price]);\n\n return (\n <div\n role=\"listitem\"\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:p-2.5 luno:rounded-assetSelectItem luno:cursor-default',\n 'luno:bg-assetSelectItemBackground',\n 'luno:transition-colors luno:duration-200'\n )}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2\">\n <Icon\n className={'luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center'}\n iconUrl={iconUrl}\n resourceName={`${asset.symbol}-token`}\n />\n\n <div className=\"luno:flex luno:flex-col luno:items-start\">\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {asset.symbol || 'Unknown'}\n </span>\n <span\n className={\n 'luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap'\n }\n >\n {asset.balanceFormatted}\n </span>\n </div>\n </div>\n\n {asset.price && (\n <div className=\"luno:flex luno:flex-col luno:items-end\">\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {displayValue}\n </span>\n <span\n className={\n 'luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap'\n }\n >\n ${asset.price}\n </span>\n </div>\n )}\n </div>\n );\n});\n","import type React from 'react';\nimport { useMemo, useState } from 'react';\nimport { cs } from '../../utils';\n\nexport interface IconProps {\n iconUrl?: string;\n resourceName?: string;\n className?: string;\n}\n\nexport const Icon: React.FC<IconProps> = ({ iconUrl, resourceName, className }) => {\n const [isLoading, setIsLoading] = useState(!!iconUrl);\n const [hasError, setHasError] = useState(false);\n\n const displayText = useMemo(() => {\n if (!resourceName) return '-';\n\n const match = resourceName.match(/^([^-]+)-/);\n if (match?.[1]) {\n return match[1].charAt(0).toUpperCase();\n }\n\n return resourceName.charAt(0).toUpperCase();\n }, [resourceName]);\n\n if (iconUrl && !hasError) {\n return (\n <div className={cs('luno:relative luno:w-full luno:h-full', className)}>\n {isLoading && (\n <div className=\"luno:absolute luno:inset-0 luno:flex luno:items-center luno:justify-center luno:rounded-full luno:animate-pulse luno:bg-skeleton\" />\n )}\n\n <img\n src={iconUrl}\n alt={resourceName || 'icon'}\n className={cs(\n 'luno:w-full luno:h-full luno:object-cover luno:rounded-full',\n isLoading\n ? 'luno:opacity-0'\n : 'luno:opacity-100 luno:transition-opacity luno:duration-200'\n )}\n onLoad={() => setIsLoading(false)}\n onError={() => {\n setIsLoading(false);\n setHasError(true);\n }}\n />\n </div>\n );\n }\n\n return (\n <div\n className={cs(\n 'luno:w-full luno:h-full luno:text-white luno:font-semibold',\n 'luno:flex luno:items-center luno:justify-center luno:rounded-full luno:bg-defaultIconBackground',\n className\n )}\n >\n {displayText}\n </div>\n );\n};\n","import type React from 'react';\nimport { AssetList } from '../AssetList';\n\ninterface ViewComponent extends React.FC {\n title?: string;\n}\n\nexport const AssetListView: ViewComponent = () => {\n return (\n <div className={'luno:relative'}>\n <AssetList />\n </div>\n );\n};\n\nAssetListView.title = 'View Assets';\n","import {\n useAccount,\n useBalance,\n useChain,\n useChains,\n useConfig,\n useDisconnect,\n} from '@luno-kit/react';\nimport { getExplorerUrl } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useMemo } from 'react';\nimport { Arrow, Coin, Disconnect, List, Switch } from '../../assets/icons';\nimport { useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\nimport { AccountModalView } from './index';\n\ninterface MainViewProps {\n onViewChange: (view: AccountModalView) => void;\n onModalClose: () => void;\n}\n\nexport const MainView: React.FC<MainViewProps> = ({ onViewChange, onModalClose }) => {\n const { address } = useAccount();\n const { chain } = useChain();\n const chains = useChains();\n const { disconnectAsync } = useDisconnect();\n const { data: balance } = useBalance({ address: chains.length > 0 ? address : undefined });\n const config = useConfig();\n const { refetch } = useSubscanTokens();\n\n const items = useMemo(() => {\n const chainNameItem = {\n key: 'Chain Name',\n content: (\n <div className={'luno:flex luno:items-stretch luno:w-full luno:justify-between'}>\n <div className={'luno:flex luno:items-center luno:gap-2'}>\n <div className=\"luno:relative\">\n <Icon\n className=\"luno:w-[24px] luno:h-[24px]\"\n iconUrl={chain?.chainIconUrl}\n resourceName={`${chain?.name}-chain`}\n />\n {/* <div className={'dot luno:w-[8px] luno:h-[8px] luno:bg-accentColor luno:absolute luno:bottom-0 luno:right-0 luno:rounded-full'}/> */}\n </div>\n <div className={'luno:flex luno:flex-col luno:items-start'}>\n <span className=\"luno:text-base luno:leading-base luno:text-modalText\">\n {chain?.name || 'Polkadot'}\n </span>\n {balance ? (\n <span className={'luno:text-modalTextSecondary luno:text-xs luno:leading-xs'}>\n {balance.formattedTransferable || '0.00'} {chain?.nativeCurrency?.symbol || 'DOT'}\n </span>\n ) : (\n <span className=\"luno:animate-pulse luno:rounded luno:w-[80px] luno:h-[16px] luno:bg-skeleton\" />\n )}\n </div>\n </div>\n <div className={'luno:flex luno:items-center luno:justify-center'}>\n <Arrow className={'luno:w-[16px] luno:h-[16px] luno:text-modalTextSecondary'} />\n </div>\n </div>\n ),\n onClick: () => onViewChange(AccountModalView.switchChain),\n };\n\n const switchAccountItem = {\n key: 'Switch Account',\n content: (\n <>\n <Switch className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText\">Switch Account</span>\n </>\n ),\n onClick: () => onViewChange(AccountModalView.switchAccount),\n };\n\n const assetListItem = {\n key: 'View Assets',\n content: (\n <>\n <Coin className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText\">View Assets</span>\n </>\n ),\n onClick: () => {\n onViewChange(AccountModalView.assetList);\n refetch();\n },\n };\n\n const explorerItem = {\n key: 'View on Explorer',\n content: (\n <>\n <List className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText luno:font-medium\">\n View on Explorer\n </span>\n </>\n ),\n onClick: () =>\n window.open(getExplorerUrl(chain?.blockExplorers?.default?.url!, address, 'address')),\n };\n\n if (chains.length === 0) return [switchAccountItem];\n\n return config?.subscan?.apiKey\n ? [chainNameItem, explorerItem, assetListItem, switchAccountItem]\n : [chainNameItem, explorerItem, switchAccountItem];\n }, [onViewChange, chain, address, balance, chains, config]);\n\n const handleDisconnect = async () => {\n await disconnectAsync();\n onModalClose();\n };\n\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:gap-3 luno:w-full\">\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:w-full luno:px-4\">\n {items.map((i) => (\n <SelectItem key={i.key} onClick={i.onClick}>\n {i.content}\n </SelectItem>\n ))}\n </div>\n <div className={'luno:w-full luno:mx-[-100px] luno:h-[1px] luno:bg-separatorLine'} />\n\n <div className={'luno:w-full luno:px-4 luno:pb-4'}>\n <SelectItem onClick={handleDisconnect}>\n <Disconnect />\n <span className=\"luno:text-base luno:text-accountActionItemText \">Disconnect</span>\n </SelectItem>\n </div>\n </div>\n );\n};\n\nconst SelectItem = ({ children, onClick }: { children: React.ReactNode; onClick?: () => void }) => {\n return (\n <button\n type=\"button\"\n onClick={() => onClick?.()}\n className={cs(\n 'luno:w-full luno:p-2.5 luno:rounded-accountActionItem luno:border-none luno:text-left luno:flex luno:items-center luno:gap-2 luno:font-medium',\n 'luno:bg-accountActionItemBackground luno:hover:bg-accountActionItemBackgroundHover',\n 'luno:transition-colors luno:duration-200',\n onClick ? 'luno:cursor-pointer' : 'luno:cursor-auto'\n )}\n aria-label={typeof children === 'string' ? children : undefined}\n >\n {children}\n </button>\n );\n};\n","import {\n useAccount,\n useAccounts,\n useActiveConnector,\n useBalance,\n useChain,\n useChains,\n} from '@luno-kit/react';\nimport type { Account } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport React, { useCallback } from 'react';\nimport { cs } from '../../utils';\n\ninterface ViewComponent extends React.FC<SwitchAccountViewProps> {\n title?: string;\n}\n\ninterface SwitchAccountViewProps {\n onBack: () => void;\n}\n\nexport const SwitchAccountView: ViewComponent = ({ onBack }) => {\n const { accounts, selectAccount } = useAccounts();\n const { address: currentAddress } = useAccount();\n\n const _selectAccount = useCallback(\n (acc: Account) => {\n selectAccount(acc);\n onBack();\n },\n [onBack]\n );\n\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:overflow-auto luno:max-h-[400px] luno:no-scrollbar luno:p-4 luno:pt-0\">\n {accounts.map((acc) => (\n <AccountItem\n key={acc.address}\n account={acc}\n isSelected={acc.address === currentAddress}\n selectAccount={_selectAccount}\n />\n ))}\n </div>\n );\n};\n\nSwitchAccountView.title = 'Switch Account';\n\ninterface AccountItemProps {\n isSelected: boolean;\n account: Account;\n selectAccount: (acc: Account) => void;\n}\n\nconst AccountItem: React.FC<AccountItemProps> = React.memo(\n ({ isSelected, account, selectAccount }) => {\n const { chain } = useChain();\n const chains = useChains();\n const address = account.address;\n const { data: balance } = useBalance({ address: chains.length > 0 ? address : undefined });\n const connector = useActiveConnector();\n\n return (\n <button\n type=\"button\"\n onClick={() => selectAccount(account)}\n className={cs(\n 'luno:px-3.5 luno:py-2.5 luno:w-full luno:rounded-accountSelectItem luno:border-none',\n 'luno:bg-accountSelectItemBackground',\n 'luno:text-left luno:flex luno:items-center luno:justify-between luno:gap-2',\n 'luno:transition-colors luno:duration-200',\n isSelected\n ? 'luno:cursor-auto'\n : 'luno:cursor-pointer luno:hover:bg-accountSelectItemBackgroundHover'\n )}\n aria-label={account.name || address}\n disabled={isSelected}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2 luno:grow luno:overflow-hidden\">\n <div className=\"luno:shrink-0 luno:w-[24px] luno:h-[24px] luno:rounded-full luno:flex luno:items-center luno:justify-center\">\n {connector?.icon && <img src={connector?.icon} alt=\"luno account\" />}\n </div>\n <div className=\"luno:flex luno:flex-col luno:items-start luno:overflow-hidden\">\n <span className=\"luno:whitespace-nowrap luno:max-w-full luno:text-ellipsis luno:overflow-hidden luno:font-medium luno:text-sm luno:leading-sm luno:text-accountSelectItemText\">\n {account.name || formatAddress(address)}\n </span>\n {chains.length > 0 &&\n (balance ? (\n <span className=\"luno:text-xs luno:text-modalTextSecondary luno:font-medium\">\n {balance?.formattedTransferable || '0.00'}{' '}\n {chain?.nativeCurrency?.symbol || 'DOT'}\n </span>\n ) : (\n <span className=\"luno:animate-pulse luno:rounded luno:w-[60px] luno:h-[16px] luno:bg-skeleton\" />\n ))}\n </div>\n </div>\n\n {isSelected && (\n <div className=\"luno:shrink-0 luno:border-[1px] luno:border-solid luno:border-accentColor luno:rounded-full luno:overflow-hidden luno:flex luno:items-center luno:justify-center luno:w-[18px] luno:h-[18px]\">\n <div className=\"luno:rounded-full luno:bg-accentColor luno:w-[10px] luno:h-[10px]\" />\n </div>\n )}\n </button>\n );\n }\n);\n","import { useApi, useChain, useChains, useSwitchChain } from '@luno-kit/react';\nimport type { Chain } from '@luno-kit/react/types';\nimport React, { useMemo, useState } from 'react';\nimport { Search } from '../../assets/icons';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\n\ninterface ChainListProps {\n onChainSwitched?: (chain: Chain) => void;\n className?: string;\n}\n\nexport const ChainList: React.FC<ChainListProps> = ({\n onChainSwitched,\n className = '',\n}: ChainListProps) => {\n const { chain: currentChain } = useChain();\n const chains = useChains();\n const { switchChainAsync } = useSwitchChain();\n const { isApiReady, apiError } = useApi();\n\n const [switchingChain, setSwitchingChain] = useState<string | null>(null);\n const [searchQuery, setSearchQuery] = useState('');\n\n const filteredChains = useMemo(() => {\n return chains.filter((chain) =>\n searchQuery.trim() ? chain.name.toLowerCase().includes(searchQuery.toLowerCase()) : true\n );\n }, [chains, searchQuery]);\n\n const handleChainSelect = async (chain: Chain) => {\n if (chain.genesisHash === currentChain?.genesisHash) return;\n if (!isApiReady && !apiError) return;\n\n setSwitchingChain(chain.genesisHash);\n try {\n await switchChainAsync({ chainId: chain.genesisHash });\n onChainSwitched?.(chain);\n } catch (error) {\n console.error('Failed to switch chain:', error);\n } finally {\n setSwitchingChain(null);\n }\n };\n\n return (\n <div className={cs('luno:flex luno:flex-col luno:gap-3.5', className)}>\n <div className=\"luno:relative luno:pt-1\">\n <div className=\"luno:relative\">\n <Search className=\"luno:absolute luno:left-3 luno:top-1/2 luno:transform luno:-translate-y-1/2 luno:w-4 luno:h-4 luno:text-modalTextSecondary\" />\n <input\n type=\"text\"\n placeholder=\"Search by name\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"luno:w-full luno:pl-10 luno:pr-3 luno:py-2 luno:text-sm luno:border luno:border-networkSelectItemBackgroundHover luno:rounded-md luno:focus:ring-2 luno:focus:ring-accentColor luno:focus:outline-none luno:focus:border-transparent\"\n />\n </div>\n </div>\n\n {filteredChains.length > 0 && (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:overflow-y-auto luno:max-h-[380px]\">\n {filteredChains.map((chain) => (\n <ChainItem\n key={chain.genesisHash}\n chain={chain}\n isSelected={chain.genesisHash === currentChain?.genesisHash}\n onSelect={handleChainSelect}\n isLoading={(switchingChain === chain.genesisHash || !isApiReady) && !apiError}\n isSwitching={switchingChain === chain.genesisHash}\n />\n ))}\n </div>\n )}\n\n {filteredChains.length === 0 && (\n <div className=\"luno:flex luno:items-center luno:justify-center luno:py-12\">\n <span className=\"luno:text-modalTextSecondary luno:text-xs\">No chains available</span>\n </div>\n )}\n </div>\n );\n};\n\ninterface ChainItemProps {\n chain: Chain;\n isSelected: boolean;\n isLoading: boolean;\n onSelect: (chain: Chain) => void;\n isSwitching: boolean;\n}\n\nconst ChainItem: React.FC<ChainItemProps> = React.memo(\n ({ chain, isSelected, isLoading, onSelect, isSwitching }) => {\n return (\n <button\n onClick={() => onSelect(chain)}\n disabled={isSelected || isLoading}\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:p-2.5 luno:rounded-networkSelectItem',\n 'luno:bg-networkSelectItemBackground',\n 'luno:transition-colors luno:duration-200',\n isSelected || isLoading\n ? 'luno:cursor-default'\n : 'luno:cursor-pointer luno:hover:bg-networkSelectItemBackgroundHover',\n isLoading && 'luno:opacity-80'\n )}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2\">\n <Icon\n className={\n 'luno:w-[20px] luno:h-[20px] luno:flex luno:items-center luno:justify-center luno:leading-[20px]'\n }\n iconUrl={chain?.chainIconUrl}\n resourceName={`${chain?.name}-chain`}\n />\n\n <div className=\"luno:flex luno:flex-col luno:items-start\">\n <span className=\"luno:font-medium luno:text-base luno:text-modalText\">\n {chain.name}\n </span>\n </div>\n </div>\n\n <div className=\"luno:flex luno:items-center luno:justify-center luno:h-[20px]\">\n {isSelected ? (\n isLoading ? (\n <>\n <span className=\"luno:text-accentColor luno:text-xs luno:leading-xs luno:mr-1.5\">\n {isSwitching ? 'Switching' : 'Connecting'}\n </span>\n <div className=\"luno-loading luno:text-accentColor luno:w-[15px] luno:h-[15px]\"></div>\n </>\n ) : (\n <span className=\"luno:relative luno:flex luno:w-[10px] luno:h-[10px]\">\n <span className=\"luno:[animation:ping_1.2s_cubic-bezier(0,0,0.2,1)_infinite] luno:absolute luno:top-[0] luno:left-[0] luno:inline-flex luno:h-full luno:w-full luno:rounded-full luno:bg-accentColor\" />\n <span className=\"luno:relative luno:inline-flex luno:rounded-full luno:h-full luno:w-full luno:bg-accentColor\"></span>\n </span>\n )\n ) : null}\n </div>\n </button>\n );\n }\n);\n","import type React from 'react';\nimport { ChainList } from '../ChainList';\n\ninterface ViewComponent extends React.FC<SwitchChainViewProps> {\n title?: string;\n}\n\ninterface SwitchChainViewProps {\n onBack: () => void;\n}\n\nexport const SwitchChainView: ViewComponent = ({ onBack }) => {\n return <ChainList className={'luno:p-4 luno:pt-0'} />;\n};\n\nSwitchChainView.title = 'Select Networks';\n","import type { Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport { Close } from '../../assets/icons';\nimport { useChainModal } from '../../providers';\nimport { ChainList } from '../ChainList';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer } from '../Dialog';\n\ninterface ChainModalProps {\n container?: Optional<ModalContainer>;\n}\n\nexport const ChainModal: React.FC<ChainModalProps> = ({ container }) => {\n const { isOpen, close } = useChainModal();\n\n return (\n <Dialog container={container} open={isOpen} onOpenChange={(open) => !open && close()}>\n <div className=\"luno:flex luno:flex-col luno:w-full luno:md:w-[360px] luno:max-h-[512px] luno:p-4 luno:gap-3.5 luno:text-modalText\">\n <div className=\"luno:flex luno:items-center luno:justify-between luno:w-full\">\n <div className=\"luno:w-[30px]\" /> {/* Placeholder to keep title centered */}\n <DialogTitle className=\"luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300\">\n Select Network\n </DialogTitle>\n <DialogClose className=\"luno:z-10 luno:flex luno:items-center luno:justify-center luno:h-[30px] luno:w-[30px] luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200 luno:cursor-pointer\">\n <Close />\n </DialogClose>\n </div>\n\n <ChainList />\n </div>\n </Dialog>\n );\n};\n","import type { Optional } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useConnectButton, useWindowSize } from '../../hooks';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\n\nexport const transitionClassName =\n 'luno:transition-transform luno:transition-[125] luno:hover:scale-[1.03] luno:transition-ease';\n\nexport interface ConnectButtonProps {\n className?: Optional<string>;\n label?: Optional<string>;\n accountStatus?: Optional<'full' | 'address'>;\n chainStatus?: Optional<'full' | 'icon' | 'name' | 'none'>;\n showBalance?: Optional<boolean>;\n displayPreference?: Optional<'address' | 'name'>;\n}\n\nexport const ConnectButton: React.FC<ConnectButtonProps> = ({\n className,\n label = 'Connect Wallet',\n accountStatus = 'full',\n chainStatus = 'full',\n showBalance = true,\n displayPreference = 'address',\n}) => {\n const {\n isConnected,\n isDisconnected,\n account,\n balance,\n openConnectModal,\n openAccountModal,\n openChainModal,\n chainIconUrl,\n chainName,\n currentChain,\n configuredChains,\n activeConnector,\n } = useConnectButton();\n const { width: windowWidth } = useWindowSize();\n\n const isLargeWindow = windowWidth && windowWidth > 768;\n\n if (isDisconnected || !isConnected || !activeConnector) {\n return (\n <button\n type=\"button\"\n onClick={() => openConnectModal?.()}\n className={cs(\n 'luno-kit luno:cursor-pointer luno:font-semibold luno:inline-flex luno:items-center luno:justify-center luno:focus:outline-none',\n 'luno:text-connectButtonText luno:bg-connectButtonBackground luno:shadow-button luno:active:scale-[0.95]',\n 'luno:rounded-connectButton',\n transitionClassName,\n 'luno:px-3.5 luno:text-base luno:leading-base luno:min-h-[40px]',\n className\n )}\n >\n {label}\n </button>\n );\n }\n\n return (\n <div\n className={cs(\n 'luno-kit luno:text-modalText luno:flex luno:items-stretch luno:bg-transparent luno:font-semibold luno:text-base luno:leading-base luno:gap-3',\n className\n )}\n >\n {chainStatus !== 'none' && configuredChains.length > 0 && (\n <button\n type=\"button\"\n onClick={() => openChainModal?.()}\n className={cs(\n 'luno:flex luno:items-center luno:rounded-currentNetworkButton luno:cursor-pointer',\n 'luno:bg-currentNetworkButtonBackground luno:shadow-button',\n 'luno:py-2 luno:px-2.5 luno:gap-1.5',\n transitionClassName\n )}\n aria-label=\"Switch chain\"\n >\n {chainStatus === 'full' || chainStatus === 'icon' ? (\n <Icon\n iconUrl={chainIconUrl}\n resourceName={`${chainName}-chain`}\n className={cs('luno:w-[24px] luno:h-[24px]')}\n />\n ) : null}\n {(chainStatus === 'full' || chainStatus === 'name') && isLargeWindow && (\n <span>{currentChain?.name || 'Unknown Chain'}</span>\n )}\n </button>\n )}\n\n <button\n type=\"button\"\n onClick={() => openAccountModal?.()}\n className={cs(\n 'luno:flex luno:items-center luno:cursor-pointer luno:rounded-connectButton luno:bg-connectButtonBackground luno:shadow-button',\n transitionClassName\n )}\n aria-label=\"Open account modal\"\n >\n {configuredChains.length > 0 && showBalance && isLargeWindow && (\n <div className={cs('luno:p-2 luno:pl-3')}>\n {balance ? (\n <span>\n {balance?.formattedTransferable || balance?.formattedTotal || 0}{' '}\n {currentChain?.nativeCurrency?.symbol || ''}\n </span>\n ) : (\n <span\n className={cs(\n 'luno:block luno:animate-pulse luno:rounded luno:w-[80px] luno:h-[20px] luno:bg-accountActionItemBackgroundHover'\n )}\n />\n )}\n </div>\n )}\n\n <div\n className={cs(\n 'luno:flex luno:items-center luno:overflow-hidden luno:bg-connectButtonInnerBackground luno:border-2 luno:border-connectButtonBackground luno:rounded-connectButton luno:gap-1.5 luno:max-h-[40px]',\n configuredChains.length > 0 && showBalance && isLargeWindow\n ? 'luno:bg-connectButtonInnerBackground luno:py-1.5 luno:px-2'\n : 'luno:bg-connectButtonBackground luno:py-2 luno:px-2.5'\n )}\n >\n {accountStatus === 'full' && (\n <span\n className={cs(\n 'luno:w-[24px] luno:h-[24px] luno:flex luno:items-center luno:justify-center'\n )}\n >\n <img src={activeConnector.icon} alt=\"luno account\" />\n </span>\n )}\n <span\n className={cs(\n displayPreference === 'name' && account?.name\n ? 'luno:text-ellipsis luno:overflow-hidden luno:max-w-[115px] luno:whitespace-nowrap'\n : ''\n )}\n >\n {displayPreference === 'name' && account?.name\n ? account?.name\n : formatAddress(account?.address)}\n </span>\n </div>\n </button>\n </div>\n );\n};\n","import {\n ConnectionStatus,\n useAccount,\n useActiveConnector,\n useBalance,\n useChain,\n useChains,\n useStatus,\n} from '@luno-kit/react';\nimport type { Account, AccountBalance, Chain, Connector, Optional } from '@luno-kit/react/types';\nimport { useAccountModal, useChainModal, useConnectModal } from '../providers';\n\nexport interface UseConnectButtonReturn {\n connectionStatus: ConnectionStatus;\n isConnected: boolean;\n isDisconnected: boolean;\n isConnecting: boolean;\n\n account?: Optional<Account>;\n address?: Optional<string>;\n\n currentChain?: Optional<Chain>;\n configuredChains: Chain[];\n isChainSupported: boolean;\n chainIconUrl: string;\n chainName?: Optional<string>;\n\n balance?: Optional<AccountBalance>;\n\n activeConnector?: Optional<Connector>;\n\n openConnectModal?: Optional<() => void>;\n openAccountModal?: Optional<() => void>;\n openChainModal?: Optional<() => void>;\n\n isConnectModalOpen: boolean;\n isAccountModalOpen: boolean;\n isChainModalOpen: boolean;\n}\n\nexport function useConnectButton(): UseConnectButtonReturn {\n const connectionStatus = useStatus();\n const { account, address } = useAccount();\n const { chain: currentChain } = useChain();\n const configuredChains = useChains();\n const { data: balance } = useBalance({\n address: configuredChains.length > 0 ? address : undefined,\n });\n const activeConnector = useActiveConnector();\n\n const { open: openConnectModal, isOpen: isConnectModalOpen } = useConnectModal();\n const { open: openAccountModal, isOpen: isAccountModalOpen } = useAccountModal();\n const { open: openChainModal, isOpen: isChainModalOpen } = useChainModal();\n\n const isConnecting = connectionStatus === ConnectionStatus.Connecting;\n const isConnected = connectionStatus === ConnectionStatus.Connected;\n const isDisconnected =\n connectionStatus === ConnectionStatus.Disconnected ||\n connectionStatus === ConnectionStatus.Disconnecting;\n\n const isChainSupported: boolean =\n !!currentChain &&\n configuredChains.some(\n (c) => c.genesisHash.toLowerCase() === currentChain.genesisHash.toLowerCase()\n );\n\n return {\n activeConnector,\n connectionStatus,\n isConnected,\n isDisconnected,\n isConnecting,\n\n account,\n address,\n\n currentChain,\n configuredChains,\n isChainSupported,\n chainIconUrl: currentChain?.chainIconUrl!,\n chainName: currentChain?.name,\n\n balance,\n\n openConnectModal,\n openAccountModal,\n openChainModal,\n\n isConnectModalOpen,\n isAccountModalOpen,\n isChainModalOpen,\n };\n}\n","import { useEffect, useState } from 'react';\nimport { debounce } from '../utils';\n\nexport const useWindowSize = () => {\n const [windowSize, setWindowSize] = useState<{\n width: number | undefined;\n height: number | undefined;\n }>({\n height: undefined,\n width: undefined,\n });\n\n useEffect(() => {\n const handleResize = debounce(() => {\n setWindowSize({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 500);\n window.addEventListener('resize', handleResize);\n handleResize();\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n return windowSize;\n};\n","import { useConnect } from '@luno-kit/react';\nimport type { Connector, Optional } from '@luno-kit/react/types';\nimport { isMobileDevice } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Back, Close } from '../../assets/icons';\nimport { useWindowSize } from '../../hooks';\nimport { useAnimatedViews } from '../../hooks/useAnimatedViews';\nimport { type AppInfo, useConnectModal } from '../../providers';\nimport { cs } from '../../utils';\nimport { renderAppInfoText } from '../../utils/renderAppInfo';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer, type ModalSize } from '../Dialog';\nimport { ConnectOptions } from './ConnectOptions';\nimport { WalletView } from './WalletView';\n\nexport enum ConnectModalView {\n connectOptions = 'Connect Wallet',\n walletView = 'walletView',\n}\n\nexport interface ConnectModalProps {\n size?: Optional<ModalSize>;\n appInfo?: Optional<Partial<AppInfo>>;\n container?: Optional<ModalContainer>;\n}\n\nexport const ConnectModal: React.FC<ConnectModalProps> = ({\n appInfo,\n container,\n size = 'wide',\n}) => {\n const { isOpen, close } = useConnectModal();\n const {\n connectAsync,\n reset: resetConnect,\n isPending: isConnecting,\n isError: connectError,\n error: connectErrorMsg,\n } = useConnect();\n const [selectedConnector, setSelectedConnector] = useState<Connector | null>(null);\n const [qrCode, setQrCode] = useState<string | undefined>();\n\n const { width: windowWidth } = useWindowSize();\n\n const isLargeWindow = windowWidth && windowWidth > 768;\n const isWide = !!(size === 'wide' && isLargeWindow);\n\n const { containerRef, currentViewRef, resetView, handleViewChange, currentView } =\n useAnimatedViews({ initialView: ConnectModalView.connectOptions });\n\n const onQrCode = async (connector: Connector) => {\n const uri = await connector.getConnectionUri();\n\n setQrCode(uri);\n };\n\n const handleConnect = async (connector: Connector) => {\n if (isMobileDevice() && connector.links.deepLink) {\n try {\n await connectAsync({ connectorId: connector.id });\n _onOpenChange(false);\n return;\n } catch (error) {\n window.location.href = `${connector.links.deepLink}?url=${window.location.href}`;\n return;\n }\n }\n\n !isWide && handleViewChange(ConnectModalView.walletView);\n setSelectedConnector(connector);\n setQrCode(undefined);\n if (connector.hasConnectionUri()) {\n onQrCode(connector);\n }\n await connectAsync({ connectorId: connector.id });\n _onOpenChange(false);\n };\n\n const _onOpenChange = (open: boolean) => {\n !open && close();\n resetConnect();\n resetView();\n setSelectedConnector(null);\n setQrCode(undefined);\n };\n\n const viewComponents = useMemo(() => {\n return {\n [ConnectModalView.connectOptions]: <ConnectOptions onConnect={handleConnect} />,\n [ConnectModalView.walletView]: (\n <WalletView\n connectState={{ isConnecting, isError: connectError, error: connectErrorMsg }}\n isWide={isWide}\n selectedConnector={selectedConnector}\n qrCode={qrCode}\n onConnect={handleConnect}\n appInfo={appInfo}\n />\n ),\n };\n }, [\n isWide,\n selectedConnector,\n qrCode,\n handleConnect,\n isConnecting,\n connectError,\n connectErrorMsg,\n appInfo,\n ]);\n\n useEffect(() => {\n if (isWide && currentView === ConnectModalView.walletView) {\n handleViewChange(ConnectModalView.connectOptions);\n }\n }, [isWide, currentView]);\n\n return (\n <Dialog open={isOpen} onOpenChange={_onOpenChange} container={container}>\n <div\n className={cs(\n 'luno:flex luno:items-stretch luno:justify-between luno:w-full luno:md:max-h-[504px] luno:md:max-w-[724px]'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-start luno:py-4 luno:px-5 luno:w-full luno:md:w-auto',\n isWide\n ? 'luno:md:min-w-[300px] luno:border-r-[1px] luno:border-r-solid luno:border-r-separatorLine'\n : 'luno:md:min-w-[360px]'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:w-full',\n !isWide && 'luno:pb-4'\n )}\n >\n {currentView === ConnectModalView.connectOptions ? (\n <>\n {!isWide && <div className={cs('luno:w-[30px] luno:h-[30px]')} aria-hidden />}\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-bold',\n isWide ? 'luno:pb-6' : 'luno:flex-1 luno:text-center'\n )}\n >\n Connect Wallet\n </DialogTitle>\n </>\n ) : (\n <>\n <button\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[30px] luno:h-[30px] luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n )}\n onClick={() => handleViewChange(ConnectModalView.connectOptions)}\n aria-label=\"Back\"\n >\n <Back />\n </button>\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300'\n )}\n >\n {selectedConnector?.name}\n </DialogTitle>\n </>\n )}\n\n {!isWide && (\n <DialogClose\n className={\n 'luno:z-10 luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n }\n >\n <Close />\n </DialogClose>\n )}\n </div>\n <div\n ref={containerRef}\n className={cs(\n 'luno:relative luno:overflow-hidden luno:w-full',\n !isWide && 'luno:flex-1 luno:overflow-auto'\n )}\n >\n <div ref={currentViewRef}>{viewComponents[currentView]}</div>\n </div>\n\n {!isWide &&\n currentView === ConnectModalView.connectOptions &&\n renderAppInfoText(\n appInfo?.guideText,\n <p\n className={\n 'luno:cursor-pointer luno:w-full luno:pt-4 luno:text-sm luno:leading-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n onClick={() =>\n window.open(appInfo?.guideLink || 'https://polkadot.com/get-started/wallets/')\n }\n >\n New to wallets?\n </p>\n )}\n </div>\n\n {isWide && (\n <WalletView\n connectState={{ isConnecting, isError: connectError, error: connectErrorMsg }}\n isWide={isWide}\n selectedConnector={selectedConnector}\n qrCode={qrCode}\n onConnect={handleConnect}\n appInfo={appInfo}\n />\n )}\n </div>\n\n {!isWide &&\n currentView === ConnectModalView.connectOptions &&\n appInfo?.policyLinks?.terms &&\n appInfo?.policyLinks?.privacy && (\n <div\n className={\n 'luno:w-full luno:border-t luno:border-t-separatorLine luno:flex luno:flex-col luno:items-center luno:gap-1 luno:p-3'\n }\n >\n <div\n className={\n 'luno:text-modalTextSecondary luno:text-xs luno:leading-xs luno:font-regular luno:text-center'\n }\n >\n By connecting your wallet, you agree to our\n </div>\n <div\n className={\n 'luno:text-xs luno:leading-xs luno:font-regular luno:text-center luno:text-modalTextSecondary'\n }\n >\n <a\n href={appInfo.policyLinks.terms}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Terms of Service\n </a>\n <span className={'luno:px-1'}>&amp;</span>\n <a\n href={appInfo.policyLinks.privacy}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Privacy Policy\n </a>\n </div>\n </div>\n )}\n </Dialog>\n );\n};\n","import React from 'react';\n\n// Render helper for plain text content; keeps default styling/handlers when provided.\nexport function renderAppInfoText(\n customText: string | undefined,\n defaultContent: React.ReactNode\n): React.ReactNode {\n if (!customText) {\n return defaultContent;\n }\n\n if (React.isValidElement(defaultContent)) {\n const { className, children: _children, ...rest } = defaultContent.props || {};\n return React.createElement(defaultContent.type, { ...rest, className }, customText);\n }\n\n return customText;\n}\n","import { useConnectors } from '@luno-kit/react';\nimport type { Connector } from '@luno-kit/react/types';\nimport { isMobileDevice } from '@luno-kit/react/utils';\nimport React, { useMemo } from 'react';\nimport { cs } from '../../utils';\n\ninterface Props {\n onConnect: (connector: Connector) => Promise<void>;\n}\n\nconst popularConnectorIds = [\n 'polkadot-js',\n 'subwallet-js',\n 'talisman',\n 'walletconnect',\n 'nova',\n 'nova-mobile',\n];\n\nconst moreConnectorIds = ['ledger', 'polkagate', 'fearless-wallet', 'mimir', 'enkrypt', 'OneKey'];\n\nexport const ConnectOptions = React.memo(({ onConnect }: Props) => {\n const connectors = useConnectors();\n\n const installedConnectors = connectors.filter((c) => c.isInstalled());\n const popularConnectors = connectors.filter(\n (c) => popularConnectorIds.includes(c.id) && !c.isInstalled()\n );\n const moreConnectors = connectors.filter(\n (c) => moreConnectorIds.includes(c.id) && !c.isInstalled()\n );\n\n const connectorGroup: { title: string; group: Connector[] }[] = useMemo(() => {\n return [\n {\n title: 'Installed',\n group: installedConnectors,\n },\n {\n title: 'Popular',\n group: popularConnectors,\n },\n {\n title: 'More',\n group: moreConnectors,\n },\n ];\n }, [installedConnectors, popularConnectors, moreConnectors]);\n\n if (isMobileDevice()) {\n const filteredConnectors = connectors\n .filter((i) => i.id !== 'polkadot-js')\n .filter((i) => i.links.deepLink || i.isInstalled());\n\n return (\n <div className={'luno:flex luno:flex-col luno:items-start luno:gap-1 luno:w-full'}>\n {filteredConnectors.map((i) => (\n <ConnectorItem key={`${i.id}-${i.name}`} connector={i} onConnect={() => onConnect(i)} />\n ))}\n </div>\n );\n }\n\n return (\n <div\n className={\n 'luno:flex luno:flex-col luno:items-start luno:gap-4 luno:w-full luno:overflow-y-auto luno:max-h-[400px]'\n }\n >\n {connectorGroup.map((g) => {\n if (g.group.length === 0) return null;\n return (\n <div\n key={g.title}\n className={'luno:flex luno:flex-col luno:items-start luno:gap-2 luno:w-full'}\n >\n <div\n className={cs(\n 'luno:text-sm luno:font-semibold luno:leading-base',\n g.title === 'Installed' ? 'luno:text-accentColor' : 'luno:text-modalTextSecondary'\n )}\n >\n {g.title}\n </div>\n <div className={'luno:flex luno:flex-col luno:items-start luno:gap-1.5 luno:w-full'}>\n {g.group.map((i) => (\n <ConnectorItem key={i.id} connector={i} onConnect={() => onConnect(i)} />\n ))}\n </div>\n </div>\n );\n })}\n </div>\n );\n});\n\ninterface ConnectorItemProps {\n connector: Connector;\n onConnect: () => void;\n}\n\nconst ConnectorItem: React.FC<ConnectorItemProps> = React.memo(({ connector, onConnect }) => {\n return (\n <button\n onClick={onConnect}\n className={cs(\n 'luno:cursor-pointer luno:bg-walletSelectItemBackground luno:p-2 luno:w-full luno:flex luno:items-center luno:gap-3 luno:rounded-walletSelectItem luno:border-none',\n 'luno:hover:bg-walletSelectItemBackgroundHover luno:transition-transform luno:active:scale-[0.95]',\n 'luno:text-left'\n )}\n >\n <div className={'luno:w-[28px] luno:h-[28px] luno:rounded-[6px] luno:overflow-hidden'}>\n <img src={connector.icon} alt={connector.name} className=\"luno:w-full luno:h-full\" />\n </div>\n\n <span className=\"luno:font-semibold luno:leading-base luno:text-base luno:text-modalText\">\n {connector.name}\n </span>\n </button>\n );\n});\n","import type { Connector } from '@luno-kit/react/types';\nimport React, { useMemo } from 'react';\nimport { Close } from '../../assets/icons';\nimport type { AppInfo } from '../../providers';\nimport { useLunoTheme } from '../../theme';\nimport { cs } from '../../utils';\nimport { renderAppInfoText } from '../../utils/renderAppInfo';\nimport { transitionClassName } from '../ConnectButton';\nimport { Copy } from '../Copy';\nimport { DialogClose } from '../Dialog';\nimport { QRCode } from '../QRCode';\nimport { SpiralAnimation } from '../SpiralAnimation';\n\ninterface Props {\n selectedConnector: Connector | null;\n onConnect: (connector: Connector) => Promise<void>;\n qrCode?: string;\n isWide: boolean;\n connectState: {\n isConnecting: boolean;\n isError: boolean;\n error: Error | null;\n };\n appInfo?: Partial<AppInfo>;\n}\n\nexport const WalletView = React.memo(\n ({ selectedConnector, onConnect, qrCode, isWide, connectState, appInfo }: Props) => {\n const { themeMode } = useLunoTheme();\n\n const decorativeImage = useMemo(() => {\n if (!appInfo?.decorativeImage) return undefined;\n const { light, dark } = appInfo.decorativeImage;\n const url = themeMode === 'dark' ? dark || light : light;\n return { url };\n }, [appInfo?.decorativeImage, themeMode]);\n\n const showQRCode = selectedConnector?.hasConnectionUri();\n\n return (\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-center',\n isWide\n ? 'luno:w-[450px] luno:p-4 luno:min-h-[472px]'\n : 'luno:justify-center luno:w-full luno:min-h-[400px]'\n )}\n >\n {isWide && (\n <div className={'luno:w-full'}>\n <div className={'luno:flex luno:items-center luno:justify-between'}>\n <div />\n <DialogClose\n className={\n 'luno:z-10 luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n }\n >\n <Close />\n </DialogClose>\n </div>\n </div>\n )}\n\n <div\n className={cs(\n 'luno:flex luno:items-center luno:gap-4 luno:flex-col luno:grow luno:justify-center',\n selectedConnector && showQRCode ? 'luno:max-w-[300px]' : 'luno:max-w-[360px]'\n )}\n >\n {selectedConnector ? (\n showQRCode ? (\n <div className={'luno:flex luno:flex-col luno:items-center luno:gap-2.5'}>\n <QRCode size={300} logoBackground={selectedConnector.icon} uri={qrCode} />\n <div\n className={\n 'luno:text-base luno:leading-base luno:font-medium luno:text-center luno:text-modalTextSecondary'\n }\n >\n Scan the QR code with{' '}\n {selectedConnector.id === 'nova' ? 'the Nova' : 'your phone'}\n </div>\n\n <div className=\"luno:min-h-[20px] luno:flex luno:items-center luno:justify-center\">\n {selectedConnector.links?.browserExtension ? (\n <div\n onClick={() => window.open(selectedConnector.links.browserExtension)}\n className={\n 'luno:cursor-pointer luno:text-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n >\n Don't have {selectedConnector.name}?\n </div>\n ) : qrCode ? (\n <Copy\n className={\n 'luno:text-sm luno:leading-sm luno:font-medium luno:text-accentColor'\n }\n copyText={qrCode}\n label={'Copy Link'}\n />\n ) : null}\n </div>\n </div>\n ) : (\n <>\n <div className={'luno:w-[80px] luno:h-[80px]'}>\n <img src={selectedConnector.icon} className={'luno:w-full luno:h-full'} alt=\"\" />\n </div>\n <p className={'luno:text-lg luno:leading-lg luno:text-modalFont luno:font-bold'}>\n Opening {selectedConnector.name}...\n </p>\n <p\n className={\n 'luno:pb-[10px] luno:text-base luno:text-modalTextSecondary luno:leading-base luno:font-medium luno:text-center'\n }\n >\n {selectedConnector.id === 'ledger'\n ? connectState.error?.message\n : 'Confirm connection in the extension'}\n </p>\n {connectState.isConnecting && (\n <div className=\"luno-loading luno:text-modalText luno:w-[24px]\"></div>\n )}\n {!selectedConnector.isInstalled() && selectedConnector.links.browserExtension && (\n <div\n onClick={() => window.open(selectedConnector.links.browserExtension)}\n className={\n 'luno:cursor-pointer luno:pt-6 luno:text-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n >\n Don't have {selectedConnector.name}?\n </div>\n )}\n {!connectState.isConnecting &&\n connectState.isError &&\n (selectedConnector?.isInstalled() || selectedConnector?.id === 'ledger') && (\n <button\n className={cs(\n 'luno:rounded-connectButton luno:focus:outline-none luno:py-[4px] luno:px-[12px] luno:cursor-pointer luno:font-semibold luno:text-sm luno:text-modalText luno:bg-connectButtonBackground luno:shadow-connectButton luno:active:scale-[0.95]',\n transitionClassName\n )}\n onClick={() => onConnect(selectedConnector!)}\n >\n Retry\n </button>\n )}\n </>\n )\n ) : (\n <div\n className={\n 'luno:relative luno:flex luno:flex-col luno:items-center luno:w-full luno:grow luno:gap-4 luno:pt-[60px]'\n }\n >\n {decorativeImage?.url ? (\n <div className={'luno:w-[160px] luno:h-[160px]'}>\n <img\n src={decorativeImage.url}\n alt=\"Luno Kit\"\n className={'luno:w-full luno:h-full luno:object-contain'}\n />\n </div>\n ) : (\n <div className={'luno:w-[160px] luno:h-[160px]'}>\n <SpiralAnimation />\n </div>\n )}\n\n {renderAppInfoText(\n appInfo?.guideText,\n <div\n className={\n 'luno:cursor-pointer luno:text-base luno:leading-base luno:text-accentColor luno:font-semibold luno:text-center luno:hover:text-modalText'\n }\n onClick={() =>\n window.open(appInfo?.guideLink || 'https://polkadot.com/get-started/wallets/')\n }\n >\n New to wallets?\n </div>\n )}\n {renderAppInfoText(\n appInfo?.description,\n <p\n className={\n 'luno:text-modalTextSecondary luno:w-[250px] luno:text-sm luno:leading-sm luno:font-medium luno:text-center'\n }\n >\n Connect your wallet to start exploring and interacting with DApps.\n </p>\n )}\n\n {isWide && appInfo?.policyLinks?.terms && appInfo?.policyLinks?.privacy && (\n <div\n className={\n 'luno:absolute luno:bottom-0 luno:left-0 luno:right-0 luno:text-modalTextSecondary luno:text-xs luno:leading-xs luno:font-regular luno:text-center'\n }\n >\n <span>By connecting your wallet, you agree to our </span>\n <a\n href={appInfo.policyLinks.terms}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-regular luno:hover:text-modalText'}\n >\n Terms of Service\n </a>\n <span> &amp; </span>\n <a\n href={appInfo.policyLinks.privacy}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Privacy Policy\n </a>\n </div>\n )}\n </div>\n )}\n </div>\n\n <div />\n </div>\n );\n }\n);\n","import { Cuer } from 'cuer';\n\nexport type ErrorCorrectionLevel = 'low' | 'medium' | 'quartile' | 'high';\n\ninterface Props {\n ecc?: ErrorCorrectionLevel;\n logoBackground?: string;\n logoUrl?: string | (() => Promise<string>);\n logoSize?: number;\n size: number;\n uri?: string;\n}\n\nexport const QRCode = ({ logoBackground, uri, size }: Props) => {\n if (!uri) {\n const QR_GRID_SIZE = 57;\n const FINDER_SIZE_WITH_MARGIN = 8;\n const ARENA_GRID_SIZE = Math.floor(QR_GRID_SIZE / 4);\n\n const cellSize = size / QR_GRID_SIZE;\n const arenaSize = ARENA_GRID_SIZE * cellSize;\n const arenaStart = Math.ceil(QR_GRID_SIZE / 2 - ARENA_GRID_SIZE / 2);\n const arenaEnd = arenaStart + ARENA_GRID_SIZE;\n\n const generateSkeletonDots = () => {\n const dots = [];\n for (let i = 0; i < QR_GRID_SIZE; i++) {\n for (let j = 0; j < QR_GRID_SIZE; j++) {\n if (i >= arenaStart && i < arenaEnd && j >= arenaStart && j < arenaEnd) continue;\n\n const isInFinder =\n (i < FINDER_SIZE_WITH_MARGIN && j < FINDER_SIZE_WITH_MARGIN) ||\n (i < FINDER_SIZE_WITH_MARGIN && j >= QR_GRID_SIZE - FINDER_SIZE_WITH_MARGIN) ||\n (i >= QR_GRID_SIZE - FINDER_SIZE_WITH_MARGIN && j < FINDER_SIZE_WITH_MARGIN);\n if (isInFinder) continue;\n\n const cx = j + 0.5;\n const cy = i + 0.5;\n\n dots.push(\n <rect\n key={`${i}-${j}`}\n x={cx - 0.4}\n y={cy - 0.4}\n width={0.8}\n height={0.8}\n rx={0.4}\n fill=\"var(--color-walletSelectItemBackground)\"\n />\n );\n }\n }\n return dots;\n };\n\n const renderFinderPattern = ({\n position,\n }: {\n position: 'top-left' | 'top-right' | 'bottom-left';\n }) => {\n const finderSize = 7 * cellSize;\n const positionStyles = {\n 'top-left': { top: 0, left: 0 },\n 'top-right': { top: 0, right: 0 },\n 'bottom-left': { bottom: 0, left: 0 },\n };\n\n return (\n <div\n className=\"luno:absolute luno:z-[4]\"\n style={{\n width: `${finderSize}px`,\n height: `${finderSize}px`,\n ...positionStyles[position],\n }}\n >\n <div\n className=\"luno:absolute luno:inset-0\"\n style={{\n borderRadius: `${2 * cellSize}px`,\n border: `${cellSize}px solid var(--color-walletSelectItemBackground)`,\n }}\n />\n <div\n className=\"luno:absolute luno:left-1/2 luno:top-1/2 luno:-translate-x-1/2 luno:-translate-y-1/2\"\n style={{\n width: `${3 * cellSize}px`,\n height: `${3 * cellSize}px`,\n borderRadius: `${0.5 * cellSize}px`,\n backgroundColor: 'var(--color-walletSelectItemBackground)',\n }}\n />\n </div>\n );\n };\n\n const renderArenaLogo = () => {\n const logoStart = arenaStart * cellSize;\n\n return (\n <div\n className=\"luno:absolute luno:z-[4] luno:flex luno:items-center luno:justify-center luno:box-border\"\n style={{\n width: `${arenaSize}px`,\n height: `${arenaSize}px`,\n left: `${logoStart}px`,\n top: `${logoStart}px`,\n borderRadius: `${cellSize}px`,\n padding: `${cellSize / 2}px`,\n }}\n >\n <img\n src={logoBackground}\n alt=\"QR Code Logo\"\n className=\"luno:h-full luno:w-full luno:object-cover\"\n style={{\n borderRadius: `${cellSize}px`,\n }}\n />\n </div>\n );\n };\n\n return (\n <div\n className=\"luno:relative luno:overflow-hidden luno:flex luno:items-center luno:justify-center\"\n style={{\n width: size,\n height: size,\n borderRadius: `${2 * cellSize}px`,\n }}\n >\n <svg\n className=\"luno:absolute luno:inset-0 luno:z-[3]\"\n width={size}\n height={size}\n viewBox={`0 0 ${QR_GRID_SIZE} ${QR_GRID_SIZE}`}\n >\n {generateSkeletonDots()}\n </svg>\n\n <div\n className=\"luno:absolute luno:inset-0 luno:z-[100]\"\n style={{\n background:\n 'linear-gradient(90deg, transparent 50%, var(--color-walletSelectItemBackgroundHover), transparent)',\n backgroundSize: '200% 100%',\n transform: 'scale(1.5) rotate(45deg)',\n animation: 'shimmer 1000ms linear infinite both',\n }}\n />\n\n {renderFinderPattern({ position: 'top-left' })}\n {renderFinderPattern({ position: 'top-right' })}\n {renderFinderPattern({ position: 'bottom-left' })}\n\n {logoBackground && renderArenaLogo()}\n </div>\n );\n }\n return <Cuer arena={logoBackground} value={uri} />;\n};\n","import type React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { cs } from '../../utils';\n\nexport interface SpiralAnimationProps {\n size?: number;\n dotCount?: number;\n duration?: number;\n className?: string;\n}\n\nexport const SpiralAnimation: React.FC<SpiralAnimationProps> = ({\n size = 160,\n dotCount = 300,\n duration = 3,\n className = '',\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n const DOT_RADIUS = 1;\n const MARGIN = 2;\n const GOLDEN_ANGLE = Math.PI * (3 - Math.sqrt(5));\n const CENTER = size / 2;\n const MAX_RADIUS = CENTER - MARGIN - DOT_RADIUS;\n const svgNS = 'http://www.w3.org/2000/svg';\n\n containerRef.current.innerHTML = '';\n\n const svg = document.createElementNS(svgNS, 'svg');\n svg.setAttribute('width', size.toString());\n svg.setAttribute('height', size.toString());\n svg.setAttribute('viewBox', `0 0 ${size} ${size}`);\n svg.style.display = 'block';\n\n containerRef.current.appendChild(svg);\n\n for (let i = 0; i < dotCount; i++) {\n const idx = i + 0.5;\n const frac = idx / dotCount;\n const r = Math.sqrt(frac) * MAX_RADIUS;\n const theta = idx * GOLDEN_ANGLE;\n const x = CENTER + r * Math.cos(theta);\n const y = CENTER + r * Math.sin(theta);\n\n const circle = document.createElementNS(svgNS, 'circle');\n circle.setAttribute('cx', x.toString());\n circle.setAttribute('cy', y.toString());\n circle.setAttribute('r', DOT_RADIUS.toString());\n circle.setAttribute('fill', 'currentColor');\n circle.setAttribute('opacity', '0.6');\n svg.appendChild(circle);\n\n const animR = document.createElementNS(svgNS, 'animate');\n animR.setAttribute('attributeName', 'r');\n animR.setAttribute('values', `${DOT_RADIUS * 0.5};${DOT_RADIUS * 1.8};${DOT_RADIUS * 0.5}`);\n animR.setAttribute('dur', `${duration}s`);\n animR.setAttribute('begin', `${frac * duration}s`);\n animR.setAttribute('repeatCount', 'indefinite');\n animR.setAttribute('calcMode', 'spline');\n animR.setAttribute('keySplines', '0.4 0 0.6 1;0.4 0 0.6 1');\n circle.appendChild(animR);\n\n const animO = document.createElementNS(svgNS, 'animate');\n animO.setAttribute('attributeName', 'opacity');\n animO.setAttribute('values', '0.2;1;0.2');\n animO.setAttribute('dur', `${duration}s`);\n animO.setAttribute('begin', `${frac * duration}s`);\n animO.setAttribute('repeatCount', 'indefinite');\n animO.setAttribute('calcMode', 'spline');\n animO.setAttribute('keySplines', '0.4 0 0.6 1;0.4 0 0.6 1');\n circle.appendChild(animO);\n }\n }, [size, dotCount, duration]);\n\n return (\n <div\n ref={containerRef}\n className={cs(\n 'luno:text-accentColor luno:inline-flex luno:w-full luno:h-full luno:justify-center luno:align-center',\n className\n )}\n />\n );\n};\n"],"mappings":";8kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mBAAAE,GAAA,oBAAAC,GAAA,oBAAAC,GAAA,kBAAAC,GAAA,sBAAAC,GAAA,oBAAAC,GAAA,iBAAAC,KAAA,eAAAC,GAAAT,ICAA,IAAAU,GAA+C,2BAE/CC,GAA8B,iCAE9BD,GAAqC,iBCQjC,IAAAE,GAAA,6BAVEC,GAAYC,MAChB,QAAC,OACC,MAAM,6BACN,UAAU,kBACV,QAAQ,cACR,MAAM,KACN,OAAO,KACP,KAAK,eACJ,GAAGA,EAEJ,oBAAC,QAAK,EAAE,iHAAiH,EAC3H,EAEKC,GAAQF,GCJX,IAAAG,GAAA,6BATEC,GAAWC,MACf,QAAC,OACC,MAAM,6BACN,MAAM,KACN,OAAO,KACP,KAAK,eACL,QAAQ,cACP,GAAGA,EAEJ,oBAAC,QAAK,EAAE,8IAA8I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C,KACC,UACE,2JAEF,QAAS,IACP,OAAO,KAAKA,GAAS,WAAa,2CAA2C,EAEhF,2BAED,CACF,GACJ,EAECkB,MACC,OAACe,GAAA,CACC,aAAc,CAAE,aAAAzB,EAAc,QAASC,EAAc,MAAOC,CAAgB,EAC5E,OAAQQ,EACR,kBAAmBP,EACnB,OAAQE,EACR,UAAWe,GACX,QAAS5B,EACX,GAEJ,EAEC,CAACkB,GACAK,IAAgB,kBAChBvB,GAAS,aAAa,OACtBA,GAAS,aAAa,YACpB,QAAC,OACC,UACE,sHAGF,oBAAC,OACC,UACE,+FAEH,uDAED,KACA,QAAC,OACC,UACE,+FAGF,oBAAC,KACC,KAAMA,EAAQ,YAAY,MAC1B,OAAQA,EAAQ,YAAY,QAAU,SACtC,IAAI,sBACJ,UAAW,mEACZ,4BAED,KACA,OAAC,QAAK,UAAW,YAAa,aAAK,KACnC,OAAC,KACC,KAAMA,EAAQ,YAAY,QAC1B,OAAQA,EAAQ,YAAY,QAAU,SACtC,IAAI,sBACJ,UAAW,mEACZ,0BAED,GACF,GACF,GAEN,CAEJ","names":["index_exports","__export","ConnectButton","LunoKitProvider","useAccountModal","useChainModal","useCloseAllModals","useConnectModal","useLunoTheme","__toCommonJS","import_react","import_utils","import_jsx_runtime","SvgArrow","props","Arrow_default","import_jsx_runtime","SvgBack","props","Back_default","import_jsx_runtime","SvgClose","props","Close_default","import_jsx_runtime","SvgCoin","props","Coin_default","import_jsx_runtime","SvgCopy","props","Copy_default","import_jsx_runtime","SvgDefaultNFT","props","DefaultNFT_default","import_jsx_runtime","SvgDisconnect","props","Disconnect_default","import_jsx_runtime","SvgEmptyWallet","props","EmptyWallet_default","import_jsx_runtime","SvgLink","props","Link_default","import_jsx_runtime","SvgList","props","List_default","import_jsx_runtime","SvgArrow","props","Search_default","import_jsx_runtime","SvgSuccess","props","Success_default","import_jsx_runtime","SvgSwitch","props","Switch_default","import_react","useAnimatedViews","initialView","animationDuration","animationEasing","currentView","setCurrentView","isAnimating","setIsAnimating","containerRef","currentViewRef","handleViewChange","view","container","currentHeight","newHeight","resetView","import_react","import_react","ALL_THEME_VARS","useCSSVariableInjection","themeInfo","themeMode","root","key","value","varName","import_jsx_runtime","THEME_STORAGE_KEY","saveThemePreference","preference","ThemeContext","isCompleteTheme","theme","useSystemTheme","systemTheme","setSystemTheme","mediaQuery","updateTheme","e","ThemeProvider","children","themeOverrides","themeMode","setThemeMode","saved","isAutoMode","setIsAutoMode","themeInfo","overrides","partialOverrides","currentTheme","useCSSVariableInjection","setThemeChoice","choice","isAuto","contextValue","useLunoTheme","context","import_react","import_react","import_jsx_runtime","useModalVisibility","isOpen","setIsOpen","open","close","ModalContext","ModalProvider","children","isConnectModalOpen","openConnectModal","closeConnectModal","isAccountModalOpen","openAccountModal","closeAccountModal","isChainModalOpen","openChainModal","closeChainModal","connectionStatus","closeAllModals","contextValue","useConnectModal","context","useAccountModal","useChainModal","useCloseAllModals","import_jsx_runtime","LunoKitProvider","children","config","theme","appInfo","ThemeProvider","ModalProvider","RenderModals","modalSize","modalContainer","ConnectModal","AccountDetailsModal","ChainModal","import_clsx","import_tailwind_merge","customTwMerge","cs","inputs","debounce","fn","ms","timer","import_react","import_jsx_runtime","Copy","copyText","label","className","isCopied","setIsCopied","copyToClipboard","text","err","cs","Success_default","Copy_default","DialogPrimitive","import_react","import_jsx_runtime","DialogRoot","open","onOpenChange","children","contentClassName","overlayClassName","container","portalContainer","React","cs","DialogTitleWrapper","className","DialogCloseWrapper","onClick","Dialog","DialogClose","DialogTitle","import_react","import_react","import_react","import_utils","import_react_query","fetchAssets","apiUrl","apiKey","address","response","result","assets","native","builtin","nfts","i","tokens","nativeTokens","builtinTokens","error","useSubscanTokens","config","chain","import_jsx_runtime","EmptyAsset","type","EmptyWallet_default","import_jsx_runtime","NFTList","React","data","isFetching","error","useSubscanTokens","listData","num","item","NFTItem","EmptyAsset","asset","chain","address","isLoading","setIsLoading","imgSrc","setImgSrc","linkExplorer","cs","DefaultNFT_default","Link_default","import_react","import_react","import_jsx_runtime","Icon","iconUrl","resourceName","className","isLoading","setIsLoading","hasError","setHasError","displayText","match","cs","import_jsx_runtime","getAssetIconUrl","symbol","TokenList","React","data","error","isFetching","useSubscanTokens","listData","a","b","aTotal","num","item","TokenItem","EmptyAsset","asset","iconUrl","displayValue","balance","price","cs","Icon","import_jsx_runtime","FILTER_TABS","AssetList","activeFilter","setActiveFilter","cs","tab","TokenList","NFTList","import_jsx_runtime","AssetListView","AssetList","import_react","import_utils","import_jsx_runtime","MainView","onViewChange","onModalClose","address","chain","chains","disconnectAsync","balance","config","refetch","useSubscanTokens","items","chainNameItem","Icon","Arrow_default","switchAccountItem","Switch_default","assetListItem","Coin_default","explorerItem","List_default","handleDisconnect","i","SelectItem","Disconnect_default","children","onClick","cs","import_react","import_utils","import_jsx_runtime","SwitchAccountView","onBack","accounts","selectAccount","currentAddress","_selectAccount","acc","AccountItem","React","isSelected","account","chain","chains","address","balance","connector","cs","import_react","import_jsx_runtime","ChainList","onChainSwitched","className","currentChain","chains","switchChainAsync","isApiReady","apiError","switchingChain","setSwitchingChain","searchQuery","setSearchQuery","filteredChains","chain","handleChainSelect","error","cs","Search_default","e","ChainItem","React","isSelected","isLoading","onSelect","isSwitching","Icon","import_jsx_runtime","SwitchChainView","onBack","ChainList","import_jsx_runtime","AccountDetailsModal","container","isOpen","close","useAccountModal","address","account","activeConnector","currentView","containerRef","currentViewRef","handleViewChange","resetView","useAnimatedViews","handleModalClose","viewTitle","SwitchAccountView","SwitchChainView","AssetListView","viewComponents","MainView","Dialog","cs","DialogTitle","Copy","Back_default","DialogClose","Close_default","import_jsx_runtime","ChainModal","container","isOpen","close","useChainModal","Dialog","open","DialogTitle","DialogClose","Close_default","ChainList","import_utils","import_react","useConnectButton","connectionStatus","account","address","currentChain","configuredChains","balance","activeConnector","openConnectModal","isConnectModalOpen","useConnectModal","openAccountModal","isAccountModalOpen","useAccountModal","openChainModal","isChainModalOpen","useChainModal","isConnecting","isConnected","isDisconnected","isChainSupported","c","import_react","useWindowSize","windowSize","setWindowSize","handleResize","debounce","import_jsx_runtime","transitionClassName","ConnectButton","className","label","accountStatus","chainStatus","showBalance","displayPreference","isConnected","isDisconnected","account","balance","openConnectModal","openAccountModal","openChainModal","chainIconUrl","chainName","currentChain","configuredChains","activeConnector","useConnectButton","windowWidth","useWindowSize","isLargeWindow","cs","Icon","import_react","import_utils","import_react","renderAppInfoText","customText","defaultContent","React","className","_children","rest","import_react","import_utils","import_jsx_runtime","popularConnectorIds","moreConnectorIds","ConnectOptions","React","onConnect","connectors","installedConnectors","c","popularConnectors","moreConnectors","connectorGroup","filteredConnectors","i","ConnectorItem","g","cs","connector","import_react","import_cuer","import_jsx_runtime","QRCode","logoBackground","uri","size","ARENA_GRID_SIZE","cellSize","arenaSize","arenaStart","arenaEnd","generateSkeletonDots","dots","i","j","cx","cy","renderFinderPattern","position","finderSize","positionStyles","renderArenaLogo","logoStart","import_react","import_jsx_runtime","SpiralAnimation","size","dotCount","duration","className","containerRef","DOT_RADIUS","MARGIN","GOLDEN_ANGLE","CENTER","MAX_RADIUS","svgNS","svg","i","idx","frac","r","theta","x","y","circle","animR","animO","cs","import_jsx_runtime","WalletView","React","selectedConnector","onConnect","qrCode","isWide","connectState","appInfo","themeMode","useLunoTheme","decorativeImage","light","dark","showQRCode","cs","DialogClose","Close_default","QRCode","Copy","transitionClassName","SpiralAnimation","renderAppInfoText","import_jsx_runtime","ConnectModal","appInfo","container","size","isOpen","close","useConnectModal","connectAsync","resetConnect","isConnecting","connectError","connectErrorMsg","selectedConnector","setSelectedConnector","qrCode","setQrCode","windowWidth","useWindowSize","isLargeWindow","isWide","containerRef","currentViewRef","resetView","handleViewChange","currentView","useAnimatedViews","onQrCode","connector","uri","handleConnect","_onOpenChange","open","viewComponents","ConnectOptions","WalletView","Dialog","cs","DialogTitle","Back_default","DialogClose","Close_default","renderAppInfoText"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/AccountDetailsModal/index.tsx","../src/assets/icons/Arrow.tsx","../src/assets/icons/Back.tsx","../src/assets/icons/Close.tsx","../src/assets/icons/Coin.tsx","../src/assets/icons/Copy.tsx","../src/assets/icons/DefaultNFT.tsx","../src/assets/icons/Disconnect.tsx","../src/assets/icons/EmptyWallet.tsx","../src/assets/icons/Link.tsx","../src/assets/icons/List.tsx","../src/assets/icons/Search.tsx","../src/assets/icons/Success.tsx","../src/assets/icons/Switch.tsx","../src/hooks/useAnimatedViews.ts","../src/theme/context.tsx","../src/hooks/useCSSVariableInjection.ts","../src/providers/LunoKitProvider.tsx","../src/providers/ModalContext.tsx","../src/utils/cs.ts","../src/utils/debounce.ts","../src/components/Copy/index.tsx","../src/components/Dialog/index.tsx","../src/components/AssetList/index.tsx","../src/components/AssetList/NFTList.tsx","../src/hooks/useSubscanTokens.ts","../src/components/AssetList/EmptyAsset.tsx","../src/components/AssetList/TokenList.tsx","../src/components/Icon/index.tsx","../src/components/AccountDetailsModal/AssetListView.tsx","../src/components/AccountDetailsModal/MainView.tsx","../src/components/AccountDetailsModal/SwitchAccountView.tsx","../src/components/ChainList/index.tsx","../src/components/AccountDetailsModal/SwitchChainView.tsx","../src/components/ChainModal/index.tsx","../src/components/ConnectButton/index.tsx","../src/hooks/useConnectButton.ts","../src/hooks/useWindowSize.ts","../src/components/ConnectModal/index.tsx","../src/utils/renderAppInfo.tsx","../src/components/ConnectModal/ConnectOptions.tsx","../src/components/ConnectModal/WalletView.tsx","../src/components/QRCode/index.tsx","../src/components/SpiralAnimation/index.tsx"],"sourcesContent":["export { ConnectButton } from './components';\nexport * from './providers';\n","import { useAccount, useActiveConnector } from '@luno-kit/react';\nimport type { Optional } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useCallback, useMemo } from 'react';\nimport { Back, Close } from '../../assets/icons';\nimport { useAnimatedViews } from '../../hooks/useAnimatedViews';\nimport { useAccountModal } from '../../providers';\nimport { cs } from '../../utils';\nimport { Copy } from '../Copy';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer } from '../Dialog';\nimport { AssetListView } from './AssetListView';\nimport { MainView } from './MainView';\nimport { SwitchAccountView } from './SwitchAccountView';\nimport { SwitchChainView } from './SwitchChainView';\n\nexport enum AccountModalView {\n main = 'main',\n switchAccount = 'switchAccount',\n switchChain = 'switchChain',\n assetList = 'assetList',\n}\n\ninterface AccountDetailsModalProps {\n container?: Optional<ModalContainer>;\n}\n\nexport const AccountDetailsModal: React.FC<AccountDetailsModalProps> = ({ container }) => {\n const { isOpen, close } = useAccountModal();\n const { address, account } = useAccount();\n const activeConnector = useActiveConnector();\n\n const { currentView, containerRef, currentViewRef, handleViewChange, resetView } =\n useAnimatedViews({ initialView: AccountModalView.main });\n\n const handleModalClose = useCallback(() => {\n close();\n resetView();\n }, [close]);\n\n const viewTitle = useMemo(() => {\n if (currentView === AccountModalView.switchAccount) return SwitchAccountView.title;\n if (currentView === AccountModalView.switchChain) return SwitchChainView.title;\n if (currentView === AccountModalView.assetList) return AssetListView.title;\n return null;\n }, [currentView]);\n\n const viewComponents = useMemo(\n () => ({\n [AccountModalView.main]: (\n <MainView onViewChange={handleViewChange} onModalClose={handleModalClose} />\n ),\n [AccountModalView.switchAccount]: (\n <SwitchAccountView onBack={() => handleViewChange(AccountModalView.main)} />\n ),\n [AccountModalView.switchChain]: (\n <SwitchChainView onBack={() => handleViewChange(AccountModalView.main)} />\n ),\n [AccountModalView.assetList]: <AssetListView />,\n }),\n [handleViewChange, handleModalClose]\n );\n\n return (\n <Dialog open={isOpen} onOpenChange={handleModalClose} container={container}>\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:w-full luno:md:w-[360px] luno:max-h-[512px] luno:text-modalText',\n 'luno:bg-modalBackground luno:shadow-modal',\n currentView === AccountModalView.main ? 'luno:gap-5' : 'luno:gap-3.5'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:items-stretch luno:justify-between luno:w-full luno:px-4 luno:pt-4'\n )}\n >\n {currentView === AccountModalView.main ? (\n <div className={cs('luno:flex luno:items-center luno:gap-3 luno:max-w-[80%]')}>\n {activeConnector?.icon && (\n <div\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[40px] luno:h-[40px] luno:shrink-0'\n )}\n >\n <img\n src={activeConnector.icon}\n alt=\"luno\"\n className={cs('luno:w-full luno:h-full luno:object-contain')}\n />\n </div>\n )}\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-start luno:gap-1.5 luno:max-w-full'\n )}\n >\n <DialogTitle className={'luno:sr-only'}>Account Details</DialogTitle>\n <div className={cs('luno:flex luno:items-center luno:gap-0.5 luno:w-full')}>\n <span className={cs('luno:text-base luno:text-modalText luno:font-semibold')}>\n {formatAddress(address)}\n </span>\n <Copy copyText={address} />\n </div>\n <div\n className={cs(\n 'luno:text-sm luno:leading-sm luno:text-modalTextSecondary luno:font-medium luno:text-ellipsis luno:overflow-hidden luno:whitespace-nowrap',\n account?.name && account?.name.length > 30 ? 'luno:w-[90%]' : ''\n )}\n >\n {account?.name || activeConnector?.name}\n </div>\n </div>\n </div>\n ) : (\n <>\n <button\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[30px] luno:h-[30px] luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n )}\n onClick={() => handleViewChange(AccountModalView.main)}\n aria-label=\"Back\"\n >\n <Back />\n </button>\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300'\n )}\n >\n {viewTitle}\n </DialogTitle>\n </>\n )}\n\n <DialogClose\n className={cs(\n 'luno:shrink-0 luno:z-10 luno:flex luno:items-center luno:justify-center luno:h-[30px] luno:w-[30px] luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200 luno:cursor-pointer'\n )}\n >\n <Close />\n </DialogClose>\n </div>\n\n <div ref={containerRef} className={cs('luno:relative')}>\n <div ref={currentViewRef}>{viewComponents[currentView]}</div>\n </div>\n </div>\n </Dialog>\n );\n};\n","import type { SVGProps } from 'react';\n\nconst SvgArrow = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"arrow_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z\"></path>\n </svg>\n);\nexport default SvgArrow;\n","import type { SVGProps } from 'react';\n\nconst SvgBack = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z\"></path>\n </svg>\n);\nexport default SvgBack;\n","import type { SVGProps } from 'react';\n\nconst SvgClose = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z\"></path>\n </svg>\n);\nexport default SvgClose;\n","import type { SVGProps } from 'react';\n\nconst SvgCoin = (props: SVGProps<SVGSVGElement>) => (\n <svg\n className=\"icon\"\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"13294\"\n width=\"100%\"\n height=\"100%\"\n {...props}\n >\n <path\n d=\"M170.837333 263.338667c-55.893333 25.173333-74.837333 53.333333-74.837333 72.661333 0 19.328 18.944 47.488 74.837333 72.661333 52.906667 23.808 128.256 39.338667 213.162667 39.338667 84.906667 0 160.256-15.530667 213.12-39.338667 55.893333-25.173333 74.88-53.333333 74.88-72.661333 0-19.328-18.944-47.488-74.88-72.661333C544.213333 239.573333 468.906667 224 384 224c-84.906667 0-160.256 15.573333-213.162667 39.338667zM144.64 205.013333C207.530667 176.64 292.181333 160 384 160c91.818667 0 176.469333 16.682667 239.402667 45.013333 59.904 26.922667 112.597333 70.826667 112.597333 130.986667s-52.693333 104.021333-112.597333 130.986667C560.469333 495.36 475.818667 512 384 512c-91.818667 0-176.469333-16.682667-239.402667-45.013333C84.693333 440.021333 32 396.16 32 336s52.693333-104.064 112.597333-130.986667z\"\n fill=\"currentColor\"\n p-id=\"13295\"\n ></path>\n <path\n d=\"M64 304a32 32 0 0 1 32 32v160c0 19.370667 18.944 47.530667 74.837333 72.661333 52.906667 23.808 128.213333 39.338667 213.162667 39.338667 84.949333 0 160.298667-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333v-160a32 32 0 0 1 64 0v160c0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.330667-147.626667 44.970667-239.445333 44.970667-91.861333 0-176.512-16.64-239.445333-44.970667C84.650667 600.064 32 556.202667 32 496v-160a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13296\"\n ></path>\n <path\n d=\"M256 436.010667a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0v-160a32 32 0 0 1 32-32zM672.128 383.829333a32 32 0 0 1 34.858667-28.885333c75.946667 7.082667 144.469333 25.813333 195.072 53.333333 48.810667 26.581333 89.941333 66.773333 89.941333 119.722667 0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.288-147.626667 44.970667-239.445333 44.970667-81.621333 0-157.482667-13.269333-217.173333-35.626667a32 32 0 1 1 22.4-59.946666c51.456 19.242667 119.594667 31.573333 194.773333 31.573333 84.949333 0 160.256-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333 0-16.64-13.866667-40.277333-56.533333-63.488-40.96-22.272-100.437333-39.338667-170.453334-45.866667a32 32 0 0 1-28.885333-34.816z\"\n fill=\"currentColor\"\n p-id=\"13297\"\n ></path>\n <path\n d=\"M960 496a32 32 0 0 1 32 32v160c0 60.245333-52.650667 104.106667-112.554667 131.029333-62.933333 28.288-147.626667 44.970667-239.445333 44.970667-91.861333 0-176.512-16.64-239.445333-44.970667-59.904-26.965333-112.554667-70.826667-112.554667-131.029333v-50.773333a32 32 0 0 1 64 0v50.773333c0 19.370667 18.944 47.530667 74.837333 72.661333 52.906667 23.808 128.213333 39.338667 213.162667 39.338667 84.949333 0 160.298667-15.530667 213.162667-39.338667 55.893333-25.173333 74.837333-53.290667 74.837333-72.661333v-160a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13298\"\n ></path>\n <path\n d=\"M768 628.010667a32 32 0 0 1 32 32v160a32 32 0 0 1-64 0v-160a32 32 0 0 1 32-32zM512 436.010667a32 32 0 0 1 32 32v352a32 32 0 0 1-64 0v-352a32 32 0 0 1 32-32z\"\n fill=\"currentColor\"\n p-id=\"13299\"\n ></path>\n </svg>\n);\nexport default SvgCoin;\n","import type { SVGProps } from 'react';\n\nconst SvgCopy = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"copy_svg__icon\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n {...props}\n >\n <path d=\"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z\"></path>\n </svg>\n);\nexport default SvgCopy;\n","import type { SVGProps } from 'react';\n\nconst SvgDefaultNFT = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n p-id=\"8135\"\n width=\"256\"\n height=\"256\"\n {...props}\n >\n <path\n d=\"M512 64L126.26 286.74l-2.26 1.31v448L512 960l385.74-222.74L900 736V288z m353.3 652L512 920 158.7 716V308L512 104l353.3 204z\"\n p-id=\"8136\"\n fill=\"currentColor\"\n />\n <path\n d=\"M314.55 589.97l-79.49-272.91-27.3 15.82v358.24l34.65 20.05V466.46l85.64 294.07 21.15 12.19V251.18l-34.65 20.05v318.74zM403.1 803.85l34.65 20.05V529.33h186.88v-34.66H437.75v-244.5l74.05-45.03 124.92 79.79 18.64-29.22-143.16-91.37-109.1 66.29v573.22zM724.36 338.72v405.49l34.66-20.05V360.28l60.24 37.38v-40.8l-149.2-92.79-18.33 29.42 72.63 45.23z\"\n p-id=\"8137\"\n fill=\"currentColor\"\n />\n </svg>\n);\nexport default SvgDefaultNFT;\n","import type { SVGProps } from 'react';\n\nconst SvgDisconnect = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n {...props}\n >\n <path d=\"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z\"></path>\n </svg>\n);\nexport default SvgDisconnect;\n","import type { SVGProps } from 'react';\n\nconst SvgEmptyWallet = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 38 38\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M18.273 1.51489L3.90896 10.5424C2.41176 11.443 1.77589 12.1511 2.00136 12.6666H29.374L24.7431 3.04502C23.4245 0.849886 20.52 0.163352 18.273 1.51489ZM16.3185 12.54L6.91729 10.8844L19.5776 3.68595C20.5998 3.07162 21.9184 3.38322 22.5188 4.38262L25.8084 10.8844L16.3185 12.54Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M31.9757 10.1333H6.02426C3.401 10.1333 1.26666 12.217 1.26666 14.7782V33.3551C1.26666 35.9163 3.401 38 6.02426 38H31.9757C34.599 38 36.7333 35.9163 36.7333 33.3551V14.7782C36.7333 12.217 34.599 10.1333 31.9757 10.1333ZM34.1379 27.0218H24.624C22.9545 27.0218 21.5967 25.6956 21.5967 24.0666C21.5967 22.4377 22.9545 21.1115 24.624 21.1115H34.1392V27.0218H34.1379ZM34.1379 18.5782H24.624C21.5219 18.5782 19 21.0393 19 24.0666C19 27.094 21.5219 29.5551 24.6227 29.5551H34.1379V33.3551C34.1379 34.5204 33.1677 35.4666 31.9757 35.4666H6.02426C4.83233 35.4666 3.86206 34.5204 3.86206 33.3551V14.7782C3.86206 13.6128 4.83233 12.6666 6.02426 12.6666H31.9757C33.1677 12.6666 34.1379 13.6128 34.1379 14.7782V18.5782ZM23.3257 24.0666C23.3257 24.9989 24.0996 25.7551 25.0547 25.7551C26.011 25.7551 26.7849 24.9989 26.7849 24.0666C26.7849 23.1344 26.011 22.3782 25.0547 22.3782C24.0996 22.3782 23.3257 23.1344 23.3257 24.0666Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default SvgEmptyWallet;\n","import type { SVGProps } from 'react';\n\nconst SvgLink = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 256 256\"\n fill=\"none\"\n {...props}\n >\n <path\n d=\"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\nexport default SvgLink;\n","import type { SVGProps } from 'react';\n\nconst SvgList = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"list_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232,48V88a8,8,0,0,1-16,0V56H184a8,8,0,0,1,0-16h40A8,8,0,0,1,232,48ZM72,200H40V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16Zm152-40a8,8,0,0,0-8,8v32H184a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,224,160ZM32,96a8,8,0,0,0,8-8V56H72a8,8,0,0,0,0-16H32a8,8,0,0,0-8,8V88A8,8,0,0,0,32,96ZM188,167l-56,32a8,8,0,0,1-7.94,0L68,167A8,8,0,0,1,64,160V96a8,8,0,0,1,4-7l56-32a8,8,0,0,1,7.94,0l56,32a8,8,0,0,1,4,7v64A8,8,0,0,1,188,167ZM88.12,96,128,118.79,167.88,96,128,73.21ZM80,155.36l40,22.85V132.64L80,109.79Zm96,0V109.79l-40,22.85v45.57Z\"></path>\n </svg>\n);\nexport default SvgList;\n","import type { SVGProps } from 'react';\n\nconst SvgArrow = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"search_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z\"></path>\n {/* <path d=\"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z\"></path> */}\n </svg>\n);\nexport default SvgArrow;\n","import type { SVGProps } from 'react';\n\nconst SvgSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"success_svg__icon\"\n viewBox=\"0 0 256 256\"\n width=\"20\"\n height=\"20\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z\"></path>\n </svg>\n);\nexport default SvgSuccess;\n","import type { SVGProps } from 'react';\n\nconst SvgSwitch = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n className=\"switch_svg__icon\"\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n {...props}\n >\n <path d=\"M253.66,133.66l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L216,132.69V128A88,88,0,0,0,56.49,76.67a8,8,0,0,1-13-9.34A104,104,0,0,1,232,128v4.69l10.34-10.35a8,8,0,0,1,11.32,11.32Zm-41.18,55A104,104,0,0,1,24,128v-4.69L13.66,133.66A8,8,0,0,1,2.34,122.34l24-24a8,8,0,0,1,11.32,0l24,24a8,8,0,0,1-11.32,11.32L40,123.31V128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.59,79.59,0,0,1,36.08,28.78,89.68,89.68,0,0,0,5.71-7.11,8,8,0,0,1,13,9.34ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a88.2,88.2,0,0,0,53.92-18.49,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z\"></path>\n </svg>\n);\nexport default SvgSwitch;\n","import type React from 'react';\nimport { useCallback, useRef, useState } from 'react';\n\ninterface UseAnimatedViewsProps<T> {\n initialView: T;\n animationDuration?: number;\n animationEasing?: string;\n}\n\ninterface UseAnimatedViewsReturn<T> {\n currentView: T;\n isAnimating: boolean;\n containerRef: React.RefObject<HTMLDivElement>;\n currentViewRef: React.RefObject<HTMLDivElement>;\n handleViewChange: (view: T) => void;\n resetView: () => void;\n}\n\nexport function useAnimatedViews<T>({\n initialView,\n animationDuration = 200,\n animationEasing = 'ease-out',\n}: UseAnimatedViewsProps<T>): UseAnimatedViewsReturn<T> {\n const [currentView, setCurrentView] = useState<T>(initialView);\n const [isAnimating, setIsAnimating] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n const currentViewRef = useRef<HTMLDivElement>(null);\n\n const handleViewChange = useCallback(\n (view: T) => {\n if (view === currentView || isAnimating) return;\n\n setIsAnimating(true);\n\n if (!containerRef.current) {\n setCurrentView(view);\n setIsAnimating(false);\n return;\n }\n\n const container = containerRef.current;\n const currentHeight = container.offsetHeight;\n\n setCurrentView(view);\n\n requestAnimationFrame(() => {\n if (!container || !currentViewRef.current) {\n setIsAnimating(false);\n return;\n }\n\n const newHeight = currentViewRef.current.offsetHeight;\n\n container\n .animate([{ height: `${currentHeight}px` }, { height: `${newHeight}px` }], {\n duration: animationDuration,\n easing: animationEasing,\n fill: 'forwards',\n })\n .addEventListener('finish', () => {\n setIsAnimating(false);\n });\n });\n },\n [currentView, isAnimating, animationDuration, animationEasing]\n );\n\n const resetView = useCallback(() => {\n setCurrentView(initialView);\n setIsAnimating(false);\n }, [initialView]);\n\n return {\n currentView,\n isAnimating,\n containerRef,\n currentViewRef,\n handleViewChange,\n resetView,\n };\n}\n","import type { Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useCSSVariableInjection } from '../hooks/useCSSVariableInjection';\nimport type { LunokitTheme, LunokitThemeOverrides, PartialLunokitTheme, ThemeMode } from './types';\n\n// Theme preference storage\ninterface ThemePreference {\n isAuto: boolean;\n preferredTheme?: Optional<ThemeMode>;\n}\n\nconst THEME_STORAGE_KEY = 'luno.lastThemePreference';\n\nconst saveThemePreference = (preference: ThemePreference) => {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, JSON.stringify(preference));\n } catch (e) {}\n};\n\ninterface ThemeContextValue {\n themeMode: ThemeMode;\n setThemeChoice: (choice: 'light' | 'dark' | 'auto') => void; // User explicit choice\n currentTheme: LunokitTheme | null; // null for default themes\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\ninterface ThemeProviderProps {\n children: ReactNode;\n theme?: Optional<PartialLunokitTheme | LunokitThemeOverrides>;\n}\n\n// Helper function to check if theme is complete or partial\nconst isCompleteTheme = (\n theme: PartialLunokitTheme | LunokitThemeOverrides\n): theme is LunokitTheme => {\n return (\n 'colors' in theme &&\n 'fonts' in theme &&\n 'radii' in theme &&\n 'shadows' in theme &&\n 'blurs' in theme\n );\n};\n\n// Hook to detect system theme\nconst useSystemTheme = () => {\n const [systemTheme, setSystemTheme] = useState<'light' | 'dark'>(() => {\n if (typeof window === 'undefined') return 'light';\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n });\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n\n const updateTheme = (e: MediaQueryListEvent | MediaQueryList) => {\n setSystemTheme(e.matches ? 'dark' : 'light');\n };\n\n updateTheme(mediaQuery);\n mediaQuery.addEventListener('change', updateTheme);\n\n return () => mediaQuery.removeEventListener('change', updateTheme);\n }, []);\n\n return systemTheme;\n};\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n children,\n theme: themeOverrides,\n}) => {\n const systemTheme = useSystemTheme();\n\n const [themeMode, setThemeMode] = useState<ThemeMode>(() => {\n if (typeof window !== 'undefined') {\n try {\n const saved = localStorage.getItem(THEME_STORAGE_KEY);\n if (saved) {\n const preference = JSON.parse(saved);\n if (preference?.isAuto) {\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n } else if (preference?.preferredTheme) {\n return preference.preferredTheme;\n }\n }\n } catch (_e) {\n // Ignore parsing errors\n }\n }\n\n if (!themeOverrides || isCompleteTheme(themeOverrides)) {\n return 'light';\n }\n\n const overrides = themeOverrides as LunokitThemeOverrides;\n return overrides.defaultMode || 'light';\n });\n\n const [isAutoMode, setIsAutoMode] = useState<boolean>(() => {\n if (typeof window !== 'undefined') {\n try {\n const saved = localStorage.getItem(THEME_STORAGE_KEY);\n if (saved) {\n const preference = JSON.parse(saved);\n return preference?.isAuto ?? false;\n }\n } catch (_e) {\n // Ignore parsing errors\n }\n }\n\n if (!themeOverrides || isCompleteTheme(themeOverrides)) {\n return false;\n }\n\n const overrides = themeOverrides as LunokitThemeOverrides;\n return overrides.autoMode ?? false;\n });\n\n // Determine theme type and get relevant data\n const themeInfo = useMemo(() => {\n if (!themeOverrides) {\n return { type: 'default' as const, completeTheme: null, partialOverrides: null };\n }\n\n // Handle complete custom theme\n if (isCompleteTheme(themeOverrides)) {\n return { type: 'complete' as const, completeTheme: themeOverrides, partialOverrides: null };\n }\n\n // Handle theme overrides format\n const overrides = themeOverrides as LunokitThemeOverrides;\n\n // Apply complete theme override (highest priority)\n if (overrides.theme) {\n return { type: 'complete' as const, completeTheme: overrides.theme, partialOverrides: null };\n }\n\n // For partial overrides, get the current mode's overrides\n let partialOverrides: PartialLunokitTheme | null = null;\n if (themeMode === 'light' && overrides.light) {\n partialOverrides = overrides.light;\n } else if (themeMode === 'dark' && overrides.dark) {\n partialOverrides = overrides.dark;\n } else {\n partialOverrides = { ...(overrides as PartialLunokitTheme) };\n }\n\n return { type: 'partial' as const, completeTheme: null, partialOverrides };\n }, [themeMode, themeOverrides]);\n\n // Build current theme for context (only for complete themes)\n const currentTheme = useMemo(() => {\n return themeInfo.type === 'complete' ? themeInfo.completeTheme : null;\n }, [themeInfo]);\n\n // Inject CSS variables to DOM\n useCSSVariableInjection(themeInfo, themeMode);\n\n // User explicit choice handler (saves to storage)\n const setThemeChoice = useCallback(\n (choice: 'light' | 'dark' | 'auto') => {\n const isAuto = choice === 'auto';\n setIsAutoMode(isAuto);\n\n if (isAuto) {\n setThemeMode(systemTheme || 'light');\n } else {\n setThemeMode(choice);\n }\n\n const preference: ThemePreference = {\n isAuto,\n ...(isAuto ? {} : { preferredTheme: choice }),\n };\n\n saveThemePreference(preference);\n },\n [systemTheme]\n );\n\n // Only listen to system theme changes for auto mode\n useEffect(() => {\n if (isAutoMode) {\n setThemeMode(systemTheme || 'light');\n }\n }, [systemTheme, isAutoMode]);\n\n const contextValue = useMemo(\n () => ({\n themeMode,\n setThemeChoice,\n currentTheme,\n }),\n [themeMode, setThemeChoice, currentTheme]\n );\n\n return <ThemeContext.Provider value={contextValue}>{children}</ThemeContext.Provider>;\n};\n\nexport const useLunoTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error(\n 'useLunoTheme must be used within a ThemeProvider (which is part of LunoKitProvider)'\n );\n }\n return context;\n};\n","import { useEffect } from 'react';\nimport type { LunokitTheme, PartialLunokitTheme, ThemeMode } from '../theme/types';\n\n// All theme variable names for cleanup\nconst ALL_THEME_VARS = [\n '--color-accentColor',\n '--color-walletSelectItemBackground',\n '--color-walletSelectItemBackgroundHover',\n '--color-walletSelectItemText',\n '--color-connectButtonBackground',\n '--color-connectButtonInnerBackground',\n '--color-connectButtonText',\n '--color-accountActionItemBackground',\n '--color-accountActionItemBackgroundHover',\n '--color-accountActionItemText',\n '--color-accountSelectItemBackground',\n '--color-accountSelectItemBackgroundHover',\n '--color-accountSelectItemText',\n '--color-currentNetworkButtonBackground',\n '--color-currentNetworkButtonText',\n '--color-networkSelectItemBackground',\n '--color-networkSelectItemBackgroundHover',\n '--color-networkSelectItemText',\n '--color-assetSelectItemBackground',\n '--color-navigationButtonBackground',\n '--color-separatorLine',\n '--color-modalBackground',\n '--color-modalBackdrop',\n '--color-modalBorder',\n '--color-modalText',\n '--color-modalTextSecondary',\n '--color-modalControlButtonBackgroundHover',\n '--color-modalControlButtonText',\n '--color-success',\n '--color-successForeground',\n '--color-warning',\n '--color-warningForeground',\n '--color-error',\n '--color-errorForeground',\n '--color-info',\n '--color-infoForeground',\n '--color-skeleton',\n '--color-defaultIconBackground',\n '--font-body',\n '--radius-walletSelectItem',\n '--radius-connectButton',\n '--radius-modalControlButton',\n '--radius-accountActionItem',\n '--radius-accountSelectItem',\n '--radius-currentNetworkButton',\n '--radius-networkSelectItem',\n '--radius-assetSelectItem',\n '--radius-modal',\n '--radius-modalMobile',\n '--shadow-button',\n '--shadow-modal',\n '--blur-modalOverlay',\n];\n\ninterface ThemeInfo {\n type: 'default' | 'complete' | 'partial';\n completeTheme: LunokitTheme | null;\n partialOverrides: PartialLunokitTheme | null;\n}\n\nexport const useCSSVariableInjection = (themeInfo: ThemeInfo, themeMode: ThemeMode) => {\n useEffect(() => {\n if (typeof window === 'undefined') return;\n\n const root = document.documentElement;\n\n if (themeInfo.type === 'complete' && themeInfo.completeTheme) {\n // Complete custom theme: inject all variables and remove data-theme\n Object.entries(themeInfo.completeTheme.colors).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--color-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.fonts).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--font-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.radii).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--radius-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.shadows).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--shadow-${key}`, value);\n }\n });\n\n Object.entries(themeInfo.completeTheme.blurs).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--blur-${key}`, value);\n }\n });\n\n // Remove data-theme attribute for complete custom themes\n root.removeAttribute('data-theme');\n } else if (themeInfo.type === 'partial' && themeInfo.partialOverrides) {\n // Partial override: KEEP data-theme and inject only overridden variables\n root.setAttribute('data-theme', themeMode);\n\n // Only clear and inject if there are actual overrides\n const hasOverrides = Object.keys(themeInfo.partialOverrides).length > 0;\n if (hasOverrides) {\n // Clear all custom variables first\n ALL_THEME_VARS.forEach((varName) => {\n root.style.removeProperty(varName);\n });\n\n // Inject only the overridden variables\n if (themeInfo.partialOverrides.colors) {\n Object.entries(themeInfo.partialOverrides.colors).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--color-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.fonts) {\n Object.entries(themeInfo.partialOverrides.fonts).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--font-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.radii) {\n Object.entries(themeInfo.partialOverrides.radii).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--radius-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.shadows) {\n Object.entries(themeInfo.partialOverrides.shadows).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--shadow-${key}`, value);\n }\n });\n }\n\n if (themeInfo.partialOverrides.blurs) {\n Object.entries(themeInfo.partialOverrides.blurs).forEach(([key, value]) => {\n if (value) {\n root.style.setProperty(`--blur-${key}`, value);\n }\n });\n }\n }\n } else {\n // Default theme: just set data-theme and clear custom variables\n root.setAttribute('data-theme', themeMode);\n\n // Clear any previously injected custom variables\n ALL_THEME_VARS.forEach((varName) => {\n root.style.removeProperty(varName);\n });\n }\n }, [themeInfo, themeMode]);\n};\n","import { LunoProvider } from '@luno-kit/react';\nimport type { Config as LunoCoreConfig, Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport type { ReactNode } from 'react';\nimport { AccountDetailsModal, ChainModal, ConnectModal } from '../components';\nimport type { ModalContainer, ModalSize } from '../components/Dialog';\nimport type { LunokitThemeOverrides, PartialLunokitTheme } from '../theme';\nimport { ThemeProvider } from '../theme';\nimport { ModalProvider } from './ModalContext';\n\nexport interface DecorativeImage {\n light: string;\n dark?: Optional<string>;\n}\n\nexport interface PolicyLinks {\n terms: string;\n privacy: string;\n target?: Optional<'_blank' | '_self'>;\n}\n\nexport interface AppInfo {\n decorativeImage?: Optional<DecorativeImage>;\n guideText?: Optional<string>;\n guideLink?: Optional<string>;\n description?: Optional<string>;\n policyLinks?: Optional<PolicyLinks>;\n}\n\nexport interface LunoKitProviderProps {\n children: ReactNode;\n config: LunoCoreConfig & {\n modalSize?: Optional<ModalSize>;\n modalContainer?: Optional<ModalContainer>;\n showInstalledGroup?: boolean;\n };\n theme?: Optional<PartialLunokitTheme | LunokitThemeOverrides>;\n appInfo?: Optional<Partial<AppInfo>>;\n}\n\nexport const LunoKitProvider: React.FC<LunoKitProviderProps> = ({\n children,\n config,\n theme,\n appInfo,\n}) => {\n return (\n <LunoProvider config={config}>\n <ThemeProvider theme={theme}>\n <ModalProvider>\n <div>{children}</div>\n <RenderModals\n appInfo={appInfo}\n modalSize={config.modalSize}\n modalContainer={config.modalContainer}\n showInstalledGroup={config.showInstalledGroup}\n />\n </ModalProvider>\n </ThemeProvider>\n </LunoProvider>\n );\n};\n\ninterface RenderModalsProps {\n modalSize?: Optional<ModalSize>;\n appInfo?: Optional<Partial<AppInfo>>;\n modalContainer?: Optional<ModalContainer>;\n showInstalledGroup?: Optional<boolean>;\n}\n\nconst RenderModals: React.FC<RenderModalsProps> = ({\n modalSize,\n appInfo,\n modalContainer,\n showInstalledGroup,\n}: RenderModalsProps) => {\n return (\n <>\n <ConnectModal\n showInstalledGroup={showInstalledGroup}\n size={modalSize}\n appInfo={appInfo}\n container={modalContainer}\n />\n <AccountDetailsModal container={modalContainer} />\n <ChainModal container={modalContainer} />\n </>\n );\n};\n","import { ConnectionStatus, useStatus } from '@luno-kit/react';\nimport React, {\n createContext,\n type ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nfunction useModalVisibility() {\n const [isOpen, setIsOpen] = useState(false);\n const open = useCallback(() => setIsOpen(true), []);\n const close = useCallback(() => setIsOpen(false), []);\n return { isOpen, open, close };\n}\n\ninterface ModalContextValue {\n isConnectModalOpen: boolean;\n openConnectModal?: () => void;\n closeConnectModal: () => void;\n\n isAccountModalOpen: boolean;\n openAccountModal?: () => void;\n closeAccountModal: () => void;\n\n isChainModalOpen: boolean;\n openChainModal?: () => void;\n closeChainModal: () => void;\n\n closeAllModals: () => void;\n}\n\nconst ModalContext = createContext<ModalContextValue | undefined>(undefined);\n\ninterface ModalProviderProps {\n children: ReactNode;\n}\n\nexport const ModalProvider: React.FC<ModalProviderProps> = ({ children }) => {\n const {\n isOpen: isConnectModalOpen,\n open: openConnectModal,\n close: closeConnectModal,\n } = useModalVisibility();\n const {\n isOpen: isAccountModalOpen,\n open: openAccountModal,\n close: closeAccountModal,\n } = useModalVisibility();\n const {\n isOpen: isChainModalOpen,\n open: openChainModal,\n close: closeChainModal,\n } = useModalVisibility();\n\n const connectionStatus = useStatus();\n\n const closeAllModals = useCallback(() => {\n closeConnectModal();\n closeAccountModal();\n closeChainModal();\n }, [closeConnectModal, closeAccountModal, closeChainModal]);\n\n useEffect(() => {\n if (connectionStatus === ConnectionStatus.Disconnected) {\n closeAccountModal();\n closeChainModal();\n }\n }, [connectionStatus, closeAccountModal, closeChainModal]);\n\n const contextValue = useMemo(\n () => ({\n isConnectModalOpen,\n isAccountModalOpen,\n isChainModalOpen,\n openConnectModal:\n connectionStatus !== ConnectionStatus.Connected ? openConnectModal : undefined,\n closeConnectModal,\n openAccountModal:\n connectionStatus === ConnectionStatus.Connected ? openAccountModal : undefined,\n closeAccountModal,\n openChainModal: connectionStatus === ConnectionStatus.Connected ? openChainModal : undefined,\n closeChainModal,\n closeAllModals,\n }),\n [\n isConnectModalOpen,\n openConnectModal,\n closeConnectModal,\n isAccountModalOpen,\n openAccountModal,\n closeAccountModal,\n isChainModalOpen,\n openChainModal,\n closeChainModal,\n closeAllModals,\n connectionStatus,\n ]\n );\n\n return <ModalContext.Provider value={contextValue}>{children}</ModalContext.Provider>;\n};\n\nexport const useConnectModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useConnectModal must be used within a ModalProvider');\n\n return {\n isOpen: context.isConnectModalOpen,\n open: context.openConnectModal,\n close: context.closeConnectModal,\n };\n};\n\nexport const useAccountModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useAccountModal must be used within a ModalProvider');\n return {\n isOpen: context.isAccountModalOpen,\n open: context.openAccountModal,\n close: context.closeAccountModal,\n };\n};\n\nexport const useChainModal = (): { isOpen: boolean; open?: () => void; close: () => void } => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useChainModal must be used within a ModalProvider');\n return {\n isOpen: context.isChainModalOpen,\n open: context.openChainModal,\n close: context.closeChainModal,\n };\n};\n\nexport const useCloseAllModals = (): (() => void) => {\n const context = useContext(ModalContext);\n if (!context)\n throw new Error('[ModalContext]: useCloseAllModals must be used within a ModalProvider');\n return context.closeAllModals;\n};\n","import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst customTwMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'font-size': ['text-xs', 'text-sm', 'text-base', 'text-lg'],\n },\n },\n});\n\nexport function cs(...inputs: ClassValue[]) {\n return customTwMerge(clsx(inputs));\n}\n","export function debounce(fn: () => void, ms: number) {\n let timer: NodeJS.Timeout | null;\n\n return () => {\n if (timer) {\n clearTimeout(timer as number);\n }\n\n timer = setTimeout(() => {\n timer = null;\n fn();\n }, ms);\n };\n}\n","import type React from 'react';\nimport { useCallback, useState } from 'react';\nimport { Copy as CopyIcon, Success } from '../../assets/icons';\nimport { cs } from '../../utils';\n\ninterface CopyProps {\n copyText?: string;\n label?: string;\n className?: string;\n}\n\nexport const Copy: React.FC<CopyProps> = ({ copyText, label, className = '' }) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copyToClipboard = useCallback(async (text: string): Promise<boolean> => {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 2000);\n return true;\n }\n return false;\n } catch (err) {\n console.error('Copy failed:', err);\n return false;\n }\n }, []);\n\n return (\n <button\n type=\"button\"\n className={cs(\n 'luno:cursor-pointer luno:bg-transparent luno:border-none luno:p-1 luno:m-0 luno:inline-flex luno:items-center luno:justify-center luno:gap-1',\n 'luno:rounded-modalControlButton luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200',\n className\n )}\n onClick={() => !isCopied && copyText && copyToClipboard(copyText)}\n aria-label=\"Copy address to clipboard\"\n disabled={isCopied}\n >\n {isCopied ? (\n <Success className=\"luno:text-accentColor\" width={16} height={16} />\n ) : (\n <CopyIcon width={16} height={16} />\n )}\n {label}\n </button>\n );\n};\n","// packages/ui/src/components/Dialog/index.tsx\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport React, { type ReactNode } from 'react';\nimport { cs } from '../../utils';\n\nexport type ModalSize = 'compact' | 'wide';\n\nexport type ModalContainer = HTMLElement | (() => HTMLElement | null) | null;\n\ninterface DialogProps {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n children: ReactNode;\n contentClassName?: string;\n overlayClassName?: string;\n container?: ModalContainer;\n}\n\ninterface DialogTitleProps {\n children: ReactNode;\n className?: string;\n}\n\ninterface DialogCloseProps {\n children: ReactNode;\n className?: string;\n onClick?: () => void;\n}\n\nconst DialogRoot: React.FC<DialogProps> = ({\n open,\n onOpenChange,\n children,\n contentClassName,\n overlayClassName,\n container,\n}) => {\n const portalContainer = React.useMemo(() => {\n if (!container) return undefined;\n return typeof container === 'function' ? container() : container;\n }, [container]);\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal container={portalContainer}>\n {React.createElement(DialogPrimitive.Overlay as any, {\n className: cs(\n 'luno:fixed luno:inset-0 luno:backdrop-blur-modalOverlay luno:z-[100] luno:bg-modalBackdrop luno-kit',\n 'luno:data-[state=open]:[animation:overlay-in_150ms_ease-out]',\n overlayClassName\n ),\n })}\n <DialogPrimitive.Content\n className={cs(\n 'luno-kit luno:font-body luno:fixed luno:z-[200] luno:text-modalText luno:text-base luno:leading-base',\n 'luno:bg-modalBackground luno:shadow-modal luno:focus:outline-none luno:overflow-hidden luno:border luno:border-modalBorder',\n 'luno:transition-all luno:duration-200',\n\n 'luno:rounded-t-modalMobile luno:bottom-0 luno:left-0 luno:w-full',\n 'luno:translate-y-0 luno:-translate-x-0',\n 'luno:data-[state=open]:[animation:slide-up_200ms_ease-out]',\n\n 'luno:md:bottom-auto luno:md:left-1/2 luno:md:top-1/2 luno:md:-translate-x-1/2 luno:md:-translate-y-1/2',\n 'luno:md:w-auto luno:md:rounded-modal',\n 'luno:md:data-[state=open]:[animation:dialog-in_150ms_ease-out]',\n contentClassName\n )}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n\nconst DialogTitleWrapper: React.FC<DialogTitleProps> = ({ children, className }) =>\n React.createElement(DialogPrimitive.Title as any, { className }, children);\n\nconst DialogCloseWrapper: React.FC<DialogCloseProps> = ({ children, className, onClick }) =>\n React.createElement(DialogPrimitive.Close as any, { className, onClick }, children);\n\nexport const Dialog = DialogRoot;\nexport const DialogClose = DialogCloseWrapper;\nexport const DialogTitle = DialogTitleWrapper;\n\nexport type { DialogProps, DialogTitleProps, DialogCloseProps };\n","import type React from 'react';\nimport { useState } from 'react';\nimport { cs } from '../../utils';\nimport { NFTList } from './NFTList';\nimport { TokenList } from './TokenList';\n\nenum AssetFilter {\n tokens = 'Tokens',\n nfts = 'NFTs',\n}\n\nconst FILTER_TABS = [\n { key: AssetFilter.tokens, label: AssetFilter.tokens },\n { key: AssetFilter.nfts, label: AssetFilter.nfts },\n] as const;\n\nexport const AssetList: React.FC = () => {\n const [activeFilter, setActiveFilter] = useState<AssetFilter>(AssetFilter.tokens);\n\n return (\n <div className={cs('luno:flex luno:flex-col luno:gap-3.5 luno:p-4 luno:pt-0')}>\n <div className={cs('luno:flex luno:items-center luno:gap-1.5 luno:w-full')}>\n {FILTER_TABS.map((tab) => (\n <button\n key={tab.key}\n onClick={() => setActiveFilter(tab.key)}\n className={cs(\n 'luno:px-3.5 luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:min-w-[48px] luno:min-h-[24px] luno:rounded-networkSelectItem luno:text-[12px] luno:leading-[16px] luno:font-medium luno:transition-colors',\n activeFilter === tab.key\n ? 'luno:bg-navigationButtonBackground luno:text-modalText'\n : 'luno:bg-transparent text-modalTextSecondary luno:hover:text-modalText'\n )}\n >\n {tab.label}\n </button>\n ))}\n </div>\n\n <div className={cs('luno:overflow-y-auto luno:flex-1 luno:min-h-[350px] luno:max-h-[350px]')}>\n {activeFilter === AssetFilter.tokens ? <TokenList /> : <NFTList />}\n </div>\n </div>\n );\n};\n","import { useAccount, useChain } from '@luno-kit/react';\nimport React, { useMemo, useState } from 'react';\nimport { DefaultNFT, Link } from '../../assets/icons';\nimport { type AssetItem as AssetItemType, useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { EmptyAsset } from './EmptyAsset';\n\nexport const NFTList = React.memo(() => {\n const { data, isFetching, error } = useSubscanTokens();\n\n const listData: AssetItemType[] = useMemo(() => {\n if (!data) return [];\n\n return data.nfts;\n }, [data]);\n\n if (isFetching) {\n return (\n <div className=\"luno:flex luno:justify-center luno:w-full\">\n <div className=\"luno:flex luno:flex-wrap luno:justify-between luno:max-w-[350px] luno:w-full luno:min-h-[300px] luno:gap-y-4\">\n {[1, 2, 3, 4].map((num) => (\n <div\n key={`skeleton-${num}`}\n className=\"luno:animate-pulse luno:bg-skeleton luno:w-[155px] luno:h-[198px] luno:rounded-assetSelectItem\"\n />\n ))}\n </div>\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center luno:p-4\">\n <div className=\"luno:text-error luno:mb-2\">Failed to load assets</div>\n <div className=\"luno:text-modalTextSecondary luno:text-sm\">\n {error instanceof Error ? error.message : 'Unknown error'}\n </div>\n </div>\n );\n }\n\n if (!listData.length) {\n return <EmptyAsset type={'NFTs'} />;\n }\n\n return (\n <div className=\"luno:flex luno:justify-center luno:w-full\">\n <div className=\"luno:flex luno:flex-wrap luno:justify-between luno:max-w-[350px] luno:w-full luno:gap-y-4\">\n {listData.map((item) => (\n <NFTItem asset={item} key={`${item.symbol}-${item.balance}`} />\n ))}\n </div>\n </div>\n );\n});\n\ninterface NFTItemProps {\n asset: AssetItemType;\n}\n\nconst NFTItem: React.FC<NFTItemProps> = React.memo(({ asset }) => {\n const { chain } = useChain();\n const { address } = useAccount();\n const [isLoading, setIsLoading] = useState(!!asset.logoURI);\n const [imgSrc, setImgSrc] = useState(asset.logoURI);\n\n const linkExplorer = useMemo(() => {\n if (!chain?.subscan?.url) return '';\n\n const subscanUrl = chain.subscan.url.endsWith('/')\n ? chain.subscan.url.slice(0, -1)\n : chain.subscan.url;\n\n return `${subscanUrl}/nft_item?collection_id=${asset.assetId}&address=${address}`;\n }, [chain, asset, address]);\n\n return (\n <div\n className={cs(\n 'luno:w-[155px] luno:h-[198px] luno:flex luno:items-center luno:p-2.5 luno:rounded-assetSelectItem luno:cursor-default',\n 'luno:bg-assetSelectItemBackground',\n 'luno:transition-colors luno:duration-200'\n )}\n >\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center\">\n <div\n className={\n 'luno:relative luno:w-[135px] luno:h-[135px] luno:flex luno:items-center luno:justify-center luno:rounded-[6px] luno:overflow-hidden'\n }\n >\n {isLoading && (\n <div className=\"luno:absolute luno:inset-0 luno:flex luno:items-center luno:justify-center luno:animate-pulse luno:bg-gray-500\">\n <div className=\"luno:w-4 luno:h-4 luno:border-2 luno:border-t-transparent luno:border-white luno:rounded-full luno:animate-spin\" />\n </div>\n )}\n {imgSrc ? (\n <img\n src={imgSrc}\n alt={`${asset.symbol}-NFT`}\n className={cs(\n 'luno:w-full luno:h-full luno:object-cover',\n isLoading\n ? 'luno:opacity-0'\n : 'luno:opacity-100 luno:transition-opacity luno:duration-200'\n )}\n onLoad={() => setIsLoading(false)}\n onError={() => {\n setIsLoading(false);\n setImgSrc('');\n }}\n />\n ) : (\n <DefaultNFT className={'luno:w-full luno:h-full luno:object-cover'} />\n )}\n </div>\n\n <div className={'luno:flex luno:items-center luno:justify-between luno:w-full luno:mt-0.5'}>\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {asset.balance || '-'} NFTs\n </span>\n <button\n className=\"luno:cursor-pointer luno:bg-transparent luno:border-none luno:p-1 luno:m-0 luno:inline-flex luno:items-center luno:justify-center luno:gap-1 luno:rounded-modalControlButton luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200\"\n onClick={() => linkExplorer && window.open(linkExplorer)}\n >\n <Link />\n </button>\n </div>\n <div className=\"luno:w-full luno:text-left luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap luno:max-w-[135px] luno:overflow-hidden luno:text-ellipsis\">\n {asset.symbol || asset.assetId}\n </div>\n </div>\n </div>\n );\n});\n","import { useAccount, useChain, useConfig } from '@luno-kit/react';\nimport { formatBalance } from '@luno-kit/react/utils';\nimport { useQuery } from '@tanstack/react-query';\n\nexport interface AssetItem {\n balance: string;\n decimals: number;\n balanceFormatted: string;\n logoURI?: string;\n symbol: string;\n assetId: string;\n price?: string;\n}\n\ninterface AssetData {\n balance: string;\n decimals: number;\n token_image?: string;\n unique_id?: string;\n symbol: string;\n asset_id?: string;\n price?: string;\n}\n\nconst fetchAssets = async ({\n apiUrl,\n apiKey,\n address,\n}: {\n apiUrl: string;\n apiKey: string;\n address: string;\n}): Promise<{ nfts: AssetItem[]; tokens: AssetItem[] }> => {\n try {\n const response = await fetch(`${apiUrl}/api/scan/account/tokens`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-API-Key': apiKey,\n },\n body: JSON.stringify({ address }),\n });\n\n if (!response.ok) {\n throw new Error(`Subscan API error: ${response.status}`);\n }\n\n const result = await response.json();\n\n if (result.code !== 0) {\n throw new Error(`Subscan API error: ${result.message}`);\n }\n\n const assets = result.data.assets || [];\n const native = result.data.native || [];\n\n const builtin = result.data.builtin || [];\n\n const nfts = assets\n .filter((i: AssetData) => i.token_image || i.unique_id?.includes('nft'))\n .map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals),\n logoURI: i.token_image,\n symbol: i.symbol,\n assetId: i.asset_id,\n price: i.price,\n }));\n\n const tokens = assets\n .filter((i: AssetData) => !i.token_image && !i.unique_id?.includes('nft'))\n .map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: i.token_image,\n symbol: i.symbol,\n assetId: i.asset_id,\n price: i.price,\n }));\n\n const nativeTokens = native.map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: '',\n symbol: i.symbol,\n assetId: 0,\n price: i.price,\n }));\n\n const builtinTokens = builtin.map((i: AssetData) => ({\n balance: i.balance,\n decimals: i.decimals,\n balanceFormatted: formatBalance(i.balance, i.decimals, 4),\n logoURI: '',\n symbol: i.symbol,\n assetId: i.unique_id,\n price: i.price,\n }));\n\n return {\n nfts: [...nfts],\n tokens: [...nativeTokens, ...tokens, ...builtinTokens],\n };\n } catch (error) {\n console.error('Failed to fetch tokens from Subscan:', error);\n throw error;\n }\n};\n\nexport function useSubscanTokens() {\n const { address } = useAccount();\n const config = useConfig();\n const { chain } = useChain();\n\n const apiUrl = chain?.subscan?.api;\n const apiKey = config?.subscan?.apiKey;\n\n return useQuery({\n queryKey: ['subscan', 'asset-list', address, chain?.genesisHash, apiUrl, apiKey],\n queryFn: () => fetchAssets({ address: address!, apiKey: apiKey!, apiUrl: apiUrl! }),\n enabled: !!address && !!apiKey && !!apiUrl,\n staleTime: config?.subscan?.cacheTime || 60000,\n });\n}\n","import { EmptyWallet } from '../../assets/icons';\n\ninterface Props {\n type: 'Tokens' | 'NFTs';\n}\n\nexport const EmptyAsset = ({ type }: Props) => {\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1 luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center\">\n <EmptyWallet className={'luno:w-[38px] luno:h-[38px] luno:mb-2'} />\n <div className=\"luno:text-modalText luno:text-base luno:leading-base\">No {type} found</div>\n <div className=\"luno:text-sm luno:text-modalTextSecondary luno:max-w-[260px]\">\n Switch to a different network or account to view more assets\n </div>\n </div>\n );\n};\n","import React, { useMemo } from 'react';\nimport { type AssetItem as AssetItemType, useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\nimport { EmptyAsset } from './EmptyAsset';\n\nconst getAssetIconUrl = (symbol: string): string => {\n const normalizedSymbol = symbol?.toLowerCase().trim() || '';\n\n return `https://raw.githubusercontent.com/Luno-lab/luno-assets/refs/heads/main/assets/tokens/${normalizedSymbol}.webp`;\n};\n\nexport const TokenList = React.memo(() => {\n const { data, error, isFetching } = useSubscanTokens();\n\n const listData: AssetItemType[] = useMemo(() => {\n if (!data) return [];\n\n return [...data.tokens].sort((a, b) => {\n const aTotal = a.price ? (parseFloat(a.balance) / 10 ** a.decimals) * parseFloat(a.price) : 0;\n const bTotal = b.price ? (parseFloat(b.balance) / 10 ** b.decimals) * parseFloat(b.price) : 0;\n return bTotal - aTotal;\n });\n }, [data]);\n\n if (isFetching) {\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:min-h-[300px]\">\n {[1, 2, 3, 4, 5].map((num) => (\n <div\n key={`skeleton-${num}`}\n className=\"luno:animate-pulse luno:bg-skeleton luno:h-[54px] luno:rounded-assetSelectItem\"\n />\n ))}\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:justify-center luno:min-h-[300px] luno:text-center luno:p-4\">\n <div className=\"luno:text-error luno:mb-2\">Failed to load assets</div>\n <div className=\"luno:text-modalTextSecondary luno:text-sm\">\n {error instanceof Error ? error.message : 'Unknown error'}\n </div>\n </div>\n );\n }\n\n if (!listData.length) {\n return <EmptyAsset type={'Tokens'} />;\n }\n\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5\">\n {listData.map((item) => (\n <TokenItem asset={item} key={`${item.symbol}-${item.assetId}`} />\n ))}\n </div>\n );\n});\n\ninterface TokenItemProps {\n asset: AssetItemType;\n}\n\nconst TokenItem: React.FC<TokenItemProps> = React.memo(({ asset }) => {\n const iconUrl = asset.logoURI || getAssetIconUrl(asset.symbol);\n\n const displayValue = React.useMemo(() => {\n if (!asset.price) return null;\n const balance = parseFloat(asset.balance) / 10 ** asset.decimals;\n const price = parseFloat(asset.price);\n const total = balance * price;\n return `$${total.toFixed(2)}`;\n }, [asset.balance, asset.decimals, asset.price]);\n\n return (\n <div\n role=\"listitem\"\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:p-2.5 luno:rounded-assetSelectItem luno:cursor-default',\n 'luno:bg-assetSelectItemBackground',\n 'luno:transition-colors luno:duration-200'\n )}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2\">\n <Icon\n className={'luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center'}\n iconUrl={iconUrl}\n resourceName={`${asset.symbol}-token`}\n />\n\n <div className=\"luno:flex luno:flex-col luno:items-start\">\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {asset.symbol || 'Unknown'}\n </span>\n <span\n className={\n 'luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap'\n }\n >\n {asset.balanceFormatted}\n </span>\n </div>\n </div>\n\n {asset.price && (\n <div className=\"luno:flex luno:flex-col luno:items-end\">\n <span className=\"luno:font-medium luno:text-sm luno:leading-sm luno:text-modalText\">\n {displayValue}\n </span>\n <span\n className={\n 'luno:text-xs luno:text-modalTextSecondary luno:font-medium luno:whitespace-nowrap'\n }\n >\n ${asset.price}\n </span>\n </div>\n )}\n </div>\n );\n});\n","import type React from 'react';\nimport { useMemo, useState } from 'react';\nimport { cs } from '../../utils';\n\nexport interface IconProps {\n iconUrl?: string;\n resourceName?: string;\n className?: string;\n}\n\nexport const Icon: React.FC<IconProps> = ({ iconUrl, resourceName, className }) => {\n const [isLoading, setIsLoading] = useState(!!iconUrl);\n const [hasError, setHasError] = useState(false);\n\n const displayText = useMemo(() => {\n if (!resourceName) return '-';\n\n const match = resourceName.match(/^([^-]+)-/);\n if (match?.[1]) {\n return match[1].charAt(0).toUpperCase();\n }\n\n return resourceName.charAt(0).toUpperCase();\n }, [resourceName]);\n\n if (iconUrl && !hasError) {\n return (\n <div className={cs('luno:relative luno:w-full luno:h-full', className)}>\n {isLoading && (\n <div className=\"luno:absolute luno:inset-0 luno:flex luno:items-center luno:justify-center luno:rounded-full luno:animate-pulse luno:bg-skeleton\" />\n )}\n\n <img\n src={iconUrl}\n alt={resourceName || 'icon'}\n className={cs(\n 'luno:w-full luno:h-full luno:object-cover luno:rounded-full',\n isLoading\n ? 'luno:opacity-0'\n : 'luno:opacity-100 luno:transition-opacity luno:duration-200'\n )}\n onLoad={() => setIsLoading(false)}\n onError={() => {\n setIsLoading(false);\n setHasError(true);\n }}\n />\n </div>\n );\n }\n\n return (\n <div\n className={cs(\n 'luno:w-full luno:h-full luno:text-white luno:font-semibold',\n 'luno:flex luno:items-center luno:justify-center luno:rounded-full luno:bg-defaultIconBackground',\n className\n )}\n >\n {displayText}\n </div>\n );\n};\n","import type React from 'react';\nimport { AssetList } from '../AssetList';\n\ninterface ViewComponent extends React.FC {\n title?: string;\n}\n\nexport const AssetListView: ViewComponent = () => {\n return (\n <div className={'luno:relative'}>\n <AssetList />\n </div>\n );\n};\n\nAssetListView.title = 'View Assets';\n","import {\n useAccount,\n useBalance,\n useChain,\n useChains,\n useConfig,\n useDisconnect,\n} from '@luno-kit/react';\nimport { getExplorerUrl } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useMemo } from 'react';\nimport { Arrow, Coin, Disconnect, List, Switch } from '../../assets/icons';\nimport { useSubscanTokens } from '../../hooks/useSubscanTokens';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\nimport { AccountModalView } from './index';\n\ninterface MainViewProps {\n onViewChange: (view: AccountModalView) => void;\n onModalClose: () => void;\n}\n\nexport const MainView: React.FC<MainViewProps> = ({ onViewChange, onModalClose }) => {\n const { address } = useAccount();\n const { chain } = useChain();\n const chains = useChains();\n const { disconnectAsync } = useDisconnect();\n const { data: balance } = useBalance({ address: chains.length > 0 ? address : undefined });\n const config = useConfig();\n const { refetch } = useSubscanTokens();\n\n const items = useMemo(() => {\n const chainNameItem = {\n key: 'Chain Name',\n content: (\n <div className={'luno:flex luno:items-stretch luno:w-full luno:justify-between'}>\n <div className={'luno:flex luno:items-center luno:gap-2'}>\n <div className=\"luno:relative\">\n <Icon\n className=\"luno:w-[24px] luno:h-[24px]\"\n iconUrl={chain?.chainIconUrl}\n resourceName={`${chain?.name}-chain`}\n />\n {/* <div className={'dot luno:w-[8px] luno:h-[8px] luno:bg-accentColor luno:absolute luno:bottom-0 luno:right-0 luno:rounded-full'}/> */}\n </div>\n <div className={'luno:flex luno:flex-col luno:items-start'}>\n <span className=\"luno:text-base luno:leading-base luno:text-modalText\">\n {chain?.name || 'Polkadot'}\n </span>\n {balance ? (\n <span className={'luno:text-modalTextSecondary luno:text-xs luno:leading-xs'}>\n {balance.formattedTransferable || '0.00'} {chain?.nativeCurrency?.symbol || 'DOT'}\n </span>\n ) : (\n <span className=\"luno:animate-pulse luno:rounded luno:w-[80px] luno:h-[16px] luno:bg-skeleton\" />\n )}\n </div>\n </div>\n <div className={'luno:flex luno:items-center luno:justify-center'}>\n <Arrow className={'luno:w-[16px] luno:h-[16px] luno:text-modalTextSecondary'} />\n </div>\n </div>\n ),\n onClick: () => onViewChange(AccountModalView.switchChain),\n };\n\n const switchAccountItem = {\n key: 'Switch Account',\n content: (\n <>\n <Switch className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText\">Switch Account</span>\n </>\n ),\n onClick: () => onViewChange(AccountModalView.switchAccount),\n };\n\n const assetListItem = {\n key: 'View Assets',\n content: (\n <>\n <Coin className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText\">View Assets</span>\n </>\n ),\n onClick: () => {\n onViewChange(AccountModalView.assetList);\n refetch();\n },\n };\n\n const explorerItem = {\n key: 'View on Explorer',\n content: (\n <>\n <List className={'luno:w-[24px] luno:h-[24px]'} />\n <span className=\"luno:text-base luno:text-accountActionItemText luno:font-medium\">\n View on Explorer\n </span>\n </>\n ),\n onClick: () =>\n window.open(getExplorerUrl(chain?.blockExplorers?.default?.url!, address, 'address')),\n };\n\n if (chains.length === 0) return [switchAccountItem];\n\n return config?.subscan?.apiKey\n ? [chainNameItem, explorerItem, assetListItem, switchAccountItem]\n : [chainNameItem, explorerItem, switchAccountItem];\n }, [onViewChange, chain, address, balance, chains, config]);\n\n const handleDisconnect = async () => {\n await disconnectAsync();\n onModalClose();\n };\n\n return (\n <div className=\"luno:flex luno:flex-col luno:items-center luno:gap-3 luno:w-full\">\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:w-full luno:px-4\">\n {items.map((i) => (\n <SelectItem key={i.key} onClick={i.onClick}>\n {i.content}\n </SelectItem>\n ))}\n </div>\n <div className={'luno:w-full luno:mx-[-100px] luno:h-[1px] luno:bg-separatorLine'} />\n\n <div className={'luno:w-full luno:px-4 luno:pb-4'}>\n <SelectItem onClick={handleDisconnect}>\n <Disconnect />\n <span className=\"luno:text-base luno:text-accountActionItemText \">Disconnect</span>\n </SelectItem>\n </div>\n </div>\n );\n};\n\nconst SelectItem = ({ children, onClick }: { children: React.ReactNode; onClick?: () => void }) => {\n return (\n <button\n type=\"button\"\n onClick={() => onClick?.()}\n className={cs(\n 'luno:w-full luno:p-2.5 luno:rounded-accountActionItem luno:border-none luno:text-left luno:flex luno:items-center luno:gap-2 luno:font-medium',\n 'luno:bg-accountActionItemBackground luno:hover:bg-accountActionItemBackgroundHover',\n 'luno:transition-colors luno:duration-200',\n onClick ? 'luno:cursor-pointer' : 'luno:cursor-auto'\n )}\n aria-label={typeof children === 'string' ? children : undefined}\n >\n {children}\n </button>\n );\n};\n","import {\n useAccount,\n useAccounts,\n useActiveConnector,\n useBalance,\n useChain,\n useChains,\n} from '@luno-kit/react';\nimport type { Account } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport React, { useCallback } from 'react';\nimport { cs } from '../../utils';\n\ninterface ViewComponent extends React.FC<SwitchAccountViewProps> {\n title?: string;\n}\n\ninterface SwitchAccountViewProps {\n onBack: () => void;\n}\n\nexport const SwitchAccountView: ViewComponent = ({ onBack }) => {\n const { accounts, selectAccount } = useAccounts();\n const { address: currentAddress } = useAccount();\n\n const _selectAccount = useCallback(\n (acc: Account) => {\n selectAccount(acc);\n onBack();\n },\n [onBack]\n );\n\n return (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:overflow-auto luno:max-h-[400px] luno:no-scrollbar luno:p-4 luno:pt-0\">\n {accounts.map((acc) => (\n <AccountItem\n key={acc.address}\n account={acc}\n isSelected={acc.address === currentAddress}\n selectAccount={_selectAccount}\n />\n ))}\n </div>\n );\n};\n\nSwitchAccountView.title = 'Switch Account';\n\ninterface AccountItemProps {\n isSelected: boolean;\n account: Account;\n selectAccount: (acc: Account) => void;\n}\n\nconst AccountItem: React.FC<AccountItemProps> = React.memo(\n ({ isSelected, account, selectAccount }) => {\n const { chain } = useChain();\n const chains = useChains();\n const address = account.address;\n const { data: balance } = useBalance({ address: chains.length > 0 ? address : undefined });\n const connector = useActiveConnector();\n\n return (\n <button\n type=\"button\"\n onClick={() => selectAccount(account)}\n className={cs(\n 'luno:px-3.5 luno:py-2.5 luno:w-full luno:rounded-accountSelectItem luno:border-none',\n 'luno:bg-accountSelectItemBackground',\n 'luno:text-left luno:flex luno:items-center luno:justify-between luno:gap-2',\n 'luno:transition-colors luno:duration-200',\n isSelected\n ? 'luno:cursor-auto'\n : 'luno:cursor-pointer luno:hover:bg-accountSelectItemBackgroundHover'\n )}\n aria-label={account.name || address}\n disabled={isSelected}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2 luno:grow luno:overflow-hidden\">\n <div className=\"luno:shrink-0 luno:w-[24px] luno:h-[24px] luno:rounded-full luno:flex luno:items-center luno:justify-center\">\n {connector?.icon && <img src={connector?.icon} alt=\"luno account\" />}\n </div>\n <div className=\"luno:flex luno:flex-col luno:items-start luno:overflow-hidden\">\n <span className=\"luno:whitespace-nowrap luno:max-w-full luno:text-ellipsis luno:overflow-hidden luno:font-medium luno:text-sm luno:leading-sm luno:text-accountSelectItemText\">\n {account.name || formatAddress(address)}\n </span>\n {chains.length > 0 &&\n (balance ? (\n <span className=\"luno:text-xs luno:text-modalTextSecondary luno:font-medium\">\n {balance?.formattedTransferable || '0.00'}{' '}\n {chain?.nativeCurrency?.symbol || 'DOT'}\n </span>\n ) : (\n <span className=\"luno:animate-pulse luno:rounded luno:w-[60px] luno:h-[16px] luno:bg-skeleton\" />\n ))}\n </div>\n </div>\n\n {isSelected && (\n <div className=\"luno:shrink-0 luno:border-[1px] luno:border-solid luno:border-accentColor luno:rounded-full luno:overflow-hidden luno:flex luno:items-center luno:justify-center luno:w-[18px] luno:h-[18px]\">\n <div className=\"luno:rounded-full luno:bg-accentColor luno:w-[10px] luno:h-[10px]\" />\n </div>\n )}\n </button>\n );\n }\n);\n","import { useApi, useChain, useChains, useSwitchChain } from '@luno-kit/react';\nimport type { Chain } from '@luno-kit/react/types';\nimport React, { useMemo, useState } from 'react';\nimport { Search } from '../../assets/icons';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\n\ninterface ChainListProps {\n onChainSwitched?: (chain: Chain) => void;\n className?: string;\n}\n\nexport const ChainList: React.FC<ChainListProps> = ({\n onChainSwitched,\n className = '',\n}: ChainListProps) => {\n const { chain: currentChain } = useChain();\n const chains = useChains();\n const { switchChainAsync } = useSwitchChain();\n const { isApiReady, apiError } = useApi();\n\n const [switchingChain, setSwitchingChain] = useState<string | null>(null);\n const [searchQuery, setSearchQuery] = useState('');\n\n const filteredChains = useMemo(() => {\n return chains.filter((chain) =>\n searchQuery.trim() ? chain.name.toLowerCase().includes(searchQuery.toLowerCase()) : true\n );\n }, [chains, searchQuery]);\n\n const handleChainSelect = async (chain: Chain) => {\n if (chain.genesisHash === currentChain?.genesisHash) return;\n if (!isApiReady && !apiError) return;\n\n setSwitchingChain(chain.genesisHash);\n try {\n await switchChainAsync({ chainId: chain.genesisHash });\n onChainSwitched?.(chain);\n } catch (error) {\n console.error('Failed to switch chain:', error);\n } finally {\n setSwitchingChain(null);\n }\n };\n\n return (\n <div className={cs('luno:flex luno:flex-col luno:gap-3.5', className)}>\n <div className=\"luno:relative luno:pt-1\">\n <div className=\"luno:relative\">\n <Search className=\"luno:absolute luno:left-3 luno:top-1/2 luno:transform luno:-translate-y-1/2 luno:w-4 luno:h-4 luno:text-modalTextSecondary\" />\n <input\n type=\"text\"\n placeholder=\"Search by name\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"luno:w-full luno:pl-10 luno:pr-3 luno:py-2 luno:text-sm luno:border luno:border-networkSelectItemBackgroundHover luno:rounded-md luno:focus:ring-2 luno:focus:ring-accentColor luno:focus:outline-none luno:focus:border-transparent\"\n />\n </div>\n </div>\n\n {filteredChains.length > 0 && (\n <div className=\"luno:flex luno:flex-col luno:gap-1.5 luno:overflow-y-auto luno:max-h-[380px]\">\n {filteredChains.map((chain) => (\n <ChainItem\n key={chain.genesisHash}\n chain={chain}\n isSelected={chain.genesisHash === currentChain?.genesisHash}\n onSelect={handleChainSelect}\n isLoading={(switchingChain === chain.genesisHash || !isApiReady) && !apiError}\n isSwitching={switchingChain === chain.genesisHash}\n />\n ))}\n </div>\n )}\n\n {filteredChains.length === 0 && (\n <div className=\"luno:flex luno:items-center luno:justify-center luno:py-12\">\n <span className=\"luno:text-modalTextSecondary luno:text-xs\">No chains available</span>\n </div>\n )}\n </div>\n );\n};\n\ninterface ChainItemProps {\n chain: Chain;\n isSelected: boolean;\n isLoading: boolean;\n onSelect: (chain: Chain) => void;\n isSwitching: boolean;\n}\n\nconst ChainItem: React.FC<ChainItemProps> = React.memo(\n ({ chain, isSelected, isLoading, onSelect, isSwitching }) => {\n return (\n <button\n onClick={() => onSelect(chain)}\n disabled={isSelected || isLoading}\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:p-2.5 luno:rounded-networkSelectItem',\n 'luno:bg-networkSelectItemBackground',\n 'luno:transition-colors luno:duration-200',\n isSelected || isLoading\n ? 'luno:cursor-default'\n : 'luno:cursor-pointer luno:hover:bg-networkSelectItemBackgroundHover',\n isLoading && 'luno:opacity-80'\n )}\n >\n <div className=\"luno:flex luno:items-center luno:gap-2\">\n <Icon\n className={\n 'luno:w-[20px] luno:h-[20px] luno:flex luno:items-center luno:justify-center luno:leading-[20px]'\n }\n iconUrl={chain?.chainIconUrl}\n resourceName={`${chain?.name}-chain`}\n />\n\n <div className=\"luno:flex luno:flex-col luno:items-start\">\n <span className=\"luno:font-medium luno:text-base luno:text-modalText\">\n {chain.name}\n </span>\n </div>\n </div>\n\n <div className=\"luno:flex luno:items-center luno:justify-center luno:h-[20px]\">\n {isSelected ? (\n isLoading ? (\n <>\n <span className=\"luno:text-accentColor luno:text-xs luno:leading-xs luno:mr-1.5\">\n {isSwitching ? 'Switching' : 'Connecting'}\n </span>\n <div className=\"luno-loading luno:text-accentColor luno:w-[15px] luno:h-[15px]\"></div>\n </>\n ) : (\n <span className=\"luno:relative luno:flex luno:w-[10px] luno:h-[10px]\">\n <span className=\"luno:[animation:ping_1.2s_cubic-bezier(0,0,0.2,1)_infinite] luno:absolute luno:top-[0] luno:left-[0] luno:inline-flex luno:h-full luno:w-full luno:rounded-full luno:bg-accentColor\" />\n <span className=\"luno:relative luno:inline-flex luno:rounded-full luno:h-full luno:w-full luno:bg-accentColor\"></span>\n </span>\n )\n ) : null}\n </div>\n </button>\n );\n }\n);\n","import type React from 'react';\nimport { ChainList } from '../ChainList';\n\ninterface ViewComponent extends React.FC<SwitchChainViewProps> {\n title?: string;\n}\n\ninterface SwitchChainViewProps {\n onBack: () => void;\n}\n\nexport const SwitchChainView: ViewComponent = ({ onBack }) => {\n return <ChainList className={'luno:p-4 luno:pt-0'} />;\n};\n\nSwitchChainView.title = 'Select Networks';\n","import type { Optional } from '@luno-kit/react/types';\nimport type React from 'react';\nimport { Close } from '../../assets/icons';\nimport { useChainModal } from '../../providers';\nimport { ChainList } from '../ChainList';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer } from '../Dialog';\n\ninterface ChainModalProps {\n container?: Optional<ModalContainer>;\n}\n\nexport const ChainModal: React.FC<ChainModalProps> = ({ container }) => {\n const { isOpen, close } = useChainModal();\n\n return (\n <Dialog container={container} open={isOpen} onOpenChange={(open) => !open && close()}>\n <div className=\"luno:flex luno:flex-col luno:w-full luno:md:w-[360px] luno:max-h-[512px] luno:p-4 luno:gap-3.5 luno:text-modalText\">\n <div className=\"luno:flex luno:items-center luno:justify-between luno:w-full\">\n <div className=\"luno:w-[30px]\" /> {/* Placeholder to keep title centered */}\n <DialogTitle className=\"luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300\">\n Select Network\n </DialogTitle>\n <DialogClose className=\"luno:z-10 luno:flex luno:items-center luno:justify-center luno:h-[30px] luno:w-[30px] luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200 luno:cursor-pointer\">\n <Close />\n </DialogClose>\n </div>\n\n <ChainList />\n </div>\n </Dialog>\n );\n};\n","import type { Optional } from '@luno-kit/react/types';\nimport { formatAddress } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useConnectButton, useWindowSize } from '../../hooks';\nimport { cs } from '../../utils';\nimport { Icon } from '../Icon';\n\nexport const transitionClassName =\n 'luno:transition-transform luno:transition-[125] luno:hover:scale-[1.03] luno:transition-ease';\n\nexport interface ConnectButtonProps {\n className?: Optional<string>;\n label?: Optional<string>;\n accountStatus?: Optional<'full' | 'address'>;\n chainStatus?: Optional<'full' | 'icon' | 'name' | 'none'>;\n showBalance?: Optional<boolean>;\n displayPreference?: Optional<'address' | 'name'>;\n}\n\nexport const ConnectButton: React.FC<ConnectButtonProps> = ({\n className,\n label = 'Connect Wallet',\n accountStatus = 'full',\n chainStatus = 'full',\n showBalance = true,\n displayPreference = 'address',\n}) => {\n const {\n isConnected,\n isDisconnected,\n account,\n balance,\n openConnectModal,\n openAccountModal,\n openChainModal,\n chainIconUrl,\n chainName,\n currentChain,\n configuredChains,\n activeConnector,\n } = useConnectButton();\n const { width: windowWidth } = useWindowSize();\n\n const isLargeWindow = windowWidth && windowWidth > 768;\n\n if (isDisconnected || !isConnected || !activeConnector) {\n return (\n <button\n type=\"button\"\n onClick={() => openConnectModal?.()}\n className={cs(\n 'luno-kit luno:cursor-pointer luno:font-semibold luno:inline-flex luno:items-center luno:justify-center luno:focus:outline-none',\n 'luno:text-connectButtonText luno:bg-connectButtonBackground luno:shadow-button luno:active:scale-[0.95]',\n 'luno:rounded-connectButton',\n transitionClassName,\n 'luno:px-3.5 luno:text-base luno:leading-base luno:min-h-[40px]',\n className\n )}\n >\n {label}\n </button>\n );\n }\n\n return (\n <div\n className={cs(\n 'luno-kit luno:text-modalText luno:flex luno:items-stretch luno:bg-transparent luno:font-semibold luno:text-base luno:leading-base luno:gap-3',\n className\n )}\n >\n {chainStatus !== 'none' && configuredChains.length > 0 && (\n <button\n type=\"button\"\n onClick={() => openChainModal?.()}\n className={cs(\n 'luno:flex luno:items-center luno:rounded-currentNetworkButton luno:cursor-pointer',\n 'luno:bg-currentNetworkButtonBackground luno:shadow-button',\n 'luno:py-2 luno:px-2.5 luno:gap-1.5',\n transitionClassName\n )}\n aria-label=\"Switch chain\"\n >\n {chainStatus === 'full' || chainStatus === 'icon' ? (\n <Icon\n iconUrl={chainIconUrl}\n resourceName={`${chainName}-chain`}\n className={cs('luno:w-[24px] luno:h-[24px]')}\n />\n ) : null}\n {(chainStatus === 'full' || chainStatus === 'name') && isLargeWindow && (\n <span>{currentChain?.name || 'Unknown Chain'}</span>\n )}\n </button>\n )}\n\n <button\n type=\"button\"\n onClick={() => openAccountModal?.()}\n className={cs(\n 'luno:flex luno:items-center luno:cursor-pointer luno:rounded-connectButton luno:bg-connectButtonBackground luno:shadow-button',\n transitionClassName\n )}\n aria-label=\"Open account modal\"\n >\n {configuredChains.length > 0 && showBalance && isLargeWindow && (\n <div className={cs('luno:p-2 luno:pl-3')}>\n {balance ? (\n <span>\n {balance?.formattedTransferable || balance?.formattedTotal || 0}{' '}\n {currentChain?.nativeCurrency?.symbol || ''}\n </span>\n ) : (\n <span\n className={cs(\n 'luno:block luno:animate-pulse luno:rounded luno:w-[80px] luno:h-[20px] luno:bg-accountActionItemBackgroundHover'\n )}\n />\n )}\n </div>\n )}\n\n <div\n className={cs(\n 'luno:flex luno:items-center luno:overflow-hidden luno:bg-connectButtonInnerBackground luno:border-2 luno:border-connectButtonBackground luno:rounded-connectButton luno:gap-1.5 luno:max-h-[40px]',\n configuredChains.length > 0 && showBalance && isLargeWindow\n ? 'luno:bg-connectButtonInnerBackground luno:py-1.5 luno:px-2'\n : 'luno:bg-connectButtonBackground luno:py-2 luno:px-2.5'\n )}\n >\n {accountStatus === 'full' && (\n <span\n className={cs(\n 'luno:w-[24px] luno:h-[24px] luno:flex luno:items-center luno:justify-center'\n )}\n >\n <img src={activeConnector.icon} alt=\"luno account\" />\n </span>\n )}\n <span\n className={cs(\n displayPreference === 'name' && account?.name\n ? 'luno:text-ellipsis luno:overflow-hidden luno:max-w-[115px] luno:whitespace-nowrap'\n : ''\n )}\n >\n {displayPreference === 'name' && account?.name\n ? account?.name\n : formatAddress(account?.address)}\n </span>\n </div>\n </button>\n </div>\n );\n};\n","import {\n ConnectionStatus,\n useAccount,\n useActiveConnector,\n useBalance,\n useChain,\n useChains,\n useStatus,\n} from '@luno-kit/react';\nimport type { Account, AccountBalance, Chain, Connector, Optional } from '@luno-kit/react/types';\nimport { useAccountModal, useChainModal, useConnectModal } from '../providers';\n\nexport interface UseConnectButtonReturn {\n connectionStatus: ConnectionStatus;\n isConnected: boolean;\n isDisconnected: boolean;\n isConnecting: boolean;\n\n account?: Optional<Account>;\n address?: Optional<string>;\n\n currentChain?: Optional<Chain>;\n configuredChains: Chain[];\n isChainSupported: boolean;\n chainIconUrl: string;\n chainName?: Optional<string>;\n\n balance?: Optional<AccountBalance>;\n\n activeConnector?: Optional<Connector>;\n\n openConnectModal?: Optional<() => void>;\n openAccountModal?: Optional<() => void>;\n openChainModal?: Optional<() => void>;\n\n isConnectModalOpen: boolean;\n isAccountModalOpen: boolean;\n isChainModalOpen: boolean;\n}\n\nexport function useConnectButton(): UseConnectButtonReturn {\n const connectionStatus = useStatus();\n const { account, address } = useAccount();\n const { chain: currentChain } = useChain();\n const configuredChains = useChains();\n const { data: balance } = useBalance({\n address: configuredChains.length > 0 ? address : undefined,\n });\n const activeConnector = useActiveConnector();\n\n const { open: openConnectModal, isOpen: isConnectModalOpen } = useConnectModal();\n const { open: openAccountModal, isOpen: isAccountModalOpen } = useAccountModal();\n const { open: openChainModal, isOpen: isChainModalOpen } = useChainModal();\n\n const isConnecting = connectionStatus === ConnectionStatus.Connecting;\n const isConnected = connectionStatus === ConnectionStatus.Connected;\n const isDisconnected =\n connectionStatus === ConnectionStatus.Disconnected ||\n connectionStatus === ConnectionStatus.Disconnecting;\n\n const isChainSupported: boolean =\n !!currentChain &&\n configuredChains.some(\n (c) => c.genesisHash.toLowerCase() === currentChain.genesisHash.toLowerCase()\n );\n\n return {\n activeConnector,\n connectionStatus,\n isConnected,\n isDisconnected,\n isConnecting,\n\n account,\n address,\n\n currentChain,\n configuredChains,\n isChainSupported,\n chainIconUrl: currentChain?.chainIconUrl!,\n chainName: currentChain?.name,\n\n balance,\n\n openConnectModal,\n openAccountModal,\n openChainModal,\n\n isConnectModalOpen,\n isAccountModalOpen,\n isChainModalOpen,\n };\n}\n","import { useEffect, useState } from 'react';\nimport { debounce } from '../utils';\n\nexport const useWindowSize = () => {\n const [windowSize, setWindowSize] = useState<{\n width: number | undefined;\n height: number | undefined;\n }>({\n height: undefined,\n width: undefined,\n });\n\n useEffect(() => {\n const handleResize = debounce(() => {\n setWindowSize({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 500);\n window.addEventListener('resize', handleResize);\n handleResize();\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n return windowSize;\n};\n","import { useConnect } from '@luno-kit/react';\nimport type { Connector, Optional } from '@luno-kit/react/types';\nimport { isMobileDevice } from '@luno-kit/react/utils';\nimport type React from 'react';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Back, Close } from '../../assets/icons';\nimport { useWindowSize } from '../../hooks';\nimport { useAnimatedViews } from '../../hooks/useAnimatedViews';\nimport { type AppInfo, useConnectModal } from '../../providers';\nimport { cs } from '../../utils';\nimport { renderAppInfoText } from '../../utils/renderAppInfo';\nimport { Dialog, DialogClose, DialogTitle, type ModalContainer, type ModalSize } from '../Dialog';\nimport { ConnectOptions } from './ConnectOptions';\nimport { WalletView } from './WalletView';\n\nexport enum ConnectModalView {\n connectOptions = 'Connect Wallet',\n walletView = 'walletView',\n}\n\nexport interface ConnectModalProps {\n size?: Optional<ModalSize>;\n appInfo?: Optional<Partial<AppInfo>>;\n container?: Optional<ModalContainer>;\n showInstalledGroup?: Optional<boolean>;\n}\n\nexport const ConnectModal: React.FC<ConnectModalProps> = ({\n appInfo,\n container,\n showInstalledGroup = true,\n size = 'wide',\n}) => {\n const { isOpen, close } = useConnectModal();\n const {\n connectAsync,\n reset: resetConnect,\n isPending: isConnecting,\n isError: connectError,\n error: connectErrorMsg,\n } = useConnect();\n const [selectedConnector, setSelectedConnector] = useState<Connector | null>(null);\n const [qrCode, setQrCode] = useState<string | undefined>();\n\n const { width: windowWidth } = useWindowSize();\n\n const isLargeWindow = windowWidth && windowWidth > 768;\n const isWide = !!(size === 'wide' && isLargeWindow);\n\n const { containerRef, currentViewRef, resetView, handleViewChange, currentView } =\n useAnimatedViews({ initialView: ConnectModalView.connectOptions });\n\n const onQrCode = async (connector: Connector) => {\n const uri = await connector.getConnectionUri();\n\n setQrCode(uri);\n };\n\n const handleConnect = async (connector: Connector) => {\n if (isMobileDevice() && connector.links.deepLink) {\n try {\n await connectAsync({ connectorId: connector.id });\n _onOpenChange(false);\n return;\n } catch (error) {\n window.location.href = `${connector.links.deepLink}?url=${window.location.href}`;\n return;\n }\n }\n\n !isWide && handleViewChange(ConnectModalView.walletView);\n setSelectedConnector(connector);\n setQrCode(undefined);\n if (connector.hasConnectionUri()) {\n onQrCode(connector);\n }\n await connectAsync({ connectorId: connector.id });\n _onOpenChange(false);\n };\n\n const _onOpenChange = (open: boolean) => {\n !open && close();\n resetConnect();\n resetView();\n setSelectedConnector(null);\n setQrCode(undefined);\n };\n\n const viewComponents = useMemo(() => {\n return {\n [ConnectModalView.connectOptions]: (\n <ConnectOptions onConnect={handleConnect} showInstalledGroup={showInstalledGroup} />\n ),\n [ConnectModalView.walletView]: (\n <WalletView\n connectState={{ isConnecting, isError: connectError, error: connectErrorMsg }}\n isWide={isWide}\n selectedConnector={selectedConnector}\n qrCode={qrCode}\n onConnect={handleConnect}\n appInfo={appInfo}\n />\n ),\n };\n }, [\n isWide,\n selectedConnector,\n qrCode,\n handleConnect,\n isConnecting,\n connectError,\n connectErrorMsg,\n appInfo,\n showInstalledGroup,\n ]);\n\n useEffect(() => {\n if (isWide && currentView === ConnectModalView.walletView) {\n handleViewChange(ConnectModalView.connectOptions);\n }\n }, [isWide, currentView]);\n\n return (\n <Dialog open={isOpen} onOpenChange={_onOpenChange} container={container}>\n <div\n className={cs(\n 'luno:flex luno:items-stretch luno:justify-between luno:w-full luno:md:max-h-[504px] luno:md:max-w-[724px]'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-start luno:py-4 luno:px-5 luno:w-full luno:md:w-auto',\n isWide\n ? 'luno:md:min-w-[300px] luno:border-r-[1px] luno:border-r-solid luno:border-r-separatorLine'\n : 'luno:md:min-w-[360px]'\n )}\n >\n <div\n className={cs(\n 'luno:flex luno:items-center luno:justify-between luno:w-full',\n !isWide && 'luno:pb-4'\n )}\n >\n {currentView === ConnectModalView.connectOptions ? (\n <>\n {!isWide && <div className={cs('luno:w-[30px] luno:h-[30px]')} aria-hidden />}\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-bold',\n isWide ? 'luno:pb-6' : 'luno:flex-1 luno:text-center'\n )}\n >\n Connect Wallet\n </DialogTitle>\n </>\n ) : (\n <>\n <button\n className={cs(\n 'luno:flex luno:items-center luno:justify-center luno:w-[30px] luno:h-[30px] luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n )}\n onClick={() => handleViewChange(ConnectModalView.connectOptions)}\n aria-label=\"Back\"\n >\n <Back />\n </button>\n <DialogTitle\n className={cs(\n 'luno:text-lg luno:leading-lg luno:text-modalText luno:font-semibold luno:transition-opacity luno:duration-300'\n )}\n >\n {selectedConnector?.name}\n </DialogTitle>\n </>\n )}\n\n {!isWide && (\n <DialogClose\n className={\n 'luno:z-10 luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n }\n >\n <Close />\n </DialogClose>\n )}\n </div>\n <div\n ref={containerRef}\n className={cs(\n 'luno:relative luno:overflow-hidden luno:w-full',\n !isWide && 'luno:flex-1 luno:overflow-auto'\n )}\n >\n <div ref={currentViewRef}>{viewComponents[currentView]}</div>\n </div>\n\n {!isWide &&\n currentView === ConnectModalView.connectOptions &&\n renderAppInfoText(\n appInfo?.guideText,\n <p\n className={\n 'luno:cursor-pointer luno:w-full luno:pt-4 luno:text-sm luno:leading-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n onClick={() =>\n window.open(appInfo?.guideLink || 'https://polkadot.com/get-started/wallets/')\n }\n >\n New to wallets?\n </p>\n )}\n </div>\n\n {isWide && (\n <WalletView\n connectState={{ isConnecting, isError: connectError, error: connectErrorMsg }}\n isWide={isWide}\n selectedConnector={selectedConnector}\n qrCode={qrCode}\n onConnect={handleConnect}\n appInfo={appInfo}\n />\n )}\n </div>\n\n {!isWide &&\n currentView === ConnectModalView.connectOptions &&\n appInfo?.policyLinks?.terms &&\n appInfo?.policyLinks?.privacy && (\n <div\n className={\n 'luno:w-full luno:border-t luno:border-t-separatorLine luno:flex luno:flex-col luno:items-center luno:gap-1 luno:p-3'\n }\n >\n <div\n className={\n 'luno:text-modalTextSecondary luno:text-xs luno:leading-xs luno:font-regular luno:text-center'\n }\n >\n By connecting your wallet, you agree to our\n </div>\n <div\n className={\n 'luno:text-xs luno:leading-xs luno:font-regular luno:text-center luno:text-modalTextSecondary'\n }\n >\n <a\n href={appInfo.policyLinks.terms}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Terms of Service\n </a>\n <span className={'luno:px-1'}>&amp;</span>\n <a\n href={appInfo.policyLinks.privacy}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Privacy Policy\n </a>\n </div>\n </div>\n )}\n </Dialog>\n );\n};\n","import React from 'react';\n\n// Render helper for plain text content; keeps default styling/handlers when provided.\nexport function renderAppInfoText(\n customText: string | undefined,\n defaultContent: React.ReactNode\n): React.ReactNode {\n if (!customText) {\n return defaultContent;\n }\n\n if (React.isValidElement(defaultContent)) {\n const { className, children: _children, ...rest } = defaultContent.props || {};\n return React.createElement(defaultContent.type, { ...rest, className }, customText);\n }\n\n return customText;\n}\n","import { useConfig, useConnectors } from '@luno-kit/react';\nimport type { Connector } from '@luno-kit/react/types';\nimport { isMobileDevice } from '@luno-kit/react/utils';\nimport React, { useMemo } from 'react';\nimport { cs } from '../../utils';\n\ninterface Props {\n onConnect: (connector: Connector) => Promise<void>;\n showInstalledGroup: boolean;\n}\n\nconst popularConnectorIds = [\n 'polkadot-js',\n 'subwallet-js',\n 'talisman',\n 'walletconnect',\n 'nova',\n 'nova-mobile',\n];\n\nconst moreConnectorIds = ['ledger', 'polkagate', 'fearless-wallet', 'mimir', 'enkrypt', 'OneKey'];\n\nexport const ConnectOptions = React.memo(({ onConnect, showInstalledGroup }: Props) => {\n const connectors = useConnectors();\n const config = useConfig();\n\n const installedConnectors = connectors.filter((c) => c.isInstalled());\n const popularConnectors = connectors.filter(\n (c: Connector) => popularConnectorIds.includes(c.id) && !c.isInstalled()\n );\n const moreConnectors = connectors.filter(\n (c: Connector) => !popularConnectorIds.includes(c.id) && !c.isInstalled()\n );\n\n const connectorGroup: { title: string; group: Connector[] }[] = useMemo(() => {\n if (!config?.connectorGroups) {\n return [\n { title: 'Installed', group: installedConnectors },\n { title: 'Popular', group: popularConnectors },\n { title: 'More', group: moreConnectors },\n ];\n }\n\n const hasUserDefinedInstalled = config.connectorGroups.some((g) => g.groupName === 'Installed');\n\n if (hasUserDefinedInstalled || !showInstalledGroup) {\n return config.connectorGroups\n .filter((g) => g.wallets.length > 0)\n .map((g) => ({ title: g.groupName, group: g.wallets }))\n .sort((a, b) => (a.title === 'Installed' ? -1 : b.title === 'Installed' ? 1 : 0));\n }\n\n const allWallets = config.connectorGroups.flatMap((g) => g.wallets);\n const installed = allWallets.filter((c) => c.isInstalled());\n\n const customGroups = config.connectorGroups\n .map((g) => ({\n title: g.groupName,\n group: g.wallets.filter((c) => !c.isInstalled()),\n }))\n .filter((g) => g.group.length > 0);\n\n return [\n ...(installed.length > 0 ? [{ title: 'Installed', group: installed }] : []),\n ...customGroups,\n ];\n }, [\n installedConnectors,\n popularConnectors,\n moreConnectors,\n config?.connectorGroups,\n showInstalledGroup,\n ]);\n\n if (isMobileDevice()) {\n const filteredConnectors = connectors\n .filter((i) => i.id !== 'polkadot-js')\n .filter((i) => i.links.deepLink || i.isInstalled());\n\n return (\n <div className={'luno:flex luno:flex-col luno:items-start luno:gap-1 luno:w-full'}>\n {filteredConnectors.map((i) => (\n <ConnectorItem key={`${i.id}-${i.name}`} connector={i} onConnect={() => onConnect(i)} />\n ))}\n </div>\n );\n }\n\n return (\n <div\n className={\n 'luno:flex luno:flex-col luno:items-start luno:gap-4 luno:w-full luno:overflow-y-auto luno:max-h-[400px]'\n }\n >\n {connectorGroup.map((g) => {\n if (g.group.length === 0) return null;\n return (\n <div\n key={g.title}\n className={'luno:flex luno:flex-col luno:items-start luno:gap-2 luno:w-full'}\n >\n <div\n className={cs(\n 'luno:text-sm luno:font-semibold luno:leading-base',\n g.title === 'Installed' ? 'luno:text-accentColor' : 'luno:text-modalTextSecondary'\n )}\n >\n {g.title}\n </div>\n <div className={'luno:flex luno:flex-col luno:items-start luno:gap-1.5 luno:w-full'}>\n {g.group.map((i) => (\n <ConnectorItem key={i.id} connector={i} onConnect={() => onConnect(i)} />\n ))}\n </div>\n </div>\n );\n })}\n </div>\n );\n});\n\ninterface ConnectorItemProps {\n connector: Connector;\n onConnect: () => void;\n}\n\nconst ConnectorItem: React.FC<ConnectorItemProps> = React.memo(({ connector, onConnect }) => {\n return (\n <button\n onClick={onConnect}\n className={cs(\n 'luno:cursor-pointer luno:bg-walletSelectItemBackground luno:p-2 luno:w-full luno:flex luno:items-center luno:gap-3 luno:rounded-walletSelectItem luno:border-none',\n 'luno:hover:bg-walletSelectItemBackgroundHover luno:transition-transform luno:active:scale-[0.95]',\n 'luno:text-left'\n )}\n >\n <div className={'luno:w-[28px] luno:h-[28px] luno:rounded-[6px] luno:overflow-hidden'}>\n <img src={connector.icon} alt={connector.name} className=\"luno:w-full luno:h-full\" />\n </div>\n\n <span className=\"luno:font-semibold luno:leading-base luno:text-base luno:text-modalText\">\n {connector.name}\n </span>\n </button>\n );\n});\n","import type { Connector } from '@luno-kit/react/types';\nimport React, { useMemo } from 'react';\nimport { Close } from '../../assets/icons';\nimport type { AppInfo } from '../../providers';\nimport { useLunoTheme } from '../../theme';\nimport { cs } from '../../utils';\nimport { renderAppInfoText } from '../../utils/renderAppInfo';\nimport { transitionClassName } from '../ConnectButton';\nimport { Copy } from '../Copy';\nimport { DialogClose } from '../Dialog';\nimport { QRCode } from '../QRCode';\nimport { SpiralAnimation } from '../SpiralAnimation';\n\ninterface Props {\n selectedConnector: Connector | null;\n onConnect: (connector: Connector) => Promise<void>;\n qrCode?: string;\n isWide: boolean;\n connectState: {\n isConnecting: boolean;\n isError: boolean;\n error: Error | null;\n };\n appInfo?: Partial<AppInfo>;\n}\n\nexport const WalletView = React.memo(\n ({ selectedConnector, onConnect, qrCode, isWide, connectState, appInfo }: Props) => {\n const { themeMode } = useLunoTheme();\n\n const decorativeImage = useMemo(() => {\n if (!appInfo?.decorativeImage) return undefined;\n const { light, dark } = appInfo.decorativeImage;\n const url = themeMode === 'dark' ? dark || light : light;\n return { url };\n }, [appInfo?.decorativeImage, themeMode]);\n\n const showQRCode = selectedConnector?.hasConnectionUri();\n\n return (\n <div\n className={cs(\n 'luno:flex luno:flex-col luno:items-center',\n isWide\n ? 'luno:w-[450px] luno:p-4 luno:min-h-[472px]'\n : 'luno:justify-center luno:w-full luno:min-h-[400px]'\n )}\n >\n {isWide && (\n <div className={'luno:w-full'}>\n <div className={'luno:flex luno:items-center luno:justify-between'}>\n <div />\n <DialogClose\n className={\n 'luno:z-10 luno:w-[30px] luno:h-[30px] luno:flex luno:items-center luno:justify-center luno:cursor-pointer luno:rounded-modalControlButton luno:border-none luno:hover:bg-modalControlButtonBackgroundHover luno:transition-colors luno:duration-200'\n }\n >\n <Close />\n </DialogClose>\n </div>\n </div>\n )}\n\n <div\n className={cs(\n 'luno:flex luno:items-center luno:gap-4 luno:flex-col luno:grow luno:justify-center',\n selectedConnector && showQRCode ? 'luno:max-w-[300px]' : 'luno:max-w-[360px]'\n )}\n >\n {selectedConnector ? (\n showQRCode ? (\n <div className={'luno:flex luno:flex-col luno:items-center luno:gap-2.5'}>\n <QRCode size={300} logoBackground={selectedConnector.icon} uri={qrCode} />\n <div\n className={\n 'luno:text-base luno:leading-base luno:font-medium luno:text-center luno:text-modalTextSecondary'\n }\n >\n Scan the QR code with{' '}\n {selectedConnector.id === 'nova' ? 'the Nova' : 'your phone'}\n </div>\n\n <div className=\"luno:min-h-[20px] luno:flex luno:items-center luno:justify-center\">\n {selectedConnector.links?.browserExtension ? (\n <div\n onClick={() => window.open(selectedConnector.links.browserExtension)}\n className={\n 'luno:cursor-pointer luno:text-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n >\n Don't have {selectedConnector.name}?\n </div>\n ) : qrCode ? (\n <Copy\n className={\n 'luno:text-sm luno:leading-sm luno:font-medium luno:text-accentColor'\n }\n copyText={qrCode}\n label={'Copy Link'}\n />\n ) : null}\n </div>\n </div>\n ) : (\n <>\n <div className={'luno:w-[80px] luno:h-[80px]'}>\n <img src={selectedConnector.icon} className={'luno:w-full luno:h-full'} alt=\"\" />\n </div>\n <p className={'luno:text-lg luno:leading-lg luno:text-modalFont luno:font-bold'}>\n Opening {selectedConnector.name}...\n </p>\n <p\n className={\n 'luno:pb-[10px] luno:text-base luno:text-modalTextSecondary luno:leading-base luno:font-medium luno:text-center'\n }\n >\n {selectedConnector.id === 'ledger'\n ? connectState.error?.message\n : 'Confirm connection in the extension'}\n </p>\n {connectState.isConnecting && (\n <div className=\"luno-loading luno:text-modalText luno:w-[24px]\"></div>\n )}\n {!selectedConnector.isInstalled() && selectedConnector.links.browserExtension && (\n <div\n onClick={() => window.open(selectedConnector.links.browserExtension)}\n className={\n 'luno:cursor-pointer luno:pt-6 luno:text-sm luno:text-accentColor luno:font-medium luno:text-center luno:hover:text-modalText'\n }\n >\n Don't have {selectedConnector.name}?\n </div>\n )}\n {!connectState.isConnecting &&\n connectState.isError &&\n (selectedConnector?.isInstalled() || selectedConnector?.id === 'ledger') && (\n <button\n className={cs(\n 'luno:rounded-connectButton luno:focus:outline-none luno:py-[4px] luno:px-[12px] luno:cursor-pointer luno:font-semibold luno:text-sm luno:text-modalText luno:bg-connectButtonBackground luno:shadow-connectButton luno:active:scale-[0.95]',\n transitionClassName\n )}\n onClick={() => onConnect(selectedConnector!)}\n >\n Retry\n </button>\n )}\n </>\n )\n ) : (\n <div\n className={\n 'luno:relative luno:flex luno:flex-col luno:items-center luno:w-full luno:grow luno:gap-4 luno:pt-[60px]'\n }\n >\n {decorativeImage?.url ? (\n <div className={'luno:w-[160px] luno:h-[160px]'}>\n <img\n src={decorativeImage.url}\n alt=\"Luno Kit\"\n className={'luno:w-full luno:h-full luno:object-contain'}\n />\n </div>\n ) : (\n <div className={'luno:w-[160px] luno:h-[160px]'}>\n <SpiralAnimation />\n </div>\n )}\n\n {renderAppInfoText(\n appInfo?.guideText,\n <div\n className={\n 'luno:cursor-pointer luno:text-base luno:leading-base luno:text-accentColor luno:font-semibold luno:text-center luno:hover:text-modalText'\n }\n onClick={() =>\n window.open(appInfo?.guideLink || 'https://polkadot.com/get-started/wallets/')\n }\n >\n New to wallets?\n </div>\n )}\n {renderAppInfoText(\n appInfo?.description,\n <p\n className={\n 'luno:text-modalTextSecondary luno:w-[250px] luno:text-sm luno:leading-sm luno:font-medium luno:text-center'\n }\n >\n Connect your wallet to start exploring and interacting with DApps.\n </p>\n )}\n\n {isWide && appInfo?.policyLinks?.terms && appInfo?.policyLinks?.privacy && (\n <div\n className={\n 'luno:absolute luno:bottom-0 luno:left-0 luno:right-0 luno:text-modalTextSecondary luno:text-xs luno:leading-xs luno:font-regular luno:text-center'\n }\n >\n <span>By connecting your wallet, you agree to our </span>\n <a\n href={appInfo.policyLinks.terms}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-regular luno:hover:text-modalText'}\n >\n Terms of Service\n </a>\n <span> &amp; </span>\n <a\n href={appInfo.policyLinks.privacy}\n target={appInfo.policyLinks.target || '_blank'}\n rel=\"noreferrer noopener\"\n className={'luno:text-accentColor luno:font-medium luno:hover:text-modalText'}\n >\n Privacy Policy\n </a>\n </div>\n )}\n </div>\n )}\n </div>\n\n <div />\n </div>\n );\n }\n);\n","import { Cuer } from 'cuer';\n\nexport type ErrorCorrectionLevel = 'low' | 'medium' | 'quartile' | 'high';\n\ninterface Props {\n ecc?: ErrorCorrectionLevel;\n logoBackground?: string;\n logoUrl?: string | (() => Promise<string>);\n logoSize?: number;\n size: number;\n uri?: string;\n}\n\nexport const QRCode = ({ logoBackground, uri, size }: Props) => {\n if (!uri) {\n const QR_GRID_SIZE = 57;\n const FINDER_SIZE_WITH_MARGIN = 8;\n const ARENA_GRID_SIZE = Math.floor(QR_GRID_SIZE / 4);\n\n const cellSize = size / QR_GRID_SIZE;\n const arenaSize = ARENA_GRID_SIZE * cellSize;\n const arenaStart = Math.ceil(QR_GRID_SIZE / 2 - ARENA_GRID_SIZE / 2);\n const arenaEnd = arenaStart + ARENA_GRID_SIZE;\n\n const generateSkeletonDots = () => {\n const dots = [];\n for (let i = 0; i < QR_GRID_SIZE; i++) {\n for (let j = 0; j < QR_GRID_SIZE; j++) {\n if (i >= arenaStart && i < arenaEnd && j >= arenaStart && j < arenaEnd) continue;\n\n const isInFinder =\n (i < FINDER_SIZE_WITH_MARGIN && j < FINDER_SIZE_WITH_MARGIN) ||\n (i < FINDER_SIZE_WITH_MARGIN && j >= QR_GRID_SIZE - FINDER_SIZE_WITH_MARGIN) ||\n (i >= QR_GRID_SIZE - FINDER_SIZE_WITH_MARGIN && j < FINDER_SIZE_WITH_MARGIN);\n if (isInFinder) continue;\n\n const cx = j + 0.5;\n const cy = i + 0.5;\n\n dots.push(\n <rect\n key={`${i}-${j}`}\n x={cx - 0.4}\n y={cy - 0.4}\n width={0.8}\n height={0.8}\n rx={0.4}\n fill=\"var(--color-walletSelectItemBackground)\"\n />\n );\n }\n }\n return dots;\n };\n\n const renderFinderPattern = ({\n position,\n }: {\n position: 'top-left' | 'top-right' | 'bottom-left';\n }) => {\n const finderSize = 7 * cellSize;\n const positionStyles = {\n 'top-left': { top: 0, left: 0 },\n 'top-right': { top: 0, right: 0 },\n 'bottom-left': { bottom: 0, left: 0 },\n };\n\n return (\n <div\n className=\"luno:absolute luno:z-[4]\"\n style={{\n width: `${finderSize}px`,\n height: `${finderSize}px`,\n ...positionStyles[position],\n }}\n >\n <div\n className=\"luno:absolute luno:inset-0\"\n style={{\n borderRadius: `${2 * cellSize}px`,\n border: `${cellSize}px solid var(--color-walletSelectItemBackground)`,\n }}\n />\n <div\n className=\"luno:absolute luno:left-1/2 luno:top-1/2 luno:-translate-x-1/2 luno:-translate-y-1/2\"\n style={{\n width: `${3 * cellSize}px`,\n height: `${3 * cellSize}px`,\n borderRadius: `${0.5 * cellSize}px`,\n backgroundColor: 'var(--color-walletSelectItemBackground)',\n }}\n />\n </div>\n );\n };\n\n const renderArenaLogo = () => {\n const logoStart = arenaStart * cellSize;\n\n return (\n <div\n className=\"luno:absolute luno:z-[4] luno:flex luno:items-center luno:justify-center luno:box-border\"\n style={{\n width: `${arenaSize}px`,\n height: `${arenaSize}px`,\n left: `${logoStart}px`,\n top: `${logoStart}px`,\n borderRadius: `${cellSize}px`,\n padding: `${cellSize / 2}px`,\n }}\n >\n <img\n src={logoBackground}\n alt=\"QR Code Logo\"\n className=\"luno:h-full luno:w-full luno:object-cover\"\n style={{\n borderRadius: `${cellSize}px`,\n }}\n />\n </div>\n );\n };\n\n return (\n <div\n className=\"luno:relative luno:overflow-hidden luno:flex luno:items-center luno:justify-center\"\n style={{\n width: size,\n height: size,\n borderRadius: `${2 * cellSize}px`,\n }}\n >\n <svg\n className=\"luno:absolute luno:inset-0 luno:z-[3]\"\n width={size}\n height={size}\n viewBox={`0 0 ${QR_GRID_SIZE} ${QR_GRID_SIZE}`}\n >\n {generateSkeletonDots()}\n </svg>\n\n <div\n className=\"luno:absolute luno:inset-0 luno:z-[100]\"\n style={{\n background:\n 'linear-gradient(90deg, transparent 50%, var(--color-walletSelectItemBackgroundHover), transparent)',\n backgroundSize: '200% 100%',\n transform: 'scale(1.5) rotate(45deg)',\n animation: 'shimmer 1000ms linear infinite both',\n }}\n />\n\n {renderFinderPattern({ position: 'top-left' })}\n {renderFinderPattern({ position: 'top-right' })}\n {renderFinderPattern({ position: 'bottom-left' })}\n\n {logoBackground && renderArenaLogo()}\n </div>\n );\n }\n return <Cuer arena={logoBackground} value={uri} />;\n};\n","import type React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { cs } from '../../utils';\n\nexport interface SpiralAnimationProps {\n size?: number;\n dotCount?: number;\n duration?: number;\n className?: string;\n}\n\nexport const SpiralAnimation: React.FC<SpiralAnimationProps> = ({\n size = 160,\n dotCount = 300,\n duration = 3,\n className = '',\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n const DOT_RADIUS = 1;\n const MARGIN = 2;\n const GOLDEN_ANGLE = Math.PI * (3 - Math.sqrt(5));\n const CENTER = size / 2;\n const MAX_RADIUS = CENTER - MARGIN - DOT_RADIUS;\n const svgNS = 'http://www.w3.org/2000/svg';\n\n containerRef.current.innerHTML = '';\n\n const svg = document.createElementNS(svgNS, 'svg');\n svg.setAttribute('width', size.toString());\n svg.setAttribute('height', size.toString());\n svg.setAttribute('viewBox', `0 0 ${size} ${size}`);\n svg.style.display = 'block';\n\n containerRef.current.appendChild(svg);\n\n for (let i = 0; i < dotCount; i++) {\n const idx = i + 0.5;\n const frac = idx / dotCount;\n const r = Math.sqrt(frac) * MAX_RADIUS;\n const theta = idx * GOLDEN_ANGLE;\n const x = CENTER + r * Math.cos(theta);\n const y = CENTER + r * Math.sin(theta);\n\n const circle = document.createElementNS(svgNS, 'circle');\n circle.setAttribute('cx', x.toString());\n circle.setAttribute('cy', y.toString());\n circle.setAttribute('r', DOT_RADIUS.toString());\n circle.setAttribute('fill', 'currentColor');\n circle.setAttribute('opacity', '0.6');\n svg.appendChild(circle);\n\n const animR = document.createElementNS(svgNS, 'animate');\n animR.setAttribute('attributeName', 'r');\n animR.setAttribute('values', `${DOT_RADIUS * 0.5};${DOT_RADIUS * 1.8};${DOT_RADIUS * 0.5}`);\n animR.setAttribute('dur', `${duration}s`);\n animR.setAttribute('begin', `${frac * duration}s`);\n animR.setAttribute('repeatCount', 'indefinite');\n animR.setAttribute('calcMode', 'spline');\n animR.setAttribute('keySplines', '0.4 0 0.6 1;0.4 0 0.6 1');\n circle.appendChild(animR);\n\n const animO = document.createElementNS(svgNS, 'animate');\n animO.setAttribute('attributeName', 'opacity');\n animO.setAttribute('values', '0.2;1;0.2');\n animO.setAttribute('dur', `${duration}s`);\n animO.setAttribute('begin', `${frac * duration}s`);\n animO.setAttribute('repeatCount', 'indefinite');\n animO.setAttribute('calcMode', 'spline');\n animO.setAttribute('keySplines', '0.4 0 0.6 1;0.4 0 0.6 1');\n circle.appendChild(animO);\n }\n }, [size, dotCount, duration]);\n\n return (\n <div\n ref={containerRef}\n className={cs(\n 'luno:text-accentColor luno:inline-flex luno:w-full luno:h-full luno:justify-center luno:align-center',\n className\n )}\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OAAC,OACC,IAAKpB,EACL,UAAWgB,EACT,iDACA,CAACjB,GAAU,gCACb,EAEA,mBAAC,OAAI,IAAKE,EAAiB,SAAAW,GAAeR,EAAW,EAAE,EACzD,EAEC,CAACL,GACAK,KAAgB,kBAChBiB,GACEzC,GAAS,aACT,OAAC,KACC,UACE,2JAEF,QAAS,IACP,OAAO,KAAKA,GAAS,WAAa,2CAA2C,EAEhF,2BAED,CACF,GACJ,EAECmB,MACC,OAACe,GAAA,CACC,aAAc,CAAE,aAAAzB,EAAc,QAASC,EAAc,MAAOC,CAAgB,EAC5E,OAAQQ,EACR,kBAAmBP,EACnB,OAAQE,EACR,UAAWe,GACX,QAAS7B,EACX,GAEJ,EAEC,CAACmB,GACAK,KAAgB,kBAChBxB,GAAS,aAAa,OACtBA,GAAS,aAAa,YACpB,QAAC,OACC,UACE,sHAGF,oBAAC,OACC,UACE,+FAEH,uDAED,KACA,QAAC,OACC,UACE,+FAGF,oBAAC,KACC,KAAMA,EAAQ,YAAY,MAC1B,OAAQA,EAAQ,YAAY,QAAU,SACtC,IAAI,sBACJ,UAAW,mEACZ,4BAED,KACA,OAAC,QAAK,UAAW,YAAa,aAAK,KACnC,OAAC,KACC,KAAMA,EAAQ,YAAY,QAC1B,OAAQA,EAAQ,YAAY,QAAU,SACtC,IAAI,sBACJ,UAAW,mEACZ,0BAED,GACF,GACF,GAEN,CAEJ","names":["index_exports","__export","ConnectButton","LunoKitProvider","useAccountModal","useChainModal","useCloseAllModals","useConnectModal","useLunoTheme","__toCommonJS","import_react","import_utils","import_jsx_runtime","SvgArrow","props","Arrow_default","import_jsx_runtime","SvgBack","props","Back_default","import_jsx_runtime","SvgClose","props","Close_default","import_jsx_runtime","SvgCoin","props","Coin_default","import_jsx_runtime","SvgCopy","props","Copy_default","import_jsx_runtime","SvgDefaultNFT","props","DefaultNFT_default","import_jsx_runtime","SvgDisconnect","props","Disconnect_default","import_jsx_runtime","SvgEmptyWallet","props","EmptyWallet_default","import_jsx_runtime","SvgLink","props","Link_default","import_jsx_runtime","SvgList","props","List_default","import_jsx_runtime","SvgArrow","props","Search_default","import_jsx_runtime","SvgSuccess","props","Success_default","import_jsx_runtime","SvgSwitch","props","Switch_default","import_react","useAnimatedViews","initialView","animationDuration","animationEasing","currentView","setCurrentView","isAnimating","setIsAnimating","containerRef","currentViewRef","handleViewChange","view","container","currentHeight","newHeight","resetView","import_react","import_react","ALL_THEME_VARS","useCSSVariableInjection","themeInfo","themeMode","root","key","value","varName","import_jsx_runtime","THEME_STORAGE_KEY","saveThemePreference","preference","ThemeContext","isCompleteTheme","theme","useSystemTheme","systemTheme","setSystemTheme","mediaQuery","updateTheme","e","ThemeProvider","children","themeOverrides","themeMode","setThemeMode","saved","isAutoMode","setIsAutoMode","themeInfo","overrides","partialOverrides","currentTheme","useCSSVariableInjection","setThemeChoice","choice","isAuto","contextValue","useLunoTheme","context","import_react","import_react","import_jsx_runtime","useModalVisibility","isOpen","setIsOpen","open","close","ModalContext","ModalProvider","children","isConnectModalOpen","openConnectModal","closeConnectModal","isAccountModalOpen","openAccountModal","closeAccountModal","isChainModalOpen","openChainModal","closeChainModal","connectionStatus","closeAllModals","contextValue","useConnectModal","context","useAccountModal","useChainModal","useCloseAllModals","import_jsx_runtime","LunoKitProvider","children","config","theme","appInfo","ThemeProvider","ModalProvider","RenderModals","modalSize","modalContainer","showInstalledGroup","ConnectModal","AccountDetailsModal","ChainModal","import_clsx","import_tailwind_merge","customTwMerge","cs","inputs","debounce","fn","ms","timer","import_react","import_jsx_runtime","Copy","copyText","label","className","isCopied","setIsCopied","copyToClipboard","text","err","cs","Success_default","Copy_default","DialogPrimitive","import_react","import_jsx_runtime","DialogRoot","open","onOpenChange","children","contentClassName","overlayClassName","container","portalContainer","React","cs","DialogTitleWrapper","className","DialogCloseWrapper","onClick","Dialog","DialogClose","DialogTitle","import_react","import_react","import_react","import_utils","import_react_query","fetchAssets","apiUrl","apiKey","address","response","result","assets","native","builtin","nfts","i","tokens","nativeTokens","builtinTokens","error","useSubscanTokens","config","chain","import_jsx_runtime","EmptyAsset","type","EmptyWallet_default","import_jsx_runtime","NFTList","React","data","isFetching","error","useSubscanTokens","listData","num","item","NFTItem","EmptyAsset","asset","chain","address","isLoading","setIsLoading","imgSrc","setImgSrc","linkExplorer","cs","DefaultNFT_default","Link_default","import_react","import_react","import_jsx_runtime","Icon","iconUrl","resourceName","className","isLoading","setIsLoading","hasError","setHasError","displayText","match","cs","import_jsx_runtime","getAssetIconUrl","symbol","TokenList","React","data","error","isFetching","useSubscanTokens","listData","a","b","aTotal","num","item","TokenItem","EmptyAsset","asset","iconUrl","displayValue","balance","price","cs","Icon","import_jsx_runtime","FILTER_TABS","AssetList","activeFilter","setActiveFilter","cs","tab","TokenList","NFTList","import_jsx_runtime","AssetListView","AssetList","import_react","import_utils","import_jsx_runtime","MainView","onViewChange","onModalClose","address","chain","chains","disconnectAsync","balance","config","refetch","useSubscanTokens","items","chainNameItem","Icon","Arrow_default","switchAccountItem","Switch_default","assetListItem","Coin_default","explorerItem","List_default","handleDisconnect","i","SelectItem","Disconnect_default","children","onClick","cs","import_react","import_utils","import_jsx_runtime","SwitchAccountView","onBack","accounts","selectAccount","currentAddress","_selectAccount","acc","AccountItem","React","isSelected","account","chain","chains","address","balance","connector","cs","import_react","import_jsx_runtime","ChainList","onChainSwitched","className","currentChain","chains","switchChainAsync","isApiReady","apiError","switchingChain","setSwitchingChain","searchQuery","setSearchQuery","filteredChains","chain","handleChainSelect","error","cs","Search_default","e","ChainItem","React","isSelected","isLoading","onSelect","isSwitching","Icon","import_jsx_runtime","SwitchChainView","onBack","ChainList","import_jsx_runtime","AccountDetailsModal","container","isOpen","close","useAccountModal","address","account","activeConnector","currentView","containerRef","currentViewRef","handleViewChange","resetView","useAnimatedViews","handleModalClose","viewTitle","SwitchAccountView","SwitchChainView","AssetListView","viewComponents","MainView","Dialog","cs","DialogTitle","Copy","Back_default","DialogClose","Close_default","import_jsx_runtime","ChainModal","container","isOpen","close","useChainModal","Dialog","open","DialogTitle","DialogClose","Close_default","ChainList","import_utils","import_react","useConnectButton","connectionStatus","account","address","currentChain","configuredChains","balance","activeConnector","openConnectModal","isConnectModalOpen","useConnectModal","openAccountModal","isAccountModalOpen","useAccountModal","openChainModal","isChainModalOpen","useChainModal","isConnecting","isConnected","isDisconnected","isChainSupported","c","import_react","useWindowSize","windowSize","setWindowSize","handleResize","debounce","import_jsx_runtime","transitionClassName","ConnectButton","className","label","accountStatus","chainStatus","showBalance","displayPreference","isConnected","isDisconnected","account","balance","openConnectModal","openAccountModal","openChainModal","chainIconUrl","chainName","currentChain","configuredChains","activeConnector","useConnectButton","windowWidth","useWindowSize","isLargeWindow","cs","Icon","import_react","import_utils","import_react","renderAppInfoText","customText","defaultContent","React","className","_children","rest","import_react","import_utils","import_jsx_runtime","popularConnectorIds","ConnectOptions","React","onConnect","showInstalledGroup","connectors","config","installedConnectors","c","popularConnectors","popularConnectorIds","moreConnectors","connectorGroup","g","a","b","installed","customGroups","filteredConnectors","i","ConnectorItem","cs","connector","import_react","import_cuer","import_jsx_runtime","QRCode","logoBackground","uri","size","ARENA_GRID_SIZE","cellSize","arenaSize","arenaStart","arenaEnd","generateSkeletonDots","dots","i","j","cx","cy","renderFinderPattern","position","finderSize","positionStyles","renderArenaLogo","logoStart","import_react","import_jsx_runtime","SpiralAnimation","size","dotCount","duration","className","containerRef","DOT_RADIUS","MARGIN","GOLDEN_ANGLE","CENTER","MAX_RADIUS","svgNS","svg","i","idx","frac","r","theta","x","y","circle","animR","animO","cs","import_jsx_runtime","WalletView","React","selectedConnector","onConnect","qrCode","isWide","connectState","appInfo","themeMode","useLunoTheme","decorativeImage","light","dark","showQRCode","cs","DialogClose","Close_default","QRCode","Copy","transitionClassName","SpiralAnimation","renderAppInfoText","import_jsx_runtime","ConnectModal","appInfo","container","showInstalledGroup","size","isOpen","close","useConnectModal","connectAsync","resetConnect","isConnecting","connectError","connectErrorMsg","selectedConnector","setSelectedConnector","qrCode","setQrCode","windowWidth","useWindowSize","isLargeWindow","isWide","containerRef","currentViewRef","resetView","handleViewChange","currentView","useAnimatedViews","onQrCode","connector","uri","handleConnect","_onOpenChange","open","viewComponents","ConnectOptions","WalletView","Dialog","cs","DialogTitle","Back_default","DialogClose","Close_default","renderAppInfoText"]}