{"version":3,"sources":["../node_modules/lodash/orderBy.js","../node_modules/lodash/_baseOrderBy.js","../node_modules/lodash/_baseSortBy.js","../node_modules/lodash/_compareMultiple.js","../node_modules/lodash/_compareAscending.js","../node_modules/lodash/_baseMap.js","../node_modules/lodash/findIndex.js","actions/styleAction.js","actions/categoryAction.js","containers/Browse/TrackLink.js","styles/svg-components/CollectionsPlaceholder.js","containers/Browse/Collections.js","containers/Browse/StylesDropdown.js","components/Toggle/Select.js","components/ToggleOption/index.js","components/Toggle/index.js","containers/Browse/Duration.js","styles/svg-components/Calm.js","styles/svg-components/VeryCalm.js","styles/svg-components/Moderate.js","styles/svg-components/Energetic.js","styles/svg-components/Intense.js","styles/svg-components/Climactic.js","styles/svg-components/Instrumental.js","styles/svg-components/MaleVocals.js","styles/svg-components/FemaleVocals.js","styles/svg-components/VocalElements.js","styles/svg-components/Duet.js","styles/svg-components/Choir.js","containers/Browse/FilterLink.js","containers/Browse/MoodFilter.js","containers/Browse/FilterBlock.js","styles/svg-components/VocalElementsGray.js","containers/Browse/MobileFilter.js","containers/Browse/StyleFilter.js","containers/Browse/CategoryFilter.js","containers/Browse/FilterBar.js","styles/js/browse-sub-dropdown.js","containers/Browse/index.js","../node_modules/lodash/find.js","../node_modules/lodash/_createFind.js"],"names":["baseOrderBy","require","isArray","module","exports","collection","iteratees","orders","guard","undefined","arrayMap","baseIteratee","baseMap","baseSortBy","baseUnary","compareMultiple","identity","index","length","result","value","key","iteratee","object","other","array","comparer","sort","compareAscending","objCriteria","criteria","othCriteria","ordersLength","isSymbol","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","baseEach","isArrayLike","Array","baseFindIndex","toInteger","nativeMax","Math","max","predicate","fromIndex","fetchStyle","styleId","fetch","conditionallyGetCdnApi","method","then","res","json","catch","err","fetchCategoryStyles","id","fetchTrackStyles","trackId","fetchPopularStyles","fetchStyleMoods","fetchAllStyles","dispatch","response","error","console","log","styles","type","receiveStyles","fetchCategories","fetchStyleCategories","categories","receiveStyleCategories","receiveCategories","styled","Link","CollectionsPlaceholder","src","React","Component","Collections","props","breakpoint1","breakpoint2","breakpoint3","afterChangeHandler","bind","$","slickSlideLength","window","width","css","i","this","settings","arrows","slidesToShow","slidesToScroll","infinite","responsive","breakpoint","className","collections","A","to","afterChange","breakpointHandler","map","onClick","onResultClick","slug","Img","checkImage","alt","name","thumbnail_image","image_aws_url","StylesDropdown","href","CrossSVG","select","injectIntl","message","intl","formatMessage","Toggle","Duration","durationStart","durationEnd","durationMin","durationMax","onDurationSelect","formatter","slideStop","step","min","CalmSVG","VeryCalmSVG","ModerateSVG","EnergeticSVG","IntenseSVG","ClimacticSVG","InstrumentalSVG","FemaleVocalsSVG","VocalElementsSVG","DuetSVG","checkClass","filterDisabled","applied","checkOnClick","onFilterSelect","FilterLink","filter","Calm","VeryCalm","Moderate","Energetic","Intense","Climactic","Instrumental","MaleVocals","FemaleVocals","VocalElements","Duet","Choir","MoodFilter","display","allStyleFilters","indexOf","mood","state","onMoodSelect","trackCount","setState","onStyleFilterSelect","li","FilterBlock","removeFilter","VocalElementsGraySVG","MVName","VocalElementsGray","StyleFilter","style","checkActive","CategoryFilter","activeCategory","activeStyles","category","onMouseEnter","handleMouseEnter","onMouseLeave","handleMouseLeave","rposition","countActive","track_style","orderBy","defaultProps","FilterBar","dropdown","durationSliderMin","durationSliderMax","checkChildren","checkEnergyFilter","removeDropdown","addDropdown","handleDurationSelect","formatTime","removeSearchTerms","checkMoods","addClass","on","toggleClass","height","durationData","shortest_duration","floor","ceil","longest_duration","removeClass","sortedMoods","visibleMoods","browseStyleId","_","styleFilters","children","energy","energyTrackCounts","findIndex","x","vocal","vocalTrackCounts","event","target","startMins","endMins","startSecs","endSecs","startTime","removeStyleFilters","duration","durations","split","durationsStart","durationsEnd","parseInt","context","push","startEndDuration","getStartEndFromDuration","removeEnergy","removeVocal","energies","vocals","defaultSort","clearButton","clearCounter","forEach","searchTerm","removeAll","loadingSpinner","loading","Spinner","Object","keys","order","style_category","sessionStorage","getItem","breadcrumb","decodeURIComponent","resultCount","allTracksCount","checkCategoriesChildren","checkVocalFilter","Browse","appliedFilters","mapKeys","location","query","v","k","toLowerCase","stylefilters","JSON","parse","page","onDurationValue","previousPage","indexedMoods","filter_track_counts","onFetchAllStyles","onFetchStyleCategories","onFetchEnergies","onFetchVocals","onSortToggle","handleFilterSelect","onPageSelect","reloaded","loadData","nextProps","String","onSetFiltered","onSetAppliedFilters","urlParameters","urlString","entries","parameter","join","router","replace","url","onSetNotFiltered","assign","stringify","dataset","filterId","splice","onUnSetAppliedFilters","currentTarget","allTracks","tracks","isFetching","filter_track_styles","filterTrackCounts","filterMoodsCounts","filter_track_moods","result_ids","filterCategory","parent","moodCount","find","count","styleCount","filterCategoryIndex","selectedStyle","filter_energy_track_counts","filter_vocal_track_counts","filter_duration_data","pagination","totalCount","hideCollection","hideSort","moods","hero","TrackPlayer","browseType","contextTypes","PropTypes","connect","userData","get","fetchEnergies","fetchVocals","setFiltered","setNotFiltered","locationQuery","setAppliedFilters","unSetAppliedFilters","withRouter","createFind","findIndexFunc","iterable"],"mappings":"oGAAA,IAAIA,EAAcC,EAAQ,MACtBC,EAAUD,EAAQ,IA6CtBE,EAAOC,QAdP,SAAiBC,EAAYC,EAAWC,EAAQC,GAC9C,OAAkB,MAAdH,EACK,IAEJH,EAAQI,KACXA,EAAyB,MAAbA,EAAoB,GAAK,CAACA,IAGnCJ,EADLK,EAASC,OAAQC,EAAYF,KAE3BA,EAAmB,MAAVA,EAAiB,GAAK,CAACA,IAE3BP,EAAYK,EAAYC,EAAWC,M,qBC3C5C,IAAIG,EAAWT,EAAQ,KACnBU,EAAeV,EAAQ,KACvBW,EAAUX,EAAQ,KAClBY,EAAaZ,EAAQ,MACrBa,EAAYb,EAAQ,KACpBc,EAAkBd,EAAQ,MAC1Be,EAAWf,EAAQ,KA2BvBE,EAAOC,QAhBP,SAAqBC,EAAYC,EAAWC,GAC1C,IAA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Y,SAAS7B,GAAO,OAAOC,EAAS2V,EAAS5V,GAAMA,EAAK4V,IAElE,IAAIhW,EAAQ+V,EAAc3W,EAAY6C,EAAWC,GACjD,OAAOlC,GAAS,EAAIgW,EAAS3V,EAAWjB,EAAWY,GAASA,QAASR","file":"static/js/3.chunk.js?hash=208bb820","sourcesContent":["var baseOrderBy = require('./_baseOrderBy'),\n isArray = require('./isArray');\n\n/**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\nfunction orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n}\n\nmodule.exports = orderBy;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\n","var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n","var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","import fetch from 'isomorphic-fetch';\nimport Config, {\n API,\n} from '../constants';\nimport {conditionallyGetCdnApi} from \"./generalAction\";\n\nexport function fetchStyle(styleId) {\n return fetch(`${conditionallyGetCdnApi()}styles/${styleId}`, {\n method: 'GET',\n // mode: 'CORS',\n }).then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchCategoryStyles(id) {\n return fetch(`${conditionallyGetCdnApi()}styles/${id}/category`, {\n method: 'GET',\n // mode: 'CORS',\n }).then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchTrackStyles(trackId) {\n return fetch(`${conditionallyGetCdnApi()}styles/${trackId}/track`, {\n method: 'GET',\n }).then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchPopularStyles() {\n return fetch(`${conditionallyGetCdnApi()}styles/1/popular`, {\n method: 'GET',\n // mode: 'CORS',\n }).then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchStyleMoods(trackId) {\n return fetch(`${conditionallyGetCdnApi()}styles/${trackId}/moods`, {\n method: 'GET',\n // mode: 'CORS',\n }).then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchAllStyles() {\n return function (dispatch) {\n return fetch(`${conditionallyGetCdnApi()}styles`, {\n method: 'GET',\n // mode: 'CORS',\n })\n .then(\n (response) => response.json(),\n (error) => console.log('An error occured.', error)\n )\n .then((json) => {\n dispatch(receiveStyles(json));\n }\n );\n };\n}\n\nfunction receiveStyles(styles) {\n if (styles) {\n return { type: 'ADD_STYLES', styles };\n }\n}\n\n","import fetch from 'isomorphic-fetch';\nimport Config, {\n API,\n} from '../constants';\nimport {conditionallyGetCdnApi} from \"./generalAction\";\n\n// Delete ?\nexport function fetchCategories() {\n return fetch(`${conditionallyGetCdnApi()}categories`, {\n method: 'GET',\n })\n .then((res) => res.json())\n .catch((err) => err);\n}\n\nexport function fetchStyleCategories() {\n return function (dispatch) {\n return fetch(`${conditionallyGetCdnApi()}category/style`, {\n method: 'GET',\n })\n .then(\n (response) => response.json(),\n (error) => console.log('An error occured.', error)\n )\n .then((json) => {\n receiveCategories(dispatch, json);\n });\n };\n}\n\nfunction receiveCategories(dispatch, categories) {\n dispatch(receiveStyleCategories(categories));\n}\n\nfunction receiveStyleCategories(categories) {\n return { type: 'ADD_CATEGORIES', categories };\n}\n\nfunction receiveMoodCategories(mood) {\n return { type: 'ADD_MOODS', moods: mood.track_style };\n}\n","import { Link } from 'react-router';\nimport styled from 'styled-components';\n\nexport default styled(Link)`\n display: inline-block;\n padding: 0.25em 2em;\n margin: 1em;\n text-decoration: none;\n border-radius: 4px;\n -webkit-font-smoothing: antialiased;\n -webkit-touch-callout: none;\n user-select: none;\n cursor: pointer;\n outline: 0;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-weight: bold;\n font-size: 16px;\n border: 2px solid #41ADDD;\n color: #41ADDD;\n \n &:active {\n background: #41ADDD;\n color: #FFF;\n }\n`;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass CollectionsPlaceholder extends React.Component {\n render() {\n const CollectionsPlaceholder = ``;\n return (\n \n );\n }\n}\n\nexport default CollectionsPlaceholder;\n","import React from 'react';\nimport { Link } from 'react-router';\nimport PropTypes from 'prop-types';\nimport ArtistLink from './TrackLink';\nimport $ from 'jquery';\nimport Slider from \"react-slick\";\nimport Img from 'components/Img';\nimport CollectionsPlaceholder from 'styles/svg-components/CollectionsPlaceholder.js';\nimport A from 'components/A';\n\nexport default class Collections extends React.Component {\n constructor(props) {\n super(props);\n\n this.breakpoint1 = 1350;\n this.breakpoint2 = 1600;\n this.breakpoint3 = 1700;\n\n this.afterChangeHandler = this.afterChangeHandler.bind(this);\n }\n componentDidMount() {\n let slickSlide = $('.slick-slide');\n let slickSlideLength = $('.slick-slide').length;\n\n if($(window).width() < 1200) {\n if(slickSlideLength <= 5) {\n $(\".slick-next\").css(\"opacity\", \"0\");\n }\n } else {\n if(slickSlideLength <= 6) {\n $(\".slick-next\").css(\"opacity\", \"0\");\n }\n }\n }\n breakpointHandler(i){\n return;\n }\n afterChangeHandler(i){\n if( $(window).width() < this.breakpoint1) {\n if(i === 5) {\n $(\".slick-prev\").css(\"opacity\", \"1\");\n }\n if(i === 0) {\n $(\".slick-prev\").css(\"opacity\", \"0\");\n }\n } else if ( $(window).width() < this.breakpoint2) {\n if(i === 6) {\n $(\".slick-prev\").css(\"opacity\", \"1\");\n }\n if(i === 0) {\n $(\".slick-prev\").css(\"opacity\", \"0\");\n }\n } else if ( $(window).width() < this.breakpoint3) {\n if(i === 7) {\n $(\".slick-prev\").css(\"opacity\", \"1\");\n }\n if(i === 0) {\n $(\".slick-prev\").css(\"opacity\", \"0\");\n }\n } else {\n if(i === 8) {\n $(\".slick-prev\").css(\"opacity\", \"1\");\n }\n if(i === 0) {\n $(\".slick-prev\").css(\"opacity\", \"0\");\n }\n }\n }\n render() {\n var settings = {\n arrows: true,\n slidesToShow: 8,\n slidesToScroll: 8,\n infinite: false,\n responsive: [\n {\n breakpoint: this.breakpoint3,\n settings: {\n slidesToShow: 7,\n slidesToScroll: 7,\n }\n },\n {\n breakpoint: this.breakpoint2,\n settings: {\n slidesToShow: 6,\n slidesToScroll: 6,\n }\n },\n {\n breakpoint: this.breakpoint1,\n settings: {\n slidesToShow: 5,\n slidesToScroll: 5,\n }\n }\n ]\n };\n return (\n
\n { this.props.collections.length > 0 &&\n
\n
\n

Collections

\n \n {this.props.collections && this.props.collections.map((collection) => (\n
this.props.onResultClick('collection', collection.id)} data-key={collection.id} key={collection.id}>\n \n {`${collection.name}`}\n
\n \n
\n )) }\n\n {this.props.collections.length < 2 ? (
) : '' }\n {this.props.collections.length < 3 ? (
) : '' }\n {this.props.collections.length < 4 ? (
) : '' }\n {this.props.collections.length < 5 ? (
) : '' }\n {this.props.collections.length < 6 && $(window).width() >= this.breakpoint1 ? (
) : '' }\n {this.props.collections.length < 7 && $(window).width() >= this.breakpoint2 ? (
) : '' }\n {this.props.collections.length < 8 && $(window).width() >= this.breakpoint3 ? (
) : '' }\n
\n
\n
\n }\n
\n );\n }\n}\n\nfunction checkImage(collection) {\n if (collection.thumbnail_image) {\n return collection.thumbnail_image.image_aws_url;\n }\n return null;\n}\n\n// Collections.propTypes = {\n// collections: PropTypes.object,\n// };\n","import React from 'react';\nimport { Link } from 'react-router';\nimport ArtistLink from './TrackLink';\nimport CrossSVG from 'styles/svg-components/CrossSVG.js';\n\nimport Img from 'components/Img';\n\nexport default class StylesDropdown extends React.Component { // eslint-disable-line react/prefer-stateless-function\n\n render() {\n return (\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n );\n }\n}\n","import styled from 'styled-components';\n\nconst Select = styled.select`\n line-height: 1em;\n height: 20px;\n`;\n\nexport default Select;\n","/**\n*\n* ToggleOption\n*\n*/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, intlShape } from 'react-intl';\n\nconst ToggleOption = ({ value, message, intl }) => (\n \n);\n\nToggleOption.propTypes = {\n value: PropTypes.string.isRequired,\n message: PropTypes.object,\n intl: intlShape.isRequired,\n};\n\nexport default injectIntl(ToggleOption);\n","/**\n*\n* LocaleToggle\n*\n*/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Select from './Select';\nimport ToggleOption from '../ToggleOption';\n\nfunction Toggle(props) {\n let content = ();\n\n // If we have items, render them\n if (props.values) {\n content = props.values.map((value) => (\n \n ));\n }\n\n return (\n \n );\n}\n\nToggle.propTypes = {\n onToggle: PropTypes.func,\n values: PropTypes.array,\n value: PropTypes.string,\n // messages: PropTypes.object,\n};\n\nexport default Toggle;\n","import React from 'react';\nimport ReactBootstrapSlider from 'react-bootstrap-slider';\n\nconst Duration = ({ durationStart, durationEnd, durationMin, durationMax, onDurationSelect, formatter }) => (\n
\n \n
\n);\n\nexport default Duration;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass CalmSVG extends React.Component {\n render() {\n const calmSVG = ``;\n return (\n \n );\n }\n}\n\nexport default CalmSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass VeryCalmSVG extends React.Component {\n render() {\n const verycalmSVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default VeryCalmSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass ModerateSVG extends React.Component {\n render() {\n const moderateSVG = ``;\n return (\n \n );\n }\n}\n\nexport default ModerateSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass EnergeticSVG extends React.Component {\n render() {\n const energeticSVG = ``;\n return (\n \n );\n }\n}\n\nexport default EnergeticSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass IntenseSVG extends React.Component {\n render() {\n const intenseSVG = ``;\n return (\n \n );\n }\n}\n\nexport default IntenseSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass ClimacticSVG extends React.Component {\n render() {\n const climacticSVG = ``;\n return (\n \n );\n }\n}\n\nexport default ClimacticSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass InstrumentalSVG extends React.Component {\n render() {\n const instrumentalSVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default InstrumentalSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass ClimacticSVG extends React.Component {\n render() {\n const climacticSVG = `\n\n\n\n\n\n\n\t\n\t\n\t\n\t\n\n\n`;\n return (\n \n );\n }\n}\n\nexport default ClimacticSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass FemaleVocalsSVG extends React.Component {\n render() {\n const femalevocalsSVG = `\n\n\n\n\n\n\n\t\n\t\n\t\n\t\n\t\n\n\n`;\n return (\n \n );\n }\n}\n\nexport default FemaleVocalsSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass VocalElementsSVG extends React.Component {\n render() {\n const vocalelementsSVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default VocalElementsSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass DuetSVG extends React.Component {\n render() {\n const duetSVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default DuetSVG;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass FemaleVocalsSVG extends React.Component {\n render() {\n const femalevocalsSVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default FemaleVocalsSVG;\n","import React from 'react';\nimport { Link } from 'react-router';\nimport CalmSVG from '../../styles/svg-components/Calm.js';\nimport VeryCalmSVG from '../../styles/svg-components/VeryCalm.js';\nimport ModerateSVG from '../../styles/svg-components/Moderate.js';\nimport EnergeticSVG from '../../styles/svg-components/Energetic.js';\nimport IntenseSVG from '../../styles/svg-components/Intense.js';\nimport ClimacticSVG from '../../styles/svg-components/Climactic.js';\nimport InstrumentalSVG from '../../styles/svg-components/Instrumental.js';\nimport MaleVocalsSVG from '../../styles/svg-components/MaleVocals.js';\nimport FemaleVocalsSVG from '../../styles/svg-components/FemaleVocals.js';\nimport VocalElementsSVG from '../../styles/svg-components/VocalElements.js';\nimport DuetSVG from '../../styles/svg-components/Duet.js';\nimport ChoirSVG from '../../styles/svg-components/Choir.js';\n\nconst FilterLink = ({ onFilterSelect, filter, type, applied, filterDisabled }) => (\n
  • \n \n
    \n \n {filter.name === 'Calm' &&\n \n }\n {filter.name === 'Very Calm' &&\n \n }\n {filter.name === 'Moderate' &&\n \n }\n {filter.name === 'Energetic' &&\n \n }\n {filter.name === 'Intense' &&\n \n }\n {filter.name === 'Climactic' &&\n \n }\n {filter.name === 'Instrumental' &&\n \n }\n {filter.name === 'Lyrics: Male' &&\n \n }\n {filter.name === 'Lyrics: Female' &&\n \n }\n {filter.name === 'Vocal Elements' &&\n \n }\n {filter.name === 'Lyrics: Duet' &&\n \n }\n {filter.name === 'Choir' &&\n \n }\n \n
    \n {filter.name}\n \n
  • \n);\n\nfunction checkClass(filterDisabled, applied) {\n if (filterDisabled == true) {\n return 'filter-state-text-unavailable';\n }\n if (filterDisabled == false && applied === true) {\n return 'filter-state-text-applied';\n }\n if (filterDisabled == false && applied) {\n return null;\n }\n}\n\nfunction checkOnClick(onFilterSelect, filterDisabled) {\n if (filterDisabled == true) {\n return null;\n }\n return onFilterSelect;\n}\n\nexport default FilterLink;\n","import React from 'react';\nimport className from 'classnames';\n\nexport default class MoodFilter extends React.Component {\n constructor(props) {\n super(props);\n let display = false;\n if (this.props.allStyleFilters.indexOf(this.props.mood.id) === -1) {\n display = true;\n }\n this.state = {\n display,\n };\n this.onMoodSelect = this.onMoodSelect.bind(this);\n }\n\n onMoodSelect() {\n if (this.props.mood.trackCount === 0) return false;\n this.setState({\n display: false,\n });\n this.props.onStyleFilterSelect(this.props.mood);\n return false;\n }\n\n render() {\n let li = '';\n if (this.state.display) {\n li = (\n
  • \n \n {this.props.mood.name}{' '}\n ({this.props.mood.trackCount})\n \n
  • );\n }\n return (\n {li}\n );\n }\n}\n\n// const MoodFilter = ({ onStyleFilterSelect, mood, allStyleFilters }) => (\n//
  • {mood.name}
  • \n// );\n\n\n// const MoodFilter = ({ onStyleFilterSelect, mood, allStyleFilters }) => (\n//
  • {mood.name}\n//
      \n// {mood.children && mood.children.map((style, index) => (\n// onStyleFilterSelect(style)} key={index} style={style} allStyleFilters={allStyleFilters} />)) }\n//
    \n//
  • \n// );\n\n","import React from 'react';\nimport Cross from 'styles/svg-components/CrossSVG.js';\nimport A from 'components/A';\n\nconst FilterBlock = ({ filter, removeFilter, type }) => (\n
  • \n {filter}\n \n
    \n
    \n
  • \n);\n\nexport default FilterBlock;\n","import React from \"react\";\nimport InlineSVG from 'svg-inline-react';\n\nclass VocalElementsGraySVG extends React.Component {\n render() {\n const vocalelementsgraySVG = `\n`;\n return (\n \n );\n }\n}\n\nexport default VocalElementsGraySVG;\n","import React from 'react';\nimport Cross from 'styles/svg-components/CrossSVG.js';\nimport MVNameSVG from 'styles/svg-components/MVName.js';\nimport VeryCalmSVG from 'styles/svg-components/VeryCalm.js';\nimport CalmSVG from 'styles/svg-components/Calm.js';\nimport ModerateSVG from 'styles/svg-components/Moderate.js';\nimport IntenseSVG from 'styles/svg-components/Intense.js';\nimport EnergeticSVG from 'styles/svg-components/Energetic.js';\nimport ClimacticSVG from 'styles/svg-components/Climactic.js';\nimport InstrumentalSVG from 'styles/svg-components/Instrumental.js';\nimport MaleVocalsSVG from 'styles/svg-components/MaleVocals.js';\nimport FemaleVocalsSVG from 'styles/svg-components/FemaleVocals.js';\nimport DuetSVG from 'styles/svg-components/Duet.js';\nimport VocalElementsGraySVG from 'styles/svg-components/VocalElementsGray.js';\nimport ChoirSVG from 'styles/svg-components/Choir.js';\n\nexport default class MoodFilter extends React.Component {\n render() {\n return (\n
    \n
    \n
    \n \n
    \n

    \n \n

    \n

    Filters

    \n
    \n
    \n \n
    \n
    \n ← Select A Category \n
    \n
    \n );\n }\n}\n","import React from 'react';\n\nconst StyleFilter = ({ type, onStyleFilterSelect, style, allStyleFilters }) => (\n checkActive(type, onStyleFilterSelect, style, allStyleFilters)\n);\n\nfunction checkActive(type, onStyleFilterSelect, style, allStyleFilters) {\n const trackCount = `(${style.trackCount})`;\n const onClick = onStyleFilterSelect;\n if (allStyleFilters.indexOf(style.id) === -1 && ((type === 'category') || type === 'mood')) {\n return (\n
  • \n \n {style.name} {trackCount}\n \n
  • \n );\n }\n return null;\n}\n\nexport default StyleFilter;\n","import orderBy from 'lodash/orderBy';\nimport className from 'classnames';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport StyleFilter from './StyleFilter';\n\nclass CategoryFilter extends Component {\n constructor(props) {\n super(props);\n this.state = {\n activeCategory: null,\n };\n }\n handleMouseEnter(value) {\n this.setState({ activeCategory: value.id });\n }\n handleMouseLeave() {\n this.setState({ activeCategory: null });\n }\n\n countActive(styles) {\n var activeStyles = 0;\n\n for (var i = 0; i < styles.length; i++) {\n if ( this.props.allStyleFilters.indexOf(styles[i].id) === -1 ) {\n activeStyles++;\n }\n }\n\n return activeStyles;\n }\n\n render() {\n const { onStyleFilterSelect, category, allStyleFilters } = this.props;\n return (\n this.handleMouseEnter(category)}\n onMouseLeave={() => this.handleMouseLeave()}\n className={className({\n rposition: (this.countActive(category.track_style) <= 15),\n 'filter-state-text-unavailable': (this.countActive(category.track_style) === 0),\n 'filter__dropdown-active': this.state.activeCategory === category.id,\n })}\n >\n \n {category.name}\n {this.countActive(category.track_style) > 0 && }\n \n {(this.countActive(category.track_style) > 0) &&\n \n {orderBy(category.track_style, ['trackCount'], ['desc']).map((style, index) => (\n onStyleFilterSelect(style)}\n key={index}\n style={style}\n allStyleFilters={allStyleFilters}\n />\n ))}\n }\n \n );\n }\n}\n\n\nCategoryFilter.propTypes = {\n onStyleFilterSelect: PropTypes.func.isRequired,\n category: PropTypes.object,\n allStyleFilters: PropTypes.arrayOf(PropTypes.any).isRequired,\n};\n\nCategoryFilter.defaultProps = {\n category: {},\n};\n\nexport default CategoryFilter;\n","import _ from 'lodash';\nimport React from 'react';\nimport Toggle from 'components/Toggle';\nimport Duration from './Duration';\nimport FilterLink from './FilterLink';\nimport MoodFilter from './MoodFilter';\nimport FilterBlock from './FilterBlock';\nimport MobileFilter from './MobileFilter';\nimport CategoryFilter from './CategoryFilter';\nimport { BrowseSubDropdown } from 'styles/js/browse-sub-dropdown.js';\nimport A from 'components/A';\nimport Spinner from 'styles/svg-components/Spinner.js';\n\nexport default class FilterBar extends React.Component { // eslint-disable-line react/prefer-stateless-function\n constructor(props) {\n super(props);\n\n this.state = {\n dropdown: false,\n durationStart: false,\n durationEnd: false,\n durationMin: false,\n durationMax: false,\n };\n\n\n this.durationSliderMin = 0;\n this.durationSliderMax = 600;\n\n this.checkChildren = this.checkChildren.bind(this);\n this.checkEnergyFilter = this.checkEnergyFilter.bind(this);\n this.checkEnergyFilter = this.checkEnergyFilter.bind(this);\n this.formatter = this.formatter.bind(this);\n this.removeDropdown = this.removeDropdown.bind(this);\n this.addDropdown = this.addDropdown.bind(this);\n this.handleDurationSelect = this.handleDurationSelect.bind(this);\n this.formatTime = this.formatTime.bind(this);\n this.removeSearchTerms = this.removeSearchTerms.bind(this);\n this.checkMoods = this.checkMoods.bind(this);\n }\n componentDidMount() {\n $('body').addClass('filter-bar-active');\n BrowseSubDropdown();\n }\n\n\n componentDidUpdate() {\n if (this.props.durationData.shortest_duration) {\n const durationMin = Math.floor(this.props.durationData.shortest_duration / 10) * 10;\n const durationMax = Math.ceil(this.props.durationData.longest_duration / 10) * 10;\n if (durationMin !== this.state.durationMin || durationMax !== this.state.durationMax) {\n this.setState({ durationMin, durationMax });\n }\n }\n }\n\n componentWillUnmount() {\n $('body').removeClass('filter-bar-active');\n }\n\n checkMoods(sortedMoods) {\n let visibleMoods = false;\n for (let i = 0; i < sortedMoods.length; i++) {\n if (sortedMoods[i] > 1 && this.props.browseStyleId != i && _.indexOf(this.props.styleFilters, i) == -1) {\n visibleMoods = true;\n }\n }\n return visibleMoods;\n }\n checkChildren(children) {\n if (this.props.browseStyleId !== children.id) {\n return (\n \n );\n }\n return false;\n }\n checkCategoriesChildren(onStyleFilterSelect, category) {\n return (\n );\n }\n checkEnergyFilter(energy, index) {\n let filterDisabled = true;\n const checkAvailable = this.props.energyTrackCounts.findIndex((x) => x.id == energy.id);\n if (checkAvailable != -1) {\n filterDisabled = false;\n }\n let applied = false;\n if (this.props.energy && this.props.energy == energy.id) {\n applied = true;\n }\n return this.props.onFilterSelect('energy', energy, filterDisabled)} />;\n }\n\n checkVocalFilter(vocal, index) {\n let filterDisabled = true;\n const checkAvailable = this.props.vocalTrackCounts.findIndex((x) => x.id == vocal.id);\n if (checkAvailable != -1) {\n filterDisabled = false;\n }\n let applied = false;\n if (this.props.vocal && this.props.vocal == vocal.id) {\n applied = true;\n }\n\n return this.props.onFilterSelect('vocal', vocal, filterDisabled)} />;\n }\n\n removeDropdown() {\n const mvStickyDropdown = false;\n if ( !mvStickyDropdown ) {\n this.setState({ dropdown: false });\n }\n }\n\n addDropdown(event) {\n this.setState({ dropdown: event.target.id });\n }\n\n formatTime(durationStart, durationEnd) {\n const startMins = Math.floor(durationStart / 60);\n const endMins = Math.floor(durationEnd / 60);\n let startSecs = durationStart - (startMins * 60);\n let endSecs = durationEnd - (endMins * 60);\n if (!startSecs) {\n startSecs = '00';\n }\n\n if (!endSecs) {\n endSecs = '00';\n }\n\n let startTime = `${startMins}:${startSecs}`;\n if (!startMins && !startSecs) {\n startTime = '0';\n }\n\n return `${startTime} to ${endMins}:${endSecs}`;\n }\n\n formatter(event) {\n if (Array.isArray(event)) {\n const durationStart = event[0];\n const durationEnd = event[1];\n return this.formatTime(durationStart, durationEnd);\n }\n return null;\n }\n\n handleDurationSelect(event) {\n const durationStart = event.target.value[0];\n const durationEnd = event.target.value[1];\n\n this.setState({ durationStart, durationEnd });\n this.props.onDurationSelect(this.formatTime(durationStart, durationEnd));\n if (durationStart === this.durationSliderMin && durationEnd === this.durationSliderMax) {\n this.props.removeStyleFilters('duration', this.props.duration);\n }\n }\n\n getStartEndFromDuration() {\n const durations = this.props.duration.split(' to ');\n const durationsStart = durations[0].split(':');\n const durationsEnd = durations[1].split(':');\n const StartMins = parseInt(durationsStart[0]);\n const StartSecs = parseInt(durationsStart[1]);\n const EndMins = parseInt(durationsEnd[0]);\n const EndSecs = parseInt(durationsEnd[1]);\n const durationStart = ((StartMins * 60) + StartSecs);\n const durationEnd = ((EndMins * 60) + EndSecs);\n return [durationStart, durationEnd];\n }\n\n removeSearchTerms() {\n this.props.context.push('/browse/all');\n }\n render() {\n let durationStart;\n let durationEnd;\n if (this.props.duration) {\n const startEndDuration = this.getStartEndFromDuration();\n durationStart = startEndDuration[0];\n durationEnd = startEndDuration[1];\n } else if ( this.state.durationMin && this.state.durationMax ) {\n durationStart = this.state.durationMin;\n durationEnd = this.state.durationMax;\n } else {\n durationStart = this.durationSliderMin;\n durationEnd = this.durationSliderMax;\n }\n\n\n let removeEnergy = false;\n let removeVocal = false;\n let defaultSort = 'Relevance';\n\n if (this.props.energies && this.props.energy) {\n removeEnergy = this.props.energies[this.props.energy - 1];\n }\n\n if (this.props.vocals && this.props.vocal) {\n removeVocal = this.props.vocals[this.props.vocal - 1];\n }\n\n if (this.props.defaultSort) {\n defaultSort = this.props.defaultSort;\n }\n\n let clearButton = null;\n let clearCounter = 0;\n if (this.props.energy > 0) {\n clearCounter++;\n }\n\n if (this.props.vocal > 0) {\n clearCounter++;\n }\n\n this.props.styleFilters.forEach((style) => {\n clearCounter++;\n });\n\n if (this.props.duration != 0) {\n clearCounter++;\n }\n if (this.props.searchTerm) {\n clearCounter++;\n }\n const showClearButton = 1;\n if (clearCounter > showClearButton) {\n clearButton = (
  • Clear All
  • );\n }\n\n let loadingSpinner = null;\n if (this.props.loading) {\n loadingSpinner = ;\n }\n\n let styles = false;\n let styleFilters = [];\n if (Object.keys(this.props.styles).length > 0) {\n styles = this.props.styles;\n styleFilters = this.props.styleFilters.map((value) => {\n let order = 0;\n if (styles[value].style_category.id === 5) {\n order = 1;\n }\n return {\n ...styles[value],\n order,\n };\n });\n styleFilters = _.orderBy(styleFilters, ['order'], ['asc']);\n }\n\n return (\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n {this.props.breadcrumb}\n
    \n
      \n {this.props.searchTerm && }\n {styleFilters && styles && styleFilters.map((value, index) => {\n let type = 'style';\n if (value.order) {\n type = 'mood';\n }\n return (\n this.props.removeStyleFilters('style', value.id)} />\n );\n })}\n {removeEnergy && this.props.removeStyleFilters('energy', this.props.energy)} /> }\n {removeVocal && this.props.removeStyleFilters('vocal', this.props.vocal)} /> }\n {this.props.duration != 0 && this.props.removeStyleFilters('duration', this.props.duration)} /> }\n {clearButton}\n
    \n
    \n
    \n {this.props.resultCount &&\n {this.props.resultCount} Result{this.props.resultCount !== 1 ? 's' : ''}\n }\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n {/* Start of content-container */}\n
    \n
    \n
    \n
    \n Add Filters:\n
    \n
    \n
    \n
    \n
      \n
    • \n Styles\n {this.state.dropdown === 'dropdownStyles' &&\n
        \n {(this.props.categories && this.props.allTracksCount > 1 && !this.props.loading) && _.map(this.props.categories, (category) => (\n this.checkCategoriesChildren(this.props.onStyleFilterSelect, category)\n )) }\n {(this.props.allTracksCount < 1 && !this.props.loading) &&\n
      • No matching tracks.
      • \n }\n {(this.props.allTracksCount === 1 && !this.props.loading) &&\n
      • No remaining filters.
      • \n }\n {loadingSpinner}\n
      \n }\n
    • \n
    • \n Moods\n {this.state.dropdown === 'dropdownMoods' &&\n
        \n {(this.props.sortedMoods && this.props.allTracksCount !== 1 && !this.props.loading) && _.orderBy(this.props.sortedMoods, ['trackCount'], ['desc']).map((value) => (\n this.checkChildren(value)\n ))}\n {(this.props.sortedMoods.length === 0 && !this.props.loading) &&\n
      • No matching tracks.
      • \n }\n {(parseInt(this.props.allTracksCount) === 1 && !this.props.loading) &&\n
      • No remaining filters.
      • \n }\n {loadingSpinner}\n
      \n }\n
    • \n
    • \n Energy\n {this.state.dropdown == 'dropdownEnergy' &&\n
      \n
        \n {this.props.energies && !this.props.loading && this.props.energies.map((energy, index) => (\n this.checkEnergyFilter(energy, index)\n )) }\n {loadingSpinner}\n
      \n
      \n }\n
    • \n
    • \n Vocals\n {this.state.dropdown == 'dropdownVocals' &&\n
      \n
        \n {this.props.vocals && !this.props.loading && this.props.vocals.map((vocal, index) => (\n this.checkVocalFilter(vocal, index)\n )) }\n {loadingSpinner}\n
      \n
      \n }\n
    • \n
    • \n Duration\n {this.state.dropdown === 'dropdownDuration' &&\n
      \n
        \n
        \n
        \n
        \n
        \n \n
      \n
      }\n
    • \n
    \n
    \n
    \n
    \n
    \n {/* End of content container */}\n
    \n
    \n {/* End of filter panel */}\n
    \n
    \n
    \n );\n }\n}\n","export function BrowseSubDropdown() {\n $(\".filter__styles-dropdown--sub\").on(\"click\", function(){\n $(this).toggleClass(\"fade-in\");\n\n if ($(\".filter__dropdown--sub\").height() <= 0) {\n $(\".filter__dropdown--sub\").addClass(\"empty\");\n }\n });\n}\n","import find from 'lodash/find';\nimport findIndex from 'lodash/findIndex';\nimport React from 'react';\nimport { withRouter } from 'react-router';\nimport { connect } from 'react-redux';\nimport { fetchEnergies, fetchVocals, setNotFiltered, setFiltered, setAppliedFilters, unSetAppliedFilters } from 'actions/browseAction';\nimport { fetchStyleCategories } from 'actions/categoryAction';\nimport { fetchAllStyles } from 'actions/styleAction';\nimport PropTypes from 'prop-types';\nimport TrackPlayer from 'components/TrackPlayer';\nimport Collections from './Collections';\nimport StylesDropdown from './StylesDropdown';\nimport Slider from 'react-slick';\nimport FilterBar from './FilterBar';\nimport A from 'components/A';\n\n\nclass Browse extends React.Component {\n constructor(props) {\n super(props);\n const appliedFilters = _.mapKeys(this.props.location.query, (v, k) => k.toLowerCase()) || {};\n let energy = 0;\n if (appliedFilters.energy) {\n energy = appliedFilters.energy;\n }\n let vocal = 0;\n if (appliedFilters.vocal) {\n vocal = appliedFilters.vocal;\n }\n let stylefilters = [];\n if (appliedFilters.stylefilters) {\n stylefilters = JSON.parse(appliedFilters.stylefilters);\n }\n let duration = 0;\n if (appliedFilters.duration) {\n duration = appliedFilters.duration;\n }\n let sort = 'Relevance';\n if (appliedFilters.sort) {\n sort = appliedFilters.sort;\n } else if (this.props.defaultSort) {\n sort = this.props.defaultSort;\n }\n let page = 1;\n if (appliedFilters.page) {\n page = appliedFilters.page;\n }\n this.state = {\n energy,\n sort,\n vocal,\n query: false,\n collections: [],\n duration,\n onDurationValue: [0, 10],\n stylefilters,\n page,\n previousPage: page,\n appliedFilters,\n sortedMoods: [],\n indexedMoods: [],\n energyTrackCounts: [],\n vocalTrackCounts: [],\n filter_track_counts: false,\n };\n if (Object.keys(this.props.styles).length < 1) {\n this.props.onFetchAllStyles();\n }\n if (this.props.categories.length < 1) {\n this.props.onFetchStyleCategories();\n }\n if (this.props.energies.length < 1) {\n this.props.onFetchEnergies();\n }\n if (this.props.vocals.length < 1) {\n this.props.onFetchVocals();\n }\n\n this.onFilterSelect = this.onFilterSelect.bind(this);\n this.onStyleFilterSelect = this.onStyleFilterSelect.bind(this);\n this.onDurationSelect = this.onDurationSelect.bind(this);\n this.onSortToggle = this.onSortToggle.bind(this);\n this.removeStyleFilters = this.removeStyleFilters.bind(this);\n this.removeAll = this.removeAll.bind(this);\n this.handleFilterSelect = this.handleFilterSelect.bind(this);\n this.onPageSelect = this.onPageSelect.bind(this);\n this.reloaded = this.reloaded.bind(this);\n }\n componentWillMount() {\n this.props.loadData(this.state.energy, this.state.vocal, this.state.sort, this.state.duration, this.state.stylefilters, this.state.page);\n }\n componentWillReceiveProps(nextProps) {\n const appliedFilters = _.mapKeys(nextProps.location.query, (v, k) => k.toLowerCase()) || {};\n // if (nextProps.filter) {\n let energy = 0;\n if (appliedFilters.energy) {\n energy = appliedFilters.energy;\n }\n let vocal = 0;\n if (appliedFilters.vocal) {\n vocal = appliedFilters.vocal;\n }\n let stylefilters = [];\n if (appliedFilters.stylefilters) {\n stylefilters = JSON.parse(appliedFilters.stylefilters);\n }\n let duration = 0;\n if (appliedFilters.duration) {\n duration = appliedFilters.duration;\n }\n let sort = 'Relevance';\n if (appliedFilters.sort) {\n sort = appliedFilters.sort;\n } else if (nextProps.defaultSort) {\n sort = nextProps.defaultSort;\n }\n let page = 1;\n if (appliedFilters.page) {\n page = appliedFilters.page;\n }\n if (stylefilters.length !== this.state.stylefilters.length\n || String(energy) !== String(this.state.energy)\n || String(vocal) !== String(this.state.vocal)\n || duration !== this.state.duration\n || sort !== this.state.sort\n || String(page) !== String(this.state.page)) {\n if (Object.keys(appliedFilters).length > 0) {\n nextProps.loadData(energy, vocal, sort, duration, stylefilters, page);\n nextProps.onSetFiltered();\n } else if (Object.keys(appliedFilters) < 1) {\n if (nextProps.filter) {\n nextProps.loadData(0, 0, sort, 0, [], 1);\n }\n }\n this.setState({ appliedFilters, stylefilters, energy, vocal, duration, sort, page });\n nextProps.onSetAppliedFilters(appliedFilters);\n }\n // }\n return false;\n }\n handleFilterSelect(urlParameters) {\n delete urlParameters.page;\n let urlString = [];\n Object.entries(urlParameters).map((parameter) => (\n urlString.push(`${parameter[0]}=${parameter[1]}`)\n ));\n urlString = urlString.join('&');\n this.context.router.replace(`${this.props.url}?${urlString}`);\n this.props.onSetAppliedFilters(urlParameters);\n this.props.onSetNotFiltered();\n }\n\n onFilterSelect(type, filter, filterDisabled = false) {\n const urlParameters = this.state.appliedFilters;\n urlParameters[type] = filter.id;\n if (!filterDisabled) {\n this.handleFilterSelect(urlParameters);\n }\n }\n\n onStyleFilterSelect(style) {\n const stylefilters = Object.assign([], this.state.stylefilters);\n stylefilters.push(style.id);\n const urlParameters = this.state.appliedFilters;\n urlParameters.stylefilters = JSON.stringify(stylefilters);\n this.handleFilterSelect(urlParameters);\n }\n\n onDurationSelect(duration) {\n const urlParameters = this.state.appliedFilters;\n urlParameters.duration = duration;\n this.handleFilterSelect(urlParameters);\n }\n\n onSortToggle(event) {\n const urlParameters = this.state.appliedFilters;\n urlParameters.sort = event.target.dataset.sort;\n this.handleFilterSelect(urlParameters);\n }\n\n removeStyleFilters(type, filterId) {\n const urlParameters = this.state.appliedFilters;\n if (type === 'style') {\n const stylefilters = JSON.parse(urlParameters.stylefilters);\n stylefilters.splice(stylefilters.indexOf(filterId), 1);\n urlParameters.stylefilters = JSON.stringify(stylefilters);\n } else {\n delete urlParameters[type];\n }\n this.handleFilterSelect(urlParameters);\n }\n\n removeAll() {\n let sort = 'Relevance';\n if (this.props.defaultSort) {\n sort = this.props.defaultSort;\n }\n if (this.props.searchTerm) {\n this.context.router.push('/browse/all');\n } else {\n this.context.router.push(`${this.props.url}`);\n this.props.loadData(0, 0, sort, 0, [], 1);\n }\n this.props.onUnSetAppliedFilters();\n // this.props.onSetNotFiltered();\n }\n\n onPageSelect(event) {\n const urlParameters = this.state.appliedFilters;\n this.setState({ previousPage: urlParameters.page });\n urlParameters.page = event.currentTarget.dataset.page;\n let urlString = [];\n Object.entries(urlParameters).map((parameter) => (\n urlString.push(`${parameter[0]}=${parameter[1]}`)\n ));\n urlString = urlString.join('&');\n this.context.router.push(`${this.props.url}?${urlString}`);\n this.props.onSetAppliedFilters(urlParameters);\n this.props.onSetNotFiltered();\n }\n reloaded() {\n this.props.loadData(this.state.energy, this.state.vocal, this.state.sort, this.state.duration, this.state.stylefilters, this.state.page);\n }\n render() {\n let sortedMoods = [];\n const categories = [];\n const indexedMoods = [];\n let allTracks = [];\n let loading = false;\n if (this.props.tracks && this.props.tracks.isFetching) {\n loading = true;\n }\n if (this.props.tracks && this.props.tracks.page && this.props.tracks.page.filter_track_styles) {\n const filterTrackCounts = this.props.tracks.page.filter_track_styles;\n const filterMoodsCounts = this.props.tracks.page.filter_track_moods;\n allTracks = this.props.tracks.page.result_ids;\n this.props.categories.forEach((category) => {\n const filterCategory = category.track_style.filter((style) => !style.parent);\n if (category.id === 5) {\n sortedMoods = Object.assign([], filterCategory);\n if (filterMoodsCounts) {\n sortedMoods.forEach((style, index) => {\n const moodCount = find(filterMoodsCounts[category.id], ['id', style.id]) || [];\n sortedMoods[index] = Object.assign({}, style, {\n trackCount: moodCount.count,\n });\n });\n sortedMoods = sortedMoods.filter((value) => value.trackCount > 0);\n }\n } else if (filterTrackCounts) {\n filterCategory.forEach((style) => {\n const styleCount = find(filterTrackCounts[category.id], ['id', style.id]) || [];\n if (Object.keys(styleCount).length > 0) {\n const filterCategoryIndex = findIndex(filterCategory, ['id', styleCount.id]);\n const selectedStyle = style.id === parseInt(this.props.browseStyleId);\n if (styleCount.count > 0) {\n filterCategory[filterCategoryIndex] = Object.assign({}, style, {\n trackCount: selectedStyle ? 0 : styleCount.count,\n });\n }\n }\n });\n categories.push(Object.assign({}, {\n ...category,\n track_style: filterCategory.filter((value) => value.trackCount > 0),\n }));\n }\n });\n }\n let energyTrackCounts = [];\n if (this.props.tracks && this.props.tracks.page && this.props.tracks.page.filter_energy_track_counts) {\n energyTrackCounts = this.props.tracks.page.filter_energy_track_counts;\n }\n\n let vocalTrackCounts = [];\n if (this.props.tracks && this.props.tracks.page && this.props.tracks.page.filter_vocal_track_counts) {\n vocalTrackCounts = this.props.tracks.page.filter_vocal_track_counts;\n }\n\n let durationData = {};\n if (this.props.tracks && this.props.tracks.page && this.props.tracks.page.filter_duration_data) {\n if (!this.state.durationData) {\n durationData = this.props.tracks.page.filter_duration_data;\n }\n }\n const settings = {\n arrows: true,\n slidesToShow: 6,\n slidesToScroll: 6,\n infinite: false,\n responsive: [\n {\n breakpoint: 1200,\n settings: {\n slidesToShow: 5,\n slidesToScroll: 5,\n },\n },\n ],\n };\n\n let collections = null;\n let resultCount = false;\n const allStyleFilters = this.state.stylefilters;\n\n if (this.props.tracks && !this.props.tracks.isFetching && this.props.tracks.page && this.props.tracks.page.pagination) {\n resultCount = this.props.tracks.page.pagination.totalCount;\n }\n\n let onResultClick = function () { };\n\n if (this.props.onResultClick) {\n onResultClick = this.props.onResultClick;\n }\n\n if ((!this.props.collections.page || this.props.collections.isFetching) && !this.props.hideCollection) {\n collections = (\n
    \n );\n } else if (this.props.collections.page && !this.props.hideCollection) {\n collections =
    ;\n }\n\n let browseStyleId = null;\n if (this.props.browseStyleId) {\n browseStyleId = this.props.browseStyleId;\n }\n\n let filterTrackCounts;\n\n if (this.props.tracks && this.props.tracks.page && this.props.tracks.page.filter_track_counts) {\n filterTrackCounts = this.props.tracks.page.filter_track_counts;\n }\n\n return (\n
    \n \n {this.props.hero}\n \n {collections}\n \n
    \n );\n }\n}\n\nBrowse.contextTypes = {\n router: PropTypes.object,\n};\n\nBrowse.propTypes = {\n params: PropTypes.object,\n};\n\nconst mapDispatchToProps = (dispatch) => ({\n onFetchEnergies: () => {\n dispatch(fetchEnergies());\n },\n onFetchVocals: () => {\n dispatch(fetchVocals());\n },\n onFetchStyleCategories: () => {\n dispatch(fetchStyleCategories());\n },\n onFetchAllStyles: () => {\n dispatch(fetchAllStyles());\n },\n onSetFiltered: () => {\n dispatch(setFiltered());\n },\n onSetNotFiltered: () => {\n dispatch(setNotFiltered());\n },\n onSetAppliedFilters: (locationQuery) => {\n dispatch(setAppliedFilters(locationQuery));\n },\n onUnSetAppliedFilters: () => {\n dispatch(unSetAppliedFilters());\n },\n\n\n});\n\nconst mapStateToProps = (state) => ({\n userData: state.get('userData'),\n tracks: state.get('tracks'),\n filter: state.get('filter'),\n appliedFilters: state.get('appliedFilters'),\n collections: state.get('collections'),\n energies: state.get('energies'),\n vocals: state.get('vocals'),\n categories: state.get('categories'),\n moods: state.get('moods'),\n styles: state.get('styles'),\n});\n\n// Wrap the component to inject dispatch and state into it\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Browse));\n","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n"],"sourceRoot":""}