"use strict";(self.webpackChunkporta_frontend_starter_kit=self.webpackChunkporta_frontend_starter_kit||[]).push([[502],{502:function(t,e,n){n.r(e),n.d(e,{initSliders:function(){return s}});var i=n(756);window.sliders=[];const s=()=>{const t=document.querySelectorAll(".item-slider");t.length&&function(t){const e=window.sliders;for(const[e,n]of t.entries())o(n,e);window.addEventListener("resize",(()=>{for(const t in e){if(!e[t])continue;const n=r();e[t]["enabled-"+n]?e[t].slider&&e[t].controls.show():e[t].controls.hide(),window.dispatchEvent(new Event("contentResize"))}})),window.dispatchEvent(new Event("resize"))}(t)};const o=(t,e)=>{const n=window.sliders,s=r(),o="itemSlider"+e,l=t.getAttribute("data-controls"),d=document.querySelector(l),c=t.querySelectorAll(".slider__panel");n[o]=[],n[o].element=t,n[o].controls=d,n[o]["initial-slide"]=t.getAttribute("data-initial-slide"),n[o].autoWidth=t.getAttribute("data-autowidth");const a=["items","move","enabled"],u=["1","1",!0],w={xl:1370,lg:1200,md:992,sm:768,xs:576,xxs:0};for(const[e,i]of a.entries()){let s=u[e];for(const e in w){const r=s,l=t.getAttribute("data-"+i+"-"+e);n[o][i+"-"+e]=l||r,s=n[o][i+"-"+e]}}const m={};let f=1,h=1,p=!0;for(const e in w){const n=w[e],i=t.getAttribute("data-items-"+e)?t.getAttribute("data-items-"+e):f,s=t.getAttribute("data-move-"+e)?t.getAttribute("data-move-"+e):h,o=t.getAttribute("data-enabled-"+e)?t.getAttribute("data-enabled-"+e):p;m[n]={items:i,slideBy:s,disable:!o},f=i,h=s,p=o}n[o].slides=c,n[o].responsiveConfig=m,n[o]["enabled-"+s]?function(t){const e=window.sliders,n=r(),s="items-"+n,o="move-"+n,l=e[t][s],d=e[t][o],c=e[t].controls,a=e[t].element,u=e[t]["initial-slide"],w=a.querySelector(".slider__container"),m=c.querySelector(".slider-controls__prev"),f=c.querySelector(".slider-controls__next"),h=c.querySelector(".slider-controls__count-current"),p=c.querySelector(".slider-controls__count-total");if(w){c.show(),a.classList.add("item-slider--active");const n=(0,i.U)({container:w,autoWidth:e[t].autoWidth,loop:!0,prevButton:m||null,nextButton:f||null,nav:!1,items:l,slideBy:d,startIndex:u,responsive:e[t].responsiveConfig});e[t].slider=n,h&&p&&(p.innerHTML=n.getInfo().slideCount,n.events.on("transitionStart",(t=>{h.innerHTML=t.displayIndex})))}else c.hide(),a.classList.remove("item-slider--active");window.dispatchEvent(new Event("resize"))}(o):function(t){const e=window.sliders;e[t].controls.hide();const n=e[t]["load-more"],i=r(),s=e[t]["items-"+i];n&&(n.show(),e[t].slides.slice(s).hide())}(o)};function r(){const t=window.innerWidth;return t>=1200?"xl":t>992?"lg":t>768?"md":t>576?"sm":"xs"}HTMLElement.prototype.hide=function(){this.style.display="none"},HTMLElement.prototype.show=function(){this.style.display=""}}}]);