{"version":3,"sources":["webpack:///21-97159c8956640bc2a69b.js","webpack:///./app/javascript/vue/components/shared/Slider.vue","webpack:///./node_modules/vue-loader/lib/component-normalizer.js","webpack:///app/javascript/vue/components/shared/Slider.vue","webpack:///./app/javascript/vue/components/shared/Slider.vue?1ccc"],"names":["webpackJsonp","431","module","__webpack_exports__","__webpack_require__","normalizeComponent","Component","437","exports","rawScriptExports","compiledTemplate","functionalTemplate","injectStyles","scopeId","moduleIdentifier","esModule","scriptExports","type","default","options","render","staticRenderFns","_compiled","functional","_scopeId","hook","context","this","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","existing","beforeCreate","_injectStyles","h","concat","485","props","images","Array","data","page","from","to","maxCount","methods","isPreviewVisible","index","setPage","count","shift","computed","isSimple","length","isSliderActive","547","_vm","_h","$createElement","_c","_self","staticClass","_l","image","directives","name","rawName","value","expression","key","style","backgroundImage","on","$event","_e","_v","class","esExports"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAAqBC,GAE7C,YCLA,wEAAIC,EAAqB,EAAQ,KAc7BC,EAAYD,EACd,IACA,KATgC,EAEb,KAEC,KAEU,KAUjB,WAAAC,EAAiB,SDe1BC,IACA,SAAUL,EAAQM,GEjCxBN,EAAOM,QAAU,SACfC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,GAAIC,GACAC,EAAgBP,EAAmBA,MAGnCQ,QAAcR,GAAiBS,OACtB,YAATD,GAA8B,aAATA,IACvBF,EAAWN,EACXO,EAAgBP,EAAiBS,QAInC,IAAIC,GAAmC,kBAAlBH,GACjBA,EAAcG,QACdH,CAGAN,KACFS,EAAQC,OAASV,EAAiBU,OAClCD,EAAQE,gBAAkBX,EAAiBW,gBAC3CF,EAAQG,WAAY,GAIlBX,IACFQ,EAAQI,YAAa,GAInBV,IACFM,EAAQK,SAAWX,EAGrB,IAAIY,EA4BJ,IA3BIX,GACFW,EAAO,SAAUC,GAEfA,EACEA,GAC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pC","file":"21-97159c8956640bc2a69b.js","sourcesContent":["webpackJsonp([21],{\n\n/***/ 431:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__ = __webpack_require__(485);\n/* empty harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_75291ed5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__ = __webpack_require__(547);\nvar normalizeComponent = __webpack_require__(437)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Slider_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_75291ed5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Slider_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Component.exports);\n\n\n/***/ }),\n\n/***/ 437:\n/***/ (function(module, exports) {\n\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n\n/***/ 485:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n props: {\n images: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n page: 0,\n from: 0,\n to: 3,\n maxCount: 4\n };\n },\n\n methods: {\n isPreviewVisible: function isPreviewVisible(index) {\n var from = this.from,\n to = this.to;\n\n return index >= from && index <= to;\n },\n setPage: function setPage(page) {\n var images = this.images,\n from = this.from,\n to = this.to;\n\n var count = images.length;\n\n //Set current page\n if (page < 0) {\n page = count - 1;\n }\n if (page > count - 1) {\n page = 0;\n }\n this.page = page;\n\n //Recalculate boundaries\n var shift = 0;\n\n if (page > to - 1) {\n shift = page - (to - 1);\n if (to + shift >= count) {\n shift = count - to - 1;\n }\n }\n\n if (page < from + 1) {\n shift = page - (from + 1);\n if (from + shift < 0) {\n shift = -from;\n }\n }\n\n this.from += shift;\n this.to += shift;\n }\n },\n computed: {\n isSimple: function isSimple() {\n return this.images.length < this.maxCount;\n },\n isSliderActive: function isSliderActive() {\n return this.images.length > 1;\n }\n }\n});\n\n/***/ }),\n\n/***/ 547:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"slider\"},[_vm._l((_vm.images),function(image,index){return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(index === _vm.page),expression:\"index === page\"}],key:\"image-\" + index,staticClass:\"slider__image\",style:({backgroundImage: (\"url(\" + (image.url) + \")\")})},[(_vm.isSliderActive)?_c('div',{staticClass:\"slider__prev\",on:{\"click\":function($event){return _vm.setPage(_vm.page - 1)}}}):_vm._e(),_vm._v(\" \"),(_vm.isSliderActive)?_c('div',{staticClass:\"slider__next\",on:{\"click\":function($event){return _vm.setPage(_vm.page + 1)}}}):_vm._e()])}),_vm._v(\" \"),(_vm.isSliderActive)?_c('div',{staticClass:\"slider__previews\",class:{\"slider__previews_simple\": _vm.isSimple}},[_vm._l((_vm.images),function(image,index){return [(_vm.isPreviewVisible(index))?_c('label',{key:\"image-\" + index,staticClass:\"slider__preview\",class:{\"slider__preview_active\": index === _vm.page, \"slider__preview_simple\": _vm.isSimple},style:({backgroundImage: (\"url(\" + (image.url) + \")\")}),on:{\"click\":function($event){return _vm.setPage(index)}}}):_vm._e()]})],2):_vm._e()],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\n/* harmony default export */ __webpack_exports__[\"a\"] = (esExports);\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 21-97159c8956640bc2a69b.js","var normalizeComponent = require(\"!../../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Slider.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./Slider.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-75291ed5\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./Slider.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./app/javascript/vue/components/shared/Slider.vue\n// module id = 431\n// module chunks = 21","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/component-normalizer.js\n// module id = 437\n// module chunks = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28","\n\n\n\n\n\n// WEBPACK FOOTER //\n// app/javascript/vue/components/shared/Slider.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"slider\"},[_vm._l((_vm.images),function(image,index){return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(index === _vm.page),expression:\"index === page\"}],key:\"image-\" + index,staticClass:\"slider__image\",style:({backgroundImage: (\"url(\" + (image.url) + \")\")})},[(_vm.isSliderActive)?_c('div',{staticClass:\"slider__prev\",on:{\"click\":function($event){return _vm.setPage(_vm.page - 1)}}}):_vm._e(),_vm._v(\" \"),(_vm.isSliderActive)?_c('div',{staticClass:\"slider__next\",on:{\"click\":function($event){return _vm.setPage(_vm.page + 1)}}}):_vm._e()])}),_vm._v(\" \"),(_vm.isSliderActive)?_c('div',{staticClass:\"slider__previews\",class:{\"slider__previews_simple\": _vm.isSimple}},[_vm._l((_vm.images),function(image,index){return [(_vm.isPreviewVisible(index))?_c('label',{key:\"image-\" + index,staticClass:\"slider__preview\",class:{\"slider__preview_active\": index === _vm.page, \"slider__preview_simple\": _vm.isSimple},style:({backgroundImage: (\"url(\" + (image.url) + \")\")}),on:{\"click\":function($event){return _vm.setPage(index)}}}):_vm._e()]})],2):_vm._e()],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-75291ed5\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./app/javascript/vue/components/shared/Slider.vue\n// module id = 547\n// module chunks = 21"],"sourceRoot":""}