PageSourceSearch

https://naseo.org/Data/skins/porto/js/theme.init.js

js naseo.org collected 2026-09-24 18:38:46 UTC 12,159 bytes, 346 lines download raw bytes

1// Commom Plugins
2(($ => {
3
4	'use strict';
5
6	// Scroll to Top Button.
7	if (typeof theme.PluginScrollToTop !== 'undefined') {
8		theme.PluginScrollToTop.initialize();
9	}
10
11	// Tooltips
12	var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
13	var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
14	  	return new bootstrap.Tooltip(tooltipTriggerEl)
15	});
16
17	// Popovers
18	var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
19	var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
20	  	return new bootstrap.Popover(popoverTriggerEl)
21	});
22
23	// Validations
24	if ( $.isFunction($.validator) && typeof theme.PluginValidation !== 'undefined') {
25		theme.PluginValidation.initialize();
26	}
27
28	// Animate
29	if ($.isFunction($.fn['themePluginAnimate']) && $('[data-appear-animation]').length) {
30		theme.fn.dynIntObsInit( '[data-appear-animation], [data-appear-animation-svg]', 'themePluginAnimate', theme.PluginAnimate.defaults );
31	}
32
33	// Animated Content
34	if ($.isFunction($.fn['themePluginAnimatedContent'])) {
35		theme.fn.intObsInit( '[data-plugin-animated-letters]:not(.manual), .animated-letters', 'themePluginAnimatedContent' );
36		theme.fn.intObsInit( '[data-plugin-animated-words]:not(.manual), .animated-words', 'themePluginAnimatedContent' );
37	}
38
39	// Before / After
40	if ($.isFunction($.fn['themePluginBeforeAfter']) && $('[data-plugin-before-after]').length) {
41		theme.fn.intObsInit( '[data-plugin-before-after]:not(.manual)', 'themePluginBeforeAfter' );
42	}
43
44	// Carousel Light
45	if ($.isFunction($.fn['themePluginCarouselLight']) && $('.owl-carousel-light').length) {
46		theme.fn.intObsInit( '.owl-carousel-light', 'themePluginCarouselLight' );
47	}
48
49	// Carousel
50	if ($.isFunction($.fn['themePluginCarousel']) && $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').length) {
51		theme.fn.intObsInit( '[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)', 'themePluginCarousel' );
52	}
53
54	// Chart.Circular
55	if ($.isFunction($.fn['themePluginChartCircular']) && ( $('[data-plugin-chart-circular]').length || $('.circular-bar-chart').length )) {
56		theme.fn.dynIntObsInit( '[data-plugin-chart-circular]:not(.manual), .circular-bar-chart:not(.manual)', 'themePluginChartCircular', theme.PluginChartCircular.defaults );
57	}
58
59	// Countdown
60	if ($.isFunction($.fn['themePluginCountdown']) && ( $('[data-plugin-countdown]').length || $('.countdown').length )) {
61		theme.fn.intObsInit( '[data-plugin-countdown]:not(.manual), .countdown', 'themePluginCountdown' );
62	}
63
64	// Counter
65	if ($.isFunction($.fn['themePluginCounter']) && ( $('[data-plugin-counter]').length || $('.counters [data-to]').length )) {
66		theme.fn.dynIntObsInit( '[data-plugin-counter]:not(.manual), .counters [data-to]', 'themePluginCounter', theme.PluginCounter.defaults );
67	}
68
69	// Cursor Effect
70	if ($.isFunction($.fn['themePluginCursorEffect']) && $('[data-plugin-cursor-effect]').length ) {
71		theme.fn.intObsInit( '[data-plugin-cursor-effect]:not(.manual)', 'themePluginCursorEffect' );
72	}
73
74	// Float Element
75	if ($.isFunction($.fn['themePluginFloatElement']) && $('[data-plugin-float-element]').length) {
76		theme.fn.intObsInit( '[data-plugin-float-element], [data-plugin-float-element-svg]', 'themePluginFloatElement' );
77	}
78
79	// GDPR
80	if ($.isFunction($.fn['themePluginGDPR']) && $('[data-plugin-gdpr]').length) {
81
82		$(() => {
83			$('[data-plugin-gdpr]:not(.manual)').each(function() {
84                const $this = $(this);
85                let opts;
86
87                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
88                if (pluginOptions)
89					opts = pluginOptions;
90
91                $this.themePluginGDPR(opts);
92            });
93		});
94
95	}
96
97	// GDPR Wrapper
98	if ($.isFunction($.fn['themePluginGDPRWrapper']) && $('[data-plugin-gdpr-wrapper]').length) {
99
100		$(() => {
101			$('[data-plugin-gdpr-wrapper]:not(.manual)').each(function() {
102                const $this = $(this);
103                let opts;
104
105                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
106                if (pluginOptions)
107					opts = pluginOptions;
108
109                $this.themePluginGDPRWrapper(opts);
110            });
111		});
112
113	}
114
115	// Hover Effect
116	if ($.isFunction($.fn['themePluginHoverEffect']) && $('[data-plugin-hover-effect], .hover-effect-3d').length) {
117		theme.fn.intObsInit( '[data-plugin-hover-effect]:not(.manual), .hover-effect-3d:not(.manual)', 'themePluginHoverEffect' );
118	}
119
120	// Animated Icon
121	if ($.isFunction($.fn['themePluginIcon']) && $('[data-icon]').length) {
122		theme.fn.dynIntObsInit( '[data-icon]:not(.svg-inline--fa)', 'themePluginIcon', theme.PluginIcon.defaults );
123	}
124
125	// In Viewport Style
126	if ($.isFunction($.fn['themePluginInViewportStyle']) && $('[data-inviewport-style]').length) {
127
128		$(() => {
129			$('[data-inviewport-style]:not(.manual)').each(function() {
130                const $this = $(this);
131                let opts;
132
133                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
134                if (pluginOptions)
135					opts = pluginOptions;
136
137                $this.themePluginInViewportStyle(opts);
138            });
139		});
140
141	}
142
143	// Lightbox
144	if ($.isFunction($.fn['themePluginLightbox']) && ( $('[data-plugin-lightbox]').length || $('.lightbox').length )) {
145		theme.fn.execOnceTroughEvent( '[data-plugin-lightbox]:not(.manual), .lightbox:not(.manual)', 'mouseover.trigger.lightbox', function(){
146            const $this = $(this);
147            let opts;
148
149            const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
150            if (pluginOptions)
151				opts = pluginOptions;
152
153            $this.themePluginLightbox(opts);
154        });
155	}
156
157	// Masonry
158	if ($.isFunction($.fn['themePluginMasonry']) && $('[data-plugin-masonry]').length) {
159
160		$(() => {
161			$('[data-plugin-masonry]:not(.manual)').each(function() {
162                const $this = $(this);
163                let opts;
164
165                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
166                if (pluginOptions)
167					opts = pluginOptions;
168
169                $this.themePluginMasonry(opts);
170            });
171		});
172
173	}
174
175	if ($('[data-masonry]').length) {
176		const $masonryItems = $('[data-masonry]');
177
178		$(window).on('load', () => {
179			setTimeout(() => {
180				$masonryItems.each(function() {
181					$(this).masonry('layout');
182				});
183			}, 1);
184		});
185	}
186
187
188	// Match Height
189	if ($.isFunction($.fn['themePluginMatchHeight']) && $('[data-plugin-match-height]').length) {
190
191		$(() => {
192			$('[data-plugin-match-height]:not(.manual)').each(function() {
193                const $this = $(this);
194                let opts;
195
196                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
197                if (pluginOptions)
198					opts = pluginOptions;
199
200                $this.themePluginMatchHeight(opts);
201            });
202		});
203
204	}
205
206	// Parallax
207	if ($.isFunction($.fn['themePluginParallax']) && $('[data-plugin-parallax]').length) {
208		theme.fn.intObsInit( '[data-plugin-parallax]:not(.manual)', 'themePluginParallax' );
209	}
210
211	// Progress Bar
212	if ($.isFunction($.fn['themePluginProgressBar']) && ( $('[data-plugin-progress-bar]') || $('[data-appear-progress-animation]').length )) {
213		theme.fn.dynIntObsInit( '[data-plugin-progress-bar]:not(.manual), [data-appear-progress-animation]', 'themePluginProgressBar', theme.PluginProgressBar.defaults );
214	}
215
216	// Random Images
217	if ($.isFunction($.fn['themePluginRandomImages']) && $('[data-plugin-random-images]').length) {
218		theme.fn.dynIntObsInit( '.plugin-random-images', 'themePluginRandomImages', theme.PluginRandomImages.defaults );
219	}
220
221	// Read More
222	if ($.isFunction($.fn['themePluginReadMore']) && $('[data-plugin-readmore]').length) {
223		theme.fn.intObsInit( '[data-plugin-readmore]:not(.manual)', 'themePluginReadMore' );
224	}
225
226	// Revolution Slider
227	if ($.isFunction($.fn['themePluginRevolutionSlider']) && ( $('[data-plugin-revolution-slider]').length || $('.slider-container .slider').length )) {
228
229		$(() => {
230			$('[data-plugin-revolution-slider]:not(.manual), .slider-container .slider:not(.manual)').each(function() {
231                const $this = $(this);
232                let opts;
233
234                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
235                if (pluginOptions)
236					opts = pluginOptions;
237
238                $this.themePluginRevolutionSlider(opts);
239            });
240		});
241
242	}
243
244	// Scroll Spy
245	if ($.isFunction($.fn['themePluginScrollSpy']) && $('[data-plugin-scroll-spy]').length) {
246
247		$(() => {
248			$('[data-plugin-scroll-spy]:not(.manual)').each(function() {
249                const $this = $(this);
250                let opts;
251
252                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
253                if (pluginOptions)
254					opts = pluginOptions;
255
256                $this.themePluginScrollSpy(opts);
257            });
258		});
259
260	}
261
262	// Scrollable
263	if ( $.isFunction($.fn[ 'nanoScroller' ]) && $('[data-plugin-scrollable]').length ) {
264		theme.fn.intObsInit( '[data-plugin-scrollable]', 'themePluginScrollable' );
265	}
266
267	// Section Scroll
268	if ($.isFunction($.fn['themePluginSectionScroll']) && $('[data-plugin-section-scroll]').length) {
269
270		$(() => {
271			$('[data-plugin-section-scroll]:not(.manual)').each(function() {
272                const $this = $(this);
273                let opts;
274
275                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
276                if (pluginOptions)
277					opts = pluginOptions;
278
279                $this.themePluginSectionScroll(opts);
280            });
281		});
282
283	}
284
285	// Sort
286	if ($.isFunction($.fn['themePluginSort']) && ( $('[data-plugin-sort]').length || $('.sort-source').length )) {
287		theme.fn.intObsInit( '[data-plugin-sort]:not(.manual), .sort-source:not(.manual)', 'themePluginSort' );
288	}
289
290	// Star Rating
291	if ($.isFunction($.fn['themePluginStarRating']) && $('[data-plugin-star-rating]').length) {
292		theme.fn.intObsInit( '[data-plugin-star-rating]:not(.manual)', 'themePluginStarRating' );
293	}
294
295	// Sticky
296	if ($.isFunction($.fn['themePluginSticky']) && $('[data-plugin-sticky]').length) {
297		theme.fn.execOnceTroughWindowEvent( window, 'scroll.trigger.sticky', () => {
298			$('[data-plugin-sticky]:not(.manual)').each(function() {
299                const $this = $(this);
300                let opts;
301
302                const pluginOptions = theme.fn.getOptions($this.data('plugin-options'));
303                if (pluginOptions)
304					opts = pluginOptions;
305
306                $this.themePluginSticky(opts);
307            });
308		});
309	}
310
311	// Toggle
312	if ($.isFunction($.fn['themePluginToggle']) && $('[data-plugin-toggle]').length) {
313		theme.fn.intObsInit( '[data-plugin-toggle]:not(.manual)', 'themePluginToggle' );
314	}
315
316	// Video Background
317	if ($.isFunction($.fn['themePluginVideoBackground']) && $('[data-plugin-video-background]').length) {
318		theme.fn.intObsInit( '[data-plugin-video-background]:not(.manual)', 'themePluginVideoBackground' );
319	}
320
321	// Sticky Header
322	if (typeof theme.StickyHeader !== 'undefined') {
323		theme.StickyHeader.initialize();
324	}
325
326	// Nav Menu
327	if (typeof theme.Nav !== 'undefined') {
328		theme.Nav.initialize();
329	}
330
331	// Search
332	if (typeof theme.Search !== 'undefined' && ( $('#searchForm').length || $('.header-nav-features-search-reveal').length )) {
333		theme.Search.initialize();
334	}
335
336	// Newsletter
337	if (typeof theme.Newsletter !== 'undefined' && $('#newsletterForm').length) {
338		theme.fn.intObs( '#newsletterForm', 'theme.Newsletter.initialize();', {} );
339	}
340
341	// Account
342	if (typeof theme.Account !== 'undefined' && ( $('#headerAccount').length || $('#headerSignUp').length || $('#headerSignIn').length || $('#headerRecover').length || $('#headerRecoverCancel').length )) {
343		theme.Account.initialize();
344	}
345
346})).apply( this, [ jQuery ]);

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.