(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{1006:function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return k}));var a,c,s=o(0),n=o(29),i=o.n(n),d=(o(1),o(12)),u=o(18),l=o(3),r=o.n(l),p=o(16),b=o.n(p),h=o(281),m=o(13),g=o(4),j=o(1304),I=o(957),O=o(1347),f=o(963),w=o(1296),y=o(1311),M=o(1376),_=o(1377),L=o(207);const v=e=>{let{url:t}=e;return Object(s.a)(M.a,{url:t,resource:Object(s.a)(g.b,{id:"timeline_hint.resources.follows",defaultMessage:"Follows"})})};let k=Object(d.connect)(((e,t)=>{let{params:{acct:o,id:a}}=t;const c=a||e.getIn(["accounts_map",o]);return c?{accountId:c,remote:!(e.getIn(["accounts",c,"acct"])===e.getIn(["accounts",c,"username"])),remoteUrl:e.getIn(["accounts",c,"url"]),isAccount:!!e.getIn(["accounts",c]),accountIds:e.getIn(["user_lists","following",c,"items"]),hasMore:!!e.getIn(["user_lists","following",c,"next"]),isLoading:e.getIn(["user_lists","following",c,"isLoading"],!0),suspended:e.getIn(["accounts",c,"suspended"],!1),hidden:Object(L.b)(e,c),blockedBy:e.getIn(["relationships",c,"blocked_by"],!1)}:{isLoading:!0}}))(((c=class extends u.a{constructor(){super(...arguments),this.handleLoadMore=i()((()=>{this.props.dispatch(Object(m.M)(this.props.accountId))}),300,{leading:!0})}_load(){const{accountId:e,isAccount:t,dispatch:o}=this.props;t||o(Object(m.N)(e)),o(Object(m.Q)(e))}componentDidMount(){const{params:{acct:e},accountId:t,dispatch:o}=this.props;t?this._load():o(Object(m.T)(e))}componentDidUpdate(e){const{params:{acct:t},accountId:o,dispatch:a}=this.props;e.accountId!==o&&o?this._load():e.params.acct!==t&&a(Object(m.T)(t))}render(){const{accountId:e,accountIds:t,hasMore:o,blockedBy:a,isAccount:c,multiColumn:n,isLoading:i,suspended:d,hidden:u,remote:l,remoteUrl:r}=this.props;if(!c)return Object(s.a)(I.a,{},void 0,Object(s.a)(y.a,{}));if(!t)return Object(s.a)(I.a,{},void 0,Object(s.a)(h.b,{}));let p;const b=a||d||u;p=d?Object(s.a)(g.b,{id:"empty_column.account_suspended",defaultMessage:"Account suspended"}):u?Object(s.a)(_.a,{accountId:e}):a?Object(s.a)(g.b,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"}):l&&t.isEmpty()?Object(s.a)(v,{url:r}):Object(s.a)(g.b,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."});const m=l?Object(s.a)(v,{url:r}):null;return Object(s.a)(I.a,{},void 0,Object(s.a)(f.a,{multiColumn:n}),Object(s.a)(w.a,{scrollKey:"following",hasMore:!b&&o,isLoading:i,onLoadMore:this.handleLoadMore,prepend:Object(s.a)(O.a,{accountId:this.props.accountId,hideTabs:!0}),alwaysPrepend:!0,append:m,emptyMessage:p,bindToDocument:!n},void 0,b?[]:t.map((e=>Object(s.a)(j.a,{id:e,withNote:!1},e)))))}}).propTypes={params:r.a.shape({acct:r.a.string,id:r.a.string}).isRequired,accountId:r.a.string,dispatch:r.a.func.isRequired,accountIds:b.a.list,hasMore:r.a.bool,isLoading:r.a.bool,blockedBy:r.a.bool,isAccount:r.a.bool,suspended:r.a.bool,hidden:r.a.bool,remote:r.a.bool,remoteUrl:r.a.string,multiColumn:r.a.bool},a=c))||a}}]);
//# sourceMappingURL=following-895fd8bad033e17df405.chunk.js.map