(window["webpackJsonp_name_"] = window["webpackJsonp_name_"] || []).push([[41,34,70],{ /***/ 171: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Function from David Walsh: http://davidwalsh.name/css-animation-callback function whichTransitionEvent() { var t, el = document.createElement('fakeelement'); var transitions = { 'transition': 'transitionend', 'OTransition': 'oTransitionEnd', 'MozTransition': 'transitionend', 'WebkitTransition': 'webkitTransitionEnd' }; for (t in transitions) { if (el.style[t] !== undefined) { return transitions[t]; } } } var transitionEvent = exports.transitionEvent = whichTransitionEvent(); /***/ }), /***/ 199: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _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; }; }(); var _transitionEvent = __webpack_require__(171); __webpack_require__(423); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var TabsManager = function () { _createClass(TabsManager, null, [{ key: 'default', get: function get() { return { nodes: null }; } }]); function TabsManager() { var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, TabsManager); this._params = Object.assign({}, TabsManager.default, params); this.init(); } _createClass(TabsManager, [{ key: 'init', value: function init() { var _this = this; if (!this.nodes) { return false; } var elems = [].concat(_toConsumableArray(this.nodes)); var alliansTabsClasses = ['woocommerce-tabs']; var alliansTitleClasses = { 'woocommerce-tabs': 'li[role="tab"] a' }; elems.forEach(function (elem) { var isAlien = -1; elem.className.split(' ').forEach(function (item) { var exist = alliansTabsClasses.indexOf(item); if (exist !== -1) { isAlien = exist; } }); if (isAlien !== -1) { _this._alienTab(elem, alliansTitleClasses[alliansTabsClasses[isAlien]]); return false; } new Tabs({ elem: elem }); }); } }, { key: '_alienTab', value: function _alienTab(elem, titleClass) { [].forEach.call(elem.querySelectorAll('.woocommerce-Tabs-panel'), function (panel) { addBg(panel); }); this._getAlienTitles(elem, titleClass).forEach(function (title) { title.classList.add('project-input'); title.classList.add('project-input_tab'); setAnimation(title); addBg(title); }); } }, { key: '_getAlienTitles', value: function _getAlienTitles(item, titleClass) { return [].concat(_toConsumableArray(item.querySelectorAll(titleClass))) || []; } }, { key: 'nodes', get: function get() { return this._params.nodes; } }]); return TabsManager; }(); exports.default = TabsManager; var Tabs = function () { _createClass(Tabs, null, [{ key: 'default', get: function get() { return { elem: null }; } }]); function Tabs() { var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, Tabs); //super(params); this._params = Object.assign({}, Tabs.default, params); this.init(); // } _createClass(Tabs, [{ key: 'init', value: function init() { this.tabsTitle = [].concat(_toConsumableArray(this.elem.querySelectorAll('.project-tabs__title-wrapper .project-tabs__title'))); this.items = [].concat(_toConsumableArray(this.elem.querySelectorAll('.project-tabs__item'))); this.content = [].concat(_toConsumableArray(this.elem.querySelectorAll('.project-tabs__item-content'))); this.acordionTitle = [].concat(_toConsumableArray(this.elem.querySelectorAll('.project-tabs__item .project-tabs__title'))); addBg(this.elem.querySelector('.project-tabs__item-content-inner')); this.content.forEach(function (elem, index) { elem.setAttribute('data-id', index); elem.addEventListener(_transitionEvent.transitionEvent, function () { elem.style.height = ''; }); }); this.tabsTitle.forEach(function (title, index) { title.classList.add('project-input'); title.classList.add('project-input_tab'); title.setAttribute('data-id', index); setAnimation(title); addBg(title); }); this.acordionTitle.forEach(function (title, index) { //title.classList.add( 'project-input' ); //title.classList.add( 'project-input_accordion' ); title.setAttribute('data-id', index); //setAnimation( title ); //addBg( title ); }); this.currentActive = 0; this.preActive = 0; this._checkElemHeight(); this._clearActive(); this._setActive(); this._initClick(); this._resize(); this.autoplay(); } }, { key: '_initClick', value: function _initClick() { var _this2 = this; this.elem.addEventListener('click', function (event) { var target = event.target; var action = target.getAttribute('data-action'); var id = target.getAttribute('data-id'); if (action && id) { event.preventDefault(); event.stopPropagation(); id = parseInt(id); _this2._action(action, id); } }); } }, { key: '_action', value: function _action(action, id) { switch (action) { case 'open-tab': this._openTabs(id); break; case 'open-accordion': this._openAccordion(id); break; default: console.warn('Action is not valid!'); } } }, { key: '_setActive', value: function _setActive() { var _this3 = this; this.itemsHeight[this.currentActive] = this.content[this.currentActive].outerHeight; setTimeout(function () { _this3.content[_this3.currentActive].style.height = _this3.itemsHeight[_this3.currentActive] + 'px'; setTimeout(function () { requestAnimationFrame(function () { _this3.tabsTitle[_this3.currentActive].classList.add('project-tabs__title_active'); _this3.tabsTitle[_this3.currentActive].classList.add('project-input_focused'); _this3.acordionTitle[_this3.currentActive].classList.add('project-tabs__title_active'); _this3.items[_this3.currentActive].classList.add('project-tabs__item_active'); }); }, 16); }, 16); } }, { key: '_clearActive', value: function _clearActive() { var _this4 = this; this.content[this.preActive].style.height = this.itemsHeight[this.preActive] + 'px'; setTimeout(function () { requestAnimationFrame(function () { _this4.content[_this4.preActive].style.height = ''; _this4.tabsTitle[_this4.preActive].classList.remove('project-tabs__title_active'); _this4.tabsTitle[_this4.currentActive].classList.remove('project-input_focused'); _this4.acordionTitle[_this4.preActive].classList.remove('project-tabs__title_active'); _this4.items[_this4.preActive].classList.remove('project-tabs__item_active'); }); }, 16); } }, { key: '_openTabs', value: function _openTabs(id) { if (!id && id !== 0) { return false; } if (this.currentActive === id) { return false; } this.preActive = this.currentActive; this.currentActive = id; this._setTabActive(); } }, { key: '_setTabActive', value: function _setTabActive() { var _this5 = this; this.itemsHeight[this.preActive] = this.content[this.preActive].getBoundingClientRect().height; //setTimeout( () => { this.content[this.currentActive].style.transition = 'none'; this.content[this.currentActive].style.height = this.itemsHeight[this.preActive] + 'px'; if (this.items[this.preActive].classList.contains('project-tabs__item_active')) { this.content[this.preActive].style.height = this.itemsHeight[this.preActive] + 'px'; } setTimeout(function () { requestAnimationFrame(function () { if (_this5.items[_this5.preActive].classList.contains('project-tabs__item_active')) { //this.content[ this.preActive ].style.height = ''; _this5.tabsTitle[_this5.preActive].classList.remove('project-tabs__title_active'); _this5.tabsTitle[_this5.preActive].classList.remove('project-input_focused'); _this5.acordionTitle[_this5.preActive].classList.remove('project-tabs__title_active'); _this5.items[_this5.preActive].classList.remove('project-tabs__item_active'); } _this5.content[_this5.currentActive].style.height = _this5.itemsHeight[_this5.currentActive] + 'px'; _this5.content[_this5.currentActive].style.transition = ''; _this5.tabsTitle[_this5.currentActive].classList.add('project-tabs__title_active'); _this5.tabsTitle[_this5.currentActive].classList.add('project-input_focused'); _this5.acordionTitle[_this5.currentActive].classList.add('project-tabs__title_active'); _this5.items[_this5.currentActive].classList.add('project-tabs__item_active'); }); }, 16); //}, 16 ); } }, { key: '_openAccordion', value: function _openAccordion(id) { if (!id && id !== 0) { return false; } if (this.currentActive === id) { if (this.items[id].classList.contains('project-tabs__item_active')) { this.preActive = id; this._clearActive(); return false; } } this.preActive = this.currentActive; this.currentActive = id; if (this.items[this.preActive].classList.contains('project-tabs__item_active')) { this._clearActive(); } this._setActive(); } }, { key: '_checkElemHeight', value: function _checkElemHeight() { var _this6 = this; this.itemsHeight = []; this.content.forEach(function (elem, index) { _this6.items[index].classList.add('project-tabs__item_active'); _this6.itemsHeight.push(elem.clientHeight); if (index !== _this6.currentActive) { _this6.items[index].classList.remove('project-tabs__item_active'); } }); // } }, { key: '_resize', value: function _resize() { var _this7 = this; window.addEventListener('resize', function () { _this7._checkElemHeight(); if (window.innerWidth >= 768 && !_this7.items[_this7.currentActive].classList.contains('project-tabs__item_active')) { _this7._setActive(); } }); window.addEventListener('load', function () { _this7._checkElemHeight(); }); } }, { key: 'autoplay', value: function autoplay() { this.autoplay = this.elem.classList.contains('project-tabs_autoplay'); //this.autoplay = true; if (this.autoplay) { this.runAutoplay(); } } }, { key: 'runAutoplay', value: function runAutoplay() { var _this8 = this; this.delay = this.elem.getAttribute('data-autoplay-delay') || '2000'; this.animate = true; this.elem.addEventListener('mouseenter', function (event) { _this8.animate = false; clearTimeout(_this8.timeout); }); this.elem.addEventListener('mouseleave', function (event) { _this8.animate = true; _this8.autoplayChange(); }); this.autoplayChange(); } }, { key: 'autoplayChange', value: function autoplayChange() { var _this9 = this; if (!this.animate) { return false; } this.timeout = setTimeout(function () { requestAnimationFrame(function () { var current = _this9.currentActive; var next = current + 1 < _this9.items.length ? current + 1 : 0; _this9._openTabs(next); _this9.autoplayChange(); }); }, this.delay); } }, { key: 'elem', get: function get() { return this._params.elem; } }]); return Tabs; }(); function setAnimation(item) { var animation = window.formSettings['tabs'] && window.formSettings['tabs'].animation || { type: '', direction: '' }; if (item.classList.contains('form-animation-5') || item.classList.contains('form-animation-6') || animation.type === 'form-animation-5' || animation.type === 'form-animation-6') { item.innerHTML = '' + item.textContent.trim().split('').map(function (item, index) { return item === ' ' ? ' ' : '' + item + ''; }).join('') + ''; } else if (item.classList.contains('form-animation-4') || animation.type === 'form-animation-4') { item.innerHTML = '' + item.textContent + ''; } // animation block var animateBlock = document.createElement('span'); animateBlock.className = 'project-input__animate-box'; animateBlock.innerHTML = '\n \n \n \n '; item.appendChild(animateBlock); } function addBg(item) { if (!item) { return false; } var bg = document.createElement('span'); bg.className = 'project-input__tab-bg'; item.appendChild(bg); } /***/ }), /***/ 423: /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(443); if(typeof content === 'string') content = [[module.i, content, '']]; var transform; var insertInto; var options = {"hmr":true} options.transform = transform options.insertInto = undefined; var update = __webpack_require__(167)(content, options); if(content.locals) module.exports = content.locals; if(false) {} /***/ }), /***/ 443: /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(168)(false); // imports // module exports.push([module.i, ".project-tabs{position:relative;display:flex;flex-wrap:nowrap}.project-tabs__title{position:relative;display:flex;align-items:center;-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;z-index:1;background-position:50%!important;background-size:cover!important;background-repeat:no-repeat!important;background-color:transparent!important}.project-tabs__title:before{content:none!important}.project-tabs__title[data-action]{position:relative}.project-tabs__title[data-action]:after{content:\"\";position:absolute;top:0;left:0;z-index:6;width:100%;height:100%;background-color:rgba(0,0,0,1e-05);cursor:pointer}.project-tabs__title:hover,.project-tabs__title_active{z-index:2}.project-tabs__title-wrapper{position:relative;display:flex;flex-direction:row;align-items:stretch;flex-wrap:wrap;flex:0 0 auto;min-width:0;z-index:2}.project-tabs__item{display:block}.project-tabs__item-wrapper{position:relative;flex:1 1 auto}.project-tabs__item_active{display:block}.project-tabs__item_active .project-tabs__item-content{opacity:1;height:auto;pointer-events:auto;position:relative}.project-tabs__item-content{overflow:hidden;opacity:0;height:0;pointer-events:none;transition:opacity .2s ease,height .2s linear,transform .2s ease-in-out;position:absolute;top:0;left:0;width:100%;z-index:1}.project-tabs__item-content-inner{position:relative;z-index:1;background-position:50%!important;background-size:cover!important;background-repeat:no-repeat!important}.project-tabs .vc_tta-panel-heading,.project-tabs__item .project-tabs__title{display:none}.tabs-alignment-left .project-tabs__title-wrapper{justify-content:flex-start}@media (max-width:479px){.tabs-alignment-left.tabs-position-bottom .project-tabs__title-wrapper,.tabs-alignment-left.tabs-position-top .project-tabs__title-wrapper{justify-content:flex-start}}@media (min-width:480px){.tabs-alignment-left.tabs-position-left .project-tabs__title-wrapper,.tabs-alignment-left.tabs-position-right .project-tabs__title-wrapper{flex-direction:column;justify-content:flex-start;align-items:stretch;text-align:center}}.tabs-alignment-center .project-tabs__title-wrapper{justify-content:center}@media (max-width:479px){.tabs-alignment-center.tabs-position-bottom .project-tabs__title-wrapper,.tabs-alignment-center.tabs-position-top .project-tabs__title-wrapper{justify-content:flex-start}}@media (min-width:480px){.tabs-alignment-center.tabs-position-left .project-tabs__title-wrapper,.tabs-alignment-center.tabs-position-right .project-tabs__title-wrapper{flex-direction:column;justify-content:center;align-items:stretch;text-align:center}}.tabs-alignment-right .project-tabs__title-wrapper{justify-content:flex-end}@media (max-width:767px){.tabs-alignment-right.tabs-position-bottom .project-tabs__title-wrapper,.tabs-alignment-right.tabs-position-top .project-tabs__title-wrapper{justify-content:flex-start}}@media (min-width:480px){.tabs-alignment-right.tabs-position-left .project-tabs__title-wrapper,.tabs-alignment-right.tabs-position-right .project-tabs__title-wrapper{flex-direction:column;justify-content:flex-end;align-items:stretch;text-align:center}}.project-input_tab{position:relative}.project-input__tab-bg{position:absolute;top:0;left:0;width:100%;height:100%;z-index:-1;background-position:50%;background-size:cover;background-repeat:no-repeat;border-radius:inherit}.woocommerce-Tabs-panel{position:relative}.tabs-position-top{flex-direction:column}.tabs-position-top .project-tabs__title-wrapper{overflow-y:hidden;overflow-x:auto;flex-wrap:nowrap}@media (min-width:480px){.tabs-position-top .project-tabs__title-wrapper{flex-wrap:wrap;overflow:unset}}.tabs-position-bottom{flex-direction:column-reverse}.tabs-position-bottom .project-tabs__title-wrapper{overflow-y:hidden;overflow-x:auto;flex-wrap:nowrap}@media (min-width:480px){.tabs-position-bottom .project-tabs__title-wrapper{flex-wrap:wrap;overflow:unset}}.tabs-position-right{flex-direction:row-reverse}@media (max-width:479px){.tabs-position-right{flex-direction:column}.tabs-position-right .project-tabs__title-wrapper{overflow-y:hidden;overflow-x:auto;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;padding:0 10px;margin:0 -10px}.tabs-position-right .project-tabs__title-wrapper .project-tabs__title{flex-shrink:0}}.tabs-position-left{flex-direction:row}@media (max-width:479px){.tabs-position-left{flex-direction:column}.tabs-position-left .project-tabs__title-wrapper{overflow-y:hidden;overflow-x:auto;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;padding:0 10px;margin:0 -10px}.tabs-position-left .project-tabs__title-wrapper .project-tabs__title{flex-shrink:0}}.wc-tab{background-repeat:no-repeat;background-position:50%;background-size:cover}", ""]); // exports /***/ }) }]);