
/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function (factory) {
	var registeredInModuleLoader;
	if (typeof define === 'function' && define.amd) {
		define(factory);
		registeredInModuleLoader = true;
	}
	if (typeof exports === 'object') {
		module.exports = factory();
		registeredInModuleLoader = true;
	}
	if (!registeredInModuleLoader) {
		var OldCookies = window.Cookies;
		var api = window.Cookies = factory();
		api.noConflict = function () {
			window.Cookies = OldCookies;
			return api;
		};
	}
}(function () {
	function extend () {
		var i = 0;
		var result = {};
		for (; i < arguments.length; i++) {
			var attributes = arguments[ i ];
			for (var key in attributes) {
				result[key] = attributes[key];
			}
		}
		return result;
	}

	function decode (s) {
		return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
	}

	function init (converter) {
		function api() {}

		function set (key, value, attributes) {
			if (typeof document === 'undefined') {
				return;
			}

			attributes = extend({
				path: '/'
			}, api.defaults, attributes);

			if (typeof attributes.expires === 'number') {
				attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
			}

			// We're using "expires" because "max-age" is not supported by IE
			attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';

			try {
				var result = JSON.stringify(value);
				if (/^[\{\[]/.test(result)) {
					value = result;
				}
			} catch (e) {}

			value = converter.write ?
				converter.write(value, key) :
				encodeURIComponent(String(value))
					.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);

			key = encodeURIComponent(String(key))
				.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
				.replace(/[\(\)]/g, escape);

			var stringifiedAttributes = '';
			for (var attributeName in attributes) {
				if (!attributes[attributeName]) {
					continue;
				}
				stringifiedAttributes += '; ' + attributeName;
				if (attributes[attributeName] === true) {
					continue;
				}

				// Considers RFC 6265 section 5.2:
				// ...
				// 3.  If the remaining unparsed-attributes contains a %x3B (";")
				//     character:
				// Consume the characters of the unparsed-attributes up to,
				// not including, the first %x3B (";") character.
				// ...
				stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
			}

			return (document.cookie = key + '=' + value + stringifiedAttributes);
		}

		function get (key, json) {
			if (typeof document === 'undefined') {
				return;
			}

			var jar = {};
			// To prevent the for loop in the first place assign an empty array
			// in case there are no cookies at all.
			var cookies = document.cookie ? document.cookie.split('; ') : [];
			var i = 0;

			for (; i < cookies.length; i++) {
				var parts = cookies[i].split('=');
				var cookie = parts.slice(1).join('=');

				if (!json && cookie.charAt(0) === '"') {
					cookie = cookie.slice(1, -1);
				}

				try {
					var name = decode(parts[0]);
					cookie = (converter.read || converter)(cookie, name) ||
						decode(cookie);

					if (json) {
						try {
							cookie = JSON.parse(cookie);
						} catch (e) {}
					}

					jar[name] = cookie;

					if (key === name) {
						break;
					}
				} catch (e) {}
			}

			return key ? jar[key] : jar;
		}

		api.set = set;
		api.get = function (key) {
			return get(key, false /* read as raw */);
		};
		api.getJSON = function (key) {
			return get(key, true /* read as json */);
		};
		api.remove = function (key, attributes) {
			set(key, '', extend(attributes, {
				expires: -1
			}));
		};

		api.defaults = {};

		api.withConverter = init;

		return api;
	}

	return init(function () {});
}));

var cookieman=function(){"use strict";var e="CookieConsent",t=365,n=document.querySelector("[data-cookieman-form]"),o=document.querySelector("[data-cookieman-settings]"),r=o,i=JSON.parse(o.dataset.cookiemanSettings),c=n.querySelectorAll("[type=checkbox][name]"),a=document.querySelectorAll("[data-cookieman-save]"),s=document.querySelectorAll("[data-cookieman-accept-all]"),d=document.querySelectorAll("[data-cookieman-accept-none]"),u=[],l={};function f(){for(var n=[],o=0;o<c.length;o++)c[o].checked&&n.push(c[o].name);Cookies.set(e,n.join("|"),{expires:t,sameSite:"lax"})}function v(e,t){e.checked=t}function m(){for(var e=0;e<c.length;e++){var t=c[e];t.disabled||v(t,!1)}}function h(e){for(var t=p(),n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}function k(){var t=Cookies.get(e);return t?t.split("|"):[]}function p(){return k().filter((function(e){var t=i.groups[e];return void 0!==t&&(!t.respectDnt||"1"!==window.navigator.doNotTrack)}))}function g(e){const t=e.target;t&&t.dataset.hasOwnProperty("cookiemanShow")&&cookieman.show()}function O(e){e.preventDefault(),f(),cookieman.hide(),function(){for(var e in i.groups)if(Object.prototype.hasOwnProperty.call(i.groups,e)&&!h(e))for(var t=i.groups[e],n=0;n<t.trackingObjects.length;n++){var o=t.trackingObjects[n];C(o,i.trackingObjects[o])}}(),S()}function b(e){e.preventDefault(),function(){for(var e=0;e<c.length;e++)v(c[e],!0)}()}function y(e){e.preventDefault(),m()}function j(e,t){if(void 0!==t){if(void 0!==t.inject){var n,o=document.createElement("div");o.innerHTML=t.inject;for(var i=0,c=0;c<o.children.length;c++){var a=o.children[c];if("SCRIPT"===a.tagName){(n=document.createElement("script")).textContent=a.textContent;for(var s=0;s<a.attributes.length;s++){var d=a.attributes[s];n.setAttribute(d.name,d.value)}n.addEventListener("load",function(e,t,n,o){return function(i){var c,a;void 0===l[n]&&(l[n]=[]),l[n].push(t),c="scriptLoaded",a={detail:{trackingObjectKey:n,trackingObjectSettings:o,scriptId:t,node:e}},r.dispatchEvent(new window.CustomEvent(c,a))}}(n,i++,e,t)),a=n}else c--;document.body.appendChild(a)}u.push(e)}}else console.error("Used trackingObject ‹"+e+"› is undefined.")}function C(e,t){if(void 0!==t)for(var n in t.show){if(Object.prototype.hasOwnProperty.call(t.show,n))w(n,t.show[n])}else console.error("Used trackingObject ‹"+e+"› is undefined.")}function w(e,t){if("cookie_http+html"===t.type){if(Object.prototype.hasOwnProperty.call(t,"htmlCookieRemovalPattern")&&""!==t.htmlCookieRemovalPattern){var n,o=Cookies.get();try{n=RegExp(t.htmlCookieRemovalPattern)}catch(t){return console.error('Malformed pattern for cookie deletion on trackingObjectItem "'+e+'": '+t.message),!1}for(var r in o)null!==r.match(n)&&E(r)}else E(e);return!0}return!1}function S(){for(var e=p(),t=0;t<e.length;t++)for(var n=i.groups[e[t]],o=0;o<n.trackingObjects.length;o++){var r=n.trackingObjects[o];-1===u.indexOf(r)&&j(r,i.trackingObjects[r])}}function E(e){var t=document.location.host,n=t.split(".").slice(-2).join(".");Cookies.remove(e),Cookies.remove(e,{path:"/"}),Cookies.remove(e,{path:"",domain:t}),Cookies.remove(e,{path:"/",domain:t}),Cookies.remove(e,{path:"",domain:"."+n}),Cookies.remove(e,{path:"/",domain:"."+n})}return function(){for(var t=0;t<s.length;t++)s[t].addEventListener("click",b);for(t=0;t<d.length;t++)d[t].addEventListener("click",y);for(t=0;t<a.length;t++)a[t].addEventListener("click",O);document.body.addEventListener("click",g),function(){if(void 0!==Cookies.get(e)){var t=k();m();for(var o=0;o<t.length;o++){var r=n.querySelector("[name="+t[o]+"]");r&&v(r,!0)}}}(),function(){if("1"===window.navigator.doNotTrack)for(var e=document.querySelectorAll("[data-cookieman-dnt]"),t=0;t<e.length;t++)e[t].innerHTML=n.dataset.cookiemanDntEnabled}(),S()}(),{show:function(){console.error("Your theme should implement function cookieman.show()")},hide:function(){console.error("Your theme should implement function cookieman.hide()")},showOnce:function(){void 0===Cookies.get(e)&&cookieman.show()},hasConsented:h,hasConsentedTrackingObject:function(e){var t=function(e){return Object.keys(i.groups).filter((function(t){return Object.prototype.hasOwnProperty.call(i.groups[t],"trackingObjects")&&i.groups[t].trackingObjects.indexOf(e)>-1}))}(e);return t.reduce((function(e,t){return e&&h(t)}),t.length>0)},consenteds:p,consent:function(e){v(n.querySelector('[type=checkbox][name="'+e+'"]'),!0),f(),S()},onScriptLoaded:function(e,t,n){void 0===l[e]&&(l[e]=[]),-1===l[e].indexOf(t)?r.addEventListener("scriptLoaded",(function(o){o.detail.trackingObjectKey===e&&o.detail.scriptId===t&&n(o.detail.trackingObjectKey,o.detail.scriptId)})):n(e,t)},eventsEl:r}}();

!function(){"use strict";jQuery((function(){jQuery('[aria-controls="cookieman-settings"]').on("click",(function(){jQuery("[data-cookieman-save]").show()}))})),cookieman.show=function(){jQuery((function(){jQuery("#cookieman-modal").modal({show:!0,backdrop:true})}))},cookieman.hide=function(){jQuery((function(){jQuery("#cookieman-modal").modal("hide")}))}}();

null!==document.querySelector('[data-cookieman-showonce="1"]')&&setTimeout(cookieman.showOnce,2e3);
