compose.js.map 139 KB
Newer Older
Haelwenn's avatar
Haelwenn committed
1
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/autosuggest_emoji.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/reply_indicator.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/reply_indicator_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/autosuggest_account.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/autosuggest_account_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/autosuggest_hashtag.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/autosuggest_textarea.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/components/autosuggest_input.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/poll_button.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/poll_button_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/upload_button.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/upload_button_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/text_icon_button.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/spoiler_button_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/privacy_dropdown.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/privacy_dropdown_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/poll_form.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/poll_form_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/upload_progress_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/upload.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/upload_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/sensitive_button_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/upload_form.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/upload_form_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/warning.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/warning_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/components/compose_form.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/compose_form_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/containers/navigation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/compose/index.js"],"names":["assetHost","process","env","CDN_HOST","AutosuggestEmoji","render","url","emoji","this","props","custom","imageUrl","mapping","unicodeMapping","native","replace","filename","className","src","alt","colons","React","PureComponent","EmojiPicker","Emoji","messages","defineMessages","emoji_search","emoji_not_found","recent","search_results","people","nature","food","activity","travel","objects","symbols","flags","backgroundImageFn","listenerOptions","detectPassiveEvents","hasSupport","passive","ModifierPickerMenu","e","onSelect","currentTarget","getAttribute","node","contains","target","onClose","c","componentWillReceiveProps","nextProps","active","attachListeners","removeListeners","componentWillUnmount","document","addEventListener","handleDocumentClick","removeEventListener","style","display","ref","setRef","onClick","handleClick","data-index","set","size","sheetSize","skin","ModifierPicker","onOpen","modifier","onChange","handleSelect","EmojiPickerMenu","injectIntl","modifierOpen","placement","intl","search","formatMessage","notfound","categories","foods","places","onPick","setState","onSkinTone","componentDidMount","loading","custom_emojis","skinTone","frequentlyUsedEmojis","width","title","state","categoriesSort","splice","Array","from","categoriesFromEmojis","sort","classNames","selecting","perLine","emojiSize","buildCustomEmojis","color","i18n","getI18n","include","showPreview","autoFocus","emojiTooltip","handleModifierOpen","handleModifierClose","handleModifierChange","EmojiPickerDropdown","dropdown","EmojiPickerAsync","then","EmojiMart","Picker","catch","top","getBoundingClientRect","innerHeight","key","onHideDropdown","onShowDropdown","onPickEmoji","onKeyDown","handleKeyDown","setTargetRef","aria-label","aria-expanded","role","onToggle","tabIndex","show","findTarget","cancel","ReplyIndicator","onCancel","button","ctrlKey","metaKey","preventDefault","context","router","history","push","status","getIn","content","__html","get","direction","isRtl","icon","inverted","href","handleAccountClick","account","dangerouslySetInnerHTML","compact","media","ImmutablePureComponent","PropTypes","object","ImmutablePropTypes","map","func","isRequired","connect","getStatus","makeGetStatus","id","dispatch","cancelReplyCompose","AutosuggestAccount","getAccount","makeGetAccount","AutosuggestHashtag","tag","weeklyUses","shortNumberFormat","reduce","total","day","uses","name","undefined","defaultMessage","values","count","textAtCursorMatchesToken","str","caretPosition","word","left","slice","right","trim","length","indexOf","toLowerCase","AutosuggestTextarea","suggestionsHidden","focused","selectedSuggestion","lastToken","tokenStart","value","selectionStart","token","onSuggestionsFetchRequested","onSuggestionsClearRequested","suggestions","disabled","which","isComposing","querySelector","parentElement","focus","Math","min","max","stopPropagation","onSuggestionSelected","defaultPrevented","onFocus","suggestion","textarea","clipboardData","files","onPaste","i","inner","type","selected","onMouseDown","onSuggestionClick","placeholder","onKeyUp","children","inputRef","setTextarea","onBlur","aria-autocomplete","isEmpty","renderSuggestion","string","list","bool","searchTokens","AutosuggestInput","input","maxLength","setInput","arrayOf","number","ImmutableList","add_poll","remove_poll","iconStyle","height","lineHeight","PollButton","unavailable","_","getState","removePoll","addPoll","upload","UploadButton","acceptContentTypes","onSelectFile","fileElement","click","resetFileKey","formats","multiple","handleChange","listOf","some","m","includes","uploadCompose","TextIconButton","label","ariaControls","aria-controls","marked","unmarked","changeComposeSpoilerness","public_short","public_long","unlisted_short","unlisted_long","private_short","private_long","direct_short","direct_long","change_privacy","PrivacyDropdownMenu","mounted","element","items","index","findIndex","item","childNodes","shiftKey","lastChild","firstChild","focusedItem","defaultStyle","opacity","scaleX","scaleY","spring","damping","stiffness","transform","zIndex","aria-selected","setFocusRef","fixedWidth","text","meta","PrivacyDropdown","open","isUserTouching","onModalClose","onModalOpen","actions","options","option","handleModalActionClick","activeElement","handleClose","handleMouseDown","componentWillMount","valueOption","find","expanded","handleToggle","handleButtonKeyDown","isModalOpen","modalType","changeComposeVisibility","openModal","closeModal","DEFAULTS","getFrequentlyUsedEmojis","createSelector","ImmutableMap","emojiCounters","emojis","keySeq","a","b","reverse","toArray","uniqueDefaults","filter","concat","getCustomEmojis","aShort","bShort","changeSetting","useEmoji","option_placeholder","add_option","remove_option","poll_duration","minutes","hours","days","Option","onRemove","onToggleMultiple","onClearSuggestions","onFetchSuggestions","isPollMultiple","checkbox","handleToggleMultiple","handleOptionTitleChange","handleOptionRemove","PollForm","onAddOption","onChangeSettings","isMultiple","expiresIn","onChangeOption","onRemoveOption","other","handleAddOption","handleSelectDuration","addPollOption","removePollOption","changePollOption","changePollSettings","clearComposeSuggestions","fetchComposeSuggestions","position","accountId","path","selectComposeSuggestion","progress","UploadProgress","Upload","onUndo","onOpenFocalPoint","focusX","focusY","x","y","scale","backgroundImage","backgroundPosition","handleUndoClick","handleFocalPointClick","undoUploadCompose","onSubmit","submitCompose","SensitiveButton","checked","changeComposeSensitivity","UploadForm","mediaIds","message","Warning","APPROX_HASHTAG_RE","needsLockWarning","me","hashtagWarning","test","directMessageWarning","locked","allowedAroundShortCode","spoiler_placeholder","publish","publishLoud","ComposeForm","keyCode","handleSubmit","autosuggestTextarea","isSubmitting","isChangingUpload","isUploading","anyMedia","fulltext","spoilerText","join","maxChars","onChangeSpoilerText","composeForm","singleColumn","window","innerWidth","documentElement","clientWidth","scrollIntoView","data","needsSpace","componentDidUpdate","prevProps","selectionEnd","focusDate","preselectDate","setSelectionRange","spoiler","showSearch","disabledButton","publishText","privacy","handleChangeSpoilerText","setSpoilerText","onSpoilerSuggestionSelected","setAutosuggestTextarea","handleFocus","isMobile","handleEmojiPick","block","instanceOf","Date","changeCompose","changeComposeSpoilerText","insertEmojiCompose","logoutMessage","logoutConfirm","onLogout","confirm","onConfirm","logOut","NavigationBar","start","home_timeline","notifications","public","community","preferences","logout","compose","Compose","ownProps","columns","multiColumn","isSearchPage","changeComposing","mountCompose","unmountCompose","header","to","column","handleLogoutClick","draggable","mascot","elephantUIPlane","visibility"],"mappings":"2LAIMA,EAAYC,EAAQC,IAAIC,UAAY,GAErBC,E,kGAMnBC,OAAA,WAAW,IAELC,EADIC,EAAUC,KAAKC,MAAfF,MAGR,GAAIA,EAAMG,OACRJ,EAAMC,EAAMI,aACP,CACL,IAAMC,EAAUC,IAAeN,EAAMO,SAAWD,IAAeN,EAAMO,OAAOC,QAAQ,UA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K7O,UAAU,gCAAf,EACE,mBAAKE,IAAI,GAAGyf,UAAU,QAAQ1f,IAAK2f,KAAUC,oBAIjD,YAAC,IAAD,CAAQ3M,aAAc,CAAEoG,EAAG6F,EAAe,GAAK,KAAOpc,MAAO,CAAEuW,EAAGhG,IAAOyJ,GAAcoC,EAAe,GAAK,IAAK,CAAE3L,UAAW,IAAKD,QAAS,YAA3I,EACG,gBAAG+F,EAAH,EAAGA,EAAH,OACC,mBAAKtZ,UAAU,uBAAuB+C,MAAO,CAAE0Q,UAAU,cAAe6F,EAAhB,KAAuBwG,YAAmB,MAAPxG,EAAa,SAAW,iBAAnH,EACE,YAAC,IAAD,U,GAlGMlZ,IAAMC,iB","file":"features/compose.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';\n\nconst assetHost = process.env.CDN_HOST || '';\n\nexport default class AutosuggestEmoji extends React.PureComponent {\n\n  static propTypes = {\n    emoji: PropTypes.object.isRequired,\n  };\n\n  render () {\n    const { emoji } = this.props;\n    let url;\n\n    if (emoji.custom) {\n      url = emoji.imageUrl;\n    } else {\n      const mapping = unicodeMapping[emoji.native] || unicodeMapping[emoji.native.replace(/\\uFE0F$/, '')];\n\n      if (!mapping) {\n        return null;\n      }\n\n      url = `${assetHost}/emoji/${mapping.filename}.svg`;\n    }\n\n    return (\n      <div className='autosuggest-emoji'>\n        <img\n          className='emojione'\n          src={url}\n          alt={emoji.native || emoji.colons}\n        />\n\n        {emoji.colons}\n      </div>\n    );\n  }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';\nimport Overlay from 'react-overlays/lib/Overlay';\nimport classNames from 'classnames';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport detectPassiveEvents from 'detect-passive-events';\nimport { buildCustomEmojis, categoriesFromEmojis } from '../../emoji/emoji';\n\nconst messages = defineMessages({\n  emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },\n  emoji_search: { id: 'emoji_button.search', defaultMessage: 'Search...' },\n  emoji_not_found: { id: 'emoji_button.not_found', defaultMessage: 'No emojos!! (╯°□°)╯︵ ┻━┻' },\n  custom: { id: 'emoji_button.custom', defaultMessage: 'Custom' },\n  recent: { id: 'emoji_button.recent', defaultMessage: 'Frequently used' },\n  search_results: { id: 'emoji_button.search_results', defaultMessage: 'Search results' },\n  people: { id: 'emoji_button.people', defaultMessage: 'People' },\n  nature: { id: 'emoji_button.nature', defaultMessage: 'Nature' },\n  food: { id: 'emoji_button.food', defaultMessage: 'Food & Drink' },\n  activity: { id: 'emoji_button.activity', defaultMessage: 'Activity' },\n  travel: { id: 'emoji_button.travel', defaultMessage: 'Travel & Places' },\n  objects: { id: 'emoji_button.objects', defaultMessage: 'Objects' },\n  symbols: { id: 'emoji_button.symbols', defaultMessage: 'Symbols' },\n  flags: { id: 'emoji_button.flags', defaultMessage: 'Flags' },\n});\n\nconst assetHost = process.env.CDN_HOST || '';\nlet EmojiPicker, Emoji; // load asynchronously\n\nconst backgroundImageFn = () => `${assetHost}/emoji/sheet_10.png`;\nconst listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nclass ModifierPickerMenu extends React.PureComponent {\n\n  static propTypes = {\n    active: PropTypes.bool,\n    onSelect: PropTypes.func.isRequired,\n    onClose: PropTypes.func.isRequired,\n  };\n\n  handleClick = e => {\n    this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);\n  }\n\n  componentWillReceiveProps (nextProps) {\n    if (nextProps.active) {\n      this.attachListeners();\n    } else {\n      this.removeListeners();\n    }\n  }\n\n  componentWillUnmount () {\n    this.removeListeners();\n  }\n\n  handleDocumentClick = e => {\n    if (this.node && !this.node.contains(e.target)) {\n      this.props.onClose();\n    }\n  }\n\n  attachListeners () {\n    document.addEventListener('click', this.handleDocumentClick, false);\n    document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  removeListeners () {\n    document.removeEventListener('click', this.handleDocumentClick, false);\n    document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  render () {\n    const { active } = this.props;\n\n    return (\n      <div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>\n        <button onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} /></button>\n        <button onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} /></button>\n        <button onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} /></button>\n        <button onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} /></button>\n        <button onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} /></button>\n        <button onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} /></button>\n      </div>\n    );\n  }\n\n}\n\nclass ModifierPicker extends React.PureComponent {\n\n  static propTypes = {\n    active: PropTypes.bool,\n    modifier: PropTypes.number,\n    onChange: PropTypes.func,\n    onClose: PropTypes.func,\n    onOpen: PropTypes.func,\n  };\n\n  handleClick = () => {\n    if (this.props.active) {\n      this.props.onClose();\n    } else {\n      this.props.onOpen();\n    }\n  }\n\n  handleSelect = modifier => {\n    this.props.onChange(modifier);\n    this.props.onClose();\n  }\n\n  render () {\n    const { active, modifier } = this.props;\n\n    return (\n      <div className='emoji-picker-dropdown__modifiers'>\n        <Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} />\n        <ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />\n      </div>\n    );\n  }\n\n}\n\n@injectIntl\nclass EmojiPickerMenu extends React.PureComponent {\n\n  static propTypes = {\n    custom_emojis: ImmutablePropTypes.list,\n    frequentlyUsedEmojis: PropTypes.arrayOf(PropTypes.string),\n    loading: PropTypes.bool,\n    onClose: PropTypes.func.isRequired,\n    onPick: PropTypes.func.isRequired,\n    style: PropTypes.object,\n    placement: PropTypes.string,\n    arrowOffsetLeft: PropTypes.string,\n    arrowOffsetTop: PropTypes.string,\n    intl: PropTypes.object.isRequired,\n    skinTone: PropTypes.number.isRequired,\n    onSkinTone: PropTypes.func.isRequired,\n  };\n\n  static defaultProps = {\n    style: {},\n    loading: true,\n    frequentlyUsedEmojis: [],\n  };\n\n  state = {\n    modifierOpen: false,\n    placement: null,\n  };\n\n  handleDocumentClick = e => {\n    if (this.node && !this.node.contains(e.target)) {\n      this.props.onClose();\n    }\n  }\n\n  componentDidMount () {\n    document.addEventListener('click', this.handleDocumentClick, false);\n    document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  componentWillUnmount () {\n    document.removeEventListener('click', this.handleDocumentClick, false);\n    document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  getI18n = () => {\n    const { intl } = this.props;\n\n    return {\n      search: intl.formatMessage(messages.emoji_search),\n      notfound: intl.formatMessage(messages.emoji_not_found),\n      categories: {\n        search: intl.formatMessage(messages.search_results),\n        recent: intl.formatMessage(messages.recent),\n        people: intl.formatMessage(messages.people),\n        nature: intl.formatMessage(messages.nature),\n        foods: intl.formatMessage(messages.food),\n        activity: intl.formatMessage(messages.activity),\n        places: intl.formatMessage(messages.travel),\n        objects: intl.formatMessage(messages.objects),\n        symbols: intl.formatMessage(messages.symbols),\n        flags: intl.formatMessage(messages.flags),\n        custom: intl.formatMessage(messages.custom),\n      },\n    };\n  }\n\n  handleClick = emoji => {\n    if (!emoji.native) {\n      emoji.native = emoji.colons;\n    }\n\n    this.props.onClose();\n    this.props.onPick(emoji);\n  }\n\n  handleModifierOpen = () => {\n    this.setState({ modifierOpen: true });\n  }\n\n  handleModifierClose = () => {\n    this.setState({ modifierOpen: false });\n  }\n\n  handleModifierChange = modifier => {\n    this.props.onSkinTone(modifier);\n  }\n\n  render () {\n    const { loading, style, intl, custom_emojis, skinTone, frequentlyUsedEmojis } = this.props;\n\n    if (loading) {\n      return <div style={{ width: 299 }} />;\n    }\n\n    const title = intl.formatMessage(messages.emoji);\n\n    const { modifierOpen } = this.state;\n\n    const categoriesSort = [\n      'recent',\n      'people',\n      'nature',\n      'foods',\n      'activity',\n      'places',\n      'objects',\n      'symbols',\n      'flags',\n    ];\n\n    categoriesSort.splice(1, 0, ...Array.from(categoriesFromEmojis(custom_emojis)).sort());\n\n    return (\n      <div className={classNames('emoji-picker-dropdown__menu', { selecting: modifierOpen })} style={style} ref={this.setRef}>\n        <EmojiPicker\n          perLine={8}\n          emojiSize={22}\n          sheetSize={32}\n          custom={buildCustomEmojis(custom_emojis)}\n          color=''\n          emoji=''\n          set='twitter'\n          title={title}\n          i18n={this.getI18n()}\n          onClick={this.handleClick}\n          include={categoriesSort}\n          recent={frequentlyUsedEmojis}\n          skin={skinTone}\n          showPreview={false}\n          backgroundImageFn={backgroundImageFn}\n          autoFocus\n          emojiTooltip\n        />\n\n        <ModifierPicker\n          active={modifierOpen}\n          modifier={skinTone}\n          onOpen={this.handleModifierOpen}\n          onClose={this.handleModifierClose}\n          onChange={this.handleModifierChange}\n        />\n      </div>\n    );\n  }\n\n}\n\nexport default @injectIntl\nclass EmojiPickerDropdown extends React.PureComponent {\n\n  static propTypes = {\n    custom_emojis: ImmutablePropTypes.list,\n    frequentlyUsedEmojis: PropTypes.arrayOf(PropTypes.string),\n    intl: PropTypes.object.isRequired,\n    onPickEmoji: PropTypes.func.isRequired,\n    onSkinTone: PropTypes.func.isRequired,\n    skinTone: PropTypes.number.isRequired,\n  };\n\n  state = {\n    active: false,\n    loading: false,\n  };\n\n  setRef = (c) => {\n    this.dropdown = c;\n  }\n\n  onShowDropdown = ({ target }) => {\n    this.setState({ active: true });\n\n    if (!EmojiPicker) {\n      this.setState({ loading: true });\n\n      EmojiPickerAsync().then(EmojiMart => {\n        EmojiPicker = EmojiMart.Picker;\n        Emoji       = EmojiMart.Emoji;\n\n        this.setState({ loading: false });\n      }).catch(() => {\n        this.setState({ loading: false });\n      });\n    }\n\n    const { top } = target.getBoundingClientRect();\n    this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });\n  }\n\n  onHideDropdown = () => {\n    this.setState({ active: false });\n  }\n\n  onToggle = (e) => {\n    if (!this.state.loading && (!e.key || e.key === 'Enter')) {\n      if (this.state.active) {\n        this.onHideDropdown();\n      } else {\n        this.onShowDropdown(e);\n      }\n    }\n  }\n\n  handleKeyDown = e => {\n    if (e.key === 'Escape') {\n      this.onHideDropdown();\n    }\n  }\n\n  setTargetRef = c => {\n    this.target = c;\n  }\n\n  findTarget = () => {\n    return this.target;\n  }\n\n  render () {\n    const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props;\n    const title = intl.formatMessage(messages.emoji);\n    const { active, loading, placement } = this.state;\n\n    return (\n      <div className='emoji-picker-dropdown' onKeyDown={this.handleKeyDown}>\n        <div ref={this.setTargetRef} className='emoji-button' title={title} aria-label={title} aria-expanded={active} role='button' onClick={this.onToggle} onKeyDown={this.onToggle} tabIndex={0}>\n          <img\n            className={classNames('emojione', { 'pulse-loading': active && loading })}\n            alt='🙂'\n            src={`${assetHost}/emoji/1f602.svg`}\n          />\n        </div>\n\n        <Overlay show={active} placement={placement} target={this.findTarget}>\n          <EmojiPickerMenu\n            custom_emojis={this.props.custom_emojis}\n            loading={loading}\n            onClose={this.onHideDropdown}\n            onPick={onPickEmoji}\n            onSkinTone={onSkinTone}\n            skinTone={skinTone}\n            frequentlyUsedEmojis={frequentlyUsedEmojis}\n          />\n        </Overlay>\n      </div>\n    );\n  }\n\n}\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Avatar from '../../../components/avatar';\nimport IconButton from '../../../components/icon_button';\nimport DisplayName from '../../../components/display_name';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { isRtl } from '../../../rtl';\nimport AttachmentList from 'mastodon/components/attachment_list';\n\nconst messages = defineMessages({\n  cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },\n});\n\nexport default @injectIntl\nclass ReplyIndicator extends ImmutablePureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    status: ImmutablePropTypes.map,\n    onCancel: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleClick = () => {\n    this.props.onCancel();\n  }\n\n  handleAccountClick = (e) => {\n    if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n      e.preventDefault();\n      this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n    }\n  }\n\n  render () {\n    const { status, intl } = this.props;\n\n    if (!status) {\n      return null;\n    }\n\n    const content = { __html: status.get('contentHtml') };\n    const style   = {\n      direction: isRtl(status.get('search_index')) ? 'rtl' : 'ltr',\n    };\n\n    return (\n      <div className='reply-indicator'>\n        <div className='reply-indicator__header'>\n          <div className='reply-indicator__cancel'><IconButton title={intl.formatMessage(messages.cancel)} icon='times' onClick={this.handleClick} inverted /></div>\n\n          <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='reply-indicator__display-name'>\n            <div className='reply-indicator__display-avatar'><Avatar account={status.get('account')} size={24} /></div>\n            <DisplayName account={status.get('account')} />\n          </a>\n        </div>\n\n        <div className='reply-indicator__content' style={style} dangerouslySetInnerHTML={content} />\n\n        {status.get('media_attachments').size > 0 && (\n          <AttachmentList\n            compact\n            media={status.get('media_attachments')}\n          />\n        )}\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport { cancelReplyCompose } from '../../../actions/compose';\nimport { makeGetStatus } from '../../../selectors';\nimport ReplyIndicator from '../components/reply_indicator';\n\nconst makeMapStateToProps = () => {\n  const getStatus = makeGetStatus();\n\n  const mapStateToProps = state => ({\n    status: getStatus(state, { id: state.getIn(['compose', 'in_reply_to']) }),\n  });\n\n  return mapStateToProps;\n};\n\nconst mapDispatchToProps = dispatch => ({\n\n  onCancel () {\n    dispatch(cancelReplyCompose());\n  },\n\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(ReplyIndicator);\n","import React from 'react';\nimport Avatar from '../../../components/avatar';\nimport DisplayName from '../../../components/display_name';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nexport default class AutosuggestAccount extends ImmutablePureComponent {\n\n  static propTypes = {\n    account: ImmutablePropTypes.map.isRequired,\n  };\n\n  render () {\n    const { account } = this.props;\n\n    return (\n      <div className='autosuggest-account' title={account.get('acct')}>\n        <div className='autosuggest-account-icon'><Avatar account={account} size={18} /></div>\n        <DisplayName account={account} />\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport AutosuggestAccount from '../components/autosuggest_account';\nimport { makeGetAccount } from '../../../selectors';\n\nconst makeMapStateToProps = () => {\n  const getAccount = makeGetAccount();\n\n  const mapStateToProps = (state, { id }) => ({\n    account: getAccount(state, id),\n  });\n\n  return mapStateToProps;\n};\n\nexport default connect(makeMapStateToProps)(AutosuggestAccount);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { shortNumberFormat } from 'mastodon/utils/numbers';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class AutosuggestHashtag extends React.PureComponent {\n\n  static propTypes = {\n    tag: PropTypes.shape({\n      name: PropTypes.string.isRequired,\n      url: PropTypes.string,\n      history: PropTypes.array,\n    }).isRequired,\n  };\n\n  render () {\n    const { tag } = this.props;\n    const weeklyUses = tag.history && shortNumberFormat(tag.history.reduce((total, day) => total + (day.uses * 1), 0));\n\n    return (\n      <div className='autosuggest-hashtag'>\n        <div className='autosuggest-hashtag__name'>#<strong>{tag.name}</strong></div>\n        {tag.history !== undefined && <div className='autosuggest-hashtag__uses'><FormattedMessage id='autosuggest_hashtag.per_week' defaultMessage='{count} per week' values={{ count: weeklyUses }} /></div>}\n      </div>\n    );\n  }\n\n}\n","import React from 'react';\nimport AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';\nimport AutosuggestEmoji from './autosuggest_emoji';\nimport AutosuggestHashtag from './autosuggest_hashtag';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport { isRtl } from '../rtl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Textarea from 'react-textarea-autosize';\nimport classNames from 'classnames';\n\nconst textAtCursorMatchesToken = (str, caretPosition) => {\n  let word;\n\n  let left  = str.slice(0, caretPosition).search(/\\S+$/);\n  let right = str.slice(caretPosition).search(/\\s/);\n\n  if (right < 0) {\n    word = str.slice(left);\n  } else {\n    word = str.slice(left, right + caretPosition);\n  }\n\n  if (!word || word.trim().length < 3 || ['@', ':', '#'].indexOf(word[0]) === -1) {\n    return [null, null];\n  }\n\n  word = word.trim().toLowerCase();\n\n  if (word.length > 0) {\n    return [left + 1, word];\n  } else {\n    return [null, null];\n  }\n};\n\nexport default class AutosuggestTextarea extends ImmutablePureComponent {\n\n  static propTypes = {\n    value: PropTypes.string,\n    suggestions: ImmutablePropTypes.list,\n    disabled: PropTypes.bool,\n    placeholder: PropTypes.string,\n    onSuggestionSelected: PropTypes.func.isRequired,\n    onSuggestionsClearRequested: PropTypes.func.isRequired,\n    onSuggestionsFetchRequested: PropTypes.func.isRequired,\n    onChange: PropTypes.func.isRequired,\n    onKeyUp: PropTypes.func,\n    onKeyDown: PropTypes.func,\n    onPaste: PropTypes.func.isRequired,\n    autoFocus: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    autoFocus: true,\n  };\n\n  state = {\n    suggestionsHidden: true,\n    focused: false,\n    selectedSuggestion: 0,\n    lastToken: null,\n    tokenStart: 0,\n  };\n\n  onChange = (e) => {\n    const [ tokenStart, token ] = textAtCursorMatchesToken(e.target.value, e.target.selectionStart);\n\n    if (token !== null && this.state.lastToken !== token) {\n      this.setState({ lastToken: token, selectedSuggestion: 0, tokenStart });\n      this.props.onSuggestionsFetchRequested(token);\n    } else if (token === null) {\n      this.setState({ lastToken: null });\n      this.props.onSuggestionsClearRequested();\n    }\n\n    this.props.onChange(e);\n  }\n\n  onKeyDown = (e) => {\n    const { suggestions, disabled } = this.props;\n    const { selectedSuggestion, suggestionsHidden } = this.state;\n\n    if (disabled) {\n      e.preventDefault();\n      return;\n    }\n\n    if (e.which === 229 || e.isComposing) {\n      // Ignore key events during text composition\n      // e.key may be a name of the physical key even in this case (e.x. Safari / Chrome on Mac)\n      return;\n    }\n\n    switch(e.key) {\n    case 'Escape':\n      if (suggestions.size === 0 || suggestionsHidden) {\n        document.querySelector('.ui').parentElement.focus();\n      } else {\n        e.preventDefault();\n        this.setState({ suggestionsHidden: true });\n      }\n\n      break;\n    case 'ArrowDown':\n      if (suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        this.setState({ selectedSuggestion: Math.min(selectedSuggestion + 1, suggestions.size - 1) });\n      }\n\n      break;\n    case 'ArrowUp':\n      if (suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        this.setState({ selectedSuggestion: Math.max(selectedSuggestion - 1, 0) });\n      }\n\n      break;\n    case 'Enter':\n    case 'Tab':\n      // Select suggestion\n      if (this.state.lastToken !== null && suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        e.stopPropagation();\n        this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestions.get(selectedSuggestion));\n      }\n\n      break;\n    }\n\n    if (e.defaultPrevented || !this.props.onKeyDown) {\n      return;\n    }\n\n    this.props.onKeyDown(e);\n  }\n\n  onBlur = () => {\n    this.setState({ suggestionsHidden: true, focused: false });\n  }\n\n  onFocus = (e) => {\n    this.setState({ focused: true });\n    if (this.props.onFocus) {\n      this.props.onFocus(e);\n    }\n  }\n\n  onSuggestionClick = (e) => {\n    const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index'));\n    e.preventDefault();\n    this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestion);\n    this.textarea.focus();\n  }\n\n  componentWillReceiveProps (nextProps) {\n    if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {\n      this.setState({ suggestionsHidden: false });\n    }\n  }\n\n  setTextarea = (c) => {\n    this.textarea = c;\n  }\n\n  onPaste = (e) => {\n    if (e.clipboardData && e.clipboardData.files.length === 1) {\n      this.props.onPaste(e.clipboardData.files);\n      e.preventDefault();\n    }\n  }\n\n  renderSuggestion = (suggestion, i) => {\n    const { selectedSuggestion } = this.state;\n    let inner, key;\n\n    if (suggestion.type === 'emoji') {\n      inner = <AutosuggestEmoji emoji={suggestion} />;\n      key   = suggestion.id;\n    } else if (suggestion.type === 'hashtag') {\n      inner = <AutosuggestHashtag tag={suggestion} />;\n      key   = suggestion.name;\n    } else if (suggestion.type === 'account') {\n      inner = <AutosuggestAccountContainer id={suggestion.id} />;\n      key   = suggestion.id;\n    }\n\n    return (\n      <div role='button' tabIndex='0' key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>\n        {inner}\n      </div>\n    );\n  }\n\n  render () {\n    const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, children } = this.props;\n    const { suggestionsHidden } = this.state;\n    const style = { direction: 'ltr' };\n\n    if (isRtl(value)) {\n      style.direction = 'rtl';\n    }\n\n    return [\n      <div className='compose-form__autosuggest-wrapper' key='autosuggest-wrapper'>\n        <div className='autosuggest-textarea'>\n          <label>\n            <span style={{ display: 'none' }}>{placeholder}</span>\n\n            <Textarea\n              inputRef={this.setTextarea}\n              className='autosuggest-textarea__textarea'\n              disabled={disabled}\n              placeholder={placeholder}\n              autoFocus={autoFocus}\n              value={value}\n              onChange={this.onChange}\n              onKeyDown={this.onKeyDown}\n              onKeyUp={onKeyUp}\n              onFocus={this.onFocus}\n              onBlur={this.onBlur}\n              onPaste={this.onPaste}\n              style={style}\n              aria-autocomplete='list'\n            />\n          </label>\n        </div>\n        {children}\n      </div>,\n\n      <div className='autosuggest-textarea__suggestions-wrapper' key='suggestions-wrapper'>\n        <div className={`autosuggest-textarea__suggestions ${suggestionsHidden || suggestions.isEmpty() ? '' : 'autosuggest-textarea__suggestions--visible'}`}>\n          {suggestions.map(this.renderSuggestion)}\n        </div>\n      </div>,\n    ];\n  }\n\n}\n","import React from 'react';\nimport AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';\nimport AutosuggestEmoji from './autosuggest_emoji';\nimport AutosuggestHashtag from './autosuggest_hashtag';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport { isRtl } from '../rtl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport classNames from 'classnames';\nimport { List as ImmutableList } from 'immutable';\n\nconst textAtCursorMatchesToken = (str, caretPosition, searchTokens) => {\n  let word;\n\n  let left  = str.slice(0, caretPosition).search(/\\S+$/);\n  let right = str.slice(caretPosition).search(/\\s/);\n\n  if (right < 0) {\n    word = str.slice(left);\n  } else {\n    word = str.slice(left, right + caretPosition);\n  }\n\n  if (!word || word.trim().length < 3 || searchTokens.indexOf(word[0]) === -1) {\n    return [null, null];\n  }\n\n  word = word.trim().toLowerCase();\n\n  if (word.length > 0) {\n    return [left + 1, word];\n  } else {\n    return [null, null];\n  }\n};\n\nexport default class AutosuggestInput extends ImmutablePureComponent {\n\n  static propTypes = {\n    value: PropTypes.string,\n    suggestions: ImmutablePropTypes.list,\n    disabled: PropTypes.bool,\n    placeholder: PropTypes.string,\n    onSuggestionSelected: PropTypes.func.isRequired,\n    onSuggestionsClearRequested: PropTypes.func.isRequired,\n    onSuggestionsFetchRequested: PropTypes.func.isRequired,\n    onChange: PropTypes.func.isRequired,\n    onKeyUp: PropTypes.func,\n    onKeyDown: PropTypes.func,\n    autoFocus: PropTypes.bool,\n    className: PropTypes.string,\n    id: PropTypes.string,\n    searchTokens: PropTypes.arrayOf(PropTypes.string),\n    maxLength: PropTypes.number,\n  };\n\n  static defaultProps = {\n    autoFocus: true,\n    searchTokens: ImmutableList(['@', ':', '#']),\n  };\n\n  state = {\n    suggestionsHidden: true,\n    focused: false,\n    selectedSuggestion: 0,\n    lastToken: null,\n    tokenStart: 0,\n  };\n\n  onChange = (e) => {\n    const [ tokenStart, token ] = textAtCursorMatchesToken(e.target.value, e.target.selectionStart, this.props.searchTokens);\n\n    if (token !== null && this.state.lastToken !== token) {\n      this.setState({ lastToken: token, selectedSuggestion: 0, tokenStart });\n      this.props.onSuggestionsFetchRequested(token);\n    } else if (token === null) {\n      this.setState({ lastToken: null });\n      this.props.onSuggestionsClearRequested();\n    }\n\n    this.props.onChange(e);\n  }\n\n  onKeyDown = (e) => {\n    const { suggestions, disabled } = this.props;\n    const { selectedSuggestion, suggestionsHidden } = this.state;\n\n    if (disabled) {\n      e.preventDefault();\n      return;\n    }\n\n    if (e.which === 229 || e.isComposing) {\n      // Ignore key events during text composition\n      // e.key may be a name of the physical key even in this case (e.x. Safari / Chrome on Mac)\n      return;\n    }\n\n    switch(e.key) {\n    case 'Escape':\n      if (suggestions.size === 0 || suggestionsHidden) {\n        document.querySelector('.ui').parentElement.focus();\n      } else {\n        e.preventDefault();\n        this.setState({ suggestionsHidden: true });\n      }\n\n      break;\n    case 'ArrowDown':\n      if (suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        this.setState({ selectedSuggestion: Math.min(selectedSuggestion + 1, suggestions.size - 1) });\n      }\n\n      break;\n    case 'ArrowUp':\n      if (suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        this.setState({ selectedSuggestion: Math.max(selectedSuggestion - 1, 0) });\n      }\n\n      break;\n    case 'Enter':\n    case 'Tab':\n      // Select suggestion\n      if (this.state.lastToken !== null && suggestions.size > 0 && !suggestionsHidden) {\n        e.preventDefault();\n        e.stopPropagation();\n        this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestions.get(selectedSuggestion));\n      }\n\n      break;\n    }\n\n    if (e.defaultPrevented || !this.props.onKeyDown) {\n      return;\n    }\n\n    this.props.onKeyDown(e);\n  }\n\n  onBlur = () => {\n    this.setState({ suggestionsHidden: true, focused: false });\n  }\n\n  onFocus = () => {\n    this.setState({ focused: true });\n  }\n\n  onSuggestionClick = (e) => {\n    const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index'));\n    e.preventDefault();\n    this.props.onSuggestionSelected(this.state.tokenStart, this.state.lastToken, suggestion);\n    this.input.focus();\n  }\n\n  componentWillReceiveProps (nextProps) {\n    if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {\n      this.setState({ suggestionsHidden: false });\n    }\n  }\n\n  setInput = (c) => {\n    this.input = c;\n  }\n\n  renderSuggestion = (suggestion, i) => {\n    const { selectedSuggestion } = this.state;\n    let inner, key;\n\n    if (suggestion.type === 'emoji') {\n      inner = <AutosuggestEmoji emoji={suggestion} />;\n      key   = suggestion.id;\n    } else if (suggestion.type ==='hashtag') {\n      inner = <AutosuggestHashtag tag={suggestion} />;\n      key   = suggestion.name;\n    } else if (suggestion.type === 'account') {\n      inner = <AutosuggestAccountContainer id={suggestion.id} />;\n      key   = suggestion.id;\n    }\n\n    return (\n      <div role='button' tabIndex='0' key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>\n        {inner}\n      </div>\n    );\n  }\n\n  render () {\n    const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength } = this.props;\n    const { suggestionsHidden } = this.state;\n    const style = { direction: 'ltr' };\n\n    if (isRtl(value)) {\n      style.direction = 'rtl';\n    }\n\n    return (\n      <div className='autosuggest-input'>\n        <label>\n          <span style={{ display: 'none' }}>{placeholder}</span>\n\n          <input\n            type='text'\n            ref={this.setInput}\n            disabled={disabled}\n            placeholder={placeholder}\n            autoFocus={autoFocus}\n            value={value}\n            onChange={this.onChange}\n            onKeyDown={this.onKeyDown}\n            onKeyUp={onKeyUp}\n            onFocus={this.onFocus}\n            onBlur={this.onBlur}\n            style={style}\n            aria-autocomplete='list'\n            id={id}\n            className={className}\n            maxLength={maxLength}\n          />\n        </label>\n\n        <div className={`autosuggest-textarea__suggestions ${suggestionsHidden || suggestions.isEmpty() ? '' : 'autosuggest-textarea__suggestions--visible'}`}>\n          {suggestions.map(this.renderSuggestion)}\n        </div>\n      </div>\n    );\n  }\n\n}\n","import React from 'react';\nimport IconButton from '../../../components/icon_button';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n  add_poll: { id: 'poll_button.add_poll', defaultMessage: 'Add a poll' },\n  remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' },\n});\n\nconst iconStyle = {\n  height: null,\n  lineHeight: '27px',\n};\n\nexport default\n@injectIntl\nclass PollButton extends React.PureComponent {\n\n  static propTypes = {\n    disabled: PropTypes.bool,\n    unavailable: PropTypes.bool,\n    active: PropTypes.bool,\n    onClick: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleClick = () => {\n    this.props.onClick();\n  }\n\n  render () {\n    const { intl, active, unavailable, disabled } = this.props;\n\n    if (unavailable) {\n      return null;\n    }\n\n    return (\n      <div className='compose-form__poll-button'>\n        <IconButton\n          icon='tasks'\n          title={intl.formatMessage(active ? messages.remove_poll : messages.add_poll)}\n          disabled={disabled}\n          onClick={this.handleClick}\n          className={`compose-form__poll-button-icon ${active ? 'active' : ''}`}\n          size={18}\n          inverted\n          style={iconStyle}\n        />\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport PollButton from '../components/poll_button';\nimport { addPoll, removePoll } from '../../../actions/compose';\n\nconst mapStateToProps = state => ({\n  unavailable: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0),\n  active: state.getIn(['compose', 'poll']) !== null,\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onClick () {\n    dispatch((_, getState) => {\n      if (getState().getIn(['compose', 'poll'])) {\n        dispatch(removePoll());\n      } else {\n        dispatch(addPoll());\n      }\n    });\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PollButton);\n","import React from 'react';\nimport IconButton from '../../../components/icon_button';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { connect } from 'react-redux';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\n\nconst messages = defineMessages({\n  upload: { id: 'upload_button.label', defaultMessage: 'Add media ({formats})' },\n});\n\nconst SUPPORTED_FORMATS = 'JPEG, PNG, GIF, WebM, MP4, MOV, OGG, WAV, MP3, FLAC';\n\nconst makeMapStateToProps = () => {\n  const mapStateToProps = state => ({\n    acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']),\n  });\n\n  return mapStateToProps;\n};\n\nconst iconStyle = {\n  height: null,\n  lineHeight: '27px',\n};\n\nexport default @connect(makeMapStateToProps)\n@injectIntl\nclass UploadButton extends ImmutablePureComponent {\n\n  static propTypes = {\n    disabled: PropTypes.bool,\n    unavailable: PropTypes.bool,\n    onSelectFile: PropTypes.func.isRequired,\n    style: PropTypes.object,\n    resetFileKey: PropTypes.number,\n    acceptContentTypes: ImmutablePropTypes.listOf(PropTypes.string).isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleChange = (e) => {\n    if (e.target.files.length > 0) {\n      this.props.onSelectFile(e.target.files);\n    }\n  }\n\n  handleClick = () => {\n    this.fileElement.click();\n  }\n\n  setRef = (c) => {\n    this.fileElement = c;\n  }\n\n  render () {\n    const { intl, resetFileKey, unavailable, disabled, acceptContentTypes } = this.props;\n\n    if (unavailable) {\n      return null;\n    }\n\n    return (\n      <div className='compose-form__upload-button'>\n        <IconButton icon='paperclip' title={intl.formatMessage(messages.upload, { formats: SUPPORTED_FORMATS })} disabled={disabled} onClick={this.handleClick} className='compose-form__upload-button-icon' size={18} inverted style={iconStyle} />\n        <label>\n          <span style={{ display: 'none' }}>{intl.formatMessage(messages.upload, { formats: SUPPORTED_FORMATS })}</span>\n          <input\n            key={resetFileKey}\n            ref={this.setRef}\n            type='file'\n            multiple\n            onChange={this.handleChange}\n            disabled={disabled}\n            style={{ display: 'none' }}\n          />\n        </label>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport UploadButton from '../components/upload_button';\nimport { uploadCompose } from '../../../actions/compose';\n\nconst mapStateToProps = state => ({\n  disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => ['video', 'audio'].includes(m.get('type')))),\n  unavailable: state.getIn(['compose', 'poll']) !== null,\n  resetFileKey: state.getIn(['compose', 'resetFileKey']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onSelectFile (files) {\n    dispatch(uploadCompose(files));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UploadButton);\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst iconStyle = {\n  height: null,\n  lineHeight: '27px',\n  width: `${18 * 1.28571429}px`,\n};\n\nexport default class TextIconButton extends React.PureComponent {\n\n  static propTypes = {\n    label: PropTypes.string.isRequired,\n    title: PropTypes.string,\n    active: PropTypes.bool,\n    onClick: PropTypes.func.isRequired,\n    ariaControls: PropTypes.string,\n  };\n\n  handleClick = (e) => {\n    e.preventDefault();\n    this.props.onClick();\n  }\n\n  render () {\n    const { label, title, active, ariaControls } = this.props;\n\n    return (\n      <button\n        title={title}\n        aria-label={title}\n        className={`text-icon-button ${active ? 'active' : ''}`}\n        aria-expanded={active}\n        onClick={this.handleClick}\n        aria-controls={ariaControls} style={iconStyle}\n      >\n        {label}\n      </button>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport TextIconButton from '../components/text_icon_button';\nimport { changeComposeSpoilerness } from '../../../actions/compose';\nimport { injectIntl, defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n  marked: { id: 'compose_form.spoiler.marked', defaultMessage: 'Text is hidden behind warning' },\n  unmarked: { id: 'compose_form.spoiler.unmarked', defaultMessage: 'Text is not hidden' },\n});\n\nconst mapStateToProps = (state, { intl }) => ({\n  label: 'CW',\n  title: intl.formatMessage(state.getIn(['compose', 'spoiler']) ? messages.marked : messages.unmarked),\n  active: state.getIn(['compose', 'spoiler']),\n  ariaControls: 'cw-spoiler-input',\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onClick () {\n    dispatch(changeComposeSpoilerness());\n  },\n\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(TextIconButton));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport IconButton from '../../../components/icon_button';\nimport Overlay from 'react-overlays/lib/Overlay';\nimport Motion from '../../ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport detectPassiveEvents from 'detect-passive-events';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n  public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },\n  public_long: { id: 'privacy.public.long', defaultMessage: 'Post to public timelines' },\n  unlisted_short: { id: 'privacy.unlisted.short', defaultMessage: 'Unlisted' },\n  unlisted_long: { id: 'privacy.unlisted.long', defaultMessage: 'Do not show in public timelines' },\n  private_short: { id: 'privacy.private.short', defaultMessage: 'Followers-only' },\n  private_long: { id: 'privacy.private.long', defaultMessage: 'Post to followers only' },\n  direct_short: { id: 'privacy.direct.short', defaultMessage: 'Direct' },\n  direct_long: { id: 'privacy.direct.long', defaultMessage: 'Post to mentioned users only' },\n  change_privacy: { id: 'privacy.change', defaultMessage: 'Adjust status privacy' },\n});\n\nconst listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;\n\nclass PrivacyDropdownMenu extends React.PureComponent {\n\n  static propTypes = {\n    style: PropTypes.object,\n    items: PropTypes.array.isRequired,\n    value: PropTypes.string.isRequired,\n    placement: PropTypes.string.isRequired,\n    onClose: PropTypes.func.isRequired,\n    onChange: PropTypes.func.isRequired,\n  };\n\n  state = {\n    mounted: false,\n  };\n\n  handleDocumentClick = e => {\n    if (this.node && !this.node.contains(e.target)) {\n      this.props.onClose();\n    }\n  }\n\n  handleKeyDown = e => {\n    const { items } = this.props;\n    const value = e.currentTarget.getAttribute('data-index');\n    const index = items.findIndex(item => {\n      return (item.value === value);\n    });\n    let element;\n\n    switch(e.key) {\n    case 'Escape':\n      this.props.onClose();\n      break;\n    case 'Enter':\n      this.handleClick(e);\n      break;\n    case 'ArrowDown':\n      element = this.node.childNodes[index + 1];\n      if (element) {\n        element.focus();\n        this.props.onChange(element.getAttribute('data-index'));\n      }\n      break;\n    case 'ArrowUp':\n      element = this.node.childNodes[index - 1];\n      if (element) {\n        element.focus();\n        this.props.onChange(element.getAttribute('data-index'));\n      }\n      break;\n    case 'Tab':\n      if (e.shiftKey) {\n        element = this.node.childNodes[index - 1] || this.node.lastChild;\n      } else {\n        element = this.node.childNodes[index + 1] || this.node.firstChild;\n      }\n      if (element) {\n        element.focus();\n        this.props.onChange(element.getAttribute('data-index'));\n        e.preventDefault();\n        e.stopPropagation();\n      }\n      break;\n    case 'Home':\n      element = this.node.firstChild;\n      if (element) {\n        element.focus();\n        this.props.onChange(element.getAttribute('data-index'));\n      }\n      break;\n    case 'End':\n      element = this.node.lastChild;\n      if (element) {\n        element.focus();\n        this.props.onChange(element.getAttribute('data-index'));\n      }\n      break;\n    }\n  }\n\n  handleClick = e => {\n    const value = e.currentTarget.getAttribute('data-index');\n\n    e.preventDefault();\n\n    this.props.onClose();\n    this.props.onChange(value);\n  }\n\n  componentDidMount () {\n    document.addEventListener('click', this.handleDocumentClick, false);\n    document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);\n    if (this.focusedItem) this.focusedItem.focus();\n    this.setState({ mounted: true });\n  }\n\n  componentWillUnmount () {\n    document.removeEventListener('click', this.handleDocumentClick, false);\n    document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);\n  }\n\n  setRef = c => {\n    this.node = c;\n  }\n\n  setFocusRef = c => {\n    this.focusedItem = c;\n  }\n\n  render () {\n    const { mounted } = this.state;\n    const { style, items, placement, value } = this.props;\n\n    return (\n      <Motion defaultStyle={{ opacity: 0, scaleX: 0.85, scaleY: 0.75 }} style={{ opacity: spring(1, { damping: 35, stiffness: 400 }), scaleX: spring(1, { damping: 35, stiffness: 400 }), scaleY: spring(1, { damping: 35, stiffness: 400 }) }}>\n        {({ opacity, scaleX, scaleY }) => (\n          // It should not be transformed when mounting because the resulting\n          // size will be used to determine the coordinate of the menu by\n          // react-overlays\n          <div className={`privacy-dropdown__dropdown ${placement}`} style={{ ...style, opacity: opacity, transform: mounted ? `scale(${scaleX}, ${scaleY})` : null, zIndex: 2 }} role='listbox' ref={this.setRef}>\n            {items.map(item => (\n              <div role='option' tabIndex='0' key={item.value} data-index={item.value} onKeyDown={this.handleKeyDown} onClick={this.handleClick} className={classNames('privacy-dropdown__option', { active: item.value === value })} aria-selected={item.value === value} ref={item.value === value ? this.setFocusRef : null}>\n                <div className='privacy-dropdown__option__icon'>\n                  <Icon id={item.icon} fixedWidth />\n                </div>\n\n                <div className='privacy-dropdown__option__content'>\n                  <strong>{item.text}</strong>\n                  {item.meta}\n                </div>\n              </div>\n            ))}\n          </div>\n        )}\n      </Motion>\n    );\n  }\n\n}\n\nexport default @injectIntl\nclass PrivacyDropdown extends React.PureComponent {\n\n  static propTypes = {\n    isUserTouching: PropTypes.func,\n    isModalOpen: PropTypes.bool.isRequired,\n    onModalOpen: PropTypes.func,\n    onModalClose: PropTypes.func,\n    value: PropTypes.string.isRequired,\n    onChange: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  state = {\n    open: false,\n    placement: 'bottom',\n  };\n\n  handleToggle = ({ target }) => {\n    if (this.props.isUserTouching()) {\n      if (this.state.open) {\n        this.props.onModalClose();\n      } else {\n        this.props.onModalOpen({\n          actions: this.options.map(option => ({ ...option, active: option.value === this.props.value })),\n          onClick: this.handleModalActionClick,\n        });\n      }\n    } else {\n      const { top } = target.getBoundingClientRect();\n      if (this.state.open && this.activeElement) {\n        this.activeElement.focus();\n      }\n      this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' });\n      this.setState({ open: !this.state.open });\n    }\n  }\n\n  handleModalActionClick = (e) => {\n    e.preventDefault();\n\n    const { value } = this.options[e.currentTarget.getAttribute('data-index')];\n\n    this.props.onModalClose();\n    this.props.onChange(value);\n  }\n\n  handleKeyDown = e => {\n    switch(e.key) {\n    case 'Escape':\n      this.handleClose();\n      break;\n    }\n  }\n\n  handleMouseDown = () => {\n    if (!this.state.open) {\n      this.activeElement = document.activeElement;\n    }\n  }\n\n  handleButtonKeyDown = (e) => {\n    switch(e.key) {\n    case ' ':\n    case 'Enter':\n      this.handleMouseDown();\n      break;\n    }\n  }\n\n  handleClose = () => {\n    if (this.state.open && this.activeElement) {\n      this.activeElement.focus();\n    }\n    this.setState({ open: false });\n  }\n\n  handleChange = value => {\n    this.props.onChange(value);\n  }\n\n  componentWillMount () {\n    const { intl: { formatMessage } } = this.props;\n\n    this.options = [\n      { icon: 'globe', value: 'public', text: formatMessage(messages.public_short), meta: formatMessage(messages.public_long) },\n      { icon: 'unlock', value: 'unlisted', text: formatMessage(messages.unlisted_short), meta: formatMessage(messages.unlisted_long) },\n      { icon: 'lock', value: 'private', text: formatMessage(messages.private_short), meta: formatMessage(messages.private_long) },\n      { icon: 'envelope', value: 'direct', text: formatMessage(messages.direct_short), meta: formatMessage(messages.direct_long) },\n    ];\n  }\n\n  render () {\n    const { value, intl } = this.props;\n    const { open, placement } = this.state;\n\n    const valueOption = this.options.find(item => item.value === value);\n\n    return (\n      <div className={classNames('privacy-dropdown', placement, { active: open })} onKeyDown={this.handleKeyDown}>\n        <div className={classNames('privacy-dropdown__value', { active: this.options.indexOf(valueOption) === (placement === 'bottom' ? 0 : (this.options.length - 1)) })}>\n          <IconButton\n            className='privacy-dropdown__value-icon'\n            icon={valueOption.icon}\n            title={intl.formatMessage(messages.change_privacy)}\n            size={18}\n            expanded={open}\n            active={open}\n            inverted\n            onClick={this.handleToggle}\n            onMouseDown={this.handleMouseDown}\n            onKeyDown={this.handleButtonKeyDown}\n            style={{ height: null, lineHeight: '27px' }}\n          />\n        </div>\n\n        <Overlay show={open} placement={placement} target={this}>\n          <PrivacyDropdownMenu\n            items={this.options}\n            value={value}\n            onClose={this.handleClose}\n            onChange={this.handleChange}\n            placement={placement}\n          />\n        </Overlay>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport PrivacyDropdown from '../components/privacy_dropdown';\nimport { changeComposeVisibility } from '../../../actions/compose';\nimport { openModal, closeModal } from '../../../actions/modal';\nimport { isUserTouching } from '../../../is_mobile';\n\nconst mapStateToProps = state => ({\n  isModalOpen: state.get('modal').modalType === 'ACTIONS',\n  value: state.getIn(['compose', 'privacy']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onChange (value) {\n    dispatch(changeComposeVisibility(value));\n  },\n\n  isUserTouching,\n  onModalOpen: props => dispatch(openModal('ACTIONS', props)),\n  onModalClose: () => dispatch(closeModal()),\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown);\n","import { connect } from 'react-redux';\nimport EmojiPickerDropdown from '../components/emoji_picker_dropdown';\nimport { changeSetting } from '../../../actions/settings';\nimport { createSelector } from 'reselect';\nimport { Map as ImmutableMap } from 'immutable';\nimport { useEmoji } from '../../../actions/emojis';\n\nconst perLine = 8;\nconst lines   = 2;\n\nconst DEFAULTS = [\n  '+1',\n  'grinning',\n  'kissing_heart',\n  'heart_eyes',\n  'laughing',\n  'stuck_out_tongue_winking_eye',\n  'sweat_smile',\n  'joy',\n  'yum',\n  'disappointed',\n  'thinking_face',\n  'weary',\n  'sob',\n  'sunglasses',\n  'heart',\n  'ok_hand',\n];\n\nconst getFrequentlyUsedEmojis = createSelector([\n  state => state.getIn(['settings', 'frequentlyUsedEmojis'], ImmutableMap()),\n], emojiCounters => {\n  let emojis = emojiCounters\n    .keySeq()\n    .sort((a, b) => emojiCounters.get(a) - emojiCounters.get(b))\n    .reverse()\n    .slice(0, perLine * lines)\n    .toArray();\n\n  if (emojis.length < DEFAULTS.length) {\n    let uniqueDefaults = DEFAULTS.filter(emoji => !emojis.includes(emoji));\n    emojis = emojis.concat(uniqueDefaults.slice(0, DEFAULTS.length - emojis.length));\n  }\n\n  return emojis;\n});\n\nconst getCustomEmojis = createSelector([\n  state => state.get('custom_emojis'),\n], emojis => emojis.filter(e => e.get('visible_in_picker')).sort((a, b) => {\n  const aShort = a.get('shortcode').toLowerCase();\n  const bShort = b.get('shortcode').toLowerCase();\n\n  if (aShort < bShort) {\n    return -1;\n  } else if (aShort > bShort ) {\n    return 1;\n  } else {\n    return 0;\n  }\n}));\n\nconst mapStateToProps = state => ({\n  custom_emojis: getCustomEmojis(state),\n  skinTone: state.getIn(['settings', 'skinTone']),\n  frequentlyUsedEmojis: getFrequentlyUsedEmojis(state),\n});\n\nconst mapDispatchToProps = (dispatch, { onPickEmoji }) => ({\n  onSkinTone: skinTone => {\n    dispatch(changeSetting(['skinTone'], skinTone));\n  },\n\n  onPickEmoji: emoji => {\n    dispatch(useEmoji(emoji));\n\n    if (onPickEmoji) {\n      onPickEmoji(emoji);\n    }\n  },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(EmojiPickerDropdown);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport IconButton from 'mastodon/components/icon_button';\nimport Icon from 'mastodon/components/icon';\nimport AutosuggestInput from 'mastodon/components/autosuggest_input';\nimport classNames from 'classnames';\n\nconst messages = defineMessages({\n  option_placeholder: { id: 'compose_form.poll.option_placeholder', defaultMessage: 'Choice {number}' },\n  add_option: { id: 'compose_form.poll.add_option', defaultMessage: 'Add a choice' },\n  remove_option: { id: 'compose_form.poll.remove_option', defaultMessage: 'Remove this choice' },\n  poll_duration: { id: 'compose_form.poll.duration', defaultMessage: 'Poll duration' },\n  minutes: { id: 'intervals.full.minutes', defaultMessage: '{number, plural, one {# minute} other {# minutes}}' },\n  hours: { id: 'intervals.full.hours', defaultMessage: '{number, plural, one {# hour} other {# hours}}' },\n  days: { id: 'intervals.full.days', defaultMessage: '{number, plural, one {# day} other {# days}}' },\n});\n\n@injectIntl\nclass Option extends React.PureComponent {\n\n  static propTypes = {\n    title: PropTypes.string.isRequired,\n    index: PropTypes.number.isRequired,\n    isPollMultiple: PropTypes.bool,\n    onChange: PropTypes.func.isRequired,\n    onRemove: PropTypes.func.isRequired,\n    onToggleMultiple: PropTypes.func.isRequired,\n    suggestions: ImmutablePropTypes.list,\n    onClearSuggestions: PropTypes.func.isRequired,\n    onFetchSuggestions: PropTypes.func.isRequired,\n    onSuggestionSelected: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleOptionTitleChange = e => {\n    this.props.onChange(this.props.index, e.target.value);\n  };\n\n  handleOptionRemove = () => {\n    this.props.onRemove(this.props.index);\n  };\n\n\n  handleToggleMultiple = e => {\n    this.props.onToggleMultiple();\n    e.preventDefault();\n    e.stopPropagation();\n  };\n\n  onSuggestionsClearRequested = () => {\n    this.props.onClearSuggestions();\n  }\n\n  onSuggestionsFetchRequested = (token) => {\n    this.props.onFetchSuggestions(token);\n  }\n\n  onSuggestionSelected = (tokenStart, token, value) => {\n    this.props.onSuggestionSelected(tokenStart, token, value, ['poll', 'options', this.props.index]);\n  }\n\n  render () {\n    const { isPollMultiple, title, index, intl } = this.props;\n\n    return (\n      <li>\n        <label className='poll__text editable'>\n          <span\n            className={classNames('poll__input', { checkbox: isPollMultiple })}\n            onClick={this.handleToggleMultiple}\n            role='button'\n            tabIndex='0'\n          />\n\n          <AutosuggestInput\n            placeholder={intl.formatMessage(messages.option_placeholder, { number: index + 1 })}\n            maxLength={25}\n            value={title}\n            onChange={this.handleOptionTitleChange}\n            suggestions={this.props.suggestions}\n            onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}\n            onSuggestionsClearRequested={this.onSuggestionsClearRequested}\n            onSuggestionSelected={this.onSuggestionSelected}\n            searchTokens={[':']}\n          />\n        </label>\n\n        <div className='poll__cancel'>\n          <IconButton disabled={index <= 1} title={intl.formatMessage(messages.remove_option)} icon='times' onClick={this.handleOptionRemove} />\n        </div>\n      </li>\n    );\n  }\n\n}\n\nexport default\n@injectIntl\nclass PollForm extends ImmutablePureComponent {\n\n  static propTypes = {\n    options: ImmutablePropTypes.list,\n    expiresIn: PropTypes.number,\n    isMultiple: PropTypes.bool,\n    onChangeOption: PropTypes.func.isRequired,\n    onAddOption: PropTypes.func.isRequired,\n    onRemoveOption: PropTypes.func.isRequired,\n    onChangeSettings: PropTypes.func.isRequired,\n    suggestions: ImmutablePropTypes.list,\n    onClearSuggestions: PropTypes.func.isRequired,\n    onFetchSuggestions: PropTypes.func.isRequired,\n    onSuggestionSelected: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleAddOption = () => {\n    this.props.onAddOption('');\n  };\n\n  handleSelectDuration = e => {\n    this.props.onChangeSettings(e.target.value, this.props.isMultiple);\n  };\n\n  handleToggleMultiple = () => {\n    this.props.onChangeSettings(this.props.expiresIn, !this.props.isMultiple);\n  };\n\n  render () {\n    const { options, expiresIn, isMultiple, onChangeOption, onRemoveOption, intl, ...other } = this.props;\n\n    if (!options) {\n      return null;\n    }\n\n    return (\n      <div className='compose-form__poll-wrapper'>\n        <ul>\n          {options.map((title, i) => <Option title={title} key={i} index={i} onChange={onChangeOption} onRemove={onRemoveOption} isPollMultiple={isMultiple} onToggleMultiple={this.handleToggleMultiple} {...other} />)}\n        </ul>\n\n        <div className='poll__footer'>\n          {options.size < 4 && (\n            <button className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>\n          )}\n\n          <select value={expiresIn} onChange={this.handleSelectDuration}>\n            <option value={300}>{intl.formatMessage(messages.minutes, { number: 5 })}</option>\n            <option value={1800}>{intl.formatMessage(messages.minutes, { number: 30 })}</option>\n            <option value={3600}>{intl.formatMessage(messages.hours, { number: 1 })}</option>\n            <option value={21600}>{intl.formatMessage(messages.hours, { number: 6 })}</option>\n            <option value={86400}>{intl.formatMessage(messages.days, { number: 1 })}</option>\n            <option value={259200}>{intl.formatMessage(messages.days, { number: 3 })}</option>\n            <option value={604800}>{intl.formatMessage(messages.days, { number: 7 })}</option>\n          </select>\n        </div>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport PollForm from '../components/poll_form';\nimport { addPollOption, removePollOption, changePollOption, changePollSettings } from '../../../actions/compose';\nimport {\n  clearComposeSuggestions,\n  fetchComposeSuggestions,\n  selectComposeSuggestion,\n} from '../../../actions/compose';\n\nconst mapStateToProps = state => ({\n  suggestions: state.getIn(['compose', 'suggestions']),\n  options: state.getIn(['compose', 'poll', 'options']),\n  expiresIn: state.getIn(['compose', 'poll', 'expires_in']),\n  isMultiple: state.getIn(['compose', 'poll', 'multiple']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n  onAddOption(title) {\n    dispatch(addPollOption(title));\n  },\n\n  onRemoveOption(index) {\n    dispatch(removePollOption(index));\n  },\n\n  onChangeOption(index, title) {\n    dispatch(changePollOption(index, title));\n  },\n\n  onChangeSettings(expiresIn, isMultiple) {\n    dispatch(changePollSettings(expiresIn, isMultiple));\n  },\n\n  onClearSuggestions () {\n    dispatch(clearComposeSuggestions());\n  },\n\n  onFetchSuggestions (token) {\n    dispatch(fetchComposeSuggestions(token));\n  },\n\n  onSuggestionSelected (position, token, accountId, path) {\n    dispatch(selectComposeSuggestion(position, token, accountId, path));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PollForm);\n","import { connect } from 'react-redux';\nimport UploadProgress from '../components/upload_progress';\n\nconst mapStateToProps = state => ({\n  active: state.getIn(['compose', 'is_uploading']),\n  progress: state.getIn(['compose', 'progress']),\n});\n\nexport default connect(mapStateToProps)(UploadProgress);\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport Motion from '../../ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { FormattedMessage } from 'react-intl';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nexport default class Upload extends ImmutablePureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    media: ImmutablePropTypes.map.isRequired,\n    onUndo: PropTypes.func.isRequired,\n    onOpenFocalPoint: PropTypes.func.isRequired,\n  };\n\n  handleUndoClick = e => {\n    e.stopPropagation();\n    this.props.onUndo(this.props.media.get('id'));\n  }\n\n  handleFocalPointClick = e => {\n    e.stopPropagation();\n    this.props.onOpenFocalPoint(this.props.media.get('id'));\n  }\n\n  render () {\n    const { media } = this.props;\n    const focusX = media.getIn(['meta', 'focus', 'x']);\n    const focusY = media.getIn(['meta', 'focus', 'y']);\n    const x = ((focusX /  2) + .5) * 100;\n    const y = ((focusY / -2) + .5) * 100;\n\n    return (\n      <div className='compose-form__upload' tabIndex='0' role='button'>\n        <Motion defaultStyle={{ scale: 0.8 }} style={{ scale: spring(1, { stiffness: 180, damping: 12 }) }}>\n          {({ scale }) => (\n            <div className='compose-form__upload-thumbnail' style={{ transform: `scale(${scale})`, backgroundImage: `url(${media.get('preview_url')})`, backgroundPosition: `${x}% ${y}%` }}>\n              <div className={classNames('compose-form__upload__actions', { active: true })}>\n                <button className='icon-button' onClick={this.handleUndoClick}><Icon id='times' /> <FormattedMessage id='upload_form.undo' defaultMessage='Delete' /></button>\n                <button className='icon-button' onClick={this.handleFocalPointClick}><Icon id='pencil' /> <FormattedMessage id='upload_form.edit' defaultMessage='Edit' /></button>\n              </div>\n            </div>\n          )}\n        </Motion>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport Upload from '../components/upload';\nimport { undoUploadCompose } from '../../../actions/compose';\nimport { openModal } from '../../../actions/modal';\nimport { submitCompose } from '../../../actions/compose';\n\nconst mapStateToProps = (state, { id }) => ({\n  media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onUndo: id => {\n    dispatch(undoUploadCompose(id));\n  },\n\n  onOpenFocalPoint: id => {\n    dispatch(openModal('FOCAL_POINT', { id }));\n  },\n\n  onSubmit (router) {\n    dispatch(submitCompose(router));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Upload);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { changeComposeSensitivity } from 'mastodon/actions/compose';\nimport { injectIntl, defineMessages, FormattedMessage } from 'react-intl';\n\nconst messages = defineMessages({\n  marked: { id: 'compose_form.sensitive.marked', defaultMessage: 'Media is marked as sensitive' },\n  unmarked: { id: 'compose_form.sensitive.unmarked', defaultMessage: 'Media is not marked as sensitive' },\n});\n\nconst mapStateToProps = state => ({\n  active: state.getIn(['compose', 'sensitive']),\n  disabled: state.getIn(['compose', 'spoiler']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n  onClick () {\n    dispatch(changeComposeSensitivity());\n  },\n\n});\n\nclass SensitiveButton extends React.PureComponent {\n\n  static propTypes = {\n    active: PropTypes.bool,\n    disabled: PropTypes.bool,\n    onClick: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  render () {\n    const { active, disabled, onClick, intl } = this.props;\n\n    return (\n      <div className='compose-form__sensitive-button'>\n        <label className={classNames('icon-button', { active })} title={intl.formatMessage(active ? messages.marked : messages.unmarked)}>\n          <input\n            name='mark-sensitive'\n            type='checkbox'\n            checked={active}\n            onChange={onClick}\n            disabled={disabled}\n          />\n\n          <span className={classNames('checkbox', { active })} />\n\n          <FormattedMessage id='compose_form.sensitive.hide' defaultMessage='Mark media as sensitive' />\n        </label>\n      </div>\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(injectIntl(SensitiveButton));\n","import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport UploadProgressContainer from '../containers/upload_progress_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport UploadContainer from '../containers/upload_container';\nimport SensitiveButtonContainer from '../containers/sensitive_button_container';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class UploadForm extends ImmutablePureComponent {\n\n  static propTypes = {\n    mediaIds: ImmutablePropTypes.list.isRequired,\n  };\n\n  render () {\n    const { mediaIds } = this.props;\n\n    return (\n      <div className='compose-form__upload-wrapper'>\n        <UploadProgressContainer icon='upload' message={<FormattedMessage id='upload_progress.label' defaultMessage='Uploading…' />} />\n\n        <div className='compose-form__uploads-wrapper'>\n          {mediaIds.map(id => (\n            <UploadContainer id={id} key={id} />\n          ))}\n        </div>\n\n        {!mediaIds.isEmpty() && <SensitiveButtonContainer />}\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport UploadForm from '../components/upload_form';\n\nconst mapStateToProps = state => ({\n  mediaIds: state.getIn(['compose', 'media_attachments']).map(item => item.get('id')),\n});\n\nexport default connect(mapStateToProps)(UploadForm);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Motion from '../../ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\n\nexport default class Warning extends React.PureComponent {\n\n  static propTypes = {\n    message: PropTypes.node.isRequired,\n  };\n\n  render () {\n    const { message } = this.props;\n\n    return (\n      <Motion defaultStyle={{ opacity: 0, scaleX: 0.85, scaleY: 0.75 }} style={{ opacity: spring(1, { damping: 35, stiffness: 400 }), scaleX: spring(1, { damping: 35, stiffness: 400 }), scaleY: spring(1, { damping: 35, stiffness: 400 }) }}>\n        {({ opacity, scaleX, scaleY }) => (\n          <div className='compose-form__warning' style={{ opacity: opacity, transform: `scale(${scaleX}, ${scaleY})` }}>\n            {message}\n          </div>\n        )}\n      </Motion>\n    );\n  }\n\n}\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport Warning from '../components/warning';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport { me } from '../../../initial_state';\n\nconst APPROX_HASHTAG_RE = /(?:^|[^\\/\\)\\w])#(\\w*[a-zA-Z·]\\w*)/i;\n\nconst mapStateToProps = state => ({\n  needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']),\n  hashtagWarning: state.getIn(['compose', 'privacy']) !== 'public' && APPROX_HASHTAG_RE.test(state.getIn(['compose', 'text'])),\n  directMessageWarning: state.getIn(['compose', 'privacy']) === 'direct',\n});\n\nconst WarningWrapper = ({ needsLockWarning, hashtagWarning, directMessageWarning }) => {\n  if (needsLockWarning) {\n    return <Warning message={<FormattedMessage id='compose_form.lock_disclaimer' defaultMessage='Your account is not {locked}. Anyone can follow you to view your follower-only posts.' values={{ locked: <a href='/user-settings'><FormattedMessage id='compose_form.lock_disclaimer.lock' defaultMessage='locked' /></a> }} />} />;\n  }\n\n  if (hashtagWarning) {\n    return <Warning message={<FormattedMessage id='compose_form.hashtag_warning' defaultMessage=\"This toot won't be listed under any hashtag as it is unlisted. Only public toots can be searched by hashtag.\" />} />;\n  }\n\n  if (directMessageWarning) {\n    const message = (\n      <span>\n        <FormattedMessage id='compose_form.direct_message_warning' defaultMessage='This toot will only be sent to all the mentioned users.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a>\n      </span>\n    );\n\n    return <Warning message={message} />;\n  }\n\n  return null;\n};\n\nWarningWrapper.propTypes = {\n  needsLockWarning: PropTypes.bool,\n  hashtagWarning: PropTypes.bool,\n  directMessageWarning: PropTypes.bool,\n};\n\nexport default connect(mapStateToProps)(WarningWrapper);\n","import React from 'react';\nimport CharacterCounter from './character_counter';\nimport Button from '../../../components/button';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport ReplyIndicatorContainer from '../containers/reply_indicator_container';\nimport AutosuggestTextarea from '../../../components/autosuggest_textarea';\nimport AutosuggestInput from '../../../components/autosuggest_input';\nimport PollButtonContainer from '../containers/poll_button_container';\nimport UploadButtonContainer from '../containers/upload_button_container';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport SpoilerButtonContainer from '../containers/spoiler_button_container';\nimport PrivacyDropdownContainer from '../containers/privacy_dropdown_container';\nimport EmojiPickerDropdown from '../containers/emoji_picker_dropdown_container';\nimport PollFormContainer from '../containers/poll_form_container';\nimport UploadFormContainer from '../containers/upload_form_container';\nimport WarningContainer from '../containers/warning_container';\nimport { isMobile } from '../../../is_mobile';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { length } from 'stringz';\nimport Icon from 'mastodon/components/icon';\nimport { maxChars } from '../../../initial_state';\n\nconst allowedAroundShortCode = '><\\u0085\\u0020\\u00a0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u2028\\u2029\\u0009\\u000a\\u000b\\u000c\\u000d';\n\nconst messages = defineMessages({\n  placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' },\n  spoiler_placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Write your warning here' },\n  publish: { id: 'compose_form.publish', defaultMessage: 'Toot' },\n  publishLoud: { id: 'compose_form.publish_loud', defaultMessage: '{publish}!' },\n});\n\nexport default @injectIntl\nclass ComposeForm extends ImmutablePureComponent {\n\n  static contextTypes = {\n    router: PropTypes.object,\n  };\n\n  static propTypes = {\n    intl: PropTypes.object.isRequired,\n    text: PropTypes.string.isRequired,\n    suggestions: ImmutablePropTypes.list,\n    spoiler: PropTypes.bool,\n    privacy: PropTypes.string,\n    spoilerText: PropTypes.string,\n    focusDate: PropTypes.instanceOf(Date),\n    caretPosition: PropTypes.number,\n    preselectDate: PropTypes.instanceOf(Date),\n    isSubmitting: PropTypes.bool,\n    isChangingUpload: PropTypes.bool,\n    isUploading: PropTypes.bool,\n    onChange: PropTypes.func.isRequired,\n    onSubmit: PropTypes.func.isRequired,\n    onClearSuggestions: PropTypes.func.isRequired,\n    onFetchSuggestions: PropTypes.func.isRequired,\n    onSuggestionSelected: PropTypes.func.isRequired,\n    onChangeSpoilerText: PropTypes.func.isRequired,\n    onPaste: PropTypes.func.isRequired,\n    onPickEmoji: PropTypes.func.isRequired,\n    showSearch: PropTypes.bool,\n    anyMedia: PropTypes.bool,\n    singleColumn: PropTypes.bool,\n  };\n\n  static defaultProps = {\n    showSearch: false,\n  };\n\n  handleChange = (e) => {\n    this.props.onChange(e.target.value);\n  }\n\n  handleKeyDown = (e) => {\n    if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n      this.handleSubmit();\n    }\n  }\n\n  handleSubmit = () => {\n    if (this.props.text !== this.autosuggestTextarea.textarea.value) {\n      // Something changed the text inside the textarea (e.g. browser extensions like Grammarly)\n      // Update the state to match the current text\n      this.props.onChange(this.autosuggestTextarea.textarea.value);\n    }\n\n    // Submit disabled:\n    const { isSubmitting, isChangingUpload, isUploading, anyMedia } = this.props;\n    const fulltext = [this.props.spoilerText, this.props.text].join('');\n\n    if (isSubmitting || isUploading || isChangingUpload || length(fulltext) > maxChars || (fulltext.length !== 0 && fulltext.trim().length === 0 && !anyMedia)) {\n      return;\n    }\n\n    this.props.onSubmit(this.context.router ? this.context.router.history : null);\n  }\n\n  onSuggestionsClearRequested = () => {\n    this.props.onClearSuggestions();\n  }\n\n  onSuggestionsFetchRequested = (token) => {\n    this.props.onFetchSuggestions(token);\n  }\n\n  onSuggestionSelected = (tokenStart, token, value) => {\n    this.props.onSuggestionSelected(tokenStart, token, value, ['text']);\n  }\n\n  onSpoilerSuggestionSelected = (tokenStart, token, value) => {\n    this.props.onSuggestionSelected(tokenStart, token, value, ['spoiler_text']);\n  }\n\n  handleChangeSpoilerText = (e) => {\n    this.props.onChangeSpoilerText(e.target.value);\n  }\n\n  handleFocus = () => {\n    if (this.composeForm && !this.props.singleColumn) {\n      const { left, right } = this.composeForm.getBoundingClientRect();\n      if (left < 0 || right > (window.innerWidth || document.documentElement.clientWidth)) {\n        this.composeForm.scrollIntoView();\n      }\n    }\n  }\n\n  componentDidUpdate (prevProps) {\n    // This statement does several things:\n    // - If we're beginning a reply, and,\n    //     - Replying to zero or one users, places the cursor at the end of the textbox.\n    //     - Replying to more than one user, selects any usernames past the first;\n    //       this provides a convenient shortcut to drop everyone else from the conversation.\n    if (this.props.focusDate !== prevProps.focusDate) {\n      let selectionEnd, selectionStart;\n\n      if (this.props.preselectDate !== prevProps.preselectDate) {\n        selectionEnd   = this.props.text.length;\n        selectionStart = this.props.text.search(/\\s/) + 1;\n      } else if (typeof this.props.caretPosition === 'number') {\n        selectionStart = this.props.caretPosition;\n        selectionEnd   = this.props.caretPosition;\n      } else {\n        selectionEnd   = this.props.text.length;\n        selectionStart = selectionEnd;\n      }\n\n      this.autosuggestTextarea.textarea.setSelectionRange(selectionStart, selectionEnd);\n      this.autosuggestTextarea.textarea.focus();\n    } else if(prevProps.isSubmitting && !this.props.isSubmitting) {\n      this.autosuggestTextarea.textarea.focus();\n    } else if (this.props.spoiler !== prevProps.spoiler) {\n      if (this.props.spoiler) {\n        this.spoilerText.input.focus();\n      } else {\n        this.autosuggestTextarea.textarea.focus();\n      }\n    }\n  }\n\n  setAutosuggestTextarea = (c) => {\n    this.autosuggestTextarea = c;\n  }\n\n  setSpoilerText = (c) => {\n    this.spoilerText = c;\n  }\n\n  setRef = c => {\n    this.composeForm = c;\n  };\n\n  handleEmojiPick = (data) => {\n    const { text }     = this.props;\n    const position     = this.autosuggestTextarea.textarea.selectionStart;\n    const needsSpace   = data.custom && position > 0 && !allowedAroundShortCode.includes(text[position - 1]);\n\n    this.props.onPickEmoji(position, data, needsSpace);\n  }\n\n  render () {\n    const { intl, onPaste, showSearch, anyMedia } = this.props;\n    const disabled = this.props.isSubmitting;\n    const text     = [this.props.spoilerText, this.props.text].join('');\n    const disabledButton = disabled || this.props.isUploading || this.props.isChangingUpload || length(text) > maxChars || (text.length !== 0 && text.trim().length === 0 && !anyMedia);\n    let publishText = '';\n\n    if (this.props.privacy === 'private' || this.props.privacy === 'direct') {\n      publishText = <span className='compose-form__publish-private'><Icon id='lock' /> {intl.formatMessage(messages.publish)}</span>;\n    } else {\n      publishText = this.props.privacy !== 'unlisted' ? intl.formatMessage(messages.publishLoud, { publish: intl.formatMessage(messages.publish) }) : intl.formatMessage(messages.publish);\n    }\n\n    return (\n      <div className='compose-form'>\n        <WarningContainer />\n\n        <ReplyIndicatorContainer />\n\n        <div className={`spoiler-input ${this.props.spoiler ? 'spoiler-input--visible' : ''}`} ref={this.setRef}>\n          <AutosuggestInput\n            placeholder={intl.formatMessage(messages.spoiler_placeholder)}\n            value={this.props.spoilerText}\n            onChange={this.handleChangeSpoilerText}\n            onKeyDown={this.handleKeyDown}\n            disabled={!this.props.spoiler}\n            ref={this.setSpoilerText}\n            suggestions={this.props.suggestions}\n            onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}\n            onSuggestionsClearRequested={this.onSuggestionsClearRequested}\n            onSuggestionSelected={this.onSpoilerSuggestionSelected}\n            searchTokens={[':']}\n            id='cw-spoiler-input'\n            className='spoiler-input__input'\n          />\n        </div>\n\n        <AutosuggestTextarea\n          ref={this.setAutosuggestTextarea}\n          placeholder={intl.formatMessage(messages.placeholder)}\n          disabled={disabled}\n          value={this.props.text}\n          onChange={this.handleChange}\n          suggestions={this.props.suggestions}\n          onFocus={this.handleFocus}\n          onKeyDown={this.handleKeyDown}\n          onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}\n          onSuggestionsClearRequested={this.onSuggestionsClearRequested}\n          onSuggestionSelected={this.onSuggestionSelected}\n          onPaste={onPaste}\n          autoFocus={!showSearch && !isMobile(window.innerWidth)}\n        >\n          <EmojiPickerDropdown onPickEmoji={this.handleEmojiPick} />\n          <div className='compose-form__modifiers'>\n            <UploadFormContainer />\n            <PollFormContainer />\n          </div>\n        </AutosuggestTextarea>\n\n        <div className='compose-form__buttons-wrapper'>\n          <div className='compose-form__buttons'>\n            <UploadButtonContainer />\n            <PollButtonContainer />\n            <PrivacyDropdownContainer />\n            <SpoilerButtonContainer />\n          </div>\n          <div className='character-counter__wrapper'><CharacterCounter max={maxChars} text={text} /></div>\n        </div>\n\n        <div className='compose-form__publish'>\n          <div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabledButton} block /></div>\n        </div>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport ComposeForm from '../components/compose_form';\nimport {\n  changeCompose,\n  submitCompose,\n  clearComposeSuggestions,\n  fetchComposeSuggestions,\n  selectComposeSuggestion,\n  changeComposeSpoilerText,\n  insertEmojiCompose,\n  uploadCompose,\n} from '../../../actions/compose';\n\nconst mapStateToProps = state => ({\n  text: state.getIn(['compose', 'text']),\n  suggestions: state.getIn(['compose', 'suggestions']),\n  spoiler: state.getIn(['compose', 'spoiler']),\n  spoilerText: state.getIn(['compose', 'spoiler_text']),\n  privacy: state.getIn(['compose', 'privacy']),\n  focusDate: state.getIn(['compose', 'focusDate']),\n  caretPosition: state.getIn(['compose', 'caretPosition']),\n  preselectDate: state.getIn(['compose', 'preselectDate']),\n  isSubmitting: state.getIn(['compose', 'is_submitting']),\n  isChangingUpload: state.getIn(['compose', 'is_changing_upload']),\n  isUploading: state.getIn(['compose', 'is_uploading']),\n  showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),\n  anyMedia: state.getIn(['compose', 'media_attachments']).size > 0,\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n\n  onChange (text) {\n    dispatch(changeCompose(text));\n  },\n\n  onSubmit (router) {\n    dispatch(submitCompose(router));\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 (checked) {\n    dispatch(changeComposeSpoilerText(checked));\n  },\n\n  onPaste (files) {\n    dispatch(uploadCompose(files));\n  },\n\n  onPickEmoji (position, data, needsSpace) {\n    dispatch(insertEmojiCompose(position, data, needsSpace));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ComposeForm);\n","import { connect }   from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport NavigationBar from '../components/navigation_bar';\nimport { logOut } from 'mastodon/utils/log_out';\nimport { openModal } from 'mastodon/actions/modal';\nimport { me } from '../../../initial_state';\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    account: state.getIn(['accounts', me]),\n  };\n};\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\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)(NavigationBar));\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 '../../actions/compose';\nimport { Link } from 'react-router-dom';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport SearchContainer from './containers/search_container';\nimport Motion from '../ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport SearchResultsContainer from './containers/search_results_container';\nimport { changeComposing } from '../../actions/compose';\nimport { openModal } from 'mastodon/actions/modal';\nimport { mascot } from '../../initial_state';\nimport Icon from 'mastodon/components/icon';\nimport { logOut } from 'mastodon/utils/log_out';\n\nconst messages = defineMessages({\n  start: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n  home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },\n  notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' },\n  public: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },\n  community: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },\n  preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },\n  logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },\n  compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new toot' },\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, ownProps) => ({\n  columns: state.getIn(['settings', 'columns']),\n  showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : ownProps.isSearchPage,\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Compose extends React.PureComponent {\n\n  static propTypes = {\n    dispatch: PropTypes.func.isRequired,\n    columns: ImmutablePropTypes.list.isRequired,\n    multiColumn: PropTypes.bool,\n    showSearch: PropTypes.bool,\n    isSearchPage: PropTypes.bool,\n    intl: PropTypes.object.isRequired,\n  };\n\n  componentDidMount () {\n    const { isSearchPage } = this.props;\n\n    if (!isSearchPage) {\n      this.props.dispatch(mountCompose());\n    }\n  }\n\n  componentWillUnmount () {\n    const { isSearchPage } = this.props;\n\n    if (!isSearchPage) {\n      this.props.dispatch(unmountCompose());\n    }\n  }\n\n  handleLogoutClick = e => {\n    const { dispatch, intl } = this.props;\n\n    e.preventDefault();\n    e.stopPropagation();\n\n    dispatch(openModal('CONFIRM', {\n      message: intl.formatMessage(messages.logoutMessage),\n      confirm: intl.formatMessage(messages.logoutConfirm),\n      onConfirm: () => logOut(),\n    }));\n\n    return false;\n  }\n\n  onFocus = () => {\n    this.props.dispatch(changeComposing(true));\n  }\n\n  onBlur = () => {\n    this.props.dispatch(changeComposing(false));\n  }\n\n  render () {\n    const { multiColumn, showSearch, isSearchPage, intl } = this.props;\n\n    let header = '';\n\n    if (multiColumn) {\n      const { columns } = this.props;\n      header = (\n        <nav className='drawer__header'>\n          <Link to='/getting-started' className='drawer__tab' title={intl.formatMessage(messages.start)} aria-label={intl.formatMessage(messages.start)}><Icon id='bars' fixedWidth /></Link>\n          {!columns.some(column => column.get('id') === 'HOME') && (\n            <Link to='/timelines/home' className='drawer__tab' title={intl.formatMessage(messages.home_timeline)} aria-label={intl.formatMessage(messages.home_timeline)}><Icon id='home' fixedWidth /></Link>\n          )}\n          {!columns.some(column => column.get('id') === 'NOTIFICATIONS') && (\n            <Link to='/notifications' className='drawer__tab' title={intl.formatMessage(messages.notifications)} aria-label={intl.formatMessage(messages.notifications)}><Icon id='bell' fixedWidth /></Link>\n          )}\n          {!columns.some(column => column.get('id') === 'COMMUNITY') && (\n            <Link to='/timelines/public/local' className='drawer__tab' title={intl.formatMessage(messages.community)} aria-label={intl.formatMessage(messages.community)}><Icon id='users' fixedWidth /></Link>\n          )}\n          {!columns.some(column => column.get('id') === 'PUBLIC') && (\n            <Link to='/timelines/public' className='drawer__tab' title={intl.formatMessage(messages.public)} aria-label={intl.formatMessage(messages.public)}><Icon id='globe' fixedWidth /></Link>\n          )}\n          <a href='/user-settings' className='drawer__tab' title={intl.formatMessage(messages.preferences)} aria-label={intl.formatMessage(messages.preferences)}><Icon id='cog' fixedWidth /></a>\n          <a href='/auth/sign_out' className='drawer__tab' title={intl.formatMessage(messages.logout)} aria-label={intl.formatMessage(messages.logout)} onClick={this.handleLogoutClick}><Icon id='sign-out' fixedWidth /></a>\n        </nav>\n      );\n    }\n\n    return (\n      <div className='drawer' role='region' aria-label={intl.formatMessage(messages.compose)}>\n        {header}\n\n        {(multiColumn || isSearchPage) && <SearchContainer /> }\n\n        <div className='drawer__pager'>\n          {!isSearchPage && <div className='drawer__inner' onFocus={this.onFocus}>\n            <NavigationContainer onClose={this.onBlur} />\n\n            <ComposeFormContainer />\n\n            <div className='drawer__inner__mastodon'>\n              <img alt='' draggable='false' src={mascot || elephantUIPlane} />\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":""}