{"version":3,"file":"photoswipe_init-BAEYPudq.js","sources":["../../../app/frontend/entrypoints/photoswipe_init.js"],"sourcesContent":["import PhotoSwipeLightbox from 'photoswipe/lightbox';\nimport PhotoSwipe from 'photoswipe';\nimport 'photoswipe/style.css';\n\n\nfunction initPhotoSwipeLightbox() {\n const galleryElements = document.querySelectorAll('.gallery_wrapper');\n\n galleryElements.forEach((galleryElement) => {\n const lightbox = new PhotoSwipeLightbox({\n gallery: '.gallery_wrapper',\n children: 'a.thumb_link',\n showHideAnimationType: 'zoom',\n pswpModule: PhotoSwipe,\n });\n\n // lightbox.on('itemData', (e) => {\n // console.log(e)\n // // const dataset = e.itemData.element.dataset;\n // //\n // // e.itemData = {\n // // src: dataset.largeSrc,\n // // w: parseInt(dataset.largeSrcWidth),\n // // h: parseInt(dataset.largeSrcHeight),\n // // title: \"title\",\n // // };\n // });\n\n lightbox.init();\n });\n}\n\ndocument.addEventListener('DOMContentLoaded', initPhotoSwipeLightbox);\n"],"names":["initPhotoSwipeLightbox","galleryElement","PhotoSwipeLightbox","PhotoSwipe"],"mappings":"yFAKA,SAASA,GAAyB,CACN,SAAS,iBAAiB,kBAAkB,EAEpD,QAASC,GAAmB,CACvB,IAAIC,EAAmB,CACpC,QAAS,mBACT,SAAU,eACV,sBAAuB,OACvB,WAAYC,CACxB,CAAS,EAcQ,KAAI,CACrB,CAAK,CACL,CAEA,SAAS,iBAAiB,mBAAoBH,CAAsB"}