"use strict";var e=require("@gem-sdk/core"),s=require("../../helpers.js");const a=s=>{let a={};return e.DEVICES.forEach(n=>{let t=e.getResponsiveValueByScreen(s.sneakPeak,n),k=t?"center"===e.getResponsiveValueByScreen(s.sneakPeakType,n)?e.getResponsiveValueByScreen(s.sneakPeakOffsetCenter,n)??0:e.getResponsiveValueByScreen(s.sneakPeakOffsetForward,n)??0:0,r=e.getResponsiveValueByScreen(s.slidesToShow,n)||1,o="center"===e.getResponsiveValueByScreen(s.sneakPeakType,n)?-2:-1;a[n]="auto"===r?r:r+k/100*o}),a},n=n=>{let t={};return e.DEVICES.forEach(k=>{let r=s.convertUnitToNumber(e.getResponsiveValueByScreen(n.spacing,k),44),o=e.getResponsiveValueByScreen(n.sneakPeak,k,!1),i=s.convertUnitToNumber(e.getResponsiveValueByScreen(o?a({slidesToShow:n?.slidesToShow,sneakPeak:n?.sneakPeak,sneakPeakType:n?.sneakPeakType,sneakPeakOffsetCenter:n?.sneakPeakOffsetCenter,sneakPeakOffsetForward:n?.sneakPeakOffsetForward}):n.slidesToShow,k),4);t={...t,[k]:`calc(100% / ${i} - ${(i-1)*r/i}px)`}}),t};exports.DOT_CONTAINER_SELECTOR="gp-carousel-dot-container",exports.getInitialWidthForCarouselItem=s=>{let a={};return e.DEVICES.forEach(t=>{if(!s?.vertical?.[t]){let t={...e.makeStyleResponsive("minw",e.makeWidth(n({spacing:s?.spacing,slidesToShow:s?.slidesToShow,sneakPeak:s?.sneakPeak,sneakPeakType:s?.sneakPeakType,sneakPeakOffsetCenter:s?.sneakPeakOffsetCenter,sneakPeakOffsetForward:s?.sneakPeakOffsetForward}))),...e.makeStyleResponsive("maxw",e.makeWidth(n({spacing:s?.spacing,slidesToShow:s?.slidesToShow,sneakPeak:s?.sneakPeak,sneakPeakType:s?.sneakPeakType,sneakPeakOffsetCenter:s?.sneakPeakOffsetCenter,sneakPeakOffsetForward:s?.sneakPeakOffsetForward})))};a={...a,...t}}}),a},exports.getSlideToShow=a,exports.getWidthForCarouselItem=n;
