{"version":3,"sources":["webpack:///./LeLab.Web/src/js/home-heading.entry.js"],"names":["PageComponent","constructor","node","this","heading","slider","sliderOpts","mode","isGallery","container","querySelector","prevButton","nextButton","navPosition","speed","querySelectorAll","length","TinySlider","window","matchMedia","matches","destroy"],"mappings":"4FAAA,0BAuCA,IAAIA,IAAc,gBApClB,MAEIC,aAAY,KAAEC,IACVC,KAAKC,QAAUF,EACfC,KAAKE,OAAS,KAEdF,KAAKG,WAAa,KAAM,CACpBC,KAAMJ,KAAKK,YAAc,UAAY,WACrCC,UAAWN,KAAKC,QAAQM,cAAc,sBACtCC,WAAYR,KAAKC,QAAQM,cAAc,uBACvCE,WAAYT,KAAKC,QAAQM,cAAc,uBACvCG,YAAa,SACbC,MAAO,MAGPX,KAAKC,QAAQW,iBAAiB,eAAeC,OAAS,IACtDb,KAAKE,OAAS,IAAIY,IAAWd,KAAKG,aAI1CE,YACI,OAAOU,OAAOC,WAAW,sBAAsBC,QAGnDC,UACQlB,KAAKE,QAAUF,KAAKE,OAAOgB,SAC3BlB,KAAKE,OAAOgB,iBAGTlB,KAAKC,eACLD,KAAKG,kBACLH,KAAKE,Y","file":"home-heading.js","sourcesContent":["import { PageComponent } from \"barba\"\r\nimport TinySlider from \"utils/tiny-slider\"\r\n\r\nclass HomeHeadingClass {\r\n\r\n constructor({ node }) {\r\n this.heading = node\r\n this.slider = null\r\n \r\n this.sliderOpts = () => ({\r\n mode: this.isGallery() ? 'gallery' : 'carousel',\r\n container: this.heading.querySelector('.home-heading__tns'),\r\n prevButton: this.heading.querySelector('.home-heading__prev'),\r\n nextButton: this.heading.querySelector('.home-heading__next'),\r\n navPosition: 'bottom',\r\n speed: 500\r\n })\r\n \r\n if (this.heading.querySelectorAll('.slide-item').length > 1) {\r\n this.slider = new TinySlider(this.sliderOpts)\r\n }\r\n }\r\n\r\n isGallery() {\r\n return window.matchMedia(\"(min-width: 992px)\").matches\r\n }\r\n\r\n destroy() {\r\n if (this.slider && this.slider.destroy) {\r\n this.slider.destroy()\r\n }\r\n \r\n delete this.heading\r\n delete this.sliderOpts\r\n delete this.slider\r\n }\r\n\r\n}\r\n\r\nnew PageComponent(\".home-heading\", HomeHeadingClass)"],"sourceRoot":""}