\r\n );\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport default {\"backdrop\":\"styles_backdrop__7MhUw\",\"modalwindow\":\"styles_modalwindow__tw+pk\",\"header\":\"styles_header__FEEh5\",\"content\":\"styles_content__O5Sgo\",\"footer\":\"styles_footer__prYZ9\"};","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __rest } from \"tslib\";\nimport * as React from 'react';\nimport useIntl from './useIntl';\nimport { shallowEqual } from '../utils';\nfunction areEqual(prevProps, nextProps) {\n var values = prevProps.values, otherProps = __rest(prevProps, [\"values\"]);\n var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, [\"values\"]);\n return (shallowEqual(nextValues, values) &&\n shallowEqual(otherProps, nextOtherProps));\n}\nfunction FormattedMessage(props) {\n var intl = useIntl();\n var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;\n var id = props.id, description = props.description, defaultMessage = props.defaultMessage, values = props.values, children = props.children, _b = props.tagName, Component = _b === void 0 ? Text : _b, ignoreTag = props.ignoreTag;\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var nodes = formatMessage(descriptor, values, {\n ignoreTag: ignoreTag,\n });\n if (typeof children === 'function') {\n return children(Array.isArray(nodes) ? nodes : [nodes]);\n }\n if (Component) {\n return React.createElement(Component, null, React.Children.toArray(nodes));\n }\n return React.createElement(React.Fragment, null, nodes);\n}\nFormattedMessage.displayName = 'FormattedMessage';\nvar MemoizedFormattedMessage = React.memo(FormattedMessage, areEqual);\nMemoizedFormattedMessage.displayName = 'MemoizedFormattedMessage';\nexport default MemoizedFormattedMessage;\n","import * as React from 'react';\nimport { Context } from './injectIntl';\nimport { invariantIntlContext } from '../utils';\nexport default function useIntl() {\n var intl = React.useContext(Context);\n invariantIntlContext(intl);\n return intl;\n}\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport styles from \"./styles.module.scss\";\r\nimport Button from \"@fraedom/DesignSystem-Button/react/dist/button.2.min.js\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\nclass Modal extends Component {\r\n render() {\r\n // Render nothing if the \"show\" prop is false\r\n if (!this.props.show) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n );\r\n }\r\n}\r\n\r\nModal.propTypes = {\r\n onClose: PropTypes.func.isRequired,\r\n onCancel: PropTypes.func.isRequired,\r\n show: PropTypes.bool,\r\n children: PropTypes.node,\r\n};\r\n\r\nexport default injectIntl(Modal);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__ljFpm\",\"pageHeader\":\"styles_pageHeader__hUwYf\",\"logo\":\"styles_logo__NbIPq\",\"userMenu\":\"styles_userMenu__t89Sz\",\"username\":\"styles_username__g6gyc\",\"closeMenu\":\"styles_closeMenu__fjb2G\",\"flexipurchase\":\"styles_flexipurchase__2Hk9w\",\"umb\":\"styles_umb__sfkLN\",\"fraedom\":\"styles_fraedom__0GR02\",\"visa\":\"styles_visa__vXtlL\",\"truist\":\"styles_truist__+m6CG\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\nimport classNames from \"classnames\";\r\n\r\nimport Button from \"@fraedom/DesignSystem-Button/react/dist/button.2.min.js\";\r\nimport Modal from \"../modal/component\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\nclass PageHeader extends Component {\r\n // Initialize the component.\r\n constructor(props) {\r\n super(props);\r\n // Initialize the local component state.\r\n this.state = {\r\n isOpen: false,\r\n };\r\n }\r\n // Render the component.\r\n render() {\r\n let { product } = this.props;\r\n let rootStyles = classNames(styles.root, styles.pageHeader);\r\n var _style = null;\r\n\r\n switch (product) {\r\n case \"flexipurchase\":\r\n _style = styles.flexipurchase;\r\n break;\r\n case \"umb\":\r\n _style = styles.umb;\r\n break;\r\n case \"visa\":\r\n _style = styles.visa;\r\n break;\r\n case \"truist\":\r\n _style = styles.truist;\r\n break;\r\n default:\r\n _style = styles.fraedom;\r\n break;\r\n }\r\n\r\n let headerStyles = classNames(styles.logo, _style);\r\n return (\r\n
\r\n );\r\n }\r\n\r\n toggleModal = (e) => {\r\n e.preventDefault();\r\n this.setState({\r\n isOpen: !this.state.isOpen,\r\n });\r\n if (!this.state.isOpen) {\r\n setTimeout(() => {\r\n document.getElementById(\"modal\").tabIndex = -1;\r\n document.getElementById(\"modal\").focus();\r\n }, 1000);\r\n }\r\n };\r\n\r\n closeModalToNavigate = () => {\r\n window.location.assign(\"about:home\");\r\n };\r\n}\r\nexport default injectIntl(PageHeader);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__pt7Wn\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, {Component} from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport styles from './styles.module.scss';\r\n\r\n/**\r\n * Export the component.\r\n */\r\nexport default class PageContent extends Component {\r\n // Render the component.\r\n render() {\r\n let {className} = this.props;\r\n let rootStyles = classNames(styles.root, className);\r\n return
\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__CSkaq\",\"pageFooter\":\"styles_pageFooter__SnBvO\",\"flexipurchase\":\"styles_flexipurchase__DwITM\",\"presentor\":\"styles_presentor__0eXWN\",\"bnzLogo\":\"styles_bnzLogo__OyQsG\",\"nabLogo\":\"styles_nabLogo__6KY+a\",\"umb\":\"styles_umb__gY2Cr\",\"fraedom\":\"styles_fraedom__wsLre\",\"visa\":\"styles_visa__ikARs\",\"truist\":\"styles_truist__WXgZz\",\"rights\":\"styles_rights__PclCB\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\nimport classNames from \"classnames\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\nclass PageFooter extends Component {\r\n // Initialize the component.\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n // Render the component.\r\n render() {\r\n let { product } = this.props;\r\n var _style = null;\r\n let rootStyles = null;\r\n switch (product) {\r\n case \"flexipurchase\":\r\n _style = styles.flexipurchase;\r\n rootStyles = classNames(styles.root, styles.pageFooter, _style);\r\n return (\r\n
\r\n );\r\n case \"umb\":\r\n _style = styles.umb;\r\n rootStyles = classNames(styles.root, styles.pageFooter, _style);\r\n return (\r\n
\r\n );\r\n case \"visa\":\r\n _style = styles.visa;\r\n rootStyles = classNames(styles.root, styles.pageFooter, _style);\r\n return (\r\n
\r\n );\r\n case \"truist\":\r\n _style = styles.truist;\r\n rootStyles = classNames(styles.root, styles.pageFooter, _style);\r\n return (\r\n
\r\n );\r\n default:\r\n _style = styles.fraedom;\r\n rootStyles = classNames(styles.root, styles.pageFooter, _style);\r\n return (\r\n
\r\n );\r\n }\r\n }\r\n}\r\nexport default injectIntl(PageFooter);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__kLHSj\",\"hidden\":\"styles_hidden__VVJsb\",\"error\":\"styles_error__HVAiU\",\"input\":\"styles_input__iG5Gm\",\"row\":\"styles_row__kuKtd\",\"supplierName\":\"styles_supplierName__-BYAD\",\"helptext\":\"styles_helptext__cYcHS\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\n\r\nimport Modal from \"../../components/modal/component\";\r\n\r\n/**\r\n * Import components.\r\n */\r\nimport Button from \"@fraedom/DesignSystem-Button/react/dist/button.2.min.js\";\r\nimport Input from \"@fraedom/DesignSystem-Input/react/dist/input.2.min.js\";\r\nimport InputGroup from \"@fraedom/DesignSystem-InputGroup/react/dist/inputGroup.2.min.js\";\r\nimport InputGroupAddon from \"@fraedom/DesignSystem-InputGroupAddon/react/dist/inputGroupAddon.2.min.js\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\n/**\r\n * Export the component.\r\n */\r\nclass LoginView extends Component {\r\n // Initialize the component.\r\n constructor(props) {\r\n super(props);\r\n // Initialize the local component state.\r\n this.state = {\r\n sharedSecret: \"\",\r\n sharedSecretValid: true,\r\n showLogin: true,\r\n isOpen: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n setTimeout(() => {\r\n document.getElementById(\"sharedSecret\").focus();\r\n }, 1000);\r\n }\r\n\r\n // Render the component.\r\n render() {\r\n let {\r\n product,\r\n supplierName,\r\n companyName,\r\n getCardDetails,\r\n incorrectSecret,\r\n locale,\r\n } = this.props;\r\n let { sharedSecret, sharedSecretValid } = this.state;\r\n const isEnabled = sharedSecret.length > 0;\r\n const partnerName =\r\n product.toLowerCase() === \"visa\" ? \"Visa Spend Clarity\" : product;\r\n return (\r\n
\r\n );\r\n }\r\n\r\n renderSwitch = (product) => {\r\n switch (product) {\r\n case \"flexipurchase\":\r\n return (\r\n
\r\n );\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n toggleModal = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen,\r\n });\r\n if (!this.state.isOpen) {\r\n setTimeout(() => {\r\n document.getElementById(\"modal\").tabIndex = -1;\r\n document.getElementById(\"modal\").focus();\r\n }, 1000);\r\n }\r\n };\r\n}\r\n\r\nexport default injectIntl(LoginView);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"cardView\":\"styles_cardView__usz6F\",\"paymentDisclaimer\":\"styles_paymentDisclaimer__2IrX+\",\"cardDetails\":\"styles_cardDetails__aUnLY\",\"info\":\"styles_info__+k3o8\",\"value\":\"styles_value__taCG7\",\"infodata\":\"styles_infodata__5YBwz\",\"details\":\"styles_details__AT7Po\",\"cvvblock\":\"styles_cvvblock__0kVWY\",\"amtblock\":\"styles_amtblock__PNkLa\",\"title\":\"styles_title__mHGKD\",\"cardNumber\":\"styles_cardNumber__NW4iA\",\"root\":\"styles_root__6TOVc\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport InfoCard from \"@fraedom/DesignSystem-InfoCard/react/dist/infoCard.2.min.js\";\r\nimport React, { Component } from \"react\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\n/**\r\n * Export the component.\r\n */\r\nclass CardView extends Component {\r\n componentWillMount() {\r\n setTimeout(() => {\r\n document.getElementById(\"cardDetails\").tabIndex = -1;\r\n document.getElementById(\"cardDetails\").focus();\r\n }, 1000);\r\n }\r\n\r\n getPaymentDisclaimerMessageTextualId(info) {\r\n if (info.PaymentDisclaimer === true || (info.SurchargeDisclaimer === true && info.TerminalLimitDisclaimer === true))\r\n return \"content.paymentDisclaimer\";\r\n\r\n if (info.SurchargeDisclaimer === true && info.TerminalLimitDisclaimer === false)\r\n return \"content.surchargeDisclaimer\";\r\n\r\n if (info.SurchargeDisclaimer === false && info.TerminalLimitDisclaimer === true)\r\n return \"content.terminalLimitDisclaimer\";\r\n\r\n return null\r\n }\r\n\r\n shouldHidePaymentAmount(info) {\r\n return info.PaymentDisclaimer === true || info.SurchargeDisclaimer === true || info.TerminalLimitDisclaimer === true;\r\n }\r\n\r\n // Render the component.\r\n render() {\r\n let { info, card } = this.props;\r\n return (\r\n
\r\n {info.PaymentDisclaimer === true || info.SurchargeDisclaimer === true || info.TerminalLimitDisclaimer === true ? (\r\n
}\r\n closeButton={false}\r\n >\r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{info.PurchaserName}
\r\n
\r\n \r\n
\r\n
{info.AuthorisationId}
\r\n
\r\n \r\n
\r\n
{info.AuthorisationDate}
\r\n\r\n
\r\n
{\" \"}\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{card.CardName}
\r\n
\r\n \r\n
\r\n
{card.CardNumber}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{card.ExpiryDate}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{card.CardCvv}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{card.CardType}
\r\n
\r\n
\r\n {this.shouldHidePaymentAmount(info) ?\r\n null : (\r\n
\r\n
\r\n \r\n
\r\n
{card.PurchaseAmount}
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default injectIntl(CardView);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__uJREu\",\"oopsFrame\":\"styles_oopsFrame__SAyAt\",\"lockedFrame\":\"styles_lockedFrame__FkAb+\",\"sadcard\":\"styles_sadcard__a2kBA\",\"accLocked\":\"styles_accLocked__XyTOL\",\"linehead\":\"styles_linehead__ZXO4E\",\"linefoot\":\"styles_linefoot__T5gAa\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\n\r\nimport styles from \"./styles.module.scss\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\n/**\r\n * Export the component.\r\n */\r\nclass CardErrorView extends Component {\r\n // Render the component.\r\n render() {\r\n let { locked } = this.props;\r\n return (\r\n
\r\n );\r\n }\r\n}\r\nexport default injectIntl(CardErrorView);\r\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"styles_root__v7vva\",\"oopsFrame\":\"styles_oopsFrame__QAa9C\",\"sadcard\":\"styles_sadcard__MsgIQ\",\"linehead\":\"styles_linehead__c38iw\"};","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\nimport styles from \"./styles.module.scss\";\r\nimport { FormattedMessage, injectIntl } from \"react-intl\";\r\n\r\n/**\r\n * Export the component.\r\n */\r\nclass ErrorView extends Component {\r\n // Render the component.\r\n render() {\r\n return (\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default injectIntl(ErrorView);\r\n","/**\r\n * Fraedom (https://github.com/Spendvision/)\r\n *\r\n * Copyright © 2016 Fraedom. All rights reserved.\r\n *\r\n * This source code is licensed under the MIT license found in the\r\n * LICENSE.txt file in the root directory of this source tree.\r\n */\r\n\r\n/**\r\n * Import dependencies.\r\n */\r\nimport React, { Component } from \"react\";\r\nimport { IntlProvider } from \"react-intl\";\r\nimport { hot } from \"react-hot-loader\";\r\n\r\nimport \"./assets/fonts/icomoon/style.css\";\r\nimport styles from \"./styles.module.scss\";\r\n\r\nimport Loader from \"./components/loader/component\";\r\nimport ComponentLoader from \"./components/componentLoader/component\";\r\nimport PageHeader from \"./components/page-header/component\";\r\nimport PageContent from \"./components/page-content/component\";\r\nimport PageFooter from \"./components/page-footer/component\";\r\n\r\nimport LoginView from \"./Views/login-view/component\";\r\nimport CardView from \"./Views/card-view/component\";\r\nimport CardErrorView from \"./Views/card-error-view/component\";\r\nimport ErrorView from \"./Views/error-view/component\";\r\n\r\nconst url = new URL(window.location.href);\r\nconst queryString = new URLSearchParams(url.search);\r\n/**\r\n * Create the component.\r\n */\r\nclass Client extends Component {\r\n // Initialize the component.\r\n constructor(props) {\r\n super(props);\r\n // Initialize the local component state.\r\n this.state = {\r\n isLoading: false,\r\n fetchingWhiteLabel: true,\r\n locale: \"en-gb\",\r\n intlMessages: {},\r\n whiteLabelProduct: \"\",\r\n supplierName: \"\",\r\n companyName: \"\",\r\n incorrectSecret: false,\r\n cardDetails: null,\r\n info: null,\r\n isCardError: false,\r\n isCardLocked: false,\r\n };\r\n\r\n this.handleErrors = this.handleErrors.bind(this);\r\n }\r\n\r\n setLanguageState = (locale, intlMessages) => {\r\n this.setState({\r\n locale: locale,\r\n intlMessages: intlMessages,\r\n });\r\n };\r\n\r\n // Invoked once, both on the client and server, immediately before the initial rendering occurs.\r\n // If you call setState within this method,\r\n // render() will see the updated state and will be executed only once despite the state change.\r\n componentDidMount() {\r\n var siteRoot = this;\r\n var _url = `${\r\n window.appcfg.virtualcardviewer.api.url\r\n }?token=${queryString.get(\"TokenId\")}`;\r\n var _locale = queryString.get(\"LangId\") ?? siteRoot.state.locale;\r\n\r\n import(`../translations/${_locale}.json`)\r\n .then(({ default: response }) => {\r\n siteRoot.setLanguageState(_locale, response);\r\n })\r\n .catch(() => {\r\n import(`../translations/${siteRoot.state.locale}.json`)\r\n .then(({ default: response }) => {\r\n siteRoot.setLanguageState(_locale, response);\r\n })\r\n .catch(() => {\r\n console.error(\"using fallback translations\");\r\n });\r\n });\r\n\r\n fetch(_url, {\r\n cache: \"no-cache\",\r\n headers: {},\r\n method: \"GET\",\r\n mode: \"cors\",\r\n redirect: \"follow\",\r\n referrer: \"no-referrer\",\r\n })\r\n .then(siteRoot.handleErrors)\r\n .then((response) => {\r\n return response.json(); // parses response to JSON\r\n })\r\n .then((responseData) => {\r\n var favicon = document.getElementById(\"favicon\");\r\n favicon.href =\r\n \"../assets/images/\" +\r\n responseData.WhiteLabelBankName.toLowerCase() +\r\n \"/favicon.ico\";\r\n switch (responseData.WhiteLabelBankName.toLowerCase()) {\r\n case \"flexipurchase\":\r\n /* eslint-disable no-unused-expressions */\r\n import(\"./theme.flexipurchase.js\");\r\n break;\r\n case \"umb\":\r\n /* eslint-disable no-unused-expressions */\r\n import(\"./theme.umb.js\");\r\n break;\r\n case \"visa\":\r\n import(\"./theme.visa.js\");\r\n break;\r\n case \"truist\":\r\n import(\"./theme.truist.js\");\r\n break;\r\n default:\r\n /* eslint-disable no-unused-expressions */\r\n import(\"./theme.fraedom.js\");\r\n break;\r\n }\r\n if (\r\n responseData.ErrorInfo !== null &&\r\n responseData.ErrorInfo.ErrorCode !== 0\r\n ) {\r\n siteRoot.setState({\r\n fetchingWhiteLabel: false,\r\n supplierName: \"\",\r\n companyName: \"\",\r\n whiteLabelProduct: responseData.WhiteLabelBankName,\r\n isCardError: true,\r\n });\r\n } else {\r\n siteRoot.setState({\r\n fetchingWhiteLabel: false,\r\n supplierName: responseData.SupplierName,\r\n companyName: responseData.CompanyName,\r\n whiteLabelProduct: responseData.WhiteLabelBankName,\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n console.error(\"error caught:\", error);\r\n siteRoot.setState({\r\n fetchingWhiteLabel: false,\r\n });\r\n });\r\n }\r\n\r\n // Render the component.\r\n render() {\r\n document.title = this.state.whiteLabelProduct;\r\n return (\r\n
\r\n );\r\n }\r\n\r\n getCardDetails = (secret, locale) => {\r\n var rootApp = this;\r\n rootApp.setState({ isLoading: true });\r\n fetch(window.appcfg.virtualcardviewer.api.url, {\r\n cache: \"no-cache\",\r\n headers: new Headers({\r\n \"Content-Type\": \"application/json\",\r\n }),\r\n method: \"POST\",\r\n mode: \"cors\",\r\n redirect: \"follow\",\r\n referrer: \"no-referrer\",\r\n body: JSON.stringify({\r\n token: queryString.get(\"TokenId\"),\r\n protection: secret,\r\n locale: locale\r\n }),\r\n })\r\n .then(rootApp.handleErrors)\r\n .then((response) => {\r\n return response.json(); // parses response to JSON\r\n })\r\n .then((responseData) => {\r\n switch (responseData.ErrorCode) {\r\n case 0:\r\n rootApp.setState({\r\n isLoading: false,\r\n cardDetails: responseData.Card,\r\n info: responseData.Info,\r\n });\r\n break;\r\n case 6:\r\n rootApp.setState({ isLoading: false, incorrectSecret: true });\r\n setTimeout(() => {\r\n document.getElementById(\"incorrectSs\").tabIndex = -1;\r\n document.getElementById(\"incorrectSs\").focus();\r\n }, 100);\r\n break;\r\n case 8:\r\n rootApp.setState({\r\n isLoading: false,\r\n isCardError: true,\r\n isCardLocked: true,\r\n });\r\n break;\r\n default:\r\n rootApp.setState({ isLoading: false, isCardError: true });\r\n break;\r\n }\r\n })\r\n .catch((error) => {\r\n console.error(\"error getting card details:\", error);\r\n rootApp.setState({ isLoading: false, isCardError: true });\r\n });\r\n };\r\n\r\n handleErrors = (response) => {\r\n if (!response.ok) throw Error(response.statusText);\r\n return response;\r\n };\r\n}\r\n\r\nexport default hot(module)(Client);\r\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],t):\"object\"==typeof exports?exports.ds=t(require(\"react\")):e.ds=t(e.React)}(\"undefined\"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,n){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function l(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function u(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var s=Object.assign||function(e){for(var t=1;t