1import{r as o,j as a}from"./vendor-wagmi-CRHMQcRy.js";import{C as x}from"./Cast-COyxhgny.js";import{$ as P,cZ as g,cY as y,c_ as b,b5 as R,b6 as E,b7 as A,B as j,j as m,l as M,H as N,be as F,M as w,D as O}from"./index-CjDX1y09.js";import{b as U,P as $}from"./ProfileContent-BYcyGVPl.js";import{u as H}from"./useCastsWithContext-CjhYoVhM.js";import{c as I}from"./keyExtractorUtils-CBXPartG.js";const S=({fid:s})=>{const{apiClient:e}=P(),n=g(),t=y(b({fid:s}),U({apiClient:e,batchMergeIntoGloballyCachedCasts:n,fid:s}),{initialPageParam:void 0,getNextPageParam:A}),r=R(t);return E(t,{onEndReached:r})},W=o.memo(({userProfile:s})=>{const{user:e}=s,{trackEvent:n}=j(),t=m(),r=m(),c=M(t.sourceOn??r.sourceOn),i=t.castHash??r.castHash,{data:d,onEndReached:u,isFetchingNextPage:p}=S({fid:e.fid}),h=o.useMemo(()=>d?.pages.flatMap(f=>f.result.casts)||[],[d]),l=H(h,{forceThreadPosition:"start_and_end"}),C=o.useMemo(()=>`${e.displayName}${e.username?` (@${e.username})`:""} casts and replies on Farcaster`,[e.displayName,e.username]);return o.useEffect(()=>{n(N.ViewProfileReplies,{...c?{on:c}:{},...i?{castHash:i}:{}})},[i,c,n,e.fid,e.username]),a.jsxs($,{title:C,userProfile:s,focusedTab:"castsAndReplies",children:[a.jsx(F,{name:"Profile Casts",data:{castsWithContext:l,user:e}}),a.jsx(w,{data:l,renderItem:D,keyExtractor:I,onEndReached:u,isFetchingNextPage:p,emptyView:a.jsx(O,{message:`${e.displayName} hasn't casted yet.`})})]})}),D=({item:s})=>a.jsx(x,{castWithContext:s});W.displayName="ProfileCastsAndReplies";export{W as P};
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.