{"version":3,"sources":["_platform/src/utils/getReturnUrlPath.js","containers/LoginPage/LoginPage.js","containers/LoginPage/images/LoginPage@1x.png","containers/LoginPage/images/LoginPage@2x.png","_platform/src/components/MessageBox/MessageBox.js","../node_modules/memoize-one/dist/memoize-one.esm.js","_platform/src/utils/checkPermissions.js","_platform/src/utils/checkRoles.js","_platform/src/utils/PrivateComponent.js","_platform/src/utils/PublicComponent.js","theme/rsr-logo.svg"],"names":["pageQueryString","qs","parse","history","location","search","replace","ignoreQueryPrefix","LoginProvider","LoadAsync","__webpack_require__","e","then","bind","LoginForm","Promise","all","PageContainer","styled","section","_templateObject","bgImage1x","bgImage2x","up","css","_templateObject2","_templateObject3","_templateObject4","LoginLogo","h1","_templateObject5","IntroContainer","div","_templateObject6","LoginContainer","_templateObject7","withTheme","withSettings","_ref","settings","react_default","a","createElement","PublicComponent","redirectOnError","getReturnUrlPath","settingsApp","loginPagePath","Helmet_default","className","smooth_ui_core_sc_es","justifyContent","xs","src","logo","alt","siteName","href","target","rel","disableMeta","formLabels","labelUserName","module","exports","p","StyledAlert","Alert","Title","Multiline","MessageBox","children","_ref$title","title","undefined","_ref$variant","variant","react__WEBPACK_IMPORTED_MODULE_1___default","defaultProps","safeIsNaN","Number","isNaN","value","areInputsEqual","newInputs","lastInputs","length","i","first","second","__webpack_exports__","resultFn","isEqual","lastThis","lastResult","lastArgs","calledOnce","newArgs","_i","arguments","this","apply","checkPermissions","currentUser","requiredPermissions","Array","isArray","permissions","some","item","indexOf","propTypes","PropTypes","object","isRequired","array","checkPermissionsMemoized","memoizeOne","checkRoles","requiredRoles","roles","checkRolesMemoized","PrivateComponent","_this$props","props","deniedPermissions","deniedRoles","displayError","errorMessage","publicOnly","tempAuthAllowed","user","_this$props2","currentUserTemp","UnauthorisedComponent","RedirectOnErrorComponent","react_router","push","to","userObject","token","userId","Component","mapStateToProps","createStructuredSelector","selectCurrentUser","selectCurrentUserTemp","connect","react__WEBPACK_IMPORTED_MODULE_0__","react__WEBPAC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EAAA,EAADC,OAAAC,OAAA,GAAsB7B,EAAtB,CAA6BK,YAAU,2BCPxElE,EAAAC,QAAiBtD,EAAAuD,EAAuB","file":"static/js/loginPage.94b87c86.chunk.js","sourcesContent":["import qs from 'qs';\nimport history from '_platform/src/utils/history';\n\nconst pageQueryString = qs.parse(\n // Normalise key\n history.location.search.replace(/returnUrl/gi, 'returnUrl'),\n {\n ignoreQueryPrefix: true,\n }\n);\n\nexport default pageQueryString.returnUrl;\n","/**\n * Login Page\n */\n\n// Core imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// Style, SEO and settings\nimport Helmet from 'react-helmet';\nimport { Col, css, Grid, Row, up, styled, withTheme } from '@smooth-ui/core-sc';\n\n// Additional Components/Containers\nimport LoadAsync from '_platform/src/utils/LoadAsync';\nimport PublicComponent from '_platform/src/utils/PublicComponent';\nimport getReturnUrlPath from '_platform/src/utils/getReturnUrlPath';\n\nimport { withSettings } from 'containers/WebApp/SettingsContext';\nimport bgImage1x from './images/LoginPage@1x.png';\nimport bgImage2x from './images/LoginPage@2x.png';\n//import overlay from './images/soverlay@2x.png';\nimport logo from '../../theme/rsr-logo.svg';\n\nconst LoginProvider = LoadAsync(() =>\n import(\n /* webpackChunkName: \"loginProvider\" */ '_platform/src/containers/LoginProvider/LoginProvider'\n )\n);\nconst LoginForm = LoadAsync(() =>\n import(\n /* webpackChunkName: \"loginForm\" */ '_platform/src/components/LoginForm/LoginForm'\n )\n);\n\nconst PageContainer = styled.section`\n align-items: center;\n display: flex;\n flex: 1 0 auto;\n flex-direction: row;\n justify-content: center;\n\n background-image: url(${bgImage1x});\n background-position: right top;\n background-repeat: no-repeat;\n background-size: cover;\n\n @media only screen and (min-device-pixel-ratio: 1.5),\n only screen and (min-resolution: 144dpi),\n only screen and (min-resolution: 1.5dppx) {\n background-image: url(${bgImage2x});\n }\n\n ${up(\n 'xs',\n css`\n border-top: 2.5rem solid #cd1723;\n `\n )};\n\n ${up(\n 'lg',\n css`\n border-top: none;\n\n &:before {\n content: '';\n position: absolute;\n inset: 0;\n width: 35vw;\n background: rgba(205, 23, 35, 1);\n transform: skew(-15deg);\n transform-origin: top;\n margin-bottom: 36px;\n }\n `\n )};\n\n ${up(\n 'lg',\n css`\n flex-direction: column;\n justify-content: center;\n `\n )};\n`;\n\nconst LoginLogo = styled.h1`\n margin-bottom: 0;\n margin-top: 0;\n padding-bottom: 1rem;\n padding-top: 0;\n img {\n height: auto;\n width: 323px;\n }\n`;\n\nconst IntroContainer = styled.div`\n box-sizing: border-box;\n margin-bottom: 0.5rem;\n margin-top: 0.5rem;\n padding: 0.5rem;\n width: 100%;\n\n h2 {\n font-size: 30px;\n }\n\n a {\n color: #707070;\n &:hover,\n &:active {\n color: #cd1723;\n }\n &:visited {\n color: #707070;\n }\n }\n`;\n\nconst LoginContainer = styled.div`\n background-color: rgb(240, 240, 240, 0.85);\n color: #707070;\n font-size: 15px;\n padding: 2rem;\n max-width: 450px;\n\n .reset-password {\n a {\n font-size: 14px;\n font-weight: normal;\n &:hover,\n &:active {\n color: #cd1723;\n }\n &:visited {\n color: #707070;\n }\n }\n }\n\n .login-form {\n .sui-label {\n display: none;\n }\n\n .sui-button {\n text-transform: uppercase;\n font-weight: bold;\n font-size: 18px;\n padding: 0.5rem 1rem;\n }\n }\n`;\n\nconst LoginPage = ({ settings }) => (\n \n \n Login\n {/**/}\n \n\n \n \n \n \n \n \n \n \n \n

\n \n How do I get an RSR account?\n \n
\n \n What is RSR?\n \n

\n \n \n \n

\n If you are having difficulties logging in,\n
\n please contact us on 0508 777 775\n .\n

\n
\n \n
\n
\n
\n
\n \n);\n\nLoginPage.propTypes = {\n settings: PropTypes.object.isRequired,\n};\n\nexport default withTheme(withSettings(LoginPage));\n","module.exports = __webpack_public_path__ + \"static/media/LoginPage@1x.5db71fd2.png\";","module.exports = __webpack_public_path__ + \"static/media/LoginPage@2x.1b9ba1d3.png\";","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Alert, styled } from '@smooth-ui/core-sc';\n\nconst StyledAlert = styled(Alert)`\n margin-top: 1rem;\n`;\n\nexport const Title = styled.div`\n font-weight: bold;\n`;\n\nexport const Multiline = styled.div`\n white-space: pre-line;\n`;\n\nconst MessageBox = ({ children, title = undefined, variant = 'primary' }) => {\n return (\n \n {title ? {title} : null}\n {children}\n \n );\n};\n\nMessageBox.propTypes = {\n children: PropTypes.node.isRequired,\n title: PropTypes.string,\n variant: PropTypes.string,\n};\n\nMessageBox.defaultProps = {\n title: undefined,\n variant: 'primary',\n};\n\nexport default MessageBox;\n","var safeIsNaN = Number.isNaN || function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n};\n\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n\n return false;\n}\n\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n function memoized() {\n var newArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n\n return memoized;\n}\n\nexport default memoizeOne;","/**\n * Check Permissions - Check if the user has ANY of the required permissions\n *\n * @param {object} currentUser The user object containing the permissions property\n * @param {array} requiredPermissions The array of required permissions\n *\n */\n\nimport memoizeOne from 'memoize-one';\nimport PropTypes from 'prop-types';\n\nconst checkPermissions = (currentUser, requiredPermissions) => {\n if (\n !requiredPermissions ||\n !Array.isArray(requiredPermissions) ||\n !currentUser ||\n !currentUser.permissions ||\n !Array.isArray(currentUser.permissions)\n )\n return false;\n\n return currentUser.permissions.some(\n item => requiredPermissions.indexOf(item) >= 0\n );\n};\n\ncheckPermissions.propTypes = {\n currentUser: PropTypes.object.isRequired,\n requiredPermissions: PropTypes.array.isRequired,\n};\n\nconst checkPermissionsMemoized = memoizeOne(checkPermissions);\n\nexport default checkPermissionsMemoized;\n","/**\n * Check Roles - Check if the user has ANY of the required roles\n *\n * @param {object} currentUser The user object containing the roles property\n * @param {array} requiredRoles The array of required roles\n *\n */\n\nimport memoizeOne from 'memoize-one';\nimport PropTypes from 'prop-types';\n\nconst checkRoles = (currentUser, requiredRoles) => {\n if (\n !requiredRoles ||\n !Array.isArray(requiredRoles) ||\n !currentUser ||\n !currentUser.roles ||\n !Array.isArray(currentUser.roles)\n )\n return false;\n\n return currentUser.roles.some(item => requiredRoles.indexOf(item) >= 0);\n};\n\ncheckRoles.propTypes = {\n currentUser: PropTypes.object.isRequired,\n requiredRoles: PropTypes.array.isRequired,\n};\n\nconst checkRolesMemoized = memoizeOne(checkRoles);\n\nexport default checkRolesMemoized;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { createStructuredSelector } from 'reselect';\nimport { Redirect } from 'react-router-dom';\nimport {\n selectCurrentUser,\n selectCurrentUserTemp,\n} from '../containers/App/selectors'; // _platform\nimport checkPermissions from '../utils/checkPermissions'; // _platform\nimport checkRoles from '../utils/checkRoles'; // _platform\nimport MessageBox from '../components/MessageBox/MessageBox'; // _platform\n\n/**\n * Private Component - HoC to determine whether a component should be displayed\n * based on authentication, permissions and/or roles\n *\n * TODO: Extend with prop to supply function to determine permission `verifyFn` similar to LoadAsync\n *\n * The `user` prop can be either currentUser or currentUserTemp, depending on what the parent component determines is applicable.\n * If the `user` prop is not supplied, then this component will retrieve the user data via the App selectors.\n * The `tempAuthAllowed` prop determines whether currentUserTemp can be used\n *\n * `publicOnly` prop inverts the check so that the child component is only displayed to unauthenticated users (use `PublicComponent`)\n *\n * `deniedPermissions` and `deniedRoles` props take precedence over `requiredPermissions` and `requiredRoles`.\n * For example, if the props are `requiredRoles={['Administrator']} deniedRoles={['Administrator']}`,\n * users with the `Administrator` role will be denied access to the child component.\n *\n * If the checks determine that the access should be denied to the child component:\n * - By default the child component is skipped silently\n * - If the `redirectOnError` prop is supplied, the user will be redirected to the supplied local path\n * - Otherwise, if the `displayError` prop is supplied, the user will be shown an error\n * which can be customised via the `errorMessage` prop\n */\n\nclass PrivateComponent extends Component {\n render() {\n const {\n deniedPermissions,\n deniedRoles,\n displayError,\n errorMessage,\n publicOnly,\n redirectOnError,\n requiredPermissions,\n requiredRoles,\n tempAuthAllowed,\n user,\n } = this.props;\n const { currentUser, currentUserTemp } = this.props;\n\n const UnauthorisedComponent = displayError ? (\n \n {errorMessage || 'Unauthorised'}\n \n ) : null;\n\n const RedirectOnErrorComponent = redirectOnError ? (\n \n ) : null;\n\n // Determine which user object to use\n // 1. Use `user` prop if supplied\n // 2. If `tempAuthAllowed` prop:\n // 1. Is true: use `currentUserTemp` if available, if not use currentUser\n // 3. Is false: use currentUser\n //\n // Check for user.token and currentUserTemp.token to ensure they're not the\n // default empty objects. Cleaner than using Object.keys\n let userObject = {};\n if (user && user.token && user.userId) {\n userObject = user;\n } else if (tempAuthAllowed && currentUserTemp && currentUserTemp.token) {\n userObject = currentUserTemp;\n } else {\n userObject = currentUser;\n }\n\n // Invert the check if the publicOnly prop is supplied - used in PublicComponent\n if (publicOnly) {\n return !userObject.token\n ? this.props.children\n : RedirectOnErrorComponent || UnauthorisedComponent;\n }\n\n // Check granular permissions if supplied\n if (\n !!userObject.token &&\n ((deniedPermissions && checkPermissions(userObject, deniedPermissions)) ||\n (requiredPermissions &&\n !checkPermissions(userObject, requiredPermissions)))\n ) {\n return RedirectOnErrorComponent || UnauthorisedComponent;\n }\n\n // Check granular roles if supplied\n if (\n !!userObject.token &&\n ((deniedRoles && checkRoles(userObject, deniedRoles)) ||\n (requiredRoles && !checkRoles(userObject, requiredRoles)))\n ) {\n return RedirectOnErrorComponent || UnauthorisedComponent;\n }\n\n return !!userObject.token\n ? this.props.children\n : RedirectOnErrorComponent || UnauthorisedComponent;\n }\n}\n\nPrivateComponent.propTypes = {\n children: PropTypes.node.isRequired,\n currentUser: PropTypes.object.isRequired,\n currentUserTemp: PropTypes.object.isRequired,\n deniedPermissions: PropTypes.array,\n deniedRoles: PropTypes.array,\n displayError: PropTypes.bool,\n errorMessage: PropTypes.string,\n publicOnly: PropTypes.bool, // Inverts PrivateComponent - displays component to unauthenticated users only. Used by PublicComponent wrapper\n redirectOnError: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n requiredPermissions: PropTypes.array,\n requiredRoles: PropTypes.array,\n tempAuthAllowed: PropTypes.bool,\n user: PropTypes.object,\n};\n\nPrivateComponent.defaultProps = {\n deniedPermissions: undefined,\n deniedRoles: undefined,\n displayError: false,\n errorMessage: undefined,\n publicOnly: false,\n redirectOnError: undefined,\n requiredPermissions: undefined,\n requiredRoles: undefined,\n tempAuthAllowed: false,\n user: {},\n};\n\nconst mapStateToProps = createStructuredSelector({\n currentUser: selectCurrentUser(),\n currentUserTemp: selectCurrentUserTemp(),\n});\n\nexport default connect(\n mapStateToProps,\n null\n)(PrivateComponent);\n","/**\n * Public Component - Wrapper for PrivateComponent with the publicOnly flag\n */\n\nimport React from 'react';\nimport PrivateComponent from './PrivateComponent';\n\nconst PublicComponent = props => ;\n\nexport default PublicComponent;\n","module.exports = __webpack_public_path__ + \"static/media/rsr-logo.26bdf1df.svg\";"],"sourceRoot":""}