logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

compose.js (22854B)


  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[56],{580:function(t,e,n){"use strict";var a=n(15),o=n(7),i=n(548),r=n(20),c=n(45),s=n(309),l=n(312),u=Object(o.f)({missingDescriptionMessage:{id:"confirmations.missing_media_description.message",defaultMessage:"At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot."},missingDescriptionConfirm:{id:"confirmations.missing_media_description.confirm",defaultMessage:"Send anyway"},missingDescriptionEdit:{id:"confirmations.missing_media_description.edit",defaultMessage:"Edit media"}});e.a=Object(o.g)(Object(a.connect)((function(t){var e=t.getIn(["local_settings","always_show_spoilers_field"]),n=t.getIn(["compose","in_reply_to"]),a=n?t.getIn(["statuses",n,"visibility"]):null,o=t.getIn(["local_settings","side_arm"]),i=a?Object(l.a)(a,o):null,r=null;switch(t.getIn(["local_settings","side_arm_reply_mode"])){case"copy":r=a;break;case"restrict":r=i}return r=r||o,{advancedOptions:t.getIn(["compose","advanced_options"]),focusDate:t.getIn(["compose","focusDate"]),caretPosition:t.getIn(["compose","caretPosition"]),isSubmitting:t.getIn(["compose","is_submitting"]),isChangingUpload:t.getIn(["compose","is_changing_upload"]),isUploading:t.getIn(["compose","is_uploading"]),layout:t.getIn(["local_settings","layout"]),media:t.getIn(["compose","media_attachments"]),preselectDate:t.getIn(["compose","preselectDate"]),privacy:t.getIn(["compose","privacy"]),sideArm:r,sensitive:t.getIn(["compose","sensitive"]),showSearch:t.getIn(["search","submitted"])&&!t.getIn(["search","hidden"]),spoiler:e||t.getIn(["compose","spoiler"]),spoilerText:t.getIn(["compose","spoiler_text"]),suggestions:t.getIn(["compose","suggestions"]),text:t.getIn(["compose","text"]),anyMedia:t.getIn(["compose","media_attachments"]).size>0,spoilersAlwaysOn:e,mediaDescriptionConfirmation:t.getIn(["local_settings","confirm_missing_media_description"]),preselectOnReply:t.getIn(["local_settings","preselect_on_reply"])}}),(function(t,e){var n=e.intl;return{onChange:function(e){t(Object(r.Q)(e))},onSubmit:function(e){t(Object(r.ob)(e))},onClearSuggestions:function(){t(Object(r.ab)())},onFetchSuggestions:function(e){t(Object(r.eb)(e))},onSuggestionSelected:function(e,n,a,o){t(Object(r.nb)(e,n,a,o))},onChangeSpoilerText:function(e){t(Object(r.U)(e))},onPaste:function(e){t(Object(r.rb)(e))},onPickEmoji:function(e,n){t(Object(r.gb)(e,n))},onChangeSpoilerness:function(){t(Object(r.V)())},onChangeVisibility:function(e){t(Object(r.W)(e))},onMediaDescriptionConfirm:function(e,a,o){void 0===o&&(o=null),t(Object(c.d)("CONFIRM",{message:n.formatMessage(u.missingDescriptionMessage),confirm:n.formatMessage(u.missingDescriptionConfirm),onConfirm:function(){o&&t(Object(r.W)(o)),t(Object(r.ob)(e))},secondary:n.formatMessage(u.missingDescriptionEdit),onSecondary:function(){return t(Object(c.d)("FOCAL_POINT",{id:a}))},onDoNotAsk:function(){return t(Object(s.b)(["confirm_missing_media_description"],!1))}}))}}}))(i.a))},61:function(t,e,n){var a,o;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var i=this.Rails;(function(){(function(){var t;t=null,i.loadCSPNonce=function(){var e;return t=null!=(e=document.querySelector("meta[name=csp-nonce]"))?e.content:void 0},i.cspNonce=function(){return null!=t?t:i.loadCSPNonce()}}).call(this),function(){var t;t=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,i.matches=function(e,n){return null!=n.exclude?t.call(e,n.selector)&&!t.call(e,n.exclude):t.call(e,n)},i.getData=function(t,e){var n;return null!=(n=t._ujsData)?n[e]:void 0},i.setData=function(t,e,n){return null==t._ujsData&&(t._ujsData={}),t._ujsData[e]=n},i.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var t,e,n;t=i.$,n=i.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},e=i.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},i.CSRFProtection=function(t){var e;if(null!=(e=n()))return t.setRequestHeader("X-CSRF-Token",e)},i.refreshCSRFTokens=function(){var a,o;if(o=n(),a=e(),null!=o&&null!=a)return t('form input[name="'+a+'"]').forEach((function(t){return t.value=o}))}}.call(this),function(){var t,e,n,a;n=i.matches,"function"!=typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,a=t.prototype.preventDefault,t.prototype.preventDefault=function(){var t;return t=a.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=i.fire=function(e,n,a){var o;return o=new t(n,{bubbles:!0,cancelable:!0,detail:a}),e.dispatchEvent(o),!o.defaultPrevented},i.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},i.delegate=function(t,e,a,o){return t.addEventListener(a,(function(t){var a;for(a=t.target;a instanceof Element&&!n(a,e);)a=a.parentNode;if(a instanceof Element&&!1===o.call(a,t))return t.preventDefault(),t.stopPropagation()}))}}.call(this),function(){var t,e,n,a,o,r;a=i.cspNonce,e=i.CSRFProtection,i.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},i.ajax=function(t){var e;return t=o(t),e=n(t,(function(){var n,a;return a=r(null!=(n=e.response)?n:e.responseText,e.getResponseHeader("Content-Type")),2===Math.floor(e.status/100)?"function"==typeof t.success&&t.success(a,e.statusText,e):"function"==typeof t.error&&t.error(a,e.statusText,e),"function"==typeof t.complete?t.complete(e,e.statusText):void 0})),!(null!=t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)},o=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},n=function(t,n){var a;return(a=new XMLHttpRequest).open(t.type,t.url,!0),a.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),e(a),a.withCredentials=!!t.withCredentials,a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)return n(a)},a},r=function(t,e){var n,o;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/))(o=document.createElement("script")).setAttribute("nonce",a()),o.text=t,document.head.appendChild(o).parentNode.removeChild(o);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t},i.href=function(t){return t.href},i.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return t,!0}}}.call(this),function(){var t,e;t=i.matches,e=function(t){return Array.prototype.slice.call(t)},i.serializeElement=function(n,a){var o,i;return o=[n],t(n,"form")&&(o=e(n.elements)),i=[],o.forEach((function(n){if(n.name&&!n.disabled&&!t(n,"fieldset[disabled] *"))return t(n,"select")?e(n.options).forEach((function(t){if(t.selected)return i.push({name:n.name,value:t.value})})):n.checked||-1===["radio","checkbox","submit"].indexOf(n.type)?i.push({name:n.name,value:n.value}):void 0})),a&&i.push(a),i.map((function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t})).join("&")},i.formElements=function(n,a){return t(n,"form")?e(n.elements).filter((function(e){return t(e,a)})):e(n.querySelectorAll(a))}}.call(this),function(){var t,e,n;e=i.fire,n=i.stopEverything,i.handleConfirm=function(e){if(!t(this))return n(e)},i.confirm=function(t,e){return confirm(t)},t=function(t){var n,a,o;if(!(o=t.getAttribute("data-confirm")))return!0;if(n=!1,e(t,"confirm")){try{n=i.confirm(o,t)}catch(t){}a=e(t,"confirm:complete",[n])}return n&&a}}.call(this),function(){var t,e,n,a,o,r,c,s,l,u,d,m;u=i.matches,s=i.getData,d=i.setData,m=i.stopEverything,c=i.formElements,i.handleDisabledElement=function(t){if(this,this.disabled)return m(t)},i.enableElement=function(t){var e;if(t instanceof Event){if(l(t))return;e=t.target}else e=t;return u(e,i.linkDisableSelector)?r(e):u(e,i.buttonDisableSelector)||u(e,i.formEnableSelector)?a(e):u(e,i.formSubmitSelector)?o(e):void 0},i.disableElement=function(a){var o;return o=a instanceof Event?a.target:a,u(o,i.linkDisableSelector)?n(o):u(o,i.buttonDisableSelector)||u(o,i.formDisableSelector)?t(o):u(o,i.formSubmitSelector)?e(o):void 0},n=function(t){var e;if(!s(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(d(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",m),d(t,"ujs:disabled",!0)},r=function(t){var e;return null!=(e=s(t,"ujs:enable-with"))&&(t.innerHTML=e,d(t,"ujs:enable-with",null)),t.removeEventListener("click",m),d(t,"ujs:disabled",null)},e=function(e){return c(e,i.formDisableSelector).forEach(t)},t=function(t){var e;if(!s(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(u(t,"button")?(d(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(d(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,d(t,"ujs:disabled",!0)},o=function(t){return c(t,i.formEnableSelector).forEach(a)},a=function(t){var e;return null!=(e=s(t,"ujs:enable-with"))&&(u(t,"button")?t.innerHTML=e:t.value=e,d(t,"ujs:enable-with",null)),t.disabled=!1,d(t,"ujs:disabled",null)},l=function(t){var e,n;return null!=(null!=(n=null!=(e=t.detail)?e[0]:void 0)?n.getResponseHeader("X-Xhr-Redirect"):void 0)}}.call(this),function(){var t;t=i.stopEverything,i.handleMethod=function(e){var n,a,o,r,c,s;if(this,s=this.getAttribute("data-method"))return c=i.href(this),a=i.csrfToken(),n=i.csrfParam(),o=document.createElement("form"),r="<input name='_method' value='"+s+"' type='hidden' />",null==n||null==a||i.isCrossDomain(c)||(r+="<input name='"+n+"' value='"+a+"' type='hidden' />"),r+='<input type="submit" />',o.method="post",o.action=c,o.target=this.target,o.innerHTML=r,o.style.display="none",document.body.appendChild(o),o.querySelector('[type="submit"]').click(),t(e)}}.call(this),function(){var t,e,n,a,o,r,c,s,l,u=[].slice;r=i.matches,n=i.getData,s=i.setData,e=i.fire,l=i.stopEverything,t=i.ajax,a=i.isCrossDomain,c=i.serializeElement,o=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},i.handleRemote=function(d){var m,f,p,b,g,h,v;return!o(b=this)||(e(b,"ajax:before")?(v=b.getAttribute("data-with-credentials"),p=b.getAttribute("data-type")||"script",r(b,i.formSubmitSelector)?(m=n(b,"ujs:submit-button"),g=n(b,"ujs:submit-button-formmethod")||b.method,h=n(b,"ujs:submit-button-formaction")||b.getAttribute("action")||location.href,"GET"===g.toUpperCase()&&(h=h.replace(/\?.*$/,"")),"multipart/form-data"===b.enctype?(f=new FormData(b),null!=m&&f.append(m.name,m.value)):f=c(b,m),s(b,"ujs:submit-button",null),s(b,"ujs:submit-button-formmethod",null),s(b,"ujs:submit-button-formaction",null)):r(b,i.buttonClickSelector)||r(b,i.inputChangeSelector)?(g=b.getAttribute("data-method"),h=b.getAttribute("data-url"),f=c(b,b.getAttribute("data-params"))):(g=b.getAttribute("data-method"),h=i.href(b),f=b.getAttribute("data-params")),t({type:g||"GET",url:h,data:f,dataType:p,beforeSend:function(t,n){return e(b,"ajax:beforeSend",[t,n])?e(b,"ajax:send",[t]):(e(b,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],e(b,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],e(b,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?u.call(arguments,0):[],e(b,"ajax:complete",t)},crossDomain:a(h),withCredentials:null!=v&&"false"!==v}),l(d)):(e(b,"ajax:stopped"),!1))},i.formSubmitButtonClick=function(t){var e;if(this,e=this.form)return this.name&&s(e,"ujs:submit-button",{name:this.name,value:this.value}),s(e,"ujs:formnovalidate-button",this.formNoValidate),s(e,"ujs:submit-button-formaction",this.getAttribute("formaction")),s(e,"ujs:submit-button-formmethod",this.getAttribute("formmethod"))},i.preventInsignificantClick=function(t){var e,n,a;if(this,a=(this.getAttribute("data-method")||"GET").toUpperCase(),e=this.getAttribute("data-params"),n=(t.metaKey||t.ctrlKey)&&"GET"===a&&!e,null!=t.button&&0!==t.button||n)return t.stopImmediatePropagation()}}.call(this),function(){var t,e,n,a,o,r,c,s,l,u,d,m,f,p,b;if(r=i.fire,n=i.delegate,s=i.getData,t=i.$,b=i.refreshCSRFTokens,e=i.CSRFProtection,f=i.loadCSPNonce,o=i.enableElement,a=i.disableElement,u=i.handleDisabledElement,l=i.handleConfirm,p=i.preventInsignificantClick,m=i.handleRemote,c=i.formSubmitButtonClick,d=i.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=i,jQuery.ajaxPrefilter((function(t,n,a){if(!t.crossDomain)return e(a)}))}i.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){return t(i.formEnableSelector).forEach((function(t){if(s(t,"ujs:disabled"))return o(t)})),t(i.linkDisableSelector).forEach((function(t){if(s(t,"ujs:disabled"))return o(t)}))})),n(document,i.linkDisableSelector,"ajax:complete",o),n(document,i.linkDisableSelector,"ajax:stopped",o),n(document,i.buttonDisableSelector,"ajax:complete",o),n(document,i.buttonDisableSelector,"ajax:stopped",o),n(document,i.linkClickSelector,"click",p),n(document,i.linkClickSelector,"click",u),n(document,i.linkClickSelector,"click",l),n(document,i.linkClickSelector,"click",a),n(document,i.linkClickSelector,"click",m),n(document,i.linkClickSelector,"click",d),n(document,i.buttonClickSelector,"click",p),n(document,i.buttonClickSelector,"click",u),n(document,i.buttonClickSelector,"click",l),n(document,i.buttonClickSelector,"click",a),n(document,i.buttonClickSelector,"click",m),n(document,i.inputChangeSelector,"change",u),n(document,i.inputChangeSelector,"change",l),n(document,i.inputChangeSelector,"change",m),n(document,i.formSubmitSelector,"submit",u),n(document,i.formSubmitSelector,"submit",l),n(document,i.formSubmitSelector,"submit",m),n(document,i.formSubmitSelector,"submit",(function(t){return setTimeout((function(){return a(t)}),13)})),n(document,i.formSubmitSelector,"ajax:send",a),n(document,i.formSubmitSelector,"ajax:complete",o),n(document,i.formInputClickSelector,"click",p),n(document,i.formInputClickSelector,"click",u),n(document,i.formInputClickSelector,"click",l),n(document,i.formInputClickSelector,"click",c),document.addEventListener("DOMContentLoaded",b),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===i&&r(document,"rails:attachBindings")&&i.start()}.call(this)}).call(this),t.exports?t.exports=i:void 0===(o="function"==typeof(a=i)?a.call(e,n,e,t):a)||(t.exports=o)}).call(this)},784:function(t,e,n){"use strict";var a=n(15),o=n(768),i=n(18);e.a=Object(a.connect)((function(t){return{account:t.getIn(["accounts",i.m])}}))(o.a)},838:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return B}));var a,o,i,r=n(0),c=(n(9),n(6),n(8)),s=n(3),l=n.n(s),u=n(580),d=n(784),m=n(15),f=n(20),p=n(7),b=n(14),g=n.n(b),h=n(773),v=n(97),j=n(35),y=n.n(j),S=n(1177),C=n(18),O=n(45),k=n(2),_=n(1),w=n(5),E=n.n(w),M=n(16),D=n.n(M),x=n(322),I=n(21),T=n(25),A=n(308),N=n(150);var P,L=Object(p.f)({community:{id:"navigation_bar.community_timeline",defaultMessage:"Local timeline"},home_timeline:{id:"tabs_bar.home",defaultMessage:"Home"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},notifications:{id:"tabs_bar.notifications",defaultMessage:"Notifications"},public:{id:"navigation_bar.public_timeline",defaultMessage:"Federated timeline"},settings:{id:"navigation_bar.app_settings",defaultMessage:"App settings"},start:{id:"getting_started.heading",defaultMessage:"Getting started"}}),R=Object(p.g)((i=o=function(t){Object(c.a)(n,t);var e;e=n;function n(){for(var e,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return e=t.call.apply(t,[this].concat(a))||this,Object(_.a)(Object(k.a)(e),"handleLogoutClick",(function(t){return t.preventDefault(),t.stopPropagation(),e.props.onLogout(),!1})),e}return n.prototype.render=function(){var t=this.props,e=t.intl,n=t.columns,a=t.unreadNotifications,o=t.showNotificationsBadge,i=t.onSettingsClick,c=A.b.bind(null,(function(t){return!n||!n.some((function(e){return e.get("id")===t}))}));return Object(r.a)("nav",{className:"drawer--header"},void 0,Object(r.a)(x.a,{"aria-label":e.formatMessage(L.start),title:e.formatMessage(L.start),to:"/getting-started"},void 0,Object(r.a)(T.a,{id:"asterisk"})),c("HOME",Object(r.a)(x.a,{"aria-label":e.formatMessage(L.home_timeline),title:e.formatMessage(L.home_timeline),to:"/timelines/home"},void 0,Object(r.a)(T.a,{id:"home"}))),c("NOTIFICATIONS",Object(r.a)(x.a,{"aria-label":e.formatMessage(L.notifications),title:e.formatMessage(L.notifications),to:"/notifications"},void 0,Object(r.a)("span",{className:"icon-badge-wrapper"},void 0,Object(r.a)(T.a,{id:"bell"}),o&&a>0&&Object(r.a)("div",{className:"icon-badge"})))),c("COMMUNITY",Object(r.a)(x.a,{"aria-label":e.formatMessage(L.community),title:e.formatMessage(L.community),to:"/timelines/public/local"},void 0,Object(r.a)(T.a,{id:"users"}))),c("PUBLIC",Object(r.a)(x.a,{"aria-label":e.formatMessage(L.public),title:e.formatMessage(L.public),to:"/timelines/public"},void 0,Object(r.a)(T.a,{id:"globe"}))),Object(r.a)("a",{"aria-label":e.formatMessage(L.settings),onClick:i,href:"#",title:e.formatMessage(L.settings)},void 0,Object(r.a)(T.a,{id:"cogs"})),Object(r.a)("a",{"aria-label":e.formatMessage(L.logout),onClick:this.handleLogoutClick,href:N.f,title:e.formatMessage(L.logout)},void 0,Object(r.a)(T.a,{id:"sign-out"})))},n}(I.a),Object(_.a)(o,"propTypes",{columns:D.a.list,unreadNotifications:E.a.number,showNotificationsBadge:E.a.bool,intl:E.a.object,onSettingsClick:E.a.func,onLogout:E.a.func.isRequired}),a=i))||a,q=n(61),H=n.n(q),F=Object(p.f)({logoutMessage:{id:"confirmations.logout.message",defaultMessage:"Are you sure you want to log out?"},logoutConfirm:{id:"confirmations.logout.confirm",defaultMessage:"Log out"}}),U=Object(p.g)(Object(m.connect)((function(t){return{columns:t.getIn(["settings","columns"]),unreadNotifications:t.getIn(["notifications","unread"]),showNotificationsBadge:t.getIn(["local_settings","notifications","tab_badge"])}}),(function(t,e){var n=e.intl;return{onSettingsClick:function(e){e.preventDefault(),e.stopPropagation(),t(Object(O.d)("SETTINGS",{}))},onLogout:function(){t(Object(O.d)("CONFIRM",{message:n.formatMessage(F.logoutMessage),confirm:n.formatMessage(F.logoutConfirm),onConfirm:function(){return function(){var t=document.createElement("form"),e=document.createElement("input");e.setAttribute("name","_method"),e.setAttribute("value","delete"),e.setAttribute("type","hidden"),t.appendChild(e);var n=H.a.csrfToken(),a=H.a.csrfParam();if(a&&n){var o=document.createElement("input");o.setAttribute("name",a),o.setAttribute("value",n),o.setAttribute("type","hidden"),t.appendChild(o)}var i=document.createElement("input");i.setAttribute("type","submit"),t.appendChild(i),t.method="post",t.action=N.f,t.style.display="none",document.body.appendChild(t),i.click()}()}}))}}}))(R));var X=Object(p.f)({compose:{id:"navigation_bar.compose",defaultMessage:"Compose new toot"}}),B=Object(m.connect)((function(t,e){return{showSearch:e.multiColumn?t.getIn(["search","submitted"])&&!t.getIn(["search","hidden"]):e.isSearchPage}}),(function(t,e){e.intl;return{onMount:function(){t(Object(f.ib)())},onUnmount:function(){t(Object(f.qb)())}}}))(P=Object(p.g)(P=function(t){Object(c.a)(n,t);var e;e=n;function n(){return t.apply(this,arguments)||this}var a=n.prototype;return a.componentDidMount=function(){this.props.isSearchPage||this.props.onMount()},a.componentWillUnmount=function(){this.props.isSearchPage||this.props.onUnmount()},a.render=function(){var t=this.props,e=t.intl,n=t.multiColumn,a=t.isSearchPage,o=t.showSearch,i=g()("drawer","mbstobon");return Object(r.a)("div",{className:i,role:"region","aria-label":e.formatMessage(X.compose)},void 0,n&&Object(r.a)(U,{}),(n||a)&&Object(r.a)(h.a,{}),Object(r.a)("div",{className:"drawer__pager"},void 0,!a&&Object(r.a)("div",{className:"drawer__inner"},void 0,Object(r.a)(d.a,{}),Object(r.a)(u.a,{}),Object(r.a)("div",{className:"drawer__inner__mastodon"},void 0,C.k?Object(r.a)("img",{alt:"",draggable:"false",src:C.k}):Object(r.a)("button",{className:"mastodon"}))),Object(r.a)(v.a,{defaultStyle:{x:a?0:-100},style:{x:y()(o||a?0:-100,{stiffness:210,damping:20})}},void 0,(function(t){var e=t.x;return(Object(r.a)("div",{className:"drawer__inner darker",style:{transform:"translateX("+e+"%)",visibility:-100===e?"hidden":"visible"}},void 0,Object(r.a)(S.a,{})))}))))},n}(l.a.PureComponent))||P)||P}}]);
  2. //# sourceMappingURL=compose.js.map