PageSourceSearch

https://velaflow.com/_next/static/chunks/pages/profile-details-dd6d68919f772d24.js

js velaflow.com collected 2026-09-24 13:02:56 UTC 10,193 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[618],{11381:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(37876);t(14232);var r=t(96145);let a=e=>{let{tabs:s,activeTab:t,setActiveTab:a}=e;return(0,l.jsx)("div",{className:"border-t border-gray-100",children:(0,l.jsx)("div",{className:"flex",children:s.map(e=>(0,l.jsx)(r.$n,{onClick:()=>a(e),className:"flex-1 px-6 py-4 text-sm font-medium border-b-2 transition-colors ".concat(t===e?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"),children:e},e))})})}},29839:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>h,default:()=>v});var l=t(37876),r=t(14232),a=t(84768),n=t(65660),i=t(34632),o=t(11381),c=t(54097),d=t(81220),u=t(96145),x=t(10553);let m=e=>{let{userDetails:s}=e,{update:t}=(0,x.useSession)(),{data:m}=(0,x.useSession)(),[p,f]=(0,r.useState)("Posts"),[h,v]=(0,r.useState)(!1),[g,j]=(0,r.useState)(!1),[y,b]=(0,r.useState)(s||null),N=(0,r.useRef)(null),w=async e=>{j(!0);let s=await (0,d.sE)();if(!s.error&&(b(null==s?void 0:s.content),e))try{var l;await t({userProfile:!0,userData:{...null==s||null==(l=s.content)?void 0:l.user}})}catch(e){console.error("Session update error:",e)}j(!1)},[_,P,k]=(0,r.useMemo)(()=>{if(!y)return[[],[],[]];let e=(null==y?void 0:y.user)||{},s=s=>(null==s?void 0:s.map(s=>({...s,user:{...s.user,first_name:e.first_name||"",last_name:e.last_name||"",username:e.username||"",profile_pic:e.profile_pic||""}})))||[];return[s((null==y?void 0:y.active_posts)||[]),s((null==y?void 0:y.media_posts)||[]),((null==y?void 0:y.comments)||[]).map(s=>({...s.post,user:{...s.user,first_name:e.first_name||"",last_name:e.last_name||"",username:e.username||"",profile_pic:e.profile_pic||""}}))]},[y]);return(0,r.useEffect)(()=>{if(!N.current)return;let e=new IntersectionObserver(e=>{e[0].isIntersecting&&v(!0)},{threshold:1});return e.observe(N.current),()=>e.disconnect()},[_,P,k]),(0,l.jsxs)("div",{className:"max-w-full mx-auto space-y-5 p-3",children:[(0,l.jsxs)("div",{className:"w-full max-w-3xl mx-auto rounded-xl shadow-sm",children:[(0,l.jsx)(n.A,{session:m}),(0,l.jsx)(c.A,{userDetails:s,handleProfileUpdate:()=>{setShowEditProfile(!showEditProfile)},session:m}),(0,l.jsx)(i.A,{userDetails:s}),(0,l.jsx)(o.A,{tabs:["Posts","Replies","Media"],activeTab:p,setActiveTab:f})]}),(0,l.jsxs)("div",{className:"space-y-5",children:["Posts"===p&&(0,l.jsxs)(l.Fragment,{children:[g?(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(u.aH,{className:"text-primary"})}):_.length>0?_.map(e=>(0,l.jsx)(a.A,{postData:e,loggedInUserPosts:!0,fetchPosts:w},e.id)):(0,l.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No posts yet!"}),!g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:N}),h&&_.length>0&&(0,l.jsx)("div",{className:"text-center text-gray-400 text-sm py-4 animate-fade-in",children:"You've reached the end of the posts!"})]})]}),"Replies"===p&&(0,l.jsxs)(l.Fragment,{children:[g?(0,l.jsx)("div",{className:"flex justify-center py-8",children:(0,l.jsx)(u.aH,{className:"text-primary"})}):k.length>0?k.map(e=>(0,l.jsx)(a.A,{postData:e,loggedInUserPosts:!0,fetchPosts:w},e.id)):(0,l.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No replies yet!"}),!g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:N}),h&&k.length>0&&(0,l.jsx)("div",{className:"text-center text-gray-400 text-sm py-4 animate-fade-in",children:"You've reached the end of the replies!"})]})]}),"Media"===p&&(0,l.jsxs)(l.Fragment,{children:[g?(0,l.jsx)("div",{className:"flex justify-center py-8",children:(0,l.jsx)(u.aH,{className:"text-primary"})}):P.length>0?P.map(e=>(0,l.jsx)(a.A,{postData:e,loggedInUserPosts:!0,fetchPosts:w},e.id)):(0,l.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No media yet!"}),!g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:N}),h&&P.length>0&&(0,l.jsx)("div",{className:"text-center text-gray-400 text-sm py-4 animate-fade-in",children:"You've reached the end of the media!"})]})]})]})]})};var p=t(23555),f=t(80612),h=!0;function v(e){let{userDetails:s,suggestionList:t,tagsList:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.A,{title:"Profile"}),(0,l.jsx)(p.A,{userDetails:s,tagsList:r,suggestionList:t,children:(0,l.jsx)(m,{userDetails:s})})]})}},34632:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});
1var l=t(37876);t(14232);var r=t(96145);let a=e=>{let{userDetails:s,otherUserProfile:t=!1}=e,a=null==s?void 0:s.stats,n=null==s?void 0:s.user;return(0,l.jsx)("div",{className:"px-6 py-4 border-t border-gray-100",children:(0,l.jsxs)("div",{className:"flex space-x-6",children:[(0,l.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,l.jsx)("div",{className:"text-12 font-regular",children:(null==a?void 0:a.posts_count)||0}),(0,l.jsx)("div",{className:"text-[10px] text-grey",children:"Posts"})]}),(0,l.jsx)(r.N_,{href:t?"/profile-details/followers/".concat(null==n?void 0:n.username):"/my-followers",children:(0,l.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,l.jsx)("div",{className:"text-12 font-regular",children:(null==a?void 0:a.followers_count)||0}),(0,l.jsx)("div",{className:"text-[10px] text-grey",children:"Followers"})]})}),(0,l.jsx)(r.N_,{href:t?"/profile-details/following/".concat(null==n?void 0:n.username):"/my-following",children:(0,l.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,l.jsx)("div",{className:"text-12 font-regular",children:(null==a?void 0:a.following_count)||0}),(0,l.jsx)("div",{className:"text-[10px] text-grey",children:"Following"})]})})]})})}},54097:(e,s,t)=>{"use strict";t.d(s,{A:()=>c});
1var l=t(37876),r=t(14232),a=t(96145),n=t(23290),i=t(89099),o=t(48028);let c=e=>{var s,t,c,d,u;let{userDetails:x,otherUserProfile:m=!1,ellipsisMenu:p,session:f}=e,h=(0,i.useRouter)(),{handleFollow:v,handleUnfollow:g,isLoading:j}=(0,n.o)(),[y,b]=(0,r.useState)(!1),[N,w]=(0,r.useState)(x),_="".concat(null==N||null==(s=N.user)?void 0:s.first_name," ").concat(null==N||null==(t=N.user)?void 0:t.last_name);(0,r.useEffect)(()=>{x&&w(x)},[x]);let P=async()=>{var e;b(!0);let s=null==N||null==(e=N.user)?void 0:e.id;(await v(s)).success?(b(!1),w({...N,is_followed:!0})):console.error("Unable to process request")},k=async()=>{var e;b(!0),(await g(null==N||null==(e=N.user)?void 0:e.id)).success&&(b(!1),w({...N,is_followed:!1}))};return(0,l.jsxs)("div",{className:"px-6 pt-12 pb-4 flex justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(a.DZ,{type:"h2",text:_,className:"text-14 font-normal text-black"}),(0,l.jsxs)("p",{className:"text-grey text-12",children:["@",null==N||null==(c=N.user)?void 0:c.username]}),(0,l.jsx)("p",{className:"mt-2 text-grey text-12",children:(null==f||null==(u=f.user)||null==(d=u.userData)?void 0:d.about)||""})]}),(0,l.jsx)("div",{className:"mb-3",children:m?(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(null==N?void 0:N.is_followed)&&(0,l.jsxs)(a.$n,{onClick:()=>{let e=null==N?void 0:N.user;(null==e?void 0:e.id)&&h.push({pathname:"/messenger",query:{userId:e.id,username:e.username,name:"".concat(e.first_name||""," ").concat(e.last_name||"").trim(),avatar:e.profile_pic||""}})},className:"border border-primary text-primary px-3 py-2 text-12 rounded-[5px] flex items-center gap-1.5 hover:bg-primary/5",children:[(0,l.jsx)(o.A,{size:14}),"Message"]}),(0,l.jsx)(a.$n,{onClick:(null==N?void 0:N.is_followed)?k:P,className:"bg-primary px-5 py-2 text-12 text-white rounded-[5px]",children:j&&y?(0,l.jsx)("div",{children:(0,l.jsx)(a.aH,{})}):(null==N?void 0:N.is_followed)?"Unfollow":"Follow"}),p]}):(0,l.jsx)(a.N_,{href:"/settings/account",className:"bg-primary text-white rounded-[5px] whitespace-nowrap px-3 py-1.5 text-[10px] sm:px-5 sm:py-2 sm:text-12",children:"Edit profile"})})]})}},65660:(e,s,t)=>{"use strict";t.d(s,{A:()=>o});var l=t(37876),r=t(14232),a=t(96145),n=t(54587),i=t.n(n);let o=e=>{var s,t,n,o,c,d,u,x,m;let{session:p,otherUserProfile:f=!1,userDetails:h}=e,[v,g]=(0,r.useState)(null),[j]=(0,r.useState)(f?(null==h||null==(s=h.user)?void 0:s.cover_image)||
1"/images/leftCardBg.png":(null==p||null==(n=p.user)||null==(t=n.userData)?void 0:t.cover_image)||"/images/leftCardBg.png"),y=f?(null==h||null==(o=h.user)?void 0:o.profile_pic)||
1"/images/profile-image.jpg":(null==p||null==(d=p.user)||null==(c=d.userData)?void 0:c.profile_pic)
1||"/images/profile-image.jpg";return(0,r.useEffect)(()=>(v?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[v]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"relative h-64 rounded-t-[5px] bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(".concat(j,")")},onClick:()=>g({src:j,type:"cover"}),children:(0,l.jsx)("div",{className:"absolute bottom-0 left-6 transform translate-y-1/2",onClick:e=>{e.stopPropagation(),g({src:y,type:"profile"})},children:(0,l.jsx)(a.Zc,{src:y,alt:f?null==h||null==(u=h.user)?void 0:u.first_name:null==p||null==(m=p.user)||null==(x=m.userData)?void 0:x.first_name,className:"w-20 h-20 rounded-full object-cover border-2 border-[#D9D9D9]"})})}),v&&(0,l.jsxs)("div",{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center",onClick:()=>g(null),children:[(0,l.jsx)("button",{onClick:()=>g(null),className:" absolute top-4 right-4 w-10 h-10 rounded-full border border-[#2755FF] flex items-center justify-center text-white text-xl bg-black/40 hover:bg-black/60 transition",children:"✕"}),(0,l.jsx)(i(),{width:300,height:300,src:v.src,alt:"Preview",onClick:e=>e.stopPropagation(),className:"\n           ".concat("profile"===v.type?"rounded-full w-72 h-72 object-cover":"rounded-lg object-contain w-2/4 h-2/4","\n         ")})]})]})}},70205:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile-details",function(){return t(29839)}])},80612:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(37876),r=t(77328),a=t.n(r);function n(e){let{title:s}=e;return(0,l.jsx)(a(),{children:(0,l.jsx)("title",{children:s?"".concat(s," | Velaflow"):"Velaflow"})})}}},e=>{e.O(0,[3716,9634,7648,3555,3433,4768,636,6593,8792],()=>e(e.s=70205)),_N_E=e.O()}]);

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.