{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/getting_started/index.js"],"names":["messages","defineMessages","_defineMessages","heading","id","defaultMessage","home_timeline","notifications","public_timeline","navigation_subheading","settings_subheading","community_timeline","direct","bookmarks","preferences","settings","follow_requests","sign_out","lists","keyboard_shortcuts","lists_subheading","misc","menu","badgeDisplay","number","limit","GettingStarted","connect","getOrderedLists","createSelector","state","get","toList","filter","item","sort","a","b","localeCompare","myAccount","getIn","me","columns","unreadFollowRequests","ImmutableList","size","unreadNotifications","dispatch","fetchFollowRequests","fetchLists","openSettings","openModal","injectIntl","componentWillMount","this","props","componentDidMount","_this$props","render","_this$props2","intl","multiColumn","navItems","listItems","find","push","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_features_ui_components_column_link__WEBPACK_IMPORTED_MODULE_5__","icon","text","formatMessage","to","badge","concat","map","list","Number","toString","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_4__","name","label","hideHeadingOnMobile","className","flavours_glitch_features_ui_components_column_subheading__WEBPACK_IMPORTED_MODULE_6__","undefined","preferencesLink","href","onClick","signOutLink","method","invitesEnabled","target","react_intl__WEBPACK_IMPORTED_MODULE_7__","values","github","rel","version","Mastodon","ImmutablePureComponent","PropTypes","object","isRequired","ImmutablePropTypes","bool","func"],"mappings":"2TAiBMA,EAAWC,cAAcC,EAAA,CAC7BC,QAAO,CAAAC,GAAA,0BAAAC,eAAA,mBACPC,cAAa,CAAAF,GAAA,gBAAAC,eAAA,QACbE,cAAa,CAAAH,GAAA,yBAAAC,eAAA,iBACbG,gBAAe,CAAAJ,GAAA,iCAAAC,eAAA,sBACfI,sBAAqB,CAAAL,GAAA,+BAAAC,eAAA,cACrBK,oBAAmB,CAAAN,GAAA,6BAAAC,eAAA,YACnBM,mBAAkB,CAAAP,GAAA,oCAAAC,eAAA,kBAClBO,OAAM,CAAAR,GAAA,wBAAAC,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IAAUK,KAAKH,WACpC3D,qBAAsByD,IAAU5E,OAChCsB,oBAAqBsD,IAAU5E,OAC/BN,MAAOqF,IAAmB3B,KAC1B3B,WAAYmD,IAAUK,KAAKH,WAC3BpD,aAAckD,IAAUK,KAAKH","file":"flavours/glitch/async/getting_started.js","sourcesContent":["import React from 'react';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnLink from 'flavours/glitch/features/ui/components/column_link';\nimport ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\nimport { openModal } from 'flavours/glitch/actions/modal';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, invitesEnabled, version } from 'flavours/glitch/util/initial_state';\nimport { fetchFollowRequests } from 'flavours/glitch/actions/accounts';\nimport { List as ImmutableList } from 'immutable';\nimport { createSelector } from 'reselect';\nimport { fetchLists } from 'flavours/glitch/actions/lists';\nimport { preferencesLink, profileLink, signOutLink } from 'flavours/glitch/util/backend_links';\n\nconst messages = defineMessages({\n heading: { 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_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },\n navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' },\n settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' },\n community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },\n direct: { id: 'navigation_bar.direct', defaultMessage: 'Direct messages' },\n bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },\n preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },\n settings: { id: 'navigation_bar.app_settings', defaultMessage: 'App settings' },\n follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },\n sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n lists_subheading: { id: 'column_subheading.lists', defaultMessage: 'Lists' },\n misc: { id: 'navigation_bar.misc', defaultMessage: 'Misc' },\n menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n});\n\nconst makeMapStateToProps = () => {\n const getOrderedLists = createSelector([state => state.get('lists')], lists => {\n if (!lists) {\n return lists;\n }\n\n return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));\n });\n\n const mapStateToProps = state => ({\n lists: getOrderedLists(state),\n myAccount: state.getIn(['accounts', me]),\n columns: state.getIn(['settings', 'columns']),\n unreadFollowRequests: state.getIn(['user_lists', 'follow_requests', 'items'], ImmutableList()).size,\n unreadNotifications: state.getIn(['notifications', 'unread']),\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = dispatch => ({\n fetchFollowRequests: () => dispatch(fetchFollowRequests()),\n fetchLists: () => dispatch(fetchLists()),\n openSettings: () => dispatch(openModal('SETTINGS', {})),\n});\n\nconst badgeDisplay = (number, limit) => {\n if (number === 0) {\n return undefined;\n } else if (limit && number >= limit) {\n return `${limit}+`;\n } else {\n return number;\n }\n};\n\n@connect(makeMapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class GettingStarted extends ImmutablePureComponent {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n columns: ImmutablePropTypes.list,\n multiColumn: PropTypes.bool,\n fetchFollowRequests: PropTypes.func.isRequired,\n unreadFollowRequests: PropTypes.number,\n unreadNotifications: PropTypes.number,\n lists: ImmutablePropTypes.list,\n fetchLists: PropTypes.func.isRequired,\n openSettings: PropTypes.func.isRequired,\n };\n\n componentWillMount () {\n this.props.fetchLists();\n }\n\n componentDidMount () {\n const { myAccount, fetchFollowRequests } = this.props;\n\n if (myAccount.get('locked')) {\n fetchFollowRequests();\n }\n }\n\n render () {\n const { intl, myAccount, columns, multiColumn, unreadFollowRequests, unreadNotifications, lists, openSettings } = this.props;\n\n const navItems = [];\n let listItems = [];\n\n if (multiColumn) {\n if (!columns.find(item => item.get('id') === 'HOME')) {\n navItems.push(
\n