{"version":3,"sources":["common/PageHeaderB2B.tsx","../node_modules/@material-ui/icons/NavigateBefore.js","pages/Login/index.tsx"],"names":["useStyles","makeStyles","_ref2","breakpoints","title","width","height","display","alignItems","justifyContent","overflowY","textTransform","letterSpacing","up","marginTop","container","padding","icon","cursor","position","PageHeaderB2B","_ref","propsInfo","showNavArrow","navigationLink","classes","_jsxs","className","children","_jsx","ArrowLeftIcon","onClick","handleClick","browserHistory","push","Typography","variant","align","editorAttributes","_interopRequireDefault","require","_interopRequireWildcard","Object","defineProperty","exports","value","default","React","_default","createElement","d","LoginForm","lazy","ForgotPasswordForm","ChangePasswordForm","NewCustomer","spacing","palette","section","minHeight","paddingBottom","paddingTop","backgroundColor","rapunzel","b2bBackground","margin","white","maxWidth","sectionTitle","marginBottom","loginFormContainer","newCustomerSection","Login","pageInfo","state","links","useStore","siteSettingsStore","t","useTranslation","resetToken","email","location","search","queryObject","qs","parse","replace","formMapper","LoginPage","_Fragment","Suspense","fallback","Box","link","forgotPassword","href","PasswordResetPage","Spinner","login","token","Grid","item","md","_type","registrationLink","registerAccount"],"mappings":"mHAAA,qEAgBA,MA6BMA,EAAYC,aAAWC,IAAA,IAAC,YAAEC,GAAaD,EAAA,MAAM,CACjDE,MAAO,CACLC,MAAO,OACPC,OAAQ,GACRC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,UAAW,OACXC,cAAe,OACfC,eAAgB,GAChB,CAACT,EAAYU,GAAG,OAAQ,CACtBC,UAAW,IAGfC,UAAW,CACTR,QAAS,OACTC,WAAY,SACZQ,QAAS,YACT,CAACb,EAAYU,GAAG,OAAQ,CACtBG,QAAS,aAGbC,KAAM,CACJC,OAAQ,UACRC,SAAU,YAEb,IAEcC,IAzDuCC,IAK/C,IALgD,MACrDjB,EAAK,UACLkB,EAAS,aACTC,EAAY,eACZC,GACDH,EACC,MAIMI,EAAUzB,IAEhB,OACE0B,eAAA,OAAKC,UAAWF,EAAQV,UAAUa,SAAA,CAC/BL,GACCM,cAAC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UAAWF,EAAQV,UAAUa,SAAA,CAChCC,cAACT,IAAa,CAAChB,MAAO0E,EAAE,iBAAkBvD,cAAc,IACxDG,eAAC2E,IAAI,CAACtF,WAAS,EAACN,eAAe,SAAQmB,SAAA,CACrCC,cAACwE,IAAI,CAACC,MAAI,EAACC,GAAI,GAAI5E,UAAWF,EAAQ6C,mBAAmB1C,UAC9C,OAAR6C,QAAQ,IAARA,OAAQ,EAARA,EAAU+B,QAAShB,EAAWf,EAAS+B,SAE1C3E,cAACwE,IAAI,CAACC,MAAI,EAACC,GAAI,GAAI5E,UAAWF,EAAQ8C,mBAAmB3C,SACvDC,cAAC8D,WAAQ,CAACC,SAAU/D,cAACqE,IAAO,IAAItE,SAC9BC,cAAC0B,EAAW,CAACkD,iBAAkB9B,EAAM+B,6BAKzC,C","file":"static/js/loginPage.c1e3d59b.chunk.js","sourcesContent":["import { makeStyles } from \"@material-ui/core/styles\"\nimport ArrowLeftIcon from \"@material-ui/icons/NavigateBefore\"\nimport { editorAttributes } from \"@starrepublic/epi/cms\"\nimport { PropertyInfo } from \"@starrepublic/epi/types/cms/content\"\nimport Typography from \"common/Typography\"\nimport React from \"react\"\n\nimport { browserHistory } from \"./Root\"\n\ntype Props = {\n title: string\n propsInfo?: PropertyInfo\n showNavArrow: boolean\n navigationLink?: string\n}\n\nconst PageHeaderB2B: React.FunctionComponent = ({\n title,\n propsInfo,\n showNavArrow,\n navigationLink\n}) => {\n const handleClick = () => {\n navigationLink && browserHistory.push(navigationLink)\n }\n\n const classes = useStyles()\n\n return (\n
\n {showNavArrow && (\n \n )}\n \n {title}\n \n
\n )\n}\n\nconst useStyles = makeStyles(({ breakpoints }) => ({\n title: {\n width: \"100%\",\n height: 62,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflowY: \"auto\",\n textTransform: \"none\",\n letterSpacing: -0.5,\n [breakpoints.up(\"sm\")]: {\n marginTop: 4\n }\n },\n container: {\n display: \"flex\",\n alignItems: \"center\",\n padding: \"10px 16px\",\n [breakpoints.up(\"sm\")]: {\n padding: \"8px 48px\"\n }\n },\n icon: {\n cursor: \"pointer\",\n position: \"absolute\"\n }\n}))\n\nexport default PageHeaderB2B\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"\n}), 'NavigateBefore');\n\nexports.default = _default;","import Box from \"@material-ui/core/Box\"\nimport Grid from \"@material-ui/core/Grid\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport { ContentProps } from \"@starrepublic/epi/types/cms/props\"\nimport PageHeaderB2B from \"common/PageHeaderB2B\"\nimport Spinner from \"common/Spinners/Spinner\"\nimport Typography from \"common/Typography\"\nimport useStore from \"global-hook-store\"\nimport qs from \"qs\"\nimport React, { Suspense } from \"react\"\nimport { useTranslation } from \"react-i18next\"\nimport siteSettingsStore from \"stores/siteSettingsStore\"\n\ntype LoginPageContent = { headline: string }\n\ntype OwnProps = ContentProps\n\ntype Props = OwnProps\n\nconst LoginForm = React.lazy(\n () => import(/* webpackChunkName: \"login\" */ \"./Forms/LoginForm\")\n)\n\nconst ForgotPasswordForm = React.lazy(\n () => import(/* webpackChunkName: \"login\" */ \"./Forms/ForgotPasswordForm\")\n)\n\nconst ChangePasswordForm = React.lazy(\n () => import(/* webpackChunkName: \"login\" */ \"./Forms/ChangePasswordForm\")\n)\n\nconst NewCustomer = React.lazy(\n () => import(/* webpackChunkName: \"login\" */ \"./NewCustomer\")\n)\n\nconst Login: React.FunctionComponent = ({ pageInfo }) => {\n const {\n state: { links }\n } = useStore(siteSettingsStore)\n\n const { t } = useTranslation()\n const classes = useStyles()\n\n let resetToken = \"\"\n let email = \"\"\n\n if (location.search) {\n const queryObject = qs.parse(location.search.replace(\"?\", \"\"))\n resetToken = queryObject.resetToken as string\n email = queryObject.email as string\n }\n\n const loginPageForm = (\n <>\n \n {t(\"member.already_a_member_description\")}\n \n\n }>\n \n \n \n )\n\n const resetPasswordForm = (\n <>\n \n {t(\"member.forgot_password_title\")}?\n \n {resetToken ? (\n <>\n \n {t(\"member.reset_password_page_description\")}\n \n }>\n \n \n \n ) : (\n <>\n \n {t(\"member.forgot_password_page_description\")}\n \n }>\n \n \n \n )}\n \n )\n\n const formMapper = {\n LoginPage: loginPageForm,\n PasswordResetPage: resetPasswordForm\n }\n\n return (\n
\n
\n \n \n \n {pageInfo?._type && formMapper[pageInfo._type]}\n \n \n }>\n \n \n \n \n
\n
\n )\n}\n\nconst useStyles = makeStyles(({ spacing, breakpoints, palette }) => ({\n section: {\n minHeight: \"100vh\",\n paddingBottom: 36,\n paddingTop: 6,\n [breakpoints.up(\"sm\")]: {\n marginTop: -24,\n paddingTop: 42,\n height: \"100%\",\n backgroundColor: palette.rapunzel.b2bBackground,\n paddingBottom: 30\n }\n },\n container: {\n margin: \"auto\",\n padding: \"0 16px\",\n backgroundColor: palette.rapunzel.white,\n [breakpoints.up(\"sm\")]: {\n maxWidth: 600,\n padding: \"0 48px 20px 48px\"\n }\n },\n sectionTitle: {\n marginBottom: spacing(2)\n },\n loginFormContainer: {\n [breakpoints.up(\"md\")]: {\n width: spacing(52)\n }\n },\n newCustomerSection: {\n margin: \"22px 0\"\n }\n}))\n\nexport default Login\n"],"sourceRoot":""}