{"version":3,"sources":["webpack:///app.js","webpack:///webpack/bootstrap ead8b4de10179f304d63","webpack:///./schreinerei-gfeller/Frontend/js/app.js","webpack:///./schreinerei-gfeller/Frontend/js/modules/slider.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_slider","_slider2","window","addEventListener","imageSlider","$slider","document","querySelector","$galleryThumbs","querySelectorAll","prev","next","i","length","e","open","goto","currentTarget","getAttribute","close","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","Slider","selector","this","slider","activeSlide","classList","remove","previousElementSibling","contains","add","nextElementSibling","getElementById"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI,EAAQD,EAASH,GAE/B,YAMA,SAASW,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GEpDxF,GAAAG,GAAAf,EAAA,GFkDKgB,EAAWL,EAAuBI,EEhDvCE,QAAOC,iBAAiB,OAAQ,WAC5B,GAAMC,GAAc,GAAAH,GAAAF,QAAW,UACzBM,EAAUC,SAASC,cAAc,UACjCC,EAAiBF,SAASG,iBAAiB,iBAEjDJ,GAAQE,cAAc,kBAAkBJ,iBAAiB,QAAS,WAAcC,EAAYM,SAC5FL,EAAQE,cAAc,kBAAkBJ,iBAAiB,QAAS,WAAcC,EAAYO,QAE5F,KAAK,GA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AAKE,YAAcF,KAAKE,YAAYM,mBAC9BR,KAAKE,YAAYM,mBACjBR,KAAKC,OAAOnC,cAAc,mBAChCkC,KAAKE,YAAYC,UAAUI,IAAI,aHgG9Bb,IAAK,OACLT,MAAO,SG9FPpC,GACGmD,KAAKE,aAAaF,KAAKE,YAAYC,UAAUC,OAAO,UACxDJ,KAAKE,YAAcrC,SAAS4C,eAAe5D,GAC3CmD,KAAKE,YAAYC,UAAUI,IAAI,aHiG9Bb,IAAK,OACLT,MAAO,WG9FRe,KAAKC,OAAOE,UAAUI,IAAI,UHkGzBb,IAAK,QACLT,MAAO,WG/FJe,KAAKE,aAAaF,KAAKE,YAAYC,UAAUC,OAAO,UACxDJ,KAAKC,OAAOE,UAAUC,OAAO,WHoGzBN,IAGXnD,GAAQW,QG1IYwC","file":"app.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _slider = __webpack_require__(1);\n\t\n\tvar _slider2 = _interopRequireDefault(_slider);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\twindow.addEventListener('load', function () {\n\t var imageSlider = new _slider2.default('.aside');\n\t var $slider = document.querySelector('.aside');\n\t var $galleryThumbs = document.querySelectorAll('.product__link');\n\t\n\t $slider.querySelector('.gallery__prev').addEventListener('click', function () {\n\t imageSlider.prev();\n\t });\n\t $slider.querySelector('.gallery__next').addEventListener('click', function () {\n\t imageSlider.next();\n\t });\n\t\n\t for (var i = 0; i < $galleryThumbs.length; i++) {\n\t $galleryThumbs[i].addEventListener('click', function (e) {\n\t imageSlider.open();\n\t imageSlider.goto(e.currentTarget.getAttribute('data-id'));\n\t });\n\t }\n\t\n\t document.querySelector('.gallery__close').addEventListener('click', function (e) {\n\t imageSlider.close();\n\t });\n\t});\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Slider = function () {\n\t function Slider(selector) {\n\t _classCallCheck(this, Slider);\n\t\n\t if (!selector) selector = '.slider';\n\t this.slider = document.querySelector(selector);\n\t this.activeSlide = this.slider.querySelector('.active');\n\t }\n\t\n\t _createClass(Slider, [{\n\t key: 'prev',\n\t value: function prev() {\n\t this.activeSlide.classList.remove('active');\n\t this.activeSlide = this.activeSlide.previousElementSibling.classList.contains('gallery__image') ? this.activeSlide.previousElementSibling : this.slider.querySelector('.gallery__image:last-child');\n\t this.activeSlide.classList.add('active');\n\t }\n\t }, {\n\t key: 'next',\n\t value: function next() {\n\t this.activeSlide.classList.remove('active');\n\t this.activeSlide = this.activeSlide.nextElementSibling ? this.activeSlide.nextElementSibling : this.slider.querySelector('.gallery__image');\n\t this.activeSlide.classList.add('active');\n\t }\n\t }, {\n\t key: 'goto',\n\t value: function goto(id) {\n\t if (this.activeSlide) this.activeSlide.classList.remove('active');\n\t this.activeSlide = document.getElementById(id);\n\t this.activeSlide.classList.add('active');\n\t }\n\t }, {\n\t key: 'open',\n\t value: function open() {\n\t this.slider.classList.add('off');\n\t }\n\t }, {\n\t key: 'close',\n\t value: function close() {\n\t if (this.activeSlide) this.activeSlide.classList.remove('active');\n\t this.slider.classList.remove('off');\n\t }\n\t }]);\n\t\n\t return Slider;\n\t}();\n\t\n\texports.default = Slider;\n\n/***/ }\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// app.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ead8b4de10179f304d63","import Slider from 'modules/slider';\n\nwindow.addEventListener('load', function () {\n const imageSlider = new Slider('.aside');\n const $slider = document.querySelector('.aside');\n const $galleryThumbs = document.querySelectorAll('.product__link');\n\n $slider.querySelector('.gallery__prev').addEventListener('click', function () { imageSlider.prev(); });\n $slider.querySelector('.gallery__next').addEventListener('click', function () { imageSlider.next(); });\n\n for (let i = 0; i < $galleryThumbs.length; i++) {\n $galleryThumbs[i].addEventListener('click', e => {\n imageSlider.open();\n imageSlider.goto(e.currentTarget.getAttribute('data-id'));\n });\n }\n \n document.querySelector('.gallery__close').addEventListener('click', e => {\n imageSlider.close();\n });\n});\n\n\n// WEBPACK FOOTER //\n// ./schreinerei-gfeller/Frontend/js/app.js","export default class Slider {\n constructor(selector) {\n if (!selector) selector = '.slider';\n this.slider = document.querySelector(selector);\n this.activeSlide = this.slider.querySelector('.active');\n }\n\n prev() {\n this.activeSlide.classList.remove('active');\n this.activeSlide = this.activeSlide.previousElementSibling.classList.contains('gallery__image')\n ? this.activeSlide.previousElementSibling\n : this.slider.querySelector('.gallery__image:last-child');\n this.activeSlide.classList.add('active');\n }\n\n next() {\n this.activeSlide.classList.remove('active');\n this.activeSlide = this.activeSlide.nextElementSibling\n ? this.activeSlide.nextElementSibling\n : this.slider.querySelector('.gallery__image');\n this.activeSlide.classList.add('active');\n }\n\n goto(id) {\n if (this.activeSlide) this.activeSlide.classList.remove('active');\n this.activeSlide = document.getElementById(id);\n this.activeSlide.classList.add('active');\n }\n\n open() {\n this.slider.classList.add('off');\n }\n\n close() {\n if (this.activeSlide) this.activeSlide.classList.remove('active');\n this.slider.classList.remove('off');\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./schreinerei-gfeller/Frontend/js/modules/slider.js"],"sourceRoot":""}