{"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
\n

{this.props.description}

\n \n Forcer la suppression\n \n
\n );\n }\n}\n\nexport function displayForceDeleteMessage({\n url,\n description,\n deleteCallback,\n httpCallback\n}) {\n notification.warning({\n message: \"Attention!\",\n key: \"ask-for-delete\",\n duration: null,\n description: (\n \n )\n });\n}\n","export const USERNAME_PASSWORD = \"USERNAME_PASSWORD\";\n\nexport const COMPLETED = \"COMPLETED\";\nexport const INCOMPLETE = \"INCOMPLETE\";\nexport const UNKNOWN = \"UNKNOWN\";\n\nexport const progressToString = {\n COMPLETED: \"Terminé\",\n INCOMPLETE: \"Commencé\",\n UNKNOWN: \"Inscrits\",\n};\n\nexport const LEARNER = \"LEARNER\";\nexport const ADMIN = \"ADMIN\";\nexport const TUTOR = \"TUTOR\";\nexport const SALES = \"SALES\";\nexport const SUPER_ADMIN = \"SUPER_ADMIN\";\n\nexport const rolesToString = {\n ADMIN: \"Admin\",\n LEARNER: \"Apprenant\",\n TUTOR: \"Tuteur\",\n SALES: \"Commercial\",\n SUPER_ADMIN: \"Captain 2J\",\n};\n\nexport const DEFAULT_PAGE_SIZE = 10;\n","import { types, flow, destroy } from \"mobx-state-tree\";\n\nimport Http from \"@lib/http\";\nimport { Extrafield } from \"./extrafield\";\n\nconst ExtrafieldStore = types\n .model(\"ExtrafieldStore\", {\n fetched: false,\n loading: false,\n editing: false,\n field: types.safeReference(Extrafield),\n extrafields: types.array(Extrafield)\n })\n .views(self => ({\n get enabledFields() {\n return self.extrafields.filter(field => field.enabled);\n },\n\n get choiceFields() {\n return self.enabledFields.filter(field =>\n [\"choice\", \"multiple-choice\"].includes(field.type)\n );\n },\n\n get requiredFields() {\n return self.enabledFields.filter(field => field.required);\n },\n\n getField(id) {\n return self.enabledFields.find(field => field.id === Number(id));\n }\n }))\n .actions(self => ({\n fetchExtrafields: flow(function* fetchExtrafields() {\n if (self.fetched) {\n return;\n }\n\n const response = yield Http.get(\"/client/extrafields\");\n self.fetched = true;\n self.extrafields = response.data;\n }),\n\n addNewField: flow(function* newField(values, clientId) {\n if (self.loading) return;\n\n self.loading = true;\n try {\n const response = yield Http.post(\n `/client/${clientId}/extrafield`,\n values\n );\n\n self.extrafields.push(response.data);\n } finally {\n self.loading = false;\n }\n }),\n\n deleteExtrafield(field) {\n destroy(field);\n },\n\n editExtrafield(field) {\n self.field = field;\n self.editing = true;\n },\n\n cancelEdit() {\n self.editing = false;\n }\n }));\n\nexport default ExtrafieldStore.create({ extrafields: [] });\n","import React from \"react\";\nimport {\n types,\n flow,\n getSnapshot,\n getRoot,\n applySnapshot,\n unprotect,\n protect\n} from \"mobx-state-tree\";\n\nimport Http from \"@lib/http\";\nimport { displayForceDeleteMessage } from \"@components/askForDelete\";\n\nexport const ExtrafieldItem = types.model(\"ExtrafieldItem\", {\n id: types.number,\n name: types.string\n});\n\nexport const Extrafield = types\n .model(\"Extrafield\", {\n id: types.identifierNumber,\n name: types.string,\n slug: types.string,\n required: types.boolean,\n enabled: types.boolean,\n type: types.enumeration([\"choice\", \"text\", \"multiple-choice\"]),\n items: types.array(ExtrafieldItem)\n })\n .actions(self => ({\n toggle: flow(function* toggleExtrafield() {\n self.enabled = !self.enabled;\n yield Http.update(`/extrafield/${self.id}`, {\n ...getSnapshot(self),\n enabled: self.enabled\n });\n }),\n\n update: flow(function* updateExtrafield(values) {\n const root = getRoot(self);\n unprotect(root);\n root.loading = true;\n\n try {\n if (values.items) {\n values.items = values.items\n .map((value, idx) => {\n const oldItem = self.items[idx];\n if (oldItem)\n return {\n ...oldItem,\n name: value\n };\n\n return {\n name: value\n };\n })\n .filter(Boolean);\n }\n\n const response = yield Http.update(`/extrafield/${self.id}`, values);\n applySnapshot(self, response.data);\n } finally {\n root.loading = false;\n protect(root);\n }\n }),\n\n delete: flow(function* deleteExtrafield() {\n try {\n yield Http.delete(`/extrafield/${self.id}`);\n getRoot(self).deleteExtrafield(self);\n } catch (error) {\n if (error.response && error.response.data.reason === \"ASK_FOR_DELETE\") {\n displayForceDeleteMessage({\n url: `/extrafield/${self.id}`,\n description: (\n <>\n Impossible de supprimer le champ car il est utilisé.\n
\n
\n Si vous supprimez ce champ toutes les données de ce champ seront\n supprimées définitivement.\n \n ),\n deleteCallback: () => getRoot(self).deleteExtrafield(self)\n });\n } else throw error;\n }\n }),\n\n edit() {\n getRoot(self).editExtrafield(self);\n }\n }));\n","const delay = ms => new Promise(resolve => setTimeout(resolve, ms));\n\nexport default delay;\n","import React from \"react\";\nimport { Cascader } from \"antd\";\nimport { observer } from \"mobx-react\";\n\nimport hierarchyStore from \"../models/store\";\n\nfunction ListSelector({ onChange, value, ...props }, ref) {\n // eslint-disable-next-line no-unused-vars\n const length = hierarchyStore.lists.length; // pour trigger une update\n\n return (\n \n );\n}\n\nexport default observer(React.forwardRef(ListSelector));\n","import React from \"react\";\nimport { Form, Input, Select } from \"antd\";\n\nconst Option = Select.Option;\nconst getPopupContainer = () => document.querySelector(\".ant-drawer-body\");\n\nexport default function ExtraFieldForm({\n field,\n mode,\n user,\n getFieldDecorator,\n}) {\n let formItem = null;\n\n const opt = {\n rules: [\n {\n required: field.required,\n message: \"Ce champ est obligatoire\",\n },\n ],\n };\n\n switch (field.type) {\n case \"text\":\n if (mode === \"edit\") {\n const ue = user.userExtrafields.find(\n (ue) => ue.extrafieldId === field.id\n );\n if (ue) {\n opt.initialValue = ue.value;\n }\n }\n formItem = getFieldDecorator(`extrafields.${field.id}`, opt)();\n\n break;\n case \"choice\":\n if (mode === \"edit\") {\n const ue = user.userExtrafields.find(\n (ue) => ue.extrafieldId === field.id\n );\n if (ue) {\n opt.initialValue = ue.itemId;\n }\n }\n\n formItem = getFieldDecorator(\n `extrafields.${field.id}`,\n opt\n )(\n \n );\n break;\n\n case \"multiple-choice\":\n if (mode === \"edit\") {\n const ues = user.userExtrafields.filter(\n (ue) => ue.extrafieldId === field.id\n );\n if (ues.length > 0) {\n opt.initialValue = ues.map((ue) => ue.itemId);\n }\n }\n\n formItem = getFieldDecorator(\n `extrafields.${field.id}`,\n opt\n )(\n \n );\n break;\n\n default:\n formItem = null;\n }\n\n return {formItem};\n}\n","import {\n types,\n flow,\n getRoot,\n destroy,\n unprotect,\n protect\n} from \"mobx-state-tree\";\n\nimport Http from \"@lib/http\";\n\nexport const List = types\n .model(\"List\", {\n id: types.number,\n name: types.string,\n listGroupId: types.number,\n children: types.maybe(types.array(types.late(() => List)))\n })\n .actions(self => ({\n afterCreate() {\n if (self.children && self.children.length === 0) {\n self.children = undefined;\n }\n },\n\n addChild(list) {\n if (!self.children) {\n self.children = [];\n }\n\n self.children.push(list);\n },\n\n update: flow(function* updateList(name) {\n yield Http.update(`/list/${self.id}`, { name });\n self.name = name;\n }),\n\n delete() {\n getRoot(self).deleteList(self);\n },\n\n remove() {\n const root = getRoot(self);\n unprotect(root);\n destroy(self);\n protect(root);\n }\n }));\n","import { useReducer, useRef, useEffect, useState } from \"react\";\n\nexport function usePrevious(value) {\n const prevValue = useRef();\n\n useEffect(() => {\n prevValue.current = value;\n\n return () => {\n prevValue.current = undefined;\n };\n });\n\n return prevValue.current;\n}\n\nexport function useSetState(initialState) {\n return useReducer(\n (state, newState) => ({ ...state, ...newState }),\n initialState\n );\n}\n\nexport function useSafeSetState(initialState) {\n const [state, setState] = useSetState(initialState);\n\n const mountedRef = useRef(false);\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n const safeSetState = args => {\n if (mountedRef.current) setState(args);\n };\n\n return [state, safeSetState];\n}\n\nexport function useMediaQuery(mediaQuery) {\n const [isVerified, setIsVerified] = useState(\n !!window.matchMedia(mediaQuery).matches\n );\n\n useEffect(() => {\n const mediaQueryList = window.matchMedia(mediaQuery);\n const documentChangeHandler = () => setIsVerified(!!mediaQueryList.matches);\n\n mediaQueryList.addListener(documentChangeHandler);\n\n documentChangeHandler();\n return () => {\n mediaQueryList.removeListener(documentChangeHandler);\n };\n }, [mediaQuery]);\n\n return isVerified;\n}\n","import { types, flow } from \"mobx-state-tree\";\n\nimport Http from \"@lib/http\";\nimport { defaultConfig } from \"@lib/http/config\";\n\nexport const defaultSrc = require(\"../../../styles/images/logo/logo.png\");\nexport const defaultAlt = \"Logo 2J MOBILE\";\n\nconst ClientPreferences = types.model(\"ClientPreferences\", {\n authMode: types.optional(\n types.enumeration([\"EMAIL_CODE\", \"USERNAME_PASSWORD\", \"CUSTOM\"]),\n \"USERNAME_PASSWORD\"\n ),\n withElearningAccess: false,\n withExtrafields: false,\n withLists: false,\n withDoubleAuth: false,\n customLoginURL: types.maybeNull(types.string),\n});\n\nconst ClientBadges = types.model(\"ClientBadges\", {\n id: types.number,\n name: types.string,\n description: types.string,\n identifier: types.string,\n});\n\nconst Client = types\n .model(\"Client\", {\n id: types.number,\n name: types.string,\n identifier: types.string,\n enabled: types.boolean,\n badges: types.array(ClientBadges),\n badgesFetched: false,\n preferences: types.optional(ClientPreferences, {}),\n logoSrc: types.optional(types.string, defaultSrc),\n logoAlt: types.optional(types.string, defaultAlt),\n })\n .views((self) => ({\n get isEmailRequired() {\n if (self.preferences.authMode === \"EMAIL_CODE\") {\n return true;\n }\n return false;\n },\n get isDefaultLogo() {\n return self.logoAlt === defaultAlt;\n },\n }))\n .actions((self) => ({\n getBadges: flow(function* getBadges() {\n if (self.badgesFetched) return;\n\n try {\n const response = yield Http.get(`/client/${self.identifier}/badges`);\n\n if (response) {\n self.badges = response.data;\n self.badgesFetched = true;\n }\n } catch (error) {\n console.log(\"Impossible de récupérer les badges\");\n }\n }),\n }));\n\nconst ClientStore = types\n .model(\"ClientStore\", {\n client: types.maybe(Client),\n displaySelector: false,\n })\n .views((self) => ({\n get isForbidden() {\n return self.client && !self.client.enabled;\n },\n }))\n .actions((self) => ({\n getClient: flow(function* getClient(identifier) {\n try {\n const response = yield Http.get(`/client/${identifier}`);\n\n let logoSrc, logoAlt;\n try {\n yield Http.get(\n `${defaultConfig.baseURL}/client/${response.data.identifier}/logo`\n );\n logoSrc = `${defaultConfig.baseURL}/client/${response.data.identifier}/logo`;\n logoAlt = `Logo ${response.data.name}`;\n } catch (error) {\n console.log(\n \"Impossible de charger le logo du client. Logo par défaut utilisé.\"\n );\n }\n\n const client = Client.create({\n ...response.data,\n logoSrc,\n logoAlt,\n preferences: {\n authMode: response.data.settingAuthMode,\n withElearningAccess: response.data.settingWithElearningAccess,\n withExtrafields: response.data.settingWithExtrafields,\n withLists: response.data.settingWithList,\n withDoubleAuth: response.data.settingWithDoubleAuth,\n customLoginURL: response.data.settingCustomLoginURL,\n },\n });\n\n self.client = client;\n window.client = client;\n } catch (error) {\n console.log(error);\n self.displaySelector = true;\n }\n }),\n }));\n\nexport default ClientStore.create();\n","import Cookie from \"js-cookie\";\nimport axios from \"axios\";\n\nimport Http from \"../http\";\nimport {\n defaultConfig,\n AT_COOKIE_NAME,\n RT_COOKIE_NAME,\n tokens,\n} from \"../http/config\";\n\nexport const AuthMethods = {\n EmailCode: \"EMAIL_CODE\",\n UsernamePassword: \"USERNAME_PASSWORD\",\n};\n\nclass AuthService {\n constructor() {\n this.user = null;\n this.callback = undefined;\n\n this.login = this.login.bind(this);\n this.logout = this.logout.bind(this);\n }\n\n async init() {\n try {\n // Hydrate un objet user si le cookie est présent\n const AT = Cookie.get(AT_COOKIE_NAME);\n const RT = Cookie.get(RT_COOKIE_NAME);\n if (AT && RT) {\n Http.setTokens({ AT, RT });\n\n const { data: user } = await Http.get(\"/user\");\n this.currentUser = user;\n }\n } catch (error) {\n console.warn(\"INIT - authService\");\n }\n }\n\n get currentUser() {\n return this.user;\n }\n\n set currentUser(user) {\n this.user = user;\n window.user = user;\n }\n\n subscribe(callback) {\n this.callback = callback;\n return () => {\n this.callback = undefined;\n };\n }\n\n async login(username, password) {\n const { data } = await Http.post(\n \"/auth/login\",\n {\n username,\n password,\n mode: AuthMethods.UsernamePassword,\n },\n {\n params: {\n noRenew: true,\n },\n }\n );\n\n Http.setTokens({\n AT: data.accessToken.value,\n RT: data.refreshToken.value,\n });\n\n const { data: user } = await Http.get(\"/user\");\n this.currentUser = user;\n\n if (this.callback && typeof this.callback === \"function\") {\n this.callback(user);\n }\n }\n\n async logout() {\n try {\n // Nouvelle instance pour éviter les intercepteurs\n await axios.post(\"/auth/logout\", null, {\n ...defaultConfig,\n headers: {\n Authorization: `Bearer ${tokens.AT}`,\n },\n });\n } catch (error) {\n // Dans tous les cas si le logout échoue on redirige sur le login\n }\n\n if (this.currentUser.clientId === 6) {\n delete_cookie(AT_COOKIE_NAME);\n delete_cookie(AT_COOKIE_NAME, \"/\", \".baudin.2jmobile.com\");\n delete_cookie(RT_COOKIE_NAME);\n delete_cookie(RT_COOKIE_NAME, \"/\", \".baudin.2jmobile.com\");\n\n let field = this.currentUser.userExtrafields.find(\n (f) => f.extrafieldId === 37\n );\n if (field && field.itemId === 92) {\n this.currentUser = undefined;\n\n window.location.href = \"/login?customUrl=interim\";\n }\n }\n\n Http.clearTokens();\n\n this.currentUser = undefined;\n if (this.callback && typeof this.callback === \"function\") {\n this.callback(undefined);\n }\n }\n\n async refreshUser() {\n try {\n const { data: user } = await Http.get(\"/user\");\n this.currentUser = user;\n } catch (error) {}\n }\n}\n\nconst authService = new AuthService();\n\nexport default authService;\n\nfunction delete_cookie(name, path, domain) {\n if (get_cookie(name)) {\n document.cookie =\n name +\n \"=\" +\n (path ? \";path=\" + path : \"\") +\n (domain ? \";domain=\" + domain : \"\") +\n \";expires=Thu, 01 Jan 1970 00:00:01 GMT\";\n }\n}\nfunction get_cookie(name) {\n return document.cookie.split(\";\").some((c) => {\n return c.trim().startsWith(name + \"=\");\n });\n}\n","import Cookie from \"js-cookie\";\n\nexport const defaultConfig = {\n baseURL: process.env.REACT_APP_API_URL,\n};\n\nexport const AT_COOKIE_NAME = \"2j-mobile-AT\";\nexport const RT_COOKIE_NAME = \"2j-mobile-RT\";\n\nfunction setCookie(name, value) {\n if (!value) {\n Cookie.remove(name);\n } else {\n Cookie.set(name, value, {\n secure: process.env.NODE_ENV === \"production\",\n });\n }\n}\n\nexport const tokens = {\n accessToken: undefined,\n refreshToken: undefined,\n\n get AT() {\n return this.accessToken;\n },\n\n set AT(token) {\n this.accessToken = token;\n\n setCookie(AT_COOKIE_NAME, token);\n },\n\n get RT() {\n return this.refreshToken;\n },\n\n set RT(token) {\n this.refreshToken = token;\n\n setCookie(RT_COOKIE_NAME, token);\n },\n};\n","export default function getClientIdentifierFromURL() {\n const location = window.location;\n if (location && location.host && !location.host.startsWith(\"2jmobile\")) {\n return location.host.split(\".\")[0];\n }\n\n return undefined;\n}\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2+zyir6Ei7s11U7TpZb/Pw+q4sdFV0U80a5tIHtQA6a3I0qjjFBoL1kIOmjdWRj1qEsfwFt511JZj3HScPI9x8qNpm5yMW9aaKmqck3Ef45EFpMI66T0lwwrS+vCCrkZXBdaYWmANGfAgNY/59nN+28QpJK1lF2mN1Zx0tAeu54k4TbuUk5a2rDq+4IugnhCP9s0lecwl34H8nzYOayI1LNb65ILr7tTtuL/Rc9obbyQtuorrUn6fZxuxhVYkRRdJe5yTtprci582BcSdsQUd9/s8VdT96CetDEnCSO/oIrGVmL7pDmI8FtJLejY+qC1c9xNLSyvndoH/uKAVNamcRBbKSGV0iRLGIytnA9EMIBmgE7KAkJWsjBTCOGRtmgqyiFuhgS4R7aGCz9XUdGnTvVqKujLb0ihZxD37SatnwY30y2q8AdrTVDe6Knbzc63xBupqvIEmgRtSY7X0pFxQ7Wnh9Zx1pOfs57gbEJdr4hbMybjrSY/HT5sCUklYAbWkp2TJIvmsJXawJNJIv4x087cTssQ0CzOurfEG1vLSUEO19KRJoLiTwtPQgJ9kE6l5+t3LCTn4abeJ6Bsf1YQD2srqSAul+seSbuSRVSUl8OQ/NK6Oji+RPFKTu9MN0pWA1PA2njt5SejAt5H2Yl5e2mp+MCwGJNXv8yzlhC61nIB+Lr2n4YmWXhr0pa0BSiYZe9bSeIoM2L8SncONCUSFuDGBqBA3CFOIG4QpxA3CFOIGYUoAAP8D9udoEz90pDgAAAAASUVORK5CYII=\"","import React, { useState } from \"react\";\nimport { Input, Typography, Alert, Button, notification } from \"antd\";\n\nimport Http from \"@lib/http\";\n\nexport default function ClientSelector() {\n const [code, setCode] = useState(\"\");\n\n async function checkCode() {\n if (code === \"\") {\n notification.error({\n message: \"Erreur\",\n description: \"Vous devez renseigner un code.\"\n });\n\n return;\n }\n\n try {\n const response = await Http.get(`/client/${code}`);\n\n const url = new URL(window.location);\n const urlArray = url.host.split(\".\");\n urlArray.shift();\n urlArray.unshift(response.data.identifier);\n\n window.location.href = url.protocol + \"//\" + urlArray.join(\".\");\n } catch (error) {\n notification.error({\n message: \"Erreur\",\n description: \"Code client incorrect.\"\n });\n }\n }\n\n return (\n
\n
\n \n
\n Code client\n setCode(e.target.value)}\n onKeyUp={e => {\n if (e.key === \"Enter\") {\n checkCode();\n }\n }}\n />\n \n
\n
\n
\n );\n}\n","import React, { useEffect } from \"react\";\nimport { observer } from \"mobx-react\";\nimport { Result } from \"antd\";\n\nimport ClientSelector from \"./clientSelector\";\nimport clientStore from \"../models/store\";\n\nfunction ClientInit({ children, identifier }) {\n useEffect(() => {\n clientStore.getClient(identifier);\n }, [identifier]);\n\n const client = clientStore.client;\n\n if (clientStore.displaySelector) return ;\n\n if (!client) return null; // TODO: Global app loader\n\n return clientStore.isForbidden ? (\n
\n
\n \n Le client {client.name} est désactivé.\n \n }\n />\n
\n
\n ) : (\n children\n );\n}\n\nexport default observer(ClientInit);\n","import React from \"react\";\nimport { Modal, Button, Form, Spin } from \"antd\";\nimport flatMap from \"lodash/flatMap\";\n\nimport clientStore from \"@features/client/models/store\";\nimport authService from \"@lib/auth/authService\";\nimport ExtraFieldForm from \"@features/users/components/forms/extrafieldForm\";\nimport extrafieldStore from \"@features/settings/extrafields/models/store\";\nimport hierarchyStore from \"@features/settings/lists/models/store\";\nimport ListSelector from \"@features/settings/lists/components/selector\";\nimport Http from \"@lib/http\";\n\nclass ModalDoubleAuth extends React.Component {\n state = { loading: true, visible: true };\n\n handleSubmit = async (e) => {\n e.preventDefault();\n this.props.form.validateFields(async (err, values) => {\n if (values.extrafields) {\n values.extrafields = flatMap(\n Object.entries(values.extrafields),\n ([id, values]) => {\n if (Array.isArray(values)) {\n return values.map((value) => ({\n extrafieldId: +id.replace(\"id_\", \"\"),\n value,\n }));\n } else\n return {\n extrafieldId: +id.replace(\"id_\", \"\"),\n value: values,\n };\n }\n ).filter((field) => field.value !== undefined);\n\n if (values.extrafields.length === 0) delete values.extrafields;\n }\n\n await Http.post(`/user/complete`, {\n id: authService.currentUser.id,\n listIds: values.listIds,\n extrafields: values.extrafields,\n });\n await authService.refreshUser();\n this.setState({\n visible: false,\n loading: false,\n });\n });\n };\n\n async componentDidMount() {\n await Promise.all([\n hierarchyStore.fetchLists(),\n extrafieldStore.fetchExtrafields(),\n ]);\n\n this.setState({ loading: false });\n }\n\n render() {\n const {\n form: { getFieldDecorator },\n } = this.props;\n\n return (\n \n {this.state.loading ? (\n
\n \n
\n ) : (\n
\n {clientStore.client.preferences.withLists &&\n authService.currentUser.lists < 1 && (\n \n {getFieldDecorator(\"listIds\", {\n initialValue: undefined,\n rules: [\n {\n required: true,\n message: \"Veuillez sélectionner un élément\",\n },\n ],\n })()}\n \n )}\n\n {clientStore.client.preferences.withExtrafields &&\n extrafieldStore.requiredFields.map(\n (field) =>\n !authService.currentUser.userExtrafields.find(\n (ue) => ue.extrafieldId === field.id\n ) && (\n \n )\n )}\n \n Valider\n \n \n )}\n \n );\n }\n}\n\nexport default Form.create()(ModalDoubleAuth);\n","import React from \"react\";\nimport { Menu, Icon, Dropdown, Avatar } from \"antd\";\nimport { Link } from \"react-navi\";\n\nimport authService from \"@lib/auth/authService\";\n\nexport default function Profile() {\n const menu = (\n \n \n Mon profil\n \n\n \n \n \n Se déconnecter\n \n \n );\n\n const currentUser = authService.currentUser;\n if (!currentUser) return null;\n\n return (\n \n \n \n \n {currentUser.firstname} {currentUser.lastname}\n \n \n \n );\n}\n","import React from \"react\";\nimport clientStore from \"../../features/client/models/store\";\n\nexport default function Logo() {\n return (\n \n );\n}\n","import React from \"react\";\n\nimport authService from \"@lib/auth/authService\";\nimport clientStore from \"@features/client/models/store\";\n\nimport ModalDoubleAuth from \"./modal\";\nimport Profile from \"./profile\";\nimport Logo from \"./logo\";\n\nexport default function AppHeader() {\n const currentUser = authService.currentUser;\n return (\n
\n
\n \n
\n
\n \n
\n {currentUser &&\n currentUser.role !== \"ADMIN\" &&\n clientStore.client.preferences.withDoubleAuth &&\n ((clientStore.client.preferences.withExtrafields &&\n currentUser.userExtrafields.length < 1) ||\n (clientStore.client.preferences.withLists &&\n currentUser &&\n currentUser.lists.length < 1)) && }\n
\n );\n}\n","import React from \"react\";\nimport { Divider } from \"antd\";\n\nexport default function AppFooter() {\n return (\n \n );\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useState, useEffect } from \"react\";\nimport { Link, useCurrentRoute } from \"react-navi\";\nimport { Menu, Icon } from \"antd\";\n\nimport { useMediaQuery } from \"@lib/hooks\";\nimport authService from \"@lib/auth/authService\";\nimport { ADMIN } from \"@features/users/constants\";\n\nimport clientStore, { defaultAlt } from \"../../features/client/models/store\";\n\nexport const defaultSrc = require(\"../../styles/images/logo/logo-small.png\");\n\nconst mapping = [\n [/settings\\/extrafields/, [\"settings\", \"extrafields\"]],\n [/settings\\/lists/, [\"settings\", \"lists\"]],\n [/settings\\/notifications/, [\"settings\", \"notifications\"]],\n [/users\\/learners/, [\"users\", \"learners\"]],\n [/users\\/learner\\//, [\"users\", \"learners\"]],\n [/users\\/tutors/, [\"users\", \"tutors\"]],\n [/courses/, [null, \"courses\"]],\n [/reporting/, [null, \"reporting\"]]\n];\n\nfunction match(url) {\n let match;\n for (const [regex, pair] of mapping) {\n if (url.match(regex) !== null) {\n match = pair;\n break;\n }\n }\n\n return match;\n}\n\nexport default function AppMenu() {\n const isTablet = useMediaQuery(\"(max-width: 48rem)\");\n const route = useCurrentRoute();\n const pair = match(route.url.pathname);\n\n const currentUserRole = authService.currentUser?.role;\n\n const [openKeys, setOpenKeys] = useState(() =>\n pair && !isTablet ? [pair[0]] : []\n );\n const [selectedKeys, setSelectedKeys] = useState(() =>\n pair ? [pair[1]] : []\n );\n\n useEffect(() => {\n if (pair) {\n if (!isTablet && pair[0] && !openKeys.includes(pair[0])) {\n setOpenKeys(openKeys.concat([pair[0]]));\n }\n\n if (pair[1] && !selectedKeys.includes(pair[1])) {\n setSelectedKeys([pair[1]]);\n }\n } else {\n setSelectedKeys([]);\n }\n }, [route.url.pathname]);\n\n useEffect(() => {\n if (isTablet) {\n setOpenKeys([]);\n } else if (pair && pair[0]) {\n setOpenKeys([pair[0]]);\n }\n }, [isTablet]);\n\n const client = clientStore.client;\n\n return (\n
\n
\n setSelectedKeys([v.key])}\n onOpenChange={setOpenKeys}\n inlineCollapsed={isTablet}\n >\n {currentUserRole === ADMIN ? (\n \n \n Gestion des comptes\n \n }\n >\n \n Apprenants\n \n \n Tuteurs\n \n \n ) : (\n \n \n \n Apprenants\n \n \n )}\n {currentUserRole === ADMIN && (\n \n \n \n Parcours\n \n \n )}\n \n \n \n Analyse\n \n \n {currentUserRole === ADMIN && (\n \n \n Paramètres\n \n }\n >\n {client.preferences.withExtrafields && (\n \n \n Champs supplémentaires\n \n \n )}\n {client.preferences.withLists && (\n \n Arborescence\n \n )}\n \n Notifications\n \n \n )}\n \n {!client.isDefaultLogo && (\n
\n {defaultAlt}\n
\n )}\n
\n
\n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nexport default function LoadingBar() {\n const [showLoader, setShow] = useState(false);\n\n useEffect(() => {\n const timeout = setTimeout(() => setShow(true), 1 * 1000);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n\n if (!showLoader) return null;\n\n return (\n
\n
\n
\n );\n}\n","import React, { Suspense } from \"react\";\nimport { View, useLoadingRoute } from \"react-navi\";\nimport { Spin } from \"antd\";\n\nimport AppHeader from \"../app-header\";\nimport AppFooter from \"../app-footer\";\nimport AppMenu from \"../app-menu\";\nimport LoadingBar from \"../loadingBar\";\n\nexport default function BaseLayout() {\n const loadingRoute = useLoadingRoute();\n\n return (\n <>\n {!!loadingRoute && }\n \n
\n \n
\n
\n \n }\n >\n \n \n
\n\n \n
\n
\n \n );\n}\n","import React, { Suspense } from \"react\";\nimport { View, useLoadingRoute } from \"react-navi\";\nimport { Spin } from \"antd\";\n\nimport AppHeader from \"../app-header\";\nimport AppFooter from \"../app-footer\";\nimport LoadingBar from \"../loadingBar\";\n\nexport default function BaseLayout() {\n const loadingRoute = useLoadingRoute();\n\n return (\n <>\n {!!loadingRoute && }\n \n
\n
\n
\n \n }\n >\n \n \n
\n\n \n
\n
\n \n );\n}\n","import Http from \"@lib/http\";\n\nexport async function isTokenValid(userId, token) {\n try {\n await Http.get(\n `/user/check-reset-password-token/${encodeURIComponent(\n userId\n )}/${encodeURIComponent(token)}`\n );\n return true;\n } catch (error) {\n return false;\n }\n}\n","import React from \"react\";\n\nimport { mount, lazy, redirect, route, map, compose, withView } from \"navi\";\n\nimport BaseLayout from \"@components/layouts/base\";\nimport ELearningLayout from \"@components/layouts/e-learning\";\nimport { isTokenValid } from \"@features/login/lib\";\n\nconst ResetPasswordPage = React.lazy(() =>\n import(\n /* webpackChunkName: \"reset-password\" */ \"./features/login/resetPassword\"\n )\n);\nconst LoginPage = React.lazy(() =>\n import(/* webpackChunkName: \"login\" */ \"./features/login\")\n);\n\nexport const routes = mount({\n \"*\": map((request, context) =>\n !context.currentUser\n ? redirect(\"/login\", { exact: false })\n : compose(\n withView((request, context) => layoutBalancer(context)),\n mount({\n \"/e-learning\": lazy(() =>\n import(\n /* webpackChunkName: \"elearning\" */ \"./features/elearning/routes\"\n )\n ),\n \"/users\": lazy(() =>\n import(/* webpackChunkName: \"users\" */ \"./features/users/routes\")\n ),\n\n \"/settings\": lazy(() =>\n import(\n /* webpackChunkName: \"settings\" */ \"./features/settings/routes\"\n )\n ),\n\n \"/courses\": lazy(() =>\n import(\n /* webpackChunkName: \"courses\" */ \"./features/courses/routes\"\n )\n ),\n\n \"/reporting\": lazy(() =>\n import(\n /* webpackChunkName: \"reporting\" */ \"./features/reporting/routes\"\n )\n ),\n })\n )\n ),\n \"/\": map((request, context) => roleBalancer(context)),\n \"/legal\": route({\n title: \"Conditions générales - 2J MOBILE\",\n getView: () =>\n import(/* webpackChunkName: \"legal\" */ \"./components/legalPage\"),\n }),\n \"/reset-password/:userId/:token\": route({\n title: \"Réinitialiser votre mot de passe - 2J MOBILE\",\n getView: async (req) => (\n \n ),\n }),\n \"/login\": map(async (request, context) => {\n return context.currentUser\n ? redirect(\"/\")\n : route({\n title: \"Connexion - 2J MOBILE\",\n getView: () => (\n \n ),\n });\n }),\n});\n\nfunction roleBalancer(context) {\n if (context.currentUser) {\n switch (context.currentUser.role) {\n case \"TUTOR\":\n case \"ADMIN\":\n return redirect(\"/users\");\n\n case \"LEARNER\":\n return redirect(\"/e-learning\");\n default:\n break;\n }\n }\n\n return redirect(\"/login\");\n}\n\nfunction layoutBalancer(context) {\n if (context.currentUser) {\n switch (context.currentUser.role) {\n case \"TUTOR\":\n case \"ADMIN\":\n return ;\n\n case \"LEARNER\":\n return ;\n default:\n break;\n }\n }\n\n return redirect(\"/login\");\n}\n","import React from \"react\";\nimport { Link } from \"react-navi\";\nimport { Result, Button } from \"antd\";\n\nexport default function NotFound() {\n return (\n \n Accueil\n \n }\n />\n );\n}\n","import React, { Suspense } from \"react\";\nimport { View, Router, NotFoundBoundary } from \"react-navi\";\nimport HelmetProvider from \"react-navi-helmet-async\";\n\nimport authService from \"@lib/auth/authService\";\nimport Http from \"@lib/http\";\nimport ClientInit from \"@features/client/components/index\";\nimport getClientIdentifierFromURL from \"@features/client/getClientIdentifier\";\n\nimport { routes } from \"./routes\";\nimport NotFound from \"./components/notFound\";\n\nexport default class App extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n currentUser: authService.currentUser,\n };\n\n this.unsubscribe = null;\n this.clientIdentifier = getClientIdentifierFromURL();\n if (this.clientIdentifier) {\n Http.setIdentifier(this.clientIdentifier);\n }\n }\n\n setCurrentUser = (user) => this.setState({ currentUser: user });\n\n componentDidMount() {\n this.unsubscribe = authService.subscribe(this.setCurrentUser);\n }\n\n componentWillUnmount() {\n this.unsubscribe();\n }\n\n render() {\n const router = (\n \n \n \n \n \n \n \n );\n\n return (\n \n {this.clientIdentifier ? (\n {router}\n ) : (\n router\n )}\n \n );\n }\n}\n","import React from \"react\";\nimport { Result } from \"antd\";\n\nexport default class GlobalErrorBoundary extends React.Component {\n state = {\n error: null,\n errorInfo: null\n };\n\n static getDerivedStateFromError(error) {\n return { error };\n }\n\n componentDidCatch(error, errorInfo) {\n console.log(error);\n this.setState({\n error,\n errorInfo\n });\n }\n\n render() {\n if (this.state.error) {\n return (\n
\n \n {this.state.errorInfo && (\n
\n {this.state.error && this.state.error.toString()}\n
\n {this.state.errorInfo.componentStack}\n
\n )}\n
\n
\n );\n }\n\n return this.props.children;\n }\n}\n","import \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\n\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ConfigProvider, message } from \"antd\";\nimport frFR from \"antd/es/locale/fr_FR\";\nimport moment from \"moment\";\nimport \"moment/locale/fr\";\n\nimport Http from \"@lib/http\";\nimport authService from \"@lib/auth/authService\";\n\nimport \"./styles/index.less\";\nimport App from \"./app\";\nimport GlobalErrorBoundary from \"./components/globalErrorBoundary\";\n\nmoment.locale(\"fr\");\n\nmessage.config({\n top: 64 - 20,\n});\n\nasync function boot() {\n Http.init();\n await authService.init();\n\n ReactDOM.render(\n \n \n \n \n ,\n document.getElementById(\"root\")\n );\n}\n\nboot();\n"],"sourceRoot":""}