(function ($) {
        "use strict";
            var WidgetScrollSequenceHandler = function($scope, $) { 
                let is_editable = elementorFrontend?.isEditMode();
                let accordSlide = $scope[0].querySelectorAll('.wkit-scroll-accord-slide');

let totalHgt = window.innerHeight;

let getHgt = Number( totalHgt * 7) / 100;

let totalLength = Number(accordSlide.length - 1);

accordSlide.forEach((accordion, index) => {
    let getItemStyle = window.getComputedStyle(accordion);
    let getPadding = parseInt(getItemStyle.paddingTop);
    
    let accordTitle = accordion.querySelector('.accord-title');
    let accordTitleMain = accordion.querySelector('.wkit-scroll-accord-title');
    let halfTitleHeight = Number(accordTitle.offsetHeight);

    let ttlHgt = Number(accordTitle.offsetHeight) / 2; 
  
    let transY = (index - totalLength) * getHgt;
        transY = transY - ttlHgt * (accordSlide.length - index);
      
   accordion.style.transform = 'translateY(' + transY + 'px)';
   accordion.style.marginBottom = -accordTitleMain.offsetHeight+'px';
  
   let img = accordion.querySelector('.wkit-scroll-accord-img');
   let imgCls = accordion.querySelector('.wkit-scroll-accord-img .accord-img');
  
    if (!imgCls.getAttribute('src') || imgCls.getAttribute('src') === '') {
        img.style.display = 'none';
    }
});
  
            };	
        $(window).on('elementor/frontend/init', function () {
          elementorFrontend.hooks.addAction('frontend/element_ready/wb-mrskp624.default', WidgetScrollSequenceHandler);
        });
    })(jQuery);