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BtB,EAAMhB,aAAalB,KAAI,CAACC,EAAOmD,KAC9B,SAAC,KAAW,UACT5B,EAAgBvB,IADDmD,MAGpB,SAACnB,EAAiB,CAChBd,QAAS,IAAMe,EAAMf,QAAQqC,GAC7BhB,YAAaN,EAAMhB,aAAa5B,OAChCgD,kBAAmBkB,OAG3B","sources":["webpack://empori-base/./src/controls/ImageGallery.tsx","webpack://empori-base/./src/backoffice/controllers/common.ts","webpack://empori-base/./src/controls/ImageGalleryFullscreen.tsx"],"sourcesContent":["import { Swiper, Navigation, SwiperOptions, Autoplay } from 'swiper';\r\nimport { ImageGalleryModel } from '../empracoTypes';\r\nimport { ImageGalleryFullscreenWrapper } from './ImageGalleryFullscreen';\r\nimport { render } from '../main';\r\nimport ReactDOM from 'react-dom';\r\n\r\nexport default function ImageGallery(parent: HTMLDivElement | null, model: ImageGalleryModel) {\r\n if (!parent) {\r\n return;\r\n }\r\n\r\n const slides = model.imageGalleryEditorModel.slides;\r\n\r\n const options: SwiperOptions = {\r\n modules: [\r\n Navigation,\r\n Autoplay\r\n ],\r\n autoplay: model.autoplay ? { delay: model.delay } : false,\r\n lazy: true,\r\n loop: slides.length > 1,\r\n autoHeight: model.staticHeight === 0,\r\n navigation: {\r\n nextEl: '.swiper-button-next',\r\n prevEl: '.swiper-button-prev'\r\n },\r\n spaceBetween: 0\r\n };\r\n\r\n const swiper = new Swiper(parent, options);\r\n\r\n if (model.fullscreenEnabled) {\r\n const fsSlides = slides.map(slide => slide.image);\r\n\r\n if (!fsSlides) {\r\n return;\r\n }\r\n\r\n const fsTrigger = parent.querySelector('.empori-image-gallery-fullscreen-trigger');\r\n\r\n if (!fsTrigger) {\r\n return;\r\n }\r\n\r\n const fsEl = document.createElement('div');\r\n fsEl.classList.add('empori-fullscreen-image-gallery');\r\n document.body.appendChild(fsEl);\r\n\r\n const removeInnerContent = (activeIndex: number) => {\r\n swiper.slideToLoop(activeIndex);\r\n fsEl.classList.remove('visible');\r\n ReactDOM.unmountComponentAtNode(fsEl);\r\n };\r\n\r\n fsTrigger.addEventListener('click', e => {\r\n fsEl.classList.add('visible');\r\n render(\r\n