PageSourceSearch

https://velaflow.com/_next/static/chunks/pages/profile-details/[id]-29bb4b66f688c0a5.js

js velaflow.com collected 2026-10-01 16:25:51 UTC 13,776 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1307],{11381:(e,l,s)=>{"use strict";s.d(l,{A:()=>n});var t=s(37876);s(14232);var r=s(96145);let n=e=>{let{tabs:l,activeTab:s,setActiveTab:n}=e;return(0,t.jsx)("div",{className:"border-t border-gray-100",children:(0,t.jsx)("div",{className:"flex",children:l.map(e=>(0,t.jsx)(r.$n,{onClick:()=>n(e),className:"flex-1 px-6 py-4 text-sm font-medium border-b-2 transition-colors ".concat(s===e?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"),children:e},e))})})}},21404:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile-details/[id]",function(){return s(86202)}])},34632:(e,l,s)=>{"use strict";s.d(l,{A:()=>n});var t=s(37876);s(14232);var r=s(96145);let n=e=>{let{userDetails:l,otherUserProfile:s=!1}=e,n=null==l?void 0:l.stats,a=null==l?void 0:l.user;return(0,t.jsx)("div",{className:"px-6 py-4 border-t border-gray-100",children:(0,t.jsxs)("div",{className:"flex space-x-6",children:[(0,t.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,t.jsx)("div",{className:"text-12 font-regular",children:(null==n?void 0:n.posts_count)||0}),(0,t.jsx)("div",{className:"text-[10px] text-grey",children:"Posts"})]}),(0,t.jsx)(r.N_,{href:s?"/profile-details/followers/".concat(null==a?void 0:a.username):"/my-followers",children:(0,t.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,t.jsx)("div",{className:"text-12 font-regular",children:(null==n?void 0:n.followers_count)||0}),(0,t.jsx)("div",{className:"text-[10px] text-grey",children:"Followers"})]})}),(0,t.jsx)(r.N_,{href:s?"/profile-details/following/".concat(null==a?void 0:a.username):"/my-following",children:(0,t.jsxs)("div",{className:"text-center bg-white sm:px-8 px-4 py-2 rounded-[5px]",children:[(0,t.jsx)("div",{className:"text-12 font-regular",children:(null==n?void 0:n.following_count)||0}),(0,t.jsx)("div",{className:"text-[10px] text-grey",children:"Following"})]})})]})})}},48028:(e,l,s)=>{"use strict";s.d(l,{A:()=>n});var t=s(51935);let r={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};r.node;let n=(0,t.A)(r)},54097:(e,l,s)=>{"use strict";s.d(l,{A:()=>u});var t=s(37876),r=s(14232),n=s(96145),a=s(23290),i=s(89099),o=s(48028);let u=e=>{var l,s,u,d,c;let{userDetails:x,otherUserProfile:m=!1,ellipsisMenu:p,session:v}=e,h=(0,i.useRouter)(),{handleFollow:f,handleUnfollow:j,isLoading:g}=(0,a.o)(),[b,y]=(0,r.useState)(!1),[_,w]=(0,r.useState)(x),N="".concat(null==_||null==(l=_.user)?void 0:l.first_name," ").concat(null==_||null==(s=_.user)?void 0:s.last_name);(0,r.useEffect)(()=>{x&&w(x)},[x]);let k=async()=>{var e;y(!0);let l=null==_||null==(e=_.user)?void 0:e.id;(await f(l)).success?(y(!1),w({..._,is_followed:!0})):console.error("Unable to process request")},A=async()=>{var e;y(!0),(await j(null==_||null==(e=_.user)?void 0:e.id)).success&&(y(!1),w({..._,is_followed:!1}))};return(0,t.jsxs)("div",{className:"px-6 pt-12 pb-4 flex justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.DZ,{type:"h2",text:N,className:"text-14 font-normal text-black"}),(0,t.jsxs)("p",{className:"text-grey text-12",children:["@",null==_||null==(u=_.user)?void 0:u.username]}),(0,t.jsx)("p",{className:"mt-2 text-grey text-12",children:(null==v||null==(c=v.user)||null==(d=c.userData)?void 0:d.about)||""})]}),(0,t.jsx)("div",{className:"mb-3",children:m?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(null==_?void 0:_.is_followed)&&(0,t.jsxs)(n.$n,{onClick:()=>{let e=null==_?void 0:_.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,t.jsx)(o.A,{size:14}),"Message"]}),(0,t.jsx)(n.$n,{onClick:(null==_?void 0:_.is_followed)?A:k,className:"bg-primary px-5 py-2 text-12 text-white rounded-[5px]",children:g&&b?(0,t.jsx)("div",{children:(0,t.jsx)(n.aH,{})}):(null==_?void 0:_.is_followed)?"Unfollow":"Follow"}),p]}):(0,t.jsx)(n.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,l,s)=>{"use strict";s.d(l,{A:()=>
1o});var t=s(37876),r=s(14232),n=s(96145),a=s(54587),i=s.n(a);let o=e=>{var l,s,a,o,u,d,c,x,m;let{session:p,otherUserProfile:v=!1,userDetails:h}=e,[f,j]=(0,r.useState)(null),[g]=(0,r.useState)(v?(null==h||null==(l=h.user)?void 0:l.cover_image)||
1"/images/leftCardBg.png":(null==p||null==(a=p.user)||null==(s=a.userData)?void 0:s.cover_image)||"/images/leftCardBg.png"),b=v?(null==h||null==(o=h.user)?void 0:o.profile_pic)||
1"/images/profile-image.jpg":(null==p||null==(d=p.user)||null==(u=d.userData)?void 0:u.profile_pic)
1||"/images/profile-image.jpg";return(0,r.useEffect)(()=>(f?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[f]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"relative h-64 rounded-t-[5px] bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(".concat(g,")")},onClick:()=>j({src:g,type:"cover"}),children:(0,t.jsx)("div",{className:"absolute bottom-0 left-6 transform translate-y-1/2",onClick:e=>{e.stopPropagation(),j({src:b,type:"profile"})},children:(0,t.jsx)(n.Zc,{src:b,alt:v?null==h||null==(c=h.user)?void 0:c.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]"})})}),f&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center",onClick:()=>j(null),children:[(0,t.jsx)("button",{onClick:()=>j(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,t.jsx)(i(),{width:300,height:300,src:f.src,alt:"Preview",onClick:e=>e.stopPropagation(),className:"\n           ".concat("profile"===f.type?"rounded-full w-72 h-72 object-cover":"rounded-lg object-contain w-2/4 h-2/4","\n         ")})]})]})}},80612:(e,l,s)=>{"use strict";s.d(l,{A:()=>a});var t=s(37876),r=s(77328),n=s.n(r);function a(e){let{title:l}=e;return(0,t.jsx)(n(),{children:(0,t.jsx)("title",{children:l?"".concat(l," | Velaflow"):"Velaflow"})})}},86202:(e,l,s)=>{"use strict";s.r(l),s.d(l,{__N_SSP:()=>_,default:()=>w});var t=s(37876),r=s(14232),n=s(84768),a=s(65660),i=s(34632),o=s(11381),u=s(54097),d=s(64215),c=s(15234),x=s(96145),m=s(81220),p=s(97685),v=s(91408);let h=v.Ik().shape({reason:v.Yj().required("Reason is required"),duration:v.Yj().required("Duration is required")}),f={reason:"",duration:""},j=e=>{let{blockMuteModal:l,otherUser:s,actionClicked:n,handleBlockMuteUser:a,setOtherUserState:i}=e,[o,u]=(0,r.useState)(f),[d,v]=(0,r.useState)(null),[j,g]=(0,r.useState)(null),[b,y]=(0,r.useState)(!1),_=e=>{let{target:l}=e,{type:s,checked:t,name:r}=l,n="checkbox"===s?t:l.value;u({...o,[r]:n})},w=async()=>{var e,l,t,r,a;y(!0);let{reason:d,duration:c}=o;try{await h.validate(o,{abortEarly:!1}),v({});let l={user_id:null==s||null==(e=s.user)?void 0:e.id,reason:d,duration_days:c};("block"===n?await (0,m.rn)(l):await (0,m.b2)(l)).error||(u(f),y(!1),p.Ay.success("block"===n?"User blocked":"User muted"),i({...s,["block"===n?"is_blocked":"is_muted"]:!0}),g(null),N(""))}catch(s){y(!1);let e={};(null==s||null==(t=s.response)||null==(l=t.data)?void 0:l.errors)?g(Object.values(null==s||null==(a=s.response)||null==(r=a.data)?void 0:r.errors).flat()):e[s.path]=s.message,v(e)}},N=()=>{v({}),a("")},{reason:k,duration:A}=o;return(0,t.jsx)(c.A,{isOpen:l,onClose:N,header:"You won’t see posts from this user anymore, and they won’t be able to view your profile or interact with you.",headerClass:"text-[24px]",children:(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("div",{className:"w-full mt-5 rounded-[5px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.pd,{name:"reason",value:k,onChange:_,className:"w-full h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:primary",placeholder:"Enter reason"}),(null==d?void 0:d.reason)&&(0,t.jsx)("p",{className:"text-12 text-red",children:d.reason})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(x.pd,{name:"duration",value:A,onChange:_,className:"w-full h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:primary",placeholder:"Enter duration in days"}),(null==d?void 0:d.duration)&&(0,t.jsx)("p",{className:"text-12 text-red",children:d.duration})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-4 mt-6",children:(0,t.jsx)(x.$n,{onClick:w,className:"w-full text-12 bg-primary px-6 py-2 text-white rounded-[5px]",children:b?(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(x.aH,{})}):(0,t.jsx)("div",{className:"flex justify-center items-center",children:(0,t.jsx)("div",{children:"block"===n?"Block User":"Mute User"})})})}),(null==j?void 0:j.length)>0?(0,t.jsx)("div",{className:"text-red text-12 mt-1",children:null==j?void 0:j.map((e,l)=>(0,t.jsx)("p",{children:e},"x-".concat(l)))}):null]})})},g=e=>{let{otherUser:l}=e,[s,c]=(0,r.useState)("Posts"),[x,v]=(0,r.useState)(!1),[h,f]=(0,r.useState)(l),[g,b]=(0,r.useState)(""),[y,_]=(0,r.useState)(!1),w=(0,r.useMemo)(()=>{var e;return(null==h||null==(e=h.active_posts)?void 0:e.map(e=>{var l,s,t,r;return{...e,user:{...e.user,first_name:(null==h||null==(l=h.user)?void 0:l.first_name)||"",last_name:(null==h||null==(s=h.user)?void 0:s.last_name)||"",username:(null==h||null==(t=h.user)?void 0:t.username)||"",profile_pic:(null==h||null==(r=h.user)?void 0:r.profile_pic)||""}}}))||[]},[h]),N=(()=>{var e;return null==h||null==(e=h.media_posts)?void 0:e.map(e=>{var l,s,t,r;return{...e,user:{...e.user,first_name:(null==h||null==(l=h.user)?void 0:l.first_name)||"",last_name:(null==h||null==(s=h.user)?void 0:s.last_name)||"",username:(null==h||null==(t=h.user)?void 0:t.username)||"",profile_pic:(null==h||null==(r=h.user)?void 0:r.profile_pic)||""}}})})()||[],k=(()=>{var e;return null==h||null==(e=h.comments)?void 0:e.map(e=>{var l,s,t,r;return{...e.post,user:{...e.user,first_name:(null==h||null==(l=h.user)?void 0:l.first_name)||"",last_name:(null==h||null==(s=h.user)?void 0:s.last_name)||"",username:(null==h||null==(t=h.user)?void 0:t.username)||"",profile_pic:(null==h||null==(r=h.user)?void 0:r.profile_pic)||""}}})})()||[],A=(0,r.useRef)(null);(0,r.useEffect)(()=>
1{if(!A.current)return;let e=new IntersectionObserver(e=>{e[0].isIntersecting&&_(!0)},{threshold:1});return e.observe(A.current),()=>e.disconnect()},[w]);let C=async()=>{var e;let l={user_id:null==h||null==(e=h.user)?void 0:e.id};(await p.Ay.promise((0,m.kV)(l),{loading:"Unblocking user...",success:"User unblocked",error:"Oops, something went wrong"})).error||f({...h,is_blocked:!1})},U=e=>{v(!x),b(e)},D=async()=>{var e;let l={user_id:null==h||null==(e=h.user)?void 0:e.id};(await p.Ay.promise((0,m.qC)(l),{loading:"Unmuting user...",success:"User unmuted",error:"Oops, something went wrong"})).error||f({...h,is_muted:!1})},S=[{label:(null==h?void 0:h.is_blocked)?"Unblock User":"Block user",onClick:(null==h?void 0:h.is_blocked)?C:U,callBack:"block"},{label:(null==h?void 0:h.is_muted)?"Unmute User":"Mute user",onClick:(null==h?void 0:h.is_muted)?D:U,callBack:"mute"}],P=(0,t.jsx)(d.A,{listActions:S});return(0,t.jsxs)("div",{className:"max-w-full mx-auto space-y-5 p-3",children:[(0,t.jsxs)("div",{className:"w-full max-w-3xl mx-auto rounded-xl shadow-sm",children:[(0,t.jsx)(a.A,{userDetails:h,otherUserProfile:!0}),(0,t.jsx)(u.A,{userDetails:h,otherUserProfile:!0,ellipsisMenu:P}),(0,t.jsx)(i.A,{userDetails:h,otherUserProfile:!0}),(0,t.jsx)(o.A,{tabs:["Posts","Replies","Media"],activeTab:s,setActiveTab:c})]}),(0,t.jsxs)("div",{className:"space-y-5",children:["Posts"===s&&(0,t.jsxs)(t.Fragment,{children:[w.length>0?w.map(e=>(0,t.jsx)(n.A,{postData:e},e.id)):(0,t.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No posts yet!"}),(0,t.jsx)("div",{ref:A}),y&&w.length>0&&(0,t.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"===s&&(0,t.jsxs)(t.Fragment,{children:[k.length>0?k.map(e=>(0,t.jsx)(n.A,{postData:e},e.id)):(0,t.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No posts yet!"}),(0,t.jsx)("div",{ref:A}),y&&k.length>0&&(0,t.jsx)("div",{className:"text-center text-gray-400 text-sm py-4 animate-fade-in",children:"You've reached the end of the posts!"})]}),"Media"===s&&(0,t.jsxs)(t.Fragment,{children:[N.length>0?N.map(e=>(0,t.jsx)(n.A,{postData:e},e.id)):(0,t.jsx)("div",{className:"text-center text-14 text-grey py-8",children:"No posts yet!"}),(0,t.jsx)("div",{ref:A}),y&&N.length>0&&(0,t.jsx)("div",{className:"text-center text-gray-400 text-sm py-4 animate-fade-in",children:"You've reached the end of the posts!"})]})]}),(0,t.jsx)(j,{blockMuteModal:x,otherUser:h,actionClicked:g,handleBlockMuteUser:U,setOtherUserState:f})]})};var b=s(42489),y=s(80612),_=!0;function w(e){let{userDetails:l,suggestionList:s,otherUser:r,tagsList:n}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{title:"Profile"}),(0,t.jsx)(b.A,{userDetails:l,tagsList:n,suggestionList:s,children:(0,t.jsx)(g,{otherUser:r})})]})}}},e=>{e.O(0,[3716,4668,9634,1408,2489,3433,4768,636,6593,8792],()=>e(e.s=21404)),_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.