1import{f as p}from"./formatDate-DAY4dQ2s.js";import{s as k}from"./shortenText--9nxADTi.js";import{_ as f,c as l,a as o,b,w as x,d as i,t as u,r as h,o as s,f as g,F as d,i as v,g as _,h as F}from"./app-RdmXVdLP.js";import{s as P}from"./vue3-pagination.esm-DiMbY9Qp.js";const B={props:{user:{type:Object,required:!0}},methods:{formatDate:p,shortenText:k}},D={class:"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 p-4 rounded-lg"},M={class:"flex items-start space-x-3"},Y=["src"],C={class:"flex-1"},V={class:"flex items-center justify-between w-full"},j={class:"flex items-center space-x-2"},I=["href"],H=["href"],N=["href"],O=["href"],T=["href"],U={key:0,class:"flex items-center bg-yellow-100 rounded px-1 py-0.5 border border-yellow-400"},z={class:""},E={class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},q={key:0,class:"text-[15px] text-gray-500 dark:text-gray-400 mt-4"};function G(t,r,e,w,a,n){const m=h("router-link");return s(),l("div",D,[o("div",M,[o("img",{src:e.user.profile_image||"https://via.placeholder.com/48x48?text=User",class:"w-12 h-12 rounded-full object-cover"},null,8,Y),o("div",C,[o("div",V,[o("div",j,[b(m,{to:{name:"user-profile",params:{userId:e.user.id}},class:"font-semibold text-gray-900 dark:text-white hover:underline"},{default:x(()=>[g(u(e.user.username),1)]),_:1},8,["to"]),e.user.homepage!=null?(s(),l("a",{key:0,href:e.user.homepage,target:"_blank"},"ð",8,I)):i("",!0),e.user.social_data&&e.user.social_data.twitter!=null?(s(),l("a",{key:1,href:`https://twitter.com/${e.user.social_data.twitter}`,target:"_blank"},"ð¦",8,H)):i("",!0),e.user.social_data&&e.user.social_data.github!=null?(s(),l("a",{key:2,href:`https://github.com/${e.user.social_data.github}`,target:"_blank"},"ð",8,N)):i("",!0),e.user.social_data&&e.user.social_data.producthunt!=null?(s(),l("a",{key:3,href:`https://www.producthunt.com/@${e.user.social_data.producthunt}`,target:"_blank"},"ð£",8,O)):i("",!0),e.user.social_data&&e.user.social_data.linkedin!=null?(s(),l("a",{key:4,href:`https://linkedin.com/in/${e.user.social_data.linkedin}`,target:"_blank"},"ð",8,T)):i("",!0)]),e.user.is_member?(s(),l("div",U,r[0]||(r[0]=[o("img",{src:"https://img.icons8.com/color/48/000000/police-badge.png",class:"inline w-5"},null,-1),o("span",{class:"ml-1 text-sm"},"Member",-1)]))):i("",!0)]),o("div",z,[o("div",E," Joined "+u(n.formatDate(e.user.created_at,"YYYY-MM-DD HH:mm:ss","MMMM YYYY")),1),e.user.bio!=null?(s(),l("div",q,u(n.shortenText(e.user.bio,100)),1)):i("",!0)])])])])}const J=f(B,[["render",G]]),L={components:{Follower:J,VPagination:P},watch:{$route:{immediate:!0,handler:async function(t,r){this.resetParams(),Object.keys(t.params).length>0&&this.setParams(t.params),this.getFollowers()}}},data(){return{followers:null,params:{},currentPage:1}},mounted(){this.eventBus.on("get-followers",this.getData),this.eventBus.on("params-changed",this.paramsChanged)},unmounted(){this.eventBus.off("get-followers"),this.eventBus.off("params-changed")},methods:{updateHandler(t){this.paramsChanged([{key:"offset",value:this.params.limit*(t-1)}])},paramsChanged(t){for(let e=0;e<t.length;e++)this.params[t[e].key]=t[e].value;let r={name:"user-profile-followers-search",params:this.params};this.$router.push(r)},resetParams(){this.params={userId:this.$route.params.userId,limit:20,offset:0}},setParams(t){for(let r=0;r<Object.keys(t).length;r++){let e=Object.keys(t)[r];this.params[e]=t[e]}this.currentPage=(parseInt(this.params.offset)+parseInt(this.params.limit))/parseInt(this.params.limit)},async getFollowers(){const t=await F("/user/followers",this.params);this.followers=await t.body}}},S={key:0,class:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700 text-center text-gray-500 dark:text-gray-400"},A={class:"space-y-5"},K={class:"ml-4 mt-4 flex items-center text-sm"},Q={class:"text-gray-500 dark:text-gray-400 mr-12"};function R(t,r,e,w,a,n){const m=h("Follower"),y=h("v-pagination");return a.followers==null?(s(),l(d,{key:0},[],64)):(s(),l(d,{key:1},[a.followers.length==0?(s(),l("div",S,r[1]||(r[1]=[o("img",{src:"https://img.icons8.com/sf-regular-filled/96/decentralized-network.png",class:"w-12 h-12 mx-auto mb-2"},null,-1),g(" No followers found ")]))):(s(),l(d,{key:1},[o("div",A,[(s(!0),l(d,null,v(a.followers,c=>(s(),_(m,{key:c.id,user:c},null,8,["user"]))),128))]),o("div",K,[o("div",Q,u(a.followers[0].total)+" Found",1),a.followers!=null&&a.followers.length>0&&a.followers[0].total>a.params.limit?(s(),_(y,{key:0,modelValue:a.currentPage,"onUpdate:modelValue":[r[0]||(r[0]=c=>a.currentPage=c),n.updateHandler],pages:Math.ceil(a.followers[0].total/a.params.limit),"range-size":1,"active-color":"#DCEDFF"},null,8,["modelValue","pages","onUpdate:modelValue"])):i("",!0)])],64))],64))}const ee=f(L,[["render",R]]);
1export{ee 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.