mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-28 03:13:13 +00:00
2 lines
33 KiB
JavaScript
2 lines
33 KiB
JavaScript
webpackJsonp([19,33],{1e3:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var i,a,o,s=n(2),r=n.n(s),l=n(1),d=n.n(l),c=n(3),u=n.n(c),p=n(4),h=n.n(p),f=n(0),g=n.n(f),m=n(5),v=n.n(m),b=n(23),y=n(291),_=n(7),M=n(13),k=Object(_.f)({delete:{id:"status.delete",defaultMessage:"Delete"},redraft:{id:"status.redraft",defaultMessage:"Delete & re-draft"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},reply:{id:"status.reply",defaultMessage:"Reply"},reblog:{id:"status.reblog",defaultMessage:"Boost"},reblog_private:{id:"status.reblog_private",defaultMessage:"Boost to original audience"},cancel_reblog_private:{id:"status.cancel_reblog_private",defaultMessage:"Unboost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be boosted"},favourite:{id:"status.favourite",defaultMessage:"Favourite"},mute:{id:"status.mute",defaultMessage:"Mute @{name}"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"},block:{id:"status.block",defaultMessage:"Block @{name}"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},embed:{id:"status.embed",defaultMessage:"Embed"}}),C=Object(_.g)((o=a=function(e){function t(){var n,i,a;d()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.handleReplyClick=function(){i.props.onReply(i.props.status)},i.handleReblogClick=function(e){i.props.onReblog(i.props.status,e)},i.handleFavouriteClick=function(){i.props.onFavourite(i.props.status)},i.handleDeleteClick=function(){i.props.onDelete(i.props.status)},i.handleRedraftClick=function(){i.props.onDelete(i.props.status,!0)},i.handleDirectClick=function(){i.props.onDirect(i.props.status.get("account"),i.context.router.history)},i.handleMentionClick=function(){i.props.onMention(i.props.status.get("account"),i.context.router.history)},i.handleMuteClick=function(){i.props.onMute(i.props.status.get("account"))},i.handleConversationMuteClick=function(){i.props.onMuteConversation(i.props.status)},i.handleBlockClick=function(){i.props.onBlock(i.props.status.get("account"))},i.handleReport=function(){i.props.onReport(i.props.status)},i.handlePinClick=function(){i.props.onPin(i.props.status)},i.handleShare=function(){navigator.share({text:i.props.status.get("search_index"),url:i.props.status.get("url")})},i.handleEmbed=function(){i.props.onEmbed(i.props.status)},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.status,n=e.intl,i=["public","unlisted"].includes(t.get("visibility")),a=t.get("muted"),o=[];i&&(o.push({text:n.formatMessage(k.embed),action:this.handleEmbed}),o.push(null)),M.i===t.getIn(["account","id"])?(i?o.push({text:n.formatMessage(t.get("pinned")?k.unpin:k.pin),action:this.handlePinClick}):"private"===t.get("visibility")&&o.push({text:n.formatMessage(t.get("reblogged")?k.cancel_reblog_private:k.reblog_private),action:this.handleReblogClick}),o.push(null),o.push({text:n.formatMessage(a?k.unmuteConversation:k.muteConversation),action:this.handleConversationMuteClick}),o.push(null),o.push({text:n.formatMessage(k.delete),action:this.handleDeleteClick}),o.push({text:n.formatMessage(k.redraft),action:this.handleRedraftClick})):(o.push({text:n.formatMessage(k.mention,{name:t.getIn(["account","username"])}),action:this.handleMentionClick}),o.push({text:n.formatMessage(k.direct,{name:t.getIn(["account","username"])}),action:this.handleDirectClick}),o.push(null),o.push({text:n.formatMessage(k.mute,{name:t.getIn(["account","username"])}),action:this.handleMuteClick}),o.push({text:n.formatMessage(k.block,{name:t.getIn(["account","username"])}),action:this.handleBlockClick}),o.push({text:n.formatMessage(k.report,{name:t.getIn(["account","username"])}),action:this.handleReport}));var s="share"in navigator&&"public"===t.get("visibility")&&r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{title:n.formatMessage(k.share),icon:"share-alt",onClick:this.handleShare})),l="retweet";"direct"===t.get("visibility")?l="envelope":"private"===t.get("visibility")&&(l="lock");var d="direct"===t.get("visibility")||"private"===t.get("visibility");return r()("div",{className:"detailed-status__action-bar"},void 0,r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{title:n.formatMessage(k.reply),icon:null===t.get("in_reply_to_id",null)?"reply":"reply-all",onClick:this.handleReplyClick})),r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{disabled:d,active:t.get("reblogged"),title:d?n.formatMessage(k.cannot_reblog):n.formatMessage(k.reblog),icon:l,onClick:this.handleReblogClick})),r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{className:"star-icon",animate:!0,active:t.get("favourited"),title:n.formatMessage(k.favourite),icon:"star",onClick:this.handleFavouriteClick})),s,r()("div",{className:"detailed-status__action-bar-dropdown"},void 0,r()(y.a,{size:18,icon:"ellipsis-h",items:o,direction:"left",title:"More"})))},t}(g.a.PureComponent),a.contextTypes={router:v.a.object},i=o))||i},155:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),d=n(4),c=n.n(d),u=n(0),p=n.n(u),h=n(10),f=n.n(h),g=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),d=0;d<o;d++)r[d]=arguments[d];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleClick=function(){i.props.onClick()},a=n,l()(i,a)}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.type,i=e.active,o=e.columnHeaderId,s="";return t&&(s=a()("i",{className:"fa fa-fw fa-"+t+" column-header__icon"})),a()("h1",{className:f()("column-header",{active:i}),id:o||null},void 0,a()("button",{onClick:this.handleClick},void 0,s,n))},t}(p.a.PureComponent)},274:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),d=n(4),c=n.n(d),u=n(32),p=n.n(u),h=n(0),f=n.n(h),g=n(155),m=n(91),v=n(43),b=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),d=0;d<o;d++)r[d]=arguments[d];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleHeaderClick=function(){var e=i.node.querySelector(".scrollable");e&&(i._interruptScrollAnimation=Object(m.b)(e))},i.handleScroll=p()(function(){void 0!==i._interruptScrollAnimation&&i._interruptScrollAnimation()},200),i.setRef=function(e){i.node=e},a=n,l()(i,a)}return c()(t,e),t.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(m.b)(e))},t.prototype.render=function(){var e=this.props,t=e.heading,n=e.icon,i=e.children,o=e.active,s=e.hideHeadingOnMobile,r=t&&(!s||s&&!Object(v.b)(window.innerWidth)),l=r&&t.replace(/ /g,"-"),d=r&&a()(g.a,{icon:n,active:o,type:t,onClick:this.handleHeaderClick,columnHeaderId:l});return f.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":l,className:"column",onScroll:this.handleScroll},d,i)},t}(f.a.PureComponent)},276:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),d=n(3),c=n.n(d),u=n(4),p=n.n(u),h=n(0),f=n.n(h),g=n(7),m=n(5),v=n.n(m),b=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.handleClick=function(){window.history&&1===window.history.length?i.context.router.history.push("/"):i.context.router.history.goBack()},a=n,c()(i,a)}return p()(t,e),t.prototype.render=function(){return s()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,s()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),s()(g.b,{id:"column_back_button.label",defaultMessage:"Back"}))},t}(f.a.PureComponent),i.contextTypes={router:v.a.object},a)},277:function(e,t,n){"use strict";var i=n(2),a=n.n(i),o=n(0),s=(n.n(o),n(9)),r=n(158),l=n(67),d=n(17),c=n(68),u=n(22),p=n(69),h=n(90),f=n(157),g=n(26),m=n(7),v=n(13),b=n(33),y=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?"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it."},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}}),_=function(){var e=Object(l.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(d.T)(t,n))},onModalReblog:function(t){e(Object(c.o)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(c.r)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(g.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(c.p)(t):Object(c.k)(t))},onPin:function(t){e(t.get("pinned")?Object(c.q)(t):Object(c.n)(t))},onEmbed:function(t){e(Object(g.d)("EMBED",{url:t.get("url"),onError:function(t){return e(Object(b.e)(t))}}))},onDelete:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e(v.d?Object(g.d)("CONFIRM",{message:n.formatMessage(i?y.redraftMessage:y.deleteMessage),confirm:n.formatMessage(i?y.redraftConfirm:y.deleteConfirm),onConfirm:function(){return e(Object(p.g)(t.get("id"),i))}}):Object(p.g)(t.get("id"),i))},onDirect:function(t,n){e(Object(d.N)(t,n))},onMention:function(t,n){e(Object(d.R)(t,n))},onOpenMedia:function(t,n){e(Object(g.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(g.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(g.d)("CONFIRM",{message:a()(m.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:a()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(y.blockConfirm),onConfirm:function(){return e(Object(u.q)(t.get("id")))}}))},onReport:function(t){e(Object(f.k)(t.get("account"),t))},onMute:function(t){e(Object(h.g)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(p.l)(t.get("id")):Object(p.j)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(p.k)(t.get("id")):Object(p.i)(t.get("id")))}}};t.a=Object(m.g)(Object(s.connect)(_,M)(r.a))},805:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return x});var i,a,o,s,r,l=n(2),d=n.n(l),c=n(1),u=n.n(c),p=n(3),h=n.n(p),f=n(4),g=n.n(f),m=n(0),v=n.n(m),b=n(8),y=(n.n(b),n(23)),_=n(7),M=n(43),k=n(10),C=n.n(k),O=n(13),j=Object(_.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),w=(a=i=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.handleMouseEnter=function(e){i.hoverToPlay()&&e.target.play()},i.handleMouseLeave=function(e){i.hoverToPlay()&&(e.target.pause(),e.target.currentTime=0)},i.handleClick=function(e){var t=i.props,n=t.index,a=t.onClick;0===e.button&&(e.preventDefault(),a(n)),e.stopPropagation()},a=n,h()(i,a)}return g()(t,e),t.prototype.hoverToPlay=function(){var e=this.props.attachment;return!O.a&&"gifv"===e.get("type")},t.prototype.render=function(){var e=this.props,t=e.attachment,n=e.index,i=e.size,a=e.standalone,o=e.displayWidth,s=50,r=100,l="auto",c="auto",u="auto",p="auto";1===i&&(s=100),(4===i||3===i&&n>0)&&(r=50),2===i?0===n?p="2px":c="2px":3===i?(0===n?p="2px":n>0&&(c="2px"),1===n?u="2px":n>1&&(l="2px")):4===i&&(0!==n&&2!==n||(p="2px"),1!==n&&3!==n||(c="2px"),n<2?u="2px":l="2px");var h="";if("image"===t.get("type")){var f=t.get("preview_url"),g=t.getIn(["meta","small","width"]),m=t.get("url"),v=t.getIn(["meta","original","width"]),b="number"==typeof v&&"number"==typeof g,y=b?m+" "+v+"w, "+f+" "+g+"w":null,_=b?o*(s/100)+"px":null,k=t.getIn(["meta","focus","x"])||0,j=t.getIn(["meta","focus","y"])||0,w=100*(k/2+.5),x=100*(j/-2+.5);h=d()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||m,onClick:this.handleClick,target:"_blank"},void 0,d()("img",{src:f,srcSet:y,sizes:_,alt:t.get("description"),title:t.get("description"),style:{objectPosition:w+"% "+x+"%"}}))}else if("audio"===t.get("type"))h=d()("div",{className:"media-gallery__audio"},void 0,d()("audio",{className:"media-gallery__item-audio-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),loop:!0,controls:!0}));else if("gifv"===t.get("type")){var R=!Object(M.a)()&&O.a;h=d()("div",{className:C()("media-gallery__gifv",{autoplay:R})},void 0,d()("video",{className:"media-gallery__item-gifv-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,autoPlay:R,loop:!0,muted:!0}),d()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return d()("div",{className:C()("media-gallery__item",{standalone:a}),style:{left:c,top:l,right:p,bottom:u,width:s+"%",height:r+"%"}},t.get("id"),h)},t}(v.a.PureComponent),i.defaultProps={standalone:!1,index:0,size:1},a),x=Object(_.g)((r=s=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.state={visible:!i.props.sensitive||O.f},i.handleOpen=function(){i.setState({visible:!i.state.visible})},i.handleClick=function(e){i.props.onOpenMedia(i.props.media,e)},i.handleRef=function(e){e&&i.setState({width:e.offsetWidth})},a=n,h()(i,a)}return g()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(b.is)(e.media,this.props.media)||this.setState({visible:!e.sensitive})},t.prototype.isStandaloneEligible=function(){var e=this.props,t=e.media;return e.standalone&&1===t.size&&t.getIn([0,"meta","small","aspect"])},t.prototype.render=function(){var e=this,t=this.props,n=t.media,i=t.intl,a=t.sensitive,o=t.height,s=this.state,r=s.width,l=s.visible,c=void 0,u={};if(this.isStandaloneEligible()?r&&(u.height=r/this.props.media.getIn([0,"meta","small","aspect"])):u.height=r?r/(16/9):o,l){var p=n.take(4).size;c=this.isStandaloneEligible()?d()(w,{standalone:!0,onClick:this.handleClick,attachment:n.get(0),displayWidth:r}):n.take(4).map(function(t,n){return d()(w,{onClick:e.handleClick,attachment:t,index:n,size:p,displayWidth:r},t.get("id"))})}else{var h=void 0;h=a?d()(_.b,{id:"status.sensitive_warning",defaultMessage:"Sensitive content"}):d()(_.b,{id:"status.media_hidden",defaultMessage:"Media hidden"}),c=v.a.createElement("button",{type:"button",className:"media-spoiler",onClick:this.handleOpen,style:u,ref:this.handleRef},d()("span",{className:"media-spoiler__warning"},void 0,h),d()("span",{className:"media-spoiler__trigger"},void 0,d()(_.b,{id:"status.sensitive_toggle",defaultMessage:"Click to view"})))}return v.a.createElement("div",{className:"media-gallery",style:u,ref:this.handleRef},d()("div",{className:C()("spoiler-button",{"spoiler-button--visible":l})},void 0,d()(y.a,{title:i.formatMessage(j.toggle_visible),icon:l?"eye":"eye-slash",overlay:!0,onClick:this.handleOpen})),c)},t}(v.a.PureComponent),s.defaultProps={standalone:!1},o=r))||o},818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return Q});var i,a,o,s,r=n(2),l=n.n(r),d=n(1),c=n.n(d),u=n(3),p=n.n(u),h=n(4),f=n.n(h),g=n(8),m=n.n(g),v=n(0),b=n.n(v),y=n(9),_=n(5),M=n.n(_),k=n(10),C=n.n(k),O=n(14),j=n.n(O),w=n(69),x=n(866),R=n(998),I=n(1e3),N=n(274),D=n(68),E=n(17),S=n(22),A=n(90),T=n(157),P=n(67),H=n(156),F=n(276),B=n(70),z=n(277),q=n(26),V=n(7),U=n(12),W=n.n(U),L=n(162),J=(n.n(L),n(13)),K=n(159),Y=Object(V.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it."},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},revealAll:{id:"status.show_more_all",defaultMessage:"Show more for all"},hideAll:{id:"status.show_less_all",defaultMessage:"Show less for all"}}),G=function(){var e=Object(P.e)();return function(t,n){var i=e(t,n.params.statusId),a=m.a.List(),o=m.a.List();return i&&(a=a.withMutations(function(e){for(var n=i.get("in_reply_to_id");n;)e.unshift(n),n=t.getIn(["contexts","inReplyTos",n])}),o=o.withMutations(function(e){for(var n=[i.get("id")];n.length>0;){var a=n.shift(),o=t.getIn(["contexts","replies",a]);i.get("id")!==a&&e.push(a),o&&o.reverse().forEach(function(e){n.unshift(e)})}})),{status:i,ancestorsIds:a,descendantsIds:o}}},Q=(i=Object(y.connect)(G),Object(V.g)(a=i((s=o=function(e){function t(){var n,i,a;c()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=p()(this,e.call.apply(e,[this].concat(s))),i.state={fullscreen:!1},i.handleFavouriteClick=function(e){e.get("favourited")?i.props.dispatch(Object(D.p)(e)):i.props.dispatch(Object(D.k)(e))},i.handlePin=function(e){e.get("pinned")?i.props.dispatch(Object(D.q)(e)):i.props.dispatch(Object(D.n)(e))},i.handleReplyClick=function(e){i.props.dispatch(Object(E.T)(e,i.context.router.history))},i.handleModalReblog=function(e){i.props.dispatch(Object(D.o)(e))},i.handleReblogClick=function(e,t){e.get("reblogged")?i.props.dispatch(Object(D.r)(e)):t.shiftKey||!J.b?i.handleModalReblog(e):i.props.dispatch(Object(q.d)("BOOST",{status:e,onReblog:i.handleModalReblog}))},i.handleDeleteClick=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props,a=n.dispatch,o=n.intl;a(J.d?Object(q.d)("CONFIRM",{message:o.formatMessage(t?Y.redraftMessage:Y.deleteMessage),confirm:o.formatMessage(t?Y.redraftConfirm:Y.deleteConfirm),onConfirm:function(){return a(Object(w.g)(e.get("id"),t))}}):Object(w.g)(e.get("id"),t))},i.handleDirectClick=function(e,t){i.props.dispatch(Object(E.N)(e,t))},i.handleMentionClick=function(e,t){i.props.dispatch(Object(E.R)(e,t))},i.handleOpenMedia=function(e,t){i.props.dispatch(Object(q.d)("MEDIA",{media:e,index:t}))},i.handleOpenVideo=function(e,t){i.props.dispatch(Object(q.d)("VIDEO",{media:e,time:t}))},i.handleMuteClick=function(e){i.props.dispatch(Object(A.g)(e))},i.handleConversationMuteClick=function(e){e.get("muted")?i.props.dispatch(Object(w.l)(e.get("id"))):i.props.dispatch(Object(w.j)(e.get("id")))},i.handleToggleHidden=function(e){e.get("hidden")?i.props.dispatch(Object(w.k)(e.get("id"))):i.props.dispatch(Object(w.i)(e.get("id")))},i.handleToggleAll=function(){var e=i.props,t=e.status,n=e.ancestorsIds,a=e.descendantsIds,o=[t.get("id")].concat(n.toJS(),a.toJS());t.get("hidden")?i.props.dispatch(Object(w.k)(o)):i.props.dispatch(Object(w.i)(o))},i.handleBlockClick=function(e){var t=i.props,n=t.dispatch,a=t.intl;n(Object(q.d)("CONFIRM",{message:l()(V.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:l()("strong",{},void 0,"@",e.get("acct"))}}),confirm:a.formatMessage(Y.blockConfirm),onConfirm:function(){return n(Object(S.q)(e.get("id")))}}))},i.handleReport=function(e){i.props.dispatch(Object(T.k)(e.get("account"),e))},i.handleEmbed=function(e){i.props.dispatch(Object(q.d)("EMBED",{url:e.get("url")}))},i.handleHotkeyMoveUp=function(){i.handleMoveUp(i.props.status.get("id"))},i.handleHotkeyMoveDown=function(){i.handleMoveDown(i.props.status.get("id"))},i.handleHotkeyReply=function(e){e.preventDefault(),i.handleReplyClick(i.props.status)},i.handleHotkeyFavourite=function(){i.handleFavouriteClick(i.props.status)},i.handleHotkeyBoost=function(){i.handleReblogClick(i.props.status)},i.handleHotkeyMention=function(e){e.preventDefault(),i.handleMentionClick(i.props.status)},i.handleHotkeyOpenProfile=function(){i.context.router.history.push("/accounts/"+i.props.status.getIn(["account","id"]))},i.handleHotkeyToggleHidden=function(){i.handleToggleHidden(i.props.status)},i.handleMoveUp=function(e){var t=i.props,n=t.status,a=t.ancestorsIds,o=t.descendantsIds;if(e===n.get("id"))i._selectChild(a.size-1);else{var s=a.indexOf(e);-1===s?(s=o.indexOf(e),i._selectChild(a.size+s)):i._selectChild(s-1)}},i.handleMoveDown=function(e){var t=i.props,n=t.status,a=t.ancestorsIds,o=t.descendantsIds;if(e===n.get("id"))i._selectChild(a.size+1);else{var s=a.indexOf(e);-1===s?(s=o.indexOf(e),i._selectChild(a.size+s+2)):i._selectChild(s+1)}},i.setRef=function(e){i.node=e},i.onFullScreenChange=function(){i.setState({fullscreen:Object(K.d)()})},a=n,p()(i,a)}return f()(t,e),t.prototype.componentWillMount=function(){this.props.dispatch(Object(w.h)(this.props.params.statusId))},t.prototype.componentDidMount=function(){Object(K.a)(this.onFullScreenChange)},t.prototype.componentWillReceiveProps=function(e){e.params.statusId!==this.props.params.statusId&&e.params.statusId&&(this._scrolledIntoView=!1,this.props.dispatch(Object(w.h)(e.params.statusId)))},t.prototype._selectChild=function(e){var t=this.node.querySelectorAll(".focusable")[e];t&&t.focus()},t.prototype.renderChildren=function(e){var t=this;return e.map(function(e){return l()(z.a,{id:e,onMoveUp:t.handleMoveUp,onMoveDown:t.handleMoveDown},e)})},t.prototype.componentDidUpdate=function(){if(!this._scrolledIntoView){var e=this.props,t=e.status,n=e.ancestorsIds;if(t&&n&&n.size>0){this.node.querySelectorAll(".focusable")[n.size-1].scrollIntoView(!0),this._scrolledIntoView=!0}}},t.prototype.componentWillUnmount=function(){Object(K.b)(this.onFullScreenChange)},t.prototype.render=function(){var e=void 0,t=void 0,n=this.props,i=n.status,a=n.ancestorsIds,o=n.descendantsIds,s=n.intl,r=this.state.fullscreen;if(null===i)return l()(N.a,{},void 0,l()(F.a,{}),l()(x.a,{}));a&&a.size>0&&(e=l()("div",{},void 0,this.renderChildren(a))),o&&o.size>0&&(t=l()("div",{},void 0,this.renderChildren(o)));var d={moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown,reply:this.handleHotkeyReply,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleHotkeyMention,openProfile:this.handleHotkeyOpenProfile,toggleHidden:this.handleHotkeyToggleHidden};return l()(N.a,{},void 0,l()(B.a,{showBackButton:!0,extraButton:l()("button",{className:"column-header__button",title:s.formatMessage(i.get("hidden")?Y.revealAll:Y.hideAll),"aria-label":s.formatMessage(i.get("hidden")?Y.revealAll:Y.hideAll),onClick:this.handleToggleAll,"aria-pressed":i.get("hidden")?"false":"true"},void 0,l()("i",{className:"fa fa-"+(i.get("hidden")?"eye-slash":"eye")}))}),l()(H.a,{scrollKey:"thread"},void 0,b.a.createElement("div",{className:C()("scrollable","detailed-status__wrapper",{fullscreen:r}),ref:this.setRef},e,l()(L.HotKeys,{handlers:d},void 0,l()("div",{className:"focusable",tabIndex:"0"},void 0,l()(R.a,{status:i,onOpenVideo:this.handleOpenVideo,onOpenMedia:this.handleOpenMedia,onToggleHidden:this.handleToggleHidden}),l()(I.a,{status:i,onReply:this.handleReplyClick,onFavourite:this.handleFavouriteClick,onReblog:this.handleReblogClick,onDelete:this.handleDeleteClick,onDirect:this.handleDirectClick,onMention:this.handleMentionClick,onMute:this.handleMuteClick,onMuteConversation:this.handleConversationMuteClick,onBlock:this.handleBlockClick,onReport:this.handleReport,onPin:this.handlePin,onEmbed:this.handleEmbed}))),t)))},t}(W.a),o.contextTypes={router:M.a.object},o.propTypes={params:M.a.object.isRequired,dispatch:M.a.func.isRequired,status:j.a.map,ancestorsIds:j.a.list,descendantsIds:j.a.list,intl:M.a.object.isRequired},a=s))||a)||a)},866:function(e,t,n){"use strict";var i=n(2),a=n.n(i),o=n(0),s=(n.n(o),n(7)),r=function(){return a()("div",{className:"regeneration-indicator missing-indicator"},void 0,a()("div",{},void 0,a()("div",{className:"regeneration-indicator__figure"}),a()("div",{className:"regeneration-indicator__label"},void 0,a()(s.b,{id:"missing_indicator.label",tagName:"strong",defaultMessage:"Not found"}),a()(s.b,{id:"missing_indicator.sublabel",defaultMessage:"This resource could not be found"}))))};t.a=r},899:function(e,t,n){"use strict";n.d(t,"a",function(){return w});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),d=n(3),c=n.n(d),u=n(4),p=n.n(u),h=n(0),f=n.n(h),g=n(8),m=n.n(g),v=n(900),b=n.n(v),y=n(10),_=n.n(y),M=function(e){return e.split(".").map(function(e){return 0===e.indexOf("xn--")?b.a.decode(e.slice("xn--".length)):e}).join(".")},k=function(e){var t=document.createElement("a");return t.href=e,t.hostname},C=function(e,t){var n=e.indexOf(" ",t);return-1===n?e:e.substring(0,n)+(e.length>t?"…":"")},O=new DOMParser,j=function(e){var t=O.parseFromString(e,"text/html").documentElement,n=t.querySelector("iframe");return n?(-1!==n.src.indexOf("?")?n.src+="&":n.src+="?",n.src+="autoplay=1&auto_play=1",t.querySelector("body").innerHTML):e},w=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.state={width:280,embedded:!1},i.handlePhotoClick=function(){var e=i.props,t=e.card;(0,e.onOpenMedia)(m.a.fromJS([{type:"image",url:t.get("embed_url"),description:t.get("title"),meta:{original:{width:t.get("width"),height:t.get("height")}}}]),0)},i.handleEmbedClick=function(){"photo"===i.props.card.get("type")?i.handlePhotoClick():i.setState({embedded:!0})},i.setRef=function(e){e&&i.setState({width:e.offsetWidth})},a=n,c()(i,a)}return p()(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.card!==e.card&&this.setState({embedded:!1})},t.prototype.renderVideo=function(){var e=this.props.card,t={__html:j(e.get("html"))},n=this.state.width,i=e.get("width")/e.get("height"),a=e.get("width")>e.get("height")?n/i:n*i;return f.a.createElement("div",{ref:this.setRef,className:"status-card__image status-card-video",dangerouslySetInnerHTML:t,style:{height:a}})},t.prototype.render=function(){var e=this.props,t=e.card,n=e.maxDescription,i=this.state,a=i.width,o=i.embedded;if(null===t)return null;var r=0===t.get("provider_name").length?M(k(t.get("url"))):t.get("provider_name"),l=t.get("width")>t.get("height")&&t.get("width")+100>=a||"link"!==t.get("type"),d=_()("status-card",{horizontal:l}),c="link"!==t.get("type"),u=c?s()("a",{className:"status-card__title",href:t.get("url"),title:t.get("title"),rel:"noopener",target:"_blank"},void 0,s()("strong",{},void 0,t.get("title"))):s()("strong",{className:"status-card__title",title:t.get("title")},void 0,t.get("title")),p=t.get("width")/t.get("height"),h=t.get("width")>t.get("height")?a/p:a*p,g=s()("div",{className:"status-card__content"},void 0,u,!l&&s()("p",{className:"status-card__description"},void 0,C(t.get("description")||"",n)),s()("span",{className:"status-card__host"},void 0,r)),m="",v=s()("div",{style:{backgroundImage:"url("+t.get("image")+")",width:l?a:null,height:l?h:null},className:"status-card__image-image"});if(c){if(o)m=this.renderVideo();else{var b="play";"photo"===t.get("type")&&(b="search-plus"),m=s()("div",{className:"status-card__image"},void 0,v,s()("div",{className:"status-card__actions"},void 0,s()("div",{},void 0,s()("button",{onClick:this.handleEmbedClick},void 0,s()("i",{className:"fa fa-"+b})),s()("a",{href:t.get("url"),target:"_blank",rel:"noopener"},void 0,s()("i",{className:"fa fa-external-link"})))))}return f.a.createElement("div",{className:d,ref:this.setRef},m,g)}return t.get("image")&&(m=s()("div",{className:"status-card__image"},void 0,v)),f.a.createElement("a",{href:t.get("url"),className:d,target:"_blank",rel:"noopener",ref:this.setRef},m,g)},t}(f.a.PureComponent),i.defaultProps={maxDescription:50},a)},900:function(e,t,n){(function(e,i){var a;!function(o){function s(e){throw new RangeError(E[e])}function r(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function l(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(D,"."),i+r(e.split("."),t).join(".")}function d(e){for(var t,n,i=[],a=0,o=e.length;a<o;)t=e.charCodeAt(a++),t>=55296&&t<=56319&&a<o?(n=e.charCodeAt(a++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),a--)):i.push(t);return i}function c(e){return r(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:M}function p(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var i=0;for(e=n?A(e/j):e>>1,e+=A(e/t);e>S*C>>1;i+=M)e=A(e/S);return A(i+(S+1)*e/(e+O))}function f(e){var t,n,i,a,o,r,l,d,p,f,g=[],m=e.length,v=0,b=x,y=w;for(n=e.lastIndexOf(R),n<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&s("not-basic"),g.push(e.charCodeAt(i));for(a=n>0?n+1:0;a<m;){for(o=v,r=1,l=M;a>=m&&s("invalid-input"),d=u(e.charCodeAt(a++)),(d>=M||d>A((_-v)/r))&&s("overflow"),v+=d*r,p=l<=y?k:l>=y+C?C:l-y,!(d<p);l+=M)f=M-p,r>A(_/f)&&s("overflow"),r*=f;t=g.length+1,y=h(v-o,t,0==o),A(v/t)>_-b&&s("overflow"),b+=A(v/t),v%=t,g.splice(v++,0,b)}return c(g)}function g(e){var t,n,i,a,o,r,l,c,u,f,g,m,v,b,y,O=[];for(e=d(e),m=e.length,t=x,n=0,o=w,r=0;r<m;++r)(g=e[r])<128&&O.push(T(g));for(i=a=O.length,a&&O.push(R);i<m;){for(l=_,r=0;r<m;++r)(g=e[r])>=t&&g<l&&(l=g);for(v=i+1,l-t>A((_-n)/v)&&s("overflow"),n+=(l-t)*v,t=l,r=0;r<m;++r)if(g=e[r],g<t&&++n>_&&s("overflow"),g==t){for(c=n,u=M;f=u<=o?k:u>=o+C?C:u-o,!(c<f);u+=M)y=c-f,b=M-f,O.push(T(p(f+y%b,0))),c=A(y/b);O.push(T(p(c,0))),o=h(n,v,i==a),n=0,++i}++n,++t}return O.join("")}function m(e){return l(e,function(e){return I.test(e)?f(e.slice(4).toLowerCase()):e})}function v(e){return l(e,function(e){return N.test(e)?"xn--"+g(e):e})}var b=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof i&&i);var y,_=2147483647,M=36,k=1,C=26,O=38,j=700,w=72,x=128,R="-",I=/^xn--/,N=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=M-k,A=Math.floor,T=String.fromCharCode;y={version:"1.4.1",ucs2:{decode:d,encode:c},decode:f,encode:g,toASCII:v,toUnicode:m},void 0!==(a=function(){return y}.call(t,n,t,e))&&(e.exports=a)}()}).call(t,n(101)(e),n(57))},998:function(e,t,n){"use strict";n.d(t,"a",function(){return I});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),d=n(3),c=n.n(d),u=n(4),p=n.n(u),h=n(0),f=(n.n(h),n(5)),g=n.n(f),m=n(14),v=n.n(m),b=n(54),y=n(53),_=n(104),M=n(805),k=n(326),C=n(44),O=n(7),j=n(999),w=n(12),x=n.n(w),R=n(74),I=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=c()(this,e.call.apply(e,[this].concat(s))),i.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),i.context.router.history.push("/accounts/"+i.props.status.getIn(["account","id"]))),e.stopPropagation()},i.handleOpenVideo=function(e,t){i.props.onOpenVideo(e,t)},i.handleExpandedToggle=function(){i.props.onToggleHidden(i.props.status)},a=n,c()(i,a)}return p()(t,e),t.prototype.render=function(){var e=this.props.status.get("reblog")?this.props.status.get("reblog"):this.props.status,t="",n="",i="",a="retweet";if(e.get("media_attachments").size>0)if(e.get("media_attachments").some(function(e){return"unknown"===e.get("type")}))t=s()(k.a,{media:e.get("media_attachments")});else if("video"===e.getIn(["media_attachments",0,"type"])){var o=e.getIn(["media_attachments",0]);t=s()(R.default,{preview:o.get("preview_url"),src:o.get("url"),width:300,height:150,inline:!0,onOpenVideo:this.handleOpenVideo,sensitive:e.get("sensitive")})}else t=s()(M.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),height:300,onOpenMedia:this.props.onOpenMedia});else 0===e.get("spoiler_text").length&&(t=s()(j.a,{onOpenMedia:this.props.onOpenMedia,statusId:e.get("id")}));return e.get("application")&&(n=s()("span",{},void 0," · ",s()("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blank",rel:"noopener"},void 0,e.getIn(["application","name"])))),"direct"===e.get("visibility")?a="envelope":"private"===e.get("visibility")&&(a="lock"),i="private"===e.get("visibility")?s()("i",{className:"fa fa-"+a}):s()(C.b,{to:"/statuses/"+e.get("id")+"/reblogs",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-"+a}),s()("span",{className:"detailed-status__reblogs"},void 0,s()(O.c,{value:e.get("reblogs_count")}))),s()("div",{className:"detailed-status"},void 0,s()("a",{href:e.getIn(["account","url"]),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,s()("div",{className:"detailed-status__display-avatar"},void 0,s()(b.a,{account:e.get("account"),size:48})),s()(y.a,{account:e.get("account")})),s()(_.a,{status:e,expanded:!e.get("hidden"),onExpandedToggle:this.handleExpandedToggle}),t,s()("div",{className:"detailed-status__meta"},void 0,s()("a",{className:"detailed-status__datetime",href:e.get("url"),target:"_blank",rel:"noopener"},void 0,s()(O.a,{value:new Date(e.get("created_at")),hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})),n," · ",i," · ",s()(C.b,{to:"/statuses/"+e.get("id")+"/favourites",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-star"}),s()("span",{className:"detailed-status__favorites"},void 0,s()(O.c,{value:e.get("favourites_count")})))))},t}(x.a),i.contextTypes={router:g.a.object},i.propTypes={status:v.a.map.isRequired,onOpenMedia:g.a.func.isRequired,onOpenVideo:g.a.func.isRequired,onToggleHidden:g.a.func.isRequired},a)},999:function(e,t,n){"use strict";var i=n(9),a=n(899),o=function(e,t){var n=t.statusId;return{card:e.getIn(["cards",n],null)}};t.a=Object(i.connect)(o)(a.a)}});
|
|
//# sourceMappingURL=status.js.map
|