{"version":3,"sources":["store/actions/authentication.js","api/authentication.js","store/actions/player.js","lib/authentication.js","store/actions/entities/index.js","lib/request.js","store/actions/serie.js","store/actions/search.js","store/lib/fetchApi.js","polyfill.js","screens/404.js","store/reducers/authentication.js","store/reducers/error.js","store/lib/createEntityReducer.js","store/reducers/entities/ambiences.js","store/reducers/entities/ambienceTypes.js","store/reducers/entities/causalElementCategories.js","store/reducers/entities/collections.js","store/reducers/entities/impulseResponses.js","store/reducers/entities/mainMaterialCategories.js","store/reducers/entities/microphoneBrands.js","store/reducers/entities/narrativeElementCategories.js","store/reducers/entities/programTypes.js","store/reducers/entities/recorderBrands.js","store/reducers/entities/recordingTypes.js","store/reducers/entities/secondaryMaterialCategories.js","store/reducers/entities/structureCategories.js","store/reducers/entities/users.js","store/reducers/entities/index.js","store/reducers/loading.js","store/reducers/player.js","store/reducers/search.js","store/reducers/serie.js","store/index.js","App.js","serviceWorker.js","index.js"],"names":["ACTION_KEY","LOGIN_FAILURE","LOGIN_REQUEST","LOGIN_SUCCESS","LOGOUT","UPDATE","select","state","authentication","selectToken","token","loginAction","username","password","dispatch","type","basicToken","btoa","request","headers","authorization","then","user","login","auth","update","successAction","error","failureAction","logoutAction","clear","updateAction","updatedUserProfile","prevLocalStorage","get","updatedProfile","nextLocalStorage","Object","assign","PAUSE","PLAY","SET_CURRENT","SET_PLAYLIST","CLEAR_PLAYLIST","TOGGLE","player","selectCurrent","current","selectIsCurrent","sound","_id","selectIsPlaying","isPlaying","selectPlaylist","playlist","selectCurrentSound","currentIndex","findIndex","pauseAction","setCurrentAction","toggleAction","startPlaylistAction","sounds","setTimeout","setPlaylistAction","stopAction","nextAction","getState","next","length","previousAction","previous","LOCAL_STORAGE_KEY","localStorage","setItem","JSON","stringify","removeItem","parse","getItem","ADD_ENTITIES","REMOVE_ENTITIES","REMOVE_ENTITY","selectEntities","entities","addEntities","payload","removeEntities","result","response","Promise","resolve","reject","ok","json","message","catch","path","opts","options","body","FormData","base","fetchOptions","api","process","fetch","requestNoContentType","ADD_RESULTS","CLEAR_RESULTS","series","addResults","results","clearResults","search","withApi","apiCreator","actionCreator","action","reduxThunkerArgs","otherArgs","fetchApi","mergedOptions","AudioContext","window","webkitAudioContext","global","isSafariHell","webkitDecodeAudioData","prototype","decodeAudioData","audioBuffer","call","PageNotFound","getInitialState","storedAuthentication","getAuthentication","loggedIn","matches","exec","requestName","requestState","createEntityReducer","entityName","idAttribute","entries","reduce","mergedEntities","id","entity","keys","newState","deletedEntities","Array","isArray","forEach","deletedEntity","STATE_KEY","reducer","combineReducers","AMBIENCES_STATE_KEY","ambiencesEntitiesReducer","AMBIENCE_TYPES_STATE_KEY","ambienceTypesEntitiesReducer","CAUSAL_ELEMENT_CATEGORIES_STATE_KEY","causalElementCategoriesEntitiesReducer","COLLECTIONS_STATE_KEY","collectionsEntitiesReducer","IMPULSE_RESPONSES_STATE_KEY","impulseResponsesEntitiesReducer","MAIN_MATERIAL_CATEGORIES_STATE_KEY","mainMaterialCategoriesEntititesReducer","MICROPHONE_BRANDS_STATE_KEY","microphoneBrandsEntitiesReducer","NARRATIVE_ELEMENT_CATEGORIES_STATE_KEY","narrativeElementCategoriesEntitiesReducer","PROGRAM_TYPES_STATE_KEY","programTypesEntitiesReducer","RECORDER_BRANDS_STATE_KEY","recorderBrandsEntitiesReducer","RECORDING_TYPES_STATE_KEY","recordingTypesEntitiesReducer","SECONDARY_MATERIAL_CATEGORIES_STATE_KEY","secondaryMaterialCategoriesEntititesReducer","STRUCTURE_CATEGORIES_STATE_KEY","structureCategoriesEntitiesReducer","USERS_STATE_KEY","usersEntitiesReducer","loading","newValue","previousValue","Math","max","ambiences","impulseResponses","scene","space","label","logger","createLogger","predicate","collapsed","thunk","createThunkerMiddleware","extraArgumentsEnhanced","app","loggingIn","errorReducer","entitiesReducer","loadingReducer","playerReducer","searchReducer","searchSeriesReducer","store","createStore","applyMiddleware","DefaultLayout","Loadable","loader","className","App","exact","name","component","Page404","Boolean","location","hostname","match","console","info","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"wcAGMA,EAAa,iBAKNC,EAAa,UAAMD,EAAN,kBACbE,EAAa,UAAMF,EAAN,kBACbG,EAAa,UAAMH,EAAN,kBACbI,EAAM,UAAMJ,EAAN,WACNK,EAAM,UAAML,EAAN,WAKZ,SAASM,EAAOC,GACtB,OAAOA,EAAMC,eAOP,SAASC,EAAYF,GAC3B,OAAOD,EAAOC,GAAOG,MAUf,SAASC,EAAYC,EAAUC,GACrC,OAAO,YAAmB,IAAhBC,EAAe,EAAfA,SAGT,OAFAA,EANgC,CAAEC,KAAMb,IC3BrB,SAACU,EAAUC,GAC/B,IAAMG,EAAaC,KAAK,GAAD,OAAIL,EAAJ,YAAgBC,IAEvC,OAAOK,YAAQ,GAAD,OANwB,QAMxB,UAEb,CACCC,QAAS,CACRC,cAAc,SAAD,OAAWJ,MAGzBK,MAAK,SAAAC,GAAI,MACV,CACCZ,MAAOM,EACPM,WDsBMC,CAAMX,EAAUC,GACrBQ,MACA,SAACG,GACAC,YAAOD,GACPV,EAXL,SAAuBU,GAAQ,MAAO,CAAET,KAAMZ,EAAeqB,QAW/CE,CAAcF,OAExB,SAACG,GAEA,MADAb,EAbL,SAAuBa,GAAS,MAAO,CAAEZ,KAAMd,EAAe0B,SAahDC,CAAcD,IACjBA,MAMJ,SAASE,IAEf,OADAC,cACO,CAAEf,KAAMX,GAGT,SAAS2B,EAAaC,GAC5B,IAAMC,EAAmBC,cACjBxB,EAAgBuB,EAAhBvB,MAAOY,EAASW,EAATX,KAETa,EAAc,2BAAQb,GAASU,GAE/BI,EAAmB,CACxB1B,QACAY,KAAMe,OAAOC,OAAO,GAAIH,IAKzB,OAFAV,YAAOW,GAEA,CAAErB,KAAMV,K,gCExEhB,oiBAAML,EAAa,SAKNuC,EAAK,UAAMvC,EAAN,UACLwC,EAAI,UAAMxC,EAAN,SACJyC,EAAW,UAAMzC,EAAN,gBACX0C,EAAY,UAAM1C,EAAN,iBACZ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AmC,uDAA3B+H,IAAmBhB,EAAQ,uCAChF,OAAQA,EAAOvG,MACf,KAAKb,IACJ,MAAO,CACN4M,WAAW,GAEb,KAAK3M,IACJ,MAAO,CACNsI,UAAU,EACV/H,MAAO4G,EAAO9F,KAAKd,MACnBY,KAAMgG,EAAO9F,KAAKF,MAEpB,KAAKrB,IAEL,KAAKG,IACJ,MAAO,GACR,QACC,OAAOG,MsBRkB,YAAC,ErB5BH,QqB8BLwM,GAFO,YAAC,ELXH,WKcFC,IAHI,YAAC,EJ5BH,UIgCHC,IAJK,YAAC,EHnBH,SGwBJC,IALM,YAAC,EFxBH,SE8BJC,IANM,YAAC,EDxBH,SC+BEC,IAPA,IAeZC,GALDC,YACbT,GACAU,YAAgBb,GAAOJ,KCxBlBkB,GAAgBC,IAAS,CAC9BC,OAAQ,kBAAM,sDACd9B,QALe,kBAAM,qBAAK+B,UAAU,mCAAf,2BAuBPC,GAfH,kBACX,cAAC,IAAD,CAAUP,MAAOA,GAAjB,SACC,cAAC,IAAD,UACC,eAAC,IAAD,WAKC,cAAC,IAAD,CAAOQ,OAAK,EAAC5H,KAAK,OAAO6H,KAAK,WAAWC,UAAWC,IAEpD,cAAC,IAAD,CAAO/H,KAAK,IAAI6H,KAAK,OAAOC,UAAWP,aCnBvBS,QACU,cAA7BrG,OAAOsG,SAASC,UAEmB,UAA7BvG,OAAOsG,SAASC,UAEhBvG,OAAOsG,SAASC,SAASC,MAAM,2DCTtCC,QAAQC,KAAR,wBAAoB7H,UAEpB8H,IAASC,OAAO,cAAC,GAAD,IAASC,SAASC,eAAe,SDiH5C,kBAAmBC,WACtBA,UAAUC,cAAcC,MAAMxN,MAAK,SAACyN,GACnCA,EAAaC,kB","file":"static/js/main.e46bdd5b.chunk.js","sourcesContent":["import { login } from '../../api/authentication';\nimport { update, clear, get } from '../../lib/authentication';\n\nconst ACTION_KEY = 'authentication';\n\n/**\n * actions\n */\nexport const LOGIN_FAILURE = `${ACTION_KEY}/login/FAILURE`;\nexport const LOGIN_REQUEST = `${ACTION_KEY}/login/REQUEST`;\nexport const LOGIN_SUCCESS = `${ACTION_KEY}/login/SUCCESS`;\nexport const LOGOUT = `${ACTION_KEY}/logout`;\nexport const UPDATE = `${ACTION_KEY}/update`;\n\n/**\n * selectors\n */\nexport function select(state) {\n\treturn state.authentication;\n}\n\nexport function selectUser(state) {\n\treturn select(state).user;\n}\n\nexport function selectToken(state) {\n\treturn select(state).token;\n}\n\n/**\n * actions creators\n */\nfunction requestAction() { return { type: LOGIN_REQUEST }; }\nfunction successAction(auth) { return { type: LOGIN_SUCCESS, auth }; }\nfunction failureAction(error) { return { type: LOGIN_FAILURE, error }; }\n\nexport function loginAction(username, password) {\n\treturn ({ dispatch }) => {\n\t\tdispatch(requestAction({ username }));\n\n\t\treturn login(username, password)\n\t\t\t.then(\n\t\t\t\t(auth) => {\n\t\t\t\t\tupdate(auth);\n\t\t\t\t\tdispatch(successAction(auth));\n\t\t\t\t},\n\t\t\t\t(error) => {\n\t\t\t\t\tdispatch(failureAction(error));\n\t\t\t\t\tthrow error;\n\t\t\t\t},\n\t\t\t);\n\t};\n}\n\nexport function logoutAction() {\n\tclear();\n\treturn { type: LOGOUT };\n}\n\nexport function updateAction(updatedUserProfile) {\n\tconst prevLocalStorage = get();\n\tconst { token, user } = prevLocalStorage;\n\n\tconst updatedProfile = { ...user, ...updatedUserProfile };\n\n\tconst nextLocalStorage = {\n\t\ttoken,\n\t\tuser: Object.assign({}, updatedProfile),\n\t};\n\n\tupdate(nextLocalStorage);\n\n\treturn { type: UPDATE };\n}\n","import request from '../lib/request';\n\nexport const AUTHENTICATION_API_PATH = '/auth';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const login = (username, password) => {\n\tconst basicToken = btoa(`${username}:${password}`);\n\n\treturn request(\n\t\t`${AUTHENTICATION_API_PATH}/login`,\n\t\t{\n\t\t\theaders: {\n\t\t\t\tauthorization: `basic ${basicToken}`,\n\t\t\t},\n\t\t},\n\t).then(user => (\n\t\t{\n\t\t\ttoken: basicToken,\n\t\t\tuser,\n\t\t}\n\t));\n};\n","const ACTION_KEY = 'player';\n\n/**\n * actions\n */\nexport const PAUSE = `${ACTION_KEY}/pause`;\nexport const PLAY = `${ACTION_KEY}/play`;\nexport const SET_CURRENT = `${ACTION_KEY}/set-current`;\nexport const SET_PLAYLIST = `${ACTION_KEY}/set-playlist`;\nexport const CLEAR_PLAYLIST = `${ACTION_KEY}/clear-playlist`;\n\nexport const TOGGLE = `${ACTION_KEY}/toggle`;\n\n/**\n * selectors\n */\nexport const select = state => state.player;\nexport const selectCurrent = state => select(state).current;\nexport const selectIsCurrent = (state, sound) => {\n\tconst current = selectCurrent(state);\n\tif (!current || !sound) return false;\n\treturn current === sound._id;\n};\n\nexport const selectIsPlaying = state => select(state).isPlaying;\n\nexport const selectPlaylist = state => select(state).playlist;\nexport const selectCurrentSound = (state) => {\n\tconst playlist = selectPlaylist(state);\n\tconst current = selectCurrent(state);\n\tconst currentIndex = playlist.findIndex(sound => sound._id === current);\n\tif (currentIndex === -1) return false;\n\treturn playlist[currentIndex];\n};\n\n/**\n * actions creators\n */\nexport const clearPlaylistAction = () => ({ type: CLEAR_PLAYLIST });\nexport const pauseAction = () => ({ type: PAUSE });\nexport const playAction = () => ({ type: PLAY });\nexport const setCurrentAction = sound => ({ type: SET_CURRENT, sound });\nexport const setPlaylistAction = sounds => ({ type: SET_PLAYLIST, playlist: sounds });\nexport const toggleAction = () => ({ type: TOGGLE });\n\nexport const startPlaylistAction = (sounds, sound) => ({ dispatch }) => {\n\tdispatch(pauseAction());\n\tsetTimeout(() => {\n\t\tdispatch(setPlaylistAction(sounds));\n\t\tdispatch(setCurrentAction(sound));\n\t\tdispatch(playAction());\n\t});\n};\n\nexport const stopAction = () => ({ dispatch }) => {\n\tdispatch(pauseAction());\n\tdispatch(setCurrentAction());\n\tdispatch(clearPlaylistAction());\n};\n\nexport const nextAction = () => ({ dispatch, getState }) => {\n\tconst state = getState();\n\tconst playlist = selectPlaylist(state);\n\n\tconst current = selectCurrent(state);\n\tconst currentIndex = playlist.findIndex(sound => sound._id === current);\n\n\tconst nextIndex = (currentIndex + 1) % playlist.length;\n\tconst next = playlist[nextIndex];\n\tdispatch(setCurrentAction(next));\n};\n\nexport const previousAction = () => ({ dispatch, getState }) => {\n\tconst state = getState();\n\tconst playlist = selectPlaylist(state);\n\n\tconst { length } = playlist;\n\tconst current = selectCurrent(state);\n\tconst currentIndex = playlist.findIndex(sound => sound._id === current);\n\tconst previousIndex = (((currentIndex - 1) % length) + length) % length;\n\tconst previous = playlist[previousIndex];\n\tdispatch(setCurrentAction(previous));\n};\n","export const LOCAL_STORAGE_KEY = 'authentication';\n\nexport const update = auth => (\n\tlocalStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(auth))\n);\n\nexport const clear = () => (\n\tlocalStorage.removeItem(LOCAL_STORAGE_KEY)\n);\n\nexport const get = () => (\n\tJSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY))\n);\n","const ACTION_KEY = 'entities';\n\n/**\n * actions\n */\nexport const ADD_ENTITIES = `${ACTION_KEY}/add-entities`;\nexport const REMOVE_ENTITIES = `${ACTION_KEY}/remove-entities`;\nexport const REMOVE_ENTITY = `${ACTION_KEY}/delete-entity`;\n\n/**\n * selectors\n */\nexport const selectEntities = state => state.entities;\n\n/**\n * actions creators\n */\nexport const addEntities = entities => ({\n\ttype: ADD_ENTITIES,\n\tpayload: entities,\n});\n\nexport const removeEntity = (key, entity) => ({\n\ttype: REMOVE_ENTITY,\n\tpayload: {\n\t\t[key]: entity,\n\t},\n});\n\nexport const removeEntities = entities => ({\n\ttype: REMOVE_ENTITIES,\n\tpayload: entities,\n});\n","const { REACT_APP_API_URL } = process.env;\n\nexport const result = response => (\n\tnew Promise((resolve, reject) => {\n\t\tif (!response.ok) {\n\t\t\tresponse.json()\n\t\t\t\t.then((error) => {\n\t\t\t\t\tif (!error.message) {\n\t\t\t\t\t\terror.message = error.error || 'Error';\n\t\t\t\t\t}\n\t\t\t\t\treject(error);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t\treturn;\n\t\t}\n\t\tresolve(response.json());\n\t})\n);\n\nexport const requestNoContentType = (\n\tpath,\n\topts,\n) => {\n\tconst {\n\t\tbase,\n\t\ttoken,\n\t\t...fetchOptions\n\t} = opts;\n\n\tconst options = {\n\t\t...fetchOptions,\n\t\theaders: {\n\t\t\t...opts.headers,\n\t\t},\n\t};\n\n\tif (token) {\n\t\toptions.headers.authorization = `basic ${token}`;\n\t}\n\n\tconst api = `${(base || REACT_APP_API_URL)}${path}`;\n\n\treturn fetch(\n\t\tapi,\n\t\toptions,\n\t).then(result);\n};\n\nexport default (path, opts) => {\n\tconst options = {\n\t\t...opts,\n\t\theaders: {\n\t\t\t...opts.headers,\n\t\t},\n\t};\n\n\t// Add Content-Type only if not multipart to allow fetch api to add correct boundary\n\tif (!(options.body instanceof FormData)) {\n\t\toptions.headers['Content-Type'] = 'application/json';\n\t}\n\n\treturn requestNoContentType(path, options);\n};\n","const ACTION_KEY = 'series';\n\n/**\n * actions\n */\nexport const ADD_RESULTS = `${ACTION_KEY}/add-results`;\nexport const CLEAR_RESULTS = `${ACTION_KEY}/clear-results`;\n\n/**\n * selectors\n */\nexport const select = state => state.series;\n\n/**\n * actions creators\n */\nexport const addResults = results => ({ type: ADD_RESULTS, results });\nexport const clearResults = () => ({ type: CLEAR_RESULTS });\n","const ACTION_KEY = 'search';\n\n/**\n * actions\n */\nexport const ADD_RESULTS = `${ACTION_KEY}/add-results`;\n\n/**\n * selectors\n */\nexport const select = state => state.search;\n\n/**\n * actions creators\n */\nexport const addResults = results => ({ type: ADD_RESULTS, results });\n","import { selectToken } from '../actions/authentication';\nimport request from '../../lib/request';\n\nexport const withApi = (apiCreator, actionCreator) => (\n\t(...actionCreatorArgs) => {\n\t\tconst action = actionCreator(...actionCreatorArgs);\n\n\t\treturn (reduxThunkerArgs, ...otherArgs) => action(\n\t\t\t{\n\t\t\t\t...reduxThunkerArgs,\n\t\t\t\tapi: apiCreator(reduxThunkerArgs.fetchApi),\n\t\t\t},\n\t\t\t...otherArgs,\n\t\t);\n\t}\n);\n\nconst fetchApi = ({ getState }) => (\n\tpath,\n\toptions,\n) => {\n\tconst token = selectToken(getState());\n\n\tconst mergedOptions = {\n\t\t...options,\n\t\ttoken,\n\t};\n\n\treturn request(path, mergedOptions);\n};\n\nexport default fetchApi;\n","let { AudioContext } = window;\n\nif (window.webkitAudioContext) {\n\tglobal.isSafariHell = true;\n}\n\nif (!AudioContext) {\n\tconst { webkitAudioContext } = window;\n\tconst webkitDecodeAudioData = webkitAudioContext.prototype.decodeAudioData;\n\n\twebkitAudioContext.prototype.decodeAudioData = function decodeAudioData(audioBuffer) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\twebkitDecodeAudioData.call(this, audioBuffer, resolve, reject);\n\t\t});\n\t};\n\n\tAudioContext = webkitAudioContext;\n}\n\nglobal.AudioContext = AudioContext;\n","import React from 'react';\n\nconst PageNotFound = () => (\n\t
404
\n);\n\nexport default PageNotFound;\n","import { get as getAuthentication } from '../../lib/authentication';\n\nimport {\n\tLOGIN_FAILURE,\n\tLOGIN_REQUEST,\n\tLOGIN_SUCCESS,\n\tLOGOUT,\n} from '../actions/authentication';\n\nexport const STATE_KEY = 'authentication';\n\n/**\n * reducers\n */\nfunction getInitialState() {\n\tconst storedAuthentication = getAuthentication();\n\treturn storedAuthentication ? { loggedIn: true, ...storedAuthentication } : {};\n}\n\nexport default function authenticationReducer(state = getInitialState(), action) {\n\tswitch (action.type) {\n\tcase LOGIN_REQUEST:\n\t\treturn {\n\t\t\tloggingIn: true,\n\t\t};\n\tcase LOGIN_SUCCESS:\n\t\treturn {\n\t\t\tloggedIn: true,\n\t\t\ttoken: action.auth.token,\n\t\t\tuser: action.auth.user,\n\t\t};\n\tcase LOGIN_FAILURE:\n\t\treturn {};\n\tcase LOGOUT:\n\t\treturn {};\n\tdefault:\n\t\treturn state;\n\t}\n}\n","export const STATE_KEY = 'error';\n\nconst getInitialState = () => ({});\n\n/**\n* reducers\n*/\nconst error = (state = getInitialState(), action) => {\n\tconst { type } = action;\n\tconst matches = /(.*)\\/(REQUEST|FAILURE)$/.exec(type);\n\n\t// not a *_REQUEST / *_FAILURE actions, so we ignore them\n\tif (!matches) return state;\n\n\tconst [, requestName, requestState] = matches;\n\n\treturn {\n\t\t...state,\n\t\t// Store whether a request is happening at the moment or not\n\t\t// e.g. will be true when receiving GET_TODOS_REQUEST\n\t\t// and false when receiving GET_TODOS_SUCCESS / GET_TODOS_FAILURE\n\t\t[requestName]: requestState === 'FAILURE' ? action.error : '',\n\t};\n};\n\nexport default error;\n","import { ADD_ENTITIES, REMOVE_ENTITIES, REMOVE_ENTITY } from '../actions/entities';\n\nconst createEntityReducer = (entityName, idAttribute = '_id') => (state = {}, action) => {\n\tswitch (action.type) {\n\tcase ADD_ENTITIES:\n\t\treturn Object.entries(action.payload[entityName] || {})\n\t\t\t.reduce((mergedEntities, [id, entity]) => (\n\t\t\t\t{\n\t\t\t\t\t...mergedEntities,\n\t\t\t\t\t[id]: {\n\t\t\t\t\t\t...(mergedEntities[id] || {}),\n\t\t\t\t\t\t...entity,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t), state);\n\tcase REMOVE_ENTITIES: {\n\t\treturn Object.keys(action.payload[entityName] || {})\n\t\t\t.reduce((newState, id) => {\n\t\t\t\tdelete newState[id];\n\t\t\t\treturn newState;\n\t\t\t}, { ...state });\n\t}\n\tcase REMOVE_ENTITY: {\n\t\tif (!action[entityName]) return state;\n\t\tconst newState = { ...state };\n\t\tconst deletedEntities = Array.isArray(action[entityName])\n\t\t\t? action[entityName]\n\t\t\t: [action[entityName]];\n\t\tdeletedEntities.forEach((deletedEntity) => { delete newState[deletedEntity[idAttribute]]; });\n\t\treturn newState;\n\t}\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nexport default createEntityReducer;\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'ambiences';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'ambienceTypes';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'causalElementCategories';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'collections';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'impulseResponses';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'mainMaterialCategories';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'microphoneBrands';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'narrativeElementCategories';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'programTypes';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'recorderBrands';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'recordingTypes';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'secondaryMaterialCategories';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'structureCategories';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import createEntityReducer from '../../lib/createEntityReducer';\n\nexport const STATE_KEY = 'users';\n\n/**\n * reducers\n */\nexport default createEntityReducer(STATE_KEY);\n","import { combineReducers } from 'redux';\n\nimport ambiencesEntitiesReducer, { STATE_KEY as AMBIENCES_STATE_KEY } from './ambiences';\nimport ambienceTypesEntitiesReducer, { STATE_KEY as AMBIENCE_TYPES_STATE_KEY } from './ambienceTypes';\nimport causalElementCategoriesEntitiesReducer, { STATE_KEY as CAUSAL_ELEMENT_CATEGORIES_STATE_KEY } from './causalElementCategories';\nimport collectionsEntitiesReducer, { STATE_KEY as COLLECTIONS_STATE_KEY } from './collections';\nimport impulseResponsesEntitiesReducer, { STATE_KEY as IMPULSE_RESPONSES_STATE_KEY } from './impulseResponses';\nimport mainMaterialCategoriesEntititesReducer, { STATE_KEY as MAIN_MATERIAL_CATEGORIES_STATE_KEY } from './mainMaterialCategories';\nimport microphoneBrandsEntitiesReducer, { STATE_KEY as MICROPHONE_BRANDS_STATE_KEY } from './microphoneBrands';\nimport narrativeElementCategoriesEntitiesReducer, { STATE_KEY as NARRATIVE_ELEMENT_CATEGORIES_STATE_KEY } from './narrativeElementCategories';\nimport programTypesEntitiesReducer, { STATE_KEY as PROGRAM_TYPES_STATE_KEY } from './programTypes';\nimport recorderBrandsEntitiesReducer, { STATE_KEY as RECORDER_BRANDS_STATE_KEY } from './recorderBrands';\nimport recordingTypesEntitiesReducer, { STATE_KEY as RECORDING_TYPES_STATE_KEY } from './recordingTypes';\nimport secondaryMaterialCategoriesEntititesReducer, { STATE_KEY as SECONDARY_MATERIAL_CATEGORIES_STATE_KEY } from './secondaryMaterialCategories';\nimport structureCategoriesEntitiesReducer, { STATE_KEY as STRUCTURE_CATEGORIES_STATE_KEY } from './structureCategories';\nimport usersEntitiesReducer, { STATE_KEY as USERS_STATE_KEY } from './users';\n\nexport const STATE_KEY = 'entities';\n\n/**\n * reducers\n */\nconst reducer = combineReducers({\n\t[AMBIENCES_STATE_KEY]: ambiencesEntitiesReducer,\n\t[AMBIENCE_TYPES_STATE_KEY]: ambienceTypesEntitiesReducer,\n\t[CAUSAL_ELEMENT_CATEGORIES_STATE_KEY]: causalElementCategoriesEntitiesReducer,\n\t[COLLECTIONS_STATE_KEY]: collectionsEntitiesReducer,\n\t[IMPULSE_RESPONSES_STATE_KEY]: impulseResponsesEntitiesReducer,\n\t[MAIN_MATERIAL_CATEGORIES_STATE_KEY]: mainMaterialCategoriesEntititesReducer,\n\t[MICROPHONE_BRANDS_STATE_KEY]: microphoneBrandsEntitiesReducer,\n\t[NARRATIVE_ELEMENT_CATEGORIES_STATE_KEY]: narrativeElementCategoriesEntitiesReducer,\n\t[PROGRAM_TYPES_STATE_KEY]: programTypesEntitiesReducer,\n\t[RECORDER_BRANDS_STATE_KEY]: recorderBrandsEntitiesReducer,\n\t[RECORDING_TYPES_STATE_KEY]: recordingTypesEntitiesReducer,\n\t[SECONDARY_MATERIAL_CATEGORIES_STATE_KEY]: secondaryMaterialCategoriesEntititesReducer,\n\t[STRUCTURE_CATEGORIES_STATE_KEY]: structureCategoriesEntitiesReducer,\n\t[USERS_STATE_KEY]: usersEntitiesReducer,\n});\n\nexport default reducer;\n","export const STATE_KEY = 'loading';\n\nconst getInitialState = () => ({});\n\n/**\n * reducers\n */\nconst loading = (state = getInitialState(), action) => {\n\tconst { type } = action;\n\tconst matches = /(.*)\\/(REQUEST|SUCCESS|FAILURE)$/.exec(type);\n\n\t// not a *_REQUEST / *_SUCCESS / *_FAILURE actions, so we ignore them\n\tif (!matches) return state;\n\n\tconst [, requestName, requestState] = matches;\n\n\tconst newValue = () => {\n\t\tconst previousValue = state[requestName] || 0;\n\t\tif (requestState === 'REQUEST') {\n\t\t\treturn previousValue + 1;\n\t\t}\n\t\treturn Math.max(previousValue - 1, 0);\n\t};\n\n\treturn {\n\t\t...state,\n\t\t// Store whether a request is happening at the moment or not\n\t\t// e.g. will be true when receiving GET_TODOS_REQUEST\n\t\t// and false when receiving GET_TODOS_SUCCESS / GET_TODOS_FAILURE\n\t\t[requestName]: newValue(),\n\t};\n};\n\nexport default loading;\n","import {\n\tCLEAR_PLAYLIST,\n\tPAUSE,\n\tPLAY,\n\tSET_CURRENT,\n\tSET_PLAYLIST,\n\tTOGGLE,\n} from '../actions/player';\n\nexport const STATE_KEY = 'player';\n\nconst getInitialState = () => ({\n\tcurrent: null,\n\tisPlaying: false,\n\tplaylist: [],\n});\n\n/**\n* reducers\n*/\nconst player = (state = getInitialState(), action) => {\n\tswitch (action.type) {\n\tcase CLEAR_PLAYLIST:\n\t\treturn {\n\t\t\t...state,\n\t\t\tplaylist: [],\n\t\t};\n\tcase PAUSE:\n\t\treturn {\n\t\t\t...state,\n\t\t\tisPlaying: false,\n\t\t};\n\tcase PLAY:\n\t\treturn {\n\t\t\t...state,\n\t\t\tisPlaying: true,\n\t\t};\n\tcase SET_CURRENT:\n\t\treturn {\n\t\t\t...state,\n\t\t\tcurrent: (action.sound && action.sound._id) || null,\n\t\t};\n\tcase SET_PLAYLIST:\n\t\treturn {\n\t\t\t...state,\n\t\t\tplaylist: [...action.playlist],\n\t\t};\n\tcase TOGGLE:\n\t\treturn {\n\t\t\t...state,\n\t\t\tisPlaying: !state.isPlaying,\n\t\t};\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nexport default player;\n","import {\n\tADD_RESULTS,\n} from '../actions/search';\n\nexport const STATE_KEY = 'search';\n\nconst getInitialState = () => ({\n\tambiences: [],\n\timpulseResponses: [],\n});\n\n/**\n* reducers\n*/\nconst search = (state = getInitialState(), action) => {\n\tconst { type, results } = action;\n\n\tif (type !== ADD_RESULTS) return state;\n\n\treturn {\n\t\t...state,\n\t\t...results,\n\t};\n};\n\nexport default search;\n","import {\n\tADD_RESULTS, CLEAR_RESULTS,\n} from '../actions/serie';\n\nexport const STATE_KEY = 'series';\n\nconst getInitialState = () => ({\n\timpulseResponses: [],\n\tscene: [],\n\tspace: [],\n\tlabel: null,\n});\n\n/**\n* reducers\n*/\nconst series = (state = getInitialState(), action) => {\n\tconst { type, results } = action;\n\n\tswitch (type) {\n\tcase ADD_RESULTS:\n\t\treturn {\n\t\t\t...state,\n\t\t\t...results,\n\t\t};\n\tcase CLEAR_RESULTS:\n\t\treturn getInitialState();\n\tdefault:\n\t\treturn state;\n\t}\n};\n\nexport default series;\n","import {\n\tcreateStore,\n\tcombineReducers,\n\tapplyMiddleware,\n} from 'redux';\nimport { createLogger } from 'redux-logger';\nimport createThunkerMiddleware from 'redux-thunker';\n\nimport fetchApi from './lib/fetchApi';\nimport authenticationReducer, { STATE_KEY as AUTHENTICATION_STATE_KEY } from './reducers/authentication';\nimport errorReducer, { STATE_KEY as ERROR_STATE_KEY } from './reducers/error';\nimport entitiesReducer, { STATE_KEY as ENTITIES_STATE_KEY } from './reducers/entities';\nimport loadingReducer, { STATE_KEY as LOADING_STATE_KEY } from './reducers/loading';\nimport playerReducer, { STATE_KEY as PLAYER_STATE_KEY } from './reducers/player';\nimport searchReducer, { STATE_KEY as SEARCH_STATE_KEY } from './reducers/search';\nimport searchSeriesReducer, { STATE_KEY as SEARCH_SERIE_STATE_KEY } from './reducers/serie';\n\nconst logger = createLogger({\n\tpredicate: () => true,\n\tcollapsed: () => true,\n});\n\nconst thunk = createThunkerMiddleware({\n\textraArgumentsEnhanced: {\n\t\tfetchApi,\n\t},\n});\n\nconst app = combineReducers({\n\t[AUTHENTICATION_STATE_KEY]: authenticationReducer,\n\t[ERROR_STATE_KEY]: errorReducer,\n\t[ENTITIES_STATE_KEY]: entitiesReducer,\n\t[LOADING_STATE_KEY]: loadingReducer,\n\t[PLAYER_STATE_KEY]: playerReducer,\n\t[SEARCH_STATE_KEY]: searchReducer,\n\t[SEARCH_SERIE_STATE_KEY]: searchSeriesReducer,\n});\n\nconst store = createStore(\n\tapp,\n\tapplyMiddleware(thunk, logger),\n);\n\nexport default store;\n","import React from 'react';\nimport Loadable from 'react-loadable';\nimport { Provider } from 'react-redux';\nimport { HashRouter, Route, Switch } from 'react-router-dom';\n\nimport './App.scss';\n\n// Screens\n// import Home from './screens/Home';\n// import Contributor from './screens/Contributor';\nimport Page404 from './screens/404';\nimport store from './store';\n\nconst loading = () =>
Loading...
;\n\n// Containers\nconst DefaultLayout = Loadable({\n\tloader: () => import('./components/DefaultLayout/DefaultLayout'),\n\tloading,\n});\n\nconst App = () => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{/*\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t*/}\n\t\t\t\t\n\t\t\t\t{/* */}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n);\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA.\n\nconst isLocalhost = Boolean(\n\twindow.location.hostname === 'localhost'\n // [::1] is the IPv6 localhost address.\n || window.location.hostname === '[::1]'\n // 127.0.0.1/8 is considered localhost for IPv4.\n || window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\nfunction registerValidSW(swUrl, config) {\n\tnavigator.serviceWorker\n\t\t.register(swUrl)\n\t\t.then((registration) => {\n\t\t\tregistration.onupdatefound = () => {\n\t\t\t\tconst installingWorker = registration.installing;\n\t\t\t\tinstallingWorker.onstatechange = () => {\n\t\t\t\t\tif (installingWorker.state === 'installed') {\n\t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n\t\t\t\t\t\t\t// At this point, the updated precached content has been fetched,\n\t\t\t\t\t\t\t// but the previous service worker will still serve the older\n\t\t\t\t\t\t\t// content until all client tabs are closed.\n\t\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t\t'New content is available and will be used when all '\n + 'tabs for this page are closed. See http://bit.ly/CRA-PWA.',\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onUpdate) {\n\t\t\t\t\t\t\t\tconfig.onUpdate(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// At this point, everything has been precached.\n\t\t\t\t\t\t\t// It's the perfect time to display a\n\t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n\t\t\t\t\t\t\tconsole.log('Content is cached for offline use.');\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onSuccess) {\n\t\t\t\t\t\t\t\tconfig.onSuccess(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t})\n\t\t.catch((error) => {\n\t\t\tconsole.error('Error during service worker registration:', error);\n\t\t});\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n\t// Check if the service worker can be found. If it can't reload the page.\n\tfetch(swUrl)\n\t\t.then((response) => {\n\t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n\t\t\tif (\n\t\t\t\tresponse.status === 404\n || response.headers.get('content-type').indexOf('javascript') === -1\n\t\t\t) {\n\t\t\t\t// No service worker found. Probably a different app. Reload the page.\n\t\t\t\tnavigator.serviceWorker.ready.then((registration) => {\n\t\t\t\t\tregistration.unregister().then(() => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Service worker found. Proceed as normal.\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t})\n\t\t.catch(() => {\n\t\t\tconsole.log(\n\t\t\t\t'No internet connection found. App is running in offline mode.',\n\t\t\t);\n\t\t});\n}\n\nexport function register(config) {\n\tif (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n\t\t// The URL constructor is available in all browsers that support SW.\n\t\tconst publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n\t\tif (publicUrl.origin !== window.location.origin) {\n\t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n\t\t\t// from what our page is served on. This might happen if a CDN is used to\n\t\t\t// serve assets; see https://github.com/facebook/create-react-app/issues/2374\n\t\t\treturn;\n\t\t}\n\n\t\twindow.addEventListener('load', () => {\n\t\t\tconst swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n\t\t\tif (isLocalhost) {\n\t\t\t\t// This is running on localhost. Let's check if a service worker still exists or not.\n\t\t\t\tcheckValidServiceWorker(swUrl, config);\n\n\t\t\t\t// Add some additional logging to localhost, pointing developers to the\n\t\t\t\t// service worker/PWA documentation.\n\t\t\t\tnavigator.serviceWorker.ready.then(() => {\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t'This web app is being served cache-first by a service '\n + 'worker. To learn more, visit http://bit.ly/CRA-PWA',\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Is not localhost. Just register service worker\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport function unregister() {\n\tif ('serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.ready.then((registration) => {\n\t\t\tregistration.unregister();\n\t\t});\n\t}\n}\n","import './polyfill';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n// import './index.scss';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\n// eslint-disable-next-line no-console\nconsole.info(`ℹ️ v${process.env.REACT_APP_VERSION}`);\n\nReactDOM.render(, document.getElementById('root'));\n\nserviceWorker.unregister();\n"],"sourceRoot":""}