{"version":3,"sources":["lib/http/awaiter.js","lib/http/index.js","features/settings/lists/models/group.js","features/settings/lists/models/store.js","components/askForDelete.js","features/users/constants.js","features/settings/extrafields/models/store.js","features/settings/extrafields/models/extrafield.js","lib/delay.js","features/settings/lists/components/selector.js","features/users/components/forms/extrafieldForm.js","features/settings/lists/models/list.js","lib/hooks.js","features/client/models/store.js","lib/auth/authService.js","lib/http/config.js","features/client/getClientIdentifier.js","styles/images/logo/logo.png","styles/images/logo/logo-small.png","features/client/components/clientSelector.js","features/client/components/index.js","components/app-header/modal.js","components/app-header/profile.js","components/app-header/logo.js","components/app-header/index.js","components/app-footer/index.js","components/app-menu/index.js","components/loadingBar.js","components/layouts/base.js","components/layouts/e-learning.js","features/login/lib.js","routes.js","components/notFound.js","app.js","components/globalErrorBoundary.js","index.js"],"names":["Awaiter","request","this","id","Date","now","toString","length","chars","randomstring","i","idx","Math","floor","random","generateRandomString","queue","size","lockedBy","add","Set","listeners","Map","axiosInstance","axios","create","defaultConfig","post","refreshToken","tokens","RT","data","newAccessToken","newRefreshToken","Http","setTokens","AT","value","authService","logout","clean","notification","warning","message","description","duration","placement","response","delete","undefined","forEach","fn","Promise","resolve","set","a","async","CLIENT_ERROR","SERVER_ERROR","TIMEOUT_ERROR","NETWORK_ERROR","UNKNOWN_ERROR","client","interceptors","use","headers","error","status","requestConfig","config","Authorization","awaiter","handle","problem","getProblemFromError","notifyError","reject","clientIdentifier","defaults","common","url","method","code","includes","debounce","Group","types","model","number","label","string","level","slug","actions","self","update","flow","updateGroup","getRoot","deleteGroup","HierarchyStore","fetchedLists","fetchedGroups","lists","array","List","groups","views","sortBy","results","traverse","list","children","child","push","parentId","omit","fetchGroups","get","fetchLists","addNewGroup","clientStore","group","doDelete","recursiveDelete","cpt","startIndex","destroy","nextGroups","nextGroup","filter","g","findIndex","reason","displayForceDeleteMessage","deleteCallback","unprotect","protect","addList","parent","addChild","deleteList","remove","AskForDelete","state","loading","forceDelete","setState","props","params","force","httpCallback","delay","safeSetState","setTimeout","close","obj","mounted","type","onClick","React","PureComponent","key","USERNAME_PASSWORD","COMPLETED","INCOMPLETE","UNKNOWN","LEARNER","ADMIN","TUTOR","rolesToString","SALES","SUPER_ADMIN","DEFAULT_PAGE_SIZE","ExtrafieldStore","fetched","editing","field","safeReference","Extrafield","extrafields","enabled","enabledFields","required","getField","find","Number","fetchExtrafields","addNewField","newField","values","clientId","deleteExtrafield","editExtrafield","cancelEdit","ExtrafieldItem","name","identifierNumber","boolean","enumeration","items","toggle","toggleExtrafield","getSnapshot","updateExtrafield","root","map","oldItem","Boolean","applySnapshot","edit","ms","observer","forwardRef","ref","onChange","hierarchyStore","options","placeholder","fieldNames","Option","getPopupContainer","document","querySelector","ExtraFieldForm","mode","user","getFieldDecorator","formItem","opt","rules","ue","userExtrafields","extrafieldId","initialValue","itemId","allowClear","ues","Item","listGroupId","maybe","late","afterCreate","updateList","useSafeSetState","initialState","useReducer","newState","useSetState","mountedRef","useRef","useEffect","current","args","useMediaQuery","mediaQuery","useState","window","matchMedia","matches","isVerified","setIsVerified","mediaQueryList","documentChangeHandler","addListener","removeListener","defaultSrc","require","defaultAlt","ClientPreferences","authMode","optional","withElearningAccess","withExtrafields","withLists","withDoubleAuth","customLoginURL","maybeNull","ClientBadges","identifier","Client","badges","badgesFetched","preferences","logoSrc","logoAlt","getBadges","console","log","ClientStore","displaySelector","getClient","baseURL","settingAuthMode","settingWithElearningAccess","settingWithExtrafields","settingWithList","settingWithDoubleAuth","settingCustomLoginURL","AuthMethods","callback","login","bind","Cookie","AT_COOKIE_NAME","RT_COOKIE_NAME","currentUser","warn","username","password","noRenew","accessToken","delete_cookie","f","location","href","clearTokens","path","domain","cookie","split","some","c","trim","startsWith","get_cookie","process","setCookie","secure","token","getClientIdentifierFromURL","host","module","exports","ClientSelector","setCode","checkCode","URL","urlArray","shift","unshift","protocol","join","className","showIcon","Title","e","target","onKeyUp","block","isForbidden","title","subTitle","ModalDoubleAuth","visible","handleSubmit","preventDefault","form","validateFields","err","flatMap","Object","entries","Array","isArray","replace","listIds","refreshUser","all","extrafieldStore","closable","footer","onSubmit","style","paddingBottom","changeOnSelect","requiredFields","htmlType","position","bottom","right","Component","Profile","menu","Divider","overlay","icon","firstname","lastname","Logo","src","alt","AppHeader","role","AppFooter","rel","mapping","AppMenu","isTablet","route","useCurrentRoute","pair","match","regex","pathname","currentUserRole","openKeys","setOpenKeys","selectedKeys","setSelectedKeys","concat","v","onOpenChange","inlineCollapsed","SubMenu","isDefaultLogo","LoadingBar","showLoader","setShow","timeout","clearTimeout","BaseLayout","loadingRoute","useLoadingRoute","fallback","margin","display","tip","isTokenValid","userId","encodeURIComponent","ResetPasswordPage","lazy","LoginPage","routes","mount","context","compose","withView","redirect","layoutBalancer","exact","roleBalancer","getView","req","forgotPassword","decodeURIComponent","adminOnly","admin","customUrl","NotFound","extra","App","setCurrentUser","unsubscribe","setIdentifier","subscribe","router","render","GlobalErrorBoundary","errorInfo","componentStack","moment","locale","top","init","ReactDOM","frFR","getElementById"],"mappings":"kNASqBA,E,WAWnB,WAAYC,GAAU,oBACpBC,KAAKC,GAoEAC,KAAKC,MAAMC,WAXpB,SAA8BC,GAG5B,IAFA,IAAMC,EAAQ,gEACVC,EAAe,GACVC,EAAI,EAAGA,EAAIH,EAAQG,IAAK,CAC/B,IAAMC,EAAMC,KAAKC,MAAMD,KAAKE,SAAWN,EAAMD,QAC7CE,GAAgBD,EAAMG,GAExB,OAAOF,EAIwBM,CAAqB,IAnElDb,KAAKD,QAAUA,EAEY,IAAvBD,EAAQgB,MAAMC,OAChBjB,EAAQkB,SAAWhB,KAAKC,IAG1BH,EAAQgB,MAAMG,IAAIjB,KAAKC,I,yDAbvBH,EAAQgB,MAAQ,IAAII,IACpBpB,EAAQqB,UAAY,IAAIC,IACxBtB,EAAQkB,SAAW,S,0IAeflB,EAAQkB,WAAahB,KAAKC,G,iCAEpBoB,EAAgBC,IAAMC,OAAOC,K,mBAGzBH,EAAcI,KA9BJ,gBA8B8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AAc,EAAK1X,kBAVT,E,iFAiBjB3E,KAAKoc,YAAcha,IAAYka,UAAUtc,KAAKmc,kB,6CAI9Cnc,KAAKoc,gB,+BAIL,IAAMG,EACJ,kBAAC,IAAD,CACEvB,OAAQA,GACRE,QAAS,CAAElI,YAAahT,KAAK8I,MAAMkK,YAAa5Q,kBAEhD,kBAAC,WAAD,CAAUkY,SAAU,MAClB,kBAAC,IAAD,CAAkBkC,OAAQR,IACxB,kBAAC,IAAD,SAMR,OACE,kBAAC,IAAD,KACGhc,KAAK2E,iBACJ,kBAAC,EAAD,CAAY0M,WAAYrR,KAAK2E,kBAAmB4X,GAEhDA,O,GA5CuBzS,IAAM6N,WCTlB8E,G,2MACnB3T,MAAQ,CACN9E,MAAO,KACP0Y,UAAW,M,iFAOK1Y,EAAO0Y,GACvB7K,QAAQC,IAAI9N,GACZhE,KAAKiJ,SAAS,CACZjF,QACA0Y,gB,+BAKF,OAAI1c,KAAK8I,MAAM9E,MAEX,yBAAKqR,UAAU,mBACb,uBAAQpR,OAAO,MAAM4R,MAAM,2BACxB7V,KAAK8I,MAAM4T,WACV,yBAAKrH,UAAU,eACZrV,KAAK8I,MAAM9E,OAAShE,KAAK8I,MAAM9E,MAAM5D,WACtC,6BACCJ,KAAK8I,MAAM4T,UAAUC,kBAQ3B3c,KAAKkJ,MAAMpC,Y,gDA7BY9C,GAC9B,MAAO,CAAEA,a,GAPoC8F,IAAM6N,WCcvDiF,IAAOC,OAAO,MAEdpa,EAAA,EAAQ0B,OAAO,CACb2Y,IAAK,KAGP,EAAAzZ,EAAAC,OAAA,uDACEtB,IAAK+a,OADP,WAAA1Z,EAAA,MAEQjB,IAAY2a,QAFpB,OAIEC,IAASR,OACP,kBAAC,GAAD,KACE,uBAAgBK,OAAQI,KACtB,kBAAC,GAAD,QAGJrP,SAASsP,eAAe,SAV5B,uC","file":"static/js/main.3b4cbe76.chunk.js","sourcesContent":["import axios from \"axios\";\nimport { notification } from \"antd\";\n\nimport { defaultConfig, tokens } from \"./config\";\nimport Http from \"./index\";\nimport authService from \"../auth/authService\";\n\nconst REFRESH_SESSION_URL = \"/auth/refresh\";\n\nexport default class Awaiter {\n static lockedBy = null;\n static queue = new Set();\n static listeners = new Map();\n\n static clean() {\n Awaiter.queue = new Set();\n Awaiter.listeners = new Map();\n Awaiter.lockedBy = null;\n }\n\n constructor(request) {\n this.id = randomId();\n this.request = request;\n\n if (Awaiter.queue.size === 0) {\n Awaiter.lockedBy = this.id;\n }\n\n Awaiter.queue.add(this.id);\n }\n\n async handle() {\n if (Awaiter.lockedBy === this.id) {\n try {\n const axiosInstance = axios.create(defaultConfig);\n const {\n data: { newAccessToken, newRefreshToken }\n } = await axiosInstance.post(REFRESH_SESSION_URL, {\n refreshToken: tokens.RT\n });\n\n Http.setTokens({ AT: newAccessToken.value, RT: newRefreshToken.value });\n } catch (error) {\n authService.logout();\n\n Awaiter.clean();\n\n notification.warning({\n message: \"Attention!\",\n description: \"Votre session a expiré, vous avez été déconnecté.\",\n duration: 0,\n placement: \"topLeft\"\n });\n\n return;\n }\n\n const response = await this.request();\n Awaiter.queue.delete(this.id);\n Awaiter.lockedBy = undefined;\n Awaiter.listeners.forEach(fn => fn());\n\n return response;\n } else {\n return new Promise(resolve => {\n Awaiter.listeners.set(this.id, async () => {\n const response = await this.request();\n\n Awaiter.listeners.delete(this.id);\n Awaiter.queue.delete(this.id);\n\n resolve(response);\n });\n });\n }\n }\n}\n\nfunction generateRandomString(length) {\n const chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\";\n let randomstring = \"\";\n for (let i = 0; i < length; i++) {\n const idx = Math.floor(Math.random() * chars.length);\n randomstring += chars[idx];\n }\n return randomstring;\n}\n\nfunction randomId() {\n return Date.now().toString() + generateRandomString(15);\n}\n","import axios from \"axios\";\nimport { notification } from \"antd\";\nimport debounce from \"lodash/debounce\";\n\nimport Awaiter from \"./awaiter\";\nimport { defaultConfig, tokens } from \"./config\";\n\nconst SESSION_EXPIRED_STATUS_CODE = 440;\nconst CLIENT_ERROR = \"CLIENT_ERROR\";\nconst SERVER_ERROR = \"SERVER_ERROR\";\nconst TIMEOUT_ERROR = \"TIMEOUT_ERROR\";\nconst NETWORK_ERROR = \"NETWORK_ERROR\";\nconst UNKNOWN_ERROR = \"UNKNOWN_ERROR\";\n\nexport default class Http {\n static client = axios.create(defaultConfig);\n\n static init() {\n Http.client.interceptors.response.use(\n response => {\n if (response.headers[\"x-api-newtoken\"]) {\n Http.setTokens({ AT: response.headers[\"x-api-newtoken\"] });\n }\n\n return response;\n },\n async error => {\n if (\n error.response &&\n error.response.status === SESSION_EXPIRED_STATUS_CODE\n ) {\n const requestConfig = error.config;\n delete requestConfig.headers.Authorization;\n\n try {\n const awaiter = new Awaiter(() => Http.client(requestConfig));\n return await awaiter.handle();\n } catch (error) {}\n } else {\n const problem = getProblemFromError(error);\n notifyError(problem);\n }\n\n return Promise.reject(error);\n }\n );\n }\n\n static setIdentifier(clientIdentifier) {\n if (clientIdentifier) {\n Http.client.defaults.headers.common[\"x-api-clientid\"] = clientIdentifier;\n }\n }\n\n static setTokens({ AT, RT }) {\n if (AT) {\n Http.client.defaults.headers.common[\"Authorization\"] = `Bearer ${AT}`;\n\n tokens.AT = AT;\n }\n\n if (RT) {\n tokens.RT = RT;\n }\n }\n\n static clearTokens() {\n delete Http.client.defaults.headers.common[\"Authorization\"];\n tokens.AT = undefined;\n tokens.RT = undefined;\n }\n\n static get(url, config = {}) {\n return Http.client({\n method: \"GET\",\n url,\n ...config\n });\n }\n\n static post(url, data, config = {}) {\n return Http.client({\n method: \"POST\",\n url,\n data,\n ...config\n });\n }\n\n static update(url, data, config = {}) {\n return Http.client({\n method: \"PUT\",\n url,\n data,\n ...config\n });\n }\n\n static delete(url, config = {}) {\n return Http.client({\n method: \"DELETE\",\n url,\n ...config\n });\n }\n}\n\nfunction getProblemFromError(error) {\n if (error.message === \"Network Error\") return NETWORK_ERROR;\n\n if (!error.code) {\n if (error.response && error.response.status)\n return getProblemFromStatus(error.response.status);\n } else if (error.code.includes(\"ECONNABORTED\")) {\n return TIMEOUT_ERROR;\n }\n\n return UNKNOWN_ERROR;\n}\n\nfunction getProblemFromStatus(status) {\n if (status >= 400 && status <= 499) return CLIENT_ERROR;\n if (status >= 500 && status <= 599) return SERVER_ERROR;\n\n return UNKNOWN_ERROR;\n}\n\nconst notifyError = debounce(problem => {\n if (problem === CLIENT_ERROR) return;\n\n switch (problem) {\n case SERVER_ERROR:\n notification.error({\n message: \"Erreur!\",\n description: \"Une erreur est survenue sur le serveur.\"\n });\n break;\n case TIMEOUT_ERROR:\n notification.error({\n message: \"Erreur!\",\n description: \"Le serveur est surchargé.\"\n });\n break;\n case NETWORK_ERROR:\n notification.error({\n message: \"Erreur!\",\n description:\n \"Le serveur n'est pas joignable, veuillez vérifier si vous êtes connecté à internet.\"\n });\n break;\n default:\n notification.error({\n message: \"Erreur!\",\n description:\n \"Une erreur non identifiée est survenue, veuillez consulter la console.\"\n });\n break;\n }\n}, 750);\n","import { types, flow, getRoot } from \"mobx-state-tree\";\n\nimport Http from \"@lib/http\";\n\nexport const Group = types\n .model(\"ListGroup\", {\n id: types.number,\n label: types.string,\n level: types.number,\n slug: types.string\n })\n .actions(self => ({\n update: flow(function* updateGroup(label) {\n self.label = label;\n\n yield Http.update(`/group/${self.id}`, { label });\n }),\n\n delete() {\n getRoot(self).deleteGroup(self);\n }\n }));\n","/* eslint-disable require-yield */\nimport React from \"react\";\nimport { types, flow, destroy, unprotect, protect } from \"mobx-state-tree\";\nimport sortBy from \"lodash/sortBy\";\nimport omit from \"lodash/omit\";\n\nimport Http from \"@lib/http\";\nimport { displayForceDeleteMessage } from \"@components/askForDelete\";\n\nimport { List } from \"./list\";\nimport { Group } from \"./group\";\nimport clientStore from \"../../../client/models/store\";\n\nconst HierarchyStore = types\n .model(\"HierarchyStore\", {\n fetchedLists: false,\n fetchedGroups: false,\n lists: types.array(List),\n groups: types.array(Group)\n })\n .views(self => ({\n get orderedGroups() {\n return sortBy(self.groups, [\"level\"]);\n },\n\n get flattened() {\n const results = [];\n\n function traverse(list) {\n if (!list.children) {\n return;\n }\n\n for (const child of list.children) {\n results.push({ parentId: list.id, ...omit(child, [\"children\"]) });\n traverse(child);\n }\n }\n\n for (const list of self.lists) {\n results.push(omit(list, [\"children\"]));\n traverse(list);\n }\n\n return results;\n }\n }))\n .actions(self => ({\n fetchGroups: flow(function* fetchGroups() {\n if (self.fetchedGroups) {\n return;\n }\n\n const response = yield Http.get(\"/client/lists/groups\");\n self.groups = response.data;\n self.fetchedGroups = true;\n }),\n\n fetchLists: flow(function* fetchLists() {\n if (self.fetchedLists) {\n return;\n }\n\n const response = yield Http.get(\"/client/lists\");\n self.lists = response.data;\n self.fetchedLists = true;\n }),\n\n addNewGroup: flow(function* addNewGroup(label) {\n const response = yield Http.post(\n `/client/${clientStore.client.id}/group`,\n { label }\n );\n self.groups.push(response.data);\n }),\n\n deleteGroup: flow(function* deleteGroup(group) {\n const nextGroups = self.groups.filter(g => g.level > group.level);\n const startIndex = self.groups.findIndex(g => g.id === group.id);\n\n function doDelete() {\n function recursiveDelete(cpt, list) {\n if (cpt === startIndex) {\n list.children = [];\n return;\n }\n\n for (const child of list.children) {\n recursiveDelete(cpt + 1, child);\n }\n }\n\n if (startIndex === 0) {\n self.lists = [];\n } else {\n for (const list of self.lists) {\n recursiveDelete(1, list);\n }\n }\n\n destroy(group);\n nextGroups.forEach(nextGroup => destroy(nextGroup));\n }\n\n try {\n yield Http.delete(`/group/${group.id}`);\n doDelete();\n } catch (error) {\n if (\n error.response &&\n error.response.data &&\n error.response.data.reason === \"ASK_FOR_DELETE\"\n ) {\n displayForceDeleteMessage({\n url: `/group/${group.id}`,\n description: (\n <>\n Impossible de supprimer le niveau car il est utilisé.\n
\n
\n Si vous supprimez ce niveau toute la partie de l'arborescence\n correspondante sera supprimée.\n >\n ),\n deleteCallback: () => {\n unprotect(self);\n doDelete();\n protect(self);\n }\n });\n } else throw error;\n }\n }),\n\n addList: flow(function* addList(list, parent) {\n const response = yield Http.post(\n `/client/${clientStore.client.id}/list`,\n list\n );\n if (parent) {\n parent.addChild(response.data);\n } else {\n self.lists.push(response.data);\n }\n }),\n\n deleteList: flow(function* deleteList(list) {\n try {\n yield Http.delete(`/list/${list.id}`);\n destroy(list);\n } catch (error) {\n if (\n error.response &&\n error.response.data &&\n error.response.data.reason === \"ASK_FOR_DELETE\"\n ) {\n displayForceDeleteMessage({\n url: `/list/${list.id}`,\n description: (\n <>\n Impossible de supprimer cet élément car il est utilisé.\n
\n
\n Si vous supprimez cet élément toute la partie de l'arborescence\n liée à cet élement sera également supprimée.\n >\n ),\n deleteCallback: list.remove\n });\n } else throw error;\n }\n })\n }));\n\nexport default HierarchyStore.create();\n","import React from \"react\";\nimport { notification, Button } from \"antd\";\n\nimport Http from \"@lib/http\";\nimport delay from \"@lib/delay\";\n\nclass AskForDelete extends React.PureComponent {\n state = {\n loading: false\n };\n\n forceDelete = async () => {\n this.setState({ loading: true });\n\n if (this.props.url)\n await Http.delete(this.props.url, {\n params: {\n force: true\n }\n });\n else if (typeof this.props.httpCallback === \"function\")\n await this.props.httpCallback()\n\n await delay(750);\n this.safeSetState({ loading: false });\n setTimeout(() => {\n this.props.deleteCallback();\n notification.close(\"ask-for-delete\");\n }, 250);\n };\n\n safeSetState = obj => {\n if (!this.mounted) return;\n\n this.setState(obj);\n };\n\n componentDidMount() {\n this.mounted = true;\n }\n\n componentWillUnmount() {\n this.mounted = false;\n }\n\n render() {\n return (\n
{this.props.description}
\n \n