I am a heading

Here goes your text ... Select any part of your text to access the formatting toolbar.
I am a button

I am a heading

Here goes your text ... Select any part of your text to access the formatting toolbar.
I am a button

I am a heading

Here goes your text ... Select any part of your text to access the formatting toolbar.
I am a button
<script>
  
document.addEventListener('DOMContentLoaded', () => {

   const sliders = document.querySelectorAll('.fb-slider-six');
   if (sliders.length < 1) return;

   const debounce = (fn, threshold = 200) => {
      let timeout;
      return () => {
         clearTimeout(timeout);
         timeout = setTimeout(fn, threshold);
      };
   };

   const init = (bar, sliderId) => {
      const instance = bricksData.splideInstances[sliderId];
      instance.destroy(true);
      instance.on('mounted move', () => {
         const end = instance.Components.Controller.getEnd() + 1;
         const rate = Math.min((instance.index + 1) / end, 1);
         bar.style.width = `${100 * rate}%`;
      });
      instance.mount();
   };

   sliders.forEach(slider => {
      const bar = slider.querySelector('.fb-slider-six__progress-color');
      const mainSlider = slider.querySelector('.fb-slider-six__slider');
      const sliderId = mainSlider.dataset.scriptId;

      setTimeout(() => init(bar, sliderId), 0);

      window.addEventListener("resize", debounce(() => init(bar, sliderId), 300));
   });
});

</script>