"use strict";(("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi=("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi||[]).push([[3673],{72596:(t,e,i)=>{i.d(e,{C:()=>a});var r=i(81725),s=i(80134);const a=(t,e,i,a)=>{const{image:o,video:n,title:l,altText:h}=t,u=o?.media||n?.media,c=u?.src?.url||u?.src?.id||"",m=u?.width||0,d=u?.height||0,p={mediaUrl:c,url:c,metaData:{type:o?"image":"video",height:d,width:m,title:l,alt:h},itemId:(0,r.A)()+"_"+e.toString(),hash:c+"_"+e.toString()};if(n){p.metaData.link={target:"_blank",rel:"noopener",url:(0,s.normalizeHref)(c)??""};const{src:t,width:e,height:i}=n.thumbnail||{};t?.url&&(p.metaData.poster={url:t.url,width:e||m,height:i||d})}if(o?.link){const{url:t="",target:e,rel:r}=o.link,n=e&&`_${e.toLowerCase()}`||a||"_self",l=(0,s.normalizeHref)(t)??"";let h=i||"noopener";r&&(h="noopener",r.nofollow&&(h+=" nofollow"),r.sponsored&&(h+=" sponsored"),r.ugc&&(h+=" ugc"),(r.noreferrer||void 0===r.noreferrer)&&(h+=" noreferrer")),p.metaData.link={type:"wix",target:n,data:{type:"ExternalLink",target:n,rel:h,url:l}},p.directLink={url:l,target:n,rel:h}}return p}},87928:(t,e,i)=>{i.d(e,{U:()=>h});var r=i(18727),s=i.n(r),a=i(47159);const o=t=>t.startsWith("http://")||t.startsWith("https://"),n="https://static.wixstatic.com/",l=(t,e)=>{if(o(t))return t;let i,r;"image"===e?(i=n,r="media/"):(i="https://video.wixstatic.com/",r="video/");return i+(t.startsWith(r)?t:r+t)},h=({item:t,originalUrl:e,resizeMethod:i,requiredWidth:r,requiredHeight:n,sharpParams:h,focalPoint:c})=>{if(h=h||{},-1!==(e=e||"").indexOf("base64"))return e;if(r=Math.ceil(r),n=Math.ceil(n),i===a.Cq.VIDEO)return l(e,a.Cq.VIDEO);if(r>=t.maxWidth&&n>=t.maxHeight){const i=t.dto.metaData.type===a.Cq.VIDEO?e:t.url;return l(i,a.Cq.IMAGE)}return((t,e,i,r,a,n,l)=>{e=e||"",(n=n||{}).quality>0&&(n.quality=Math.min(90,n.quality));const h={x:50,y:50};l&&l[0]>=0&&l[1]>=0&&(h.x=Math.round(100*l[0]),h.y=Math.round(100*l[1])),!0===n.allowUsm&&n.usm?(n.usm.usm_a=Math.min(5,Math.max(0,n.usm.usm_a||0)),n.usm.usm_r=Math.min(128,Math.max(0,n.usm.usm_r||0)),n.usm.usm_t=Math.min(1,Math.max(0,n.usm.usm_t||0))):n.usm={usm_a:0,usm_r:0,usm_t:0};const c="fit"===i?s().getScaleToFitImageURL:s().getScaleToFillImageURL,m={};return n.quality>0&&(m.quality=n.quality),n.blur>0&&(m.filters={blur:n.blur}),h&&(m.focalPoint=h),n&&n.usm&&(m.unsharpMask={radius:parseFloat(n.usm.usm_r),amount:parseFloat(n.usm.usm_a),threshold:parseFloat(n.usm.usm_t)}),o(e)?e:c(u(e),t.maxWidth,t.maxHeight,r,a,m)})(t,e,i,r,n,h,c)},u=t=>t.replace(n,"")},81725:(t,e,i)=>{i.d(e,{A:()=>r});var r=()=>{let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?i:3&i|8).toString(16)}))}},81404:(t,e,i)=>{i.d(e,{Ou:()=>p});var r=i(71772),s=i(80103);const a=[["galleryLayout",s.A.layoutParams.structure.galleryLayout],["imageMargin",s.A.layoutParams.structure.itemSpacing],["groupsPerStrip",s.A.layoutParams.groups.numberOfGroupsPerRow],["cubeImages",s.A.layoutParams.crop.enable],["smartCrop",s.A.layoutParams.crop.enableSmartCrop],["cropOnlyFill",s.A.layoutParams.crop.cropOnlyFill],["minItemSize",s.A.layoutParams.targetItemSize.minimum],["scatter",s.A.layoutParams.structure.scatter.randomScatter],["rotatingScatter",s.A.layoutParams.structure.scatter.manualScatter],["numberOfImagesPerCol",s.A.layoutParams.structure.numberOfGridRows],["collageDensity",s.A.layoutParams.groups.density],["chooseBestGroup",s.A.layoutParams.groups.groupByOrientation],["groupSize",s.A.layoutParams.groups.groupSize],["hasThumbnails",s.A.layoutParams.thumbnails.enable],["thumbnailSpacings",s.A.layoutParams.thumbnails.spacing],["thumbnailSize",s.A.layoutParams.thumbnails.size],["showArrows",s.A.layoutParams.navigationArrows.enable],["arrowsPadding",s.A.layoutParams.navigationArrows.padding],["arrowsVerticalPosition",s.A.layoutParams.navigationArrows.verticalAlignment],["arrowsSize",s.A.layoutParams.navigationArrows.size],["imageInfoType",s.A.layoutParams.info.layout],["textImageSpace",s.A.layoutParams.info.spacing],["textBoxBorderWidth",s.A.layoutParams.info.border.width],["textBoxBorderColor",s.A.layoutParams.info.border.color],["textBoxBorderRadius",s.A.layoutParams.info.border.radius]],o=[["useMaxDimensions",s.A.layoutParams.structure.enableStreching]],n=[["magnificationLevel",s.A.behaviourParams.item.content.magnificationValue],["tiltAngleValue",s.A.behaviourParams.item.content.tiltAngleValue],["videoLoop",s.A.behaviourParams.item.video.loop],["showVideoPlayButton",s.A.behaviourParams.item.video.enablePlayButton],["showVideoControls",s.A.behaviourParams.item.video.enableControls],["enableVideoPlaceholder",s.A.behaviourParams.item.video.enablePlaceholder],["overlayAnimation",s.A.behaviourParams.item.overlay.hoverAnimation],["overlayPosition",s.A.behaviourParams.item.overlay.position],["overlaySize",s.A.behaviourParams.item.overlay.size],["overlaySizeType",s.A.behaviourParams.item.overlay.sizeUnits],["overlayPadding",s.A.behaviourParams.item.overlay.padding],["overlayBackground",s.A.behaviourParams.item.overlay.backgroundColor],["imageHoverAnimation",s.A.behaviourParams.item.content.hoverAnimation],["imagePlacementAnimation",s.A.behaviourParams.item.content.placementAnimation],["imageLoadingMode",s.A.behaviourParams.item.content.loader],["scrollSnap",s.A.behaviourParams.gallery.horizontal.enableScrollSnap],["scrollAnimation",s.A.behaviourParams.gallery.scrollAnimation],["shouldIndexDirectShareLinkInSEO",s.A.behaviourParams.gallery.enableIndexingShareLinks],["loadMoreButtonText",s.A.behaviourParams.gallery.vertical.loadMore.text],["slideAnimation",s.A.behaviourParams.gallery.horizontal.slideAnimation],["slideTransition",s.A.behaviourParams.gallery.horizontal.slideTransition],["scrollDuration",s.A.behaviourParams.gallery.horizontal.navigationDuration],["slideshowLoop",s.A.behaviourParams.gallery.horizontal.loop],["autoSlideshowInterval",s.A.behaviourParams.gallery.horizontal.autoSlide.interval],["pauseAutoSlideshowOnHover",s.A.behaviourParams.gallery.horizontal.autoSlide.pauseOnHover],["autoSlideshowContinuousSpeed",s.A.behaviourParams.gallery.horizontal.autoSlide.speed],["allowSlideshowCounter",s.A.behaviourParams.gallery.horizontal.slideshowInfo.enableCounter],["playButtonForAutoSlideShow",s.A.behaviourParams.gallery.horizontal.slideshowInfo.enablePlayButton]],l=[["enableInfiniteScroll",s.A.behaviourParams.gallery.vertical.loadMore.enable],["allowContextMenu",s.A.behaviourParams.gallery.blockContextMenu],["enableScroll",s.A.behaviourParams.gallery.horizontal.blockScroll]],h=[["itemShadowBlur",s.A.stylingParams.itemShadowBlur],["itemShadowDirection",s.A.stylingParams.itemShadowDirection],["itemShadowOpacityAndColor",s.A.stylingParams.itemShadowOpacityAndColor],["arrowsColor",s.A.stylingParams.arrowsColor],["itemShadowSize",s.A.stylingParams.itemShadowSize],["itemEnableShadow",s.A.stylingParams.itemEnableShadow],["itemBorderRadius",s.A.stylingParams.itemBorderRadius],["itemBorderColor",s.A.stylingParams.itemBorderColor],["itemBorderWidth",s.A.stylingParams.itemBorderWidth]];function u(t,e){let i=Object.assign({},t);for(const[t,r]of e)i=m(i,t,r);return i}function c(t,e){let i=Object.assign({},t);for(const[t,r]of e)i=d(i,t,r);return i}function m(t,e,i){return void 0===t[i]&&void 0!==t[e]&&(t[i]=t[e]),delete t[e],t}function d(t,e,i){return void 0===t[i]&&void 0!==t[e]&&(t[i]=!t[e]),delete t[e],t}function p(t){let e=Object.assign({},t);return e=u(e,a),e=c(e,o),e=function(t){var e;let i=t;return i=m(i,"galleryThumbnailsAlignment",s.A.layoutParams.thumbnails.alignment),i[s.A.layoutParams.thumbnails.alignment]=null===(e=i[s.A.layoutParams.thumbnails.alignment])||void 0===e?void 0:e.toUpperCase(),i}(e),e=function(t){let e=t;switch(e=m(e,"scrollDirection",s.A.layoutParams.structure.scrollDirection),e[s.A.layoutParams.structure.scrollDirection]){case 0:e[s.A.layoutParams.structure.scrollDirection]="VERTICAL";break;case 1:e[s.A.layoutParams.structure.scrollDirection]="HORIZONTAL"}return e}(e),e=function(t){let e=t;switch(e=m(e,"isVertical",s.A.layoutParams.structure.layoutOrientation),e[s.A.layoutParams.structure.layoutOrientation]){case!0:e[s.A.layoutParams.structure.layoutOrientation]="VERTICAL";break;case!1:e[s.A.layoutParams.structure.layoutOrientation]="HORIZONTAL"}return e}(e),e=function(t){let e=t;switch(e=m(e,"placeGroupsLtr",s.A.layoutParams.structure.groupsOrder),e[s.A.layoutParams.structure.groupsOrder]){case!0:e[s.A.layoutParams.structure.groupsOrder]="LEFT_TO_RIGHT";break;case!1:e[s.A.layoutParams.structure.groupsOrder]="BY_HEIGHT"}return e}(e),e=function(t){if(void 0!==t[s.A.layoutParams.groups.repeatingGroupTypes])return t;let e,i=t,r=i.rotatingGroupTypes||i.layoutParams_repeatingGroupTypes;e="string"==typeof r&&""!==r?r.split(","):"string"==typeof r&&""===r?[]:void 0;return i[s.A.layoutParams.groups.repeatingGroupTypes]=e,delete i.layoutParams_repeatingGroupTypes,delete i.rotatingGroupTypes,i}(e),e=function(t){var e;if(void 0!==t[s.A.layoutParams.groups.allowedGroupTypes])return t;let i=t;return i[s.A.layoutParams.groups.allowedGroupTypes]=(null===(e=i.groupTypes)||void 0===e?void 0:e.split)?i.groupTypes.split(","):i.groupTypes?i.groupTypes:void 0,delete i.groupTypes,i}(e),e=function(t){if(void 0!==t[s.A.layoutParams.structure.numberOfColumns])return t;let e=t;const i=t.numberOfImagesPerRow,r=i>=0?i:void 0;return e[s.A.layoutParams.structure.numberOfColumns]=r,delete e.numberOfImagesPerRow,e}(e),e=function(t){let e=t;switch(e=m(e,"gallerySizeType",s.A.layoutParams.targetItemSize.unit),e[s.A.layoutParams.targetItemSize.unit]){case"px":e[s.A.layoutParams.targetItemSize.unit]="PIXEL";break;case"ratio":e[s.A.layoutParams.targetItemSize.unit]="PERCENT";break;case"smart":e[s.A.layoutParams.targetItemSize.unit]="SMART"}return e}(e),e=function(t){let e,i=t;switch(i[s.A.layoutParams.targetItemSize.unit]){case"PIXEL":e="gallerySizePx";break;case"SMART":e="gallerySize";break;case"PERCENT":e="gallerySizeRatio"}return i=m(i,e,s.A.layoutParams.targetItemSize.value),delete i.gallerySizePx,delete i.gallerySizeRatio,delete i.gallerySize,i}(e),e=function(t){let e=t;if("MIDDLE"===(e=m(e,"cubeFitPosition",s.A.layoutParams.crop.alignment),e[s.A.layoutParams.crop.alignment]))e[s.A.layoutParams.crop.alignment]="CENTER";return e}(e),e=function(t){if(void 0!==t[s.A.layoutParams.crop.ratios])return t;let e,i=t,r=i.rotatingCropRatios,a=i.cubeRatio||i.layoutParams_cropRatio;e="string"==typeof r&&""!==r?r:a;const o=t=>Number(t)>=0?Number(t):t;return i[s.A.layoutParams.crop.ratios]=e&&String(e).split(",").map(o),delete i.cubeRatio,delete i.layoutParams_cropRatio,delete i.rotatingCropRatios,i}(e),e=function(t){let e=t;switch(e=m(e,"calculateTextBoxWidthMode",s.A.layoutParams.info.sizeUnits),e[s.A.layoutParams.info.sizeUnits]){case"PERCENT":e[s.A.layoutParams.info.sizeUnits]="PERCENT",e=m(e,"textBoxWidthPercent",s.A.layoutParams.info.width),delete e.textBoxWidth;break;case"MANUAL":e[s.A.layoutParams.info.sizeUnits]="PIXEL",e=m(e,"textBoxWidth",s.A.layoutParams.info.width),delete e.textBoxWidthPercent}return e}(e),e=function(t){var e,i,r;let a=t;a=m(a,"columnWidths",s.A.layoutParams.structure.columnRatios),0===(null===(e=a[s.A.layoutParams.structure.columnRatios])||void 0===e?void 0:e.length)?a[s.A.layoutParams.structure.columnRatios]=[]:a[s.A.layoutParams.structure.columnRatios]=a[s.A.layoutParams.structure.columnRatios]?(null===(i=a[s.A.layoutParams.structure.columnRatios])||void 0===i?void 0:i.split)?[...((null===(r=a[s.A.layoutParams.structure.columnRatios])||void 0===r?void 0:r.split(","))||[]).map(Number)]:a[s.A.layoutParams.structure.columnRatios]:void 0;return a}(e),e=function(t){var e;let i=t;return i=m(i,"cubeType",s.A.layoutParams.crop.method),i[s.A.layoutParams.crop.method]=null===(e=i[s.A.layoutParams.crop.method])||void 0===e?void 0:e.toUpperCase(),i}(e),e=function(t){let e=t;switch(e=m(e,"gridStyle",s.A.layoutParams.structure.responsiveMode),e[s.A.layoutParams.structure.responsiveMode]){case 0:e[s.A.layoutParams.structure.responsiveMode]="FIT_TO_SCREEN";break;case 1:e[s.A.layoutParams.structure.responsiveMode]="SET_ITEMS_PER_ROW"}return e}(e),e=function(t){if(void 0!==t[s.A.layoutParams.structure.gallerySpacing])return t;let e,i=t;i.layoutParams_gallerySpacing>=0?e=i.layoutParams_gallerySpacing:i.galleryMargin>=0&&(e=i.galleryMargin);return i[s.A.layoutParams.structure.gallerySpacing]=e,delete i.layoutParams_gallerySpacing,delete i.galleryMargin,i}(e),e=function(t){let e=t;e=(0,r.n)("SLIDESHOW")({galleryLayout:t.galleryLayout>=-3?t.galleryLayout:t[s.A.layoutParams.structure.galleryLayout]})?m(e,"slideshowInfoSize",s.A.layoutParams.info.height):m(e,"textBoxHeight",s.A.layoutParams.info.height);return delete e.slideshowInfoSize,delete e.textBoxHeight,e}(e),e=function(t){let e=t;switch(e=m(e,"arrowsPosition",s.A.layoutParams.navigationArrows.position),e[s.A.layoutParams.navigationArrows.position]){case 0:e[s.A.layoutParams.navigationArrows.position]="ON_GALLERY";break;case 1:e[s.A.layoutParams.navigationArrows.position]="OUTSIDE_GALLERY";break;case 2:e[s.A.layoutParams.navigationArrows.position]="MOUSE_CURSOR"}return e}(e),e=u(e,n),e=c(e,l),e=function(t){var e;let i=t;switch(i=m(i,"itemClick",s.A.behaviourParams.item.clickAction),i[s.A.behaviourParams.item.clickAction]=null===(e=i[s.A.behaviourParams.item.clickAction])||void 0===e?void 0:e.toUpperCase(),i[s.A.behaviourParams.item.clickAction]){case"FULLSCREEN":case"EXPAND":i[s.A.behaviourParams.item.clickAction]="ACTION"}return i}(e),e=function(t){var e;let i=t;return i=m(i,"videoPlay",s.A.behaviourParams.item.video.playTrigger),i[s.A.behaviourParams.item.video.playTrigger]=null===(e=i[s.A.behaviourParams.item.video.playTrigger])||void 0===e?void 0:e.toUpperCase(),i}(e),e=function(t){let e=t;e=m(e,"videoSound",s.A.behaviourParams.item.video.volume),void 0!==e[s.A.behaviourParams.item.video.volume]&&(e[s.A.behaviourParams.item.video.volume]=Number(e[s.A.behaviourParams.item.video.volume]));return e}(e),e=function(t){let e=t;return e=m(e,"videoSpeed",s.A.behaviourParams.item.video.speed),e[s.A.behaviourParams.item.video.speed]=Number(e[s.A.behaviourParams.item.video.speed])>=0?Number(e[s.A.behaviourParams.item.video.speed]):void 0,e}(e),e=function(t){let e=t;switch(e=m(e,"hoveringBehaviour",s.A.behaviourParams.item.overlay.hoveringBehaviour),e[s.A.behaviourParams.item.overlay.hoveringBehaviour]){case"NO_CHANGE":e[s.A.behaviourParams.item.overlay.hoveringBehaviour]="ALWAYS_SHOW";break;case"NEVER_SHOW":e[s.A.behaviourParams.item.overlay.hoveringBehaviour]="NEVER_SHOW"}return e}(e),e=function(t){let e=t;switch(e=m(e,"titlePlacement",s.A.layoutParams.info.placement),e[s.A.layoutParams.info.placement]){case"SHOW_ON_HOVER":e[s.A.layoutParams.info.placement]="OVERLAY";break;case"SHOW_BELOW":e[s.A.layoutParams.info.placement]="BELOW";break;case"SHOW_ABOVE":e[s.A.layoutParams.info.placement]="ABOVE";break;case"SHOW_ON_THE_RIGHT":e[s.A.layoutParams.info.placement]="RIGHT";break;case"SHOW_ON_THE_LEFT":e[s.A.layoutParams.info.placement]="LEFT";break;case"ALTERNATE_HORIZONTAL":e[s.A.layoutParams.info.placement]="ALTERNATE_HORIZONTALLY";break;case"ALTERNATE_VERTICAL":e[s.A.layoutParams.info.placement]="ALTERNATE_VERTICALLY"}return e}(e),e=function(t){let e=t;switch(e=m(e,"isRTL",s.A.behaviourParams.gallery.layoutDirection),e[s.A.behaviourParams.gallery.layoutDirection]){case!0:e[s.A.behaviourParams.gallery.layoutDirection]="RIGHT_TO_LEFT";break;case!1:e[s.A.behaviourParams.gallery.layoutDirection]="LEFT_TO_RIGHT"}return e}(e),e=function(t){var e;let i=t;return i=m(i,"loadMoreAmount",s.A.behaviourParams.gallery.vertical.loadMore.amount),i[s.A.behaviourParams.gallery.vertical.loadMore.amount]=null===(e=i[s.A.behaviourParams.gallery.vertical.loadMore.amount])||void 0===e?void 0:e.toUpperCase(),i}(e),e=function(t){if(void 0!==t[s.A.behaviourParams.gallery.horizontal.autoSlide.behaviour])return t;let e,i=t,r=i.isAutoSlideshow,a=i.autoSlideshowType;e=void 0===r?void 0:r?"interval"===a?"INTERVAL":"CONTINUOUS":"OFF";return i[s.A.behaviourParams.gallery.horizontal.autoSlide.behaviour]=e,delete i.isAutoSlideshow,delete i.autoSlideshowType,i}(e),e=function(t){var e;let i=t;return i=m(i,"galleryTextAlign",s.A.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment),i[s.A.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment]=null===(e=i[s.A.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment])||void 0===e?void 0:e.toUpperCase(),i}(e),e=u(e,h),delete e.fullscreen,e}},17086:(t,e,i)=>{i.d(e,{A:()=>Ar});var r={};i.r(r),i.d(r,{debounce:()=>m,get:()=>d,isEqual:()=>g,isFunction:()=>p,isNumber:()=>y,pick:()=>u,throttle:()=>c});var s={};i.r(s),i.d(s,{debounce:()=>dt,get:()=>pt,isEqual:()=>yt,isFunction:()=>gt,isNumber:()=>vt,pick:()=>ct,throttle:()=>mt});var a=i(34629),o=i(60751),n=i.n(o),l=i(41486),h=i(23524);const u=(t,e)=>{const i={};return Object.entries(t||{}).forEach((([t,r])=>{e.indexOf(t)>=0&&(i[t]=r)})),i},c=(t,e)=>{let i=!1,r=!1;return(...s)=>{i?r=!0:(r=!1,t.apply(void 0,s),i=!0,setTimeout((()=>{r&&t.apply(void 0,s),i=!1}),e))}},m=(t,e)=>{let i;return(...r)=>{clearTimeout(i),i=setTimeout((()=>{t.apply(void 0,r)}),e)}},d=(t,e,i)=>{const r=String.prototype.split.call(e,/[,[\].]+?/).filter(Boolean).reduce(((t,e)=>null!=t?t[e]:t),t);return void 0===r||r===t?i:r},p=t=>"function"==typeof t,g=(t,e)=>{try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},y=t=>!isNaN(parseFloat(t))&&isFinite(t),v=()=>({}),P=2560,b=1440,A={y:0,x:0,width:P,height:b,innerWidth:P,innerHeight:b,outerWidth:P,outerHeight:b,clientWidth:P,clientHeight:b},I=Object.assign(Object.assign({},A),{getBoundingClientRect:()=>A}),f=Object.assign({addEventListener:v,removeEventListener:v,createEvent:v,getElementById:()=>I,getElementsByClassName:()=>[I],getElementsByTagName:()=>[I],querySelector:()=>[I],documentElement:I,activeElement:I,style:A},A);f.body=f;const _=Object.assign(Object.assign({},A),{scrollTop:0,scrollY:0}),S=Object.assign({isMock:!0,isSSR:!0,orientation:0,devicePixelRatio:1,addEventListener:v,removeEventListener:v,createEvent:v,CustomEvent:v,screen:A,open:v,petri:{},search:{},location:{href:"http://mock.wix.com/",protocol:"http:",host:"mock.wix.com",hostname:"mock.wix.com",port:"",pathname:"/",search:"",hash:""},postMessage:v,requestAnimationFrame:v,dispatchEvent:v,document:f,getComputedStyle:v,localStorage:{},frames:[]},_),E=new Map(Object.keys(_).map((t=>[t,_[t]])));S.parent=S;const T=S;const O=(new class{constructor(){this.shouldUseMock=!0,this.initProxyWindow=this.initProxyWindow.bind(this),this.windowIsAvailable()?this.initProxyWindow():this.initMockWindow()}windowIsAvailable(){try{return"undefined"!=typeof window}catch(t){return!1}}initProxyWindow(){const t={get:function(t,e){return E.has(e)&&this.shouldUseMock?E.get(e):t[e]}.bind(this),set:function(t,e,i){return Reflect.set(t,e,i)}},e=new Proxy(window,t),i={get:function(t,i){return e.proGalleryCustomProps.has(i)||"function"!=typeof e[i]?e[i]:e[i].bind(window)},set:function(t,i,r){return e.proGalleryCustomProps.add(i),Reflect.set(e,i,r)}};e.proGalleryCustomProps||(e.proGalleryCustomProps=new Set),this.window=new Proxy({},i)}initMockWindow(){this.window=T,this.window.mockInstanceId=Math.floor(1e5*Math.random())}stopUsingMock(){this.shouldUseMock=!1}get shouldUseMock(){return this._shouldUseMock}set shouldUseMock(t){this._shouldUseMock=t}}).window,w={SITE:"SITE",EDIT:"EDIT",PREVIEW:"PREVIEW",SEO:"SEO"},L={DESKTOP:"desktop",MOBILE:"mobile",TABLET:"tablet"};const R=new class{constructor(){this.setViewMode=this.setViewMode.bind(this),this.isSiteMode=this.isSiteMode.bind(this),this.isEditMode=this.isEditMode.bind(this),this.isPreviewMode=this.isPreviewMode.bind(this),this.isSEOMode=this.isSEOMode.bind(this),this.setDeviceType=this.setDeviceType.bind(this),this.isDeviceTypeDesktop=this.isDeviceTypeDesktop.bind(this),this.isDeviceTypeMobile=this.isDeviceTypeMobile.bind(this),this.isDeviceTypeTablet=this.isDeviceTypeTablet.bind(this),this.isDeviceTypeTouch=this.isDeviceTypeTouch.bind(this),this._viewMode=w.SITE,this._deviceType=L.DESKTOP}setViewMode(t){this._viewMode=t}setDeviceType(t){this._deviceType=t}isDeviceTypeMobile(){return this._deviceType===L.MOBILE}isDeviceTypeTablet(){return this._deviceType===L.TABLET}isDeviceTypeDesktop(){return this._deviceType===L.DESKTOP}isDeviceTypeTouch(){return this.isDeviceTypeMobile()||this.isDeviceTypeTablet()}isSiteMode(){return this._viewMode===w.SITE}isEditMode(){return this._viewMode===w.EDIT}isPreviewMode(){return this._viewMode===w.PREVIEW}isSEOMode(){return this._viewMode===w.SEO}},C=(R.isSiteMode,R.isEditMode),x=R.isPreviewMode,M=(R.isSEOMode,R.isDeviceTypeMobile),D=(R.isDeviceTypeTablet,R.isDeviceTypeDesktop,R.isDeviceTypeTouch),N={groups:{density:"layoutParams_groups_density",groupByOrientation:"layoutParams_groups_groupByOrientation",numberOfGroupsPerRow:"layoutParams_groups_numberOfGroupsPerRow",allowedGroupTypes:"layoutParams_groups_allowedGroupTypes",repeatingGroupTypes:"layoutParams_groups_repeatingGroupTypes",groupSize:"layoutParams_groups_groupSize"},crop:{method:"layoutParams_crop_method",alignment:"layoutParams_crop_alignment",enable:"layoutParams_crop_enable",enableSmartCrop:"layoutParams_crop_enableSmartCrop",cropOnlyFill:"layoutParams_crop_cropOnlyFill",ratios:"layoutParams_crop_ratios"},structure:{galleryLayout:"layoutParams_structure_galleryLayout",galleryRatio:{value:"layoutParams_structure_galleryRatio_value",includeExternalInfo:"layoutParams_structure_galleryRatio_includeExternalInfo"},enableStreching:"layoutParams_structure_enableStreching",gallerySpacing:"layoutParams_structure_gallerySpacing",itemSpacing:"layoutParams_structure_itemSpacing",scrollDirection:"layoutParams_structure_scrollDirection",numberOfColumns:"layoutParams_structure_numberOfColumns",numberOfGridRows:"layoutParams_structure_numberOfGridRows",responsiveMode:"layoutParams_structure_responsiveMode",columnRatios:"layoutParams_structure_columnRatios",scatter:{randomScatter:"layoutParams_structure_scatter_randomScatter",manualScatter:"layoutParams_structure_scatter_manualScatter"},layoutOrientation:"layoutParams_structure_layoutOrientation",groupsOrder:"layoutParams_structure_groupsOrder"},thumbnails:{enable:"layoutParams_thumbnails_enable",position:"layoutParams_thumbnails_position",spacing:"layoutParams_thumbnails_spacing",marginToGallery:"layoutParams_thumbnails_marginToGallery",size:"layoutParams_thumbnails_size",alignment:"layoutParams_thumbnails_alignment"},navigationArrows:{enable:"layoutParams_navigationArrows_enable",size:"layoutParams_navigationArrows_size",padding:"layoutParams_navigationArrows_padding",position:"layoutParams_navigationArrows_position",verticalAlignment:"layoutParams_navigationArrows_verticalAlignment",type:"layoutParams_navigationArrows_type",container:{type:"layoutParams_navigationArrows_container_type",borderRadius:"layoutParams_navigationArrows_container_borderRadius",backgroundColor:"layoutParams_navigationArrows_container_backgroundColor"},mouseCursorContainerMaxWidth:"layoutParams_navigationArrows_mouseCursorContainerMaxWidth"},info:{sizeUnits:"layoutParams_info_sizeUnits",width:"layoutParams_info_width",height:"layoutParams_info_height",spacing:"layoutParams_info_spacing",layout:"layoutParams_info_layout",border:{width:"layoutParams_info_border_width",color:"layoutParams_info_border_color",radius:"layoutParams_info_border_radius"},placement:"layoutParams_info_placement"},targetItemSize:{unit:"layoutParams_targetItemSize_unit",value:"layoutParams_targetItemSize_value",minimum:"layoutParams_targetItemSize_minimum"}},G={item:{clickAction:"behaviourParams_item_clickAction",video:{speed:"behaviourParams_item_video_speed",volume:"behaviourParams_item_video_volume",loop:"behaviourParams_item_video_loop",playTrigger:"behaviourParams_item_video_playTrigger",enablePlayButton:"behaviourParams_item_video_enablePlayButton",enableThumbnailsPlayButton:"behaviourParams_item_video_enableThumbnailsPlayButton",enableControls:"behaviourParams_item_video_enableControls",enablePlaceholder:"behaviourParams_item_video_enablePlaceholder"},threeDimensionalScene:{transform:{rotation:"behaviourParams_item_threeDimensionalScene_transform_rotation",scale:"behaviourParams_item_threeDimensionalScene_transform_scale",position:"behaviourParams_item_threeDimensionalScene_transform_position"},controls:{enableZoom:"behaviourParams_item_threeDimensionalScene_controls_enableZoom",enableRotate:"behaviourParams_item_threeDimensionalScene_controls_enableRotate",enablePan:"behaviourParams_item_threeDimensionalScene_controls_enablePan",enableAutoRotate:"behaviourParams_item_threeDimensionalScene_controls_enableAutoRotate"},enablePlayButton:"behaviourParams_item_threeDimensionalScene_enablePlayButton",enableThumbnailsPlayButton:"behaviourParams_item_threeDimensionalScene_enableThumbnailsPlayButton",playTrigger:"behaviourParams_item_threeDimensionalScene_playTrigger"},overlay:{hoveringBehaviour:"behaviourParams_item_overlay_hoveringBehaviour",hoverAnimation:"behaviourParams_item_overlay_hoverAnimation",position:"behaviourParams_item_overlay_position",size:"behaviourParams_item_overlay_size",sizeUnits:"behaviourParams_item_overlay_sizeUnits",padding:"behaviourParams_item_overlay_padding",backgroundColor:"behaviourParams_item_overlay_backgroundColor"},content:{hoverAnimation:"behaviourParams_item_content_hoverAnimation",placementAnimation:"behaviourParams_item_content_placementAnimation",loader:"behaviourParams_item_content_loader",magnificationValue:"behaviourParams_item_content_magnificationValue",tiltAngleValue:"behaviourParams_item_content_tiltAngleValue"},secondaryMedia:{trigger:"behaviourParams_item_secondaryMedia_trigger",behaviour:"behaviourParams_item_secondaryMedia_behaviour"}},gallery:{layoutDirection:"behaviourParams_gallery_layoutDirection",blockContextMenu:"behaviourParams_gallery_blockContextMenu",scrollAnimation:"behaviourParams_gallery_scrollAnimation",enableIndexingShareLinks:"behaviourParams_gallery_enableIndexingShareLinks",vertical:{loadMore:{enable:"behaviourParams_gallery_vertical_loadMore_enable",amount:"behaviourParams_gallery_vertical_loadMore_amount",text:"behaviourParams_gallery_vertical_loadMore_text"}},horizontal:{enableScrollSnap:"behaviourParams_gallery_horizontal_enableScrollSnap",slideAnimation:"behaviourParams_gallery_horizontal_slideAnimation",slideTransition:"behaviourParams_gallery_horizontal_slideTransition",blockScroll:"behaviourParams_gallery_horizontal_blockScroll",navigationDuration:"behaviourParams_gallery_horizontal_navigationDuration",loop:"behaviourParams_gallery_horizontal_loop",autoSlide:{behaviour:"behaviourParams_gallery_horizontal_autoSlide_behaviour",interval:"behaviourParams_gallery_horizontal_autoSlide_interval",pauseOnHover:"behaviourParams_gallery_horizontal_autoSlide_pauseOnHover",speed:"behaviourParams_gallery_horizontal_autoSlide_speed"},slideshowInfo:{buttonsAlignment:"behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment",enableCounter:"behaviourParams_gallery_horizontal_slideshowInfo_enableCounter",enablePlayButton:"behaviourParams_gallery_horizontal_slideshowInfo_enablePlayButton"}}}},H={JSON_FIXED:-3,DESIGNED_PRESET:-2,EMPTY:-1,COLLAGE:0,MASONRY:1,GRID:2,THUMBNAIL:3,SLIDER:4,SLIDESHOW:5,PANORAMA:6,COLUMN:7,MAGIC:8,FULLSIZE:9,BRICKS:10,MIX:11,ALTERNATE:12},k={OVERLAY:"OVERLAY",ABOVE:"ABOVE",BELOW:"BELOW",LEFT:"LEFT",RIGHT:"RIGHT",ALTERNATE_HORIZONTALLY:"ALTERNATE_HORIZONTALLY",ALTERNATE_VERTICALLY:"ALTERNATE_VERTICALLY"},z=t=>String(t).includes(k.OVERLAY),F=(t,e)=>String(t).includes(k.ABOVE)||e%2==0&&String(t).includes(k.ALTERNATE_VERTICALLY),U=(t,e)=>String(t).includes(k.BELOW)||e%2==1&&String(t).includes(k.ALTERNATE_VERTICALLY),W=(t,e)=>String(t).includes(k.RIGHT)||e%2==0&&String(t).includes(k.ALTERNATE_HORIZONTALLY),B=(t,e)=>String(t).includes(k.LEFT)||e%2==1&&String(t).includes(k.ALTERNATE_HORIZONTALLY),j=t=>F(t,0)||U(t,1),V=t=>W(t,0)||B(t,1),Y=t=>String(t)===k.ABOVE,$=t=>String(t)===k.BELOW,K={HOVER:"HOVER",AUTO:"AUTO",CLICK:"CLICK"},Z={events:{APP_LOADED:"APP_LOADED",ITEM_CREATED:"ITEM_CREATED",ITEM_LOADED:"ITEM_LOADED",GALLERY_CHANGE:"GALLERY_CHANGE",ITEM_ACTION_TRIGGERED:"ITEM_ACTION_TRIGGERED",CURRENT_ITEM_CHANGED:"CURRENT_ITEM_CHANGED",NEED_MORE_ITEMS:"NEED_MORE_ITEMS",VIDEO_ENDED:"VIDEO_ENDED",VIDEO_ERROR:"VIDEO_ERROR",VIDEO_PAUSED:"VIDEO_PAUSED",VIDEO_PLAYED:"VIDEO_PLAYED",HOVER_SET:"HOVER_SET",LOAD_MORE_CLICKED:"LOAD_MORE_CLICKED",ITEM_CLICKED:"ITEM_CLICKED",THUMBNAIL_CLICKED:"THUMBNAIL_CLICKED",ITEM_FOCUSED:"ITEM_FOCUSED",ITEM_LOST_FOCUS:"ITEM_LOST_FOCUS",GALLERY_SCROLLED:"GALLERY_SCROLLED",NAVIGATION_API_READY:"NAVIGATION_API_READY",GALLERY_NAVIGATION_START:"GALLERY_NAVIGATION_START"},deviceType:L,isLayout:t=>e=>e[N.structure.galleryLayout]===H[t],hasExternalAbovePlacement:F,hasExternalBelowPlacement:U,hasHoverPlacement:z,hasExternalRightPlacement:W,hasExternalLeftPlacement:B,hasExternalVerticalPlacement:j,hasExternalHorizontalPlacement:V,isExternalAbovePlacement:Y,isExternalBelowPlacement:$,isHoverPlacement:t=>String(t)===k.OVERLAY,isExternalRightPlacement:t=>String(t)===k.RIGHT,isExternalLeftPlacement:t=>String(t)===k.LEFT,isExternalVerticalPlacement:t=>j(t)&&!V(t)&&!z(t),isExternalHorizontalPlacement:t=>V(t)&&!j(t)&&!z(t),isConstantVerticalPlacement:t=>{const e=t.split(","),i=e.shift();return(t=>Y(t)||$(t))(i)&&e.every((t=>t===i))},resizeMethods:{FILL:"fill",FIT:"fit",FULL:"full",VIDEO:"video"},socialNetworks:{FACEBOOK:"facebook",TWITTER:"twitter",PINTEREST:"pinterest",EMAIL:"email",TUMBLR:"tumblr"},urlSizes:{RESIZED:"resized",MULTI:"multi",SCALED:"scaled",PIXEL:"pixel",THUMBNAIL:"thumbnail",SQUARE:"square",FULL:"full",SAMPLE:"sample",PRELOAD:"preload",DOWNLOAD:"download",DOWNLOAD_SAMPLE:"download_sample",MAGNIFIED:"magnified"},urlTypes:{HIGH_RES:"img",LOW_RES:"thumb",VIDEO:"video",THREE_D:"3d"},viewMode:w,layoutParams_crop_method:{FILL:"FILL",FIT:"FIT",MIN:"MIN",MAX:"MAX"},layoutParams_crop_alignment:{CENTER:"CENTER",TOP:"TOP",LEFT:"LEFT",RIGHT:"RIGHT",BOTTOM:"BOTTOM"},layoutParams_structure_galleryLayout:H,layoutParams_structure_groupsOrder:{BY_HEIGHT:"BY_HEIGHT",LEFT_TO_RIGHT:"LEFT_TO_RIGHT"},layoutParams_structure_layoutOrientation:{VERTICAL:"VERTICAL",HORIZONTAL:"HORIZONTAL"},layoutParams_structure_responsiveMode:{FIT_TO_SCREEN:"FIT_TO_SCREEN",SET_ITEMS_PER_ROW:"SET_ITEMS_PER_ROW"},layoutParams_structure_scrollDirection:{VERTICAL:"VERTICAL",HORIZONTAL:"HORIZONTAL"},layoutParams_groups_allowedGroupTypes:{1:"1","2v":"2v","2h":"2h","3r":"3r","3b":"3b","3t":"3t","3l":"3l","3v":"3v","3h":"3h"},layoutParams_thumbnails_alignment:{BOTTOM:"BOTTOM",LEFT:"LEFT",TOP:"TOP",RIGHT:"RIGHT"},layoutParams_navigationArrows_verticalAlignment:{ITEM_CENTER:"ITEM_CENTER",IMAGE_CENTER:"IMAGE_CENTER",INFO_CENTER:"INFO_CENTER"},layoutParams_navigationArrows_position:{ON_GALLERY:"ON_GALLERY",OUTSIDE_GALLERY:"OUTSIDE_GALLERY",MOUSE_CURSOR:"MOUSE_CURSOR"},layoutParams_navigationArrows_type:{DEFAULT_ARROW:"DEFAULT_ARROW",ARROW_2:"ARROW_2",ARROW_3:"ARROW_3",ARROW_4:"ARROW_4",ARROW_5:"ARROW_5",ARROW_6:"ARROW_6",ARROW_7:"ARROW_7"},layoutParams_navigationArrows_container_type:{NONE:"NONE",SHADOW:"SHADOW",BOX:"BOX"},layoutParams_info_layout:{NO_BACKGROUND:"NO_BACKGROUND",ATTACHED_BACKGROUND:"ATTACHED_BACKGROUND",SEPARATED_BACKGROUND:"SEPARATED_BACKGROUND",DONT_SHOW:"DONT_SHOW"},layoutParams_info_sizeUnits:{PERCENT:"PERCENT",PIXEL:"PIXEL"},layoutParams_info_placement:k,layoutParams_targetItemSize_unit:{SMART:"SMART",PIXEL:"PIXEL",PERCENT:"PERCENT"},behaviourParams_item_clickAction:{ACTION:"ACTION",LINK:"LINK",NOTHING:"NOTHING",MAGNIFY:"MAGNIFY"},behaviourParams_item_video_playTrigger:K,behaviourParams_item_overlay_hoveringBehaviour:{APPEARS:"APPEARS",DISAPPEARS:"DISAPPEARS",ALWAYS_SHOW:"ALWAYS_SHOW",NEVER_SHOW:"NEVER_SHOW"},behaviourParams_item_overlay_hoverAnimation:{NO_EFFECT:"NO_EFFECT",FADE_IN:"FADE_IN",EXPAND:"EXPAND",SLIDE_UP:"SLIDE_UP",SLIDE_RIGHT:"SLIDE_RIGHT",SLIDE_DOWN:"SLIDE_DOWN",SLIDE_LEFT:"SLIDE_LEFT"},behaviourParams_item_overlay_position:{LEFT:"LEFT",RIGHT:"RIGHT",BOTTOM:"BOTTOM",TOP:"TOP",CENTERED_VERTICALLY:"CENTERED_VERTICALLY",CENTERED_HORIZONTALLY:"CENTERED_HORIZONTALLY"},behaviourParams_item_overlay_sizeUnits:{PIXEL:"PIXEL",PERCENT:"PERCENT"},behaviourParams_item_content_hoverAnimation:{NO_EFFECT:"NO_EFFECT",ZOOM_IN:"ZOOM_IN",TILT:"TILT",BLUR:"BLUR",GRAYSCALE:"GRAYSCALE",SHRINK:"SHRINK",INVERT:"INVERT",COLOR_IN:"COLOR_IN",DARKENED:"DARKENED",MAIN_COLOR:"MAIN_COLOR"},behaviourParams_item_content_placementAnimation:{NO_EFFECT:"NO_EFFECT",SLIDE:"SLIDE"},behaviourParams_item_content_loader:{BLUR:"BLUR",COLOR:"COLOR",MAIN_COLOR:"MAIN_COLOR"},behaviourParams_item_secondaryMedia_trigger:{OFF:"OFF",HOVER:"HOVER"},behaviourParams_item_secondaryMedia_behaviour:{APPEARS:"APPEARS"},behaviourParams_gallery_layoutDirection:{LEFT_TO_RIGHT:"LEFT_TO_RIGHT",RIGHT_TO_LEFT:"RIGHT_TO_LEFT"},behaviourParams_gallery_scrollAnimation:{NO_EFFECT:"NO_EFFECT",FADE_IN:"FADE_IN",GRAYSCALE:"GRAYSCALE",SLIDE_UP:"SLIDE_UP",EXPAND:"EXPAND",SHRINK:"SHRINK",ZOOM_OUT:"ZOOM_OUT",ONE_COLOR:"ONE_COLOR",MAIN_COLOR:"MAIN_COLOR",BLUR:"BLUR"},behaviourParams_gallery_vertical_loadMore_amount:{PARTIAL:"PARTIAL",ALL:"ALL"},behaviourParams_gallery_horizontal_slideAnimation:{SCROLL:"SCROLL",FADE:"FADE",DECK:"DECK"},behaviourParams_gallery_horizontal_slideTransition:{EASE:"cubic-bezier(0.46,0.1,0.25,1)"},behaviourParams_gallery_horizontal_autoSlide_behaviour:{OFF:"OFF",INTERVAL:"INTERVAL",CONTINUOUS:"CONTINUOUS"},behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment:{LEFT:"LEFT",RIGHT:"RIGHT",CENTER:"CENTER"},behaviourParams_item_threeDimensionalScene_playTrigger:K,parse3DDimensions:t=>({x:parseFloat(t.split("x")[1].split("y")[0]),y:parseFloat(t.split("y")[1].split("z")[0]),z:parseFloat(t.split("z")[1])}),stylingParams_itemResolutionMode:{FULL:"FULL",SCALED_DOWN:"SCALED_DOWN"},layoutParams_thumbnails_position:{ON_GALLERY:"ON_GALLERY",OUTSIDE_GALLERY:"OUTSIDE_GALLERY"}};const X=new class{constructor(){this._cache={},this._hash2int={},this._params={},Object.assign(this,r)}shouldUseCache(){return!C()&&!x()&&!this.isSSR()}isUndefined(t){return void 0===t}uniqueBy(t,e){return t.filter(((t,i,r)=>r.map((t=>t[e])).indexOf(t[e])===i))}inRange(t,e,i=e){if(0===e)return-1;for(;t<0;)t+=e;for(;t>i;)t-=e;return t}sliceArrayWithRange(t,e,i){return Array(i-e).fill(0).map(((i,r)=>{const s=e+r;return t[this.inRange(s,t.length,t.length-1)]}))}sliceArrayIfAvailable(t,e,i){let r=Math.max(e,0),s=Math.min(i,t.length);return r>e&&(s=Math.min(s+(r-e),t.length)),s{r=e.split("="),r[0]===t&&(i=decodeURIComponent(r[1]))})),!i){const e=decodeURIComponent(s.pathname).split("?")[1];if(!e)return"";e.split("&").forEach((e=>{r=e.split("="),r[0]===t&&(i=decodeURIComponent(r[1]))}))}return this._params[t]=i,i}catch(t){return!1}}stripSlashes(t){let e="";return"string"==typeof t&&(e=t.replace(/\\\//g,"/").replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\0/g,"\0").replace(/\\\\/g,"\\")),e}parseStringObject(t){if("string"!=typeof t)return t;const e=this.stripSlashes(t);if("string"==typeof t&&/^[\],:{}\s]*$/.test(e.replace(/\\["\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))try{return JSON.parse(e)}catch(t){}return e}hashCode(t){let e,i,r=0;if(0===t.length)return r;for(e=0;e{const t=this.parseGetParam("deviceType")||O.deviceType,e="true"===this.parseGetParam("showMobileView"),i=M();return!!e||(t?String(t).toLowerCase().indexOf("mobile")>=0:i||void 0)}))}isUserAgentMobile(){try{const t=()=>{let t=!1;var e;return e=navigator.userAgent||navigator.vendor||O.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|pixel|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))&&(t=!0),t};return this.getOrPutFromCache("isUserAgentMobile",t)}catch(t){return!1}}isMobile(){return this.getOrPutFromCache("isMobile",(()=>{const t=this.isMobileByProps(),e=this.isUserAgentMobile();return this.isUndefined(t)?e:t}))}isTouch(){return this.getOrPutFromCache("isTouch",(()=>{var t;const e=D(),i=(null===(t=O.navigator)||void 0===t?void 0:t.maxTouchPoints)>0||"ontouchstart"in O.document.documentElement;return this.isUndefined(e)?i:e}))}isTest(){try{return O.isTest}catch(t){return!1}}isLocal(){try{const t=O.location.hostname;return"local.wix.com"===t||(t.indexOf("localhost")>=0||"true"===this.parseGetParam("debug"))}catch(t){return!1}}isDev(){return this.getOrPutFromCache("isDev",(()=>this.shouldDebug("ph_local")||this.isOOI()&&!1||"true"===(this.safeLocalStorage()||{}).forceDevMode))}isVerbose(){return!this.isTest()&&"true"===(this.safeLocalStorage()||{}).forceDevMode}isStoreGallery(){return this.getOrPutFromCache("isStoreGallery",(()=>{try{return O.location.search.toLowerCase().indexOf("isstore")>-1}catch(t){return this.isDev()&&console.error("cant find window",t),!1}}))}isSSR(){return void 0!==i.g&&void 0===(null===i.g||void 0===i.g?void 0:i.g.window)}isOOI(){return this.isSSR()||"undefined"!=typeof top&&"undefined"!=typeof self&&(top===self||self.location.origin.includes("editor.wix.com"))}generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=Math.floor(16*Math.random())||0;return"x"===t?e.toString(16):t}))}isExternalUrl(t){return/(^https?)|(^data)|(^blob)/.test(t)}isiOS(){return this.getOrPutFromCache("isiOS",(()=>{try{return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!O.MSStream}catch(t){return!1}}))}isiPhone(){return this.getOrPutFromCache("isiPhone",(()=>{try{return/iPhone/.test(navigator.userAgent)&&!O.MSStream}catch(t){return!1}}))}isLandscape(){return this.getOrPutFromCache("isLandscape",(()=>{if(!this.isMobile())return!1;try{if(this.isUndefined(O.orientation)){const t=O.matchMedia("(orientation: landscape)");return!(!t||!0!==t.matches)}return 90===O.orientation||-90===O.orientation}catch(t){return!1}}))}safeLocalStorage(){try{return localStorage||O}catch(t){return O}}shouldDebug(t){try{return!!this.safeLocalStorage()[t]||(O.debugApp||"").indexOf(t)>=0||(this.parseGetParam("debugApp")||"").indexOf(t)>=0}catch(t){return!1}}deviceHasMemoryIssues(){return this.isiOS()}getTabIndex(t){const e=["currentGalleryItem","loadMoreButton","slideshowNext","slideshowPrev","currentThumbnail","slideshowLove","slideshowShare","cartIcon","cartClose","cartFrame","fullscreenClose","fullscreenNext","fullscreenPrev","fullscreenInfo","fullscreenLink","fullscreenProvider","fullscreenCartButton","fullscreenCheckout","fullscreenExpand","fullscreenVideoPlay","fullscreenVideoBar","fullscreenVideoMute","fullscreenVideoVolume","fullscreenCartIcon","fullscreenDownload","fullscreenLove","fullscreenShare"].indexOf(t)+1;return e>=0&&this.isOOI()?0:e||-1}setStateAndLog(t,e,i,r){if(this.isVerbose()){console.log(`State Change Called (${e})`,i);const s=Object.assign({},t.state);t.setState(i,(()=>{const i=Object.assign({},t.state),a=this.printableObjectsDiff(s,i,"state");Object.keys(a).length>0&&console.log(`State Change Completed (${e})`,a),this.isFunction(r)&&r.bind(t)()}))}else t.setState(i,(()=>{this.isFunction(r)&&r.bind(t)()}))}printableObjectsDiff(t,e,i=""){const r=t=>(""===t?t="''":this.isUndefined(t)&&(t="undefined"),String(t)),s=(t={},e={},i,a=1)=>{if(a>3)return{};return Object.entries(t).reduce(((t,[o,n])=>(this.isEqual(n,e[o])||(Array.isArray(e[o])?(n.length!==e[o].length&&(t[o+".length"]="["+n.length+"] => ["+e[o].length+"]"),t=Object.assign(t,s(n,e[o],(i?i+".":"")+o,a+1))):"object"==typeof e[o]?t=Object.assign(t,s(n,e[o],(i?i+".":"")+o,a+1)):t[(i?i+".":"")+o]=r(n)+" => "+r(e[o])),t)),{})};return s(t,e,i,1)}getScreenWidth(){if(x()&&this.isMobile())return 320;if(this.isTest())return 1920;try{return this.isLandscape()?Math.max(O.screen.width,O.screen.height):O.screen.width}catch(t){return 1920}}getScreenHeight(){if(this.isTest())return 1200;try{return this.isLandscape()?Math.min(O.screen.width,O.screen.height):O.screen.height}catch(t){return 1200}}getWindowWidth(){try{return O.innerWidth||980}catch(t){return 980}}getMobileEnabledClick(t){return this.isMobile()?{onTouchEnd:t}:{onClick:t}}getTopUrlParam(t){if(this.isUndefined(this._cache.params)&&(this._cache.params={}),this.isUndefined(this._cache.params[t]))try{this._cache.params[t]=top.location.search.replace("?","").split("&").map((e=>{const i=e.split("=");return i[0]===t&&i[1]||""})).join("")}catch(e){this._cache.params[t]=!1}return this._cache.params[t]}scrollTo(t,e,i,r,s){this.isMobile()&&(i=0);const a=r?t.scrollLeft:t.scrollTop,o=e-a;let n=0;const l=()=>{n+=20;const e=((t,e,i,r)=>0===r?i+e:(t/=r/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e)(n,a,o,i);n"object"!=typeof e&&-1===String(t).indexOf("Expand")&&-1===String(t).indexOf("Color"))).map((([t,e])=>`${t}=${encodeURI(e)}`)).join("&");console.log("Gallery Playground link:",`https://pro-gallery.surge.sh?${e}`)}}catch(t){console.error(t)}}isSingleItemHorizontalDisplay(t){return t.scrollDirection===Z[N.structure.scrollDirection].HORIZONTAL&&1===t[N.groups.groupSize]&&t[N.crop.enable]&&1===t[N.crop.ratios].length&&"100%/100%"===t[N.crop.ratios][0]}getAriaAttributes({proGalleryRole:t,proGalleryRegionLabel:e}){const i="application"===t?"gallery application":"region",r={role:t||"region","aria-label":e};return(t||"region")!==i&&(r["aria-roledescription"]=i),r}focusGalleryElement(t){t.focus()}isMeaningfulString(t){return"string"==typeof t&&!!t.trim().length}isHeightSetByGallery(t){return t[N.structure.scrollDirection]===Z[N.structure.scrollDirection].VERTICAL&&!t[G.gallery.vertical.loadMore.enable]}};const q=new class{constructor(){this._hash2int={}}stripSlashes(t){let e="";return"string"==typeof t&&(e=t.replace(/\\\//g,"/").replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\0/g,"\0").replace(/\\\\/g,"\\")),e}parseStringObject(t){if("string"!=typeof t)return t;const e=this.stripSlashes(t);if("string"==typeof t&&/^[\],:{}\s]*$/.test(e.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))try{return JSON.parse(e)}catch(t){}return e}hashToInt(t,e,i){let r=0;if(void 0===t||0===t.length)return r;if(!this._hash2int[t]){for(let e=0;e{void 0===i[t]&&(i[t]=e[t])})),i}(t)}convertContainer(t,e){const i=Object.assign({bounds:{}},t);return t.width>=0&&!(t.galleryWidth>=0)&&(i.galleryWidth=t.width+2*((e[N.structure.itemSpacing]/2||0)-(e[N.structure.gallerySpacing]||0)),delete i.width),t.height>=0&&!(t.galleryHeight>=0)&&(i.galleryHeight=t.height+((e[N.structure.itemSpacing]/2||0)-(e[N.structure.gallerySpacing]||0)),delete i.height),e.externalInfoHeight>=0&&"HORIZONTAL"===e[N.structure.scrollDirection]&&(i.galleryHeight-=e.externalInfoHeight),i}};class J{constructor(t){if(this.style={},this.visibility={},(t=t||{}).dto||(console.error("Item has no DTO",t),t.dto={}),this.config=t,this.dto=t.dto,this.idx=t.idx,this.inGroupIdx=t.inGroupIdx,this.container=t.container,this.cubeType="FILL",t.styleParams){const{styleParams:e}=t;this.cubeType=e[N.crop.method],this.cubeImages=e[N.crop.enable],this._cropRatio=e[N.crop.ratios],this.rotatingCropRatios=e[N.crop.ratios].length>1&&e[N.crop.ratios],this.smartCrop=e[N.crop.enableSmartCrop],this.cropOnlyFill=e[N.crop.cropOnlyFill],this.imageMargin=e[N.structure.itemSpacing],this.gallerySpacing=e[N.structure.gallerySpacing],this.scatter=e[N.structure.scatter.randomScatter],this.rotatingScatter=e[N.structure.scatter.manualScatter],this.smartCrop=e[N.crop.enableSmartCrop],this.useMaxDimensions=!e[N.structure.enableStreching]&&"text"!==this.itemType,this.cubeFitPosition=e[N.crop.alignment]}this._groupOffset={top:0,left:0,right:0,bottom:0},this._group={},this.calcPinOffset=()=>0,this.resize(1)}fixMetadataVerticalVideoRatio(t){if(t.qualities&&t.qualities[0]){const{qualities:e}=t,{height:i,width:r}=e[e.length-1];t.height=i,t.width=r}}resize(t){let e=1;if(!1!==t){if(t>0)e=t;else if("object"==typeof t)if(t.width){e=Math.max(1,t.width)/this.width}else if(t.height){e=Math.max(1,t.height)/this.height}return this.width*=e,this.height*=e,this.resized=!0,this}}pinToCorner(t,e=!1){const i=t.indexOf("top")>=0,r=t.indexOf("left")>=0;this.style.top=i?0:"auto",this.style.bottom=i?"auto":0,this.style.left=r?0:"auto",this.style.right=r?"auto":0,this.pin=t,this.isPinnedTop=i,this.isPinnedLeft=r,this.pinAfter=e,this.pinAfterType=i?"top":r?"left":"",this.calcPinOffset=(t,e)=>{if(this.pinAfter){if(this.pin===e){const t=this.imageMargin/2;return"top"===e?this.pinAfter.height+2*t:"left"===e?this.pinAfter.width+2*t:0}return 0}return 0}}setPosition(t){this.style.position=t}getPosition(t){return parseInt(t,10)>=0?t:"auto"}calcScatter(t){const e=this.imageMargin/2,i=this.gallerySpacing,r=t.left>0?e:i,s=this.container.galleryWidth-t.right>2*e?e:i,a=t.top>0?e:i,o=this.container.galleryHeight-t.bottom>2*e?e:i;if(!(this.rotatingScatter.length>0)){if(this.scatter>0){const e=this.scatter/100*.4;let i=q.hashToRandomInt(this.seed+t.right+"x",-r,s);i*=this.scatter/100,i*=1-e,i+=(i>0?e*s:e*r)*Math.sign(i),i=Math.round(i);let n=q.hashToRandomInt(this.seed+t.right+"y",-a,o);return n*=this.scatter/100,n*=1-e,n+=(n>0?e*o:e*a)*Math.sign(n),n=Math.round(n),{x:i,y:n}}return{x:0,y:0}}try{const t=this.rotatingScatter.split(","),[e,i]=t[this.idx%t.length].split("/").map((t=>parseInt(t))).map((t=>t/100));return{x:e*(e>0?s:r),y:i*(i>0?o:a)}}catch(t){console.error("Cannot calculate rotating scatter",t)}}get top(){return this.getPosition(this.style.top)}get left(){return this.getPosition(this.style.left)}get right(){return this.getPosition(this.style.right)}get bottom(){return this.getPosition(this.style.bottom)}set group(t){Object.assign(this._group,t)}get group(){return this._group}set groupOffset(t){Object.assign(this._groupOffset,t)}get offset(){var t;const e={top:this._groupOffset.top+(this.isPinnedTop?this.calcPinOffset(this._group.height,"top"):this._group.height-this.outerHeight)||0,left:this._groupOffset.left+(this.isPinnedLeft?this.calcPinOffset(this._group.width,"left"):this._group.width-this.outerWidth)||0},{fixTop:i=0,fixLeft:r=0,fixRight:s=0,fixBottom:a=0}=this.dimensions;if(e.innerTop=i,e.innerLeft=r,e.innerRight=s,e.innerBottom=a,e.right=e.left+this.width,e.bottom=e.top+this.height,this.scatter>0||(null===(t=this.rotatingScatter)||void 0===t?void 0:t.length)>0){const{x:t,y:i}=this.calcScatter(e);e.left+=t,e.top+=i,e.right=e.left+this.width,e.bottom=e.top+this.height}return e}get id(){return this.dto.id||this.dto.photoId||this.dto.itemId}set id(t){this.dto.itemId=this.dto.photoId=this.dto.id=t}get hash(){return this.dto.hash||this.dto.mediaUrl||this.dto.id}get seed(){return this.dto.seed||q.hashToInt(this.hash)}get metadata(){return this.dto.metadata||this.dto.metaData||{}}get itemType(){return this.metadata.type||"image"}get maxWidth(){return this.dto.width||this.dto.w}set maxWidth(t){this.dto.width=t}get outerWidth(){return this.width+2*this.margins}get infoWidth(){return this.Group?this.Group.infoWidth:0}get orgWidth(){return this.style.orgWidth||this.dto.width||this.dto.w||1}get width(){let t;return t=this.cubeImages&&this.ratio>=this.cropRatio?this.style.cubedWidth||this.orgHeight*this.cropRatio:this.orgWidth,Math.max(t,1)}set width(t){this.style.cubedWidth=this.style.orgWidth=this.style.width=Math.max(1,t);const{fixLeft:e=0,fixRight:i=0}=this.dimensions;this.style.innerWidth=this.style.width-e-i}get outerHeight(){return this.height+2*this.margins}get orgHeight(){return this.style.orgHeight||this.dto.height||this.dto.h||1}get height(){let t;return t=this.cubeImages&&this.ratio{t?(e=this.useMaxDimensions?Math.min(this.width,this.maxWidth):this.width,i=e/r):(i=this.useMaxDimensions?Math.min(this.height,this.maxHeight):this.height,e=i*r)},s=this.ratio>=this.cropRatio;t?r(s,this.ratio):this.useMaxDimensions&&(this.width>this.maxWidth||this.height>this.maxHeight)&&(this.cubeImages?r(!s,this.cropRatio):r(!s,this.ratio));let a={fixTop:(this.height-i)/2,fixLeft:(this.width-e)/2,fixRight:(this.width-e)/2,fixBottom:(this.height-i)/2};switch(this.cubeFitPosition){case"TOP":a.fixTop=0,a.fixBottom*=2;break;case"BOTTOM":a.fixTop*=2,a.fixBottom=0;break;case"LEFT":a.fixLeft=0,a.fixRight*=2;break;case"RIGHT":a.fixLeft*=2,a.fixRight=0}return a}get cropRatio(){let t;if(this.rotatingCropRatio)t=this.rotatingCropRatio;else if(this.rotatingCropRatios&&this.rotatingCropRatios.length>1){const e=this.rotatingCropRatios;t=this.rotatingCropRatio=e[this.idx%e.length]}if(t||"function"!=typeof this._cropRatio||(t=this._cropRatio()),!t&&this.cropOnlyFill&&"FIT"===this.cubeType&&(t=this.ratio),t||(t=this._cropRatio&&this._cropRatio[0]||this.ratio),null!==this.dynamicCropRatios&&"string"==typeof t){if(!this.dynamicCropRatios){const e=/^\d*\.?\d*(%|px)\/\d*\.?\d*(%|px)$/.exec(t);this.dynamicCropRatios=e?t.split("/").map(((t,e)=>t.indexOf("%")>0?{type:"%",val:parseFloat(t.replace("%",""))/100,dim:0===e?"galleryWidth":"galleryHeight"}:{type:"px",val:parseInt(t.replace("px",""))})):null}if(this.dynamicCropRatios){const e=this.dynamicCropRatios.map((t=>{if("%"===t.type){const e=this.container[t.dim]+("galleryHeight"===t.dim?this.imageMargin/2:0);return t.val*e-this.imageMargin}return t.val}));t=e[0]/e[1]}}return t=Number(t),!0===this.smartCrop&&(t=this.isPortrait?Math.min(t,1/t):Math.max(t,1/t)),"MIN"===this.cubeType?t=Math.max(t,this.orgRatio):"MAX"===this.cubeType&&(t=Math.min(t,this.orgRatio)),t}set cropRatio(t){"number"==typeof this._cropRatio&&(this._cropRatio=t,this.style.cubedHeight=this.style.cubedWidth=0)}get orientation(){return this.ratio<.999?"portrait":"landscape"}get isPortrait(){return"portrait"===this.orientation}get isLandscape(){return"landscape"===this.orientation}get ratio(){return this.orgRatio||(this.orgRatio=this.orgWidth/this.orgHeight),this.orgRatio}set ratio(t){this.orgRatio=t}get roundedStyle(){return Object.assign(Object.assign({},this.style),{width:Math.round(this.style.width),height:Math.round(this.style.height)})}get scheme(){return{id:this.id,idx:this.idx,inGroupIdx:this.inGroupIdx,dto:this.dto,type:this.type,style:this.style,roundedStyle:this.roundedStyle,width:this.width,maxWidth:this.maxWidth,outerWidth:this.outerWidth,infoWidth:this.infoWidth,margins:this.margins,ratio:this.ratio,dimensions:this.dimensions,cropRatio:this.cropRatio,isCropped:this.cubeImages,cropType:this.cubeType,height:this.height,maxHeight:this.maxHeight,outerHeight:this.outerHeight,infoHeight:this.infoHeight,group:this.group,offset:this.offset,groupOffset:this._groupOffset,orientation:this.orientation,isPortrait:this.isPortrait,isLandscape:this.isLandscape,visibility:this.visibility}}}class Q{constructor(t){this.uniqueId=X.generateUUID(),this.isGalleryItem=!0,this.createdBy=t.createdBy,this.createUrl=this.createUrl.bind(this),this.createMagnifiedUrl=this.createMagnifiedUrl.bind(this),this.createSecondMediaItemIfNeeded(t),this.update(t)}createSecondMediaItemIfNeeded(t){var e;(null===(e=t.dto)||void 0===e?void 0:e.secondaryMedia)&&(this.secondaryMediaItem=new Q(this.mapItemConfig(t)))}updateSecondaryMedia(t){this.secondaryMediaItem&&this.secondaryMediaItem.update(this.mapItemConfig(t))}mapItemConfig(t){const e={};return Object.assign(e,t.dto.secondaryMedia,t.dto.secondaryMedia.metadata),Object.assign(Object.assign({},t),{dto:e,scheme:Object.assign(Object.assign({},t.scheme),{maxHeight:e.height,maxWidth:e.width})})}update(t){if(this.createMediaUrl=t.createMediaUrl,t.dto&&t.dto.dto&&(t.dto=t.dto.dto,X.isDev()&&console.warn("Item core is created with already existing item core")),this.dto=Object.assign({},t.dto),t.scheme)this.processScheme(t.scheme);else{const t={};Object.assign(t,this.dto,this.metadata),this.processScheme(new J({dto:t}).scheme)}if(this.dto){const t=this.dto.metaData||this.dto.metadata;t&&(this.dto.metaData=X.parseStringObject(t))}this.sharpParams=Object.assign({},t.sharpParams),this.sharpParams.quality||(this.sharpParams.quality=90),this.sharpParams.usm||(this.sharpParams.usm={}),this.thumbnailSize=t.thumbnailSize||120,this.resetUrls(),this.updateSharpParams(),this.updateSecondaryMedia(t)}processScheme(t){this.id=t.id,this.idx=t.idx,this.type=t.type,this.style=t.style,this.width=t.width,this.maxWidth=t.maxWidth,this.infoWidth=t.infoWidth,this.height=t.height,this.maxHeight=t.maxHeight,this.infoHeight=t.infoHeight,this.margins=t.margins,this.ratio=t.ratio,this.cropRatio=t.cropRatio,this.cubeImages=t.isCropped,this.cubeType=t.cropType||Z.resizeMethods.FILL,this.offset=t.offset,this.group=t.group,this.orientation=t.orientation,this.visibility=t.visibility}renderProps(t){const e=Object.assign({ratio:this.ratio,bgColor:this.bgColor,maxWidth:this.maxWidth,maxHeight:this.maxHeight,infoWidth:this.infoWidth,infoHeight:this.infoHeight,orientation:this.orientation},this.style),i=Object.assign({className:"image",key:this.key,idx:this.idx,photoId:this.photoId,id:this.id,hash:this.id,html:this.html,type:this.type,isVideoPlaceholder:this.isVideoPlaceholder,videoPlaceholderUrl:this.videoPlaceholderUrl,url:this.url,alt:this.alt,htmlContent:this.htmlContent,directLink:this.directLink,directShareLink:this.directShareLink,linkUrl:this.linkUrl,linkType:this.linkType,linkOpenType:this.linkOpenType,linkData:this.linkData,title:this.title,fileName:this.fileName,description:this.description,createUrl:this.createUrl,createMagnifiedUrl:this.createMagnifiedUrl,cubeImages:this.cubeImages,cubeType:this.cubeType,cropRatio:this.cropRatio,isTransparent:this.isTransparent,offset:this.offset,style:e,isDemo:this.isDemo,videoUrl:this.videoUrl,isExternalVideo:this.isExternalVideo,hasSecondaryMedia:this.hasSecondaryMedia,scene:this.scene},t);return this.hasSecondaryMedia&&(i.secondaryMediaItem=Object.assign(Object.assign({},this.secondaryMediaItem.renderProps()),{style:Object.assign(Object.assign({},e),{bgColor:this.secondaryMediaItem.bgColor})})),i}getDataForShop(){const t=this.focalPoint,e=this.metadata;return{isDemo:e.isDemo,orderIndex:this.orderIndex,itemId:this.dto.itemId,itemUrl:this.url,itemHeight:e.height,title:e.title,itemWidth:e.width,itemType:e.type||"image",imageUrl:this.processedMediaUrl(Z.resizeMethods.FIT,200,200,null,null).img(),imagePurchasedUrl:this.dto.mediaUrl,fpX:t[0],fpY:t[1]}}getHighestMp4Resolution(t){const e=t.filter((t=>"mp4"===t.formats[0])),{width:i,height:r}=e.sort(((t,e)=>e.width-t.width))[0];return{width:i,height:r}}processedMediaUrl(t,e,i,r,s=!1){var a;const o=(t,e,i,r,a,o=null,n=null)=>{let l;if("function"==typeof this.createMediaUrl)try{const h=String(X.hashCode(JSON.stringify({url:e,resizeMethod:i,requiredWidth:r,requiredHeight:a,sharpParams:o,focalPoint:n})));this._cachedUrls[h]||(this._cachedUrls[h]=this.createMediaUrl({item:t,originalUrl:e,resizeMethod:i,requiredWidth:r,requiredHeight:a,sharpParams:o,focalPoint:n,createMultiple:s})||""),l=this._cachedUrls[h]}catch(s){console.error("Cannot create url",s,t,e,i,r,a,o,n),l=String(e)}else l=String(e);return l};e=Math.ceil(e),i=Math.ceil(i);const n=t===Z.resizeMethods.FILL&&this.isCropped&&this.focalPoint,l={};let h=this.url;return l[Z.urlTypes.THREE_D]=()=>this.url,this.is3D&&(h=this.poster.url),this.isText?Object.assign({},...Object.values(Z.urlTypes).map((t=>({[t]:()=>""})))):((this.isVideo||this.isVideoPlaceholder)&&(h=null===(a=this.poster)||void 0===a?void 0:a.url,X.isExternalUrl(this.url)?l[Z.urlTypes.VIDEO]=()=>this.url:l[Z.urlTypes.VIDEO]=()=>o(this,this.url,Z.resizeMethods.VIDEO,e,i)),l[Z.urlTypes.HIGH_RES]=()=>o(this,h,t,e,i,r,n),l[Z.urlTypes.LOW_RES]=()=>{const e=this.resizeWidth/this.resizeHeight;return o(this,h,this.cubeImages&&t!==Z.resizeMethods.FIT?Z.resizeMethods.FILL:Z.resizeMethods.FIT,250*e,250,Object.assign(Object.assign({},r),{quality:30,blur:30}),n)},l)}resetUrls(){const t=this.maxWidth||this.dto.width||this.metadata.width,e=this.maxHeight||this.dto.height||this.metadata.height;this.resizeWidth=Math.min(t,Math.ceil(this.width)),this.resizeHeight=Math.min(e,Math.ceil(this.height)),this._cachedUrls={},this.urls={}}createUrl(t,e){try{return this[t+"_url"][e]()}catch(t){return""}}get cubeTypeResizeMethod(){return{[Z.layoutParams_crop_method.FIT]:Z.resizeMethods.FIT,[Z.layoutParams_crop_method.FILL]:Z.resizeMethods.FILL}[this.cubeType]}createMagnifiedUrl(t=1){if(!this.urls.magnified_url){const{innerWidth:e,innerHeight:i}=this.style;this.urls.magnified_url=this.processedMediaUrl(this.cubeTypeResizeMethod,e*t,i*t,this.sharpParams,!0)}return this.urls.magnified_url[Z.urlTypes.HIGH_RES]()}get resized_url(){return this.urls.resized_url||(this.urls.resized_url=this.processedMediaUrl(this.cubeTypeResizeMethod,this.resizeWidth,this.resizeHeight,this.sharpParams)),this.urls.resized_url}get multi_url(){return this.urls.multi_url||(this.urls.multi_url=this.processedMediaUrl(this.cubeTypeResizeMethod,this.resizeWidth,this.resizeHeight,this.sharpParams,!0)),this.urls.multi_url}get scaled_url(){if(!this.urls.scaled_url){const t=this.maxWidth/this.maxHeight,e=this.resizeWidth/this.resizeHeight{const t=this.urls.download_url._img();return t+(t.includes("?")?"&":"?")+`dn=${this.fileName}`}),this.urls.download_url}updateSharpParams(){if(this.dto.metaData&&this.dto.metaData.sharpParams&&this.dto.metaData.sharpParams.L){const t=this.dto.metaData.sharpParams.L;t.quality&&!0===t.overrideQuality&&(this.sharpParams.quality=t.quality),t.usm&&!0===t.overrideUsm&&(this.sharpParams.usm=t.usm)}}get hasSecondaryMedia(){return!!this.secondaryMediaItem}get itemId(){return this.id}updateId(t){this.dto.itemId=this.id=t}get metadata(){let t=this.dto.metaData||this.dto.metadata;return X.isUndefined(t)&&(t={}),t}get metaData(){return this.metadata}get bgColor(){let t;return t=this.isText?this.metadata&&(this.metadata.textStyle&&this.metadata.textStyle.backgroundColor||this.metadata.backgroundColor):"none",t}get isCropped(){return this.cubeImages&&this.cubeTypeResizeMethod===Z.resizeMethods.FILL}get focalPoint(){return this.metadata.focalPoint||[.5,.5]}set focalPoint(t){this.metadata.focalPoint=t}get photoId(){return this.id}get key(){return this._key||(this._key=(this.dto.key||this.id||this.dto.url||"no_key_found").replace(/\W/g,"")),this._key}get orderIndex(){return this.dto.orderIndex||this.dto.o||0}set orderIndex(t){this.dto.orderIndex=t}updateOrderIndex(t){const e=this.orderIndex!==t;return this.orderIndex=t,e}get url(){return this.dto.file_url||this.dto.mediaUrl||this.dto.url||this.dto.src||""}get mediaUrl(){return this.url}get html(){return this.dto.html||this.dto.text||this.metadata.html||this.metadata.text}get lastModified(){return this.metadata.lastModified}get seed(){return X.hashToInt(this.url)}get isImage(){return"image"===this.type}get isImportant(){return!!this.dto.i}get videoUrl(){return this.metadata.videoUrl}get poster(){return this.metadata.poster||this.metadata.customPoster&&this.metadata.customPoster||(this.metadata.posters?this.metadata.posters[this.metadata.posters.length-1]:null)}get scene(){return this.metadata.scene}get qualities(){return this.metadata.qualities}get isExternalVideo(){return this.metadata.isExternal}get isExternal(){return!0===this.metadata.isExternal}set type(t){this._type=t}get type(){switch(this._type||this.dto.type||this.metadata.type||this.dto.media_type){case"dummy":return"dummy";case"v":case"video":return"video";case"h":case"html":case"text":return"text";case"3d":return"3d";default:return"image"}}get isVideoPlaceholder(){return!!(this.dto.isVideoPlaceholder||this.metadata.isVideoPlaceholder||this.dto.media_isVideoPlaceholder)}get videoPlaceholderUrl(){return this.dto.videoPlaceholderUrl||this.metadata.videoPlaceholderUrl||this.dto.media_videoPlaceholderUrl}get htmlContent(){var t;return null===(t=this.html)||void 0===t?void 0:t.replace(/<[^<>]*>/g,"").trim()}get alt(){return X.isMeaningfulString(this.metadata.alt)&&this.metadata.alt||""}set alt(t){this.metadata.alt=t}get title(){return this.metadata.title||""}set title(t){this.metadata.title=t}get fileName(){return this.metadata.fileName||""}set fileName(t){this.metadata.fileName=t}get description(){return this.metadata.description||""}set description(t){this.metadata.description=t}get exif(){return this.metadata.exif||""}get hasLink(){return"wix"===this.linkType?!!this.linkData.type:!!this.linkUrl}get link(){return this.metadata.link||{}}get linkData(){return this.metadata.link&&this.metadata.link.data?this.metadata.link.data:this.isWixUrl?{type:"web",url:this.linkUrl}:{}}set linkData(t){this.metadata.link||(this.metadata.link={}),this.metadata.link.data=t}get linkType(){return this.metadata.link&&!X.isUndefined(this.metadata.link.type)?this.metadata.link.type:this.linkUrl?"web":"none"}set linkType(t){this.metadata.link||(this.metadata.link={}),this.metadata.link={type:t,url:void 0,text:void 0,title:void 0,target:"_blank"}}get defaultLinkText(){const t=this.linkData;switch(this.linkType){case"wix":if(!t)return"Go to Link";switch(t.type){case"PageLink":return`Go to Page ${t.pageName}`;case"AnchorLink":return`Scroll to ${t.anchorName}`;case"ExternalLink":return`${t.url}`;case"EmailLink":return`Email ${t.recipient}`;case"PhoneLink":return`Call ${t.phoneNumber}`;case"DocumentLink":return`Open ${t.name}`;default:return"Go to Link"}case"web":return this.linkTitleFromUrl||this.linkUrl;case"page":return this.linkTitle;default:return""}}get defaultLinkValue(){const t=this.linkData;switch(this.linkType){case"wix":if(!t)return"Add a Link";switch(t.type){case"PageLink":return t.pageName?`PAGE - ${t.pageName}`:"PAGE";case"AnchorLink":return`ANCHOR - ${t.anchorName}`;case"ExternalLink":return`LINK - ${t.url}`;case"EmailLink":return`EMAIL - ${t.recipient}`;case"PhoneLink":return`PHONE - ${t.phoneNumber}`;case"DocumentLink":return`DOCUMENT - ${t.name}`;default:return"Add a Link"}case"web":return this.linkUrl;case"page":return this.linkTitle;default:return""}}get linkText(){return this.metadata.link&&this.metadata.link.text||this.defaultLinkText}set linkText(t){this.metadata.link||(this.metadata.link={}),this.metadata.link.text=t}get linkTitle(){return this.metadata.link&&this.metadata.link.title}set linkTitle(t){this.metadata.link||(this.metadata.link={}),this.metadata.link.title=t}get linkUrl(){return this.metadata.link&&this.metadata.link.url}set linkUrl(t){this.metadata.link||(this.metadata.link={}),this.metadata.link.url=t}get isWixUrl(){return this.linkUrl&&0===this.linkUrl.indexOf("wix")}get linkTitleFromUrl(){const t=/[^/]*\.\w+$/g.exec(this.linkUrl),e=t&&t[0];return e&&e.split(".")[0]}get unprotectedLinkOpenType(){return X.get(this,"metadata.link.target")}get linkOpenType(){return this.metadata.link&&!X.isUndefined(this.metadata.link.target)?this.unprotectedLinkOpenType:this.metadata.link&&!X.isUndefined(this.metadata.link.targetBlank)?this.metadata.link.targetBlank?"_blank":"_top":"_blank"}set linkOpenType(t){this.metadata.link||(this.metadata.link={}),this.metadata.link.target=t}get initialLinkObject(){return{type:"none",url:void 0,text:void 0,title:void 0,target:"_blank"}}get isDemo(){return this.metadata.isDemo||this.dto.isDemo||"public"===this.metadata.sourceName||this.metadata.tags&&Array.isArray(this.metadata.tags)&&this.metadata.tags.indexOf("_paid")>=0}set isDemo(t){this.metadata.isDemo=t}get isText(){return"text"===this.type}get isVideo(){return"video"===this.type}get is3D(){return"3d"===this.type}get isVisible(){return!0}get isRendered(){return!0}get isDimensionless(){return!(this.maxWidth>1||this.maxHeight>1)}get isTransparent(){return this.url&&(this.url.indexOf(".png")>0||this.url.indexOf(".gif")>0)}get webLink(){var t;return(null===(t=this.linkUrl)||void 0===t?void 0:t.length)>0&&"web"===this.linkType?{url:this.linkUrl,target:this.linkOpenType}:{}}get directLink(){return this.dto.directLink||this.webLink||{}}get directShareLink(){return this.dto.directShareLink||""}}const tt=Q,et={lll:"1,2h",llp:"1,3r",lpl:"1,2h",pll:"1,2h,3l",lpp:"1,2h,3r,3h",plp:"1,2h,3l,3r,3h",ppl:"1,2h,3l,3h",ppp:"1,2h,3l,3r,3h"},it={lll:"1,2v,3t,3b,3v",llp:"1,2v,3t,3v",lpl:"1,2v,3t,3b,3v",pll:"1,2v,3b,3v",lpp:"1,2v,3t",plp:"1,2v",ppl:"1,3b",ppp:"1,2h"},rt={1:[[1]],2:[[1],[1,2],[2]],3:[[1],[1,2],[1,2,3],[2,3],[3]]};class st{constructor(t){if(this.idx=t.idx,this.stripIdx=t.stripIdx,this.inStripIdx=t.inStripIdx,this.top=t.top,this.showAllItems=t.showAllItems,this.isLastItems=t.isLastItems,this.dummyItems=[],this.targetItemSize=t.targetItemSize,this.items=t.items.map((t=>(t.Group=this,t))),t.styleParams){const{styleParams:e}=t;this.scrollDirection=e[N.structure.scrollDirection],this.cubeType=e[N.crop.method],this.cubeImages=e[N.crop.enable],this.layoutOrientation=e[N.structure.layoutOrientation],this.minItemSize=e[N.targetItemSize.minimum],this.collageDensity=e[N.groups.density],this.groupTypes=String(e[N.groups.allowedGroupTypes]),this.repeatingGroupTypes=String(e[N.groups.repeatingGroupTypes]),this.rotatingCropRatios=e[N.crop.ratios],this.chooseBestGroup=e[N.groups.groupByOrientation],this.externalInfoHeight=e.externalInfoHeight,this.externalInfoWidth=e.externalInfoWidth,this.imageMargin=e[N.structure.itemSpacing],this.groupSize=e[N.groups.groupSize]}this.visible=!0,this.rendered=!0,this.required=!0;let e=this.items.length;for(;!this.isWithinMinItemSize&&e>0;)this.placeItems(e),this.resize(),e--}resize(){"VERTICAL"===this.layoutOrientation?this.resizeToWidth(this.targetItemSize):this.resizeToHeight(this.targetItemSize),this.setLeft(this.left),this.setTop(this.top)}safeGetItem(t){if(this.items[t])return this.items[t];if(this.dummyItems[t])return this.dummyItems[t];{const e=new J(Object.assign({},this.items[this.items.length-1].config));return e.idx=e.config.idx+t-(this.items.length-1),e.type="dummy",this.dummyItems[t]=e,e}}setCubedHeight(t){const e=this.cubeImages&&1===this.groupSize&&["FILL","FIT"].includes(this.cubeType)&&0===this.repeatingGroupTypes.length&&this.rotatingCropRatios.length<2;this.cubedHeight=e?t:null}round(){this.isLastGroup&&"VERTICAL"===this.scrollDirection?this.width=this.stripWidth-this.left:this.width=Math.round(this.width),this.height=Math.round(this.height);for(const t of this.items)t.width=Math.round(t.width),t.height=Math.round(t.height),t.group={width:this.width,height:this.height};const t=this.imageMargin;switch(this.type){default:case"1":this.safeGetItem(0).width=this.width-t,this.safeGetItem(0).height=this.height-t;break;case"2v":this.safeGetItem(0).width=this.safeGetItem(1).width=this.width-t,this.safeGetItem(0).height=this.height-this.safeGetItem(1).height-2*t;break;case"2h":this.safeGetItem(0).height=this.safeGetItem(1).height=this.height-t,this.safeGetItem(0).width=this.width-this.safeGetItem(1).width-2*t;break;case"3t":this.safeGetItem(0).width=this.width-t,this.safeGetItem(0).height=this.height-this.safeGetItem(1).height-2*t,this.safeGetItem(1).width=this.width-this.safeGetItem(2).width-2*t,this.safeGetItem(2).height=this.safeGetItem(1).height;break;case"3b":this.safeGetItem(0).width=this.width-this.safeGetItem(1).width-2*t,this.safeGetItem(1).height=this.safeGetItem(0).height,this.safeGetItem(2).height=this.height-this.safeGetItem(1).height-2*t,this.safeGetItem(2).width=this.width-t;break;case"3l":this.safeGetItem(1).height=this.height-this.safeGetItem(2).height-2*t,this.safeGetItem(2).width=this.safeGetItem(1).width,this.safeGetItem(0).width=this.width-this.safeGetItem(1).width-2*t,this.safeGetItem(0).height=this.height-t;break;case"3r":this.safeGetItem(0).height=this.height-this.safeGetItem(1).height-2*t,this.safeGetItem(1).width=this.safeGetItem(0).width,this.safeGetItem(2).width=this.width-this.safeGetItem(1).width-2*t,this.safeGetItem(2).height=this.height-t;break;case"3v":this.safeGetItem(0).width=this.width-t,this.safeGetItem(1).width=this.width-t,this.safeGetItem(2).width=this.width-t,this.safeGetItem(2).height=this.height-this.safeGetItem(0).height-this.safeGetItem(1).height-3*t;break;case"3h":this.safeGetItem(0).height=this.height-t,this.safeGetItem(1).height=this.height-t,this.safeGetItem(2).height=this.height-t,this.safeGetItem(2).width=this.width-this.safeGetItem(0).width-this.safeGetItem(1).width-3*t}}getGroupType(t){if(this.repeatingGroupTypes){const t=String(this.repeatingGroupTypes).split(",");return t[this.idx%t.length]}{const e="VERTICAL"===this.layoutOrientation;let i;if(this.chooseBestGroup){const t=this.items.map((t=>t.orientation.slice(0,1))).join("");i=(e?et:it)[t]}else 3!==this.items.length&&3!==t||(i=e?"1,2h,3l,3r,3h":"1,2v,3t,3b,3v");2!==this.items.length&&2!==t||(i=e?"1,2h":"1,2v"),1!==this.items.length&&1!==t||(i="1");let r=i.length>0?i.split(","):[];if(this.groupTypes){const t=this.groupTypes.split(",");t.length>1?(r=r.filter((e=>t.indexOf(e)>=0)),0===r.length&&(r=["1"])):r=t}if(this.collageDensity>=0){const t=this.collageDensity,e=parseInt(r[r.length-1]),i=rt[e],s=i[Math.floor(t*(i.length-1))];r=r.filter((t=>s.indexOf(parseInt(t))>=0)),0===r.length&&(r=["1"])}return r[this.calculateRandomSeed(r.length)]||"1"}}calculateRandomSeed(t){let e;return e="VERTICAL"===this.layoutOrientation?this.items[0].seed%t:(this.inStripIdx+this.stripIdx)%t,Math.round(Math.min(Math.max(0,e),t-1))}placeItems(t){this.type=this.getGroupType(t);let e,i=[],r=0,s=0;switch(this.type){default:case"1":e=this.safeGetItem(0),e.pinToCorner("top-left"),i.push(e),r=e.width,s=e.height;break;case"2v":e=this.safeGetItem(0),e.pinToCorner("top-left"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(1),e.pinToCorner("bottom-left"),e.resize(r/e.width),s+=e.height,i.push(e);break;case"2h":e=this.safeGetItem(0),e.pinToCorner("top-left"),e.innerOffset=[0,0],i.push(e),r=e.width,s=e.height,e=this.safeGetItem(1),e.pinToCorner("top-right"),e.innerOffset=[0,0],e.resize(s/e.height),r+=e.width,i.push(e);break;case"3b":e=this.safeGetItem(0),e.pinToCorner("top-left"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(1),e.pinToCorner("top-right"),e.resize(s/e.height),r+=e.width,i.push(e),e=this.safeGetItem(2),e.pinToCorner("bottom-left"),e.resize(r/e.width),s+=e.height,i.push(e);break;case"3t":e=this.safeGetItem(1),e.pinToCorner("bottom-left"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(2),e.pinToCorner("bottom-right"),e.resize(s/e.height),r+=e.width,i.push(e),e=this.safeGetItem(0),e.pinToCorner("top-left"),e.resize(r/e.width),s+=e.height,i=[e].concat(i);break;case"3r":e=this.safeGetItem(0),e.pinToCorner("top-left"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(1),e.pinToCorner("bottom-left"),e.resize(r/e.width),s+=e.height,i.push(e),e=this.safeGetItem(2),e.pinToCorner("top-right"),e.resize(s/e.height),r+=e.width,i.push(e);break;case"3l":e=this.safeGetItem(1),e.pinToCorner("top-right"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(2),e.pinToCorner("bottom-right"),e.resize(r/e.width),s+=e.height,i.push(e),e=this.safeGetItem(0),e.pinToCorner("top-left"),e.resize(s/e.height),r+=e.width,i=[e].concat(i);break;case"3v":e=this.safeGetItem(0),e.pinToCorner("top-left"),e.setPosition("relative"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(2),e.pinToCorner("bottom-left"),e.setPosition("relative"),e.resize(r/e.width),s+=e.height,i.push(e),e=this.safeGetItem(1),e.setPosition("relative"),e.resize(r/e.width),s+=e.height,e.pinToCorner("top",i[0]),i=[i[0],e,i[1]];break;case"3h":e=this.safeGetItem(0),e.pinToCorner("top-left"),e.setPosition("relative"),i.push(e),r=e.width,s=e.height,e=this.safeGetItem(2),e.pinToCorner("top-right"),e.setPosition("relative"),e.resize(s/e.height),r+=e.width,i.push(e),e=this.safeGetItem(1),e.setPosition("relative"),e.resize(s/e.height),r+=e.width,e.pinToCorner("left",i[0]),i=[i[0],e,i[1]]}this.width=r,this.height=s,this.items=i,this.placed=!0}resizeToHeight(t){this.height=t,this.width=this.getWidthByHeight(t),this.resizeItems()}resizeToWidth(t){this.width=t,this.height=this.getHeightByWidth(t),this.resizeItems()}resizeItems(){const t=["3b","3r"].indexOf(this.type)>=0?this.items.slice().reverse():this.items;t.forEach(((e,i)=>{e.resize(this.getItemDimensions(t,i)),e.group={top:this.top,left:this.left,width:this.width,height:this.height},e.groupOffset={bottom:this.top+this.height,right:this.left+this.width}}))}getItemDimensions(t,e){const i=this.imageMargin;switch(this.type){default:case"1":case"2v":case"3v":return{width:this.width-i};case"2h":case"3h":return{height:this.height-i};case"3t":case"3b":if(0===e){return{width:this.width-i}}return{height:this.height-t[0].height-2*i};case"3r":case"3l":if(0===e){return{height:this.height-i}}return{width:this.width-t[0].width-2*i}}}getHeightByWidth(t){let e=1,i=1;const r=this.imageMargin,s=this.items.map((t=>t.width/t.height));switch(this.type){default:case"1":e=1/s[0],i=1-e;break;case"2h":e=1/(s[0]+s[1]),i=1-2*e;break;case"2v":e=1/s[0]+1/s[1],i=2-e;break;case"3h":e=1/(s[0]+s[1]+s[2]),i=1-3*e;break;case"3v":e=1/s[0]+1/s[1]+1/s[2],i=3-e;break;case"3t":e=1/(s[2]+s[1])+1/s[0],i=2-2/(s[2]+s[1])+1/s[0];break;case"3b":e=1/(s[0]+s[1])+1/s[2],i=2-2/(s[0]+s[1])+1/s[2];break;case"3l":e=(s[1]+s[2])/(s[0]*s[1]+s[1]*s[2]+s[0]*s[2]),i=2-e*(2+s[0]);break;case"3r":e=(s[0]+s[1])/(s[0]*s[1]+s[1]*s[2]+s[0]*s[2]),i=2-e*(2+s[2])}return t*e+r*i}getWidthByHeight(t){let e=1,i=1;const r=this.imageMargin,s=this.items.map((t=>t.width/t.height));switch(this.type){default:case"1":e=s[0],i=1-e;break;case"2h":e=s[0]+s[1],i=2-e;break;case"2v":e=1/(1/s[0]+1/s[1]),i=1-2*e;break;case"3h":e=s[0]+s[1]+s[2],i=3-e;break;case"3v":e=1/(1/s[0]+1/s[1]+1/s[2]),i=1-3*e;break;case"3t":e=1/(1/(s[2]+s[1])+1/s[0]),i=(2/(s[2]+s[1])+1/s[0]-2)*e;break;case"3b":e=1/(1/(s[0]+s[1])+1/s[2]),i=(2/(s[0]+s[1])+1/s[2]-2)*e;break;case"3l":e=(s[0]*s[1]+s[1]*s[2]+s[0]*s[2])/(s[1]+s[2]),i=2+s[0]-2*e;break;case"3r":e=(s[0]*s[1]+s[1]*s[2]+s[0]*s[2])/(s[0]+s[1]),i=2+s[2]-2*e}return t*e+r*i}setTop(t){this.top=t||0;for(const e of this.items)e.groupOffset={top:t,bottom:t+this.height}}setLeft(t){this.left=t||0;for(const e of this.items)e.groupOffset={left:t,right:t+this.width}}get id(){return"g"+this.idx+"_"+(this.items[0]||{}).id}get ratio(){return this.width/this.height}get height(){return this.cubedHeight||this._height}set height(t){this._height=t}get totalHeight(){return this.height+this.infoHeight}get infoHeight(){return this.externalInfoHeight||0}get infoWidth(){return this.Column?this.Column.infoWidth:this.externalInfoWidth||0}get bottom(){return this.top+this.height}get right(){return this.left+this.width}set items(t){this._items=t}get items(){return this._items}get realItems(){return this._items.filter((t=>"dummy"!==t.type))}get isWithinMinItemSize(){return!(0===this.items.length||!this.placed)&&(1===this.items.length||this.items.reduce(((t,e)=>{const i=Math.min(e.width,e.height)>=this.minItemSize;return t&&i}),!0))}get scheme(){return{id:this.id,idx:this.idx,stripIdx:this.stripIdx,inStripIdx:this.inStripIdx,isLastGroup:this.isLastGroup,items:this.items.map((t=>t.scheme)),type:this.type,width:this.width,height:this.height,infoHeight:this.infoHeight,infoWidth:this.infoWidth,ratio:this.ratio,top:this.top,left:this.left,right:this.right,bottom:this.bottom,visible:this.visible,rendered:this.rendered,required:this.required}}}const at=class{constructor(t){this.uniqueId=X.generateUUID(),this.isGalleryGroup=!0,t.dto&&t.dto.dto&&(t.dto=t.dto.dto,X.isDev()&&console.warn("Item core is created with already existing item core")),this.dto=Object.assign({},t.dto),t.scheme?this.processScheme(t.scheme):this.processScheme(new st({dto:t.dto}).scheme),t.items?this.items=t.items:console.warn("Pro Gallery created Gallery Group without items",t)}processScheme(t){this.id=t.id,this.idx=t.idx,this.width=t.width,this.height=t.height,this.totalHeight=t.totalHeight,this.ratio=t.ratio,this.top=t.top,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.visible=t.visible,this.rendered=t.rendered,this.required=t.required}renderProps(t){return{className:"group",id:this.id,idx:this.idx,key:this.key,type:this.type,top:this.top,left:this.left,right:this.right,bottom:this.bottom,width:this.width,height:this.height,totalHeight:this.totalHeight,items:this.items,visible:this.visible,rendered:this.rendered,required:this.required,galleryConfig:t}}get key(){return"group_"+this.id}};class ot{static convertDtoToLayoutItem(t){if(!!(t.id&&t.width>0&&t.height>0))return t;{const e=t.metadata||t.metaData,i="object"==typeof e?e:X.parseStringObject(e)||{};return Object.assign({id:t.itemId||t.photoId,width:i.width,height:i.height},t)}}static convertToGalleryItems(t,e={},i=[]){t.galleryItems=[];for(let r=0;r0)&&1.5*this.targetItemSize0)return this.groups.length>=i;const{galleryWidth:a}=this.container;let o;if("HORIZONTAL"===r)o=!1;else{const i=a/(this.ratio+t.ratio)-s,r=a/this.ratio-s;o=!isNaN(i)&&!isNaN(r)&&(r<0||i<0&&Math.abs(r)0}get lastGroup(){return this.groups[this.groups.length-1]}get scheme(){return{idx:this.idx,groups:this.groups.map((t=>t.scheme)),width:this.width,height:this.height,ratio:this.ratio,isFullWidth:this.isFullWidth}}}class lt{constructor(t,e,i,r,s){this.idx=t,this.groups=[],this.height=0,this.width=e,this.left=i,this.cubedHeight=r,this.infoWidth=s||0}addGroup(t){this.addGroups([t])}addGroups(t){this.groups=this.groups.concat(t),t.forEach((t=>{t.columnIdx=this.idx,t.Column=this}))}get totalWidth(){return this.width+this.infoWidth}get scheme(){return{idx:this.idx,groups:this.groups.map((t=>t.scheme)),width:this.width,height:this.height}}}const ht=new class{set layout(t){this._layout=Object.assign({},t)}get layout(){return this._layout}};class ut{constructor(t){this.ready=!1,this.pointer=0,this.layoutItems=[],this.findNeighborItem=this.findNeighborItem.bind(this),this.updateParams(t),!1!==this.createLayoutOnInit&&this.createLayout(t)}updateParams(t){this.srcItems=t.items,this.styleParams=q.addDefaultStyleParams(t.styleParams),this.container=q.convertContainer(t.container,this.styleParams);const e=t.options||{};this.useExistingLayout=!!e.useExistingLayout,this.createLayoutOnInit=e.createLayoutOnInit,this.showAllItems=!!e.showAllItems||!!t.showAllItems,this.useLayoutStore=!!e.useLayoutStore}verifyGalleryState(){if(!this.container.galleryWidth)throw this.ready=!1,new Error("Layouter: cannot create layout, galleryWidth is undefined or 0");if(!this.styleParams.targetItemSize)throw this.ready=!1,new Error("Layouter: cannot create layout, targetItemSize is undefined or 0")}calcNumberOfColumns(t,e){let i=1;if("VERTICAL"===this.styleParams[N.structure.layoutOrientation])if(this.styleParams.fixedColumns>0)i=this.styleParams.fixedColumns;else{const r=t/e,s=[Math.floor,Math.ceil],a=s.map((t=>t(r))).map((e=>Math.round(t/e))).map((t=>Math.abs(e-t)));i=(0,s[a.indexOf(Math.min(...a))])(r)||1}else i=1;return i}findShortestColumn(t,e){let i=t[0];if("LEFT_TO_RIGHT"===this.styleParams[N.structure.groupsOrder])i=t[e%t.length];else{let e=-1;for(const r of t){const t=r.height;(t0){if(this.useLayoutStore)Object.assign(this,ht.layout);else if("VERTICAL"===this.styleParams[N.structure.layoutOrientation]){this.groups.slice(-3).forEach((t=>{const e=this.columns[t.columnIdx];e&&(e.height-=t.totalHeight,e.groups.splice(-1,1)),this.groups.splice(-1,1),t.realItems.forEach((()=>{this.layoutItems.splice(-1,1),this.pointer--})),this.groupIdx--}))}else{if("HORIZONTAL"===this.scrollDirection){this.groups.slice(-1).forEach((t=>{const e=this.columns[0];e&&e.groups.splice(-1,1);const i=this.strips[0];i&&(i.setWidth(i.width-t.width),i.ratio=i.width/i.height,i.groups.splice(-1,1),this.strip=i),this.strips=[],this.groups.splice(-1,1),t.realItems.forEach((()=>{this.layoutItems.splice(-1,1),this.pointer--})),this.groupIdx--})),this.galleryHeight=0}else{const t=this.strips.slice(-2);t&&(t.forEach((t=>{if(t){this.strips.splice(-1,1);t.groups.forEach((t=>{this.groups.splice(-1,1),t.items.forEach((()=>{this.layoutItems.splice(-1,1),this.pointer--})),this.groupIdx--}))}})),this.galleryHeight=this.strips.reduce(((t,e)=>t+e.height),0),this.strip=new nt({idx:this.strips.length+1,container:this.container,groupsPerStrip:this.styleParams[N.groups.numberOfGroupsPerRow],scrollDirection:this.styleParams[N.structure.scrollDirection],targetItemSize:this.targetItemSize}))}this.groupItems=[]}this.item={},this.pointer=Math.max(0,this.pointer),this.maxLoops=10*this.srcItems.length}else{if(this.pointer=0,this.firstGroup=!1,this.layoutItems=[],this.groups=[],this.strips=[],this.styleParams.forceFullHeight)this.targetItemSize=Math.sqrt(this.container.galleryHeight*this.container.galleryWidth/this.srcItems.length);else{let t;t="function"==typeof this.styleParams.targetItemSize?this.styleParams.targetItemSize():this.styleParams.targetItemSize,this.targetItemSize=Math.floor(t)+Math.ceil(2*(this.styleParams[N.structure.itemSpacing]/2-this.styleParams[N.structure.gallerySpacing]))}this.galleryWidth=Math.floor(this.container.galleryWidth),this.maxGroupSize=this.getMaxGroupSize(),this.groupIdx=0,this.item={},this.groupItems=[],this.group={},this.bounds=this.container.bounds||{},this.strip=new nt({idx:1,container:this.container,groupsPerStrip:this.styleParams[N.groups.numberOfGroupsPerRow],scrollDirection:this.styleParams[N.structure.scrollDirection],targetItemSize:this.targetItemSize}),this.galleryHeight=0,this.numOfCols=this.calcNumberOfColumns(this.galleryWidth,this.targetItemSize),this.targetItemSize="VERTICAL"===this.styleParams[N.structure.layoutOrientation]?Math.floor(this.galleryWidth/this.numOfCols):this.targetItemSize;const{externalInfoWidth:t}=this.styleParams,e=this.styleParams[N.structure.columnRatios],i=this.styleParams[N.structure.itemSpacing],r=this.styleParams[N.crop.ratios];let s=!1;if(e&&e.length>0){for(s=e.map(Number);s.lengtht+e),0);s=s.map((e=>Math.round(e*=t)))}let a,o=0,n=this.galleryWidth;this.columns=Array(this.numOfCols).fill(0).map(((e,l)=>{let h=s?s[l]:Math.round(n/(this.numOfCols-l));const u=o;o+=h,n-=h;const c=Math.round(t>1?t:t*h)||0;return h-=c,a=a||(this.targetItemSize-c-i)/r[0]+i,new lt(l,h,u,a,c)})),this.maxLoops=10*this.srcItems.length}}createLayout(t){for(void 0!==t&&this.updateParams(t),this.verifyGalleryState(),this.prepareLayoutParams();this.srcItems[this.pointer];){if(6===this.imagesLeft&&this.saveExistingLayout(),this.maxLoops--,this.maxLoops<=0)return console.error("Cannot create layout, maxLoops reached!!!"),!1;if(this.item=new J({idx:this.pointer,inGroupIdx:this.groupItems.length+1,scrollTop:this.galleryHeight,dto:this.srcItems[this.pointer],container:this.container,styleParams:this.styleParams}),this.layoutItems[this.pointer]=this.item,this.groupItems.push(this.item),this.groupItems.length(e.cubeImages=!0,e.cropRatio=e.ratio=e.width/(e.height*t),e.height*=t,e))),this.groups.map((e=>(e.height*=t,e.setTop(e.top*t),e.resizeItems(),e)))}return this.lastGroup=this.group,this.colWidth=Math.floor(this.galleryWidth/this.numOfCols),this.height=this.galleryHeight-2*(this.styleParams[N.structure.itemSpacing]/2-this.styleParams[N.structure.gallerySpacing]),this.width=this.lastGroup.left+this.lastGroup.width,this.ready=!0,this.scheme}lastVisibleItemIdxInHeight(t){for(let e=this.items.length-1;e>=0;e--){if(this.items[e].offset.top{let r,s,a,o=null,n={};return this.layoutItems.forEach((l=>{r=l.offset.top+l.height/2,s=l.offset.left+l.width/2,a=Math.sqrt(Math.pow(r-e,2)+Math.pow(s-t,2)),(null===o||a>0&&arir>e));break;default:r=s(i.offset.right,i.offset.top+i.height/2,((t,e,i)=>i>t))}return r.idx>=0?r.idx:(console.warn("Could not find offset for itemIdx",t,e),t)}getMaxGroupSize(){let t=1;try{const e="string"==typeof this.styleParams[N.groups.allowedGroupTypes]&&this.styleParams[N.groups.allowedGroupTypes].length>0?this.styleParams[N.groups.allowedGroupTypes].split(","):this.styleParams[N.groups.allowedGroupTypes];t=e.length>0?e.reduce(((t,e)=>Math.max(t,parseInt(e))),1):Number(e),t=Math.min(t,this.styleParams[N.groups.groupSize])}catch(e){console.error("couldn't calculate max group size - returing 3 (?)",e),t=3}return t}get isLastImage(){return!this.srcItems[this.pointer+1]}get isLastImages(){return!this.srcItems[this.pointer+1]}get imagesLeft(){return this.srcItems.length-this.pointer-1}get items(){return this.layoutItems}get scheme(){return{items:this.items.map((t=>t.scheme)),groups:this.groups.map((t=>t.scheme)),strips:this.strips.map((t=>t.scheme)),columns:this.columns.map((t=>t.scheme)),height:this.height,width:this.width}}}const ct=(t,e)=>{const i={};return Object.entries(t||{}).forEach((([t,r])=>{e.indexOf(t)>=0&&(i[t]=r)})),i},mt=(t,e)=>{let i=!1,r=!1;return(...s)=>{i?r=!0:(r=!1,t.apply(void 0,s),i=!0,setTimeout((()=>{r&&t.apply(void 0,s),i=!1}),e))}},dt=(t,e)=>{let i;return(...r)=>{clearTimeout(i),i=setTimeout((()=>{t.apply(void 0,r)}),e)}},pt=(t,e,i)=>{const r=String.prototype.split.call(e,/[,[\].]+?/).filter(Boolean).reduce(((t,e)=>null!=t?t[e]:t),t);return void 0===r||r===t?i:r},gt=t=>"function"==typeof t,yt=(t,e)=>{try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},vt=t=>!isNaN(parseFloat(t))&&isFinite(t),Pt=()=>({}),bt=2560,At=1440,It={y:0,x:0,width:bt,height:At,innerWidth:bt,innerHeight:At,outerWidth:bt,outerHeight:At,clientWidth:bt,clientHeight:At},ft=Object.assign(Object.assign({},It),{getBoundingClientRect:()=>It}),_t=Object.assign({addEventListener:Pt,removeEventListener:Pt,createEvent:Pt,getElementById:()=>ft,getElementsByClassName:()=>[ft],getElementsByTagName:()=>[ft],querySelector:()=>[ft],documentElement:ft,activeElement:ft,style:It},It);_t.body=_t;const St=Object.assign(Object.assign({},It),{scrollTop:0,scrollY:0}),Et=Object.assign({isMock:!0,isSSR:!0,orientation:0,devicePixelRatio:1,addEventListener:Pt,removeEventListener:Pt,createEvent:Pt,CustomEvent:Pt,screen:It,open:Pt,petri:{},search:{},location:{href:"http://mock.wix.com/",protocol:"http:",host:"mock.wix.com",hostname:"mock.wix.com",port:"",pathname:"/",search:"",hash:""},postMessage:Pt,requestAnimationFrame:Pt,dispatchEvent:Pt,document:_t,getComputedStyle:Pt,localStorage:{},frames:[]},St),Tt=new Map(Object.keys(St).map((t=>[t,St[t]])));Et.parent=Et;const Ot=Et;const wt=(new class{constructor(){this.shouldUseMock=!0,this.initProxyWindow=this.initProxyWindow.bind(this),this.windowIsAvailable()?this.initProxyWindow():this.initMockWindow()}windowIsAvailable(){try{return"undefined"!=typeof window}catch(t){return!1}}initProxyWindow(){const t={get:function(t,e){return Tt.has(e)&&this.shouldUseMock?Tt.get(e):t[e]}.bind(this),set:function(t,e,i){return Reflect.set(t,e,i)}},e=new Proxy(window,t),i={get:function(t,i){return e.proGalleryCustomProps.has(i)||"function"!=typeof e[i]?e[i]:e[i].bind(window)},set:function(t,i,r){return e.proGalleryCustomProps.add(i),Reflect.set(e,i,r)}};e.proGalleryCustomProps||(e.proGalleryCustomProps=new Set),this.window=new Proxy({},i)}initMockWindow(){this.window=Ot,this.window.mockInstanceId=Math.floor(1e5*Math.random())}stopUsingMock(){this.shouldUseMock=!1}get shouldUseMock(){return this._shouldUseMock}set shouldUseMock(t){this._shouldUseMock=t}}).window,Lt={SITE:"SITE",EDIT:"EDIT",PREVIEW:"PREVIEW",SEO:"SEO"},Rt={DESKTOP:"desktop",MOBILE:"mobile",TABLET:"tablet"};const Ct=new class{constructor(){this.setViewMode=this.setViewMode.bind(this),this.isSiteMode=this.isSiteMode.bind(this),this.isEditMode=this.isEditMode.bind(this),this.isPreviewMode=this.isPreviewMode.bind(this),this.isSEOMode=this.isSEOMode.bind(this),this.setDeviceType=this.setDeviceType.bind(this),this.isDeviceTypeDesktop=this.isDeviceTypeDesktop.bind(this),this.isDeviceTypeMobile=this.isDeviceTypeMobile.bind(this),this.isDeviceTypeTablet=this.isDeviceTypeTablet.bind(this),this.isDeviceTypeTouch=this.isDeviceTypeTouch.bind(this),this._viewMode=Lt.SITE,this._deviceType=Rt.DESKTOP}setViewMode(t){this._viewMode=t}setDeviceType(t){this._deviceType=t}isDeviceTypeMobile(){return this._deviceType===Rt.MOBILE}isDeviceTypeTablet(){return this._deviceType===Rt.TABLET}isDeviceTypeDesktop(){return this._deviceType===Rt.DESKTOP}isDeviceTypeTouch(){return this.isDeviceTypeMobile()||this.isDeviceTypeTablet()}isSiteMode(){return this._viewMode===Lt.SITE}isEditMode(){return this._viewMode===Lt.EDIT}isPreviewMode(){return this._viewMode===Lt.PREVIEW}isSEOMode(){return this._viewMode===Lt.SEO}},xt=(Ct.isSiteMode,Ct.isEditMode),Mt=Ct.isPreviewMode,Dt=(Ct.isSEOMode,Ct.isDeviceTypeMobile),Nt=(Ct.isDeviceTypeTablet,Ct.isDeviceTypeDesktop,Ct.isDeviceTypeTouch),Gt={layoutParams:{groups:{density:"layoutParams_groups_density",groupByOrientation:"layoutParams_groups_groupByOrientation",numberOfGroupsPerRow:"layoutParams_groups_numberOfGroupsPerRow",allowedGroupTypes:"layoutParams_groups_allowedGroupTypes",repeatingGroupTypes:"layoutParams_groups_repeatingGroupTypes",groupSize:"layoutParams_groups_groupSize"},crop:{method:"layoutParams_crop_method",alignment:"layoutParams_crop_alignment",enable:"layoutParams_crop_enable",enableSmartCrop:"layoutParams_crop_enableSmartCrop",cropOnlyFill:"layoutParams_crop_cropOnlyFill",ratios:"layoutParams_crop_ratios"},structure:{galleryLayout:"layoutParams_structure_galleryLayout",galleryRatio:{value:"layoutParams_structure_galleryRatio_value",includeExternalInfo:"layoutParams_structure_galleryRatio_includeExternalInfo"},enableStreching:"layoutParams_structure_enableStreching",gallerySpacing:"layoutParams_structure_gallerySpacing",itemSpacing:"layoutParams_structure_itemSpacing",scrollDirection:"layoutParams_structure_scrollDirection",numberOfColumns:"layoutParams_structure_numberOfColumns",numberOfGridRows:"layoutParams_structure_numberOfGridRows",responsiveMode:"layoutParams_structure_responsiveMode",columnRatios:"layoutParams_structure_columnRatios",scatter:{randomScatter:"layoutParams_structure_scatter_randomScatter",manualScatter:"layoutParams_structure_scatter_manualScatter"},layoutOrientation:"layoutParams_structure_layoutOrientation",groupsOrder:"layoutParams_structure_groupsOrder"},thumbnails:{enable:"layoutParams_thumbnails_enable",position:"layoutParams_thumbnails_position",spacing:"layoutParams_thumbnails_spacing",marginToGallery:"layoutParams_thumbnails_marginToGallery",size:"layoutParams_thumbnails_size",alignment:"layoutParams_thumbnails_alignment"},navigationArrows:{enable:"layoutParams_navigationArrows_enable",size:"layoutParams_navigationArrows_size",padding:"layoutParams_navigationArrows_padding",position:"layoutParams_navigationArrows_position",verticalAlignment:"layoutParams_navigationArrows_verticalAlignment",type:"layoutParams_navigationArrows_type",container:{type:"layoutParams_navigationArrows_container_type",borderRadius:"layoutParams_navigationArrows_container_borderRadius",backgroundColor:"layoutParams_navigationArrows_container_backgroundColor"},mouseCursorContainerMaxWidth:"layoutParams_navigationArrows_mouseCursorContainerMaxWidth"},info:{sizeUnits:"layoutParams_info_sizeUnits",width:"layoutParams_info_width",height:"layoutParams_info_height",spacing:"layoutParams_info_spacing",layout:"layoutParams_info_layout",border:{width:"layoutParams_info_border_width",color:"layoutParams_info_border_color",radius:"layoutParams_info_border_radius"},placement:"layoutParams_info_placement"},targetItemSize:{unit:"layoutParams_targetItemSize_unit",value:"layoutParams_targetItemSize_value",minimum:"layoutParams_targetItemSize_minimum"}},behaviourParams:{item:{clickAction:"behaviourParams_item_clickAction",video:{speed:"behaviourParams_item_video_speed",volume:"behaviourParams_item_video_volume",loop:"behaviourParams_item_video_loop",playTrigger:"behaviourParams_item_video_playTrigger",enablePlayButton:"behaviourParams_item_video_enablePlayButton",enableThumbnailsPlayButton:"behaviourParams_item_video_enableThumbnailsPlayButton",enableControls:"behaviourParams_item_video_enableControls",enablePlaceholder:"behaviourParams_item_video_enablePlaceholder"},threeDimensionalScene:{transform:{rotation:"behaviourParams_item_threeDimensionalScene_transform_rotation",scale:"behaviourParams_item_threeDimensionalScene_transform_scale",position:"behaviourParams_item_threeDimensionalScene_transform_position"},controls:{enableZoom:"behaviourParams_item_threeDimensionalScene_controls_enableZoom",enableRotate:"behaviourParams_item_threeDimensionalScene_controls_enableRotate",enablePan:"behaviourParams_item_threeDimensionalScene_controls_enablePan",enableAutoRotate:"behaviourParams_item_threeDimensionalScene_controls_enableAutoRotate"},enablePlayButton:"behaviourParams_item_threeDimensionalScene_enablePlayButton",enableThumbnailsPlayButton:"behaviourParams_item_threeDimensionalScene_enableThumbnailsPlayButton",playTrigger:"behaviourParams_item_threeDimensionalScene_playTrigger"},overlay:{hoveringBehaviour:"behaviourParams_item_overlay_hoveringBehaviour",hoverAnimation:"behaviourParams_item_overlay_hoverAnimation",position:"behaviourParams_item_overlay_position",size:"behaviourParams_item_overlay_size",sizeUnits:"behaviourParams_item_overlay_sizeUnits",padding:"behaviourParams_item_overlay_padding",backgroundColor:"behaviourParams_item_overlay_backgroundColor"},content:{hoverAnimation:"behaviourParams_item_content_hoverAnimation",placementAnimation:"behaviourParams_item_content_placementAnimation",loader:"behaviourParams_item_content_loader",magnificationValue:"behaviourParams_item_content_magnificationValue",tiltAngleValue:"behaviourParams_item_content_tiltAngleValue"},secondaryMedia:{trigger:"behaviourParams_item_secondaryMedia_trigger",behaviour:"behaviourParams_item_secondaryMedia_behaviour"}},gallery:{layoutDirection:"behaviourParams_gallery_layoutDirection",blockContextMenu:"behaviourParams_gallery_blockContextMenu",scrollAnimation:"behaviourParams_gallery_scrollAnimation",enableIndexingShareLinks:"behaviourParams_gallery_enableIndexingShareLinks",vertical:{loadMore:{enable:"behaviourParams_gallery_vertical_loadMore_enable",amount:"behaviourParams_gallery_vertical_loadMore_amount",text:"behaviourParams_gallery_vertical_loadMore_text"}},horizontal:{enableScrollSnap:"behaviourParams_gallery_horizontal_enableScrollSnap",slideAnimation:"behaviourParams_gallery_horizontal_slideAnimation",slideTransition:"behaviourParams_gallery_horizontal_slideTransition",blockScroll:"behaviourParams_gallery_horizontal_blockScroll",navigationDuration:"behaviourParams_gallery_horizontal_navigationDuration",loop:"behaviourParams_gallery_horizontal_loop",autoSlide:{behaviour:"behaviourParams_gallery_horizontal_autoSlide_behaviour",interval:"behaviourParams_gallery_horizontal_autoSlide_interval",pauseOnHover:"behaviourParams_gallery_horizontal_autoSlide_pauseOnHover",speed:"behaviourParams_gallery_horizontal_autoSlide_speed"},slideshowInfo:{buttonsAlignment:"behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment",enableCounter:"behaviourParams_gallery_horizontal_slideshowInfo_enableCounter",enablePlayButton:"behaviourParams_gallery_horizontal_slideshowInfo_enablePlayButton"}}}},stylingParams:{arrowsColor:"stylingParams_arrowsColor",itemShadowBlur:"stylingParams_itemShadowBlur",itemShadowDirection:"stylingParams_itemShadowDirection",itemShadowOpacityAndColor:"stylingParams_itemShadowOpacityAndColor",itemShadowSize:"stylingParams_itemShadowSize",itemEnableShadow:"stylingParams_itemEnableShadow",itemBorderRadius:"stylingParams_itemBorderRadius",itemBorderWidth:"stylingParams_itemBorderWidth",itemBorderColor:"stylingParams_itemBorderColor",itemResolutionMode:"stylingParams_itemResolutionMode"}},Ht={JSON_FIXED:-3,DESIGNED_PRESET:-2,EMPTY:-1,COLLAGE:0,MASONRY:1,GRID:2,THUMBNAIL:3,SLIDER:4,SLIDESHOW:5,PANORAMA:6,COLUMN:7,MAGIC:8,FULLSIZE:9,BRICKS:10,MIX:11,ALTERNATE:12},kt={OVERLAY:"OVERLAY",ABOVE:"ABOVE",BELOW:"BELOW",LEFT:"LEFT",RIGHT:"RIGHT",ALTERNATE_HORIZONTALLY:"ALTERNATE_HORIZONTALLY",ALTERNATE_VERTICALLY:"ALTERNATE_VERTICALLY"},zt=t=>String(t).includes(kt.OVERLAY),Ft=(t,e)=>String(t).includes(kt.ABOVE)||e%2==0&&String(t).includes(kt.ALTERNATE_VERTICALLY),Ut=(t,e)=>String(t).includes(kt.BELOW)||e%2==1&&String(t).includes(kt.ALTERNATE_VERTICALLY),Wt=(t,e)=>String(t).includes(kt.RIGHT)||e%2==0&&String(t).includes(kt.ALTERNATE_HORIZONTALLY),Bt=(t,e)=>String(t).includes(kt.LEFT)||e%2==1&&String(t).includes(kt.ALTERNATE_HORIZONTALLY),jt=t=>Ft(t,0)||Ut(t,1),Vt=t=>Wt(t,0)||Bt(t,1),Yt=t=>String(t)===kt.ABOVE,$t=t=>String(t)===kt.BELOW,Kt=t=>String(t)===kt.OVERLAY,Zt=t=>{const e=t.split(","),i=e.shift();return(t=>Yt(t)||$t(t))(i)&&e.every((t=>t===i))},Xt={HOVER:"HOVER",AUTO:"AUTO",CLICK:"CLICK"},qt={events:{APP_LOADED:"APP_LOADED",ITEM_CREATED:"ITEM_CREATED",ITEM_LOADED:"ITEM_LOADED",GALLERY_CHANGE:"GALLERY_CHANGE",ITEM_ACTION_TRIGGERED:"ITEM_ACTION_TRIGGERED",CURRENT_ITEM_CHANGED:"CURRENT_ITEM_CHANGED",NEED_MORE_ITEMS:"NEED_MORE_ITEMS",VIDEO_ENDED:"VIDEO_ENDED",VIDEO_ERROR:"VIDEO_ERROR",VIDEO_PAUSED:"VIDEO_PAUSED",VIDEO_PLAYED:"VIDEO_PLAYED",HOVER_SET:"HOVER_SET",LOAD_MORE_CLICKED:"LOAD_MORE_CLICKED",ITEM_CLICKED:"ITEM_CLICKED",THUMBNAIL_CLICKED:"THUMBNAIL_CLICKED",ITEM_FOCUSED:"ITEM_FOCUSED",ITEM_LOST_FOCUS:"ITEM_LOST_FOCUS",GALLERY_SCROLLED:"GALLERY_SCROLLED",NAVIGATION_API_READY:"NAVIGATION_API_READY",GALLERY_NAVIGATION_START:"GALLERY_NAVIGATION_START"},deviceType:Rt,isLayout:t=>e=>e[Gt.layoutParams.structure.galleryLayout]===Ht[t],hasExternalAbovePlacement:Ft,hasExternalBelowPlacement:Ut,hasHoverPlacement:zt,hasExternalRightPlacement:Wt,hasExternalLeftPlacement:Bt,hasExternalVerticalPlacement:jt,hasExternalHorizontalPlacement:Vt,isExternalAbovePlacement:Yt,isExternalBelowPlacement:$t,isHoverPlacement:Kt,isExternalRightPlacement:t=>String(t)===kt.RIGHT,isExternalLeftPlacement:t=>String(t)===kt.LEFT,isExternalVerticalPlacement:t=>jt(t)&&!Vt(t)&&!zt(t),isExternalHorizontalPlacement:t=>Vt(t)&&!jt(t)&&!zt(t),isConstantVerticalPlacement:Zt,resizeMethods:{FILL:"fill",FIT:"fit",FULL:"full",VIDEO:"video"},socialNetworks:{FACEBOOK:"facebook",TWITTER:"twitter",PINTEREST:"pinterest",EMAIL:"email",TUMBLR:"tumblr"},urlSizes:{RESIZED:"resized",MULTI:"multi",SCALED:"scaled",PIXEL:"pixel",THUMBNAIL:"thumbnail",SQUARE:"square",FULL:"full",SAMPLE:"sample",PRELOAD:"preload",DOWNLOAD:"download",DOWNLOAD_SAMPLE:"download_sample",MAGNIFIED:"magnified"},urlTypes:{HIGH_RES:"img",LOW_RES:"thumb",VIDEO:"video",THREE_D:"3d"},viewMode:Lt,layoutParams_crop_method:{FILL:"FILL",FIT:"FIT",MIN:"MIN",MAX:"MAX"},layoutParams_crop_alignment:{CENTER:"CENTER",TOP:"TOP",LEFT:"LEFT",RIGHT:"RIGHT",BOTTOM:"BOTTOM"},layoutParams_structure_galleryLayout:Ht,layoutParams_structure_groupsOrder:{BY_HEIGHT:"BY_HEIGHT",LEFT_TO_RIGHT:"LEFT_TO_RIGHT"},layoutParams_structure_layoutOrientation:{VERTICAL:"VERTICAL",HORIZONTAL:"HORIZONTAL"},layoutParams_structure_responsiveMode:{FIT_TO_SCREEN:"FIT_TO_SCREEN",SET_ITEMS_PER_ROW:"SET_ITEMS_PER_ROW"},layoutParams_structure_scrollDirection:{VERTICAL:"VERTICAL",HORIZONTAL:"HORIZONTAL"},layoutParams_groups_allowedGroupTypes:{1:"1","2v":"2v","2h":"2h","3r":"3r","3b":"3b","3t":"3t","3l":"3l","3v":"3v","3h":"3h"},layoutParams_thumbnails_alignment:{BOTTOM:"BOTTOM",LEFT:"LEFT",TOP:"TOP",RIGHT:"RIGHT"},layoutParams_navigationArrows_verticalAlignment:{ITEM_CENTER:"ITEM_CENTER",IMAGE_CENTER:"IMAGE_CENTER",INFO_CENTER:"INFO_CENTER"},layoutParams_navigationArrows_position:{ON_GALLERY:"ON_GALLERY",OUTSIDE_GALLERY:"OUTSIDE_GALLERY",MOUSE_CURSOR:"MOUSE_CURSOR"},layoutParams_navigationArrows_type:{DEFAULT_ARROW:"DEFAULT_ARROW",ARROW_2:"ARROW_2",ARROW_3:"ARROW_3",ARROW_4:"ARROW_4",ARROW_5:"ARROW_5",ARROW_6:"ARROW_6",ARROW_7:"ARROW_7"},layoutParams_navigationArrows_container_type:{NONE:"NONE",SHADOW:"SHADOW",BOX:"BOX"},layoutParams_info_layout:{NO_BACKGROUND:"NO_BACKGROUND",ATTACHED_BACKGROUND:"ATTACHED_BACKGROUND",SEPARATED_BACKGROUND:"SEPARATED_BACKGROUND",DONT_SHOW:"DONT_SHOW"},layoutParams_info_sizeUnits:{PERCENT:"PERCENT",PIXEL:"PIXEL"},layoutParams_info_placement:kt,layoutParams_targetItemSize_unit:{SMART:"SMART",PIXEL:"PIXEL",PERCENT:"PERCENT"},behaviourParams_item_clickAction:{ACTION:"ACTION",LINK:"LINK",NOTHING:"NOTHING",MAGNIFY:"MAGNIFY"},behaviourParams_item_video_playTrigger:Xt,behaviourParams_item_overlay_hoveringBehaviour:{APPEARS:"APPEARS",DISAPPEARS:"DISAPPEARS",ALWAYS_SHOW:"ALWAYS_SHOW",NEVER_SHOW:"NEVER_SHOW"},behaviourParams_item_overlay_hoverAnimation:{NO_EFFECT:"NO_EFFECT",FADE_IN:"FADE_IN",EXPAND:"EXPAND",SLIDE_UP:"SLIDE_UP",SLIDE_RIGHT:"SLIDE_RIGHT",SLIDE_DOWN:"SLIDE_DOWN",SLIDE_LEFT:"SLIDE_LEFT"},behaviourParams_item_overlay_position:{LEFT:"LEFT",RIGHT:"RIGHT",BOTTOM:"BOTTOM",TOP:"TOP",CENTERED_VERTICALLY:"CENTERED_VERTICALLY",CENTERED_HORIZONTALLY:"CENTERED_HORIZONTALLY"},behaviourParams_item_overlay_sizeUnits:{PIXEL:"PIXEL",PERCENT:"PERCENT"},behaviourParams_item_content_hoverAnimation:{NO_EFFECT:"NO_EFFECT",ZOOM_IN:"ZOOM_IN",TILT:"TILT",BLUR:"BLUR",GRAYSCALE:"GRAYSCALE",SHRINK:"SHRINK",INVERT:"INVERT",COLOR_IN:"COLOR_IN",DARKENED:"DARKENED",MAIN_COLOR:"MAIN_COLOR"},behaviourParams_item_content_placementAnimation:{NO_EFFECT:"NO_EFFECT",SLIDE:"SLIDE"},behaviourParams_item_content_loader:{BLUR:"BLUR",COLOR:"COLOR",MAIN_COLOR:"MAIN_COLOR"},behaviourParams_item_secondaryMedia_trigger:{OFF:"OFF",HOVER:"HOVER"},behaviourParams_item_secondaryMedia_behaviour:{APPEARS:"APPEARS"},behaviourParams_gallery_layoutDirection:{LEFT_TO_RIGHT:"LEFT_TO_RIGHT",RIGHT_TO_LEFT:"RIGHT_TO_LEFT"},behaviourParams_gallery_scrollAnimation:{NO_EFFECT:"NO_EFFECT",FADE_IN:"FADE_IN",GRAYSCALE:"GRAYSCALE",SLIDE_UP:"SLIDE_UP",EXPAND:"EXPAND",SHRINK:"SHRINK",ZOOM_OUT:"ZOOM_OUT",ONE_COLOR:"ONE_COLOR",MAIN_COLOR:"MAIN_COLOR",BLUR:"BLUR"},behaviourParams_gallery_vertical_loadMore_amount:{PARTIAL:"PARTIAL",ALL:"ALL"},behaviourParams_gallery_horizontal_slideAnimation:{SCROLL:"SCROLL",FADE:"FADE",DECK:"DECK"},behaviourParams_gallery_horizontal_slideTransition:{EASE:"cubic-bezier(0.46,0.1,0.25,1)"},behaviourParams_gallery_horizontal_autoSlide_behaviour:{OFF:"OFF",INTERVAL:"INTERVAL",CONTINUOUS:"CONTINUOUS"},behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment:{LEFT:"LEFT",RIGHT:"RIGHT",CENTER:"CENTER"},behaviourParams_item_threeDimensionalScene_playTrigger:Xt,parse3DDimensions:t=>({x:parseFloat(t.split("x")[1].split("y")[0]),y:parseFloat(t.split("y")[1].split("z")[0]),z:parseFloat(t.split("z")[1])}),stylingParams_itemResolutionMode:{FULL:"FULL",SCALED_DOWN:"SCALED_DOWN"},layoutParams_thumbnails_position:{ON_GALLERY:"ON_GALLERY",OUTSIDE_GALLERY:"OUTSIDE_GALLERY"}};const Jt=new class{constructor(){this._cache={},this._hash2int={},this._params={},Object.assign(this,s)}shouldUseCache(){return!xt()&&!Mt()&&!this.isSSR()}isUndefined(t){return void 0===t}uniqueBy(t,e){return t.filter(((t,i,r)=>r.map((t=>t[e])).indexOf(t[e])===i))}inRange(t,e,i=e){if(0===e)return-1;for(;t<0;)t+=e;for(;t>i;)t-=e;return t}sliceArrayWithRange(t,e,i){return Array(i-e).fill(0).map(((i,r)=>{const s=e+r;return t[this.inRange(s,t.length,t.length-1)]}))}sliceArrayIfAvailable(t,e,i){let r=Math.max(e,0),s=Math.min(i,t.length);return r>e&&(s=Math.min(s+(r-e),t.length)),s{r=e.split("="),r[0]===t&&(i=decodeURIComponent(r[1]))})),!i){const e=decodeURIComponent(s.pathname).split("?")[1];if(!e)return"";e.split("&").forEach((e=>{r=e.split("="),r[0]===t&&(i=decodeURIComponent(r[1]))}))}return this._params[t]=i,i}catch(t){return!1}}stripSlashes(t){let e="";return"string"==typeof t&&(e=t.replace(/\\\//g,"/").replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\0/g,"\0").replace(/\\\\/g,"\\")),e}parseStringObject(t){if("string"!=typeof t)return t;const e=this.stripSlashes(t);if("string"==typeof t&&/^[\],:{}\s]*$/.test(e.replace(/\\["\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))try{return JSON.parse(e)}catch(t){}return e}hashCode(t){let e,i,r=0;if(0===t.length)return r;for(e=0;e{const t=this.parseGetParam("deviceType")||wt.deviceType,e="true"===this.parseGetParam("showMobileView"),i=Dt();return!!e||(t?String(t).toLowerCase().indexOf("mobile")>=0:i||void 0)}))}isUserAgentMobile(){try{const t=()=>{let t=!1;var e;return e=navigator.userAgent||navigator.vendor||wt.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|pixel|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))&&(t=!0),t};return this.getOrPutFromCache("isUserAgentMobile",t)}catch(t){return!1}}isMobile(){return this.getOrPutFromCache("isMobile",(()=>{const t=this.isMobileByProps(),e=this.isUserAgentMobile();return this.isUndefined(t)?e:t}))}isTouch(){return this.getOrPutFromCache("isTouch",(()=>{var t;const e=Nt(),i=(null===(t=wt.navigator)||void 0===t?void 0:t.maxTouchPoints)>0||"ontouchstart"in wt.document.documentElement;return this.isUndefined(e)?i:e}))}isTest(){try{return wt.isTest}catch(t){return!1}}isLocal(){try{const t=wt.location.hostname;return"local.wix.com"===t||(t.indexOf("localhost")>=0||"true"===this.parseGetParam("debug"))}catch(t){return!1}}isDev(){return this.getOrPutFromCache("isDev",(()=>this.shouldDebug("ph_local")||this.isOOI()&&!1||"true"===(this.safeLocalStorage()||{}).forceDevMode))}isVerbose(){return!this.isTest()&&"true"===(this.safeLocalStorage()||{}).forceDevMode}isStoreGallery(){return this.getOrPutFromCache("isStoreGallery",(()=>{try{return wt.location.search.toLowerCase().indexOf("isstore")>-1}catch(t){return this.isDev()&&console.error("cant find window",t),!1}}))}isSSR(){return void 0!==i.g&&void 0===(null===i.g||void 0===i.g?void 0:i.g.window)}isOOI(){return this.isSSR()||"undefined"!=typeof top&&"undefined"!=typeof self&&(top===self||self.location.origin.includes("editor.wix.com"))}generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=Math.floor(16*Math.random())||0;return"x"===t?e.toString(16):t}))}isExternalUrl(t){return/(^https?)|(^data)|(^blob)/.test(t)}isiOS(){return this.getOrPutFromCache("isiOS",(()=>{try{return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!wt.MSStream}catch(t){return!1}}))}isiPhone(){return this.getOrPutFromCache("isiPhone",(()=>{try{return/iPhone/.test(navigator.userAgent)&&!wt.MSStream}catch(t){return!1}}))}isLandscape(){return this.getOrPutFromCache("isLandscape",(()=>{if(!this.isMobile())return!1;try{if(this.isUndefined(wt.orientation)){const t=wt.matchMedia("(orientation: landscape)");return!(!t||!0!==t.matches)}return 90===wt.orientation||-90===wt.orientation}catch(t){return!1}}))}safeLocalStorage(){try{return localStorage||wt}catch(t){return wt}}shouldDebug(t){try{return!!this.safeLocalStorage()[t]||(wt.debugApp||"").indexOf(t)>=0||(this.parseGetParam("debugApp")||"").indexOf(t)>=0}catch(t){return!1}}deviceHasMemoryIssues(){return this.isiOS()}getTabIndex(t){const e=["currentGalleryItem","loadMoreButton","slideshowNext","slideshowPrev","currentThumbnail","slideshowLove","slideshowShare","cartIcon","cartClose","cartFrame","fullscreenClose","fullscreenNext","fullscreenPrev","fullscreenInfo","fullscreenLink","fullscreenProvider","fullscreenCartButton","fullscreenCheckout","fullscreenExpand","fullscreenVideoPlay","fullscreenVideoBar","fullscreenVideoMute","fullscreenVideoVolume","fullscreenCartIcon","fullscreenDownload","fullscreenLove","fullscreenShare"].indexOf(t)+1;return e>=0&&this.isOOI()?0:e||-1}setStateAndLog(t,e,i,r){if(this.isVerbose()){console.log(`State Change Called (${e})`,i);const s=Object.assign({},t.state);t.setState(i,(()=>{const i=Object.assign({},t.state),a=this.printableObjectsDiff(s,i,"state");Object.keys(a).length>0&&console.log(`State Change Completed (${e})`,a),this.isFunction(r)&&r.bind(t)()}))}else t.setState(i,(()=>{this.isFunction(r)&&r.bind(t)()}))}printableObjectsDiff(t,e,i=""){const r=t=>(""===t?t="''":this.isUndefined(t)&&(t="undefined"),String(t)),s=(t={},e={},i,a=1)=>{if(a>3)return{};return Object.entries(t).reduce(((t,[o,n])=>(this.isEqual(n,e[o])||(Array.isArray(e[o])?(n.length!==e[o].length&&(t[o+".length"]="["+n.length+"] => ["+e[o].length+"]"),t=Object.assign(t,s(n,e[o],(i?i+".":"")+o,a+1))):"object"==typeof e[o]?t=Object.assign(t,s(n,e[o],(i?i+".":"")+o,a+1)):t[(i?i+".":"")+o]=r(n)+" => "+r(e[o])),t)),{})};return s(t,e,i,1)}getScreenWidth(){if(Mt()&&this.isMobile())return 320;if(this.isTest())return 1920;try{return this.isLandscape()?Math.max(wt.screen.width,wt.screen.height):wt.screen.width}catch(t){return 1920}}getScreenHeight(){if(this.isTest())return 1200;try{return this.isLandscape()?Math.min(wt.screen.width,wt.screen.height):wt.screen.height}catch(t){return 1200}}getWindowWidth(){try{return wt.innerWidth||980}catch(t){return 980}}getMobileEnabledClick(t){return this.isMobile()?{onTouchEnd:t}:{onClick:t}}getTopUrlParam(t){if(this.isUndefined(this._cache.params)&&(this._cache.params={}),this.isUndefined(this._cache.params[t]))try{this._cache.params[t]=top.location.search.replace("?","").split("&").map((e=>{const i=e.split("=");return i[0]===t&&i[1]||""})).join("")}catch(e){this._cache.params[t]=!1}return this._cache.params[t]}scrollTo(t,e,i,r,s){this.isMobile()&&(i=0);const a=r?t.scrollLeft:t.scrollTop,o=e-a;let n=0;const l=()=>{n+=20;const e=((t,e,i,r)=>0===r?i+e:(t/=r/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e)(n,a,o,i);n"object"!=typeof e&&-1===String(t).indexOf("Expand")&&-1===String(t).indexOf("Color"))).map((([t,e])=>`${t}=${encodeURI(e)}`)).join("&");console.log("Gallery Playground link:",`https://pro-gallery.surge.sh?${e}`)}}catch(t){console.error(t)}}isSingleItemHorizontalDisplay(t){return t.scrollDirection===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&1===t[Gt.layoutParams.groups.groupSize]&&t[Gt.layoutParams.crop.enable]&&1===t[Gt.layoutParams.crop.ratios].length&&"100%/100%"===t[Gt.layoutParams.crop.ratios][0]}getAriaAttributes({proGalleryRole:t,proGalleryRegionLabel:e}){const i="application"===t?"gallery application":"region",r={role:t||"region","aria-label":e};return(t||"region")!==i&&(r["aria-roledescription"]=i),r}focusGalleryElement(t){t.focus()}isMeaningfulString(t){return"string"==typeof t&&!!t.trim().length}isHeightSetByGallery(t){return t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&!t[Gt.behaviourParams.gallery.vertical.loadMore.enable]}};function Qt(t,e,i,r=!0){let s=r?Object.assign({},t):t,a=e.split("_"),o=a.pop(),n=s;return a.forEach((t=>{"object"!=typeof n[t]&&(n[t]={}),n=n[t]})),n[o]=i,s}function te(t){var e={};for(var i in t)if(t.hasOwnProperty(i))if("object"==typeof t[i]&&!(t[i]instanceof Array)&&null!==t[i]&&Object.keys(t[i]).length>0){var r=te(t[i]);for(var s in r)r.hasOwnProperty(s)&&(e[i+"_"+s]=r[s])}else e[i]=t[i];return e}function ee(t){return Object.entries(t).reduce(((t,[e,i])=>Qt(t,e,i,false)),{})}const ie=te({layoutParams:{crop:{ratios:[1],method:qt[Gt.layoutParams.crop.method].FILL,enable:!1,enableSmartCrop:!1,cropOnlyFill:!1,alignment:qt[Gt.layoutParams.crop.alignment].CENTER},structure:{galleryLayout:-1,galleryRatio:{value:0,includeExternalInfo:!1},scrollDirection:qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,gallerySpacing:0,itemSpacing:10,enableStreching:!0,responsiveMode:qt[Gt.layoutParams.structure.responsiveMode].FIT_TO_SCREEN,scatter:{randomScatter:0,manualScatter:""},layoutOrientation:qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,groupsOrder:qt[Gt.layoutParams.structure.groupsOrder].BY_HEIGHT,numberOfGridRows:1,numberOfColumns:3,columnRatios:[]},groups:{groupByOrientation:!0,numberOfGroupsPerRow:0,density:.8,groupSize:3,allowedGroupTypes:[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3t"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3b"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"]],repeatingGroupTypes:[]},thumbnails:{size:120,spacing:4,marginToGallery:0,enable:!1,position:qt[Gt.layoutParams.thumbnails.position].OUTSIDE_GALLERY,alignment:qt[Gt.layoutParams.thumbnails.alignment].BOTTOM},navigationArrows:{enable:!0,position:qt[Gt.layoutParams.navigationArrows.position].ON_GALLERY,padding:23,size:23,verticalAlignment:qt[Gt.layoutParams.navigationArrows.verticalAlignment].ITEM_CENTER,type:qt[Gt.layoutParams.navigationArrows.type].DEFAULT_ARROW,container:{type:qt[Gt.layoutParams.navigationArrows.container.type].SHADOW,backgroundColor:"",borderRadius:-1}},targetItemSize:{unit:qt[Gt.layoutParams.targetItemSize.unit].SMART,value:30,minimum:120},info:{sizeUnits:qt[Gt.layoutParams.info.sizeUnits].PERCENT,width:50,height:200,spacing:10,layout:qt[Gt.layoutParams.info.layout].NO_BACKGROUND,placement:qt[Gt.layoutParams.info.placement].OVERLAY,border:{width:0,radius:0,color:""}}},behaviourParams:{item:{clickAction:qt[Gt.behaviourParams.item.clickAction].NOTHING,video:{playTrigger:qt[Gt.behaviourParams.item.video.playTrigger].HOVER,loop:!0,volume:0,enableControls:!1,speed:1,enablePlayButton:!1,enableThumbnailsPlayButton:!1,enablePlaceholder:!0},overlay:{hoveringBehaviour:qt[Gt.behaviourParams.item.overlay.hoveringBehaviour].APPEARS,hoverAnimation:qt[Gt.behaviourParams.item.overlay.hoverAnimation].NO_EFFECT,position:qt[Gt.behaviourParams.item.overlay.position].LEFT,size:100,sizeUnits:qt[Gt.behaviourParams.item.overlay.sizeUnits].PERCENT,padding:0},content:{hoverAnimation:qt[Gt.behaviourParams.item.content.hoverAnimation].NO_EFFECT,loader:qt[Gt.behaviourParams.item.content.loader].BLUR,placementAnimation:qt[Gt.behaviourParams.item.content.placementAnimation].NO_EFFECT,magnificationValue:2,tiltAngleValue:-4},secondaryMedia:{trigger:qt[Gt.behaviourParams.item.secondaryMedia.trigger].OFF,behaviour:qt[Gt.behaviourParams.item.secondaryMedia.behaviour].APPEARS},threeDimensionalScene:{controls:{enableAutoRotate:!1,enablePan:!0,enableRotate:!0,enableZoom:!1},transform:{rotation:"x0y0z0",scale:"x1y1z1",position:"x0y0z0"},playTrigger:qt[Gt.behaviourParams.item.threeDimensionalScene.playTrigger].HOVER,enablePlayButton:!1,enableThumbnailsPlayButton:!1,enablePlaceholder:!0}},gallery:{blockContextMenu:!0,layoutDirection:qt[Gt.behaviourParams.gallery.layoutDirection].LEFT_TO_RIGHT,scrollAnimation:qt[Gt.behaviourParams.gallery.scrollAnimation].NO_EFFECT,enableIndexingShareLinks:!0,horizontal:{enableScrollSnap:!1,navigationDuration:400,blockScroll:!1,loop:!1,slideTransition:qt[Gt.behaviourParams.gallery.horizontal.slideTransition].EASE,slideAnimation:qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,autoSlide:{behaviour:qt[Gt.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF,interval:4,pauseOnHover:!0,speed:200},slideshowInfo:{buttonsAlignment:qt[Gt.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment].CENTER,enablePlayButton:!1,enableCounter:!1}},vertical:{loadMore:{enable:!1,text:"",amount:qt[Gt.behaviourParams.gallery.vertical.loadMore.amount].ALL}}}},stylingParams:{itemBorderWidth:0,itemBorderRadius:0,itemEnableShadow:!1,itemBorderColor:"",itemShadowBlur:20,itemShadowDirection:135,itemShadowSize:10,itemShadowOpacityAndColor:"",arrowsColor:""},fixedColumns:0});const re=(t,e)=>{let i=Object.assign({},t);return i[Gt.layoutParams.info.height]=function(t,e){if(!function(t,e){return jt(t[Gt.layoutParams.info.placement])&&e}(t,e))return 0;return t[Gt.layoutParams.info.height]}(i,e),i.externalInfoHeight=function(t,e){let i=e;e>0&&jt(t[Gt.layoutParams.info.placement])&&t[Gt.layoutParams.info.layout]===qt[Gt.layoutParams.info.layout].SEPARATED_BACKGROUND&&(i+=t[Gt.layoutParams.info.spacing],i+=2*t[Gt.layoutParams.info.border.width]);return i}(i,i[Gt.layoutParams.info.height]),i.externalInfoWidth=function(t,e){if(!function(t,e){const i=t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&t[Gt.layoutParams.structure.layoutOrientation]===qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL&&1===t[Gt.layoutParams.groups.groupSize];return i&&Vt(t[Gt.layoutParams.info.placement])&&e}(t,e))return 0;let i=0;i=t[Gt.layoutParams.info.sizeUnits]===qt[Gt.layoutParams.info.sizeUnits].PERCENT?Math.min(100,Math.max(0,t[Gt.layoutParams.info.width]))/100:t[Gt.layoutParams.info.width];return i}(i,e),i},se="OPTIONS",ae=t=>t.replace(/_/g," ").split(" ").map((t=>t[0].toUpperCase()+t.substr(1).toLowerCase())).join(" "),oe=t=>Object.entries(qt[t]).map((([t,e])=>({value:e,title:ae(t)}))),ne={title:"Slide Animation",isRelevant:t=>t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&1===t[Gt.layoutParams.groups.groupSize]&&t[Gt.layoutParams.crop.enable]&&JSON.stringify(t[Gt.layoutParams.crop.ratios])===JSON.stringify(["100%/100%"]),isRelevantDescription:'Set a Horizontal gallery ("Scroll Direction" as "Horizontal"), set "Max Group Size" to "1" and set "Crop Images" to true.',type:se,default:qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,get options(){return oe(Gt.behaviourParams.gallery.horizontal.slideAnimation)},description:"Choose the slide animation effect to be used when navigating between items in a slideshow"},le={title:"Scroll Direction",isRelevant:()=>!0,isRelevantDescription:"Always relevant.",type:se,default:qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,get options(){return oe(Gt.layoutParams.structure.scrollDirection)},description:"Toggle between two types of galleries. Vertical and Horizontal. Notice that many options are available only for a specific scroll direction."},he=t=>le.isRelevant(t)&&t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,ue={title:"Navigation Arrows Position",isRelevant:t=>he(t)&&t[Gt.layoutParams.navigationArrows.enable],isRelevantDescription:'Set a Horizontal gallery ("Scroll Direction" as "Horizontal") and set "Show Navigation Arrows" to "true".',type:se,default:qt.layoutParams_navigationArrows_position.ON_GALLERY,get options(){return oe("layoutParams_navigationArrows_position")},description:"Set the position of the navigation arrows in sliders. You can choose to position the arrows on the gallery (ON_GALLERY)\n ,outside the gallery (OUTSIDE_GALLERY- in these case the gallery will margins from both sides to make room for the arrows), or on the mouse cursor (still in experimental mode).);\n "},ce=(t,e)=>t[Gt.layoutParams.targetItemSize.unit]===qt[Gt.layoutParams.targetItemSize.unit].PIXEL&&t[Gt.layoutParams.targetItemSize.value]>0?t[Gt.layoutParams.targetItemSize.value]:t[Gt.layoutParams.targetItemSize.unit]===qt[Gt.layoutParams.targetItemSize.unit].PERCENT&&t[Gt.layoutParams.targetItemSize.value]>0?(wt&&wt.innerWidth||980)*(t[Gt.layoutParams.targetItemSize.value]/100):e>0?e:t[Gt.layoutParams.targetItemSize.value],me=t=>{let e=Object.assign({},t);return e=de(e),e[Gt.layoutParams.structure.scrollDirection]!==qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&e[Gt.layoutParams.structure.layoutOrientation]!==qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL||(e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.density]=0),e},de=t=>{let e=Object.assign({},t);return e.fixedColumns=0,e[Gt.layoutParams.structure.scrollDirection]!==qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&e[Gt.layoutParams.structure.layoutOrientation]!==qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL||(e.fixedColumns=t[Gt.layoutParams.structure.responsiveMode]===qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW?e[Gt.layoutParams.structure.numberOfColumns]:0),e},pe=t=>{let e=Object.assign({},t);return e[Gt.layoutParams.crop.method]===qt[Gt.layoutParams.crop.method].FIT&&(e[Gt.stylingParams.itemBorderWidth]=0,e[Gt.stylingParams.itemBorderRadius]=0,e[Gt.stylingParams.itemEnableShadow]=!1),e};const ge=function(t,e){let i=Object.assign({},t);return Jt.isMobile()&&(i=(t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.itemSpacing]>0&&(e[Gt.layoutParams.structure.itemSpacing]=Math.min(e[Gt.layoutParams.structure.itemSpacing],50)),e})(i)),i=(t=>{let e=Object.assign({},t);return qt.isLayout("SLIDER")(e)||qt.isLayout("COLUMN")(e)||qt.isLayout("SLIDESHOW")(e)||(e[Gt.layoutParams.structure.layoutOrientation]===qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL||e[Gt.layoutParams.groups.groupSize]>1)&&(e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY),e})(i),i=(t=>{let e=Object.assign({},t);return t.EXPERIMENTALallowParallelInfos||zt(e[Gt.layoutParams.info.placement])||e[Gt.behaviourParams.item.overlay.hoveringBehaviour]===qt[Gt.behaviourParams.item.overlay.hoveringBehaviour].NEVER_SHOW||(e[Gt.behaviourParams.item.overlay.hoveringBehaviour]=qt[Gt.behaviourParams.item.overlay.hoveringBehaviour].APPEARS),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.stylingParams.itemEnableShadow]&&e[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&(e[Gt.stylingParams.itemEnableShadow]=!1),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.stylingParams.itemEnableShadow]&&e[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&(e[Gt.layoutParams.structure.gallerySpacing]=Math.max(e[Gt.layoutParams.structure.gallerySpacing],(e[Gt.stylingParams.itemShadowSize]||0)+(e[Gt.stylingParams.itemShadowBlur]||0))),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.layoutParams.navigationArrows.position]===qt[Gt.layoutParams.navigationArrows.position].OUTSIDE_GALLERY&&(e[Gt.layoutParams.navigationArrows.padding]=0),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&(e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].VERTICAL&&(e[Gt.behaviourParams.gallery.horizontal.loop]=!1),e})(i),i=(t=>{let e=Object.assign({},t);return(e[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].VERTICAL||e[Gt.layoutParams.groups.groupSize]>1||!e[Gt.layoutParams.crop.enable])&&(e[Gt.behaviourParams.gallery.horizontal.slideAnimation]=qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL),e})(i),i=(t=>{let e=Object.assign({},t);return e.loadMoreButtonFont&&Jt.isMobile()&&(e.loadMoreButtonFont.value=e.loadMoreButtonFont.value.replace(/^font\s*:\s*/,""),e.loadMoreButtonFont.value=e.loadMoreButtonFont.value.replace(/;$/,""),e.loadMoreButtonFont.value.indexOf("underline")>-1?(e.loadMoreButtonFont.value=e.loadMoreButtonFont.value.replace("underline",""),e.textDecorationLoadMore="underline"):e.textDecorationLoadMore="none"),e})(i),i=re(i,e),i=(t=>{let e=Object.assign({},t);const i=e[Gt.layoutParams.groups.allowedGroupTypes].length>=1&&"1"===e[Gt.layoutParams.groups.allowedGroupTypes].join(""),r=e[Gt.layoutParams.info.placement].split(",").filter((t=>!Kt(t))).join(",");return Zt(r)&&i||(e[Gt.layoutParams.navigationArrows.verticalAlignment]=qt[Gt.layoutParams.navigationArrows.verticalAlignment].ITEM_CENTER),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.behaviourParams.gallery.horizontal.slideshowInfo.enableCounter]?(e[Gt.behaviourParams.gallery.horizontal.autoSlide.behaviour]===qt[Gt.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF&&(e[Gt.behaviourParams.gallery.horizontal.slideshowInfo.enableCounter]=!1),!1===qt.isLayout("SLIDESHOW")(t)&&(e[Gt.behaviourParams.gallery.horizontal.slideshowInfo.enableCounter]=!1),e):e})(i),i=(t=>{let e=Object.assign({},t);return t[Gt.behaviourParams.gallery.horizontal.slideAnimation]!==qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].FADE&&t[Gt.behaviourParams.gallery.horizontal.slideAnimation]!==qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].DECK||!ne.isRelevant(t)||(e[Gt.behaviourParams.gallery.horizontal.blockScroll]=!0),e})(i),i=(t=>{let e=Object.assign({},t);return t[Gt.layoutParams.navigationArrows.position]===qt[Gt.layoutParams.navigationArrows.position].MOUSE_CURSOR&&ue.isRelevant(t)&&(e[Gt.behaviourParams.item.video.enableControls]=!1),e})(i),i=(t=>{let e=Object.assign({},t);return Jt.isTouch()&&t[Gt.layoutParams.navigationArrows.position]===qt[Gt.layoutParams.navigationArrows.position].MOUSE_CURSOR&&ue.isRelevant(t)&&(e[Gt.layoutParams.navigationArrows.enable]=!1),e})(i),i=(t=>{let e=Object.assign({},t);return e[Gt.layoutParams.crop.cropOnlyFill]&&(e[Gt.layoutParams.crop.enable]=e[Gt.layoutParams.crop.method]===qt[Gt.layoutParams.crop.method].FILL),e})(i),i},ye=t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].ALTERNATE,e[Gt.layoutParams.crop.method]=qt[Gt.layoutParams.crop.method].FILL,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.crop.ratios]=[1],e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,e[Gt.layoutParams.groups.groupSize]=3,e[Gt.layoutParams.groups.density]=.48,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3t"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3b"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3h"]],e[Gt.layoutParams.targetItemSize.value]=86,e[Gt.layoutParams.targetItemSize.minimum]=50,e[Gt.layoutParams.groups.groupByOrientation]=!0,e[Gt.layoutParams.groups.repeatingGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"]],e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.numberOfColumns]=1,e[Gt.layoutParams.groups.numberOfGroupsPerRow]=0,e[Gt.layoutParams.structure.groupsOrder]=qt[Gt.layoutParams.structure.groupsOrder].BY_HEIGHT,e.fixedColumns=1,e},ve=(ye({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].BRICKS,e[Gt.layoutParams.crop.method]=qt[Gt.layoutParams.crop.method].FILL,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,e[Gt.layoutParams.groups.groupSize]=3,e[Gt.layoutParams.groups.density]=.8,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3t"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3b"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3h"]],e[Gt.behaviourParams.gallery.horizontal.loop]=!1,e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.targetItemSize.value]=400,e[Gt.layoutParams.targetItemSize.minimum]=50,e[Gt.layoutParams.groups.groupByOrientation]=!0,e[Gt.layoutParams.groups.repeatingGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"]],e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.numberOfColumns]=1,e[Gt.layoutParams.groups.numberOfGroupsPerRow]=0,e[Gt.layoutParams.structure.groupsOrder]=qt[Gt.layoutParams.structure.groupsOrder].BY_HEIGHT,e[Gt.layoutParams.crop.ratios]=[.707,1.414,1.414,.707],e.fixedColumns=1,e}),Pe=(ve({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].COLLAGE,e[Gt.layoutParams.crop.enable]=!1,qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.groups.groupSize]=3,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3t"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3b"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"]],e[Gt.behaviourParams.gallery.horizontal.loop]=!1,e[Gt.layoutParams.structure.numberOfGridRows]=1,e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].FIT_TO_SCREEN,e[Gt.layoutParams.structure.numberOfColumns]=0,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.behaviourParams.gallery.horizontal.slideAnimation]=qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,e.fixedColumns=0,e}),be=(Pe({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].FULLSIZE,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.crop.ratios]=["100%/100%"],e[Gt.layoutParams.crop.method]=qt[Gt.layoutParams.crop.method].FILL,e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.structure.numberOfGridRows]=1,e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.behaviourParams.gallery.horizontal.enableScrollSnap]=!0,e[Gt.layoutParams.crop.cropOnlyFill]=!0,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.itemSpacing]=0,e}),Ae=(be({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].COLUMN,e[Gt.layoutParams.crop.method]=qt[Gt.layoutParams.crop.method].FILL,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.crop.ratios]=[.35],e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.structure.numberOfGridRows]=1,e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.structure.numberOfColumns]=0,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.behaviourParams.gallery.horizontal.slideAnimation]=qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,e.fixedColumns=0,e}),Ie=(Ae({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].GRID,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.behaviourParams.gallery.horizontal.loop]=!1,e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.layoutParams.targetItemSize.minimum]=50,e[Gt.behaviourParams.gallery.horizontal.slideAnimation]=qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,e[Gt.layoutParams.groups.density]=0,e}),fe=(Ie({}),t=>{let e=Object.assign({},t);return e=Ie(e),e.targetItemSize=ce(e,Math.round(8.5*e[Gt.layoutParams.targetItemSize.value]+150)),e=me(e),e=(t=>{let e=Object.assign({},t);if(!Jt.isUndefined(t[Gt.layoutParams.structure.numberOfGridRows])&&t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL)switch(e[Gt.layoutParams.structure.numberOfColumns]=0,t[Gt.layoutParams.structure.numberOfGridRows]){case 1:default:e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.density]=0;break;case 2:e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"]],e[Gt.layoutParams.groups.groupSize]=2,e[Gt.layoutParams.groups.density]=1;break;case 3:e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes]["3v"]],e[Gt.layoutParams.groups.groupSize]=3,e[Gt.layoutParams.groups.density]=1}return e})(e),e=pe(e),e}),_e=t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].MASONRY,e[Gt.layoutParams.crop.enable]=!1,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.behaviourParams.gallery.horizontal.loop]=!1,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e},Se=(_e({}),t=>{let e=Object.assign({},t);e=_e(e);const i=e[Gt.layoutParams.structure.layoutOrientation]===qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,r=t[Gt.layoutParams.targetItemSize.value];return e.targetItemSize=ce(e,i?8*r+200:5*r+200),e=me(e),e=(t=>{let e=Object.assign({},t);const i=e[Gt.layoutParams.structure.layoutOrientation]===qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL;return e[Gt.layoutParams.structure.responsiveMode]=i?t[Gt.layoutParams.structure.responsiveMode]:qt[Gt.layoutParams.structure.responsiveMode].FIT_TO_SCREEN,e})(e),e}),Ee=t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].MIX,e[Gt.layoutParams.crop.method]=qt[Gt.layoutParams.crop.method].FILL,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.crop.ratios]=[1],e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,e[Gt.layoutParams.groups.groupSize]=3,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["2h"],qt[Gt.layoutParams.groups.allowedGroupTypes]["2v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3t"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3b"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3v"],qt[Gt.layoutParams.groups.allowedGroupTypes]["3h"]],e[Gt.layoutParams.groups.density]=.48,e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.targetItemSize.value]=86,e[Gt.layoutParams.targetItemSize.minimum]=50,e[Gt.layoutParams.groups.groupByOrientation]=!0,e[Gt.layoutParams.groups.repeatingGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["3l"],qt[Gt.layoutParams.groups.allowedGroupTypes][1],qt[Gt.layoutParams.groups.allowedGroupTypes]["3r"]],e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.numberOfColumns]=1,e[Gt.layoutParams.groups.numberOfGroupsPerRow]=0,e[Gt.layoutParams.structure.groupsOrder]=qt[Gt.layoutParams.structure.groupsOrder].BY_HEIGHT,e.fixedColumns=1,e},Te=(Ee({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].PANORAMA,e[Gt.layoutParams.crop.enable]=!1,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].VERTICAL,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].VERTICAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.structure.numberOfColumns]=1,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.behaviourParams.gallery.horizontal.loop]=!1,e.fixedColumns=1,e}),Oe=(Te({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].SLIDER,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.structure.numberOfGridRows]=1,e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.behaviourParams.gallery.horizontal.enableScrollSnap]=!0,e[Gt.layoutParams.crop.cropOnlyFill]=!0,e[Gt.behaviourParams.gallery.horizontal.slideAnimation]=qt[Gt.behaviourParams.gallery.horizontal.slideAnimation].SCROLL,e}),we=(Oe({}),function(t){t[Gt.behaviourParams.item.content.placementAnimation]=qt[Gt.behaviourParams.item.content.placementAnimation].NO_EFFECT,t[Gt.behaviourParams.item.overlay.hoverAnimation]=qt[Gt.behaviourParams.item.overlay.hoverAnimation].NO_EFFECT,t[Gt.behaviourParams.item.content.hoverAnimation]=qt[Gt.behaviourParams.item.content.hoverAnimation].NO_EFFECT});const Le=t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].SLIDESHOW,e[Gt.layoutParams.crop.ratios]=["100%/100%"],e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].BELOW,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.stylingParams.itemBorderWidth]=0,e[Gt.stylingParams.itemBorderRadius]=0,e[Gt.stylingParams.itemBorderColor]=void 0,e[Gt.layoutParams.structure.numberOfGridRows]=1,we(e),e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.targetItemSize.value]=550,e[Gt.layoutParams.structure.numberOfColumns]=1,e[Gt.behaviourParams.gallery.horizontal.enableScrollSnap]=!0,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.itemSpacing]=0,e.fixedColumns=1,e},Re=(Le({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].THUMBNAIL,e[Gt.layoutParams.crop.ratios]=["100%/100%"],e[Gt.layoutParams.structure.responsiveMode]=qt[Gt.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW,e[Gt.layoutParams.crop.enable]=!0,e[Gt.layoutParams.info.placement]=qt[Gt.layoutParams.info.placement].OVERLAY,e[Gt.layoutParams.structure.scrollDirection]=qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,e[Gt.layoutParams.structure.gallerySpacing]=0,e[Gt.layoutParams.structure.layoutOrientation]=qt[Gt.layoutParams.structure.layoutOrientation].HORIZONTAL,e[Gt.layoutParams.groups.groupSize]=1,e[Gt.layoutParams.groups.allowedGroupTypes]=[qt[Gt.layoutParams.groups.allowedGroupTypes][1]],e[Gt.layoutParams.structure.numberOfGridRows]=1,e[Gt.layoutParams.crop.enableSmartCrop]=!1,e[Gt.layoutParams.thumbnails.enable]=!0,e[Gt.behaviourParams.gallery.horizontal.enableScrollSnap]=!0,e[Gt.layoutParams.crop.cropOnlyFill]=!1,e[Gt.layoutParams.structure.scatter.randomScatter]=0,e[Gt.layoutParams.structure.scatter.manualScatter]="",e[Gt.layoutParams.structure.itemSpacing]=0,e[Gt.layoutParams.targetItemSize.value]=550,e}),Ce=(Re({}),t=>{let e=Object.assign({},t);return e[Gt.layoutParams.structure.galleryLayout]=qt[Gt.layoutParams.structure.galleryLayout].EMPTY,e}),xe=(Ce({}),t=>{try{const e=t.jsonStyleParams?JSON.parse(t.jsonStyleParams):{};return function(...t){return ee(Object.assign({},...t.map(te)))}(t,ee(e))}catch(t){return{}}}),Me=t=>{const e=qt[Gt.layoutParams.structure.galleryLayout];switch(t[Gt.layoutParams.structure.galleryLayout]){case e.MASONRY:return Se(t);case e.GRID:return fe(t);case e.THUMBNAIL:return(t=>{let e=Object.assign({},t);return e=Re(e),e.targetItemSize=ce(e),e=pe(e),e})(t);case e.SLIDER:return(t=>{let e=Object.assign({},t);return e=Oe(e),e.targetItemSize=ce(e),e=pe(e),e})(t);case e.SLIDESHOW:return(t=>{let e=Object.assign({},t);return e=Le(e),e.targetItemSize=ce(e),e=pe(e),e})(t);case e.PANORAMA:return(t=>{let e=Object.assign({},t);return e=Te(e),e.targetItemSize=ce(e),e})(t);case e.COLUMN:return(t=>{let e=Object.assign({},t);return e=Ae(e),e.targetItemSize=ce(e),e})(t);case e.MAGIC:return console.error("A layout generated by the magicLayoutSeed is no longer supported as of Pro Gallery v5"),t;case e.FULLSIZE:return(t=>{let e=Object.assign({},t);return e=be(e),e.targetItemSize=ce(e),e})(t);case e.BRICKS:return(t=>{let e=Object.assign({},t);return e=ve(e),e.targetItemSize=ce(e),e})(t);case e.MIX:return(t=>{let e=Object.assign({},t);return e=Ee(e),e.targetItemSize=ce(e),e})(t);case e.ALTERNATE:return(t=>{let e=Object.assign({},t);return e=ye(e),e.targetItemSize=ce(e),e})(t);case e.EMPTY:return(t=>{let e=Object.assign({},t);return e=Ce(e),e=de(e),e.targetItemSize=ce(e,Math.round(9*e[Gt.layoutParams.targetItemSize.value]+100)),e})(t);case e.JSON_FIXED:return xe(t);case e.COLLAGE:default:return(t=>{let e=Object.assign({},t);e=Pe(e);const i=t[Gt.layoutParams.targetItemSize.value];return e.targetItemSize=ce(e,Math.round(5*i+500)),e})(t)}},De=t=>t[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL,Ne=t=>{const e=t[Gt.layoutParams.groups.repeatingGroupTypes].length>1?"1"===t[Gt.layoutParams.groups.repeatingGroupTypes].join(""):"1"===t[Gt.layoutParams.groups.allowedGroupTypes].join(""),i=t[Gt.layoutParams.info.placement].split(",").filter((t=>!Kt(t))).join(",");return e&&Zt(i)&&De(t)&&t[Gt.layoutParams.structure.galleryRatio.value]>0};const Ge=new class{constructor(){this.options={},this.container={},this.id="",this._cache={}}getOrPutInCache(t,e){return this._cache[t]||(this._cache[t]=e()),this._cache[t]}dumpCache(){this._cache={}}updateParams({options:t,container:e,id:i}){this.dumpCache(),this.id=i||this.id,this.options=t||this.options,this.container=e||this.container,this.fixHeightForHorizontalGalleryIfNeeded()}getGalleryDimensions(){return this.getOrPutInCache("galleryDimensions",(()=>{const t={galleryWidth:Math.ceil(this.getGalleryWidth()),galleryHeight:Math.ceil(this.getGalleryHeight()),scrollBase:this.container.scrollBase?Math.ceil(this.container.scrollBase):0,height:Math.ceil(this.container.height),width:Math.ceil(this.container.width)};return this.container.externalScrollBase&&(t.scrollBase+=this.container.externalScrollBase),this.options[Gt.layoutParams.thumbnails.enable]&&this.options[Gt.layoutParams.thumbnails.position]===qt[Gt.layoutParams.thumbnails.position].OUTSIDE_GALLERY&&(t.galleryHeight-=this.getThumbnailHeightDelta(),t.galleryWidth-=this.getThumbnailWidthDelta()),this.options[Gt.layoutParams.thumbnails.enable]&&(t.navigationBarHeight=this.getThumbnailHeightDelta()||t.galleryHeight,t.navigationBarWidth=this.getThumbnailWidthDelta()||t.galleryWidth),t}))}getGalleryWidth(){return this.getOrPutInCache("galleryWidth",(()=>{let t=Math.floor(this.container.width)+2*this.getDimensionFix();return this.options[Gt.layoutParams.navigationArrows.position]===qt[Gt.layoutParams.navigationArrows.position].OUTSIDE_GALLERY&&this.options[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&(t-=2*(this.options[Gt.layoutParams.navigationArrows.size]+40+this.options[Gt.layoutParams.structure.itemSpacing]/2)),t}))}getGalleryHeight(){return this.getOrPutInCache("galleryHeight",(()=>Math.floor((this.container.height>0?this.container.height:0)+(()=>this.options[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL?this.getDimensionFix():0)())))}getDimensionFix(){return this.getOrPutInCache("dimensionFix",(()=>Number(this.options[Gt.layoutParams.structure.itemSpacing]/2)-Number(this.options[Gt.layoutParams.structure.gallerySpacing])))}getGalleryRatio(){return this.getOrPutInCache("galleryRatio",(()=>{const t=this.getGalleryDimensions();return t.galleryWidth/t.galleryHeight}))}getThumbnailSize(){return this.options[Gt.layoutParams.thumbnails.size]+this.options[Gt.layoutParams.structure.gallerySpacing]+this.options[Gt.layoutParams.thumbnails.marginToGallery]}getThumbnailHeightDelta(){switch(this.options[Gt.layoutParams.thumbnails.alignment]){case qt[Gt.layoutParams.thumbnails.alignment].TOP:case qt[Gt.layoutParams.thumbnails.alignment].BOTTOM:return this.getThumbnailSize();case qt[Gt.layoutParams.thumbnails.alignment].RIGHT:case qt[Gt.layoutParams.thumbnails.alignment].LEFT:return 0}}getThumbnailWidthDelta(){switch(this.options[Gt.layoutParams.thumbnails.alignment]){case qt[Gt.layoutParams.thumbnails.alignment].TOP:case qt[Gt.layoutParams.thumbnails.alignment].BOTTOM:return 0;case qt[Gt.layoutParams.thumbnails.alignment].RIGHT:case qt[Gt.layoutParams.thumbnails.alignment].LEFT:return this.getThumbnailSize()}}fixHeightForHorizontalGalleryIfNeeded(){if(this.options[Gt.layoutParams.structure.scrollDirection]===qt[Gt.layoutParams.structure.scrollDirection].HORIZONTAL&&this.options[Gt.layoutParams.structure.galleryRatio.value]>0)if(this.options[Gt.layoutParams.thumbnails.enable]&&this.options[Gt.layoutParams.thumbnails.position]===qt[Gt.layoutParams.thumbnails.position].OUTSIDE_GALLERY)switch(this.options[Gt.layoutParams.thumbnails.alignment]){case qt[Gt.layoutParams.thumbnails.alignment].TOP:case qt[Gt.layoutParams.thumbnails.alignment].BOTTOM:this.container.height=this.container.width*this.options[Gt.layoutParams.structure.galleryRatio.value]+this.getThumbnailHeightDelta();break;case qt[Gt.layoutParams.thumbnails.alignment].RIGHT:case qt[Gt.layoutParams.thumbnails.alignment].LEFT:this.container.height=(this.container.width-this.getThumbnailWidthDelta())*this.options[Gt.layoutParams.structure.galleryRatio.value]}else this.container.height=this.container.width*this.options[Gt.layoutParams.structure.galleryRatio.value],!this.options[Gt.layoutParams.structure.galleryRatio.includeExternalInfo]&&Ne(this.options)&&(this.container.height+=this.options.externalInfoHeight)}};const He=new class{createBlueprint({params:t,lastParams:e,existingBlueprint:i,blueprintManagerId:r,isUsingCustomInfoElements:s}){this.reasons={items:"",itemsAdded:"",options:"",container:""};let a={};try{const{container:r,items:o,options:n}=t,{container:l,items:h,options:u}=e,{formattedItems:c,changed:m}=this.formatItemsIfNeeded(o,h),{formattedOptions:d,changed:p}=this.formatOptionsIfNeeded(n,u,s),{formattedContainer:g,changed:y}=this.formatContainerIfNeeded(r,l,u,d||i.options,p),v=m||p||y;if(a={itemsChanged:m,optionsChanged:p,containerChanged:y},v||!i){i||(i={});const t=this.createStructure({formattedContainer:g||i.container,formattedItems:c||i.items,formattedOptions:d||i.options},v);d&&(i.options=d),c&&(i.items=c),g&&(i.container=g),i.structure=t;Jt.isHeightSetByGallery(i.options)&&(i.container.height=i.container.galleryHeight=t.height)}}catch(t){console.error("Could not create blueprint, error:",t)}return{blueprint:i,changedParams:a,blueprintManagerId:r,reasons:Object.entries(this.reasons).reduce(((t,[e,i])=>[...t,`${e}: ${i}`]),[]).join(", ")}}formatItemsIfNeeded(t,e){const i=e;let r,s=!1;return((t,e)=>{if(t===e)return this.reasons.itemsAdded="items are the same object.",!1;if(!t)return this.reasons.itemsAdded="new items do not exist.",!1;if(!e||e&&0===e.length)return this.reasons.itemsAdded="old items do not exist.",!1;if(e.length>=t.length)return this.reasons.itemsAdded="more old items than new items.",!1;const i=e.reduce(((e,i,r)=>e&&i.id===t[r].itemId),!0);return i||(this.reasons.itemsAdded="items ids were changed. "),i})(t,i)?(r=i.concat(t.slice(i.length).map((t=>ot.convertDtoToLayoutItem(t)))),this.gettingMoreItems=!1,s=!0):((t,e)=>t===e?(this.reasons.items="items are the same object.",!1):t?!e||e&&0===e.length?(this.reasons.items="old items do not exist.",!0):e.length!==t.length?(this.reasons.items="more new items than old items (or vice versa).",!0):t.some(((t,i)=>{const r=e[i];try{const e=!t||!r||t.itemId!==r.itemId||t.mediaUrl!==r.mediaUrl||t.measured!==r.measured||t.metaData&&r.metaData&&(t.metaData.type!==r.metaData.type||t.metaData.title!==r.metaData.title||t.metaData.description!==r.metaData.description)||t.metaData&&"text"===t.metaData.type&&r.metaData&&"text"===r.metaData.type&&(t.metaData.width!==r.metaData.width||t.metaData.height!==r.metaData.height||t.metaData.html!==r.metaData.html||t.metaData.textStyle!==r.metaData.textStyle||t.metaData.editorHtml!==r.metaData.editorHtml);return e&&(this.reasons.items=`items #${i} id was changed.`),e}catch(t){return this.reasons.items="an error occured",!0}}),!1):(this.reasons.items="new items do not exist.",!1))(t,i)&&(r=t.map((t=>Object.assign(ot.convertDtoToLayoutItem(t)))),this.gettingMoreItems=!1,s=!0),{formattedItems:r,changed:s}}formatOptionsIfNeeded(t,e,i){let r,s=!1;if(((t,e)=>{if(!t)return this.reasons.options="no new options.",!1;if(!e)return this.reasons.options="no old options.",!0;try{const i={};Object.keys(e).sort().forEach((t=>i[t]=e[t]));const r={};Object.keys(t).sort().forEach((e=>r[e]=t[e]));const s=JSON.stringify(r)!==JSON.stringify(i);return s&&(this.reasons.options="options were changed."),s}catch(t){return console.error("Could not compare options",t),!1}})(t,e)){const e=function(t){const e=Object.assign({},ie,t);return Object.keys(e).forEach((t=>{void 0===e[t]&&(e[t]=ie[t])})),e}(t);r=ge(Me(e),i),s=!0}return{formattedOptions:r,changed:s}}formatContainerIfNeeded(t,e,i,r,s){let a=!1;let o;return(s||(({newContainerParams:t,oldContainerParams:e,oldOptions:i})=>{if(!i||!e)return this.reasons.container="no old container or options. ",!0;if(!t)return this.reasons.container="no new container.",!1;const s={height:!Jt.isHeightSetByGallery(r)&&(!!t.height&&t.height!==e.height),width:!e||!!t.width&&t.width!==e.width};return Object.keys(s).reduce(((t,e)=>(s[e]&&(this.reasons.container+=`container.${e} has changed. `),t||s[e])),!1)})({newContainerParams:t,oldContainerParams:e,oldOptions:i}))&&(Ge.updateParams({options:r,container:t}),a=!0,o=Object.assign({},t,Ge.getGalleryDimensions())),{formattedContainer:o,changed:a}}createStructure({formattedContainer:t,formattedOptions:e,formattedItems:i}){const r={items:i,container:t,styleParams:e,options:{showAllItems:!0,skipVisibilitiesCalc:!0,useLayoutStore:!1}};return r.options.createLayoutOnInit=!1,this.layouter=new ut(r),this.layouter.createLayout(r)}};class ke{constructor({id:t}){this.id=t+"'s blueprintsManager",this.currentState={},this.existingBlueprint={},this.lastBlueprintId=0,this.cache={},this.api={},this.currentState.totalItemsCount=1/0,this.onBlueprintReady=()=>{},this.loopingItems=!1}init(t){this.api=t.api,this.currentState.totalItemsCount=t&&t.totalItemsCount||this.currentState.totalItemsCount,Ct.setDeviceType(t.deviceType)}setCurrentBlueprint(t){this.lastBlueprintId=t}async createBlueprint(t={}){const e=Math.floor(1e3*Math.random());this.currentState.totalItemsCount=t.totalItemsCount||this.api.getTotalItemsCount&&this.api.getTotalItemsCount()||this.currentState.totalItemsCount,this.currentState.isUsingCustomInfoElements=t.isUsingCustomInfoElements||this.api.isUsingCustomInfoElements&&this.api.isUsingCustomInfoElements()||this.currentState.isUsingCustomInfoElements,t=Object.assign(Object.assign({},t),await this.completeParams(t)),t=this.duplicateItemsForSlideshowLoopIfNeeded(t);const{blueprintManagerId:i,blueprint:r,changedParams:s,reasons:a}=await(async t=>(this.setCurrentBlueprint(t.blueprintManagerId),this.api.createBlueprintImp?await this.api.createBlueprintImp(t):await He.createBlueprint(t)))({params:t,lastParams:this.currentState,existingBlueprint:this.existingBlueprint,blueprintManagerId:this.id+e,isUsingCustomInfoElements:this.currentState.isUsingCustomInfoElements});if(i!==this.lastBlueprintId)return;const o=Object.values(s).some((t=>!!t)),n=Object.keys(r).length>0;return this.updateLastParamsIfNeeded(t,s,n),await new Promise((t=>setTimeout(t,0))),n&&this.api.onBlueprintReady&&this.api.onBlueprintReady({blueprint:r,blueprintChanged:o,reasons:a}),this.cache[t]=this.existingBlueprint=r}async getMoreItems(t){let e;t!!t)),a=Object.keys(e).length>0;return this.updateLastParamsIfNeeded(t,i,a),a&&this.api.onBlueprintReady&&this.api.onBlueprintReady({blueprint:e,blueprintChanged:s,reasons:r,initialBlueprint:!0}),a&&(this.cache[t]=this.existingBlueprint=e)}createSingleBlueprint(t={}){let{isUsingCustomInfoElements:e}=t;const{blueprint:i}=He.createBlueprint({params:t,lastParams:{},existingBlueprint:{},blueprintManagerId:this.id+"_singleBlueprint",isUsingCustomInfoElements:e});return i}duplicateGalleryItems({items:t,duplicateFactor:e=1}){const i=(t=t||this.currentState.items).slice(0,this.currentState.totalItemsCount);for(let r=0;r{let e=!0;return t&&Object.keys(t).length>0&&(e=!1),e})(t)&&(t=this.api.fetchContainer&&await this.api.fetchContainer()||this.currentState.container),t}async fetchItemsIfNeeded(t){return(t=>{let e=!0;return t&&t.length>0&&(e=!1),e})(t)&&(t=!this.loopingItems&&this.api.fetchItems&&await this.api.fetchItems()||this.currentState.items),t}async fetchOptionsIfNeeded(t){return(t=>{let e=!0;return t&&Object.keys(t).length>0&&(e=!1),e})(t)&&(t=this.api.fetchOptions&&await this.api.fetchOptions()||this.currentState.options),t}updateLastParamsIfNeeded({items:t,container:e,options:i},r,s){s&&(this.currentState.items=r.itemsChanged?t:this.currentState.items,this.currentState.container=r.containerChanged?Object.assign({},e):this.currentState.container,this.currentState.options=r.optionsChanged?Object.assign({},i):this.currentState.options)}needMoreItems(t){this.getMoreItems(t)}}var ze=i(96852),Fe=i(80103),Ue=i(90761);class We extends n().Component{render(){if("true"!==h.A.getTopUrlParam("pgdebug"))return!1;const t=n().createElement("div",{className:"version-header "},"Pro Gallery Version #",ze.A.staticsVersion);let e="";try{e=" psw"+ze.A.top.screen.width+" piw"+ze.A.top.innerWidth+" pbw"+ze.A.top.document.body.clientWidth}catch(t){}const i=n().createElement("div",{className:"version-header "},h.A.isLandscape()?"land":"port"," sw",ze.A.screen.width,"sh",ze.A.screen.height," iw",ze.A.innerWidth," bw",ze.A.document.body.clientWidth," sr","1","rc",this.props.resizeCount," oc",this.props.orientationCount," nh",this.props.newHeight," lh",this.props.lastHeight,e,"www",this.props.maxGalleryWidth);return n().createElement("div",null,t,i)}}const Be=We;class je extends n().Component{constructor(t){super(t),this.state={isPrinting:!1}}componentDidMount(){window.addEventListener("beforeprint",(()=>{this.setState({isPrinting:!0})})),window.addEventListener("afterprint",(()=>{this.setState({isPrinting:!1})}))}render(){return this.state.isPrinting?n().createElement("source",Object.assign({},this.props)):null}}class Ve extends n().Component{constructor(t){super(t),this.imageRef=null}componentDidMount(){var t;(null===(t=this.imageRef)||void 0===t?void 0:t.complete)&&"function"==typeof this.props.onLoad&&this.props.onLoad()}render(){const t=this.props,{customImageRenderer:e}=t,i=(0,a.__rest)(t,["customImageRenderer"]);return"function"==typeof e?e(this.props):"string"==typeof this.props.src?n().createElement("img",Object.assign({ref:t=>{this.imageRef=t},alt:this.props.alt},i)):"object"==typeof this.props.src?n().createElement("picture",{id:`multi_picture_${this.props.id}`,key:`multi_picture_${this.props.id}`},this.props.src.map(((t,e)=>t.forPrinting?n().createElement(je,{key:`print-only-image-${e}`,srcSet:t.dpr,type:`image/${t.type}`}):n().createElement("source",{key:`image-source-${e}`,srcSet:t.dpr||t.url,type:`image/${t.type}`}))),n().createElement("img",Object.assign({ref:t=>{this.imageRef=t},alt:this.props.alt},i,{src:this.props.src[this.props.src.length-1].url}))):null}}const Ye=Ve;class $e extends n().Component{constructor(t){super(t),this.getImageContainer=this.getImageContainer.bind(this),this.getImageContainerClassNames=this.getImageContainerClassNames.bind(this),this.state={isHighResImageLoaded:!1},this.handleHighResImageLoad=this.handleHighResImageLoad.bind(this)}componentDidMount(){try{"function"==typeof this.props.actions.setItemLoaded&&this.props.actions.setItemLoaded()}catch(t){console.error(t)}}handleHighResImageLoad(){this.setState({isHighResImageLoaded:!0});try{this.props.actions.setItemLoaded()}catch(t){console.error("Failed to load high res image",t)}}getImageContainerClassNames(){const{isCurrentHover:t,options:e}=this.props,{isHighResImageLoaded:i}=this.state;return["gallery-item-content",t?"item-content-hover":"item-content-regular","image-item","gallery-item-visible","gallery-item","gallery-item-preloaded",e[Fe.A.layoutParams.crop.enable]&&e[Fe.A.layoutParams.crop.method]===l.A[Fe.A.layoutParams.crop.method].FIT?"grid-fit":"",e[Fe.A.behaviourParams.item.content.loader]===l.A[Fe.A.behaviourParams.item.content.loader].COLOR?"load-with-color "+(i?"image-loaded":""):""].join(" ")}getImageContainer(t,e,i){const{imageDimensions:r,id:s,actions:a}=this.props;return n().createElement("div",{className:e,onTouchStart:a.handleItemMouseDown,onTouchEnd:a.handleItemMouseUp,key:"image_container-"+s,"data-hook":"image-item",style:r},t(),i)}getImageAnimationOverlay(){const{imageDimensions:t,options:e,createUrl:i,id:r}=this.props;let s=null;switch(e[Fe.A.behaviourParams.gallery.scrollAnimation]){case l.A[Fe.A.behaviourParams.gallery.scrollAnimation].BLUR:s=i(l.A.urlSizes.RESIZED,l.A.urlTypes.LOW_RES);break;case l.A[Fe.A.behaviourParams.gallery.scrollAnimation].MAIN_COLOR:s=i(l.A.urlSizes.PIXEL,l.A.urlTypes.HIGH_RES)}return s&&n().createElement("div",{key:"image_container-overlay-"+r,"data-hook":"image-item-overlay",style:Object.assign(Object.assign({},t),{backgroundImage:`url(${s})`,backgroundSize:"cover",pointerEvents:"none",position:"absolute",top:0,left:0})})}getImageElement(){const{alt:t,imageDimensions:e,createUrl:i,id:r,idx:s,settings:o={},options:u}=this.props,{isHighResImageLoaded:c}=this.state,m=o&&o.imageProps&&"function"==typeof o.imageProps?o.imageProps(r):{},{marginLeft:d,marginTop:p}=e,g=(0,a.__rest)(e,["marginLeft","marginTop"]);return()=>{var e,a,o;const d=[],p="string"==typeof t?t:"untitled image",y=h.A.isMobile()&&this.props.options[Fe.A.behaviourParams.gallery.blockContextMenu]?{WebkitUserSelect:"none",WebkitTouchCallout:"none"}:{},v=this.props.isPrerenderMode?{width:"100%",height:"100%"}:{};if(!c){let t=null;const s=Object.assign({className:"gallery-item-visible gallery-item gallery-item-preloaded",key:"gallery-item-image-img-preload","data-hook":"gallery-item-image-img-preload",loading:"eager"},m);switch(u[Fe.A.behaviourParams.item.content.loader]){case l.A[Fe.A.behaviourParams.item.content.loader].BLUR:t=n().createElement(Ye,Object.assign({alt:p,key:"image_preload_blur-"+r,src:i(l.A.urlSizes.RESIZED,l.A.urlTypes.LOW_RES),style:Object.assign(Object.assign(Object.assign({},g),v),y)},s,{customImageRenderer:null===(e=this.props.customComponents)||void 0===e?void 0:e.customImageRenderer}));break;case l.A[Fe.A.behaviourParams.item.content.loader].MAIN_COLOR:t=n().createElement(Ye,Object.assign({alt:p,key:"image_preload_main_color-"+r,src:i(l.A.urlSizes.PIXEL,l.A.urlTypes.HIGH_RES),style:Object.assign(Object.assign(Object.assign({},g),v),y)},s,{customImageRenderer:null===(a=this.props.customComponents)||void 0===a?void 0:a.customImageRenderer}))}d.push(t)}const P=!this.props.isPrerenderMode,b=u[Fe.A.stylingParams.itemResolutionMode]===l.A[Fe.A.stylingParams.itemResolutionMode].FULL?l.A.urlSizes.FULL:l.A.urlSizes.MULTI,A=i(b,l.A.urlTypes.HIGH_RES),I=n().createElement(Ye,Object.assign({key:"image_highres-"+r,className:"gallery-item-visible gallery-item gallery-item-preloaded","data-hook":"gallery-item-image-img","data-idx":s,src:A,alt:p,tabIndex:"0",onLoad:this.handleHighResImageLoad,loading:this.props.isPrerenderMode?"lazy":"eager",style:Object.assign(Object.assign(Object.assign({},g),y),!P&&v)},m,{customImageRenderer:null===(o=this.props.customComponents)||void 0===o?void 0:o.customImageRenderer}));return d.push(I),d}}render(){const t=this.getImageElement(),e=`${this.getImageContainerClassNames()} ${this.props.extraClasses||""}`,i=this.props.overlay||this.getImageAnimationOverlay();return this.getImageContainer(t,e,i)}}const Ke=$e;const Ze=function(t){return class extends o.Component{constructor(t){super(t),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.isMagnifiedBiggerThanContainer=this.isMagnifiedBiggerThanContainer.bind(this),this.toggleMagnify=this.toggleMagnify.bind(this),this.getMagnifyInitialPos=this.getMagnifyInitialPos.bind(this),this.getBoundrys=this.getBoundrys.bind(this),this.getMagnifiedDimensions=this.getMagnifiedDimensions.bind(this),this.containerRef=null,this.state={shouldMagnify:!1,x:0,y:0}}onDragStart(t){t.preventDefault()}onMouseMove(t){if(this.dragStarted){const{magnifiedWidth:e,magnifiedHeight:i}=this.getMagnifiedDimensions();this.isDragging=!0;const{cubedWidth:r,cubedHeight:s}=this.props.style,{clientY:a,clientX:o}=t,{boundryY:n,boundryX:l}=this.getBoundrys();this.setState({x:Math.max(-l,Math.min(this.dragStartX-o,e-r)),y:Math.max(-n,Math.min(this.dragStartY-a,i-s))})}}onMouseDown(t){const{clientX:e,clientY:i}=t,{x:r,y:s,shouldMagnify:a}=this.state;a?(this.dragStartX=r+e,this.dragStartY=s+i,this.dragStarted=!0):this.setState(this.getMagnifyInitialPos(t))}onMouseUp(){this.isDragging||this.toggleMagnify(),this.dragStarted=!1,this.isDragging=!1}toggleMagnify(t){const{shouldMagnify:e}=this.state;"boolean"==typeof t?this.setState({shouldMagnify:t}):this.setState({shouldMagnify:!e})}getMagnifiedDimensions(){const{style:{innerHeight:t,innerWidth:e}}=this.props,i=this.props.options[Fe.A.behaviourParams.item.content.magnificationValue];return{magnifiedHeight:t*i,magnifiedWidth:e*i}}getPreloadImage(){var t;const{createUrl:e,id:i,style:r,imageDimensions:s,options:a}=this.props,{innerWidth:o,innerHeight:h}=r,{marginTop:u,marginLeft:c}=s,{shouldMagnify:m,x:d,y:p}=this.state,g=a[Fe.A.behaviourParams.item.content.magnificationValue],y=e(l.A.urlSizes.RESIZED,l.A.urlTypes.HIGH_RES),v=m?g:1;return n().createElement(Ye,{alt:"",key:"magnified-item-preload-"+i,className:"magnified-item-preload",src:y,style:{width:o,height:h,position:"relative",zIndex:1,opacity:m?1:0,transform:`scale(${v})`,transformOrigin:`${(d+c)/(g-1)}px ${(p+u)/(g-1)}px`,transition:"transform 0.3s ease"+(m?"":", opacity 0.1s ease 0.3s")},customImageRenderer:null===(t=this.props.customComponents)||void 0===t?void 0:t.customImageRenderer})}getHighResImage(){var t;const{createMagnifiedUrl:e,id:i,alt:r,options:s,isPrerenderMode:a}=this.props,{magnifiedWidth:o,magnifiedHeight:l}=this.getMagnifiedDimensions(),h=e(s[Fe.A.behaviourParams.item.content.magnificationValue]);return n().createElement(Ye,{key:`magnified-item-${i}`,className:"magnified-item","data-hook":"magnified-item",src:h,alt:"string"==typeof r?r:"untitled image",id:i,isPrerenderMode:a,style:{width:o,height:l,position:"absolute"},customImageRenderer:null===(t=this.props.customComponents)||void 0===t?void 0:t.customImageRenderer})}isMagnifiedBiggerThanContainer(t){const{magnifiedWidth:e,magnifiedHeight:i}=this.getMagnifiedDimensions(),{cubedWidth:r,cubedHeight:s}=t;return rthis.containerRef=t,className:"magnified-item-container",style:this.getContainerStyle(),onDragStart:this.onDragStart,onMouseMove:this.onMouseMove,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},n().createElement(t,Object.assign({},this.props)),this.getPreloadImage(),n().createElement("div",{className:"magnified-images",style:this.getMagnifiedImageStyle()},e&&this.getHighResImage()))}}},Xe=Ze(Ke);var qe=i(98673);const Je=({url:t,dimensions:e})=>n().createElement("iframe",{"data-hook":"video-iframe-placeholder",className:"gallery-item-content video-iframe-placeholder",title:"pro-gallery-video",style:Object.assign({},e),allow:"fullscreen",src:t,allowFullScreen:!0,loading:"lazy"}),Qe=t=>"video"===t?n().createElement(qe.v,{type:"videoPlayButton",size:60}):"3d"===t?n().createElement(qe.v,{type:"rotateArrow",size:60}):n().createElement(n().Fragment,null);function ti(t){const{hasLink:e,options:i,imageDimensions:r,showPlayButton:s,MediaImplementation:a,enableImagePlaceholder:u,isVideoPlaceholder:c,videoPlaceholderUrl:m}=t,{behaviourParams_item_clickAction:d,behaviourParams_item_video_playTrigger:p}=i,g=(0,o.useMemo)((()=>!h.A.isSSR()&&(p===l.A[Fe.A.behaviourParams.item.video.playTrigger].HOVER||p===l.A[Fe.A.behaviourParams.item.video.playTrigger].AUTO||(d===l.A[Fe.A.behaviourParams.item.clickAction].NOTHING||d===l.A[Fe.A.behaviourParams.item.clickAction].MAGNIFY||d===l.A[Fe.A.behaviourParams.item.clickAction].LINK&&!e))),[e,p,d]),y=(e={})=>u?n().createElement(Ke,Object.assign({},t,{imageDimensions:r,id:t.idx,overlay:s&&!g&&Qe(t.type),extraClasses:t.placeholderExtraClasses.join(" ")},e)):n().createElement(n().Fragment,null),v=y(),P=n().createElement(Je,{dimensions:r,url:c?m:t.videoUrl}),b=n().createElement(n().Fragment,null,v,P,t.hover);return!g||t.isPrerenderMode?b:(0,Ue.Q)()?n().createElement(n().Fragment,null,v,t.hover):n().createElement(n().Suspense,{fallback:b},n().createElement(a,Object.assign({},t,{thumbnail:v,placeholder:b,thumbnailWithOverride:y})))}const ei=n().lazy((()=>i.e(2114).then(i.bind(i,45605))));function ii(t){const{options:e}=t,i=e[Fe.A.behaviourParams.item.threeDimensionalScene.playTrigger],r=e[Fe.A.behaviourParams.item.threeDimensionalScene.enablePlayButton];return n().createElement(ti,Object.assign({},t,{MediaImplementation:ei,playTrigger:i,placeholderExtraClasses:["gallery-item-3d-placeholder"],enableImagePlaceholder:!0,showPlayButton:r}))}const ri=t=>e=>{const{itemWasHovered:i,isCurrentHover:r,hasSecondaryMedia:s,secondaryMediaItem:a}=e;if(e.options[Fe.A.behaviourParams.item.secondaryMedia.trigger]===l.A[Fe.A.behaviourParams.item.secondaryMedia.trigger].OFF||!s)return n().createElement(t,Object.assign({},e));return n().createElement("div",{className:"item-with-secondary-media-container"},n().createElement(t,Object.assign({},e)),n().createElement("div",{className:["secondary-media-item",r?"show":"hide"].join(" ")},i&&n().createElement(t,Object.assign({},(()=>{const{createUrl:t,createMagnifiedUrl:i,style:r,html:s}=a;return Object.assign(Object.assign({},e),{style:r,html:s,createUrl:t,createMagnifiedUrl:i})})()))))};class si extends n().Component{constructor(t){super(t),"function"==typeof this.props.actions.setItemLoaded&&this.props.actions.setItemLoaded()}getTextDimensions(){const{style:t,options:e,cropRatio:i,imageDimensions:r}=this.props,s=t.ratio[1/0,1/0],this.inScreenPadding=()=>[0,0],this.aboveScreenPadding=()=>[0,1/0],this.justBelowScreenPadding=t=>[1/0,-1*(t+this.screenSize)],this.justBelowAndAboveScreenPadding=()=>[2560,1/0],this.justBelowAndInScreenPadding=()=>[5120,0],this.belowScreenPadding=()=>[1/0,0],this.highResPadding=()=>[5120,1/0],this.lowResPadding=()=>[10240,1/0]}getSellectorDomId({id:t,idx:e}){return`pgi${String(t).replace(/[\W]+/g,"")}_${e}`}buildScrollClassName(t,e,i){const r=String(t).replace(/[\W]+/g,"").slice(-8);return`${this.pgScrollClassName}_${r}_${i}-${this.pgScrollSteps[e]+Number(i)}`}calcScrollClasses(t,e){return`${this.pgScrollClassName}-${e} `+this.pgScrollSteps.map(((i,r)=>this.buildScrollClassName(t,r,Math.floor(e/i)*i))).join(" ")}calcScrollCss({id:t,items:e,options:i,container:r}){if(h.A.isVerbose()&&console.time("CSS Scroll"),!e||!e.length)return[];if(i[Fe.A.behaviourParams.gallery.scrollAnimation]===l.A[Fe.A.behaviourParams.gallery.scrollAnimation].NO_EFFECT)return[];this.screenSize=i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?Math.min(ze.A.outerWidth,ze.A.screen.width,r.galleryWidth):Math.min(ze.A.outerHeight,ze.A.screen.height),i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].VERTICAL&&h.A.isMobile()&&(this.screenSize+=50),this.calcScrollPaddings();const[s]=e.slice(-1),{top:a,right:o}=s.offset,n=this.pgScrollSteps[0];this.minHeight=0-n,this.maxHeight=(Math.ceil(((i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?o:a)+this.screenSize)/n)+1)*n;const u=e.map((e=>this.calcScrollCssForItem({id:t,item:e,options:i})));return h.A.isVerbose()&&console.timeEnd("CSS Scroll"),u}shouldCalcScrollCss({type:t}){return"video"!==t&&"text"!==t&&"3d"!==t}createScrollSelectorsFunction({id:t,item:e,options:i}){const r=i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?e.offset.left-this.screenSize:e.offset.top-this.screenSize,s=i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?e.offset.left+e.width:e.offset.top+e.height,a=this.pgScrollSteps[this.pgScrollSteps.length-1],o=(t,e)=>Math.ceil(Math.min(this.maxHeight,t)/e)*e,n=(t,e)=>Math.floor(Math.max(this.minHeight,t)/e)*e,h=this.getSellectorDomId(e);return(e,i)=>{const[l,u]=e;if(l===1/0&&u===1/0)return`#pro-gallery-${t} #${h} ${i}`;let c=n(r-l,a);const m=o(s+u,a),d=[];for(;cc%t==0&&c+t<=m));if(-1===r){console.error("largestDividerIdx is -1. Couldn't find index in pgScrollSteps array.\nfrom =",c,"\nto =",m,"\npadding[0] =",e[0],"\npadding[1] =",e[1]);break}d.push(`.${this.buildScrollClassName(t,r,c)} ~ div #${h} ${i}`),c+=this.pgScrollSteps[r]}return d.join(", ")}}calcScrollCssForItem({id:t,item:e,options:i}){const{idx:r}=e;let s="";const a=this.createScrollSelectorsFunction({id:t,item:e,options:i});return s+=this.createScrollAnimationsIfNeeded({idx:r,item:e,options:i,createScrollSelectors:a}),this.scrollCss[r]=s||this.scrollCss[r],this.scrollCss[r]}createScrollAnimationsIfNeeded({idx:t,options:e,createScrollSelectors:i}){const r=e[Fe.A.behaviourParams.gallery.scrollAnimation],{NO_EFFECT:s,FADE_IN:a,GRAYSCALE:o,SLIDE_UP:n,EXPAND:h,SHRINK:u,ZOOM_OUT:c,ONE_COLOR:m,MAIN_COLOR:d,BLUR:p}=l.A[Fe.A.behaviourParams.gallery.scrollAnimation],g=e[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,y=e[Fe.A.layoutParams.structure.scrollDirection];if(r===s)return"";const v=100*(t%3+1),P=100*(t%3+1),b=this.allPagePadding(),A=this.aboveScreenPadding();let I="";if(r!==d&&r!==p||(I+=i(b,' [data-hook="image-item-overlay"]')+`{filter: opacity(1); transition: filter 1.${P}s ease-in ${v}ms !important;}`,I+=i(A,' [data-hook="image-item-overlay"]')+"{filter: opacity(0) !important;}"),r===a&&(I+=i(b,"")+`{filter: opacity(0); transition: filter 1.${P}s ease-in !important;}`,I+=i(A,"")+"{filter: opacity(1) !important;}"),r===o&&(I+=i(b," .gallery-item-wrapper")+`{filter: grayscale(100%); transition: filter 1.${200+P}s ease-in !important;}`,I+=i(A," .gallery-item-wrapper")+"{filter: grayscale(0) !important;}"),r===n){const t=y===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?"X":"Y",e=g?"-":"";I+=i(b,"")+`{transform: translate${t}(${e}100px); transition: transform 0.8s cubic-bezier(.13,.78,.53,.92) !important;}`,I+=i(A,"")+`{transform: translate${t}(0) !important;}`}if(r===h&&(I+=i(b,"")+`{transform: scale(0.95); transition: transform 1s cubic-bezier(.13,.78,.53,.92) ${v}ms !important;}`,I+=i(A,"")+"{transform: scale(1) !important;}"),r===u&&(I+=i(b,"")+`{transform: scale(1.05); transition: transform 1s cubic-bezier(.13,.78,.53,.92) ${v}ms !important;}`,I+=i(A,"")+"{transform: scale(1) !important;}"),r===c&&(I+=i(b," .gallery-item-wrapper")+`{transform: scale(1.1); transition: transform 1.2s cubic-bezier(.13,.78,.53,.92) ${v}ms !important;}`,I+=i(A," .gallery-item-wrapper")+"{transform: scale(1) !important;}"),r===m){const t=e.oneColorAnimationColor&&e.oneColorAnimationColor.value?e.oneColorAnimationColor.value:"transparent";I+=i(b,"")+`{background-color: ${t};}`,I+=i(b," .gallery-item-wrapper")+`{filter: opacity(0); transition: filter 0.${600+P}s ease-in !important;}`,I+=i(A," .gallery-item-wrapper")+"{filter: opacity(1) !important;}"}return I}};function li(t){return Object.assign({},(t[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].ATTACHED_BACKGROUND||l.A.hasHoverPlacement(t[Fe.A.layoutParams.info.placement]))&&Object.assign(Object.assign({},ui(t[Fe.A.stylingParams.itemBorderRadius],t[Fe.A.stylingParams.itemBorderWidth],t[Fe.A.stylingParams.itemBorderColor])),function(t){let e={};if(t[Fe.A.stylingParams.itemEnableShadow]){const i=t[Fe.A.stylingParams.itemShadowBlur],r=t[Fe.A.stylingParams.itemShadowDirection],s=t[Fe.A.stylingParams.itemShadowSize],a=-1*(Number(r)-90)/360*2*Math.PI;e={boxShadow:`${Math.round(s*Math.cos(a))}px ${Math.round(-1*s*Math.sin(a))}px ${i}px ${h.A.formatColor(t[Fe.A.stylingParams.itemShadowOpacityAndColor])}`}}return e}(t)))}function hi(t){return Object.assign({},!l.A.hasHoverPlacement(t[Fe.A.layoutParams.info.placement])&&(t[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].NO_BACKGROUND||t[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].SEPARATED_BACKGROUND)&&Object.assign({},ui(t[Fe.A.stylingParams.itemBorderRadius],t[Fe.A.stylingParams.itemBorderWidth],t[Fe.A.stylingParams.itemBorderColor])))}function ui(t,e,i){return Object.assign(Object.assign({overflow:"hidden"},t>0&&{borderRadius:t}),e>0&&{borderWidth:e+"px",borderColor:h.A.formatColor(i),borderStyle:"solid"})}function ci(t,e,i,r){const s=Object.assign(Object.assign({},l.A.hasExternalHorizontalPlacement(t)&&{height:i,float:l.A.isExternalRightPlacement(t)?"right":"left"}),l.A.hasExternalVerticalPlacement(t)&&{height:r,boxSizing:"content-box"});return e[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].SEPARATED_BACKGROUND?Object.assign(Object.assign(Object.assign(Object.assign({},s),ui(e[Fe.A.layoutParams.info.border.radius],e[Fe.A.layoutParams.info.border.width],e[Fe.A.layoutParams.info.border.color])),l.A.hasExternalAbovePlacement(t)&&{marginBottom:e[Fe.A.layoutParams.info.spacing]}),l.A.hasExternalBelowPlacement(t)&&{marginTop:e[Fe.A.layoutParams.info.spacing]}):s}function mi(t,e,i,r){const s=Object.assign(Object.assign({},(e[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].SEPARATED_BACKGROUND||e[Fe.A.layoutParams.info.layout]===l.A[Fe.A.layoutParams.info.layout].ATTACHED_BACKGROUND)&&e.textBoxFillColor&&e.textBoxFillColor.value&&{backgroundColor:e.textBoxFillColor.value}),{overflow:"hidden",boxSizing:"border-box"}),a=l.A.hasExternalVerticalPlacement(t),o=l.A.hasExternalHorizontalPlacement(t);return Object.assign(Object.assign(Object.assign({},s),a&&function(t,e){return{width:"100%",height:e}}(0,i)),o&&function(t,e){return{height:"100%",width:e}}(0,r))}const di=h.A.isiOS(),pi=n().lazy((()=>Promise.all([i.e(8841),i.e(1215),i.e(9143),i.e(4367)]).then(i.bind(i,28902))));class gi extends n().Component{render(){const t=(((e=this.props).videoUrl||e.url).includes("youtube.com")||(e.videoUrl||e.url).includes("youtu.be"))&&di;var e;return n().createElement(pi,Object.assign({},this.props,{loadVideo:this.props.shouldPlay||t,videoPlaceholder:this.props.thumbnail,videoPlayButton:this.props.showPlayButton&&n().createElement(qe.v,{type:"videoPlayButton",size:60})}))}}class yi extends n().Component{render(){const t=this.props.options[Fe.A.behaviourParams.item.video.enablePlayButton];return n().createElement(ti,Object.assign({},this.props,{MediaImplementation:gi,enableImagePlaceholder:(0,oi.g4)(this.props.options),showPlayButton:t,placeholderExtraClasses:["video-item","gallery-item-video"]}))}}const vi=yi;function Pi(t){return Object.assign(Object.assign({},t),{isMobile:h.A.isMobile()})}const bi=({idx:t,activeIndex:e,options:i},r=!1)=>{const{[Fe.A.behaviourParams.gallery.horizontal.slideAnimation]:s}=i,a=i[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT;switch(s){case l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].FADE:return"fade fade-"+(e===t?"visible":"hidden");case l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].DECK:return et?"deck-before"+(a?"-rtl":""):{};default:return{}}},Ai=ri(Xe),Ii=ri(si);class fi extends n().Component{constructor(t){super(t),this.itemContainer=n().createRef(),this.shouldUseDirectLink=()=>{const{directLink:t}=this.props,{url:e,target:i}=t||{},r=!(!e||!i||this.props.options[Fe.A.behaviourParams.item.clickAction]!==l.A[Fe.A.behaviourParams.item.clickAction].LINK);return this.shouldShowHoverOnMobile()&&this.isClickOnCurrentHoveredItem()&&r?(this.props.actions.eventsListener(l.A.events.HOVER_SET,-1),!0):!(!r||this.shouldShowHoverOnMobile())},this.isClickOnCurrentHoveredItem=()=>this.state.isCurrentHover||this.props.options[Fe.A.behaviourParams.item.overlay.hoveringBehaviour]===l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour].ALWAYS_SHOW,this.props.actions.eventsListener(l.A.events.ITEM_CREATED,this.props),this.init(),this.state={isCurrentHover:!1,itemWasHovered:!1},this.activeElement=""}init(){this.onItemClick=this.onItemClick.bind(this),this.onItemWrapperClick=this.onItemWrapperClick.bind(this),this.onItemInfoClick=this.onItemInfoClick.bind(this),this.onAnchorKeyDown=this.onAnchorKeyDown.bind(this),this.onContainerKeyUp=this.onContainerKeyUp.bind(this),this.handleItemMouseDown=this.handleItemMouseDown.bind(this),this.handleItemMouseUp=this.handleItemMouseUp.bind(this),this.setItemLoaded=this.setItemLoaded.bind(this),this.isHighlight=this.isHighlight.bind(this),this.getItemHover=this.getItemHover.bind(this),this.getImageItem=this.getImageItem.bind(this),this.getVideoItem=this.getVideoItem.bind(this),this.getTextItem=this.getTextItem.bind(this),this.getItemInner=this.getItemInner.bind(this),this.getItemContainerStyles=this.getItemContainerStyles.bind(this),this.getItemWrapperStyles=this.getItemWrapperStyles.bind(this),this.getItemAriaLabel=this.getItemAriaLabel.bind(this),this.getItemContainerClass=this.getItemContainerClass.bind(this),this.getItemWrapperClass=this.getItemWrapperClass.bind(this),this.getItemContainerTabIndex=this.getItemContainerTabIndex.bind(this),this.isIconTag=this.isIconTag.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.checkIfCurrentHoverChanged=this.checkIfCurrentHoverChanged.bind(this),this.shouldHoverWithoutOverlayAndClickOnMobile=this.shouldHoverWithoutOverlayAndClickOnMobile.bind(this)}setItemLoaded(){this.props.actions.eventsListener(l.A.events.ITEM_LOADED,this.props),this.setState({loaded:!0})}isIconTag(t){return["button","i","a","svg","path"].indexOf(t.toLowerCase())>=0}onMouseEnter(){h.A.isMobile()||this.props.actions.eventsListener(l.A.events.HOVER_SET,this.props.idx)}onMouseLeave(){h.A.isMobile()||this.props.actions.eventsListener(l.A.events.HOVER_SET,-1)}onFocus(){var t;(null===(t=this.props.settings)||void 0===t?void 0:t.isAccessible)&&this.props.actions.eventsListener(l.A.events.HOVER_SET,this.props.idx),this.props.actions.eventsListener(l.A.events.ITEM_FOCUSED,this.props)}onBlur(){var t;(null===(t=this.props.settings)||void 0===t?void 0:t.isAccessible)&&this.props.actions.eventsListener(l.A.events.HOVER_SET,-1),this.props.actions.eventsListener(l.A.events.ITEM_LOST_FOCUS,this.props)}onAnchorKeyDown(t){switch(t.keyCode||t.charCode){case 32:case 13:return t.stopPropagation(),this.onItemClick(t,"item-container",!1),!1;default:return!0}}handleGalleryItemAction(t){this.props.actions.eventsListener(l.A.events.ITEM_ACTION_TRIGGERED,this.props,t)}onItemWrapperClick(t){this.onItemClick(t,"item-media")}onItemInfoClick(t){this.onItemClick(t,"item-info",!1),this.shouldUseDirectLink()||t.stopPropagation()}onItemClick(t,e,i=!0){this.props.actions.eventsListener(l.A.events.ITEM_CLICKED,Object.assign(Object.assign({},this.props),{clickTarget:e}),t),this.shouldUseDirectLink()||(i&&t.preventDefault(),this.shouldShowHoverOnMobile()||this.shouldShowSecondMediaOnMobile()?this.handleHoverClickOnMobile(t):this.shouldHoverWithoutOverlayAndClickOnMobile()?this.props.actions.eventsListener(l.A.events.HOVER_SET,this.props.idx):this.handleGalleryItemAction(t))}handleHoverClickOnMobile(t){this.isClickOnCurrentHoveredItem()?(this.handleGalleryItemAction(t),this.props.actions.eventsListener(l.A.events.HOVER_SET,-1)):this.props.actions.eventsListener(l.A.events.HOVER_SET,this.props.idx)}handleItemMouseDown(){return!0}handleItemMouseUp(){return h.A.isMobile()&&this.longPressTimer&&clearTimeout(this.longPressTimer),!0}shouldShowHoverOnMobile(){if(h.A.isMobile()){const{[Fe.A.behaviourParams.item.overlay.hoveringBehaviour]:t,alwaysShowHover:e,previewHover:i}=this.props.options;if(t===l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour].NEVER_SHOW)return!1;if(this.props.options[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].NOTHING&&"video"!==this.props.type&&"3d"!==this.props.type)return!0;if(this.props.customComponents.customHoverRenderer&&l.A.hasHoverPlacement(this.props.options[Fe.A.layoutParams.info.placement])&&t!==l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour].NEVER_SHOW)return!0;if(e)return!0;if((0,Ue.Q)()&&i)return!0}return!1}shouldShowSecondMediaOnMobile(){return!!h.A.isMobile()&&(this.props.options[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].NOTHING&&"video"!==this.props.type&&"3d"!==this.props.type&&this.props.options[Fe.A.behaviourParams.item.secondaryMedia.trigger]===l.A[Fe.A.behaviourParams.item.secondaryMedia.trigger].HOVER)}shouldHoverWithoutOverlayAndClickOnMobile(){return h.A.isMobile()&&this.props.options[Fe.A.behaviourParams.item.video.playTrigger]===l.A[Fe.A.behaviourParams.item.video.playTrigger].HOVER&&this.props.options[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].NOTHING}isHighlight(){return this.props.thumbnailHighlightId&&this.props.thumbnailHighlightId===this.props.id}shouldHover(){const{options:t}=this.props,{alwaysShowHover:e,previewHover:i}=t,r=t[Fe.A.behaviourParams.item.overlay.hoveringBehaviour],{NEVER_SHOW:s,APPEARS:a}=l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour],{NO_EFFECT:o}=l.A[Fe.A.behaviourParams.item.overlay.hoverAnimation];return r!==s&&(!0===e||(!(!(0,Ue.Q)()||!i)||!(r===a&&t[Fe.A.behaviourParams.item.overlay.hoverAnimation]===o&&!this.state.itemWasHovered)&&(!h.A.isMobile()||this.shouldShowHoverOnMobile())))}getItemHover(t){const e=this.props,{customComponents:i}=e,r=(0,a.__rest)(e,["customComponents"]);return this.shouldHover()&&n().createElement(ai,Object.assign({},r,{forceShowHover:this.simulateOverlayHover(),isCurrentHover:this.simulateHover(),imageDimensions:t,itemWasHovered:this.state.itemWasHovered,key:"hover",actions:{handleItemMouseDown:this.handleItemMouseDown,handleItemMouseUp:this.handleItemMouseUp},renderCustomInfo:i.customHoverRenderer?()=>i.customHoverRenderer(Pi(this.props)):null}))}getImageItem(t){const e=h.A.pick(this.props,["gotFirstScrollEvent","alt","title","description","id","idx","options","createUrl","createMagnifiedUrl","settings","isPrerenderMode","isTransparent","style","hasSecondaryMedia","secondaryMediaItem","customComponents"]);return n().createElement(Ai,Object.assign({},e,{key:"imageItem",imageDimensions:t,isThumbnail:!!this.props.thumbnailHighlightId,isCurrentHover:this.simulateHover(),itemWasHovered:this.state.itemWasHovered,actions:{handleItemMouseDown:this.handleItemMouseDown,handleItemMouseUp:this.handleItemMouseUp,setItemLoaded:this.setItemLoaded}}))}get3dItem(t,e){const{calculatedAlt:i,title:r,description:s,id:a,idx:o,options:l,createUrl:h,createMagnifiedUrl:u,settings:c,isPrerenderMode:m,isTransparent:d,style:p,customComponents:g,scene:y,activeIndex:v,isCurrentHover:P}=this.props;return n().createElement(ii,{key:"3dItem",imageDimensions:t,itemContainer:this.itemContainer,shouldPlay:this.props.idx===this.props.playing3DIdx,actions:Object.assign(Object.assign({},this.props.actions),{setItemLoaded:this.setItemLoaded,handleItemMouseDown:this.handleItemMouseDown,handleItemMouseUp:this.handleItemMouseUp}),hasLink:this.itemHasLink(),hover:e,activeIndex:v,calculatedAlt:i,createMagnifiedUrl:u,createUrl:h,customComponents:g,title:r,description:s,id:a,idx:o,isPrerenderMode:m,isTransparent:d,options:l,scene:y,style:p,settings:c,isCurrentHover:P})}getVideoItem(t,e){return n().createElement(vi,Object.assign({},this.props,{shouldPlay:this.props.idx===this.props.playingVideoIdx,key:"video"+this.props.idx,hover:e,imageDimensions:t,hasLink:this.itemHasLink(),isCurrentHover:this.simulateHover(),actions:Object.assign(Object.assign({},this.props.actions),{setItemLoaded:this.setItemLoaded,handleItemMouseDown:this.handleItemMouseDown,handleItemMouseUp:this.handleItemMouseUp})}))}getTextItem(t){const e=h.A.pick(this.props,["id","options","style","html","cropRatio","isPrerenderMode","hasSecondaryMedia","secondaryMediaItem"]);return n().createElement(Ii,Object.assign({},e,{key:"textItem",imageDimensions:t,isCurrentHover:this.simulateHover(),itemWasHovered:this.state.itemWasHovered,actions:{handleItemMouseDown:this.handleItemMouseDown,handleItemMouseUp:this.handleItemMouseUp,setItemLoaded:this.setItemLoaded}}))}getItemInner(){const{type:t,style:e,offset:i}=this.props;let r;const{innerWidth:s,innerHeight:a}=e,{innerTop:o,innerLeft:l}=i,h={width:s,height:a,marginTop:o,marginLeft:l};let u=null;switch(this.shouldHover()&&(u=this.getItemHover(h)),t){case"dummy":r=n().createElement("div",null);break;case"video":r=this.getVideoItem(h,u);break;case"text":r=[this.getTextItem(h),u];break;case"3d":r=this.get3dItem(h,u);break;default:r=this.props.isVideoPlaceholder?this.getVideoItem(h,u):[this.getImageItem(h),u]}return r}getRightInfoElementIfNeeded(){return l.A.hasExternalRightPlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)?this.getExternalInfoElement(l.A[Fe.A.layoutParams.info.placement].RIGHT,"gallery-item-right-info"):null}getLeftInfoElementIfNeeded(){return l.A.hasExternalLeftPlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)?this.getExternalInfoElement(l.A[Fe.A.layoutParams.info.placement].LEFT,"gallery-item-left-info"):null}getBottomInfoElementIfNeeded(){return l.A.hasExternalBelowPlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)?this.getExternalInfoElement(l.A[Fe.A.layoutParams.info.placement].BELOW,"gallery-item-bottom-info"):null}getTopInfoElementIfNeeded(){return l.A.hasExternalAbovePlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)?this.getExternalInfoElement(l.A[Fe.A.layoutParams.info.placement].ABOVE,"gallery-item-top-info"):null}getExternalInfoElement(t,e){const{options:i,customComponents:r,style:s}=this.props;if(!r.customInfoRenderer)return null;let a=null;const o=i[Fe.A.layoutParams.info.height]+(this.hasRequiredMediaUrl?0:s.height),h=s.infoWidth+(this.hasRequiredMediaUrl?0:s.width),u=r.customInfoRenderer(Pi(this.props),t),c=l.A.isLayout("SLIDESHOW")(this.props.options);return a=n().createElement("div",{className:"gallery-item-common-info-outer "+bi(this.props,c),style:Object.assign({},ci(t,i,s.height,i[Fe.A.layoutParams.info.height]))},n().createElement("div",{style:mi(t,i,o,h),className:"gallery-item-common-info "+e,onClick:this.onItemInfoClick},u)),a}simulateHover(){return this.state.isCurrentHover||!0===this.props.options.alwaysShowHover||(0,Ue.Q)()&&this.props.options.previewHover}simulateOverlayHover(){return this.simulateHover()||this.props.options[Fe.A.behaviourParams.item.overlay.hoveringBehaviour]===l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour].ALWAYS_SHOW}itemHasLink(){const{linkData:t,linkUrl:e}=this.props;return!(void 0===t.type&&(void 0===e||""===e))}getItemContainerStyles(){const{idx:t,activeIndex:e,offset:i,style:r,options:s,settings:a={}}=this.props,o=s[Fe.A.layoutParams.structure.itemSpacing],n=s[Fe.A.behaviourParams.gallery.horizontal.slideAnimation],h=s[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,u=s[Fe.A.layoutParams.structure.scrollDirection],c=li(s),m={overflowY:"hidden",position:"absolute",bottom:"auto",margin:u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?o/2+"px":0},{avoidInlineStyles:d}=a,p=this.props.isPrerenderMode&&!this.props.settings.disableSSROpacity,g=d?{}:{opacity:p?0:1,display:p?"none":"block",transition:"opacity .2s ease"},y=d?{}:{top:i.top,left:h?"auto":i.left,right:h?i.left:"auto",width:r.width+r.infoWidth,height:r.height+r.infoHeight};let v;switch(n){case l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].FADE:v={left:h?"auto":0,right:h?0:"auto",pointerEvents:e===t?"auto":"none",zIndex:e===t?0:1};break;case l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].DECK:v={left:h?"auto":0,right:h?0:"auto",pointerEvents:e===t?"auto":"none",zIndex:Math.sign(e-t)};break;default:v={}}const P=this.state.loaded&&((0,Ue.Q)()||(0,Ue.IL)())?{transition:"all .4s ease",transitionProperty:"top, left, width, height, opacity"}:{transition:"none"};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),y),c),P),g),v)}getItemWrapperStyles(){const{createUrl:t,options:e,style:i,type:r,offset:s}=this.props,{height:a,width:o,innerWidth:n,innerHeight:h}=i,{innerTop:u,innerLeft:c}=s;let m={};m.backgroundColor="text"===r?e[Fe.A.layoutParams.crop.method]!==l.A[Fe.A.layoutParams.crop.method].FIT?"transparent":"inherit":(e[Fe.A.layoutParams.crop.method]!==l.A[Fe.A.layoutParams.crop.method].FIT?i.bgColor:"inherit")||"transparent",e[Fe.A.behaviourParams.item.content.hoverAnimation]===l.A[Fe.A.behaviourParams.item.content.hoverAnimation].MAIN_COLOR&&(m=Object.assign(Object.assign({},m),{background:`url(${t(l.A.urlSizes.PIXEL,l.A.urlTypes.HIGH_RES)})`,backgroundSize:`${n}px ${h}px`,backgroundRepeat:"no-repeat",backgroundPosition:`top ${u}px left ${c}px`}));const{TILT:d}=l.A[Fe.A.behaviourParams.item.content.hoverAnimation];return e[Fe.A.behaviourParams.item.content.hoverAnimation]===d&&(m["--tiltAngleValue"]=e[Fe.A.behaviourParams.item.content.tiltAngleValue]),m.height=a+"px",m.width=o+"px",m.margin=-e[Fe.A.stylingParams.itemBorderWidth]+"px",m}getItemAriaLabel(){const{type:t,alt:e,htmlContent:i,options:r}=this.props;return{dummy:"",text:i,video:e||"Untitled video",image:e||"Untitled image"}[t]+(r.isStoreGallery?", Buy Now":"")}isItemClickable(t){const e=!this.itemHasLink();return!(t[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].NOTHING||t[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].LINK&&e)}getItemContainerClass(){const{options:t}=this.props,e=t[Fe.A.behaviourParams.item.content.placementAnimation],i=t[Fe.A.behaviourParams.item.overlay.hoverAnimation],r=t[Fe.A.behaviourParams.item.content.hoverAnimation],{FADE_IN:s,EXPAND:a,SLIDE_UP:o,SLIDE_RIGHT:n,SLIDE_DOWN:u,SLIDE_LEFT:c}=l.A[Fe.A.behaviourParams.item.overlay.hoverAnimation],{MAIN_COLOR:m,ZOOM_IN:d,TILT:p,BLUR:g,GRAYSCALE:y,SHRINK:v,INVERT:P,COLOR_IN:b,DARKENED:A}=l.A[Fe.A.behaviourParams.item.content.hoverAnimation],I=this.simulateHover(),f={"gallery-item-container":!0,"item-container-regular":!I,"item-container-hover":I,"has-custom-focus":!0,visible:!0,"pro-gallery-highlight":this.isHighlight(),clickable:this.isItemClickable(t),"simulate-hover":this.simulateHover(),"hide-hover":!this.simulateHover()&&h.A.isMobile(),"invert-hover":t[Fe.A.behaviourParams.item.overlay.hoveringBehaviour]===l.A[Fe.A.behaviourParams.item.overlay.hoveringBehaviour].DISAPPEARS,"animation-slide":e===l.A[Fe.A.behaviourParams.item.content.placementAnimation].SLIDE,"hover-animation-fade-in":i===s,"hover-animation-expand":i===a,"hover-animation-slide-up":i===o,"hover-animation-slide-right":i===n,"hover-animation-slide-down":i===u,"hover-animation-slide-left":i===c,"main-color-on-hover":r===m,"zoom-in-on-hover":r===d,"tilt-on-hover":r===p,"blur-on-hover":r===g,"grayscale-on-hover":r===y,"shrink-on-hover":r===v,"invert-on-hover":r===P,"color-in-on-hover":r===b,"darkened-on-hover":r===A,"pro-gallery-mobile-indicator":h.A.isMobile()};return Object.entries(f).map((([t,e])=>!!e&&t)).filter(Boolean).join(" ")}getItemWrapperClass(){const{options:t,type:e}=this.props,i=["gallery-item-wrapper","visible"];return t[Fe.A.layoutParams.crop.enable]&&i.push("cube-type-"+t[Fe.A.layoutParams.crop.method].toLowerCase()),"text"===e&&i.push("gallery-item-wrapper-text"),i.push(bi(this.props)),i.join(" ")}getItemContainerTabIndex(){return this.isHighlight()?h.A.getTabIndex("currentThumbnail"):this.props.activeIndex===this.props.idx?h.A.getTabIndex("currentGalleryItem"):-1}componentDidMount(){if(h.A.isMobile()&&"function"==typeof n().initializeTouchEvents)try{n().initializeTouchEvents(!0)}catch(t){console.error(t)}ze.A.addEventListener("current_hover_change",this.checkIfCurrentHoverChanged)}componentWillUnmount(){clearTimeout(this.itemLoadedTimeout),ze.A.removeEventListener("current_hover_change",this.checkIfCurrentHoverChanged)}componentDidUpdate(t){(0,oi.Xe)({prevProps:t,currentProps:this.props,itemContainer:this.itemContainer.current})}checkIfCurrentHoverChanged(t){t.galleryId===this.props.galleryId&&(this.state.isCurrentHover||t.currentHoverIdx!==this.props.idx?this.state.isCurrentHover&&t.currentHoverIdx!==this.props.idx&&this.setState({isCurrentHover:!1}):this.setState({isCurrentHover:!0,itemWasHovered:!0}))}onContextMenu(t){!h.A.isDev()&&this.props.options[Fe.A.behaviourParams.gallery.blockContextMenu]&&t.preventDefault(t)}getItemAriaRole(){switch(this.props.options[Fe.A.behaviourParams.item.clickAction]){case l.A[Fe.A.behaviourParams.item.clickAction].ACTION:return"button";case l.A[Fe.A.behaviourParams.item.clickAction].LINK:return"link";default:return""}}onContainerKeyUp(t){switch(t.keyCode||t.charCode){case 32:case 13:return t.stopPropagation(),this.onItemClick(t,"item-container",!1),this.shouldUseDirectLink()&&this.itemAnchor.click(),!1;default:return!0}}composeItem(){var t;const{photoId:e,id:i,hash:r,idx:s,options:a,type:o,url:h}=this.props;this.hasRequiredMediaUrl=h||"text"===o;const u=a[Fe.A.layoutParams.info.placement]!==l.A[Fe.A.layoutParams.info.placement].OVERLAY&&!this.hasRequiredMediaUrl,c=this.getItemAriaRole(),m=n().createElement("div",Object.assign({className:this.getItemContainerClass(),onContextMenu:t=>this.onContextMenu(t),id:ni.getSellectorDomId(this.props),ref:this.itemContainer,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onFocus:this.onFocus,onBlur:this.onBlur,tabIndex:this.getItemContainerTabIndex(),"aria-label":this.getItemAriaLabel(),"data-hash":r,"data-id":e,"data-idx":s},c&&{role:c},{"data-hook":"item-container",key:"item-container-"+i,style:this.getItemContainerStyles(),onKeyUp:this.onContainerKeyUp,onClick:this.onItemWrapperClick}),this.getTopInfoElementIfNeeded(),this.getLeftInfoElementIfNeeded(),n().createElement("div",{style:Object.assign(Object.assign(Object.assign({},hi(this.props.options)),l.A.hasExternalRightPlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)&&{float:"left"}),l.A.hasExternalLeftPlacement(this.props.options[Fe.A.layoutParams.info.placement],this.props.idx)&&{float:"right"})},!u&&n().createElement("div",{"data-hook":"item-wrapper",className:this.getItemWrapperClass(),key:"item-wrapper-"+i,id:"item-wrapper-"+i,style:this.getItemWrapperStyles()},this.getItemInner())),this.getRightInfoElementIfNeeded(),this.getBottomInfoElementIfNeeded()),d=function({directLink:t,options:e,directShareLink:i,noFollowForSEO:r}){const s=(0,Ue.Xf)();if(e[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].LINK){const{url:e,target:i}=t||{},a=s&&r?{rel:"nofollow"}:{};return e&&i?Object.assign({href:e,target:i},a):{}}if(e[Fe.A.behaviourParams.item.clickAction]===l.A[Fe.A.behaviourParams.item.clickAction].ACTION){const t=i,r=!!t,s=e[Fe.A.behaviourParams.gallery.enableIndexingShareLinks]?{}:{rel:"nofollow"};return r?Object.assign({href:t,"data-cancel-link":!0},s):{}}}(this.props),p={ref:t=>this.itemAnchor=t,"data-id":e,className:"item-link-wrapper","data-idx":s,"data-hook":"item-link-wrapper",onFocus:()=>{(0,oi.tF)({itemAnchor:this.itemAnchor,enableExperimentalFeatures:this.props.enableExperimentalFeatures,itemContainer:this.itemContainer})},tabIndex:-1,onKeyDown:t=>{this.onAnchorKeyDown(t)}};return(null===(t=null==d?void 0:d.href)||void 0===t?void 0:t.length)>0?n().createElement("a",Object.assign({key:"item-container-link-"+i},p,d),m):n().createElement("div",Object.assign({key:"item-container-div-"+i},p),m)}render(){return this.composeItem()}}const _i=fi;class Si extends n().Component{constructor(t){super(t),this.handleKeys=this.handleKeys.bind(this),this.showMoreItems=this.showMoreItems.bind(this),this.createGalleryConfig=this.createGalleryConfig.bind(this),this.screenLogs=this.screenLogs.bind(this),this.createGallery=this.createGallery.bind(this),this.id=Date.now()+"|"+Math.floor(1e4*Math.random()),this.state={activeIndex:0}}handleKeys(t){const e=ze.A.document.activeElement.getAttribute("data-idx");if(e){const i=this.props.actions.findNeighborItem||this.props.galleryStructure.findNeighborItem||(()=>{}),r=Number(e);let s=-1;switch(t.keyCode||t.charCode){case 38:s=i(r,"up");break;case 37:s=i(r,this.props.options[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?"right":"left");break;case 40:if(s=i(r,"down"),this.props.totalItemsCount-1===s&&s===this.state.activeIndex)return t.stopPropagation(),h.A.focusGalleryElement(this.props.outOfViewComponent),!1;break;case 39:s=i(r,this.props.options[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?"left":"right");break;case 27:return t.stopPropagation(),h.A.focusGalleryElement(this.props.galleryContainerRef),!1}if(s>this.lastVisibleItemIdx()&&(s=r),s>=0)return t.preventDefault(),t.stopPropagation(),h.A.setStateAndLog(this,"Set Gallery Current Item",{activeIndex:s}),!1}return!0}lastVisibleItemIdxInHeight(t){for(let e=this.props.galleryStructure.items.length-1;e>=0;e--){if(this.props.galleryStructure.items[e].offset.top{this.props.actions.toggleLoadMoreItems()}))}catch(t){console.warn("showMoreItems: Cannot find item to focus",t)}else this.props.actions.toggleLoadMoreItems()}createGallery(t){var e;const{options:i,settings:r,container:s,galleryStructure:a,getVisibleItems:o,virtualizationSettings:h,scrollTop:u}=this.props,c=this.createGalleryConfig(),m=n().createElement(Be,Object.assign({},this.props.debug));let d;d=t?s.galleryHeight-138:a.height+"px";const p=this.props.isPrerenderMode?"auto":this.props.container.galleryWidth-i[Fe.A.layoutParams.structure.itemSpacing],g=function({items:t,options:e,virtualizationSettings:i,galleryWidth:r,galleryHeight:s,scrollPosition:a}){const{enabled:o=!1,forwardItemScrollMargin:n=10,backwardItemScrollMargin:h=10}=i||{};if(!o)return t.map((t=>({item:t,shouldRender:!0})));const u=e[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL,c=u?r:s,m=u?"width":"height";function d(t){const e=t.group,i=e["height"===m?"top":"left"],r=i+e[m];return i>a-c*h&&r({item:t,shouldRender:d(t)})))}({items:o(a.galleryItems,s,this.props.isPrerenderMode),options:i,virtualizationSettings:h,galleryHeight:Math.min(a.height,(null===(e=s.screen)||void 0===e?void 0:e.height)||a.height),scrollPosition:u||0}),y=g.map((({item:t,shouldRender:e},i)=>{const r=t.renderProps(Object.assign(Object.assign({},c),{visible:t.isVisible,key:`itemView-${t.id}-${i}`}));return n().createElement(_i,Object.assign(Object.assign({},r),{type:e?r.type:"dummy"}))}));return n().createElement("div",{id:this.props.galleryContainerId,className:"pro-gallery inline-styles "+(i[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?" one-row slider hide-scrollbars ":"")+((null==r?void 0:r.isAccessible)?" accessible ":"")+(i[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?" rtl ":" ltr "),style:{height:d,overflowX:"hidden"},onKeyDown:this.handleKeys},n().createElement("div",{id:`pro-gallery-margin-container-${this.props.id}`,className:"pro-gallery-margin-container",style:{margin:(this.props.options.galleryMargin||this.props.options[Fe.A.layoutParams.structure.gallerySpacing])+"px",height:d,width:p,overflow:"visible",position:"relative"}},m,y))}createGalleryConfig(){return{scrollingElement:this.props.scrollingElement,scroll:this.props.scroll,container:this.props.container,options:this.props.options,settings:this.props.settings,activeIndex:this.state.activeIndex,customComponents:this.props.customComponents,galleryId:this.props.id,gotFirstScrollEvent:this.props.gotFirstScrollEvent,playingVideoIdx:this.props.playingVideoIdx,playing3DIdx:this.props.playing3DIdx,noFollowForSEO:this.props.noFollowForSEO,isPrerenderMode:this.props.isPrerenderMode,firstUserInteractionExecuted:this.props.firstUserInteractionExecuted,enableExperimentalFeatures:this.props.enableExperimentalFeatures,actions:{eventsListener:this.props.actions.eventsListener}}}screenLogs(){return h.A.shouldDebug("screenLogs")?n().createElement("div",{className:"screen-logs"},"URL width: ",h.A.parseGetParam("width"),", Container: ",JSON.stringify(this.props.container.galleryWidth),", window.document.body.clientWidth ",document.body.clientWidth,", window.innerWidth ",ze.A.innerWidth,", window.screen.width: ",ze.A.screen.width):""}createShowMoreButton(){if("function"==typeof this.props.customComponents.customLoadMoreRenderer)return n().createElement("div",{onClick:this.showMoreItems},this.props.customComponents.customLoadMoreRenderer(this.props));const{options:t}=this.props;let e=!1;if(this.props.displayShowMore&&this.props.galleryStructure.height>this.props.container.height){const i=t[Fe.A.behaviourParams.gallery.vertical.loadMore.text]||"Load More";e=n().createElement("div",{className:"show-more-container"+(h.A.isMobile()?" pro-gallery-mobile-indicator":"")},n().createElement("button",{tabIndex:h.A.getTabIndex("loadMoreButton"),id:"show-more-"+this.props.id,className:"show-more",onClick:this.showMoreItems,onMouseDown:t=>t.preventDefault(),"data-hook":"show-more","aria-label":i},i))}return e}render(){h.A.isVerbose()&&(console.count("galleryView render"),console.time("Rendering Gallery took "),console.log("[DEBUG_RENDER] GalleryView options",this.props.options),console.log("[DEBUG_RENDER] GalleryView props changed",h.A.printableObjectsDiff(this.lastProps||{},this.props)),this.lastProps=Object.assign({},this.props),console.log("[DEBUG_RENDER] GalleryView state changed",h.A.printableObjectsDiff(this.lastState||{},this.state)),this.lastState=Object.assign({},this.state),this.renderCount=(this.renderCount||0)+1);const t=this.createShowMoreButton(),e=this.createGallery(t);h.A.isVerbose()&&console.timeEnd("Rendering Gallery took ");const i=this.screenLogs();return n().createElement("div",Object.assign({className:"pro-gallery-parent-container",key:`pro-gallery-${this.id}`},h.A.getAriaAttributes({proGalleryRole:this.props.proGalleryRole,proGalleryRegionLabel:this.props.proGalleryRegionLabel})),i,e,t)}}const Ei=Si;class Ti extends n().Component{constructor(t){super(t),this.displayName="GroupView",this.dom=[],this.state={}}createDom(t,e){return this.props.items.map((i=>{const r=i.renderProps(Object.assign(Object.assign({},this.props.galleryConfig),{visible:t}));return n().createElement(_i,Object.assign(Object.assign({},r),{type:null!=e&&e?"dummy":r.type}))}))}shouldRender(){const{items:t}=this.props;return!!(t&&t.length&&t[0])}isVisible(){const{items:t,galleryConfig:e}=this.props;if(this.props.allowLoop){const{idx:i}=t[t.length-1],{activeIndex:r,totalItemsCount:s}=e,a=r-i,o=Math.floor(s/2);return Math.abs(a)<=o}return!0}render(){const{options:t}=this.props.galleryConfig,e=t[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT;return this.shouldRender()?n().createElement("div",{key:`group_${this.props.idx}_${this.props.items[0].id}`,"data-hook":"group-view",className:`group-view group-view-${this.props.idx}`,style:{"--group-top":this.props.top+"px","--group-left":e?"auto":this.props.left+"px","--group-width":this.props.width+"px","--group-right":e?this.props.left+"px":"auto"},"aria-hidden":this.props.ariaHidden},this.createDom(this.isVisible(),this.props.shouldRenderEmpty)):null}}const Oi=Ti;var wi=i(62688),Li=i.n(wi);const Ri=t=>{var{size:e}=t,i=(0,a.__rest)(t,["size"]);return n().createElement("svg",Object.assign({viewBox:"0 0 11 14",fill:"currentColor",width:e||"11",height:e||"14"},i),n().createElement("g",{id:"final",stroke:"none",fill:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{id:"Pause",transform:"translate(-490 -763)",fill:"currentColor"},n().createElement("g",{id:"Group-2",transform:"translate(470 284)"},n().createElement("g",{id:"Group",transform:"translate(20 479)"},n().createElement("path",{id:"play",d:"M0.0788076641 0L0 14 10.5 6.81856071z"}))))))};Ri.displayName="play",Ri.propTypes={size:Li().string};const Ci=Ri,xi=t=>{var{size:e}=t,i=(0,a.__rest)(t,["size"]);return n().createElement("svg",Object.assign({viewBox:"0 0 10 14",fill:"currentColor",width:e||"10",height:e||"14"},i),n().createElement("g",{id:"final",stroke:"none",fill:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{id:"Play",transform:"translate(-490 -763)",fill:"currentColor"},n().createElement("g",{id:"Group-2",transform:"translate(470 284)"},n().createElement("g",{id:"Group",transform:"translate(20 479)"},n().createElement("path",{d:"M7,0 L10,0 L10,14 L7,14 L7,0 Z M0,0 L3,0 L3,14 L0,14 L0,0 Z",id:"_copy_3"}))))))};xi.displayName="pause",xi.propTypes={size:Li().string};const Mi=xi;function Di({activeIndex:t,prevActiveIndex:e,activeIndexOffsetMemory:i,items:r}){const s=r.length;if(t===e)return i;t=h.A.inRange(t,s);const a=Math.abs(e-t),o=Math.abs(e-s-t),n=Math.abs(e+s-t);return nvoid 0!==t.idx)).sort(((t,e)=>t.idx-e.idx))).map((e=>({item:t.find((t=>t.id===e.id)),thumbnailItem:e,idx:e.idx})))}function Gi({horizontalThumbnails:t,containerWidth:e,containerHeight:i,thumbnailSize:r}){return t?{width:e,height:r}:{width:r,height:i}}function Hi({width:t,height:e,horizontalThumbnails:i}){return i?Math.ceil(t/e):Math.ceil(e/t)}function ki({horizontalThumbnails:t,width:e,height:i,activeIndex:r,thumbnailSizeWithSpacing:s,itemsCount:a}){const o={overflow:"visible",width:e,height:i},n=t?"left":"top",l=s*(r%a),h=(t?e:i)/2-s/2;return Object.assign(Object.assign({},o),{[n]:l{const a=s+S[0].idx;return{thumbnailItem:e,item:t,location:Fi({thumbnailAlignment:r,offset:a,isRTL:d,thumbnailSizeWithSpacing:g}),idx:i}})),thumbnailsMargins:O,horizontalThumbnails:y,thumbnailsStyle:T,activeIndexOffsetMemory:n}},getThumbnailsContainerSize:Gi,getNumberOfThumbnails:Hi,getThumbnailsStyles:ki,getThumbnailsContainerMargin:zi,getThumbnailLocation:Fi,calculateActiveIndexOffset:Di,clearGalleryItems:Ni};class Wi extends n().Component{constructor(t){super(t),this.scrollToThumbnail=this.scrollToThumbnail.bind(this)}scrollToThumbnail(t){this.props.navigationToIdxCB(t)}createThumbnails({navigationPanelPosition:t,thumbnailAlignment:e,options:i,galleryStructure:r,settings:s}){const a=Ui.clearGalleryItems(this.props.items,this.props.galleryStructure.galleryItems),o=h.A.inRange(this.props.activeIndex,a.length),{horizontalThumbnails:u,items:c,thumbnailsMargins:m,thumbnailsStyle:d,activeIndexOffsetMemory:p}=Ui.getThumbnailsData({items:this.props.items,activeIndex:o,options:i,galleryStructure:r,thumbnailAlignment:e,containerHeight:this.props.container.height,containerWidth:this.props.container.width,activeIndexOffsetMemory:this.activeIndexOffsetMemory,prevActiveIndex:this.prevActiveIndex});return this.prevActiveIndex=o,this.activeIndexOffsetMemory=p,n().createElement("div",{className:"pro-gallery inline-styles thumbnails-gallery "+(this.props.domOrder?"thumbnails-gallery-"+this.props.domOrder:"")+(u?" one-row hide-scrollbars ":"")+(i[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?" rtl ":" ltr ")+((null==s?void 0:s.isAccessible)?" accessible ":""),style:Object.assign(Object.assign(Object.assign(Object.assign({},this.props.isPrerenderMode?{display:"block"}:{}),{width:d.width,height:d.height}),m),Vi({galleryThumbnailsAlignment:e,navigationPanelPosition:t})),"data-hook":"gallery-thumbnails"},n().createElement("div",{"data-hook":"gallery-thumbnails-column",className:"galleryColumn",key:"thumbnails-column",style:Object.assign({},d)},c.map((({thumbnailItem:t,location:e,idx:r})=>{const s=r===o%a.length,u=Object.assign(Object.assign({width:i[Fe.A.layoutParams.thumbnails.size],height:i[Fe.A.layoutParams.thumbnails.size],overflow:"hidden",backgroundImage:`url(${t.createUrl(l.A.urlSizes.THUMBNAIL,l.A.urlTypes.HIGH_RES)})`},e),this.props.isPrerenderMode?{opacity:0}:{});return n().createElement("div",{key:"thumbnail-"+t.id+(Number.isInteger(r)?"-"+r:""),className:"thumbnailItem thumbnail-"+t.idx+(s?" pro-gallery-thumbnails-highlighted pro-gallery-highlight"+(h.A.isMobile()?" pro-gallery-mobile-indicator":""):""),"data-key":t.id,style:u,onClick:()=>this.scrollToThumbnail(r),tabIndex:0,onKeyDown:t=>{"Enter"===t.key&&this.scrollToThumbnail(r)}},"video"===t.type&&i[Fe.A.behaviourParams.item.video.enableThumbnailsPlayButton]&&n().createElement(qe.v,{type:"videoPlayButton",size:"28"}),"3d"===t.type&&i[Fe.A.behaviourParams.item.threeDimensionalScene.enableThumbnailsPlayButton]&&n().createElement(qe.v,{type:"rotateArrow",size:"28"}),"text"===t.type?n().createElement(si,Object.assign({},this.props,t.renderProps(),{options:Object.assign(Object.assign({},i),{[Fe.A.layoutParams.crop.method]:l.A[Fe.A.layoutParams.crop.method].FILL,[Fe.A.layoutParams.crop.enable]:!0}),actions:{},imageDimensions:Object.assign(Object.assign({},u),{marginTop:0,marginLeft:0}),style:Object.assign(Object.assign({},t.renderProps().style),u)})):null)}))))}render(){const t={navigationPanelPosition:this.props.options[Fe.A.layoutParams.thumbnails.position],thumbnailAlignment:this.props.options[Fe.A.layoutParams.thumbnails.alignment],options:this.props.options,galleryStructure:this.props.galleryStructure,settings:this.props.settings};return this.createThumbnails(t)}}const Bi=({width:t,height:e,galleryHeight:i,navigationPanelPosition:r})=>r===l.A[Fe.A.layoutParams.thumbnails.position].ON_GALLERY?{}:{width:t,height:e-i},ji=({galleryHeight:t,galleryWidth:e,height:i,width:r,galleryThumbnailsAlignment:s,navigationPanelPosition:a})=>{switch(s){case l.A[Fe.A.layoutParams.thumbnails.alignment].TOP:case l.A[Fe.A.layoutParams.thumbnails.alignment].BOTTOM:return Bi({galleryHeight:t,galleryWidth:e,height:i,width:r,navigationPanelPosition:a});case l.A[Fe.A.layoutParams.thumbnails.alignment].RIGHT:case l.A[Fe.A.layoutParams.thumbnails.alignment].LEFT:return(({width:t,height:e,galleryWidth:i,navigationPanelPosition:r})=>r===l.A[Fe.A.layoutParams.thumbnails.position].ON_GALLERY?{}:{width:t-i,height:e})({galleryHeight:t,galleryWidth:e,height:i,width:r,navigationPanelPosition:a});default:return!1}},Vi=({galleryThumbnailsAlignment:t,navigationPanelPosition:e})=>{if(e===l.A[Fe.A.layoutParams.thumbnails.position].ON_GALLERY){let e={position:"absolute"};return e[t.toLowerCase()]=0,e}},Yi=Wi;var $i=i(83202),Ki=i(46778);const Zi={DEFAULT_ARROW:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"23",height:"39",viewBox:"0 0 23 39"},n().createElement("path",{d:"M857.005,231.479L858.5,230l18.124,18-18.127,18-1.49-1.48L873.638,248Z",transform:"translate(-855 -230)"})),width:23,height:39},ARROW_2:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"40px",height:"33px",viewBox:"0 0 40 33",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{id:"Artboard-Copy-93",transform:"translate(-28.000000, -32.000000)",fillRule:"nonzero"},n().createElement("polygon",{id:"4",points:"51.5515789 32 67.6 48.0484211 51.5515789 64.0968421 46.9663158 59.5115789 54.9880947 51.4881326 28 51.4897902 28 44.9245271 55.30728 44.9243284 46.9663158 36.5852632"})))),width:40,height:33},ARROW_3:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"25px",height:"42px",viewBox:"0 0 25 42",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{id:"Artboard-Copy-97",transform:"translate(-36.000000, -27.000000)",fillRule:"nonzero"},n().createElement("path",{d:"M37.2206398,28.239114 C38.8026583,26.647265 41.3436172,26.5881667 42.9967317,28.0675785 L43.1590153,28.2206482 L59.1611748,44.1233571 C61.1319602,46.0819718 61.1995454,49.2312919 59.3527322,51.2754674 L59.1795659,51.4581932 L43.1590166,67.3793505 C41.51408,69.0140701 38.8553922,69.0057967 37.2206146,67.3608606 C35.638653,65.7689547 35.5953873,63.2276769 37.0850712,61.5838107 L37.2391492,61.4224839 L50.946,47.799 L37.2391492,34.1775161 C35.7003375,32.6482622 35.5938031,30.2229032 36.9247365,28.5696317 L37.0675472,28.4014262 L37.2206398,28.239114 Z",id:"8"})))),width:25,height:42},ARROW_4:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"39px",height:"11px",viewBox:"0 0 39 11",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{transform:"translate(-29.000000, -43.000000)",fillRule:"nonzero"},n().createElement("polygon",{points:"59.79296 43 67.1767272 48.2074587 59.79296 53.3482492 59.792 49.24 29 49.2402303 29 47.3156703 59.792 47.315"})))),width:39,height:11},ARROW_5:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"39px",height:"25px",viewBox:"0 0 39 25",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{transform:"translate(-29.000000, -36.000000)",fillRule:"nonzero"},n().createElement("path",{d:"M29,48.2400242 C29,47.3087892 29.6817196,46.6578788 30.6657131,46.6578788 L62.0721815,46.6578788 L53.6034603,38.6027842 C52.9919732,38.0244263 52.9745394,37.0965804 53.5626533,36.4993057 L53.6196503,36.4424086 C54.2232252,35.8695838 55.2162345,35.8487051 55.8566495,36.4049822 L66.7354947,46.6987178 C66.8997789,46.8532785 67.0362567,47.0299812 67.1410943,47.2233734 C67.6421069,47.9137524 67.5952684,48.7577348 67.0654839,49.3382112 L66.9183084,49.529704 C66.8745903,49.5829565 66.834409,49.6278886 66.7923536,49.6712745 L55.84922,60.0371144 C55.2232594,60.6516206 54.1974244,60.6696143 53.554893,60.0838114 C52.9168128,59.5020667 52.8980482,58.5443858 53.5126939,57.940867 L53.5761731,57.877497 L62.0800244,49.8549119 L30.6657131,49.8549119 C29.6912419,49.8549119 29,49.1805348 29,48.2400242 Z",id:"5"})))),width:39,height:25},ARROW_6:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"26px",height:"40px",viewBox:"0 0 26 40",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{transform:"translate(-35.000000, -28.000000)",fillRule:"nonzero"},n().createElement("polygon",{points:"60.4571429 47.8 40.6571429 67.6 35 61.9428571 49.1433951 47.7994621 35 33.6571429 40.6571429 28"})))),width:26,height:40},ARROW_7:{SvgComp:({style:t})=>n().createElement("svg",{className:"slideshow-arrow",style:t,width:"40px",height:"33px",viewBox:"0 0 40 33",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n().createElement("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd"},n().createElement("g",{transform:"translate(-28.000000, -32.000000)",strokeWidth:"nonzero"},n().createElement("polygon",{transform:"translate(47.800000, 48.469489) rotate(-180.000000) translate(-47.800000, -48.469489) ",points:"43.2916087 32 44.4061622 33.1660321 30.8430707 47.6817192 67.6 47.6813756 67.6 49.2576026 30.9452714 49.2580761 44.4061622 63.772946 43.2924258 64.9389782 28.8681974 49.4277178 28 48.5197421"})))),width:40,height:33}},Xi=({customNavArrowsRenderer:t,arrowsSize:e,svgData:i,containerStyleType:r})=>{const s=i.width/i.height>1;if(r===l.A[Fe.A.layoutParams.navigationArrows.container.type].BOX){return{navArrowsContainerWidth:e,navArrowsContainerHeight:e,scalePercentage:e/2.4/(s?i.width:i.height)}}if(t)return{navArrowsContainerWidth:e,navArrowsContainerHeight:e};const a=e/i.width;return{scalePercentage:a,navArrowsContainerWidth:e,navArrowsContainerHeight:i.height*a}},qi=t=>{const e=Ji(t),i=e.options[Fe.A.layoutParams.navigationArrows.enable],{galleryWidth:r}=e.container,{isPrerenderMode:s,galleryStructure:a,customNavArrowsRenderer:o}=e,n={options:e.options,container:e.container,customNavArrowsRenderer:o},h=a.width<=r;return!!i&&!s&&(({options:t,container:e,customNavArrowsRenderer:i})=>{const{height:r}=e,s=Qi(t[Fe.A.layoutParams.navigationArrows.type]),{navArrowsContainerHeight:a}=Xi({customNavArrowsRenderer:i,arrowsSize:t[Fe.A.layoutParams.navigationArrows.size],svgData:s,containerStyleType:t[Fe.A.layoutParams.navigationArrows.container.type]}),o=t[Fe.A.layoutParams.info.height];return{[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].INFO_CENTER]:o,[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].IMAGE_CENTER]:r-o,[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].ITEM_CENTER]:r}[t[Fe.A.layoutParams.navigationArrows.verticalAlignment]]>=a})(n)&&!h},Ji=t=>{const{isPrerenderMode:e,galleryStructure:i,customNavArrowsRenderer:r}=t;return{options:t.options,container:t.container,isPrerenderMode:e,galleryStructure:i,customNavArrowsRenderer:r}},Qi=(t=l.A[Fe.A.layoutParams.navigationArrows.type].DEFAULT_ARROW)=>{const{DEFAULT_ARROW:e,ARROW_2:i,ARROW_3:r,ARROW_4:s,ARROW_5:a,ARROW_6:o,ARROW_7:n}=l.A[Fe.A.layoutParams.navigationArrows.type];let h;switch(t){case i:h=Zi.ARROW_2;break;case r:h=Zi.ARROW_3;break;case s:h=Zi.ARROW_4;break;case a:h=Zi.ARROW_5;break;case o:h=Zi.ARROW_6;break;case n:h=Zi.ARROW_7;break;default:h=Zi.DEFAULT_ARROW}return h};function tr({options:t,hideLeftArrow:e,hideRightArrow:i,container:r,customNavArrowsRenderer:s,next:a,id:o}){const u=t[Fe.A.layoutParams.structure.itemSpacing],c=t[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,m=t[Fe.A.layoutParams.navigationArrows.position],d=t[Fe.A.layoutParams.navigationArrows.padding],p=t[Fe.A.layoutParams.structure.scrollDirection],g=t[Fe.A.layoutParams.navigationArrows.mouseCursorContainerMaxWidth],{arrowRenderer:y,navArrowsContainerWidth:v,navArrowsContainerHeight:P}=(({customNavArrowsRenderer:t,arrowsColor:e,arrowsSize:i,arrowsType:r,containerStyleType:s})=>{const a=Qi(r),{navArrowsContainerWidth:o,navArrowsContainerHeight:u,scalePercentage:c}=Xi({customNavArrowsRenderer:t,arrowsSize:i,svgData:a,containerStyleType:s});if(t){const e=s===l.A[Fe.A.layoutParams.navigationArrows.container.type].BOX?i/2.4:i;return{arrowRenderer:i=>n().createElement("div",{style:{width:e,height:e}},t(i)),navArrowsContainerWidth:o,navArrowsContainerHeight:u}}return{arrowRenderer:t=>{const i={transform:`scaleX(${"right"===t?1:-1}) scale(${c})`,fill:h.A.isMobile()&&(null==e?void 0:e.value)?e.value:""};return n().createElement(a.SvgComp,{style:i})},navArrowsContainerWidth:o,navArrowsContainerHeight:u}})({customNavArrowsRenderer:s,arrowsColor:t[Fe.A.stylingParams.arrowsColor],arrowsSize:t[Fe.A.layoutParams.navigationArrows.size],arrowsType:t[Fe.A.layoutParams.navigationArrows.type],containerStyleType:t[Fe.A.layoutParams.navigationArrows.container.type]}),b=m===l.A[Fe.A.layoutParams.navigationArrows.position].MOUSE_CURSOR,{galleryHeight:A}=r,I=t[Fe.A.layoutParams.info.height],f=A-I,_=`50% + ${u/4}px`;let S;l.A.hasExternalAbovePlacement(t[Fe.A.layoutParams.info.placement])?S=-1:l.A.hasExternalBelowPlacement(t[Fe.A.layoutParams.info.placement])&&(S=1);const E={[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].ITEM_CENTER]:0,[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].IMAGE_CENTER]:I*S,[l.A[Fe.A.layoutParams.navigationArrows.verticalAlignment].INFO_CENTER]:-f*S}[t[Fe.A.layoutParams.navigationArrows.verticalAlignment]],T=(({type:t,backgroundColor:e,borderRadius:i})=>t===l.A[Fe.A.layoutParams.navigationArrows.container.type].BOX?{backgroundColor:e,borderRadius:`${i}%`}:{})({type:t[Fe.A.layoutParams.navigationArrows.container.type],backgroundColor:t[Fe.A.layoutParams.navigationArrows.container.backgroundColor],borderRadius:t[Fe.A.layoutParams.navigationArrows.container.borderRadius]}),O=b?Object.assign({width:`${v}px`,height:`${P}px`},T):Object.assign({width:`${v}px`,height:`${P}px`,padding:0,top:`calc(${_} - ${P/2}px - \n ${E/2}px)`},T),w=p===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&m===l.A[Fe.A.layoutParams.navigationArrows.position].OUTSIDE_GALLERY?`-${20+v}px`:`${u/2+(d||0)}px`,L={left:b?0:w},R={right:b?0:w},C=["nav-arrows-container",{BOX:"box",SHADOW:"shadow",NONE:"only-arrows"}[t[Fe.A.layoutParams.navigationArrows.container.type]]||"",h.A.isMobile()?" pro-gallery-mobile-indicator":""],x=`arrow-portal-container-${o}`,M=b?ir:er,D=t=>n().createElement(M,Object.assign({},{renderArrowSvg:y,next:a,directionIsLeft:t,arrowsBaseClasses:C,tabIndex:h.A.getTabIndex.bind(h.A),containerStyle:O,prevContainerStyle:L,nextContainerStyle:R,isRTL:c,hideLeftArrow:e,hideRightArrow:i,arrowBoxStyle:T,navArrowsContainerWidth:v,navArrowsContainerHeight:P,navigationArrowPortalId:x,mouseCursorContainerMaxWidth:g,id:o}));return n().createElement(rr,{hideLeftArrow:e,hideRightArrow:i,mouseCursorEnabled:b,isRTL:c,navigationArrowPortalId:x},(N=n().createElement(n().Fragment,null,e?null:D(!0),i?null:D(!1)),b?n().createElement(Ki.N9,{id:o},N):N));var N}function er({cursor:t,arrowsBaseClasses:e,containerStyle:i,prevContainerStyle:r,nextContainerStyle:s,isRTL:a,directionIsLeft:o,renderArrowSvg:l,next:h,tabIndex:u,arrowBoxStyle:c,navArrowsContainerWidth:m,navArrowsContainerHeight:d,navigationArrowPortalId:p}){const g=o&&a||!o&&!a,y=()=>h({direction:o?-1:1}),v={className:e.join(" "),onClick:()=>setTimeout(y,0),"aria-label":(g?"Next":"Previous")+" Item",tabIndex:u(g?"slideshowNext":"slideshowPrev"),key:g?"nav-arrow-next":"nav-arrow-back","data-hook":g?"nav-arrow-next":"nav-arrow-back",style:Object.assign(Object.assign({},i),o?r:s)};if(t){const{containerRef:e,isMouseEnter:i,position:r}=t;return n().createElement("button",Object.assign({ref:t=>e.current=t},v),i&&$i.createPortal(n().createElement("span",{style:Object.assign(Object.assign({top:r.y-d/2,left:r.x-m/2},c),{width:m,height:d})},l(o?"left":"right")),window.document.getElementById(p)))}return n().createElement("button",Object.assign({},v),l(o?"left":"right"))}function ir(t){const{directionIsLeft:e,next:i,mouseCursorContainerMaxWidth:r,hideLeftArrow:s,hideRightArrow:a,renderArrowSvg:o,containerStyle:l,arrowsBaseClasses:h,navArrowsContainerWidth:u,navArrowsContainerHeight:c}=t,m=s||a;return n().createElement(Ki.QH,{id:t.id,mouseCursorContainerMaxWidth:r,navArrowsContainerWidth:u,navArrowsContainerHeight:c,onNavigate:()=>i({direction:e?-1:1}),direction:e?"left":"right",isTheOnlyArrow:m},((t,i)=>n().createElement("div",{style:{top:i,left:t},className:"follow-mouse-cursor"},n().createElement("div",{className:h.join(" "),style:Object.assign(Object.assign({},l),{top:-c/2,left:-u/2})},o(e?"left":"right")))))}function rr({hideRightArrow:t,hideLeftArrow:e,mouseCursorEnabled:i,isRTL:r,children:s,navigationArrowPortalId:a}){if(i){const i={justifyContent:e?"flex-end":t?"flex-start":"space-between",flexDirection:r?"row-reverse":"row"};return n().createElement("div",{className:"mouse-cursor",style:Object.assign({},i)},n().createElement("div",{id:a,className:"arrow-portal-container"}),s)}return n().Fragment?n().createElement(n().Fragment,null,s):n().createElement("div",null,s)}function sr(t){if([33,37,38].includes(t))return-1;if([32,34,39,40].includes(t))return 1;throw new Error(`no direction is defined for charCode: ${t}`)}class ar extends n().Component{constructor(t){super(t),this.autoScrollToNextItem=()=>{if(!(0,Ue.Q)()&&(this.props.isInViewport||(0,Ue.IL)())){const{options:t}=this.props,e=t.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?-1:1;t.behaviourParams_gallery_horizontal_autoSlide_behaviour===l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].CONTINUOUS?this._next({direction:e,isAutoTrigger:!0,isContinuousScrolling:!0}):t.behaviourParams_gallery_horizontal_autoSlide_behaviour===l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].INTERVAL&&this._next({direction:e,isAutoTrigger:!0,scrollDuration:800})}},this.getCustomNavigationPanel=()=>{var t;return"function"==typeof(null===(t=this.props.customComponents)||void 0===t?void 0:t.EXPERIMENTAL_customNavigationPanelRenderer)&&this.props.customComponents.EXPERIMENTAL_customNavigationPanelRenderer},this.createOrGetCustomNavigationPanelAPI=()=>{const t=this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT;return this.navigationPanelAPI||(this.navigationPanelAPI={onGalleryNavigationStart:t=>{this.props.actions.eventsListener(l.A.events.GALLERY_NAVIGATION_START,t)},next:()=>{this.next({scrollDuration:400,isKeyboardNavigation:!1,isAutoTrigger:!1,avoidIndividualNavigation:!1,isContinuousScrolling:!1,direction:t?-1:1})},previous:()=>{this.next({scrollDuration:400,isKeyboardNavigation:!1,isAutoTrigger:!1,avoidIndividualNavigation:!1,isContinuousScrolling:!1,direction:t?1:-1})},navigateNextEnabled:()=>t?!this.state.hideLeftArrow:!this.state.hideRightArrow,navigatePreviousEnabled:()=>t?!this.state.hideRightArrow:!this.state.hideLeftArrow,currentIndex:()=>this.state.activeIndex,triggerItemClick:(t,{itemIndex:e=this.state.activeIndex}={})=>{const i=this.createGalleryConfig(),r=this.props.galleryStructure.galleryItems[e%this.props.totalItemsCount],s=null==r?void 0:r.renderProps(Object.assign(Object.assign({},i),{visible:!0}));this.props.actions.eventsListener(l.A.events.ITEM_ACTION_TRIGGERED,s,t)},navigateToIndex:(t,e=400)=>{this.scrollToIndex({itemIdx:t,scrollDuration:e})}}),this.props.actions.eventsListener(l.A.events.NAVIGATION_API_READY,this.navigationPanelAPI),this.navigationPanelAPI},this.navigationPanelCallbackOnIndexChange=()=>{},this.scrollToThumbnail=this.scrollToThumbnail.bind(this),this.clearAutoSlideshowInterval=this.clearAutoSlideshowInterval.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onAutoSlideShowButtonClick=this.onAutoSlideShowButtonClick.bind(this),this.startAutoSlideshowIfNeeded=this.startAutoSlideshowIfNeeded.bind(this),this.updateAutoSlideShowState=this.updateAutoSlideShowState.bind(this),this.canStartAutoSlideshow=this.canStartAutoSlideshow.bind(this),this.handleSlideshowKeyPress=this.handleSlideshowKeyPress.bind(this),this.onAutoSlideshowAutoPlayKeyPress=this.onAutoSlideshowAutoPlayKeyPress.bind(this),this.setCurrentItemByScroll=this.setCurrentItemByScroll.bind(this),this._setCurrentItemByScroll=h.A.throttle(this.setCurrentItemByScroll,600).bind(this),this._next=h.A.throttle(this.nextWithEffects.bind(this),t.isScrollLessGallery?600:400).bind(this),this.state={activeIndex:t.activeIndex||0,isInView:!0,pauseAutoSlideshowClicked:!1,hideLeftArrow:t.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].LEFT_TO_RIGHT,hideRightArrow:t.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,shouldBlockAutoSlideshow:!1,isInFocus:!1},this.lastCurrentItem=void 0,this.shouldCreateSlideShowPlayButton=!1,this.skipFromSlide=Math.round(1.5*this.props.totalItemsCount)}isFirstItem(){return 0===this.state.activeIndex}isScrollStart(t=this.props){return!(t.options.behaviourParams_gallery_horizontal_slideAnimation!==l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].SCROLL||!this.scrollElement)&&this.scrollPosition(t)<=1}isScrollEnd(t=this.props){const e=t.options.behaviourParams_gallery_horizontal_slideAnimation;return!t.options.behaviourParams_gallery_horizontal_loop&&e!==l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].FADE&&e!==l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].DECK&&(this.isAllItemsLoaded(t)&&this.scrollPositionAtTheAndOfTheGallery(t)>=Math.floor(this.getScrollElementWidth(t)))}isAllItemsLoaded(t=this.props){const{totalItemsCount:e,getVisibleItems:i,galleryStructure:r,container:s,isPrerenderMode:a}=t;return i(r.galleryItems,s,a).length>=e}getScrollElementWidth(t=this.props){const{galleryStructure:e}=t;return e.width-this.props.options.layoutParams_structure_itemSpacing/2}isFirstItemFullyVisible(){return!this.props.options.behaviourParams_gallery_horizontal_loop&&this.isScrollStart()}isLastItemFullyVisible(){return!this.props.options.behaviourParams_gallery_horizontal_loop&&this.isScrollEnd()}isLastItem(t=this.props){var e;const i=null!==(e=null==t?void 0:t.activeIndex)&&void 0!==e?e:this.state.activeIndex;return!this.props.options.behaviourParams_gallery_horizontal_loop&&i>=this.props.totalItemsCount-1}shouldBlockNext({scrollingUpTheGallery:t}){return t&&this.isLastItem()||!t&&this.isFirstItem()}shouldNotAllowScroll({scrollingUpTheGallery:t}){return t&&this.isLastItemFullyVisible()||!t&&this.isFirstItemFullyVisible()}async nextWithEffects(t){const e=await this.next(t);if(1===this.props.options.layoutParams_groups_groupSize&&this.props.isScrollLessGallery&&e>=this.skipFromSlide){const t=this.skipFromSlide-this.props.totalItemsCount;(t=>{const e=t=>{console.log("toggleScrollLessAnimation: ",t),[".gallery-item-wrapper",".gallery-item-common-info-outer"].forEach((e=>{t?[...document.querySelectorAll(e)].forEach((t=>{var e;null===(e=t.classList)||void 0===e||e.add("disabled-transition")})):[...document.querySelectorAll(e)].forEach((t=>{var e;t.offsetHeight,null===(e=t.classList)||void 0===e||e.remove("disabled-transition")}))}))};setTimeout((()=>{t&&t(),e(!0),e(!1)}),600)})((()=>this.onScrollToItemOrGroup(t,!1)))}}async next({direction:t,isAutoTrigger:e,scrollDuration:i,isKeyboardNavigation:r=!1,isContinuousScrolling:s=!1}){var a;const o=this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?t<=-1:t>=1;if(this.shouldBlockNext({scrollingUpTheGallery:o}))return void this.clearAutoSlideshowInterval();t*=this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?-1:1;const n=document.activeElement,h=n.className&&n.className.includes("gallery-item-container"),u=!r||!((null===(a=this.props.settings)||void 0===a?void 0:a.isAccessible)&&h);let c=!1;return this.props.options.behaviourParams_gallery_horizontal_slideAnimation!==l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].SCROLL&&(i=0,c=!0),this.removeArrowsIfNeeded(),u&&this.props.options.layoutParams_groups_groupSize>1?this.nextGroup({direction:t,scrollDuration:i,isContinuousScrolling:s,scrollingUpTheGallery:o}):(u&&l.A.isLayout("GRID")(this.props.options)&&this.props.options.layoutParams_structure_numberOfGridRows&&(t*=this.props.options.layoutParams_structure_numberOfGridRows),this.nextItem({direction:t,isAutoTrigger:e,scrollDuration:i,avoidIndividualNavigation:u,ignoreScrollPosition:c,isContinuousScrolling:s,scrollingUpTheGallery:o}))}getNextItemOrGroupToScrollTo(t,e,i,r,s){let a;if(this.isSliding=!0,"nextGroup"!==t&&("nextItem"!==t||i||!r||this.props.options.layoutParams_groups_groupSize>1))"nextItem"===t&&(a=i||!s?this.state.activeIndex:this.setCurrentItemByScroll(),a+=e,this.props.options.behaviourParams_gallery_horizontal_loop||(a=Math.min(this.props.galleryStructure.items.length-1,a),a=Math.max(0,a)));else{const i="nextGroup"===t?"groups":"galleryItems";a=this.getCenteredItemOrGroupIdxByScroll(i)+e}return this.isAutoScrolling=!0,a}async nextItem({direction:t,isAutoTrigger:e,scrollDuration:i,avoidIndividualNavigation:r,ignoreScrollPosition:s,isContinuousScrolling:a,scrollingUpTheGallery:o}){if(this.isSliding)return;let n=this.getNextItemOrGroupToScrollTo("nextItem",t,s,r,e);try{const t=s?0:n;return await this.scrollToItemOrGroup(this.props.actions.scrollToItem,t,a,i,o),1!==this.props.options.layoutParams_groups_groupSize||this.props.isScrollLessGallery||n>=this.skipFromSlide&&(n=h.A.inRange(n,this.props.totalItemsCount),await this.props.actions.scrollToItem(n)),this.onScrollToItemOrGroup(n,a),s&&(this.props.getMoreItemsIfNeeded(this.props.galleryStructure.galleryItems[n].offset.left),this.props.setGotFirstScrollIfNeeded()),n}catch(t){this.onThrowScrollError("Cannot proceed to the next Item",t)}}async nextGroup({direction:t,scrollDuration:e,isContinuousScrolling:i=!1,scrollingUpTheGallery:r}){if(this.isSliding)return;const s=this.getNextItemOrGroupToScrollTo("nextGroup",t);try{await this.scrollToItemOrGroup(this.props.actions.scrollToGroup,s,i,e,r);const a=this.getCenteredItemOrGroupIdxByScroll("galleryItems")+t;this.onScrollToItemOrGroup(a,i)}catch(t){this.onThrowScrollError("Cannot proceed to the next Group",t)}}async scrollToItemOrGroup(t,e,i,r,s){const a=!this.shouldNotAllowScroll({scrollingUpTheGallery:s}),{scrollMarginCorrection:o,_scrollDuration:n}=this.getScrollParameters(r);a&&await t(e,!1,!0,n,o,i)}onThrowScrollError(t,e){console.error(t,e),this.clearAutoSlideshowInterval()}onScrollToItemOrGroup(t,e){h.A.setStateAndLog(this,"Next Item",{activeIndex:t},(()=>{this.onCurrentItemChanged(),this.isSliding=!1,e&&this.startAutoSlideshowIfNeeded(this.props.options)}))}getScrollParameters(t){var e;return{scrollMarginCorrection:this.getStyles().margin||0,_scrollDuration:null!==(e=null!=t?t:this.props.options.behaviourParams_gallery_horizontal_navigationDuration)&&void 0!==e?e:400}}onCurrentItemChanged(t=this.props){if(this.lastCurrentItem!==this.state.activeIndex){this.lastCurrentItem=this.state.activeIndex;const t=this.props.galleryStructure.galleryItems[this.state.activeIndex],e=this.props.items[this.state.activeIndex];e&&(e.idx=this.state.activeIndex,e.resizedImageSrc=t.createUrl(l.A.urlSizes.RESIZED,l.A.urlTypes.HIGH_RES),this.props.actions.eventsListener(l.A.events.CURRENT_ITEM_CHANGED,e)),this.navigationPanelCallbackOnIndexChange(this.state.activeIndex)}this.removeArrowsIfNeeded(t)}clearAutoSlideshowInterval(){clearInterval(this.autoSlideshowInterval)}canStartAutoSlideshow(t){return t.behaviourParams_gallery_horizontal_autoSlide_behaviour!==l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF&&!this.state.shouldBlockAutoSlideshow}startAutoSlideshowIfNeeded(t){this.clearAutoSlideshowInterval(),this.canStartAutoSlideshow(t)&&(t.behaviourParams_gallery_horizontal_autoSlide_behaviour===l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].CONTINUOUS&&t.behaviourParams_gallery_horizontal_autoSlide_speed>0?this.autoScrollToNextItem():t.behaviourParams_gallery_horizontal_autoSlide_behaviour===l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].INTERVAL&&t.behaviourParams_gallery_horizontal_autoSlide_interval>0&&(this.autoSlideshowInterval=setInterval(this.autoScrollToNextItem,1e3*t.behaviourParams_gallery_horizontal_autoSlide_interval)))}getFirstIdx(t){const{galleryItems:e}=this.props.galleryStructure,i=e[t].itemId;return e.find((t=>t.itemId===i)).idx}scrollToThumbnail(t,e){this.props.actions.eventsListener(l.A.events.THUMBNAIL_CLICKED,this.props);const i=this.state.activeIndex,r=i+(this.getFirstIdx(t)-this.getFirstIdx(i));this.scrollToIndex({itemIdx:r,scrollDuration:e})}scrollToIndex({itemIdx:t,scrollDuration:e}){this.props.setGotFirstScrollIfNeeded();const i=this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?this.state.activeIndex-t:t-this.state.activeIndex;return this.next({direction:i,isAutoTrigger:!1,scrollDuration:e,isKeyboardNavigation:!1})}handleSlideshowKeyPress(t){t.stopPropagation();const e=t.charCode||t.keyCode;if(!1===[32,33,34,37,38,39,40,27].includes(e))return!0;t.preventDefault();const i=ze.A.document.activeElement.getAttribute("data-idx"),r=i&&this.props.totalItemsCount-1===Number(i)&&Number(i)===this.state.activeIndex;if(40===e&&r||27===e){const t={27:this.props.galleryContainerRef,40:this.props.outOfViewComponent}[e];h.A.focusGalleryElement(t)}else this._next({direction:sr(e),isKeyboardNavigation:!0});return!1}getCenteredItemOrGroupIdxByScroll(t){const e=this.props.galleryStructure[t];let i;const r=this.scrollPositionAtTheMiddleOfTheGallery();if(0===r)i=0;else for(let s,a=0;s=e[a];a++){if(("galleryItems"===t?s.offset.left:s.left)>r){i=a-1;break}}return i>=0||(i=e.length-1),i}setCurrentItemByScroll(){if(h.A.isVerbose()&&console.log("Setting current Idx by scroll",this.isAutoScrolling),this.isAutoScrolling)return void(this.isAutoScrolling=!1);if("true"===(this.scrollElement&&this.scrollElement.getAttribute("data-scrolling")))return void this.clearAutoSlideshowInterval();this.startAutoSlideshowIfNeeded(this.props.options);const t=this.getCenteredItemOrGroupIdxByScroll("galleryItems");return h.A.isUndefined(t)||h.A.setStateAndLog(this,"Set Current Item",{activeIndex:t},(()=>{this.onCurrentItemChanged()})),t}createDebugMsg(){return n().createElement(Be,Object.assign({},this.props.debug))}createNavArrows(){const{container:t,options:e,customComponents:i,id:r}=this.props,{hideLeftArrow:s,hideRightArrow:a}=this.state;return n().createElement(tr,{container:t,options:e,customNavArrowsRenderer:i.customNavArrowsRenderer,hideLeftArrow:s,hideRightArrow:a,next:this._next,id:r})}getBufferedItems(t,e){var i;const{state:r,props:s}=this,{options:a,virtualizationSettings:o,getVisibleItems:n,isPrerenderMode:h}=s,{activeIndex:u}=r;return function({groups:t,options:e,virtualizationSettings:i,galleryWidth:r,galleryHeight:s,activeIndex:a}){const{enabled:o=!1,forwardItemMargin:n=3,backwardItemMargin:h=3,forwardItemScrollMargin:u=10,backwardItemScrollMargin:c=10}=i||{},m=e[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL,d=!m||e[Fe.A.behaviourParams.gallery.horizontal.slideAnimation]===l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].SCROLL;if(!o)return t.map((t=>({group:t,shouldRender:!0})));const p=m?r:s,g=m?"width":"height",y=d?u:n,v=d?c:h,P=t.findIndex((t=>{var e,i;const{items:r}=t,s=r[0],o=r[r.length-1],n=null!==(e=s.idx)&&void 0!==e?e:s.fullscreenIdx,l=null!==(i=o.idx)&&void 0!==i?i:o.fullscreenIdx;return n<=a&&l>=a})),b=t[P],A=b[g]/p;let I=A,f=A;const _=[b];for(let e=1;I({group:t,shouldRender:_.includes(t)})))}({groups:n(t,e,h),activeIndex:u,galleryWidth:(null===(i=this.props.galleryContainerRef)||void 0===i?void 0:i.clientWidth)||e.galleryWidth||0,options:a,virtualizationSettings:o})}createGalleryConfig(){return{scrollingElement:this.props.scrollingElement,scroll:this.props.scroll,container:this.props.container,options:this.props.options,settings:this.props.settings,activeIndex:this.state.activeIndex,customComponents:this.props.customComponents,galleryId:this.props.id,gotFirstScrollEvent:this.props.gotFirstScrollEvent,playingVideoIdx:this.props.playingVideoIdx,playing3DIdx:this.props.playing3DIdx,noFollowForSEO:this.props.noFollowForSEO,isPrerenderMode:this.props.isPrerenderMode,firstUserInteractionExecuted:this.props.firstUserInteractionExecuted,enableExperimentalFeatures:this.props.enableExperimentalFeatures,actions:{eventsListener:this.props.actions.eventsListener},totalItemsCount:this.props.totalItemsCount,totalWidth:this.props.galleryStructure.width}}createLayout(){const{container:t,galleryStructure:e}=this.props,i=this.createGalleryConfig(),r=e=>{const r=!!e.galleryGroups.length&&this.getBufferedItems(e.galleryGroups,t);if(r)return r.map((({group:t,shouldRender:e})=>!!t.rendered&&n().createElement(Oi,Object.assign(Object.assign({activeIndex:this.state.activeIndex,slideAnimation:this.props.options.behaviourParams_gallery_horizontal_slideAnimation,allowLoop:this.props.options.behaviourParams_gallery_horizontal_loop&&this.props.galleryStructure.width>this.props.container.width},t.renderProps(i)),{ariaHidden:t.idx>this.skipFromSlide,shouldRenderEmpty:!e,container:this.props.container,key:t.idx}))))};return e.columns.map(((t,e)=>{const i={width:this.props.isPrerenderMode?"100%":t.width,height:this.getDimensions().height,overflowY:this.props.isPrerenderMode?"visible":"hidden"};return n().createElement("div",{"data-hook":"gallery-column",id:`gallery-horizontal-scroll-${this.props.id}`,className:`gallery-horizontal-scroll gallery-column hide-scrollbars ${this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?" rtl ":" ltr "} ${this.props.options.behaviourParams_gallery_horizontal_enableScrollSnap?" scroll-snap ":""} `,key:"column"+e,style:i},n().createElement("div",{className:"gallery-horizontal-scroll-inner"},r(t)))}))}getDimensions(){const t=this.props.container.galleryHeight;return this.props.isPrerenderMode?{width:"100%",height:t}:{height:t,width:this.props.container.galleryWidth}}createGallery(){var t;const e=this.props.options.layoutParams_structure_scrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&this.props.options.layoutParams_navigationArrows_position===l.A[Fe.A.layoutParams.navigationArrows.position].OUTSIDE_GALLERY?{overflow:"visible",left:this.props.options.layoutParams_navigationArrows_size+40+this.props.options.layoutParams_structure_itemSpacing/2}:{},i=this.getDimensions(),r=Object.assign(Object.assign(Object.assign({},i),e),{display:"flex",justifyContent:"space-between"});return n().createElement("div",{id:this.props.galleryContainerId,className:"pro-gallery inline-styles one-row hide-scrollbars "+(this.props.options.behaviourParams_gallery_horizontal_blockScroll?"":" slider ")+((null===(t=this.props.settings)||void 0===t?void 0:t.isAccessible)?" accessible ":"")+(this.props.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?" rtl ":" ltr "),style:r},this.createDebugMsg(),this.createLayout(),this.createAutoSlideShowPlayButton(),this.createSlideShowNumbers(),qi({options:this.props.options,container:this.props.container,isPrerenderMode:this.props.isPrerenderMode,galleryStructure:this.props.galleryStructure,customNavArrowsRenderer:this.props.customComponents.customNavArrowsRenderer})&&this.createNavArrows())}onAutoSlideShowButtonClick(){this.setState({pauseAutoSlideshowClicked:!this.state.pauseAutoSlideshowClicked},(()=>{this.updateAutoSlideShowState(this.props)}))}isFullWidthGallery(){return this.props.container.galleryWidth>=h.A.getWindowWidth()-10}onAutoSlideshowAutoPlayKeyPress(t){switch(t.keyCode||t.charCode){case 32:case 13:return t.preventDefault(),t.stopPropagation(),this.onAutoSlideShowButtonClick(),!1;default:return!0}}calcSlideshowCounterWidth(){const{totalItemsCount:t}=this.props;return t<10?26:t<100?43:t<1e3?60:76}createAutoSlideShowPlayButton(){if(!this.shouldCreateSlideShowPlayButton)return!1;const t=this.props.options.behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment,e=this.props.options.layoutParams_structure_itemSpacing/2+(this.isFullWidthGallery()?50:0),i=t===l.A[Fe.A.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment].RIGHT?{left:e/2+"px"}:{right:`${e/2+(this.props.options.behaviourParams_gallery_horizontal_slideshowInfo_enableCounter?this.calcSlideshowCounterWidth():0)}px`};return n().createElement("button",{className:"auto-slideshow-button",onClick:()=>{this.onAutoSlideShowButtonClick()},onKeyDown:this.onAutoSlideshowAutoPlayKeyPress,"data-hook":"auto-slideshow-button",title:"slideshow auto play","aria-pressed":this.state.pauseAutoSlideshowClicked,tabIndex:0,style:Object.assign({top:`calc(100% - ${this.props.options.layoutParams_info_height}px + 3px)`},i)},this.state.pauseAutoSlideshowClicked?n().createElement(Ci,{width:"10px",height:"100%"}):n().createElement(Mi,{width:"10px",height:"100%"}))}createSlideShowNumbers(){if(!this.props.options.behaviourParams_gallery_horizontal_slideshowInfo_enableCounter)return!1;const{totalItemsCount:t}=this.props,e=this.props.options.behaviourParams_gallery_horizontal_slideshowInfo_buttonsAlignment,i=this.props.options.layoutParams_structure_itemSpacing/2+(this.isFullWidthGallery()?50:0),r=this.shouldCreateSlideShowPlayButton?i/2+25:i/2,s=e===l.A[Fe.A.behaviourParams.gallery.horizontal.slideshowInfo.buttonsAlignment].RIGHT?{left:`${r}px`}:{right:i/2+"px"};return n().createElement("div",{className:"auto-slideshow-counter","data-hook":"auto-slideshow-counter",style:Object.assign({top:`calc(100% - ${this.props.options.layoutParams_info_height}px + 3px)`},s)},n().createElement("div",null,this.state.activeIndex%t+1+"/"+t))}getNavigationPanelArray(){if(!this.props.options.layoutParams_thumbnails_enable)return[!1,!1];const t=this.getCustomNavigationPanel();let e;if(t){const{galleryHeight:i,galleryWidth:r,height:s,width:a}=this.props.container,o=(({galleryHeight:t,galleryWidth:e,height:i,width:r,galleryThumbnailsAlignment:s,navigationPanelPosition:a})=>Object.assign(Object.assign(Object.assign({},ji({galleryHeight:t,galleryWidth:e,height:i,width:r,galleryThumbnailsAlignment:s,navigationPanelPosition:a})),Vi({galleryThumbnailsAlignment:s,navigationPanelPosition:a})),{overflow:"hidden",float:"left"}))({galleryHeight:i,galleryWidth:r,height:s,width:a,galleryThumbnailsAlignment:this.props.options.layoutParams_thumbnails_alignment,navigationPanelPosition:this.props.options.layoutParams_thumbnails_position});e=e=>n().createElement("div",{className:"custom-navigation-panel",style:o},t(Object.assign(Object.assign({},this.props),{domOrder:e,activeIndex:this.state.activeIndex,navigationToIdxCB:this.scrollToThumbnail,navigationPanelAPI:this.createOrGetCustomNavigationPanelAPI()})))}else e=t=>n().createElement(Yi,Object.assign({},this.props,{domOrder:t,activeIndex:this.state.activeIndex,navigationToIdxCB:this.scrollToThumbnail}));const i=[];if(this.props.options.layoutParams_thumbnails_position===l.A[Fe.A.layoutParams.thumbnails.position].ON_GALLERY)return i[0]=!1,i[1]=e("after"),i;if(this.props.isPrerenderMode)return i[0]=e("before"),i[1]=e("after"),i;switch(this.props.options.layoutParams_thumbnails_alignment){case l.A[Fe.A.layoutParams.thumbnails.alignment].TOP:case l.A[Fe.A.layoutParams.thumbnails.alignment].LEFT:i[0]=e("before"),i[1]=!1;break;case l.A[Fe.A.layoutParams.thumbnails.alignment].RIGHT:case l.A[Fe.A.layoutParams.thumbnails.alignment].BOTTOM:i[0]=!1,i[1]=e("after")}return i}getClassNames(){let t="pro-gallery-parent-container";return l.A.isLayout("SLIDER")(this.props.options)?t+=" gallery-slider":this.props.options.layoutParams_thumbnails_enable?t+=" gallery-thumbnails":l.A.isLayout("COLUMN")(this.props.options)&&(t+=" gallery-columns"),t}getStyles(){return{margin:-1*(this.props.options.layoutParams_structure_itemSpacing/2-this.props.options.layoutParams_structure_gallerySpacing),width:this.props.container.width,height:this.props.container.height}}getScrollPosition(t=this.props){return this.scrollElement?this.scrollPosition(t):0}scrollPositionAtTheMiddleOfTheGallery(){return this.getScrollPosition()+this.props.container.galleryWidth/2}scrollPositionAtTheAndOfTheGallery(t=this.props){return this.getScrollPosition(t)+t.container.galleryWidth}scrollPosition(t=this.props){return(t.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT?-1:1)*this.scrollElement.scrollLeft}updateAutoSlideShowState(t=this.props){const{isGalleryInHover:e,options:i,settings:r}=t,{pauseAutoSlideshowClicked:s,shouldBlockAutoSlideshow:a,isInView:o,isInFocus:n}=this.state,l=e&&i.behaviourParams_gallery_horizontal_autoSlide_pauseOnHover,h=n&&(null==r?void 0:r.isAccessible);let u=!o||s||h||l;a!==u&&this.setState({shouldBlockAutoSlideshow:u},(()=>{this.startAutoSlideshowIfNeeded(i)}))}onFocus(){this.setState({isInFocus:!0},(()=>{this.updateAutoSlideShowState(this.props)}))}onBlur(){this.setState({isInFocus:!1},(()=>{this.updateAutoSlideShowState(this.props)}))}UNSAFE_componentWillReceiveProps(t){var e,i;const r=t.isInViewport&&(null===(e=t.isInDisplay)||void 0===e||e);r!==(this.props.isInViewport&&(null===(i=this.props.isInDisplay)||void 0===i||i))?this.setState({isInView:r},(()=>{this.updateAutoSlideShowState(t)})):this.props.isGalleryInHover!==t.isGalleryInHover?this.updateAutoSlideShowState(t):this.props.container.scrollBase!=t.container.scrollBase&&this.forceUpdate((()=>{this.startAutoSlideshowIfNeeded(t.options)})),this.props.activeIndex!==t.activeIndex&&h.A.setStateAndLog(this,"Next Item",{activeIndex:t.activeIndex},(()=>{this.onCurrentItemChanged(t)})),this.props.totalItemsCount===t.totalItemsCount&&this.props.container.galleryHeight===t.container.galleryHeight&&this.props.container.galleryWidth===t.container.galleryWidth&&this.state.activeIndex===t.activeIndex||this.removeArrowsIfNeeded(t),((0,Ue.Q)()||(0,Ue.IL)())&&(this.props.options.behaviourParams_gallery_horizontal_autoSlide_behaviour!==l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF!==t.options.behaviourParams_gallery_horizontal_autoSlide_behaviour===l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF&&this.props.options.behaviourParams_gallery_horizontal_autoSlide_interval===t.options.behaviourParams_gallery_horizontal_autoSlide_interval||this.startAutoSlideshowIfNeeded(t.options)),this.shouldCreateSlideShowPlayButton=t.options.behaviourParams_gallery_horizontal_autoSlide_behaviour!==l.A[Fe.A.behaviourParams.gallery.horizontal.autoSlide.behaviour].OFF&&t.options.behaviourParams_gallery_horizontal_slideshowInfo_enablePlayButton}removeArrowsIfNeeded(t=this.props){const e=t.options.behaviourParams_gallery_layoutDirection===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,{hideLeftArrow:i,hideRightArrow:r}=this.state,s=this.isScrollStart(t),a=this.isFirstItem(),o=this.isScrollEnd(t),n=this.isLastItem(t),h=s||a,u=o||n,c=!e&&h||e&&u,m=e&&h||!e&&u;(!!c!=!!i||!!m!=!!r)&&this.setState({hideLeftArrow:!!c,hideRightArrow:!!m})}componentDidMount(){this.scrollElement=ze.A.document.querySelector(`#pro-gallery-${this.props.id} #gallery-horizontal-scroll-${this.props.id}`),this.scrollElement&&this.scrollElement.addEventListener("scroll",this._setCurrentItemByScroll),this.state.activeIndex>0?(this.props.actions.scrollToItem(this.state.activeIndex),this.onCurrentItemChanged()):this.setCurrentItemByScroll(),this.startAutoSlideshowIfNeeded(this.props.options),this.createOrGetCustomNavigationPanelAPI()}componentWillUnmount(){this.scrollElement&&this.scrollElement.removeEventListener("scroll",this._setCurrentItemByScroll)}render(){h.A.isVerbose()&&(console.count("galleryView render"),console.count("Rendering Gallery count"),console.time("Rendering Gallery took "));const t=this.createGallery(),e=this.getNavigationPanelArray();return h.A.isVerbose()&&console.timeEnd("Rendering Gallery took "),n().createElement("div",Object.assign({className:this.getClassNames(),style:this.getStyles(),onKeyDown:this.handleSlideshowKeyPress},h.A.getAriaAttributes({proGalleryRole:this.props.proGalleryRole,proGalleryRegionLabel:this.props.proGalleryRegionLabel}),{onFocus:this.onFocus,onBlur:this.onBlur}),e[0],t,e[1])}}const or=ar;class nr{constructor(){this.promise=new Promise(((t,e)=>{this.reject=(...t)=>{this.isPending=!1,e(...t)},this.resolve=(...e)=>{this.isPending=!1,t(...e)},this.isPending=!0}))}}function lr({scroller:t,from:e,to:i,duration:r,isRTL:s,slideTransition:a,isContinuousScrolling:o,autoSlideshowContinuousSpeed:n}){let l=i-e;if(0===l)return new Promise((t=>t(i)));o&&(r=Math.abs(l)/n*1e3);const h=t.firstChild;t.setAttribute("data-scrolling","true"),Object.assign(t.style,{"scroll-snap-type":"none"}),Object.assign(h.style,{transition:`transform ${r}ms ${a}`,"-webkit-transition":`transform ${r}ms ${a}`},{transform:`translateX(${-1*l}px)`});const u=new CustomEvent("scrollTransition",{detail:l/10}),c=setInterval((()=>{t.dispatchEvent(u)}),Math.round(r/10));let m=new nr;const d=setTimeout((()=>{clearInterval(c),Object.assign(h.style,{transition:"none","-webkit-transition":"none"},{transform:"translateX(0px)"}),t.style.removeProperty("scroll-snap-type"),t.scrollLeft=i,t.setAttribute("data-scrolling",""),m.resolve(i)}),r);return{scrollDeffered:m,scroller:t,from:e,to:i,duration:r,isRTL:s,slideTransition:a,isContinuousScrolling:o,autoSlideshowContinuousSpeed:n,currentScrollEndTimeout:d}}function hr({scroller:t,from:e,isRTL:i,currentScrollEndTimeout:r,scrollDeffered:s}){clearTimeout(r);const a=t.firstChild;let o=getComputedStyle(a).getPropertyValue("transform");var n=new DOMMatrix(o);(function({scroller:t,at:e,isRTL:i}){Object.assign(t.style,{"scroll-snap-type":"none"});let r=new nr;Object.assign(t.firstChild.style,{transition:"none","-webkit-transition":"none"},{transform:"translateX(0px)"}),t.scrollLeft=e,r.resolve(e)})({scroller:t,at:e-=Math.round(parseInt(n.m41,10)),isRTL:i}),s.resolve(e)}class ur extends n().Component{constructor(t){super(),this.state={scrollTop:0,scrollLeft:0},this.debouncedOnScroll=h.A.debounce(t.onScroll,50)}removeScrollListener(){if(this.scrollEventListenerSet){const t=this.props.scrollingElement;try{t.vertical().removeEventListener("scroll",this.onVerticalScroll)}catch(t){}try{const{scrollDirection:e}=this.props;e===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&t.horizontal().removeEventListener("scroll",this.onHorizontalScroll)}catch(t){}this.scrollEventListenerSet=!1}}initScrollListener(){var t,e;this.scrollEventListenerSet&&this.removeScrollListener(),this.scrollEventListenerSet=!0;const i=this.props.scrollingElement;if(this.onHorizontalScrollTransition=({detail:t})=>{const e=Math.round(t);e>=0&&this.props.galleryScrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&this.setState({scrollLeft:this.state.scrollLeft+e})},this.onHorizontalScroll=t=>{var e,i;this.props.setGotFirstScrollIfNeeded();const r=t.currentTarget||t.target||t;let s=r&&(null!==(i=null!==(e=r.scrollX)&&void 0!==e?e:r.scrollLeft)&&void 0!==i?i:r.x);this.props.isRTL&&(s=Math.abs(s)),s>=0&&this.props.galleryScrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&(this.setState({scrollTop:s,scrollLeft:s}),this.props.getMoreItemsIfNeeded(s),this.debouncedOnScroll({left:s}))},this.props.galleryScrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL)try{null===(t=null==i?void 0:i.horizontal())||void 0===t||t.addEventListener("scroll",this.onHorizontalScroll),null===(e=null==i?void 0:i.horizontal())||void 0===e||e.addEventListener("scrollTransition",this.onHorizontalScrollTransition)}catch(t){console.error(t)}this.onVerticalScroll=t=>{this.props.setGotFirstScrollIfNeeded();const e=t.currentTarget||t.target||t,i=e&&(e.scrollY||e.scrollTop||e.y);i>=0&&(this.props.galleryScrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].VERTICAL&&(this.setState({scrollTop:i}),this.props.getMoreItemsIfNeeded(i)),this.debouncedOnScroll({top:i}))};try{i.vertical().addEventListener("scroll",this.onVerticalScroll)}catch(t){console.error(t)}}componentWillUnmount(){this.removeScrollListener()}componentDidMount(){this.initScrollListener()}UNSAFE_componentWillReceiveProps(t){let e=!1;for(const i of["id","scrollDirection","isRTL","totalWidth","scrollBase"])if(t[i]!==this.props[i]){e=!0;break}e&&this.initScrollListener()}render(){const t=this.props.galleryScrollDirection===l.A[Fe.A.layoutParams.structure.scrollDirection].VERTICAL&&this.props.scrollBase>0?this.props.scrollBase:0,e=this.state.scrollTop-t,{id:i}=this.props;return n().createElement("div",{key:"css-scroll-indicator","data-hook":"css-scroll-indicator","data-scroll-base":t,"data-scroll-top":this.state.scrollTop,className:ni.calcScrollClasses(i,e),style:{display:"none"}})}}const cr=(t="",e,i)=>{const r=i[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT;let s="";return e.forEach((e=>{const i=(({galleryId:t,item:e})=>`#pro-gallery-${t} #${ni.getSellectorDomId(e)}`)({galleryId:t,item:e}),a=(t=>({top:t.offset.top,left:t.offset.left,width:t.width+t.infoWidth,height:t.height+t.infoHeight,innerHeight:t.height}))(e),o=`top:${a.top}px;`,n=r?`right:${a.left}px;left:auto;`:`left:${a.left}px;`,l=`width:${a.width}px;`,h=`height:${a.height}px;`;s+=`${i} {${o}${n}${l}${h}}`})),s};const mr=class{constructor(t){this.config=t,this.scrollHelpers=[],this.stop=t=>{for(const e of this.scrollHelpers)e.findItem(t)&&e.stop(t)},this.initializePlayState=()=>{for(const t of this.scrollHelpers)t.initializePlayState()},this.onScroll=({top:t,left:e})=>{this.scrollHelpers.length||(this.top=t||this.top,this.left=e||this.left);for(const i of this.scrollHelpers)i.onScroll({top:t,left:e})},this.handleEvent=t=>{for(const e of this.scrollHelpers)e.handleEvent(t)},this.updateGalleryStructure=t=>{if(!t.isSSR){for(const e of this.scrollHelpers)e.updateGalleryStructure(t);this.scrollHelperPromise?this.latestGalleryStructure=t:(this.latestGalleryStructure=t,(0,Ue.Q)()||t.galleryStructure.galleryItems.some((t=>this.config.some((e=>e.supportedItemsFilter(t)))))&&(this.scrollHelperPromise=Promise.all([i.e(8841),i.e(9143),i.e(4313)]).then(i.bind(i,46789)).then((({default:t})=>{for(const e of this.config)this.scrollHelpers.push(new t(e.onSetPlayingIdx,e.supportedItemsFilter,e.getPlayTrigger));this.updateGalleryStructure(this.latestGalleryStructure),this.onScroll({top:this.top,left:this.left})})).catch((t=>{console.error("Failed to load videoScrollHelper. error: "+t)}))))}},this.left=0,this.top=0}};const dr=function(t,e,i){const r=i[t];let s;const a=(t,e,r)=>{let s,a,o,n=null,l={};return i.forEach((i=>{s=i.offset.top+i.height/2,a=i.offset.left+i.width/2,o=Math.sqrt(Math.pow(s-e,2)+Math.pow(a-t,2)),(null===n||o>0&&orir>e));break;default:s=a(r.offset.right,r.offset.top+r.height/2,((t,e,i)=>i>t))}return s.idx>=0?s.idx:(console.warn("Could not find offset for itemIdx",t,e),t)};class pr extends n().Component{constructor(t){super(t),this.updateVisibility=()=>{const t=function({container:t,scrollTop:e}){try{const i=t.scrollBasee;return i&&r}catch(t){return console.warn("Could not calculate viewport",t),!0}}({container:this.props.container,scrollTop:this.state.scrollPosition.top});this.state.isInViewport!==t&&this.setState({isInViewport:t})},this.setVisibilityIfNeeded=(t,e)=>{const{container:i}=this.props,{scrollPosition:r}=this.state;i.scrollBase===t.container.scrollBase&&r.top===e.scrollPosition.top||this.updateVisibility()},this.findNeighborItem=(t,e)=>dr(t,e,this.state.structure.items),h.A.isVerbose()&&console.count("[OOISSR] galleryContainer constructor",ze.A.isMock),this.getMoreItemsIfNeeded=this.getMoreItemsIfNeeded.bind(this),this.setGotFirstScrollIfNeeded=this.setGotFirstScrollIfNeeded.bind(this),this.toggleLoadMoreItems=this.toggleLoadMoreItems.bind(this),this.scrollToItem=this.scrollToItem.bind(this),this.scrollToGroup=this.scrollToGroup.bind(this),this._scrollingElement=this.getScrollingElement(),this.eventsListener=this.eventsListener.bind(this),this.onGalleryScroll=this.onGalleryScroll.bind(this),this.getVisibleItems=this.getVisibleItems.bind(this),this.findNeighborItem=this.findNeighborItem.bind(this),this.setCurrentSlideshowViewIdx=this.setCurrentSlideshowViewIdx.bind(this),this.getIsScrollLessGallery=this.getIsScrollLessGallery.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.mediaScrollHelper=new mr([{getPlayTrigger:t=>t.behaviourParams_item_video_playTrigger,onSetPlayingIdx:t=>this.setState({playingVideoIdx:t}),supportedItemsFilter:t=>"video"===t.type||"image"===t.type&&(t.id.includes("_placeholder")||t.isVideoPlaceholder)},{getPlayTrigger:t=>t.behaviourParams_item_threeDimensionalScene_playTrigger,onSetPlayingIdx:t=>this.setState({playing3DIdx:t}),supportedItemsFilter:t=>"3d"===t.type}]);const e={scrollPosition:{top:0,left:0},showMoreClickedAtLeastOnce:!1,initialGalleryHeight:void 0,needToHandleShowMoreClick:!1,gotFirstScrollEvent:t.activeIndex>=0,playingVideoIdx:-1,playing3DIdx:-1,viewComponent:null,firstUserInteractionExecuted:!1,isInHover:!1,isInViewport:!0};this.state=e,this.layoutCss=[],this.initialGalleryState={};try{const e=this.propsToState(t);Object.keys(e).length>0&&(this.initialGalleryState=e)}catch(t){console.warn("Cannot create initial state from props",t)}this.state=Object.assign(Object.assign({},e),this.initialGalleryState)}initializeScrollPosition(){if(this.props.activeIndex>0){this.scrollToItem(this.props.activeIndex,!1,!0,0);const t=this.galleryStructure.items[this.props.activeIndex];this.onGalleryScroll(t.offset)}}isScrollingUnavailable(t,e){return this.isVerticalGallery()?t<=e+300:this.state.structure.width{if(this.state.items.length>t){const{body:t,documentElement:e}=document,i=ze.A.innerHeight,r=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);this.getMoreItemsIfScrollIsDisabled(r,i)}}))}}componentDidMount(){ze.C.stopUsingMock();const{body:t,documentElement:e}=document,i=ze.A.innerHeight,r=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);this.initializeScrollPosition(),this.getMoreItemsIfScrollIsDisabled(r,i),this.handleNewGalleryStructure(),this.eventsListener(l.A.events.APP_LOADED,{}),this.mediaScrollHelper.initializePlayState();try{"function"==typeof ze.A.CustomEvent?this.currentHoverChangeEvent=new CustomEvent("current_hover_change"):(this.currentHoverChangeEvent=ze.A.document.createEvent("CustomEvent"),this.currentHoverChangeEvent.initCustomEvent("current_hover_change",!1,!1,null))}catch(t){console.error("could not create 'current_hover_change' customEvent. Error =",t)}this.props.id&&(this.currentHoverChangeEvent.galleryId=this.props.id)}UNSAFE_componentWillReceiveProps(t){!this.currentHoverChangeEvent.galleryId&&t.id&&(this.currentHoverChangeEvent.galleryId=t.id),this.props.activeIndex!==t.activeIndex&&t.activeIndex!==this.currentSlideshowViewIdx&&this.scrollToItem(t.activeIndex,!1,!0,0);const e=()=>{const e=this.propsToState(t);Object.keys(e).length>0&&this.setState(e,this.handleNewGalleryStructure)},i=t=>{const{id:e,options:i,container:r,items:s,isInDisplay:a,isPrerenderMode:o}=t;return{id:e,options:i,container:r,items:s,isInDisplay:a,isPrerenderMode:o}};this.reCreateGalleryTimer&&clearTimeout(this.reCreateGalleryTimer);let r=!0;try{const e=i(this.props),s=i(t);r=JSON.stringify(e)!==JSON.stringify(s),h.A.isVerbose()&&r&&console.log("New props arrived",h.A.printableObjectsDiff(e,s))}catch(t){console.error("Cannot compare props",t)}r&&(e(),this.props.isInDisplay!==t.isInDisplay&&this.handleNavigation(t.isInDisplay))}handleNavigation(t){t||this.mediaScrollHelper.stop()}handleNewGalleryStructure(){const{container:t,needToHandleShowMoreClick:e,initialGalleryHeight:i}=this.state,r="vertical"===this.containerInfiniteGrowthDirection();let s=!1;if(!r&&e){const e=138;s=t.height+(i-e)}const a=this.props.options,o={numOfItems:this.state.items.length,container:t,options:a,layoutHeight:s||this.props.container.height,layoutItems:this.props.structure.items,isInfinite:r,isFixedHorizontlaGalleryRatio:"horizontal"===this.containerInfiniteGrowthDirection()&&this.state.options[Fe.A.layoutParams.structure.galleryRatio.value]>0,updatedHeight:s};h.A.isVerbose()&&console.log("handleNewGalleryStructure",o),this.eventsListener(l.A.events.GALLERY_CHANGE,o),e&&this.setState({needToHandleShowMoreClick:!1})}isVerticalGallery(){return this.state.options[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].VERTICAL}getIsScrollLessGallery(t){const e=t[Fe.A.behaviourParams.gallery.horizontal.slideAnimation];return t[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL&&e!==l.A[Fe.A.behaviourParams.gallery.horizontal.slideAnimation].SCROLL}getVisibleItems(t,e,i){var r,s;const{gotFirstScrollEvent:a}=this.state,o=(null===(s=null===(r=this.state)||void 0===r?void 0:r.scrollPosition)||void 0===s?void 0:s.top)||0,{galleryHeight:n,scrollBase:l,galleryWidth:h}=e;if(i||(0,Ue.Xf)()||(0,Ue.Q)()||a||o>0||(0,Ue.IL)()||this.props.activeIndex>0)return t;let u=t;try{const e=ze.A.innerHeight,i=this.isVerticalGallery()&&"vertical"===this.containerInfiniteGrowthDirection()?1/0:l+n,r=o+e,s=Math.min(i,r)-l;u=s<0?[]:this.isVerticalGallery()?t.filter((t=>t.offset.topt.left<=h+20)),u.length<2&&u.lengththis.props.scrollingElement:()=>ze.A,horizontal:()=>ze.A.document.querySelector(`#pro-gallery-${this.props.id} #gallery-horizontal-scroll-${this.props.id}`)}}scrollToItem(t,e,i,r=0,s,a=!1){if(t>=0){if(this.state.gotFirstScrollEvent||this.setState({gotFirstScrollEvent:!0}),this.getIsScrollLessGallery(this.state.options))return;const o=this._scrollingElement,n=o.horizontal();try{const u={scrollMarginCorrection:s,isRTL:this.state.options[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,scrollDirection:this.state.options[Fe.A.layoutParams.structure.scrollDirection],galleryWidth:this.state.container.galleryWidth,galleryHeight:this.state.container.galleryHeight,top:0,items:this.galleryStructure.items,totalWidth:this.galleryStructure.width,itemIdx:t,fixedScroll:e,isManual:i,scrollingElement:o,horizontalElement:n,durationInMS:r,slideTransition:this.state.options[Fe.A.behaviourParams.gallery.horizontal.slideTransition],isContinuousScrolling:a,autoSlideshowContinuousSpeed:this.state.options[Fe.A.behaviourParams.gallery.horizontal.autoSlide.speed],itemSpacing:this.state.options[Fe.A.layoutParams.structure.itemSpacing]};return this.eventsListener(l.A.events.GALLERY_NAVIGATION_START,{current:"scrollToItem",scrollParams:u}),this.currentScrollData=function(t){let e,i;const{scrollMarginCorrection:r=0,durationInMS:s,horizontalElement:a,scrollingElement:o,isRTL:n,scrollDirection:u,galleryWidth:c,galleryHeight:m,totalWidth:d,top:p,items:g,itemIdx:y,fixedScroll:v,slideTransition:P,isContinuousScrolling:b,autoSlideshowContinuousSpeed:A,itemSpacing:I}=t,f=n?-1:1;if(u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?(i=a.scrollLeft*f,e=i+y*c/2):(i=p,e=p+y*m/2),!0!==v){h.A.isVerbose()&&console.log("Scrolling to items #"+y);const t=g.find((t=>t.idx===y));if(e=u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?h.A.get(t,"offset.left"):h.A.get(t,"offset.top"),h.A.isVerbose()&&console.log("Scrolling to position "+e,t),!(e>=0))return h.A.isVerbose()&&console.warn("Position not found, not scrolling"),new Promise((t=>t()));if(u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL){const s=(c-t.width-I)/2;e-=s,e=Math.max(0,e),e=Math.min(e,d-c+r),e*=f,i*=f,h.A.isVerbose()&&console.log("Scrolling to new position "+e,this)}}return u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?lr({scroller:a,from:Math.round(i),to:Math.round(e),duration:s,isRTL:n,slideTransition:P,isContinuousScrolling:b,autoSlideshowContinuousSpeed:A}):new Promise((t=>{o.vertical().scrollTo(0,e),t(e)}))}(u),this.currentScrollData.scrollDeffered.promise.then((()=>{this.currentScrollData=null}))}catch(t){console.error("error:",t," pro-gallery, scrollToItem, cannot get scrollParams, ","isEditMode =",(0,Ue.Q)()," isPreviewMode =",(0,Ue.IL)()," isSiteMode =",(0,Ue.PP)()," this.state.options =",this.state.options," this.state.container =",this.state.container," this.galleryStructure =",this.galleryStructure)}}}scrollToGroup(t,e,i,r=0,s,a=!1){if(t>=0){const o=this._scrollingElement,n=o.horizontal();try{const u={scrollMarginCorrection:s,isRTL:this.state.options[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,scrollDirection:this.state.options[Fe.A.layoutParams.structure.scrollDirection],galleryWidth:this.state.container.galleryWidth,galleryHeight:this.state.container.galleryHeight,top:0,groups:this.galleryStructure.groups,totalWidth:this.galleryStructure.width,groupIdx:t,fixedScroll:e,isManual:i,scrollingElement:o,horizontalElement:n,durationInMS:r,slideTransition:this.state.options[Fe.A.behaviourParams.gallery.horizontal.slideTransition],isContinuousScrolling:a,autoSlideshowContinuousSpeed:this.state.options[Fe.A.behaviourParams.gallery.horizontal.autoSlide.speed],itemSpacing:this.state.options[Fe.A.layoutParams.structure.itemSpacing]};return this.eventsListener(l.A.events.GALLERY_NAVIGATION_START,{current:"scrollToGroup",scrollParams:u}),this.currentScrollData=function(t){let e,i;const{scrollMarginCorrection:r=0,durationInMS:s,horizontalElement:a,scrollingElement:o,isRTL:n,scrollDirection:u,galleryWidth:c,galleryHeight:m,totalWidth:d,top:p,groups:g,groupIdx:y,fixedScroll:v,slideTransition:P,isContinuousScrolling:b,autoSlideshowContinuousSpeed:A,itemSpacing:I}=t,f=n?-1:1;if(u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?(i=a.scrollLeft,e=i+y*c/2):(i=p,e=p+y*m/2),!0!==v){h.A.isVerbose()&&console.log("Scrolling to groups #"+y);const t=g.find((t=>t.idx===y));if(e=u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?h.A.get(t,"left"):h.A.get(t,"top"),h.A.isVerbose()&&console.log("Scrolling to position "+e,t),!(e>=0))return h.A.isVerbose()&&console.warn("Position not found, not scrolling"),new Promise((t=>t()));if(u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL){const i=(c-t.width-I)/2;e-=i,e=Math.max(0,e),e=Math.min(e,d-c+r),e*=f,h.A.isVerbose()&&console.log("Scrolling to new position "+e,this)}}return u===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?lr({scroller:a,from:Math.round(i),to:Math.round(e),duration:s,isRTL:n,slideTransition:P,isContinuousScrolling:b,autoSlideshowContinuousSpeed:A}):new Promise((t=>{o.vertical().scrollTo(0,e),t(e)}))}(u),this.currentScrollData.scrollDeffered.promise.then((()=>{this.currentScrollData=null}))}catch(t){console.error("error:",t," pro-gallery, scrollToGroup, cannot get scrollParams, ","isEditMode =",(0,Ue.Q)()," isPreviewMode =",(0,Ue.IL)()," isSiteMode =",(0,Ue.PP)()," this.state.options =",this.state.options," this.state.container =",this.state.container," this.galleryStructure =",this.galleryStructure)}}}containerInfiniteGrowthDirection(t=!1){const e=t||this.props.options,{showMoreClickedAtLeastOnce:i}=this.state;return e[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?"horizontal":this.props.options[Fe.A.behaviourParams.gallery.vertical.loadMore.enable]?i&&e[Fe.A.behaviourParams.gallery.vertical.loadMore.amount]===l.A[Fe.A.behaviourParams.gallery.vertical.loadMore.amount].ALL?"vertical":"none":"vertical"}onGalleryScroll(t){this.props.isInDisplay&&this.eventsListener(l.A.events.GALLERY_SCROLLED,t)}componentDidUpdate(t,e){if(this.setVisibilityIfNeeded(t,e),this.props.isPrerenderMode!==t.isPrerenderMode){const{body:t,documentElement:e}=document,i=ze.A.innerHeight,r=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);this.getMoreItemsIfScrollIsDisabled(r,i)}}createDynamicStyles(t,e){const i=e&&!this.props.settings.disableSSROpacity;this.dynamicStyles=`\n ${i?`#pro-gallery-${this.props.id} .gallery-item-container { opacity: 0 }`:""}\n ${t?`#pro-gallery-${this.props.id} .gallery-item-hover::before { background: ${t} !important}`:""}\n `.trim()}createCssLayoutsIfNeeded(t){const{settings:e={}}=this.props,{avoidInlineStyles:i}=e;i&&(this.layoutCss=(({galleryItems:t,layoutParams:e,id:i})=>{const r=[];return r.push(cr(i,t,e.options)),r})({layoutParams:t,isMobile:h.A.isMobile(),id:this.props.id,galleryItems:this.galleryStructure.galleryItems}))}getScrollCss({id:t,items:e,options:i,container:r}){this.scrollCss=ni.calcScrollCss({items:e,options:i,id:t,container:r})}toggleLoadMoreItems(){this.eventsListener(l.A.events.LOAD_MORE_CLICKED,this.galleryStructure.galleryItems);const t=!0;if(this.state.showMoreClickedAtLeastOnce)this.setState({needToHandleShowMoreClick:t},(()=>{this.handleNewGalleryStructure()}));else{this.getScrollCss({id:this.props.id,items:this.galleryStructure.galleryItems,options:this.state.options,container:this.state.container});const e=this.state.container.height;this.setState({showMoreClickedAtLeastOnce:true,initialGalleryHeight:e,needToHandleShowMoreClick:t},(()=>{this.handleNewGalleryStructure()}))}}setGotFirstScrollIfNeeded(){this.state.gotFirstScrollEvent||(this.getScrollCss({id:this.props.id,items:this.galleryStructure.galleryItems,options:this.state.options,container:this.state.container}),this.setState({gotFirstScrollEvent:!0}))}setCurrentSlideshowViewIdx(t){this.currentSlideshowViewIdx=t}simulateHorizontalScrollToItem(t){(null==t?void 0:t.offset)&&this.onGalleryScroll({left:t.offset.left})}eventsListener(t,e,i){if(this.mediaScrollHelper.handleEvent({eventName:t,eventData:e}),t===l.A.events.HOVER_SET&&(this.currentHoverChangeEvent.currentHoverIdx=e,ze.A.dispatchEvent(this.currentHoverChangeEvent)),t===l.A.events.CURRENT_ITEM_CHANGED&&(this.setCurrentSlideshowViewIdx(e.idx),this.getIsScrollLessGallery(this.state.options)&&this.simulateHorizontalScrollToItem(this.galleryStructure.items[e.idx])),!this.state.firstUserInteractionExecuted)switch(t){case l.A.events.HOVER_SET:case l.A.events.LOAD_MORE_CLICKED:case l.A.events.ITEM_ACTION_TRIGGERED:this.setState({firstUserInteractionExecuted:!0})}if("function"==typeof this.props.eventsListener)switch(t){case l.A.events.ITEM_ACTION_TRIGGERED:case l.A.events.ITEM_CLICKED:setTimeout(this.props.eventsListener(t,e,i),0);break;default:this.props.eventsListener(t,e,i)}if(t===l.A.events.GALLERY_SCROLLED){this.mediaScrollHelper.onScroll(e);const t=Object.assign(Object.assign({},this.state.scrollPosition),e);this.setState({scrollPosition:t})}}getMoreItemsIfNeeded(t){var e;if(null===(e=this.deferredGettingMoreItems)||void 0===e?void 0:e.isPending);else if(this.deferredGettingMoreItems=new nr,this.galleryStructure&&this.galleryStructure.galleryItems&&this.galleryStructure.galleryItems.length>0&&this.state.items&&this.state.options&&this.state.container){const e=this.state.options[Fe.A.layoutParams.structure.scrollDirection],i=this.galleryStructure[e===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?"width":"height"]+(e===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?0:this.state.container.scrollBase),r=ze.A[e===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?"innerWidth":"innerHeight"];i<(t?3*r:0)+(t+r)?(this.eventsListener(l.A.events.NEED_MORE_ITEMS,this.state.items.length),setTimeout((()=>{this.deferredGettingMoreItems.resolve()}),2e3)):this.deferredGettingMoreItems.reject()}else this.deferredGettingMoreItems.reject();return this.deferredGettingMoreItems.promise.catch((()=>{}))}canRender(){const t=this.props.container&&this.props.options&&this.state.items;return!t&&h.A.isVerbose()&&console.log("PROGALLERY [CAN_RENDER] GalleryContainer",t,this.props.container,this.props.options,this.state.items),t}onMouseEnter(){var t;(null===(t=this.currentScrollData)||void 0===t?void 0:t.isContinuousScrolling)&&this.state.options[Fe.A.behaviourParams.gallery.horizontal.autoSlide.pauseOnHover]&&hr(this.currentScrollData),this.setState({isInHover:!0})}onMouseLeave(){this.setState({isInHover:!1})}render(){var t,e,i;if(!this.canRender())return null;const r=this.props.options[Fe.A.layoutParams.structure.scrollDirection]===l.A[Fe.A.layoutParams.structure.scrollDirection].HORIZONTAL?or:Ei;h.A.isVerbose()&&(console.count("PROGALLERY [COUNTS] - GalleryContainer (render)"),console.log("PROGALLERY [RENDER] - GalleryContainer",this.props.container.scrollBase,{props:this.props,items:this.state.items}));const s="none"===this.containerInfiniteGrowthDirection();return n().createElement("div",{"data-key":"pro-gallery-inner-container",key:"pro-gallery-inner-container",className:this.props.isPrerenderMode?"pro-gallery-prerender":"",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,ref:t=>this.galleryContainerRef=t,tabIndex:-1},n().createElement(ur,{id:this.props.id,galleryScrollDirection:this.props.options[Fe.A.layoutParams.structure.scrollDirection],isRTL:this.props.options[Fe.A.behaviourParams.gallery.layoutDirection]===l.A[Fe.A.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT,totalWidth:this.galleryStructure.width,scrollBase:this.props.container.scrollBase,scrollingElement:this._scrollingElement,getMoreItemsIfNeeded:this.getMoreItemsIfNeeded,setGotFirstScrollIfNeeded:this.setGotFirstScrollIfNeeded,onScroll:this.onGalleryScroll}),n().createElement(r,Object.assign({isInDisplay:this.props.isInDisplay,isInViewport:this.state.isInViewport,isPrerenderMode:this.props.isPrerenderMode,scrollingElement:this._scrollingElement,totalItemsCount:this.props.totalItemsCount,renderedItemsCount:this.props.renderedItemsCount,getMoreItemsIfNeeded:this.getMoreItemsIfNeeded,gotFirstScrollEvent:this.state.gotFirstScrollEvent,setGotFirstScrollIfNeeded:this.setGotFirstScrollIfNeeded,items:this.state.items,getVisibleItems:this.getVisibleItems,galleryStructure:this.galleryStructure,options:this.props.options,container:this.props.container,settings:this.props.settings,displayShowMore:s,id:this.props.id,activeIndex:this.props.activeIndex||0,customComponents:this.props.customComponents,playingVideoIdx:this.state.playingVideoIdx,playing3DIdx:this.state.playing3DIdx,noFollowForSEO:this.props.noFollowForSEO,proGalleryRegionLabel:this.props.proGalleryRegionLabel,proGalleryRole:this.props.proGalleryRole,firstUserInteractionExecuted:this.state.firstUserInteractionExecuted,isGalleryInHover:this.state.isInHover,enableExperimentalFeatures:this.props.enableExperimentalFeatures,galleryContainerRef:this.galleryContainerRef,outOfViewComponent:this.outOfViewComponent,virtualizationSettings:this.props.virtualizationSettings,galleryContainerId:`pro-gallery-container-${this.props.id}`,scrollTop:null===(e=null===(t=this.state)||void 0===t?void 0:t.scrollPosition)||void 0===e?void 0:e.top,isScrollLessGallery:this.getIsScrollLessGallery(this.state.options),actions:Object.assign(Object.assign({},this.props.actions),{findNeighborItem:this.findNeighborItem,toggleLoadMoreItems:this.toggleLoadMoreItems,eventsListener:this.eventsListener,setWixHeight:()=>{},scrollToItem:this.scrollToItem,scrollToGroup:this.scrollToGroup})},this.props.gallery)),n().createElement("div",{"data-key":"items-styles",key:"items-styles",style:{display:"none"}},(this.layoutCss||[]).filter(Boolean).map(((t,e)=>n().createElement("style",{id:`layoutCss-${e}`,key:`layoutCss-${e}`,dangerouslySetInnerHTML:{__html:t}}))),(this.scrollCss||[]).filter(Boolean).map(((t,e)=>n().createElement("style",{id:`scrollCss_${e}`,key:`scrollCss_${e}`,dangerouslySetInnerHTML:{__html:t}}))),!!this.dynamicStyles&&n().createElement("style",{dangerouslySetInnerHTML:{__html:this.dynamicStyles}})),"application"===this.props.proGalleryRole&&n().createElement("span",{ref:t=>this.outOfViewComponent=t,tabIndex:-1,className:"sr-only out-of-view-component"},null===(i=this.props.translations)||void 0===i?void 0:i.Accessibility_Left_Gallery))}}const gr=pr;var yr=i(76326);class vr extends n().Component{constructor(){super(),h.A.isLocal()&&!h.A.isTest()&&console.log("PRO GALLERY DEV")}renderProps(){var t;return Object.assign(Object.assign({},this.props),{id:this.props.id,items:this.props.items||[],settings:this.props.settings||{},offsetTop:this.props.offsetTop,proGalleryRegionLabel:this.props.proGalleryRegionLabel,isInDisplay:null===(t=this.props.isInDisplay)||void 0===t||t})}containerProps(){return{id:`pro-gallery-${this.props.id}`,className:"pro-gallery"}}render(){return n().createElement(yr.A,Object.assign({},this.props),n().createElement("div",Object.assign({},this.containerProps()),n().createElement(gr,Object.assign({},this.renderProps()))))}}function Pr(t,e){return!0!==e&&(!0===t.shouldValidateTypes||"true"===(function(){try{const t=new URLSearchParams(window.location.search);return Object.fromEntries(t.entries())}catch(t){return console.log("cannot use the URLSearchParams",t),{}}}()||""))}class br extends n().Component{constructor(t){super(t),this.isUsingCustomInfoElements=this.isUsingCustomInfoElements.bind(this),this.blueprintsManager=new ke({id:"layoutingGallery"}),this.blueprintsManager.init({deviceType:t.deviceType,api:{isUsingCustomInfoElements:this.isUsingCustomInfoElements,fetchMoreItems:e=>{"function"==typeof t.eventsListener&&t.eventsListener(l.A.events.NEED_MORE_ITEMS,e)},onBlueprintReady:({blueprint:t,blueprintChanged:e,initialBlueprint:i})=>{e?this.setBlueprint(t,i):h.A.isVerbose()&&console.count(">>> Blueprint not changed, not setting it")}}}),this.onNewProps(t,!0),this.state={blueprint:this.blueprintsManager.createInitialBlueprint(t)||null}}setBlueprint(t,e){e||this.setState({blueprint:t})}isUsingCustomInfoElements(){return!!this.galleryProps.customComponents.customHoverRenderer||!!this.galleryProps.customComponents.customInfoRenderer}onNewProps(t,e){const{eventsListener:i}=t,r=(0,a.__rest)(t,["eventsListener"]);this.galleryProps=Object.assign(Object.assign({},r),{eventsListener:(t,e,r)=>{t===l.A.events.NEED_MORE_ITEMS?this.blueprintsManager.getMoreItems(e):"function"==typeof i&&i(t,e,r)},id:t.id||"default-dom-id",customComponents:t.customComponents||{}}),e||this.blueprintsManager.createBlueprint(this.galleryProps).catch((t=>{console.error("Could not create a blueprint from the new props",t)}))}UNSAFE_componentWillReceiveProps(t){this.onNewProps(t,!1)}render(){const{blueprint:t,typeErrors:e}=this.state;return e||(t&&Object.keys(t).length>0?n().createElement(vr,Object.assign({},this.galleryProps,t)):null)}async componentDidMount(){if(!1===Pr(this.props,h.A.isSSR()))return;const t=await i.e(8638).then(i.bind(i,3615)),{validate:e,typeErrorsUI:r}=t,s=e(this.state.blueprint.options);s.length>0&&this.setState({typeErrors:r(s)})}}const Ar=(Ir=br,class extends n().Component{constructor(t){super(t),this.initViewModeWrapper(t)}initViewModeWrapper(t){void 0!==t.viewMode&&Ue.CB.setViewMode(t.viewMode),void 0!==t.deviceType&&Ue.CB._deviceType!==t.deviceType&&(h.A.dumpCache(),Ue.CB.setDeviceType(t.deviceType))}updateViewModeWrapper(t){this.props.viewMode!==t.viewMode&&(h.A.dumpCache(),Ue.CB.setViewMode(t.viewMode)),this.props.deviceType!==t.deviceType&&(h.A.dumpCache(),Ue.CB.setDeviceType(t.deviceType))}UNSAFE_componentWillReceiveProps(t){this.updateViewModeWrapper(t)}render(){return n().createElement(Ir,Object.assign({},this.props))}});var Ir},46778:(t,e,i)=>{i.d(e,{QH:()=>p,N9:()=>u,vk:()=>g});var r=i(60751),s=i.n(r);function a(t){return new Proxy({},{get:(e,i)=>t(i)})}class o{constructor(){this.listeners={}}on(t,e){return this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(e),{remove:()=>{this.off(t,e)}}}emit(t,...e){const i=this.listeners[t];i&&i.forEach((t=>t(...e)))}off(t,e){const i=this.listeners[t];i&&i.splice(i.indexOf(e),1)}get call(){return a((t=>(...e)=>{this.emit(t,...e)}))}get listen(){return a((t=>e=>(this.on(t,e),()=>{this.off(t,e)})))}}var n=i(23524);const l=t=>document.getElementById(`pro-gallery-container-${t}`),h=s().createContext(void 0),u=({children:t,id:e})=>{const[i,a]=s().useState();return(0,r.useEffect)((()=>{const t=function(t){const e=new o;let i={mouseIn:!1,position:[0,0]};e.listen.mouseEnterState(((t,...e)=>{i={mouseIn:t,position:e}})),e.listen.mouseMove(((t,e)=>{i=Object.assign(Object.assign({},i),{position:[t,e]})}));const r=e=>{const i=t.getBoundingClientRect();return[e.clientX-i.left,e.clientY-i.top]};function s(i){const s=r(i);e.call.mouseEnterState(!d(t,i,...s),...s)}function a(i){const s=r(i);e.call.mouseEnterState(!d(t,i,...s),...s),e.call.mouseMove(...s)}function n(){e.call.mouseEnterState(!1,0,0)}function l(t){e.call.mouseClickInteractionEvent(t)}return t.addEventListener("mouseenter",s),t.addEventListener("mousemove",a),t.addEventListener("mouseleave",n),t.addEventListener("click",l),t.addEventListener("mousedown",l),t.addEventListener("mouseup",l),{listen:e.listen,get state(){return i},destroy:()=>{t.removeEventListener("mouseenter",s),t.removeEventListener("mousemove",a),t.removeEventListener("mouseleave",n),t.removeEventListener("click",l),t.removeEventListener("mousedown",l),t.removeEventListener("mouseup",l)}}}(l(e));return a(t),()=>{t.destroy()}}),[e]),s().createElement(h.Provider,{value:i},i&&t)};class c extends s().Component{constructor(){var t,e;super(...arguments),this.state={position:(null===(t=this.context)||void 0===t?void 0:t.state.position)||[0,0],mouseIn:(null===(e=this.context)||void 0===e?void 0:e.state.mouseIn)||!1}}componentDidMount(){if(!this.context)throw new Error("MouseFollowerContext is undefined");const t=this.context.listen.mouseMove(n.A.throttle((()=>{this.setState({position:this.context.state.position})}),this.props.throttle)),e=this.context.listen.mouseEnterState((()=>{const{mouseIn:t,position:e}=this.context.state;this.state.mouseIn!==t&&(this.setState({mouseIn:t,position:e}),this.props.onEnterState&&this.props.onEnterState(t))})),i=this.context.listen.mouseClickInteractionEvent((t=>{if(!this.state.mouseIn)return;const[e,i]=this.state.position;this.props.shouldRenderAtPosition(e,i)&&("mousedown"!==t.type&&"mouseup"!==t.type?this.props.onClick(t):this.props.onMouseDownOrUp(t))}));this.cleanup=()=>{t(),e(),i()}}componentWillUnmount(){var t;null===(t=this.cleanup)||void 0===t||t.call(this)}render(){if(!this.state.mouseIn)return null;const[t,e]=this.state.position;return this.props.shouldRenderAtPosition(t,e)?this.props.render(this.state.position[0],this.state.position[1]):null}}c.contextType=h;const m="pg-clickable",d=(t,e,i,r)=>{for(const t of e.composedPath())if(t instanceof HTMLElement&&"true"===t.getAttribute(m))return!0;const s=t.getBoundingClientRect(),a=document.elementFromPoint(i+s.left,r+s.top);if(!a)return!1;let o=a;for(;o;){if("true"===o.getAttribute(m))return!0;o=o.parentElement}return!1};class p extends s().Component{constructor(){super(...arguments),this.shouldRender=t=>{const e=l(this.props.id).offsetWidth,i=e*(Math.min(this.props.mouseCursorContainerMaxWidth,this.props.isTheOnlyArrow?100:50)/100),r=i>=t,s=t>e-i;return"left"===this.props.direction?r:s},this.onNavigation=t=>{t.preventDefault(),t.stopPropagation(),this.props.onNavigate()}}render(){return s().createElement(c,{getElement:()=>l(this.props.id),render:(t,e)=>{var i;return s().createElement(s().Fragment,null,this.props.children(t,e),s().createElement("style",null,`\n #${null===(i=l(this.props.id))||void 0===i?void 0:i.id} * {\n cursor: none !important;\n }\n `))},shouldRenderAtPosition:this.shouldRender,onClick:this.onNavigation,onMouseDownOrUp:t=>t.stopPropagation(),throttle:50})}}const g=function(){const t=new Map;return a((e=>(t.get(e)||t.set(e,(t=>s().createElement(e,Object.assign(Object.assign({},t),{[m]:"true"})))),t.get(e))))}()},98673:(t,e,i)=>{i.d(e,{v:()=>n});var r=i(60751),s=i.n(r),a=i(76326);const o={videoPlayButton:s().lazy((()=>i.e(6492).then(i.bind(i,86594)))),rotateArrow:s().lazy((()=>i.e(9658).then(i.bind(i,76118))))},n=({type:t,size:e})=>{let i;const r=(0,a.h)();return"function"==typeof(null==r?void 0:r[t])?r[t](e):o[t]?(i=o[t],s().createElement(s().Suspense,{fallback:s().createElement(s().Fragment,null)},s().createElement(i,{size:e}))):s().createElement(s().Fragment,null)}},76326:(t,e,i)=>{i.d(e,{A:()=>n,h:()=>l});var r=i(34629),s=i(60751),a=i.n(s);const o=a().createContext({}),n=t=>{var{children:e}=t;const i=(0,r.__rest)(t,["children"]).customComponents.EXPERIMENTAL_customGalleryUI;return a().createElement(o.Provider,{value:{galleryUI:i}},e)},l=()=>{const{galleryUI:t}=a().useContext(o);return t}}}]); //# sourceMappingURL=3673.chunk.min.js.map