{"version":3,"sources":["service-worker.ts","components/common/Toast/Toast.tsx","components/google-tag-manager/gtmInit.tsx","App.tsx","components/common/Loading/Loading.tsx","index.tsx","const/env.ts","utils/i18n/loadLanguages.ts","utils/browserServerSwitch.ts","utils/i18n/i18n.ts","utils/history.ts","components/common/Loading/Loading.module.scss","Providers/ToastProvider.tsx","components/common/Toast/Toast.module.scss","utils/qa.ts","utils/utils.ts"],"names":["Boolean","window","location","hostname","match","Toast","_ref","type","message","react_default","a","createElement","className","classNames","Styles","toastContainer","icon-ab-warning-circle-filled","icon-ab-warning-filled","icon-ab-check-circle-filled","toastMessage","data-qa-id","qa","script","concat","process","GoogleTagManagerInit","react","Helmet","NotFoundPage","lazy","__webpack_require__","e","then","bind","InvalidRequestPage","Promise","all","ServerIssuesPage","LoginPage","SelfRegistrationPage","ForgotPasswordPage","ResetPasswordPage","AlreadyAuthenticatedPage","InvitationPage","validPathRegex","RegExp","App","props","_this","Object","classCallCheck","this","_super","call","addInternalUserCookie","internal_user","fromEntries","URLSearchParams","search","internalUserLocalStorage","localStorage","getItem","internalUserCookie","getCookie","setItem","document","cookie","Date","toUTCString","redirectToTargetPath","searchParam","targetPath","get","test","delete","history","replace","toString","state","initialized","_callee","_this2","regenerator_default","wrap","_context","prev","next","t0","module","default","taskRunner","t1","sent","t2","setState","i18nInstance","on","stop","_this$context","context","isDisplayed","gtmInit_GoogleTagManagerInit","t","common_Toast_Toast","config_provider","theme","algorithm","darkAlgorithm","token","react_router","exact","path","component","render","to","pathname","React","Component","contextType","ToastContext","Loading","loadingContainer","loadingFlag","loadingIcon","loadingInfo","gtmId","TagManager","initialize","ReactDOM","fallback","common_Loading_Loading","I18nextProvider","i18n","ToastProvider","src_App","getElementById","navigator","serviceWorker","ready","registration","unregister","d","__webpack_exports__","apiUrl","apiUrlCustomerPortal","publisherNamespace","legalWebURL","isCaptchaValidationEnabled","isSelfRegistrationEnabled","isDisplayNameDisabled","isUsernameDisabled","adminPortalClientId","loadLanguages","en-US","isOnBrowser","error","languageLocalStorageKey","availableLanguageCodes","config","languageCodes","translationResource","reduce","resources","languageCode","translation","flatten","unflatten","loadedLanguages","i18next","use","initReactI18next","createInstance","lng","currentLanguageCode","includes","defaultLanguage","getLocalStorageLanguage","fallbackLng","fallbackLanguage","preload","initImmediate","debug","key","options","getCurrentLanguage","language","history__WEBPACK_IMPORTED_MODULE_0__","createBrowserHistory","basename","exports","spin","createContext","displayToast","timeout","children","_useState","useState","_useState2","_workspace_justice_login_website_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__","setIsDisplayed","_useState3","_useState4","setMessage","_useState5","_useState6","setType","react__WEBPACK_IMPORTED_MODULE_1___default","Provider","value","clearTimeout","setTimeout","qaProps","classnames__WEBPACK_IMPORTED_MODULE_0__","classnames__WEBPACK_IMPORTED_MODULE_0___default","n","qaId","apply","arguments","getTimestampInSeconds","Math","floor","now","isCaptchaEnabled","String","isSelfRegistrationEnabledEnv","orderByMostCommonCountry","countries","specialCountry","countryAlias","United States","United Kingdom","sort","_prev$name","prevIndex","indexOf","name","nextIndex","localeCompare","map","country","_workspace_justice_login_website_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__","_step","namePattern","_iterator","_createForOfIteratorHelper","split","s","done","trim","substring","length","err","f"],"mappings":"wVAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MAAM,kLCoBpBC,EAjBD,SAAAC,GAA8B,IAA3BC,EAA2BD,EAA3BC,KAAMC,EAAqBF,EAArBE,QACrB,OACEC,EAAAC,EAAAC,cAAA,OAAKC,UAAWC,IAAWC,IAAOC,iBAChCN,EAAAC,EAAAC,cAAA,KACEC,UAAWC,IAAW,OAAQ,CAC5BG,gCAA0C,UAATT,EACjCU,yBAAmC,YAATV,EAC1BW,8BAAwC,YAATX,MAGnCE,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,KAFpC9I,EAASA,EAAOsL,QAELd,QAAQQ,GACjB,OAAOhL,EAAOuL,UAAUP,EAAYQ,SARF,MAAAC,GAAAR,EAAApN,EAAA4N,GAAA,QAAAR,EAAAS,IAYtC,OAAO","file":"static/js/main.8041b0ff.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\n// register() is not called by default.\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 subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\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(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: 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 as { env: { [key: string]: string } }).env.PUBLIC_URL, window.location.href);\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://bit.ly/CRA-PWA\"\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === \"installed\") {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n \"New content is available and will be used when all \" +\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\n );\n\n // Execute callback\n if (config && 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 && 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: string, config?: 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 const contentType = response.headers.get(\"content-type\");\n if (response.status === 404 || (contentType != null && contentType.indexOf(\"javascript\") === -1)) {\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(\"No internet connection found. App is running in offline mode.\");\n });\n}\n\nexport function unregister() {\n if (\"serviceWorker\" in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","/*\n *\n * * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved.\n * * This is licensed software from AccelByte Inc, for limitations\n * * and restrictions contact your company contract manager.\n *\n */\n\nimport { default as React } from \"react\";\nimport { default as Styles } from \"./Toast.module.scss\";\nimport { default as classNames } from \"classnames\";\nimport { qa } from \"../../../utils/qa\";\n\nexport type ToastType = \"error\" | \"warning\" | \"success\";\n\ninterface Props {\n type: ToastType;\n message: string;\n}\n\nconst Toast = ({ type, message }: Props) => {\n return (\n
\n \n
\n {message}\n
\n
\n );\n};\n\nexport default Toast;\n","/*\n * Copyright (c) 2021 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport * as React from \"react\";\nimport { Helmet } from \"react-helmet\";\n\nconst googleTagManagerId = process.env.GOOGLE_TAG_MANAGER_ID || \"\";\n\nconst script = `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','${googleTagManagerId}');`;\n\nexport const GoogleTagManagerInit = () =>\n (googleTagManagerId !== \"\" && (\n \n \n \n )) ||\n null;\n","/*\n *\n * * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved.\n * * This is licensed software from AccelByte Inc, for limitations\n * * and restrictions contact your company contract manager.\n *\n */\n\nimport { default as React, lazy } from \"react\";\nimport { Redirect, Route, RouteProps, Switch } from \"react-router-dom\";\nimport { Helmet } from \"react-helmet\";\nimport Toast from \"./components/common/Toast/Toast\";\nimport { ToastContext } from \"./Providers/ToastProvider\";\nimport { i18nInstance, t } from \"./utils/i18n/i18n\";\nimport { GoogleTagManagerInit } from \"./components/google-tag-manager/gtmInit\";\nimport history from \"./utils/history\";\nimport { ConfigProvider, theme } from \"antd\";\nimport token from \"./tokens.json\";\nimport { getCookie } from \"./utils/utils\";\n\nconst NotFoundPage = lazy(() => import(\"./components/error-pages/NotFoundPage/NotFoundPage\"));\nconst InvalidRequestPage = lazy(() => import(\"./components/error-pages/InvalidRequestPage/InvalidRequestPage\"));\nconst ServerIssuesPage = lazy(() => import(\"./components/error-pages/ServerIssuesPage/ServerIssuesPage\"));\nconst LoginPage = lazy(() => import(\"./components/LoginPage/LoginPage\"));\nconst SelfRegistrationPage = lazy(() => import(\"./components/SelfRegistrationPage/SelfRegistrationPage\"));\nconst ForgotPasswordPage = lazy(() => import(\"./components/ForgotPasswordPage/ForgotPasswordPage\"));\nconst ResetPasswordPage = lazy(() => import(\"./components/ResetPasswordPage/ResetPasswordPage\"));\nconst AlreadyAuthenticatedPage = lazy(() =>\n import(\"./components/error-pages/AlreadyAuthenticatedPage/AlreadyAuthenticatedPage\")\n);\nconst InvitationPage = lazy(() => import(\"./components/InvitationPage/InvitationPage\"));\n\ninterface Props {}\n\ninterface State {\n initialized: boolean;\n}\n\nconst validPathRegex = new RegExp(\"^\\\\/?([A-z0-9\\\\-_]+\\\\/)*([A-z0-9\\\\-_]+|)$\");\n\nclass App extends React.Component {\n static contextType = ToastContext;\n constructor(props: Props) {\n super(props);\n this.state = {\n initialized: false,\n };\n }\n\n async componentDidMount(): Promise {\n await Promise.all([\n await import(\"./app-tasks\")\n .then((module) => module.default)\n .then((taskRunner) => taskRunner()),\n ]).then(() => this.setState({ initialized: true }));\n i18nInstance.on(\"languageChanged\", () => this.setState({}));\n\n this.addInternalUserCookie();\n this.redirectToTargetPath();\n }\n\n addInternalUserCookie = () => {\n const { internal_user } = Object.fromEntries(new URLSearchParams(window.location.search));\n const internalUserLocalStorage = localStorage.getItem(\"internal_user\");\n const internalUserCookie = getCookie(\"internal_user\");\n\n if (internal_user !== \"true\" && internalUserLocalStorage !== \"true\" && internalUserCookie !== \"true\") {\n return;\n }\n\n if (internalUserLocalStorage !== \"true\" || internalUserCookie !== \"true\") {\n localStorage.setItem(\"internal_user\", \"true\");\n }\n\n document.cookie = `internal_user=true; path=/; expires=${new Date(2147483647 * 1000).toUTCString()}`;\n };\n\n redirectToTargetPath = () => {\n const searchParam = new URLSearchParams(window.location.search);\n const targetPath = searchParam.get(\"target_auth_page\");\n if (!targetPath) return;\n\n if (!validPathRegex.test(targetPath)) {\n history.replace(\"/error/400\");\n return;\n }\n searchParam.delete(\"target_auth_page\");\n history.replace(`${targetPath}?${searchParam.toString()}`);\n };\n\n render() {\n const { message, isDisplayed, type } = this.context;\n const modifyDocumentHead = () => {\n return (\n \n {t(\"App.title\")}\n \n );\n };\n return (\n
\n {process.env.NODE_ENV !== \"development\" && }\n {modifyDocumentHead()}\n {isDisplayed && }\n \n \n \n \n \n \n \n \n \n \n \n (\n \n )}\n />\n ;\n \n \n
\n );\n }\n}\n\nexport default App;\n","/*\n *\n * * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved.\n * * This is licensed software from AccelByte Inc, for limitations\n * * and restrictions contact your company contract manager.\n *\n */\n\nimport { default as React } from \"react\";\nimport { default as Styles } from \"./Loading.module.scss\";\n\nconst Loading = () => {\n return (\n
\n
\n \n Please wait...\n
\n
\n );\n};\n\nexport default Loading;\n","/*\n *\n * * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved.\n * * This is licensed software from AccelByte Inc, for limitations\n * * and restrictions contact your company contract manager.\n *\n */\n\nimport { default as React, Suspense } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Router } from \"react-router-dom\";\nimport history from \"./utils/history\";\nimport * as serviceWorker from \"./service-worker\";\nimport App from \"./App\";\nimport Loading from \"./components/common/Loading/Loading\";\nimport \"./styles/index.scss\";\nimport { default as ToastProvider } from \"./Providers/ToastProvider\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { i18nInstance } from \"./utils/i18n/i18n\";\nimport TagManager from \"react-gtm-module\";\nimport { gtmId } from \"./const/env\";\n\nif (gtmId) {\n TagManager.initialize({\n gtmId,\n });\n}\n\nReactDOM.render(\n }>\n \n \n \n \n \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: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","/*\n * Copyright (c) 2019. AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nexport const apiUrl = process.env.JUSTICE_BASE_URL || \"https://internal.gamingservices.accelbyte.io\";\nexport const apiUrlCustomerPortal =\n process.env.JUSTICE_BASE_URL_CUSTOMER_PORTAL || \"https://dev.customerportal.accelbyte.io\";\nexport const publisherNamespace = process.env.JUSTICE_PUBLISHER_NAME || \"accelbyte\";\nexport const legalWebURL = process.env.JUSTICE_LEGAL_WEB_URL || \"/legal\";\nexport const isCaptchaValidationEnabled = process.env.JUSTICE_LOGINWEB_ENABLE_CAPTCHA_VALIDATION || \"false\";\nexport const isSelfRegistrationEnabled = process.env.JUSTICE_LOGINWEB_ENABLE_SELF_REGISTRATION || \"false\";\nexport const isDisplayNameDisabled = process.env.JUSTICE_LOGINWEB_DISABLE_DISPLAY_NAME || \"false\";\nexport const isUsernameDisabled = process.env.JUSTICE_LOGINWEB_DISABLE_USER_NAME || \"false\";\nexport const adminPortalClientId = process.env.JUSTICE_ADMINPORTAL_CLIENT_ID || \"\";\nexport const gtmId = process.env.GOOGLE_TAG_MANAGER_ID || \"\";\nexport const apiUrlCountry =\n process.env.JUSTICE_API_URL_COUNTRY ||\n \"https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/master/countries.json\";\n","/*\n * Copyright (c) 2019 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport enUS from \"./translations/en-US.json\";\n\nexport default {\n \"en-US\": enUS,\n};\n\nexport const languageMap = {\n \"en-US\": \"English\",\n};\n","/*\n * Copyright (c) 2019 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nexport function isOnBrowser() {\n try {\n if (window) {\n return true;\n }\n // eslint-disable-next-line\n } catch (error) {}\n return false;\n}\n\nexport function runOnBrowserOnly(func: Function) {\n if (isOnBrowser()) {\n return func();\n }\n return undefined;\n}\n\nexport function runOnServerOnly(func: Function) {\n if (!isOnBrowser()) {\n return func();\n }\n return undefined;\n}\n","/*\n * Copyright (c) 2019 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport flatten from \"flat\";\nimport i18next from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport config from \"./config.json\";\nimport loadedLanguages, { languageMap } from \"./loadLanguages\";\nimport { isOnBrowser } from \"../browserServerSwitch\";\n\nconst languageLocalStorageKey = \"i18nextLng\";\nconst availableLanguageCodes = config.languageCodes;\nconst translationResource = availableLanguageCodes.reduce((resources: any, languageCode: any) => {\n // eslint-disable-next-line no-param-reassign\n resources[languageCode] = {\n // Loading unflattened resource\n translation: flatten.unflatten(loadedLanguages[languageCode]),\n };\n return resources;\n}, {});\n\nfunction getLocalStorageLanguage(): string {\n if (isOnBrowser()) {\n const currentLanguageCode = localStorage.getItem(languageLocalStorageKey);\n if (currentLanguageCode && availableLanguageCodes.includes(currentLanguageCode)) {\n return currentLanguageCode;\n }\n }\n return config.defaultLanguage;\n}\n\nfunction setLocalStorageLanguage(language: string) {\n if (isOnBrowser()) {\n localStorage.setItem(languageLocalStorageKey, language);\n }\n}\n\nexport const i18nInstance = i18next.use(initReactI18next).createInstance(\n {\n lng: getLocalStorageLanguage(),\n fallbackLng: config.fallbackLanguage,\n preload: availableLanguageCodes,\n resources: translationResource,\n initImmediate: false,\n debug: process.env.NODE_ENV === \"development\",\n },\n () => {}\n); // Do not remove the callback. It will break the i18n\n\ni18nInstance.on(\"languageChanged\", () => {\n setLocalStorageLanguage(i18nInstance.language);\n});\n\nexport function t(key: string, options?: any) {\n return i18nInstance.t(key, options);\n}\n\nexport function getCurrentLanguage() {\n return i18nInstance.language;\n}\n\nexport async function changeLanguage(language: string) {\n await new Promise((resolve) => {\n i18nInstance.changeLanguage(language, resolve);\n });\n}\nexport function getAvailableLanguageCodes() {\n return availableLanguageCodes;\n}\n\ninterface LangMap {\n [languageCode: string]: string;\n}\nexport function getAvailableLanguageMap(): LangMap {\n return Object.keys(languageMap)\n .filter((languageCode) => availableLanguageCodes.includes(languageCode))\n .reduce((object, languageCode) => {\n return {\n ...object,\n [languageCode]: languageMap[languageCode],\n };\n }, {});\n}\n","/*\n * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport { createBrowserHistory } from \"history\";\n\nconst basename = \"/auth/\";\nconst history = createBrowserHistory({\n basename,\n});\n\nexport default history;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loadingContainer\":\"Loading_loadingContainer__K5QeW\",\"loadingFlag\":\"Loading_loadingFlag__RFcqa\",\"loadingIcon\":\"Loading_loadingIcon__szS_s\",\"spin\":\"Loading_spin__2rV1U\",\"loadingInfo\":\"Loading_loadingInfo__u6qxV\"};","/*\n *\n * * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved.\n * * This is licensed software from AccelByte Inc, for limitations\n * * and restrictions contact your company contract manager.\n *\n */\n\nimport { default as React, createContext, useState, ReactNode } from \"react\";\nimport { ToastType } from \"../components/common/Toast/Toast\";\n\ninterface Props {\n children: ReactNode;\n}\nexport interface ToastContextValue {\n isDisplayed: boolean;\n message: string;\n type: ToastType;\n displayToast: Function;\n}\nexport const ToastContext = createContext({\n isDisplayed: false,\n message: \"\",\n type: \"success\",\n displayToast: () => null,\n});\n\nconst ToastProvider = ({ children }: Props) => {\n let timeout: any;\n const [isDisplayed, setIsDisplayed] = useState(false);\n const [message, setMessage] = useState(\"\");\n const [type, setType] = useState(\"success\");\n\n const displayToast = (message: string, type: ToastType) => {\n clearTimeout(timeout);\n setType(type);\n setMessage(message);\n setIsDisplayed(true);\n timeout = setTimeout(() => setIsDisplayed(false), 5000);\n };\n\n return {children};\n};\n\nexport default ToastProvider;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"toastContainer\":\"Toast_toastContainer__2DVyq\",\"toastMessage\":\"Toast_toastMessage__1YI-l\"};","/*\n * Copyright (c) 2018-2019 AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport { default as classNames } from \"classnames\";\n\nexport function qa(qaId: string) {\n if (process.env.JUSTICE_LOGINWEB_DISABLE_DATAQA === \"true\") {\n return null;\n }\n return qaId;\n}\n\nexport function qaProps(...qaValue: any[]) {\n if (process.env.JUSTICE_LOGINWEB_DISABLE_DATAQA === \"true\") {\n return null;\n }\n return classNames(...qaValue);\n}\n","/*\n * Copyright (c) 2020. AccelByte Inc. All Rights Reserved\n * This is licensed software from AccelByte Inc, for limitations\n * and restrictions contact your company contract manager.\n */\n\nimport { Country } from \"../api/models/country\";\nimport {\n isCaptchaValidationEnabled,\n isDisplayNameDisabled as isDisplayNameDisabledEnv,\n isUsernameDisabled as isUsernameDisabledEnv,\n isSelfRegistrationEnabled as isSelfRegistrationEnabledEnv,\n} from \"../const/env\";\n\nexport const getDayCountOfMonthOrDefault = (year: number, month: number, defaultCount = 31) => {\n try {\n return new Date(year, month, 0).getDate() || defaultCount;\n } catch {\n return defaultCount;\n }\n};\n\nexport function getTimestampInSeconds() {\n return Math.floor(Date.now() / 1000);\n}\n\nexport function isUsernameEnabled() {\n return String(isUsernameDisabledEnv) !== \"true\";\n}\n\nexport function isDisplayNameEnabled() {\n return String(isDisplayNameDisabledEnv) !== \"true\";\n}\n\nexport function isCaptchaEnabled() {\n return String(isCaptchaValidationEnabled) === \"true\";\n}\n\nexport function isSelfRegistrationEnabled() {\n return String(isSelfRegistrationEnabledEnv) === \"true\";\n}\n\nexport const orderByMostCommonCountry = (countries: Country[]) => {\n const specialCountry = [\n \"United States\",\n \"Canada\",\n \"United Kingdom\",\n \"Australia\",\n \"Germany\",\n \"Japan\",\n \"China\",\n \"South Korea\",\n ];\n\n const countryAlias: { [key: string]: string } = {\n \"United States\": \"USA\",\n \"United Kingdom\": \"UK\",\n };\n\n return countries\n .sort((prev, next) => {\n const prevIndex = specialCountry.indexOf(prev.name || \"\");\n const nextIndex = specialCountry.indexOf(next.name || \"\");\n\n if (prevIndex === -1 && nextIndex === -1) {\n return prev?.name?.localeCompare(next?.name || \"\");\n }\n\n if (prevIndex === -1) return 1;\n if (nextIndex === -1) return -1;\n\n return prevIndex - nextIndex;\n })\n .map((country) => ({\n ...country,\n name: country.name + (countryAlias[country.name || \"\"] ? ` (${countryAlias[country.name || \"\"]})` : \"\"),\n }));\n};\n\nexport function getCookie(name: string) {\n const namePattern = name + \"=\";\n const cookies = document.cookie.split(\";\");\n\n for (let cookie of cookies) {\n cookie = cookie.trim();\n\n if (cookie.indexOf(namePattern) === 0) {\n return cookie.substring(namePattern.length);\n }\n }\n\n return null;\n}\n"],"sourceRoot":""}