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AAY,SAAS,eAAeF,CAAW,EAErD,GAAIE,GAAa,KACf,MAAM,IAAI,MAAM,GAAGF,CAAW,yBAAyB,KAGzD,UAAOsB,EAASpB,CAAS,CAC3B,C,oCCbA,MAAMqB,EAAgBC,GAAyB,KAAK,UAAUA,EAAK,KAAM,CAAC,EAEpEC,EAAqBC,GAAoB,KAAK,MAAMA,CAAI,EAExDC,EAAyBD,GAAiC,CAC9D,GAAIA,IAAS,OAKb,GAAI,CACF,OAAOD,EAAkBC,CAAI,CAC/B,OAASE,EAAc,CACrB,QAAQ,MAAM,uCAAyCA,CAAG,EAC1D,MACF,CACF,C","sources":["webpack://porta/./node_modules/@patternfly/react-icons/dist/js/createIcon.js","webpack://porta/./node_modules/@patternfly/react-icons/dist/js/icons/greater-than-icon.js","webpack://porta/./node_modules/@patternfly/react-icons/dist/js/icons/key-icon.js","webpack://porta/./node_modules/@patternfly/react-icons/dist/js/icons/less-than-icon.js","webpack://porta/./node_modules/@patternfly/react-core/dist/esm/components/LoginPage/LoginMainFooterBandItem.js","webpack://porta/./app/javascript/src/Login/components/AuthenticationProviders.tsx","webpack://porta/./app/javascript/src/utilities/useScript.ts","webpack://porta/./app/javascript/src/utilities/ReCaptchaV3.tsx","webpack://porta/./app/javascript/src/Login/components/LoginForm.tsx","webpack://porta/./app/javascript/src/Login/components/LoginPage.tsx","webpack://porta/./app/javascript/packs/login_page.ts","webpack://porta/./app/javascript/src/Login/components/LoginAlert.tsx","webpack://porta/./app/javascript/src/Login/utils/validations.ts","webpack://porta/./app/javascript/src/utilities/CSRFToken.tsx","webpack://porta/./app/javascript/src/utilities/createReactWrapper.ts","webpack://porta/./app/javascript/src/utilities/json-utils.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createIcon = exports.getSize = exports.IconSize = void 0;\nconst tslib_1 = require(\"tslib\");\nconst React = tslib_1.__importStar(require(\"react\"));\nvar IconSize;\n(function (IconSize) {\n IconSize[\"sm\"] = \"sm\";\n IconSize[\"md\"] = \"md\";\n IconSize[\"lg\"] = \"lg\";\n IconSize[\"xl\"] = \"xl\";\n})(IconSize = exports.IconSize || (exports.IconSize = {}));\nconst getSize = (size) => {\n switch (size) {\n case IconSize.sm:\n return '1em';\n case IconSize.md:\n return '1.5em';\n case IconSize.lg:\n return '2em';\n case IconSize.xl:\n return '3em';\n default:\n return '1em';\n }\n};\nexports.getSize = getSize;\nlet currentId = 0;\n/**\n * Factory to create Icon class components for consumers\n */\nfunction createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgPath }) {\n var _a;\n return _a = class SVGIcon extends React.Component {\n constructor() {\n super(...arguments);\n this.id = `icon-title-${currentId++}`;\n }\n render() {\n const _a = this.props, { size, color, title, noVerticalAlign } = _a, props = tslib_1.__rest(_a, [\"size\", \"color\", \"title\", \"noVerticalAlign\"]);\n const hasTitle = Boolean(title);\n const heightWidth = (0, exports.getSize)(size);\n const baseAlign = -0.125 * Number.parseFloat(heightWidth);\n const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };\n const viewBox = [xOffset, yOffset, width, height].join(' ');\n return (React.createElement(\"svg\", Object.assign({ style: style, fill: color, height: heightWidth, width: heightWidth, viewBox: viewBox, \"aria-labelledby\": hasTitle ? this.id : null, \"aria-hidden\": hasTitle ? null : true, role: \"img\" }, props),\n hasTitle && React.createElement(\"title\", { id: this.id }, title),\n React.createElement(\"path\", { d: svgPath })));\n }\n },\n _a.displayName = name,\n _a.defaultProps = {\n color: 'currentColor',\n size: IconSize.sm,\n noVerticalAlign: false\n },\n _a;\n}\nexports.createIcon = createIcon;\n//# sourceMappingURL=createIcon.js.map","\"use strict\"\nexports.__esModule = true;\nexports.GreaterThanIconConfig = {\n name: 'GreaterThanIcon',\n height: 512,\n width: 384,\n svgPath: 'M365.52 209.85L59.22 67.01c-16.06-7.49-35.15-.54-42.64 15.52L3.01 111.61c-7.49 16.06-.54 35.15 15.52 42.64L236.96 256.1 18.49 357.99C2.47 365.46-4.46 384.5 3.01 400.52l13.52 29C24 445.54 43.04 452.47 59.06 445l306.47-142.91a32.003 32.003 0 0 0 18.48-29v-34.23c-.01-12.45-7.21-23.76-18.49-29.01z',\n yOffset: 0,\n xOffset: 0,\n};\nexports.GreaterThanIcon = require('../createIcon').createIcon(exports.GreaterThanIconConfig);\nexports[\"default\"] = exports.GreaterThanIcon;","\"use strict\"\nexports.__esModule = true;\nexports.KeyIconConfig = {\n name: 'KeyIcon',\n height: 1024,\n width: 1024,\n svgPath: 'M802,320 C748.980664,320 706,277.019336 706,224 C706,170.980664 748.980664,128 802,128 C855.019336,128 898,170.980664 898,224 C898,277.019336 855.019336,320 802,320 M704,0 C527.3,0 384,143.3 384,320 C383.937788,357.490503 390.505571,394.696657 403.4,429.9 L0,824.1 L0,1024 L192,1024 L192,896 L320,896 L320,768 L448,768 L597,622 C596.906403,621.881923 596.838304,621.745723 596.8,621.6 C631.220126,633.811107 667.47802,640.034477 704,640 C880.7,640 1024,496.7 1024,320 C1024,143.3 880.7,0 704,0',\n yOffset: 0,\n xOffset: 0,\n};\nexports.KeyIcon = require('../createIcon').createIcon(exports.KeyIconConfig);\nexports[\"default\"] = exports.KeyIcon;","\"use strict\"\nexports.__esModule = true;\nexports.LessThanIconConfig = {\n name: 'LessThanIcon',\n height: 512,\n width: 384,\n svgPath: 'M365.46 357.74L147.04 255.89l218.47-101.88c16.02-7.47 22.95-26.51 15.48-42.53l-13.52-29C360 66.46 340.96 59.53 324.94 67L18.48 209.91a32.014 32.014 0 0 0-18.48 29v34.24c0 12.44 7.21 23.75 18.48 29l306.31 142.83c16.06 7.49 35.15.54 42.64-15.52l13.56-29.08c7.49-16.06.54-35.15-15.53-42.64z',\n yOffset: 0,\n xOffset: 0,\n};\nexports.LessThanIcon = require('../createIcon').createIcon(exports.LessThanIconConfig);\nexports[\"default\"] = exports.LessThanIcon;","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport styles from '@patternfly/react-styles/css/components/Login/login';\nimport { css } from '@patternfly/react-styles';\nexport const LoginMainFooterBandItem = (_a) => {\n var { children = null, className = '' } = _a, props = __rest(_a, [\"children\", \"className\"]);\n return (React.createElement(\"p\", Object.assign({ className: css(`${styles.loginMainFooterBand}-item`, className) }, props), children));\n};\nLoginMainFooterBandItem.displayName = 'LoginMainFooterBandItem';\n//# sourceMappingURL=LoginMainFooterBandItem.js.map","import GreaterThanIcon from '@patternfly/react-icons/dist/js/icons/greater-than-icon'\nimport KeyIcon from '@patternfly/react-icons/dist/js/icons/key-icon'\nimport LessThanIcon from '@patternfly/react-icons/dist/js/icons/less-than-icon'\n\nimport type { FunctionComponent } from 'react'\n\nexport interface ProvidersProps {\n authorizeURL: string;\n humanKind: string;\n}\n\ninterface Props {\n authenticationProviders: ProvidersProps[];\n}\n\nconst Provider: FunctionComponent = ({ authorizeURL, humanKind }) => (\n

\n \n {' Authenticate through '}\n {humanKind}\n \n

\n)\n\n// eslint-disable-next-line react/no-multi-comp -- FIXME: move to its own file\nconst AuthenticationProviders: FunctionComponent = (props) => {\n const { authenticationProviders } = props\n const providersList = authenticationProviders.map(\n provider => \n )\n\n return (\n
\n {providersList}\n
\n )\n}\n\nexport type { Props }\nexport { AuthenticationProviders }\n","import { useEffect } from 'react'\n\nconst useScript = (url: string, cb: (ev: Event) => void): void => {\n useEffect(() => {\n const script = document.createElement('script')\n\n script.src = url\n script.async = true\n script.addEventListener('load', cb)\n\n document.body.appendChild(script)\n\n return () => {\n document.body.removeChild(script)\n }\n }, [])\n}\n\nexport { useScript }\n","import { useState } from 'react'\n\nimport { useScript } from 'utilities/useScript'\n\nimport type { FunctionComponent } from 'react'\n\ninterface Props {\n siteKey: string;\n action: string;\n}\n\nconst ReCaptchaV3: FunctionComponent = ({ siteKey, action }) => {\n const inputId = `g-recaptcha-response-data-${action}`.replace(/\\//g, '-')\n const inputName = `g-recaptcha-response-data[${action}]`\n const [token, setToken] = useState('')\n\n useScript(`https://www.google.com/recaptcha/api.js?render=${siteKey}`, () => {\n const { grecaptcha } = window\n grecaptcha.ready(() => {\n grecaptcha.execute(siteKey, { action: action })\n .then((t: string) => {\n setToken(t)\n })\n .catch((error: string) => { console.error(error) })\n })\n })\n\n return (\n
\n \n This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.\n \n \n
\n )\n}\n\nexport type { Props }\nexport { ReCaptchaV3 }\n","import { useState } from 'react'\nimport {\n ActionGroup,\n Button,\n Form,\n FormGroup,\n TextInput\n} from '@patternfly/react-core'\n\nimport { validateLogin } from 'Login/utils/validations'\nimport { CSRFToken } from 'utilities/CSRFToken'\nimport { ReCaptchaV3 } from 'utilities/ReCaptchaV3'\nimport { LoginAlert } from 'Login/components/LoginAlert'\n\nimport type { FlashMessage } from 'Types/FlashMessages'\nimport type { FunctionComponent } from 'react'\n\ninterface Props {\n flashMessages: FlashMessage[];\n providerSessionsPath: string;\n recaptcha: {\n enabled: boolean;\n siteKey: string;\n action: string;\n };\n session: {\n username: string | null;\n };\n}\n\nconst LoginForm: FunctionComponent = ({\n flashMessages,\n providerSessionsPath,\n recaptcha,\n session\n}) => {\n const [state, setState] = useState({\n username: session.username ?? '',\n password: ''\n })\n const [validationVisibility, setValidationVisibility] = useState({\n username: false,\n password: false\n })\n\n const handleOnChange = (field: keyof typeof state) => {\n return (value: string) => {\n setState(prev => ({ ...prev, [field]: value }))\n setValidationVisibility(prev => ({ ...prev, [field]: false }))\n }\n }\n\n const handleOnBlur = (field: keyof typeof state) => {\n return () => {\n setValidationVisibility(prev => ({ ...prev, [field]: true }))\n }\n }\n\n const validation = validateLogin(state)\n\n const usernameErrors = validation?.username\n const passwordErrors = validation?.password\n\n const usernameValidated = (validationVisibility.username && usernameErrors) ? 'error' : 'default'\n const passwordValidated = (validationVisibility.password && passwordErrors) ? 'error' : 'default'\n\n const alert = flashMessages.length ? flashMessages[0] : undefined\n\n return (\n \n \n\n \n \n\n \n \n \n\n \n \n \n {recaptcha.enabled && }\n\n \n \n Sign in\n \n \n \n )\n}\n\nexport type { Props }\nexport { LoginForm }\n","import { LoginMainFooterBandItem, LoginPage as PF4LoginPage } from '@patternfly/react-core'\n\nimport { createReactWrapper } from 'utilities/createReactWrapper'\nimport { AuthenticationProviders } from 'Login/components/AuthenticationProviders'\nimport { LoginForm } from 'Login/components/LoginForm'\nimport brandImg from 'Login/assets/images/3scale_Logo_Reverse.png'\nimport PF4DownstreamBG from 'Login/assets/images/PF4DownstreamBG.svg'\n\nimport type { FunctionComponent } from 'react'\nimport type { ProvidersProps } from 'Login/components/AuthenticationProviders'\nimport type { FlashMessage } from 'Types'\n\ninterface Props {\n authenticationProviders: ProvidersProps[];\n flashMessages: FlashMessage[];\n providerSessionsPath: string;\n providerRequestPasswordResetPath: string;\n show3scaleLoginForm: boolean;\n disablePasswordReset: boolean;\n recaptcha: {\n enabled: boolean;\n siteKey: string;\n action: string;\n };\n session: {\n username: string | null;\n };\n}\n\nconst LoginPage: FunctionComponent = ({\n authenticationProviders,\n disablePasswordReset,\n flashMessages,\n providerRequestPasswordResetPath,\n providerSessionsPath,\n recaptcha,\n session,\n show3scaleLoginForm\n}) => (\n \n { event.currentTarget.click() }}\n >\n Forgot password?\n \n \n )}\n loginTitle=\"Log in to your account\"\n >\n {show3scaleLoginForm && (\n \n )}\n {authenticationProviders.length > 0 && (\n
\n \n
\n )}\n \n)\n\n// eslint-disable-next-line react/jsx-props-no-spreading\nconst LoginPageWrapper = (props: Props, containerId: string): void => { createReactWrapper(, containerId) }\n\nexport type { Props }\nexport { LoginPage, LoginPageWrapper }\n","import { safeFromJsonString } from 'utilities/json-utils'\nimport { LoginPageWrapper } from 'Login/components/LoginPage'\n\nimport type { Props } from 'Login/components/LoginPage'\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const containerId = 'pf-login-page-container'\n const container = document.getElementById(containerId)\n\n if (!container) {\n throw new Error('The target ID was not found: ' + containerId)\n }\n\n const loginPageProps = safeFromJsonString(container.dataset.loginProps)\n\n if (!loginPageProps) {\n throw new Error('Missing props for LoginPage')\n }\n\n LoginPageWrapper(loginPageProps, containerId)\n})\n","import { Alert } from '@patternfly/react-core'\n\nimport type { AlertProps } from '@patternfly/react-core'\nimport type { FunctionComponent } from 'react'\n\ninterface Props {\n type?: 'error' | 'notice' | 'success';\n message?: string;\n}\n\nconst LoginAlert: FunctionComponent = ({ type = 'default', message }) => {\n const variant: Record = {\n error: 'danger',\n notice: 'info',\n success: 'success',\n default: 'default'\n }\n\n return (\n

{m}

)}\n variant={variant[type]}\n />\n )\n}\n\nexport { LoginAlert }\n","import validate from 'validate.js'\n\nconst loginConstraints = {\n username: { presence: { allowEmpty: false, message: 'Email or username is mandatory' } },\n password: { presence: { allowEmpty: false, message: 'Password is mandatory' } }\n} as const\n\nfunction validateLogin (fields: Record): Record | undefined {\n return validate(fields, loginConstraints, { fullMessages: false }) as Record | undefined\n}\n\nconst changePasswordConstraints = {\n password: {\n presence: { allowEmpty: false, message: 'Password is mandatory' },\n length: { minimum: 6 }\n },\n passwordConfirmation: {\n presence: { allowEmpty: false, message: 'Password confirmation is mandatory' },\n equality: { attribute: 'password', message: 'Password and Password confirmation must match' }\n }\n} as const\n\nfunction validateChangePassword (fields: Record): Record | undefined {\n return validate(fields, changePasswordConstraints, { fullMessages: false }) as Record | undefined\n}\n\nconst signupConstraints = {\n username: {\n presence: { allowEmpty: false, message: 'Username is mandatory' },\n length: { minimum: 3, maximum: 40 }\n },\n email: {\n email: { message: 'A valid email address is mandatory' },\n length: { minimum: 6, maximum: 255 }\n },\n firstName: {\n length: { maximum: 255 }\n },\n lastName: {\n length: { maximum: 255 }\n },\n ...changePasswordConstraints\n} as const\n\nfunction validateSignup (fields: Record): Record | undefined {\n return validate(fields, signupConstraints, { fullMessages: false }) as Record | undefined\n}\n\nconst requestPasswordConstraints = signupConstraints.email\n\nfunction validateRequestPassword (value: string): string[] | undefined {\n return validate.single(value, requestPasswordConstraints, { fullMessages: false }) as string[] | undefined\n}\n\nexport {\n validateLogin,\n validateChangePassword,\n validateSignup,\n validateRequestPassword\n}\n","import type { ReactElement } from 'react'\n\ninterface Props {\n win?: Window;\n}\n\nconst CSRFToken = ({ win = window }: Props): ReactElement => {\n function getMetaContent (metaName: string) {\n const meta = win.document.querySelector(`head > meta[name~=${metaName}][content]`)\n return meta ? meta.content : undefined\n }\n\n return (\n \n )\n}\n\nexport type { Props }\nexport { CSRFToken }\n","import { render } from 'react-dom'\n\nexport function createReactWrapper (\n element: React.ReactElement>,\n containerId: string\n): void {\n const container = document.getElementById(containerId)\n\n if (container == null) {\n throw new Error(`${containerId} is not part of the DOM`)\n }\n\n render(element, container)\n}\n","const toJsonString = (val: unknown): string => JSON.stringify(val, null, 2)\n\nconst fromJsonString = (json: string): T => JSON.parse(json) as T\n\nconst safeFromJsonString = (json?: string): T | undefined => {\n if (json === undefined) {\n // Explicitly return undefined to prevent JSON.parse from throwing an error\n return undefined\n }\n\n try {\n return fromJsonString(json)\n } catch (err: unknown) {\n console.error('That doesn\\'t look like a valid json!', err)\n return undefined\n }\n}\n\nexport {\n toJsonString,\n fromJsonString,\n safeFromJsonString\n}\n"],"names":["exports","tslib_1","React","IconSize","getSize","size","currentId","createIcon","name","xOffset","yOffset","width","height","svgPath","_a","color","title","noVerticalAlign","props","hasTitle","heightWidth","baseAlign","style","viewBox","LoginMainFooterBandItem","children","className","Provider","authorizeURL","humanKind","AuthenticationProviders","authenticationProviders","providersList","provider","useScript","url","cb","script","ReCaptchaV3","siteKey","action","inputId","inputName","token","setToken","grecaptcha","t","error","LoginForm","flashMessages","providerSessionsPath","recaptcha","session","state","setState","validationVisibility","setValidationVisibility","handleOnChange","field","value","prev","handleOnBlur","validation","usernameErrors","passwordErrors","usernameValidated","passwordValidated","alert","Form","LoginAlert","CSRFToken","FormGroup","TextInput","ActionGroup","Button","disablePasswordReset","providerRequestPasswordResetPath","show3scaleLoginForm","PF4DownstreamBG","event","LoginPageWrapper","containerId","createReactWrapper","container","loginPageProps","type","message","variant","m","i","loginConstraints","validateLogin","fields","changePasswordConstraints","validateChangePassword","signupConstraints","validateSignup","requestPasswordConstraints","validateRequestPassword","win","getMetaContent","metaName","meta","element","toJsonString","val","fromJsonString","json","safeFromJsonString","err"],"sourceRoot":""}