{"version":3,"sources":["p9libs/utils/misc.js","assets/icons/logo.js","uimisc.js","settings.js","polyfill.js","components/auth.js","App.js","components/portal/store_aux.js","serviceWorker.js","assets/icons/sygnet.js","assets/icons/index.js","assets/icons/logo-negative.js","index.js","components/base/srvcomm.js","store.js","components/base/auth.js"],"names":["getNested","obj","path","defaultValue","i","length","undefined","error","setNested","value","overWriteSubtrees","key","objectsEqual","obj1","obj2","excludePaths","b","obj1Paths","getObjPaths","filter","some","excludePath","isSubpath","obj2Paths","a","Array","isArray","every","val","index","arraysEqual","map","x","join","sort","subpath","d","paths","objects","dictPaths","leavesOnly","arguments","push","Object","keys","forEach","newPath","concat","logo","logoLoginPage","redirect","url","window","location","pathname","href","AJAX_HOST","console","log","CustomEvent","event","params","bubbles","cancelable","detail","evt","document","createEvent","initCustomEvent","prototype","Event","Element","matches","msMatchesSelector","webkitMatchesSelector","closest","s","el","this","call","parentElement","parentNode","nodeType","LoginRequiredRoute","_React$Component","_inherits","_super","_createSuper","_classCallCheck","apply","_createClass","Auth","isAuthenticated","_jsx","Route","props","render","Redirect","to","React","Component","loading","className","children","TheLayout","lazy","Login","Register","Page404","Page500","PasswordRecovery","App","_Component","_this","_onLogin","_loadConfiguration","_onChangePortalService","newService","urlPortalService","_getPortalServiceFromUrl","state","setState","_this2","_Fragment","BrowserRouter","Suspense","fallback","_jsxs","Switch","exact","name","_objectSpread","onLogin","makeLogoutRequest","logout","renderMainContent","renderLoading","renderLoaded","portalService","portalServices","onChangePortalService","_this3","SrvComm","sendCommand","respData","requestId","portalServiceCode","stateUpdate","probablePortalService","store","dispatch","type","ACTION_TYPE_CHANGE_PORTAL_SERVICE","portalFeatures","ACTION_TYPE_UPDATE_PORTAL_FEATURES","portalServicesInfo","item","code","urlParts","split","includes","Boolean","hostname","match","icons","assign","sygnet","logoNegative","cilApplicationsSettings","cilSpeedometer","cilSun","cilMoon","cilChartPie","cilTransfer","cilDataTransferUp","cilDataTransferDown","cilChartLine","cilFile","cilCloud","cilBrowser","cilUser","cilLockLocked","cilUserPlus","cilBank","cilInstitution","cilSpreadsheet","cilLoopCircular","cilLayers","cilDollar","cilEuro","cilCash","cilListNumbered","cilBellExclamation","cilWarning","cilList","cilCode","cilGroup","cilScrubber","cilLibrary","cilLifeRing","cilListFilter","cilInfo","cilSettings","cilCalculator","cilBell","AJAX_URL","FORM_DATA_URL","ReactDOM","Provider","getElementById","navigator","serviceWorker","ready","then","registration","unregister","ERROR_NO_PERMISSION","command","formData","onSuccess","onFail","fetchUrl","fetch","response","json","data","catch","refreshPageOnLoginError","Date","now","req","httpRequest","ajaxRequestDefault","respResult","reqData","onComplete","ajaxRequest","reqUrl","debug","toLocaleTimeString","XMLHttpRequest","onreadystatechange","readyState","DONE","status","JSON","parse","responseText","errCode","startsWith","e","open","send","stringify","ACTION_TYPE_UPDATE_SELECTED_ENTITY","ACTION_TYPE_REFRESH_ISSUES","initialState","sidebarShow","asideShow","darkMode","selectedEntity","selectedEntitySeqId","createStore","_ref","rest","_objectWithoutProperties","_excluded","newState","mode","entity","entityCode","userInfo","localStorage","setItem","removeItem","getItem","getUserInfo","setUserInfo","loginData","onResponse","errors","errs","res","onFinish","getPrototypeOf"],"mappings":"yLAAO,SAASA,EAAUC,EAAKC,EAAMC,GACnC,IACE,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAKG,OAAQD,IAAK,CAGpC,QAAYE,KADZL,EAAMA,EADMC,EAAKE,KAEM,OAAOD,CAChC,CACA,YAAYG,IAARL,EAA0BE,EACvBF,CACT,CAAE,MAAOM,GACP,OAAOJ,CACT,CACF,CAGO,SAASK,EAAUP,EAAKC,EAAMO,EAAOC,QAChBJ,IAAtBI,IAAiCA,GAAoB,GAEzD,IAAK,IAAIN,EAAI,EAAGA,EAAIF,EAAKG,OAAQD,IAAK,CACpC,IAAMO,EAAMT,EAAKE,GAEjB,GAAIA,GAAKF,EAAKG,OAAS,EAErB,OADAJ,EAAIU,GAAOF,GACJ,EAGT,QAAiBH,IAAbL,EAA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,GAAU1Q,QAAgBsC,OAAOiP,eAAeb,KAAcpO,OAAO0B,UAKnG,KAACsB,CAAA,CAlIc,E","file":"static/js/main.21897bd1.chunk.js","sourcesContent":["export function getNested(obj, path, defaultValue) {\n try {\n for (let i = 0; i < path.length; i++) {\n const key = path[i];\n obj = obj[key];\n if (obj === undefined) return defaultValue;\n }\n if (obj === undefined) return defaultValue;\n return obj;\n } catch (error) {\n return defaultValue;\n }\n}\n\n\nexport function setNested(obj, path, value, overWriteSubtrees) {\n if (overWriteSubtrees === undefined) overWriteSubtrees = true;\n\n for (let i = 0; i < path.length; i++) {\n const key = path[i];\n\n if (i == path.length - 1) {\n obj[key] = value;\n return true;\n }\n\n if (obj[key] === undefined) {\n obj[key] = {};\n obj = obj[key];\n continue;\n }\n\n if ((typeof(obj[key]) == 'object') && (obj[key] !== null)) {\n obj = obj[key];\n continue;\n }\n\n if (overWriteSubtrees) {\n obj[key] = {};\n obj = obj[key];\n continue;\n }\n\n return false;\n }\n}\n\n\nexport function capitalize(s) {\n if (typeof(s) !== 'string') return s;\n if (s.length === 0) return '';\n return s[0].toUpperCase() + s.slice(1);\n}\n\n\nexport function makeRange(start, end) {\n const arrayLength = end - start + 1;\n if (arrayLength <= 0) {\n return [];\n }\n return (new Array(arrayLength)).fill(undefined).map((_, i) => i + start);\n}\n\n\nexport function objectsEqual(obj1, obj2, excludePaths) {\n if (!excludePaths) excludePaths = [];\n const obj1Paths = getObjPaths(obj1)[0].filter(path => {\n return !excludePaths.some(excludePath => {\n return isSubpath(path, excludePath);\n });\n });\n const obj2Paths = getObjPaths(obj2)[0].filter(path => {\n return !excludePaths.some(excludePath => {\n return isSubpath(path, excludePath);\n });\n });\n\n const pathsEqual = (a, b) => {\n const aStr = a.map(x => x.join('|')).sort();\n const bStr = b.map(x => x.join('|')).sort();\n return arraysEqual(aStr, bStr);\n };\n\n if (!pathsEqual(obj1Paths, obj2Paths)) {\n return false;\n }\n\n return obj1Paths.every(path => {\n return getNested(obj1, path, null) === getNested(obj2, path, null);\n });\n}\n\n\nexport function isSubpath(subpath, path) {\n for (let i = 0; i < path.length; i++) {\n if (subpath[i] !== path[i]) return false;\n }\n return true;\n}\n\n\nexport function arraysEqual(a, b) {\n return Array.isArray(a) && Array.isArray(b) &&\n a.length === b.length &&\n a.every((val, index) => val === b[index]);\n}\n\n\nexport function getObjPaths(d, leavesOnly=true) {\n const paths = [];\n const objects = [];\n\n function dictPaths(d, leavesOnly=true, path=[]) {\n const obj = getNested(d, path, null);\n\n if (leavesOnly) {\n if ((typeof(obj) !== 'object') || (obj === null)) {\n paths.push(path);\n objects.push(obj);\n return;\n }\n } else {\n if (path.length > 0) {\n paths.push(path);\n objects.push(obj);\n }\n if (typeof(obj) !== 'object') return;\n }\n\n Object.keys(obj).forEach(key => {\n const newPath = path.concat([key]);\n dictPaths(d, leavesOnly, newPath);\n });\n }\n\n dictPaths(d, leavesOnly, []);\n\n return [paths, objects];\n}\n\nexport function uniqueArray(arrArg) {\n return arrArg.filter(function(elem, pos,arr) {\n return arr.indexOf(elem) == pos;\n });\n}\n","// export const logo = ['690 134', `\n// coreui react pro\n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// `]\n\nexport const logo = ['690 334', `\n Poin Nine Portal\n \n\n\n\n\n\t\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\n\n\n`]\n\nexport const logoLoginPage = ['690 334', `\n Poin Nine Portal\n \n \n\t \n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\n\t \n \n \n\n`]","import { createHashHistory, createBrowserHistory } from 'history';\n\n\nexport function redirect(url) {\n // const history = createBrowserHistory();\n // history.push(url);\n // history.replace(url);\n // // window.location.redirect(url);\n\n if (url === window.location.pathname) return;\n window.location.href = url;\n}\n","export const AJAX_HOST = '';\n// export const AJAX_HOST = 'http://localhost:4100';\n\nconsole.log = () => {};\n","/*\n* required polyfills\n*/\n\n/** IE9, IE10 and IE11 requires all of the following polyfills. **/\n// import \"core-js\";\n// import 'core-js/features/symbol'\n// import 'core-js/features/object'\n// import 'core-js/features/function'\n// import 'core-js/features/parse-int'\n// import 'core-js/features/parse-float'\n// import 'core-js/features/number'\n// import 'core-js/features/math'\n// import 'core-js/features/string'\n// import 'core-js/features/date'\n// import 'core-js/features/array'\n// import 'core-js/features/regexp'\n// import 'core-js/features/map'\n// import 'core-js/features/weak-map'\n// import 'core-js/features/set'\n// import 'core-js/features/set/map';\n\n/** IE10 and IE11 requires the following for the Reflect API. */\n// import 'core-js/features/reflect';\n\n/** Evergreen browsers require these. **/\n// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.\n// import 'core-js/features/reflect'\n\n// CustomEvent() constructor functionality in IE9, IE10, IE11\n(function () {\n\n if ( typeof window.CustomEvent === \"function\" ) return false\n\n function CustomEvent ( event, params ) {\n params = params || { bubbles: false, cancelable: false, detail: undefined }\n var evt = document.createEvent( 'CustomEvent' )\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail )\n return evt\n }\n\n CustomEvent.prototype = window.Event.prototype\n\n window.CustomEvent = CustomEvent\n})()\n\nif (!Element.prototype.matches) {\n Element.prototype.matches =\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n}\n\nif (!Element.prototype.closest) {\n Element.prototype.closest = function(s) {\n var el = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n}\n","import React from 'react';\nimport { Route } from 'react-router-dom';\nimport { Redirect } from 'react-router';\nimport { Auth } from 'src/components/base/auth';\n\n\n/**\n * Props:\n * render: function(props).\n */\nexport class LoginRequiredRoute extends React.Component {\n render() {\n if (!Auth.isAuthenticated()) {\n return (\n \n );\n }\n\n return (\n \n );\n }\n}\n","import React, {Component} from 'react';\nimport {BrowserRouter, HashRouter, Redirect, Route, Switch} from 'react-router-dom';\nimport {LoginRequiredRoute} from './components/auth';\nimport {Auth} from './components/base/auth';\nimport 'react-table-6/react-table.css';\nimport 'react-toastify/dist/ReactToastify.css';\nimport './scss/style.scss';\nimport './views/views.scss';\nimport { SrvComm } from './components/base/srvcomm';\nimport { getNested } from './p9libs/utils/misc';\nimport { redirect } from './uimisc';\nimport {setPortalService} from \"./components/portal/store_aux\";\nimport store, {ACTION_TYPE_REFRESH_ISSUES, ACTION_TYPE_UPDATE_PORTAL_FEATURES} from \"./store\";\n\n\nconst loading = (\n
\n
\n
\n)\n\n// Containers\nconst TheLayout = React.lazy(() => import('./containers/TheLayout'));\n\n// Pages\nconst Login = React.lazy(() => import('./views/pages/login/Login'));\nconst Register = React.lazy(() => import('./views/pages/register/Register'));\nconst Page404 = React.lazy(() => import('./views/pages/page404/Page404'));\nconst Page500 = React.lazy(() => import('./views/pages/page500/Page500'));\nconst PasswordRecovery = React.lazy(() => import('./views/pages/login/password_recovery'));\n\n\nclass App extends Component {\n constructor(props) {\n super(props);\n this.state = {\n 'portal_service': '',\n 'portal_services': null,\n };\n }\n\n componentDidMount() {\n this._loadConfiguration();\n }\n\n render() {\n return (\n <>\n \n \n \n }/>\n }/>\n }/>\n }/>\n }/>\n {\n Auth.makeLogoutRequest(null, null, () => {\n Auth.logout();\n redirect('/');\n });\n return null;\n // return ();\n }}/>\n {/* } /> */}\n this.renderMainContent(props)}/>\n \n \n \n \n );\n }\n\n renderMainContent(props) {\n if (this.state['portal_services'] === null) {\n return this.renderLoading();\n }\n return this.renderLoaded(props);\n }\n\n renderLoading() {\n return Loading...;\n }\n\n renderLoaded(props) {\n return (\n \n );\n // return (\n // \n // } />\n // );\n }\n\n _onLogin = () => {\n this._loadConfiguration();\n }\n\n // _onLogout = () => {\n // this._clearConfiguration();\n // }\n\n _onChangePortalService = (newService) => {\n const urlPortalService = this._getPortalServiceFromUrl(this.state['portal_services']);\n if ((urlPortalService !== '') && (urlPortalService !== newService)) {\n if (newService === 'deriv') newService = 'derivatives';\n\n // redirect('/');\n // history.push('/')\n window.location.href = `/${newService}`;\n return;\n }\n\n this.setState({\n 'portal_service': newService,\n });\n }\n\n _clearConfiguration() {\n this.setState({\n 'portal_service': '',\n 'portal_services': null,\n });\n }\n\n _loadConfiguration() {\n SrvComm.sendCommand('portal/get_configuration', {}, (respData, requestId) => {\n const portalServices = getNested(respData, ['portal_services'], []);\n\n const stateUpdate = {\n 'portal_services': portalServices,\n };\n const currentPortalService = this.state['portal_service'];\n if (currentPortalService == '') {\n const probablePortalService = this._getPortalServiceFromUrl(portalServices);\n stateUpdate['portal_service'] = probablePortalService;\n setPortalService(probablePortalService);\n }\n\n const portalFeatures = getNested(respData, ['features'], {});\n store.dispatch({'type': ACTION_TYPE_UPDATE_PORTAL_FEATURES, portalFeatures: portalFeatures});\n\n this.setState(stateUpdate);\n }, respData => {\n console.log('Error');\n console.log(respData);\n }, true);\n }\n\n _getPortalServiceFromUrl(portalServicesInfo) {\n const portalServices = portalServicesInfo.map(item => item.code);\n const urlParts = window.location.pathname.split('/').filter(item => item != '');\n if (urlParts.length == 0) return '';\n\n let probablePortalService = urlParts[0];\n if (probablePortalService === 'derivatives') {\n probablePortalService = 'deriv';\n }\n\n if (portalServices.includes(probablePortalService)) {\n return probablePortalService;\n }\n\n return '';\n }\n}\n\nexport default App;\n","import store, {ACTION_TYPE_CHANGE_PORTAL_SERVICE} from \"../../store\";\n\nexport function setPortalService(portalServiceCode) {\n store.dispatch({type: ACTION_TYPE_CHANGE_PORTAL_SERVICE, portalService: portalServiceCode});\n}\n","// In production, we register a service worker to serve assets from local cache.\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 the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\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.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\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);\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://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.');\n\n // Execute callback\n if (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.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 .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\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(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","// export const sygnet = ['160 160', `\n// coreui logo\n// \n// \n// \n// \n// \n// \n// `]\n\nexport const sygnet = ['160 160', `\n Point Nine Icon Logo\n \n \n\t \n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\n\t \n \n`]\n\n","import { sygnet } from './sygnet'\nimport { logo } from './logo'\nimport { logoLoginPage } from './logo'\nimport { logoNegative } from './logo-negative'\n\nimport {\n cilApplicationsSettings,\n cilSpeedometer,\n cilSun,\n cilMoon,\n cilChartPie,\n cilTransfer,\n cilDataTransferUp,\n cilDataTransferDown,\n cilChartLine,\n cilFile,\n cilCloud,\n cilBrowser,\n cilUser,\n cilLockLocked,\n cilUserPlus,\n cilBank,\n cilInstitution,\n cilSpreadsheet,\n cilLoopCircular,\n cilLayers,\n cilDollar,\n cilEuro,\n cilCash,\n cilListNumbered,\n cilBellExclamation,\n cilWarning,\n cilList,\n cilCode,\n cilGroup,\n cilScrubber,\n cilLibrary,\n cilLifeRing,\n cilListFilter,\n cilInfo,\n cilSettings,\n cilCalculator,\n cilBell,\n} from '@coreui/icons'\n\nexport const icons = Object.assign({}, {\n sygnet,\n logo,\n logoNegative,\n logoLoginPage,\n}, {\n cilApplicationsSettings,\n cilSpeedometer,\n cilSun,\n cilMoon,\n cilChartPie,\n cilTransfer,\n cilDataTransferUp,\n cilDataTransferDown,\n cilChartLine,\n cilFile,\n cilCloud,\n cilBrowser,\n cilUser,\n cilLockLocked,\n cilUserPlus,\n cilBank,\n cilInstitution,\n cilSpreadsheet,\n cilLoopCircular,\n cilLayers,\n cilDollar,\n cilEuro,\n cilCash,\n cilListNumbered,\n cilBellExclamation,\n cilWarning,\n cilList,\n cilCode,\n cilGroup,\n cilScrubber,\n cilLibrary,\n cilLifeRing,\n cilListFilter,\n cilInfo,\n cilSettings,\n cilCalculator,\n cilBell,\n})\n","// export const logoNegative = ['690 134', `\n// coreui react pro logo\n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// \n// `]\n\nexport const logoNegative = ['690 334', `\n Poin Nine Portal\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`]\n","import 'react-app-polyfill/ie11'; // For IE 11 support\nimport 'react-app-polyfill/stable';\nimport 'core-js';\nimport './polyfill'\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux'\nimport App from 'src/App';\nimport * as serviceWorker from 'src/serviceWorker';\n\nimport store from 'src/store'\n\nimport { icons } from 'src/assets/icons'\nimport { SrvComm } from 'src/components/base/srvcomm';\nimport {AJAX_HOST} from \"src/settings\";\n\n// SrvComm.AJAX_URL = '/api';\n// SrvComm.AJAX_URL = 'http://localhost:4100/api';\nSrvComm.AJAX_URL = AJAX_HOST + '/ui_api';\nSrvComm.FORM_DATA_URL = AJAX_HOST + '/form_api';\n\nReact.icons = icons\n\nReactDOM.render(\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: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { redirect } from \"src/uimisc\";\nimport { getNested } from \"../../p9libs/utils/misc\";\nimport { Auth } from \"./auth\";\n\n\nexport const ERROR_NOT_LOGGED_IN = 13;\nexport const ERROR_NO_PERMISSION = 14;\n\n\n\nexport class SrvComm {\n\n static AJAX_URL = '/ui_api';\n static FORM_DATA_URL = '/form_api';\n\n static sendFormData(command, formData, onSuccess, onFail) {\n const fetchUrl = `${this.FORM_DATA_URL}/${command}`;\n fetch(fetchUrl, {\n 'method': 'POST',\n 'body': formData,\n }).then((response) => response.json()).then((respData) => {\n const result = getNested(respData, ['result'], '');\n if (result === 'OK') {\n const data = getNested(respData, ['data'], {});\n onSuccess(data);\n } else {\n const error = getNested(respData, ['error'], {});\n onFail(error);\n }\n }).catch((error) => {\n onFail();\n });\n }\n\n /**\n * Sends a command to the server.\n * @param {string} command\n * @param {object} params\n * @param {function(respData, requestId)} onSuccess\n * @param {function(respData, requestId)} onFail\n * @param {boolean} refreshPageOnLoginError\n */\n static sendCommand(command, params, onSuccess, onFail, refreshPageOnLoginError) {\n if (refreshPageOnLoginError === undefined) refreshPageOnLoginError = true;\n\n // const requestId = `${group}_${command}_${Date.now()}`;\n const requestId = Date.now();\n const req = {\n 'command': command,\n 'request_id': requestId,\n 'params': params,\n };\n const httpRequest = this.ajaxRequestDefault(req, respData => {\n const respResult = getNested(respData, ['result'], '');\n if (respResult === 'OK') {\n if (onSuccess !== undefined) {\n const data = getNested(respData, ['data'], {});\n onSuccess(data, requestId);\n }\n } else if (respResult === 'ERROR') {\n if (onFail !== undefined) {\n onFail(respData, requestId);\n }\n }\n }, respData => {\n console.error('sendCommand() failed.');\n if (onFail !== undefined) {\n onFail(respData);\n }\n }, undefined, refreshPageOnLoginError);\n return [requestId, httpRequest];\n }\n\n\n static ajaxRequestDefault(reqData, onSuccess, onFail, onComplete, refreshPageOnLoginError) {\n // const jwt = Auth.getJwt();\n const req = {\n 'request': reqData,\n // 'jwt': jwt,\n };\n // if (jwt !== null) {\n // req['jwt'] = jwt;\n // }\n // P9W\n return this.ajaxRequest(this.AJAX_URL, req, onSuccess, onFail, onComplete, refreshPageOnLoginError);\n }\n\n\n /**\n *\n * @param {*} reqUrl string. Request URL.\n * @param {*} reqData dict. Request data.\n * @param {*} onSuccess function(respData).\n * @param {*} onFail function()\n * @param {*} onComplete function().\n * @param {*} refreshPageOnLoginError boolean.\n */\n static ajaxRequest(reqUrl, reqData, onSuccess, onFail, onComplete, refreshPageOnLoginError) {\n console.debug(`Loading start (${(new Date()).toLocaleTimeString()}).`);\n\n const httpRequest = new XMLHttpRequest();\n httpRequest.onreadystatechange = () => {\n // XMLHttpRequest.UNSENT = 0\n // XMLHttpRequest.OPENED = 1\n // XMLHttpRequest.HEADERS_RECEIVED = 2\n // XMLHttpRequest.LOADING = 3\n // XMLHttpRequest.DONE = 4\n\n if (httpRequest.readyState === XMLHttpRequest.DONE) {\n console.debug(`Loaded (${(new Date()).toLocaleTimeString()}).`);\n\n try {\n if (httpRequest.status === 200) {\n if (onSuccess) {\n const respData = JSON.parse(httpRequest.responseText);\n\n // Check for JWT error\n const result = getNested(respData, ['result'], '');\n if (result === 'ERROR') {\n const errCode = getNested(respData, ['error', 'code'], 0);\n\n if (onFail) {\n onFail(respData);\n }\n\n if (errCode === ERROR_NOT_LOGGED_IN) {\n console.error('Not logged in.');\n console.log(reqUrl);\n Auth.logout();\n if (refreshPageOnLoginError) {\n if (!window.location.pathname.startsWith('/password_recovery/')) {\n redirect('/login');\n }\n }\n return;\n }\n }\n\n onSuccess(respData);\n }\n } else {\n console.error('There was a problem with the AJAX request.');\n if (onFail) {\n onFail();\n }\n }\n\n if (onComplete) {\n onComplete();\n }\n } catch (e) {\n console.error('AJAX request failed.');\n console.error(e);\n if (onFail) {\n onFail();\n }\n }\n } else {\n // console.log(`[${httpRequest.responseText}]`);\n console.debug(`Loading (${(new Date()).toLocaleTimeString()}) ...`);\n }\n };\n httpRequest.open('POST', reqUrl);\n httpRequest.send(JSON.stringify(reqData));\n return httpRequest;\n }\n}\n","import { createStore } from 'redux'\nimport {getNested, setNested} from \"./p9libs/utils/misc\";\n\nexport const ACTION_TYPE_CHANGE_PORTAL_SERVICE = 'portal_service/select';\nexport const ACTION_TYPE_UPDATE_SELECTED_ENTITY = 'selected_entity/update_entity';\nexport const ACTION_TYPE_UPDATE_SELECTED_ENTITY_CODE = 'selected_entity/update_entity_code';\n\nexport const ACTION_TYPE_REFRESH_ISSUES = 'issues/refresh';\nexport const ACTION_TYPE_UPDATE_PORTAL_FEATURES = 'portal/update_features';\n\nconst initialState = {\n sidebarShow: 'responsive',\n asideShow: false,\n darkMode: false,\n 'issues_request_id': 1,\n portalService: '',\n selectedEntity: {},\n selectedEntitySeqId: 1,\n portalFeatures: {},\n}\n\nconst changeState = (state = initialState, { type, ...rest }) => {\n let newState = {};\n\n switch (type) {\n case 'set':\n return {...state, ...rest }\n case ACTION_TYPE_UPDATE_PORTAL_FEATURES:\n newState = Object.assign({}, state);\n return {\n ...newState,\n ...rest,\n };\n case ACTION_TYPE_REFRESH_ISSUES:\n newState = Object.assign({}, state);\n\n return {\n ...newState,\n ...rest,\n 'issues_request_id': state['issues_request_id'] + 1,\n };\n case ACTION_TYPE_CHANGE_PORTAL_SERVICE:\n newState = Object.assign({}, state);\n return {\n ...newState,\n ...rest,\n };\n case ACTION_TYPE_UPDATE_SELECTED_ENTITY:\n return (() => {\n const newState = Object.assign({}, state);\n const mode = getNested(rest, ['mode'], '');\n const entity = getNested(rest, ['entity'], {});\n const entityCode = getNested(rest, ['entityCode'], null);\n newState.selectedEntitySeqId += 1;\n setNested(newState, ['selectedEntity', mode, 'entity'], entity);\n setNested(newState, ['selectedEntity', mode, 'entityCode'], entityCode);\n\n return {\n ...newState,\n ...rest,\n };\n })();\n case ACTION_TYPE_UPDATE_SELECTED_ENTITY_CODE:\n return (() => {\n const newState = Object.assign({}, state);\n const mode = getNested(rest, ['mode'], '');\n const entityCode = getNested(rest, ['entityCode'], {});\n newState.selectedEntitySeqId += 1;\n setNested(newState, ['selectedEntity', mode, 'entityCode'], entityCode);\n\n return {\n ...newState,\n };\n })();\n default:\n return state\n }\n}\n\nconst store = createStore(changeState);\nexport default store;\n","import {getNested, setNested} from 'src/p9libs/utils/misc';\nimport {SrvComm} from 'src/components/base/srvcomm';\n\n\nexport const ERROR_LOGIN_FAILED = 10001;\n\n\n/**\n * Handles authentication.\n */\nexport class Auth {\n /**\n * @param {*} userInfo\n * schemas/auth.json#/definitions/user_info\n * @returns\n */\n static setUserInfo(userInfo) {\n if (userInfo === null) {\n localStorage.removeItem('user_info');\n return;\n }\n localStorage.setItem('user_info', JSON.stringify(userInfo));\n }\n\n static getUserInfo(userInfo) {\n return JSON.parse(localStorage.getItem('user_info'));\n }\n\n static getUserInfoPath(path, defaultValue = null) {\n const userInfo = Auth.getUserInfo();\n return getNested(userInfo, path, defaultValue);\n }\n\n static setUserInfoPath(path, value) {\n const userInfo = Auth.getUserInfo();\n setNested(userInfo, path, value);\n Auth.setUserInfo(userInfo);\n }\n\n static getUsername() {\n // return localStorage.getItem('user_info_username');\n return getNested(this.getUserInfo(), ['username'], '');\n }\n\n static getRoles() {\n return getNested(this.getUserInfo(), ['roles'], []);\n // const roles = JSON.parse(localStorage.getItem('user_info_roles'));\n // if (!roles) return [];\n // return roles;\n }\n\n // static setJwt(jwt) {\n // // localStorage.setItem('auth_jwt', jwt);\n // if (jwt == null) {\n // // Removing the cookie.\n // document.cookie = 'jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';\n // return;\n // }\n // document.cookie = `jwt=${jwt}; SameSite=Lax`;\n // }\n\n // static getJwt() {\n // const res = document.cookie.replace(/(?:(?:^|.*;\\s*)jwt\\s*\\=\\s*([^;]*).*$)|^.*$/, \"$1\");\n // return !res ? null : res;\n // // const jwt = localStorage.getItem('auth_jwt');\n // // if (jwt == 'null') return null;\n // // return jwt;\n // }\n\n /**\n * @param {schema/auth.json#/definitions/login_request} loginData\n * @param {function(data)} onSuccess\n * @param {function()} onFail\n * @param {function({schema/auth.json#/definitions/login_result})} onResponse\n */\n static login(loginData, onSuccess, onFail, onResponse) {\n SrvComm.sendCommand('auth/login', loginData, respData => {\n // {schema/auth.json#/definitions/login_result}\n const result = getNested(respData, ['result'], '');\n if (result === 'OK') {\n const data = getNested(respData, ['data'], {});\n const nextAction = getNested(data, ['next_action'], '');\n if (!nextAction) {\n this.setUserInfo(getNested(data, ['user_info'], {}));\n // this.setUsername(getNested(data, ['user_info', 'username'], ''));\n // this.setRoles(getNested(data, ['user_info', 'roles'], []));\n\n const jwt = getNested(data, ['jwt'], null);\n // this.setJwt(jwt);\n // this._updateRoutes();\n // document.cookie = `jwt=${jwt}`;\n\n // this.getEntities()\n }\n\n if (onSuccess) onSuccess(data);\n if (onResponse) onResponse(respData);\n } else {\n const errors = getNested(respData, ['errors'], []);\n if (onFail) onFail(errors);\n if (onResponse) onResponse(respData);\n }\n }, () => {\n const errs = [\n {\n 'code': ERROR_LOGIN_FAILED,\n 'message': 'Login failed.',\n }\n ];\n const res = {\n 'result': 'errors',\n 'errors': errs,\n };\n if (onFail) onFail(errs);\n if (onResponse) onResponse(res);\n });\n }\n\n static makeLogoutRequest(onSuccess, onFail, onFinish) {\n SrvComm.sendCommand('auth/logout', {}, (respData, requestId) => {\n if (onSuccess) onSuccess(respData, requestId);\n if (onFinish) onFinish(respData, requestId);\n }, (respData, requestId) => {\n if (onFail) onFail(respData, requestId);\n if (onFinish) onFinish(respData, requestId);\n });\n }\n\n static logout() {\n this.setUserInfo(null);\n }\n\n static isAuthenticated() {\n const userInfo = this.getUserInfo();\n if (userInfo == null) return false;\n if (userInfo && Object.keys(userInfo).length === 0 && Object.getPrototypeOf(userInfo) === Object.prototype) {\n return false;\n }\n return true;\n return this.getUserInfo() != null;\n }\n}\n"],"sourceRoot":""}