forked from mirrors/akkoma
2 lines
No EOL
22 KiB
JavaScript
2 lines
No EOL
22 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{572:function(t,e,n){"use strict";var a=n(13),o=n(6),i=n(540),r=n(19),c=n(42),s=n(303),l=n(306),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){t(Object(c.d)("CONFIRM",{message:n.formatMessage(u.missingDescriptionMessage),confirm:n.formatMessage(u.missingDescriptionConfirm),onConfirm:function(){return 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))},60: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)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)},t=function(t){var n,a,o;if(!(o=t.getAttribute("data-confirm")))return!0;if(n=!1,e(t,"confirm")){try{n=confirm(o)}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;l=i.matches,s=i.getData,u=i.setData,d=i.stopEverything,c=i.formElements,i.handleDisabledElement=function(t){if(this,this.disabled)return d(t)},i.enableElement=function(t){var e;return e=t instanceof Event?t.target:t,l(e,i.linkDisableSelector)?r(e):l(e,i.buttonDisableSelector)||l(e,i.formEnableSelector)?a(e):l(e,i.formSubmitSelector)?o(e):void 0},i.disableElement=function(a){var o;return o=a instanceof Event?a.target:a,l(o,i.linkDisableSelector)?n(o):l(o,i.buttonDisableSelector)||l(o,i.formDisableSelector)?t(o):l(o,i.formSubmitSelector)?e(o):void 0},n=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(u(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",d),u(t,"ujs:disabled",!0)},r=function(t){var e;return null!=(e=s(t,"ujs:enable-with"))&&(t.innerHTML=e,u(t,"ujs:enable-with",null)),t.removeEventListener("click",d),u(t,"ujs:disabled",null)},e=function(e){return c(e,i.formDisableSelector).forEach(t)},t=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(l(t,"button")?(u(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(u(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,u(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"))&&(l(t,"button")?t.innerHTML=e:t.value=e,u(t,"ujs:enable-with",null)),t.disabled=!1,u(t,"ujs:disabled",null)}}.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)},758:function(t,e,n){"use strict";var a=n(13),o=n(742),i=n(16);e.a=Object(a.connect)((function(t){return{account:t.getIn(["accounts",i.m])}}))(o.a)},812:function(t,e,n){"use strict";n.r(e);var a,o,i,r,c=n(0),s=n(7),l=n(3),u=n.n(l),d=n(572),m=n(758),f=n(13),p=n(19),b=n(6),g=n(12),h=n.n(g),v=n(747),j=n(92),y=n(34),S=n.n(y),C=n(1144),O=n(16),k=n(42),_=n(2),w=n(1),E=n(5),M=n.n(E),D=n(14),x=n.n(D),I=n(316),T=n(18),A=n(23),N=n(302),P=n(145),L=Object(b.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(b.g)((i=o=function(t){function e(){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(w.a)(Object(_.a)(e),"handleLogoutClick",(function(t){return t.preventDefault(),t.stopPropagation(),e.props.onLogout(),!1})),e}return Object(s.a)(e,t),e.prototype.render=function(){var t=this.props,e=t.intl,n=t.columns,a=t.unreadNotifications,o=t.showNotificationsBadge,i=t.onSettingsClick,r=N.b.bind(null,(function(t){return!n||!n.some((function(e){return e.get("id")===t}))}));return Object(c.a)("nav",{className:"drawer--header"},void 0,Object(c.a)(I.a,{"aria-label":e.formatMessage(L.start),title:e.formatMessage(L.start),to:"/getting-started"},void 0,Object(c.a)(A.a,{id:"asterisk"})),r("HOME",Object(c.a)(I.a,{"aria-label":e.formatMessage(L.home_timeline),title:e.formatMessage(L.home_timeline),to:"/timelines/home"},void 0,Object(c.a)(A.a,{id:"home"}))),r("NOTIFICATIONS",Object(c.a)(I.a,{"aria-label":e.formatMessage(L.notifications),title:e.formatMessage(L.notifications),to:"/notifications"},void 0,Object(c.a)("span",{className:"icon-badge-wrapper"},void 0,Object(c.a)(A.a,{id:"bell"}),o&&a>0&&Object(c.a)("div",{className:"icon-badge"})))),r("COMMUNITY",Object(c.a)(I.a,{"aria-label":e.formatMessage(L.community),title:e.formatMessage(L.community),to:"/timelines/public/local"},void 0,Object(c.a)(A.a,{id:"users"}))),r("PUBLIC",Object(c.a)(I.a,{"aria-label":e.formatMessage(L.public),title:e.formatMessage(L.public),to:"/timelines/public"},void 0,Object(c.a)(A.a,{id:"globe"}))),Object(c.a)("a",{"aria-label":e.formatMessage(L.settings),onClick:i,href:"#",title:e.formatMessage(L.settings)},void 0,Object(c.a)(A.a,{id:"cogs"})),Object(c.a)("a",{"aria-label":e.formatMessage(L.logout),onClick:this.handleLogoutClick,href:P.f,title:e.formatMessage(L.logout)},void 0,Object(c.a)(A.a,{id:"sign-out"})))},e}(T.a),Object(w.a)(o,"propTypes",{columns:x.a.list,unreadNotifications:M.a.number,showNotificationsBadge:M.a.bool,intl:M.a.object,onSettingsClick:M.a.func,onLogout:M.a.func.isRequired}),a=i))||a,q=n(60),H=n.n(q),F=Object(b.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(b.g)(Object(f.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(k.d)("SETTINGS",{}))},onLogout:function(){t(Object(k.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=P.f,t.style.display="none",document.body.appendChild(t),i.click()}()}}))}}}))(R));n.d(e,"default",(function(){return G}));var B=Object(b.f)({compose:{id:"navigation_bar.compose",defaultMessage:"Compose new toot"}}),G=Object(f.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(p.ib)())},onUnmount:function(){t(Object(p.qb)())}}}))(r=Object(b.g)(r=function(t){function e(){return t.apply(this,arguments)||this}Object(s.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.isSearchPage||this.props.onMount()},n.componentWillUnmount=function(){this.props.isSearchPage||this.props.onUnmount()},n.render=function(){var t=this.props,e=t.intl,n=t.multiColumn,a=t.isSearchPage,o=t.showSearch,i=h()("drawer","mbstobon");return Object(c.a)("div",{className:i,role:"region","aria-label":e.formatMessage(B.compose)},void 0,n&&Object(c.a)(U,{}),(n||a)&&Object(c.a)(v.a,{}),Object(c.a)("div",{className:"drawer__pager"},void 0,!a&&Object(c.a)("div",{className:"drawer__inner"},void 0,Object(c.a)(m.a,{}),Object(c.a)(d.a,{}),Object(c.a)("div",{className:"drawer__inner__mastodon"},void 0,O.k?Object(c.a)("img",{alt:"",draggable:"false",src:O.k}):Object(c.a)("button",{className:"mastodon"}))),Object(c.a)(j.a,{defaultStyle:{x:a?0:-100},style:{x:S()(o||a?0:-100,{stiffness:210,damping:20})}},void 0,(function(t){var e=t.x;return Object(c.a)("div",{className:"drawer__inner darker",style:{transform:"translateX("+e+"%)",visibility:-100===e?"hidden":"visible"}},void 0,Object(c.a)(C.a,{}))}))))},e}(u.a.PureComponent))||r)||r}}]);
|
|
//# sourceMappingURL=compose.js.map
|