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A,wBAAiC/E,SACpCqG,IAGNjN,MAAAC,cAACgoB,EAAiB,CAAC3C,OAAQnP,EAAMoP,MAAOc,QAMjDH,GAAwB1S,GACvBxT,MAAAC,cAACioB,EAAAA,EAAY,CACX1U,OAAQA,EACRnL,KAAK,WACL8f,OAAQxd,IAAA,IAAC,QAAEkB,GAASlB,EAAA,OAClB3K,MAAAC,cAACiG,EAAAA,EAAI,CAACjF,QAAQ,WAAWd,UAAU,eAChC0L,EACI,IAIT,C","sources":["webpack://react-app/./components/Shared/src/components/atoms/LoadingSpinner/LoadingSpinner.tsx","webpack://react-app/./components/molecules/ColourSwatchCard/ColourSwatchCard.tsx","webpack://react-app/./components/Shared/src/utility/helpers/replaceValuesInLabel.ts","webpack://react-app/./models/enums/ProductCardVariantEnum.ts","webpack://react-app/./components/Shared/src/components/molecules/Accordion/Accordion.tsx","webpack://react-app/./models/enums/ListingTypeEnum.ts","webpack://react-app/./components/Shared/src/components/atoms/GridSlider/GridSlider.tsx","webpack://react-app/./components/Shared/src/components/atoms/Tag/Tag.tsx","webpack://react-app/./components/Shared/src/components/molecules/FilterAccordion/FilterAccordion.tsx","webpack://react-app/./components/atoms/ListingFilterItem/ListingFilterItem.tsx","webpack://react-app/./components/molecules/ListingFilters/ListingFilters.tsx","webpack://react-app/./components/Shared/src/components/molecules/ListingPlaceholder/ListingPlaceholder.tsx","webpack://react-app/./components/molecules/ListingWrapper/grid.ts","webpack://react-app/./components/molecules/ListingWrapper/ListingWrapper.tsx","webpack://react-app/./components/Shared/src/utility/hooks/useListingComponentData.ts","webpack://react-app/./components/Shared/src/utility/helpers/createColourPng.ts","webpack://react-app/./components/atoms/HotspotButton/HotspotButton.tsx","webpack://react-app/./components/molecules/HotspotCard/HotspotCard.tsx","webpack://react-app/./models/enums/ColourSwatchVariantEnum.ts","webpack://react-app/./components/molecules/ProductCard/ProductCard.tsx","webpack://react-app/./components/Shared/src/components/molecules/InspirationCard/InspirationCard.tsx","webpack://react-app/./components/Shared/src/models/enums/SizeEnum.ts","webpack://react-app/./components/Shared/src/components/atoms/AccordionItem/AccordionItem.tsx","webpack://react-app/./components/Shared/src/components/atoms/Video/Video.tsx","webpack://react-app/./components/Shared/src/components/atoms/ConditionalWrapper/ConditionalWrapper.tsx","webpack://react-app/./components/Shared/src/utility/hooks/useIsTouchDevice.ts","webpack://react-app/./components/Shared/src/components/atoms/Search/HighlightedResult.tsx","webpack://react-app/./components/Shared/src/components/atoms/Search/Search.tsx"],"sourcesContent":["import SizeEnum from '@models/enums/SizeEnum';\nimport ThemeEnum from '@models/enums/ThemeEnum';\nimport { ILoadingSpinner } from '@models/ILoadingSpinner';\nimport classNames from 'classnames';\n\nconst LoadingSpinner = ({\n size = SizeEnum.Small,\n loadingLabel = '...loading',\n theme = ThemeEnum.Light,\n}: ILoadingSpinner) => {\n const sizeClasses = classNames({\n 'tw-w-xs tw-h-xs': size === SizeEnum.Small,\n 'tw-w-sm tw-h-sm': size === SizeEnum.Medium,\n 'tw-h-16 tw-w-16': size === SizeEnum.Large,\n });\n\n const borderClasses = classNames({\n 'tw-border-2': size === SizeEnum.Small,\n 'tw-border-[3px]': size === SizeEnum.Medium,\n 'tw-border-4': size === SizeEnum.Large,\n });\n\n const segmentClasses = classNames({\n 'tw-border-b-2 tw-border-l-2': size === SizeEnum.Small,\n 'tw-border-b-[3px] tw-border-l-[3px]': size === SizeEnum.Medium,\n 'tw-border-b-4 tw-border-l-4': size === SizeEnum.Large,\n });\n\n return (\n \n \n \n \n \n {loadingLabel}\n \n );\n};\n\nexport default LoadingSpinner;\n","import Image from '@atoms/Image/Image';\nimport Text from '@atoms/Text/Text';\nimport { IColourSwatchCard } from '@models/IColourSwatchCard';\nimport CardTypeEnum from '@models/enums/CardTypeEnum';\nimport ColourSwatchVariantEnum from '@models/enums/ColourSwatchVariantEnum';\nimport AddToWishlist from '@molecules/AddToWishlist/AddToWishlist';\nimport ProductImageGallery from '@molecules/ProductImageGallery/ProductImageGallery';\nimport { createColourPng } from '@utility/helpers/createColourPng';\nimport useIsTouchDevice from '@utility/hooks/useIsTouchDevice';\nimport classNames from 'classnames';\nimport { motion, useInView } from 'motion/react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport const enum ColourSwatchCardBG {\n Grey = 'tw-bg-grey-10',\n White = 'tw-bg-white',\n}\n\ninterface Props extends IColourSwatchCard {\n readonly createColourImage?: boolean;\n readonly showLikeButton?: boolean;\n readonly wishlistId?: number;\n}\n\nconst ColourSwatchCard = (props: Props) => {\n const {\n bgColour = ColourSwatchCardBG.Grey,\n colourCode,\n colourHexCode,\n colourName,\n description,\n images,\n link,\n mainImage,\n showLikeButton = true,\n tag,\n variant = ColourSwatchVariantEnum.Default,\n wishlistDrawerLabels,\n wishlistId,\n createColourImage = true,\n } = props;\n\n const [imageDataUrl, setImageDataUrl] = useState();\n const [isHovered, setIsHovered] = useState(false);\n const colourRef = useRef(null);\n const isTouchDevice = useIsTouchDevice();\n const isDefaultVariant = variant === ColourSwatchVariantEnum.Default;\n const isDetailedVariant = variant === ColourSwatchVariantEnum.Detailed;\n const isSimpleVariant = variant === ColourSwatchVariantEnum.Simple;\n const containerRef = useRef(null);\n const inView = useInView(containerRef, { amount: 0, once: true });\n\n const fetchImageDataUrl = useCallback(async () => {\n if (isTouchDevice || !colourHexCode) return;\n try {\n const dataUrl = await createColourPng(colourRef, colourHexCode);\n setImageDataUrl(dataUrl);\n } catch (error) {\n console.error(error);\n }\n }, [colourHexCode, isTouchDevice]);\n\n useEffect(() => {\n if (inView && createColourImage) fetchImageDataUrl();\n }, [fetchImageDataUrl, inView, createColourImage]);\n\n const handleTrackingEvent = useCallback(() => {\n window.dataLayer.push({\n event: 'trackingEvent_select_item',\n event_name_variable: 'select_item',\n trackingEvent_select_item: {\n item_name: colourName,\n item_category: 'colour',\n item_category3: colourHexCode,\n },\n });\n }, [colourName, colourHexCode]);\n\n const backgroundColorStyle = useMemo(() => {\n return colourHexCode\n ? { backgroundColor: `#${colourHexCode}` }\n : { backgroundImage: `url(${mainImage?.url})` };\n }, [colourHexCode, images]);\n\n return (\n setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onFocus={() => setIsHovered(true)}\n onBlur={() => setIsHovered(false)}\n ref={containerRef}\n >\n {showLikeButton && (\n \n )}\n \n
\n {!isTouchDevice && (\n \n {imageDataUrl && (\n \n )}\n \n )}\n \n {!isTouchDevice && images.length === 1 && images[0] ? (\n \n ) : (\n \n )}\n \n\n {tag && !isSimpleVariant && (\n \n
\n \n {tag}\n \n
\n
\n )}\n \n \n \n {colourCode}\n \n\n {!isSimpleVariant && (\n \n {colourName?.toLowerCase()}\n \n )}\n\n {isDetailedVariant && description && (\n \n )}\n \n \n \n );\n};\n\nexport default ColourSwatchCard;\n","const replaceValuesInLabel = (\n label: string,\n replacementArray: Array\n) => {\n let newLabel = label;\n\n replacementArray.forEach((value, index) => {\n newLabel = newLabel.replace(`{${index}}`, value.toString());\n });\n\n return newLabel;\n};\n\nexport default replaceValuesInLabel;\n","enum ProductCardVariantEnum {\n Default = 'default',\n Tall = 'tall',\n TallOnDesktopOnly = 'tall-desktop',\n}\n\nexport default ProductCardVariantEnum;\n","import AccordionItem from '@atoms/AccordionItem/AccordionItem';\nimport { VariantType } from '@models/IAccordion';\nimport classNames from 'classnames';\nimport { PropsWithChildren } from 'react';\n\ninterface Props {\n items?: Array<{\n title: string;\n text?: string;\n }>;\n variant?: VariantType;\n}\n\nconst Accordion = ({\n items,\n variant = 'primary',\n children,\n}: PropsWithChildren) => (\n
\n {children ??\n items?.map(({ title, text }, index) => (\n \n {children}\n \n ))}\n
\n);\n\nexport default Accordion;\n","enum ListingTypeEnum {\n Colour = 'colour',\n Product = 'product',\n}\n\nexport default ListingTypeEnum;\n","import Icon from '@atoms/Icon/Icon';\nimport { Label, Slider, SliderThumb, SliderTrack } from 'react-aria-components';\n\nexport type GridSize = 0 | 50 | 100;\n\ninterface Props {\n readonly label?: string;\n readonly setValue: (size: GridSize) => void;\n readonly value: GridSize;\n}\n\nconst GridSlider = ({ value, setValue, label = 'Grid Slider' }: Props) => (\n \n \n
\n {\n e.preventDefault();\n setValue(value === 0 ? 0 : ((value - 50) as GridSize));\n }}\n >\n \n \n
\n \n \n \n \n
\n {\n e.preventDefault();\n setValue(value === 100 ? 100 : ((value + 50) as GridSize));\n }}\n >\n \n \n
\n \n);\n\nexport default GridSlider;\n","import Icon from '@atoms/Icon/Icon';\nimport { ComponentProps, ElementType } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nconst defaultElement = 'button';\n\nexport const enum TagVariant {\n Grey = 'grey',\n Yellow = 'yellow',\n}\n\ntype ExplicitProps = {\n label: string;\n isActive?: boolean;\n largeText?: boolean;\n icon?: boolean;\n variant?: TagVariant;\n};\n\ntype PropsWithAs =\n ExplicitProps & {\n as?: TElementType;\n };\n\ntype ITag = PropsWithAs &\n Omit, keyof PropsWithAs>;\n\nfunction Tag({\n as,\n label,\n isActive,\n largeText,\n icon = false,\n variant = TagVariant.Grey,\n ...otherProps\n}: ITag) {\n const Wrapper = as ?? 'button';\n const isClickable = Wrapper === 'button' || Wrapper === 'a';\n const hoverStyles =\n variant === TagVariant.Yellow\n ? \"hover:tw-bg-yellow-hover data-[active='true']:tw-border-yellow data-[active='true']:tw-bg-yellow hover:tw-border-yellow-hover\"\n : \"hover:tw-bg-grey-30 data-[active='true']:tw-border-grey-40 data-[active='true']:tw-bg-grey-40\";\n\n return (\n \n {label}\n {icon && }\n \n );\n}\n\nexport default Tag;\n","import AccordionItem from '@atoms/AccordionItem/AccordionItem';\nimport Checkbox from '@atoms/Checkbox/Checkbox';\nimport IFilterAccordion from '@models/IFilterAccordion';\nimport Accordion from '@molecules/Accordion/Accordion';\nimport { useState } from 'react';\n\nconst FilterAccordion = ({\n allowMultipleOpen = true,\n className,\n filters,\n firstOpen = false,\n padding,\n register,\n variant = 'filter',\n}: IFilterAccordion) => {\n const [activeIndex, setActiveIndex] = useState(firstOpen ? 0 : -1);\n\n return (\n
\n \n {filters.map((filterGroup, index) => (\n setActiveIndex(activeIndex === index ? -1 : index)}\n >\n
    \n {filterGroup.options.map(({ id, label }) => (\n \n ))}\n
\n \n ))}\n
\n
\n );\n};\n\nexport default FilterAccordion;\n","import Image from '@atoms/Image/Image';\nimport Text from '@atoms/Text/Text';\nimport { IListingFilterItem } from '@models/IListing';\nimport classNames from 'classnames';\n\nconst ListingFilterItem = ({\n filter,\n image,\n colourHexCode,\n selected,\n isMobileFilters,\n}: IListingFilterItem) => {\n return (\n \n \n {image?.url && (\n \n )}\n \n\n {!isMobileFilters && (\n
\n \n {filter.label}\n \n \n
\n )}\n \n );\n};\n\nexport default ListingFilterItem;\n","import ListingFilterItem from '@atoms/ListingFilterItem/ListingFilterItem';\nimport { IListingFilterGroup } from '@models/IListing';\nimport classNames from 'classnames';\n\ninterface Props {\n readonly filters: IListingFilterGroup[];\n readonly isMobileFilters?: boolean;\n readonly onClickCallback: (\n selectedListingFilters: IListingFilterGroup[],\n ) => void;\n readonly selectedListingFilters?: string[];\n readonly type?: 'colour' | 'product';\n}\n\nconst ListingFilters = ({\n filters,\n type = 'colour',\n isMobileFilters,\n onClickCallback,\n selectedListingFilters = [],\n}: Props) => {\n const handleClick = ({ filter }: IListingFilterGroup) => {\n const id = filter.id.toString();\n const newSelectedListingFilters = selectedListingFilters.includes(id)\n ? selectedListingFilters.filter((selectedId) => selectedId !== id)\n : [...selectedListingFilters, id];\n\n const selectedFilterObjects = newSelectedListingFilters\n .slice() // Create a copy of the array to avoid mutating the original\n .reverse() // Reverse the array to ensure the last item is processed first\n .map((selectedId) => {\n const selectedFilter = filters.find(\n ({ filter }) => filter.id.toString() === selectedId,\n );\n return selectedFilter\n ? {\n filter: {\n id: selectedFilter.filter.id.toString(),\n label: selectedFilter.filter.label,\n },\n featuredInspiration: selectedFilter.featuredInspiration,\n inspirationCard: selectedFilter.inspirationCard,\n }\n : null;\n })\n .filter((filter) => filter !== null) as IListingFilterGroup[];\n\n window.dataLayer.push({\n event: 'trackingEvent_navigation_circle',\n event_name_variable: 'navigation_circle',\n trackingEvent_navigation_circle: {\n navigation_circle: filter.label,\n navigation_category: type,\n },\n });\n\n onClickCallback(selectedFilterObjects);\n };\n\n return (\n
\n
\n
\n \n {filters.map(({ colourHexCode, image, filter }) => (\n handleClick({ filter })}\n className=\"tw-group tw-outline-none\"\n >\n \n \n ))}\n
\n
\n \n
\n );\n};\n\nexport default ListingFilters;\n","import Icon from '@atoms/Icon/Icon';\nimport Text from '@atoms/Text/Text';\nimport { IconName } from '@models/IIcon';\n\nexport interface IListingPlaceholder {\n readonly dataTestId?: string;\n readonly iconName?: IconName;\n readonly title: string;\n readonly message: string;\n}\n\nconst ListingPlaceholder = ({\n dataTestId,\n iconName = 'no-result',\n title,\n message,\n}: IListingPlaceholder) => (\n \n \n \n {title}\n \n \n {message}\n \n \n);\n\nexport default ListingPlaceholder;\n","import { GridSize } from '@atoms/GridSlider/GridSlider';\nimport ColourSwatchVariantEnum from '@models/enums/ColourSwatchVariantEnum';\n\nexport const gridConfig = {\n // 4 col\n 100: {\n gridClasses:\n 'md:tw-gap-x-md xl:tw-gap-x-5 tw-gap-x-xs tw-gap-y-lg md:tw-gap-y-xl xl:tw-gap-y-2xl xl:tw-gap-x-md',\n cardSize: 'tw-col-span-12 md:tw-col-span-6 xl:tw-col-span-3',\n cardVariant: ColourSwatchVariantEnum.Detailed,\n hotspotPosition:\n 'xl:tw-col-span-6 xl:tw-row-span-1 xl:tw-col-start-0 xl:tw-row-start-2 tw-col-span-full tw-row-span-1 tw-col-start-0 tw-row-start-5 md:tw-row-start-3 -tw-mx-xs md:tw-mx-0',\n colourInspirationPosition:\n 'xl:tw-col-span-3 xl:tw-row-span-1 xl:tw-col-start-0 xl:tw-row-start-4 tw-col-start-0 tw-row-start-8 tw-col-span-full tw-row-span-1 tw-min-h-[550px] md:tw-col-start-7 md:tw-row-start-5 md:tw-col-span-6 md:tw-row-span-1',\n productInspirationPosition:\n 'xl:tw-col-span-3 xl:tw-row-span-1 xl:tw-col-start-4 xl:tw-row-start-3 tw-col-start-0 tw-row-start-8 tw-col-span-full tw-row-span-1 tw-min-h-[550px] md:tw-col-start-7 md:tw-row-start-5 md:tw-col-span-6 md:tw-row-span-1',\n hotspot: {\n occupiedSpaceCount: { sm: 1, md: 2, xl: 2 }, // amount of grid spaces the hotspot occupies\n minResultsToShow: { sm: 4, md: 4, xl: 6 }, // minimum amount of results to show before the card is displayed\n aspectRatio: { sm: 375 / 458, md: 688 / 550, xl: 640 / 620 },\n },\n inspiration: {\n occupiedSpaceCount: { sm: 1, md: 1, xl: 1 },\n minResultsToShow: { sm: 9, md: 11, xl: 10 },\n },\n },\n // 6 col\n 50: {\n gridClasses:\n 'md:tw-gap-x-md tw-gap-x-xs tw-gap-y-lg md:tw-gap-y-xl xl:tw-gap-y-2xl xl:tw-gap-x-5',\n cardSize: 'tw-col-span-6 md:tw-col-span-4 xl:tw-col-span-2',\n cardVariant: ColourSwatchVariantEnum.Default,\n hotspotPosition:\n 'xl:tw-col-span-6 xl:tw-row-span-2 xl:tw-col-start-7 xl:tw-row-start-2 tw-col-span-full tw-row-span-1 tw-col-start-0 tw-row-start-3 tw-col-span-full tw-row-span-1 tw-col-start-0 tw-row-start-3 -tw-mx-xs md:tw-mx-0',\n colourInspirationPosition:\n 'tw-col-span-full tw-col-start-0 tw-row-span-1 tw-row-start-7 tw-min-h-[550px] md:tw-col-span-8 md:tw-row-span-2 md:tw-col-start-0 md:tw-row-start-6 xl:tw-col-span-4 xl:tw-row-span-2 xl:tw-col-start-0 xl:tw-row-start-4',\n productInspirationPosition:\n 'tw-col-span-full tw-col-start-0 tw-row-span-1 tw-row-start-7 tw-min-h-[550px] md:tw-col-span-8 md:tw-row-span-2 md:tw-col-start-0 md:tw-row-start-6 xl:tw-col-span-4 xl:tw-row-span-2 xl:tw-col-start-0 xl:tw-row-start-4',\n hotspot: {\n occupiedSpaceCount: { sm: 2, md: 3, xl: 6 },\n minResultsToShow: { sm: 5, md: 7, xl: 12 },\n aspectRatio: { sm: 375 / 458, md: 688 / 550, xl: 646 / 830 },\n },\n inspiration: {\n occupiedSpaceCount: { sm: 2, md: 4, xl: 4 },\n minResultsToShow: { sm: 11, md: 14, xl: 20 },\n },\n },\n // 12 col\n 0: {\n gridClasses:\n 'md:tw-gap-x-xs tw-gap-x-[7px] tw-gap-y-sm md:tw-gap-y-md xl:tw-gap-y-lg',\n cardSize: 'tw-col-span-3 md:tw-col-span-2 xl:tw-col-span-1',\n cardVariant: ColourSwatchVariantEnum.Simple,\n hotspotPosition:\n 'xl:tw-col-span-6 xl:tw-row-span-4 xl:tw-col-start-7 xl:tw-row-start-3 tw-col-span-full tw-row-span-1 tw-col-start-0 tw-row-start-5 -tw-mx-xs md:tw-mx-0',\n colourInspirationPosition:\n 'tw-col-span-full tw-col-start-0 tw-row-span-1 tw-row-start-8 tw-min-h-[550px] xl:tw-col-span-3 xl:tw-row-span-3 xl:tw-col-start-0 xl:tw-row-start-8 md:tw-col-span-6 md:tw-row-span-3 md:tw-col-start-0 md:tw-row-start-8',\n productInspirationPosition:\n 'tw-col-span-full tw-col-start-0 tw-row-span-1 tw-row-start-8 tw-min-h-[550px] xl:tw-col-span-3 xl:tw-row-span-3 xl:tw-col-start-0 xl:tw-row-start-8 md:tw-col-span-6 md:tw-row-span-3 md:tw-col-start-0 md:tw-row-start-8',\n hotspot: {\n occupiedSpaceCount: { sm: 4, md: 6, xl: 24 },\n minResultsToShow: { sm: 17, md: 25, xl: 48 },\n aspectRatio: { sm: 375 / 458, md: 688 / 550, xl: 648 / 792 },\n },\n inspiration: {\n occupiedSpaceCount: { sm: 4, md: 9, xl: 9 },\n minResultsToShow: { sm: 25, md: 45, xl: 87 },\n },\n },\n};\n\nexport const getGridConfig = (gridSize: GridSize) => gridConfig[gridSize];\n\n// A bit ugly but there are different scenarios we need to check to clean the data, can look at improving this later\nexport function sanitizeQuery>(query: T): T {\n return Object.fromEntries(\n Object.entries(query).filter(\n ([, value]) =>\n value !== undefined &&\n value !== 'undefined' &&\n value !== '' &&\n value !== 'false' &&\n value !== false &&\n !(Array.isArray(value) && value.length === 0),\n ),\n ) as T;\n}\n","import Button from '@atoms/Button/Button';\nimport GridSlider, { GridSize } from '@atoms/GridSlider/GridSlider';\nimport LoadingSpinner from '@atoms/LoadingSpinner/LoadingSpinner';\nimport Search from '@atoms/Search/Search';\nimport Tag from '@atoms/Tag/Tag';\nimport Text from '@atoms/Text/Text';\nimport ListingTypeEnum from '@models/enums/ListingTypeEnum';\nimport SizeEnum from '@models/enums/SizeEnum';\nimport { IColourSwatchCard } from '@models/IColourSwatchCard';\nimport { IHotspotCard } from '@models/IHotspotCard';\nimport { IInspirationCard } from '@models/IInspirationCard';\nimport {\n cardTypes,\n IListing,\n IListingFilterGroup,\n requestState,\n} from '@models/IListing';\nimport { IProductCard } from '@models/IProductCard';\nimport ColourSwatchCard, {\n ColourSwatchCardBG,\n} from '@molecules/ColourSwatchCard/ColourSwatchCard';\nimport DrawerWrapper from '@molecules/DrawerWrapper/DrawerWrapper';\nimport FilterAccordion from '@molecules/FilterAccordion/FilterAccordion';\nimport HotspotCard from '@molecules/HotspotCard/HotspotCard';\nimport InspirationCard from '@molecules/InspirationCard/InspirationCard';\nimport ListingFilters from '@molecules/ListingFilters/ListingFilters';\nimport ListingPlaceholder from '@molecules/ListingPlaceholder/ListingPlaceholder';\nimport ProductCard from '@molecules/ProductCard/ProductCard';\nimport { fadeIn } from '@utility/config/animations';\nimport replaceValuesInLabel from '@utility/helpers/replaceValuesInLabel';\nimport useBreakpoint from '@utility/hooks/useBreakpoint';\nimport useListingComponentData from '@utility/hooks/useListingComponentData';\nimport classNames from 'classnames';\nimport { AnimatePresence, motion } from 'motion/react';\nimport queryString from 'query-string';\nimport { MouseEvent, useEffect, useMemo, useRef, useState } from 'react';\nimport { SubmitHandler, useForm } from 'react-hook-form';\nimport { getGridConfig, sanitizeQuery } from './grid';\n\ntype QueryState = {\n readonly freetext?: string;\n readonly page: number;\n readonly pageUrl: string;\n readonly take: number;\n readonly [key: string]: any; // Custom query params\n};\n\ntype SelectedFilter = {\n readonly featuredInspiration?: IHotspotCard;\n readonly inspirationCard?: IInspirationCard;\n readonly id: string;\n readonly label: string;\n readonly name: string;\n};\n\ninterface Props extends IListing {\n readonly customQueryParams?: any;\n readonly initialFilters?: any;\n readonly listingFilterParam: string;\n readonly type: ListingTypeEnum;\n}\n\nconst ListingWrapper = ({\n applyLabel,\n applicationAreas,\n autoCompleteEndpoint,\n autoCompletePlaceholder,\n clearAllLabel,\n closeLabel,\n countLabel,\n customQueryParams,\n featuredInspiration,\n filterLabel,\n filters,\n loadMoreLabel,\n initialFilters,\n inspirationCard,\n listingFilterParam,\n listingFilters,\n loadingLabel,\n noResultsHeader,\n noResultsLabel,\n noResultsText,\n resultsLabel,\n openLabel,\n pageUrl,\n searchEndpoint,\n subtitle,\n title,\n type,\n}: Props) => {\n const breakpoint = useBreakpoint();\n const [gridSize, setGridSize] = useState(\n type === ListingTypeEnum.Colour ? 50 : 100,\n );\n const [listItems, setListItems] = useState([]);\n const [slicedListitems, setSlicedListItems] = useState([]);\n const [isMobileFiltersOpen, setIsMobileFiltersOpen] = useState(false);\n const [selectedFilters, setSelectedFilters] = useState([]);\n const [sortedListingFilters, setSortedListingFilters] = useState<\n IListingFilterGroup[]\n >([]);\n const [showLoadMore, setShowLoadMore] = useState(false);\n const [selectedFeaturedInspiration, setSelectedFeaturedInspiration] =\n useState(featuredInspiration);\n const [selectedInspirationCard, setSelectedInspirationCard] = useState<\n IInspirationCard | undefined\n >(inspirationCard);\n const [clearSearch, setClearSearch] = useState(0);\n const resultsRef = useRef(null);\n const hasPopulatedQueryState = useRef(false);\n\n type CardData = {\n readonly show: boolean;\n readonly occupiedSpaceCount: number;\n readonly aspectRatio?: number;\n };\n\n const [hotspotData, setHotspotData] = useState({\n show: false,\n occupiedSpaceCount: 0,\n aspectRatio: undefined,\n });\n const [inspirationData, setInspirationData] = useState({\n show: false,\n occupiedSpaceCount: 0,\n });\n\n const params =\n typeof window !== 'undefined'\n ? queryString.pick(window?.location.search, [\n 'freetext',\n listingFilterParam,\n ...filters.map((filter) => String(filter.id)),\n ])\n : '';\n\n const parsedParams = queryString.parse(params, {\n arrayFormat: 'comma',\n });\n\n const parsedUrlParams = Object.entries(parsedParams).reduce(\n (acc: Record, [key, value]) => {\n if (key === listingFilterParam) {\n if (Array.isArray(value)) {\n acc[key] = value;\n } else {\n acc[key] = value ? [value] : [];\n }\n } else {\n acc[key] = value;\n }\n return acc;\n },\n {},\n );\n\n const hasParams = Object.keys(parsedUrlParams).length > 0;\n\n const existingFilters = hasParams ? parsedUrlParams : initialFilters;\n const initialSearchText = parsedUrlParams ? parsedUrlParams?.freetext : '';\n\n // Adjust cardVariant, gridClasses and cardSize based on gridSize\n const {\n gridClasses,\n cardSize,\n cardVariant,\n hotspotPosition,\n colourInspirationPosition,\n productInspirationPosition,\n hotspot,\n inspiration,\n } = getGridConfig(gridSize);\n\n // Work out whether to show featured inspiration and inspiration card based on breakpoint and amount of items shown\n type Breakpoint = 'sm' | 'md' | 'xl';\n\n const mapBreakpoint = (breakpoint: Breakpoint): Breakpoint => {\n const mapping: Record = {\n sm: 'sm',\n md: 'md',\n lg: 'md', // 'lg' mapped to 'md'\n xl: 'xl',\n xxl: 'xl', // 'xxl' mapped to 'xl'\n };\n return mapping[breakpoint] || breakpoint;\n };\n\n const positionClass = (\n cardType: 'product' | 'colour' | 'inspiration' | 'hotspot',\n ) => {\n switch (cardType) {\n case 'hotspot':\n return hotspotPosition;\n case 'inspiration':\n return type === ListingTypeEnum.Product\n ? productInspirationPosition\n : colourInspirationPosition;\n default:\n return cardSize;\n }\n };\n\n useEffect(() => {\n if (selectedFeaturedInspiration || selectedInspirationCard) {\n const normalizedBreakpoint = mapBreakpoint(breakpoint as Breakpoint);\n\n setHotspotData({\n show:\n (selectedFeaturedInspiration &&\n listItems.length >=\n hotspot.minResultsToShow[normalizedBreakpoint]) ||\n false,\n occupiedSpaceCount:\n hotspot.occupiedSpaceCount[normalizedBreakpoint] || 0,\n aspectRatio: hotspot.aspectRatio[normalizedBreakpoint],\n });\n\n setInspirationData({\n show:\n (selectedInspirationCard &&\n listItems.length >=\n inspiration.minResultsToShow[normalizedBreakpoint]) ||\n false,\n occupiedSpaceCount:\n inspiration.occupiedSpaceCount[normalizedBreakpoint] || 0,\n });\n }\n }, [\n selectedFeaturedInspiration,\n selectedInspirationCard,\n breakpoint,\n listItems,\n ]);\n\n const calculatedPageSize = useMemo(() => {\n const pageSizes = {\n 100: breakpoint === 'sm' ? 10 : 20,\n 50: breakpoint === 'sm' ? 18 : 36,\n 0: breakpoint === 'sm' ? 40 : 144,\n };\n\n return pageSizes[gridSize];\n }, [gridSize, breakpoint]);\n\n // Remove hotspot and inspiration occupied space from listItems\n useEffect(() => {\n const count =\n listItems.length -\n (hotspotData.show ? hotspotData.occupiedSpaceCount : 0) -\n (inspirationData.show ? inspirationData.occupiedSpaceCount : 0);\n\n const newSlicedListItems =\n data.total <= listItems.length || data.count < calculatedPageSize\n ? listItems\n : listItems.slice(0, count);\n\n setSlicedListItems(newSlicedListItems);\n }, [listItems, hotspotData, inspirationData]);\n\n const defaultState = {\n applicationAreas,\n freetext: '',\n page: 0,\n pageUrl,\n take: calculatedPageSize,\n };\n\n const [queryState, setQueryState] = useState({\n ...defaultState,\n ...customQueryParams,\n });\n\n const { pageUrl: formPageUrl, freetext, page, take, ...rest } = queryState;\n\n // Remove any customQueryParams to get the drawerFilters\n const drawerFilters = Object.fromEntries(\n Object.entries(rest).filter(\n ([key]) => !Object.keys(customQueryParams).includes(key),\n ),\n );\n\n const mappedDrawerFilters: SelectedFilter[] = Object.entries(\n drawerFilters,\n ).map(([key, value]) => ({\n id: value as string,\n name: key,\n label: `Filter for ${key}`,\n }));\n\n const setCleanQueryParams = (data: QueryState) => {\n const cleanQuery = sanitizeQuery({\n ...customQueryParams,\n ...data,\n pageUrl,\n });\n\n // Remove specific parameters\n const {\n applicationAreas,\n page,\n take,\n pageUrl: filteredUrl,\n ...filteredQuery\n } = cleanQuery;\n\n const queryStringified = queryString.stringify(filteredQuery, {\n arrayFormat: 'comma',\n });\n\n setQueryState(cleanQuery);\n\n const newUrl = queryStringified\n ? `${window.location.pathname}?${queryStringified}`\n : window.location.pathname;\n\n window.history.replaceState(null, '', newUrl);\n };\n\n // Populate queryState using url query params on client side\n useEffect(() => {\n setValue('freetext', parsedUrlParams.freetext);\n\n setCleanQueryParams({\n ...parsedUrlParams,\n ...drawerFilters,\n ...customQueryParams,\n ...existingFilters,\n page: 0,\n });\n\n setSelectedFilters(mappedDrawerFilters);\n }, []);\n\n const {\n register,\n handleSubmit,\n formState: { errors },\n setValue,\n reset,\n watch,\n } = useForm({ defaultValues: queryState });\n\n const filterIds = filters.map((filter) => filter.id);\n const checkedDrawerFilters = watch(filterIds);\n const mappedCheckedDrawerFilters = checkedDrawerFilters\n .flatMap((value) => value)\n .filter(Boolean);\n\n const {\n fetchData,\n state: { data, loading, error },\n } = useListingComponentData<\n { readonly [key: string]: unknown },\n requestState\n >(searchEndpoint, { results: listItems, total: 0, count: 0 }, false, false);\n\n const handleListingFiltersUpdate = (\n selectedListingFilters: IListingFilterGroup[],\n ) => {\n const listingFilters = selectedListingFilters.map(({ filter }) =>\n filter.id.toString(),\n );\n\n setSortedListingFilters(selectedListingFilters);\n\n setCleanQueryParams({\n ...queryState,\n [listingFilterParam]: listingFilters,\n page: 0,\n });\n };\n\n // Function to clear all filters and query params\n const clearAllFilters = (\n e: MouseEvent,\n params: Partial = {},\n ) => {\n e.preventDefault();\n\n if (checkedDrawerFilters) reset(checkedDrawerFilters);\n\n // Resets all the current selected filters\n reset(filterIds);\n reset({ freetext: '' });\n\n setClearSearch((prev) => prev + 1);\n setSortedListingFilters([]);\n setCleanQueryParams({\n freetext: '',\n take: queryState.take,\n page: 0,\n applicationAreas,\n ...params,\n ...customQueryParams,\n });\n\n setIsMobileFiltersOpen(false);\n };\n\n // Remove filter from selectedFilters when Tag is clicked\n const handleTagRemove = (id: string, key: string) => {\n const updatedFilters = selectedFilters.filter((filter) => filter.id !== id);\n setSelectedFilters(updatedFilters);\n\n const params = () => {\n const currentValue = ([] as any[]).concat(\n queryState[key as keyof typeof queryState] || [],\n );\n\n if (key === 'freetext') {\n return { freetext: '' };\n }\n\n return {\n [key]: currentValue.filter((item) => item !== id),\n };\n };\n\n if (key === 'freetext') setClearSearch((prev) => prev + 1);\n\n setCleanQueryParams({\n ...queryState,\n ...params(),\n });\n };\n\n // Form submission handler\n const onSubmit: SubmitHandler = async (data, e) => {\n e?.preventDefault();\n\n const { applicationAreas, page, pageUrl, freetext, ...selectedFilters } =\n data;\n\n // Reset filters when a new search term is submitted\n if (!!freetext && freetext != queryState.freetext) {\n setCleanQueryParams({\n freetext,\n page: 0,\n take: queryState.take,\n applicationAreas,\n ...customQueryParams,\n });\n } else {\n setCleanQueryParams({\n ...queryState,\n ...data,\n page: 0,\n });\n }\n\n window.dataLayer.push({\n event: 'trackingEvent_filter_select',\n trackingEvent_filter_select: { ...selectedFilters },\n });\n\n // Scroll to listing results\n const headerHeight = document.getElementById('header')?.offsetHeight || 0;\n\n if (resultsRef.current) {\n const resultsOffset =\n resultsRef.current.getBoundingClientRect().top +\n window.scrollY -\n headerHeight;\n\n window.scrollTo({\n top: resultsOffset,\n behavior: 'smooth',\n });\n }\n };\n\n useEffect(() => {\n const updatedPageSize = calculatedPageSize;\n\n const cleanQuery = sanitizeQuery(queryState);\n\n // Fetch data with the sanitized query parameters\n if (hasPopulatedQueryState.current) {\n fetchData({\n ...cleanQuery,\n take: updatedPageSize,\n });\n }\n\n // Reset with the current queryState\n reset(queryState);\n\n const { freetext } = queryState;\n const updatedSelectedFreetext = freetext\n ? [{ name: 'freetext', id: 'freetext', label: freetext }]\n : [];\n\n // Flatten and transform the filters based on selected filter values\n const updatedSelectedFilters = filters?.flatMap((filter) => {\n const mappedFilter = mappedDrawerFilters.find(\n (mapped) => mapped.name === filter.id,\n );\n\n if (!mappedFilter) return [];\n\n // Map the options where the id of the option matches one of the ids in the mappedFilter.id array\n return filter.options\n .filter((option) => mappedFilter.id.includes(option.id))\n .map(({ id, label }) => ({\n name: filter.id,\n id,\n label,\n }));\n });\n\n // Match listing filters with query state\n const findMatchingItems = (\n items: any[],\n idAccessor: { (item: any): any; (arg0: any): any },\n ) => {\n // Extract all arrays from queryState\n const queryArrays = Object.values(queryState).filter((value) =>\n Array.isArray(value),\n );\n\n const queryIds = queryArrays.flat().map(String);\n\n // Filter items by matching IDs\n return items.filter((item) =>\n queryIds.includes(String(idAccessor(item))),\n );\n };\n\n const selectedListingFilters = listingFilters\n ? findMatchingItems(listingFilters, (item) => item.filter.id).reduce(\n (acc, item) => {\n acc.push({\n name: listingFilterParam,\n id: item.filter.id.toString(),\n label: item.filter.label,\n featuredInspiration: item.featuredInspiration || null,\n inspirationCard: item.inspirationCard || null,\n });\n return acc;\n },\n [],\n )\n : undefined;\n\n // Set all selected filters\n setSelectedFilters([\n ...(updatedSelectedFilters || []),\n ...updatedSelectedFreetext,\n ...(selectedListingFilters || []),\n ]);\n }, [queryState]);\n\n // Update results\n useEffect(() => {\n hasPopulatedQueryState.current = true;\n if (queryState.page === 0) {\n setListItems(data.results ?? []);\n } else {\n setListItems((prevItems) => [\n ...(prevItems ?? []),\n ...(data.results ?? []),\n ]);\n }\n\n if (data?.results) {\n window.dataLayer.push({\n event: 'trackingEvent_search_results',\n event_name_variable: 'search_results',\n trackingEvent_search_results: {\n search_type: type,\n search_term: queryState.freetext,\n search_results: data.results.length > 0,\n },\n });\n }\n\n setSelectedFeaturedInspiration(\n sortedListingFilters[0]?.featuredInspiration || featuredInspiration,\n );\n setSelectedInspirationCard(\n sortedListingFilters[0]?.inspirationCard || inspirationCard,\n );\n }, [data]);\n\n // Fetch new results if grid size changes\n useEffect(() => {\n setQueryState((prev) => ({\n ...prev,\n page: 0,\n }));\n }, [gridSize]);\n\n useEffect(() => {\n setShowLoadMore(data?.total > slicedListitems.length);\n }, [slicedListitems]);\n\n const fadeInUpAnimation = {\n hidden: {\n opacity: 0,\n y: 50,\n transition: {\n duration: 0.2,\n ease: [0.22, 1, 0.36, 1],\n },\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n type: 'spring',\n stiffness: 50,\n damping: 14,\n },\n },\n };\n\n return (\n
\n
\n
\n
\n {title && (\n \n \n {title}\n \n \n {title}\n \n {subtitle && (\n \n )}\n
\n )}\n
\n
\n {\n onSubmit({\n ...queryState,\n freetext: value,\n });\n }}\n />\n \n
\n
\n {listingFilters && (\n {\n handleListingFiltersUpdate(selectedListingFilters);\n }}\n />\n )}\n
\n\n \n {/* Filters */}\n
\n {/* Mobile Filters */}\n {!!filters.length && (\n
\n div]:tw-justify-between tw-border tw-border-grey-10 hover:tw-border-black\"\n onClick={() => setIsMobileFiltersOpen(true)}\n />\n
\n )}\n
\n\n
\n \n {!!filters.length && (\n
\n div]:tw-justify-between tw-border tw-border-grey-10 hover:tw-border-black tw-hidden lg:tw-flex\"\n onClick={() => setIsMobileFiltersOpen(true)}\n />\n {/* Quick Filters */}\n {!!selectedFilters.length && (\n
\n {selectedFilters.map(({ name, label, id }, index) => (\n \n {\n handleTagRemove(id, name);\n }}\n icon\n largeText\n />\n \n ))}\n\n \n {\n clearAllFilters(e, {});\n }}\n />\n \n
\n )}\n
\n )}\n
\n\n
\n
\n \n {hasPopulatedQueryState.current && !loading && (\n \n \n {!loading && slicedListitems?.length === 0\n ? noResultsLabel\n : replaceValuesInLabel(countLabel, [\n slicedListitems ? slicedListitems?.length : 0,\n data?.total,\n ])}\n \n \n )}\n \n
\n {type === ListingTypeEnum.Colour && (\n \n )}\n
\n
\n\n {slicedListitems && (\n \n \n {(!loading || page !== 0) && (\n <>\n {/* No results message */}\n {!slicedListitems?.length &&\n hasPopulatedQueryState.current && (\n \n \n \n )}\n {/* Hotspot Card */}\n {!!selectedFeaturedInspiration && hotspotData.show && (\n \n \n \n )}\n\n {/* Inspiration Card */}\n {!!selectedInspirationCard && inspirationData.show && (\n \n \n \n )}\n\n {/* Listing Cards */}\n {!!slicedListitems?.length &&\n slicedListitems.map((card, index) => {\n if (type === ListingTypeEnum.Colour) {\n const { colourName } = card as IColourSwatchCard;\n return (\n \n \n \n );\n }\n\n if (type === ListingTypeEnum.Product) {\n const { productName } = card as IProductCard;\n return (\n \n \n \n );\n }\n\n return null;\n })}\n \n )}\n \n \n )}\n {/* Load more button */}\n {!!slicedListitems.length && (\n \n \n {loading ? (\n
\n \n
\n ) : (\n \n {showLoadMore && (\n {\n setQueryState((prev) => ({\n ...prev,\n page: prev.page + 1,\n }));\n }}\n variant=\"grey80\"\n modifier=\"outline\"\n label={loadMoreLabel}\n />\n )}\n \n {replaceValuesInLabel(resultsLabel, [\n slicedListitems ? slicedListitems?.length : 0,\n data?.total,\n ])}\n \n \n )}\n
\n \n )}\n \n \n {/* Drawer filters */}\n {!!filters.length && (\n \n
\n
\n \n
\n
\n {\n clearAllFilters(e, {\n freetext: queryState.freetext, // maintain search term\n [listingFilterParam]: queryState?.[listingFilterParam], // maintain listing filters\n });\n }}\n disabled={!mappedCheckedDrawerFilters.length}\n />\n {\n e.preventDefault();\n const submitHandler = handleSubmit(onSubmit);\n submitHandler(e);\n setIsMobileFiltersOpen(false);\n }}\n label={applyLabel}\n />\n
\n
\n \n )}\n
\n );\n};\n\nexport default ListingWrapper;\n","import queryString from 'query-string';\nimport { useState } from 'react';\n\ninterface IListingComponentState {\n readonly data: TData;\n readonly loading: boolean;\n readonly error: string;\n readonly isInitialData: boolean;\n readonly pushToUrl?: boolean;\n}\n\n// Extend the hook definition with TData for the data structure\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst useListingComponentData = , TData>(\n apiEndpoint: string,\n initialData: TData,\n skipEmptyString = true,\n pushToUrl = true\n) => {\n const [state, setState] = useState>({\n data: initialData,\n loading: false,\n error: '',\n isInitialData: true,\n });\n\n const fetchData = async (formData: TFormData) => {\n try {\n setState({ ...state, loading: true, error: '' });\n const requestQueryString = `?${queryString.stringify(formData, {\n skipEmptyString: skipEmptyString,\n arrayFormat: 'comma',\n })}`;\n\n const response = await fetch(`${apiEndpoint}${requestQueryString}`);\n\n if (!response.ok) {\n throw new Error(`Request failed with status ${response.status}`);\n }\n\n const data = await response.json();\n\n if (pushToUrl) {\n const currentUrl = new URL(window.location.href);\n const searchParams = currentUrl.searchParams;\n\n (Object.keys(formData) as Array).forEach((key) => {\n const value = formData[key];\n searchParams.set(key?.toString(), value?.toString());\n });\n\n window.history.pushState({}, '', currentUrl.href);\n }\n\n setState({ ...state, data, loading: false, isInitialData: false });\n } catch (error) {\n setState({ ...state, loading: false, error: 'Error fetching data' });\n }\n };\n\n return { fetchData, state };\n};\n\nexport default useListingComponentData;\n","import { RefObject } from 'react';\n\nexport const createColourPng = (\n ref: RefObject,\n colour: string\n): string => {\n if (typeof window !== 'undefined') {\n const imageWidth = ref.current?.offsetWidth || 100;\n const imageHeight = ref.current?.offsetHeight || 100;\n\n const canvas = document.createElement('canvas');\n canvas.width = imageWidth;\n canvas.height = imageHeight;\n const ctx = canvas.getContext('2d');\n\n if (ctx) {\n ctx.fillStyle = `#${colour}`;\n ctx.fillRect(0, 0, imageWidth, imageHeight);\n }\n\n return canvas.toDataURL();\n }\n\n return '';\n};\n","import Button from '@atoms/Button/Button';\nimport Text from '@atoms/Text/Text';\nimport { IHotspotButton } from '@models/IHotspotButton';\nimport classNames from 'classnames';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nconst HotspotButton = ({\n activeTooltipIndex,\n colourCode,\n colourHexCode,\n colourName,\n colourUrl,\n colourPreviewUrl,\n hotspots,\n index,\n onToggleTooltip,\n productName,\n productUrl,\n tooltipPositionedUnderHotspot = false,\n tooltipShouldStack = false,\n tooltipOverflowLeft = false,\n tooltipOverflowRight = false,\n}: IHotspotButton) => {\n const buttonRef = useRef(null);\n const stackedTooltipRefs = useRef<(HTMLDivElement | null)[]>([]);\n const tooltipRef = useRef(null);\n const [tooltipOffsets, setTooltipOffsets] = useState([]);\n const [tooltipOffset, setTooltipOffset] = useState(18);\n const [stackedTooltipContainerHeight, setStackedTooltipContainerHeight] =\n useState(0);\n const [maxTooltipWidth, setMaxTooltipWidth] = useState(0);\n const shouldReduceMotion = useReducedMotion();\n const isOpen =\n activeTooltipIndex === index ||\n (tooltipShouldStack && activeTooltipIndex >= 0);\n\n const stackedTooltips = tooltipShouldStack && !!hotspots.length;\n const previewImageParams = 'format=jpg&height=10&width=10&quality=70';\n\n const handleToggleTooltip = useCallback(\n (index: number) => {\n onToggleTooltip(index);\n if (isOpen) buttonRef.current?.blur();\n },\n [index, isOpen],\n );\n\n const handleBlur = useCallback(\n (event: React.FocusEvent) => {\n const relatedTarget = event.relatedTarget as HTMLElement;\n const isRelatedTargetInsideTooltip =\n tooltipRef.current?.contains(relatedTarget) ||\n stackedTooltipRefs.current.some((tooltip) =>\n tooltip?.contains(relatedTarget),\n );\n\n if (!isRelatedTargetInsideTooltip) {\n onToggleTooltip(-1);\n }\n },\n [onToggleTooltip],\n );\n\n useEffect(() => {\n if (isOpen && stackedTooltipRefs.current.length) {\n const tooltipOffsets = stackedTooltipRefs.current.map((tooltip) => {\n return tooltip ? tooltip.offsetHeight + 18 : 18;\n });\n setTooltipOffsets(tooltipOffsets);\n\n const maxWidth = Math.max(\n ...stackedTooltipRefs.current.map(\n (tooltip) => tooltip?.getBoundingClientRect().width || 0,\n ),\n );\n\n setMaxTooltipWidth(maxWidth);\n }\n }, [isOpen, hotspots.length]);\n\n useEffect(() => {\n if (stackedTooltips) {\n const totalHeight = stackedTooltipRefs.current.reduce((acc, tooltip) => {\n return acc + (tooltip?.offsetHeight || 0);\n }, 0);\n setStackedTooltipContainerHeight(totalHeight);\n }\n }, [stackedTooltips, tooltipOffsets]);\n\n const getTooltipStyles = (tooltipIndex: number) => {\n const offset = tooltipOffsets\n .slice(0, tooltipIndex)\n .reduce((acc, curr) => acc + curr - 22, 0);\n\n return {\n bottom: tooltipPositionedUnderHotspot ? `${offset}px` : undefined,\n top: !tooltipPositionedUnderHotspot ? `${offset}px` : undefined,\n right: tooltipOverflowRight ? `-25%` : undefined,\n left: tooltipOverflowLeft ? `-25%` : undefined,\n zIndex: 10 + tooltipIndex,\n width: `${maxTooltipWidth}px`,\n };\n };\n\n const singleTooltipStyles = useMemo(() => {\n return {\n bottom: tooltipPositionedUnderHotspot ? `-${tooltipOffset}px` : undefined,\n top: !tooltipPositionedUnderHotspot ? `-${tooltipOffset}px` : undefined,\n right: tooltipOverflowRight ? `-25%` : undefined,\n left: tooltipOverflowLeft ? `-25%` : undefined,\n };\n }, [\n tooltipPositionedUnderHotspot,\n tooltipOverflowLeft,\n tooltipOverflowRight,\n tooltipOffset,\n ]);\n\n useEffect(() => {\n if (isOpen && tooltipRef.current)\n setTooltipOffset(tooltipRef.current.offsetHeight + 18);\n }, [isOpen]);\n\n const tooltipClassNames = classNames(\n 'tw-absolute tw-min-w-max tw-rounded tw-bg-grey-20 tw-px-4 tw-py-2',\n {\n 'tooltip-bottom': tooltipPositionedUnderHotspot,\n 'tooltip-right': tooltipOverflowRight,\n 'tooltip-left': tooltipOverflowLeft,\n 'tw-text-center': !tooltipShouldStack,\n },\n );\n\n return (\n
\n \n {\n handleToggleTooltip(index);\n\n window.dataLayer.push({\n event: 'trackingEvent_hotspot_interaction',\n event_name_variable: 'hotspot_interaction',\n trackingEvent_hotspot_interaction: {\n product_name: productName,\n colour_name: colourName,\n },\n });\n }}\n ref={buttonRef}\n variant=\"white\"\n aria-expanded={isOpen}\n aria-label={isOpen ? `More information ` : `Close information`}\n />\n \n\n \n {isOpen && (\n <>\n {stackedTooltips ? (\n \n {hotspots.map(({ colour, product }, tooltipIndex) => {\n const stackedTooltipClassNames = classNames(\n tooltipClassNames,\n { 'tooltip-stacked': tooltipIndex === hotspots.length - 1 },\n { 'tooltip-separator': tooltipIndex !== 0 },\n );\n\n return (\n {\n stackedTooltipRefs.current[tooltipIndex] = el;\n }}\n style={getTooltipStyles(tooltipIndex)}\n className={stackedTooltipClassNames}\n initial={{\n opacity: 0,\n y: tooltipPositionedUnderHotspot ? -10 : 10,\n }}\n animate={{ opacity: 1, y: 0 }}\n exit={{\n opacity: 0,\n y: tooltipPositionedUnderHotspot ? -10 : 10,\n }}\n transition={{ duration: shouldReduceMotion ? 0 : 0.3 }}\n onBlur={(event) => handleBlur(event)}\n >\n {product?.name && product?.url && (\n \n \n {product.name}\n \n \n )}\n\n {colour?.name && colour?.url && (\n <>\n \n \n \n {colour?.colourCode} {colour.name}\n \n \n \n )}\n \n );\n })}\n
\n ) : (\n handleBlur(event)}\n >\n {productName && productUrl && (\n \n \n {productName}\n \n \n )}\n {colourName && colourUrl && (\n \n \n \n {colourCode!} {colourName}\n \n \n )}\n \n )}\n \n )}\n \n \n );\n};\n\nexport default HotspotButton;\n","import HotspotButton from '@atoms/HotspotButton/HotspotButton';\nimport Icon from '@atoms/Icon/Icon';\nimport Image from '@atoms/Image/Image';\nimport Video from '@atoms/Video/Video';\nimport { IHotspotCard } from '@models/IHotspotCard';\nimport { IHotspots } from '@models/IHotspots';\nimport { IWishlistDrawerLabels } from '@models/IWishlistDrawer';\nimport CardTypeEnum from '@models/enums/CardTypeEnum';\nimport AddToWishlist from '@molecules/AddToWishlist/AddToWishlist';\nimport classNames from 'classnames';\nimport { useMemo, useState } from 'react';\n\nexport const enum HotspotCardVariant {\n shortNoTitle = 'short-no-title',\n tallWithTab = 'tall-with-title',\n}\n\ninterface Props extends IHotspotCard {\n readonly link?: string;\n readonly title?: string;\n readonly variant?: HotspotCardVariant;\n readonly wishlistDrawerLabels?: IWishlistDrawerLabels;\n readonly showLikeButton?: boolean;\n readonly wishlistId?: number;\n}\n\nconst HotspotCard = (props: Props) => {\n const {\n aspectRatio,\n desktopImage,\n mobileImage,\n hotspots,\n link,\n showLikeButton = true,\n variant = HotspotCardVariant.shortNoTitle,\n video,\n wishlistDrawerLabels,\n wishlistId,\n } = props;\n\n const [activeTooltipIndex, setActiveTooltipIndex] = useState(-1);\n const [videoPlaying, setVideoPlaying] = useState(true);\n const hasVideo = !!video?.videoSource;\n const isPortrait = aspectRatio ? aspectRatio <= 1 : true;\n const calculatedAspectRatio =\n variant === HotspotCardVariant.shortNoTitle ? 4 / 5 : 2 / 3;\n\n const image = isPortrait ? mobileImage : desktopImage;\n\n const renderHotspotButton = (hotspot: IHotspots, index: number) => {\n const {\n colour,\n horizontalPercentMobile,\n product,\n verticalPercentMobile,\n horizontalPercentDesktop,\n verticalPercentDesktop,\n } = hotspot ?? {};\n\n const horizontalPercentage = isPortrait\n ? horizontalPercentMobile\n : horizontalPercentDesktop;\n\n const verticalPercentage = isPortrait\n ? verticalPercentMobile\n : verticalPercentDesktop;\n\n const positionStyle = hasVideo\n ? { bottom: 0, right: 0 }\n : {\n left: `${horizontalPercentage}%`,\n top: `${verticalPercentage}%`,\n };\n\n return (\n \n \n setActiveTooltipIndex((prevIndex) =>\n prevIndex === index ? -1 : index,\n )\n }\n productName={product?.name}\n productUrl={product?.url}\n tooltipShouldStack={hasVideo}\n hotspots={hotspots}\n tooltipPositionedUnderHotspot={verticalPercentage < 50 && !hasVideo}\n tooltipOverflowLeft={horizontalPercentage < 35 && !hasVideo}\n tooltipOverflowRight={horizontalPercentage > 65 || hasVideo}\n />\n \n );\n };\n\n const getHotspotsToRender = () => {\n if (hasVideo && !!hotspots.length) {\n // Render only the first hotspot if a video is present\n return [renderHotspotButton(hotspots[0]!, 0)];\n } else {\n // Render all hotspots otherwise\n return hotspots.map(renderHotspotButton);\n }\n };\n\n const renderHotspots = useMemo(getHotspotsToRender, [\n hotspots,\n hasVideo,\n activeTooltipIndex,\n isPortrait,\n ]);\n\n return (\n \n \n {showLikeButton && (\n \n )}\n\n {!!hotspots.length && renderHotspots}\n {image && (\n \n )}\n {hasVideo && (\n
\n setVideoPlaying(!videoPlaying)}\n aria-label={videoPlaying ? 'Pause video' : 'Play video'}\n >\n \n \n\n \n
\n )}\n \n \n );\n};\n\nexport default HotspotCard;\n","enum ColourSwatchVariantEnum {\n Default = 'default',\n Detailed = 'detailed',\n Simple = 'simple',\n}\n\nexport default ColourSwatchVariantEnum;\n","import Button from '@atoms/Button/Button';\nimport ConditionalWrapper from '@atoms/ConditionalWrapper/ConditionalWrapper';\nimport Image from '@atoms/Image/Image';\nimport Text from '@atoms/Text/Text';\nimport { IProductCard } from '@models/IProductCard';\nimport CardTypeEnum from '@models/enums/CardTypeEnum';\nimport ProductCardVariantEnum from '@models/enums/ProductCardVariantEnum';\nimport AddToWishlist from '@molecules/AddToWishlist/AddToWishlist';\nimport ProductCardImage from '@molecules/ProductCardImage/ProductCardImage';\nimport ProductImageGallery from '@molecules/ProductImageGallery/ProductImageGallery';\nimport useIsTouchDevice from '@utility/hooks/useIsTouchDevice';\nimport classNames from 'classnames';\nimport { motion } from 'motion/react';\nimport { useState } from 'react';\n\ninterface Props extends IProductCard {\n readonly showLikeButton?: boolean;\n readonly wishlistId?: number;\n}\n\nconst ProductCard = (props: Props) => {\n const {\n category,\n cta,\n detailedView = true,\n images,\n productImage,\n productName,\n productRole,\n showLikeButton = true,\n tags,\n usps,\n variant = ProductCardVariantEnum.Default,\n wishlistDrawerLabels,\n wishlistId,\n } = props;\n\n const [isHovered, setIsHovered] = useState(false);\n const isTouchDevice = useIsTouchDevice();\n\n const fadeUpVariants = {\n hide: {\n y: isTouchDevice ? 0 : '100%',\n opacity: isTouchDevice ? 1 : 0,\n },\n show: { y: 0, opacity: 1 },\n };\n\n const fadeInVariants = {\n hide: { opacity: isTouchDevice ? 1 : 0 },\n show: { opacity: 1 },\n };\n\n const handleTrackingEvent = () => {\n window.dataLayer.push({\n event: 'trackingEvent_select_item',\n event_name_variable: 'select_item',\n trackingEvent_select_item: {\n item_name: productName,\n item_category: 'product',\n item_category2: category,\n },\n });\n };\n\n let imageAspectRatio = 'tw-aspect-[6/7]';\n\n if (variant !== ProductCardVariantEnum.Default) {\n imageAspectRatio =\n variant === ProductCardVariantEnum.Tall\n ? 'tw-aspect-[2/3]'\n : 'tw-aspect-[6/7] md:tw-aspect-[2/3]';\n }\n\n return (\n
\n {showLikeButton && (\n \n )}\n\n (\n \n {children}\n \n )}\n >\n setIsHovered(true)}\n onPointerLeave={() => setIsHovered(false)}\n onFocus={() => setIsHovered(true)}\n onBlur={() => setIsHovered(false)}\n >\n \n \n \n \n\n {!!images?.length && (\n \n {!isTouchDevice && images.length === 1 && images[0] ? (\n \n ) : (\n \n )}\n \n )}\n
\n \n \n {category}\n \n \n {productName}\n \n {detailedView && (\n <>\n \n {productRole}\n \n \n {usps.map((usp) => (\n
  • \n {usp}\n
  • \n ))}\n \n {!isTouchDevice && (\n \n \n \n )}\n \n )}\n \n \n \n \n );\n};\n\nexport default ProductCard;\n","import Button from '@atoms/Button/Button';\nimport Image from '@atoms/Image/Image';\nimport Text from '@atoms/Text/Text';\nimport Video from '@atoms/Video/Video';\nimport { IInspirationCard } from '@models/IInspirationCard';\nimport ThemeEnum from '@models/enums/ThemeEnum';\nimport classNames from 'classnames';\n\nconst InspirationCard = ({\n cta,\n image,\n site,\n text,\n theme,\n video,\n}: IInspirationCard) => {\n const videoAttributes = {\n playsinline: true,\n muted: true,\n playing: true,\n loop: true,\n };\n\n return (\n
    \n \n\n {video?.videoSource && (\n \n )}\n\n
    \n \n {text}\n \n \n
    \n
    \n );\n};\nexport default InspirationCard;\n","const enum SizeEnum {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n XLarge = 'x-large',\n}\n\nexport default SizeEnum;\n","import Icon from '@atoms/Icon/Icon';\nimport Text from '@atoms/Text/Text';\nimport { IAccordionItem, IVariantClasses } from '@models/IAccordionItem';\nimport classNames from 'classnames';\nimport { AnimatePresence, motion } from 'motion/react';\nimport { PropsWithChildren, useEffect, useState } from 'react';\n\nconst AccordionItem = ({\n animateChildren = false,\n buttonClasses,\n callback,\n children,\n dataTestId,\n isOpen = false,\n padding,\n text,\n title,\n variant = 'primary',\n}: PropsWithChildren) => {\n const [isAccordionOpen, setIsAccordionOpen] = useState(false);\n\n useEffect(() => {\n setIsAccordionOpen(isOpen);\n }, [isOpen]);\n\n const baseAccordionButtonClasses =\n 'tw-w-full tw-flex tw-justify-between tw-items-center tw-text-left tw-gap-4';\n const baseButtonClasses =\n 'tw-border-grey-20 hover:tw-text-grey-70 tw-text-black';\n\n const variantClasses: IVariantClasses = {\n primary: {\n buttonClasses: classNames(baseButtonClasses, 'tw-py-3'),\n buttonHeaderTextStyle: 'heading-21-light',\n buttonContentTextStyle: 'body',\n textContentClasses: 'tw-pt-4 tw-pb-6 tw-bg-white',\n },\n secondary: {\n buttonClasses: classNames(baseButtonClasses, 'py-2', {\n 'tw-border-b': !isAccordionOpen,\n }),\n buttonHeaderTextStyle: 'body-14-semibold',\n buttonContentTextStyle: 'body-small',\n textContentClasses: 'tw-pt-4 tw-pb-6 tw-bg-white',\n },\n filter: {\n buttonClasses: classNames(\n baseButtonClasses,\n 'tw-p-4 tw-bg-grey-10 tw-border-b'\n ),\n buttonHeaderTextStyle: 'body',\n buttonContentTextStyle: 'body-small',\n textContentClasses: 'tw-border tw-border-t-0',\n },\n tableItem: {\n buttonClasses: classNames(baseButtonClasses, 'tw-py-xs', {\n 'tw-px-md': padding,\n }),\n buttonHeaderTextStyle: 'body-14-semibold',\n buttonContentTextStyle: 'body-small',\n textContentClasses: padding ? 'tw-px-md' : '',\n },\n noStyle: {\n buttonClasses: classNames(baseButtonClasses, 'tw-py-2.5'),\n buttonHeaderTextStyle: 'heading-21-light',\n buttonContentTextStyle: 'body',\n textContentClasses: '',\n },\n contentExpander: {\n buttonClasses: classNames(baseButtonClasses, 'tw-py-xs'),\n buttonHeaderTextStyle: 'headline',\n buttonContentTextStyle: 'body',\n textContentClasses:\n 'tw-pb-md tw-pt-md md:tw-pb-xl xl:tw-pb-md md:tw-pt-lg xl:tw-pt-xl [&>section]:tw-p-0',\n },\n headline: {\n buttonClasses: classNames(\n baseButtonClasses,\n 'tw-py-sm tw-text-grey-100 tw-border-t'\n ),\n buttonHeaderElement: (\n <>\n \n {title}\n \n \n {title}\n \n \n ),\n },\n };\n\n const baseTextClasses = classNames(\n 'tw-text-grey-100 tw-border-grey-20',\n variantClasses[variant]?.textContentClasses\n );\n\n const handleClick = () => {\n setIsAccordionOpen(!isAccordionOpen);\n callback?.();\n };\n\n return (\n \n \n {variantClasses[variant].buttonHeaderElement ?? (\n \n {title}\n \n )}\n\n \n \n \n \n\n \n {isAccordionOpen && (\n \n {children ? (\n \n {children}\n \n ) : (\n \n {text}\n \n )}\n \n )}\n \n \n );\n};\n\nexport default AccordionItem;\n","import Button from '@atoms/Button/Button';\nimport Image from '@atoms/Image/Image';\nimport { IVideo } from '@models/IVideo';\nimport { IVideoAttributes } from '@models/IVideoAttributes';\nimport classNames from 'classnames';\nimport { AnimatePresence, motion, useInView } from 'motion/react';\nimport { ForwardedRef, forwardRef, useRef, useState } from 'react';\nimport ReactPlayer, { Config } from 'react-player';\n\ninterface Props extends IVideo {\n readonly classes?: string;\n readonly config?: Config;\n readonly controls?: boolean;\n readonly videoAttributes?: IVideoAttributes;\n}\n\nconst Video = forwardRef(\n (\n {\n classes,\n config,\n controls = true,\n poster,\n videoAttributes,\n videoSource,\n }: Props,\n ref\n ) => {\n const [isPlaying, setIsPlaying] = useState(\n !!videoAttributes?.playing\n );\n const [showPoster, setShowPoster] = useState(\n !videoAttributes?.playing\n );\n const videoRef = useRef(null);\n const inView = useInView(videoRef, { once: true });\n\n if (!videoSource) return null;\n\n const handlePlay = () => {\n setIsPlaying(true);\n setShowPoster(false);\n };\n\n const handleEnd = () => {\n setIsPlaying(false);\n setShowPoster(true);\n };\n\n return (\n }\n className={classNames(\n classes\n ? classes\n : 'tw-relative tw-flex tw-aspect-video tw-h-auto tw-w-full tw-min-w-full tw-items-center tw-justify-center'\n )}\n >\n
    \n \n {!!poster && showPoster ? (\n \n \n
    \n \n
    \n \n \n ) : (\n \n {inView && (\n \n )}\n \n )}\n
    \n
    \n \n );\n }\n);\n\nVideo.displayName = 'Video';\n\nexport default Video;\n","import { PropsWithChildren, ReactNode } from 'react';\n\ninterface Props {\n readonly condition: boolean;\n readonly wrapper: (child: ReactNode) => ReactNode;\n}\nconst ConditionalWrapper = ({\n condition,\n wrapper,\n children,\n}: PropsWithChildren) => (condition ? wrapper(children) : children);\n\nexport default ConditionalWrapper;\n","import { useEffect, useState } from 'react';\n\nconst useIsTouchDevice = () => {\n const [isTouchDevice, setIsTouchDevice] = useState(false);\n\n const checkIfTouchDevice = () => {\n const hasTouchPoints =\n navigator.maxTouchPoints > 0 || 'ontouchstart' in window;\n\n // Helps with detecting whether a mouse is used\n const isFinePointer = window.matchMedia('(pointer: fine)').matches;\n\n setIsTouchDevice(hasTouchPoints && !isFinePointer);\n };\n\n useEffect(() => {\n checkIfTouchDevice();\n\n window.addEventListener('resize', checkIfTouchDevice);\n window.addEventListener('pointerdown', checkIfTouchDevice);\n\n return () => {\n window.removeEventListener('resize', checkIfTouchDevice);\n window.removeEventListener('pointerdown', checkIfTouchDevice);\n };\n }, []);\n\n return isTouchDevice;\n};\n\nexport default useIsTouchDevice;\n","interface IHighlightedResult {\n readonly result: string;\n readonly match: string;\n}\n\nconst HighlightedResult = ({ result, match }: IHighlightedResult) => {\n const matchIndex = result.toLowerCase().indexOf(match.toLowerCase());\n\n const startString = result.substring(0, matchIndex);\n const matchString = result.substring(matchIndex, matchIndex + match.length);\n const endString = result.substring(matchIndex + match.length, result.length);\n\n return (\n <>\n {startString && {startString}}\n {matchString}\n {endString && {endString}}\n \n );\n};\n\nexport default HighlightedResult;\n","import Icon from '@atoms/Icon/Icon';\nimport LoadingSpinner from '@atoms/LoadingSpinner/LoadingSpinner';\nimport Text from '@atoms/Text/Text';\nimport { ErrorMessage } from '@hookform/error-message';\nimport { ISearch } from '@models/ISearch';\nimport SizeEnum from '@models/enums/SizeEnum';\nimport classNames from 'classnames';\nimport { useCombobox } from 'downshift';\nimport { debounce } from 'lodash';\nimport { useEffect, useRef, useState } from 'react';\nimport { useAsyncList } from 'react-stately';\nimport HighlightedResult from './HighlightedResult';\n\nconst Search = ({\n autoCompleteEndpoint,\n autoFocus = false,\n backgroundColor = 'tw-bg-white dark:tw-bg-grey-10',\n dataTestId,\n errors,\n initialValue,\n label,\n large = false,\n list,\n name = '',\n predictiveCharacterLength = 3,\n register,\n requiredErrorMessage,\n searchClasses,\n setValue,\n darkMode = false,\n onAutoCompleteSelect,\n clearSearch,\n ...rest\n}: ISearch) => {\n const [inputValue, setInputValue] = useState('');\n\n const suggestions = useAsyncList({\n async load({ signal, filterText }) {\n if (list) {\n return {\n items: list,\n };\n } else if (filterText && filterText.length >= predictiveCharacterLength) {\n const res = await fetch(`${autoCompleteEndpoint}=${filterText}`, {\n signal,\n });\n\n const json = await res.json();\n\n return {\n items: json,\n };\n }\n\n return {\n items: [],\n };\n },\n });\n\n const { items, isLoading } = suggestions;\n\n const debouncedValueChange = useRef(\n debounce(async ({ inputValue }) => {\n suggestions.setFilterText(inputValue ?? '');\n setValue?.(name ?? '', inputValue ?? '', { shouldValidate: true });\n setInputValue(inputValue ?? '');\n }, 500)\n ).current;\n\n const {\n isOpen,\n getLabelProps,\n getMenuProps,\n getToggleButtonProps,\n getInputProps,\n highlightedIndex,\n getItemProps,\n selectedItem,\n reset,\n } = useCombobox({\n onInputValueChange: debouncedValueChange,\n initialInputValue: initialValue ?? '',\n items,\n });\n\n useEffect(() => {\n selectedItem && onAutoCompleteSelect?.(selectedItem);\n }, [selectedItem]);\n\n const showDropdown =\n isOpen && inputValue.length >= predictiveCharacterLength && !!items.length;\n\n const hasErrors = errors && name in errors;\n\n useEffect(() => {\n if (clearSearch && clearSearch > 0) reset();\n }, [clearSearch]);\n\n return (\n
    \n \n \n
    \n {\n // Workaround to allow form submission when nothing in dropdown is selected\n if (\n e.key !== 'Enter' ||\n highlightedIndex > -1 ||\n !onAutoCompleteSelect\n ) {\n getInputProps()?.onKeyDown?.(e);\n }\n }}\n data-testid={dataTestId}\n />\n {/* tw-hidden input - the input above cannot accept both register() and getInputProps(),\n so we have another input registered and we set its value on line 48 when the shown one changes\n this ensures correct form integration with react-hook-form */}\n \n \n \n \n
    \n
    \n \n {isLoading ? (\n
    \n \n
    \n ) : (\n showDropdown &&\n items.map((item, index) => {\n return (\n \n \n \n );\n })\n )}\n \n {requiredErrorMessage && errors && (\n (\n \n {message}\n \n )}\n />\n )}\n \n );\n};\n\nexport default Search;\n"],"names":["_ref","size","SizeEnum","Small","loadingLabel","theme","ThemeEnum","Light","sizeClasses","classNames","Medium","Large","borderClasses","segmentClasses","React","createElement","role","className","ColourSwatchCardBG","props","bgColour","Grey","colourCode","colourHexCode","colourName","description","images","link","mainImage","showLikeButton","tag","variant","ColourSwatchVariantEnum","Default","wishlistDrawerLabels","wishlistId","createColourImage","imageDataUrl","setImageDataUrl","useState","isHovered","setIsHovered","colourRef","useRef","isTouchDevice","useIsTouchDevice","isDefaultVariant","isDetailedVariant","Detailed","isSimpleVariant","Simple","containerRef","inView","useInView","amount","once","fetchImageDataUrl","useCallback","async","dataUrl","createColourPng","error","console","useEffect","handleTrackingEvent","window","dataLayer","push","event","event_name_variable","trackingEvent_select_item","item_name","item_category","item_category3","backgroundColorStyle","useMemo","backgroundColor","backgroundImage","url","onMouseEnter","onMouseLeave","onFocus","onBlur","ref","AddToWishlist","card","cardId","collection","CardTypeEnum","Colours","href","onClick","motion","div","style","animate","opacity","length","exit","initial","src","alt","Image","image","aspectRatio","imageClasses","ProductImageGallery","showProductImage","showColourImage","productImageClasses","imageAspectRatio","initialIndex","Text","toLowerCase","dangerouslySetInnerHTML","__html","replaceValuesInLabel","label","replacementArray","newLabel","forEach","value","index","replace","toString","ProductCardVariantEnum","items","children","map","_ref2","title","text","AccordionItem","key","buttonClasses","ListingTypeEnum","setValue","Slider","minValue","maxValue","step","defaultValue","onChange","Label","e","preventDefault","Icon","name","SliderTrack","width","SliderThumb","TagVariant","as","isActive","largeText","icon","otherProps","Wrapper","isClickable","hoverStyles","Yellow","_extends","twMerge","allowMultipleOpen","filters","firstOpen","padding","register","activeIndex","setActiveIndex","Accordion","filterGroup","isOpen","id","callback","options","Checkbox","String","filter","selected","isMobileFilters","sizes","type","onClickCallback","selectedListingFilters","_ref4","selectedFilterObjects","includes","selectedId","slice","reverse","selectedFilter","find","_ref3","featuredInspiration","inspirationCard","trackingEvent_navigation_circle","navigation_circle","navigation_category","handleClick","ListingFilterItem","dataTestId","iconName","message","gridConfig","gridClasses","cardSize","cardVariant","hotspotPosition","colourInspirationPosition","productInspirationPosition","hotspot","occupiedSpaceCount","sm","md","xl","minResultsToShow","inspiration","sanitizeQuery","query","Object","fromEntries","entries","undefined","Array","isArray","applyLabel","applicationAreas","autoCompleteEndpoint","autoCompletePlaceholder","clearAllLabel","closeLabel","countLabel","customQueryParams","filterLabel","loadMoreLabel","initialFilters","listingFilterParam","listingFilters","noResultsHeader","noResultsLabel","noResultsText","resultsLabel","openLabel","pageUrl","searchEndpoint","subtitle","breakpoint","useBreakpoint","gridSize","setGridSize","Colour","listItems","setListItems","slicedListitems","setSlicedListItems","isMobileFiltersOpen","setIsMobileFiltersOpen","selectedFilters","setSelectedFilters","sortedListingFilters","setSortedListingFilters","showLoadMore","setShowLoadMore","selectedFeaturedInspiration","setSelectedFeaturedInspiration","selectedInspirationCard","setSelectedInspirationCard","clearSearch","setClearSearch","resultsRef","hasPopulatedQueryState","hotspotData","setHotspotData","show","inspirationData","setInspirationData","params","queryString","pick","location","search","parsedParams","parse","arrayFormat","parsedUrlParams","reduce","acc","existingFilters","keys","initialSearchText","freetext","getGridConfig","positionClass","cardType","Product","normalizedBreakpoint","lg","xxl","mapBreakpoint","calculatedPageSize","count","newSlicedListItems","data","total","defaultState","page","take","queryState","setQueryState","formPageUrl","rest","drawerFilters","mappedDrawerFilters","setCleanQueryParams","cleanQuery","filteredUrl","filteredQuery","queryStringified","stringify","newUrl","pathname","history","replaceState","handleSubmit","formState","errors","reset","watch","useForm","defaultValues","filterIds","checkedDrawerFilters","mappedCheckedDrawerFilters","flatMap","Boolean","fetchData","state","loading","useListingComponentData","results","clearAllFilters","arguments","prev","onSubmit","trackingEvent_filter_select","headerHeight","document","getElementById","offsetHeight","current","resultsOffset","getBoundingClientRect","top","scrollY","scrollTo","behavior","updatedPageSize","updatedSelectedFreetext","updatedSelectedFilters","mappedFilter","mapped","option","_ref6","findMatchingItems","idAccessor","queryIds","values","flat","item","prevItems","trackingEvent_search_results","search_type","search_term","search_results","fadeInUpAnimation","hidden","y","transition","duration","ease","visible","stiffness","damping","Search","initialValue","placeholder","onAutoCompleteSelect","ListingFilters","_ref5","handleListingFiltersUpdate","Button","AnimatePresence","mode","_ref7","variants","fadeIn","Tag","handleTagRemove","updatedFilters","currentValue","concat","GridSlider","Fragment","ListingPlaceholder","HotspotCard","meta","contentLink","InspirationCard","ColourSwatchCard","White","productName","ProductCard","detailedView","LoadingSpinner","modifier","DrawerWrapper","setIsOpen","slideFromLeft","wrapperStyles","FilterAccordion","disabled","submitHandler","apiEndpoint","initialData","skipEmptyString","pushToUrl","setState","isInitialData","requestQueryString","formData","response","fetch","ok","Error","status","json","currentUrl","URL","searchParams","set","pushState","colour","imageWidth","offsetWidth","imageHeight","canvas","height","ctx","getContext","fillStyle","fillRect","toDataURL","activeTooltipIndex","colourUrl","colourPreviewUrl","hotspots","onToggleTooltip","productUrl","tooltipPositionedUnderHotspot","tooltipShouldStack","tooltipOverflowLeft","tooltipOverflowRight","buttonRef","stackedTooltipRefs","tooltipRef","tooltipOffsets","setTooltipOffsets","tooltipOffset","setTooltipOffset","stackedTooltipContainerHeight","setStackedTooltipContainerHeight","maxTooltipWidth","setMaxTooltipWidth","shouldReduceMotion","useReducedMotion","stackedTooltips","previewImageParams","handleToggleTooltip","blur","handleBlur","relatedTarget","contains","some","tooltip","maxWidth","Math","max","totalHeight","getTooltipStyles","tooltipIndex","offset","curr","bottom","right","left","zIndex","singleTooltipStyles","tooltipClassNames","scale","repeat","Infinity","iconClasses","trackingEvent_hotspot_interaction","product_name","colour_name","product","stackedTooltipClassNames","el","previewUrl","HotspotCardVariant","desktopImage","mobileImage","shortNoTitle","video","setActiveTooltipIndex","videoPlaying","setVideoPlaying","hasVideo","videoSource","isPortrait","calculatedAspectRatio","renderHotspotButton","horizontalPercentMobile","verticalPercentMobile","horizontalPercentDesktop","verticalPercentDesktop","horizontalPercentage","verticalPercentage","positionStyle","HotspotButton","hexCode","prevIndex","renderHotspots","getHotspotsToRender","tallWithTab","Inspirations","Video","videoAttributes","playsinline","muted","playing","loop","controls","classes","category","cta","productImage","productRole","tags","usps","fadeUpVariants","hide","fadeInVariants","item_category2","Tall","Products","ConditionalWrapper","condition","wrapper","onPointerEnter","onPointerLeave","ProductCardImage","mobile","mobileFirstImage","TallOnDesktopOnly","ul","usp","site","target","animateChildren","isAccordionOpen","setIsAccordionOpen","baseButtonClasses","variantClasses","primary","buttonHeaderTextStyle","buttonContentTextStyle","textContentClasses","secondary","tableItem","noStyle","contentExpander","headline","buttonHeaderElement","baseTextClasses","rotate","delay","forwardRef","config","poster","isPlaying","setIsPlaying","showPoster","setShowPoster","videoRef","handlePlay","iconSize","ReactPlayer","onEnded","handleEnd","displayName","setIsTouchDevice","checkIfTouchDevice","hasTouchPoints","navigator","maxTouchPoints","isFinePointer","matchMedia","matches","addEventListener","removeEventListener","result","match","matchIndex","indexOf","startString","substring","matchString","endString","autoFocus","large","list","predictiveCharacterLength","requiredErrorMessage","searchClasses","darkMode","inputValue","setInputValue","suggestions","useAsyncList","load","signal","filterText","res","isLoading","debouncedValueChange","debounce","setFilterText","shouldValidate","getLabelProps","getMenuProps","getToggleButtonProps","getInputProps","highlightedIndex","getItemProps","selectedItem","useCombobox","onInputValueChange","initialInputValue","showDropdown","hasErrors","htmlFor","onKeyDown","required","HighlightedResult","ErrorMessage","render"],"sourceRoot":""}