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E,SAAA,EAAAC,SAAAxH,IAAAyH,MAAA,CAAA5F,SAAA7B,IAAA0H,IAAA","sources":["webpack://_N_E/./adapters/helpers/Hooks.js","webpack://_N_E/./components/GalleryBlock/GalleryBlock.js","webpack://_N_E/"],"sourcesContent":["import React, { useState, useEffect, useLayoutEffect } from 'react';\n\n// https://github.com/streamich/react-use/blob/master/docs/useIsomorphicLayoutEffect.md\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport function useMatchMedia(mediaQueryString, initialValue = null) {\n const [match, setMatch] = useState(initialValue);\n\n useEffect(\n () => {\n if(!window.matchMedia) {\n return;\n }\n\n function handleMatch(event) {\n setMatch(event.matches);\n }\n\n const matchMedia = window.matchMedia(mediaQueryString);\n\n setMatch(matchMedia.matches);\n matchMedia.addListener(handleMatch);\n\n return () => {\n matchMedia.removeListener(handleMatch);\n };\n },\n [mediaQueryString]\n );\n\n return match;\n}\n\nexport const mediaQueryHOC = (Component) => {\n function MediaQueryHOC(props) {\n const isXSmall = useMatchMedia('(max-width: 375px)');\n const isSmall = useMatchMedia('(max-width: 479px)');\n const isMedium = useMatchMedia('(max-width: 767px)');\n const isLarge = useMatchMedia('(max-width: 991px)');\n const isXLarge = useMatchMedia('(max-width: 1023px)');\n return (\n \n );\n }\n return MediaQueryHOC;\n};\n\nlet listeners = [];\nlet state = { currentProductIndex: 0};\n\n\nconst setState = (newState) => {\n state = { ...state, ...newState };\n listeners.forEach((listener) => {\n listener(state);\n });\n};\n\nexport const updateCurrentProductIndex = () => {\n const newListener = useState()[1];\n useEffect(() => {\n listeners.push(newListener);\n }, []);\n return [state, setState];\n};\n","import PropTypes from 'prop-types';\nimport dynamic from 'next/dynamic';\nimport {mediaQueryHOC} from '../../adapters/helpers/Hooks';\nimport React, { useState, useCallback, useRef, Suspense } from 'react';\nimport Block from '../../adapters/helpers/Block';\nimport { CSSTransition } from 'react-transition-group';\nimport { GalleryBlockConstants } from '../../adapters/helpers/Constants';\nimport Loader from '../../adapters/helpers/Loader';\n\nconst Heading = dynamic(() => import('../Heading/Heading'));\nconst VideoPlayer = dynamic(() => import('../VideoPlayer/VideoPlayer'));\nconst Icon = dynamic(() => import('../Icon/Icon'));\nconst Image = dynamic(() => import('../Image/Image'));\nfunction Gallery(props) {\n const { extraAttributes, isMedium } = props;\n\n return (extraAttributes && extraAttributes.entity && extraAttributes.entity.gallery) ?\n renderGalleryBlock(extraAttributes.entity, isMedium, props) :\n '';\n}\n\nfunction getRoundedWidth(width) {\n let widthValue;\n\n if(width == GalleryBlockConstants.full) {\n widthValue = 100;\n }\n\n else if(width == GalleryBlockConstants.large) {\n widthValue = 58.333333;\n }\n\n else if(width == GalleryBlockConstants.small) {\n widthValue = 41.666666;\n }\n\n return widthValue;\n}\n\nfunction defineGallery(galleryItems, showMoreItems) {\n if (galleryItems && galleryItems.length > 1) {\n return (\n
\n {\n galleryItems.slice(1).map((product, productIndex) => (\n
\n {product.fields.mainAsset.fields.contentType === GalleryBlockConstants.cloudinaryImage ? (\n \n ) : (\n \n )}\n
\n ))\n }\n
\n )\n }\n\n else {\n return;\n }\n}\n\nfunction renderGalleryBlock(entity, isMobile, props) {\n const galleryBlock = new Block(props);\n\n let [showMoreItems, setShowMoreItems] = useState(false);\n const collapsibleRef = useRef(null);\n const [collapsibleHeight, setCollapsibleHeight] = useState(0);\n\n const customClassNames = galleryBlock.getFieldValue(GalleryBlockConstants.classNames);\n const className = 'gallery ' + (customClassNames ? customClassNames : '');\n const titleValue = galleryBlock.getFieldValue(GalleryBlockConstants.title);\n const isWhiteText = className.includes(GalleryBlockConstants.whiteText);\n\n const anchorId = galleryBlock.getFieldValue(GalleryBlockConstants.anchorId);\n const seeMoreButtonLabel = galleryBlock.getFieldValue(GalleryBlockConstants.seeMoreButtonLabel)\n const seeLessButtonLabel = galleryBlock.getFieldValue(GalleryBlockConstants.seeLessButtonLabel)\n const [buttonLabel, setButtonLabel] = useState(seeMoreButtonLabel);\n\n let galleryItemsJson = [];\n if (entity.gallery) {\n galleryItemsJson = entity.gallery;\n }\n\n let galleryItems = defineGallery(galleryItemsJson, showMoreItems);\n let mainGalleryItem = null;\n if (galleryItemsJson && galleryItemsJson.length > 0) {\n mainGalleryItem = galleryItemsJson[0].fields.mainAsset;\n \n if (isMobile && galleryItemsJson[0].fields.mobileAsset) {\n mainGalleryItem = galleryItemsJson[0].fields.mobileAsset;\n }\n }\n\n const _handleClickShowItems = useCallback(() => {\n setShowMoreItems(!showMoreItems);\n if (showMoreItems == false) {\n setButtonLabel(seeLessButtonLabel);\n } else {\n setButtonLabel(seeMoreButtonLabel);\n }\n }, [showMoreItems]);\n\n const _calculateHeight = useCallback(\n () => {\n if (collapsibleRef.current) {\n setCollapsibleHeight(collapsibleRef.current.scrollHeight);\n }\n },\n [],\n );\n\n return (\n
\n\n {mainGalleryItem.fields.contentType === 'cloudinaryImage' ? (\n }>\n \n
\n {titleValue}\n
\n\n {/* See more button */}\n \n \n
\n ) : (\n
\n {titleValue}\n \n
\n )\n }\n }>\n \n
\n
\n
\n {galleryItems}\n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default mediaQueryHOC(Gallery);\n// This export is for unit testing (do not remove) :\nexport const GalleryBlockTest = Gallery;\n\nGallery.propTypes = {\n document: PropTypes.object,\n isMedium: PropTypes.bool\n};","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6496],{71357:function(e,n,t){t.d(n,{LI:function(){return o},Ui:function(){return d},ag:function(){return u},y3:function(){return h}});var r=t(930),i=t.n(r),a=t(67294),l=t(85893);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:null,t=(0,a.useState)(n),r=t[0],i=t[1];return(0,a.useEffect)((function(){if(window.matchMedia){var n=window.matchMedia(e);return i(n.matches),n.addListener(t),function(){n.removeListener(t)}}function t(e){i(e.matches)}}),[e]),r}var d=function(e){return function(n){var t=u(\"(max-width: 375px)\"),r=u(\"(max-width: 479px)\"),i=u(\"(max-width: 767px)\"),a=u(\"(max-width: 991px)\"),s=u(\"(max-width: 1023px)\");return(0,l.jsx)(e,c({isXSmall:t,isSmall:r,isMedium:i,isLarge:a,isXLarge:s},n))}},f=[],b={currentProductIndex:0},y=function(e){b=c(c({},b),e),f.forEach((function(e){e(b)}))},h=function(){var e=(0,a.useState)()[1];return(0,a.useEffect)((function(){f.push(e)}),[]),[b,y]}},6496:function(e,n,t){t.r(n),t.d(n,{GalleryBlockTest:function(){return j}});var r=t(45697),i=t.n(r),a=t(5152),l=t.n(a),s=t(71357),c=t(67294),o=t(40483),u=t(68665),d=t(24036),f=t(47322),b=t(85893),y=l()((function(){return Promise.all([t.e(9238),t.e(5061)]).then(t.bind(t,92116))}),{loadableGenerated:{webpack:function(){return[92116]}}}),h=l()((function(){return Promise.all([t.e(9636),t.e(7749),t.e(7115),t.e(5108),t.e(2844),t.e(6909),t.e(5176)]).then(t.bind(t,36909))}),{loadableGenerated:{webpack:function(){return[36909]}}}),m=l()((function(){return t.e(713).then(t.bind(t,80713))}),{loadableGenerated:{webpack:function(){return[80713]}}}),p=l()((function(){return t.e(8084).then(t.bind(t,48084))}),{loadableGenerated:{webpack:function(){return[48084]}}});function g(e){var n=e.extraAttributes,t=e.isMedium;return n&&n.entity&&n.entity.gallery?function(e,n,t){var r=new o.Z(t),i=(0,c.useState)(!1),a=i[0],l=i[1],s=(0,c.useRef)(null),g=(0,c.useState)(0),j=g[0],v=g[1],w=r.getFieldValue(d.yU.classNames),_=\"gallery \"+(w||\"\"),k=r.getFieldValue(d.yU.title),O=_.includes(d.yU.whiteText),U=r.getFieldValue(d.yU.anchorId),N=r.getFieldValue(d.yU.seeMoreButtonLabel),L=r.getFieldValue(d.yU.seeLessButtonLabel),P=(0,c.useState)(N),S=P[0],E=P[1],A=[];e.gallery&&(A=e.gallery);var I=function(e,n){return e&&e.length>1?(0,b.jsx)(\"div\",{className:\"ob-gallery__masonry \"+(n?\"\":\"gallery-hidden\"),children:e.slice(1).map((function(e,t){return(0,b.jsx)(\"div\",{className:\"grid-item\",style:{width:x(e.fields.width)+\"%\"},children:e.fields.mainAsset.fields.contentType===d.yU.cloudinaryImage?(0,b.jsx)(p,{noLazyLoad:!0,image:e.fields.mainAsset,ariaHidden:!n}):(0,b.jsx)(h,{video:e.fields.mainAsset.fields})},\"product-\"+t)}))}):void 0}(A,a),T=null;A&&A.length>0&&(T=A[0].fields.mainAsset,n&&A[0].fields.mobileAsset&&(T=A[0].fields.mobileAsset));var G=(0,c.useCallback)((function(){l(!a),E(0==a?L:N)}),[a]),M=(0,c.useCallback)((function(){s.current&&v(s.current.scrollHeight)}),[]);return(0,b.jsxs)(\"div\",{className:\"ob-gallery \".concat(_),id:U,children:[\"cloudinaryImage\"===T.fields.contentType?(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)(f.default,{}),children:(0,b.jsxs)(p,{image:T,children:[(0,b.jsx)(\"div\",{className:\"ob-gallery__wrapper\",children:(0,b.jsx)(y,{whiteText:O,tag:\"h1\",children:k})}),(0,b.jsxs)(\"button\",{onClick:G,className:\"ob-link ob-gallery__button primaryGrey see-more-button event_button_click\",\"aria-expanded\":a,\"data-action-detail\":S,children:[a?(0,b.jsx)(m,{name:d.yU.minus6,roundedIcon:d.yU.blue,viewBox:6}):(0,b.jsx)(m,{name:d.yU.plus,roundedIcon:d.yU.blue,viewBox:10}),S]})]})}):(0,b.jsxs)(\"div\",{className:\"ob-gallery__wrapper--video\",children:[(0,b.jsx)(y,{whiteText:O,tag:\"h1\",children:k}),(0,b.jsx)(h,{video:T.fields})]}),(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)(f.default,{}),children:(0,b.jsx)(u.Z,{in:a,timeout:800,onEntering:M,onExit:M,children:(0,b.jsx)(\"div\",{className:\"ob-gallery__container\",\"aria-hidden\":!a,children:(0,b.jsx)(\"div\",{className:\"ob-gallery__container-collapsible-wrapper\",style:{height:j},children:(0,b.jsx)(\"div\",{ref:s,className:\"ob-gallery__container-collapsible\",children:I})})})})})]})}(n.entity,t,e):\"\"}function x(e){var n;return e==d.yU.full?n=100:e==d.yU.large?n=58.333333:e==d.yU.small&&(n=41.666666),n}n.default=(0,s.Ui)(g);var j=g;g.propTypes={document:i().object,isMedium:i().bool}}}]);"],"names":["self","webpackChunk_N_E","push","e","n","t","d","LI","o","Ui","ag","u","y3","h","r","i","a","l","s","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","apply","c","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","defineProperty","useLayoutEffect","useState","useEffect","window","matchMedia","matches","addListener","removeListener","jsx","isXSmall","isSmall","isMedium","isLarge","isXLarge","f","b","currentProductIndex","y","GalleryBlockTest","j","Promise","all","then","bind","loadableGenerated","webpack","m","p","g","v","_","k","O","U","N","L","P","S","E","A","I","T","G","M","extraAttributes","entity","gallery","Z","useRef","w","getFieldValue","yU","classNames","title","includes","whiteText","anchorId","seeMoreButtonLabel","seeLessButtonLabel","className","children","slice","map","style","width","x","fields","full","large","small","mainAsset","contentType","cloudinaryImage","noLazyLoad","image","ariaHidden","video","mobileAsset","useCallback","current","scrollHeight","jsxs","concat","id","Suspense","fallback","default","tag","onClick","name","minus6","roundedIcon","blue","viewBox","plus","in","timeout","onEntering","onExit","height","ref","propTypes","document","object","bool"],"sourceRoot":""}