(()=>{"use strict";!function(){var n=window.currentLanguage+"_recently_viewed_posts",e=$("div[data-post-id]").data("post-id"),t=decodeURIComponent(a(n)),i=[];if(null!=t&&null!=t&&t.length>0&&(i=JSON.parse(a(n))),null!=e&&0!=e&&null!=e){var r={id:e};if(null==t||null==t||""==t)i.push(r),s(n,JSON.stringify(i),60);else{var o=(i=JSON.parse(t)).map((function(n){return n.id})).indexOf(r.id);-1===o?(i.length>=20&&i.shift(),i.push(r),u(n),s(n,JSON.stringify(i),60)):(i.splice(o,1),i.push(r),u(n),s(n,JSON.stringify(i),60))}}function s(n,e,t){var i=new Date,r=new URL(window.siteUrl);i.setTime(i.getTime()+24*t*60*60*1e3);var o="expires="+i.toUTCString();document.cookie=n+"="+e+"; "+o+"; path=/; domain="+r.hostname}function a(n){for(var e=n+"=",t=document.cookie.split(";"),i=0;i<t.length;i++){for(var r=t[i];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return""}function u(n){var e=new URL(window.siteUrl);document.cookie=n+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; domain="+e.hostname}}()})();