1"use strict";(self.webpackChunkmangane_fe=self.webpackChunkmangane_fe||[]).push([[38],{1179:function(t,e,s){s.r(e),s.d(e,{default:function(){return j}});var o,n,i,a=s(1855),r=s(1840),u=(s(1),s(22)),c=s.n(u),d=s(10),l=s.n(d),p=s(70),f=s.n(p),v=s(44),h=s(1841),y=s(1843),g=s(1871),Z=s(6),m=s(13),_=s(572),M=s(69),b=s(339),L=s(2),I=s(9),w=s(15),k=s(27),A=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function s(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(s.prototype=e.prototype,new s)}),C=(0,h.vU)({heading:{id:"column.favourited_statuses",defaultMessage:"Liked posts"}}),j=(0,Z.$j)((function(t,e){var s,o,n,i=e.params.username||"",a=t.get("me"),r=t.getIn(["accounts",a,"username"],""),u=i.toLowerCase()===r.toLowerCase(),c=(0,w.N$)(t.get("instance"));if(u)return{isMyAccount:u,statusIds:t.status_lists.get("favourites").items,isLoading:t.status_lists.get("favourites").isLoading,hasMore:!!t.status_lists.get("favourites").next};var d=-1;if((t.getIn(["accounts",-1,"username"])||"").toLowerCase()===i.toLowerCase())d=null;else{var l=(0,I.XO)(t,i);d=l?l.getIn(["id"],null):-1}var p=t.getIn(["relationships",d,"blocked_by"],!1);return{isMyAccount:u,accountId:d,unavailable:a!==d&&p&&!c.blockersVisible,username:i,isAccount:!!t.getIn(["accounts",d]),statusIds:(null===(s=t.status_lists.get("favourites:".concat(d)))||void 0===s?void 0:s.items)||[],isLoading:null===(o=t.status_lists.get("favourites:".concat(d)))||void 0===o?void 0:o.isLoading,hasMore:!(null===(n=t.status_lists.get("favourites:".concat(d)))||void 0===n||!n.next)}}))(n=(0,y.ZP)((i=function(t){function e(){var e=t.apply(this,arguments)||this;return(0,r.Z)(e,"handleLoadMore",c()((function(){var t=e.props,s=t.accountId;t.isMyAccount?e.props.dispatch((0,_.js)()):e.props.dispatch((0,_.jT)(s))}),300,{leading:!0})),e}return A(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.accountId,s=t.isMyAccount,o=t.username;s?this.props.dispatch((0,_.Ey)()):e&&-1!==e?(this.props.dispatch((0,m.$Gz)(e)),this.props.dispatch((0,_.iP)(e))):this.props.dispatch((0,m.ULQ)(o))},e.prototype.componentDidUpdate=function(t){var e=this.props,s=e.accountId;!e.isMyAccount&&s&&-1!==s&&s!==t.accountId&&s&&(this.props.dispatch((0,m.$Gz)(s)),this.props.dispatch((0,_.iP)(s)))},e.prototype.render=function(){var t=this.props,e=t.intl,s=t.statusIds,o=t.isLoading,n=t.hasMore,i=t.isMyAccount,r=t.isAccount,u=t.accountId,c=t.unavailable;if(!i&&!r&&-1!==u)return(0,a.Z)(M.Z,{});if(-1===u)return(0,a.Z)(k.Z,{},void 0,(0,a.Z)(L.$j,{}));if(c)return(0,a.Z)(k.Z,{},void 0,(0,a.Z)("div",{className:"empty-column-indicator"},void 0,(0,a.Z)(g.Z,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"})));var d=i?(0,a.Z)(g.Z,{id:"empty_column.favourited_statuses",defaultMessage:"You don't have any liked posts yet. When you like one, it will show up here."}):(0,a.Z)(g.Z,{id:"empty_column.account_favourited_statuses",defaultMessage:"This user doesn't have any liked posts yet."});return(0,a.Z)(k.Z,{label:e.formatMessage(C.heading),withHeader:!1,transparent:!0},void 0,(0,a.Z)(b.Z,{statusIds:s,scrollKey:"favourited_statuses",hasMore:n,isLoading:"boolean"!=typeof o||o,onLoadMore:this.handleLoadMore,emptyMessage:d}))},e}
1(v.ZP),(0,r.Z)(i,"propTypes",{dispatch:l().func.isRequired,statusIds:f().orderedSet.isRequired,intl:l().object.isRequired,hasMore:l().bool,isLoading:l().bool,isMyAccount:l().bool.isRequired}),n=i))||n)||n},991:function(t,e,s){s.r(e);var o=s(1855),n=s(1871),i=s(1865),a=s(13),r=s(69),u=s(2),c=s(43),d=s(35),l=s(3),p=s(9);e.default=function(){var t=(0,i.UO)().username,e=(0,l.TL)(),s=(0,l.CG)((function(s){var o=(0,p.XO)(s,t);return o||e((0,a.ULQ)(t)),o}));return(0,l.CG)((function(t){return!!t.getIn(["accounts",null==s?void 0:s.id])}))?s.fields.isEmpty()?(0,o.Z)("div",{className:"mt-2"},void 0,(0,o.Z)(u.Zb,{variant:"rounded",size:"lg"},void 0,(0,o.Z)(n.Z,{id:"account.no_fields",defaultMessage:"This section is empty for now."}))):(0,o.Z)(c.Z,{fetchComponent:d.P2},void 0,(function(t){return(0,o.Z)(t,{account:s})})):(0,o.Z)(r.Z,{})}}}]); 2//# sourceMappingURL=favourited_statuses-9ef76075c91127cc1687.chunk.js.map
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.