{"version":3,"sources":["webpack:///./presentation/components/ribbons/filmstrip/Image.tsx","webpack:///./presentation/components/ribbons/filmstrip/Image.stylesheet.ts","webpack:///./presentation/components/ribbons/filmstrip/Filmstrip.tsx","webpack:///./presentation/components/ribbons/filmstrip/Filmstrip.stylesheet.ts","webpack:///./presentation/components/ribbons/filmstrip/index.ts","webpack:///./presentation/utils/ribbonPadding.ts","webpack:///./presentation/hocs/errorBoundary.tsx","webpack:///./presentation/hocs/withRibbonImpression.ts","webpack:///./presentation/utils/ribbonWidth.ts","webpack:///./presentation/hocs/deepLink.tsx","webpack:///./presentation/components/ribbons/Ribbon/Ribbon.tsx","webpack:///./presentation/components/ribbons/Ribbon/ConnectedRibbon.ts","webpack:///./presentation/components/ribbons/Ribbon/index.ts","webpack:///./presentation/hocs/visibilitySet.tsx","webpack:///./domain/constants/alignment.ts","webpack:///./presentation/hocs/withLanguage.ts","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/utils/createImageAlt.ts","webpack:///./presentation/utils/responsiveColumns.ts","webpack:///./domain/constants/imageAspectRatio.ts","webpack:///./presentation/utils/imageAspectRatioPercentage.ts","webpack:///../node_modules/ramda/es/zipWith.js"],"names":["enhance","pureEnhance","hocs","withLanguage","hooks","withProps","ownerProps","alt","createImageAlt","media","imageAspectRatio","useStyles","default","outer","position","width","height","paddingTop","imageAspectRatioPercentage","inner","top","left","right","bottom","overflow","image","transform","styles","currentLanguage","style","loading","src","urlLanguageParse","imageUrl","errorBoundary","visibilitySet","withBreakpointsHook","columns","bootstrapResponsiveColumns","layout","justify","r","Alignment","STARTING","Justify","FLEX_START","CENTER","theme","spacing","isMinLg","row","cssSides","Side","X","gu2px","Y","item","id","colorway","name","items","Ribbon","type","key","i","xs","sm","lg","Image","Filmstrip","isMinSm","flush","shrinkLeading","shrinkTrailing","getPaddingSize","shrinkSide","isFlush","leading","Flush","LEADING","trailing","TRAILING","paddingBottom","stylesheet","isMinMd","root","backgroundColor","getBackgroundColor","color","getTitleColor","ribbonPadding","textAlign","WrappedComponent","ErrorBoundary","props","compose","withState","lifecycle","componentDidCatch","this","setHasErrored","hooksA","pipe","mapProps","selector","useMemo","getRibbonAnalytics","analytics","useSelector","dispatch","useDispatch","actions","bindActionCreators","sendImpression","withHandlers","onImpression","ribbonName","ribbonType","hooksB","isFullyInViewport","stopWatcher","useEffect","mapPropsHoc","branch","Watch","deepLink","withRouter","componentDidMount","location","hash","scrollWhenReady","animationComplete","setTimeout","scroller","scrollTo","duration","delay","smooth","mapFit","fit","Fit","FULLSCREEN","minHeight","FILL","flex","flexBasis","AUTO","isFinite","targetRef","useRef","palette","duoLayout","activeFit","findResponsiveItem","getBreakpoints","padding","duoLayoutFlex","duoRibbonWidth","display","flexDirection","percentage","ribbon","modifier","Colorway","PRIMARY_GRADIENT","backgroundImage","primary","primaryGradient","children","ref","withRibbonImpression","BaseComponent","connect","state","getCurrentLanguage","url","language","length","parsedLanguage","split","toUpperCase","join","replace","hasImage","isNotNilOrEmpty","getImageName","str","match","formatName","responsiveColumns","defaultColumns","desiredColumns","a","b","ImageAspectRatio","ratio","map","W16H9","W4H3","W1H1","W32H9","W64H9","W3H4","W9H16","W9H32","zipWith","fn","rv","idx","len","Math","min"],"mappings":"yOAsDeA,MAdQC,YACrB,iBAAkB,CAChBC,KAAM,CACJC,KAEFC,MAAO,CACLC,oBAAWC,IAAD,CACRC,IAAKC,YAAeF,EAAWG,UAEjCJ,oBCtCS,EAAGK,sBAA8DC,YAAU,CACxFC,QAAS,CACPC,MAAO,CACLC,SAAU,WACVC,MAAO,OACPC,OAAQ,EACRC,WAAYC,YAA2BR,IAEzCS,MAAO,CACLL,SAAU,WACVM,IAAK,EACLC,KAAM,EACNC,MAAO,EACPC,OAAQ,EACRC,SAAU,UAEZC,MAAO,CACLX,SAAU,WACVM,IAAK,MACLM,UAAW,mBACXX,MAAO,OACPC,OAAQ,cDsBChB,CAhCmB,EAChC2B,SACAlB,QACAF,MACAqB,qBAEA,yBAAKC,MAAOF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,EAAQiK,EAAIC,MAAM,6BAExB,OAAIlK,GAASA,EAAM,GACVA,EAAM,GAGRiK,GAOHE,EAAcF,GAAgBA,EAAIJ,QAAQ,QAAS,KAQ1C7I,QACb8I,EACA9I,IACEA,IAAO,YACPgJ,EACAG,GAEFnJ,IAAS,M,oBCtDX,+EAGA,MAAMoJ,EAAoB,CACxBC,EACAC,IACGtJ,IACHA,IAAY,CAAE,KAAM,KAAM,OAC1BA,IAAU,CAACuJ,EAAGC,IACH,MAALA,EACKD,EAEFC,EACNH,GAPArJ,CAQHsJ,GAEWzJ,EAA6BG,IACxCoJ,EACApJ,IAAMA,IAAS,MAGFoJ,O,oBCrBR,IAAKK,E,2CAAAA,K,aAAAA,E,WAAAA,E,WAAAA,E,aAAAA,E,aAAAA,E,WAAAA,E,aAAAA,E,cAAAA,M,KCEL,MAAMhL,EAA8BiL,IACzC,MAAMC,EAA0C,CAC9C,CAACF,EAAiBG,OAAQ,MAC1B,CAACH,EAAiBI,MAAO,GACzB,CAACJ,EAAiBK,MAAO,IACzB,CAACL,EAAiBM,OAAQ,OAC1B,CAACN,EAAiBO,OAAQ,QAC1B,CAACP,EAAiBQ,MAAO,SACzB,CAACR,EAAiBS,OAAQ,SAC1B,CAACT,EAAiBU,OAAQ,UAE5B,gBAAUR,EAAID,IAAU,MAAxB,O,oBCbF,YA0BIU,EAEJ,aAAQ,SAAiBC,EAAId,EAAGC,GAK9B,IAJA,IAAIc,EAAK,GACLC,EAAM,EACNC,EAAMC,KAAKC,IAAInB,EAAEf,OAAQgB,EAAEhB,QAExB+B,EAAMC,GACXF,EAAGC,GAAOF,EAAGd,EAAEgB,GAAMf,EAAEe,IACvBA,GAAO,EAGT,OAAOD,KAGM","file":"pex-static/16/27.5b1197bdd87e7d4a94d1.chunk.js","sourcesContent":["import React from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport pureEnhance from '@ux/pure-enhance';\nimport stylesheet, { Styles } from './Image.stylesheet';\nimport createImageAlt from 'presentation/utils/createImageAlt';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport withLanguage from 'presentation/hocs/withLanguage';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\ninterface OuterProps {\n media: {\n imageUrl: string,\n imageAspectRatio?: ImageAspectRatio,\n }\n}\ninterface InnerProps extends OuterProps {\n styles: Styles,\n currentLanguage: string,\n alt: string,\n}\nexport const PureFilmstripImage = ({\n styles,\n media,\n alt,\n currentLanguage,\n}: InnerProps) => (\n
\n
\n \n
\n
\n);\n\nexport const enhance = pureEnhance(\n 'FilmstripImage', {\n hocs: [\n withLanguage,\n ],\n hooks: [\n withProps((ownerProps: OuterProps) => ({\n alt: createImageAlt(ownerProps.media),\n })),\n withProps(stylesheet),\n ],\n }\n);\n\nexport default enhance(PureFilmstripImage);\n","import { useStyles } from '@team-griffin/stylr';\nimport { CSSProperties } from 'react';\nimport { imageAspectRatioPercentage } from 'presentation/utils/imageAspectRatioPercentage';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport interface Styles {\n outer: CSSProperties,\n inner: CSSProperties,\n image: CSSProperties,\n}\n\nexport default ({ imageAspectRatio }: { imageAspectRatio: ImageAspectRatio}) => useStyles({\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","import React from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport { Container, Row, Column, Justify } from '@ux/grid';\nimport PaddingBox from '@ux/padding-box';\nimport Ribbon from 'components/ribbons/Ribbon';\nimport { withBreakpointsHook, BreakpointProps } from '@ux/responsive';\nimport visibilitySet from 'presentation/hocs/visibilitySet';\nimport errorBoundary from 'presentation/hocs/errorBoundary';\nimport stylesheet, { Styles } from './Filmstrip.stylesheet';\nimport Image from './Image';\nimport * as r from 'ramda';\nimport { bootstrapResponsiveColumns } from '../../../utils/responsiveColumns';\nimport { Alignment } from 'domain/constants/alignment';\nimport { RibbonProps } from 'domain/constants/ribbons';\nimport pureEnhance from '@ux/pure-enhance';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\ntype ItemProps = {\n media: {\n imageUrl: string,\n imageAspectRatio?: ImageAspectRatio,\n }\n};\ninterface OuterProps extends RibbonProps {\n items: ItemProps[],\n}\nexport interface InnerProps extends OuterProps, BreakpointProps {\n styles: Styles,\n justify: Justify,\n columns?: number[],\n}\n\ndeclare const i: number;\ndeclare const item: ItemProps;\nexport const PureFilmstrip = ({\n id,\n styles,\n theme,\n colorway,\n layout,\n loading,\n name,\n items,\n justify,\n columns,\n}: InnerProps) => (\n \n \n \n
\n \n \n \n
\n \n
\n \n \n \n
\n
\n
\n \n);\n\nexport const enhance = pureEnhance(\n 'Filmstrip', {\n hocs: [\n errorBoundary,\n visibilitySet,\n ],\n hooks: [\n withBreakpointsHook,\n withProps((ownerProps: OuterProps) => ({\n columns: bootstrapResponsiveColumns([ 2, 3, 6 ], ownerProps.layout.columns),\n justify: r.ifElse(\n r.pathEq([ 'layout', 'alignment' ], Alignment.STARTING),\n r.always(Justify.FLEX_START),\n r.always(Justify.CENTER),\n )(ownerProps),\n })),\n withProps(stylesheet),\n ],\n }\n);\n\nexport default enhance(PureFilmstrip);\n","import { useStyles } from '@team-griffin/stylr';\nimport { gu2px } from '@ux/theme-utils';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { InnerProps } from './Filmstrip';\nimport { CSSProperties } from 'react';\n\nexport interface Styles {\n row: CSSProperties,\n item: CSSProperties,\n}\nexport default ({\n theme: {\n spacing,\n },\n isMinLg,\n}: InnerProps) => useStyles({\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","import Filmstrip from './Filmstrip';\n\nexport default Filmstrip;\n","import { Flush } from 'domain/constants/ribbons';\nimport { gu2px } from '@ux/theme-utils';\nimport * as r from 'ramda';\nimport { Layout } from 'domain/constants/layout';\n\nexport default ({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n}: {\n spacing: number,\n isMinSm: boolean,\n isMinLg: boolean,\n layout?: Layout,\n flush?: Flush|boolean,\n}) => {\n\n if (r.equals(flush, true)) {\n // Component will handle all padding, used on full bleed image ribbons\n return {};\n }\n\n const {\n //@ts-ignore\n shrinkLeading,\n //@ts-ignore\n shrinkTrailing,\n } = r.defaultTo({}, layout);\n\n /*\n shrinkSide:\n shrink[Leading/Trailing] prop is true then return a reduced padding\n depending on screen size\n isFlush:\n leading or trailing edge has been designated as flush, no padding\n */\n const getPaddingSize = (shrinkSide: string, isFlush: boolean) => {\n\n if (isFlush) {\n return 0;\n }\n\n return r.cond([\n [ r.propEq(shrinkSide, true), () => r.ifElse(\n r.equals(true),\n r.always(1),\n r.always(0.5),\n )(isMinSm) ],\n [ r.propEq('isMinLg', true), r.always(6) ],\n [ r.propEq('isMinSm', true), r.always(5) ],\n [ r.T, r.always(4) ],\n ])({\n isMinLg,\n isMinSm,\n shrinkLeading,\n shrinkTrailing,\n });\n };\n\n const leading = getPaddingSize('shrinkLeading', flush === Flush.LEADING);\n const trailing = getPaddingSize('shrinkTrailing', flush === Flush.TRAILING);\n\n return {\n paddingTop: gu2px(leading, spacing),\n paddingBottom: gu2px(trailing, spacing),\n };\n};\n","import React, { CSSProperties } from 'react';\nimport {\n compose,\n lifecycle,\n withState,\n withProps,\n} from 'recompose';\nimport Message from '@ux/message';\nimport { Container } from '@ux/grid';\nimport * as r from 'ramda';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport {\n getBackgroundColor,\n getTitleColor,\n} from 'presentation/utils/colorway';\nimport { gu2px, Theme } from '@ux/theme-utils';\nimport ribbonPadding from 'presentation/utils/ribbonPadding';\nimport { useStyles } from '@team-griffin/stylr';\nimport { Colorway } from 'domain/constants/colorway';\nimport { Layout } from 'domain/constants/layout';\nimport { Flush } from 'domain/constants/ribbons';\nimport { BreakpointProps } from '@ux/responsive';\ninterface OuterProps extends BreakpointProps {\n theme: Theme,\n colorway: Colorway,\n layout: Layout,\n flush?: Flush|boolean,\n}\n\ninterface InnerProps extends OuterProps {\n styles: {\n root: CSSProperties,\n }\n hasErrored: boolean,\n}\nconst stylesheet = ({\n theme,\n colorway,\n isMinSm,\n isMinMd,\n isMinLg,\n layout,\n flush,\n}: InnerProps) => {\n const {\n spacing,\n } = theme;\n\n return useStyles({\n default: {\n root: {\n backgroundColor: getBackgroundColor(theme, colorway),\n color: getTitleColor(theme, colorway),\n ...ribbonPadding({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n }),\n ...cssSides('Side', Side.X, gu2px(3, spacing)),\n textAlign: 'center',\n },\n },\n isMinSm: {\n root: {\n ...cssSides('Side', Side.X, gu2px(4, spacing)),\n },\n },\n }, [\n { colorway },\n { isMinSm },\n { isMinMd },\n ]);\n};\n\nexport default (WrappedComponent: any) => {\n const ErrorBoundary = r.ifElse(\n r.propEq('hasErrored', true),\n ({ styles }) => (\n
\n \n \n \n
\n ),\n (props: InnerProps) => (\n \n ),\n );\n\n return compose(\n withState('hasErrored', 'setHasErrored', false),\n lifecycle({\n componentDidCatch: function() {\n //@ts-ignore\n this.props.setHasErrored(true);\n },\n }),\n withProps(stylesheet),\n )(ErrorBoundary);\n};\n","import { useMemo, useEffect } from 'react';\nimport { branch, mapProps as mapPropsHoc } from 'recompose';\nimport pureEnhance from '@ux/pure-enhance';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { pipe, withProps, mapProps, withHandlers } from '@team-griffin/rehook';\nimport { Watch } from 'scrollmonitor-react';\nimport * as r from 'ramda';\nimport { sendImpression } from 'application/signals/ribbons';\nimport { getRibbonAnalytics } from 'domain/selectors/ribbons';\nimport { Type } from 'domain/constants/ribbons';\n\nconst hooksA = pipe(\n mapProps((props: any) => {\n const { id } = props;\n const selector = useMemo(() => getRibbonAnalytics(id), [ id ]);\n const analytics = useSelector(selector);\n const dispatch = useDispatch();\n const actions = bindActionCreators({ sendImpression }, dispatch);\n\n return r.mergeDeepLeft(props, {\n analytics,\n actions,\n });\n }),\n withHandlers({\n onImpression: ({\n name,\n type,\n analytics,\n actions: {\n sendImpression,\n },\n }: {\n name: string,\n type: Type,\n analytics: any,\n actions: {\n sendImpression: Function,\n }\n }) => () => sendImpression({\n ...analytics,\n ribbonName: name,\n ribbonType: type,\n }),\n }),\n);\n\nconst hooksB = pipe(\n withProps(({\n isFullyInViewport,\n stopWatcher,\n onImpression,\n analytics,\n }: {\n isFullyInViewport: boolean,\n stopWatcher: () => void,\n onImpression: (a: any) => void,\n analytics: any,\n }) => {\n useEffect(() => {\n if (isFullyInViewport) {\n stopWatcher();\n onImpression(analytics);\n }\n }, [ isFullyInViewport ]);\n }),\n);\n\nexport default pureEnhance('RibbonImpression', {\n hocs: [\n mapPropsHoc(hooksA),\n branch(\n r.propSatisfies(r.complement(r.isNil), 'analytics'),\n Watch,\n ),\n mapPropsHoc(hooksB),\n ],\n});\n","export const duoRibbonWidth = ({\n isMinMd,\n duoLayout,\n}: {\n isMinMd: boolean,\n duoLayout?: boolean,\n}) => {\n if (!isMinMd || duoLayout == null) {\n return {};\n }\n\n const flexSize = (isMinMd && duoLayout) ? 50 : 100;\n return {\n flex: `${flexSize}%`,\n };\n};\n\nexport default null;","import React, { Fragment } from 'react';\nimport {\n compose,\n lifecycle,\n} from 'recompose';\nimport { withRouter } from 'react-router';\nimport { Element, scroller } from 'react-scroll';\n\nconst deepLink = compose(\n withRouter,\n lifecycle({\n componentDidMount: function() {\n //Adding some ts-ignores here so it doesn't throw not recognizing\n //this.props\n\n //@ts-ignore\n if (this.props.location.hash === `#${this.props.name}`) {\n const scrollWhenReady = () => {\n // we can't scroll to eagerly or we'll end up in the wrong place\n //@ts-ignore\n if (this.props.loading || !this.props.animationComplete) {\n return setTimeout(scrollWhenReady, 100);\n }\n //@ts-ignore\n scroller.scrollTo(this.props.name, {\n duration: 500,\n delay: 100,\n smooth: true,\n });\n };\n setTimeout(scrollWhenReady, 100);\n }\n },\n }),\n (WrappedComponent: any) => {\n return (props: any) => (\n \n \n \n \n );\n },\n);\n\nexport default deepLink;\n","import React, { useRef, useLayoutEffect, CSSProperties, ReactNode, Ref } from 'react';\nimport { withProps } from '@team-griffin/rehook';\nimport pureEnhance from '@ux/pure-enhance';\nimport { withBreakpointsHook, BreakpointProps } from '@ux/responsive';\nimport findResponsiveItem from 'presentation/utils/findResponsiveItem';\nimport getBreakpoints from 'presentation/utils/getBreakpoints';\nimport ribbonPadding from 'presentation/utils/ribbonPadding';\nimport { duoRibbonWidth } from 'presentation/utils/ribbonWidth';\nimport { percentage, modifier } from '@ux/style-utils';\nimport deepLink from 'presentation/hocs/deepLink';\nimport { getBackgroundColor } from 'presentation/utils/colorway';\nimport { useStyles } from '@team-griffin/stylr';\nimport { Colorway } from 'domain/constants/colorway';\nimport { Fit, Flush, RibbonProps } from 'domain/constants/ribbons';\nimport * as r from 'ramda';\n\nexport {\n Flush,\n};\n\ninterface OuterProps extends RibbonProps {\n children?: ReactNode,\n}\ninterface WithHandlerProps extends OuterProps {\n setAnimationComplete: Function,\n setRibbonHeight: Function,\n setHeight: Function,\n onAnimationEnd: (props: {\n newHeight: number;\n }) => void,\n}\n\ninterface InnerProps extends WithHandlerProps, BreakpointProps {\n rendered: boolean,\n targetRef: Ref,\n duration: number,\n styles: {\n root: CSSProperties,\n inner: CSSProperties,\n ribbon: CSSProperties,\n }\n}\n\nconst mapFit = (fit: Fit) => r.cond([\n [ r.equals(Fit.FULLSCREEN), r.always({\n minHeight: '100vh',\n }) ],\n [ r.equals(Fit.FILL), r.always({\n flex: 1,\n flexBasis: 'auto',\n }) ],\n [ r.equals(Fit.AUTO), r.always({\n height: 'auto',\n }) ],\n [ isFinite, r.always({\n minHeight: fit,\n }) ],\n [ r.T, r.always({\n height: 'auto',\n }) ],\n])(fit);\n\nconst stylesheet = ({\n theme,\n colorway,\n loading,\n layout,\n flush,\n ...props\n}: InnerProps) => {\n const {\n palette,\n spacing,\n } = theme;\n const {\n //@ts-ignore\n fit,\n } = r.defaultTo({}, layout);\n\n const {\n isMinSm,\n isMinMd,\n isMinLg,\n duoLayout,\n } = props;\n\n const activeFit = findResponsiveItem(\n getBreakpoints(props),\n fit,\n );\n\n const padding = ribbonPadding({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n });\n\n const duoLayoutFlex = duoRibbonWidth({\n isMinMd,\n duoLayout,\n });\n\n return useStyles({\n default: {\n root: {\n backgroundColor: getBackgroundColor(theme, colorway),\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n width: percentage(100),\n ...mapFit(activeFit),\n ...padding,\n ...duoLayoutFlex,\n },\n inner: {\n flex: 1,\n flexBasis: 'auto',\n display: 'flex',\n height: 'auto',\n },\n ribbon: {\n display: 'flex',\n flexDirection: 'column',\n width: percentage(100),\n },\n },\n\n [modifier('colorway', Colorway.PRIMARY_GRADIENT)]: {\n root: {\n backgroundImage: `linear-gradient(to right, ${palette.primary}, ${palette.primaryGradient})`,\n },\n },\n }, [\n { loading },\n { colorway },\n { isMinSm },\n { isMinMd },\n { isMinLg },\n ]);\n};\n\nexport const PureRibbon = ({\n styles,\n targetRef,\n children,\n}: InnerProps) => (\n
\n
\n \n {children}\n
\n \n
\n);\n\nexport const enhance = pureEnhance('Ribbon', {\n hocs: [\n deepLink,\n ],\n hooks: [\n withProps(() => {\n const targetRef = useRef({});\n\n if (process.env.NODE_ENV !== 'production') {\n useLayoutEffect(() => {\n // when backstop runs on ribbons, this lets us filter out a lot of false\n // positives and a lot of race condition fails by only initialising\n // the snapshot once loading has finished + a delay to wait for fonts etc to load\n // eslint-disable-next-line\n setTimeout(() => {\n // eslint-disable-next-line\n console.log('BACKSTOP_RIBBON_READY');\n }, 3000);\n }, [ targetRef.current ]);\n }\n\n return {\n targetRef,\n };\n }),\n withBreakpointsHook,\n withProps(stylesheet),\n ],\n});\n\nexport default enhance(PureRibbon);\n","import pureEnhance from '@ux/pure-enhance';\nimport withRibbonImpression from 'presentation/hocs/withRibbonImpression';\n\nimport Ribbon from './Ribbon';\n\nconst enhance = pureEnhance('ConnectedRibbon', {\n hocs: [ withRibbonImpression ],\n});\n\nexport default enhance(Ribbon);\n","import Ribbon from './ConnectedRibbon';\nimport { Flush } from './Ribbon';\n\nexport { Flush };\n\nexport default Ribbon;\n","import React from 'react';\nimport * as r from 'ramda';\n\nexport default (BaseComponent: any) => r.ifElse(\n r.prop('visible'),\n (props) => ,\n (props) => (\n
\n \n
\n ),\n);\n","export enum Alignment {\n STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\n","import {\n compose,\n} from 'recompose';\nimport { connect } from 'react-redux';\nimport { getCurrentLanguage } from 'domain/selectors/ribbons';\n\nexport default (BaseComponent: any) => {\n return compose(\n connect((state) => {\n return {\n currentLanguage: getCurrentLanguage(state),\n };\n }),\n )(BaseComponent);\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 = [\n language.split('-')[0],\n language.split('-')[1].toUpperCase(),\n ].join('-');\n } else {\n parsedLanguage = language;\n }\n return url.replace('{{language}}', parsedLanguage);\n }\n return url;\n};","/*\n createImageAlt({\n illustration: ?String,\n imageUrl: String,\n });\n\n Returns a relevant alt tag text from the URL path\n*/\n\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport * as r from 'ramda';\n\nconst hasImage = r.propSatisfies(isNotNilOrEmpty, 'imageUrl');\n\n/*\n getImageName\n From a URL like https://img1.wsimg.com/cdn/Image/All/Website/2/en-GB/ad586f1e-81a0-4a9d-a675-e266e25e965f/Christian_Jaroljmek.jpg\n return the text between the final slash and dot (Christian_Jaroljmek)\n\n If no regex match, return the string as is (this will capture illustrations)\n*/\nconst getImageName = (str: string) => {\n if (typeof str !== 'string') {\n return '';\n }\n\n const image = str.match(/\\/([^/]+?)\\.[a-zA-Z0-9]+$/);\n\n if (image && image[1]) {\n return image[1];\n }\n\n return str;\n};\n\n/*\n formatName\n Replace any underscores and hyphens with whitespace\n*/\nconst formatName = (str: string) => str.replace(/[-_]/g, ' ');\n\n// eslint-disable-next-line no-underscore-dangle\nexport const __test__ = {\n getImageName,\n formatName,\n};\n\nexport default r.ifElse(\n hasImage,\n r.pipe(\n r.prop('imageUrl'),\n getImageName,\n formatName,\n ),\n r.always(''),\n);","import * as r from 'ramda';\nimport { ResponsiveSet } from 'core/ribbons/primitives';\n\nconst responsiveColumns = (\n defaultColumns: ResponsiveSet,\n desiredColumns: ResponsiveSet\n) => r.pipe(\n r.defaultTo([ null, null, null ]),\n r.zipWith((a, b) => {\n if (b == null) {\n return a;\n }\n return b;\n }, defaultColumns),\n)(desiredColumns) as ResponsiveSet;\n\nexport const bootstrapResponsiveColumns = r.pipe(\n responsiveColumns,\n r.map(r.divide(12)),\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) => {\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 _curry3 from \"./internal/_curry3.js\";\n/**\n * Creates a new list out of the two supplied by applying the function to each\n * equally-positioned pair in the lists. The returned list is truncated to the\n * length of the shorter of the two input lists.\n *\n * @function\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> c) -> [a] -> [b] -> [c]\n * @param {Function} fn The function used to combine the two elements into one value.\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by combining same-indexed elements of `list1` and `list2`\n * using `fn`.\n * @example\n *\n * const f = (x, y) => {\n * // ...\n * };\n * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']);\n * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')]\n * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)]\n */\n\nvar zipWith =\n/*#__PURE__*/\n_curry3(function zipWith(fn, a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = fn(a[idx], b[idx]);\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zipWith;"],"sourceRoot":""}