{"version":3,"sources":["reducers/ForecastType.ts","reducers/WaterToolsPortal.ts","containers/hooks/useAxios.js","reducers/TimeseriesChart.js","reducers/MapContent.js","reducers/Scenario.js","reducers/Profile.ts","reducers/Filters.js","reducers/Systems.js","store/index.js","reducers/MapView.js","constants/actionTypes.js","reducers/Animation.ts","reducers/MapItemsStore.js","reducers/Configuration.js","components/Breadcrumbs/lib/useStyles.js","components/Breadcrumbs/Breadcrumbs.js","components/Layout/partials/SubHeader/SubHeader.js","components/Layout/partials/Header/lib/useStyles.js","components/Layout/partials/Header/Header.js","components/Layout/partials/Content/Content.js","containers/Accounts/Login.js","images/appInfoBackground.png","components/Layout/partials/Login/Login.js","components/Layout/Layout.js","theme/mike-colors.js","factories/ConfigApi.tsx","components/Snack/SnackContext.ts","factories/TimeseriesFactory.js","factories/SystemApi.js","factories/WaterToolsFactory.js","containers/hooks/portal/useAppInfo.ts","components/Dialog/Confirm/ConfirmContext.js","factories/ScenarioApi.js","../public/locales lazy /^/.//.*/.json$/ groupOptions: {} namespace object","components/Dialog/Confirm/ConfirmationDialog.js","components/Dialog/Confirm/ConfirmProvider.js","containers/MOWebLayout/MOWebLayout.js","containers/Accounts/Signout.js","actions/index.js","routers/index.js","serviceWorker.js","theme/mike.js","components/Snack/Alert.js","components/Snack/SnackProvider.js","i18n.js","index.js","reducers/index.ts","store/storeProd.js","reducers/Authorization.js","reducers/helper.js"],"names":["initialState","system","undefined","forecastType","sliceName","dispatchForecastType","createAsyncThunk","payload","thunkApi","a","ghm","dispatch","dispatchTimeseriesReset","dispatchScenarioReset","dispatchMapContentReset","dispatchRESETLPPLACE","getSimulationLatest","res","latest","dispatchSystem","slice","createSlice","name","reducers","dispatchSimulationTime","state","dispatchSystemClean","extraReducers","pending","toString","fulfilled","actions","selectSystem","selectForecastType","isPortal","isGHMView","process","REACT_APP_VIEW","options","filter","show","error","dispatchWaterToolsPortal","dispatchStandAloneApp","selectIsPortal","selectOptions","selectPending","mikeCouldAxios","axios","create","baseURL","defaultAxios","timeseries","timeseries2D","values","valuesStatistics","statisticMethod","statisticFrom","statisticTo","allowOtherSimulations","isFetchingPredictionIntervals","dispatchTimeseriesValue","dbName","path","simulationPath","simulationStart","simulationEnd","referenceType","timeOfForecast","indicator","aggregationType","isCompared","ts","replace","split","join","query","post","response","data","d","Object","length","indicatorName","dispatchRESETTIMESERIESSTATISTICSVALUES","dispatchSetForecastPredictionFetch","dispatchTimeseriesAdd","arr","p","some","t","concat","dispatchTimeseriesRemove","dispatchThresHoldsAdd","map","item","thresholdPlot","indexOf","dispatchThresHoldsRemove","x","dispatchSETTIMESERIESSTATISTICSVALUES","dispatchSWITCHTIMESERIESTHRESHOLD","rest","dispatchREMOVETIMESERIESTHRESHOLDSALL","timeseriesStore","dispatchSETTIMESERIESSTATISTICSMETHOD","dispatchSETTIMESERIESSTATISTICSFROM","dispatchSETTIMESERIESSTATISTICSTO","dispatchSETTIMESERIESVALUES","dispatchSETTIMESERIES2D","index","findIndex","r","splice","selectTimeseries","Array","isArray","selectTimeseries2D","selectValues","selectValuesStatistics","selectStatisticMethod","selectStatisticFrom","selectStatisticTo","selectIsFetchingPredictionIntervals","keySingleTS","keyInstantAllTS","keyAddMore","tsPlotOptions","settings","tableData","systems","editObject","tsPlotMode","dispatchMapContentSystems","dispatchMapContent","dispatchAddMapContent","category","dispatchMapContentEditObject","dispathcMapContentHoverObject","hoverObject","dispatchMapContentSelections","layers","feature","fullname","indicators","dispatchPlotMode","selectSettings","selectSystems","selectEditObject","selectHoverObject","selectTSPlotMode","editingForecastType","compareForecastType","editingTimeseries","wizardHidden","diffPlaces","notifications","dispatchWizardHidden","dispatchScenarioAddTimeseries","timeseriesId","push","dispatchScenarioDiff","changes","dispatchScenarioRemoveTimeseries","dispatchScenarioClearTimeseries","dispatchEditingForecastType","dispatchScenarioNotifications","dispatchCompareForecastType","selectWizardHidden","selectEditingTimeseries","selectEditingForecastType","selectDiffPlaces","selectCompareForecastType","selection","features","dataReady","dispatchProfileSelection","dispatchADDLPPLACE","update","find","properties","addPlaces","dispatchREMOVELPPLACE","dispatchTOGGLEDATAREADYLPPLACE","selectSelection","selectFeatures","keyHideIndicate","keyHideCategory","dispatchHide","createAsyncThunkHelper","dispatchTOGGLEGROUPINGS","dispatchTOGGLEOBSERVATION","dispatchTOGGLEEXCEEDANCE","dispatchSETSEARCHKEYS","createAsyncReducerHelper","group","byIndicators","array","selectFilterKey","createSelectorHelper","selectByIndicators","selectObservation","selectExceedance","selectHide","selectObservationValue","createSelector","o","selectExceedanceValue","projectName","applicationTitle","dispatchSystems","getSystemsConfig","operationalForecast","dispatchSETAPPTITLE","dispatchSystemsStatus","color","selectApplicationTitle","store","s","require","default","persistor","persistStore","transition","transitionDuration","transitionInterpolator","LinearInterpolator","viewport","showTitle","mapStyle","mapboxApiAccessToken","maps","dispatchViewport","bearing","dispatchTransitionViewport","dispatchMap","dispatchRecalcViewport","keys","box","bbox","dataBounds","WebMercatorViewport","fitBounds","padding","longitude","latitude","zoom","initialZoom","dispatchShowTitle","selectViewport","selectMapStyle","selectMapboxApiAccessToken","selectMaps","selectShowTitle","RESET_APP","times2D","startTime","endTime","value","timeStep","dispatchToggleAnimation","dispatchValue","dispatchStartTime","dispatchEndTime","dispatchTimes2D","dispatchTimestep","Number","parseInt","selectTimestep","selectStartTime","selectEndTime","selectRowValue","selectValue","o1","o2","addHours","i","year","getFullYear","month","getMonth","day","getDate","hour","getHours","min","getMinutes","sec","getSeconds","Date","selectTimes","st","et","sort","b","getTime","from","Set","format","projectId","schemeId","datasetId","legend","type","domain","range","timeStamps","showDfs","selectActiveLayer","staticLayer","dispatchSETMAPITEMS","dispatchRESETMAPITEMS","dispatchSHOWIMAGE","dispatchSELECTACTIVELAYER","dispatchSELECTSTATICLAYER","selectMapItemsStore","selectShow","selectStaticLayer","dispatchIndicator","dispatchCategory","selectCategory","selectIndicator","makeStyles","theme","createStyles","link","cursor","palette","text","primary","linkIsActive","pointerEvents","textDecoration","labelIsActive","fontWeight","Breadcrumbs","list","classes","useStyles","separator","label","href","onClick","isActive","Link","className","clsx","Typography","variant","StyledTabs","withStyles","root","minHeight","alignItems","Tabs","StyledTab","backgroundColor","borderRadius","marginRight","Tab","lable","isDashboard","disabled","REACT_APP_DASHBOARD_DISABLED","isStatusboard","isConfiguration","isScenario","REACT_APP_SCENARIO_DISABLED","SubHeader","pathname","useLocation","useSelector","selectIsStatusboard","shallowEqual","selectIsConfiguration","selectIsScenario","isScenarioEdit","selectIsScenarioEdit","selectIsDashboard","isDashboardEdit","selectIsDashboardEdit","useState","setValue","history","useHistory","useTranslation","React","useEffect","toLocaleLowerCase","forEach","startsWith","Box","display","height","bgcolor","justifyContent","textColor","onChange","event","newValue","TabIndicatorProps","style","to","inheritHeight","margin","toolbar","maxHeight","container","width","marginTop","overflow","block","Header","breadcrumbs","withSubheader","control","AppBar","Toolbar","paddingX","Content","children","withPadding","py","loginDialog","setLoginDialog","selectName","currentUser","setCurrentUser","useDispatch","fetchData","result","dispatchLogin","accessToken","token","userGroups","window","location","reload","Dialog","open","onClose","DialogTitle","host","defaults","onSuccess","user","styles","position","zIndex","mediumGrey","main","background","common","white","aboutBackground","aboutTextContainer","top","left","flexDirection","aboutText","marginLeft","lngOption","borderBottom","Login","anchorEl","setAnchorEl","version","setVersion","isAdmin","selectIsAdmin","aboutDialog","setAboutDialog","firstUser","setFirstUser","i18n","getVersion","then","sourceData","localStorage","setItem","getItem","changeLanguage","get","handleClose","handleLogout","useCallback","handleLogin","handleUserManagement","handleGroupCreation","id","password","repeatPassword","formData","setFormData","errors","setErrors","handleInputChange","target","isLogged","Divider","orientation","flexItem","currentTarget","Avatar","charAt","fontSize","Menu","keepMounted","Boolean","MenuItem","Select","native","e","maxWidth","backdrop","DialogContent","src","aboutImage","alt","DialogContentText","onSubmit","preventDefault","test","firstUserData","catch","console","log","FormControl","InputLabel","htmlFor","required","startAdornment","InputAdornment","FormHelperText","Button","ErrorFallback","message","stack","role","Layout","mainAppBar","navBar","hideAllBars","topbarSize","useMemo","withTopbar","disableGutters","FallbackComponent","MIKE_COLORS","BRANDBLUE_DEFAULT","BRANDBLUE_DARK","BRANDBLUE_LIGHT","ACTIONBLUE_DEFAULT","ACTIONBLUE_DARK","ACTIONBLUE_LIGHT","GREEN_DEFAULT","GREEN_DARK","GREEN_LIGHT","PINK_DEFAULT","PINK_DARK","PINK_LIGHT","DARKGREY_DEFAULT","DARKGREY_DARK","DARKGREY_LIGHT","MEDIUMGREY_DEFAULT","MEDIUMGREY_DARK","MEDIUMGREY_LIGHT","XLIGHTGREY","WHITE","BLACK","getAutoConfigurationOptions","scenario","createDynamicLayer","systemName","tsType","quantity","units","getSystems","createSystem","obj","deleteSystem","delete","updateSystemOrder","systemIds","put","modifyAppTitle","appTitle","addStaticLayer","addStaticLayerStatus","removeStaticLayer","renameStaticLayer","oldName","newName","updateVisibility","featureClassMeta","getStaticFeatureProperties","updatePlace","oldPlaceId","place","addPlace","deletePlace","indicatorType","places","params","renameIndicator","indicatorOldName","indicatorNewName","removeIndicator","updateThresholds","noThresholdsToKeep","updateAggregationType","aggregationTypeName","deleteIconGrouping","oldGroupingName","updateIconGrouping","oldGroupName","newGrouping","addUpdate2Dconfig","projectIdString","exportPlaces","scenarioId","columnNames","responseType","importPlaces","file","FormData","append","headers","createContext","sendErrorMessage","sendInfoMessage","sendSuccessMessage","sendWarningMessage","getTimeSeries","getInfos","ids","infos","max","exceedence","tValue","Promise","all","responses","config","temp","f","Math","apply","method","getTimeSeriesList","forecast","getStatus","waterPortalInfo","workspaceId","applicationId","url","responseFocusArea","areas","connectionstring","URLSearchParams","country","ne","JSON","parse","sw","tileDataset","ignoreObservations","projects","apiKey","styleMapbox","validatePortal","portalToken","tokenKey","mainKey","portalKey","setApiKey","props","Authorization","OpenApiKey","Projetcs","decodeAccesTokenApi","decodeToken","jwt_decode","sub","useAppInfo","access","dhiOpenApiKey","email","nameid","setState","setIsPortal","firstTime","setFirstTime","search","portalTokenQuery","appTokenQuery","callapikey","ApplicationId","WorkspaceId","setBaseURL","validation","portalState","stringify","sessionAccess","portal","moKey","portalLogged","username","Name","normalLogged","REACT_APP_BASEURL","env","BASEURL","editTime","time","toISOString","dbname","requestHeaders","cloudFolder2DDataId","newTime","timeForecast","updateScenario","forecastTypesDto","webpackAsyncContext","req","__webpack_require__","resolve","Error","code","module","exports","ConfirmationDialog","onCancel","onConfirm","title","description","content","confirmationText","cancellationText","dialogProps","confirmationButtonProps","cancellationButtonProps","titleProps","contentProps","allowClose","fullWidth","DialogActions","DEFAULT_OPTIONS","buildOptions","defaultOptions","ConfirmProvider","setOptions","resolveReject","setResolveReject","reject","confirm","j","handleCancel","handleConfirm","ConfirmContext","Provider","MOWebLayout","isPortalFirsttime","CircularProgress","Signout","dispatchLogout","ActionTypes","Scenario","lazy","Main","GlobalHydrologicalModel","Configuration","Status","Accounts","CreateGroups","createBrowserHistory","DefaultLayout","exact","component","Routes","fallback","render","origin","assign","redirect","hostname","match","mikePalette","dark","light","contrastText","secondary","darkGrey","lightGrey","hint","default_darker","paper","success","devider","ultimate","mikeFont","defaultTheme","createTheme","muiRadioStyles","transform","fill","MikeTheme","typography","htmlFontSize","fontFamily","shape","overrides","MuiTypography","h1","lineHeight","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","MuiAppBar","colorPrimary","MuiDialog","MuiDialogTitle","MuiDialogContentText","MuiButton","letterSpacing","textTransform","sizeLarge","minWidth","sizeSmall","outlined","border","contained","containedPrimary","containedSecondary","outlinedPrimary","borderColor","outlinedSecondary","textPrimary","textSecondary","MuiBadge","MuiBreadcrumbs","MuiCheckbox","indeterminate","colorSecondary","MuiRadio","MuiFormControlLabel","labelPlacementStart","MuiFab","MuiIconButton","MuiTab","breakpoints","up","paddingLeft","paddingRight","selected","MuiTabs","scrollButtons","MuiTableCell","body","userSelect","head","MuiTableRow","MuiDrawer","MuiPickersDay","dayDisabled","MuiStepIcon","MuiFilledInput","MuiListItem","divider","MuiTooltip","tooltip","boxShadow","MuiChip","deleteIconColorSecondary","MuiSwitch","float","switchBase","opacity","input","thumb","track","checked","elevation","MuiCircularProgress","indicatorColor","align","MuiLink","mobileStepper","speedDial","appBar","drawer","modal","snackbar","Alert","severity","deadline","snackOpen","setSnackOpen","tId","clearTimeout","setTimeout","handleSnackClose","reason","bottom","SnackProvider","messages","setMessages","sendMessage","providerValue","handleClickAway","SnackContext","ClickAwayListener","onClickAway","use","ChainedBackend","LanguageDetector","initReactI18next","init","backend","backends","Backend","resourcesToBackend","language","namespace","backendOptions","loadPath","fallbackLng","react","useSuspense","ReactDOM","loading","refreshWhenHidden","refreshWhenOffline","fetcher","utils","DateFnsUtils","document","getElementById","navigator","serviceWorker","ready","registration","unregister","persistConfig","key","storage","blacklist","AuthorizationName","MapViewName","allReducers","combineReducers","MapContentName","MapContent","TimeseriesChartName","TimeseriesChart","ForecastTypeName","ForecastType","SystemsName","Systems","WaterToolsPortalName","WaterToolsPortal","MapItemsStoreName","MapItemsStore","ConfigurationName","FiltersName","Filters","ProfileName","Profile","ScenarioName","MapView","AnimationName","Animation","reducer","persistReducer","action","savedState","w","middlewares","ReduxThunk","enhancer","applyMiddleware","configureStore","createStore","rootReducer","expireTime","defaultState","getStateFromStorge","curDate","setDate","selectUserId","selectUserGroups","selectIsAllScenarios","selectIsLastScenario","selectIsStatusboardJobStatus","selectIsStatusboardTables","selectIsStatusboardFeeds","selectIsAdminOrUser","typePrefix","payloadCreator","getState","systemId","rt","combiner","func"],"mappings":"mbAoBMA,EAAe,CACnBC,YAAQC,EACRC,kBAAcD,GAGHE,EAAY,eAEZC,EAAuBC,YAAiB,GAAD,OAC/CF,EAD+C,gEAElD,WAAOG,EAAcC,GAArB,uBAAAC,EAAA,6DACUR,EAA8BM,EAA9BN,OAAQE,EAAsBI,EAAtBJ,aAAcO,EAAQH,EAARG,KACtBC,EAAaH,EAAbG,UACCC,eACTD,EAASE,eACTF,EAASG,eACTH,EAASI,eANX,SAOoBC,YAAoBf,EAAQE,EAAcO,GAP9D,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EAAMw9B,KACRx9B,EAAMw9B,GAAY,SAEgB/+B,IAAhCuB,EAAMw9B,GAAUrY,KAClBnlB,EAAMw9B,GAAUrY,GAAc,IAEzBwY,EAAK39B,EAAMw9B,GAAUrY,GAAjB,YAAC,eAAkC2W,GAAnC,IAA2Ch9B,QAAS2P,S","file":"static/js/main~c98f95f3.95253c1c.chunk.js","sourcesContent":["import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';\nimport { dispatchTimeseriesReset } from './TimeseriesChart';\nimport { dispatchScenarioReset } from './Scenario';\nimport { dispatchMapContentReset } from './MapContent';\nimport { getSimulationLatest } from '../factories/ScenarioApi';\nimport { dispatchRESETLPPLACE } from './Profile';\n\ninterface SystemState {\n scenario?: String;\n dbName?: string;\n systemId: string;\n}\n\ninterface ForecastTypeState {\n system?: SystemState;\n forecastType: any;\n longProfileAvailable: boolean;\n isLongProfileCalcPrepared: boolean;\n}\n\nconst initialState = {\n system: undefined,\n forecastType: undefined,\n} as ForecastTypeState;\n\nexport const sliceName = 'ForecastType';\n\nexport const dispatchForecastType = createAsyncThunk(\n `${sliceName}.dispatchForecastType`,\n async (payload: any, thunkApi) => {\n const { system, forecastType, ghm } = payload;\n const { dispatch } = thunkApi;\n dispatch(dispatchTimeseriesReset());\n dispatch(dispatchScenarioReset());\n dispatch(dispatchMapContentReset());\n dispatch(dispatchRESETLPPLACE());\n const res = await getSimulationLatest(system, forecastType, ghm);\n return { ...forecastType, ...res, latest: res };\n },\n);\n\nexport const dispatchSystem = createAsyncThunk(`${sliceName}.dispatchSystem`, async (payload: any, thunkApi) => {\n const { dispatch } = thunkApi;\n dispatch(dispatchTimeseriesReset());\n dispatch(dispatchScenarioReset());\n dispatch(dispatchMapContentReset());\n dispatch(dispatchRESETLPPLACE());\n return payload;\n});\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // DispatchSimulationTime\n dispatchSimulationTime: (state, { payload }) => {\n return { ...state, ...{ forecastType: { ...state.forecastType, ...payload } } };\n },\n // DispatchSystemClean\n dispatchSystemClean: () => {\n return { ...initialState };\n },\n },\n extraReducers: {\n [dispatchForecastType.pending.toString()]: (state) => {\n return { ...state, pending: true };\n },\n [dispatchForecastType.fulfilled.toString()]: (state, { payload }) => {\n return { ...state, pending: false, forecastType: { ...payload } };\n },\n [dispatchSystem.fulfilled.toString()]: (state, { payload }) => {\n return { ...state, forecastType: undefined, system: payload };\n },\n },\n});\n\nexport default slice.reducer;\nexport const { dispatchSimulationTime, dispatchSystemClean } = slice.actions;\nexport const selectSystem = (state) => state[sliceName].system;\nexport const selectForecastType = (state) => state[sliceName].forecastType;\nexport const selectLongProfileAvailable = (state) => state[sliceName].longProfileAvailable;\nexport const selectIsLongProfileCalcPrepared = (state) => state[sliceName].isLongProfileCalcPrepared;\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst initialState = {\n isPortal: true,\n isGHMView: process.env.REACT_APP_VIEW === 'GHM',\n options: { filter: false, show: false },\n pending: true,\n error: undefined,\n};\nexport const sliceName = 'WaterToolsPortal';\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // WaterToolsPortal\n dispatchWaterToolsPortal: (state, { payload }) => {\n return {\n ...state,\n isPortal: true,\n options: payload,\n pending: false,\n };\n },\n // StandAloneApp\n dispatchStandAloneApp: (state) => {\n return {\n ...state,\n isPortal: false,\n pending: false,\n };\n },\n },\n});\n\nexport default slice.reducer;\nexport const { dispatchWaterToolsPortal, dispatchStandAloneApp } = slice.actions;\nexport const selectIsPortal = (state) => state[sliceName].isPortal;\nexport const selectOptions = (state) => state[sliceName].options;\nexport const selectPending = (state) => state[sliceName].pending;\n","import axios from 'axios';\n\nconst mikeCouldAxios = axios.create({\n baseURL: 'https://api.mike-cloud-dev.com',\n});\nconst defaultAxios = axios.create();\n\nexport default defaultAxios;\nexport { mikeCouldAxios, defaultAxios };\n","import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';\n\nimport axios from '../containers/hooks/useAxios';\n\nconst initialState = {\n timeseries: [],\n timeseries2D: [],\n values: [],\n valuesStatistics: [],\n statisticMethod: '',\n statisticFrom: null,\n statisticTo: null,\n allowOtherSimulations: true,\n isFetchingPredictionIntervals: false,\n};\nexport const sliceName = 'TimeseriesChart';\n\nexport const dispatchTimeseriesValue = createAsyncThunk(\n `${sliceName}.dispatchTimeseriesValue`,\n async ({\n dbName,\n path,\n simulationPath,\n simulationStart,\n simulationEnd,\n referenceType,\n timeOfForecast,\n indicator,\n aggregationType,\n name,\n isCompared,\n }) => {\n const ts = path.replace('[Path]', simulationPath.split('|').join('/')).split('|').join('||');\n let query = '';\n if (simulationStart && simulationEnd) {\n query = `?from=${simulationStart}&to=${simulationEnd}`;\n }\n const response = await axios.post(`api/${dbName}-timeseries/ts/list/values${query}`, [ts]);\n const { data } = response || {};\n const d = Object.values(data);\n return {\n values: d.length === 1 ? d[0] : [],\n simulationPath,\n name,\n indicatorName: indicator,\n timeOfForecast,\n simulationStart,\n simulationEnd,\n referenceType,\n isCompared,\n aggregationType,\n };\n },\n);\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // DispatchTimeseriesReset\n dispatchTimeseriesReset: (state) => {\n return {\n ...initialState,\n statisticMethod: state.statisticMethod,\n statisticFrom: state.statisticFrom,\n statisticTo: state.statisticTo,\n };\n },\n // RESET_TIMESERIES_STATISTICS_VALUES:\n dispatchRESETTIMESERIESSTATISTICSVALUES: (state) => {\n return {\n ...state,\n valuesStatistics: [],\n statisticMethod: '',\n statisticFrom: null,\n statisticTo: null,\n };\n },\n // SetForecastPredictionFetch\n dispatchSetForecastPredictionFetch: (state, { payload }) => {\n return {\n ...state,\n isFetchingPredictionIntervals: payload,\n };\n },\n // DispatchTimeseriesAdd:\n dispatchTimeseriesAdd: (state, { payload }) => {\n if (payload?.length > 0) {\n const arr = payload.filter((p) => !state.timeseries.some((t) => p.name === t.name));\n state.timeseries = state.timeseries.concat(arr);\n } else if (payload?.name && !state.timeseries.some((t) => payload.name === t.name)) {\n state.timeseries = state.timeseries.concat([payload]);\n }\n },\n // DispatchTimeseriesRemove\n dispatchTimeseriesRemove: (state, { payload }) => {\n return {\n ...state,\n timeseries: state.timeseries.filter(({ name }) => name !== payload.name),\n values: state.values.filter(({ name }) => name !== payload.name),\n };\n },\n // DispatchThresHoldsAdd\n dispatchThresHoldsAdd: (state, { payload }) => {\n return {\n ...state,\n timeseries: state.timeseries.map((item) => ({\n ...item,\n thresholdPlot: payload.indexOf(item.name) > -1,\n })),\n };\n },\n // DispatchThresHoldsRemove\n dispatchThresHoldsRemove: (state, { payload }) => {\n return {\n ...state,\n timeseries: state.timeseries.map((x) => {\n if (payload.indexOf(x.name) > -1) {\n return { ...x, thresholdPlot: false };\n }\n return x;\n }),\n };\n },\n // SET_TIMESERIES_STATISTICS_VALUES\n dispatchSETTIMESERIESSTATISTICSVALUES: (state, { payload }) => {\n return {\n ...state,\n valuesStatistics: [...state.valuesStatistics, ...payload],\n isFetchingPredictionIntervals: false,\n };\n },\n // SWITCH_TIMESERIES_THRESHOLD\n dispatchSWITCHTIMESERIESTHRESHOLD: (state, { payload }) => {\n return {\n ...state,\n timeseries: state.timeseries.map(({ name, ...rest }) =>\n name === payload ? { name, ...rest, thresholdPlot: true } : { name, ...rest, thresholdPlot: false },\n ),\n };\n },\n // REMOVE_TIMESERIES_THRESHOLDS_ALL\n dispatchREMOVETIMESERIESTHRESHOLDSALL: (state) => {\n return {\n ...state,\n timeseries: state.timeseries.map((timeseriesStore) => ({ ...timeseriesStore, thresholdPlot: false })),\n };\n },\n // SET_TIMESERIES_STATISTICS_METHOD\n dispatchSETTIMESERIESSTATISTICSMETHOD: (state, { payload }) => {\n return { ...state, statisticMethod: payload };\n },\n // SET_TIMESERIES_STATISTICS_FROM\n dispatchSETTIMESERIESSTATISTICSFROM: (state, { payload }) => {\n return { ...state, statisticFrom: payload };\n },\n // SET_TIMESERIES_STATISTICS_TO\n dispatchSETTIMESERIESSTATISTICSTO: (state, { payload }) => {\n return { ...state, statisticTo: payload };\n },\n // SET_TIMESERIES_VALUES\n dispatchSETTIMESERIESVALUES: (state, { payload }) => {\n return { ...state, values: [...state.values, ...payload] };\n },\n // SET_TIMESERIES_2D\n dispatchSETTIMESERIES2D: (state, { payload }) => {\n return { ...state, timeseries2D: [...state.timeseries2D, ...payload] };\n },\n },\n extraReducers: {\n [dispatchTimeseriesValue.fulfilled]: (state, { payload }) => {\n if (payload) {\n if (state.timeseries.some(({ name }) => name === payload.name)) {\n if (state.values) {\n const index = state.values.findIndex(\n (r) => r.name === payload.name && r.simulationPath === payload.simulationPath,\n );\n if (index !== -1) {\n state.values.splice(index, 1);\n }\n }\n state.values = [...state.values, { ...payload, isCompared: payload.isCompared }];\n }\n }\n },\n },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchTimeseriesReset,\n dispatchRESETTIMESERIESSTATISTICSVALUES,\n dispatchSetForecastPredictionFetch,\n dispatchTimeseriesAdd,\n dispatchTimeseriesRemove,\n dispatchThresHoldsAdd,\n dispatchThresHoldsRemove,\n dispatchSETTIMESERIESSTATISTICSVALUES,\n dispatchSWITCHTIMESERIESTHRESHOLD,\n dispatchREMOVETIMESERIESTHRESHOLDSALL,\n dispatchSETTIMESERIESSTATISTICSMETHOD,\n dispatchSETTIMESERIESSTATISTICSFROM,\n dispatchSETTIMESERIESSTATISTICSTO,\n dispatchSETTIMESERIESVALUES,\n dispatchSETTIMESERIES2D,\n} = slice.actions;\nexport const selectTimeseries = (state) => {\n if (Array.isArray(state[sliceName].timeseries)) {\n return state[sliceName].timeseries;\n }\n return [];\n};\nexport const selectTimeseries2D = (state) => state[sliceName].timeseries2D;\nexport const selectValues = (state) => state[sliceName].values;\nexport const selectValuesStatistics = (state) => state[sliceName].valuesStatistics;\nexport const selectStatisticMethod = (state) => state[sliceName].statisticMethod;\nexport const selectStatisticFrom = (state) => state[sliceName].statisticFrom;\nexport const selectStatisticTo = (state) => state[sliceName].statisticTo;\nexport const selectAllowOtherSimulations = (state) => state[sliceName].allowOtherSimulations;\nexport const selectIsFetchingPredictionIntervals = (state) => state[sliceName].isFetchingPredictionIntervals;\n","import { createSlice } from '@reduxjs/toolkit';\n\nexport const sliceName = 'MapContent';\nexport const keySingleTS = 'Select TS, Create new plot';\nexport const keyAddTSplot = 'Select TS, Add to plot';\nexport const keyInstantAllTS = 'Instant plot of all TS in station';\nexport const keyAddMore = 'Multi selection by rectangle';\nexport const tsPlotOptions = [keySingleTS, keyAddTSplot, keyInstantAllTS, keyAddMore];\n\nconst initialState = {\n settings: [],\n tableData: {},\n systems: [],\n editObject: undefined,\n tsPlotMode: undefined,\n};\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n dispatchMapContentReset: () => {\n return initialState;\n },\n // DispatchMapContentSystems\n dispatchMapContentSystems: (state, { payload }) => {\n return { ...state, systems: payload };\n },\n // DispatchMapContent\n dispatchMapContent: (state, { payload }) => {\n return { ...state, settings: payload };\n },\n // DispatchAddMapContent\n dispatchAddMapContent: (state, { payload }) => {\n return {\n ...state,\n settings: state.settings.filter((x) => x.category === 'System').concat(payload),\n };\n },\n // DispatchMapContentEditObject\n dispatchMapContentEditObject: (state, { payload }) => {\n return { ...state, editObject: payload };\n },\n dispathcMapContentHoverObject: (state, { payload }) => {\n return { ...state, hoverObject: payload };\n },\n // DispatchMapContentSelections\n dispatchMapContentSelections: (state, { payload }) => {\n state.tableData = { ...state.tableData, ...payload };\n state.settings = state.settings.map((x) => {\n if (payload[x.category]) {\n x.layers = x.layers.map((feature) => {\n if (payload[x.category][feature.name]) {\n const { name, fullname, ...rest } = payload[x.category][feature.name];\n return { ...feature, indicators: rest };\n }\n return feature;\n });\n }\n return x;\n });\n return state;\n },\n dispatchPlotMode: (state, { payload }) => {\n state.tsPlotMode = payload;\n },\n },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchMapContentReset,\n dispatchMapContentSystems,\n dispatchMapContent,\n dispatchAddMapContent,\n dispatchMapContentEditObject,\n dispatchMapContentSelections,\n dispathcMapContentHoverObject,\n dispatchPlotMode,\n} = slice.actions;\nexport const selectSettings = (state) => state[sliceName].settings;\nexport const selectTableData = (state) => state[sliceName].tableData;\nexport const selectSystems = (state) => state[sliceName].systems;\nexport const selectEditObject = (state) => state[sliceName].editObject;\nexport const selectHoverObject = (state) => state[sliceName].hoverObject;\nexport const selectTSPlotMode = (state) => state[sliceName].tsPlotMode ?? keySingleTS;\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst initialState = {\n editingForecastType: null,\n compareForecastType: null,\n editingTimeseries: [],\n wizardHidden: false,\n diffPlaces: [],\n notifications: undefined,\n};\nexport const sliceName = 'Scenario';\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n dispatchScenarioReset: () => {\n return initialState;\n },\n dispatchWizardHidden: (state, { payload }) => {\n state.wizardHidden = payload;\n },\n dispatchScenarioAddTimeseries: (state, { payload }) => {\n if (!state.editingTimeseries.some(({ timeseriesId }) => timeseriesId === payload.timeseriesId)) {\n state.editingTimeseries.push(payload);\n }\n },\n dispatchScenarioDiff: (state, { payload }) => {\n if (payload) {\n const { changes = [] } = payload;\n state.diffPlaces = changes;\n } else {\n state.diffPlaces = [];\n }\n },\n dispatchScenarioRemoveTimeseries: (state, { payload }) => {\n state.editingTimeseries = state.editingTimeseries.filter(\n ({ timeseriesId }) => timeseriesId !== payload.timeseriesId,\n );\n },\n dispatchScenarioClearTimeseries: (state) => {\n state.editingTimeseries = [];\n },\n dispatchEditingForecastType: (state, { payload }) => {\n state.editingForecastType = payload;\n },\n dispatchScenarioNotifications: (state, { payload }) => {\n state.notifications = payload;\n },\n dispatchCompareForecastType: (state, { payload }) => {\n state.compareForecastType = payload;\n },\n },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchScenarioReset,\n dispatchWizardHidden,\n dispatchScenarioAddTimeseries,\n dispatchScenarioRemoveTimeseries,\n dispatchScenarioClearTimeseries,\n dispatchScenarioDiff,\n dispatchEditingForecastType,\n dispatchScenarioNotifications,\n dispatchCompareForecastType,\n} = slice.actions;\n\nexport const selectWizardHidden = (state) => state[sliceName].wizardHidden;\nexport const selectEditingTimeseries = (state) => state[sliceName].editingTimeseries;\nexport const selectNotifications = (state) => state[sliceName].notifications;\nexport const selectEditingForecastType = (state) => state[sliceName].editingForecastType;\nexport const selectDiffPlaces = (state) => state[sliceName].diffPlaces;\nexport const selectCompareForecastType = (state) => state[sliceName].compareForecastType;\n","import { Feature, Geometry } from 'geojson';\nimport { createSlice } from '@reduxjs/toolkit';\n\ninterface PlaceProperies {\n name: string;\n}\n\ninterface LPToolState {\n selection: boolean;\n features: Feature[];\n dataReady: boolean;\n}\nconst initialState: LPToolState = { selection: false, features: [], dataReady: false };\nexport const sliceName = 'Profile';\nconst addPlaces = (state: LPToolState, update: Feature) => {\n const { selection, features } = state;\n const found = features.find(({ properties }) => properties.name === update.properties.name) || false;\n if (found) {\n return { selection, features } as LPToolState;\n }\n return { selection, features: [...features, update] } as LPToolState;\n};\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // DispatchProfileSelection\n dispatchProfileSelection: (state) => {\n return { ...state, selection: !state.selection, features: state.selection ? [] : state.features };\n },\n // ADD_LP_PLACE\n dispatchADDLPPLACE: (state, { payload }) => {\n return addPlaces(state, payload.feature);\n },\n // REMOVE_LP_PLACE\n dispatchREMOVELPPLACE: (state, { payload }) => {\n return { ...state, features: state.features.filter(({ properties }) => properties.name !== payload) };\n },\n // TOGGLE_DATA_READY_LP_PLACE\n dispatchTOGGLEDATAREADYLPPLACE: (state, { payload }) => {\n return { ...state, dataReady: payload };\n },\n // RESET_LP_PLACE\n dispatchRESETLPPLACE: () => {\n return initialState;\n },\n },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchProfileSelection,\n dispatchADDLPPLACE,\n dispatchREMOVELPPLACE,\n dispatchTOGGLEDATAREADYLPPLACE,\n dispatchRESETLPPLACE,\n} = slice.actions;\nexport const selectSelection = (state) => state[sliceName].selection;\nexport const selectFeatures = (state) => state[sliceName].features;\nexport const selectDataReady = (state) => state[sliceName].dataReady;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { createSelector } from 'reselect';\nimport { createAsyncThunkHelper, createSelectorHelper, createAsyncReducerHelper } from './helper';\n\nexport const sliceName = 'Filters';\n\nconst initialState = {};\nconst keyByIndicators = 'byIndicators';\nconst keyHideIndicate = 'HideIndicate';\nconst keyHideCategory = 'HideCategory';\nconst keyObservation = 'observation';\nconst keyExceedance = 'exceedance';\nconst keyFilterKey = 'filterKey';\n\nexport const dispatchHide = createAsyncThunkHelper(`${sliceName}.dispatchHide`);\nexport const dispatchTOGGLEGROUPINGS = createAsyncThunkHelper(`${sliceName}.dispatchTOGGLEGROUPINGS`);\nexport const dispatchTOGGLEOBSERVATION = createAsyncThunkHelper(`${sliceName}.dispatchTOGGLEOBSERVATION`);\nexport const dispatchTOGGLEEXCEEDANCE = createAsyncThunkHelper(`${sliceName}.dispatchTOGGLEEXCEEDANCE`);\nexport const dispatchSETSEARCHKEYS = createAsyncThunkHelper(`${sliceName}.dispatchSETSEARCHKEYS`);\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n extraReducers: {\n [dispatchSETSEARCHKEYS.fulfilled]: createAsyncReducerHelper((state, { payload }) => {\n state[keyFilterKey] = payload;\n }),\n [dispatchHide.fulfilled]: createAsyncReducerHelper((state, { payload }) => {\n const group = state.byIndicators ? keyHideIndicate : keyHideCategory;\n if (state[group] === undefined) {\n state[group] = [];\n }\n const array = state[group];\n const index = array.indexOf(payload);\n if (index === -1) {\n array.push(payload);\n } else {\n array.splice(index, 1);\n }\n }),\n [dispatchTOGGLEGROUPINGS.fulfilled]: createAsyncReducerHelper((state) => {\n if (state[keyByIndicators] === undefined) {\n state[keyByIndicators] = true;\n }\n state[keyByIndicators] = !state[keyByIndicators];\n }),\n [dispatchTOGGLEOBSERVATION.fulfilled]: createAsyncReducerHelper((state) => {\n state[keyObservation] = !state[keyObservation];\n }),\n [dispatchTOGGLEEXCEEDANCE.fulfilled]: createAsyncReducerHelper((state) => {\n state[keyExceedance] = !state[keyExceedance];\n }),\n },\n});\n\nexport default slice.reducer;\n\nexport const selectFilterKey = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyFilterKey] !== undefined) {\n return state[keyFilterKey];\n }\n }\n return '';\n});\nexport const selectByIndicators = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyByIndicators] !== undefined) {\n return state[keyByIndicators];\n }\n }\n return true;\n});\nexport const selectObservation = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyObservation] !== undefined) {\n return state[keyObservation];\n }\n }\n return false;\n});\nexport const selectExceedance = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyExceedance] !== undefined) {\n return state[keyExceedance];\n }\n }\n return false;\n});\nexport const selectHide = createSelectorHelper(sliceName, (state) => {\n if (state) {\n const group = state[keyByIndicators] ? keyHideIndicate : keyHideCategory;\n if (state[group] !== undefined) {\n return state[group];\n }\n }\n return [];\n});\nexport const selectObservationValue = createSelector(selectObservation, (o) => (o ? 'observation' : undefined));\nexport const selectExceedanceValue = createSelector(selectExceedance, (o) => (o ? 'worst threshold' : undefined));\n","import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';\nimport { getSystemsConfig } from '../factories/SystemApi';\nimport { dispatchSystem } from './ForecastType';\n\nconst initialState = { systems: [], projectName: '', pending: true, error: undefined, applicationTitle: undefined };\nexport const sliceName = 'Systems';\n\nexport const dispatchSystems = createAsyncThunk(`${sliceName}.dispatchSystems`, async (payload, thunkApi) => {\n const { dispatch } = thunkApi;\n const res = await getSystemsConfig();\n res.operationalForecast = res.operationalForecast.map((x) => {\n x.dispatchSystem = () => dispatch(dispatchSystem(x));\n return x;\n });\n return res;\n});\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // SET_APP_TITLE\n dispatchSETAPPTITLE: (state, { payload }) => {\n return {\n ...state,\n applicationTitle: payload,\n };\n },\n // DispatchSystemsStatus\n dispatchSystemsStatus: (state, { payload }) => {\n return {\n ...state,\n pending: false,\n systems: state.systems.map((x) => {\n if (payload[x.dbName]) {\n return { ...x, color: payload[x.dbName] };\n }\n return x;\n }),\n };\n },\n },\n extraReducers: {\n [dispatchSystems.pending]: (state) => {\n return { ...state, pending: true };\n },\n [dispatchSystems.fulfilled]: (state, { payload }) => {\n return {\n ...state,\n pending: false,\n applicationTitle: payload.applicationTitle,\n systems: payload.operationalForecast,\n };\n },\n },\n});\n\nexport default slice.reducer;\nexport const { dispatchSETAPPTITLE, dispatchSystemsStatus } = slice.actions;\nexport const selectSystems = (state) => state[sliceName].systems;\nexport const selectApplicationTitle = (state) => state[sliceName].applicationTitle;\n","import { persistStore } from 'redux-persist';\n\nconst { default: s } = process.env.NODE_ENV === 'production' ? require('./storeProd') : require('./storeDev');\n\nexport const store = s();\nexport const persistor = persistStore(store);\n","import { createSlice } from '@reduxjs/toolkit';\nimport bbox from '@turf/bbox';\nimport { WebMercatorViewport, LinearInterpolator } from 'react-map-gl';\n\nexport const sliceName = 'MapView';\nconst keyShowTitle = 'showTitle';\n\nconst transition = {\n transitionDuration: 1000,\n transitionInterpolator: new LinearInterpolator(),\n};\n\nconst initialState = {\n viewport: {},\n showTitle: false,\n mapStyle: process.env.REACT_APP_MAPBOX_STYLE,\n mapboxApiAccessToken: process.env.REACT_APP_MAPBOX_KEY,\n maps: [\n {\n name: 'Vector map',\n mapStyle: process.env.REACT_APP_MAPBOX_STYLE,\n mapboxApiAccessToken: process.env.REACT_APP_MAPBOX_KEY,\n },\n {\n name: 'Bright vector map',\n mapStyle: 'mapbox://styles/luca29/ckkwpc9w34thw17og2cjc56g8',\n mapboxApiAccessToken: 'pk.eyJ1IjoibHVjYTI5IiwiYSI6ImNqcGJheXdjbTBkNXkzeHBoNnhiaGllYXQifQ.Z_1j5gNQ5pwjGFAe3Ovk8w',\n },\n {\n name: 'Monochrome map',\n mapStyle: 'mapbox://styles/luca29/ckksfnd0b0zlw18qyx321kg3u',\n mapboxApiAccessToken: 'pk.eyJ1IjoibHVjYTI5IiwiYSI6ImNqcGJheXdjbTBkNXkzeHBoNnhiaGllYXQifQ.Z_1j5gNQ5pwjGFAe3Ovk8w',\n },\n {\n name: 'Monochrome map - water highlighted',\n mapStyle: 'mapbox://styles/luca29/ckksfq1de13bm17o5ltfv9ck8',\n mapboxApiAccessToken: 'pk.eyJ1IjoibHVjYTI5IiwiYSI6ImNqcGJheXdjbTBkNXkzeHBoNnhiaGllYXQifQ.Z_1j5gNQ5pwjGFAe3Ovk8w',\n },\n ],\n};\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n dispatchViewport: (state, { payload }) => {\n state.viewport = { ...state.viewport, ...payload, bearing: 0 };\n },\n dispatchTransitionViewport: (state, { payload }) => {\n state.viewport = { ...state.viewport, ...payload, bearing: 0, ...transition };\n },\n dispatchMap: (state, { payload }) => {\n state.mapStyle = payload?.mapStyle;\n state.mapboxApiAccessToken = payload?.mapboxApiAccessToken;\n },\n dispatchRecalcViewport: (state, { payload }) => {\n if (payload && Object.keys(state?.viewport).length > Object.keys(initialState?.viewport).length) {\n const box = bbox(payload);\n const dataBounds = [\n [box[0], box[1]],\n [box[2], box[3]],\n ];\n const { longitude, latitude, zoom } = new WebMercatorViewport(state?.viewport).fitBounds(dataBounds, {\n padding: 50,\n });\n state.viewport = { ...state.viewport, longitude, latitude, zoom, ...transition };\n state.initialZoom = state?.viewport?.zoom;\n }\n },\n dispatchShowTitle: (state, { payload }) => {\n state[keyShowTitle] = payload;\n },\n },\n});\n\nexport default slice.reducer;\nexport const { dispatchViewport, dispatchRecalcViewport, dispatchTransitionViewport, dispatchMap, dispatchShowTitle } =\n slice.actions;\nexport const selectViewport = (state) => state[sliceName].viewport;\nexport const selectMapStyle = (state) => state[sliceName].mapStyle;\nexport const selectMapboxApiAccessToken = (state) => state[sliceName].mapboxApiAccessToken;\nexport const selectMaps = (state) => state[sliceName].maps;\nexport const selectShowTitle = (state) => state[sliceName][keyShowTitle];\n","export default {\n RESET_APP: 'RESET_APP',\n};\n","import { createSlice } from '@reduxjs/toolkit';\nimport { createSelector } from 'reselect';\nimport { format } from 'date-fns';\n// import { createAsyncThunkHelper, createSelectorHelper, createAsyncReducerHelper } from './helper';\n\ninterface AnimationState {\n selection: boolean;\n timeStep: number;\n startTime: string;\n endTime: string;\n value: string;\n times2D: string[];\n // items: string[];\n}\n\nconst initialState: AnimationState = {\n selection: false,\n times2D: [],\n startTime: '',\n endTime: '',\n value: '',\n timeStep: 2,\n // items: [],\n};\n\nexport const sliceName = 'Animation';\n// const keyItems = 'items';\n// export const dispatchToggleItems = createAsyncThunkHelper(`${sliceName}.dispatchToggleItems`);\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n dispatchToggleAnimation: (state: AnimationState) => {\n state.selection = !state.selection;\n },\n dispatchValue: (state: AnimationState, { payload }) => {\n state.value = payload;\n },\n dispatchStartTime: (state: AnimationState, { payload }) => {\n state.startTime = payload;\n },\n dispatchEndTime: (state: AnimationState, { payload }) => {\n state.endTime = payload;\n },\n dispatchTimes2D: (state: AnimationState, { payload }) => {\n state.times2D = payload;\n },\n dispatchTimestep: (state: AnimationState, { payload }) => {\n state.timeStep = Number.parseInt(payload, 10);\n },\n },\n // extraReducers: {\n // [dispatchToggleItems.fulfilled]: createAsyncReducerHelper((state, { payload }) => {\n // if (!Array.isArray(state[keyItems])) {\n // state[keyItems] = [];\n // }\n // if (state[keyItems].indexOf(payload) !== -1) {\n // state[keyItems] = state[keyItems].filter((r) => r !== payload);\n // } else {\n // state[keyItems] = [...state[keyItems], payload];\n // }\n // }),\n // },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchToggleAnimation,\n dispatchTimestep,\n dispatchValue,\n dispatchStartTime,\n dispatchEndTime,\n dispatchTimes2D,\n} = slice.actions;\nexport const selectSelection = (state) => state[sliceName].selection;\nexport const selectTimestep = (state) => state[sliceName].timeStep ?? 0;\nexport const selectStartTime = (state) => state[sliceName].startTime;\nexport const selectEndTime = (state) => state[sliceName].endTime;\nconst selectTimes2D = (state) => state[sliceName].times2D;\nexport const selectRowValue = (state) => state[sliceName].value;\nexport const selectValue = createSelector(selectSelection, selectRowValue, (o1, o2) => (o1 && o2) || undefined);\n\nfunction addHours(i: Date, t: any) {\n const year = i.getFullYear();\n const month = i.getMonth();\n const day = i.getDate();\n const hour = i.getHours() + Number.parseInt(t, 10);\n const min = i.getMinutes();\n const sec = i.getSeconds();\n return new Date(year, month, day, hour, min, sec);\n}\nexport const selectTimes = createSelector(\n selectStartTime,\n selectEndTime,\n selectTimestep,\n selectTimes2D,\n (st, et, t, d) => {\n const array: Date[] = [];\n if (d) {\n array.push(...d.map((r) => new Date(r)));\n }\n if (st && et) {\n if (t > 0) {\n for (let i = new Date(st); i >= new Date(st) && i <= new Date(et); i = addHours(i, t)) {\n array.push(i);\n }\n }\n // else {\n // array.push(new Date(st));\n // }\n }\n array.sort((a, b) => {\n return a.getTime() - b.getTime();\n });\n return Array.from(new Set(array)).map((r) => `${format(r, 'yyyy-MM-dd')}T${format(r, 'HH:mm:ss')}`);\n },\n);\n// export const selectItems = createSelectorHelper(sliceName, (state) => {\n// if (state) {\n// if (state[keyItems] !== undefined) {\n// return state[keyItems];\n// }\n// }\n// return [];\n// });\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst initialState = {\n show: false,\n projectId: undefined,\n schemeId: undefined,\n datasetId: undefined,\n legend: { type: 'threshold', domain: [], range: [] },\n timeStamps: [],\n showDfs: false,\n selectActiveLayer: [],\n staticLayer: [],\n};\nexport const sliceName = 'MapItemsStore';\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n // SET_MAP_ITEMS\n dispatchSETMAPITEMS: (state, { payload }) => {\n return {\n ...state,\n ...payload,\n };\n },\n // RESET_MAP_ITEMS\n dispatchRESETMAPITEMS: () => {\n return {\n ...initialState,\n };\n },\n // SHOW_IMAGE\n dispatchSHOWIMAGE: (state, { payload }) => {\n return {\n ...state,\n showDfs: payload.showDfs,\n };\n },\n // SELECT ACTIVE LAYER\n dispatchSELECTACTIVELAYER: (state, { payload }) => {\n return {\n ...state,\n selectActiveLayer: payload.selectActiveLayer,\n };\n },\n // SELECT STATIC LAYER\n dispatchSELECTSTATICLAYER: (state, { payload }) => {\n return {\n ...state,\n staticLayer: payload.staticLayer,\n };\n },\n },\n});\n\nexport default slice.reducer;\nexport const {\n dispatchSETMAPITEMS,\n dispatchRESETMAPITEMS,\n dispatchSHOWIMAGE,\n dispatchSELECTACTIVELAYER,\n dispatchSELECTSTATICLAYER,\n} = slice.actions;\nexport const selectMapItemsStore = (state) => state[sliceName];\nexport const selectShow = (state) => state[sliceName].show;\nexport const selectShowDfs = (state) => state[sliceName].showDfs;\nexport const selectActiveLayer = (state) => state[sliceName].selectActiveLayer;\nexport const selectStaticLayer = (state) => state[sliceName].staticLayer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { createAsyncThunkHelper, createSelectorHelper, createAsyncReducerHelper } from './helper';\n\nconst initialState = {};\nexport const sliceName = 'Configuration';\nconst keyIndicator = 'Indicator';\nconst keyCategory = 'Category';\nexport const dispatchIndicator = createAsyncThunkHelper(`${sliceName}.dispatchIndicator`);\nexport const dispatchCategory = createAsyncThunkHelper(`${sliceName}.dispatchCategory`);\n\nconst slice = createSlice({\n name: sliceName,\n initialState,\n extraReducers: {\n [dispatchIndicator.fulfilled]: createAsyncReducerHelper((state, { payload }) => {\n state[keyIndicator] = payload;\n }),\n [dispatchCategory.fulfilled]: createAsyncReducerHelper((state, { payload }) => {\n state[keyCategory] = payload;\n }),\n },\n});\n\nexport default slice.reducer;\n\nexport const selectCategory = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyCategory] !== undefined) {\n return state[keyCategory];\n }\n }\n return {};\n});\nexport const selectIndicator = createSelectorHelper(sliceName, (state) => {\n if (state) {\n if (state[keyIndicator] !== undefined) {\n return state[keyIndicator];\n }\n }\n return [];\n});\n","import { createStyles, makeStyles } from '@material-ui/core/styles';\n\nexport default makeStyles((theme) =>\n createStyles({\n link: {\n cursor: 'pointer',\n color: theme.palette.text.primary,\n '&:hover': {\n color: theme.palette.text.primary,\n },\n '&:active': {\n color: theme.palette.text.primary,\n },\n '&:focus': {\n color: theme.palette.text.primary,\n },\n },\n linkIsActive: {\n pointerEvents: 'none',\n '&:hover': {\n textDecoration: 'none',\n },\n },\n labelIsActive: {\n fontWeight: 'bold',\n },\n }),\n);\n","import React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@material-ui/core/Typography';\nimport CoreBreadcrumbs from '@material-ui/core/Breadcrumbs';\nimport Link from '@material-ui/core/Link';\n\nimport useStyles from './lib/useStyles';\n\nconst Breadcrumbs = ({ list, ...rest }) => {\n const classes = useStyles({});\n return (\n \n {list.map(({ label, href, onClick, isActive = false }) => (\n \n \n {label}\n \n \n ))}\n \n );\n};\n\nexport default Breadcrumbs;\n","import React, { useState } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport Box from '@material-ui/core/Box';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport { useLocation, useHistory } from 'react-router-dom';\nimport { useSelector, shallowEqual } from 'react-redux';\n// import { MikeNotificationContainer } from '@mike/mike-shared-frontend/mike-notification-list';\nimport { useTranslation } from 'react-i18next';\n\nimport {\n selectIsConfiguration,\n selectIsStatusboard,\n selectIsScenario,\n selectIsScenarioEdit,\n selectIsDashboard,\n selectIsDashboardEdit,\n} from '../../../../reducers/Authorization';\n// import { selectNotifications } from '../../../../reducers/Scenario';\n\nconst StyledTabs = withStyles({\n root: {\n minHeight: '40px',\n alignItems: 'center',\n },\n})(Tabs);\n\nconst StyledTab = withStyles({\n root: {\n backgroundColor: '#ffffff',\n borderRadius: '6px',\n marginRight: '6px',\n minHeight: '28px',\n },\n})(Tab);\n\nconst data = [\n { lable: 'Main view', link: '/main', default: true },\n {\n lable: 'Dashboards',\n link: '/dashboard',\n isDashboard: true,\n disabled: process.env.NODE_ENV !== 'production' || process.env.REACT_APP_DASHBOARD_DISABLED,\n },\n { lable: 'Status board', link: '/status', isStatusboard: true },\n { lable: 'Configuration', link: '/configuration', isConfiguration: true },\n {\n lable: 'Scenario',\n link: '/scenario',\n isScenario: true,\n disabled: process.env.REACT_APP_SCENARIO_DISABLED,\n },\n];\n\nconst SubHeader = () => {\n const { pathname } = useLocation();\n const isStatusboard = useSelector(selectIsStatusboard, shallowEqual);\n const isConfiguration = useSelector(selectIsConfiguration, shallowEqual);\n const isScenario = useSelector(selectIsScenario, shallowEqual);\n const isScenarioEdit = useSelector(selectIsScenarioEdit, shallowEqual);\n const isDashboard = useSelector(selectIsDashboard, shallowEqual);\n const isDashboardEdit = useSelector(selectIsDashboardEdit, shallowEqual);\n const [value, setValue] = useState(0);\n const history = useHistory();\n // const scenariosStatus = useSelector(selectNotifications, shallowEqual);\n const { t } = useTranslation();\n // const notifications = React.useMemo(() => {\n // if (scenariosStatus && scenariosStatus.length > 0) {\n // return scenariosStatus.map(({ status, ...rest }) => ({\n // ...rest,\n // error: status === -1 || status === 'Failed',\n // }));\n // }\n // return undefined;\n // }, [scenariosStatus]);\n React.useEffect(() => {\n const path = pathname.toLocaleLowerCase();\n data.forEach((item, index) => {\n if (((path === '' || path === '/') && item.default) || path.startsWith(item.link.toLocaleLowerCase())) {\n setValue(index);\n }\n });\n }, [pathname]);\n\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n return (\n \n \n \n {data.map((item, index) => (\n {\n history.push(item.link);\n }}\n index={index}\n />\n ))}\n \n {/* {value === 4 && (\n \n 0}\n />\n \n )} */}\n \n \n );\n};\n\nexport default SubHeader;\n","import { createStyles, makeStyles } from '@material-ui/core/styles';\n\nconst inheritHeight = {\n minHeight: 'inherit',\n margin: 0,\n padding: 0,\n};\n\nexport default makeStyles(() =>\n createStyles({\n toolbar: {\n minHeight: '60px !important',\n maxHeight: '60px !important',\n },\n container: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n marginTop: '-4px',\n overflow: 'hidden',\n ...inheritHeight,\n },\n block: {\n width: 'calc(100% / 3)',\n height: 'inherit',\n display: 'flex',\n alignItems: 'center',\n ...inheritHeight,\n },\n }),\n);\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\n\nimport Breadcrumbs from 'components/Breadcrumbs';\n\nimport SubHeader from '../SubHeader';\n\nimport useStyles from './lib/useStyles';\n\nconst Header = ({ breadcrumbs, withSubheader, control }) => {\n const { push } = useHistory();\n const classes = useStyles();\n return (\n \n \n \n \n push('/')} style={{ cursor: 'pointer' }}>\n DHI MIKE Operations\n \n \n \n \n \n \n \n \n {control && control}\n \n \n {withSubheader && }\n \n );\n};\n\nexport default Header;\n","import React from 'react';\n// import Container from '@material-ui/core/Container';\nimport Box from '@material-ui/core/Box';\n\nconst Content = ({ children, withPadding = true }) => {\n return (\n \n {children}\n \n );\n};\n\nexport default Content;\n","// import React from 'react';\nimport React, { useEffect, useState } from 'react';\n// import { useDispatch } from 'react-redux';\nimport { useSelector, shallowEqual, useDispatch } from 'react-redux';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { Login } from '@dhi/react-components';\n\nimport { dispatchLogin, selectName } from '../../reducers/Authorization';\n// import { dispatchLogin } from '../../reducers/Authorization';\n// import { resetApp } from '../../actions';\nimport { selectIsPortal } from '../../reducers/WaterToolsPortal';\nimport axios from '../hooks/useAxios';\n\nexport default ({ loginDialog, setLoginDialog }) => {\n const name = useSelector(selectName, shallowEqual);\n const [currentUser, setCurrentUser] = useState(name);\n const isPortal = useSelector(selectIsPortal, shallowEqual);\n const dispatch = useDispatch();\n\n useEffect(() => {\n if (!isPortal && !name) {\n const fetchData = async () => {\n const result = await axios('/api/account/token');\n dispatch(\n dispatchLogin({\n accessToken: result.data.accessToken.token,\n userGroups: '',\n name: '',\n }),\n );\n };\n fetchData();\n }\n }, [isPortal, name, dispatch]);\n\n useEffect(() => {\n if (name !== currentUser) {\n window.location.reload();\n }\n }, [name, currentUser]);\n\n const handleSucess = (user, token) => {\n dispatch(\n dispatchLogin({\n accessToken: token.accessToken.token,\n userGroups: user.userGroups,\n name: user.name,\n }),\n );\n setCurrentUser(user.name);\n setLoginDialog(false);\n };\n\n const handleLoginClose = () => {\n setLoginDialog(false);\n };\n\n return (\n // \n \n Login\n
\n \n
\n
\n );\n};\n","export default __webpack_public_path__ + \"static/media/appInfoBackground.d28f07ee.png\";","import React, { useState, useEffect } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useHistory } from 'react-router-dom';\nimport Box from '@material-ui/core/Box';\nimport Avatar from '@material-ui/core/Avatar';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Divider from '@material-ui/core/Divider';\nimport LoginIcon from '@material-ui/icons/Input';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Typography from '@material-ui/core/Typography';\nimport Select from '@material-ui/core/Select';\nimport Input from '@material-ui/core/Input';\nimport InputLabel from '@material-ui/core/InputLabel';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport LockIcon from '@material-ui/icons/Lock';\nimport Button from '@material-ui/core/Button';\nimport { getVersion } from 'factories/ConfigApi';\n// import { useSelector, shallowEqual, useDispatch } from 'react-redux';\nimport { useSelector, shallowEqual } from 'react-redux';\nimport { useTranslation } from 'react-i18next';\nimport LoginDialog from '../../../../containers/Accounts/Login';\n// import { selectIsAdmin, dispatchLogout } from '../../../../reducers/Authorization';\nimport { selectIsAdmin } from '../../../../reducers/Authorization';\n// import { resetApp } from '../../../../actions';\nimport aboutImage from '../../../../images/appInfoBackground.png';\nimport axios from '../../../../containers/hooks/useAxios';\n\nconst styles = makeStyles((theme) => ({\n container: {\n position: 'relative',\n zIndex: 9999,\n display: 'flex',\n alignItems: 'center',\n height: '100%',\n transition: 'background ease-in-out 0.3s',\n cursor: 'pointer',\n '&:hover': {\n backgroundColor: theme.palette.mediumGrey.main,\n },\n },\n background: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.common.white,\n },\n aboutBackground: {\n width: '100%',\n },\n aboutTextContainer: {\n position: 'absolute',\n top: '80px',\n left: '40px',\n display: 'flex',\n flexDirection: 'column',\n },\n aboutText: {\n marginLeft: '40px',\n },\n lngOption: {\n '&&&:before': {\n borderBottom: 'none',\n },\n '&&:after': {\n borderBottom: 'none',\n },\n },\n}));\n\nconst Login = ({ name }) => {\n // const dispatch = useDispatch();\n const { push } = useHistory();\n const [anchorEl, setAnchorEl] = useState(null);\n const [version, setVersion] = useState('');\n const classes = styles();\n const isAdmin = useSelector(selectIsAdmin, shallowEqual);\n const [aboutDialog, setAboutDialog] = React.useState(false);\n const [firstUser, setFirstUser] = React.useState(false);\n const [loginDialog, setLoginDialog] = React.useState(false);\n const { t, i18n } = useTranslation();\n\n useEffect(() => {\n getVersion().then((sourceData) => {\n setVersion(sourceData);\n localStorage.setItem('MOW-Version', sourceData);\n });\n }, []);\n\n useEffect(() => {\n if (localStorage.getItem('i18nextLng')) {\n i18n.changeLanguage(localStorage.getItem('i18nextLng'));\n } else {\n localStorage.setItem('i18nextLng', 'en');\n }\n }, [i18n]);\n\n useEffect(() => {\n axios.get('/api/account/firstuser').then((response) => {\n setFirstUser(response.data);\n });\n }, []);\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleLogout = React.useCallback(() => {\n handleClose();\n // dispatch(dispatchLogout());\n // resetApp();\n push('/sign-out');\n }, [push]);\n\n const handleLogin = React.useCallback(() => {\n setLoginDialog(true);\n handleClose();\n }, []);\n\n const handleAbout = () => {\n setAboutDialog(true);\n setAnchorEl(null);\n };\n\n const handleAboutClose = () => {\n setAboutDialog(false);\n };\n\n const handleFirstUSerClose = () => {\n setFirstUser(false);\n };\n\n const handleChangeLanguage = (e) => {\n localStorage.setItem('i18nextLng', e.currentTarget.value);\n i18n.changeLanguage(e.currentTarget.value);\n setAnchorEl(null);\n };\n\n const handleUserManagement = React.useCallback(() => {\n handleClose();\n push('/accounts');\n }, [push]);\n\n const handleGroupCreation = React.useCallback(() => {\n handleClose();\n push('/creategroups');\n }, [push]);\n\n const [formData, setFormData] = useState({\n id: '',\n name: '',\n password: '',\n repeatPassword: '',\n });\n\n const [errors, setErrors] = useState({});\n\n const handleInputChange = (event) => {\n setFormData({\n ...formData,\n [event.target.name]: event.target.value,\n });\n };\n\n const handleSubmit = (event) => {\n event.preventDefault();\n const { password, repeatPassword } = formData;\n\n if (password !== repeatPassword) {\n setErrors({\n repeatPassword: t('FormPasswordRepeat.data'),\n });\n } else {\n const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])/;\n if (!passwordRegex.test(password)) {\n setErrors({\n password: t('FormPasswordRules.data'),\n });\n } else {\n const { repeatPassword: repeatPasswordVal, ...firstUserData } = formData;\n axios\n .post('/api/account/webadmin', firstUserData)\n .then(() => {\n handleFirstUSerClose();\n })\n .catch(function (error) {\n console.log(error);\n });\n }\n }\n };\n\n const isLogged = name || false;\n return (\n <>\n \n \n \n \n \n\n \n {isLogged ? name.charAt(0) : } :\n \n \n\n \n \n \n \n \n \n \n \n {isAdmin && {t('User Management.data')}}\n {isAdmin && {t('GroupCreation.data')}}\n {t('About.data')}\n {isLogged ? (\n {t('Logout.data')}\n ) : (\n {t('Login.data')}\n )}\n \n \n \n \"\"\n \n \n \n {t('WelcomeTitle.data')}\n \n Version {version}\n
\n \n {t('WelcomeLabel.data')}.\n \n
\n
\n
\n
\n \n ID\n \n \n \n }\n />\n \n
\n
\n \n {t('Name.data')}\n \n \n \n }\n />\n \n
\n
\n \n {t('Password.data')}Password\n \n \n \n }\n />\n {errors.password && (\n \n {errors.password}\n \n )}\n \n {/*
\n
*/}\n \n {t('RepeatPassword.data')}\n \n \n \n }\n />\n {errors.repeatPassword && (\n \n {errors.repeatPassword}\n \n )}\n \n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n \n {t('About.data')}\n \n \"\"\n \n \n \n MIKE OPERATIONS Web\n \n
\n Version {version}\n
\n
\n
\n \n \n );\n};\n\nexport default Login;\n","import React, { useMemo } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Header from './partials/Header';\nimport Content from './partials/Content';\nimport Login from './partials/Login';\nimport SubHeader from './partials/SubHeader';\n\nfunction ErrorFallback({ error }) {\n const { message, stack } = error;\n return (\n
\n

Sorry, something went wrong. Please send the following information to DHI.

\n
{message}
\n
{stack}
\n
\n );\n}\n\nconst Layout = ({ children, breadcrumbs = [], mainAppBar = false, navBar = false, control }) => {\n const hideAllBars = mainAppBar === true && navBar === false;\n const topbarSize = React.useMemo(\n () => (mainAppBar && navBar ? { minHeight: '40px', maxHeight: '40px' } : { minHeight: '100px' }),\n [mainAppBar, navBar],\n );\n\n const withTopbar = useMemo(\n () =>\n !hideAllBars && (\n <>\n \n {!mainAppBar &&
}\n {mainAppBar && navBar && (\n \n \n \n )}\n \n ),\n\n [hideAllBars, topbarSize, mainAppBar, navBar, breadcrumbs, control],\n );\n\n return (\n <>\n {withTopbar}\n {children}\n \n );\n};\n\nLayout.Content = Content;\nLayout.Login = Login;\n\nexport default Layout;\n","/**\n * The colors from DHI Official Guidelines\n */\nexport const MIKE_COLORS = {\n BRANDBLUE_DEFAULT: '#0B4566',\n BRANDBLUE_DARK: '#09334B',\n BRANDBLUE_LIGHT: '#93C4D4',\n\n ACTIONBLUE_DEFAULT: '#00A4EC',\n ACTIONBLUE_DARK: '#008BEC',\n ACTIONBLUE_LIGHT: '#97DBF9',\n\n GREEN_DEFAULT: '#61C051',\n GREEN_DARK: '#3EB22A',\n GREEN_LIGHT: '#BFE7B7',\n\n PINK_DEFAULT: '#FD3F75',\n PINK_DARK: '#D40D57',\n PINK_LIGHT: '#FFB1C8',\n\n DARKGREY_DEFAULT: '#86A2B3',\n DARKGREY_DARK: '#557A8F',\n DARKGREY_LIGHT: '#CFDBE2',\n\n MEDIUMGREY_DEFAULT: '#DBE4E9',\n MEDIUMGREY_DARK: '#CFDBE2',\n MEDIUMGREY_LIGHT: '#F2F5F7',\n\n XLIGHTGREY: '#F8F8F8',\n\n WHITE: '#FFFFFF',\n BLACK: '#000000',\n};\n\n/**\n * The map colors from DHI Official Guidelines\n */\nexport const MIKE_MAP_COLORS = {\n SKYBLUE: '#0EE1FE',\n DUSTYROSE: '#CF6766',\n TURQUISE: '#00FFE1',\n PLUM: '#8E074D',\n VIOLET: '#D779FF',\n CORAL: '#CF6766',\n};\n\nexport default MIKE_COLORS;\n","import axios from '../containers/hooks/useAxios';\n\nexport const getAutoConfigurationOptions = async (dbName: string, path: string, scenario: string) => {\n const response = await axios.get(`/api/configuration?system=${dbName}&simulationPath=${path}&scenario=${scenario}`);\n const { data } = response || {};\n return data;\n};\n\nexport const createDynamicLayer = async (\n systemName: string,\n scenario: string,\n simulationPath: string,\n layers: [any],\n tsType: [string],\n quantity: [string],\n units: [string],\n) => {\n const response = await axios.post(`/api/configuration/dynamic-layer?system=${systemName}`, {\n scenario,\n simulationPath,\n layers,\n tsType,\n quantity,\n units,\n });\n const { data } = response || {};\n return data;\n};\n\nexport const getTitle = async () => {\n const response = await axios.get('/api/configuration/systems');\n const { data } = response || {};\n return data;\n};\n\nexport const getVersion = async () => {\n const response = await axios.get('/api/configuration/product-version');\n const { data } = response || {};\n return data;\n};\n\nexport const getSystems = async () => {\n const response = await axios.get('/api/configuration/systems');\n const { data } = response || {};\n return data;\n};\n\nexport const createSystem = async (obj: any) => {\n const response = await axios.post('/api/configuration/system/create', obj);\n const { data } = response || {};\n return data;\n};\n\nexport const updateSystem = async (oldname: string, obj: any) => {\n const response = await axios.put(`/api/configuration/system/update?oldname=${oldname}`, obj);\n const { data } = response || {};\n return data;\n};\n\nexport const deleteSystem = async (system: string) => {\n const response = await axios.delete(`/api/configuration/system/delete?system=${system}`);\n const { data } = response || {};\n return data;\n};\n\nexport const updateSystemOrder = async (systemIds: string[]) => {\n const response = await axios.put('/api/configuration/update-system-order', { systemIds });\n const { data } = response || {};\n return data;\n};\n\nexport const modifyAppTitle = async (appTitle: string) => {\n const response = await axios.post(`/api/configuration/create-or-update?appTitle=${appTitle}`);\n const { data } = response || {};\n return data;\n};\nexport const getDatabases = async (server: string, port: string, username: string, password: string) => {\n const response = await axios.post('/api/configuration/system/databases', {\n server,\n port,\n username,\n password,\n });\n const { data } = response || {};\n return data;\n};\n\nexport const addStaticLayer = async (system: string, fullname: string) => {\n const response = await axios.post(\n `/api/configuration/static-layer?system=${system}&fullname=${fullname.split('/').join('|')}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const addStaticLayerStatus = async (system: string, fullname: string) => {\n const response = await axios.post(\n `/api/configuration/static-status-layer?system=${system}&fullname=${fullname.split('/').join('|')}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const removeStaticLayer = async (system: string, name: string) => {\n const response = await axios.delete(\n `/api/featurecollections/${system}-gis/Web Configuration|${system}|Static|${name}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const renameStaticLayer = async (system: string, oldName: string, newName: string) => {\n const response = await axios.put(\n `/api/configuration/rename-layer?system=${system}&fullName=Web Configuration|${system}|Static|${oldName}&newName=${newName}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const updateVisibility = async (system: string, featureClassMeta: any) => {\n const response = await axios.put(\n `/api/configuration/static-layer/update-visibility?system=${system}`,\n featureClassMeta,\n );\n const { data } = response || {};\n return data;\n};\nexport const getStaticFeatureProperties = async (system: string) => {\n const response = await axios.get(`/api/configuration/featureclass-properties?system=${system}`);\n const { data } = response || {};\n return data;\n};\n\nexport const updatePlace = async (system: string, scenario: string, oldPlaceId: string, place: any) => {\n const response = await axios.put(\n `api/configuration/update-place?system=${system}&scenario=${scenario}&oldPlaceId=${oldPlaceId}`,\n place,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const addPlace = async (system: string, scenario: string, place: any) => {\n const response = await axios.post(`api/configuration/add-place?system=${system}&scenario=${scenario}`, place);\n const { data } = response || {};\n return data;\n};\n\nexport const deletePlace = async (system: string, scenario: string, indicatorType: string, places: any[]) => {\n const response = await axios.delete(`api/configuration/delete-places`, {\n data: places,\n params: { system, scenario, indicatorType },\n });\n const { data } = response || {};\n return data;\n};\n\nexport const renameIndicator = async (\n system: string,\n scenario: string,\n indicatorOldName: string,\n indicatorNewName: string,\n) => {\n const response = await axios.put(\n `api/configuration/rename-indicators?system=${system}&scenario=${scenario}&indicatorOldName=${indicatorOldName}&indicatorNewName=${indicatorNewName}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const removeIndicator = async (system: string, scenario: string, indicatorName: string) => {\n const response = await axios.put(\n `api/configuration/remove-indicators?system=${system}&scenario=${scenario}&indicatorName=${indicatorName}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const updateThresholds = async (\n system: string,\n scenario: string,\n indicatorType: string,\n noThresholdsToKeep: string,\n) => {\n const response = await axios.put(\n `api/configuration/update-thresholds?system=${system}&scenario=${scenario}&indicatorType=${indicatorType}&noThresholdsToKeep=${noThresholdsToKeep}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const updateAggregationType = async (\n system: string,\n scenario: string,\n indicatorType: string,\n aggregationTypeName: string,\n) => {\n const response = await axios.put(\n `api/configuration/update-aggregationType?system=${system}&scenario=${scenario}&indicatorType=${indicatorType}&aggregationTypeName=${aggregationTypeName}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const deleteIconGrouping = async (system: string, scenario: string, oldGroupingName: string) => {\n const response = await axios.delete(\n `api/configuration/delete-iconGrouping?system=${system}&scenario=${scenario}&oldGroupingName=${oldGroupingName}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const updateIconGrouping = async (\n system: string,\n scenario: string,\n oldGroupName: string,\n newGrouping: object,\n) => {\n const response = await axios.put(\n `api/configuration/update-iconGrouping?system=${system}&scenario=${scenario}&oldGroupName=${oldGroupName}`,\n newGrouping,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const addUpdate2Dconfig = async (system: string, scenario: string, projectIdString: string) => {\n const response = await axios.put(\n `api/scenario/${system}/${scenario}/add-or-update-2Dconfig?projectIdString=${projectIdString}`,\n );\n const { data } = response || {};\n return data;\n};\n\nexport const exportPlaces = async (\n system: string,\n scenarioId: string,\n indicatorType: string,\n columnNames: string[],\n) => {\n const response = await axios.post(\n `/api/configuration/export-csv?system=${system}`,\n { scenarioId, indicatorType, columnNames },\n {\n responseType: 'blob',\n },\n );\n const { data } = response || {};\n return data;\n};\n\nexport const importPlaces = async (system: string, scenarioId: string, indicatorType: string, file: any) => {\n const formData = new FormData();\n formData.append('file', file);\n const response = await axios.post(\n `/api/configuration/import-csv?system=${system}&scenario=${scenarioId}&indicatorType=${indicatorType}`,\n formData,\n {\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n },\n );\n const { data } = response || {};\n return data;\n};\n","import { createContext } from 'react';\n\nexport type SnackContextProps = {\n sendErrorMessage: (message: String) => void;\n sendInfoMessage: (message: String) => void;\n sendSuccessMessage: (message: String) => void;\n sendWarningMessage: (message: String) => void;\n};\n\nexport default createContext({\n sendErrorMessage: () => {},\n sendInfoMessage: () => {},\n sendSuccessMessage: () => {},\n sendWarningMessage: () => {},\n});\n","import axios from '../containers/hooks/useAxios';\n\nconst path = 'api/timeseries/';\n\nexport const getTimeSeries = async (forecastType, system, id) => {\n const response = await axios.get(\n `${path + system.dbName}-timeseries/${id\n .split('|')\n .join('||')\n .split('/')\n .join('|')\n .replace('[Path]', forecastType.simulationPath)}`,\n );\n const { data } = response;\n return data;\n};\n\nexport const getInfos = async (forecastType, system, ids) => {\n const infos = ids.map((x) =>\n axios.get(\n `${path + system.dbName}-timeseries/${x.path\n .split('|')\n .join('||')\n .split('/')\n .join('|')\n .replace('[Path]', forecastType.simulationPath)}`,\n { res: 'info', name: x.name },\n ),\n );\n\n const max = ids\n .filter((x) => x.exceedence)\n .map((x) =>\n axios.get(\n `${path + system.dbName}-timeseries/${x.path\n .split('|')\n .join('||')\n .split('/')\n .join('|')\n .replace('[Path]', forecastType.simulationPath)}/values`,\n { res: 'exceedence', name: x.name, tValue: x.tValue },\n ),\n );\n const list = infos.concat(max);\n return Promise.all(list)\n .then((responses) =>\n responses.map((x) => {\n let d = x.data;\n if (x.config.res === 'exceedence') {\n const temp = x.data.map((f) => f[1]);\n // eslint-disable-next-line prefer-destructuring\n d = x.data[temp.indexOf(Math.max.apply(null, temp))][0];\n }\n return { data: d, method: x.config.res, name: x.config.name };\n }),\n )\n .catch(() => {\n // react on errors.\n });\n};\n\n// TODO implement from and to for observations\nexport const getTimeSeriesList = async (forecast, timeseries) => {\n const response = await axios.post(\n `${path + forecast.system.dbName}-timeseries/list/values`,\n timeseries.map((id) =>\n id.replace('[Path]', forecast.forecastType.simulationPath.split('|').join('/')).split('|').join('||'),\n ),\n );\n const { data } = response || {};\n return data;\n};\n\nexport const getTimeSeriesResolver = async ({ timeseries, dbName, folderPath, simulationPath, from, to }) => {\n // should it be simulationStart or TimeOfForecast ask JALU\n let replacer = simulationPath;\n if (replacer === undefined) {\n replacer = folderPath;\n }\n const ts = timeseries.map((id) => id.replace('[Path]', replacer.split('|').join('/')).split('|').join('||'));\n let query = '';\n if (from && to) {\n query = `?from=${from}&to=${to}`;\n }\n const response = await axios.post(`api/${dbName}-timeseries/ts/list/values${query}`, ts);\n const { data } = response || {};\n return data;\n};\n","import axios from '../containers/hooks/useAxios';\n\nconst path = 'api/systems';\n\nexport const getSystems = async () => {\n const response = await axios.get(`${path}/map`);\n const { data } = response || {};\n return data;\n};\n\nexport const getSystemsConfig = async () => {\n const response = await axios.get(`${path}/config`);\n const { data } = response || {};\n return data;\n};\n\nexport const getStatus = async () => {\n const response = await axios.get(`${path}/statusCached`);\n const { data } = response || {};\n return data;\n};\n","import axios from '../containers/hooks/useAxios';\n\nconst path = 'https://watertools-gateway-api.azurewebsites.net/v2/';\n\nexport const waterPortalInfo = async (workspaceId, applicationId) => {\n const url = `${path}/workspace/${workspaceId}/application/${applicationId}/focus-area`;\n const responseFocusArea = await axios.get(url);\n const { data: areas } = responseFocusArea;\n if (areas.length > 0) {\n const { id } = areas[0];\n const response = await axios.get(`${url}/${id}/connectionstring`);\n const { data } = response;\n const { connectionstring } = data;\n\n const query = new URLSearchParams(connectionstring);\n const country = query.get('country');\n const ne = query.get('ne') ? JSON.parse(query.get('ne')) : undefined;\n const sw = query.get('sw') ? JSON.parse(query.get('sw')) : undefined;\n\n const baseURL = query.get('apiURL');\n\n const filter = query.get('filter');\n const show = query.get('show');\n const tileDataset = query.get('tileDataset');\n const projectId = query.get('projectId');\n const ignoreObservations = query.get('ignoreObservations');\n const projects = query.get('projects');\n const apiKey = query.get('apiKey');\n const styleMapbox = query.get('styleMapbox');\n return {\n country,\n ne,\n sw,\n baseURL,\n filter,\n show,\n tileDataset,\n projects,\n projectId,\n apiKey,\n styleMapbox,\n ignoreObservations,\n };\n }\n return {};\n};\n\nexport const validatePortal = async (portalToken, workspaceId) => {\n const url = `/api/portal/validateWorkspaceRole?token=${portalToken}&workspaceId=${workspaceId}`;\n const response = await axios.put(url, {});\n const { data } = response;\n return data;\n};\n","import { useEffect, useState, useCallback } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport jwt_decode from 'jwt-decode';\nimport { waterPortalInfo, validatePortal } from 'factories/WaterToolsFactory';\nimport { mikeCouldAxios, defaultAxios as axios } from '../useAxios';\n\nconst tokenKey = 'AccessToken';\nconst mainKey = 'main';\nconst portalKey = 'portal';\n\n// TODO do not set anything here.....\nconst setBaseURL = (props: { baseURL?: string }) => {\n const { baseURL } = props;\n if (baseURL) {\n axios.defaults.baseURL = baseURL || '';\n }\n};\n\nconst setApiKey = (props: { apiKey?: string; projects?: string; token: string; projectId?: string }) => {\n const { apiKey, projects, token, projectId } = props;\n axios.defaults.headers.common.Authorization = `Bearer ${token}`;\n if (apiKey) {\n mikeCouldAxios.defaults.headers.common.OpenApiKey = apiKey;\n mikeCouldAxios.defaults.headers.common.Projetcs = projects;\n mikeCouldAxios.defaults.headers.common['dhi-open-api-key'] = apiKey;\n }\n if (projectId) {\n mikeCouldAxios.defaults.headers.common.projectId = projectId;\n }\n};\ninterface TokenDS {\n sub: string;\n 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid': string;\n 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name': string;\n}\n\ninterface Token {\n sub: string;\n userGroups: string;\n name: string;\n token: any;\n}\n\nconst decodeAccesTokenApi = ({ accessToken }): Token => {\n const { token } = accessToken;\n try {\n const decodeToken: TokenDS = jwt_decode(token);\n const userGroups = decodeToken['http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid'];\n const name = decodeToken['http://schemas.microsoft.com/ws/2008/06/identity/claims/name'];\n const { sub } = decodeToken;\n return { token, userGroups, name, sub };\n } catch {\n return { token: undefined, userGroups: '', name: '', sub: '' };\n }\n};\n\ninterface TokenPortal {\n email: string;\n nameid: string;\n}\n\nconst decodePortalToken = (portalToken: string) => {\n const decodeToken: TokenPortal = jwt_decode(portalToken);\n return decodeToken;\n};\n\ninterface Options {\n country?: string;\n filter?: string;\n tileDataset?: string;\n show?: boolean;\n projects?: string;\n styleMapbox: string;\n baseURL?: string;\n ne?: string[];\n sw?: string[];\n projectId?: string;\n ignoreObservation?: boolean;\n apiKey: string;\n}\n\ninterface Portal {\n options: Options;\n email: string;\n nameid: string;\n workspaceId: string;\n baseURL: string;\n}\n\nconst portalLogged = (sessionAccess: any, portal: Portal) => {\n const { accessToken: moKey } = sessionAccess || { token: '' };\n const access = decodeAccesTokenApi({ accessToken: { token: moKey } });\n const { token } = access;\n const { options, email, nameid, workspaceId } = portal;\n const { baseURL, apiKey } = options;\n setApiKey({ token, apiKey });\n axios.defaults.baseURL = baseURL || '';\n\n return { access, pending: false, options, email, nameid, dhiOpenApiKey: '', workspaceId };\n};\n\nconst normalLogged = (sessionAccess: any) => {\n const { accessToken: moKey, Name: username } = sessionAccess || { token: '' };\n const access = decodeAccesTokenApi({ accessToken: { token: moKey } });\n const { token, sub: nameid } = access;\n setApiKey({ token });\n return {\n access,\n pending: false,\n options: {} as Options,\n email: '',\n nameid,\n username,\n dhiOpenApiKey: '',\n workspaceId: '',\n };\n};\n\nconst useAppInfo = () => {\n const [state, setState] = useState({\n pending: true,\n options: {} as Options,\n access: {} as Token,\n dhiOpenApiKey: '',\n email: '',\n nameid: '',\n workspaceId: '',\n });\n const [isPortal, setIsPortal] = useState(false);\n const [firstTime, setFirstTime] = useState(true);\n\n function useQuery() {\n return new URLSearchParams(useLocation().search);\n }\n\n const query = useQuery();\n const portalTokenQuery = query.get('portalToken') || '';\n const appTokenQuery = query.get('appToken') as string;\n\n const callapikey = useCallback(() => {\n axios.get('/api/systems/openapikey').then(({ data }) => {\n if (data) {\n mikeCouldAxios.defaults.headers.common.OpenApiKey = data;\n mikeCouldAxios.defaults.headers.common['dhi-open-api-key'] = data;\n }\n });\n }, []);\n\n useEffect(() => {\n if (firstTime) {\n setFirstTime(false);\n if (!!portalTokenQuery && appTokenQuery) {\n setIsPortal(true);\n const appToken: any = jwt_decode(appTokenQuery || '');\n const { ApplicationId, WorkspaceId } = appToken || {};\n waterPortalInfo(WorkspaceId, ApplicationId).then((res: any) => {\n const {\n country,\n filter,\n show,\n tileDataset,\n projects,\n apiKey,\n styleMapbox,\n baseURL,\n ne,\n sw,\n ignoreObservations,\n projectId,\n } = res;\n setBaseURL(res);\n const { email, nameid } = decodePortalToken(portalTokenQuery);\n validatePortal(portalTokenQuery, WorkspaceId).then((validation) => {\n // pass baseURL before setting it up globally...\n const access = decodeAccesTokenApi(validation);\n const { token } = access;\n setApiKey({ apiKey, projects, token, projectId });\n const portalState: any = {\n access,\n options: {\n country,\n filter,\n show,\n tileDataset,\n projects,\n styleMapbox,\n apiKey,\n ne,\n sw,\n ignoreObservations,\n baseURL,\n },\n pending: false,\n dhiOpenApiKey: apiKey,\n nameid,\n email,\n workspaceId: WorkspaceId,\n };\n\n localStorage.setItem(portalKey, JSON.stringify({ options: res, email, nameid, workspaceId: WorkspaceId }));\n setState(portalState);\n });\n });\n } else if (localStorage.getItem(tokenKey) && localStorage.getItem(portalKey)) {\n setIsPortal(true);\n const portalState = portalLogged(\n JSON.parse(localStorage.getItem(tokenKey) || ''),\n JSON.parse(localStorage.getItem(portalKey) || ''),\n );\n setState(portalState);\n } else {\n let portalState = { options: {}, pending: false };\n if (localStorage.getItem(tokenKey)) {\n portalState = normalLogged(JSON.parse(localStorage.getItem(tokenKey) || ''));\n }\n axios.defaults.baseURL = '';\n if (process.env.REACT_APP_BASEURL) {\n localStorage.setItem(mainKey, process.env.REACT_APP_BASEURL);\n axios.defaults.baseURL = process.env.REACT_APP_BASEURL;\n } else if ((window as any).env.BASEURL !== '__BASE_URL__') {\n localStorage.setItem(mainKey, (window as any).env.BASEURL || '');\n axios.defaults.baseURL = (window as any).env.BASEURL;\n }\n callapikey();\n setState(portalState);\n }\n }\n }, [isPortal, firstTime, appTokenQuery, portalTokenQuery, callapikey]);\n\n return {\n isPortal,\n ...state,\n };\n};\nexport default useAppInfo;\nexport { mikeCouldAxios };\n","import { createContext } from 'react';\n\nexport default createContext();\n","import axios from '../containers/hooks/useAxios';\nimport { getTimeSeriesList } from './TimeseriesFactory';\n\nconst path = 'api/scenario/';\n\nexport const getScenario = async (dbname) => {\n const response = await axios.get(path + dbname);\n const { data } = response || {};\n return data;\n};\n\nconst editTime = (dbName, time) => {\n if (dbName === 'cloud' && time) {\n return new Date(`${time}Z`).toISOString();\n }\n return time;\n};\n\nexport const getForecasttypeLayers = async (dbname, scenario) => {\n const response = await axios.get(`${path + dbname}/forecast-layers?scenario=${scenario}`);\n const { data } = response || {};\n return data;\n};\n\nexport const getTimeseries = async (forecast, timeseries) => {\n const { latest } = forecast.forecastType;\n\n if (latest.time === forecast.forecastType.time) {\n const response = await axios.post(`${path + forecast.system.dbName}/forecast-latest`, {\n scenario: forecast.forecastType,\n timeseries,\n });\n const { data } = response || {};\n return data;\n }\n return getTimeSeriesList(forecast, timeseries);\n};\n\nexport const getSimulationLatest = async (dbname, forecastType, ghm) => {\n const { scenarioId } = forecastType;\n const requestHeaders = {\n headers: {\n 'api-version': ghm ? 2 : 1,\n },\n };\n\n const response = await axios.post(\n `${path + dbname}/forecast-latest-time`,\n {\n system: dbname,\n path: forecastType.path,\n scenario: scenarioId,\n },\n requestHeaders,\n );\n const { data } = response || {};\n const {\n cloudFolder2DDataId: projectId,\n simulationEnd,\n simulationPath,\n simulationStart,\n time,\n timeOfForecast,\n } = data || {};\n\n const newTime = editTime(dbname, time);\n const timeForecast = editTime(dbname, timeOfForecast || time);\n return {\n projectId,\n simulationEnd,\n simulationPath,\n simulationStart,\n time: newTime,\n timeOfForecast: timeForecast,\n };\n};\n\nexport const getStylelayers = async (dbname, featureCollection) => {\n const response = await axios.get(`${path + dbname}/stylelayers/${featureCollection.split('/').join('|')}`);\n const { data } = response || {};\n return data;\n};\nexport const getStaticLayers = async (dbname) => {\n const response = await axios.get(`${path + dbname}/static-layers`);\n const { data } = response || {};\n return data;\n};\n\nexport const updateScenario = async (dbname, forecastTypesDto) => {\n const response = await axios.post(`${path + dbname}/create-or-update`, forecastTypesDto);\n const { data } = response || {};\n return data;\n};\n","var map = {\n\t\"./de/translation.de.json\": [\n\t\t922,\n\t\t59\n\t],\n\t\"./en/translation.en.json\": [\n\t\t923,\n\t\t60\n\t],\n\t\"./fr/translation.fr.json\": [\n\t\t924,\n\t\t61\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__.t(id, 3);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 839;\nmodule.exports = webpackAsyncContext;","import React from 'react';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\n\nconst ConfirmationDialog = ({ open, options, onCancel, onConfirm, onClose }) => {\n const {\n title,\n description,\n content,\n confirmationText,\n cancellationText,\n dialogProps,\n confirmationButtonProps,\n cancellationButtonProps,\n titleProps,\n contentProps,\n allowClose,\n } = options;\n\n return (\n \n {title && {title}}\n {content ? (\n {content}\n ) : (\n description && (\n \n {description}\n \n )\n )}\n \n \n {cancellationText && (\n \n )}\n \n \n );\n};\n\nexport default ConfirmationDialog;\n","import React, { useState, useCallback } from 'react';\nimport ConfirmContext from './ConfirmContext';\nimport ConfirmationDialog from './ConfirmationDialog';\n\nconst DEFAULT_OPTIONS = {\n title: '',\n description: '',\n content: null,\n confirmationText: 'Ok',\n cancellationText: 'Cancel',\n dialogProps: {},\n confirmationButtonProps: {},\n cancellationButtonProps: {},\n titleProps: {},\n contentProps: {},\n allowClose: true,\n};\n\nconst buildOptions = (defaultOptions, options) => {\n const dialogProps = {\n ...(defaultOptions.dialogProps || DEFAULT_OPTIONS.dialogProps),\n ...(options.dialogProps || {}),\n };\n const confirmationButtonProps = {\n ...(defaultOptions.confirmationButtonProps || DEFAULT_OPTIONS.confirmationButtonProps),\n ...(options.confirmationButtonProps || {}),\n };\n const cancellationButtonProps = {\n ...(defaultOptions.cancellationButtonProps || DEFAULT_OPTIONS.cancellationButtonProps),\n ...(options.cancellationButtonProps || {}),\n };\n const titleProps = {\n ...(defaultOptions.titleProps || DEFAULT_OPTIONS.titleProps),\n ...(options.titleProps || {}),\n };\n const contentProps = {\n ...(defaultOptions.contentProps || DEFAULT_OPTIONS.contentProps),\n ...(options.contentProps || {}),\n };\n\n return {\n ...DEFAULT_OPTIONS,\n ...defaultOptions,\n ...options,\n dialogProps,\n confirmationButtonProps,\n cancellationButtonProps,\n titleProps,\n contentProps,\n };\n};\n\nconst ConfirmProvider = ({ children, defaultOptions = {} }) => {\n const [options, setOptions] = useState({ ...DEFAULT_OPTIONS, ...defaultOptions });\n const [resolveReject, setResolveReject] = useState([]);\n const [resolve, reject] = resolveReject;\n\n const confirm = useCallback((o = {}) => {\n return new Promise((s, j) => {\n setOptions(buildOptions(defaultOptions, o));\n setResolveReject([s, j]);\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClose = useCallback(() => {\n setResolveReject([]);\n }, []);\n\n const handleCancel = useCallback(() => {\n if (reject) {\n reject();\n handleClose();\n }\n }, [reject, handleClose]);\n\n const handleConfirm = useCallback(() => {\n if (resolve) {\n resolve();\n handleClose();\n }\n }, [resolve, handleClose]);\n\n return (\n <>\n {children}\n \n \n );\n};\n\nexport default ConfirmProvider;\n","import React, { useEffect } from 'react';\nimport { useSelector, shallowEqual, useDispatch } from 'react-redux';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Layout from 'components/Layout';\nimport useAppInfo from '../hooks/portal/useAppInfo';\n// import LoginDialog from '../Accounts/Login';\nimport { selectName, dispatchLogin } from '../../reducers/Authorization';\nimport { selectSystem } from '../../reducers/ForecastType';\n// import { dispatchWaterToolsPortal, selectIsPortal } from '../../reducers/WaterToolsPortal';\nimport { dispatchStandAloneApp, dispatchWaterToolsPortal, selectIsPortal } from '../../reducers/WaterToolsPortal';\n\nconst MOWebLayout = ({ children }) => {\n const name = useSelector(selectName, shallowEqual);\n const isPortal = useSelector(selectIsPortal, shallowEqual);\n const system = useSelector(selectSystem, shallowEqual);\n const { ghm } = system || {};\n const dispatch = useDispatch();\n const { options, isPortal: isPortalFirsttime, pending, access } = useAppInfo();\n\n // console.log('name: ', name);\n // console.log('isPortal: ', isPortal);\n // console.log('system: ', system);\n // console.log('access: ', access);\n // console.log('localStorage: ', localStorage.getItem('AccessToken'));\n\n useEffect(() => {\n if (!pending) {\n if (isPortalFirsttime) {\n dispatch(dispatchWaterToolsPortal(options));\n const userGroups = Array.isArray(access.userGroups) ? access.userGroups.join(',') : access.userGroups;\n dispatch(\n dispatchLogin({\n accessToken: access.token,\n userGroups,\n name: access.name,\n }),\n );\n } else {\n dispatch(dispatchStandAloneApp());\n }\n }\n }, [pending, access, dispatch, isPortalFirsttime, options]);\n\n return (\n <>\n {/* */}\n {pending ? (\n \n ) : (\n }>\n {children}\n \n )}\n \n );\n};\n\nexport default MOWebLayout;\n","import React from 'react';\nimport { useDispatch } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport { dispatchLogout } from '../../reducers/Authorization';\nimport { resetApp } from '../../actions';\n\nconst Signout = () => {\n const dispatch = useDispatch();\n const history = useHistory();\n React.useEffect(() => {\n dispatch(dispatchLogout());\n resetApp();\n history.push('/');\n }, [dispatch, history]);\n return <>;\n};\nexport default Signout;\n","import ActionTypes from '../constants/actionTypes';\nimport { store } from '../store';\n\nexport const resetApp = () => store.dispatch({ type: ActionTypes.RESET_APP });\n\nexport default {};\n","import React, { lazy, Suspense } from 'react';\nimport { Router, Route, Switch } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport MOWebLayout from '../containers/MOWebLayout';\nimport Signout from '../containers/Accounts/Signout';\n\nconst Scenario = lazy(() => import('containers/Scenario'));\nconst Main = lazy(() => import('containers/Main'));\nconst GlobalHydrologicalModel = lazy(() => import('containers/GlobalHydrologicalModel'));\nconst Configuration = lazy(() => import('containers/Configuration'));\nconst Status = lazy(() => import('containers/Status'));\nconst Accounts = lazy(() => import('containers/Accounts'));\nconst CreateGroups = lazy(() => import('containers/CreateGroups'));\n\nexport const history = createBrowserHistory();\n\nconst DefaultLayout = ({ exact, path, component }) => {\n return (\n \n \n \n );\n};\n\nconst Routes = () => {\n const redirect = (path) => {\n const { origin } = window.location;\n window.location.assign(`${origin}/${path}`);\n };\n\n return (\n \n Loading...}>\n \n \n \n \n \n \n \n \n redirect('dashboard')} />\n \n \n \n \n \n );\n};\n\nexport default Routes;\n","/* eslint-disable no-console */\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 https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are 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 navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import { createTheme } from '@material-ui/core/styles';\nimport { MIKE_COLORS } from './mike-colors';\n\nexport const mikePalette = {\n primary: {\n main: MIKE_COLORS.BRANDBLUE_DEFAULT,\n dark: MIKE_COLORS.BRANDBLUE_DARK,\n light: MIKE_COLORS.BRANDBLUE_LIGHT,\n contrastText: MIKE_COLORS.WHITE,\n },\n secondary: {\n main: MIKE_COLORS.ACTIONBLUE_DEFAULT,\n dark: MIKE_COLORS.ACTIONBLUE_DARK,\n light: MIKE_COLORS.ACTIONBLUE_LIGHT,\n contrastText: MIKE_COLORS.WHITE,\n },\n error: {\n main: MIKE_COLORS.PINK_DEFAULT,\n dark: MIKE_COLORS.PINK_DARK,\n light: MIKE_COLORS.PINK_LIGHT,\n contrastText: MIKE_COLORS.WHITE,\n },\n darkGrey: {\n main: MIKE_COLORS.DARKGREY_DEFAULT,\n dark: MIKE_COLORS.DARKGREY_DARK,\n light: MIKE_COLORS.DARKGREY_LIGHT,\n contrastText: MIKE_COLORS.BLACK,\n },\n mediumGrey: {\n main: MIKE_COLORS.MEDIUMGREY_DEFAULT,\n dark: MIKE_COLORS.MEDIUMGREY_DARK,\n light: MIKE_COLORS.MEDIUMGREY_LIGHT,\n contrastText: MIKE_COLORS.BLACK,\n },\n lightGrey: {\n main: MIKE_COLORS.XLIGHTGREY,\n contrastText: MIKE_COLORS.BLACK,\n },\n text: {\n primary: MIKE_COLORS.BRANDBLUE_DEFAULT,\n secondary: MIKE_COLORS.DARKGREY_DEFAULT,\n disabled: MIKE_COLORS.MEDIUMGREY_DEFAULT,\n hint: MIKE_COLORS.ACTIONBLUE_DEFAULT,\n },\n background: {\n default: MIKE_COLORS.MEDIUMGREY_LIGHT,\n default_darker: MIKE_COLORS.MEDIUMGREY_LIGHT,\n paper: MIKE_COLORS.WHITE,\n },\n success: {\n main: MIKE_COLORS.GREEN_DEFAULT,\n dark: MIKE_COLORS.GREEN_DARK,\n light: MIKE_COLORS.GREEN_LIGHT,\n contrastText: MIKE_COLORS.WHITE,\n },\n\n devider: {\n default: MIKE_COLORS.MEDIUMGREY_DEFAULT,\n },\n\n // Custom 'intention' objects\n ultimate: {\n main: MIKE_COLORS.GREEN_DEFAULT,\n dark: MIKE_COLORS.GREEN_DARK,\n light: MIKE_COLORS.GREEN_LIGHT,\n contrastText: MIKE_COLORS.WHITE,\n },\n};\n\nexport const mikeFont = ['Roboto', '-apple-system', 'BlinkMacSystemFont', 'Arial', 'sans-serif'].join(',');\n\nconst defaultTheme = createTheme();\n\nconst muiRadioStyles = {\n background: 'transparent',\n height: '20px',\n width: '20px',\n margin: '-4px 0px',\n '& svg:nth-of-type(1)': {\n transform: 'scale(0.9)',\n },\n '& svg:nth-of-type(1) > path': {\n fill: mikePalette.darkGrey.main,\n },\n '&$disabled': {\n '& svg:nth-of-type(1) > path': {\n fill: mikePalette.darkGrey.light,\n },\n },\n /* JSS `:after` won't apply to target unless there is a valid value for content: */\n '&:after': {\n content: 'open-quote',\n color: mikePalette.mediumGrey.light,\n background: mikePalette.mediumGrey.light,\n display: 'block',\n height: '20px',\n width: '20px',\n marginLeft: '-20px',\n borderRadius: '10px',\n },\n};\n\nexport const MikeTheme = createTheme({\n typography: {\n htmlFontSize: 16,\n fontSize: 14,\n fontFamily: mikeFont,\n },\n palette: mikePalette,\n shape: {\n borderRadius: 4, // default mui: 4\n },\n overrides: {\n MuiTypography: {\n root: {\n color: mikePalette.primary.main,\n },\n h1: {\n fontSize: '2rem', // 32px\n lineHeight: 1.25, // 40px - default mui:1\n fontWeight: 'normal',\n },\n h2: {\n fontSize: '1.5rem', // 24px\n lineHeight: 1.33, // 32px - default mui:1\n fontWeight: 'normal',\n },\n h3: {\n fontSize: '1.25rem', // 20px\n lineHeight: 1.2, // 24px - default mui:1.04\n fontWeight: 'bold',\n },\n h4: {\n fontSize: '1rem', // 16px\n lineHeight: 1.25, // 20px - default mui:1.17\n fontWeight: 'bold',\n },\n h5: {\n // not defined in DHI guidelines\n fontSize: '0.875em', // 16px\n lineHeight: 1, // 16px - default mui:1.33\n fontWeight: 'bold',\n },\n h6: {\n // Used by mui for DialogTitles\n fontSize: '1.25rem', // 20 px\n lineHeight: 1.2, // 24px - default mui:1.6\n fontWeight: 'bold',\n },\n subtitle1: {}, // default mui: 1rem / 1.75\n subtitle2: {}, // default mui: 0.875rem / 1.57\n body1: {\n // default mui: 1rem / 1.5.\n fontSize: '1rem', // 16px\n lineHeight: 1.374, // 22px\n },\n body2: {\n // default mui: 0.875rem / 1.43\n fontSize: '0.875rem', // 14px\n lineHeight: 1.286, // 18px\n },\n button: {}, // default mui: 0.875rem / 1.75 / UPPERCASE\n caption: {}, // default mui: 0.75rem / 1.66\n overline: {}, // default mui: 0.75rem / 2.66 / UPPERCASE\n },\n\n MuiAppBar: {\n colorPrimary: {\n backgroundColor: MIKE_COLORS.MEDIUMGREY_LIGHT,\n height: '60px',\n borderBottom: '4px solid #DBE4E9', // MEDIUMGREY\n },\n },\n MuiDialog: {},\n MuiDialogTitle: {},\n MuiDialogContentText: {\n root: {\n color: mikePalette.text.primary,\n },\n },\n MuiButton: {\n root: {\n fontWeight: 500,\n letterSpacing: 0.1,\n textTransform: 'none',\n height: '3rem', // 48px\n '&:disabled': {\n height: '3rem', // 48px\n },\n },\n sizeLarge: {\n minWidth: 328,\n },\n sizeSmall: {\n height: '2.5rem', // 40px\n minWidth: 0,\n padding: '0 1rem', // 16px\n },\n outlined: {\n minWidth: 156,\n border: '2px solid',\n },\n contained: {\n minWidth: 156,\n },\n containedPrimary: {\n '&:disabled': {\n backgroundColor: mikePalette.primary.light,\n color: '#fff',\n },\n },\n containedSecondary: {\n '&:disabled': {\n backgroundColor: mikePalette.secondary.light,\n color: '#fff',\n },\n },\n outlinedPrimary: {\n border: '2px solid',\n '&:hover': {\n border: '2px solid',\n borderColor: mikePalette.primary.dark,\n },\n '&:disabled': {\n border: '2px solid',\n color: mikePalette.primary.light,\n borderColor: mikePalette.primary.light,\n },\n },\n outlinedSecondary: {\n border: '2px solid',\n '&:hover': {\n border: '2px solid',\n borderColor: mikePalette.secondary.dark,\n },\n '&:disabled': {\n border: '2px solid',\n color: mikePalette.secondary.light,\n borderColor: mikePalette.secondary.light,\n },\n },\n textPrimary: {\n '&:disabled': {\n color: mikePalette.primary.light,\n },\n },\n textSecondary: {\n '&:disabled': {\n color: mikePalette.secondary.light,\n },\n },\n },\n MuiBadge: {\n colorPrimary: {\n backgroundColor: mikePalette.error.main,\n },\n },\n MuiBreadcrumbs: {},\n MuiCheckbox: {\n indeterminate: {\n color: MIKE_COLORS.GREEN_DEFAULT,\n },\n colorSecondary: {\n '&$checked': {\n color: MIKE_COLORS.GREEN_DEFAULT,\n },\n },\n },\n MuiRadio: {\n colorPrimary: {\n ...muiRadioStyles,\n color: mikePalette.primary.main,\n '&$checked': {\n '& svg:nth-of-type(2)': {\n transform: 'scale(0.8)',\n fill: mikePalette.primary.main,\n },\n },\n },\n colorSecondary: {\n ...muiRadioStyles,\n color: mikePalette.ultimate.main,\n '&$checked': {\n '& svg:nth-of-type(2)': {\n transform: 'scale(0.8)',\n fill: mikePalette.ultimate.main,\n },\n },\n },\n },\n MuiFormControlLabel: {\n root: {\n '& .MuiTypography-root.Mui-disabled': {\n fontSize: '90%',\n color: mikePalette.darkGrey.main,\n },\n },\n labelPlacementStart: {\n marginLeft: '0px',\n },\n },\n MuiFab: {\n primary: {\n '&:disabled': {\n backgroundColor: mikePalette.primary.light,\n color: '#fff',\n },\n '&:hover': {\n backgroundColor: mikePalette.primary.dark,\n },\n },\n secondary: {\n '&:disabled': {\n backgroundColor: mikePalette.secondary.light,\n color: '#fff',\n },\n '&:hover': {\n backgroundColor: mikePalette.secondary.dark,\n },\n },\n },\n MuiIconButton: {\n root: {\n fontSize: '1rem',\n '&:hover': {\n backgroundColor: MIKE_COLORS.MEDIUMGREY_DEFAULT,\n },\n },\n },\n MuiTab: {\n root: {\n textTransform: 'none',\n [defaultTheme.breakpoints.up('xs')]: {\n fontSize: '0.75rem', // 12 px\n fontWeight: 'normal',\n paddingLeft: '1.5rem', // 24 px\n paddingRight: '1.5rem',\n minWidth: '0',\n },\n '&:hover, &:focus': {\n color: mikePalette.primary.main,\n },\n '&$selected': {\n fontWeight: 'bold', // todo hevo: should we use theme.typography.fontWeight instead?\n },\n },\n selected: {},\n },\n MuiTabs: {\n scrollButtons: {\n [defaultTheme.breakpoints.up('xs')]: {\n minWidth: 0,\n width: 'auto',\n\n '&&& > *:first-child': {\n width: 40,\n },\n },\n },\n },\n MuiTableCell: {\n body: {\n height: '44px',\n color: mikePalette.primary.main,\n padding: '0',\n userSelect: 'none',\n width: '300px',\n },\n head: {\n padding: '0',\n height: '44px',\n fontWeight: 'bold',\n backgroundColor: 'white',\n borderBottom: `2px solid ${mikePalette.devider.default}`,\n userSelect: 'none',\n cursor: 'pointer ',\n },\n },\n MuiTableRow: {\n root: {\n fontFamily: mikeFont,\n '&:hover, &:focus': {\n backgroundColor: mikePalette.lightGrey.main,\n },\n },\n },\n MuiDrawer: {\n root: {\n zIndex: 1000,\n },\n },\n MuiPickersDay: {\n dayDisabled: {\n color: mikePalette.darkGrey.light,\n },\n },\n MuiStepIcon: {\n root: {\n color: '#DBE4E9',\n '&$active': {\n color: '#00A4EC',\n },\n '&$completed': {\n color: '#00A4EC',\n },\n },\n },\n MuiFilledInput: {\n root: {\n backgroundColor: mikePalette.background.default,\n },\n },\n MuiListItem: {\n divider: {\n borderBottom: '1px solid #DBE4E9',\n },\n },\n MuiTooltip: {\n tooltip: {\n color: mikePalette.primary.main,\n backgroundColor: MIKE_COLORS.WHITE,\n boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.16)',\n borderRadius: '4px',\n },\n },\n MuiChip: {\n colorSecondary: {\n color: MIKE_COLORS.BRANDBLUE_DEFAULT,\n backgroundColor: '#FFFFFF',\n },\n deleteIconColorSecondary: {\n color: '#DADADA',\n },\n },\n MuiSwitch: {\n root: {\n width: 46,\n height: 15,\n padding: 0,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n overflow: 'inherit',\n float: 'left',\n },\n switchBase: {\n padding: 0,\n height: '100%',\n color: `${mikePalette.darkGrey.main} !important`,\n transform: 'translateX(5.6px)',\n '&:hover': {\n backgroundColor: 'transparent',\n },\n '&$checked': {\n transform: 'translateX(29px)',\n color: `${mikePalette.success.dark} !important`,\n height: '100%',\n '& + $track': {\n opacity: 1,\n backgroundColor: `${mikePalette.success.light} !important`,\n borderColor: `${mikePalette.success.light} !important`,\n },\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n input: {\n left: '-50%',\n '&:checked': {\n left: '-150%',\n },\n },\n thumb: {\n width: 12.5,\n height: 12.5,\n boxShadow: 'none',\n },\n track: {\n border: `3px solid ${mikePalette.darkGrey.main} !important`,\n borderRadius: 16,\n opacity: 1,\n backgroundColor: mikePalette.lightGrey.main,\n },\n checked: {},\n },\n },\n props: {\n MuiAppBar: {\n position: 'fixed',\n elevation: 0,\n },\n MuiButton: {\n color: 'secondary', // set the default color prop for buttons to secondary.\n },\n MuiCircularProgress: {\n color: 'secondary', // set the default color prop for spinners to secondary.\n },\n MuiFab: {\n color: 'secondary',\n },\n MuiTabs: {\n indicatorColor: 'primary',\n textColor: 'primary',\n },\n MuiTableCell: {\n align: 'left',\n },\n MuiLink: {\n color: 'secondary',\n },\n },\n zIndex: {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1201,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500,\n },\n});\n","import React, { useState, useEffect } from 'react';\nimport MuiAlert from '@material-ui/lab/Alert';\nimport { makeStyles } from '@material-ui/styles';\n\nconst useStyles = makeStyles(() => ({\n message: {\n display: 'flex',\n margin: 5,\n alignItems: 'center',\n },\n}));\n\nconst Alert = ({ id, message, severity, deadline, onClose }) => {\n const [snackOpen, setSnackOpen] = useState(false);\n const classes = useStyles();\n const handleClose = React.useCallback(() => {\n setSnackOpen(false);\n if (onClose) {\n onClose(id);\n }\n }, [id, onClose]);\n useEffect(() => {\n let tId;\n if (message) {\n setSnackOpen(true);\n if (deadline) {\n if (tId !== undefined) {\n clearTimeout(tId);\n }\n tId = setTimeout(() => {\n handleClose();\n }, deadline - new Date());\n }\n } else {\n handleClose();\n }\n return () => {\n if (tId !== undefined) {\n clearTimeout(tId);\n }\n };\n }, [deadline, handleClose, message]);\n const handleSnackClose = React.useCallback(\n (event, reason) => {\n if (reason === 'timeout' || reason === 'clickaway') {\n return;\n }\n handleClose();\n },\n [handleClose],\n );\n return (\n snackOpen && (\n \n {message}\n \n )\n );\n};\n\nexport default Alert;\n","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport Box from '@material-ui/core/Box';\nimport SnackContext from './SnackContext';\nimport Alert from './Alert';\n\nconst useStyles = makeStyles(() => ({\n container: {\n position: 'absolute',\n bottom: 0,\n zIndex: 9999,\n padding: 5,\n },\n}));\n\nconst SnackProvider = ({ children }) => {\n const [messages, setMessages] = React.useState([]);\n const classes = useStyles();\n\n const sendMessage = React.useCallback((payload) => {\n const { message, deadline, severity } = payload || {};\n if (message !== undefined) {\n setTimeout(() => {\n setMessages((state) => [...state, { id: new Date().getTime(), message, severity, deadline }]);\n }, 100);\n }\n }, []);\n\n const sendErrorMessage = React.useCallback(\n (payload) => {\n let message;\n if (typeof payload?.response?.data === 'string') {\n message = payload.response.data;\n } else if (typeof payload?.message === 'string') {\n message = payload.message;\n } else if (typeof payload === 'string') {\n message = payload;\n }\n sendMessage({ message, severity: 'error' });\n },\n [sendMessage],\n );\n\n const sendInfoMessage = React.useCallback(\n (message) => {\n sendMessage({ message, severity: 'info' });\n },\n [sendMessage],\n );\n\n const sendSuccessMessage = React.useCallback(\n (message) => {\n sendMessage({ message, severity: 'success' });\n },\n [sendMessage],\n );\n\n const sendWarningMessage = React.useCallback(\n (message) => {\n sendMessage({ message, severity: 'warning' });\n },\n [sendMessage],\n );\n\n const providerValue = React.useMemo(\n () => ({\n sendErrorMessage,\n sendInfoMessage,\n sendSuccessMessage,\n sendWarningMessage,\n sendMessage,\n }),\n [sendErrorMessage, sendInfoMessage, sendSuccessMessage, sendWarningMessage, sendMessage],\n );\n\n const handleClose = React.useCallback((id) => {\n setMessages((state) => state.filter((r) => r.id !== id));\n }, []);\n\n const handleClickAway = React.useCallback(() => {\n setMessages([]);\n }, []);\n\n return (\n <>\n {children}\n \n \n {messages &&\n messages.map((item) => (\n \n ))}\n \n \n \n );\n};\n\nexport default SnackProvider;\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport ChainedBackend from 'i18next-chained-backend';\nimport resourcesToBackend from 'i18next-resources-to-backend';\nimport Backend from 'i18next-http-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\n\ni18n\n // .use(Backend)\n .use(ChainedBackend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n backend: {\n backends: [\n Backend,\n resourcesToBackend((language, namespace) =>\n import(`../public/locales/${language}/${namespace}.${language}.json`),\n ),\n ],\n backendOptions: [\n {\n loadPath: '/locales/{{lng}}/{{ns}}.{{lng}}.json',\n },\n ],\n },\n fallbackLng: 'en',\n react: {\n useSuspense: true,\n },\n });\n\nexport default i18n;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\nimport DateFnsUtils from '@date-io/date-fns';\nimport { Provider } from 'react-redux';\nimport { SWRConfig } from 'swr';\n\nimport { PersistGate } from 'redux-persist/integration/react';\nimport ConfirmProvider from './components/Dialog/Confirm/ConfirmProvider';\nimport Routes from './routers';\nimport * as serviceWorker from './serviceWorker';\nimport { MikeTheme } from './theme/mike';\nimport { store, persistor } from './store';\nimport SnackProvider from './components/Snack/SnackProvider';\nimport axios from './containers/hooks/useAxios';\n\nimport './i18n';\n\nconst fetcher = (url) =>\n axios.get(url).then((r) => {\n return r.data;\n });\n\nReactDOM.render(\n // \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n // \n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { combineReducers } from 'redux';\nimport { persistReducer } from 'redux-persist';\nimport storage from 'redux-persist/lib/storage';\n\nimport ActionTypes from '../constants/actionTypes';\nimport MapContent, { sliceName as MapContentName } from './MapContent';\nimport TimeseriesChart, { sliceName as TimeseriesChartName } from './TimeseriesChart';\nimport ForecastType, { sliceName as ForecastTypeName } from './ForecastType';\nimport Authorization, { sliceName as AuthorizationName } from './Authorization';\nimport Systems, { sliceName as SystemsName } from './Systems';\nimport WaterToolsPortal, { sliceName as WaterToolsPortalName } from './WaterToolsPortal';\nimport MapItemsStore, { sliceName as MapItemsStoreName } from './MapItemsStore';\nimport Configuration, { sliceName as ConfigurationName } from './Configuration';\nimport Filters, { sliceName as FiltersName } from './Filters';\nimport Profile, { sliceName as ProfileName } from './Profile';\nimport Scenario, { sliceName as ScenarioName } from './Scenario';\nimport MapView, { sliceName as MapViewName } from './MapView';\nimport Animation, { sliceName as AnimationName } from './Animation';\n\nconst persistConfig = {\n key: 'MikeOperations',\n storage,\n blacklist: [AuthorizationName, MapViewName],\n // whitelist: [FiltersName, ConfigurationName],\n};\n\nconst allReducers = combineReducers({\n [MapContentName]: MapContent,\n [TimeseriesChartName]: TimeseriesChart,\n [ForecastTypeName]: ForecastType,\n [AuthorizationName]: Authorization,\n [SystemsName]: Systems,\n [WaterToolsPortalName]: WaterToolsPortal,\n [MapItemsStoreName]: MapItemsStore,\n [ConfigurationName]: Configuration,\n [FiltersName]: Filters,\n [ProfileName]: Profile,\n [ScenarioName]: Scenario,\n [MapViewName]: MapView,\n [AnimationName]: Animation,\n});\n\nconst rootReducer = (state, action) => {\n let savedState = state;\n if (action.type === ActionTypes.RESET_APP) {\n const { [AuthorizationName]: a, [SystemsName]: s, [WaterToolsPortalName]: w, [FiltersName]: f } = state;\n savedState = { [AuthorizationName]: a, [SystemsName]: s, [WaterToolsPortalName]: w, [FiltersName]: f };\n }\n return allReducers(savedState, action);\n};\nexport type RootState = ReturnType;\nconst reducer = persistReducer(persistConfig, rootReducer);\nexport default reducer;\n","import { createStore, applyMiddleware } from 'redux';\nimport ReduxThunk from 'redux-thunk';\nimport rootReducer from '../reducers';\n\nconst middlewares = [ReduxThunk];\nconst enhancer = [applyMiddleware(...middlewares)];\n\nexport default function configureStore(initialState = {}) {\n return createStore(rootReducer, initialState, ...enhancer);\n}\n","import { createSlice } from '@reduxjs/toolkit';\nimport { createSelector } from 'reselect';\nimport axios from '../containers/hooks/useAxios';\n\nconst tokenKey = 'AccessToken';\nexport const sliceName = 'Authorization';\n\nconst initialState = { name: undefined, userGroups: [], expireTime: undefined };\n\nconst getStateFromStorge = () => {\n let defaultState = JSON.parse(localStorage.getItem(tokenKey));\n if (defaultState && defaultState.accessToken && new Date(defaultState.expireTime) > new Date()) {\n axios.defaults.headers.common.Authorization = `Bearer ${defaultState.accessToken}`;\n } else {\n defaultState = initialState;\n }\n return defaultState;\n};\n\nconst slice = createSlice({\n name: sliceName,\n initialState: getStateFromStorge(),\n reducers: {\n dispatchLogin: (state, { payload }) => {\n const { name, userGroups, accessToken } = payload;\n const curDate = new Date();\n let expireTime;\n if (process.env.NODE_ENV === 'production') {\n expireTime = new Date(curDate.setDate(curDate.getDate() + 1));\n } else {\n expireTime = new Date(curDate.setDate(curDate.getDate() + 30));\n }\n const access = {\n name,\n userGroups,\n accessToken,\n expireTime,\n };\n localStorage.setItem(tokenKey, JSON.stringify(access)); // share\n axios.defaults.headers.common.Authorization = `Bearer ${access.accessToken}`;\n state.name = access.name;\n state.userGroups = access.userGroups;\n state.expireTime = access.expireTime;\n },\n dispatchLogout: () => {\n localStorage.setItem(tokenKey, JSON.stringify({}));\n axios.defaults.headers.common.Authorization = undefined;\n return initialState;\n },\n },\n});\n\nexport default slice.reducer;\nexport const { dispatchLogin, dispatchLogout } = slice.actions;\nexport const selectName = createSelector(\n (state) => state[sliceName],\n (state) => {\n if (new Date(state.expireTime) > new Date()) {\n return state.name;\n }\n return undefined;\n },\n);\nexport const selectUserId = createSelector(\n (state) => state[sliceName],\n (state) => {\n if (new Date(state.expireTime) > new Date()) {\n return state.accessToken;\n }\n return undefined;\n },\n);\nexport const selectUserGroups = createSelector(\n (state) => state[sliceName],\n (state) => {\n if (new Date(state.expireTime) > new Date()) {\n return state.userGroups;\n }\n return undefined;\n },\n);\nexport const selectIsAdmin = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups && (userGroups.indexOf('Website Admin') !== -1 || userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsAllScenarios = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('AllScenarios') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsLastScenario = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('LastScenario') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsScenario = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Scenario') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsDashboard = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Dashboard') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsDashboardEdit = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('DashboardEdit') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsScenarioEdit = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('ScenarioEdit') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsConfiguration = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Configuration') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsStatusboard = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('StatusBoard') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsStatusboardJobStatus = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('JobStatus') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsStatusboardTables = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Tables') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsStatusboardFeeds = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Feeds') !== -1 ||\n userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Administrator') !== -1),\n);\nexport const selectIsAdminOrUser = createSelector(\n selectUserGroups,\n (userGroups) =>\n userGroups &&\n (userGroups.indexOf('Website Admin') !== -1 ||\n userGroups.indexOf('Users') !== -1 ||\n userGroups.indexOf('Editors') !== -1),\n);\n","import { createAsyncThunk } from '@reduxjs/toolkit';\nimport { createSelector } from 'reselect';\nimport { selectForecastType, selectSystem } from './ForecastType';\n\nexport const createAsyncThunkHelper = (typePrefix, payloadCreator) => {\n return createAsyncThunk(typePrefix, async (payload, thunkApi) => {\n const { getState } = thunkApi;\n const state = getState();\n const { scenarioId } = selectForecastType(state) || {};\n const { systemId } = selectSystem(state) || {};\n let rt;\n if (payloadCreator !== undefined) {\n rt = await payloadCreator({ systemId, scenarioId, value: payload }, thunkApi);\n } else {\n rt = { systemId, scenarioId, value: payload };\n }\n return rt;\n });\n};\n\nexport const createSelectorHelper = (sliceName, combiner) => {\n const s = createSelector(\n (state) => state[sliceName],\n selectSystem,\n selectForecastType,\n (state, { systemId } = {}, { scenarioId } = {}) => {\n if (state[systemId]) {\n return state[systemId][scenarioId];\n }\n return undefined;\n },\n );\n return createSelector(s, combiner);\n};\n\nexport const createAsyncReducerHelper = (func) => (state, action) => {\n const { payload } = action;\n const { systemId, scenarioId, value } = payload;\n if (state[systemId] === undefined) {\n state[systemId] = {};\n }\n if (state[systemId][scenarioId] === undefined) {\n state[systemId][scenarioId] = {};\n }\n return func(state[systemId][scenarioId], { ...action, payload: value });\n};\n"],"sourceRoot":""}