PageSourceSearch

https://www.gepal.eu/wp-content/plugins/cookie-law-info/legacy/public/js/cookie-law-info-public.js?ver=3.5.6

js gepal.eu collected 2026-09-24 15:00:22 UTC 34,121 bytes, 1,168 lines download raw bytes

1var CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
2var CLI_PREFERENCE_COOKIE = (typeof CLI_PREFERENCE_COOKIE !== 'undefined' ? CLI_PREFERENCE_COOKIE : 'CookieLawInfoConsent');
3var CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
4var CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
5var CLI_Cookie = {
6	set: function (name, value, days) {
7		var secure = "";
8		if (true === Boolean(Cli_Data.secure_cookies)) {
9			secure = ";secure";
10		}
11		if (days) {
12			var date = new Date();
13			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
14			var expires = "; expires=" + date.toGMTString();
15		} else {
16			var expires = "";
17		}
18		document.cookie = name + "=" + value + secure + expires + "; path=/";
19		if (days < 1) {
20			let host_name = window.location.hostname;
21			document.cookie = name + "=" + value + expires + "; path=/; domain=." + host_name + ";";
22			if (host_name.indexOf("www") != 1) {
23				var host_name_withoutwww = host_name.replace('www', '');
24				document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name_withoutwww + ";";
25			}
26			host_name = host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".") - 1));
27			document.cookie = name + "=" + value + secure + expires + "; path=/; domain=" + host_name + ";";
28		}
29	},
30	read: function (name) {
31		var nameEQ = name + "=";
32		var ca = document.cookie.split(';');
33		for (var i = 0; i < ca.length; i++) {
34			var c = ca[i];
35			while (c.charAt(0) == ' ') {
36				c = c.substring(1, c.length);
37			}
38			if (c.indexOf(nameEQ) === 0) {
39				return c.substring(nameEQ.length, c.length);
40			}
41		}
42		return null;
43	},
44	erase: function (name) {
45		this.set(name, "", -10);
46	},
47	exists: function (name) {
48		return (this.read(name) !== null);
49	},
50	getallcookies: function () {
51		var pairs = document.cookie.split(";");
52		var cookieslist = {};
53		for (var i = 0; i < pairs.length; i++) {
54			var pair = pairs[i].split("=");
55			cookieslist[(pair[0] + '').trim()] = unescape(pair[1]);
56		}
57		return cookieslist;
58	}
59}
60var CLI =
61{
62	bar_config: {},
63	showagain_config: {},
64	allowedCategories: [],
65	js_blocking_enabled: false,
66	set: function (args) {
67		if (typeof JSON.parse !== "function") {
68			console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it");
69			return;
70		}
71		if (typeof args.settings !== 'object') {
72			this.settings = JSON.parse(args.settings);
73		} else {
74			this.settings = args.settings;
75		}
76		this.js_blocking_enabled = Boolean(Cli_Data.js_blocking);
77		this.settings = args.settings;
78		this.bar_elm = jQuery(this.settings.notify_div_id);
79		this.showagain_elm = jQuery(this.settings.showagain_div_id);
80		this.settingsModal = jQuery('#cliSettingsPopup');
81
82		/* buttons */
83		this.main_button = jQuery('.cli-plugin-main-button');
84		this.main_link = jQuery('.cli-plugin-main-link');
85		this.reject_link = jQuery('.cookie_action_close_header_reject');
86		this.delete_link = jQuery(".cookielawinfo-cookie-delete");
87		this.settings_button = jQuery('.cli_settings_button');
88		this.accept_all_button = jQuery('.wt-cli-accept-all-btn');
89		if (this.settings.cookie_bar_as == 'popup') {
90			CLI_COOKIEBAR_AS_POPUP = true;
91		}
92		this.mayBeSetPreferenceCookie();
93		this.addStyleAttribute();
94		this.configBar();
95		this.toggleBar();
96		this.attachDelete();
97		this.attachEvents();
98		this.configButtons();
99		this.reviewConsent();
100		var cli_hidebar_on_readmore = this.hideBarInReadMoreLink();
101		if (Boolean(this.settings.scroll_close) === true && cli_hidebar_on_readmore === false) {
102			window.addEventListener("scroll", CLI.closeOnScroll, false);
103		}
104
105	},
106	hideBarInReadMoreLink: function () {
107		if (Boolean(CLI.settings.button_2_hidebar) === true && this.main_link.length > 0 && this.main_link.hasClass('cli-minimize-bar')) {
108			this.hideHeader();
109			cliBlocker.cookieBar(false);
110			this.showagain_elm.slideDown(this.settings.animate_speed_show);
111			return true;
112		}
113		return false;
114	},
115	attachEvents: function () {
116		jQuery(document).on(
117			'click',
118			'.wt-cli-privacy-btn',
119			function (e) {
120				e.preventDefault();
121				CLI.accept_close();
122				CLI.settingsPopUpClose();
123			}
124		);
125
126		jQuery('.wt-cli-accept-btn').on(
127			"click",
128			function (e) {
129				e.preventDefault();
130				CLI.acceptRejectCookies(jQuery(this));
131			});
132		jQuery('.wt-cli-accept-all-btn').on(
133			"click",
134			function (e) {
135				e.preventDefault();
136				CLI.acceptRejectCookies(jQuery(this), 'accept');
137			});
138		jQuery('.wt-cli-reject-btn').on(
139			"click",
140			function (e) {
141				e.preventDefault();
142				CLI.acceptRejectCookies(jQuery(this), 'reject');
143			});
144		this.settingsPopUp();
145		this.settingsTabbedAccordion();
146		this.toggleUserPreferenceCheckBox();
147		this.hideCookieBarOnClose();
148		this.cookieLawInfoRunCallBacks();
149
150	},
151	acceptRejectCookies(element, action = 'custom') {
152		var open_link = element[0].hasAttribute("href") && element.attr("href") != '#' ? true : false;
153		var new_window = false;
154		if (action == 'accept') {
155			this.enableAllCookies();
156			this.accept_close();
157			new_window = CLI.settings.button_7_new_win ? true : false;
158
159		} else if (action == 'reject') {
160			this.disableAllCookies();
161			this.reject_close();
162			new_window = Boolean(this.settings.button_3_new_win) ? true : false;
163		} else {
164			this.accept_close();
165			new_window = Boolean(this.settings.button_1_new_win) ? true : false;
166		}
167		if (open_link) {
168			if (new_window) {
169				window.open(element.attr("href"), '_blank');
170			} else {
171				window.location.href = element.attr("href");
172			}
173		}
174	},
175	toggleUserPreferenceCheckBox: function () {
176
177		jQuery('.cli-user-preference-checkbox').each(
178			function () {
179
180				const categoryCookie = 'cookielawinfo-' + jQuery(this).attr('data-id');
181				const categoryCookieValue = CLI_Cookie.read(categoryCookie);
182				if (categoryCookieValue == null) {
183					if (jQuery(this).is(':checked')) {
184						CLI_Cookie.set(categoryCookie, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
185					} else {
186						CLI_Cookie.set(categoryCookie, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
187					}
188				} else {
189					if (categoryCookieValue == "yes") {
190						jQuery(this).prop("checked", true);
191					} else {
192						jQuery(this).prop("checked", false);
193					}
194
195				}
196
197			}
198		);
199		jQuery('.cli-user-preference-checkbox').on(
200			"click",
201			function (e) {
202				var dataID = jQuery(this).attr('data-id');
203				var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id=' + dataID + ']');
204				if (jQuery(this).is(':checked')) {
205					CLI_Cookie.set('cookielawinfo-' + dataID, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
206					currentToggleElm.prop('checked', true);
207				} else {
208					CLI_Cookie.set('cookielawinfo-' + dataID, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
209					currentToggleElm.prop('checked', false);
210				}
211				CLI.checkCategories();
212				CLI.generateConsent();
213			}
214		);
215
216	},
217	settingsPopUp: function () {
218		jQuery(document).on(
219			'click',
220			'.cli_settings_button',
221			function (e) {
222				e.preventDefault();
223				CLI.settingsModal.addClass("cli-show").css({ 'opacity': 0 }).animate({ 'opacity': 1 });
224				CLI.settingsModal.removeClass('cli-blowup cli-out').addClass("cli-blowup");
225				jQuery('body').addClass("cli-modal-open");
226				jQuery(".cli-settings-overlay").addClass("cli-show");
227				jQuery("#cookie-law-info-bar").css({ 'opacity': .1 });
228				if (!jQuery('.cli-settings-mobile').is(':visible')) {
229					CLI.settingsModal.find('.cli-nav-link:eq(0)').trigger("click");
230				}
231			}
232		);
233		jQuery('#cliModalClose').on(
234			"click",
235			function (e) {
236				CLI.settingsPopUpClose();
237			}
238		);
239		CLI.settingsModal.on(
240			"click",
241			function (e) {
242				if (!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) {
243					CLI.settingsPopUpClose();
244				}
245			}
246		);
247		jQuery('.cli_enable_all_btn').on(
248			"click",
249			function (e) {
250				var cli_toggle_btn = jQuery(this);
251				var enable_text = cli_toggle_btn.attr('data-enable-text');
252				var disable_text = cli_toggle_btn.attr('data-disable-text');
253				if (cli_toggle_btn.hasClass('cli-enabled')) {
254					CLI.disableAllCookies();
255					cli_toggle_btn.html(enable_text);
256				} else {
257					CLI.enableAllCookies();
258					cli_toggle_btn.html(disable_text);
259
260				}
261				jQuery(this).toggleClass('cli-enabled');
262			}
263		);
264
265		this.privacyReadmore();
266	},
267	settingsTabbedAccordion: function () {
268		jQuery(".cli-tab-header").on(
269			"click",
270			function (e) {
271				if (!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) {
272					if (jQuery(this).hasClass("cli-tab-active")) {
273						jQuery(this).removeClass("cli-tab-active");
274						jQuery(this)
275							.siblings(".cli-tab-content")
276							.slideUp(200);
277
278					} else {
279						jQuery(".cli-tab-header").removeClass("cli-tab-active");
280						jQuery(this).addClass("cli-tab-active");
281						jQuery(".cli-tab-content").slideUp(200);
282						jQuery(this)
283							.siblings(".cli-tab-content")
284							.slideDown(200);
285					}
286				}
287			}
288		);
289	},
290	settingsPopUpClose: function () {
291		this.settingsModal.removeClass('cli-show');
292		this.settingsModal.addClass('cli-out');
293		jQuery('body').removeClass("cli-modal-open");
294		jQuery(".cli-settings-overlay").removeClass("cli-show");
295		jQuery("#cookie-law-info-bar").css({ 'opacity': 1 });
296	},
297	privacyReadmore: function () {
298		var el = jQuery('.cli-privacy-content .cli-privacy-content-text');
299		if (el.length > 0) {
300			var clone = el.clone(),
301				originalHtml = clone.html(),
302				originalHeight = el.outerHeight(),
303				Trunc = {
304					addReadmore: function (textBlock) {
305						if (textBlock.html().length > 250) {
306							jQuery('.cli-privacy-readmore').show();
307						} else {
308							jQuery('.cli-privacy-readmore').hide();
309						}
310					},
311					truncateText: function (textBlock) {
312						var strippedText = jQuery('<div />').html(textBlock.html());
313						strippedText.find('table').remove();
314						textBlock.html(strippedText.html());
315						const currentText = textBlock.text();
316						if (currentText.trim().length > 250) {
317							var newStr = currentText.substring(0, 250);
318							textBlock.empty().html(newStr).append('...');
319						}
320					},
321					replaceText: function (textBlock, original) {
322						return textBlock.html(original);
323					}
324
325				};
326			Trunc.addReadmore(el);
327			Trunc.truncateText(el);
328			jQuery('a.cli-privacy-readmore').on(
329				"click",
330				function (e) {
331					e.preventDefault();
332					if (jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) {
333						Trunc.truncateText(el);
334						jQuery('.cli-privacy-overview').removeClass('cli-collapsed');
335						el.css('height', '100%');
336					} else {
337						jQuery('.cli-privacy-overview').addClass('cli-collapsed');
338						Trunc.replaceText(el, originalHtml);
339					}
340
341				}
342			);
343		}
344
345	},
346	attachDelete: function () {
347		this.delete_link.on(
348			"click",
349			function (e) {
350				CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
351				for (var k in Cli_Data.nn_cookie_ids) {
352					CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
353				}
354				CLI.generateConsent();
355				return false;
356			}
357		);
358
359	},
360	configButtons: function () {
361		/*[cookie_button] */
362		this.main_button.css('color', this.settings.button_1_link_colour);
363		if (Boolean(this.settings.button_1_as_button)) {
364			this.main_button.css('background-color', this.settings.button_1_button_colour);
365
366			this.main_button.on(
367				'mouseenter',
368				function () {
369					jQuery(this).css('background-color', CLI.settings.button_1_button_hover);
370				}
371			)
372				.on(
373					'mouseleave',
374					function () {
375						jQuery(this).css('background-color', CLI.settings.button_1_button_colour);
376					}
377				);
378		}
379
380		/* [cookie_link] */
381		this.main_link.css('color', this.settings.button_2_link_colour);
382		if (Boolean(this.settings.button_2_as_button)) {
383			this.main_link.css('background-color', this.settings.button_2_button_colour);
384
385			this.main_link.on(
386				'mouseenter',
387				function () {
388					jQuery(this).css('background-color', CLI.settings.button_2_button_hover);
389				}
390			)
391				.on(
392					'mouseleave',
393					function () {
394						jQuery(this).css('background-color', CLI.settings.button_2_button_colour);
395					}
396				);
397
398		}
399		/* [cookie_reject] */
400		this.reject_link.css('color', this.settings.button_3_link_colour);
401		if (Boolean(this.settings.button_3_as_button)) {
402
403			this.reject_link.css('background-color', this.settings.button_3_button_colour);
404			this.reject_link.on(
405				'mouseenter',
406				function () {
407					jQuery(this).css('background-color', CLI.settings.button_3_button_hover);
408				}
409			)
410				.on(
411					'mouseleave',
412					function () {
413						jQuery(this).css('background-color', CLI.settings.button_3_button_colour);
414					}
415				);
416		}
417		/* [cookie_settings] */
418		this.settings_button.css('color', this.settings.button_4_link_colour);
419		if (Boolean(this.settings.button_4_as_button)) {
420			this.settings_button.css('background-color', this.settings.button_4_button_colour);
421			this.settings_button.on(
422				'mouseenter',
423				function () {
424					jQuery(this).css('background-color', CLI.settings.button_4_button_hover);
425				}
426			)
427				.on(
428					'mouseleave',
429					function () {
430						jQuery(this).css('background-color', CLI.settings.button_4_button_colour);
431					}
432				);
433		}
434		/* [cookie_accept_all] */
435		this.accept_all_button.css('color', this.settings.button_7_link_colour);
436		if (this.settings.button_7_as_button) {
437			this.accept_all_button.css('background-color', this.settings.button_7_button_colour);
438			this.accept_all_button.on(
439				'mouseenter',
440				function () {
441					jQuery(this).css('background-color', CLI.settings.button_7_button_hover);
442				}
443			)
444				.on(
445					'mouseleave',
446					function () {
447						jQuery(this).css('background-color', CLI.settings.button_7_button_colour);
448					}
449				);
450		}
451	},
452	toggleBar: function () {
453		if (CLI_COOKIEBAR_AS_POPUP) {
454			this.barAsPopUp(1);
455		}
456		if (CLI.settings.cookie_bar_as == 'widget') {
457			this.barAsWidget(1);
458		}
459		if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
460			this.displayHeader();
461		} else {
462			this.hideHeader();
463		}
464		if (Boolean(this.settings.show_once_yn)) {
465			setTimeout(
466				function () {
467					CLI.close_header();
468				},
469				CLI.settings.show_once
470			);
471		}
472		if (CLI.js_blocking_enabled === false) {
473			if (Boolean(Cli_Data.ccpaEnabled) === true) {
474				if (Cli_Data.ccpaType === 'ccpa' && Boolean(Cli_Data.ccpaBarEnabled) === false) {
475					cliBlocker.cookieBar(false);
476				}
477			} else {
478				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
479			}
480		}
481
482		this.showagain_elm.on(
483			"click",
484			function (e) {
485				e.preventDefault();
486				CLI.showagain_elm.slideUp(
487					CLI.settings.animate_speed_hide,
488					function () {
489						CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
490						if (CLI_COOKIEBAR_AS_POPUP) {
491							CLI.showPopupOverlay();
492						}
493					}
494				);
495			}
496		);
497	},
498	configShowAgain: function () {
499		this.showagain_config = {
500			'background-color': this.settings.background,
501			'color': this.l1hs(this.settings.text),
502			'position': 'fixed',
503			'font-family': this.settings.font_family
504		};
505		if (Boolean(this.settings.border_on)) {
506			var border_to_hide = 'border-' + this.settings.notify_position_vertical;
507			this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
508			this.showagain_config[border_to_hide] = 'none';
509		}
510		var cli_win = jQuery(window);
511		var cli_winw = cli_win.width();
512		var showagain_x_pos = this.settings.showagain_x_position;
513		if (cli_winw < 300) {
514			showagain_x_pos = 10;
515			this.showagain_config.width = cli_winw - 20;
516		} else {
517			this.showagain_config.width = 'auto';
518		}
519		var cli_defw = cli_winw > 400 ? 500 : cli_winw - 20;
520		if (CLI_COOKIEBAR_AS_POPUP) { /* cookie bar as popup */
521			var sa_pos = this.settings.popup_showagain_position;
522			var sa_pos_arr = sa_pos.split('-');
523			if (sa_pos_arr[1] == 'left') {
524				this.showagain_config.left = showagain_x_pos;
525			} else if (sa_pos_arr[1] == 'right') {
526				this.showagain_config.right = showagain_x_pos;
527			}
528			if (sa_pos_arr[0] == 'top') {
529				this.showagain_config.top = 0;
530
531			} else if (sa_pos_arr[0] == 'bottom') {
532				this.showagain_config.bottom = 0;
533			}
534			this.bar_config['position'] = 'fixed';
535
536		} else if (this.settings.cookie_bar_as == 'widget') {
537			this.showagain_config.bottom = 0;
538			if (this.settings.widget_position == 'left') {
539				this.showagain_config.left = showagain_x_pos;
540			} else if (this.settings.widget_position == 'right') {
541				this.showagain_config.right = showagain_x_pos;
542			}
543		} else {
544			if (this.settings.notify_position_vertical == "top") {
545				this.showagain_config.top = '0';
546			} else if (this.settings.notify_position_vertical == "bottom") {
547				this.bar_config['position'] = 'fixed';
548				this.bar_config['bottom'] = '0';
549				this.showagain_config.bottom = '0';
550			}
551			if (this.settings.notify_position_horizontal == "left") {
552				this.showagain_config.left = showagain_x_pos;
553			} else if (this.settings.notify_position_horizontal == "right") {
554				this.showagain_config.right = showagain_x_pos;
555			}
556		}
557		this.showagain_elm.css(this.showagain_config);
558	},
559	configBar: function () {
560		this.bar_config = {
561			'background-color': this.settings.background,
562			'color': this.settings.text,
563			'font-family': this.settings.font_family
564		};
565		if (this.settings.notify_position_vertical == "top") {
566			this.bar_config['top'] = '0';
567			if (Boolean(this.settings.header_fix) === true) {
568				this.bar_config['position'] = 'fixed';
569			}
570		} else {
571			this.bar_config['bottom'] = '0';
572		}
573		this.configShowAgain();
574		this.bar_elm.css(this.bar_config).hide();
575	},
576	l1hs: function (str) {
577		if (str.charAt(0) == "#") {
578			str = str.substring(1, str.length);
579		} else {
580			return "#" + str;
581		}
582		return this.l1hs(str);
583	},
584	close_header: function () {
585		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
586		this.hideHeader();
587	},
588	accept_close: function () {
589		this.hidePopupOverlay();
590		this.generateConsent();
591		this.cookieLawInfoRunCallBacks();
592
593		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
594		if (Boolean(this.settings.notify_animate_hide)) {
595			if (CLI.js_blocking_enabled === true) {
596				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
597			} else {
598				this.bar_elm.slideUp(this.settings.animate_speed_hide);
599			}
600
601		} else {
602			if (CLI.js_blocking_enabled === true) {
603				this.bar_elm.hide(0, cliBlocker.runScripts);
604
605			} else {
606				this.bar_elm.hide();
607			}
608		}
609		if (Boolean(this.settings.showagain_tab)) {
610			this.showagain_elm.slideDown(this.settings.animate_speed_show);
611		}
612		if (Boolean(this.settings.accept_close_reload) === true) {
613			this.reload_current_page();
614		}
615		return false;
616	},
617	reject_close: function () {
618		this.hidePopupOverlay();
619		this.generateConsent();
620		this.cookieLawInfoRunCallBacks();
621		for (var k in Cli_Data.nn_cookie_ids) {
622			CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
623		}
624		CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
625
626		if (Boolean(this.settings.notify_animate_hide)) {
627			if (CLI.js_blocking_enabled === true) {
628
629				this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
630
631			} else {
632
633				this.bar_elm.slideUp(this.settings.animate_speed_hide);
634			}
635
636		} else {
637			if (CLI.js_blocking_enabled === true) {
638
639				this.bar_elm.hide(cliBlocker.runScripts);
640
641			} else {
642
643				this.bar_elm.hide();
644
645			}
646
647		}
648		if (Boolean(this.settings.showagain_tab)) {
649			this.showagain_elm.slideDown(this.settings.animate_speed_show);
650		}
651		if (Boolean(this.settings.reject_close_reload) === true) {
652			this.reload_current_page();
653		}
654		return false;
655	},
656	reload_current_page: function () {
657
658		window.location.reload(true);
659	},
660	closeOnScroll: function () {
661		if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
662			CLI.accept_close();
663			if (Boolean(CLI.settings.scroll_close_reload) === true) {
664				window.location.reload();
665			}
666			window.removeEventListener("scroll", CLI.closeOnScroll, false);
667		}
668	},
669	displayHeader: function () {
670		if (Boolean(this.settings.notify_animate_show)) {
671			this.bar_elm.slideDown(this.settings.animate_speed_show);
672		} else {
673			this.bar_elm.show();
674		}
675		this.showagain_elm.hide();
676		if (CLI_COOKIEBAR_AS_POPUP) {
677			this.showPopupOverlay();
678		}
679	},
680	hideHeader: function () {
681		if (Boolean(this.settings.showagain_tab)) {
682			if (Boolean(this.settings.notify_animate_show)) {
683				this.showagain_elm.slideDown(this.settings.animate_speed_show);
684			} else {
685				this.showagain_elm.show();
686			}
687		} else {
688			this.showagain_elm.hide();
689		}
690		this.bar_elm.slideUp(this.settings.animate_speed_show);
691		this.hidePopupOverlay();
692	},
693	hidePopupOverlay: function () {
694		jQuery('body').removeClass("cli-barmodal-open");
695		jQuery(".cli-popupbar-overlay").removeClass("cli-show");
696	},
697	showPopupOverlay: function () {
698		if (this.bar_elm.length) {
699			if (Boolean(this.settings.popup_overlay)) {
700				jQuery('body').addClass("cli-barmodal-open");
701				jQuery(".cli-popupbar-overlay").addClass("cli-show");
702			}
703		}
704
705	},
706	barAsWidget: function (a) {
707		var cli_elm = this.bar_elm;
708		cli_elm.attr('data-cli-type', 'widget');
709		var cli_win = jQuery(window);
710		var cli_winh = cli_win.height() - 40;
711		var cli_winw = cli_win.width();
712		var cli_defw = cli_winw > 400 ? 300 : cli_winw - 30;
713		cli_elm.css(
714			{
715				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'overflow': 'auto', 'position': 'fixed', 'box-sizing': 'border-box'
716			}
717		);
718		if (this.checkifStyleAttributeExist() === false) {
719			cli_elm.css({ 'padding': '25px 15px' });
720		}
721		if (this.settings.widget_position == 'left') {
722			cli_elm.css(
723				{
724					'left': '15px', 'right': 'auto', 'bottom': '15px', 'top': 'auto'
725				}
726			);
727		} else {
728			cli_elm.css(
729				{
730					'left': 'auto', 'right': '15px', 'bottom': '15px', 'top': 'auto'
731				}
732			);
733		}
734		if (a) {
735			this.setResize();
736		}
737	},
738	barAsPopUp: function (a) {
739		if (typeof cookie_law_info_bar_as_popup === 'function') {
740			return false;
741		}
742		var cli_elm = this.bar_elm;
743		cli_elm.attr('data-cli-type', 'popup');
744		var cli_win = jQuery(window);
745		var cli_winh = cli_win.height() - 40;
746		var cli_winw = cli_win.width();
747		var cli_defw = cli_winw > 700 ? 500 : cli_winw - 20;
748
749		cli_elm.css(
750			{
751				'width': cli_defw, 'height': 'auto', 'max-height': cli_winh, 'bottom': '', 'top': '50%', 'left': '50%', 'margin-left': (cli_defw / 2) * -1, 'margin-top': '-100px', 'overflow': 'auto'
752			}
753		).addClass('cli-bar-popup cli-modal-content');
754		if (this.checkifStyleAttributeExist() === false) {
755			cli_elm.css({ 'padding': '25px 15px' });
756		}
757		const cli_h = cli_elm.height();
758		cli_elm.css({ 'top': '50%', 'margin-top': ((cli_h / 2) + 30) * -1 });
759		setTimeout(
760			function () {
761				cli_elm.css(
762					{
763						'bottom': ''
764					}
765				);
766			},
767			100
768		);
769		if (a) {
770			this.setResize();
771		}
772	},
773	setResize: function () {
774		var resizeTmr = null;
775		jQuery(window).resize(
776			function () {
777				clearTimeout(resizeTmr);
778				resizeTmr = setTimeout(
779					function () {
780						if (CLI_COOKIEBAR_AS_POPUP) {
781							CLI.barAsPopUp();
782						}
783						if (CLI.settings.cookie_bar_as == 'widget') {
784							CLI.barAsWidget();
785						}
786						CLI.configShowAgain();
787					},
788					500
789				);
790			}
791		);
792	},
793	enableAllCookies: function () {
794
795		jQuery('.cli-user-preference-checkbox').each(
796			function () {
797				var cli_chkbox_elm = jQuery(this);
798				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
799				if (cli_chkbox_data_id != 'checkbox-necessary') {
800					cli_chkbox_elm.prop('checked', true);
801					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'yes', CLI_ACCEPT_COOKIE_EXPIRE);
802				}
803			}
804		);
805	},
806	disableAllCookies: function () {
807		jQuery('.cli-user-preference-checkbox').each(
808			function () {
809
810				var cli_chkbox_elm = jQuery(this);
811				var cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
812				const cliCategorySlug = cli_chkbox_data_id.replace('checkbox-', '');
813				if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) {
814					cli_chkbox_elm.prop('checked', false);
815					CLI_Cookie.set('cookielawinfo-' + cli_chkbox_data_id, 'no', CLI_ACCEPT_COOKIE_EXPIRE);
816				}
817			}
818		);
819	},
820	hideCookieBarOnClose: function () {
821		jQuery(document).on(
822			'click',
823			'.cli_cookie_close_button',
824			function (e) {
825				e.preventDefault();
826				var elm = jQuery(this);
827				if (Cli_Data.ccpaType === 'ccpa') {
828					CLI.enableAllCookies();
829				}
830				CLI.accept_close();
831			}
832		);
833	},
834	checkCategories: function () {
835		var cliAllowedCategories = [];
836		var cli_categories = {};
837		jQuery('.cli-user-preference-checkbox').each(
838			function () {
839				var status = false;
840				const cli_chkbox_elm = jQuery(this);
841				let cli_chkbox_data_id = cli_chkbox_elm.attr('data-id');
842				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
843				const cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace('-', '_')
844				if (jQuery(cli_chkbox_elm).is(':checked')) {
845					status = true;
846					cliAllowedCategories.push(cli_chkbox_data_id);
847				}
848
849				cli_categories[cli_chkbox_data_id_trimmed] = status;
850			}
851		);
852		CLI.allowedCategories = cliAllowedCategories;
853	},
854	cookieLawInfoRunCallBacks: function () {
855		this.checkCategories();
856		if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes') {
857			if ("function" == typeof CookieLawInfo_Accept_Callback) {
858				CookieLawInfo_Accept_Callback();
859			}
860		}
861	},
862	generateConsent: function () {
863		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
864		let cliConsent = {};
865		if (preferenceCookie !== null) {
866			cliConsent = window.atob(preferenceCookie);
867			cliConsent = JSON.parse(cliConsent);
868		}
869		cliConsent.ver = Cli_Data.consentVersion;
870		jQuery('.cli-user-preference-checkbox').each(
871			function () {
872				let categoryVal = '';
873				let cli_chkbox_data_id = jQuery(this).attr('data-id');
874				cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-', '');
875				if (jQuery(this).is(':checked')) {
876					categoryVal = true;
877				} else {
878					categoryVal = false;
879				}
880				cliConsent[cli_chkbox_data_id] = categoryVal;
881			}
882		);
883		cliConsent = JSON.stringify(cliConsent);
884		cliConsent = window.btoa(cliConsent);
885		CLI_Cookie.set(CLI_PREFERENCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE);
886	},
887	addStyleAttribute: function () {
888		var bar = this.bar_elm;
889		var styleClass = '';
890		if (jQuery(bar).find('.cli-bar-container').length > 0) {
891			styleClass = jQuery('.cli-bar-container').attr('class');
892			styleClass = styleClass.replace('cli-bar-container', '');
893			styleClass = styleClass.trim();
894			jQuery(bar).attr('data-cli-style', styleClass);
895		}
896	},
897	getParameterByName: function (name, url) {
898		if (!url) {
899			url = window.location.href;
900		}
901		name = name.replace(/[\[\]]/g, '\\$&');
902		var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
903			results = regex.exec(url);
904		if (!results) {
905			return null;
906		}
907		if (!results[2]) {
908			return '';
909		}
910		return decodeURIComponent(results[2].replace(/\+/g, ' '));
911	},
912	CookieLawInfo_Callback: function (enableBar, enableBlocking) {
913		enableBar = typeof enableBar !== 'undefined' ? enableBar : true;
914		enableBlocking = typeof enableBlocking !== 'undefined' ? enableBlocking : true;
915		if (CLI.js_blocking_enabled === true && Boolean(Cli_Data.custom_integration) === true) {
916			cliBlocker.cookieBar(enableBar);
917			cliBlocker.runScripts(enableBlocking);
918		}
919	},
920	checkifStyleAttributeExist: function () {
921		var exist = false;
922		var attr = this.bar_elm.attr('data-cli-style');
923		if (typeof attr !== typeof undefined && attr !== false) {
924			exist = true;
925		}
926		return exist;
927	},
928	reviewConsent: function () {
929		jQuery(document).on(
930			'click',
931			'.cli_manage_current_consent,.wt-cli-manage-consent-link',
932			function () {
933				CLI.displayHeader();
934			}
935		);
936	},
937	mayBeSetPreferenceCookie: function () {
938		if (CLI.getParameterByName('cli_bypass') === "1") {
939			CLI.generateConsent();
940		}
941	}
942}
943var cliBlocker =
944{
945	blockingStatus: true,
946	scriptsLoaded: false,
947	ccpaEnabled: false,
948	ccpaRegionBased: false,
949	ccpaApplicable: false,
950	ccpaBarEnabled: false,
951	cliShowBar: true,
952	isBypassEnabled: CLI.getParameterByName('cli_bypass'),
953	checkPluginStatus: function (callbackA, callbackB) {
954		this.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled);
955		this.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased);
956		this.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled);
957
958		if (Boolean(Cli_Data.custom_integration) === true) {
959			callbackA(false);
960		} else {
961			if (this.ccpaEnabled === true) {
962				this.ccpaApplicable = true;
963				if (Cli_Data.ccpaType === 'ccpa') {
964					if (this.ccpaBarEnabled !== true) {
965						this.cliShowBar = false;
966						this.blockingStatus = false;
967					}
968				}
969			} else {
970				jQuery('.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element').remove();
971			}
972			if (cliBlocker.isBypassEnabled === "1") {
973				cliBlocker.blockingStatus = false;
974			}
975			callbackA(this.cliShowBar);
976			callbackB(this.blockingStatus);
977		}
978
979	},
980	cookieBar: function (showbar) {
981		showbar = typeof showbar !== 'undefined' ? showbar : true;
982		cliBlocker.cliShowBar = showbar;
983		if (cliBlocker.cliShowBar === false) {
984			CLI.bar_elm.hide();
985			CLI.showagain_elm.hide();
986			CLI.settingsModal.removeClass('cli-blowup cli-out');
987			CLI.hidePopupOverlay();
988			jQuery(".cli-settings-overlay").removeClass("cli-show");
989		} else {
990			if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
991				CLI.displayHeader();
992			} else {
993				CLI.hideHeader();
994			}
995		}
996	},
997	removeCookieByCategory: function () {
998
999		if (cliBlocker.blockingStatus === true) {
1000			if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) {
1001				var non_necessary_cookies = Cli_Data.non_necessary_cookies;
1002				for (var key in non_necessary_cookies) {
1003					const currentCategory = key;
1004					if (CLI.allowedCategories.indexOf(currentCategory) === -1) {
1005						var nonNecessaryCookies = non_necessary_cookies[currentCategory];
1006						for (var i = 0; i < nonNecessaryCookies.length; i++) {
1007							if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) {
1008								CLI_Cookie.erase(nonNecessaryCookies[i]);
1009							}
1010
1011						}
1012					}
1013				}
1014			}
1015		}
1016	},
1017	runScripts: function (blocking) {
1018		blocking = typeof blocking !== 'undefined' ? blocking : true;
1019		cliBlocker.blockingStatus = blocking;
1020		var genericFuncs =
1021		{
1022
1023			renderByElement: function (callback) {
1024				cliScriptFuncs.renderScripts();
1025				callback();
1026				cliBlocker.scriptsLoaded = true;
1027			},
1028
1029		};
1030		var cliScriptFuncs =
1031		{
1032			// trigger DOMContentLoaded
1033			scriptsDone: function () {
1034				if (typeof Cli_Data.triggerDomRefresh !== 'undefined') {
1035					if (Boolean(Cli_Data.triggerDomRefresh) === true) {
1036						var DOMContentLoadedEvent = document.createEvent('Event')
1037						DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true)
1038						window.document.dispatchEvent(DOMContentLoadedEvent);
1039					}
1040				}
1041			},
1042			seq: function (arr, callback, index) {
1043				// first call, without an index
1044				if (typeof index === 'undefined') {
1045					index = 0
1046				}
1047
1048				arr[index](
1049					function () {
1050						index++
1051						if (index === arr.length) {
1052							callback()
1053						} else {
1054							cliScriptFuncs.seq(arr, callback, index)
1055						}
1056					}
1057				)
1058			},
1059			/* script runner */
1060			insertScript: function ($script, callback) {
1061				var s = '';
1062				var scriptType = $script.getAttribute('data-cli-script-type');
1063				var elementPosition = $script.getAttribute('data-cli-element-position');
1064				var isBlock = $script.getAttribute('data-cli-block');
1065				var s = document.createElement('script');
1066				var ccpaOptedOut = cliBlocker.ccpaOptedOut();
1067				s.type = 'text/plain';
1068				if ($script.async) {
1069					s.async = $script.async;
1070				}
1071				if ($script.defer) {
1072					s.defer = $script.defer;
1073				}
1074				if ($script.src) {
1075					s.onload = callback
1076					s.onerror = callback
1077					s.src = $script.src
1078				} else {
1079					s.textContent = $script.innerText
1080				}
1081				var attrs = jQuery($script).prop("attributes");
1082				for (var ii = 0; ii < attrs.length; ++ii) {
1083					if (attrs[ii].nodeName !== 'id') {
1084						s.setAttribute(attrs[ii].nodeName, attrs[ii].value);
1085					}
1086				}
1087				if (cliBlocker.blockingStatus === true) {
1088
1089					if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(scriptType) !== -1)) {
1090						s.setAttribute('data-cli-consent', 'accepted');
1091						s.type = 'text/javascript';
1092					}
1093					if (cliBlocker.ccpaApplicable === true) {
1094						if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) {
1095							s.type = 'text/plain';
1096						}
1097					}
1098				} else {
1099					s.type = 'text/javascript';
1100				}
1101
1102				if ($script.type != s.type) {
1103					if (elementPosition === 'head') {
1104						document.head.appendChild(s);
1105					} else {
1106						document.body.appendChild(s);
1107					}
1108					if (!$script.src) {
1109						callback()
1110					}
1111					$script.parentNode.removeChild($script);
1112
1113				} else {
1114
1115					callback();
1116				}
1117			},
1118			renderScripts: function () {
1119				var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]');
1120				if ($scripts.length > 0) {
1121					var runList = []
1122					var typeAttr
1123					Array.prototype.forEach.call(
1124						$scripts,
1125						function ($script) {
1126							// only run script tags without the type attribute
1127							// or with a javascript mime attribute value
1128							typeAttr = $script.getAttribute('type')
1129							runList.push(
1130								function (callback) {
1131									cliScriptFuncs.insertScript($script, callback)
1132								}
1133							)
1134						}
1135					)
1136					cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone);
1137				}
1138			}
1139		};
1140		genericFuncs.renderByElement(cliBlocker.removeCookieByCategory);
1141	},
1142	ccpaOptedOut: function () {
1143		var ccpaOptedOut = false;
1144		var preferenceCookie = CLI_Cookie.read(CLI_PREFERENCE_COOKIE);
1145		if (preferenceCookie !== null) {
1146			let cliConsent = window.atob(preferenceCookie);
1147			cliConsent = JSON.parse(cliConsent);
1148			if (typeof cliConsent.ccpaOptout !== 'undefined') {
1149				ccpaOptedOut = cliConsent.ccpaOptout;
1150			}
1151		}
1152		return ccpaOptedOut;
1153	}
1154}
1155jQuery(document).ready(
1156	function () {
1157		if (typeof cli_cookiebar_settings != 'undefined') {
1158			CLI.set(
1159				{
1160					settings: cli_cookiebar_settings
1161				}
1162			);
1163			if (CLI.js_blocking_enabled === true) {
1164				cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
1165			}
1166		}
1167	}
1168);

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.