1import{r as s,t as x,j as t,n as l,L as _}from"./index-C00YXtdW.js";import{T as f,A as m}from"./tx-id-CdXxE8Iq.js";import{P as g}from"./PaginatedTable-OU-WmyJk.js";import{A as b,a as y,b as j}from"./alert-BnsYp0qi.js";import{B as N}from"./subscriptionDisplay-1xpGVhrK.js";import{C as v,a as w,b as C,c as T}from"./index-D4CetdtG.js";import{C as c}from"./index-VUahnrAI.js";import{C as k}from"./useDateMode-BrJ7imOU.js";import"./useLocation-BD6tjkd3.js";import"./icon-CTHVUv61.js";import"./index-CBSSTVlT.js";import"./token-BUpNfDEx.js";import"./link-CLYtb3rv.js";import"./index-BzxNksKy.js";import"./pagination-B3z2sGcf.js";import"./select-BEgzG3h1.js";import"./toolTipText-B6McCBkL.js";import"./index-SnuytDdP.js";import"./index-BvYIwy9c.js";import"./action-type-ivGSfB-Q.js";import"./rhea-DdOvxqHk.js";import"./table-Np-B6xGr.js";import"./messages-kJj-71zu.js";import"./use-token-info-DAF1qfQS.js";import"./info-Bg0R7Vr4.js";import"./refresh-ccw-C9lZRjCy.js";import"./amount-hjI2Guss.js";const A="text-sm [&_th]:h-8 [&_th]:px-2 [&_td]:px-2 [&_td]:py-1.5 [&_tbody_tr]:h-9 [&_tbody_td:nth-child(2)_a]:text-muted-foreground [&_tbody_td:nth-child(3)_a]:text-muted-foreground [&_tbody_td:nth-child(2)_a:hover]:text-primary [&_tbody_td:nth-child(3)_a:hover]:text-primary [&_tbody_td:nth-child(4)]:tabular-nums [&_tbody_td:nth-child(1)_.animate-pulse]:w-16 [&_tbody_td:nth-child(2)_.animate-pulse]:w-28 [&_tbody_td:nth-child(3)_.animate-pulse]:w-24 [&_tbody_td:nth-child(4)_.animate-pulse]:ml-auto [&_tbody_td:nth-child(4)_.animate-pulse]:w-28",E=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),F=o=>{const r=Number(o);return!Number.isFinite(r)||r===0?"-":E.format(Math.round(r))},st=()=>{const o=s.useRef(!1),{data:r=[],isFetching:d,isError:n,refetch:h}=x.network.topNearTransfers.useQuery(),p=s.useMemo(()=>[{accessorKey:"transaction_id",id:"transaction_id",header:"Tx",cell:({row:e})=>t.jsx(f,{txId:e.original.transaction_id??""})},{accessorKey:"sender",id:"sender",header:"From",cell:({row:e})=>t.jsx(m,{accountId:e.original.sender??""})},{accessorKey:"receiver",id:"receiver",header:"To",cell:({row:e})=>t.jsx(m,{accountId:e.original.receiver??""})},{accessorKey:"amount",id:"amount",header:"Amount",cell:({row:e})=>t.jsx("span",{className:"font-medium tabular-nums text-foreground/90",children:F(e.original.amount)}),meta:{align:"right",minWidth:112}}],[]),u=s.useMemo(()=>({getRowId:e=>e.id}),[]),a=s.useMemo(()=>r.map(e=>({...e,id:e.receipt_id})),[r]),i=!d&&!n&&a.length===0;return s.useEffect(()=>{i&&(o.current||(o.current=!0,l("dashboard_empty_state_shown",{dashboard_id:"live",panel:"top_near_transfers"})))},[i]),t.jsxs(v,{className:"overflow-hidden flex flex-col shadow-none",children:[t.jsx(w,{className:"min-h-[58px] px-4 pt-4 pb-2",children:t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("h3",{className:"text-base font-semibold leading-none",children:"Top Near Transfers"}),t.jsx("div",{className:"text-xs text-muted-foreground",children:"Largest recent NEAR movements"})]})}),t.jsx(C,{className:"px-4 pb-0 pt-0",children:n&&a.length===0?t.jsx(c,{variant:"error",title:"Canât load transfers",description:"Please check your connection and try again.",onRetry:()=>h(),minHeight:260}):i?t.jsx(c,{variant:"empty",title:"No transfers found",description:"Nothing to show right now.",minHeight:260}):t.jsxs(t.Fragment,{children:[n&&a.length>0&&t.jsxs(b,{variant:"destructive",className:"mb-3",children:[t.jsx(y,{children:"Canât refresh right now"}),t.jsx(j,{children:"Showing the most recent cached results."})]}),t.jsx(g,{columns:p,data:a.slice(0,8),itemsPerPage:8,maxHeight:500,minHeight:100,isLoading:d&&a.length===0,className:A,skeletonClassName:"h-5 rounded-md bg-primary/10",extraTableOptions:u})]})}),t.jsx(T,{className:"justify-end border-t bg-muted/20 px-4 py-1.5",children:t.jsx(N,{variant:"ghost",size:"sm",className:"h-7 gap-1 rounded-sm px-3 text-xs font-medium text-primary hover:bg-background hover:text-primary",asChild:!0,children:t.jsxs(_,{to:"/hot-wallets",target:"_blank",rel:"noreferrer noopener",onClick:()=>l("dashboard_drilldown_opened",{dashboard_id:"live",target_type:"hot_wallets",panel:"top_near_transfers"}),children:["Explore all hot wallets",t.jsx(k,{className:"size-3.5"})]})})})]})};export{st as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.