pleroma/priv/static/packs/flavours/glitch/async/compose.js.map
2020-05-20 07:55:14 +02:00

1 line
No EOL
68 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js","webpack:///./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/components/header.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/header_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/log_out.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/index.js"],"names":["messages","defineMessages","missingDescriptionMessage","missingDescriptionConfirm","missingDescriptionEdit","injectIntl","connect","state","spoilersAlwaysOn","getIn","inReplyTo","replyPrivacy","sideArmBasePrivacy","sideArmRestrictedPrivacy","privacyPreference","sideArmPrivacy","advancedOptions","focusDate","caretPosition","isSubmitting","isChangingUpload","isUploading","layout","media","preselectDate","privacy","sideArm","sensitive","showSearch","spoiler","spoilerText","suggestions","text","anyMedia","size","mediaDescriptionConfirmation","preselectOnReply","dispatch","intl","onChange","changeCompose","onSubmit","routerHistory","submitCompose","onClearSuggestions","clearComposeSuggestions","onFetchSuggestions","token","fetchComposeSuggestions","onSuggestionSelected","position","suggestion","path","selectComposeSuggestion","onChangeSpoilerText","changeComposeSpoilerText","onPaste","files","uploadCompose","onPickEmoji","emoji","insertEmojiCompose","onChangeSpoilerness","changeComposeSpoilerness","onChangeVisibility","value","changeComposeVisibility","onMediaDescriptionConfirm","mediaId","overriddenVisibility","openModal","message","formatMessage","confirm","onConfirm","secondary","onSecondary","id","onDoNotAsk","changeLocalSetting","ComposeForm","this","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","call","nonce","loadCSPNonce","ref","document","querySelector","content","cspNonce","m","Element","prototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","element","getData","key","setData","$","Array","slice","querySelectorAll","csrfParam","csrfToken","meta","CSRFProtection","xhr","setRequestHeader","refreshCSRFTokens","param","forEach","input","CustomEvent","fire","preventDefault","window","event","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","result","defaultPrevented","Object","defineProperty","get","obj","name","data","dispatchEvent","stopEverything","e","target","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","html","xml","json","script","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","error","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","url","location","href","type","toUpperCase","indexOf","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","match","JSON","parse","createElement","setAttribute","head","appendChild","removeChild","DOMParser","replace","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","push","checked","map","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","answer","callback","getAttribute","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","isXhrRedirect","handleDisabledElement","enableElement","disableElement","replacement","innerHTML","originalText","removeEventListener","handleMethod","formContent","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","args","arguments","length","formSubmitButtonClick","formNoValidate","preventInsignificantClick","insignificantMetaClick","metaKey","ctrlKey","jQuery","rails","Error","ajaxPrefilter","originalOptions","start","_rails_loaded","setTimeout","module","exports","account","me","NavigationBar","community","home_timeline","logout","notifications","public","settings","Header","props","onLogout","render","columns","unreadNotifications","showNotificationsBadge","onSettingsClick","renderForColumn","conditionalRender","bind","columnId","some","column","className","Link","aria-label","title","to","onClick","handleLogoutClick","signOutLink","ImmutablePureComponent","ImmutablePropTypes","list","PropTypes","number","bool","object","func","isRequired","logoutMessage","logoutConfirm","methodInput","csrfInput","submitButton","logOut","compose","Compose","ownProps","multiColumn","isSearchPage","onMount","mountCompose","onUnmount","unmountCompose","componentDidMount","componentWillUnmount","computedClass","classNames","role","mascot","alt","draggable","src","defaultStyle","x","spring","stiffness","damping","transform","visibility","React","PureComponent"],"mappings":"2FAAA,8DAsBMA,EAAWC,YAAe,CAC9BC,0BAA0B,CAAD,6NAEzBC,0BAA0B,CAAD,mFAEzBC,uBAAuB,CAAD,iFA2GTC,gBAAWC,mBAtG1B,SAA0BC,GACxB,IAAMC,EAAmBD,EAAME,MAAM,CAAC,iBAAkB,+BAClDC,EAAYH,EAAME,MAAM,CAAC,UAAW,gBACpCE,EAAeD,EAAYH,EAAME,MAAM,CAAC,WAAYC,EAAW,eAAiB,KAChFE,EAAqBL,EAAME,MAAM,CAAC,iBAAkB,aACpDI,EAA2BF,EAAeG,YAAkBH,EAAcC,GAAsB,KAClGG,EAAiB,KACrB,OAAQR,EAAME,MAAM,CAAC,iBAAkB,yBACrC,IAAK,OACHM,EAAiBJ,EACjB,MACF,IAAK,WACHI,EAAiBF,EAIrB,OADAE,EAAiBA,GAAkBH,EAC5B,CACLI,gBAAiBT,EAAME,MAAM,CAAC,UAAW,qBACzCQ,UAAWV,EAAME,MAAM,CAAC,UAAW,cACnCS,cAAeX,EAAME,MAAM,CAAC,UAAW,kBACvCU,aAAcZ,EAAME,MAAM,CAAC,UAAW,kBACtCW,iBAAkBb,EAAME,MAAM,CAAC,UAAW,uBAC1CY,YAAad,EAAME,MAAM,CAAC,UAAW,iBACrCa,OAAQf,EAAME,MAAM,CAAC,iBAAkB,WACvCc,MAAOhB,EAAME,MAAM,CAAC,UAAW,sBA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cAGNhQ,KAAKwN,MAAMyC,W,EAIfK,qBAAA,WAC2BtQ,KAAKwN,MAAtBwC,cAGNhQ,KAAKwN,MAAM2C,a,EAIfzC,OAAA,WAAW,IAAD,EAMJ1N,KAAKwN,MAJPnQ,EAFM,EAENA,KACA0S,EAHM,EAGNA,YACAC,EAJM,EAINA,aACArT,EALM,EAKNA,WAEI4T,EAAgBC,IAAW,SAAU,YAE3C,OACE,mBAAKnC,UAAWkC,EAAeE,KAAK,SAASlC,aAAYlR,EAAKkC,cAAcxE,EAAS6U,eAArF,EACGG,GAAe,YAAC,EAAD,KAEdA,GAAeC,IAAiB,YAAC,IAAD,IAElC,mBAAK3B,UAAU,sBAAf,GACI2B,GAAgB,mBAAK3B,UAAU,sBAAf,EAChB,YAAC,IAAD,IAEA,YAAC,IAAD,IAEA,mBAAKA,UAAU,gCAAf,EACGqC,IAAS,mBAAKC,IAAI,GAAGC,UAAU,QAAQC,IAAKH,MAAa,sBAAQrC,UAAU,eAIhF,YAAC,IAAD,CAAQyC,aAAc,CAAEC,EAAGf,EAAe,GAAK,KAAO/E,MAAO,CAAE8F,EAAGC,IAAOrU,GAAcqT,EAAe,GAAK,IAAK,CAAEiB,UAAW,IAAKC,QAAS,YAA3I,GACG,gBAAGH,EAAH,EAAGA,EAAH,OACC,mBAAK1C,UAAU,uBAAuBpD,MAAO,CAAEkG,UAAU,cAAeJ,EAAhB,KAAuBK,YAAmB,MAAPL,EAAa,SAAW,iBAAnH,EACE,YAAC,IAAD,Y,GAvDMM,IAAMC,iB","file":"flavours/glitch/async/compose.js","sourcesContent":["import { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ComposeForm from '../components/compose_form';\nimport {\n changeCompose,\n changeComposeSpoilerText,\n changeComposeSpoilerness,\n changeComposeVisibility,\n clearComposeSuggestions,\n fetchComposeSuggestions,\n insertEmojiCompose,\n selectComposeSuggestion,\n submitCompose,\n uploadCompose,\n} from 'flavours/glitch/actions/compose';\nimport {\n openModal,\n} from 'flavours/glitch/actions/modal';\nimport { changeLocalSetting } from 'flavours/glitch/actions/local_settings';\n\nimport { privacyPreference } from 'flavours/glitch/util/privacy_preference';\n\nconst messages = defineMessages({\n missingDescriptionMessage: { id: 'confirmations.missing_media_description.message',\n defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' },\n missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm',\n defaultMessage: 'Send anyway' },\n missingDescriptionEdit: { id: 'confirmations.missing_media_description.edit',\n defaultMessage: 'Edit media' },\n});\n\n// State mapping.\nfunction mapStateToProps (state) {\n const spoilersAlwaysOn = state.getIn(['local_settings', 'always_show_spoilers_field']);\n const inReplyTo = state.getIn(['compose', 'in_reply_to']);\n const replyPrivacy = inReplyTo ? state.getIn(['statuses', inReplyTo, 'visibility']) : null;\n const sideArmBasePrivacy = state.getIn(['local_settings', 'side_arm']);\n const sideArmRestrictedPrivacy = replyPrivacy ? privacyPreference(replyPrivacy, sideArmBasePrivacy) : null;\n let sideArmPrivacy = null;\n switch (state.getIn(['local_settings', 'side_arm_reply_mode'])) {\n case 'copy':\n sideArmPrivacy = replyPrivacy;\n break;\n case 'restrict':\n sideArmPrivacy = sideArmRestrictedPrivacy;\n break;\n }\n sideArmPrivacy = sideArmPrivacy || sideArmBasePrivacy;\n return {\n advancedOptions: state.getIn(['compose', 'advanced_options']),\n focusDate: state.getIn(['compose', 'focusDate']),\n caretPosition: state.getIn(['compose', 'caretPosition']),\n isSubmitting: state.getIn(['compose', 'is_submitting']),\n isChangingUpload: state.getIn(['compose', 'is_changing_upload']),\n isUploading: state.getIn(['compose', 'is_uploading']),\n layout: state.getIn(['local_settings', 'layout']),\n media: state.getIn(['compose', 'media_attachments']),\n preselectDate: state.getIn(['compose', 'preselectDate']),\n privacy: state.getIn(['compose', 'privacy']),\n sideArm: sideArmPrivacy,\n sensitive: state.getIn(['compose', 'sensitive']),\n showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),\n spoiler: spoilersAlwaysOn || state.getIn(['compose', 'spoiler']),\n spoilerText: state.getIn(['compose', 'spoiler_text']),\n suggestions: state.getIn(['compose', 'suggestions']),\n text: state.getIn(['compose', 'text']),\n anyMedia: state.getIn(['compose', 'media_attachments']).size > 0,\n spoilersAlwaysOn: spoilersAlwaysOn,\n mediaDescriptionConfirmation: state.getIn(['local_settings', 'confirm_missing_media_description']),\n preselectOnReply: state.getIn(['local_settings', 'preselect_on_reply']),\n };\n};\n\n// Dispatch mapping.\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n\n onChange(text) {\n dispatch(changeCompose(text));\n },\n\n onSubmit(routerHistory) {\n dispatch(submitCompose(routerHistory));\n },\n\n onClearSuggestions() {\n dispatch(clearComposeSuggestions());\n },\n\n onFetchSuggestions(token) {\n dispatch(fetchComposeSuggestions(token));\n },\n\n onSuggestionSelected(position, token, suggestion, path) {\n dispatch(selectComposeSuggestion(position, token, suggestion, path));\n },\n\n onChangeSpoilerText(text) {\n dispatch(changeComposeSpoilerText(text));\n },\n\n onPaste(files) {\n dispatch(uploadCompose(files));\n },\n\n onPickEmoji(position, emoji) {\n dispatch(insertEmojiCompose(position, emoji));\n },\n\n onChangeSpoilerness() {\n dispatch(changeComposeSpoilerness());\n },\n\n onChangeVisibility(value) {\n dispatch(changeComposeVisibility(value));\n },\n\n onMediaDescriptionConfirm(routerHistory, mediaId, overriddenVisibility = null) {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.missingDescriptionMessage),\n confirm: intl.formatMessage(messages.missingDescriptionConfirm),\n onConfirm: () => {\n if (overriddenVisibility) {\n dispatch(changeComposeVisibility(overriddenVisibility));\n };\n dispatch(submitCompose(routerHistory));\n },\n secondary: intl.formatMessage(messages.missingDescriptionEdit),\n onSecondary: () => dispatch(openModal('FOCAL_POINT', { id: mediaId })),\n onDoNotAsk: () => dispatch(changeLocalSetting(['confirm_missing_media_description'], false)),\n }));\n },\n\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ComposeForm));\n","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/master/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n var context = this;\n (function () {\n (function () {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n 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])',\n 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',\n 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',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n }).call(this);\n }).call(context);\n var Rails = context.Rails;\n (function () {\n (function () {\n var nonce;\n nonce = null;\n\n Rails.loadCSPNonce = function () {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function () {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n }).call(this);\n (function () {\n var expando, m;\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function (element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function (element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function (element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n\n return element[expando][key] = value;\n };\n\n Rails.$ = function (selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n }).call(this);\n (function () {\n var $, csrfParam, csrfToken;\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function (xhr) {\n var token;\n token = csrfToken();\n\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function () {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n\n if (token != null && param != null) {\n return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n return input.value = token;\n });\n }\n };\n }).call(this);\n (function () {\n var CustomEvent, fire, matches, preventDefault;\n matches = Rails.matches;\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function CustomEvent(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n\n CustomEvent.prototype.preventDefault = function () {\n var result;\n result = preventDefault.call(this);\n\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n }\n\n return result;\n };\n }\n\n fire = Rails.fire = function (obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function (e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function (element, selector, eventType, handler) {\n return element.addEventListener(eventType, function (e) {\n var target;\n target = e.target;\n\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n }).call(this);\n (function () {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function (options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function () {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n\n if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n return false;\n }\n\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function prepareOptions(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n\n options.accept = AcceptHeaders[options.dataType];\n\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n\n return options;\n };\n\n createXHR = function createXHR(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n\n CSRFProtection(xhr);\n xhr.withCredentials = !!options.withCredentials;\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n\n return xhr;\n };\n\n processResponse = function processResponse(response, type) {\n var parser, script;\n\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n\n return response;\n };\n\n Rails.href = function (element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function (url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n } catch (error) {\n e = error;\n return true;\n }\n };\n }).call(this);\n (function () {\n var matches, toArray;\n matches = Rails.matches;\n\n toArray = function toArray(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function (element, additionalParam) {\n var inputs, params;\n inputs = [element];\n\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n\n params = [];\n inputs.forEach(function (input) {\n if (!input.name || input.disabled) {\n return;\n }\n\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function (option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n\n if (additionalParam) {\n params.push(additionalParam);\n }\n\n return params.map(function (param) {\n if (param.name != null) {\n return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function (form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function (el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n }).call(this);\n (function () {\n var allowAction, fire, stopEverything;\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function (e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function (message, element) {\n return confirm(message);\n };\n\n allowAction = function allowAction(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n\n if (!message) {\n return true;\n }\n\n answer = false;\n\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n\n callback = fire(element, 'confirm:complete', [answer]);\n }\n\n return answer && callback;\n };\n }).call(this);\n (function () {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function (e) {\n var element;\n element = this;\n\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function (e) {\n var element;\n\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n\n element = e.target;\n } else {\n element = e;\n }\n\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function disableLinkElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function enableLinkElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function disableFormElements(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function disableFormElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function enableFormElements(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function enableFormElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n\n setData(element, 'ujs:enable-with', null);\n }\n\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function isXhrRedirect(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n }).call(this);\n (function () {\n var stopEverything;\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function (e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n\n if (!method) {\n return;\n }\n\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n\n if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n }\n\n formContent += '<input type=\"submit\" />';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n }).call(this);\n (function () {\n var ajax,\n fire,\n getData,\n isCrossDomain,\n isRemote,\n matches,\n serializeElement,\n setData,\n stopEverything,\n slice = [].slice;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function isRemote(element) {\n var value;\n value = element.getAttribute('data-remote');\n return value != null && value !== 'false';\n };\n\n Rails.handleRemote = function (e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n\n if (!isRemote(element)) {\n return true;\n }\n\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function beforeSend(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function success() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function error() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function complete() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function (e) {\n var button, form;\n button = this;\n form = button.form;\n\n if (!form) {\n return;\n }\n\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function (e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n }).call(this);\n (function () {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function () {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n\n window.addEventListener('pageshow', function () {\n $(Rails.formEnableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n return setTimeout(function () {\n return disableElement(e);\n }, 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n }).call(this);\n }).call(this);\n\n if (typeof module === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);","import { connect } from 'react-redux';\nimport NavigationBar from '../components/navigation_bar';\nimport { me } from 'flavours/glitch/util/initial_state';\n\nconst mapStateToProps = state => {\n return {\n account: state.getIn(['accounts', me]),\n };\n};\n\nexport default connect(mapStateToProps)(NavigationBar);\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\n// Components.\nimport Icon from 'flavours/glitch/components/icon';\n\n// Utils.\nimport { conditionalRender } from 'flavours/glitch/util/react_helpers';\nimport { signOutLink } from 'flavours/glitch/util/backend_links';\n\n// Messages.\nconst messages = defineMessages({\n community: {\n defaultMessage: 'Local timeline',\n id: 'navigation_bar.community_timeline',\n },\n home_timeline: {\n defaultMessage: 'Home',\n id: 'tabs_bar.home',\n },\n logout: {\n defaultMessage: 'Logout',\n id: 'navigation_bar.logout',\n },\n notifications: {\n defaultMessage: 'Notifications',\n id: 'tabs_bar.notifications',\n },\n public: {\n defaultMessage: 'Federated timeline',\n id: 'navigation_bar.public_timeline',\n },\n settings: {\n defaultMessage: 'App settings',\n id: 'navigation_bar.app_settings',\n },\n start: {\n defaultMessage: 'Getting started',\n id: 'getting_started.heading',\n },\n});\n\nexport default @injectIntl\nclass Header extends ImmutablePureComponent {\n static propTypes = {\n columns: ImmutablePropTypes.list,\n unreadNotifications: PropTypes.number,\n showNotificationsBadge: PropTypes.bool,\n intl: PropTypes.object,\n onSettingsClick: PropTypes.func,\n onLogout: PropTypes.func.isRequired,\n };\n\n handleLogoutClick = e => {\n e.preventDefault();\n e.stopPropagation();\n\n this.props.onLogout();\n\n return false;\n }\n\n render () {\n const { intl, columns, unreadNotifications, showNotificationsBadge, onSettingsClick } = this.props;\n\n // Only renders the component if the column isn't being shown.\n const renderForColumn = conditionalRender.bind(null,\n columnId => !columns || !columns.some(\n column => column.get('id') === columnId\n )\n );\n\n // The result.\n return (\n <nav className='drawer--header'>\n <Link\n aria-label={intl.formatMessage(messages.start)}\n title={intl.formatMessage(messages.start)}\n to='/getting-started'\n ><Icon id='asterisk' /></Link>\n {renderForColumn('HOME', (\n <Link\n aria-label={intl.formatMessage(messages.home_timeline)}\n title={intl.formatMessage(messages.home_timeline)}\n to='/timelines/home'\n ><Icon id='home' /></Link>\n ))}\n {renderForColumn('NOTIFICATIONS', (\n <Link\n aria-label={intl.formatMessage(messages.notifications)}\n title={intl.formatMessage(messages.notifications)}\n to='/notifications'\n >\n <span className='icon-badge-wrapper'>\n <Icon id='bell' />\n { showNotificationsBadge && unreadNotifications > 0 && <div className='icon-badge' />}\n </span>\n </Link>\n ))}\n {renderForColumn('COMMUNITY', (\n <Link\n aria-label={intl.formatMessage(messages.community)}\n title={intl.formatMessage(messages.community)}\n to='/timelines/public/local'\n ><Icon id='users' /></Link>\n ))}\n {renderForColumn('PUBLIC', (\n <Link\n aria-label={intl.formatMessage(messages.public)}\n title={intl.formatMessage(messages.public)}\n to='/timelines/public'\n ><Icon id='globe' /></Link>\n ))}\n <a\n aria-label={intl.formatMessage(messages.settings)}\n onClick={onSettingsClick}\n href='#'\n title={intl.formatMessage(messages.settings)}\n ><Icon id='cogs' /></a>\n <a\n aria-label={intl.formatMessage(messages.logout)}\n onClick={this.handleLogoutClick}\n href={ signOutLink }\n title={intl.formatMessage(messages.logout)}\n ><Icon id='sign-out' /></a>\n </nav>\n );\n };\n}\n","import { openModal } from 'flavours/glitch/actions/modal';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport Header from '../components/header';\nimport { logOut } from 'flavours/glitch/util/log_out';\n\nconst messages = defineMessages({\n logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },\n logoutConfirm: { id: 'confirmations.logout.confirm', defaultMessage: 'Log out' },\n});\n\nconst mapStateToProps = state => {\n return {\n columns: state.getIn(['settings', 'columns']),\n unreadNotifications: state.getIn(['notifications', 'unread']),\n showNotificationsBadge: state.getIn(['local_settings', 'notifications', 'tab_badge']),\n };\n};\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onSettingsClick (e) {\n e.preventDefault();\n e.stopPropagation();\n dispatch(openModal('SETTINGS', {}));\n },\n onLogout () {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.logoutMessage),\n confirm: intl.formatMessage(messages.logoutConfirm),\n onConfirm: () => logOut(),\n }));\n },\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Header));\n","import Rails from '@rails/ujs';\nimport { signOutLink } from 'flavours/glitch/util/backend_links';\n\nexport const logOut = () => {\n const form = document.createElement('form');\n\n const methodInput = document.createElement('input');\n methodInput.setAttribute('name', '_method');\n methodInput.setAttribute('value', 'delete');\n methodInput.setAttribute('type', 'hidden');\n form.appendChild(methodInput);\n\n const csrfToken = Rails.csrfToken();\n const csrfParam = Rails.csrfParam();\n\n if (csrfParam && csrfToken) {\n const csrfInput = document.createElement('input');\n csrfInput.setAttribute('name', csrfParam);\n csrfInput.setAttribute('value', csrfToken);\n csrfInput.setAttribute('type', 'hidden');\n form.appendChild(csrfInput);\n }\n\n const submitButton = document.createElement('input');\n submitButton.setAttribute('type', 'submit');\n form.appendChild(submitButton);\n\n form.method = 'post';\n form.action = signOutLink;\n form.style.display = 'none';\n\n document.body.appendChild(form);\n submitButton.click();\n};\n","import React from 'react';\nimport ComposeFormContainer from './containers/compose_form_container';\nimport NavigationContainer from './containers/navigation_container';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\nimport { mountCompose, unmountCompose } from 'flavours/glitch/actions/compose';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport classNames from 'classnames';\nimport SearchContainer from './containers/search_container';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport SearchResultsContainer from './containers/search_results_container';\nimport { me, mascot } from 'flavours/glitch/util/initial_state';\nimport HeaderContainer from './containers/header_container';\n\nconst messages = defineMessages({\n compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new toot' },\n});\n\nconst mapStateToProps = (state, ownProps) => ({\n showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : ownProps.isSearchPage,\n});\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onMount () {\n dispatch(mountCompose());\n },\n\n onUnmount () {\n dispatch(unmountCompose());\n },\n});\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass Compose extends React.PureComponent {\n static propTypes = {\n multiColumn: PropTypes.bool,\n showSearch: PropTypes.bool,\n isSearchPage: PropTypes.bool,\n onMount: PropTypes.func,\n onUnmount: PropTypes.func,\n intl: PropTypes.object.isRequired,\n };\n\n componentDidMount () {\n const { isSearchPage } = this.props;\n\n if (!isSearchPage) {\n this.props.onMount();\n }\n }\n\n componentWillUnmount () {\n const { isSearchPage } = this.props;\n\n if (!isSearchPage) {\n this.props.onUnmount();\n }\n }\n\n render () {\n const {\n intl,\n multiColumn,\n isSearchPage,\n showSearch,\n } = this.props;\n const computedClass = classNames('drawer', 'mbstobon');\n\n return (\n <div className={computedClass} role='region' aria-label={intl.formatMessage(messages.compose)}>\n {multiColumn && <HeaderContainer />}\n\n {(multiColumn || isSearchPage) && <SearchContainer />}\n\n <div className='drawer__pager'>\n {!isSearchPage && <div className='drawer__inner'>\n <NavigationContainer />\n\n <ComposeFormContainer />\n\n <div className='drawer__inner__mastodon'>\n {mascot ? <img alt='' draggable='false' src={mascot} /> : <button className='mastodon' />}\n </div>\n </div>}\n\n <Motion defaultStyle={{ x: isSearchPage ? 0 : -100 }} style={{ x: spring(showSearch || isSearchPage ? 0 : -100, { stiffness: 210, damping: 20 }) }}>\n {({ x }) => (\n <div className='drawer__inner darker' style={{ transform: `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}>\n <SearchResultsContainer />\n </div>\n )}\n </Motion>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}