{"version":3,"sources":["webpack:///./app/javascript/brighteon/features/getting_started/index.js"],"names":["messages","defineMessages","home_timeline","notifications","public_timeline","settings_subheading","community_timeline","direct","bookmarks","preferences","follow_requests","favourites","blocks","domain_blocks","mutes","pins","lists","discover","personal","security","menu","profile_directory","GettingStarted","connect","state","myAccount","getIn","me","columns","unreadFollowRequests","ImmutableList","size","dispatch","fetchFollowRequests","injectIntl","componentDidMount","this","props","multiColumn","window","innerWidth","context","router","history","replace","render","number","limit","intl","navItems","height","push","text","formatMessage","icon","to","find","item","get","badge","href","bindToDocument","label","className","id","fixedWidth","defaultMessage","style","withHotkeys","showTrends","ImmutablePureComponent","contextTypes","PropTypes","object","isRequired","propTypes","ImmutablePropTypes","map","list","bool","func","unreadNotifications"],"mappings":"4SAgBMA,EAAWC,YAAe,CAC9BC,cAAc,CAAD,0CACbC,cAAc,CAAD,4DACbC,gBAAgB,CAAD,kEACfC,oBAAoB,CAAD,2DACnBC,mBAAmB,CAAD,wEAClBC,OAAO,CAAD,6DACNC,UAAU,CAAD,0DACTC,YAAY,CAAD,8DACXC,gBAAgB,CAAD,sEACfC,WAAW,CAAD,4DACVC,OAAO,CAAD,2DACNC,cAAc,CAAD,mEACbC,MAAM,CAAD,wDACLC,KAAK,CAAD,wDACJC,MAAM,CAAD,kDACLC,SAAS,CAAD,wDACRC,SAAS,CAAD,wDACRC,SAAS,CAAD,wDACRC,KAAK,CAAD,+DACJC,kBAAkB,CAAD,qEA2BbC,EAFUC,mBAtBQ,SAAAC,GAAK,MAAK,CAChCC,UAAWD,EAAME,MAAM,CAAC,WAAYC,MACpCC,QAASJ,EAAME,MAAM,CAAC,WAAY,YAClCG,qBAAsBL,EAAME,MAAM,CAAC,aAAc,kBAAmB,SAAUI,kBAAiBC,KAHpE,IAMF,SAAAC,GAAQ,MAAK,CACtCC,oBAAqB,kBAAMD,EAASC,cAAf,EADY,G,GAiBlCC,a,4GAiBCC,kBAAA,WACE,MAA6CC,KAAKC,MAA1CJ,EAAR,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YAAC,IAAD,IAGnC,E,GAtH0BC,K,EAEpBC,aAAe,CACpB7B,OAAQ8B,IAAUC,OAAOC,Y,EAGpBC,UAAY,CACjB3B,KAAMwB,IAAUC,OAAOC,WACvBjD,UAAWmD,IAAmBC,IAAIH,WAClC9C,QAASgD,IAAmBE,KAC5BxC,YAAakC,IAAUO,KACvB9C,oBAAqBuC,IAAUQ,KAAKN,WACpC7C,qBAAsB2C,IAAU1B,OAChCmC,oBAAqBT,IAAU1B,Q","file":"js/features/getting_started-62dfeb7d16311d4342b0.chunk.js","sourcesContent":["import React from 'react';\nimport Column from '../ui/components/column';\nimport ColumnLink from '../ui/components/column_link';\nimport ColumnSubheading from '../ui/components/column_subheading';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, profile_directory, showTrends } from '../../initial_state';\nimport { fetchFollowRequests } from 'brighteon/actions/accounts';\nimport { List as ImmutableList } from 'immutable';\nimport Icon from 'brighteon/components/icon';\nimport LinkFooter from 'brighteon/features/ui/components/link_footer';\nimport TrendsContainer from './containers/trends_container';\n\nconst messages = defineMessages({\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: 'Live Stream' },\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 follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },\n favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },\n blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },\n domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },\n mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },\n pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned posts' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n discover: { id: 'navigation_bar.discover', defaultMessage: 'Discover' },\n personal: { id: 'navigation_bar.personal', defaultMessage: 'Personal' },\n security: { id: 'navigation_bar.security', defaultMessage: 'Security' },\n menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n profile_directory: { id: 'getting_started.directory', defaultMessage: 'Profile directory' },\n});\n\nconst mapStateToProps = 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});\n\nconst mapDispatchToProps = dispatch => ({\n fetchFollowRequests: () => dispatch(fetchFollowRequests()),\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\nconst NAVIGATION_PANEL_BREAKPOINT = 600 + (285 * 2) + (10 * 2);\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass GettingStarted extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object.isRequired,\n };\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 };\n\n componentDidMount() {\n const { fetchFollowRequests, multiColumn } = this.props;\n\n if (!multiColumn && window.innerWidth >= NAVIGATION_PANEL_BREAKPOINT) {\n this.context.router.history.replace('/timelines/home');\n return;\n }\n\n fetchFollowRequests();\n }\n\n render() {\n const { intl, myAccount, columns, multiColumn, unreadFollowRequests } = this.props;\n\n const navItems = [];\n let height = (multiColumn) ? 0 : 60;\n\n if (multiColumn) {\n navItems.push(\n ,\n ,\n ,\n );\n\n height += 34 + 48 * 2;\n\n if (profile_directory) {\n navItems.push(\n ,\n );\n\n height += 48;\n }\n\n navItems.push(\n ,\n );\n\n height += 34;\n } else if (profile_directory) {\n navItems.push(\n ,\n );\n\n height += 48;\n }\n\n if (multiColumn && !columns.find(item => item.get('id') === 'HOME')) {\n navItems.push(\n ,\n );\n height += 48;\n }\n\n navItems.push(\n ,\n ,\n ,\n ,\n );\n\n height += 48 * 4;\n\n if (myAccount.get('locked') || unreadFollowRequests > 0) {\n navItems.push();\n height += 48;\n }\n\n if (!multiColumn) {\n navItems.push(\n ,\n ,\n );\n\n height += 34 + 48;\n }\n\n return (\n \n {multiColumn &&
\n

\n \n

\n
}\n\n
\n
\n {/*{!multiColumn && }*/}\n {navItems}\n
\n\n {!multiColumn &&
}\n\n \n
\n\n {multiColumn && showTrends && }\n \n );\n }\n\n}\n"],"sourceRoot":""}