"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[8938],{68124(e,n,t){t.d(n,{q:()=>g});var i=t(45992),o=t(37577),l=t(23119),r=t(17588),s=t(66264),a=t(60708);var d=t(29973),u=t(50783);const c=e=>{let{isInEditor:n,slides:t,showControls:o,showPagination:l,autoplay:r,options:s,fit:a,onClickSelectedImage:d,onZoomedOut:c,galleryType:m,viewId:g}=e;if(!m)return null;const f=(0,u.BR)(m);return(0,i.jsx)(f,{isInEditor:n,slides:t,showControls:o,showPagination:l,autoplay:r,options:s,fit:a,onClickSelectedImage:d,onZoomedOut:c,viewId:g})},m=o.Ay.div((e=>{let{$isInEditor:n}=e;return{display:"flex",alignItems:"center",height:"100%",cursor:"default",overflow:"hidden",".is-dragging":{cursor:"grabbing","& *":{cursor:"grabbing !important"}},pointerEvents:n?"none":"all"}})),g=e=>{let{isInEditor:n=!1,fit:t,autoplay:u,widgetItem:g,slides:f,showControls:h,showPagination:p=!0,galleryType:y,viewId:v,theme:w,onZoomed:I,t:E}=e;const T=Object.assign({loop:!0,skipSnaps:!0,watchResize:!0},d.Z),b=((e,n)=>{const[t,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(!e||!n)return;const t=[n.parentSlide.on(a.m.Entered,(()=>{n.visible&&i(!0)})),n.on(s.q.Visible,(()=>{i(!0)})),n.on(s.q.Hidden,(()=>{i(!1)}))];return()=>{t.forEach((e=>e())),i(!1)}}),[e,n]),t})(u,g);return(0,i.jsx)(l.i.Provider,{value:{t:E},children:(0,i.jsx)(o.NP,{theme:w,children:(0,i.jsx)(m,{$isInEditor:n,style:{display:"flex",alignItems:"center",height:"100%"},children:(0,i.jsx)(c,{isInEditor:n,slides:f,showControls:h,showPagination:p,options:T,autoplay:b,onClickSelectedImage:e=>{null===I||void 0===I||I(void 0!==e)},onZoomedOut:()=>{null===I||void 0===I||I(!1)},fit:t,galleryType:y,viewId:v})})})})}},38938(e,n,t){t.d(n,{geniallyGalleryViewScript:()=>a});var i=t(45992),o=t(54072),l=t(41381),r=t(68124),s=t(50783);const a=(e,n)=>{const t=e.item,{slideList:a,showControls:d,autoplay:u,fit:c,galleryType:m}=e.config;t&&(t.markAsInteractive=!0,t.thumbnail=(0,s.mJ)(m));const{viewId:g}=n,f=e=>{n.setIsExternalModalOpen(e)},h=a.map((e=>({image:e.image.source,title:e.title,id:(0,o.Ak)(),altText:e.image.altText})));(0,l.p)({getTargetNodeItem:()=>e.item,initialState:void 0,renderApp:()=>()=>(0,i.jsx)(r.q,{autoplay:u,slides:h,showControls:d,fit:c,galleryType:m,onZoomed:f,viewId:g,widgetItem:t,theme:n.theme,t:n.t})})(e,n)}},41381(e,n,t){t.d(n,{p:()=>r});var i=t(70377),o=t(66264),l=t(60708);function r(e){let{getTargetNodeItem:n,renderApp:t,renderThumbnailApp:r,initialState:s}=e,a=!1;const d=[],u=e=>{d.push(e)};return e=>{const c=n(e.config),m=null===c||void 0===c?void 0:c.parentSlide;function g(){a=!1,d.forEach((e=>{e()})),d.length=0}function f(){if(!c)return;let e=null;if("idOfFreeNode"in c)e=document.getElementById(c.idOfFreeNode);else{const n=document.createElement("div");n.innerHTML=c.source;let t=n.getElementsByClassName("genially-widget-app");t.length||(t=n.getElementsByClassName("genially-widget-gallery"));const{id:i}=t[0];if(!i)return;e=document.getElementById(i)}if(e){let n;const o=t=>{a&&n?i.render(n(t),e):console.warn('"rerender" was called when the widget was already unmounted. This is a no-op. Did you forget to dispose of an event handler with "onUnmount"?')};n=t({setState:o,onUnmount:u,unmountNow:g}),a=!0,o(s),d.push((()=>{i.unmountComponentAtNode(e)}))}}function h(){if(!c||!("idOfThumbnailFreeNode"in c))return[];const e=document.getElementsByClassName(c.idOfThumbnailFreeNode);return Array.from(e).filter((e=>e instanceof HTMLElement))}const p=c&&"isTransversal"in c&&c.isTransversal,y=()=>{null===c||void 0===c||c.on(o.q.Mount,(()=>{f()})),null===c||void 0===c||c.on(o.q.Unmount,(()=>{g()}))};p?y():(null===m||void 0===m||m.on(l.m.Entering,(()=>{a||(f(),a||y())})),null===m||void 0===m||m.on(l.m.Exited,(()=>{a&&g()}))),null===m||void 0===m||m.on(l.m.ThumbnailMount,(()=>{!function(){if(!r||!c||!("idOfThumbnailFreeNode"in c))return;h().forEach((e=>{i.unmountComponentAtNode(e)}))}(),function(){if(!r||!c||!("idOfThumbnailFreeNode"in c))return;h().forEach((e=>{const{renderingSlideId:n}=e.dataset;i.render(r({renderingSlideId:n}),e)}))}()}))}}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/8938.02c8289d.chunk.js.map