PageSourceSearch

https://www.farmersweekly.co.nz/wp-content/themes/verta/assets/js/scripts.js?ver=1.1.4

js farmersweekly.co.nz collected 2026-10-02 05:18:45 UTC 84,425 bytes, 2,194 lines download raw bytes

1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, {
40/******/ 				configurable: false,
41/******/ 				enumerable: true,
42/******/ 				get: getter
43/******/ 			});
44/******/ 		}
45/******/ 	};
46/******/
47/******/ 	// getDefaultExport function for compatibility with non-harmony modules
48/******/ 	__webpack_require__.n = function(module) {
49/******/ 		var getter = module && module.__esModule ?
50/******/ 			function getDefault() { return module['default']; } :
51/******/ 			function getModuleExports() { return module; };
52/******/ 		__webpack_require__.d(getter, 'a', getter);
53/******/ 		return getter;
54/******/ 	};
55/******/
56/******/ 	// Object.prototype.hasOwnProperty.call
57/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58/******/
59/******/ 	// __webpack_public_path__
60/******/ 	__webpack_require__.p = "";
61/******/
62/******/ 	// Load entry module and return exports
63/******/ 	return __webpack_require__(__webpack_require__.s = 1);
64/******/ })
65/************************************************************************/
66/******/ ([
67/* 0 */
68/***/ (function(module, __webpack_exports__, __webpack_require__) {
69
70"use strict";
71/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return $; });
72/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return $window; });
73/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return $doc; });
74/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return $body; });
75/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return csco; });
76/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return wndW; });
77/* unused harmony export wndH */
78/* unused harmony export docH */
79/* unused harmony export csThrottleScroll */
80/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return csGetCookie; });
81/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return csSetCookie; });
82// Create csco object.
83var csco = {
84  addAction: function addAction(x, y, z) {
85    return;
86  }
87};
88
89if ('undefined' !== typeof wp && 'undefined' !== typeof wp.hooks) {
90  csco.addAction = wp.hooks.addAction;
91}
92/**
93 * Window size
94 */
95
96
97var $ = jQuery;
98var $window = $(window);
99var $doc = $(document);
100var $body = $('body');
101var wndW = 0;
102var wndH = 0;
103var docH = 0;
104
105function csGetWndSize() {
106  wndW = $window.width();
107  wndH = $window.height();
108  docH = $doc.height();
109}
110
111$window.on('resize load orientationchange', csGetWndSize);
112csGetWndSize();
113/**
114 * Throttle scroll
115 * thanks: https://jsfiddle.net/mariusc23/s6mLJ/31/
116 */
117
118var csHideOnScrollList = [];
119var csDidScroll;
120var csLastST = 0;
121$window.on('scroll load resize orientationchange', function () {
122  if (csHideOnScrollList.length) {
123    csDidScroll = true;
124  }
125});
126
127function csHasScrolled() {
128  var ST = $window.scrollTop();
129  var type = null;
130
131  if (ST > csLastST) {
132    type = 'down';
133  } else if (ST < csLastST) {
134    type = 'up';
135  } else {
136    type = 'none';
137  }
138
139  if (ST === 0) {
140    type = 'start';
141  } else if (ST >= docH - wndH) {
142    type = 'end';
143  }
144
145  csHideOnScrollList.forEach(function (item) {
146    if (typeof item === 'function') {
147      item(type, ST, csLastST, $window);
148    }
149  });
150  csLastST = ST;
151}
152
153setInterval(function () {
154  if (csDidScroll) {
155    csDidScroll = false;
156    window.requestAnimationFrame(csHasScrolled);
157  }
158}, 250);
159
160function csThrottleScroll(callback) {
161  csHideOnScrollList.push(callback);
162}
163/**
164 * In Viewport checker
165 */
166
167
168$.fn.isInViewport = function () {
169  var elementTop = $(this).offset().top;
170  var elementBottom = elementTop + $(this).outerHeight();
171  var viewportTop = $(window).scrollTop();
172  var viewportBottom = viewportTop + $(window).height();
173  return elementBottom > viewportTop && elementTop < viewportBottom;
174};
175/**
176 * Cookies
177 */
178
179
180function csGetCookie(name) {
181  var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
182  return matches ? decodeURIComponent(matches[1]) : undefined;
183}
184
185function csSetCookie(name, value) {
186  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
187  props = {
188    path: '/'
189  };
190
191  if (props.expires instanceof Date) {
192    props.expires = props.expires.toUTCString();
193  }
194
195  var updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value);
196
197  for (var optionKey in props) {
198    updatedCookie += "; " + optionKey;
199    var optionValue = props[optionKey];
200
201    if (optionValue !== true) {
202      updatedCookie += "=" + optionValue;
203    }
204  }
205
206  document.cookie = updatedCookie;
207}
208
209
210
211/***/ }),
212/* 1 */
213/***/ (function(module, exports, __webpack_require__) {
214
215__webpack_require__(2);
216__webpack_require__(3);
217__webpack_require__(4);
218__webpack_require__(5);
219__webpack_require__(6);
220__webpack_require__(7);
221__webpack_require__(8);
222__webpack_require__(9);
223__webpack_require__(10);
224__webpack_require__(11);
225__webpack_require__(12);
226__webpack_require__(13);
227__webpack_require__(14);
228__webpack_require__(15);
229__webpack_require__(16);
230module.exports = __webpack_require__(17);
231
232
233/***/ }),
234/* 2 */
235/***/ (function(module, __webpack_exports__, __webpack_require__) {
236
237"use strict";
238Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
239/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
240
241
242(function () {
243  function initCarousel() {
244    /**
245     * Carousel
246     */
247    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cp-expert-slider__item').imagesLoaded(function (instance) {
248      var rtl = __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('rtl') ? true : false;
249      var $carousel = [];
250      var $current = []; // Point.
251
252      var point = function point() {
253        var points = [350, 400, 450, 500, 550, 600, 720, 1020, 1200];
254        var current = 0;
255
256        for (var i in points) {
257          if (window.innerWidth >= points[i]) {
258            current = points[i];
259          }
260        }
261
262        return current;
263      }; // Loop.
264
265
266      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(instance.elements).each(function (index, el) {
267        var settings = {
268          cellAlign: rtl ? 'right' : 'left',
269          groupCells: false,
270          wrapAround: true,
271          contain: true,
272          autoPlay: false,
273          adaptiveHeight: true,
274          prevNextButtons: false,
275          pageDots: true,
276          rightToLeft: rtl,
277          resize: false,
278          on: {
279            ready: function ready() {
280              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).addClass('is-animate');
281            }
282          }
283        };
284        $carousel[index] = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(settings); // Set current point();
285
286        $current[index] = point(); // Resize.
287
288        window.onresize = function (event) {
289          if ($current[index] !== point()) {
290            $carousel[index].flickity('destroy'); // Reinit.
291
292            $carousel[index].flickity(settings);
292 // Set current point();
293
294            $current[index] = point();
295          }
296        };
297
298        var container = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parents('.cp-slider'); // Select the previous slide.
299
300        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cp-expert-slider__arrow-previous').on('click', function (event) {
301          event.preventDefault();
302          var type = rtl ? 'next' : 'previous';
303          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(type, true);
304        }); // Select the next slide.
305
306        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cp-expert-slider__arrow-next').on('click', function (event) {
307          event.preventDefault();
308          var type = rtl ? 'previous' : 'next';
309          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).flickity(type, true);
310        });
311      });
312    });
313  }
314
315  initCarousel();
316  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function () {
317    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).on('post-load', function () {
318      initCarousel();
319    });
320    __WEBPACK_IMPORTED_MODULE_0__utility__["g" /* csco */].addAction('canvas.components.serverSideRender.onChange', 'init-carousel', function (props) {
321      if ('canvas/posts' === props.block) {
322        initCarousel();
323      }
324    });
325  });
326})();
327
328/***/ }),
329/* 3 */
330/***/ (function(module, __webpack_exports__, __webpack_require__) {
331
332"use strict";
333Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
334/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
335/** ----------------------------------------------------------------------------
336 * Comments Dropdown */
337
338
339(function () {
340  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('click', '.cs-entry__comments-show button', function (e) {
341    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-entry__comments-collapse').show();
342    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-entry__comments-show').remove();
343  });
344})();
345
346/***/ }),
347/* 4 */
348/***/ (function(module, __webpack_exports__, __webpack_require__) {
349
350"use strict";
351Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
352/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
353/** ----------------------------------------------------------------------------
354 * Detect Aligment */
355
356
357(function () {
358  var ticking = false;
359
360  var update = function update() {
361    // Sidebar.
362    // -----------------------------------.
363    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-site-primary').each(function () {
364      var content = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.entry-content');
365      var sidebar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-entry__metabar-inner'); // Vars offset.
366
367      var offsetTop = 20;
368      var offsetBottom = -20; // Search elements.
369
370      var elements = [];
371      elements.push('> .alignfull');
372      elements.push('> .alignwide');
373      var layouts = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(content).find(elements.join(','));
374
375      if (0 === sidebar.length) {
376        return;
377      }
378
379      if (0 === layouts.length) {
380        return;
381      }
382
383      var disabled = false; // Get sidebar values.
384
385      var sidebarTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).offset().top;
386      var sidebarHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).outerHeight(true);
387
388      for (var i = 0; i < Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts).length; ++i) {
389        if ('none' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).css('transform')) {
390          continue;
391        } // Get layout values.
392
393
394        var layoutTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).offset().top;
395        var layoutHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(layouts[i]).outerHeight(true); // Calc points.
396
397        var pointTop = layoutTop - offsetTop;
398        var pointBottom = layoutTop + layoutHeight + offsetBottom; // Detect sidebar location.
399
400        if (sidebarTop + sidebarHeight >= pointTop && sidebarTop <= pointBottom) {
401          disabled = true;
402        }
403      }
404
405      if (disabled) {
406        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).css('opacity', '0');
407      } else {
408        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(sidebar).css('opacity', '1');
409      }
410    }); // Ticking.
411
412    ticking = false;
413  };
414
415  var requestTick = function requestTick() {
416    if (!ticking) {
417      window.requestAnimationFrame(update);
418      ticking = true;
419    }
420  };
421
422  var onProcess = function onProcess() {
423    requestTick();
424  };
425
426  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('scroll', onProcess);
427  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('resize', onProcess);
428  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('image-load', onProcess);
429  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).on('post-load', onProcess);
430})();
431
432/***/ }),
433/* 5 */
434/***/ (function(module, __webpack_exports__, __webpack_require__) {
435
436"use strict";
437Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
438/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
439function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
440
441/**
442 * AJAX Load More.
443 *
444 * Contains functions for AJAX Load More.
445 */
446
447
448if ('undefined' === typeof window.load_more_query) {
449  window.load_more_query = [];
450}
451/**
452 * Get next posts
453 */
454
455
456function csco_ajax_get_posts(object) {
457  var container = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).closest('.cs-posts-area');
458  var settings = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('settings');
459  var page = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('page');
460  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('loading', true); // Set button text to Load More.
461
462  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).text(settings.translation.loading);
463  var data = {
464    action: 'csco_ajax_load_more',
465    page: page,
466    posts_per_page: settings.posts_per_page,
467    query_data: settings.query_data,
468    attributes: settings.attributes,
469    options: settings.options,
470    _ajax_nonce: settings.nonce
471  };
472
473  if (settings.hasOwnProperty('current_lang') && settings.current_lang) {
474    data.current_lang = settings.current_lang;
475  }
476
477  if (settings.hasOwnProperty('current_locale') && settings.current_locale) {
478    data.current_locale = settings.current_locale;
479  } // Request Url.
480
481
482  var csco_pagination_url;
483
484  if ('ajax_restapi' === settings.type) {
485    csco_pagination_url = settings.rest_url;
486  } else {
487    csco_pagination_url = settings.url;
488  } // Send Request.
489
490
491  __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].post(csco_pagination_url, data, function (res) {
492    if (res.success) {
493      // Get the posts.
494      var data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.data.content); // Check if there're any posts.
495
496      if (data.length) {
497        data.imagesLoaded(function () {
498          // Append new posts to list, standard and grid archives.
499          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(container).find('.cs-posts-area__main').append(data); // WP Post Load trigger.
500
501          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).trigger('post-load'); // Reinit Facebook widgets.
502
503          if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#fb-root').length && 'object' === (typeof FB === "undefined" ? "undefined" : _typeof(FB))) {
504            FB.XFBML.parse();
505          } // Set button text to Load More.
506
507
508          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).text(settings.translation.load_more); // Increment a page.
509
510          page = page + 1;
511          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('page', page); // Set the loading state.
512
513          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('loading', false);
514        });
515      } // Remove Button on Posts End.
516
517
518      if (res.data.posts_end || !data.length) {
519        // Remove Load More button.
520        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).remove();
521      }
522    } else {// console.log(res);
523    }
524  }).fail(function (xhr, textStatus, e) {// console.log(xhr.responseText);
525  });
526}
527/**
528 * Initialization Load More
529 */
530
531
532function csco_load_more_init(infinite) {
533  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-posts-area').each(function () {
534    if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('init')) {
535      return;
536    }
537
538    var csco_ajax_settings;
539
540    if (typeof csco_ajax_pagination !== 'undefined') {
541      csco_ajax_settings = csco_ajax_pagination;
542    }
543
544    var archive_data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('posts-area');
545
546    if (archive_data) {
547      csco_ajax_settings = JSON.parse(window.atob(archive_data));
548    }
549
550    if (csco_ajax_settings) {
551      if (!infinite && csco_ajax_settings.infinite_load) {
552        return;
553      } // Add load more button.
554
555
556      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).append('<div class="cs-posts-area__pagination"><button class="cs-load-more">' + csco_ajax_settings.translation.load_more + '</button></div>'); // Set load more settings.
557
558      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('settings', csco_ajax_settings);
559      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('page', 2);
560      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('loading', false);
561      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('.cs-load-more').data('scrollHandling', {
562        allow: __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].parseJSON(csco_ajax_settings.infinite_load),
563        delay: 400
564      });
565    }
566
567    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('init', true);
568  });
569}
570
571csco_load_more_init(true);
572__WEBPACK_IMPORTED_MODULE_0__utility__["g" /* csco */].addAction('canvas.components.serverSideRender.onChange', 'posts-init-loadmore', function (props) {
573  if ('canvas/posts' === props.block) {
574    csco_load_more_init(false);
575  }
576}); // On Scroll Event.
577
578Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () {
579  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-posts-area .cs-load-more').each(function () {
580    var loading = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('loading');
581    var scrollHandling = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('scrollHandling');
582
583    if ('undefined' === typeof scrollHandling) {
584      return;
585    }
586
587    if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).length && !loading && scrollHandling.allow) {
588      scrollHandling.allow = false;
589      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('scrollHandling', scrollHandling);
590      var object = this;
591      setTimeout(function () {
592        var scrollHandling = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('scrollHandling');
593
594        if ('undefined' === typeof scrollHandling) {
595          return;
596        }
597
598        scrollHandling.allow = true;
599        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(object).data('scrollHandling', scrollHandling);
600      }, scrollHandling.delay);
601      var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).offset().top - Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop();
602
603      if (4000 > offset) {
604        csco_ajax_get_posts(this);
605      }
606    }
607  });
608}); // On Click Event.
609
610Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').on('click', '.cs-load-more', function () {
611  var loading = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).data('loading');
612
613  if (!loading) {
614    csco_ajax_get_posts(this);
615  }
616});
617
618/***/ }),
619/* 6 */
620/***/ (function(module, __webpack_exports__, __webpack_require__) {
621
622"use strict";
623Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
624/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
625function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
626
627/**
628 * AJAX Auto Load Next Post.
629 *
630 * Contains functions for AJAX Auto Load Next Post.
631 */
632
633/**
634 * Check if Load Nextpost is defined by the wp_localize_script
635 */
636
637if (typeof csco_ajax_nextpost !== 'undefined') {
638  var objNextparent = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-site-primary > .cs-site-content'),
639      objNextsect = '.cs-nextpost-section',
640      objNextpost = null,
641      currentNTitle = document.title,
642      currentNLink = window.location.href,
643      loadingNextpost = false,
644      scrollNextpost = {
645    allow: true,
646    reallow: function reallow() {
647      scrollNextpost.allow = true;
648    },
649    delay: 400 //(milliseconds) adjust to the highest acceptable value
650
651  }; // Init.
652
653  if (csco_ajax_nextpost.next_post) {
654    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextparent).after('<div class="cs-nextpost-inner"></div>');
655    objNextpost = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-nextpost-inner');
656  }
657}
658/**
659 * Get next post
660 */
661
662
663function csco_ajax_get_nextpost() {
664  loadingNextpost = true; // Set class loading.
665
666  var data = {
667    action: 'csco_ajax_load_nextpost',
668    not_in: csco_ajax_nextpost.not_in,
669    current_user: csco_ajax_nextpost.current_user,
670    nonce: csco_ajax_nextpost.nonce,
671    next_post: csco_ajax_nextpost.next_post
672  };
673
674  if (csco_ajax_nextpost.hasOwnProperty('current_lang') && csco_ajax_nextpost.current_lang) {
675    data.current_lang = csco_ajax_nextpost.current_lang;
676  }
677
678  if (csco_ajax_nextpost.hasOwnProperty('current_locale') && csco_ajax_nextpost.current_locale) {
679    data.current_locale = csco_ajax_nextpost.current_locale;
680  } // Request Url.
681
682
683  var csco_ajax_nextpost_url;
684
685  if ('ajax_restapi' === csco_ajax_nextpost.type) {
686    csco_ajax_nextpost_url = csco_ajax_nextpost.rest_url;
687  } else {
688    csco_ajax_nextpost_url = csco_ajax_nextpost.url;
689  } // Send Request.
690
691
692  __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].post(csco_ajax_nextpost_url, data, function (res) {
693    csco_ajax_nextpost.next_post = false;
694
695    if (res.success) {
696      // Get the posts.
697      var data = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.data.content); // Check if there're any posts.
698
699      if (data.length) {
700        // Set the loading state.
701        loadingNextpost = false; // Set not_in.
702
703        csco_ajax_nextpost.not_in = res.data.not_in; // Set next data.
704
705        csco_ajax_nextpost.next_post = res.data.next_post; // Remove loader.
706
707        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).siblings('.cs-nextpost-loading').remove(); // Append new post.
708
709        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).append(data); // Reinit facebook.
710
711        if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#fb-root').length && 'object' === (typeof FB === "undefined" ? "undefined" : _typeof(F
711B))) {
712          FB.XFBML.parse();
713        }
714
715        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document.body).trigger('post-load');
716      }
717    } else {// console.log(res);
718    }
719  }).fail(function (xhr, textStatus, e) {// console.log(xhr.responseText);
720  });
721}
722/**
723 * Check if Load Nextpost is defined by the wp_localize_script
724 */
725
726
727if (typeof csco_ajax_nextpost !== 'undefined') {
728  // On Scroll Event.
729  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () {
730    var scrollTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop(); // Init nextpost.
731
732    if (csco_ajax_nextpost.next_post) {
733      if (objNextpost.length && !loadingNextpost && scrollNextpost.allow) {
734        scrollNextpost.allow = false;
735        setTimeout(scrollNextpost.reallow, scrollNextpost.delay); // Calc current offset.
736
737        var offset = objNextpost.offset().top + objNextpost.innerHeight() - scrollTop; // Load nextpost.
738
739        if (4000 > offset) {
740          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextpost).after('<div class="cs-nextpost-loading"></div>');
741          csco_ajax_get_nextpost();
742        }
743      }
744    } // Reset browser data link.
745
746
747    var objFirst = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextsect).first();
748
749    if (objFirst.length) {
750      var firstTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objFirst).offset().top; // If there has been a change.
751
752      if (scrollTop < firstTop && window.location.href !== currentNLink) {
753        document.title = currentNTitle;
754        window.history.pushState(null, currentNTitle, currentNLink);
755      }
756    } // Set browser data link.
757
758
759    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(objNextsect).each(function (index, elem) {
760      var elemTop = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).offset().top;
761      var elemHeight = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).innerHeight();
762
763      if (scrollTop > elemTop && scrollTop < elemTop + elemHeight) {
764        // If there has been a change.
765        if (window.location.href !== Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url')) {
766          // New title.
767          document.title = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'); // New link.
768
769          window.history.pushState(null, Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'), Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url')); // Google Analytics.
770
771          if (typeof gtag === 'function' && _typeof(window.gaData) === 'object') {
772            var trackingId = Object.keys(window.gaData)[0];
773
774            if (trackingId) {
775              gtag('config', trackingId, {
776                'page_title': Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('title'),
777                'page_location': Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(elem).data('url')
778              });
779              gtag('event', 'page_view', {
780                'send_to': trackingId
781              });
782            }
783          }
784        }
785      }
786    });
787  });
788}
789
790/***/ }),
791/* 7 */
792/***/ (function(module, __webpack_exports__, __webpack_require__) {
793
794"use strict";
795Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
796/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
797/** ----------------------------------------------------------------------------
798 * Mega Menu */
799
800
801(function () {
802  /*
803  * Load Mega Menu Posts
804  */
805  function cscoLoadMenuPosts(menuItem) {
806    var dataTerm = menuItem.children('a').data('term'),
807        dataPosts = menuItem.children('a').data('posts'),
808        dataNumberposts = menuItem.children('a').data('numberposts'),
809        menuContainer,
810        postsContainer; // Containers.
811
812    if (menuItem.hasClass('cs-mega-menu-term')) {
813      menuContainer = menuItem;
814      postsContainer = menuContainer.find('.cs-mm__posts');
815    }
816
817    if (menuItem.hasClass('cs-mega-menu-posts')) {
818      menuContainer = menuItem;
819      postsContainer = menuContainer.find('.cs-mm__posts');
820    }
821
822    if (menuItem.hasClass('cs-mega-menu-child-term')) {
823      menuContainer = menuItem.closest('.sub-menu');
824      postsContainer = menuContainer.find('.cs-mm__posts[data-term="' + dataTerm + '"]');
825    } // Check Menu Container.
826
827
828    if (!menuContainer || typeof menuContainer === 'undefined') {
829      return false;
830    } // Check Container.
831
832
833    if (!postsContainer || typeof postsContainer === 'undefined') {
834      return false;
835    } // Set Active.
836
837
838    menuContainer.find('.menu-item, .cs-mm__posts').removeClass('cs-active-item');
839    menuItem.addClass('cs-active-item');
840
841    if (postsContainer) {
842      postsContainer.addClass('cs-active-item');
843    } // Check Loading.
844
845
846    if (menuItem.hasClass('cs-mm-loading') || menuItem.hasClass('loaded')) {
847      return false;
848    } // Create Data.
849
850
851    var data = {
852      'term': dataTerm,
853      'posts': dataPosts,
854      'per_page': dataNumberposts
855    };
856
857    if ('undefined' === typeof csco_mega_menu) {
858      return;
859    }
860
861    if (csco_mega_menu.hasOwnProperty('current_lang') && csco_mega_menu.current_lang) {
862      data.current_lang = csco_mega_menu.current_lang;
863    }
864
865    if (csco_mega_menu.hasOwnProperty('current_locale') && csco_mega_menu.current_locale) {
866      data.current_locale = csco_mega_menu.current_locale;
867    } // Get Results.
868
869
870    __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].ajax({
871      url: csco_mega_menu.rest_url,
872      type: 'GET',
873      data: data,
874      global: false,
875      async: true,
876      beforeSend: function beforeSend() {
877        menuItem.addClass('cs-mm-loading');
878        postsContainer.addClass('cs-mm-loading');
879      },
880      success: function success(res) {
881        if (res.status && 'success' === res.status) {
882          // Set the loaded state.
883          menuItem.addClass('loaded');
884          postsContainer.addClass('loaded'); // Check if there're any posts.
885
886          if (res.content && res.content.length) {
887            Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(res.content).imagesLoaded(function () {
888              // Append Data.
889              postsContainer.html(res.content);
890            });
891          }
892        }
893      },
894      complete: function complete() {
895        // Set the loading state.
896        menuItem.removeClass('cs-mm-loading');
897        postsContainer.removeClass('cs-mm-loading');
898      }
899    });
900  }
901  /*
902  * Get First Tab
903  */
904
905
906  function cscoGetFirstTab(container) {
907    var firstTab = false;
908    container.find('.cs-mega-menu-child').each(function (index, el) {
909      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).hasClass('cs-mega-menu-child')) {
910        firstTab = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el);
911        return false;
912      }
913    });
914    return firstTab;
915  }
916  /*
917  * Menu on document ready
918  */
919
920
921  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function () {
922    /*
923    * Get Menu Posts on Hover
924    */
925    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-posts').on('mouseenter', function () {
926      cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
927    });
928    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-term').on('mouseenter', function () {
929      cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
930    });
931    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-child').on('mouseenter', function () {
932      cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
933    });
934    /*
935    * Load First Tab on Mega Menu Hover
936    */
937
938    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-terms').on('mouseenter', function () {
939      var tab = cscoGetFirstTab(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
940
941      if (tab) {
942        cscoLoadMenuPosts(tab);
943      }
944    });
945  });
946  /*
947  * Load First Tab on Navbar Ready.
948  */
949
950  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document, '.cs-header__nav').ready(function () {
951    var tab = false; // Autoload First Tab.
952
953    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-terms').each(function (index, el) {
954      tab = cscoGetFirstTab(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
955
956      if (tab) {
957        cscoLoadMenuPosts(tab);
958      }
959    }); // Autoload Posts.
960
961    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-posts').each(function (index, el) {
962      cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
963    }); // Autoload Term.
964
965    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav .menu-item.cs-mega-menu-term').each(function (index, el) {
966      cscoLoadMenuPosts(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this));
967    });
968  });
969})();
970
971/***/ }),
972/* 8 */
973/***/ (function(module, __webpack_exports__, __webpack_require__) {
974
975"use strict";
976Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
977/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
978/** ----------------------------------------------------------------------------
979 * Navigation */
980
981var cscoNavigation = {};
982
983(function () {
984  var $this;
985  cscoNavigation = {
986    /** Initialize */
987    init: function init(e) {
988      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) {
989        return;
990      }
991
992      var headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header-stretch');
993
994      if (headerStretch.length > 0) {
995        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('header-smart-stretch-init');
996      }
997
998      $this = cscoNavigation; // Init events.
999
1000      $this.events(e);
1001    },
1002
1003    /** Events */
1004    events: function events(e) {
1005      // DOM Load
1006      document.addEventListener('DOMContentLoaded', function (e) {
1007        $this.smartLevels(e);
1008        $this.adaptTablet(e);
1009        $this.stickyScroll(e);
1010      }); // Resize
1011
1012      window.addEventListener('resize', function (e) {
1013        $this.smartLevels(e);
1014        $this.adaptTablet(e);
1015        $this.stickyScroll(e);
1016      });
1017    },
1018
1019    /** Smart multi-Level menu */
1020    smartLevels: function smartLevels(e) {
1021      var windowWidth = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width(); // Reset Calc.
1022
1023      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li').removeClass('cs-sm__level');
1024      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li').removeClass('cs-sm-position-left cs-sm-position-right');
1025      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner li .sub-menu').removeClass('cs-mm__position-init'); // Set Settings.
1026
1027      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner > li.menu-item').not('.cs-mm').each(function (index, parent) {
1028        var position = 'cs-sm-position-right'; //right
1029
1030        var objPrevWidth = 0;
1031        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(parent).find('.sub-menu').each(function (index, el) {
1032          // Reset child levels.
1033          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().next('li').addClass('cs-sm__level');
1034
1035          if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().hasClass('cs-sm__level')) {
1036            Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).parent().removeClass('cs-mm-level');
1037            position = 'cs-sm-position-right'; //right
1038
1039            objPrevWidth = 0;
1040          } // Find out position items.
1041
1042
1043          var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset();
1044          var objOffset = offset.left;
1045
1046          if ('cs-sm-position-right' === position && Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth() + objOffset > windowWidth) {
1047            position = 'cs-sm-position-left';
1048          }
1049
1050          if ('cs-sm-position-left' === position && objOffset - (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth() + objPrevWidth) < 0) {
1051            position = 'cs-sm-position-right'; //right
1052          }
1053
1054          objPrevWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth();
1055          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).addClass('cs-sm-position-init').parent().addClass(position);
1056        });
1057      });
1058    },
1059
1060    /** Adapting nav bar for tablet */
1061    adaptTablet: function adaptTablet(e) {
1062      // Click outside.
1063      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('touchstart', function (e) {
1064        if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).closest('.cs-header__nav-inner').length) {
1065          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner .menu-item-has-children').removeClass('submenu-visible');
1066        } else {
1067          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).parents('.menu-item').siblings().find('.menu-item').removeClass('submenu-visible');
1068          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).parents('.menu-item').siblings().closest('.menu-item').removeClass('submenu-visible');
1069        }
1070      });
1071      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__nav-inner .menu-item-has-children').each(function (e) {
1072        // Reset class.
1073        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).removeClass('submenu-visible'); // Remove expanded.
1074
1075        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('> a > .expanded').remove(); // Add a caret.
1076
1077        if ('ontouchstart' in document.documentElement) {
1078          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).find('> a').append('<span class="expanded"></span>');
1079        } // Check touch device.
1080
1081
1082        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).addClass('ontouchstart' in document.documentElement ? 'touch-device' : '');
1083        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a .expanded', this).on('touchstart', function (e) {
1084          e.preventDefault();
1085          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).closest('.menu-item-has-children').toggleClass('submenu-visible');
1086        });
1087
1088        if ('#' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).attr('href')) {
1089          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).on('touchstart', function (e) {
1090            e.preventDefault();
1091
1092            if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(e.target).hasClass('expanded')) {
1093              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).closest('.menu-item-has-children').toggleClass('submenu-visible');
1094            }
1095          });
1096        }
1097      });
1098    },
1099
1100    /** Make nav bar sticky */
1101    stickyScroll: function stickyScroll(e) {
1102      // Get css variables.
1103      var headerLargeHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')),
1104          headerCompactHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')); // Get header elements.
1105
1106      var wpAdminBar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#wpadminbar'),
1107          headerSmart = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'),
1108          headerBefore = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header-before'),
1109          headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-navbar-smart-enabled .cs-header-stretch'); // Adminbar sizes.
1110
1111      var wpAdminBarHeight;
1112
1113      if (wpAdminBar.length > 0) {
1114        wpAdminBarHeight = wpAdminBar.outerHeight();
1115      } else {
1116        wpAdminBarHeight = 0;
1117      } // Header smart start position.
1118
1119
1120      var smartStart;
1121
1122      if (headerBefore.length > 0) {
1123        smartStart = headerBefore.offset().top;
1124      } else {
1125        if (headerSmart.length > 0) {
1126          smartStart = headerSmart.offset().top + wpAdminBarHeight;
1127        } else {
1128          smartStart = wpAdminBarHeight;
1129        }
1130      } // Set values to hide.
1131
1132
1133      var scrollPoint = 200,
1134          scrollPrev = 200,
1135          scrollUpAmount = 0;
1136
1137      if (headerStretch.length > 0) {
1138        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('header-smart-stretch-scroll-sticky-scroll-init');
1139      } else {
1140        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scroll(function () {
1141          var scrolled = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).scrollTop(),
1142              headerSmartPosition = headerSmart.length > 0 ? headerSmart.offset().top : 0;
1143
1144          if (scrolled > smartStart + scrollPoint + 10 && scrolled > scrollPrev) {
1145            if (scrolled > smartStart + headerCompactHeight + 200) {
1146              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('sticky-nav-hide');
1147            }
1148          } else {
1149            if (scrollUpAmount >= scrollPoint || scrolled === 0) {
1150              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('sticky-nav-visible');
1151            }
1152          }
1153
1154          if (headerSmart.length > 0) {
1155            if (scrolled > smartStart + headerCompactHeight) {
1156              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('nav-stick');
1157            } else if (headerSmartPosition <= smartStart) {
1158              Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('nav-unstick');
1159            }
1160          }
1161
1162          if (scrolled < scrollPrev) {
1163            scrollUpAmount += scrollPrev - scrolled;
1164          } else {
1165            scrollUpAmount = 0;
1166          }
1167
1168          if (wpAdminBar.length > 0 && __WEBPACK_IMPORTED_MODULE_0__utility__["h" /* wndW */] <= 600 && scrolled >= wpAdminBarHeight) {
1169            Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('adminbar-mobile-scrolled', [wpAdminBar, wpAdminBarHeight]);
1170          } else {
1171            Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).trigger('adminbar-mobile-no-scrolled', [wpAdminBar, wpAdminBarHeight]);
1172          }
1173
1174          scrollPrev = scrolled;
1175        });
1176        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("sticky-nav-visible", function () {
1177          headerSmart.addClass('cs-header-smart-visible');
1178        });
1179        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("sticky-nav-hide", function () {
1180          headerSmart.removeClass("cs-header-smart-visible");
1181        });
1182        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("nav-stick", function () {
1183          headerSmart.addClass('cs-scroll-sticky');
1184        });
1185        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("nav-unstick", function () {
1186          headerSmart.removeClass('cs-scroll-sticky').removeClass('cs-header-smart-visible');
1187        });
1188      }
1189    }
1190  };
1191})(); // Initialize.
1192
1193
1194cscoNavigation.init();
1195
1196/***/ }),
1197/* 9 */
1198/***/ (function(module, __webpack_exports__, __webpack_require__) {
1199
1200"use strict";
1201Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1202/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1203/** ----------------------------------------------------------------------------
1204 * Offcanvas */
1205
1206
1207(function () {
1208  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__offcanvas-toggle, .cs-site-overlay, .cs-offcanvas__toggle').on('click', function (e) {
1209    e.preventDefault(); // Transition.
1210
1211    if (!__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-offcanvas-active')) {
1212      __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].addClass('cs-offcanvas-transition');
1213    } else {
1214      setTimeout(function () {
1215        __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].removeClass('cs-offcanvas-transition');
1216      }, 400);
1217    } // Toogle offcanvas.
1218
1219
1220    __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].toggleClass('cs-offcanvas-active');
1221  });
1222})();
1223
1224/***/ }),
1225/* 10 */
1226/***/ (function(module, __webpack_exports__, __webpack_require__) {
1227
1228"use strict";
1229Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1230/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1231
1232
1233(function () {
1234  var offcanvas = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(".cs-offcanvas");
1235  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("adminbar-mobile-scrolled", function (event, wpAdminBar, wpAdminBarHeight) {
1236    if (offcanvas.length > 0) {
1237      offcanvas.css("top", 0);
1238    }
1239  });
1240  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on("adminbar-mobile-no-scrolled", function (event, wpAdminBar, wpAdminBarHeight) {
1241    if (offcanvas.length > 0) {
1242      offcanvas.css("top", wpAdminBarHeight);
1243    }
1244  });
1245})();
1246
1247/***/ }),
1248/* 11 */
1249/***/ (function(module, __webpack_exports__, __webpack_require__) {
1250
1251"use strict";
1252Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1253/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1254/** ----------------------------------------------------------------------------
1255 * Responsive Embeds */
1256
1257
1258(function () {
1259  /**
1260   * Add max-width & max-height to <iframe> elements, depending on their width & height props.
1261   */
1262  function initResponsiveEmbeds() {
1263    var proportion, parentWidth; // Loop iframe elements.
1264
1265    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.entry-content').find('iframe').each(function (index, iframe) {
1266      // Don't handle if the parent automatically resizes itself.
1267      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(iframe).closest('div').is('[data-vi
1267deo-start], [data-video-end]')) {
1268        return;
1269      } // Only continue if the iframe has a width & height defined.
1270
1271
1272      if (iframe.width && iframe.height) {
1273        // Calculate the proportion/ratio based on the width & height.
1274        proportion = parseFloat(iframe.width) / parseFloat(iframe.height); // Get the parent element's width.
1275
1276        parentWidth = parseFloat(window.getComputedStyle(iframe.parentElement, null).width.replace('px', '')); // Set the max-width & height.
1277
1278        iframe.style.maxWidth = '100%';
1279        iframe.style.maxHeight = Math.round(parentWidth / proportion).toString() + 'px';
1280      }
1281    });
1282  } // Document ready.
1283
1284
1285  __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () {
1286    initResponsiveEmbeds();
1287  }); // Post load.
1288
1289  __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].on('post-load', function () {
1290    initResponsiveEmbeds();
1291  }); // Document resize.
1292
1293  __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('resize', function () {
1294    initResponsiveEmbeds();
1295  }); // Run on initial load.
1296
1297  initResponsiveEmbeds();
1298})();
1299
1300/***/ }),
1301/* 12 */
1302/***/ (function(module, __webpack_exports__, __webpack_require__) {
1303
1304"use strict";
1305Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1306/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1307/** ----------------------------------------------------------------------------
1308 * Color Scheme Toogle */
1309
1310var cscoDarkMode = {};
1311
1312(function () {
1313  var $this;
1314  cscoDarkMode = {
1315    /** Initialize */
1316    init: function init(e) {
1317      $this = cscoDarkMode; // Init events.
1318
1319      $this.events(e);
1320    },
1321
1322    /** Events */
1323    events: function events(e) {
1324      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) {
1325        return;
1326      } // DOM Load
1327
1328
1329      window.addEventListener('load', function (e) {
1330        $this.initMode(e);
1331      });
1332      window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
1333        $this.initMode(e);
1334      }); // Switch
1335
1336      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).on('click', '.cs-site-scheme-toggle', function (e) {
1337        $this.changeMode(e);
1338      });
1339    },
1340
1341    /** Detect Color Scheme */
1342    detectColorScheme: function detectColorScheme(color) {
1343      var level = 190; // Set alpha channel.
1344
1345      var alpha = 1;
1346      var rgba = [255, 255, 255];
1347      var color_rgba = false; // Trim color.
1348
1349      color = color.trim(); // If HEX format.
1350
1351      if ('#' === color[0]) {
1352        // Remove '#' from start.
1353        color = color.replace('#', '').trim();
1354
1355        if (3 === color.length) {
1356          color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
1357        }
1358
1359        rgba[0] = parseInt(color.substr(0, 2), 16);
1360        rgba[1] = parseInt(color.substr(2, 2), 16);
1361        rgba[2] = parseInt(color.substr(4, 2), 16);
1362      } else if (color_rgba = color.replace(/\s/g, '').match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i)) {
1363        // Convert RGB or RGBA.
1364        rgba[0] = parseInt(color_rgba[1]);
1365        rgba[1] = parseInt(color_rgba[2]);
1366        rgba[2] = parseInt(color_rgba[3]);
1367
1368        if (color_rgba[4] !== undefined) {
1369          alpha = parseFloat(color_rgba[4]);
1370        }
1371      } // Apply alpha channel.
1372
1373
1374      rgba.forEach(function myFunction(channel, key, stack) {
1375        stack[key] = String(channel + Math.ceil((255 - channel) * (1 - alpha))).padStart(2, '0');
1376      }); // Set default scheme.
1377
1378      var scheme = 'default'; // Get brightness.
1379
1380      var brightness = (rgba[0] * 299 + rgba[1] * 587 + rgba[2] * 114) / 1000; // If color gray.
1381
1382      if (rgba[0] === rgba[1] && rgba[1] === rgba[2]) {
1383        if (brightness < level) {
1384          scheme = 'dark';
1385        }
1386      } else {
1387        if (brightness < level) {
1388          scheme = 'inverse';
1389        }
1390      }
1391
1392      return scheme;
1393    },
1394
1395    /** Set Individual Scheme */
1396    setIndividualScheme: function setIndividualScheme() {
1397      var list = {
1398        'body': '--cs-color-site-background',
1399        '.cs-topbar': '--cs-color-topbar-background',
1400        '.cs-header': '--cs-color-header-background',
1401        '.cs-header__nav-inner .sub-menu': '--cs-color-submenu-background',
1402        '.cs-header__multi-column-container': '--cs-color-submenu-background',
1403        '.cs-header__widgets': '--cs-color-submenu-background',
1404        '.cs-offcanvas__header': '--cs-color-header-background',
1405        '.cs-search': '--cs-color-search-background',
1406        '.cs-footer': '--cs-color-footer-background'
1407      };
1408
1409      for (var key in list) {
1410        if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(key).length <= 0) {
1411          continue;
1412        }
1413        /* jshint ignore:start */
1414
1415
1416        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(key).each(function (index, element) {
1417          var color = window.getComputedStyle(Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(element)[0]).getPropertyValue(list[key]);
1418          var scheme = $this.detectColorScheme(color);
1419          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(element).attr('data-scheme', scheme);
1420        });
1421        /* jshint ignore:end */
1422      }
1423    },
1424
1425    /** Init Mode */
1426    initMode: function initMode(e) {
1427      // Get system scheme.
1428      var systemSchema = 'default';
1429
1430      if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
1431        systemSchema = 'dark';
1432      }
1433
1434      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_system_schema', systemSchema, {
1435        expires: 2592000
1436      }); // Set site scheme.
1437
1438      var siteScheme = 'default';
1439
1440      switch (csLocalize.siteSchemeMode) {
1441        case 'dark':
1442          siteScheme = 'dark';
1443          break;
1444
1445        case 'light':
1446          siteScheme = 'default';
1447          break;
1448
1449        case 'system':
1450          siteScheme = systemSchema;
1451          break;
1452      }
1453
1454      if (csLocalize.siteSchemeToogle) {
1455        if ('default' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["e" /* csGetCookie */])('_color_schema')) {
1456          siteScheme = 'default';
1457        }
1458
1459        if ('dark' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["e" /* csGetCookie */])('_color_schema')) {
1460          siteScheme = 'dark';
1461        }
1462      } // Change site scheme
1463
1464
1465      if (siteScheme !== __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme')) {
1466        $this.changeScheme(siteScheme, false);
1467      }
1468    },
1469
1470    /** Change Mode */
1471    changeMode: function changeMode(e) {
1472      if ('dark' === __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme')) {
1473        $this.changeScheme('default', true);
1474      } else {
1475        $this.changeScheme('dark', true);
1476      }
1477    },
1478
1479    /** Change Scheme */
1480    changeScheme: function changeScheme(scheme, cookie) {
1481      __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].addClass('cs-scheme-toggled');
1482      __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].attr('data-site-scheme', scheme);
1483      $this.setIndividualScheme();
1484
1485      if (cookie) {
1486        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_schema', scheme, {
1487          expires: 2592000
1488        });
1489        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["f" /* csSetCookie */])('_color_system_schema', null, {
1490          expires: 2592000
1491        });
1492      }
1493
1494      setTimeout(function () {
1495        __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].removeClass('cs-scheme-toggled');
1496      }, 100);
1497    }
1498  };
1499})(); // Initialize.
1500
1501
1502cscoDarkMode.init();
1503
1504/***/ }),
1505/* 13 */
1506/***/ (function(module, __webpack_exports__, __webpack_require__) {
1507
1508"use strict";
1509Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1510/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1511/** ----------------------------------------------------------------------------
1512 * Search Dropdown */
1513
1514
1515(function () {
1516  var focusSearchTimeout;
1517  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header__search-toggle').click(function (e) {
1518    if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').is(":visible")) {
1519      focusSearchTimeout = setTimeout(function () {
1520        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search .cs-search__input').focus();
1521      }, 300);
1522    } else {
1523      clearTimeout(focusSearchTimeout);
1524    }
1525
1526    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').stop().slideToggle();
1527    e.preventDefault();
1528  });
1529  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search__close').click(function (e) {
1530    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-search').slideUp();
1531    e.preventDefault();
1532    clearTimeout(focusSearchTimeout);
1533  });
1534})();
1535
1536/***/ }),
1537/* 14 */
1538/***/ (function(module, __webpack_exports__, __webpack_require__) {
1539
1540"use strict";
1541Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1542/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1543/** ----------------------------------------------------------------------------
1544 * Sticky Sidebar */
1545
1546
1547(function () {
1548  var stickyElementsSmart = [],
1549      stickyElements = [];
1550  stickyElementsSmart.push('.cs-navbar-smart-enabled .cs-entry__metabar-inner');
1551  stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-to-top .cs-sidebar__inner');
1552  stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child');
1553  stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled .cnvs-block-section-sidebar-sticky-top .cnvs-block-section-sidebar-inner');
1554  stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled .cnvs-block-section-sidebar-sticky-top-last-block .cnvs-block-section-sidebar-inner > :last-child');
1555  stickyElements.push('.cs-navbar-sticky-enabled .cs-entry__metabar-inner');
1556  stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-to-top .cs-sidebar__inner');
1557  stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child');
1558  stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled .cnvs-block-section-sidebar-sticky-top .cnvs-block-section-sidebar-inner');
1559  stickyElements.push('.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled .cnvs-block-section-sidebar-sticky-top-last-block .cnvs-block-section-sidebar-inner > :last-child');
1560  __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () {
1561    var headerStick = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header'),
1562        wpAdminBar = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('#wpadminbar'),
1563        headerStickHeight = headerStick.outerHeight(),
1564        wpAdminBarHeight = wpAdminBar.outerHeight(),
1565        headerStretch = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-header-stretch'),
1566        headerStretchHeight = headerStretch.outerHeight(),
1567        allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20,
1568        windowWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).width(); // Sticky sidebar for mozilla.
1569
1570    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
1571      stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
1572      stickyElements.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
1573      stickyElementsSmart.push('.cnvs-block-section-sidebar-sticky-bottom .cnvs-block-section-sidebar-inner');
1574      stickyElements.push('.cnvs-block-section-sidebar-sticky-bottom .cnvs-block-section-sidebar-inner');
1575    } // Join elements.
1576
1577
1578    stickyElementsSmart = stickyElementsSmart.join(',');
1579    stickyElements = stickyElements.join(','); // Sticky nav visible.
1580
1581    __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('sticky-nav-visible', function () {
1582      headerStickHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
1583
1584      if (headerStretchHeight) {
1585        allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1586      } else {
1587        allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1588      }
1589
1590      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px');
1591    }); // Sticky nav hide.
1592
1593    __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('sticky-nav-hide', function () {
1594      headerStickHeight = 0;
1595      allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1596      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px');
1597    });
1598    __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('nav-unstick', function () {
1599      headerStickHeight = 0;
1600      allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1601      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px');
1602    });
1603    __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('stretch-nav-to-small', function () {
1604      headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
1605
1606      if (headerStretchHeight) {
1607        allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1608      } else {
1609        allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1610      }
1611
1612      if (headerStretch.hasClass("cs-scroll-sticky") && !headerStretch.hasClass("cs-scroll-active")) {
1613        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', allHeight + 'px');
1614      }
1615    });
1616    __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('stretch-nav-to-big', function () {
1617      headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height'));
1618    }); // Add top style
1619
1620    if (__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-navbar-smart-enabled') && windowWidth >= 1020) {
1621      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).css('top', (wpAdminBarHeight || 0) + 20 + 'px');
1622    } else if (__WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].hasClass('cs-navbar-sticky-enabled') && windowWidth >= 1020) {
1623      if (headerStretchHeight) {
1624        allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1625      } else {
1626        allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1627      }
1628
1629      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElements).css('top', allHeight + 'px');
1630    } // Remove top style rafter resize
1631
1632
1633    __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].resize(function () {
1634      var windowWidthResize = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width();
1635
1636      if (windowWidthResize < 1020) {
1637        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElements).removeAttr('style');
1638        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(stickyElementsSmart).removeAttr('style');
1639      }
1640    });
1641  });
1642})();
1643
1644/***/ }),
1645/* 15 */
1646/***/ (function(module, __webpack_exports__, __webpack_require__) {
1647
1648"use strict";
1649Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1650/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
1651/** ----------------------------------------------------------------------------
1652 * Video Background */
1653
1654var cscoVideoBackground = {};
1655
1656(function () {
1657  var $this;
1658  var YTdeferredDone = false;
1659  var initAPI = false;
1660  var process = false;
1661  var contex = [];
1662  var players = [];
1663  var attrs = []; // Create deferred object
1664
1665  var YTdeferred = __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].Deferred();
1666
1667  if (typeof window.onYouTubePlayerAPIReady !== 'undefined') {
1668    if (typeof window.csYTAPIReady === 'undefined') {
1669      window.csYTAPIReady = [];
1670    }
1671
1672    window.csYTAPIReady.push(window.onYouTubePlayerAPIReady);
1673  }
1674
1675  window.onYouTubePlayerAPIReady = function () {
1676    if (typeof window.csYTAPIReady !== 'undefined') {
1677      if (window.csYTAPIReady.length) {
1678        window.csYTAPIReady.pop()();
1679      }
1680    } // Resolve when youtube callback is called
1681    // passing YT as a parameter.
1682
1683
1684    YTdeferred.resolve(window.YT);
1685  }; // Whenever youtube callback was called = deferred resolved
1686  // your custom function will be executed with YT as an argument.
1687
1688
1689  YTdeferred.done(function (YT) {
1690    YTdeferredDone = true;
1691  }); // Embedding youtube iframe api.
1692
1693  function embedYoutubeAPI() {
1694    if ('function' === typeof window.onYTReady) {
1695      return;
1696    }
1697
1698    var tag = document.createElement('script');
1699    tag.src = 'https://www.youtube.com/iframe_api';
1700    var firstScriptTag = document.getElementsByTagName('script')[0];
1701    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
1702  }
1703
1704  __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].fn.contexObject = function (id, type) {
1705    if ('string' === typeof id) {
1706      id = "[data-id=\"".concat(id, "\"]");
1707    } else {
1708      id = this;
1709    }
1710
1711    if ('wrap' === type) {
1712      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-overlay, .cs-video-wrap');
1713    } else if ('container' === type) {
1714      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-video-wrapper');
1715    } else if ('inner' === type) {
1716      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id).closest('.cs-overlay, .cs-video-wrap').find('.cs-video-inner');
1717    } else {
1718      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(id);
1719    }
1720  }; // Object Video Portfolio.
1721
1722
1723  cscoVideoBackground = {
1724    /** Initialize */
1725    init: function init(e) {
1726      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) {
1727        return;
1728      }
1729
1730      $this = cscoVideoBackground; // Init events.
1731
1732      $this.events(e);
1733    },
1734    // Video rescale.
1735    rescaleVideoBackground: function rescaleVideoBackground() {
1736      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-video-init').each(function () {
1737        var w = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().width();
1738        var h = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().height();
1739        var hideControl = 400;
1740        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).attr('data-id');
1741
1742        if (w / h > 16 / 9) {
1743          if ('youtube' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().data('video-mode')) {
1744            players[id].setSize(w, w / 16 * 9 + hideControl);
1745          } else {
1746            players[id].width(w);
1747            players[id].height(w / 16 * 9 + hideControl);
1748          }
1749        } else {
1750          if ('youtube' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().data('video-mode')) {
1751            players[id].setSize(h / 9 * 16, h + hideControl);
1752          } else {
1753            players[id].width(h / 9 * 16);
1754            players[id].height(h + hideControl);
1755          }
1756        }
1757      });
1758    },
1759    // Init video background.
1760    initVideoBackground: function initVideoBackground(mode, object) {
1761      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cs-video-inner').each(function () {
1762        // The mode.
1763        if (!Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).parent().is("[data-video-mode=\"".concat(mode, "\"]"))) {
1764          return;
1765        } // The state.
1766
1767
1768        var isInit = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).hasClass('cs-video-init');
1769        var id = null; // Generate unique ID.
1770
1771        if (!isInit) {
1772          id = Math.random().toString(36).substr(2, 9);
1773        } else {
1774          id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).attr('data-id');
1775        } // Create contex.
1776
1777
1778        contex[id] = this; // The monitor.
1779
1780        var isInView = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).isInViewport(); // The actived.
1781
1782        var isActive = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).hasClass('active'); // Get video attrs.
1783
1784        var youtubeID = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('youtube-id');
1785        var videoType = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-type');
1786        var videoStart = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-start');
1787        var videoEnd = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).parent().data('video-end'); // Initialization.
1788
1789        if (isInView && !isInit) {
1790          // Add init class.
1791          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).addClass('cs-video-init'); // Add unique ID.
1792
1793          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(contex[id]).attr('data-id', id); // Check video mode.
1794
1795          if ('youtube' === mode) {
1796            // Check video id.
1797            if (typeof youtubeID === 'undefined' || !youtubeID) {
1798              return;
1799            } // Video attrs.
1800
1801
1802            attrs[id] = {
1803              'videoId': youtubeID,
1804              'startSeconds': videoStart,
1805              'endSeconds': videoEnd,
1806              'suggestedQuality': 'hd720'
1807            }; // Creating a player.
1808
1809            players[id] = new YT.Player(contex[id], {
1810              playerVars: {
1811                autoplay: 0,
1812                autohide: 1,
1813                modestbranding: 1,
1814                rel: 0,
1815                showinfo: 0,
1816                controls: 0,
1817                disablekb: 1,
1818                enablejsapi: 0,
1819                iv_load_policy: 3,
1820                playsinline: 1,
1821                loop: 1
1822              },
1823              events: {
1824                'onReady': function onReady() {
1825                  players[id].cueVideoById(attrs[id]);
1826                  players[id].mute();
1827
1828                  if ('always' === videoType) {
1829                    $this.playVideo(id);
1830                  }
1831                },
1832                'onStateChange': function onStateChange(e) {
1833                  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-video-wrapper').removeClass('cs-video-played');
1834
1835                  if (e.data === 1) {
1836                    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-overlay, .cs-video-wrap').addClass('cs-video-bg-init');
1837                    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).closest('.cs-video-wrapper').addClass('cs-video-played');
1838                    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id).addClass('active');
1839                  } else if (e.data === 0) {
1840                    players[id].seekTo(attrs[id].startSeconds);
1841                  } else if (e.data === 5) {
1842                    players[id].videoReady = true;
1843                  }
1844                }
1845              }
1846            });
1847          }
1848
1849          $this.rescaleVideoBackground();
1850        } // Pause and play.
1851
1852
1853        if ('always' === videoType && isActive && isInit && !$this.getVideoUpause(id)) {
1854          if (isInView) {
1855            $this.playVideo(id);
1856          }
1857
1858          if (!isInView) {
1859            $this.pauseVideo(id);
1860          }
1861        }
1862      });
1863    },
1864    // Construct video background.
1865    constructVideoBackground: function constructVideoBackground(object) {
1866      if (Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('body').hasClass('wp-admin')) {
1867        return;
1868      }
1869
1870      if (process) {
1871        return;
1872      }
1873
1874      process = true; // Smart init API.
1875
1876      if (!initAPI) {
1877        var elements = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('[data-video-mode="youtube"][data-youtube-id]');
1878
1879        if (elements.length) {
1880          embedYoutubeAPI();
1881          initAPI = true;
1882        }
1883      }
1884
1885      if (!initAPI) {
1886        process = false;
1887      } // Play Video.
1888
1889
1890      $this.initVideoBackground('local', object);
1891
1892      if (initAPI && YTdeferredDone) {
1893        $this.initVideoBackground('youtube', object);
1894      }
1895
1896      process = false;
1897    },
1898    // Get video type.
1899    getVideoType: function getVideoType(id) {
1900      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'container').data('video-type');
1901    },
1902    // Get video mode.
1903    getVideoMode: function getVideoMode(id) {
1904      return Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'container').data('video-mode');
1905    },
1906    // Get video state.
1907    getVideoState: function getVideoState(id) {
1908      return players[id].videoState;
1909    },
1910    // Get video ready.
1911    getVideoReady: function getVideoReady(id) {
1912      return players[id].videoReady ? players[id].videoReady : false;
1913    },
1914    // Get video upause.
1915    getVideoUpause: function getVideoUpause(id) {
1916      return players[id].videoUpause ? players[id].videoUpause : false;
1917    },
1918    // Get video volume.
1919    getVideoVolume: function getVideoVolume(id) {
1920      return players[id].videoVolume ? players[id].videoVolume : 'mute';
1921    },
1922    // Change video upause.
1923    changeVideoUpause: function changeVideoUpause(id, val) {
1924      players[id].videoUpause = val;
1925    },
1926    // Play video.
1927    playVideo: function playVideo(id) {
1928      if ('play' === players[id].videoState) {
1929        return;
1930      }
1931
1932      if (!players[id].videoReady) {
1933        return setTimeout(function () {
1934          $this.playVideo(id);
1935        }, 100);
1936      }
1937
1938      if ('youtube' === $this.getVideoMode(id)) {
1939        players[id].playVideo();
1940      } else {
1941        players[id].trigger('play');
1942      } // Change control.
1943
1944
1945      var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-state');
1946      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-pause');
1947      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-play'); // Set state.
1948
1949      players[id].videoState = 'play';
1950    },
1951    // Pause video.
1952    pauseVideo: function pauseVideo(id) {
1953      if ('pause' === players[id].videoState) {
1954        return;
1955      }
1956
1957      if (!players[id].videoReady) {
1958        return;
1959      }
1960
1961      if ('youtube' === $this.getVideoMode(id)) {
1962        players[id].pauseVideo();
1963      } else {
1964        players[id].trigger('pause');
1965      } // Change control.
1966
1967
1968      var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-state');
1969      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-play');
1970      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-pause'); // Set state.
1971
1972      players[id].videoState = 'pause';
1973    },
1974    // Unmute video.
1975    unmuteVideo: function unmuteVideo(id) {
1976      if (!players[id].videoReady) {
1977        return;
1978      }
1979
1980      if ('youtube' === $this.getVideoMode(id)) {
1981        players[id].unMute();
1982      } else {
1983        players[id].prop('muted', false);
1984      } // Change control.
1985
1986
1987      var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-volume');
1988      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-mute');
1989      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-unmute'); // Set state.
1990
1991      players[id].videoVolume = 'unmute';
1992    },
1993    // Mute video.
1994    muteVideo: function muteVideo(id) {
1995      if (!players[id].videoReady) {
1996        return;
1997      }
1998
1999      if ('youtube' === $this.getVideoMode(id)) {
2000        players[id].mute();
2001      } else {
2002        players[id].prop('muted', true);
2003      } // Change control.
2004
2005
2006      var control = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(id, 'wrap').find('.cs-player-volume');
2007      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).removeClass('cs-player-unmute');
2008      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(control).addClass('cs-player-mute'); // Set state.
2009
2010      players[id].videoVolume = 'muted';
2011    },
2012    // Toogle video state.
2013    toogleVideoState: function toogleVideoState(id) {
2014      if ('play' === $this.getVideoState(id)) {
2015        $this.pauseVideo(id);
2016      } else {
2017        $this.playVideo(id);
2018      }
2019    },
2020    // Toogle video volume.
2021    toogleVideoVolume: function toogleVideoVolume(id) {
2022      if ('unmute' === $this.getVideoVolume(id)) {
2023        $this.muteVideo(id);
2024      } else {
2025        $this.unmuteVideo(id);
2026      }
2027    },
2028
2029    /** Events */
2030    events: function events(e) {
2031      // State Control.
2032      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-state', function () {
2033        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id');
2034        $this.toogleVideoState(id);
2035
2036        if ('play' === $this.getVideoState(id)) {
2037          $this.changeVideoUpause(id, false);
2038        } else {
2039          $this.changeVideoUpause(id, true);
2040        }
2041      }); // Stop Control.
2042
2043      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-stop', function () {
2044        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id');
2045
2046        if ('play' === $this.getVideoState(id)) {
2047          $this.changeVideoUpause(id, true);
2048        }
2049
2050        $this.pauseVideo(id);
2051      }); // Volume Control.
2052
2053      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('click', '.cs-player-volume', function () {
2054        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id');
2055        $this.toogleVideoVolume(id);
2056      }); // Mouseover.
2057
2058      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('mouseover mousemove', '.cs-entry__thumbnail', function () {
2059        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id');
2060
2061        if ('hover' === $this.getVideoType(id)) {
2062          $this.playVideo(id);
2063        }
2064      }); // Mouseout.
2065
2066      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].on('mouseout', '.cs-entry__thumbnail', function () {
2067        var id = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).contexObject(false, 'inner').attr('data-id');
2068
2069        if ('hover' === $this.getVideoType(id)) {
2070          $this.pauseVideo(id);
2071        }
2072      }); // Document scroll.
2073
2074      __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('load scroll resize scrollstop', function () {
2075        $this.constructVideoBackground();
2076      }); // Document ready.
2077
2078      __WEBPACK_IMPORTED_MODULE_0__utility__["c" /* $doc */].ready(function () {
2079        $this.constructVideoBackground();
2080      }); // Post load.
2081
2082      __WEBPACK_IMPORTED_MODULE_0__utility__["b" /* $body */].on('post-load', function () {
2083        $this.constructVideoBackground();
2084      }); // Document resize.
2085
2086      __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].on('resize', function () {
2087        $this.rescaleVideoBackground();
2088      }); // Init.
2089
2090      $this.constructVideoBackground();
2091    }
2092  };
2093})(); // Initialize.
2094
2095
2096cscoVideoBackground.init();
2097
2098/***/ }),
2099/* 16 */
2100/***/ (function(module, __webpack_exports__, __webpack_require__) {
2101
2102"use strict";
2103Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
2104/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
2105/** ----------------------------------------------------------------------------
2106 * Widget Nav Menu */
2107
2108
2109(function () {
2110  __WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */].fn.responsiveNav = function () {
2111    this.removeClass('menu-item-expanded');
2112
2113    if (this.prev().hasClass('submenu-visible')) {
2114      this.prev().removeClass('submenu-visible').slideUp(350);
2115      this.parent().removeClass('menu-item-expanded');
2116    } else {
2117      this.parent().parent().find('.menu-item .sub-menu').removeClass('submenu-visible').slideUp(350);
2118      this.parent().parent().find('.menu-item-expanded').removeClass('menu-item-expanded');
2119      this.prev().toggleClass('submenu-visible').hide().slideToggle(350);
2120      this.parent().toggleClass('menu-item-expanded');
2121    }
2122  }; //
2123  // Navigation Menu Widget
2124  //
2125
2126
2127  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(document).ready(function (e) {
2128    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.widget_nav_menu .menu-item-has-children').each(function (e) {
2129      // Add a caret.
2130      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).append('<span></span>'); // Fire responsiveNav() when clicking a caret.
2131
2132      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> span', this).on('click', function (e) {
2133        e.preventDefault();
2134        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).responsiveNav();
2135      }); // Fire responsiveNav() when clicking a parent item with # href attribute.
2136
2137      if ('#' === Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).attr('href')) {
2138        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('> a', this).on('click', function (e) {
2139          e.preventDefault();
2140          Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(this).next().next().responsiveNav();
2141        });
2142      }
2143    });
2144  });
2145})();
2146
2147/***/ }),
2148/* 17 */
2149/***/ (function(module, __webpack_exports__, __webpack_require__) {
2150
2151"use strict";
2152Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
2153/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utility__ = __webpack_require__(0);
2154/** Smart multi-Level menu */
2155
2156
2157(function () {
2158  var windowWidth = __WEBPACK_IMPORTED_MODULE_0__utility__["d" /* $window */].width();
2159  Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])('.cp-entry__tooltip-inner').each(function (index, el) {
2160    var offset = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset(),
2161        objOffset = offset.left,
2162        objPrevWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).outerWidth(),
2163        positionOffset = -1 * (objPrevWidth - (windowWidth - objOffset)),
2164        elTriangle = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).find('.cp-entry__tooltip-triangle');
2165
2166    if (windowWidth <= objOffset + objPrevWidth) {
2167      Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).css('left', positionOffset - 20);
2168      elTriangle.css('left', -positionOffset + 17);
2169
2170      if (windowWidth >= 1200) {
2171        elTriangle.css('left', -positionOffset + 41);
2172      }
2173    }
2174
2175    Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).resize(function () {
2176      var windowWidthResize = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(window).width(),
2177          offsetResize = Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).offset(),
2178          objOffsetResize = offsetResize.left,
2179          positionOffsetResize = -1 * (objPrevWidth - (windowWidthResize - objOffsetResize));
2180
2181      if (windowWidthResize <= objOffsetResize + objPrevWidth) {
2182        Object(__WEBPACK_IMPORTED_MODULE_0__utility__["a" /* $ */])(el).css('left', positionOffsetResize - 20);
2183        elTriangle.css('left', -positionOffsetResize + 17);
2184
2185        if (windowWidthResize >= 1200) {
2186          elTriangle.css('left', -positionOffsetResize + 41);
2187        }
2188      }
2189    });
2190  });
2191})();
2192
2193/***/ })
2194/******/ ]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.