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GAC/J,gBAAoB,IAAK,CAAErJ,UAAW,8BACiF,QAAjD,QAAxEc,EAAKkB,aAAuC,EAASA,EAAOqE,cAA2B,IAAPvF,OAAgB,EAASA,EAAGQ,UAAsB,gBAAoB,IAAK,CAAEL,KAAM,8DAA+DiC,OAAQ,SAAUmG,IAAK,oBAAqB,aAAc,OAAQ,iBAAkB,wGACpT,gBAAoB,IAAK,CAAErJ,UAAW,uBAA0B,EAe5DsJ,GAlGe,gBAAoB,MAAO,CAAEtJ,UAAW,aACnE,gBAAoB,IAAK,KACrBV,EAAE,oBACF,IACA,gBAAoBiK,EAAA,QAAgB,CAAEpJ,OAAQ6B,aAAuC,EAASA,EAAOqE,OAAOlG,WAgGpG,gBAAoB,QAAS,CAAEH,UAAW,WAAsF,QAAxE2E,EAAK3C,aAAuC,EAASA,EAAOqE,cAA2B,IAAP1B,OAAgB,EAASA,EAAG6E,aAdzK,gBAAoB,WAAgB,KAckJ,C","sources":["webpack:///./assets/common/src/components/common/CorporateModal.tsx","webpack:///./assets/moncler/src/components/countryselector/LanguageModal.tsx","webpack:///./assets/common/src/utils/useFooterMargin.ts","webpack:///./assets/moncler/src/components/footer/Footer.tsx"],"sourcesContent":["import ModalDialog from '@ui/modal/ModalDialog';\nimport useQueryStringBoolean from '@utils/useQueryStringBoolean';\nimport React, { useEffect } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst CorporateModal = (props) => {\n    const { t } = useTranslation();\n    const [open, setOpen] = useQueryStringBoolean('localeselector');\n    useEffect(() => { }, [open]);\n    const modal = () => (React.createElement(ModalDialog, { contentLabel: t('footer.corporateinfo'), isOpen: open, hasDivisor: true, onRequestClose: () => {\n            setOpen(false);\n        } },\n        React.createElement(\"div\", { className: \"mt-32\", dangerouslySetInnerHTML: { __html: t(`footer.${props.region}`) } })));\n    return (React.createElement(React.Fragment, null,\n        \"-\",\n        ' ',\n        React.createElement(\"button\", { type: \"button\", onClick: () => setOpen(true), \"aria-haspopup\": \"dialog\" }, t('footer.corporateinfo')),\n        modal()));\n};\nexport default CorporateModal;\n","import ModalDialog from '@ui/modal/ModalDialog';\nimport analytics from '@utils/analytics';\nimport api from '@utils/api';\nimport useQueryStringBoolean from '@utils/useQueryStringBoolean';\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst LanguageModal = (props) => {\n    const { t } = useTranslation();\n    const [open, setOpen] = useQueryStringBoolean('localeselector');\n    const [data, setData] = useState();\n    useEffect(() => {\n        if (open) {\n            api.languageSelectorJson().then((data) => {\n                setData(data);\n            });\n        }\n    }, [open]);\n    const modal = () => (React.createElement(ModalDialog, { isOpen: open, onRequestClose: () => {\n            setOpen(false);\n            analytics.languageselectorClose();\n        }, hasDivisor: true, contentLabel: t('modal.language.title'), subtitle: t('modal.language.description') },\n        React.createElement(React.Fragment, null,\n            React.createElement(\"div\", { className: \"language-wrapper mt-32\" },\n                React.createElement(\"div\", { className: \"continent-title\" },\n                    React.createElement(\"ul\", null, data.map((lang) => {\n                        var _a;\n                        return (React.createElement(\"li\", { key: lang.link },\n                            React.createElement(\"a\", { href: ((_a = document.querySelector(`link[rel=\"alternate\"][hreflang=\"${lang.language}-${window.country}\"]`)) === null || _a === void 0 ? void 0 : _a.href) || lang.link, onClick: () => {\n                                    analytics.languageselectorClick(lang.name.toLowerCase());\n                                } }, lang.name)));\n                    })))))));\n    return (React.createElement(React.Fragment, null,\n        React.createElement(\"button\", { type: \"button\", className: classNames('footer-menu__menuitem', { container: props.contained }), \"aria-haspopup\": \"dialog\", onClick: () => setOpen(true) },\n            React.createElement(\"span\", { className: \"footer-menu__menuitem__item\" }, t('footer.item.language')),\n            React.createElement(\"span\", { className: \"footer-menu__menuitem__current\" }, props.current)),\n        data && modal()));\n};\nexport default LanguageModal;\n","import { useEffect, useRef, useState } from 'react';\nimport { debounce } from './functions';\nfunction useFooterMargin(footerApi, currentBreakpoint) {\n    const footerRef = useRef(null);\n    const [footerHeight, setFooterHeight] = useState(0);\n    const addMarginBottomForFooter = (footer) => {\n        const root = document.documentElement;\n        const header = document.querySelector('header');\n        // @ts-ignore - window.mqObj.md as number\n        if (window.innerWidth < window.mqObj.md || footer.offsetHeight >= window.innerHeight - header.offsetHeight) {\n            root.classList.remove('fixed-footer');\n            // @ts-ignore - window.mqObj.md as number\n        }\n        else if (window.innerWidth >= window.mqObj.md) {\n            root.classList.add('fixed-footer');\n            root.style.setProperty('--footer-margin', footer.clientHeight + 'px');\n        }\n    };\n    const resizeObserverCallback = (entries) => {\n        const currentHeight = entries[0].target.offsetHeight;\n        if (currentHeight !== footerHeight) {\n            //check if footer sizes are changed (width for window resize and height for delayed renderings/inner node changes), in order to avoid unwanted updates\n            addMarginBottomForFooter(entries[0].target);\n            setFooterHeight(currentHeight);\n        }\n    };\n    const intersectionObserverCallback = (entries) => {\n        if (entries) {\n            const footerWidthObserver = new ResizeObserver(debounce(resizeObserverCallback, 500));\n            addMarginBottomForFooter(entries[0].target);\n            if (entries[0].isIntersecting) {\n                footerWidthObserver.observe(entries[0].target);\n            }\n            else {\n                footerWidthObserver.disconnect();\n            }\n        }\n    };\n    useEffect(() => {\n        var _a;\n        if (footerApi && footerRef.current) {\n            // @ts-ignore - window.mqObj as object\n            if (currentBreakpoint >= window.mqObj.md) {\n                const maincontent = document.getElementById('maincontent');\n                const isCartOrCheckout = ['cart-show'].includes(document.body.id) || document.body.classList.contains('checkout');\n                if (maincontent && !isCartOrCheckout && !window.appmode) {\n                    const footer = (_a = footerRef.current) === null || _a === void 0 ? void 0 : _a.closest('#footer'); //footerRef is the react component, that is grand children of <footer/> tag (node element to check)\n                    const footerIntersectionObserver = new IntersectionObserver(intersectionObserverCallback, { rootMargin: '40px' });\n                    footerIntersectionObserver.observe(footer);\n                    return () => {\n                        footerIntersectionObserver.disconnect();\n                    };\n                }\n            }\n            else if (document.documentElement.classList.contains('fixed-footer')) {\n                document.documentElement.classList.remove('fixed-footer');\n            }\n        }\n    }, [footerApi, currentBreakpoint]);\n    return footerRef;\n}\nexport default useFooterMargin;\n","import api from '@common/utils/api';\nimport useBreakpoint from '@common/utils/useBreakpoint';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport Accordion from '@ui/accordion/Accordion';\nimport AccordionItem from '@ui/accordion/AccordionItem';\nimport '@moncler/scss/layout/footer/footer.scss';\nimport '@moncler/scss/components/service-bar/service-bar.scss';\nimport CountryModal from '../countryselector/CountryModal';\nimport LanguageModal from '../countryselector/LanguageModal';\nimport classNames from 'classnames';\nimport Newsletter from '../newsletter/Newsletter';\nimport CorporateModal from '@components/common/CorporateModal';\nimport ModalDialog from '@common/ui/modal/ModalDialog';\nimport Button from '@ui/button/Button';\nimport ContactDetailsCore from '../clientService/ContactDetailsCore';\nimport useFooterMargin from '@common/utils/useFooterMargin';\nconst FooterItem = React.lazy(() => import('./FooterItem'));\nconst FooterItemCustom = React.lazy(() => import('./FooterItemCustom'));\nconst ContactDetailsFooter = () => React.createElement(ContactDetailsCore, { type: \"FOOTER\", hideCountrySelector: true });\nconst Footer = () => {\n    var _a, _b, _c;\n    const { t } = useTranslation();\n    let contrastFromsession = sessionStorage.getItem('increasedContrast') || 'no';\n    const [footer, setFooter] = useState(null);\n    const [columns, setColumms] = useState([]);\n    const [components, setComponents] = useState([]);\n    const [activeContrast, setActiveContrast] = useState(contrastFromsession === 'yes');\n    const [a11yModalIsOpen, setA11yModalIsOpen] = useState(false);\n    const [activeContrastInModal, setActiveContrastInModal] = useState(contrastFromsession === 'yes');\n    const currentBreakpoint = useBreakpoint();\n    const footerRef = useFooterMargin(footer, currentBreakpoint);\n    const componentMap = {\n        footer_item: FooterItem,\n        footer_item_custom: FooterItemCustom,\n        component_contact_details_footer: ContactDetailsFooter,\n        default: () => React.createElement(React.Fragment, null),\n    };\n    useEffect(() => {\n        var _a;\n        if (!footer) {\n            api.getPageJson('footer', true).then((res) => {\n                var _a;\n                const data = Object.assign(Object.assign(Object.assign({}, res), res === null || res === void 0 ? void 0 : res.data), res === null || res === void 0 ? void 0 : res.custom);\n                if (data) {\n                    setFooter(data);\n                    const columns = (_a = res === null || res === void 0 ? void 0 : res.regions) === null || _a === void 0 ? void 0 : _a.filter((el) => { var _a; return (el.id === 'first_column' || el.id === 'second_column' || el.id === 'third_column' || el.id === 'fourth_column') && ((_a = el === null || el === void 0 ? void 0 : el.components) === null || _a === void 0 ? void 0 : _a.length); });\n                    if (columns === null || columns === void 0 ? void 0 : columns.length) {\n                        setColumms(columns);\n                        const components = [];\n                        columns.forEach((col) => {\n                            var _a;\n                            (_a = col === null || col === void 0 ? void 0 : col.components) === null || _a === void 0 ? void 0 : _a.forEach((comp) => components.push(comp));\n                        });\n                        setComponents(components);\n                    }\n                }\n            });\n        }\n        (_a = document.querySelector('#toggle-accessibility-modal')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', (e) => {\n            e.preventDefault();\n            setA11yModalIsOpen(true);\n        });\n    }, [footer]);\n    useEffect(() => {\n        if (activeContrast) {\n            document.body.classList.add('increased-contrast');\n        }\n        else {\n            document.body.classList.remove('increased-contrast');\n        }\n        sessionStorage.setItem('increasedContrast', activeContrast ? 'yes' : 'no');\n        setActiveContrastInModal(activeContrast);\n    }, [activeContrast]);\n    const renderCountrySelector = () => {\n        var _a, _b;\n        return (React.createElement(\"div\", { className: \"footer-countryselector\" },\n            !window.isClothing && React.createElement(CountryModal, { link: (_a = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _a === void 0 ? void 0 : _a.locale.link, contained: currentBreakpoint < window.mqObj.md }),\n            React.createElement(LanguageModal, { current: (_b = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _b === void 0 ? void 0 : _b.locale.displayLanguage, contained: currentBreakpoint < window.mqObj.md })));\n    };\n    const renderCopyright = () => (React.createElement(\"div\", { className: \"copyright\" },\n        React.createElement(\"p\", null,\n            t('footer.copyright'),\n            \" \",\n            React.createElement(CorporateModal, { region: footer === null || footer === void 0 ? void 0 : footer.custom.region }))));\n    const renderColorContrastSwitch = () => (React.createElement(React.Fragment, null,\n        React.createElement(\"div\", { className: \"color-contrast-switch\" },\n            React.createElement(\"button\", { className: classNames({ active: activeContrast }), onClick: () => setActiveContrast(true) }, \"On\"),\n            React.createElement(\"button\", { className: classNames({ active: !activeContrast }), onClick: () => setActiveContrast(false) }, \"Off\")),\n        React.createElement(ModalDialog, { className: \"a11y-modal modal--fixed-small modal--bottom-flexible-height\", isOpen: a11yModalIsOpen, overlayClassName: \"mobile-visible\", contentLabel: t(''), onRequestClose: () => setA11yModalIsOpen(false) },\n            React.createElement(\"div\", { className: \"accessibility-modal-wrapper\" },\n                React.createElement(\"div\", { className: \"modal-intro\" },\n                    React.createElement(\"h3\", { className: \"intro-title\" }, t('navigation.aria.accessibilityoptions')),\n                    React.createElement(\"p\", { className: \"intro-description\" }, t('a11y.modal.intro.first.description')),\n                    React.createElement(\"p\", { className: \"intro-description\", dangerouslySetInnerHTML: { __html: t('a11y.modal.intro.second.description') } })),\n                React.createElement(\"ul\", { className: \"options-list\" },\n                    React.createElement(\"li\", { className: \"option-a11y\" },\n                        React.createElement(\"div\", { className: \"name-and-switch\" },\n                            React.createElement(\"p\", { className: \"option-name\" }, t('footer.enhance.color.contrast.a11y')),\n                            React.createElement(\"div\", { className: \"switch\" },\n                                React.createElement(\"p\", null, activeContrastInModal ? 'On' : 'Off'),\n                                React.createElement(\"button\", { onClick: () => setActiveContrastInModal(!activeContrastInModal), className: classNames('switch-element', { 'is-on': activeContrastInModal }), \"aria-label\": t('footer.enhance.color.contrast.a11y'), \"aria-current\": activeContrastInModal }))),\n                        React.createElement(\"span\", { className: \"description\" }, t('a11y.modal.body.contrast.description')))),\n                React.createElement(\"div\", { className: \"ctas-wrapper\" },\n                    React.createElement(Button, { type: \"button\", onClick: () => {\n                            setActiveContrast(activeContrastInModal);\n                            setA11yModalIsOpen(false);\n                        }, cls: ['button--primary'] }, t('a11y.modal.cta.save')),\n                    React.createElement(Button, { type: \"button\", cls: ['button--tertiary', 'button--arrow-left'], onClick: () => {\n                            setA11yModalIsOpen(false);\n                            setTimeout(() => {\n                                setActiveContrastInModal(activeContrast);\n                            }, 200);\n                        } }, t('a11y.modal.cta.exit')))))));\n    const renderSection = (comp) => {\n        var _a;\n        return (React.createElement(React.Fragment, null,\n            React.createElement(\"ul\", { className: classNames('footer-menu__section', { container: currentBreakpoint < window.mqObj.md }) }, (_a = comp.regions[0].components) === null || _a === void 0 ? void 0 : _a.map((el) => {\n                var _a;\n                const key = el.type_id;\n                const Component = componentMap[key] || componentMap.default;\n                return (React.createElement(\"li\", { key: el.id, className: \"footer-menu__section__menuitem\" },\n                    React.createElement(Component, Object.assign({}, el, { uuid: el.id, contactformurl: (_a = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _a === void 0 ? void 0 : _a.contactformurl }))));\n            }))));\n    };\n    const renderAccordion = () => {\n        var _a;\n        return (React.createElement(React.Fragment, null,\n            React.createElement(Accordion, null, components\n                .filter((el) => el.type_id === 'footer_section')\n                .map((comp) => (React.createElement(AccordionItem, { isTitleMarkup: true, title: React.createElement(\"h3\", { className: \"primary-xs-u\" }, comp.data.title), key: comp.id, accordionId: \"footer_section\", itemClass: \"footer-accordion__item\", headerClass: \"footer-accordion__item-header container\" }, renderSection(comp))))),\n            ((_a = components.filter((el) => el.type_id === 'footer_countryselector')) === null || _a === void 0 ? void 0 : _a.length) && renderCountrySelector(),\n            React.createElement(\"div\", { className: \"footer-switch-contrast\" },\n                React.createElement(\"div\", { className: \"footer-menu__menuitem container\" },\n                    React.createElement(\"span\", { className: \"footer-menu__menuitem__item\" }, t('footer.enhance.color.contrast.a11y')),\n                    React.createElement(\"div\", { className: \"footer-menu__menuitem__current\" }, renderColorContrastSwitch())))));\n    };\n    const renderColumns = () => (React.createElement(\"div\", { className: \"container\" },\n        React.createElement(\"div\", { className: \"footer-columns\" }, columns.map((col, i) => {\n            var _a;\n            return (React.createElement(\"div\", { key: col.id, className: classNames('footer-col', { 'is-span': ((_a = col === null || col === void 0 ? void 0 : col.components) === null || _a === void 0 ? void 0 : _a.length) > 1 }), id: col.id }, col === null || col === void 0 ? void 0 : col.components.map((comp, i) => {\n                var _a;\n                return (React.createElement(\"div\", { className: \"footer-menu__section--wrapper\", key: comp.id },\n                    ((_a = comp.data) === null || _a === void 0 ? void 0 : _a.title) && React.createElement(\"h3\", { className: \"footer-menu__section-title primary-xs-u\" }, comp.data.title),\n                    comp.type_id === 'footer_section' && renderSection(comp),\n                    comp.type_id === 'footer_countryselector' && renderCountrySelector(),\n                    col.id === 'fourth_column' && col.components.length === i + 1 && (React.createElement(\"div\", { className: \"color-contrast-wrapper\" },\n                        React.createElement(\"h3\", { className: \"footer-menu__section-title primary-xs-u color-contrast-label\" }, t('footer.enhance.color.contrast.a11y')),\n                        renderColorContrastSwitch()))));\n            })));\n        }))));\n    const renderSocials = () => {\n        var _a;\n        return (React.createElement(\"div\", { className: \"social-wrapper\" },\n            React.createElement(\"a\", { href: \"http://instagram.com/moncler\", target: \"_blank\", rel: \"nofollow noopener\", \"aria-label\": \"instagram\", \"data-analytics\": '{\"event\": \"footer\", \"eventCategory\": \"footer\", \"eventLabel\": \"visit profile\", \"eventAction\": \"instagram\"}' },\n                React.createElement(\"i\", { className: \"icon--social-instagram-big\" })),\n            React.createElement(\"a\", { href: \"http://twitter.com/moncler\", target: \"_blank\", rel: \"nofollow noopener\", \"aria-label\": \"twitter\", \"data-analytics\": '{\"event\": \"footer\", \"eventCategory\": \"footer\", \"eventLabel\": \"visit profile\", \"eventAction\": \"twitter\"}' },\n                React.createElement(\"i\", { className: \"icon--social-x-big\" })),\n            React.createElement(\"a\", { href: \"http://www.facebook.com/moncler/\", target: \"_blank\", rel: \"nofollow noopener\", \"aria-label\": \"facebook\", \"data-analytics\": '{\"event\": \"footer\", \"eventCategory\": \"footer\", \"eventLabel\": \"visit profile\", \"eventAction\": \"facebook\"}' },\n                React.createElement(\"i\", { className: \"icon--social-facebook-big\" })),\n            React.createElement(\"a\", { href: \"http://www.youtube.com/monclerofficial/\", target: \"_blank\", rel: \"nofollow noopener\", \"aria-label\": \"youtube\", \"data-analytics\": '{\"event\": \"footer\", \"eventCategory\": \"footer\", \"eventLabel\": \"visit profile\", \"eventAction\": \"youtube\"}' },\n                React.createElement(\"i\", { className: \"icon--social-youtube-big\" })),\n            ((_a = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _a === void 0 ? void 0 : _a.country) === 'JP' && (React.createElement(\"a\", { href: \"https://liff.line.me/1645278921-kWRPP32q/?accountId=moncler\", target: \"_blank\", rel: \"nofollow noopener\", \"aria-label\": \"line\", \"data-analytics\": '{\"event\": \"footer\", \"eventCategory\": \"footer\", \"eventLabel\": \"visit profile\", \"eventAction\": \"line\"}' },\n                React.createElement(\"i\", { className: \"icon--social-line\" })))));\n    };\n    if (!footer) {\n        return React.createElement(React.Fragment, null);\n    }\n    return (React.createElement(\"div\", { ref: footerRef },\n        ((_a = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _a === void 0 ? void 0 : _a.showNewsletter) && (React.createElement(\"div\", { className: \"footer-newsletter \" },\n            React.createElement(\"div\", { className: \"container\" },\n                React.createElement(\"div\", { className: \"row\" },\n                    React.createElement(\"div\", { className: \"col-md-4 offset-md-4\" },\n                        React.createElement(Newsletter, { footerSectionTitle: t('footer.email.address'), image: footer.custom.newsletterimage, cookiepage: (_b = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _b === void 0 ? void 0 : _b.cookiepage, isFooter: true })))))),\n        React.createElement(\"div\", { className: \"footer-menu\" }, currentBreakpoint < window.mqObj.md ? renderAccordion() : renderColumns()),\n        React.createElement(\"div\", { className: \"footer-bottom\" },\n            React.createElement(\"div\", { className: \"container\" },\n                React.createElement(\"div\", { className: \"social-legals\" },\n                    renderSocials(),\n                    renderCopyright(),\n                    React.createElement(\"small\", { className: \"version\" }, (_c = footer === null || footer === void 0 ? void 0 : footer.custom) === null || _c === void 0 ? void 0 : _c.version))))));\n};\nexport default Footer;\n"],"names":["props","t","open","setOpen","useEffect","type","onClick","contentLabel","isOpen","hasDivisor","onRequestClose","className","dangerouslySetInnerHTML","__html","region","data","setData","useState","then","container","contained","current","subtitle","map","lang","_a","key","link","href","document","querySelector","language","window","country","name","toLowerCase","footerApi","currentBreakpoint","footerRef","useRef","footerHeight","setFooterHeight","addMarginBottomForFooter","footer","root","documentElement","header","innerWidth","mqObj","md","offsetHeight","innerHeight","classList","remove","add","style","setProperty","clientHeight","resizeObserverCallback","entries","currentHeight","target","intersectionObserverCallback","footerWidthObserver","ResizeObserver","isIntersecting","observe","disconnect","maincontent","getElementById","isCartOrCheckout","includes","body","id","contains","appmode","closest","footerIntersectionObserver","IntersectionObserver","rootMargin","FooterItem","FooterItemCustom","ContactDetailsFooter","ContactDetailsCore","hideCountrySelector","_b","_c","useTranslation","contrastFromsession","sessionStorage","getItem","setFooter","columns","setColumms","components","setComponents","activeContrast","setActiveContrast","a11yModalIsOpen","setA11yModalIsOpen","activeContrastInModal","setActiveContrastInModal","useBreakpoint","componentMap","footer_item","footer_item_custom","component_contact_details_footer","default","api","res","Object","assign","custom","regions","filter","el","length","forEach","col","comp","push","addEventListener","e","preventDefault","setItem","renderCountrySelector","isClothing","CountryModal","locale","LanguageModal","displayLanguage","renderColorContrastSwitch","active","ModalDialog","overlayClassName","Button","cls","setTimeout","renderSection","type_id","Component","uuid","contactformurl","ref","showNewsletter","Newsletter","footerSectionTitle","image","newsletterimage","cookiepage","isFooter","Accordion","AccordionItem","isTitleMarkup","title","accordionId","itemClass","headerClass","renderAccordion","i","rel","renderSocials","CorporateModal","version"],"sourceRoot":""}