{"version":3,"file":"custom.min.js","names":["$","Timeline","init","options","elem","self","this","$elem","dom","wrapClass","attr","split","join","dotsItem","extend","fn","data","initials","autoPlayTimer","direction","startItem","create_timeline","build_out","build_dots","watch_events","get_count","itemClass","length","get_current","get_next","get_prev","document","body","on","e","clickItem","index","autoplay_clear","change_slide","autoplay_init","pauseOnHover","content_pause","pauseOnDotsHover","autoplay","setInterval","autoplaySpeed","type","currentItem","dotsClass","clearInterval","itemIndex","change_timeline","move_slide","itemSize","totalHeight","currentWrapper","height","outerHeight","width","outerWidth","getTranslate","css","transform","timelime_calculations","mode","move_dots","listSize","listWrapper","dotsWrapper","totalSize","dots_calculations","dots_position","dotsWrap","dotsPosition","addClass","children","wrapAll","parent","wrap","eq","activeClass","update_ui","dot","itemDate","i","append","customPaging","call","$dots","appendTo","timelineItem","timelineDot","removeClass","prevClass","nextClass","animate_images","setTimeout","not","find","hide","fadeIn","each","timeline","Object","create","slider","date","text","jQuery","window","animatePrefix","animateClass","AOS","disable","startEvent","animatedClassName","useClassNames","initClassName","disableMutationObserver","debounceDelay","throttleDelay","offset","delay","duration","easing","once","mirror","anchorPlacement"],"sources":["custom.js"],"sourcesContent":["(function ($) {\r\n Timeline = {\r\n init: function (options, elem) {\r\n var self = this;\r\n\r\n self.$elem = $(elem);\r\n self.dom = $(\"body\");\r\n self.wrapClass = \".\" + self.$elem.attr(\"class\").split(\" \").join(\".\");\r\n self.dotsItem = self.wrapClass + \" .timeline-dots li\";\r\n self.options = $.extend({}, $.fn.Timeline.options, self.$elem.data(), options);\r\n\r\n self.initials = {\r\n autoPlayTimer: null,\r\n direction: self.options.startItem !== \"last\" ? 0 : 1,\r\n };\r\n\r\n self.create_timeline();\r\n },\r\n\r\n // Load Timeline\r\n // ----------------------------------------------------------------\r\n create_timeline: function () {\r\n var self = this;\r\n\r\n self.build_out();\r\n self.build_dots();\r\n self.watch_events();\r\n },\r\n\r\n // Get Total Items\r\n // ----------------------------------------------------------------\r\n get_count: function () {\r\n var self = this;\r\n\r\n var total = $(\".\" + self.options.itemClass, self.$elem).length;\r\n return total;\r\n },\r\n\r\n // Get Current Item Index\r\n // ----------------------------------------------------------------\r\n get_current: function () {\r\n var self = this;\r\n var nextItem;\r\n\r\n if (self.options.startItem === \"first\") {\r\n nextItem = 0;\r\n } else if (self.options.startItem === \"last\") {\r\n nextItem = self.get_count() - 1;\r\n } else {\r\n nextItem = self.options.startItem;\r\n }\r\n\r\n return nextItem;\r\n },\r\n\r\n // Get Next Item Index\r\n // ----------------------------------------------------------------\r\n get_next: function () {\r\n var self = this;\r\n return self.get_current() + 1;\r\n },\r\n\r\n // Get Prev Item Index\r\n // ----------------------------------------------------------------\r\n get_prev: function () {\r\n var self = this;\r\n return self.get_current() - 1;\r\n },\r\n\r\n // Watch Timeline Events\r\n // ----------------------------------------------------------------\r\n watch_events: function () {\r\n var self = this;\r\n\r\n // Dots Click\r\n $(document.body).on(\"click\", self.dotsItem, function (e) {\r\n var clickItem = $(this).index();\r\n\r\n self.autoplay_clear();\r\n self.change_slide(\"click\", clickItem);\r\n });\r\n\r\n // Autoplay Start\r\n self.autoplay_init();\r\n\r\n // Content Autoplay Pause\r\n if (self.options.pauseOnHover) {\r\n self.content_pause(\"item\");\r\n }\r\n\r\n // Dots Autoplay Pause\r\n if (self.options.pauseOnDotsHover) {\r\n self.content_pause(\"dots\");\r\n }\r\n },\r\n\r\n // Autoplay\r\n // ----------------------------------------------------------------\r\n autoplay: function () {\r\n var self = this;\r\n self.autoplay_clear();\r\n\r\n self.initials.autoPlayTimer = setInterval(function () {\r\n self.change_slide();\r\n }, self.options.autoplaySpeed);\r\n },\r\n\r\n // Autoplay Start\r\n // ----------------------------------------------------------------\r\n autoplay_init: function () {\r\n var self = this;\r\n\r\n if (self.options.autoplay) {\r\n self.autoplay();\r\n }\r\n },\r\n\r\n // Content Slide Pause\r\n // ----------------------------------------------------------------\r\n content_pause: function (type) {\r\n var self = this;\r\n var currentItem;\r\n\r\n if (type === \"dots\") {\r\n currentItem = self.wrapClass + \" .\" + self.options.dotsClass;\r\n } else {\r\n currentItem = self.wrapClass + \" .\" + self.options.itemClass;\r\n }\r\n\r\n $(document.body).on(\"mouseenter\", currentItem, function (e) {\r\n self.autoplay_clear();\r\n });\r\n\r\n $(document.body).on(\"mouseleave\", currentItem, function (e) {\r\n self.autoplay_init();\r\n });\r\n },\r\n\r\n // Autoplay Clear\r\n // ----------------------------------------------------------------\r\n autoplay_clear: function () {\r\n var self = this;\r\n\r\n if (self.initials.autoPlayTimer) {\r\n clearInterval(self.initials.autoPlayTimer);\r\n }\r\n },\r\n\r\n // Change Slide (default, reverse, click);\r\n // ----------------------------------------------------------------\r\n change_slide: function (type, itemIndex) {\r\n var self = this;\r\n if (!type) type = \"load\";\r\n\r\n if (type === \"click\") {\r\n self.options.startItem = itemIndex;\r\n self.autoplay_init();\r\n } else {\r\n if (self.get_count() - 1 > self.get_current() && self.initials.direction === 0) {\r\n self.options.startItem = self.get_next();\r\n } else if (self.get_current() > 0 && self.initials.direction === 1) {\r\n self.options.startItem = self.get_next();\r\n } else {\r\n self.autoplay_clear();\r\n }\r\n }\r\n\r\n self.change_timeline();\r\n },\r\n\r\n // Move Slide Action\r\n // ----------------------------------------------------------------\r\n move_slide: function (type) {\r\n var self = this;\r\n var itemSize, totalHeight;\r\n\r\n var currentWrapper = $(self.wrapClass + \" .timeline-list-wrap\");\r\n var currentItem = $(self.wrapClass + \" .\" + self.options.itemClass);\r\n\r\n if (type === \"vertical\") {\r\n itemSize = $(self.wrapClass + \" .timeline-list\").height();\r\n totalHeight = currentItem.outerHeight() * self.get_count();\r\n currentWrapper.height(totalHeight);\r\n } else {\r\n itemSize = $(self.wrapClass + \" .timeline-list\").width();\r\n totalHeight = currentItem.outerWidth() * self.get_count();\r\n currentWrapper.width(totalHeight);\r\n }\r\n\r\n var getTranslate = -(itemSize * self.get_current());\r\n\r\n if (type === \"vertical\") {\r\n currentWrapper.css({ transform: \"translate3d(0px,\" + getTranslate + \"px, 0px)\" });\r\n } else {\r\n currentWrapper.css({ transform: \"translate3d(\" + getTranslate + \"px, 0px, 0px)\" });\r\n }\r\n },\r\n\r\n // Make Timeline Calculations\r\n // ----------------------------------------------------------------\r\n timelime_calculations: function () {\r\n var self = this;\r\n\r\n if (self.options.mode === \"vertical\") {\r\n self.move_slide(\"vertical\");\r\n } else {\r\n self.move_slide(\"horizontal\");\r\n }\r\n },\r\n\r\n // Move Dots Action\r\n // ----------------------------------------------------------------\r\n move_dots: function (type) {\r\n var self = this;\r\n\r\n var itemSize, listSize;\r\n\r\n var listWrapper = $(self.wrapClass + \" .timeline-list\");\r\n var currentItem = $(self.wrapClass + \" .timeline-dots li\");\r\n var dotsWrapper = $(self.wrapClass + \" .timeline-dots\");\r\n\r\n if (type === \"vertical\") {\r\n itemSize = currentItem.outerHeight(true);\r\n listSize = listWrapper.height();\r\n } else {\r\n itemSize = currentItem.outerWidth(true);\r\n listSize = listWrapper.width();\r\n }\r\n\r\n var getTranslate = -(itemSize * self.get_current()) - (-listSize) / 2;\t \r\n var totalSize = itemSize * self.get_count();\r\n\r\n if (type === \"vertical\") {\r\n dotsWrapper.height(totalSize);\r\n dotsWrapper.css({ transform: \"translate3d(0px,\" + getTranslate + \"px, 0px)\" });\r\n } else {\r\n dotsWrapper.width(totalSize);\r\n dotsWrapper.css({ transform: \"translate3d(\" + getTranslate + \"px, 0px, 0px)\" });\r\n }\r\n },\r\n\r\n // Make Timeline Dots Calculations\r\n // ----------------------------------------------------------------\r\n dots_calculations: function () {\r\n var self = this;\r\n\r\n if (self.options.mode === \"vertical\") {\r\n self.move_dots(\"vertical\");\r\n } else {\r\n self.move_dots(\"horizontal\");\r\n }\r\n\r\n self.dots_position();\r\n },\r\n\r\n // Dots Position\r\n // ----------------------------------------------------------------\r\n dots_position: function () {\r\n var self = this;\r\n var dotsWrap = $(self.wrapClass + \" .timeline-dots-wrap\");\r\n\r\n if (self.options.mode === \"vertical\") {\r\n if (self.options.dotsPosition === \"right\") {\r\n dotsWrap.addClass(\"right\");\r\n } else {\r\n dotsWrap.addClass(\"left\");\r\n }\r\n } else {\r\n if (self.options.dotsPosition === \"top\") {\r\n dotsWrap.addClass(\"top\");\r\n } else {\r\n dotsWrap.addClass(\"bottom\");\r\n }\r\n }\r\n },\r\n\r\n // Build Timeline Dom\r\n // ----------------------------------------------------------------\r\n build_out: function () {\r\n var self = this;\r\n\r\n self.$elem.addClass(\"timeline-\" + self.options.mode + \"\").addClass(\"timeline-initialized\");\r\n self.$elem.children().addClass(self.options.itemClass);\r\n self.$elem.children().wrapAll('