{"version":3,"sources":["webpack:///./domain/constants/alignment.ts","webpack:///./presentation/hocs/withLanguage.tsx","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/utils/getActiveImageWithAspectRatios.ts","webpack:///./presentation/utils/responsiveColumns.ts","webpack:///./domain/constants/imageAspectRatio.ts","webpack:///./presentation/utils/imageAspectRatioPercentage.ts","webpack:///./presentation/components/ribbons/filmstrip/Image.tsx","webpack:///./presentation/components/ribbons/filmstrip/Image.stylesheet.ts","webpack:///./presentation/components/ribbons/filmstrip/Filmstrip.tsx","webpack:///src/presentation/components/ribbons/filmstrip/Filmstrip.stylesheet.ts"],"names":["Alignment","Component","props","currentLanguage","useCurrentLanguage","url","language","length","parsedLanguage","split","toUpperCase","join","replace","breakpoints","image","imagesWithAspectRatios","imageUrl","imageAspectRatio","preserveDimension","findResponsiveItem","responsiveColumns","defaultColumns","desiredColumns","columns","map","value","index","defaultedDesiredValue","bootstrapResponsiveColumns","ImageAspectRatio","imageAspectRatioPercentage","ratio","W16H9","W4H3","W1H1","W32H9","W64H9","W3H4","W9H16","W9H32","PureFilmstripImage","media","useBreakpoints","activeImage","getActiveImageWithAspectRatios","styles","useStyles","default","outer","position","width","height","paddingTop","inner","top","left","right","bottom","overflow","transform","useStylesheet","alt","createImageAlt","style","loading","src","urlLanguageParse","displayName","withLanguage","PureFilmstrip","id","colorway","layout","name","items","theme","useTheme","isMinLg","spacing","row","cssSides","Side","gu2px","item","justify","alignmentMobile","CENTER","alignmentTablet","alignment","STARTING","Justify","FLEX_START","Ribbon","type","Type","FILMSTRIP","i","xs","sm","lg","Image","concat","String","errorBoundary","visibilitySet"],"mappings":"8EAAO,IAAKA,EAAZ,kC,SAAYA,K,oBAAAA,E,iBAAAA,M,0BCAZ,wBAGgBC,OACP,SAA2BC,GAChC,MAAMC,EAAkBC,cACxB,OAAO,cAACH,EAAD,IAAeC,EAAOC,gBAAiBA,M,oBCNnC,KAACE,EAAaC,KAC3B,GAAID,GAAOA,EAAIE,Q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STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\n","import React from 'react';\nimport { useCurrentLanguage } from 'domain/selectors/page';\n\nexport default (Component: any) => {\n return function EnhancedComponent(props: any) {\n const currentLanguage = useCurrentLanguage();\n return ;\n };\n};\n","export default (url: string, language?: string) => {\n if (url && url.length && language) {\n let parsedLanguage;\n if (language.split('-').length === 2) {\n parsedLanguage = [language.split('-')[0], language.split('-')[1].toUpperCase()].join('-');\n } else {\n parsedLanguage = language;\n }\n return url.replace('{{language}}', parsedLanguage);\n }\n return url;\n};\n","import { BreakpointProps } from '@ux/responsive';\nimport { ImagesWithAspectRatios, ImageWithAspectRatios } from 'core/ribbons/primitives';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\nimport { Dimension } from 'domain/constants/dimension';\nimport findResponsiveItem from 'presentation/utils/findResponsiveItem';\n\n/**\n * If imagesWithAspectRatios is present in ribbon props, this should be used.\n * This array follows the existing standard of [mobile,tablet,desktop] structure.\n * Where imagesWithAspectRatios is empty/omitted, the existing imageUrl and imageAspectRatio should be used.\n */\n\ntype ImageProps = {\n imageUrl?: string;\n imageAspectRatio?: ImageAspectRatio;\n preserveDimension?: Dimension | string;\n};\n\nexport default (\n breakpoints: BreakpointProps,\n image: ImageProps,\n imagesWithAspectRatios: ImagesWithAspectRatios | undefined,\n): ImageWithAspectRatios => {\n const { imageUrl: url, imageAspectRatio, preserveDimension } = image;\n\n if (imagesWithAspectRatios != null && imagesWithAspectRatios.length > 0) {\n const activeImageWithAspectRatios = findResponsiveItem(breakpoints, imagesWithAspectRatios);\n return activeImageWithAspectRatios || {};\n }\n\n return {\n url,\n imageAspectRatio,\n preserveDimension,\n };\n};\n","import { ResponsiveSet } from 'core/ribbons/primitives';\nimport { ColumnCount } from 'domain/constants/layout';\n\nconst responsiveColumns = (\n defaultColumns: ResponsiveSet,\n desiredColumns = [null, null, null] as unknown as ResponsiveSet,\n) => {\n const columns = desiredColumns.map((value, index) => {\n const defaultedDesiredValue = value ?? null;\n const prunedValue = defaultedDesiredValue === null ? defaultColumns[index] : defaultedDesiredValue;\n return prunedValue;\n });\n return columns;\n};\n\nexport const bootstrapResponsiveColumns = (\n defaultColumns: ResponsiveSet,\n desiredColumns: ResponsiveSet,\n) => {\n const columns = responsiveColumns(defaultColumns, desiredColumns);\n const dividedColumns = columns.map((value) => (typeof value === 'number' ? 12 / value : value));\n return dividedColumns as ResponsiveSet;\n};\n\nexport default responsiveColumns;\n","export enum ImageAspectRatio {\n W16H9 = '16:9',\n W4H3 = '4:3',\n W1H1 = '1:1',\n W32H9 = '32:9',\n W64H9 = '64:9',\n W3H4 = '3:4',\n W9H16 = '9:16',\n W9H32 = '9:32',\n}\n","import { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport const imageAspectRatioPercentage = (ratio: ImageAspectRatio | undefined) => {\n if (ratio == null) {\n return '56.25%';\n }\n const map: { [key in ImageAspectRatio]: number } = {\n [ImageAspectRatio.W16H9]: 56.25,\n [ImageAspectRatio.W4H3]: 75,\n [ImageAspectRatio.W1H1]: 100,\n [ImageAspectRatio.W32H9]: 28.125,\n [ImageAspectRatio.W64H9]: 14.0625,\n [ImageAspectRatio.W3H4]: 133.3333,\n [ImageAspectRatio.W9H16]: 177.7778,\n [ImageAspectRatio.W9H32]: 355.5556,\n };\n return `${map[ratio] ?? 56.25}%`;\n};\n","import React, { ComponentType } from 'react';\nimport { useBreakpoints } from '@ux/responsive';\nimport { ImagesWithAspectRatios } from 'core/ribbons/primitives';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\nimport withLanguage from 'presentation/hocs/withLanguage';\nimport createImageAlt from 'presentation/utils/createImageAlt';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport getActiveImageWithAspectRatios from 'presentation/utils/getActiveImageWithAspectRatios';\n\nimport useStylesheet from './Image.stylesheet';\n\ninterface OuterProps {\n media: {\n imageUrl: string;\n imageAspectRatio?: ImageAspectRatio;\n imagesWithAspectRatios?: ImagesWithAspectRatios;\n };\n}\ninterface InnerProps extends OuterProps {\n currentLanguage: string;\n}\nexport const PureFilmstripImage = ({ media, currentLanguage }: InnerProps) => {\n const breakpoints = useBreakpoints();\n const activeImage = getActiveImageWithAspectRatios(\n breakpoints,\n {\n imageUrl: media.imageUrl,\n imageAspectRatio: media.imageAspectRatio,\n },\n media.imagesWithAspectRatios,\n );\n const { styles } = useStylesheet({ imageAspectRatio: activeImage.imageAspectRatio });\n const alt = createImageAlt({ imageUrl: activeImage.url });\n\n return (\n \n
\n

\n
\n
\n );\n};\n\nPureFilmstripImage.displayName = 'FilmstripImage';\n\nexport default withLanguage(PureFilmstripImage) as ComponentType;\n","import { useStyles } from '@team-griffin/stylr';\nimport { imageAspectRatioPercentage } from 'presentation/utils/imageAspectRatioPercentage';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport default ({ imageAspectRatio }: { imageAspectRatio: ImageAspectRatio | undefined }) =>\n useStyles(\n {\n default: {\n outer: {\n position: 'relative',\n width: '100%',\n height: 0,\n paddingTop: imageAspectRatioPercentage(imageAspectRatio),\n },\n inner: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n overflow: 'hidden',\n },\n image: {\n position: 'relative',\n top: '50%',\n transform: 'translateY(-50%)',\n width: '100%',\n height: 'auto',\n },\n },\n },\n [{ imageAspectRatio }],\n );\n","import React, { ComponentType } from 'react';\nimport PaddingBox from '@uds/padding-box';\nimport { Container, Row, Column, Justify } from '@uds/grid';\nimport { ImagesWithAspectRatios } from 'core/ribbons/primitives';\nimport { Alignment } from 'domain/constants/alignment';\nimport { RibbonProps, Type } from 'domain/constants/ribbons';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\nimport visibilitySet from 'presentation/hocs/visibilitySet';\nimport errorBoundary from 'presentation/hocs/errorBoundary';\nimport { bootstrapResponsiveColumns } from 'presentation/utils/responsiveColumns';\nimport Ribbon from 'components/ribbons/Ribbon';\nimport { useBreakpoints } from '@ux/responsive';\nimport findResponsiveItem from 'presentation/utils/findResponsiveItem';\n\nimport Image from './Image';\nimport useStylesheet from './Filmstrip.stylesheet';\n\ntype ItemProps = {\n media: {\n imageUrl: string;\n imageAspectRatio?: ImageAspectRatio;\n imagesWithAspectRatios?: ImagesWithAspectRatios;\n };\n};\ninterface OuterProps extends RibbonProps {\n items: Array;\n}\n\nexport const PureFilmstrip = ({ id, colorway, layout, loading, name, items }: OuterProps) => {\n const { styles } = useStylesheet();\n // @ts-ignore: error after upgrading to ux-configs\n const columns = bootstrapResponsiveColumns([2, 3, 6], layout?.columns);\n const alignment = findResponsiveItem(useBreakpoints(), [\n layout?.alignmentMobile ?? Alignment.CENTER,\n layout?.alignmentTablet ?? Alignment.CENTER,\n layout?.alignment ?? Alignment.CENTER,\n ]);\n const justify = alignment === Alignment.STARTING ? Justify.FLEX_START : Justify.CENTER;\n\n return (\n \n \n \n \n
\n {items.map((item, i) => (\n \n \n \n
\n \n ))}\n
\n
\n \n \n \n );\n};\n\nPureFilmstrip.displayName = 'Filmstrip';\n\nexport default errorBoundary(visibilitySet(PureFilmstrip)) as ComponentType;\n","import { useStyles } from '@team-griffin/stylr';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { gu2px, useTheme } from '@uds/theme-utils';\nimport { useBreakpoints } from '@ux/responsive';\n\nexport default () => {\n const breakpoints = useBreakpoints();\n const { theme } = useTheme();\n const { isMinLg } = breakpoints;\n const { spacing } = theme;\n\n return useStyles(\n {\n default: {\n row: {\n ...cssSides('margin', Side.X, gu2px(-0.5, spacing)),\n ...cssSides('margin', Side.Y, gu2px(-1.5, spacing)),\n },\n item: {\n ...cssSides('padding', Side.X, gu2px(0.5, spacing)),\n ...cssSides('padding', Side.Y, gu2px(1.5, spacing)),\n },\n },\n isMinLg: {\n row: {\n ...cssSides('margin', Side.X, gu2px(-1, spacing)),\n ...cssSides('margin', Side.Y, gu2px(-2, spacing)),\n },\n item: {\n ...cssSides('padding', Side.X, gu2px(1, spacing)),\n ...cssSides('padding', Side.Y, gu2px(2, spacing)),\n },\n },\n },\n [{ isMinLg }],\n );\n};\n"],"sourceRoot":""}