{ "version": 3, "sources": ["../../../../../../internal/esbuild/entrypoints/modern/connect-page.ts", "sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=a51cd3d4-8fd1-4801-b00b-513f10763ada", "../../../../../../internal/esbuild/entrypoints/modern/connect-page.ts", "../../../../../../owl-nest/ulule/features/connect-page/src/index.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/views/BufferPage.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/views/ConnectPage.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/flavours/CDB/index.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/UFE.ts", "../../../../../../owl-nest/ulule/features/connect-page/src/components/Spot.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/flavours/CDB/illustrations.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/flavours/default/index.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/flavours/default/illustrations.tsx", "../../../../../../owl-nest/ulule/features/connect-page/src/utils/index.ts", "../../../../../../owl-nest/ulule/features/connect-page/src/utils/circle.ts"], "sourcesContent": ["\n import \"_sentry-debug-id-injection-stub\";\n import * as OriginalModule from \"./internal/esbuild/entrypoints/modern/connect-page.ts\";\n export default OriginalModule.default;\n export * from \"./internal/esbuild/entrypoints/modern/connect-page.ts\";", ";{try{let e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"b0435595-e123-48fd-97d8-b982c72809ae\",e._sentryDebugIdIdentifier=\"sentry-dbid-b0435595-e123-48fd-97d8-b982c72809ae\")}catch(e){}};", "import '@owl-nest/polyfill'\nimport '@owl-nest/connect-page'\n", "import * as React from 'react'\nimport * as ReactDOM from 'react-dom/client'\n\nimport * as env from '@owl-nest/config'\nimport * as header from '@ulule/header'\nimport * as logger from '@owl-nest/logger'\nimport { initializeLocalization } from '@owl-nest/localize'\nimport * as messages from '@owl-nest/messages'\n\nimport { BufferPage } from './views/BufferPage'\nimport { ConnectPage } from './views/ConnectPage'\n\ninit()\n\nasync function init(): Promise {\n await env.initUserConfig()\n const userConfig = env.getUserConfig()\n\n logger.init({\n dsn: env.SENTRY_PUBLIC_DSN,\n environment: env.ENVIRONMENT,\n user: {\n country: env.USER_COUNTRY,\n locale: userConfig.lang,\n },\n })\n logger.setTag('feature', 'connect-page')\n\n // TODO: Attach a listener to update Sentry context once user is available?\n // Thing is, this is very limited since we ARE on the auth page, but could\n // be useful for post-auth errors.\n\n await initializeLocalization(userConfig.lang, env.LOCALE_FILES[userConfig.lang])\n\n const urlParams = new URLSearchParams(window.location.search)\n const context = urlParams.get('context') ?? undefined\n const nextURL = urlParams.get('next') ?? undefined\n const resetRequested = urlParams.get('resetRequested')\n if (resetRequested) {\n urlParams.delete('resetRequested')\n const newURL = `${window.location.pathname}?${urlParams.toString()}`\n window.history.replaceState({}, '', newURL)\n }\n\n renderHeader()\n renderConnectApp(context, nextURL, Boolean(resetRequested))\n renderBuffer(nextURL)\n}\n\nfunction renderConnectApp(context: string | undefined, nextURL: string | undefined, resetRequested: boolean): void {\n const appContainer = document.querySelector('#js-signin') || document.querySelector('#js-signup')\n if (appContainer) {\n const root = ReactDOM.createRoot(appContainer)\n root.render(\n \n \n \n ,\n )\n }\n}\n\nfunction renderBuffer(nextURL?: string): void {\n const appContainer = document.querySelector('#js-complete')\n if (appContainer) {\n const root = ReactDOM.createRoot(appContainer)\n root.render()\n }\n}\n\nfunction renderHeader(): void {\n const headerContainer = document.querySelector('#react-ulule-header')\n\n if (headerContainer) {\n const headerRoot = ReactDOM.createRoot(headerContainer)\n headerRoot.render()\n } else {\n logger.err('[connect-page] Header container is missing')\n }\n}\n", "import * as React from 'react'\n\nimport { Formik, Field, FieldProps } from 'formik'\nimport styled, { createGlobalStyle } from 'styled-components'\n\nimport { markUserKnown } from '@owl-nest/auth'\nimport * as env from '@owl-nest/config'\nimport { thirdPartyProvider } from '@owl-nest/connect'\nimport { t, tc } from '@owl-nest/localize'\nimport * as models from '@owl-nest/models'\nimport * as plume from '@ulule/owl-kit-components/next'\nimport * as services from '@owl-nest/services'\n\ntype BufferPageProps = {}\n\ntype Form = {\n privacy: boolean\n terms: boolean\n}\n\nexport function BufferPage({}: BufferPageProps) {\n const auth = services.user.useAuth({\n onLogout: () => {\n if (typeof window !== 'undefined') {\n window.location.href = env.SIGNIN_URL\n }\n },\n })\n const [isConsentingUser, setIsConsentingUser] = React.useState(null)\n\n const provider = React.useMemo(() => {\n let storedProvider\n storedProvider = thirdPartyProvider.recallThirdPartyProvider()\n if (!storedProvider) {\n storedProvider = document.location.pathname.split('/')[3]\n }\n\n switch (storedProvider) {\n case 'facebook':\n return 'Facebook'\n case 'google':\n return 'Google'\n default:\n return ''\n }\n }, [])\n\n React.useEffect(() => {\n if (auth.type === 'loggedin') {\n if (auth.user.eula_accepted_at && !eulaAcceptanceIsWithinOneMinute(auth.user.eula_accepted_at)) {\n setIsConsentingUser(true)\n markUserKnown(auth.user)\n if (typeof window !== 'undefined') {\n window.location.href = env.JOIN_COMPLETE_URL\n }\n }\n }\n }, [auth.type])\n\n return (\n <>\n \n \n {auth.type !== 'loggedin' && }\n {auth.type === 'loggedin' && isConsentingUser && (\n <>\n {t('Signing in')}\n \n {t('You will be redirected in a few moments.')}\n \n {tc('If you are not redirected, [link: click here]', {\n link: ,\n })}\n \n \n )}\n {auth.type === 'loggedin' && !isConsentingUser && (\n <>\n {t('Complete your sign-up')}\n \n \n onSubmit={() => {\n markUserKnown(auth.user)\n if (typeof window !== 'undefined') {\n window.location.href = env.JOIN_COMPLETE_URL\n }\n }}\n initialValues={{ privacy: false, terms: false }}\n >\n {({ handleSubmit }) => {\n return (\n
\n \n {({ field, meta }: FieldProps) => {\n return (\n \n ),\n },\n )}\n checked={field.value}\n error={meta.touched ? meta.error : undefined}\n name={field.name}\n onBlur={field.onBlur}\n onChange={field.onChange}\n />\n )\n }}\n \n \n {({ field, meta }: FieldProps) => {\n return (\n \n )\n }}\n \n \n {t('Continue')}\n \n \n auth.logout()} kind=\"secondary\">\n {t('Cancel sign-up')}\n \n \n
\n )\n }}\n \n \n )}\n
\n \n )\n}\n\nfunction eulaAcceptanceIsWithinOneMinute(eulaAcceptanceDate: string): boolean {\n const givenDate = new Date(eulaAcceptanceDate)\n const currentDate = new Date()\n const minutesDifference = (currentDate.getTime() - givenDate.getTime()) / (1000 * 60)\n return minutesDifference <= 1\n}\n\nfunction validateRequiredField(value: boolean): string | undefined {\n if (!value) {\n return t('This field is required')\n }\n}\n\nconst GlobalStyle = createGlobalStyle`\n body {\n background-color: ${plume.COLORS.PRIMARY_SAND_100};\n }\n`\n\nconst Container = styled.div`\n align-items: center;\n background: ${plume.COLORS.PRIMARY_GREY_000};\n border-radius: 16px;\n box-shadow: ${plume.EFFECTS.SHADOW_3};\n display: flex;\n flex-direction: column;\n gap: 16px;\n justify-content: center;\n padding: 32px;\n max-width: 600px;\n margin: auto 32px;\n\n ${plume.UserLabel} {\n align-self: baseline;\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n margin: 0 auto;\n }\n`\n\nconst Form = styled.form`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`\n\nconst InformationalText = styled(plume.styles.copy.S)`\n align-self: center;\n color: ${plume.COLORS.TEXT_TERTIARY};\n font-weight: 600; /* HACK: Irregular font manipulation. We'll be adding copy.S.semiBold, so this is just by anticipation. */\n`\n", "import * as React from 'react'\nimport styled, { createGlobalStyle, css } from 'styled-components'\n\nimport type * as api from '@owl-nest/api-client/latest'\nimport { Connect } from '@owl-nest/connect'\nimport * as env from '@owl-nest/config'\nimport * as layout from '@owl-nest/layout'\nimport { t } from '@owl-nest/localize'\nimport * as messages from '@owl-nest/messages'\nimport * as plume from '@ulule/owl-kit-components/next'\nimport * as services from '@owl-nest/services'\n\nimport { CampDeBase, CampDeBaseOwl } from '../flavours/CDB'\nimport { MakeGoodThingsHappen } from '../flavours/default'\nimport { circle } from '../utils'\n\ntype ConnectPageProps = {\n context?: string\n nextURL?: string\n resetRequested: boolean\n}\n\nexport function ConnectPage({ context, nextURL, resetRequested = false }: ConnectPageProps): React.ReactElement {\n const auth = services.user.useAuth()\n const userLang = env.getUserConfig().lang\n const messenger = messages.useMessage()\n\n React.useEffect(() => {\n if (resetRequested) {\n messenger.confirm({\n context: 'password-reset',\n message: t(\n \"Your password has been reset successfully. We've e-mailed you the instructions to obtain a new password. You should be receiving it shortly.\",\n ),\n type: 'toast',\n forceClose: true,\n })\n }\n }, [])\n\n const defaultTitle = t('Log in or sign up')\n const [title, setTitle] = React.useState(defaultTitle)\n React.useEffect(() => {\n if (auth.type === 'loggedin' && typeof window !== 'undefined' && nextURL) {\n window.location.href = nextURL\n }\n\n if (auth.type === 'existing' || auth.type === 'known') {\n setTitle(t('Log in'))\n } else if (auth.type === 'new') {\n setTitle(t('Sign up'))\n } else {\n setTitle(defaultTitle)\n }\n }, [auth.type])\n\n return (\n <>\n \n \n \n \n \n {context === 'campdebase' ? (\n <CampDeBaseOwl width={40} />\n ) : (\n <plume.logos.ulule.OwlOnlyLogo height={36} width={36} />\n )}\n <plume.styles.heading.M>{title}</plume.styles.heading.M>\n \n \n \n \n {context === 'campdebase' ? : }\n \n