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EAAAA,EAAAA,cACTgB,IACKb,EAAYjL,UAAY8L,IAC1Bb,EAAYjL,QAAQ+L,aACpBd,EAAYjL,aAAU8C,IAGnBmI,EAAYjL,SAAW8L,IAC1Bb,EAAYjL,QAAU,IAAIgM,eAAeR,GACzCP,EAAYjL,QAAQiM,QAAQH,GAC9B,GAEF,CAACN,IAGUN,EAAiB,C","sources":["webpack://nikon-client/./components/atoms/CloseButton/CloseButton.tsx","webpack://nikon-client/./components/atoms/NavButton/NavButton.tsx","webpack://nikon-client/./components/molecules/Carousel/Carousel.tsx","webpack://nikon-client/./components/molecules/NotificationCarousel/NotificationCarousel.tsx","webpack://nikon-client/./components/organisms/SiteNotifications/SiteNotifications.tsx","webpack://nikon-client/./models/enums/HorizontalDirectionEnum.ts","webpack://nikon-client/./models/enums/IconSizeEnum.ts","webpack://nikon-client/./models/enums/StickyNavPositionEnum.ts","webpack://nikon-client/./state-management/AriaLabelsStore.ts","webpack://nikon-client/./state-management/ComponentsHeightsStore.ts","webpack://nikon-client/./state-management/StickyNavStore.ts","webpack://nikon-client/./utility/helpers/gtm.ts","webpack://nikon-client/./utility/hooks/useAriaLabels.ts","webpack://nikon-client/./utility/hooks/useIsTouchDevice.ts","webpack://nikon-client/./utility/hooks/useMediaQuery.ts","webpack://nikon-client/./utility/hooks/useResizeObserver.ts"],"sourcesContent":["import IconSizeEnum from '@models/enums/IconSizeEnum';\nimport useAriaLabels from '@utils/hooks/useAriaLabels';\nimport classNames from 'classnames';\nimport { MouseEventHandler } from 'react';\n\ninterface Props {\n readonly ariaLabel?: string;\n readonly className?: string;\n readonly color?: 'black' | 'white' | 'red';\n readonly onClick: MouseEventHandler;\n readonly size?: IconSizeEnum | string;\n readonly dataTestId?: string;\n}\n\nconst CloseButton = ({\n ariaLabel,\n className,\n color = 'black',\n onClick,\n size = IconSizeEnum.lg,\n dataTestId,\n}: Props) => {\n const { closeModalAriaLabel } = useAriaLabels();\n\n const closeColours = {\n black: 'before:bg-black-100 after:bg-black-100',\n white: 'before:bg-white after:bg-white',\n red: 'before:bg-red-100 after:bg-red-100',\n };\n\n return (\n \n );\n};\n\nexport default CloseButton;\n","import Icon from '@atoms/Icon/Icon';\nimport HorizontalDirectionEnum from '@models/enums/HorizontalDirectionEnum';\nimport updateDataLayer from '@utils/helpers/gtm';\nimport useAriaLabels from '@utils/hooks/useAriaLabels';\nimport classNames from 'classnames';\nimport { forwardRef, KeyboardEvent, useImperativeHandle, useRef } from 'react';\n\ninterface Props {\n readonly direction:\n | HorizontalDirectionEnum.Left\n | HorizontalDirectionEnum.Right;\n readonly id?: string;\n readonly disabled?: boolean;\n readonly hasBackgroundColor?: boolean;\n readonly sizeClassName?: string;\n readonly iconSize?: string;\n readonly enabledArrowColor?: string;\n readonly onClick?: (e?: KeyboardEvent) => void;\n readonly additionalDataLayerProperties?: Record;\n readonly isLightMode?: boolean;\n}\n\nexport interface NavButtonRef {\n focus: () => void;\n disabled: boolean;\n}\n\nconst NavButton = forwardRef(\n (\n {\n additionalDataLayerProperties,\n direction,\n id,\n disabled = false,\n hasBackgroundColor = true,\n sizeClassName = 'h-10 w-10',\n iconSize,\n enabledArrowColor = 'text-black-100',\n isLightMode,\n onClick,\n },\n ref\n ) => {\n const { nextAriaLabel, previousAriaLabel } = useAriaLabels();\n const buttonRef = useRef(null);\n\n useImperativeHandle(ref, () => ({\n focus: () => buttonRef.current?.focus(),\n disabled: !!buttonRef.current?.disabled,\n }));\n\n return (\n {\n if (e.key === 'Enter') onClick?.(e);\n }}\n onClick={() => {\n onClick?.();\n updateDataLayer({\n event: 'carousel',\n content_type: 'tab_change',\n link_text:\n direction === HorizontalDirectionEnum.Left ? 'Previous' : 'Next',\n ...additionalDataLayerProperties,\n });\n }}\n >\n \n \n );\n }\n);\n\nexport default NavButton;\n","import updateDataLayer from '@utils/helpers/gtm';\nimport { PropsWithChildren } from 'react';\nimport { A11y, Keyboard, Navigation } from 'swiper/modules';\nimport { Swiper, SwiperProps } from 'swiper/react';\nimport 'swiper/scss';\nimport 'swiper/scss/a11y';\nimport 'swiper/scss/autoplay';\nimport 'swiper/scss/effect-fade';\nimport 'swiper/scss/keyboard';\nimport { SwiperModule } from 'swiper/types';\n\ninterface Props extends SwiperProps {\n readonly additionalModules?: SwiperModule[];\n readonly className?: string;\n readonly id?: string;\n readonly navId?: string;\n readonly analyticsEnabled?: boolean;\n}\n\nconst Carousel = ({\n additionalModules = [],\n children,\n className,\n id = 'carousel',\n navId = '',\n analyticsEnabled = false,\n ...props\n}: PropsWithChildren) => {\n if (!children) {\n return null;\n }\n\n return (\n {\n if (analyticsEnabled && swiper.realIndex !== 0) {\n updateDataLayer({\n event: 'carousel',\n content_type: `tab_change`,\n link_text:\n swiper.previousIndex < swiper.activeIndex ? 'Next' : 'Previous',\n });\n }\n }}\n a11y={{ enabled: true }}\n className={className}\n navigation={{\n enabled: !!navId,\n prevEl: `#prevBtn-${navId}`,\n nextEl: `#nextBtn-${navId}`,\n }}\n keyboard={{\n enabled: true,\n onlyInViewport: true,\n }}\n modules={[...[A11y, Keyboard, Navigation], ...additionalModules]}\n {...props}\n >\n {children}\n \n );\n};\n\nexport default Carousel;\n","import NavButton from '@atoms/NavButton/NavButton';\nimport HorizontalDirectionEnum from '@models/enums/HorizontalDirectionEnum';\nimport Carousel from '@molecules/Carousel/Carousel';\nimport useIsTouchDevice from '@utils/hooks/useIsTouchDevice';\nimport classNames from 'classnames';\nimport { PropsWithChildren, useEffect, useState } from 'react';\nimport { Autoplay } from 'swiper/modules';\nimport { Swiper } from 'swiper/types';\n\ninterface Props {\n readonly id: string;\n readonly hasMultipleItems: boolean;\n readonly enabledNavigationArrowColor?: string;\n}\n\nconst NotificationCarousel = ({\n id,\n hasMultipleItems,\n enabledNavigationArrowColor,\n children,\n}: PropsWithChildren) => {\n const [swiperInstance, setSwiperInstance] = useState();\n const isTouchDevice = useIsTouchDevice();\n\n useEffect(() => {\n if (!swiperInstance || isTouchDevice === undefined) return;\n swiperInstance.allowTouchMove = isTouchDevice;\n }, [isTouchDevice, swiperInstance]);\n\n return (\n \n \n \n \n\n \n {children}\n \n\n \n \n \n \n );\n};\n\nexport default NotificationCarousel;\n","import CloseButton from '@atoms/CloseButton/CloseButton';\nimport { ISiteNotification } from '@models/ISiteNotification';\nimport StickyNavPosition from '@models/enums/StickyNavPositionEnum';\nimport NotificationCarousel from '@molecules/NotificationCarousel/NotificationCarousel';\nimport useComponentsHeightsStore from '@state/ComponentsHeightsStore';\nimport useStickyNavPositionStore from '@state/StickyNavStore';\nimport updateDataLayer from '@utils/helpers/gtm';\nimport useAriaLabels from '@utils/hooks/useAriaLabels';\nimport useMediaQuery from '@utils/hooks/useMediaQuery';\nimport useResizeObserver from '@utils/hooks/useResizeObserver';\nimport classNames from 'classnames';\nimport dayjs from 'dayjs';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport Cookies from 'js-cookie';\nimport { useEffect, useState } from 'react';\nimport { SwiperSlide } from 'swiper/react';\n\ninterface Props {\n readonly siteNotifications: ISiteNotification[];\n}\n\nconst SiteNotifications = ({ siteNotifications }: Props) => {\n const [containerRef, { height: containerHeight }] = useResizeObserver();\n const isMobile = useMediaQuery(768);\n const isTablet = useMediaQuery(1024);\n const { stickyNavPosition } = useStickyNavPositionStore((state) => ({\n stickyNavPosition: state.stickyNavPosition,\n }));\n const { setSiteNotificationsHeight } = useComponentsHeightsStore((state) => ({\n setSiteNotificationsHeight: state.setSiteNotificationsHeight,\n }));\n const { closeSiteNotificationAriaLabel, siteNotificationsAriaLabel } =\n useAriaLabels();\n const [isNotificationDismissed, setIsNotificationDismissed] = useState(false);\n const isStickyNavOnTop =\n stickyNavPosition === StickyNavPosition.Top ||\n (!isMobile && stickyNavPosition === StickyNavPosition.Bottom);\n const hasStickySiteNotifications = siteNotifications.length > 0 && !isTablet;\n const shouldUpdateStickyNavsPositions =\n isStickyNavOnTop && hasStickySiteNotifications;\n\n const notificationsBannerColour = siteNotifications[0]?.notificationColour;\n const hasDismissButton =\n siteNotifications.length === 1 && siteNotifications[0]?.notificationDismiss;\n\n const dismissNotification = () => {\n const dismissedNotification = siteNotifications[0];\n if (!dismissedNotification) return;\n\n const cookieExpiryDate = dayjs(dismissedNotification.expiryDate).diff(\n dayjs(),\n 'day'\n );\n Cookies.set(dismissedNotification.notificationId, 'true', {\n expires: cookieExpiryDate,\n });\n setIsNotificationDismissed(true);\n };\n\n useEffect(() => {\n const anchorMenu = document.getElementById('AnchorMenu');\n const productNavigation = document.getElementById('ProductNavigation');\n const sectionNavigation = document.getElementById('SectionNavigation');\n\n if (anchorMenu)\n anchorMenu.style.top = shouldUpdateStickyNavsPositions\n ? `${containerHeight}px`\n : '';\n\n if (productNavigation) {\n productNavigation.style.top = shouldUpdateStickyNavsPositions\n ? `${containerHeight}px`\n : '';\n }\n\n if (sectionNavigation) {\n sectionNavigation.style.top = hasStickySiteNotifications\n ? `${containerHeight}px`\n : '';\n }\n }, [\n containerHeight,\n hasStickySiteNotifications,\n shouldUpdateStickyNavsPositions,\n ]);\n\n useEffect(() => {\n setSiteNotificationsHeight(containerHeight);\n }, [containerHeight, setSiteNotificationsHeight]);\n\n return (\n \n {!isNotificationDismissed && siteNotifications.length > 0 && (\n \n 1}\n >\n {siteNotifications.map((notification, index) => {\n const { text, link } = notification;\n\n return (\n \n \n updateDataLayer({\n event: 'promotionalBanner',\n promotion: text,\n })\n }\n >\n \n {text.length > 100\n ? `${text.substring(0, 100)}...`\n : `${text} `}\n\n {link?.url && link?.name && (\n \n {link.name}\n \n )}\n \n \n \n );\n })}\n \n\n {hasDismissButton && (\n \n )}\n \n )}\n \n );\n};\n\nexport default SiteNotifications;\n","enum HorizontalDirectionEnum {\n Left = 'LEFT',\n Right = 'RIGHT',\n}\n\nexport default HorizontalDirectionEnum;\n","const enum IconSizeEnum {\n xs = '.5rem',\n sm = '.75rem',\n md = '1rem',\n lg = '1.5rem',\n xl = '1.75rem',\n}\n\nexport default IconSizeEnum;\n","enum StickyNavPosition {\n Top = 'top',\n Bottom = 'bottom',\n}\n\nexport default StickyNavPosition;\n","import { IAriaLabels } from '@models/IAriaLabels';\nimport create from 'zustand';\n\ninterface IAriaLabelsState {\n ariaLabels: IAriaLabels;\n setAriaLabels: (ariaLabels: IAriaLabels) => void;\n}\n\nexport const initialAriaLabels: IAriaLabels = {\n backToFirstLevelNavigationAriaLabel: 'Back to first level of navigation',\n breadcrumbAriaLabel: 'Breadcrumb navigation',\n breadcrumbFooterAriaLabel: 'Breadcrumb footer navigation',\n clearFiltersAriaLabel: 'Clear filters',\n closeMenuAriaLabel: 'Close menu',\n closeAddressListAriaLabel: 'Close address list',\n closeMobileNavigationAriaLabel: 'Close navigation',\n closeModalAriaLabel: 'Close Modal',\n closeSignUpFormAriaLabel: 'Close signup form',\n closeSiteNotificationAriaLabel: 'Close site notification',\n copyToClipboardAriaLabel: 'Copy to clipboard',\n editOrDeleteAriaLabel: 'Edit or delete',\n mainNavigationAriaLabel: 'Main navigation',\n moreInformationAriaLabel: 'More information',\n nextAriaLabel: 'Go to next slide',\n openAddressListAriaLabel: 'Open address list',\n openImageInFullScreenAriaLabel: 'Open image in full screen',\n openMenuAriaLabel: 'Open menu',\n overlayToCloseDesktopNavigationAriaLabel: 'Close overlay',\n pauseVideoAriaLabel: 'Pause video',\n playVideoAriaLabel: 'Play video',\n previousAriaLabel: 'Go to previous slide',\n searchAriaLabel: 'Search',\n shareToFacebookAriaLabel: 'Share to Facebook',\n shareToWhatsappAriaLabel: 'Share to Whatsapp',\n shareToXAriaLabel: 'Share to X',\n siteNotificationsAriaLabel: 'Site notifications banner',\n uspStripAriaLabel: 'Unique Selling Point Strip',\n zoomInAriaLabel: 'Zoom in',\n zoomOutAriaLabel: 'Zoom out',\n};\n\nconst useAriaLabelsStore = create((set) => ({\n ariaLabels: initialAriaLabels,\n setAriaLabels: (ariaLabels: IAriaLabels) => set({ ariaLabels }),\n}));\n\nexport default useAriaLabelsStore;\n","import create from 'zustand';\n\ninterface IComponentsHeightsState {\n readonly siteNotificationsHeight: number;\n readonly USPsStripHeight: number;\n readonly setSiteNotificationsHeight: (height: number) => void;\n readonly setUSPsStripHeight: (height: number) => void;\n}\n\nconst useComponentsHeightsStore = create((set) => ({\n siteNotificationsHeight: 0,\n USPsStripHeight: 0,\n setSiteNotificationsHeight: (height: number) =>\n set({ siteNotificationsHeight: height }),\n setUSPsStripHeight: (height: number) => set({ USPsStripHeight: height }),\n}));\n\nexport default useComponentsHeightsStore;\n","import StickyNavPosition from '@models/enums/StickyNavPositionEnum';\nimport create from 'zustand';\n\ntype StickyNavPositions = StickyNavPosition.Top | StickyNavPosition.Bottom;\n\ninterface IStickyNavPositionState {\n readonly stickyNavPosition: StickyNavPosition;\n readonly setStickyNavPosition: (navPosition: StickyNavPositions) => void;\n}\n\nconst useStickyNavPositionStore = create((set) => ({\n stickyNavPosition: StickyNavPosition.Top,\n setStickyNavPosition: (navPosition: StickyNavPositions) =>\n set({ stickyNavPosition: navPosition }),\n}));\n\nexport default useStickyNavPositionStore;\n","const updateDataLayer = (eventPayload: Record) => {\n if (typeof window !== 'undefined') {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push(eventPayload);\n }\n};\n\nexport default updateDataLayer;\n","import { IAriaLabels } from '@models/IAriaLabels';\nimport useAriaLabelsStore, { initialAriaLabels } from '@state/AriaLabelsStore';\nimport { useEffect, useState } from 'react';\n\nconst useAriaLabels = () => {\n const [ariaLabels, setAriaLabels] = useState(initialAriaLabels);\n const ariaLabelsFromStore = useAriaLabelsStore((state) => state.ariaLabels);\n\n useEffect(() => {\n setAriaLabels(ariaLabelsFromStore);\n }, [ariaLabelsFromStore]);\n\n return ariaLabels;\n};\n\nexport default useAriaLabels;\n","import { useEffect, useState } from 'react';\n\nconst useIsTouchDevice = () => {\n const [isTouchDevice, setIsTouchDevice] = useState();\n\n const handleIsTouchDevice = (): void => {\n setIsTouchDevice('ontouchstart' in window || navigator.maxTouchPoints > 0);\n };\n\n useEffect(() => {\n handleIsTouchDevice();\n\n window.addEventListener('resize', handleIsTouchDevice);\n\n return () => window.removeEventListener('resize', handleIsTouchDevice);\n }, []);\n\n return isTouchDevice;\n};\n\nexport default useIsTouchDevice;\n","import { useCallback, useEffect, useState } from 'react';\n\nconst useMediaQuery = (minWidth: number) => {\n // Set the default value to undefined in order to properly distinguish the falsey values\n // where undefined is the value before computing whether the screen size is smaller than the minWidth\n // i.e. a state where we don't really know whether we're below the threshold or not\n // and false is the value where the computation returns false\n const [isSmallerThan, setIsSmallerThan] = useState();\n\n const handler = useCallback(() => {\n const isDesiredWidth = window.innerWidth < minWidth;\n setIsSmallerThan(isDesiredWidth);\n }, [minWidth]);\n\n useEffect(() => {\n window.addEventListener('resize', handler);\n handler();\n\n return () => {\n window.removeEventListener('resize', handler);\n };\n }, [handler]);\n\n return isSmallerThan;\n};\n\nexport default useMediaQuery;\n","import { useCallback, useRef, useState } from 'react';\n\nconst useResizeObserver = () => {\n const observerRef = useRef();\n const [resizeParameters, setResizeParameters] = useState({\n width: 0,\n height: 0,\n clientWidth: 0,\n clientHeight: 0,\n scrollWidth: 0,\n scrollHeight: 0,\n });\n\n const handleResize = useCallback((entries: ResizeObserverEntry[]) => {\n if (!Array.isArray(entries)) return;\n\n const entry = entries[0];\n\n setResizeParameters({\n width: entry?.contentRect.width ?? 0,\n height: entry?.contentRect.height ?? 0,\n clientWidth: entry?.target.clientWidth ?? 0,\n clientHeight: entry?.target.clientHeight ?? 0,\n scrollWidth: entry?.target.scrollWidth ?? 0,\n scrollHeight: entry?.target.scrollHeight ?? 0,\n });\n }, []);\n\n const ref = useCallback(\n (node: HTMLElement | null) => {\n if (observerRef.current && !node) {\n observerRef.current.disconnect();\n observerRef.current = undefined;\n }\n\n if (!observerRef.current && node) {\n observerRef.current = new ResizeObserver(handleResize);\n observerRef.current.observe(node);\n }\n },\n [handleResize]\n );\n\n return [ref, resizeParameters] as const;\n};\n\nexport default useResizeObserver;\n"],"names":["_ref","ariaLabel","className","color","onClick","size","IconSizeEnum","lg","dataTestId","closeModalAriaLabel","useAriaLabels","React","createElement","type","classNames","black","white","red","style","width","height","forwardRef","ref","additionalDataLayerProperties","direction","id","disabled","hasBackgroundColor","sizeClassName","iconSize","enabledArrowColor","isLightMode","nextAriaLabel","previousAriaLabel","buttonRef","useRef","useImperativeHandle","focus","current","HorizontalDirectionEnum","Left","Right","tabIndex","onKeyDown","e","key","updateDataLayer","event","content_type","link_text","Icon","name","colorClassName","additionalModules","children","navId","analyticsEnabled","props","Swiper","_extends","onSlideChangeTransitionEnd","swiper","realIndex","previousIndex","activeIndex","a11y","enabled","navigation","prevEl","nextEl","keyboard","onlyInViewport","modules","A11y","Keyboard","Navigation","hasMultipleItems","enabledNavigationArrowColor","swiperInstance","setSwiperInstance","useState","isTouchDevice","useIsTouchDevice","useEffect","undefined","allowTouchMove","hidden","NavButton","Carousel","loop","Autoplay","autoplay","delay","onSwiper","siteNotifications","containerRef","containerHeight","useResizeObserver","isMobile","useMediaQuery","isTablet","stickyNavPosition","useStickyNavPositionStore","state","setSiteNotificationsHeight","useComponentsHeightsStore","closeSiteNotificationAriaLabel","siteNotificationsAriaLabel","isNotificationDismissed","setIsNotificationDismissed","isStickyNavOnTop","StickyNavPosition","Top","Bottom","hasStickySiteNotifications","length","shouldUpdateStickyNavsPositions","notificationsBannerColour","notificationColour","hasDismissButton","notificationDismiss","anchorMenu","document","getElementById","productNavigation","sectionNavigation","top","AnimatePresence","motion","div","initial","y","opacity","animate","transition","duration","ease","exit","role","NotificationCarousel","map","notification","index","text","link","SwiperSlide","notificationId","href","url","target","promotion","substring","CloseButton","dismissNotification","dismissedNotification","cookieExpiryDate","dayjs","expiryDate","diff","Cookies","set","expires","initialAriaLabels","backToFirstLevelNavigationAriaLabel","breadcrumbAriaLabel","breadcrumbFooterAriaLabel","clearFiltersAriaLabel","closeMenuAriaLabel","closeAddressListAriaLabel","closeMobileNavigationAriaLabel","closeSignUpFormAriaLabel","copyToClipboardAriaLabel","editOrDeleteAriaLabel","mainNavigationAriaLabel","moreInformationAriaLabel","openAddressListAriaLabel","openImageInFullScreenAriaLabel","openMenuAriaLabel","overlayToCloseDesktopNavigationAriaLabel","pauseVideoAriaLabel","playVideoAriaLabel","searchAriaLabel","shareToFacebookAriaLabel","shareToWhatsappAriaLabel","shareToXAriaLabel","uspStripAriaLabel","zoomInAriaLabel","zoomOutAriaLabel","create","ariaLabels","setAriaLabels","siteNotificationsHeight","USPsStripHeight","setUSPsStripHeight","setStickyNavPosition","navPosition","eventPayload","window","dataLayer","push","ariaLabelsFromStore","useAriaLabelsStore","setIsTouchDevice","handleIsTouchDevice","navigator","maxTouchPoints","addEventListener","removeEventListener","minWidth","isSmallerThan","setIsSmallerThan","handler","useCallback","isDesiredWidth","innerWidth","observerRef","resizeParameters","setResizeParameters","clientWidth","clientHeight","scrollWidth","scrollHeight","handleResize","entries","Array","isArray","entry","contentRect","node","disconnect","ResizeObserver","observe"],"sourceRoot":""}