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AmB,IACxDC,EACAnB,EAFsCd,EAAiB,EAAjBA,MAGtCkC,EAAAA,EAAAA,IAAWlC,EAAK5E,SAAS0F,SAC3BmB,EAAM,IAASjC,EAAK5E,SAAS0F,MAAMtF,MAAM,GAAGD,aAC5CuF,EAAQd,EAAK5E,SAAS0F,MAAMtF,MAAM,GAAG2G,KAAKC,gBAAgBC,iBAE5D,IAAIA,EAAkBvB,EAClBwB,GAAcC,EAAAA,EAAAA,GAASF,GAC3B,OACE,gBAACrB,EAAD,CAAM5C,IAAK4B,EAAK9D,OAAOC,IACrB,gBAACsF,EAAD,CAAWQ,IAAKA,EAAKnB,MAAOwB,IAC5B,gBAAC,KAAD,KACE,gBAAC,KAAD,KACE,gBAACX,EAAD,KAAS3B,EAAK5E,SAASyF,UAAUrF,QAEnC,gBAAC0F,EAAD,KAAWlB,EAAK5E,SAASG,YAAYC,OACrC,gBAAC,IAAD,CAAW6E,UAAWpB,EAAAA,EAAMuD,UAAU,YAAYtD,IAAIC,EAAAA,EAAAA,IAAUa,IAC9D","sources":["webpack://cashstore-online/./src/kentico/components/page-collection/data.ts","webpack://cashstore-online/./node_modules/reactstrap/es/Pagination.js","webpack://cashstore-online/./node_modules/reactstrap/es/PaginationItem.js","webpack://cashstore-online/./node_modules/reactstrap/es/PaginationLink.js","webpack://cashstore-online/./src/kentico/components/page-collection/pagination.tsx","webpack://cashstore-online/./src/kentico/components/page-collection/index.tsx","webpack://cashstore-online/./src/gatsby/templates/page-collection.tsx","webpack://cashstore-online/./src/kentico/components/page-collection-child/data.ts","webpack://cashstore-online/./src/kentico/components/page-collection-child/index.tsx"],"sourcesContent":["import {graphql} from 'gatsby'\nimport * as IO from 'io-ts'\nimport {LinkedItems} from '../../util'\nimport {KenticoBodyItemData} from '../body-item'\nimport {KenticoPageLinkData} from '../page-link'\nimport {KenticoPageScriptData} from '../page-script'\n\n/** Page collection. */\nexport const KenticoPageCollectionData = IO.intersection(\n [\n KenticoPageLinkData,\n IO.type({\n elements: IO.type({\n canonicalPage: LinkedItems(KenticoPageLinkData),\n description: IO.type({\n value: IO.string,\n }),\n postBody: LinkedItems(KenticoBodyItemData),\n preBody: LinkedItems(KenticoBodyItemData),\n robots: IO.type({\n value: IO.array(\n IO.type({\n codename: IO.string,\n }),\n ),\n }),\n scripts: LinkedItems(KenticoPageScriptData),\n title: IO.type({\n value: IO.string,\n }),\n url: IO.type({\n value: IO.string,\n }),\n }),\n system: IO.type({\n id: IO.string,\n }),\n }),\n ],\n 'KenticoPageCollection',\n)\n\n/** Data type. */\nexport interface KenticoPageCollectionData\n extends IO.TypeOf {}\n\n/** Fragment helper. */\nexport const fragment = graphql`\n fragment KenticoPageCollection on Node {\n ... on kontent_item_page_collection {\n ...KenticoPageLink\n system {\n id\n }\n elements {\n preBody: pre_post_body__pre_body {\n nodes: value {\n ...KenticoBodyItem\n }\n }\n postBody: pre_post_body__post_body {\n nodes: value {\n ...KenticoBodyItem\n }\n }\n url {\n value\n }\n canonicalPage: metadata__canonical_page {\n nodes: value {\n ...KenticoPageLink\n }\n }\n description: metadata__description {\n value\n }\n robots: metadata__robots {\n value {\n codename\n }\n }\n scripts: metadata__scripts {\n nodes: value {\n ...KenticoPageScript\n }\n }\n title: metadata__title {\n value\n }\n }\n }\n }\n`\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar defaultProps = {\n tag: 'nav',\n listTag: 'ul',\n 'aria-label': 'pagination'\n};\n\nvar Pagination = function Pagination(props) {\n var _classNames;\n\n var className = props.className,\n listClassName = props.listClassName,\n cssModule = props.cssModule,\n size = props.size,\n Tag = props.tag,\n ListTag = props.listTag,\n label = props['aria-label'],\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"listClassName\", \"cssModule\", \"size\", \"tag\", \"listTag\", \"aria-label\"]);\n\n var classes = mapToCssModules(classNames(className), cssModule);\n var listClasses = mapToCssModules(classNames(listClassName, 'pagination', (_classNames = {}, _classNames[\"pagination-\" + size] = !!size, _classNames)), cssModule);\n return /*#__PURE__*/React.createElement(Tag, {\n className: classes,\n \"aria-label\": label\n }, /*#__PURE__*/React.createElement(ListTag, _extends({}, attributes, {\n className: listClasses\n })));\n};\n\nPagination.defaultProps = defaultProps;\nexport default Pagination;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar defaultProps = {\n tag: 'li'\n};\n\nvar PaginationItem = function PaginationItem(props) {\n var active = props.active,\n className = props.className,\n cssModule = props.cssModule,\n disabled = props.disabled,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"active\", \"className\", \"cssModule\", \"disabled\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'page-item', {\n active: active,\n disabled: disabled\n }), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nPaginationItem.defaultProps = defaultProps;\nexport default PaginationItem;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar defaultProps = {\n tag: 'a'\n};\n\nvar PaginationLink = function PaginationLink(props) {\n var className = props.className,\n cssModule = props.cssModule,\n next = props.next,\n previous = props.previous,\n first = props.first,\n last = props.last,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"next\", \"previous\", \"first\", \"last\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'page-link'), cssModule);\n var defaultAriaLabel;\n\n if (previous) {\n defaultAriaLabel = 'Previous';\n } else if (next) {\n defaultAriaLabel = 'Next';\n } else if (first) {\n defaultAriaLabel = 'First';\n } else if (last) {\n defaultAriaLabel = 'Last';\n }\n\n var ariaLabel = props['aria-label'] || defaultAriaLabel;\n var defaultCaret;\n\n if (previous) {\n defaultCaret = \"\\u2039\";\n } else if (next) {\n defaultCaret = \"\\u203A\";\n } else if (first) {\n defaultCaret = \"\\xAB\";\n } else if (last) {\n defaultCaret = \"\\xBB\";\n }\n\n var children = props.children;\n\n if (children && Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n if (!attributes.href && Tag === 'a') {\n Tag = 'button';\n }\n\n if (previous || next || first || last) {\n children = [/*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n key: \"caret\"\n }, children || defaultCaret), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\",\n key: \"sr\"\n }, ariaLabel)];\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes,\n \"aria-label\": ariaLabel\n }), children);\n};\n\nPaginationLink.defaultProps = defaultProps;\nexport default PaginationLink;","import React from 'react'\nimport {\n Pagination as BootstrapPagination,\n PaginationItem,\n PaginationLink,\n} from '~/bootstrap/components/pagination'\nimport {Link} from '~/common/components/link'\nimport {createUrl} from '../../util'\nimport {KenticoPageCollectionData} from './data'\n\ninterface Props {\n count: number\n index: number\n page: KenticoPageCollectionData\n}\n\n/**\n * Render pagination.\n * @return React component\n */\nexport const Pagination = ({count, index, page}: Props) => {\n const min = Math.max(0, index === count - 1 ? count - 3 : index - 1)\n const max = Math.min(count - 1, index === 0 ? 2 : index + 1)\n const items = Array.from({length: max - min + 1}).map((_, i) => {\n const idx = i + min\n return (\n \n \n {idx + 1}\n \n \n )\n })\n return (\n \n \n \n \n {items}\n \n \n \n \n )\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport {Col, Container, Row} from '~/bootstrap/components/layout'\nimport {Customize} from '~/common/components/customize'\nimport {GatsbySEO} from '~/gatsby/components/seo'\nimport {createReplace} from '../../renderer'\nimport {linkedItems} from '../../util'\nimport {KenticoBodyItem} from '../body-item'\nimport {KenticoGlobalScriptData} from '../global-script'\nimport {\n KenticoPageCollectionChild,\n KenticoPageCollectionChildData,\n} from '../page-collection-child'\nimport {KenticoPageCollectionData} from './data'\nimport {Pagination} from './pagination'\n\ninterface Props {\n count: number\n index: number\n page: KenticoPageCollectionData\n items: KenticoPageCollectionChildData[]\n globalScripts: KenticoGlobalScriptData\n}\n\nconst ItemsContainer = styled(Container)`\n padding-top: ${({theme}) => theme.spacers[5]};\n padding-bottom: ${({theme}) => theme.spacers[3]};\n`\n\nconst PaginationContainer = styled(Container)`\n padding-bottom: ${({theme}) => theme.spacers[4]};\n`\n\nconst PAGINATION_FLEX = {\n justify: 'center',\n} as const\n\n/** Kentico type data. */\nexport {KenticoPageCollectionData}\n\n/**\n * Render page collection from Kentico data.\n * @return React component\n */\nexport const KenticoPageCollection = ({\n count,\n globalScripts,\n index,\n items,\n page,\n}: Props) => {\n const children = items.map(subPage => (\n \n \n \n ))\n\n return (\n <>\n \n \n \n {children}\n \n \n \n \n \n \n )\n}\n","import {graphql} from 'gatsby'\nimport * as IO from 'io-ts'\nimport React from 'react'\nimport {KenticoGlobalScriptData} from '~/kentico/components/global-script'\nimport {\n KenticoPageCollection,\n KenticoPageCollectionData,\n} from '~/kentico/components/page-collection'\nimport {KenticoPageCollectionChildData} from '~/kentico/components/page-collection-child'\nimport {LinkedItems, linkedItems} from '~/kentico/util'\nimport {CookieError} from '~/common/components/cookie-error'\nimport {GatsbyLayout} from '../components/layout'\nimport {useDecode} from '../util'\n\nconst Props = IO.type({\n data: IO.type({\n globalScripts: KenticoGlobalScriptData,\n items: LinkedItems(KenticoPageCollectionChildData),\n page: KenticoPageCollectionData,\n }),\n pageContext: IO.type({\n count: IO.number,\n index: IO.number,\n }),\n})\n\n/** Query from template. */\nexport const query = graphql`\n query($id: String!, $limit: Int!, $skip: Int!) {\n page: kontentItemPageCollection(id: {eq: $id}) {\n ...KenticoPageCollection\n }\n items: allKontentItemPageCollectionItem(\n filter: {elements: {parent: {value: {elemMatch: {id: {eq: $id}}}}}}\n sort: {fields: [elements___published_date___value], order: DESC}\n limit: $limit\n skip: $skip\n ) {\n nodes {\n ...KenticoPageCollectionChild\n }\n }\n ...KenticoGlobalScripts\n }\n`\n\nconst PageCollection = (props: unknown) => {\n const {\n data: {items, ...data},\n pageContext: {count, index},\n } = useDecode(Props, props)\n\n return (\n \n \n \n \n )\n}\n\n/** Page collection. */\n// eslint-disable-next-line import/no-default-export\nexport default PageCollection\n","import {graphql} from 'gatsby'\nimport * as IO from 'io-ts'\nimport {KenticoFluidImageData} from '../fluid-image'\nimport {KenticoPageLinkData} from '../page-link'\n\n/** Page collection child. */\nexport const KenticoPageCollectionChildData = IO.intersection(\n [\n KenticoPageLinkData,\n IO.type({\n elements: IO.type({\n blogTitle: IO.type({\n value: IO.string,\n }),\n description: IO.type({\n value: IO.string,\n }),\n image: IO.type({\n value: IO.array(KenticoFluidImageData),\n }),\n }),\n id: IO.string,\n }),\n ],\n 'KenticoPageCollectionChild',\n)\n\n/** Data type. */\nexport interface KenticoPageCollectionChildData\n extends IO.TypeOf {}\n\n/** Fragment helper. */\nexport const fragment = graphql`\n fragment KenticoPageCollectionChild on Node {\n ... on kontent_item_page_collection_item {\n ...KenticoPageLink\n elements {\n description: metadata__description {\n value\n }\n image {\n value {\n ...KenticoFluidImage\n }\n }\n blogTitle: title {\n value\n }\n }\n id\n }\n }\n`\n","import {getImage, IGatsbyImageData} from 'gatsby-plugin-image'\nimport {BgImage} from 'gbimage-bridge'\nimport {toString} from 'lodash'\nimport React from 'react'\nimport styled from 'styled-components'\nimport {\n Card as BootstrapCard,\n CardBody,\n CardText as BootstrapCardText,\n CardTitle,\n} from '~/bootstrap/components/card'\nimport {Customize} from '~/common/components/customize'\nimport {Link} from '~/common/components/link'\nimport {createUrl, validImage} from '../../util'\nimport {KenticoPageCollectionChildData} from './data'\n\n/** Kentico type data. */\nexport {KenticoPageCollectionChildData}\n\ninterface Props {\n data: KenticoPageCollectionChildData\n}\n\nconst DESCRIPTION_HEIGHT = 6\nconst HEADER_HEIGHT = 4\n\nconst Card = styled(BootstrapCard)`\n margin-bottom: ${({theme}) => theme.spacers[5]};\n`\n\n// TODO Remove -webkit once relevant items are standardized\nconst CardText = styled(BootstrapCardText)`\n height: ${({theme}) =>\n DESCRIPTION_HEIGHT *\n theme.text.lineHeight *\n parseFloat(theme.text.fontSize.base)}rem;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: ${DESCRIPTION_HEIGHT};\n -webkit-box-orient: vertical;\n`\n\nconst CardImage = styled(BgImage)`\n height: 215px;\n`\n\n// TODO Remove -webkit once relevant items are standardized\nconst Header = styled.h2`\n font-size: ${({theme}) => theme.text.fontSize.h4};\n line-height: ${({theme}) => theme.text.lineHeight};\n height: ${({theme}) =>\n HEADER_HEIGHT *\n theme.text.lineHeight *\n parseFloat(theme.text.fontSize.h4)}rem;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: ${HEADER_HEIGHT};\n -webkit-box-orient: vertical;\n -webkit-box-pack: center;\n\n @media (max-width: ${({theme}) => theme.breakpoints.max.sm}) {\n font-size: ${({theme}) => theme.text.fontSize.mobile.h4};\n height: ${({theme}) =>\n HEADER_HEIGHT *\n theme.text.lineHeight *\n parseFloat(theme.text.fontSize.mobile.h4)}rem;\n }\n`\n\n/**\n * Render page collection child from Kentico data.\n * @return React component\n */\nexport const KenticoPageCollectionChild = ({data}: Props) => {\n let alt\n let image\n if (validImage(data.elements.image)) {\n alt = toString(data.elements.image.value[0].description)\n image = data.elements.image.value[0].file.childImageSharp.gatsbyImageData\n }\n let gatsbyImageData = image as IGatsbyImageData;\n let pluginImage = getImage(gatsbyImageData);\n return (\n \n \n \n \n
{data.elements.blogTitle.value}
\n
\n {data.elements.description.value}\n \n Read More >\n \n
\n
\n )\n}\n"],"names":["KenticoPageCollectionData","IO","KenticoPageLinkData","elements","canonicalPage","LinkedItems","description","value","postBody","KenticoBodyItemData","preBody","robots","codename","scripts","KenticoPageScriptData","title","url","system","id","Pagination","props","_classNames","className","listClassName","cssModule","size","Tag","tag","ListTag","listTag","label","attributes","classes","listClasses","defaultProps","PaginationItem","active","disabled","PaginationLink","defaultAriaLabel","next","previous","first","last","defaultCaret","ariaLabel","children","Array","isArray","length","href","key","count","index","page","min","Math","max","items","from","map","_","i","idx","Link","to","createUrl","ItemsContainer","styled","Container","theme","spacers","PaginationContainer","PAGINATION_FLEX","justify","KenticoPageCollection","globalScripts","subPage","lg","data","pageScripts","replace","createReplace","linkedItems","component","flex","Props","KenticoGlobalScriptData","KenticoPageCollectionChildData","pageContext","useDecode","contentId","blogTitle","image","KenticoFluidImageData","Card","BootstrapCard","CardText","BootstrapCardText","text","lineHeight","parseFloat","fontSize","base","CardImage","BgImage","Header","h4","breakpoints","sm","mobile","KenticoPageCollectionChild","alt","validImage","file","childImageSharp","gatsbyImageData","pluginImage","getImage","textColor"],"sourceRoot":""}