2 lines
No EOL
28 KiB
JavaScript
2 lines
No EOL
28 KiB
JavaScript
webpackJsonp([10],{150:function(e,t,n){"use strict";n.d(t,"a",function(){return f});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(0),p=n.n(d),f=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(){o.props.onClick()},i=n,c()(o,i)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.type,n=e.active,o=e.columnHeaderId,a="";return this.props.icon&&(a=i()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),i()("div",{role:"heading",tabIndex:"0",className:"column-header "+(n?"active":""),onClick:this.handleClick,id:o||null},void 0,a,t)},t}(p.a.PureComponent)},259:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o=n(2),i=n.n(o),a=n(1),r=n.n(a),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(42),p=n.n(d),f=n(0),h=n.n(f),m=n(150),g=n(91),v=n(33),b=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(s))),o.handleHeaderClick=function(){var e=o.node.querySelector(".scrollable");e&&(o._interruptScrollAnimation=Object(g.b)(e))},o.handleScroll=p()(function(){void 0!==o._interruptScrollAnimation&&o._interruptScrollAnimation()},200),o.setRef=function(e){o.node=e},i=n,c()(o,i)}return u()(t,e),t.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(g.b)(e))},t.prototype.render=function(){var e=this.props,t=e.heading,n=e.icon,o=e.children,a=e.active,r=e.hideHeadingOnMobile,s=t&&(!r||r&&!Object(v.b)(window.innerWidth)),c=s&&t.replace(/ /g,"-"),l=s&&i()(m.a,{icon:n,active:a,type:t,onClick:this.handleHeaderClick,columnHeaderId:c});return h.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":c,className:"column",onScroll:this.handleScroll},l,o)},t}(h.a.PureComponent)},260:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=n.n(f),m=n(6),g=(i=o=function(e){function t(){return c()(this,t),u()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props.visible;return r()("button",{className:"load-more",disabled:!e,style:{visibility:e?"visible":"hidden"},onClick:this.props.onClick},void 0,r()(m.b,{id:"status.load_more",defaultMessage:"Load more"}))},t}(h.a.PureComponent),o.defaultProps={visible:!0},i)},261:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),r=(n.n(a),n(9)),s=n(153),c=n(69),l=n(15),u=n(43),d=n(22),p=n(57),f=n(151),h=n(31),m=n(6),g=n(18),v=Object(m.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},muteConfirm:{id:"confirmations.mute.confirm",defaultMessage:"Mute"}}),b=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},M=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(l.O)(t,n))},onModalReblog:function(t){e(Object(u.q)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(u.t)(t)):n.shiftKey||!g.b?this.onModalReblog(t):e(Object(h.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(u.r)(t):Object(u.m)(t))},onPin:function(t){e(t.get("pinned")?Object(u.s)(t):Object(u.p)(t))},onEmbed:function(t){e(Object(h.d)("EMBED",{url:t.get("url")}))},onDelete:function(t){e(g.d?Object(h.d)("CONFIRM",{message:n.formatMessage(v.deleteMessage),confirm:n.formatMessage(v.deleteConfirm),onConfirm:function(){return e(Object(p.e)(t.get("id")))}}):Object(p.e)(t.get("id")))},onMention:function(t,n){e(Object(l.M)(t,n))},onOpenMedia:function(t,n){e(Object(h.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(h.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(h.d)("CONFIRM",{message:i()(m.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(v.blockConfirm),onConfirm:function(){return e(Object(d.r)(t.get("id")))}}))},onReport:function(t){e(Object(f.i)(t.get("account"),t))},onMute:function(t){e(Object(h.d)("CONFIRM",{message:i()(m.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(v.muteConfirm),onConfirm:function(){return e(Object(d.B)(t.get("id")))}}))},onMuteConversation:function(t){e(t.get("muted")?Object(p.h)(t.get("id")):Object(p.g)(t.get("id")))}}};t.a=Object(m.g)(Object(r.connect)(b,M)(s.a))},262:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(94),h=n.n(f),m=n(0),g=n.n(m),v=n(152),b=n(5),M=n.n(b),y=n(263),k=n(260),O=n(268),_=n(8),I=(n.n(_),n(10)),w=n.n(I),j=n(154),C=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=u()(this,e.call.apply(e,[this].concat(r))),o.state={lastMouseMove:null},o.intersectionObserverWrapper=new O.a,o.handleScroll=h()(function(){if(o.node){var e=o.node,t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight,a=n-t-i;o._oldScrollPosition=n-t,400>a&&o.props.onScrollToBottom&&!o.props.isLoading?o.props.onScrollToBottom():t<100&&o.props.onScrollToTop?o.props.onScrollToTop():o.props.onScroll&&o.props.onScroll()}},150,{trailing:!0}),o.handleMouseMove=h()(function(){o._lastMouseMove=new Date},300),o.handleMouseLeave=function(){o._lastMouseMove=null},o.onFullScreenChange=function(){o.setState({fullscreen:Object(j.d)()})},o.setRef=function(e){o.node=e},o.handleLoadMore=function(e){e.preventDefault(),o.props.onScrollToBottom()},i=n,u()(o,i)}return p()(t,e),t.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(j.a)(this.onFullScreenChange),this.handleScroll()},t.prototype.componentDidUpdate=function(e){if(g.a.Children.count(e.children)>0&&g.a.Children.count(e.children)<g.a.Children.count(this.props.children)&&this.getFirstChildKey(e)!==this.getFirstChildKey(this.props)&&this._oldScrollPosition&&this.node.scrollTop>0){var t=this.node.scrollHeight-this._oldScrollPosition;this.node.scrollTop!==t&&(this.node.scrollTop=t)}else this._oldScrollPosition=this.node.scrollHeight-this.node.scrollTop},t.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(j.b)(this.onFullScreenChange)},t.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},t.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},t.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},t.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},t.prototype.getFirstChildKey=function(e){var t=e.children,n=t;return t instanceof _.List?n=t.get(0):Array.isArray(t)&&(n=t[0]),n&&n.key},t.prototype._recentlyMoved=function(){return null!==this._lastMouseMove&&new Date-this._lastMouseMove<600},t.prototype.render=function(){var e=this,t=this.props,n=t.children,o=t.scrollKey,i=t.trackScroll,a=t.shouldUpdateScroll,s=t.isLoading,c=t.hasMore,l=t.prepend,u=t.emptyMessage,d=this.state.fullscreen,p=g.a.Children.count(n),f=c&&p>0?r()(k.a,{visible:!s,onClick:this.handleLoadMore}):null,h=null;return h=s||p>0||!u?g.a.createElement("div",{className:w()("scrollable",{fullscreen:d}),ref:this.setRef,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},r()("div",{role:"feed",className:"item-list"},void 0,l,g.a.Children.map(this.props.children,function(t,n){return r()(y.a,{id:t.key,index:n,listLength:p,intersectionObserverWrapper:e.intersectionObserverWrapper,saveHeightKey:i?e.context.router.route.location.key+":"+o:null},t.key,t)}),f)):g.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?r()(v.a,{scrollKey:o,shouldUpdateScroll:a},void 0,h):h},t}(m.PureComponent),o.contextTypes={router:M.a.object},o.defaultProps={trackScroll:!0},i)},263:function(e,t,n){"use strict";var o=n(9),i=n(264),a=n(95),r=function(e,t){return{cachedHeight:e.getIn(["height_cache",t.saveHeightKey,t.id])}},s=function(e){return{onHeightChange:function(t,n,o){e(Object(a.d)(t,n,o))}}};t.a=Object(o.connect)(r,s)(i.a)},264:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o=n(1),i=n.n(o),a=n(3),r=n.n(a),s=n(4),c=n.n(s),l=n(0),u=n.n(l),d=n(265),p=n(267),f=n(8),h=(n.n(f),["id","index","listLength"]),m=["id","index","listLength","cachedHeight"],g=function(e){function t(){var n,o,a;i()(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=o=r()(this,e.call.apply(e,[this].concat(c))),o.state={isHidden:!1},o.handleIntersection=function(e){o.entry=e,Object(d.a)(o.calculateHeight),o.setState(o.updateStateAfterIntersection)},o.updateStateAfterIntersection=function(e){return e.isIntersecting&&!o.entry.isIntersecting&&Object(d.a)(o.hideIfNotIntersecting),{isIntersecting:o.entry.isIntersecting,isHidden:!1}},o.calculateHeight=function(){var e=o.props,t=e.onHeightChange,n=e.saveHeightKey,i=e.id;o.height=Object(p.a)(o.entry).height,t&&n&&t(n,i,o.height)},o.hideIfNotIntersecting=function(){o.componentMounted&&o.setState(function(e){return{isHidden:!e.isIntersecting}})},o.handleRef=function(e){o.node=e},a=n,r()(o,a)}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=this,o=!this.state.isIntersecting&&(this.state.isHidden||this.props.cachedHeight);return!!o!=!(t.isIntersecting||!t.isHidden&&!e.cachedHeight)||!(o?m:h).every(function(t){return Object(f.is)(e[t],n.props[t])})},t.prototype.componentDidMount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.observe(n,this.node,this.handleIntersection),this.componentMounted=!0},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.unobserve(n,this.node),this.componentMounted=!1},t.prototype.render=function(){var e=this.props,t=e.children,n=e.id,o=e.index,i=e.listLength,a=e.cachedHeight,r=this.state,s=r.isIntersecting,c=r.isHidden;return s||!c&&!a?u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!1})):u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,style:{height:(this.height||a)+"px",opacity:0,overflow:"hidden"},"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!0}))},t}(u.a.Component)},265:function(e,t,n){"use strict";function o(e){for(;s.length&&e.timeRemaining()>0;)s.shift()();s.length?requestIdleCallback(o):c=!1}function i(e){s.push(e),c||(c=!0,requestIdleCallback(o))}var a=n(266),r=n.n(a),s=new r.a,c=!1;t.a=i},266:function(e,t,n){"use strict";function o(){this.length=0}o.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},o.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},o.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],o=0,i=this.first;i&&!(--t<0);i=i.next)++o>e&&n.push(i.item);return n},e.exports=o},267:function(e,t,n){"use strict";function o(e){if("boolean"!=typeof i){var t=e.target.getBoundingClientRect(),n=e.boundingClientRect;i=t.height!==n.height||t.top!==n.top||t.width!==n.width||t.bottom!==n.bottom||t.left!==n.left||t.right!==n.right}return i?e.target.getBoundingClientRect():e.boundingClientRect}var i=void 0;t.a=o},268:function(e,t,n){"use strict";var o=n(1),i=n.n(o),a=function(){function e(){i()(this,e),this.callbacks={},this.observerBacklog=[],this.observer=null}return e.prototype.connect=function(e){var t=this,n=function(e){e.forEach(function(e){var n=e.target.getAttribute("data-id");t.callbacks[n]&&t.callbacks[n](e)})};this.observer=new IntersectionObserver(n,e),this.observerBacklog.forEach(function(e){var n=e[0],o=e[1],i=e[2];t.observe(n,o,i)}),this.observerBacklog=null},e.prototype.observe=function(e,t,n){this.observer?(this.callbacks[e]=n,this.observer.observe(t)):this.observerBacklog.push([e,t,n])},e.prototype.unobserve=function(e,t){this.observer&&(delete this.callbacks[e],this.observer.unobserve(t))},e.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},e}();t.a=a},269:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var o,i,a=n(28),r=n.n(a),s=n(2),c=n.n(s),l=n(29),u=n.n(l),d=n(1),p=n.n(d),f=n(3),h=n.n(f),m=n(4),g=n.n(m),v=n(0),b=n.n(v),M=n(12),y=n.n(M),k=n(5),O=n.n(k),_=n(261),I=n(11),w=n.n(I),j=n(262),C=(i=o=function(e){function t(){var n,o,i;p()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=h()(this,e.call.apply(e,[this].concat(r))),o.handleMoveUp=function(e){var t=o.props.statusIds.indexOf(e)-1;o._selectChild(t)},o.handleMoveDown=function(e){var t=o.props.statusIds.indexOf(e)+1;o._selectChild(t)},o.setRef=function(e){o.node=e},i=n,h()(o,i)}return g()(t,e),t.prototype._selectChild=function(e){var t=this.node.node.querySelector("article:nth-of-type("+(e+1)+") .focusable");t&&t.focus()},t.prototype.render=function(){var e=this,t=this.props,n=t.statusIds,o=u()(t,["statusIds"]),i=o.isLoading,a=i||n.size>0?n.map(function(t){return c()(_.a,{id:t,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t)}):null;return b.a.createElement(j.a,r()({},o,{ref:this.setRef}),a)},t}(w.a),o.propTypes={scrollKey:O.a.string.isRequired,statusIds:y.a.list.isRequired,onScrollToBottom:O.a.func,onScrollToTop:O.a.func,onScroll:O.a.func,trackScroll:O.a.bool,shouldUpdateScroll:O.a.func,isLoading:O.a.bool,hasMore:O.a.bool,prepend:O.a.node,emptyMessage:O.a.node},o.defaultProps={trackScroll:!0},i)},761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return N});var o,i,a,r,s=n(2),c=n.n(s),l=n(1),u=n.n(l),d=n(3),p=n.n(d),f=n(4),h=n.n(f),m=n(0),g=(n.n(m),n(9)),v=n(12),b=n.n(v),M=n(5),y=n.n(M),k=n(22),O=n(16),_=n(269),I=n(271),w=n(259),j=n(781),C=n(779),S=n(8),R=(n.n(S),n(11)),B=n.n(R),H=function(e,t){return{statusIds:e.getIn(["timelines","account:"+t.params.accountId,"items"],Object(S.List)()),isLoading:e.getIn(["timelines","account:"+t.params.accountId,"isLoading"]),hasMore:!!e.getIn(["timelines","account:"+t.params.accountId,"next"])}},N=(o=Object(g.connect)(H))((r=a=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=p()(this,e.call.apply(e,[this].concat(r))),o.handleScrollToBottom=function(){!o.props.isLoading&&o.props.hasMore&&o.props.dispatch(Object(O.q)(o.props.params.accountId))},i=n,p()(o,i)}return h()(t,e),t.prototype.componentWillMount=function(){this.props.dispatch(Object(k.v)(this.props.params.accountId)),this.props.dispatch(Object(O.w)(this.props.params.accountId))},t.prototype.componentWillReceiveProps=function(e){e.params.accountId!==this.props.params.accountId&&e.params.accountId&&(this.props.dispatch(Object(k.v)(e.params.accountId)),this.props.dispatch(Object(O.w)(e.params.accountId)))},t.prototype.render=function(){var e=this.props,t=e.statusIds,n=e.isLoading,o=e.hasMore;return!t&&n?c()(w.a,{},void 0,c()(I.a,{})):c()(w.a,{},void 0,c()(C.a,{}),c()(_.a,{prepend:c()(j.a,{accountId:this.props.params.accountId}),scrollKey:"account_timeline",statusIds:t,isLoading:n,hasMore:o,onScrollToBottom:this.handleScrollToBottom}))},t}(B.a),a.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,statusIds:b.a.list,isLoading:y.a.bool,hasMore:y.a.bool},i=r))||i},779:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=n.n(f),m=n(6),g=n(5),v=n.n(g),b=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=u()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){return r()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,r()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),r()(m.b,{id:"column_back_button.label",defaultMessage:"Back"}))},t}(h.a.PureComponent),o.contextTypes={router:v.a.object},i)},780:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),r=(n.n(a),n(6)),s=function(){return i()("div",{className:"missing-indicator"},void 0,i()("div",{},void 0,i()(r.b,{id:"missing_indicator.label",defaultMessage:"Not found"})))};t.a=s},781:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),r=(n.n(a),n(9)),s=n(69),c=n(782),l=n(22),u=n(15),d=n(151),p=n(31),f=n(285),h=n(6),m=n(18),g=Object(h.f)({unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},muteConfirm:{id:"confirmations.mute.confirm",defaultMessage:"Mute"},blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),v=function(){var e=Object(s.c)();return function(t,n){var o=n.accountId;return{account:e(t,o)}}},b=function(e,t){var n=t.intl;return{onFollow:function(t){e(t.getIn(["relationship","following"])||t.getIn(["relationship","requested"])?m.g?Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.unfollow.message",defaultMessage:"Are you sure you want to unfollow {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(g.unfollowConfirm),onConfirm:function(){return e(Object(l.E)(t.get("id")))}}):Object(l.E)(t.get("id")):Object(l.A)(t.get("id")))},onBlock:function(t){e(t.getIn(["relationship","blocking"])?Object(l.D)(t.get("id")):Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(g.blockConfirm),onConfirm:function(){return e(Object(l.r)(t.get("id")))}}))},onMention:function(t,n){e(Object(u.M)(t,n))},onReport:function(t){e(Object(d.i)(t))},onMute:function(t){e(t.getIn(["relationship","muting"])?Object(l.F)(t.get("id")):Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(g.muteConfirm),onConfirm:function(){return e(Object(l.B)(t.get("id")))}}))},onBlockDomain:function(t,o){e(Object(p.d)("CONFIRM",{message:i()(h.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",values:{domain:i()("strong",{},void 0,t)}}),confirm:n.formatMessage(g.blockDomainConfirm),onConfirm:function(){return e(Object(f.c)(t,o))}}))},onUnblockDomain:function(t,n){e(Object(f.d)(t,n))}}};t.a=Object(h.g)(Object(r.connect)(v,b)(c.a))},782:function(e,t,n){"use strict";n.d(t,"a",function(){return _});var o,i,a=n(2),r=n.n(a),s=n(1),c=n.n(s),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=(n.n(f),n(12)),m=n.n(h),g=n(5),v=n.n(g),b=n(783),M=n(784),y=n(780),k=n(11),O=n.n(k),_=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=u()(this,e.call.apply(e,[this].concat(r))),o.handleFollow=function(){o.props.onFollow(o.props.account)},o.handleBlock=function(){o.props.onBlock(o.props.account)},o.handleMention=function(){o.props.onMention(o.props.account,o.context.router.history)},o.handleReport=function(){o.props.onReport(o.props.account)},o.handleMute=function(){o.props.onMute(o.props.account)},o.handleBlockDomain=function(){var e=o.props.account.get("acct").split("@")[1];e&&o.props.onBlockDomain(e,o.props.account.get("id"))},o.handleUnblockDomain=function(){var e=o.props.account.get("acct").split("@")[1];e&&o.props.onUnblockDomain(e,o.props.account.get("id"))},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){var e=this.props.account;return null===e?r()(y.a,{}):r()("div",{className:"account-timeline__header"},void 0,r()(b.a,{account:e,onFollow:this.handleFollow}),r()(M.a,{account:e,onBlock:this.handleBlock,onMention:this.handleMention,onReport:this.handleReport,onMute:this.handleMute,onBlockDomain:this.handleBlockDomain,onUnblockDomain:this.handleUnblockDomain}))},t}(O.a),o.propTypes={account:m.a.map,onFollow:v.a.func.isRequired,onBlock:v.a.func.isRequired,onMention:v.a.func.isRequired,onReport:v.a.func.isRequired,onMute:v.a.func.isRequired,onBlockDomain:v.a.func.isRequired,onUnblockDomain:v.a.func.isRequired},o.contextTypes={router:v.a.object},i)},783:function(e,t,n){"use strict";n.d(t,"a",function(){return H});var o,i,a,r,s,c=n(2),l=n.n(c),u=n(1),d=n.n(u),p=n(3),f=n.n(p),h=n(4),m=n.n(h),g=n(0),v=(n.n(g),n(12)),b=n.n(v),M=n(5),y=n.n(M),k=n(6),O=n(19),_=n(26),I=n(27),w=n.n(I),j=n(11),C=n.n(j),S=n(18),R=Object(k.f)({unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},follow:{id:"account.follow",defaultMessage:"Follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval. Click to cancel follow request"}}),B=(i=o=function(e){function t(){var n,o,i;d()(this,t);for(var a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return n=o=f()(this,e.call.apply(e,[this].concat(r))),o.state={isHovered:!1},o.handleMouseOver=function(){o.state.isHovered||o.setState({isHovered:!0})},o.handleMouseOut=function(){o.state.isHovered&&o.setState({isHovered:!1})},i=n,f()(o,i)}return m()(t,e),t.prototype.render=function(){var e=this,t=this.props.account,n=this.state.isHovered;return l()(_.a,{defaultStyle:{radius:90},style:{radius:w()(n?30:90,{stiffness:180,damping:12})}},void 0,function(o){var i=o.radius;return l()("a",{href:t.get("url"),className:"account__header__avatar",role:"presentation",target:"_blank",rel:"noopener",style:{borderRadius:i+"px",backgroundImage:"url("+(S.a||n?t.get("avatar"):t.get("avatar_static"))+")"},onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,onFocus:e.handleMouseOver,onBlur:e.handleMouseOut},void 0,l()("span",{style:{display:"none"}},void 0,t.get("acct")))})},t}(C.a),o.propTypes={account:b.a.map.isRequired},i),H=Object(k.g)((s=r=function(e){function t(){return d()(this,t),f()(this,e.apply(this,arguments))}return m()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl;if(!t)return null;var o="",i="",a="";S.e!==t.get("id")&&t.getIn(["relationship","followed_by"])&&(o=l()("span",{className:"account--follows-info"},void 0,l()(k.b,{id:"account.follows_you",defaultMessage:"Follows you"}))),S.e!==t.get("id")&&(t.getIn(["relationship","requested"])?i=l()("div",{className:"account--action-button"},void 0,l()(O.a,{size:26,active:!0,icon:"hourglass",title:n.formatMessage(R.requested),onClick:this.props.onFollow})):t.getIn(["relationship","blocking"])||(i=l()("div",{className:"account--action-button"},void 0,l()(O.a,{size:26,icon:t.getIn(["relationship","following"])?"user-times":"user-plus",active:t.getIn(["relationship","following"]),title:n.formatMessage(t.getIn(["relationship","following"])?R.unfollow:R.follow),onClick:this.props.onFollow})))),t.get("locked")&&(a=l()("i",{className:"fa fa-lock"}));var r={__html:t.get("note_emojified")},s={__html:t.get("display_name_html")};return l()("div",{className:"account__header",style:{backgroundImage:"url("+t.get("header")+")"}},void 0,l()("div",{},void 0,l()(B,{account:t}),l()("span",{className:"account__header__display-name",dangerouslySetInnerHTML:s}),l()("span",{className:"account__header__username"},void 0,"@",t.get("acct")," ",a),l()("div",{className:"account__header__content",dangerouslySetInnerHTML:r}),o,i))},t}(C.a),r.propTypes={account:b.a.map,onFollow:y.a.func.isRequired,intl:y.a.object.isRequired},a=s))||a},784:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var o,i=n(2),a=n.n(i),r=n(1),s=n.n(r),c=n(3),l=n.n(c),u=n(4),d=n.n(u),p=n(0),f=n.n(p),h=n(284),m=n(58),g=n(6),v=n(18),b=Object(g.f)({mention:{id:"account.mention",defaultMessage:"Mention @{name}"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},follow:{id:"account.follow",defaultMessage:"Follow"},report:{id:"account.report",defaultMessage:"Report @{name}"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),M=Object(g.g)(o=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),c=0;c<a;c++)r[c]=arguments[c];return n=o=l()(this,e.call.apply(e,[this].concat(r))),o.handleShare=function(){navigator.share({url:o.props.account.get("url")})},i=n,l()(o,i)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl,o=[],i="";if(o.push({text:n.formatMessage(b.mention,{name:t.get("username")}),action:this.props.onMention}),"share"in navigator&&o.push({text:n.formatMessage(b.share,{name:t.get("username")}),action:this.handleShare}),o.push(null),o.push({text:n.formatMessage(b.media),to:"/accounts/"+t.get("id")+"/media"}),o.push(null),t.get("id")===v.e?o.push({text:n.formatMessage(b.edit_profile),href:"/settings/profile"}):(t.getIn(["relationship","muting"])?o.push({text:n.formatMessage(b.unmute,{name:t.get("username")}),action:this.props.onMute}):o.push({text:n.formatMessage(b.mute,{name:t.get("username")}),action:this.props.onMute}),t.getIn(["relationship","blocking"])?o.push({text:n.formatMessage(b.unblock,{name:t.get("username")}),action:this.props.onBlock}):o.push({text:n.formatMessage(b.block,{name:t.get("username")}),action:this.props.onBlock}),o.push({text:n.formatMessage(b.report,{name:t.get("username")}),action:this.props.onReport})),t.get("acct")!==t.get("username")){var r=t.get("acct").split("@")[1];i=a()("div",{className:"account__disclaimer"},void 0,a()(g.b,{id:"account.disclaimer_full",defaultMessage:"Information below may reflect the user's profile incompletely."})," ",a()("a",{target:"_blank",rel:"noopener",href:t.get("url")},void 0,a()(g.b,{id:"account.view_full_profile",defaultMessage:"View full profile"}))),o.push(null),t.getIn(["relationship","domain_blocking"])?o.push({text:n.formatMessage(b.unblockDomain,{domain:r}),action:this.props.onUnblockDomain}):o.push({text:n.formatMessage(b.blockDomain,{domain:r}),action:this.props.onBlockDomain})}return a()("div",{},void 0,i,a()("div",{className:"account__action-bar"},void 0,a()("div",{className:"account__action-bar-dropdown"},void 0,a()(h.a,{items:o,icon:"bars",size:24,direction:"right"})),a()("div",{className:"account__action-bar-links"},void 0,a()(m.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")},void 0,a()("span",{},void 0,a()(g.b,{id:"account.posts",defaultMessage:"Posts"})),a()("strong",{},void 0,a()(g.c,{value:t.get("statuses_count")}))),a()(m.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/following"},void 0,a()("span",{},void 0,a()(g.b,{id:"account.follows",defaultMessage:"Follows"})),a()("strong",{},void 0,a()(g.c,{value:t.get("following_count")}))),a()(m.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/followers"},void 0,a()("span",{},void 0,a()(g.b,{id:"account.followers",defaultMessage:"Followers"})),a()("strong",{},void 0,a()(g.c,{value:t.get("followers_count")}))))))},t}(f.a.PureComponent))||o}});
|
|
//# sourceMappingURL=account_timeline-cad2550e777d3958eca4.js.map
|