{"version":3,"sources":["webpack:///./src/hooks/useIntersectionObserver.ts","webpack:///./src/hooks/useInView.ts","webpack:///./src/img/icons/pause.svg","webpack:///./src/stories/Components/CarouselControls/CarouselControls.tsx","webpack:///./src/helpers/sleep.ts","webpack:///./src/img/icons/arrow-left.svg","webpack:///./src/hoc/withMotion.tsx","webpack:///./src/stories/Components/Swipeable/Swipeable.tsx","webpack:///./src/stories/Components/CarouselControls/CarouselControls.styles.ts","webpack:///./src/helpers/utils.ts","webpack:///./src/helpers/srOnly.ts","webpack:///./src/img/icons/triangle-right.svg","webpack:///./src/img/icons/triangle-left.svg","webpack:///./src/stories/Components/CarouselControls/CarouselProvider.tsx","webpack:///./src/helpers/image.ts"],"names":["useIntersectionObserver","callback","options","observerRef","useRef","rootRef","elementRef","useEffect","current","IntersectionObserver","root","observe","disconnect","JSON","stringify","useInView","reverse","isEditMode","inView","setInView","useState","entries","isIntersecting","_g","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","SvgPause","props","xmlns","viewBox","fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","d","withMotion","controls","theme","icons","circumference","Math","PI","actions","state","useCarousel","next","playPause","prev","isPaused","autoplay","disabled","loop","max","value","onChange","animationControls","useAnimation","useInterval","React","start","strokeDashoffset","transition","duration","ease","type","set","S","Container","themeOption","Array","map","_","index","SlideButton","onClick","event","preventDefault","SrOnly","ControlProgressButton","ControlIcon","as","SvgTriangleRight","ControlProgress","cx","cy","r","style","cssVar","id","stopColor","offset","ControlProgressCircle","animate","ControlButton","SvgArrowLeft","SvgTriangleLeft","SvgArrowRight","sleep","ms","Promise","resolve","setTimeout","_path","WrappedComponent","displayName","name","ComponentWithMotion","createElement","LazyMotion","features","domAnimation","strict","Swipeable","children","otherProps","useSwipeable","styled","div","css","setCssVar","brand","orange","grey","grey18","white","button","until","Device","Tablet","span","svg","m","circle","srOnly","headerOverlap","from","Desktop","headerOverlapPadding","highlightTitleWords","title","replaceAll","CarouselContext","CarouselProvider","shouldReduceMotion","useReducedMotion","setIsPaused","contextValue","min","Provider","imageUrl","image","imageParams","src","imageSource","split","params","rxy","focalPoint","left","top","undefined","rmode","quality","width","heightratio","height","queryString","getSrcs","upper","lower","steps","ratio","increment","ceil","getRange","size"],"mappings":"mIA6BeA,MAtBf,SAAiCC,EAAUC,EAAU,IACjD,MAAMC,EAAcC,iBAAO,MACrBC,EAAUD,iBAAO,MACjBE,EAAaF,iBAAO,MAiB1B,OAhBAG,oBAAU,KACN,GAAKD,EAAWE,QAQhB,OALAL,EAAYK,QAAU,IAAIC,qBAAqBR,EAAU,CACrDS,KAAML,EAAQG,WACXN,IAEPC,EAAYK,QAAQG,QAAQL,EAAWE,SAChC,KACyB,OAAxBL,EAAYK,SAGhBL,EAAYK,QAAQI,eAEzB,CAACC,KAAKC,UAAUZ,KACZ,CAAEI,aAAYH,cAAaE,YCzB/B,SAASU,EAAUb,EAASc,GAAU,EAAOC,GAAa,GAC7D,MAAOC,EAAQC,GAAaC,oBAAS,IAC/B,WAAEd,GAAeN,EAAyBqB,IACxCA,EAAQ,GAAGC,eACXH,GAAU,IAEO,IAAZH,GACLG,GAAU,IAEfjB,GACH,MAAO,CAACI,IAAYW,GAAoBC,K,qCCZxCK,E,uCAEJ,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,IAA2BS,MAAMC,KAAMR,WAIhT,SAASS,EAASC,GAChB,OAAoB,gBAAoB,MAAOf,EAAS,CACtDgB,MAAO,6BACPC,QAAS,qBACRF,GAAQhB,IAAOA,EAAkB,gBAAoB,IAAK,CAC3DmB,KAAM,OACNC,OAAQ,eACRC,cAAe,QACfC,e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AOC,GAC5B,MACME,GADaJ,EAAQC,IACKC,EAAQ,GACxC,MAAO,CACHD,KACGpG,MAAMqG,EAAQ,GACZ7I,KAAK,IACLyC,IAAI,CAACC,EAAGC,IAAUhC,KAAKqI,KAAKJ,EAAQG,GAAapG,EAAQ,KAC9DgG,GAfUM,CAASN,EAAOC,EAAOC,GACxBpG,IAAKyG,GAAU,GAAE1B,EAASC,EAAO,CAAEa,MAAOY,EAAMX,YAAaO,OAAYI","file":"22-bda5ac727b6ccfe4daf6.js","sourcesContent":["import { useEffect, useRef } from 'react';\r\n/**\r\n * Use the IntersectionObserver to track visibility of an element in the viewport.\r\n * @param {IntersectionObserverCallback} callback\r\n * @param {IntersectionObserverInit} options\r\n * @returns {UseIntersectionObserverReturn}\r\n */\r\nfunction useIntersectionObserver(callback, options = {}) {\r\n const observerRef = useRef(null);\r\n const rootRef = useRef(null);\r\n const elementRef = useRef(null);\r\n useEffect(() => {\r\n if (!elementRef.current) {\r\n return undefined;\r\n }\r\n observerRef.current = new IntersectionObserver(callback, {\r\n root: rootRef.current,\r\n ...options,\r\n });\r\n observerRef.current.observe(elementRef.current);\r\n return () => {\r\n if (observerRef.current === null) {\r\n return;\r\n }\r\n observerRef.current.disconnect();\r\n };\r\n }, [JSON.stringify(options)]);\r\n return { elementRef, observerRef, rootRef };\r\n}\r\nexport default useIntersectionObserver;\r\n","import { useState } from 'react';\r\nimport useIntersectionObserver from './useIntersectionObserver';\r\nexport function useInView(options, reverse = false, isEditMode = false) {\r\n const [inView, setInView] = useState(false);\r\n const { elementRef } = useIntersectionObserver((entries) => {\r\n if (entries[0].isIntersecting) {\r\n setInView(true);\r\n }\r\n else if (reverse === true) {\r\n setInView(false);\r\n }\r\n }, options);\r\n return [elementRef, isEditMode ? true : inView];\r\n}\r\n","var _g;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction SvgPause(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 12.085 16.478\"\n }, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 3\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.5 1.499v13.478M10.584 1.499v13.478\"\n }))));\n}\n\nexport default __webpack_public_path__ + \"pause-329c1f8435d11fd9b4222ada99a22cbe.svg\";\nexport { SvgPause as ReactComponent };","import { cssVar } from '@helpers/cssVar';\r\nimport { withMotion } from '@hoc/withMotion';\r\nimport { ReactComponent as SvgArrowLeft } from '@img/icons/arrow-left.svg';\r\nimport { ReactComponent as SvgArrowRight } from '@img/icons/arrow-right.svg';\r\nimport { ReactComponent as SvgPause } from '@img/icons/pause.svg';\r\nimport { ReactComponent as SvgTriangleLeft } from '@img/icons/triangle-left.svg';\r\nimport { ReactComponent as SvgTriangleRight } from '@img/icons/triangle-right.svg';\r\nimport { useAnimation } from 'framer-motion';\r\nimport * as React from 'react';\r\nimport { useInterval } from 'react-use';\r\nimport S from './CarouselControls.styles';\r\nimport { useCarousel } from './CarouselProvider';\r\nconst CarouselControls = ({ controls = false, theme = 'light', icons = 'default', }) => {\r\n const progressRadius = 18;\r\n const circumference = Math.PI * progressRadius * 2;\r\n const { actions, state } = useCarousel();\r\n const { next, playPause, prev } = actions;\r\n const { isPaused, autoplay = 0, disabled = false, loop = false, max, value, onChange } = state;\r\n const animationControls = useAnimation();\r\n useInterval(() => {\r\n next();\r\n }, isPaused ? null : autoplay);\r\n React.useEffect(() => {\r\n if (value === max - 1 && !loop) {\r\n return;\r\n }\r\n if (isPaused) {\r\n animationControls.start({\r\n strokeDashoffset: circumference,\r\n transition: { duration: 0.3, ease: 'easeOut', type: 'tween' },\r\n });\r\n return;\r\n }\r\n animationControls.set({\r\n strokeDashoffset: circumference,\r\n });\r\n animationControls.start({\r\n strokeDashoffset: 0,\r\n transition: { duration: autoplay / 1000, ease: 'linear', type: 'tween' },\r\n });\r\n }, [isPaused, value]);\r\n return (React.createElement(S.Container, { themeOption: theme === 'shard-lights' ? 'dark' : theme },\r\n new Array(max).fill(0).map((_, index) => (React.createElement(S.SlideButton, { key: index + 1, disabled: value === index, onClick: (event) => {\r\n event.preventDefault();\r\n if (!disabled) {\r\n playPause(true);\r\n onChange(index);\r\n }\r\n } },\r\n React.createElement(S.SrOnly, null, value === index ? 'Active' : index + 1)))),\r\n autoplay > 0 && (React.createElement(S.ControlProgressButton, { onClick: (event) => {\r\n event.preventDefault();\r\n if (!isPaused) {\r\n return playPause(true);\r\n }\r\n if (!disabled) {\r\n playPause(false);\r\n next();\r\n }\r\n } },\r\n React.createElement(S.SrOnly, null, isPaused ? 'Play' : 'Pause'),\r\n React.createElement(S.ControlIcon, { as: isPaused ? SvgTriangleRight : SvgPause }),\r\n React.createElement(S.ControlProgress, { viewBox: \"0 0 40 40\" },\r\n React.createElement(\"circle\", { cx: 20, cy: 20, fill: \"none\", r: progressRadius, strokeWidth: 2, style: { stroke: cssVar('fgColor') } }),\r\n theme === 'shard-lights' && (React.createElement(\"defs\", null,\r\n React.createElement(\"linearGradient\", { id: \"gradientBg\" },\r\n React.createElement(\"stop\", { stopColor: \"#ed4141\" }),\r\n React.createElement(\"stop\", { offset: \".071\", stopColor: \"#ef523d\" }),\r\n React.createElement(\"stop\", { offset: \".143\", stopColor: \"#f0623a\" }),\r\n React.createElement(\"stop\", { offset: \".214\", stopColor: \"#f17138\" }),\r\n React.createElement(\"stop\", { offset: \".286\", stopColor: \"#f07e37\" }),\r\n React.createElement(\"stop\", { offset: \".357\", stopColor: \"#f08b39\" }),\r\n React.createElement(\"stop\", { offset: \".429\", stopColor: \"#ef983c\" }),\r\n React.createElement(\"stop\", { offset: \".5\", stopColor: \"#eda441\" }),\r\n React.createElement(\"stop\", { offset: \".571\", stopColor: \"#d8a936\" }),\r\n React.createElement(\"stop\", { offset: \".643\", stopColor: \"#c2ae30\" }),\r\n React.createElement(\"stop\", { offset: \".714\", stopColor: \"#aab231\" }),\r\n React.createElement(\"stop\", { offset: \".786\", stopColor: \"#90b439\" }),\r\n React.createElement(\"stop\", { offset: \".857\", stopColor: \"#73b645\" }),\r\n React.createElement(\"stop\", { offset: \".929\", stopColor: \"#50b754\" }),\r\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#08b766\" })))),\r\n React.createElement(S.ControlProgressCircle, { animate: animationControls, cx: 20, cy: 20, fill: \"none\", r: progressRadius, strokeWidth: 2, \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n style: {\r\n ['--circumference']: circumference,\r\n stroke: theme === 'shard-lights' ? 'url(#gradientBg)' : cssVar('accentColor'),\r\n } })))),\r\n controls && (React.createElement(React.Fragment, null,\r\n React.createElement(S.ControlButton, { disabled: !loop && value === 0, onClick: (event) => {\r\n event.preventDefault();\r\n if (!disabled) {\r\n playPause(true);\r\n prev();\r\n }\r\n }, \"data-icon\": icons },\r\n React.createElement(S.SrOnly, null, \"Previous\"),\r\n React.createElement(S.ControlIcon, { as: icons == 'arrows' ? SvgArrowLeft : SvgTriangleLeft })),\r\n React.createElement(S.ControlButton, { disabled: !loop && value === max - 1, onClick: (event) => {\r\n event.preventDefault();\r\n if (!disabled) {\r\n playPause(true);\r\n next();\r\n }\r\n }, \"data-icon\": icons },\r\n React.createElement(S.SrOnly, null, \"Next\"),\r\n React.createElement(S.ControlIcon, { as: icons == 'arrows' ? SvgArrowRight : SvgTriangleRight }))))));\r\n};\r\nexport default withMotion(CarouselControls);\r\n","export function sleep(ms) {\r\n return new Promise((resolve) => setTimeout(resolve, ms));\r\n}\r\n","var _path;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction SvgArrowLeft(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 25 22\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.947 21.71l1.461-1.384-8.417-8.135H24.5v-1.965H3.99l8.414-8.135L10.942.708.797 10.518a.961.961 0 00-.297.691c0 .259.107.508.297.691l10.15 9.81z\",\n fill: \"currentColor\"\n })));\n}\n\nexport default __webpack_public_path__ + \"arrow-left-4bc7ca09f5a12ee6749218374c9bdff8.svg\";\nexport { SvgArrowLeft as ReactComponent };","import { domAnimation, LazyMotion } from 'framer-motion';\r\nimport React from 'react';\r\nexport function withMotion(WrappedComponent) {\r\n const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\r\n const ComponentWithMotion = (props) => {\r\n return (React.createElement(LazyMotion, { features: domAnimation, strict: true },\r\n React.createElement(WrappedComponent, { ...props })));\r\n };\r\n ComponentWithMotion.displayName = `withMotion(${displayName})`;\r\n return ComponentWithMotion;\r\n}\r\n","import { useSwipeable, } from 'react-swipeable';\r\nconst Swipeable = ({ children, ...otherProps }) => {\r\n const handlers = useSwipeable(otherProps);\r\n return children(handlers);\r\n};\r\nexport default Swipeable;\r\n","import brand from '@helpers/brand';\r\nimport { cssVar, setCssVar } from '@helpers/cssVar';\r\nimport { Device, until } from '@helpers/media';\r\nimport srOnly from '@helpers/srOnly';\r\nimport { m } from 'framer-motion';\r\nimport styled, { css } from 'styled-components';\r\nconst Container = styled.div `\r\n display: flex;\r\n align-items: center;\r\n flex-direction: row;\r\n user-select: none;\r\n\r\n ${({ themeOption }) => {\r\n switch (themeOption) {\r\n case 'light':\r\n return css `\r\n ${setCssVar('accentColor', brand.orange)};\r\n ${setCssVar('fgColor', brand.grey.grey18)};\r\n `;\r\n case 'dark':\r\n return css `\r\n ${setCssVar('accentColor', brand.orange)};\r\n ${setCssVar('fgColor', brand.white)};\r\n `;\r\n }\r\n}}\r\n`;\r\nconst SlideButton = styled.button `\r\n display: inline-flex;\r\n background: none;\r\n border: 0;\r\n color: ${cssVar('fgColor')};\r\n margin: 0;\r\n padding: 18px 0;\r\n place-content: center;\r\n place-items: center;\r\n transition: background-color 0.15s ease-out;\r\n\r\n & + & {\r\n margin: 0 0 0 8px;\r\n }\r\n\r\n &::before {\r\n content: '';\r\n background: ${cssVar('fgColor')};\r\n height: 4px;\r\n transition: background-color 0.15s ease-out;\r\n width: 40px;\r\n }\r\n\r\n &:not(:disabled) {\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:focus,\r\n &:hover {\r\n &::before {\r\n background: ${cssVar('accentColor')};\r\n }\r\n }\r\n }\r\n\r\n &:disabled {\r\n &::before {\r\n background: ${cssVar('accentColor')};\r\n }\r\n }\r\n`;\r\nconst ControlButton = styled.button `\r\n position: relative;\r\n display: inline-flex;\r\n background: none;\r\n border: 1px solid ${cssVar('fgColor')};\r\n border-radius: 50%;\r\n color: ${cssVar('fgColor')};\r\n height: 40px;\r\n margin: 0 0 0 8px;\r\n padding: 0;\r\n place-content: center;\r\n place-items: center;\r\n width: 40px;\r\n transition: border-color 0.15s ease-out, opacity 0.15s ease-out;\r\n\r\n &:not(:disabled) {\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:focus,\r\n &:hover {\r\n border-color: ${cssVar('accentColor')};\r\n }\r\n }\r\n\r\n &:disabled {\r\n opacity: 0.5;\r\n }\r\n\r\n @media ${until(Device.Tablet)} {\r\n margin: 0 8px 0 0;\r\n }\r\n\r\n &[data-icon='arrows'] {\r\n border: unset;\r\n }\r\n`;\r\nconst ControlIcon = styled.span `\r\n color: ${cssVar('fgColor')};\r\n height: 14px;\r\n width: 14px;\r\n\r\n [data-icon='arrows'] & {\r\n width: 20px;\r\n height: 18px;\r\n }\r\n\r\n [data-icon='arrows']:hover & {\r\n color: ${cssVar('accentColor')};\r\n }\r\n`;\r\nconst ControlProgressButton = styled(ControlButton) `\r\n border: 0;\r\n`;\r\nconst ControlProgress = styled.svg `\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n display: block;\r\n color: ${cssVar('accentColor')};\r\n height: 100%;\r\n width: 100%;\r\n`;\r\nconst ControlProgressCircle = styled(m.circle) `\r\n stroke-dasharray: var(--circumference) var(--circumference);\r\n transform: rotate(-90deg);\r\n transform-origin: center center;\r\n`;\r\nconst SrOnly = styled.span `\r\n ${srOnly}\r\n`;\r\nexport default {\r\n Container,\r\n ControlButton,\r\n ControlIcon,\r\n ControlProgress,\r\n ControlProgressButton,\r\n ControlProgressCircle,\r\n SlideButton,\r\n SrOnly,\r\n};\r\n","import { css } from 'styled-components';\r\nimport { Device, from } from './media';\r\nexport function sleep(ms) {\r\n return new Promise((resolve) => setTimeout(resolve, ms));\r\n}\r\nexport const headerOverlap = css `\r\n margin-top: -46px;\r\n\r\n @media ${from(Device.Desktop)} {\r\n margin-top: -104px;\r\n }\r\n\r\n .no-header & {\r\n margin-top: 0 !important;\r\n }\r\n`;\r\nexport const headerOverlapPadding = css `\r\n --headerHeight: 46px;\r\n\r\n padding-top: var(--headerHeight);\r\n\r\n @media ${from(Device.Desktop)} {\r\n --headerHeight: 104px;\r\n }\r\n\r\n .no-header & {\r\n padding-top: 0 !important;\r\n }\r\n`;\r\nexport const highlightTitleWords = (title) => title.replaceAll(/\\*([\\w\\W]+)\\*/g, '$1');\r\n","import { css } from 'styled-components';\r\n/**\r\n * Show only for screen readers.\r\n * @description Sourced from https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034\r\n */\r\nconst srOnly = css `\r\n border: 0 !important;\r\n clip: rect(1px, 1px, 1px, 1px) !important;\r\n -webkit-clip-path: inset(50%) !important;\r\n clip-path: inset(50%) !important;\r\n height: 1px !important;\r\n margin: -1px !important;\r\n overflow: hidden !important;\r\n padding: 0 !important;\r\n position: absolute !important;\r\n width: 1px !important;\r\n white-space: nowrap !important;\r\n`;\r\nexport default srOnly;\r\n","var _path;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction SvgTriangleRight(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 11 15\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.788 6.674a1 1 0 010 1.652l-8.225 5.608A1 1 0 010 13.108V1.892a1 1 0 011.563-.826z\",\n fill: \"currentColor\"\n })));\n}\n\nexport default __webpack_public_path__ + \"triangle-right-4d86767c770b0e3fb6e407cf975044b5.svg\";\nexport { SvgTriangleRight as ReactComponent };","var _path;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction SvgTriangleLeft(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 11 15\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.212 8.326a1 1 0 010-1.652l8.225-5.608A1 1 0 0111 1.892v11.216a1 1 0 01-1.563.826z\",\n fill: \"currentColor\"\n })));\n}\n\nexport default __webpack_public_path__ + \"triangle-left-f823db3deb4ca209af40fa248dd67b06.svg\";\nexport { SvgTriangleLeft as ReactComponent };","import { useReducedMotion } from 'framer-motion';\r\nimport * as React from 'react';\r\nconst CarouselContext = React.createContext({\r\n actions: {\r\n /* eslint-disable @typescript-eslint/no-empty-function */\r\n next: () => { },\r\n playPause: () => { },\r\n prev: () => { },\r\n /* eslint-enable @typescript-eslint/no-empty-function */\r\n },\r\n state: {\r\n autoplay: 0,\r\n disabled: false,\r\n isPaused: false,\r\n loop: false,\r\n max: 0,\r\n value: 0,\r\n /* eslint-disable @typescript-eslint/no-empty-function */\r\n onChange: () => { },\r\n /* eslint-enable @typescript-eslint/no-empty-function */\r\n },\r\n});\r\nexport const useCarousel = () => React.useContext(CarouselContext);\r\nconst CarouselProvider = (props) => {\r\n const { autoplay, disabled, loop, max, value, onChange } = props;\r\n const shouldReduceMotion = useReducedMotion();\r\n const [isPaused, setIsPaused] = React.useState(shouldReduceMotion || autoplay === 0);\r\n const contextValue = {\r\n actions: {\r\n next,\r\n playPause,\r\n prev,\r\n },\r\n state: {\r\n autoplay,\r\n disabled,\r\n isPaused,\r\n loop,\r\n max,\r\n value,\r\n onChange,\r\n },\r\n };\r\n return (React.createElement(CarouselContext.Provider, { value: contextValue }, props.children(contextValue)));\r\n /** Set the autoplay state of the carousel. */\r\n function playPause(value) {\r\n setIsPaused(value);\r\n }\r\n /** Move to the previous slide, handles looping if enabled. */\r\n function prev() {\r\n if (loop && value === 0) {\r\n return onChange(max - 1);\r\n }\r\n onChange(Math.max(value - 1, 0));\r\n }\r\n /** Move to the next slide, handles looping if enabled. */\r\n function next() {\r\n if (loop && value === max - 1) {\r\n return onChange(0);\r\n }\r\n onChange(Math.min(value + 1, max - 1));\r\n }\r\n};\r\nexport default CarouselProvider;\r\n","import queryString from 'query-string';\r\n/**\r\n * Create an image URL for ImageSharp\r\n * @param image The image model\r\n * @param imageParams The image parameters\r\n * @returns The image URL\r\n */\r\nexport function imageUrl(image, imageParams) {\r\n if (!image || !image.src) {\r\n return '';\r\n }\r\n /**\r\n * Remove any query param string to ensure paramsString is applied correctly and\r\n * there are no double definitions (setting a param twice prevents any tranformations)\r\n */\r\n const imageSource = image.src.split('?')[0];\r\n const params = {\r\n rxy: image.focalPoint ? `${image.focalPoint.left},${image.focalPoint.top}` : undefined,\r\n rmode: 'crop',\r\n // Define default quality as 95 to ensure some reduction in size for all but the smallest images\r\n quality: imageParams.width && imageParams.width > 400 ? 95 : undefined,\r\n ...imageParams,\r\n };\r\n // Imagesharp doesn't support heightratio parameter. Convert to height parameter for compatibility.\r\n if (imageParams.heightratio !== undefined && imageParams.width !== undefined) {\r\n params.height = imageParams.width * imageParams.heightratio;\r\n }\r\n const paramsString = queryString.stringify(params);\r\n return `${imageSource}${paramsString ? `?${queryString.stringify(params)}` : ''}`;\r\n}\r\nexport function getSrcs(image, upper, lower, steps, ratio) {\r\n const sizes = getRange(upper, lower, steps);\r\n return sizes.map((size) => `${imageUrl(image, { width: size, heightratio: ratio })} ${size}w`);\r\n}\r\nexport function getRetinaSrcs(image, width, ratio) {\r\n const dprs = [1, 1.5, 2, 2.5, 3];\r\n return dprs.map((dpr) => `${imageUrl(image, { width: width * dpr, heightratio: ratio })} ${dpr}x`);\r\n}\r\nfunction getRange(upper, lower, steps) {\r\n const difference = upper - lower;\r\n const increment = difference / (steps - 1);\r\n return [\r\n lower,\r\n ...Array(steps - 2)\r\n .fill('')\r\n .map((_, index) => Math.ceil(lower + increment * (index + 1))),\r\n upper,\r\n ];\r\n}\r\n"],"sourceRoot":""}