{"version":3,"sources":["webpack:///./presentation/components/ribbons/aggregate-rating-trustpilot/Logo.tsx","webpack:///./presentation/components/ribbons/aggregate-rating-trustpilot/AggregateRatingTrustpilot.tsx","webpack:///./presentation/components/ribbons/aggregate-rating-trustpilot/AggregateRatingTrustpilot.stylesheet.ts","webpack:///./presentation/components/ribbons/aggregate-rating-trustpilot/ConnectedAggregateRatingTrustpilot.ts","webpack:///./presentation/components/ribbons/aggregate-rating-trustpilot/index.ts","webpack:///./presentation/utils/ribbonPadding.ts","webpack:///../node_modules/@ux/typography/dist/es/typography.js","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:///./domain/constants/alignment.ts","webpack:///./presentation/components/common/TrustpilotStars.js","webpack:///./presentation/utils/getTrustpilotUrl.js"],"names":["logoOnDark","enhance","pureEnhance","hooks","withProps","ownerProps","src","r","Colorway","DARK","HIGHLIGHT","PRIMARY","colorway","Component","Fragment","url","useStyles","default","root","display","maxWidth","percentage","maxHeight","styles","href","target","loading","alt","style","hocs","errorBoundary","withBreakpointsHook","defaultProps","hBaseline","reviewCount","getLocalizedTrustPilotUrl","currentLanguage","trustpilotPageId","theme","layout","isMinSm","isMinMd","isMinLg","spacing","alignment","flexDirection","alignItems","title","color","getTitleColor","textAlign","bold","fontWeight","imagery","marginTop","gu2px","logo","marginBottom","height","stars","justifyContent","text","paddingRight","paddingLeft","marginLeft","marginRight","modifier","Alignment","CENTER","id","trustScore","name","Ribbon","flush","type","depth","values","rating","value","reviews","Logo","TrustpilotStars","mapStateToProps","createStructuredSelector","getTrustpilotPageId","getCurrentLanguage","connect","AggregateRatingTrustpilot","ConnectedAggregateRatingTrustpilot","shrinkLeading","shrinkTrailing","getPaddingSize","shrinkSide","isFlush","leading","Flush","LEADING","trailing","TRAILING","paddingTop","paddingBottom","mergeStyles","createHeading","component","headingSize","stylesheet","props","Object","assign","Number","concat","_ref","children","typography","Y","fontFamily","Heading01","Heading02","Heading03","Heading04","Heading05","Heading06","stylesheet$1","_ref$theme","gu","SubHeading01","SubHeading02","stylesheet$2","PreHeading01","PreHeading02","BodyCopy01","content","backgroundColor","getBackgroundColor","ribbonPadding","cssSides","Side","X","WrappedComponent","ErrorBoundary","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","flexSize","duoRibbonWidth","position","width","inner","ribbon","PRIMARY_GRADIENT","backgroundImage","primary","primaryGradient","ref","withRibbonImpression","starMap","getFuzzyLang","lang"],"mappings":"kNAUA,MAAMA,EAAa,mHAmEJC,MArBQC,YACrB,OACA,CACEC,MAAO,CACLC,oBAAWC,IAAD,CACRC,IAAKC,IAAO,CACV,CAAEA,IAASC,IAASC,MAAOF,IAASP,IACpC,CAAEO,IAASC,IAASE,WAAYH,IAASP,IACzC,CAAEO,IAASC,IAASG,SAAUJ,IAASP,IACvC,CAAEO,IAAKA,IAtDG,uHAkDPA,CAKFF,EAAWO,UACdC,UAAWN,IACTA,IACAA,IAASO,YACTP,IAAS,KAHAA,CAITF,EAAWU,QAEfX,oBAhDa,IAAMY,YAAU,CACjCC,QAAS,CACPC,KAAM,CACJC,QAAS,QACTC,S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OL,EAAOL,MACrB,yBAAKU,MAAOL,EAAOuL,OACjB,yBACElL,MAAOL,EAAOwL,OACdK,IAAKnB,GAEJjF,MCjJM/G,MAJCC,YAAY,kBAAmB,CAC7C2B,KAAM,CAAEwL,IAGKpN,CAAQuE,GCJRA,O,oBCLR,IAAKL,EAAZ,kC,SAAYA,K,oBAAAA,E,iBAAAA,M,0BCAZ,mDAMA,MAaMmJ,EAAU,CACd,EAAK,gHACL,IAAO,kHACP,EAAK,gHACL,IAAO,kHACP,EAAK,gHACL,IAAO,kHACP,EAAK,gHACL,IAAO,kHACP,EAAK,iHAgBMrN,EAAUC,YACrB,kBACA,CAAEE,oBAxCe,IAAMY,YAAU,CACjCC,QAAS,CACPC,KAAM,CACJE,SAAUC,qBAAW,KACrBC,UAAWD,qBAAW,KACtBF,QAAS,eAsCAlB,MAjBU,EACvBsB,SACAsD,YAEA,yBACEnD,QAAQ,OACRpB,IAAKgN,EAAQzI,GACblD,IAAG,qBAAgBkD,EAAhB,MACHjD,MAAOL,EAAOL,S,oBCxClB,4EAEA,MAAMqM,EAAehN,IACnBA,IAAY,SACZA,IAAQ,KACRA,IACAA,IACEA,IAAS,MACTA,IAAS,SAUE4B,IANmB,CAACqL,EAAMnJ,IAAO9D,IAC9CA,IACAA,IAAS,IACTA,IAAA,kBAAoBgN,EAAaC,GAAjC,kCAAgEnJ,IAHlB9D,CAI9C8D","file":"pex-static/13.284d6e554b6284a1984c.chunk.js","sourcesContent":["import React, { Fragment, CSSProperties, ExoticComponent } from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport { Colorway } from 'domain/constants/colorway';\nimport { percentage } from '@ux/style-utils';\nimport * as r from 'ramda';\nimport { useStyles } from '@team-griffin/stylr';\nimport pureEnhance from '@ux/pure-enhance';\n\nconst logoOnDark = 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/9f2eeecc-b670-4bc1-a366-878f0de5122c/dark-288x72.png'; // eslint-disable-line max-len\nconst logoOnLight = 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/68137afe-5794-4f19-b4aa-f8d5fd8f0215/light-288x72.png'; // eslint-disable-line max-len\n\ninterface OuterProps {\n url: string,\n colorway: Colorway,\n}\n\ninterface InnerProps extends OuterProps {\n styles: {\n root: CSSProperties,\n },\n Component: ExoticComponent | 'a',\n src: string,\n}\nconst stylesheet = () => useStyles({\n default: {\n root: {\n display: 'block',\n maxWidth: percentage(100),\n maxHeight: percentage(100),\n },\n },\n});\n\nexport const PureLogo = ({\n styles,\n src,\n url,\n Component,\n}: InnerProps) => (\n \n {/*\n //@ts-ignore */}\n \n \n);\n\nexport const enhance = pureEnhance(\n 'Logo',\n {\n hooks: [\n withProps((ownerProps: OuterProps) => ({\n src: r.cond([\n [ r.equals(Colorway.DARK), r.always(logoOnDark) ],\n [ r.equals(Colorway.HIGHLIGHT), r.always(logoOnDark) ],\n [ r.equals(Colorway.PRIMARY), r.always(logoOnDark) ],\n [ r.T, r.always(logoOnLight) ],\n ])(ownerProps.colorway),\n Component: r.ifElse(\n r.isEmpty,\n r.always(Fragment),\n r.always('a'),\n )(ownerProps.url),\n })),\n withProps(stylesheet),\n ],\n }\n);\nexport default enhance(PureLogo);\n","import React from 'react';\nimport {\n defaultProps,\n withProps,\n} from '@team-griffin/rehook';\nimport Ribbon from '../Ribbon';\nimport Logo from './Logo';\nimport TrustpilotStars from 'components/common/TrustpilotStars';\nimport { Heading05 } from '@ux/typography';\nimport { FormattedMessage, FormattedNumber } from 'react-intl';\nimport { Container } from '@ux/grid';\nimport PaddingBox from '@ux/padding-box';\nimport { withBreakpointsHook, BreakpointProps } from '@ux/responsive';\nimport errorBoundary from 'presentation/hocs/errorBoundary';\nimport getLocalizedTrustPilotUrl from 'presentation/utils/getTrustpilotUrl';\nimport * as r from 'ramda';\nimport pureEnhance from '@ux/pure-enhance';\nimport stylesheet, { Styles } from './AggregateRatingTrustpilot.stylesheet';\nimport { RibbonProps } from 'domain/constants/ribbons';\n\nexport interface OuterProps extends RibbonProps {\n stars: number,\n trustScore: number,\n numberOfReviews?: {\n usedForTrustScoreCalculation?: number,\n },\n reviewCount: number,\n url: string,\n trustpilotPageId: string,\n currentLanguage: string,\n}\n\ninterface DefaultProps extends OuterProps {\n hBaseline: number,\n}\nexport interface InnerProps extends DefaultProps, BreakpointProps {\n styles: Styles,\n}\n\nexport const PureAggregateRatingTrustpilot = ({\n id,\n styles,\n theme,\n colorway,\n layout,\n loading,\n hBaseline,\n stars,\n trustScore,\n name,\n reviewCount,\n url,\n}: InnerProps) => (\n \n \n \n \n \n \n \n ),\n trustScore: (\n \n ),\n }}\n />\n \n ),\n reviews: (\n \n \n ),\n }}\n />\n \n ),\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport const enhance = pureEnhance(\n 'AggregateRatingTrustpilot',\n {\n hocs: [\n errorBoundary,\n ],\n hooks: [\n withBreakpointsHook,\n defaultProps({\n hBaseline: 1,\n }),\n withProps((ownerProps: OuterProps) => ({\n reviewCount: r.pathOr(\n null,\n [ 'numberOfReviews', 'usedForTrustScoreCalculation' ],\n ownerProps\n ),\n url: getLocalizedTrustPilotUrl(\n ownerProps.currentLanguage,\n ownerProps.trustpilotPageId\n ),\n })),\n withProps(stylesheet),\n ],\n },\n);\n\nexport default enhance(PureAggregateRatingTrustpilot);\n","import { useStyles } from '@team-griffin/stylr';\nimport { gu2px } from '@ux/theme-utils';\nimport { getTitleColor } from 'presentation/utils/colorway';\nimport { modifier } from '@ux/style-utils';\nimport { Alignment } from 'domain/constants/alignment';\nimport { InnerProps } from './AggregateRatingTrustpilot';\nimport { CSSProperties } from 'react';\n\nexport interface Styles {\n root: CSSProperties,\n title: CSSProperties,\n bold: CSSProperties,\n imagery: CSSProperties,\n logo: CSSProperties,\n stars: CSSProperties,\n text: CSSProperties,\n}\nexport default ({\n theme,\n colorway,\n layout,\n isMinSm,\n isMinMd,\n isMinLg,\n}: InnerProps) => {\n const {\n spacing,\n } = theme;\n\n const {\n alignment,\n } = layout;\n\n return useStyles({\n default: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n },\n title: {\n color: getTitleColor(theme, colorway),\n textAlign: 'center',\n },\n bold: {\n fontWeight: 600,\n },\n imagery: {\n marginTop: gu2px(2, spacing),\n },\n logo: {\n marginBottom: gu2px(2, spacing),\n height: gu2px(4, spacing),\n textAlign: 'center',\n },\n stars: {\n height: gu2px(3, spacing),\n textAlign: 'center',\n },\n },\n isMinMd: {\n root: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n text: {\n paddingRight: gu2px(3, spacing),\n },\n title: {\n textAlign: 'left',\n },\n imagery: {\n display: 'flex',\n marginTop: 0,\n paddingLeft: gu2px(3, spacing),\n },\n logo: {\n height: gu2px(3, spacing),\n marginLeft: 'auto',\n marginTop: 0,\n marginRight: gu2px(2, spacing),\n marginBottom: 0,\n },\n },\n\n isMinLg: {\n text: {\n paddingRight: gu2px(4, spacing),\n },\n imagery: {\n paddingLeft: gu2px(4, spacing),\n },\n logo: {\n height: gu2px(4, spacing),\n },\n stars: {\n height: gu2px(4, spacing),\n },\n },\n\n [modifier('alignment', Alignment.CENTER)]: {\n root: {\n justifyContent: 'center',\n },\n },\n }, [\n { isMinSm },\n { isMinMd },\n { isMinLg },\n { alignment },\n ]);\n};\n","import { connect } from 'react-redux';\nimport AggregateRatingTrustpilot, { OuterProps as PureProps } from './AggregateRatingTrustpilot';\nimport { getCurrentLanguage, getTrustpilotPageId } from 'domain/selectors/ribbons';\nimport { createStructuredSelector } from 'reselect';\nimport pureEnhance from '@ux/pure-enhance';\n\ninterface ConnectedProps {\n trustpilotPageId: string,\n currentLanguage: string,\n}\ninterface InnerProps extends PureProps {}\ninterface OuterProps extends Omit {}\n\nconst mapStateToProps = createStructuredSelector({\n trustpilotPageId: getTrustpilotPageId,\n currentLanguage: getCurrentLanguage,\n});\n\n\nconst enhance = pureEnhance(\n 'ConnectedAggregateRatingTrustpilot',\n {\n hocs: [\n connect(mapStateToProps),\n ],\n },\n);\n\nexport default enhance(AggregateRatingTrustpilot);\n","import ConnectedAggregateRatingTrustpilot from './ConnectedAggregateRatingTrustpilot';\n\nexport default ConnectedAggregateRatingTrustpilot;\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 { headingXl, headingXxl, display, headingL, headingM, headingS, headingXs, headingXxs, content } from '@ux/type-size';\nimport reactCSS from 'reactcss';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { createElement } from 'react';\nimport { defaultProps, mapProps } from '@team-griffin/rehook';\nimport pureEnhance from '@ux/pure-enhance';\nimport { withStylesHook } from '@ux/style-utils';\nimport { withBreakpoints } from '@ux/responsive';\nimport { pipe, converge, assoc, mergeDeepRight, path, propOr, identity, dissoc, is, defaultTo } from 'ramda';\nimport { gu2px } from '@ux/theme-utils';\n\nvar mergeStyles = pipe(converge(assoc('style'), [converge(mergeDeepRight, [path(['styles', 'root']), propOr({}, 'style')]), identity]), dissoc('styles'));\n\nvar createHeading = function createHeading(name, component, headingSize, stylesheet) {\n return pureEnhance(name, {\n hocs: [withBreakpoints],\n hooks: [defaultProps({\n component: component\n }), withStylesHook(function (props) {\n return stylesheet(Object.assign({}, props, {\n headingSize: headingSize\n }));\n }), mapProps(pipe(mergeStyles, function (props) {\n // if a `depth` prop is provided, make the `` element\n if (is(Number, props.depth)) {\n return assoc('component', \"h\".concat(props.depth), props);\n }\n\n return props;\n }))]\n })(function (_ref) {\n var style = _ref.style,\n children = _ref.children,\n component = _ref.component;\n return createElement(component, {\n style: style\n }, children);\n });\n};\n\nvar stylesheet = function stylesheet(_ref) {\n var typography = _ref.theme.typography,\n isMinSm = _ref.isMinSm,\n isMinLg = _ref.isMinLg,\n headingSize = _ref.headingSize;\n return reactCSS({\n default: {\n root: Object.assign({}, headingSize[0](typography), cssSides('margin', Side.Y, 0), {\n fontWeight: 'normal',\n fontFamily: typography.display\n })\n },\n isMinSm: {\n root: Object.assign({}, headingSize[1](typography))\n },\n isMinLg: {\n root: Object.assign({}, headingSize[2](typography))\n }\n }, [{\n isMinSm: isMinSm\n }, {\n isMinLg: isMinLg\n }]);\n};\n/* eslint-disable max-len */\n\n\nvar Heading01 = createHeading('Heading01', 'h1', [headingXl, headingXxl, display], stylesheet);\nvar Heading02 = createHeading('Heading02', 'h1', [headingL, headingXl, headingXxl], stylesheet);\nvar Heading03 = createHeading('Heading03', 'h1', [headingM, headingL, headingXl], stylesheet);\nvar Heading04 = createHeading('Heading04', 'h1', [headingS, headingM, headingL], stylesheet);\nvar Heading05 = createHeading('Heading05', 'h1', [headingXs, headingS, headingM], stylesheet);\nvar Heading06 = createHeading('Heading06', 'h1', [headingXxs, headingXs, headingS], stylesheet);\n\nvar stylesheet$1 = function stylesheet(_ref) {\n var _ref$theme = _ref.theme,\n typography = _ref$theme.typography,\n spacing = _ref$theme.spacing,\n gu = _ref.gu,\n isMinSm = _ref.isMinSm,\n isMinLg = _ref.isMinLg,\n headingSize = _ref.headingSize;\n return reactCSS({\n default: {\n root: Object.assign({}, headingSize[0](typography), {\n marginTop: gu2px(defaultTo(2, gu), spacing),\n marginBottom: 0,\n fontWeight: 'normal',\n fontFamily: typography.display\n })\n },\n isMinSm: {\n root: Object.assign({}, headingSize[1](typography))\n },\n isMinLg: {\n root: Object.assign({}, headingSize[2](typography))\n }\n }, [{\n isMinSm: isMinSm\n }, {\n isMinLg: isMinLg\n }]);\n};\n/* eslint-disable max-len */\n\n\nvar SubHeading01 = createHeading('SubHeading01', 'h2', [headingXs, headingS, headingM], stylesheet$1);\nvar SubHeading02 = createHeading('SubHeading02', 'h3', [headingXxs, headingXxs, headingXs], function (props) {\n return stylesheet$1(mergeDeepRight(props, {\n gu: 1\n }));\n});\n\nvar stylesheet$2 = function stylesheet(_ref) {\n var _ref$theme = _ref.theme,\n typography = _ref$theme.typography,\n spacing = _ref$theme.spacing,\n isMinSm = _ref.isMinSm,\n isMinLg = _ref.isMinLg,\n headingSize = _ref.headingSize;\n return reactCSS({\n default: {\n root: Object.assign({}, headingSize[0](typography), {\n marginTop: 0,\n marginBottom: gu2px(1, spacing),\n fontWeight: 'normal',\n fontFamily: typography.display\n })\n },\n isMinSm: {\n root: Object.assign({}, headingSize[1](typography))\n },\n isMinLg: {\n root: Object.assign({}, headingSize[2](typography))\n }\n }, [{\n isMinSm: isMinSm\n }, {\n isMinLg: isMinLg\n }]);\n};\n/* eslint-disable max-len */\n\n\nvar PreHeading01 = createHeading('PreHeading01', 'div', [headingXxs, headingXs, headingS], stylesheet$2);\nvar PreHeading02 = createHeading('PreHeading02', 'div', [headingXxs, headingXxs, headingXs], stylesheet$2);\n\nvar stylesheet$3 = function stylesheet(_ref) {\n var _ref$theme = _ref.theme,\n typography = _ref$theme.typography,\n spacing = _ref$theme.spacing,\n isMinSm = _ref.isMinSm,\n isMinLg = _ref.isMinLg,\n headingSize = _ref.headingSize;\n return reactCSS({\n default: {\n root: Object.assign({}, headingSize[0](typography), {\n marginTop: gu2px(1, spacing),\n marginBottom: 0,\n fontWeight: 'normal',\n fontFamily: typography.content\n })\n },\n isMinSm: {\n root: Object.assign({}, headingSize[1](typography))\n },\n isMinLg: {\n root: Object.assign({}, headingSize[2](typography))\n }\n }, [{\n isMinSm: isMinSm\n }, {\n isMinLg: isMinLg\n }]);\n};\n/* eslint-disable max-len */\n\n\nvar BodyCopy01 = createHeading('BodyCopy01', 'p', [content, content, content], stylesheet$3);\n\nvar index = null;\n\nexport default index;\nexport { BodyCopy01, Heading01, Heading02, Heading03, Heading04, Heading05, Heading06, PreHeading01, PreHeading02, SubHeading01, SubHeading02 };\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","import { percentage } from '@ux/style-utils';\n\nexport 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: percentage(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","export enum Alignment {\n STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\n","import React from 'react';\nimport pureEnhance from '@ux/pure-enhance';\nimport { useStyles } from '@team-griffin/stylr';\nimport { percentage } from '@ux/style-utils';\nimport { withProps } from '@team-griffin/rehook';\n\nconst stylesheet = () => useStyles({\n default: {\n root: {\n maxWidth: percentage(100),\n maxHeight: percentage(100),\n display: 'block',\n },\n },\n});\n\n\n// I'm not worried about the repetition of the prefix here as it'll be normalised away by gzip compression\n// as a dictionary item.\nconst starMap = {\n '1': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/4627f20d-7040-4e7f-9abe-36501b4dd2e8/1-256x48.png', // eslint-disable-line max-len\n '1.5': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/8f0e6ed7-723f-41e5-a402-2fd90025d763/1_5-256x48.png', // eslint-disable-line max-len\n '2': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/a68be276-2c5e-4257-92ed-bc37a6a48950/2-256x48.png', // eslint-disable-line max-len\n '2.5': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/a4e13b3a-499a-46e3-91f2-cc8c4b95e218/2_5-256x48.png', // eslint-disable-line max-len\n '3': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/2f119448-0f7a-4bb5-878a-2a589e768761/3-256x48.png', // eslint-disable-line max-len\n '3.5': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/0b1ee116-1add-4097-a3ad-dbbdcb4b9e41/3_5-256x48.png', // eslint-disable-line max-len\n '4': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/22fcec44-6e44-49db-af28-940f92b03cb0/4-256x48.png', // eslint-disable-line max-len\n '4.5': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/bbb6dfba-fd77-4f0c-b922-ab3cdc8a39af/4_5-256x48.png', // eslint-disable-line max-len\n '5': 'https://img1.wsimg.com/cdn/Image/All/AllChannelsFoS/1/en-US/91a13237-f0a8-49a3-bbf1-d6edf5fc1b69/5-256x48.png', // eslint-disable-line max-len\n};\n\n\nexport const PureStars = ({\n styles,\n rating,\n}) => (\n \n);\n\nexport const enhance = pureEnhance(\n 'TrustpilotStars',\n [ withProps(stylesheet) ]\n);\n\nexport default enhance(PureStars);\n","import * as r from 'ramda';\n\nconst getFuzzyLang = r.pipe(\n r.defaultTo('en-gb'),\n r.split('-'),\n r.head,\n r.when(\n r.equals('en'),\n r.always('www'),\n )\n);\n\nconst getLocalizedTrustPilotUrl = (lang, id) => r.ifElse(\n r.isNil,\n r.always(''),\n r.always(`https://${getFuzzyLang(lang)}.trustpilot.com/review/${id}`)\n)(id);\n\nexport default getLocalizedTrustPilotUrl;"],"sourceRoot":""}