{"version":3,"sources":["webpack:///./presentation/utils/ribbonPadding.ts","webpack:///src/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/utils/getBreakpoints.ts","webpack:///./presentation/components/Shortcode/PendingShortcode.tsx","webpack:///./presentation/components/Shortcode/Alt.tsx","webpack:///./presentation/components/Shortcode/Bold.tsx","webpack:///./presentation/components/Shortcode/Italic.tsx","webpack:///./presentation/components/Shortcode/Link.tsx","webpack:///./presentation/components/Shortcode/Text.tsx","webpack:///src/presentation/components/Shortcode/Tooltip.tsx","webpack:///./presentation/components/Shortcode/Shortcode.tsx","webpack:///./presentation/components/Shortcode/index.ts","webpack:///./presentation/hocs/visibilitySet.tsx","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/utils/createImageAlt.ts","webpack:///./presentation/components/common/CallToAction.tsx","webpack:///./domain/constants/callToAction.ts","webpack:///./presentation/hocs/callToAction.js","webpack:///./presentation/hocs/callToActionHandlers/handleAnalytics.ts","webpack:///./presentation/hocs/callToActionHandlers/handleAddToBasketClick.ts","webpack:///./presentation/hocs/callToActionHandlers/handleNavigateClick.ts","webpack:///./presentation/hocs/callToActionHandlers/handleApplyVoucherClick.ts","webpack:///./presentation/hocs/callToActionHandlers/handleConfigureClick.ts","webpack:///./presentation/hocs/callToActionHandlers/handleSetVisibilityClick.ts","webpack:///./presentation/hocs/callToActionHandlers/handlePlayVideoClick.ts","webpack:///./domain/constants/imageAspectRatio.ts","webpack:///./presentation/utils/imageAspectRatioPercentage.ts","webpack:///./presentation/utils/createImageUrl.ts"],"names":["spacing","isMinSm","isMinLg","layout","flush","r","shrinkLeading","shrinkTrailing","getPaddingSize","shrinkSide","isFlush","leading","Flush","LEADING","trailing","TRAILING","paddingTop","gu2px","paddingBottom","stylesheet","theme","useTheme","useBreakpoints","useStyles","default","root","backgroundColor","getBackgroundColor","color","getTitleColor","ribbonPadding","cssSides","Side","textAlign","colorway","isMinMd","ErrorBoundary","styles","style","id","compose","withState","lifecycle","componentDidCatch","this","withProps","hooksA","pipe","mapProps","props","selector","useMemo","getRibbonAnalytics","analytics","useSelector","dispatch","useDispatch","actions","bindActionCreators","sendImpression","withHandlers","onImpression","name","type","ribbonName","ribbonType","hooksB","isFullyInViewport","stopWatcher","useEffect","pureEnhance","hocs","mapPropsHoc","branch","Watch","deepLink","withRouter","componentDidMount","location","hash","scrollWhenReady","loading","animationComplete","setTimeout","scroller","scrollTo","duration","delay","smooth","WrappedComponent","mapFit","fit","Fit","FULLSCREEN","minHeight","FILL","flex","flexBasis","AUTO","height","isFinite","enhance","hooks","targetRef","useRef","withBreakpointsHook","palette","duoLayout","activeFit","findResponsiveItem","getBreakpoints","padding","duoLayoutFlex","duoRibbonWidth","position","display","flexDirection","width","percentage","inner","ribbon","modifier","Colorway","PRIMARY_GRADIENT","backgroundImage","primary","primaryGradient","children","ref","withRibbonImpression","Ribbon","randomWidth","Math","floor","random","PendingShortcode","code","against","lines","elements","displayName","getColor","Against","LIGHT","NEUTRAL","DARK","tertiary","Alt","RecursiveShortcode","rest","Bold","fontWeight","fontStyle","Link","contentType","attributes","externalRoutes","useAppConfig","to","goto","analyticskey","size","TextButtonSize","INHERIT","rel","target","newTab","formatText","text","newline","formattedText","split","join","escapeShortCodes","string","reduce","prev","cur","i","key","nl2br","Text","ReactTooltip","lazy","TooltipShortcode","eventToggle","cssTheme","CallToAction","fallback","tagName","useDefaultStyles","content","maxWidth","Glyph","Sup","List","OrderedList","ListItem","TickListItem","ProductPrice","PhoneNumber","map","element","Shortcode","JSON","stringify","getAgainst","Element","glyph","Italic","Tooltip","ShortcodeWrapper","BaseComponent","url","language","length","parsedLanguage","toUpperCase","replace","hasImage","isNotNilOrEmpty","getImageName","str","image","match","formatName","PureCallToAction","kind","label","addingStatus","handleClick","behavior","status","Status","PENDING","SUCCESS","FAILURE","DEFAULT","getStatus","openNewWindowProps","buttonProps","omit","onClick","callToAction","Behavior","formatPricingTier","tier","paymentInterval","term","window","useWindow","connect","state","buttonId","ribbonId","index","getExternalRoutes","getRibbon","product","linkAttribution","ribbonList","createRibbonName","isNilOrEmpty","getAddingStatus","addToBasket","applyVoucher","setVisibility","openReduxModal","signals","open","productClicked","promotionClicked","productAddToBasket","stateProps","dispatchProps","ownProps","handleAnalytics","ctaType","list","productId","promotion","handleAddToBasketClick","postAction","pricingTier","productData","skuId","defaultSkuId","price","selectors","getPrice","includeTax","category","categoryName","handleNavigateClick","handleApplyVoucherClick","voucherCode","handleConfigureClick","query","URLSearchParams","append","q","toString","href","handleSetVisibilityClick","visibilitySet","handlePlayVideoClick","videoId","provider","route","params","ownerProps","ADD_TO_BASKET","APPLY_VOUCHER","CONFIGURE","PLAY_VIDEO","SET_VISIBILITY","NAVIGATION","ImageAspectRatio","imageAspectRatioPercentage","ratio","W16H9","W4H3","W1H1","W32H9","W64H9","W3H4","W9H16","W9H32","hasIllustration","media","currentLanguage","createPaintbrushUrl","illustration","urlLanguageParse","imageUrl"],"mappings":"6EAAA,0EAKe,MACbA,UACAC,UACAC,UACAC,SACAC,YASA,GAAIC,IAASD,GAAO,GAElB,MAAO,GAGT,MAAM,cAEJE,EAFI,eAIJC,GACEF,IAAY,GAAIF,GASdK,EAAiB,CAACC,EAAoBC,IAEtCA,EACK,EAGFL,IAAO,CACZ,CAAEA,IAASI,GAAY,GAAO,IAAMJ,IAClCA,KAAS,GACTA,IAAS,GACTA,IAAS,IAHyBA,CAIlCJ,IACF,CAAEI,IAAS,WAAW,GAAOA,IAAS,IACtC,CAAEA,IAAS,WAAW,GAAOA,IAAS,IACtC,CAAEA,IAAKA,IAAS,KARXA,CASJ,CACDH,UACAD,UACAK,gBACAC,mBAIEI,EAAUH,EAAe,gBAAi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KCEL,MAAMC,EAA8BC,KACO,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,UAEdR,IAAU,OAAhB,M,oBCZV,+CAoBA,MAAMS,EAAkBnU,IAAgBuN,IAAiB,gBAE1C,KACb6G,EAIArT,EACAsT,IACGrU,IACHmU,EACA,IAAMG,YAAoBF,EAAMG,aAAcxT,GAC9C,IAAMyT,YAAiBJ,EAAMK,SAAUJ,GAHpCrU,CAIHoU","file":"pex-static/40/1.5f611fbb6a717511cc02.chunk.js","sourcesContent":["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 { compose, lifecycle, withState, withProps } 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 { getBackgroundColor, getTitleColor } from 'presentation/utils/colorway';\nimport { gu2px, useTheme } 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, useBreakpoints } from '@ux/responsive';\n\ninterface OuterProps extends BreakpointProps {\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 = ({ colorway, layout, flush }: InnerProps) => {\n const { theme } = useTheme();\n const { isMinSm, isMinMd, isMinLg } = useBreakpoints();\n const { spacing } = theme;\n\n return useStyles(\n {\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 }, { isMinSm }, { 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 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 * as r from 'ramda';\nimport { BreakpointProps } from '@ux/responsive';\n\ninterface anyProps extends BreakpointProps {\n [key: string]: any,\n}\nexport default (props: anyProps) => r.pick([\n 'isMinSm',\n 'isMinMd',\n 'isMinLg',\n 'isMinXl',\n], props) as anyProps;\n","import React from 'react';\nimport Shimmer from '@ux/shimmer';\nimport { ShortcodeProps } from './';\nimport { Colorway } from '@ux/theme-utils';\n\nexport interface OuterProps {\n against?: Colorway,\n code?: ShortcodeProps,\n}\n\n// random % width for shimmer betwen 50% and 95%\nconst randomWidth = () => Math.floor((Math.random() * (95 - 50)) + 50);\n\nconst PendingShortcode = ({\n code,\n against,\n}: OuterProps) => (\n \n \n \n);\n\nPendingShortcode.displayName = 'PendingShortcode';\n\nexport default PendingShortcode;\n","import React from 'react';\nimport { RecursiveShortcodeProps } from './Shortcode';\nimport { Against } from 'domain/constants/colorway';\nimport { Theme, useTheme } from '@ux/theme-utils';\n\nconst getColor = (theme: Theme, against: Against) => {\n switch (against) {\n case Against.LIGHT: return theme.palette.primary;\n case Against.NEUTRAL: return theme.palette.primary;\n case Against.DARK: return theme.palette.tertiary;\n default: return 'inherit';\n }\n};\nconst Alt = ({\n RecursiveShortcode,\n elements,\n against,\n ...rest\n}: RecursiveShortcodeProps) => {\n const {\n theme,\n } = useTheme();\n return (\n \n \n \n );\n};\n\nAlt.displayName = 'Alt';\n\nexport default Alt;","import React from 'react';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n \n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;","import React from 'react';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n \n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;","import React from 'react';\nimport TextButton, {\n Size as TextButtonSize,\n} from '@ux/text-button';\nimport { RecursiveShortcodeProps } from './Shortcode';\nimport { useTheme } from '@ux/theme-utils';\nimport { useAppConfig } from '@ux/whitelabel';\n\nconst Link = ({\n RecursiveShortcode,\n elements,\n contentType,\n attributes,\n against,\n ...rest\n}: RecursiveShortcodeProps) => {\n const {\n theme,\n } = useTheme();\n const externalRoutes = useAppConfig('usf')?.externalRoutes ?? [];\n return (\n \n \n \n );\n};\n\nLink.displayName = 'Link';\n\nexport default Link;","import React, { Fragment } from 'react';\n\nconst escapeShortCodes = (text: string) => {\n if (typeof text !== 'string') {\n return null;\n }\n const replaceA = (text ?? '').split('[!').join('[');\n const replaceB = replaceA.split('!/]').join('/]');\n const replaceC = replaceB.split('[/!').join('[/');\n return replaceC;\n //using split/join because for some reason replaceAll fails for backstop\n //tests but not for backstop storybook?\n //if anyone can tell me why, I'd appreciate it.\n // return (text ?? '').replaceAll('[!', '[').replaceAll('!/]', '/]')\n // .replaceAll('[/!', '[/');\n};\n\nconst nl2br = (string: string) => (string ?? '').split('\\n')\n //@ts-ignore typescript cant figure typing out\n // eslint-disable-next-line react/no-array-index-key\n .reduce((prev, cur, i) => [ prev, (
), cur ]);\n\nconst formatText = (text: string, newline: boolean|Element) => {\n\n const formattedText = escapeShortCodes(text);\n if (newline === false) {\n return formattedText;\n }\n return nl2br(formattedText);\n};\n\ninterface OuterProps {\n text: string,\n nl2br?: Element,\n}\nconst Text = ({ text, nl2br }: OuterProps) => (\n \n {formatText(text, nl2br)}\n \n);\n\nText.displayName = 'Text';\n\nexport default Text;","import React, { lazy, Suspense } from 'react';\nimport TextButton, { Size as TextButtonSize } from '@ux/text-button';\nimport { RecursiveShortcodeProps } from './Shortcode';\nimport { useTheme, cssTheme } from '@ux/theme-utils';\nimport { useBreakpoints } from '@ux/responsive';\n\n/*\n React-Tooltip is a heavy dependency therefore we asynchronously load it in\n and gracefully decorate the functionality in once it has loaded\n*/\nconst ReactTooltip = lazy(() => import(\n /* webpackChunkName: \"react-tooltip-lite\" */\n 'react-tooltip-lite'\n));\n\nconst TooltipShortcode = ({\n RecursiveShortcode,\n against,\n attributes,\n elements,\n}: RecursiveShortcodeProps) => {\n const {\n isMinLg,\n } = useBreakpoints();\n const {\n theme,\n } = useTheme();\n const eventToggle = isMinLg ? void 0 : 'onClick';\n const padding = cssTheme.gu2;\n const CallToAction = (\n \n {attributes.label}\n \n );\n\n return (\n \n {/*@ts-ignore children doesnt exist */}\n \n \n \n )}\n >\n {CallToAction}\n \n \n );\n};\n\nTooltipShortcode.displayName = 'TooltipShortcode';\n\nexport default TooltipShortcode;\n","import React, { Suspense, lazy, ReactNode } from 'react';\nimport PendingShortcode from './PendingShortcode';\nimport { getAgainst } from 'presentation/utils/colorway';\nimport { Layout } from 'domain/constants/layout';\nimport { ShortcodeProps } from '.';\n\n/*\n These shortcodes should not be lazy loaded in as they are already in the\n main bundle and it causes a unnecessary shimmer which makes the page feel\n less responsive\n*/\nimport Alt from './Alt';\nimport Bold from './Bold';\nimport Italic from './Italic';\nimport Link from './Link';\nimport Text from './Text';\nimport Tooltip from './Tooltip';\nimport { Against } from 'domain/constants/colorway';\n\nconst Glyph = lazy(() => import(\n /* webpackChunkName: \"shortcode-glyph\" */\n './Glyph'\n));\n\nconst Sup = lazy(() => import(\n /* webpackChunkName: \"shortcode-sup\" */\n './Sup'\n));\n\nconst List = lazy(() => import(\n /* webpackChunkName: \"shortcode-list\" */\n './List'\n));\n\nconst OrderedList = lazy(() => import(\n /* webpackChunkName: \"shortcode-ordered-list\" */\n './OrderedList'\n));\n\nconst ListItem = lazy(() => import(\n /* webpackChunkName: \"shortcode-list-item\" */\n './ListItem'\n));\n\nconst TickListItem = lazy(() => import(\n /* webpackChunkName: \"shortcode-tick-list-item\" */\n './TickListItem'\n));\n\nconst ProductPrice = lazy(() => import(\n /* webpackChunkName: \"shortcode-product-price\" */\n './ProductPrice'\n));\n\nconst PhoneNumber = lazy(() => import(\n /* webpackChunkName: \"shortcode-phone-number\" */\n './PhoneNumber'\n));\n\ndeclare const i: number;\ndeclare const element: ShortcodeProps;\n\nexport interface ShortcodeAttributesProps {\n use?: number,\n number?: number,\n RecursiveShortcode: (props: RecursiveShortcodeProps) => JSX.Element,\n analyticskey?: string,\n goto?: string,\n label?: ReactNode,\n prices?: Array<{\n gross: number,\n net: number,\n raw: number,\n tax: number,\n }>,\n inctax?: string,\n style?: string,\n rel?: string,\n newTab?: string,\n}\nexport interface RecursiveShortcodeProps {\n elements?: ShortcodeProps[],\n RecursiveShortcode?: (props: RecursiveShortcodeProps) => JSX.Element,\n type?: string,\n name?: string,\n layout?: Layout,\n against?: Against,\n attributes?: ShortcodeAttributesProps,\n nl2br?: boolean,\n rest?: {\n [key: string]: any,\n }\n [key: string]: any,\n}\n\nconst RecursiveShortcode = ({ elements, ...rest }: RecursiveShortcodeProps) => (\n <>\n {elements.map((element) => (\n \n ))}\n \n);\n\nexport interface ShortcodeOuterProps {\n against?: Against,\n code: RecursiveShortcodeProps,\n type?: string,\n name?: string,\n}\n\nconst Shortcode = ({ code, ...rest }: RecursiveShortcodeProps) => {\n let props = {\n ...rest,\n } as RecursiveShortcodeProps;\n if (typeof code === 'string') {\n props.code = code;\n } else {\n props = {\n ...props,\n ...code,\n };\n }\n\n props.against = getAgainst(props.against);\n props.RecursiveShortcode = RecursiveShortcode;\n props.attributes = props?.attributes ?? {} as ShortcodeAttributesProps;\n const Element = (props: any) => {\n const {\n code,\n type,\n name,\n } = props;\n if (typeof props.code === 'string') {\n return (\n \n );\n }\n if (props.type === 'text') {\n return (\n \n );\n }\n if (type === 'element') {\n switch (name) {\n case 'list':\n if (props?.attributes?.style === 'number') {\n return (\n \n );\n }\n return (\n \n );\n case 'li':\n if (props?.attributes?.style === 'glyph') {\n return (\n \n );\n }\n return (\n \n );\n case 'i':\n return (\n \n );\n case 'b':\n return (\n \n );\n case 'alt':\n return (\n \n );\n case 'sup':\n return (\n \n );\n case 'glyph':\n return (\n \n );\n case 'tel':\n return (\n \n );\n case 'link':\n return (\n \n );\n case 'productprice':\n return (\n \n );\n case 'tooltip':\n return (\n \n );\n case 'root':\n return (\n \n );\n default: return null;\n }\n }\n return null;\n };\n\n return (\n \n );\n};\n\nconst ShortcodeWrapper = (props: RecursiveShortcodeProps) => (\n \n )}\n >\n \n \n);\n\nShortcodeWrapper.displayName = 'Shortcode';\n\nexport default ShortcodeWrapper;\n","import Shortcode, { RecursiveShortcodeProps } from './Shortcode';\n\n//TODO: help.. please.\nexport type ShortcodeProps = RecursiveShortcodeProps;\n\nexport default Shortcode;\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 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 React from 'react';\nimport Button, {\n Against,\n Status,\n Size,\n} from '@ux/reactive-button';\nimport callToAction from 'presentation/hocs/callToAction';\nimport { Theme } from '@ux/theme-utils';\nimport { CTA } from 'core/ribbons/cta';\nimport { Product } from '@ux/product';\nimport { omit } from 'presentation/utils/generalUtils';\n\ninterface OuterProps extends CTA {\n product?: Product,\n theme: Theme,\n against?: Against,\n block?: boolean,\n size?: Size,\n ribbonId: string,\n index: number,\n glyph?: string,\n}\n\ninterface InnerProps extends OuterProps {\n addingStatus: Status,\n handleClick: (props: any) => () => void,\n}\n\nconst getStatus = (addingStatus: string) => {\n switch (addingStatus) {\n case 'REQUESTED': return Status.PENDING;\n case 'SUCCESS': return Status.SUCCESS;\n case 'FAILED': return Status.FAILURE;\n default: return Status.DEFAULT;\n }\n};\n\nconst PureCallToAction = ({\n kind,\n against = Against.LIGHT,\n label,\n addingStatus,\n handleClick,\n behavior,\n ...props\n}: InnerProps) => {\n\n const status = getStatus(addingStatus);\n //@ts-ignore goto exists on NavigationCTA\n const goto = behavior?.goto ?? null;\n //@ts-ignore newTab exists on NavigationCTA\n const newTab = behavior?.newTab ?? null;\n //@ts-ignore rel exists on NavigationCTA\n const rel = behavior?.rel ?? null;\n\n const openNewWindowProps = newTab==='true' ? {\n rel: rel,\n target: '_blank',\n } : { };\n\n const buttonProps = omit([\n 'colorway',\n 'actions',\n 'buttonId',\n 'ribbonId',\n 'index',\n 'handlePlayVideoClick',\n 'handleSetVisibilityClick',\n 'handleConfigureClick',\n 'handleApplyVoucherClick',\n 'handleAddToBasketClick',\n 'handleNavigateClick',\n 'handleAnalytics',\n 'ribbonList',\n ], props);\n\n return (\n \n {label}\n \n );\n};\n\nPureCallToAction.displayName = 'CallToAction';\n\nexport default callToAction(PureCallToAction);\n","export enum Behavior {\n NAVIGATION = 'navigation',\n ADD_TO_BASKET = 'addToBasket',\n APPLY_VOUCHER = 'APPLY_VOUCHER',\n CONFIGURE = 'configure',\n SET_VISIBILITY = 'changeActiveVisibilitySet',\n PLAY_VIDEO = 'playVideo',\n}\n\nexport default null;\n","import { compose, withProps, withHandlers } from 'recompose';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { useWindow } from '@ux/hooks';\nimport { addToBasket, applyVoucher } from 'application/signals/basket';\nimport { setVisibility } from 'application/signals/ribbons';\nimport { productClicked, promotionClicked, productAddToBasket } from 'application/signals/cta';\nimport { getAddingStatus } from 'domain/selectors/basket';\nimport { getExternalRoutes } from 'domain/selectors/common';\nimport { createRibbonName } from 'domain/transformers/ribbons';\nimport { getRibbon } from 'domain/selectors/ribbons';\nimport { Behavior } from 'domain/constants/callToAction';\nimport { signals } from '@team-griffin/redux-modal-router';\nimport handleAddToBasketClick from './callToActionHandlers/handleAddToBasketClick';\nimport handleApplyVoucherClick from './callToActionHandlers/handleApplyVoucherClick';\nimport handleConfigureClick from './callToActionHandlers/handleConfigureClick';\nimport handlePlayVideoClick from './callToActionHandlers/handlePlayVideoClick';\nimport handleSetVisibilityClick from './callToActionHandlers/handleSetVisibilityClick';\nimport handleNavigateClick from './callToActionHandlers/handleNavigateClick';\nimport handleAnalytics from './callToActionHandlers/handleAnalytics';\nimport { isNilOrEmpty } from 'presentation/utils/generalUtils';\n\nexport const formatPricingTier = (tier) => {\n if (tier == null) {\n return;\n }\n if (tier.paymentInterval == null || tier.term == null) {\n return;\n }\n return `${tier.paymentInterval}:${tier.term}`;\n};\n\nconst mapStateToProps = (state, props) => {\n const buttonId = `${props.ribbonId}-cta-${props.index}`;\n const externalRoutes = getExternalRoutes(state);\n const ribbon = getRibbon(props.ribbonId)(state);\n const ribbonType = ribbon?.type;\n const ribbonName = ribbon?.props?.name;\n const product = props?.product;\n // add an analytics prefixed `id` to the cta if required\n const id = (() => {\n const behavior = props.behavior;\n const id = props.id;\n if (behavior?.analytics?.linkAttribution) {\n return `usf-cta-${behavior.analytics.linkAttribution}`;\n }\n return id;\n })();\n const ribbonList = createRibbonName(ribbonType, ribbonName);\n const behavior = isNilOrEmpty(props.behavior) ? {} : props.behavior;\n return {\n externalRoutes,\n addingStatus: getAddingStatus(buttonId)(state),\n buttonId,\n ribbonList,\n product,\n id,\n behavior,\n };\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n addToBasket,\n applyVoucher,\n setVisibility,\n openReduxModal: signals.open,\n productClicked,\n promotionClicked,\n productAddToBasket,\n },\n dispatch,\n );\n\nconst mergeProps = (stateProps, dispatchProps, ownProps) => {\n return {\n ...stateProps,\n ...ownProps,\n actions: {\n ...dispatchProps,\n ...ownProps.actions,\n },\n };\n};\n\nexport default compose(\n withProps(() => ({\n window: useWindow(),\n })),\n connect(mapStateToProps, mapDispatchToProps, mergeProps),\n withHandlers({\n handleAnalytics: handleAnalytics,\n }),\n withHandlers({\n handleAddToBasketClick: handleAddToBasketClick,\n handleNavigateClick: handleNavigateClick,\n handleApplyVoucherClick: handleApplyVoucherClick,\n handleConfigureClick: handleConfigureClick,\n handleSetVisibilityClick: handleSetVisibilityClick,\n handlePlayVideoClick: handlePlayVideoClick,\n }),\n withProps((ownerProps) => ({\n handleClick: (() => {\n switch (ownerProps.behavior?.type) {\n case Behavior.ADD_TO_BASKET:\n return ownerProps.handleAddToBasketClick;\n case Behavior.APPLY_VOUCHER:\n return ownerProps.handleApplyVoucherClick;\n case Behavior.CONFIGURE:\n return ownerProps.handleConfigureClick;\n case Behavior.PLAY_VIDEO:\n return ownerProps.handlePlayVideoClick;\n case Behavior.SET_VISIBILITY:\n return ownerProps.handleSetVisibilityClick;\n case Behavior.NAVIGATION:\n return ownerProps.handleNavigateClick;\n default:\n return () => null;\n }\n })(),\n })),\n);\n","import { Product } from '@ux/product';\n\nexport default (\n props: {\n behavior: {\n type: any;\n analytics: {\n type: any;\n productId: string;\n promotion: string;\n };\n };\n ribbonList: any;\n product: Product;\n actions: {\n productClicked: (arg0: { productId: any; list: any; }) => void;\n promotionClicked: (arg0: { promotion: any; }) => void;\n productAddToBasket: (arg0: { list: any; product: any; }) => void;\n };\n },\n) => () => {\n const ctaType = props?.behavior?.type;\n const type = props?.behavior?.analytics?.type;\n const list = props.ribbonList;\n const product = props.product;\n\n if (type === 'PRODUCT') {\n const productId = props?.behavior?.analytics?.productId;\n props.actions.productClicked({\n productId,\n list,\n });\n } else if (type === 'PROMOTION') {\n const promotion = props?.behavior?.analytics?.promotion;\n props.actions.promotionClicked({ promotion });\n } else if (ctaType === 'addToBasket') {\n props.actions.productAddToBasket({\n list,\n product,\n });\n }\n};","import { Product, selectors } from '@ux/product';\nimport { formatPricingTier } from '../callToAction';\n\nexport default (props: {\n buttonId: string;\n product: Product;\n actions: {\n addToBasket: any;\n };\n behavior: {\n productId: any;\n postAction: any;\n pricingTier: any;\n };\n handleAnalytics: any;\n}) => () => {\n const {\n buttonId,\n product,\n actions: { addToBasket },\n behavior: { productId, postAction, pricingTier },\n handleAnalytics,\n } = props;\n const productData = {\n skuId: product ? product.defaultSkuId : null,\n name: product ? product.name : null,\n price: product ? selectors.getPrice({\n product,\n includeTax: false,\n }) : null,\n category: product ? product.categoryName : null,\n };\n addToBasket(\n buttonId,\n productId,\n postAction,\n formatPricingTier(pricingTier),\n 1, //quantity\n productData,\n );\n\n handleAnalytics();\n};","export default ({ handleAnalytics }: { handleAnalytics: any }) => () => {\n handleAnalytics();\n};","export default ({\n buttonId,\n actions: {\n applyVoucher,\n },\n behavior: {\n voucherCode,\n postAction,\n },\n}: {\n buttonId: string,\n actions: {\n applyVoucher: any,\n },\n behavior: {\n voucherCode: string;\n postAction: any;\n }\n}) => () => {\n applyVoucher(buttonId, voucherCode, postAction);\n};","import { formatPricingTier } from '../callToAction';\n\nexport default ({\n window,\n behavior: {\n productId,\n pricingTier,\n },\n}: {\n window: Window,\n behavior: {\n productId: string;\n pricingTier: string;\n }\n}) => {\n return () => {\n const tier = formatPricingTier(pricingTier);\n const query = new URLSearchParams();\n query.append('productId', productId);\n if (tier) {\n query.append('pricingTier', tier);\n }\n const q = query.toString();\n window.location.href = `/configure?${q}`;\n };\n};","export default ({\n actions: {\n setVisibility,\n },\n behavior,\n}: {\n\tactions: {\n\t\tsetVisibility: any,\n\t},\n\tbehavior: {\n\t\tvisibilitySet: any,\n\t}\n}) => () => {\n setVisibility(behavior.visibilitySet);\n};","export default ({\n actions: {\n openReduxModal,\n },\n behavior: {\n videoId,\n provider,\n },\n}: {\n actions: {\n openReduxModal: any;\n },\n behavior: {\n videoId: string;\n provider: string;\n }\n}) => () => {\n openReduxModal({\n route: 'PLAY_VIDEO',\n params: {\n videoId,\n provider,\n },\n });\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","\n// /*\n// createImageUrl(\n// {\n// illustration: ?String,\n// imageUrl: ?String,\n// },\n// theme,\n// currentLanguage,\n// );\n\n// Returns a painbtrush URL if an illustration is provided,\n// otherwise returns a static imageUrl\n// */\n\nimport { createPaintbrushUrl } from '@ux/illustrations';\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport * as r from 'ramda';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport { Theme } from '@ux/theme-utils';\n\nconst hasIllustration = r.propSatisfies(isNotNilOrEmpty, 'illustration');\n\nexport default (\n media: {\n illustration: string,\n imageUrl: string\n },\n theme: Theme,\n currentLanguage?: string,\n) => r.ifElse(\n hasIllustration,\n () => createPaintbrushUrl(media.illustration, theme),\n () => urlLanguageParse(media.imageUrl, currentLanguage),\n)(media);"],"sourceRoot":""}