{ "version": 3, "sources": ["../../../../../../internal/esbuild/entrypoints/modern/newsletter.ts", "sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=bb40e37e-43f5-4b9c-8cf4-0c16aff9c3c9", "../../../../../../internal/esbuild/entrypoints/modern/newsletter.ts", "../../../../../../owl-nest/ulule/features/newsletter/src/index.tsx", "../../../../../../owl-nest/ulule/features/newsletter/src/Newsletter.tsx", "../../../../../../owl-nest/common/newsletter-subscription/index.ts", "../../../../../../owl-nest/common/newsletter-subscription/src/component.tsx", "../../../../../../owl-nest/common/newsletter-subscription/src/hook.tsx"], "sourcesContent": ["\n import \"_sentry-debug-id-injection-stub\";\n import * as OriginalModule from \"./internal/esbuild/entrypoints/modern/newsletter.ts\";\n export default OriginalModule.default;\n export * from \"./internal/esbuild/entrypoints/modern/newsletter.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]=\"66c87a96-f0f0-4cf8-a7ab-ff8d0a62ec26\",e._sentryDebugIdIdentifier=\"sentry-dbid-66c87a96-f0f0-4cf8-a7ab-ff8d0a62ec26\")}catch(e){}};", "import '@owl-nest/polyfill'\nimport '@owl-nest/newsletter'\n", "import * as React from 'react'\nimport * as ReactDOM from 'react-dom/client'\nimport { BrowserRouter as Router } from 'react-router-dom'\n\nimport { LegacyCompatibleHeader } from '@ulule/header'\nimport { initializeLocalization } from '@owl-nest/localize'\nimport * as logger from '@owl-nest/logger'\nimport * as layout from '@owl-nest/layout'\nimport * as env from '@owl-nest/config'\n\nimport { Newsletter } from './Newsletter'\n\nrenderApp()\n\nasync function renderApp(): Promise {\n await env.initUserConfig()\n const userConfig = await env.getUserConfig()\n\n await initializeLocalization(userConfig.lang, env.LOCALE_FILES[userConfig.lang])\n const newsletterAppContainer = document.querySelector('#js-newsletter')\n\n if (newsletterAppContainer) {\n const appRoot = ReactDOM.createRoot(newsletterAppContainer)\n appRoot.render()\n } else {\n logger.err('Newsletter container is missing')\n }\n\n const headerContainer = document.querySelector('#react-ulule-header')\n\n // Router is needed as it is a dependency for partnership tracking. Not ideal.\n if (headerContainer) {\n const headerRoot = ReactDOM.createRoot(headerContainer)\n headerRoot.render(\n \n \n ,\n )\n } else {\n logger.err('Header container is missing')\n }\n\n const footerContainer = document.querySelector('#react-ulule-footer')\n\n if (footerContainer) {\n const headerRoot = ReactDOM.createRoot(footerContainer)\n headerRoot.render()\n } else {\n logger.err('Footer container is missing')\n }\n}\n", "import * as React from 'react'\nimport styled from 'styled-components'\n\nimport { t } from '@owl-nest/localize'\n\nimport * as plume from '@ulule/owl-kit-components/next'\nimport { NewsletterBlock } from '@owl-nest/newsletter-subscription'\nimport * as env from '@owl-nest/config'\n\nexport function Newsletter(): React.ReactElement {\n const userConfig = env.useUserEnv()\n const locale = userConfig.lang\n const country = env.USER_COUNTRY\n\n return (\n \n \n {t('Ulule Newsletter')}\n \n \n \n \n \n )\n}\n\nconst Content = styled.div`\n display: flex;\n margin: 50px auto;\n max-width: 1100px;\n padding: 0 16px;\n\n @media screen and ${plume.BREAKPOINTS.LAPTOP} {\n padding: 0 80px;\n }\n`\n\nconst NewsletterTitle = styled(plume.styles.heading.XL)`\n color: ${plume.COLORS.PRIMARY_WHITE};\n font-family: ${plume.FONTS.EMPHASIS_FONT};\n font-size: 50px;\n font-style: italic;\n font-weight: 900;\n line-height: 1.1;\n\n @media screen and (min-width: 768px) {\n font-size: 80px;\n min-width: 445px;\n }\n`\n\nconst Wrapper = styled.div`\n ${plume.SkewedBanner} {\n background-color: ${plume.COLORS.PRIMARY_BLUE};\n margin-bottom: 22px;\n padding: 10% 8%;\n\n @media screen and ${plume.BREAKPOINTS.LAPTOP} {\n padding-top: 10em;\n padding-bottom: 4em;\n }\n }\n\n ${NewsletterTitle} {\n max-width: 1100px;\n margin: 0 auto;\n }\n`\n", "export { NewsletterBlock } from './src/component'\nexport { useNewsLetterSubscription } from './src/hook'\n", "import * as React from 'react'\nimport styled from 'styled-components'\n\nimport * as env from '@owl-nest/config'\nimport { t, tc } from '@owl-nest/localize'\n\nimport * as plume from '@ulule/owl-kit-components/next'\n\nimport { useNewsLetterSubscription } from './hook'\n\ntype NewsletterBlockComponentProps = {\n className?: string\n country: string\n locale: string\n}\n\nfunction NewsletterBlockComponent({ className, country, locale }: NewsletterBlockComponentProps): React.ReactElement {\n const [isToggled, setIsToggled] = React.useState(false)\n const [email, setEmail] = React.useState('')\n\n const { handleSubscription, isLoading, status } = useNewsLetterSubscription()\n\n return (\n \n {t('Join the Ulule community!')}\n {t('Subscribe to receive the best of Ulule in your inbox every week.')}\n \n {\n e.preventDefault()\n }}\n >\n setEmail(e.target.value)} placeholder={t('Enter your e-mail address')} />\n handleSubscription(country, email, locale)} size=\"medium\">\n {t('Subscribe')}\n \n \n {status && (\n \n {status === 'success' &&\n t('Thank you for your registration! You will receive an email to confirm your registration.')}\n {status === 'error' && t('This email is not valid, please correct it.')}\n {status === 'info' && t('This email is not valid, please correct it.')}\n \n )}\n setIsToggled(!isToggled)}>\n {t('We will only use your email address to send you our newsletter.')}{' '}\n {isToggled ? t('Show less') : t('Learn more')}\n \n \n \n {tc(\n 'Ulule collects your data to send you our newsletter. Depending on the purpose of each treatment, you have certain rights (right of opposition, right of access to your data, right to rectify and erase your data, right to define the fate of your data after your death). To exercise these rights, write to privacy@ulule.com or ULULE SAS, %(ululePostalAddress)s or, for certain rights, go directly to your account. For more details: [privacy: Ulule Privacy Policy].',\n {\n ululePostalAddress: t('10 rue de Penthi\u00E8vre, 75008 Paris, France'),\n privacy: ,\n },\n )}\n \n \n \n )\n}\n\nexport const NewsletterBlock = styled(NewsletterBlockComponent)``\n\nconst Block = styled.div`\n width: 100%;\n max-width: 620px;\n`\n\nconst Wrapper = styled.div`\n align-items: center;\n background-color: ${plume.COLORS.PRIMARY_WHITE};\n border-radius: 8px;\n box-shadow: 1px 2px 14px rgba(89, 84, 78, 0.12);\n display: flex;\n flex-direction: column;\n height: auto;\n overflow: hidden;\n padding: 35px 16px;\n width: 100%;\n\n ${plume.glyphs.stroke.CaretDown} {\n color: ${plume.COLORS.PRIMARY_GREY_000};\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n ${plume.TextField} {\n max-width: 415px;\n }\n }\n`\n\nconst Call = styled(plume.styles.heading.L)`\n color: ${plume.COLORS.PRIMARY_BLUE_HOVER};\n max-width: 300px;\n text-align: center;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n max-width: none;\n }\n`\n\nconst Detail = styled(plume.styles.copy.M.light)`\n max-width: 325px;\n padding-top: 8px;\n text-align: center;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n max-width: none;\n }\n`\n\nconst Form = styled.form`\n align-items: center;\n display: flex;\n flex-direction: column;\n margin-top: 24px;\n width: 100%;\n\n div {\n flex-grow: 1;\n width: 100%;\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n flex-direction: row;\n margin-bottom: 16px;\n margin-top: 32px;\n }\n`\n\nconst SubmitButton = styled(plume.Button)`\n margin-bottom: 16px;\n margin-top: 16px;\n white-space: nowrap;\n width: 100%;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n margin-bottom: 0;\n margin-left: 16px;\n margin-top: 0;\n width: auto;\n }\n`\n\nconst ShowMoreText = styled.span`\n font-weight: 600; // HACK: Irregular font manipulation\n`\n\nconst Disclaimer = styled(plume.styles.heading.XXXXXS)<{ $isToggled: boolean }>`\n color: ${plume.COLORS.TEXT_SECONDARY};\n cursor: pointer;\n width: fit-content;\n\n ${plume.glyphs.stroke.CaretDown} {\n color: ${plume.COLORS.PRIMARY_SAND_500};\n height: 6px;\n left: 6px;\n position: relative;\n transform: rotateX(${({ $isToggled }) => ($isToggled ? '180' : '0')}deg);\n width: 10px;\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n padding-bottom: ${({ $isToggled }) => ($isToggled ? '16' : '0')}px;\n }\n`\n\nconst ExtendedDisclaimer = styled(plume.styles.heading.XXXXXXS)<{ $isToggled: boolean }>`\n color: ${plume.COLORS.TEXT_SECONDARY};\n display: ${({ $isToggled }) => ($isToggled ? 'block' : 'none')};\n text-transform: uppercase;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n padding-right: 30px;\n }\n`\n\nconst DynCallout = styled(plume.Callout)`\n margin-bottom: 16px;\n`\n", "import * as React from 'react'\nimport * as yup from 'yup'\n\nimport { api } from '@owl-nest/api-client/latest'\n\ntype Subscription = 'success' | 'error' | 'info'\ntype Hook = {\n handleSubscription: (country: string, email: string, locale: string) => Promise\n isLoading: boolean\n status: Subscription | undefined\n}\n\nconst emailSchema = yup.object().shape({\n email: yup.string().email(),\n})\n\nexport const subscribeNewsLetter = async (country: string, email: string, locale: string): Promise => {\n const isValid = await emailSchema.isValid({\n email,\n })\n\n if (isValid) {\n const response = await api.post.subscribeNewsLetter({\n body: { country: country, email: email, lang: locale },\n })\n\n return response.caseOf({\n left: (_error) => 'error',\n right: (_result) => 'success',\n })\n } else {\n return 'error'\n }\n}\n\nexport function useNewsLetterSubscription(): Hook {\n const [isLoading, setIsLoading] = React.useState(false)\n const [status, setStatus] = React.useState(undefined)\n\n return { handleSubscription, isLoading, status }\n\n async function handleSubscription(country: string, email: string, locale: string): Promise {\n if (email === '') {\n setStatus('info')\n } else {\n setIsLoading(true)\n const subscriptionStatus = await subscribeNewsLetter(country, email, locale)\n setStatus(subscriptionStatus)\n setIsLoading(false)\n }\n }\n}\n"], "mappings": "i1BAAAA,IAAAC,ICAAC,IAAAC,IAAE,GAAG,CAAC,IAAI,EAAe,OAAO,OAApB,IAA2B,OAAoB,OAAO,OAApB,IAA2B,OAAoB,OAAO,WAApB,IAA+B,WAAwB,OAAO,KAApB,IAAyB,KAAK,CAAC,EAAEC,EAAG,IAAI,EAAE,QAAO,MAAMA,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,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AQ,CACrD,CACF,CAEJ,CAxBA,IAAAS,GA0BMF,GAAUG,EAAO,IAAPD,QAAUE,EAAA,8GAMoB,qCAAlBC,EAAY,QAhCxCC,GAqCMP,GAAkBI,EAAaI,EAAO,QAAQ,EAAE,EAA9BD,QAA+BF,EAAA,eAClB,qBACK,4LADzBI,EAAO,cACDC,EAAM,eAvC7BC,GAmDMb,GAAUM,EAAO,IAAPO,QAAUN,EAAA,QACJ,6BAC2B,8EAID,6EAM7B,4DAXTN,EACoBU,EAAO,aAIPH,EAAY,OAMtCN,IDnDJY,GAAU,EAEV,eAAeA,IAA2B,CACxC,MAAUC,EAAe,EACzB,IAAMC,EAAa,MAAUC,EAAc,EAE3C,MAAMC,EAAuBF,EAAW,KAAUG,EAAaH,EAAW,IAAI,CAAC,EAC/E,IAAMI,EAAyB,SAAS,cAAc,gBAAgB,EAElEA,EACuB,aAAWA,CAAsB,EAClD,OAAO,gBAACC,GAAA,IAAW,CAAE,EAEtBC,EAAI,iCAAiC,EAG9C,IAAMC,EAAkB,SAAS,cAAc,qBAAqB,EAGhEA,EAC0B,aAAWA,CAAe,EAC3C,OACT,gBAACC,EAAA,KACC,gBAACC,EAAA,IAAuB,CAC1B,CACF,EAEOH,EAAI,6BAA6B,EAG1C,IAAMI,EAAkB,SAAS,cAAc,qBAAqB,EAEhEA,EAC0B,aAAWA,CAAe,EAC3C,OAAO,gBAAQC,EAAP,CAAc,KAAMX,EAAW,KAAM,YAAoBY,EAAkBZ,EAAW,IAAI,EAAG,CAAE,EAE3GM,EAAI,6BAA6B,CAE5C,CH/Cc,IAAOO,GAAuB", "names": ["init_define_process_env", "init_sentry_release_injection_stub", "init_define_process_env", "init_sentry_release_injection_stub", "n", "init_define_process_env", "init_sentry_release_injection_stub", "init_define_process_env", "init_sentry_release_injection_stub", "React", "ReactDOM", "init_define_process_env", "init_sentry_release_injection_stub", "React", "init_define_process_env", "init_sentry_release_injection_stub", "init_define_process_env", "init_sentry_release_injection_stub", "React", "init_define_process_env", "init_sentry_release_injection_stub", "React", "emailSchema", "create$3", "create$6", "subscribeNewsLetter", "country", "email", "locale", "api", "_error", "_result", "useNewsLetterSubscription", "isLoading", "setIsLoading", "status", "setStatus", "handleSubscription", "subscriptionStatus", "NewsletterBlockComponent", "className", "country", "locale", "isToggled", "setIsToggled", "email", "setEmail", "handleSubscription", "isLoading", "status", "useNewsLetterSubscription", "Wrapper", "Call", "Detail", "Block", "Form", "e", "TextField", "SubmitButton", "DynCallout", "Disclaimer", "ShowMoreText", "glyphs_exports", "ExtendedDisclaimer", "Link", "PRIVACY_URL", "_a", "NewsletterBlock", "src_default", "__template", "_b", "_c", "colors_exports", "breakpoints_exports", "_d", "styles_exports", "_e", "_f", "_g", "Button", "_h", "_i", "$isToggled", "_j", "_k", "Callout", "Newsletter", "locale", "useUserEnv", "country", "USER_COUNTRY", "Wrapper", "SkewedBanner", "NewsletterTitle", "Content", "NewsletterBlock", "_a", "src_default", "__template", "breakpoints_exports", "_b", "styles_exports", "colors_exports", "fonts_exports", "_c", "renderApp", "initUserConfig", "userConfig", "getUserConfig", "initializeLocalization", "LOCALE_FILES", "newsletterAppContainer", "Newsletter", "err", "headerContainer", "BrowserRouter", "LegacyCompatibleHeader", "footerContainer", "Footer", "getNavSectionList", "newsletter_default"] }