cdn.mateti.net Open in urlscan Pro
185.54.150.11  Public Scan

URL: https://cdn.mateti.net/mcp/onsite_v2.min.js
Submission: On October 15 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

/** Webtrekk MCP 1.0.11 - 2024-6-24 */(function(){'use strict';function aa(c,a){aa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(b[e]=d[e])};return aa(c,a)}function h(c,a){function b(){this.constructor=c}if("function"!==typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");aa(c,a);c.prototype=null===a?Object.create(a):(b.prototype=a.prototype,new b)}
function n(c,a,b){if(b||2===arguments.length)for(var d=0,e=a.length,f;d<e;d++)!f&&d in a||(f||(f=Array.prototype.slice.call(a,0,d)),f[d]=a[d]);return c.concat(f||Array.prototype.slice.call(a))}var ba="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function q(c){for(var a in c)return!1;return!0}function t(c,a){for(var b in c)a.call(void 0,c[b+""],b+"",c)}
function ca(c){for(var a=[],b=1;b<arguments.length;b++)a[b-1]=arguments[b];for(var d,e=0;e<a.length;e++){b=a[e];for(d in b)c[d+""]=b[d+""];for(var f=0;f<ba.length;f++)d=ba[f],Object.prototype.hasOwnProperty.call(b,d)&&(c[d]=b[d])}}function da(c){var a={},b;for(b in c)a[b+""]=c[b+""];return a}function ea(c,a){var b={},d;for(d in c)a(c[d+""],d+"",c)&&(b[d+""]=c[d+""]);return b}function fa(c){var a=[],b=0,d;for(d in c)a[b++]=d;return a}var ha={},ia="mapp_wt_".concat(1E9*Math.random()>>>0),ja=0;
function ka(){return"https:"===document.location.protocol?"https:":"http:"}function v(c){var a=typeof c;return"object"===a&&null!==c||"function"===a}function w(c){var a=typeof c;a="object"!==a?a:c?Array.isArray(c)?"array":a:"null";return"array"===a||"object"===a&&"number"===typeof c.length}function x(c){return"number"===typeof c}function y(c){return"string"===typeof c}function la(c){return"function"!==typeof c}function ma(c){return"undefined"!==typeof c&&null!==c}function z(){return Date.now()}
function A(c,a){return"undefined"===typeof c?a:c}function C(){try{var c=window.encodeURI(window.location.href);if(!ha[c]){var a=new URL(c);a&&a.searchParams&&a.searchParams.get&&(ha[c]=a.searchParams.get("wt_mcp_parent"))}var b="true"===ha[c];return window.parent!==window&&b}catch(d){D.H({type:"error",I:"isLikelyChildFrame - ".concat(d.message)})}return!1}
function oa(c){for(var a=[],b=1;b<arguments.length;b++)a[b-1]=arguments[b];for(b=0;b<a.length;b++){if(!(c&&null!==c&&a[b]in c))return!1;c=c[a[b]]}return!0}var E=JSON.parse,F=JSON.stringify,pa=0,qa=function(){function c(a,b,d,e){this.Ra=this.nb=!1;this.listener=a;this.proxy=b;this.src=d;this.type=e;this.key=++pa}c.prototype.wd=function(){this.nb=!0;this.src=this.proxy=this.listener=null};return c}();
function G(c,a){var b;void 0===b&&(b=0);b=null===b?0:0>b?Math.max(0,c.length+b):b;if("string"===typeof c)return"string"!==typeof a||1!==a.length?-1:c.indexOf(a,b);for(;b<c.length;b++)if(b in c&&c[b]===a)return b;return-1}function H(c,a){for(var b=c.length,d=0;d<b;d++)a(c[d],d,c)}function I(c,a){for(var b=c.length,d=Array(b),e="string"===typeof c?c.split(""):c,f=0;f<b;f++)f in e&&(d[f]=a(e[f],f,c));return d}function ra(c,a){a=G(c,a);var b;(b=0<=a)&&Array.prototype.splice.call(c,a,1);return b}
function sa(c){for(var a=0,b=0,d={};b<c.length;){var e=c[b++],f=e;if(v(f)){var g="o".concat;f=Object.prototype.hasOwnProperty.call(f,ia)&&f[ia]||(f[ia]=++ja);g=g.call("o",f)}else g=(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(d,g)||(d[g]=!0,c[a++]=e)}c.length=a}
var ta=function(){function c(a){this.L={};this.Pc=0;this.src=a}c.ve=function(a,b){for(var d=0;d<a.length;++d){var e=a[d];if(!e.nb&&e.listener===b)return d}return-1};c.prototype.add=function(a,b,d){var e=a.toString();a=this.L[e];a||(a=this.L[e]=[],this.Pc++);var f=c.ve(a,b);-1<f?(b=a[f],d||(b.Ra=!1)):(b=new qa(b,null,this.src,e),b.Ra=d,a.push(b));return b};c.prototype.Ye=function(a){var b=a.type;b in this.L&&ra(this.L[b],a)&&(a.wd(),0===this.L[b].length&&(delete this.L[b],this.Pc--))};return c}(),
ua="mapp_webtrekk_em_".concat(1E6*Math.random()|0);function va(c){c=c[ua];return c instanceof ta?c:null}function wa(c,a){var b=c.listener,d=c.src;c.Ra&&xa(c);return b.call(d,a)}function ya(c){return function(a){return c.nb?!0:wa(c,a)}}
function za(c,a,b,d){if(!a)throw Error("Invalid event type");var e=va(c);e||(c[ua]=e=new ta(c));b=e.add(a,b,d);if(b.proxy)return b;d=ya(b);b.proxy=d;c.addEventListener?c.addEventListener(a.toString(),d,!1):c.attachEvent?c.attachEvent("on".concat(a.toString()),d):c.addListener&&c.removeListener&&c.addListener(d);return b}function Aa(c,a,b){if(Array.isArray(a)){for(var d=0;d<a.length;d++)Aa(c,a[d],b);return null}return za(c,a,b,!0)}
function xa(c){if("number"===typeof c||!c||c.nb)return!1;var a=c.src,b=c.type,d=c.proxy;a.removeEventListener?a.removeEventListener(b,d,!1):a.detachEvent?a.detachEvent("on".concat(b),d):a.addListener&&a.removeListener&&a.removeListener(d);(b=va(a))?(b.Ye(c),0===b.Pc&&(b.src=null,a[ua]=null)):c.wd();return!0}function J(c,a,b){if(Array.isArray(a)){for(var d=0;d<a.length;d++)za(c,a[d],b);return null}return za(c,a,b,!1)}var K=Aa;
function Ba(c){if(c&&(c=va(c))){var a=0,b="keyup".toString(),d;for(d in c.L)if(!b||d===b)for(var e=c.L[d].concat(),f=0;f<e.length;++f)xa(e[f])&&++a}}
var Ca=xa,Da=new (function(){function c(){this.ub={};this.key=1;this.ga=[];this.Qb=0;this.Fc=[]}c.prototype.subscribe=function(a,b,d){var e=this.ub[a];e||(e=this.ub[a]=[]);var f=this.key;this.ga[f]=a;this.ga[f+1]=b;this.ga[f+2]=d;this.key=f+3;e.push(f);return f};c.prototype.Xe=function(a){for(var b=1;b<arguments.length;b++);if(b=this.ub[a]){var d=Array(arguments.length-1),e;var f=1;for(e=arguments.length;f<e;f++)d[f-1]=arguments[f];this.Qb++;try{for(f=0,e=b.length;f<e;f++){var g=b[f];this.ga[g+1].apply(this.ga[g+
2],d)}}finally{if(this.Qb--,0<this.Fc.length&&0===this.Qb)for(;g=this.Fc.pop();)this.Jd(g)}}};c.prototype.unsubscribe=function(a,b,d){if(a=this.ub[a]){var e=this.ga;if(a=a.find(function(f){return e[f+1]===b&&e[f+2]===d}))return this.Jd(a)}return!1};c.prototype.Jd=function(a){var b=this.ga[a];if(b){var d=this.ub[b];0!==this.Qb?(this.Fc.push(a),this.ga[a+1]=function(){}):(d&&ra(d,a),delete this.ga[a],delete this.ga[a+1],delete this.ga[a+2])}return!!b};return c}());function L(c,a){Da.Xe(c,a)}
function M(c,a){Da.subscribe(c,a)}var Ea=/&([^;\s<&]+);?/g,Fa=/[\x00&<>'']/,Ga=/&/g,Ha=/</g,Ia=/>/g,Ja=/'/g,Ka=/'/g,La=/\x00/g;function Ma(c){var a={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},b=N.createElement("div");return c.replace(Ea,function(d,e){var f=a[d];if(f)return f;"#"===e.charAt(0)&&(e=Number("0".concat(e.substring(1))),isNaN(e)||(f=String.fromCharCode(e)));f||(b.innerHTML="".concat(d," "),f=b.firstChild.nodeValue.slice(0,-1));return a[d]=f})}
var Na=String.prototype.trim?function(c){return c.trim()}:function(c){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(c)[1]};function Oa(c){for(var a=0,b=0;b<c.length;++b)a=31*a+c.charCodeAt(b)>>>0;return a}var Pa={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
function Qa(c){return!(!c.querySelectorAll||!c.querySelector)}function Ra(c){c=String(c);"application/xhtml+xml"===document.contentType&&(c=c.toLowerCase());return document.createElement(c)}function Sa(c,a){t(a,function(b,d){"style"===d?c.style.cssText=b:"class"===d?c.className=b:Pa.hasOwnProperty(d)?c.setAttribute(Pa[d],b):0===d.lastIndexOf("aria-",0)||0===d.lastIndexOf("data-",0)?c.setAttribute(d,b):c[d]=b})}
function Ta(c,a,b){b=b||document;c=c&&"*"!==c?String(c).toUpperCase():"";return Qa(b)&&(c||a)?b.querySelectorAll(c+(a?".".concat(a):"")):[]}function Ua(c,a){null!==a&&(y(a)&&(a=new Text(a)),c.appendChild(a))}function Va(c){return"string"===typeof c.className?c.className:c.getAttribute&&c.getAttribute("class")||""}function Wa(c,a){"string"===typeof c.className?c.className=a:c.setAttribute&&c.setAttribute("class",a)}function Xa(c,a){c=Va(c).match(/\S+/g)||[];return 0<=G(c,a)}
function Ya(c,a){var b=Va(c);Wa(c,b+(0<b.length?" ".concat(a):a))}function Za(c,a){Xa(c,a)&&Wa(c,Array.prototype.filter.call(Va(c).match(/\S+/g)||[],function(b){return b!==a}).join(" "))}function $a(c,a,b,d){c=d||c;d=a&&"*"!==a?String(a).toUpperCase():"";return Qa(c)&&(d||b)?c.querySelector(d+(b?".".concat(b):"")):Ta(a,b,c)[0]||null}
var N={appendChild:Ua,Zd:function(c,a){for(var b=0,d=a.length;b<d;b++)Ua(c,a[b])},m:function(c,a){for(var b=[],d=2;d<arguments.length;d++)b[d-2]=arguments[d];c=String(c);d=Ra(c);a&&("string"===typeof a?d.className=a:Array.isArray(a)?d.className=a.join(" "):Sa(d,a));if(0<b.length)for(var e=0;e<b.length;e++)Ua(d,b[e]);return d},createElement:Ra,getElementById:function(c){return"string"===typeof c?document.getElementById(c):c},Be:function(c){if("string"===typeof c&&Qa(document))try{return document.querySelector(c)}catch(a){}return c instanceof
Element?c:null},Eb:function(c){if("string"===typeof c&&Qa(document))try{return document.querySelectorAll(c)}catch(a){}return c instanceof Element?[c]:[]},De:Ta,wf:$a,Ce:function(c,a){a=a||document;return Qa(a)?a.querySelectorAll(".".concat(c)):a.getElementsByClassName?a.getElementsByClassName(c):[]},Ae:function(c,a){var b=a||document;return(b.getElementsByClassName?b.getElementsByClassName(c)[0]:$a(document,"*",c,a))||null},removeNode:function(c){return c&&c.parentNode?c.parentNode.removeChild(c):
null},Ad:function(c){for(var a;a=c.firstChild;)c.removeChild(a)},ec:Ya,Sb:Za,vf:function(c,a,b){Za(c,a);Ya(c,b)},Ee:function(){return document.head||document.getElementsByTagName("head")[0]}},O=new (function(){function c(){var a=this;this.Wb={};this.gf=function(b){return new Promise(function(d,e){D.log("browserStorage: starting lsSync");if(a.sc())if(a.Wb[b])d({});else if(C())D.log("browserStorage: stopping lsSync because of execution in iframe"),d({});else{var f=window.setTimeout(function(){D.error("browserStorage: timeout loading lsSync iframe");
f=null;e()},2E3);J(window,"message",function(k){k=k.data;y(k)&&(k={type:k});if(v(k))if("string"===typeof k.type&&-1!==k.type.indexOf("mcp-ls-sync-err"))D.error("browserStorage: error in lsSync iframe",k.type),D.H({type:"error",I:"browserStorage: error in lsSync iframe - ".concat(k.type)});else if("mcp-ls-sync"===k.type&&k.data&&"string"===typeof k.data&&0===k.data.indexOf("{MCPDATASET}-")){D.info("browserStorage: got mcp event msg",k);k.data=k.data.slice(13);var l={};try{l=E(k.data)||{}}catch(m){D.error("browserStorage: couldnt parse ".concat(k.data))}null!==
f?(D.log("browserStorage: lsSync established! With:",l),window.clearTimeout(f),f=null,d(l)):null===l||q(l)||(D.log("browserStorage: lsSync received new data",l),L("updateVisitStore",l))}});var g="https:";g=y(window.widgetLocalStorageSyncUrlBase)?g+window.widgetLocalStorageSyncUrlBase:g+"//".concat(b,".mateti.net/mcp/ls.html");g+="?trackId=".concat(b);a.Wb[b]=N.m("iframe",{id:"wt-mcp-ls-sync-".concat(b),width:"0px",height:"0px",style:"display: none;",sandbox:"allow-scripts allow-same-origin",src:g});
document.head.appendChild(a.Wb[b])}else d({})})};this.Qc=function(b){D.log("browserStorage: updating lsSync data");try{var d=b;v(d)&&(d=F(b));d="{MCPDATASET}-".concat(d);t(a.Wb,function(e,f){e&&e.contentWindow&&(D.log("browserStorage: lsSync posting new data to ".concat(f)),e.contentWindow.postMessage(d,"*"))})}catch(e){D.error("Problem posting message to iframe - ".concat(e.message)),D.H({type:"error",I:"Problem posting message to iframe - ".concat(e.message)})}};c.hf()?this.storage=window.localStorage:
D.H({type:"info",I:"No accessible storage found"})}c.hf=function(){try{var a=window.localStorage;a.setItem("__storage_test__","__storage_test__");a.removeItem("__storage_test__");return!0}catch(b){return!1}};c.prototype.sc=function(){return null!==this.storage};return c}());function Q(c,a){if(v(a)||w(a))try{a=F(a)}catch(b){}try{window.localStorage.setItem(c,String(a))}catch(b){return!1}return!0}function ab(c){var a="";try{return a=window.localStorage.getItem(c)||"",E(a)}catch(b){}return a}
var R=0,bb=0;function cb(){try{if(!window.localStorage)return R;var c=ab("wt.mcp.debug");if(y(c)||x(c))R=Number(c)}catch(a){R=0}return R}function db(){try{if(!window.localStorage)return bb;var c=ab("wt.mcp.prediction");if(y(c)||x(c))bb=Number(c)}catch(a){bb=0}return bb}function eb(c,a){document.documentElement.addEventListener("mcpDebugTrigger-".concat(c),function(){a&&a.show&&a.show()})}
function S(c){c=new CustomEvent("mcpDebugReceiver",{detail:{type:"mcpRuleFired",data:{uuid:c.oa||"",identifier:c.identifier||"",type:c.type||"",rtb:c.Ja||"",plc:c.Xa||"",cmp:c.cmp||"",segment:c.Bd||"",content:c.content||""}}});document.documentElement.dispatchEvent(c)}function fb(c){var a=[];t(c,function(b,d){if("undefined"!==typeof b){try{var e=encodeURIComponent(b)}catch(f){e=escape(b)}a.push("".concat(d,"=").concat(e))}});return a.join("&")}
function gb(c,a){a=fb(a);var b=!1;-1===c.indexOf("?")&&(b=!0);return c+(b?"?":"&")+a}function hb(){return-1!==ib().search("Trident")||-1!==ib().search("MSIE")}
function jb(){var c=ib();if(hb()){var a=/rv: *([\d.]*)/.exec(c);if(a&&a[1])c=a[1];else{a="";var b=/MSIE +([\d.]+)/.exec(c);if(b&&b[1])if(c=/Trident\/(\d.\d)/.exec(c),"7.0"===b[1])if(c&&c[1])switch(c[1]){case "4.0":a="8.0";break;case "5.0":a="9.0";break;case "6.0":a="10.0";break;case "7.0":a="11.0"}else a="7.0";else a=b[1];c=a}c=parseFloat(c)}else c=-1;return c}function ib(){return window.navigator.userAgent}var kb=ib,lb={},mb=null;
function nb(c){try{var a=c.split("_");if("string"===typeof a[3])return a[3].replace(/([A-Z])/g," $1")}catch(b){}return c}function ob(c){x(c)&&(c=Math.round(100*c)/100);return c}
function pb(c){if("undefined"===typeof lb[c]){var a=mb.document.createElement("div");a.id="wt_mcp_".concat(c);a.style.color="#FFFFFF";a.style["font-size"]="12px";a.style["letter-spacing"]="0.1em";a.style["line-height"]="150%";a.style["font-family"]="'Source Sans Pro',sans-serif";mb.document.body.appendChild(a);lb[c]=a}return lb[c]}
function qb(c){void 0===c&&(c="log");for(var a=[],b=1;b<arguments.length;b++)a[b-1]=arguments[b];/{\s*\[native code]\s*}/.test(String(window.console[c]))||(b=N.createElement("iframe"),b.style.display="none",N.appendChild(document.body,b),window.console=b.contentWindow.console);if(!hb()||10<=jb())window.parent!==window?(b=((window.frameElement||{}).src||"").split("/"),a.unshift("MCP(Iframe ".concat((b[b.length-1]||"").split("wt_eid=")[0],")"))):a.unshift("MCP"),window.console[c].apply(window.console,
a);else try{if(window.console[c](a[0]),a[1])window.console[c]("object"===typeof a[1]?F(a[1]):a[1])}catch(d){}}
function rb(c,a,b){if(null===mb){var d=N.createElement("iframe");d.id="wt_mcp_prediction";N.appendChild(document.body,d);mb=d.contentWindow}window.setTimeout(function(){var e=nb(c);e=""+"<div style='text-align: center;'>\n            <h3 style='font-size: 40px; text-align:center; margin-bottom: 10px;'>Webtrekk Predictions:</h3>\n            <h1>".concat(ob(a),"%</h1>\n            <span><b>").concat(e,"</b></span>\n        </div>");e+='<h4 style="font-size: 20px; margin-bottom:10px;">Input factors:</h4>';
var f=[];t(b,function(k,l){w(k)&&(k=k.join(", "));f.push("<span> - ".concat(l,": <i>").concat(ob(k),"</i></span>"))});var g=c.replace(/\W/ig,"").toLowerCase();pb(g).innerHTML="<div style='margin: 5px 0 0 20px;'>".concat(e).concat(f.join("<br/>"),"</div>")},250)}
function sb(c,a,b,d,e,f){void 0===d&&(d=!1);void 0===e&&(e="");void 0===f&&(f="");var g=c;-1!==c.indexOf(";")&&(-1!==c.indexOf("&")&&(c=Ma(c)),g=c);c=N.De("body")[0];!d&&c?(b="".concat(b,"/mcp/rm.html"),b+="?url=".concat(window.encodeURIComponent(g)),b+="&campaign=".concat(window.encodeURIComponent(a)),b+="&acc=".concat(window.encodeURIComponent(e)),b+="&id=".concat(window.encodeURIComponent(f)),e=N,f=e.m,d="wt-audience-stream-".concat,Fa.test(a)&&(-1!==a.indexOf("&")&&(a=a.replace(Ga,"&amp;")),-1!==
a.indexOf("<")&&(a=a.replace(Ha,"&lt;")),-1!==a.indexOf(">")&&(a=a.replace(Ia,"&gt;")),-1!==a.indexOf('"')&&(a=a.replace(Ja,"&quot;")),-1!==a.indexOf("'")&&(a=a.replace(Ka,"&#39;")),-1!==a.indexOf("\x00")&&(a=a.replace(La,"&#0;"))),a=f.call(e,"iframe",{horizontalscrolling:"no",verticalscrolling:"no",scrolling:"no",width:"0px",height:"0px",seamless:"true",name:d.call("wt-audience-stream-",a),sandbox:"allow-scripts",style:"display: none;",src:b}),N.appendChild(c,a)):(new Image).src=g}
var D={info:function(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];2===R&&qb.apply(void 0,n(["info"],c,!1))},log:function(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];R&&qb.apply(void 0,n(["log"],c,!1))},error:function(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];R&&qb.apply(void 0,n(["error"],c,!1))},display:function(c,a,b){R&&rb(c,a,b)},H:function(c){c={trackId:c.trackId,deid:c.D,type:c.type,maPluginVersion:"1.0.11",mcpVersion:c.xf,pixelVersion:(c.Y||
{}).version,pluginVersion:c.yf,sessionId:c.sessionId,userAgent:kb(),msg:c.I,src:c.src?c.src:"MCP"};var a="//t.mateti.net/t/l";y(window.widgetLoggingUrlBase)&&(a=window.widgetLoggingUrlBase);c=gb(a,c);sb(c,"","",!0)},Hd:sb};
function tb(){if(!ub&&"undefined"!==typeof window.wt_mcp_hide&&"function"===typeof window.wt_mcp_hide.show){ub=!0;var c=window.wt_mcp_hide;c.show();c.show=function(){};c.mcp=(new Date).getTime()-c.start;1===parseInt("".concat(10*Math.random()))&&(c="{def: ".concat(c.def,",duration: ").concat(c.duration,",mcp: ").concat(c.mcp,",timeout: ").concat(c.timeout,"}"),vb("stop: log",c),D.H({trackId:wb,type:"hide",I:c}));vb("stop: execute 'wt_mcp_hide.show' and show page content",window.wt_mcp_hide)}}
function vb(c,a){D.log("mcp.hide.".concat(c),a)}var T={},xb=0,ub=!1,wb="";function yb(c,a){wb=c.join(",");for(var b=0,d=c.length;b<d;b++){var e=c[b];"string"===typeof e&&""!==e&&"undefined"===typeof T[e]&&(xb++,T[e]=[],vb("register: ".concat(e," for async hide"),a))}}function zb(c,a,b){if("undefined"!==typeof T[c]){var d=T[c].indexOf(a);-1!==d&&(T[c].splice(d,1),vb("ready: '".concat(a,"' for ").concat(c),b));0===T[c].length&&(delete T[c],xb--)}0>=xb&&tb()}var Ab=vb;
function Bb(c){if(cb())throw c;}function Cb(c,a){c||Bb("Expected condition but got ".concat(c,": ").concat(c," ").concat(a))}function U(c,a){"string"!==typeof c&&Bb("Expected string but got ".concat(typeof c,": ").concat(c," ").concat(a))}function V(c,a){Array.isArray(c)||Bb("Expected array but got ".concat(typeof c,": ").concat(c," ").concat(a))}function Db(c){v(c)||Bb("Expected object but got ".concat(typeof c,": ").concat(c," ").concat(void 0))}
function Eb(c,a){("number"!==typeof c||isNaN(c))&&Bb("Expected number but got ".concat(typeof c,": ").concat(a?a:c))}function Fb(c,a){"boolean"!==typeof c&&Bb("Expected boolean but got ".concat(typeof c,": ").concat(a?a:c))}
function Gb(c,a,b){var d=!1;if("object"===typeof b){var e=b.Tb;d=b.zf||!1;var f=b.domain||void 0;var g=b.path||void 0;var k=b.Va}if(/[;=\s]/.test(c))throw Error("Invalid cookie name '".concat(c,"'"));if(/[;\r\n]/.test(a))throw Error("Invalid cookie value ".concat(a));void 0===k&&(k=-1);document.cookie="".concat(c,"=").concat(a).concat(f?";domain=".concat(f):"").concat(g?";path=".concat(g):"").concat(0>k?"":0===k?";expires=".concat((new Date(1970,1,1)).toUTCString()):";expires=".concat((new Date(Date.now()+
1E3*k)).toUTCString())).concat(d?";secure":"").concat(null!==e?";samesite=".concat(e):"")}function Hb(c,a){for(var b="".concat(c,"="),d=(document.cookie||"").split(";"),e=0,f;e<d.length;e++){f=Na(d[e]);if(0===f.lastIndexOf(b,0))return f.substring(b.length);if(f===c)return""}return a}function Ib(c){Gb(c,"",{Va:0,path:void 0,domain:void 0})}
function Jb(){if(!window.navigator.cookieEnabled)return!1;if(""!==document.cookie)return!0;Gb("MAPPWTTEST","1",{Va:60});if("1"!==Hb("MAPPWTTEST"))return!1;Ib("MAPPWTTEST");return!0}var Kb=[],Lb=[];function Mb(c){c={identifier:c.identifier,categoryFilters:c.categoryFilters,urlRegex:c.urlRegex};U(c.identifier);return c}function Nb(c){V(c.h);V(c.mb)}
function Ob(c){D.log("externalToFilterConfig",c);c&&v(c)||(c={inputKeys:[],placements:[]});var a={h:c.inputKeys||Kb,mb:w(c.placements)?I(c.placements,Mb):Lb};H(a.h,function(b,d){0===b.indexOf("productCategory_")&&(a.h[d]="productCategory")});Nb(a);return a}function Pb(c){D.log("externalToInsessionConfig",c);c={data:c.data||"",Cb:c.feed||"",h:c.inputKeys||[]};U(c.data);U(c.Cb);return c}
function Qb(c){c=c||{};D.log("extToServerConfig",c);c={filter:Ob(c.filter),gb:I(c.insession||[],Pb),na:c.serverInputKeys||{},ua:c.clientRules||[],D:c.deid};Db(c.filter);V(c.gb);V(c.ua);Db(c.na);return c}
function Rb(c,a,b,d,e){var f={method:a},g=c.split(".").pop();"html"!==g&&"json"!==g&&(f.credentials="include",f.headers={"Content-Type":"application/json"});"GET"!==a&&(f.body=F(b));window.fetch(c,f).then(function(k){if(!k.ok)throw k;return k.text()}).catch(function(k){e({code:k.status,text:k.statusText})}).then(function(k){d(k)})}function Sb(c,a,b){a=a?a:"POST";b=b?b:{};return new Promise(function(d,e){Rb(c,a,b,d,e)})}
var Tb=function(){function c(a,b){this.Wa=null;this.Vb="wt.mcp.w"+a.trackId;this.A=a;this.G={};this.sessionId=Oa(z()+String(parseInt("".concat(100*Math.random()),10)));if(Jb())try{this.sessionId=parseInt(Hb("wt_mcp_sid",this.sessionId));for(var d=0,e=document.domain,f=e.split(".");d<f.length-1&&-1===document.cookie.indexOf("wt_mcp_sid=".concat(this.sessionId));)e=f.slice(-1-++d).join("."),Gb("wt_mcp_sid","".concat(this.sessionId),{Va:1800,Tb:"Lax",domain:e});-1===document.cookie.indexOf("wt_mcp_sid=".concat(this.sessionId))&&
Gb("wt_mcp_sid","".concat(this.sessionId),{Va:1800,Tb:"Lax"})}catch(k){D.error("retrieving session cookie",k),D.H({pf:a.trackId,D:a.h.eid,sessionId:this.sessionId,type:"error",I:"retrieving session cookie - ".concat(k.message)})}else D.error("Cookies are disabled");if(!b)try{var g=ab(this.Vb)||{}}catch(k){g={},D.log("retrieving serverconfig store error",k),D.H({pf:a.trackId,D:a.h.eid,sessionId:this.sessionId,type:"error",I:"retrieving serverconfig store error - ".concat(k.message)})}D.log("serverdata: stored:",
g);v(g)&&(this.G=g)}c.prototype.get=function(a){D.log("serverConfig: retrieving data");if(null!==this.Wa)return this.Wa;this.Wa=null;var b=this.G.thirdParty||this.A.h.eid,d=this.G[b]||{};!d.data||18E5<z()-(d.lastContact||0)?(D.log("serverConfig: creating new sessionId"),d={lastContact:0,data:null,ia:null}):z()>d.dataInvalidation&&(D.log("serverConfig: invalidating cache"),d.data=null);a.sessionId=this.sessionId;d.lastContact=z();this.G[b]=d;if(v(this.G[b].ia)){d=this.G[b].ia;delete this.G[b].ia;try{Q(this.Vb,
this.G)}catch(f){D.error("Servercfg persist1 ".concat(f.message))}this.G[b].ia=d;return Promise.resolve(this.G[b].ia)}if(v(this.G[b].data)){try{Q(this.Vb,this.G)}catch(f){D.error("Servercfg persist2 ".concat(f.message))}this.G[b].ia=Qb(this.G[b].data);return Promise.resolve(this.G[b].ia)}var e=this;return this.Wa=(window.wt_masterExampleMockResponse?Promise.resolve(F(window.wt_masterExampleMockResponse)):Sb("".concat(this.A.Zb,"?cfg=1"),"POST",{trackId:this.A.trackId,placements:[],sessionId:a.sessionId,
pageId:a.Cc,url:this.A.url,withConfig:!0,inputKeys:{eid:this.A.h.eid,geid:this.A.h.geid,cdbeid:this.A.h.cdbeid,newVisitor:this.A.h.newVisitor},version:"1.0.11"})).then(function(f){try{var g=E(f).config||{}}catch(k){g="serverCfg parsing - ".concat(k.message),D.error("error parsing serverCfg",k),-1!==f.indexOf("<!DOCTYPE html")&&(g="serverCfg parsing response was a html doc"),D.H({trackId:e.A.trackId,D:b,type:"error",I:g,sessionId:a.sessionId,Y:e.A.X}),g={}}e.Wa=null;D.log("Got requested config data",
g);g.deid&&g.deid!==b&&(delete e.G[b],b=g.deid,e.G[b]={lastContact:z(),data:null,dataInvalidation:0},e.G.thirdParty=b);e.G[b].data=g;e.G[b].dataInvalidation=z()+18E5;delete e.G[b].ia;try{Q(e.Vb,e.G)}catch(k){D.error("Servercfg persist3 ".concat(k.message))}e.G[b].ia=Qb(g);return e.G[b].ia}).catch(function(f){D.error("error retrieving serverCfg",f);D.H({trackId:e.A.trackId,D:b,type:"error",I:"serverCfg thenCatch - ".concat(f),sessionId:a.sessionId,Y:e.A.X});return Qb({})})};return c}(),Symbol=function(){function c(a){var b=
this;this.hb=!1;this.type=a.type||"string";this.name=a.name||"";this.count=a.count||0;this.value="undefined"===typeof a.value?null:a.value;this.hc=0;this.g={};M("pageChange",function(){b.value=null;b.count=0;b.hc=0;b.aa=0})}c.prototype.get=function(){for(var a=0;a<arguments.length;a++);return this.value};c.prototype.Jc=function(a){this.g=a};c.prototype.update=function(){return this.g};c.prototype.clear=function(){this.value=null;this.aa=this.hc=this.count=0};return c}(),Ub=function(c){function a(){var b=
c.call(this,{type:"binary",name:"exit-intent"})||this;if(C())return b;b.hb=!0;b.wc=0;b.tc=hb();b.pd=-1!==ib().search("Trident")||-1!==ib().search("MSIE");b.Ea=!0;b.Rd=5;b.td=2;b.timeout=null;if(b.tc&&!(9<=jb()))return D.error("exit-intent behavior supported for ie 9+ only"),b;if(b.pd||b.tc)b.Rd=25;b.pd&&(b.td=-1);M("soloTab",function(d){b.Ea=d});J(document.documentElement,"mousemove",function(d){b.wc=d.clientY});J(document.documentElement,"mouseout",function(d){b.We(d)});return b}h(a,c);a.prototype.R=
function(){var b=this;D.log("ExitIntent: detected mouseout");this.value=1;this.count+=1;L("symbolUpdate",[this.name]);this.timeout&&window.clearTimeout(this.timeout);this.timeout=window.setTimeout(function(){b.value=0;b.timeout=null},500)};a.prototype.uf=function(b){return b<this.Rd&&-40<b&&this.wc-b>this.td};a.prototype.We=function(b){var d=b.relatedTarget;this.Ea?this.uf(b.clientY)&&(this.tc?30>this.wc&&(!d||this!==d||"HTML"===d.nodeName)&&this.R():d&&"HTML"!==d.nodeName||this.R()):D.info("ExitIntent: suppressed not solo")};
return a}(Symbol),Vb=function(c){function a(){var b=c.call(this,{type:"number",name:"engagement"})||this;b.hb=!0;b.gd=z();if(C())return b;b.qa=!0;b.dc=null;M("leaderTab",function(d){b.qa!==d&&(b.qa=d,window.clearInterval(b.dc),b.dc=null,b.value=0,d&&b.Dd())});b.Dd();return b}h(a,c);a.prototype.Dd=function(){var b=this;this.gd=z();this.dc=window.setInterval(function(){b.R()},1E3)};a.prototype.R=function(){this.value=(z()-this.gd)/1E3;this.count=1;L("symbolUpdate",[this.name])};return a}(Symbol),Wb=
function(c){function a(){var b=c.call(this,{type:"number",name:"inactivity"})||this;b.hb=!0;b.vc=z();if(C())return b;b.qa=!0;var d=0;M("activity",function(){window.clearInterval(d);b.qa&&(b.vc=z(),d=window.setInterval(function(){b.R()},1E3))});M("leaderTab",function(e){b.qa!==e&&(b.vc=z(),b.qa=e)});return b}h(a,c);a.prototype.R=function(){this.qa&&(this.value=(z()-this.vc)/1E3,this.count=1,L("symbolUpdate",[this.name]))};return a}(Symbol);function Xb(c,a){return c.call.apply(c.bind,[c,a])}
function Yb(c,a){if(!c)throw Error();return function(){return c.apply(a,[c,a])}}function Zb(c,a){return(Function.prototype.bind&&-1!==Function.prototype.bind.toString().indexOf("native code")?Xb:Yb).apply(null,[c,a])}
var $b=function(){function c(){}c.clear=function(a){window.clearTimeout(a)};c.Ra=function(a,b,d){if("function"===typeof a)d&&(a=Zb(a,d));else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:window.setTimeout(a,b||0)};return c}(),ac=function(){function c(a,b,d){this.qb=!1;this.lb=0;this.fc=[];this.listener=null!==d?Zb(a,d):a;this.interval=b;this.Wc=Zb(this.Se,this)}c.prototype.kd=function(a){this.fc=arguments;this.qb=!1;this.tb?this.Rb=z()+this.interval:this.tb=$b.Ra(this.Wc,
this.interval)};c.prototype.stop=function(){this.$c();this.Rb=null;this.qb=!1;this.fc=[]};c.prototype.pause=function(){++this.lb};c.prototype.resume=function(){this.lb&&(--this.lb,!this.lb&&this.qb&&this.dd())};c.prototype.Se=function(){this.$c();this.Rb?(this.tb=$b.Ra(this.Wc,this.Rb-z()),this.Rb=null):this.lb?this.qb=!0:this.dd()};c.prototype.$c=function(){this.tb&&($b.clear(this.tb),this.tb=null)};c.prototype.dd=function(){this.qb=!1;this.listener.apply(null,this.fc)};return c}(),bc=function(c){function a(b){function d(){}
var e=c.call(this,{type:"binary",name:b,value:0})||this;e.hb=!0;e.timeout=null;b=e.name;switch(e.name){case "blur":d=function(){e.R()};break;case "focus":var f=z(),g=!1;d=function(){(g=g||2E3<=z()-f)&&e.R()};break;case "scroll-up":case "scroll-down":b="scroll";var k=0,l=new ac(function(){var m=window.scrollY||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop,p=k-m;k=m;200<Math.abs(p)&&"scroll-".concat(0<p?"up":"down")===e.name&&e.R()},100,e);d=function(){l.kd()}}J(window,
b,function(){d()});return e}h(a,c);a.prototype.R=function(){var b=this;D.info("Action: detected action ".concat(this.name));this.value=1;this.count+=1;L("symbolUpdate",[this.name]);this.timeout&&window.clearTimeout(this.timeout);this.timeout=window.setTimeout(function(){b.value=0;b.timeout=null},500)};return a}(Symbol),cc={value:null,lastValue:null,count:0},dc=function(c){function a(b){b=c.call(this,b)||this;b.aa=0;return b}h(a,c);a.prototype.get=function(b,d){void 0===b&&(b="visit");void 0===d&&
(d="value");if("visit"===b)return"elapsed"===d?0===this.g.last?-1:Math.floor((z()-this.g.last)/1E3):this.g[d];switch(d){case "value":return this.value;case "count":return this.count;case "average":return this.hc;case "elapsed":return 0===this.aa?-1:Math.floor((z()-this.aa)/1E3)}return null};a.prototype.update=function(){return this.g};a.prototype.Jc=function(b){this.g=b};return a}(Symbol),ec=function(c){function a(b,d,e){void 0===e&&(e={value:null});b=c.call(this,{type:d,name:b,value:e.value})||this;
b.g={value:e.value||null};return b}h(a,c);a.prototype.update=function(b){if(this.value||"undefined"===typeof b)return this.g;this.value=y(b)?b.toLowerCase():b;this.g.value=this.value;return this.g};return a}(dc),fc=function(c){function a(b,d){b=c.call(this,{type:"prediction",name:b})||this;b.g={symbols:d.symbols||[],fn:d.fn||null,value:"",count:0,last:0};b.aa=0;return b}h(a,c);a.prototype.get=function(){function b(){}if(!this.g.fn||"string"!==typeof this.g.fn)return null;try{b=new Function("data",
"".concat(this.g.fn," return computeScore(data);"))}catch(d){D.error("error parsing prediction function ".concat(this.name),d),D.H({type:"error",I:"prediction function ".concat(this.name," parsing - ").concat(d.message)})}return{symbols:this.g.symbols,fn:b}};return a}(Symbol),gc=function(c){function a(b,d){void 0===d&&(d=cc);b=c.call(this,{type:"number",name:b})||this;b.g={value:d.value||null,lastValue:d.lastValue||null,count:d.count||0,last:d.last||0};b.g.average=b.g.value/b.g.count||0;b.aa=0;b.Ac=
-1!==b.name.indexOf("customSessionParameter")||-1!==b.name.indexOf("urmCategory");return b}h(a,c);a.prototype.update=function(b,d){var e=this;void 0===d&&(d=1);if("undefined"===typeof b)return this.g;this.count=d;this.value=Number(b);v(b)&&!w(b)?(this.value=Number(b.value),this.count=b.count||1):w(b)&&(this.value=0,this.count=d||0,H(b,function(f){f=Number(f);x(f)&&(e.count+=1,e.value+=f)}));if(isNaN(this.value))return this.count=this.value=0,this.g;this.aa=z();this.g.last=this.aa;this.g.count+=this.count;
null===this.g.value&&(this.g.value=0);this.g.value=this.Ac?this.value:this.g.value+this.value;this.g.lastValue=this.value;this.g.average=this.g.value/this.g.count||0;return this.g};return a}(dc),hc=function(c){function a(b,d){void 0===d&&(d=cc);b=c.call(this,{type:"binary",name:b})||this;b.g={value:d.value||null,lastValue:d.lastValue||null,count:d.count||0};return b}h(a,c);a.prototype.update=function(b,d){void 0===d&&(d=1);if("undefined"===typeof b)return this.g;this.count=d;this.value=Number(b);
this.aa=z();if(isNaN(this.value))return this.count=this.value=0,this.g;this.g.value=Number(b);this.g.lastValue=Number(b);this.g.count+=1;this.g.last=this.aa;return this.g};return a}(dc),ic=function(c){function a(b,d,e){void 0===d&&(d=cc);void 0===e&&(e="visit");b=c.call(this,{type:"string",name:b})||this;b.context=e;b.g={value:d.value||[],lastValue:d.lastValue||null,count:d.count||0,last:d.last||0};b.aa=0;b.Ac=-1!==b.name.indexOf("customSessionParameter")||-1!==b.name.indexOf("urmCategory");return b}
h(a,c);a.prototype.update=function(b,d){var e=this;void 0===d&&(d=1);if("undefined"===typeof b)return this.g;var f=b;v(b)&&!w(b)&&(f=b.value,d=b.count||1);this.value=f=w(f)?I(f,function(g){return y(g)?g.toLowerCase():String(g)}):y(f)?f.toLowerCase():String(f);this.count=d;b=w(this.value)?this.value:[this.value];this.aa=z();this.g.last=this.aa;this.g.count+=this.count;w(this.g.value)||(this.g.value=null===this.g.value?[]:[this.g.value]);H(b,function(g){g&&(e.g.value.push(g),100<e.g.value.length&&e.g.value.shift(),
sa(e.g.value))});b=this.g.value.length;0<b&&(b=this.g.value[b-1],this.Ac&&(this.g.value=[b]),this.g.lastValue=b);return this.g};return a}(dc),jc="mousemove mousedown mousewheel wheel touchstart touchmove keydown".split(" "),kc=function(){function c(){this.Nb=0;this.qa=this.Ea=!0;this.oc=this.sd=0;this.L=[];this.Ed=String(z()+Math.random())}c.prototype.Cd=function(a){20<this.oc||(Q("wt.mcp.lscom","".concat(this.Ed,"|").concat(a,"|").concat(this.Nb++))?this.oc=0:this.oc++)};c.prototype.stop=function(){window.clearInterval(this.interval);
H(this.L,function(a){Ca(a)});this.L=[];this.interval=null;this.Nb=0};c.R=function(a,b){L(a,b)};c.prototype.start=function(){var a=this;if(!C())if(!O.sc())D.error("Crosstab deactivating no storage found");else if(!(0<this.Nb)){this.Nb=1;this.L.push(J(window,"storage",function(d){if("wt.mcp.lscom"===d.key){var e=[];try{e=d.newValue.split("|")}catch(f){D.error("crosstab couldn't recieve new ping ".concat(d.newValue));return}e[0]!==a.Ed&&(a.sd=z(),d=e[1],c.R(d,!0),"activity"===d&&a.qa&&c.R("leaderTab",
!1))}}));var b=new ac(function(){c.R("activity",!0);a.Cd("activity");c.R("leaderTab",!0)},500,this);this.L.push(J(document,jc,function(d){b.kd(d)}));this.interval=window.setInterval(function(){a.sd<z()-1250?a.Ea||(a.Ea=!0,c.R("soloTab",!0)):a.Ea&&(a.Ea=!1,c.R("soloTab",!1));a.Cd("ping")},500)}};return c}(),W=new (function(){function c(){this.Lb={};this.jc=""}c.Ga=function(a){return a?y(a)?a.replace(/;$/,"").split(";"):x(a)?[a]:[]:[]};c.prototype.pc=function(a,b,d){var e="undefined"===typeof a.cid?
0:1;-1!==["0","undefined","null","empty","none"].indexOf(a.cid)&&(e=0);var f=a.couponValue;f&&!isNaN(f)&&(f=Number(f));var g=0;if(a.productSoldOut){var k=a.productSoldOut;y(k)?g="1"===k||"0"===k?"1"===k?1:0:"true"===k?1:0:x(k)?g=1===k?1:0:"boolean"===typeof k&&(g=k?1:0)}return{eid:a.eid,cid:e,"content-id":d||a.contentId,referrer:a.referrer,mediacode:a.mediacode,keyword:a.keyword,"link-id":a.linkId,"search-phrase-internal":a.searchPhraseInternal,url:window.location.href,currency:a.currency,"new-visitor":a.newVisitor?
1:0,product:a.product,productPrice:a.productPrice,productQuantity:a.productQuantity,"product-sold-out":g,productAction:a.productAction,orderId:a.orderId,orderValue:a.orderValue,coupon:f,country:a.country,region:a.region,city:a.city,zip:a.zip,operatingSystem:a.operatingSystem,deviceClass:a.deviceClass,"opt-out":"undefined"!==typeof b.optOut?Number(b.optOut):b.optOut}};c.prototype.Gc=function(a){var b="product-viewed";"buy"===a.productAction?b="product-ordered":"add"===a.productAction?b="product-added":
"del"===a.productAction?b="product-removed":"checkout"===a.productAction?b="product-checkout":"add-wl"===a.productAction?b="product-added-wishlist":"del-wl"===a.productAction&&(b="product-removed-wishlist");return b};c.prototype.Dc=function(a,b,d){H("productCategory contentGroup customParameter customCampaignParameter customEcommerceParameter customSessionParameter customClickParameter urmCategory crmCategory".split(" "),function(e){var f=a[e];if(f){var g="productCategory"===e?"product-category":
e;b[g]=[];for(var k in f)f.hasOwnProperty(k)&&("productCategory"===e&&d&&(b["".concat(d,"-category-").concat(k)]=c.Ga(f[k])),b["".concat(e,"-").concat(k)]=c.Ga(f[k]),b[g]=b[g].concat(c.Ga(f[k])))}});b.product&&(b["product-name"]=c.Ga(b.product),b["".concat(d,"-name")]=b["product-name"])};c.prototype.parse=function(a,b){var d=this;if("list"===a.productAction)return D.error("Pixel: productAction list not implemented yet!"),{};var e=a.contentId;y(e)&&(e=Na(e));var f=a.linkId;"undefined"!==typeof f&&
(D.info("Pixel: action request parsing ".concat(a.linkId)),e=this.jc,-1!==["wt_ignore","webtrekk_ignore"].indexOf(f)&&delete a.linkId);D.log("Pixel: rawAttrs:",a);f=this.pc(a,b,e);b=this.Gc(f);this.Dc(a,f,b);var g={};e&&e!==this.jc?(D.info("Pixel: page change detected ".concat(e)),g=da(f),this.jc=e,g["page-impression"]=1,this.Lb={},L("pageChange",!0)):(D.info("Pixel: page update detected"),t(f,function(p,u){var r=d.Lb[u];if(w(r)){a:if(r.length!==p.length)r=!1;else{for(var B=r.length,P=0;P<B;P++)if(r[P]!==
p[P]){r=!1;break a}r=!0}r||(g[u]=p)}else if(v(r)){a:{for(B in r)if(!(B in p)||r[B+""]!==p[B+""]){r=!1;break a}for(B in p)if(!(B in r)){r=!1;break a}r=!0}r||(g[u]=p)}else r!==p&&(g[u]=p)}),g.productAction&&(g.product=f.product,g.productPrice=f.productPrice,g.productQuantity=f.productQuantity,g.productAction=f.productAction),D.info("Pixel: cleaned list",g,this.Lb));this.Lb=da(f);if(q(g))return D.log("Pixel: nothing to update"),g;if(g.product){D.log("Pixel: updating product: ".concat(b));g[b]={value:0,
count:0};e=c.Ga(g.productPrice);f=c.Ga(g.productQuantity);for(var k=Math.max(e.length,f.length),l=0;l<k;l++){var m=f.length>l?parseInt(String(f[l])):1;g[b].value+=e.length>l?parseFloat(String(e[l])):0;g[b].count+=m}g["product-name"]=c.Ga(g.product);g["".concat(b,"-name")]=g["product-name"];delete g.product;delete g.productPrice;delete g.productQuantity;delete g.productAction}D.log("Pixel (input/output)",a,g);return g};return c}()),X=new (function(){function c(){this.ra={};this.g=null;this.K=[];this.kc=
new kc;this.L={Od:!1,storage:!1}}c.prototype.Hc=function(){D.log("store: saving visit data to localStorage");C()||(this.g["last-access"]=z(),O.sc()?(O.Qc(this.g),Q("wt.mcp.visit",this.g)):D.error("Store cant saveStore no storage found"))};c.prototype.Kd=function(a,b){var d=this;void 0===b&&(b=!1);var e=[];t(a,function(f,g){if("last-access"!==g&&v(f)){var k=d.g&&d.g[g];if(!(k&&k.last>=f.last)){if(-1!==d.K.indexOf(g)){if(!la(d.ra[g].Jc)||d.ra[g].hb||!f.last)return;d.ra[g].Jc(f)}else d.K.push(g),d.Ya(g,
f.type,"visit",f);e.push(g)}}});0===e.length?D.log("store: visitStore update didnt contain any new data"):(D.log("store: updating visit store with localStorage content for ".concat(e)),this.g=a,L("symbolUpdate",e),b&&this.Hc())};c.prototype.sf=function(a){var b=this,d=a;w(d)||(d=[a]);var e=!1;H(d,function(f){y(f.name)&&-1===b.K.indexOf(f.name)&&(b.K.push(f.name),f.data?b.Ya(f.name,f.type,f.store,f.data):b.Ya(f.name,f.type,f.store),e=!0)});e&&D.info("store: new updated whitelist (".concat(this.K,")"))};
c.prototype.Ld=function(a,b,d){"undefined"!==typeof b&&y(a)&&v(this.ra[a])&&(ca(this.g[a],this.ra[a].update(b,d)),L("symbolUpdate",[a]),this.Hc())};c.prototype.ja=function(a,b,d){return y(a)&&v(this.ra[a])?this.ra[a].get(b,d):null};c.prototype.Ya=function(a,b,d,e){void 0===d&&(d="visit");e=e||this.g[a];switch(a){case "exit-intent":this.kc.start();d=new Ub;break;case "engagement":this.kc.start();d=new Vb;break;case "inactivity":this.kc.start();d=new Wb;break;case "blur":case "focus":case "scroll-up":case "scroll-down":d=
new bc(a);break;case "opt-out":case "new-visitor":case "country":case "region":case "city":case "zip":case "cid":case "operatingSystem":case "deviceClass":d=new ec(a,b,e);break;default:d="prediction"===b?new fc(a,e):"number"===b?new gc(a,e):"binary"===b?new hc(a,e):new ic(a,e,d)}null!==d&&(this.ra[a]=d,this.g[a]||(this.g[a]=d.g,this.g[a].type=b))};c.prototype.me=function(a){var b=this;D.log("Store creating store for ".concat(a));if(null!==this.g)return Promise.resolve(this.g);this.g={};return O.gf(a).catch(function(d){D.error("store: loading crossdomain localStorage -> working locally",
d);return{}}).then(function(d){M("updateVisitStore",function(f){b.Kd(f,!0)});try{b.g=ab("wt.mcp.visit")||{}}catch(f){D.error("symbolStore getting visit store",f),b.g={},D.H({type:"error",I:"symbolStore getting visit store - ".concat(f.message)})}var e=!1;v(d)&&(d["last-access"]>b.g["last-access"]||!b.g["last-access"])?(D.info("store: version retrieved from iframe is newer than current one",d),b.g=d):(D.info("store: local version is newer than retrieved one",b.g),e=!0);v(b.g)||(b.g={});18E5<z()-b.g["last-access"]&&
(b.g={});e&&!q(b.g)&&O.Qc(b.g);t(b.g,function(f,g){"last-access"!==g&&(b.K.push(g),b.Ya(g,f.type,"visit",f))});b.L.Od||(b.L.Od=!0,M("updateWhiteList",function(f){b.sf(f)}));b.L.storage||(b.L.storage=!0,J(window,"storage",function(f){if("wt.mcp.visit"===f.key){D.log("store: detected change in localStorage");f=null;try{f=ab("wt.mcp.visit")||{}}catch(g){D.error("storageEvent: getting visit store",g),D.H({type:"error",I:"storageEvent getting visit store - ".concat(g.message)})}v(f)&&b.Kd(f)}}));return b.g})};
c.prototype.Ec=function(a,b,d){var e=this;void 0===a&&(a={});void 0===b&&(b={});void 0===d&&(d={});D.log("store: parsing inputKeys",a,b,d);var f={};ca(f,a,b);f=W.parse(f,d);var g=[];t(this.K,function(k){var l=f[k];if("undefined"!==typeof l){var m=e.ra[k];m?(l=m.update(l),C()||(e.g[k]?ca(e.g[k],l):(e.g[k]=l,D.error("store: a symbol has been update which didnt exist in visit object!"))),g.push(k)):D.error("store: couldnt find symbol instance from whitelist")}});0!==g.length&&(D.log("sending symbol update for ".concat(g)),
this.Hc(),L("symbolUpdate",g))};return c}()),lc={Ja:"",Xa:"",cmp:"",Bd:"",content:""};function mc(c){var a=null,b={};try{b=E(decodeURIComponent(Hb("wt_mcp_optin","{}")))}catch(d){}"undefined"!==typeof b[c]&&(a=b[c]);return a}
function nc(c,a){var b={};try{b=E(decodeURIComponent(Hb("wt_mcp_optin","{}")))}catch(e){}b[a]=c;c="{}";try{c=F(b)}catch(e){}c=encodeURIComponent(c);b=0;a=document.domain;for(var d=a.split(".");b<d.length-1&&-1===document.cookie.indexOf("wt_mcp_optin=".concat(c));)a=d.slice(-1-++b).join("."),Gb("wt_mcp_optin",c,{Va:86400,Tb:"/;SameSite=Lax",domain:a});-1===document.cookie.indexOf("wt_mcp_optin=".concat(c))&&Gb("wt_mcp_optin",c,{Va:86400,Tb:"/;SameSite=Lax"})}
function oc(c){var a=c.N;if(c.yc&&c.Ha){var b=null,d=mc(c.Ha);D.info("clientRule.preprocessOptIn: ".concat(c.j.cmp," current opt-in status > ").concat(d,"."),void 0,a);"object"===typeof a.h&&"object"===typeof a.h.urmCategory&&"string"===typeof a.h.urmCategory[c.Ob]?b=a.h.urmCategory[c.Ob]:"object"===typeof c.na&&"string"===typeof c.na[c.Ha]&&null===d&&(b=c.na[c.Ha]);d===b||"1"!==b&&"0"!==b||(D.info("clientRule.preprocessOptIn: ".concat(c.j.cmp," update/set opt-in status > ").concat(b,".")),nc(b,c.Ha));
"MCP"===c.type&&"1"===b&&window.setTimeout(function(){c.evaluate()},10)}}
var qc=function(){function c(a){var b=this;this.tf=function(d){if(!d)return d;var e="^";H(d.split(""),function(f){switch(f){case "*":e+=".*";break;case "?":e+=".?";break;case "(":case ")":case "[":case "]":case "$":case "^":case ".":case "{":case "}":case "|":case "\\":e+="\\".concat(f);break;default:e+=f}});return e+="$"};this.ld=function(d){var e=/(?:-(value|count|average|elapsed))?(?:-(last|session))?(?:-(number|binary|string))?$/,f=d.v.match(e);f&&3<=f.length&&(d.v=d.v.replace(e,""),f[2]&&(d.store=
"session"!==f[2]?"page":"visit"),f[1]&&(d.op=f[1]),f[3]&&(d.t=f[3]));return d};this.Yd=function(d){var e=[];H(d.i,function(f){f=b.ld({v:f});e.push({v:f.v,op:f.op,store:f.store,type:f.t});-1===b.F.K.indexOf(f.v)&&(b.F.K.push(f.v),b.ab.push({name:f.v,type:f.t,store:f.store}))});-1===b.F.K.indexOf(d.v)&&(b.F.K.push(d.v),b.ab.push({name:d.v,type:d.t,store:d.store,data:{fn:d.c,symbols:e}}))};this.Wd=function(d,e){d=b.ld(d);-1===b.F.K.indexOf(d.v)&&(b.F.K.push(d.v),b.ab.push({name:d.v,type:e.r.t,store:d.store}));
"elapsed"===d.op&&b.F.Fd.push({name:d.v,store:d.store,cf:e,value:e.r.v,ge:e.t})};this.Vd=function(d,e){if("string"===d.t){var f=d.v;-1!==["contains","nc"].indexOf(e.t)&&(f="*".concat(f,"*"));d.v=b.tf(f).toLowerCase()}};this.Ud=function(d,e){if(d.metric.l&&d.metric.l.v){var f=d.metric;b.counter=e||0;b.counter+=1;e={yb:0,label:"",oa:"".concat(b.F.data.vb,"-combined-").concat(b.counter),vb:"".concat(b.F.data.vb,"-combined-").concat(b.counter),Z:d.data,action:{type:"COMBINED",Re:f.l.v},j:{cmp:""}};b.zb(f,
d,b.counter);d.t=f.t;d.l={t:"identifier",v:"".concat(b.F.data.vb,"-combined-").concat(b.counter)};d.r={t:"number",v:f.r.v};delete d.data;delete d.metric;-1===b.F.K.indexOf(e.oa)&&(b.F.K.push(e.oa),b.ab.push({name:e.oa,type:"number",store:"visit"}));b.F.kb.clientRules[e.oa]||(b.F.kb.clientRules[e.oa]=new pc(e,b.F.N,b.F.kb,b.F.na))}};this.zb=function(d,e,f){if(d){var g=d.t;"prediction"===g&&d.v?b.Yd(d):"identifier"===g&&d.v?b.Wd(d,e):"combine"===g&&d.metric?b.Ud(d,f):-1!==["binary","number","string"].indexOf(g)?
b.Vd(d,e):(b.counter=b.counter?b.counter:f,b.zb(d.l,d,b.counter),b.zb(d.r,d,b.counter))}};this.ab=[];this.F=a;this.counter=0}c.prototype.Ve=function(){var a=this;this.F.K=[];H(this.F.fd,function(b){-1===a.F.K.indexOf(b.name)&&(a.F.K.push(b.name),a.ab.push(b))});this.F.Z&&this.zb(this.F.Z,this.F.Z);L("updateWhiteList",this.ab)};return c}(),rc=new (function(){function c(){var a=this;this.xd={and:function(b){var d=a.evaluate(c.right(b));"undefined"===typeof c.right(b)&&(d=!0);return d&&a.evaluate(c.left(b))},
or:function(b){return a.evaluate(c.left(b))||a.evaluate(c.right(b))},gt:function(b){return a.evaluate(c.left(b))>a.evaluate(c.right(b))},lt:function(b){return a.evaluate(c.left(b))<a.evaluate(c.right(b))},eq:function(b){return a.Ab(c.left(b),c.right(b))},ne:function(b){return!a.Ab(c.left(b),c.right(b))},nc:function(b){return!a.Ab(c.left(b),c.right(b))},contains:function(b){return a.Ab(c.left(b),c.right(b))},identifier:function(b){return X.ja(b.v,b.store,b.op)},string:function(b){if("string"!==typeof c.value(b))throw Error("literal string not string");
return c.value(b)},number:function(b){if("number"!==typeof c.value(b))throw Error("literal number not number");return c.value(b)},prediction:function(b){var d=X.ja(b.v,b.store,b.op);if(null===d||d&&"function"!==typeof d.fn)throw Error("prediction function not function");var e={};H(d.symbols,function(g){e[g.v+"-".concat(g.op).concat("visit"===g.store?"-session-":"-last-").concat(g.type)]=X.ja(g.v,g.store,g.op)});try{D.info("execute prediction ".concat(b.v),e);var f=d.fn(e);D.display(b.v,f,e)}catch(g){D.error("error executing prediction function ".concat(b.v),
g),D.H({type:"error",I:"prediction function ".concat(d.name," executing - ").concat(g.message)})}return f}}}c.prototype.Ab=function(a,b){a=this.evaluate(a);b=this.evaluate(b);if("undefined"===typeof a&&a===b)return!1;if(w(a)){for(var d=a.length;d--;){var e=a[d];if(y(e)&&(e===b||-1!==e.search(b)))return!0}return!1}return y(a)?a===b||-1!==a.search(b):b==a};c.left=function(a){return a.l};c.right=function(a){return a.r};c.value=function(a){return a.v};c.prototype.evaluate=function(a){if(!v(a))return!1;
var b=this.xd;if(!(null!==b&&a.t in b))throw Error("bad rule type ".concat(a.t));b=this.xd[a.t](a);if(R){var d="".concat(a.t," node");a.l&&a.r&&a.l.v&&a.r.v&&(d="".concat(a.l.v," ").concat(a.t," ").concat(a.r.v));D.info("evaluating rule; ".concat(d," => '").concat(b,"'"),a)}return b};return c}()),sc=[],tc=null,uc=function(){function c(a,b,d){D.info("TeaserHandler.ctor");a.data.Ma&&a.data.Na?(this.configuration=a,this.item=a.item,this.ta=a.ta||a.item,this.data={M:a.data,u:a.u},this.Ua="1"===d,this.type=
b,this.W=a.W,this.Sd={titlePlacement:["520","rank"],titleTeaser:["521","name"],type:["522","type"],views:["523",""],clicks:["524",""],pi:["525","pi"],titleCampaign:["526","content"],variant:["527","variant"],conf:["528","conf"],requestId:["529","requestId"],targetGroup:["530","targetGroup"],rule:["531","rule"],itemPage:["532","itemPage"],itemPosition:["533","itemPosition"],conversionType:["","cType"],conversionGoal:["","cGoal"],conversionValue:["","cValue"]},this.Td=this.Ua?0:1,this.df(),this.Md(this.data.M),
this.Md(this.data.u),this.item||"manual"===this.type||(D.log("TeaserHandler.ctor: passed item not present in DOM, switching to type manual"),this.type="manual"),"manual"!==this.type&&(this.Ua&&this.item.setAttribute(this.configuration.xb,F({ck:this.Fb()})),null===this.ta.parentNode?this.interval=this.setInterval():this.Z())):D.error("TeaserHandler.ctor: faulty configuration (titlePlacement and/or titleTeaser)",a.data.Ma,a.data.Na)}c.prototype.df=function(){D.info("TeaserHandler._setConversionData");
switch(this.type){case "reco":this.data.u.type=this.data.u.type?this.data.u.type:"product";this.data.u.ea=this.data.u.ea?this.data.u.ea:"order";this.data.u.value=this.data.u.value?this.data.u.value:"";break;case "overlay":this.data.u.type=this.data.u.type?this.data.u.type:"view";this.data.u.ea=this.data.u.ea?this.data.u.ea:"goal";this.data.u.value=this.data.u.value?this.data.u.value:"1";break;case "banner":case "custom":this.data.u.type=this.data.u.type?this.data.u.type:"click";this.data.u.ea=this.data.u.ea?
this.data.u.ea:"both";this.data.u.value=this.data.u.value?this.data.u.value:"1";break;case "manual":D.info("TeaserHandler.setConversionData: no default values for current type '".concat(this.type,"'"));break;default:D.error("TeaserHandler.setConversionData: unknown type '".concat(this.type,"'"))}};c.prototype.Md=function(a){t(a,function(b,d){"undefined"===typeof b||null===b?a[d]="":"number"===typeof b&&(a[d]=String(a[d]))})};c.prototype.setInterval=function(){var a=this;D.info("TeaserHandler._setInterval");
return window.setInterval(function(){null!==a.ta.parentNode&&(window.clearInterval(a.interval),D.info("TeaserHandler._setInterval: found parent element (parent)",[a.ta.parentNode]),a.Z())},100)};c.prototype.B=function(a){return this.Sd[a][this.Td]};c.prototype.Fb=function(a){var b={};b[this.B("titlePlacement")]=this.data.M.Ma;b[this.B("titleTeaser")]=this.data.M.Na;b[this.B("type")]=this.data.M.type;this.Ua&&(b[this.B("views")]="view"===this.data.M.type?"1":"",b[this.B("clicks")]="click"===this.data.M.type?
"1":"","click"===this.data.M.type||"view"===this.data.M.type)&&(b[this.B("type")]="");b[this.B("conf")]="";b[this.B("pi")]=this.data.M.Te;b[this.B("titleCampaign")]=this.data.M.La;b[this.B("variant")]=this.data.M.variant;b[this.B("requestId")]=this.data.M.requestId;b[this.B("targetGroup")]=this.data.M.kf;b[this.B("rule")]=this.data.M.bf;b[this.B("itemPage")]=this.data.M.Qe;b[this.B("itemPosition")]=this.data.M.qd;!this.Ua&&a&&(b[this.B("conversionType")]=this.configuration.jb.wb?"view":this.data.u.type,
b[this.B("conversionGoal")]=this.data.u.ea,b[this.B("conversionValue")]=this.data.u.value);return b};c.prototype.jb=function(a){D.info("TeaserHandler.manual: sending tracking data for ".concat(this.data.M.La));if(this.Ua)if(D.info("TeaserHandler.manual: detected V1 teaser tracking plugin"),a.tt&&la(a.tt.addClickParameter)){var b=this.Fb();a.tt.addClickParameter(b[this.B("titlePlacement")],b[this.B("titleTeaser")],b[this.B("type")],b[this.B("views")],b[this.B("clicks")],b[this.B("pi")],b[this.B("titleCampaign")],
b[this.B("variant")],b[this.B("conf")],this.configuration.jb.wb,b[this.B("requestId")],b[this.B("targetGroup")],b[this.B("rule")],b[this.B("itemPage")],b[this.B("itemPosition")])}else D.error("couldn't send tracking data for ".concat(this.data.M.La," -> no tracking pixel"),a);else a=this.W,window[a]=window[a]||[],window[a].push([this.data.M.type,this.Fb(!0)])};c.prototype.Z=function(){D.info("TeaserHandler.trigger");if(this.Ua){if(oa(window,"wt_tt","tt")){var a=window.wt_tt.tt;la(a.searchTeaser)&&
a.searchTeaser();la(a.setScrollPos)&&a.setScrollPos()}}else a=this.W,window[a]=window[a]||[],window[a].push({selector:this.item,exclude:[],data:this.Fb(),conversion:this.data.u})};return c}();function vc(){return{item:null,ta:null,jb:{wb:!1},data:{Ma:"",Na:"",type:"",Te:"",La:"",variant:"",requestId:"",kf:"",bf:"",Qe:"",qd:""},u:{type:"",ea:"",value:""},xb:"",W:"wt_ttv2"}}
function wc(c,a,b){D.info("wt.mcp.teaserHandler.create",c,a,b);try{return new uc(c,a,b)}catch(d){return D.error("wt.mcp.teaserHandler.create: ".concat(d)),null}}
function xc(c,a,b){D.info("invokeTeaserTracking (mcpState, options, teaserVersion)",c,a,b);if(c.Y||"1"!==b){var d=vc();d.data.type=a.ie?"click":"view";d.jb.wb=!0===a.wb;d.data.Ma=a.Ue;d.data.Na=a.ke;d.data.La=a.ic;d.data.variant=a.variant?a.variant:"campaign";d.item=a.item;d.u.ea="both";d.u.value="1";d.W=a.W;if(d=wc(d,a.Ka||"manual",b))try{d.jb(c.Y)}catch(e){D.error("invokeTeaserTracking: ".concat(e))}}else D.info("couldn't send tracking data for ".concat(a.ic," -> no pixel; polling for it")),sc.push(a),
null===tc&&(tc=window.setInterval(function(){c.Y&&(D.info("found a pixel instance; sending queued tracking requests"),window.clearInterval(tc),tc=null,sc.forEach(function(e){D.log("sending queued tracking data for ".concat(a.ic));xc(c,e,b)}),sc=[])},1E3))}var yc=xc,zc=function(){function c(a,b){this.width=a;this.height=b}c.te=function(a,b){return a===b?!0:a&&b?a.width===b.width&&a.height===b.height:!1};return c}();
function Ac(c){var a=N.m("style",{type:"text/css"});try{a.styleSheet?a.styleSheet.cssText=c:a.textContent?a.textContent=c:document.createTextNode&&N.appendChild(a,document.createTextNode(c))}catch(b){}N.appendChild(N.Ee(),a)}function getComputedStyle(c,a){var b=document;return b.defaultView&&b.defaultView.getComputedStyle&&(c=b.defaultView.getComputedStyle(c,null))?c[a]||c.getPropertyValue(a)||"":""}function Bc(c){return"number"===typeof c?"".concat(Math.round(c),"px"):c}
function Cc(c,a){c.style.height=Bc(a)}function Dc(c,a){c.style.width=Bc(a)}function Ec(c,a){if("string"===typeof a)a&&(c.style[a]=void 0);else for(var b in a){var d=b+"";d&&(c.style[d]=a[b+""])}}var Fc=getComputedStyle;function Gc(c){Gc[" "](c);return c}Gc[" "]=function(){for(var c=0;c<arguments.length;c++);};var Hc=Gc;function Ic(){}
var Jc=N.createElement("webtrekk"),Kc={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},Y={end:""},Lc;for(Lc in Kc)if("undefined"!==typeof Jc.style[Lc+""]){Y.end=Kc[Lc+""]+"";break}
var Mc=!1,Nc=!1,Oc=function(){function c(a,b,d,e,f){void 0===f&&(f=Ic);this.Ub=this.rd=this.da=this.S=null;this.wa=!1;this.ib=[];this.id=a;this.type=b;this.ed="wt-mcp-ol-".concat(a);this.options=d;this.qf=e;this.ff=f;this.rc=String(z());Mc||(Mc=!0,Ac(".wt-mcp-ol-fade {opacity: 0;-webkit-transition: opacity .3s linear;transition: opacity .3s linear;}.wt-mcp-ol-fade.wt-mcp-ol-in {opacity: 1;}.wt-mcp-ol-modal-open {overflow: hidden;}.wt-mcp-ol-modal {position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 99050;overflow: auto;overflow-y: hidden;-webkit-overflow-scrolling: touch;outline: 0;}.wt-mcp-ol-modal.wt-mcp-ol-fade .wt-mcp-ol-modal-dialog {-webkit-transition: -webkit-transform .3s ease-out;-moz-transition: -moz-transform .3s ease-out;-o-transition: -o-transform .3s ease-out;transition: transform .3s ease-out;-webkit-transform: translate(0, -25%);-ms-transform: translate(0, -25%);transform: translate(0, -25%);}.wt-mcp-ol-modal.wt-mcp-ol-in .wt-mcp-ol-modal-dialog {-webkit-transform: translate(0, 0);-ms-transform: translate(0, 0);transform: translate(0, 0);}.wt-mcp-ol-modal-dialog {position: absolute;width: auto;padding: 20px;box-sizing: border-box;}.wt-mcp-ol-modal-content {position: relative;background-color: #fff;background-clip: padding-box;border-radius: 6px;outline: none;-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);box-shadow: 0 3px 9px rgba(0, 0, 0, .5);overflow: hidden;}.wt-mcp-ol-modal-backdrop {position: fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 99040;background-color: #000;}.wt-mcp-ol-modal-backdrop.wt-mcp-ol-fade {filter: alpha(opacity=0);opacity: 0;}.wt-mcp-ol-modal-backdrop.wt-mcp-ol-in {filter: alpha(opacity=50);opacity: .5;}@media (min-width: 768px) {.wt-mcp-ol-modal-dialog {width: 100%;}.wt-mcp-ol-modal-content {-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);box-shadow: 0 5px 15px rgba(0, 0, 0, .5);}.wt-mcp-ol-modal-sm {width: 300px;}}@media (min-width: 992px) {.wt-mcp-ol-modal-lg {width: 900px;}}.wt-mcp-ol-modal-content {height: 400px;}.wt-mcp-ol-iframe {}.wt-mcp-ol-modal-close {position: absolute;top: 0.5rem;right: 0.5rem;width: 25px;height: 25px;border-radius: 50%;text-align: center;background-color: #000;}.wt-mcp-ol-modal-close > span:before {color: #fff;font-size: 20px;line-height: 1.3;font-family: Arial;content: '\\D7';}.wt-mcp-ol-modal-close:hover {text-decoration: none;opacity: 0.8;filter: alpha(opacity=80);cursor: pointer;}#wt_mcp_prediction {width: 30%;height: 30%;position: fixed;right: 1px;bottom: 1px;background: #8fbc13;border: 1px solid #97bf0d;overflow: scroll;border-radius: 10px;-moz-border-radius: 10px;-webkit-border-radius: 10px;box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);}"))}
c.prototype.zd=function(a){var b=this;H(a.getElementsByClassName("wt-mcp-ol-modal-close"),function(d){K(d,["click","touchend"],function(e){b.Hb(e)})});c.focus(a)};c.prototype.show=function(a){var b=this;if(!a&&Nc)return!1;Nc=!0;if(!this.S){D.log("Overlay: ".concat(this.id," wasnt preloaded, loading it now"));this.preload();if(this.Ub)return!0;this.Ub=window.setInterval(function(){b.S&&(window.clearInterval(b.Ub),b.Ub=null,b.show(!0))},10);return!0}if(this.wa)return!1;this.wa=!0;this.escape();this.Sc(function(){if(b.S){var d=
b.S;d.style.display="";Hc(d.offsetWidth);N.ec(d,"wt-mcp-ol-in");b.ff();b.se();Y?(K(d,Y.end,function(){b.zd(d)}),c.mc(d)):b.zd(d)}});this.ib.push(J(window,"message",function(d){var e=d.data;"wt-mcp-close-modal"===e?(D.log("Overlay ".concat(b.id,": got close modal event"),d),b.Hb(d)):"wt-mcp-track-click"===e&&(D.log("Overlay ".concat(b.id,": got tracking event"),d),b.qf(!0))}));return!0};c.prototype.Hb=function(a){var b=this,d=this.S;a&&a.preventDefault();this.wa&&(this.wa=!1,this.escape(),this.Id(),
N.Sb(d,"wt-mcp-ol-in"),Y.end?(K(d,Y.end,function(){b.nd()}),c.mc(d)):this.nd())};c.prototype.se=function(){var a=this;Ca(this.rd);this.rd=J(document,"focusin",function(b){"undefined"!==typeof b&&a.S&&a.S!==b.target&&!a.S.contains(b.target)&&c.focus(a.S)})};c.prototype.escape=function(){var a=this;if(this.wa){var b=J(window,"keyup",function(d){27===d.keyCode&&a.Hb()});this.ib.push(b)}else this.wa||Ba(this.S)};c.prototype.nd=function(){var a=this;this.S.style.display="none";this.Sc(function(){a.da.parentNode.removeChild(a.da);
Nc=!1;N.removeNode(a.S);a.Id();a.S=null;a.rc=String(z())})};c.prototype.Sc=function(a){var b=this;if(a)if(this.wa){this.da=N.m("div",{id:"wt-mcp-ol-bd",className:"wt-mcp-ol-modal-backdrop wt-mcp-ol-fade"});N.appendChild(document.body,this.da);var d=J(this.S,["click","touchend"],Zb(function(e){e.target===e.currentTarget&&b.Hb()},this));this.ib.push(d);Hc(this.da.offsetWidth);Ec(this.da,{opacity:this.options.Bc});Y?(K(this.da,Y.end,a),c.mc(this.da)):a()}else!this.wa&&this.da?(Ec(this.da,{opacity:0}),
Y&&0!==this.options.Bc?K(this.da,Y.end,a):a()):a&&a()};c.prototype.preload=function(){var a=this,b=N.getElementById(this.ed);if(b){if(b.getAttribute("data-inst")===this.rc)return;N.removeNode(b)}var d=this.options.we?"width: ":"max-width: ",e=N.m("div",{id:this.ed,"class":"wt-mcp-ol-modal wt-mcp-ol-fade",tabIndex:"-1",style:"display: none","data-inst":this.rc});b=[];this.options.height&&b.push("height: ".concat(this.options.height,"px"));this.options.width&&b.push("width: ".concat(this.options.width,
"px"));b=N.m("div",{"class":"wt-mcp-ol-modal-content",style:b.join("; ")});var f;"iframe"===this.type?f=N.m("iframe",{id:"wt-mcp-ol-iframe-".concat(this.id),"class":"wt-mcp-ol-iframe",horizontalscrolling:"no",verticalscrolling:"no",scrolling:"no",width:"100%",height:"100%",frameborder:"0",vspace:"0",hspace:"0",marginWidth:"0",marginHeight:"0",allowtransparency:"true",seamless:"true",target:"_parent",src:this.options.url}):"div"===this.type&&(f=N.m("div",{id:"wt-mcp-ol-div-".concat(this.id),"class":"wt-mcp-ol-div",
height:"100%"}));var g=[];this.options.width&&g.push("".concat(d).concat(this.options.width+40,"px"));switch(this.options.position){case "top":g.push("top: 0");g.push("left: 50%");g.push("transform: translateX(-50%) !important");break;case "right":g.push("right: 0");g.push("top: 50%");g.push("transform: translateY(-50%) !important");break;case "bottom":g.push("bottom: 0");g.push("left: 50%");g.push("transform: translateX(-50%) !important");break;case "left":g.push("left: 0");g.push("top: 50%");g.push("transform: translateY(-50%) !important");
break;case "center":g.push("top: 50%");g.push("left: 50%");g.push("transform: translateX(-50%) translateY(-50%) !important");break;case "custom":var k=d="0",l="0",m="0";this.options.ud&&(l=this.options.ud);this.options.vd&&(m=this.options.vd);g.push("margin: ".concat(m," ").concat(l));"left"===this.options.positionX?g.push("left: 0"):"right"===this.options.positionX?g.push("right: 0"):(g.push("left: 50%"),d="-50%");"top"===this.options.positionY?g.push("top: 0"):"bottom"===this.options.positionY?
g.push("bottom: 0"):(g.push("top: 50%"),k="-50%");g.push("transform: translateX(".concat(d,") translateY(").concat(k,") !important"))}g=N.m("div",{"class":"wt-mcp-ol-modal-dialog",style:g.join("; ")},b);this.options.ef&&N.appendChild(g,N.m("div",{"class":this.options.je||"wt-mcp-ol-modal-close","data-dismiss":"overlay"},N.createElement("span")));N.appendChild(e,g);f&&N.appendChild(b,f);document.body?(N.appendChild(document.body,e),this.S=e):document.addEventListener("DOMContentLoaded",function(){N.appendChild(document.body,
e);a.S=e})};c.prototype.Id=function(){H(this.ib,function(a){Ca(a)});this.ib=[]};c.focus=function(a){la(a.focus)&&a.focus()};c.mc=function(a){var b=!1;K(a,Y.end,function(){b=!0});setTimeout(function(){if(!b){var d=Y.end,e=va(a);if(e&&(d=e.L[d.toString()]))for(d=d.concat(),e=0;e<d.length;e++){var f=d[e];f&&!f.nb&&wa(f,null)}}},300)};return c}(),pc=function(){function c(a,b,d,e){void 0===d&&(d={});void 0===e&&(e={});this.Aa=null;this.Da=this.Db=!1;this.Ka=null;this.fd=[];this.Ob="";this.K=[];this.Fd=
[];this.type="MCP";if(a.action&&"COMBINED"!==a.action.type){a=a||{};var f=a.uuid,g=a.triggerUuid,k=a.campId,l=A(a.trigger,null),m=a.action;void 0===m&&(m={});var p=E(m.queryParams||"[]");w(p)||(p=[]);m={type:A(m.type,"LAYER"),url:A(m.url,""),width:m.width,height:m.height,position:A(m.position,"custom"),positionX:A(m.positionX,"center"),ud:A(m.marginX,"0px"),positionY:A(m.positionY,"top"),vd:A(m.marginY,"30px"),we:A(m.fixedLayout,!1),transition:A(m.transition,"slide-down"),Oc:A(m.trackConversions,
!1),Bc:1-A(m.overlayTransparency,50)/100,ef:A(m.showClosingButton,!1),je:m.closeClass,urlRegex:m.urlRegex,$a:A(m.sessionCount,-1),Ia:p,content:null};m.url&&(p=m.url,0===p.indexOf("//")?p=ka()+p:0!==p.indexOf("http")&&0!==p.indexOf("/")&&(p="".concat(ka(),"//").concat(p)),m.url=p);U(m.type,"invalid type");if("LAYER"===m.type||"CUSTOMHTML"===m.type)U(m.transition,"invalid transition"),Fb(m.Oc,"invalid trackConversions"),Eb(m.Bc,"invalid overlayTransparency");U(m.url,"invalid url");V(m.Ia,"invalid queryParams");
f={oa:f,vb:g,yb:k,Z:l,action:m,j:lc,yd:A(a.optIn,null)};a.titles&&(f.j={Ja:a.titles.rtb||"",Xa:a.titles.plc||"",cmp:a.titles.cmp||"",Bd:a.titles.segment||"",content:a.titles.content||""});U(f.j.cmp,"ClientRule has no cmp title");Cb(v(f.Z)||null===f.Z,"Trigger is not an object ".concat(f.j));a=f}this.id=a.oa;this.uid="".concat(Date.now()).concat(parseInt("".concat(1E5*Math.random())));this.data=a;this.yb=a.yb;this.pb="campaign-".concat(this.yb);this.j=a.j;this.Z=a.Z;this.action=a.action;this.N=b;this.Pb=
b.trackId;this.na=e;this.kb=d;this.store=d.storeHandle;this.Ha=(this.yc="string"===typeof a.yd)?String(a.yd):"";b=this.Ha.split("-");"string"===typeof b[1]&&(this.Ob=b[1]);this.Je()}c.prototype.eb=function(a,b){var d=this;void 0===a&&(a=10);void 0===b&&(b="");window.setTimeout(function(){b&&D.log(b);d.evaluate()},a)};c.prototype.Ge=function(){return-1!==this.action.$a&&(X.Ya(this.pb,"number","visit"),X.ja(this.pb,"visit","count")>=this.action.$a)?(D.log("clientRule: ".concat(this.j.cmp," sessionCount reached -> not registered.")),
!0):!1};c.prototype.Xd=function(){var a=this;w(this.action.Ia)&&0<this.action.Ia.length&&H(this.action.Ia,function(b){b=b.val;-1===b.indexOf("customSessionParameter")&&-1===b.indexOf("urmCategory")||a.fd.push({name:b,type:"string",store:"visit"})})};c.prototype.Nc=function(a){a=gb(this.N.Pd,{src:a,campaign:this.j.cmp,version:"1.0.11",type:1,deid:this.N.h.eid,acc:this.Pb,id:this.uid,t:z()});D.Hd(a,"","",!0)};c.prototype.rb=function(a){yc(this.kb,{Ue:this.j.Xa,ke:this.j.content,ic:this.j.cmp,wb:a?!1:
this.action.Oc,ie:a,Ka:a?"manual":this.Ka,W:this.N.W,item:"manual"!==this.Ka?N.getElementById(this.id):null},this.N.sb)};c.prototype.Yc=function(){var a=this,b=0,d=!1;H(this.Fd,function(e){var f=X.ja(e.name,e.store,"elapsed");try{var g=rc.evaluate(e.cf)}catch(k){D.error("clientRule.checkTimeSymbols: exception in ".concat(a.j.Ja),k);D.H({trackId:a.N.trackId,D:a.N.h.eid,type:"error",I:"clientRule.checkTimeSymbols: exception in ".concat(a.j.Ja," - ").concat(k.message),Y:a.N.X});return}if(g)d=!0;else if(-1!==
f){f=e.value-f;switch(e.ge){case "gt":f++;break;case "lt":f--}0>f||b&&b>f||(b=f)}});b?(D.info("clientRule: starting timeSymbol timer for ".concat(this.j.cmp)),this.eb(1E3*b,"clientRule: timeSymbol timer fired for ".concat(this.j.cmp))):d&&this.eb()};c.prototype.jf=function(){var a=this;M("symbolUpdate",function(b){if(!a.Da)if(a.Z||"AUDIENCESTREAM"!==a.action.type)for(var d in b){if(0<=G(a.K,b[d+""])){D.info("clientRule: symbol update received (".concat(a.j.cmp,") for ").concat(b));a.eb();break}}else D.info("clientRule: re-trigger (".concat(a.j.cmp,
"), if the page was updated (").concat(b,")")),a.eb()});M("pageChange",function(){a.Db=!1;a.Da=!1})};c.prototype.Me=function(){var a=this;""===this.action.url?this.type="MADE":C()?D.log("clientRule: stopping because in iframe ".concat(this.j.cmp)):(this.Ka="overlay",this.action.content=Sb(this.N.Yb+this.action.url,"GET").catch(function(b){D.error("clientRule: couldnt grab custom html content",b);D.H({trackId:a.N.trackId,D:a.N.h.eid,type:"error",I:"clientRule: couldnt grab custom html - ".concat(b),
Y:a.N.X});return""}),this.Aa=new Oc(this.id,"div",this.action,function(b){a.rb(b)},function(){S(a.j);a.Nc("Overlay - Custom HTML")}))};c.prototype.Ne=function(){var a=this;C()?D.log("clientRule: stopping because in iframe ".concat(this.j.cmp)):(this.Ka="overlay",this.action.url=gb(this.action.url||"",{wt_eid:this.N.h.eid,wt_t:z(),wt_mcp_parent:!0}),this.Aa=new Oc(this.id,"iframe",this.action,function(b){a.rb(b)},function(){S(a.j);a.Nc("Overlay - Layer")}))};c.prototype.Ke=function(){var a=this;this.Xd();
this.action.Oc=!1;this.Ka="manual";this.Aa={show:function(){D.log("clientRule: ".concat(a.j.cmp," triggered audience stream tracking."));var b=a.action.url;if(w(a.action.Ia)&&0<a.action.Ia.length){var d=a.kb.xa[a.Pb].T.inputKeys,e=W.pc(d,{},"");W.Dc(d,e,W.Gc(e));e=ea(e,function(g){return ma(g)});var f={};ca(f,a.na,e);t(a.action.Ia,function(g){var k=g.val,l="";if(-1!==k.indexOf("customSessionParameter")||-1!==k.indexOf("urmCategory"))l=a.store.ja(k,"visit","lastValue");f[k]?l=f[k]:d[k]&&(l=d[k]);k=
{};k[g.name]=l;b=gb(b,k)})}S(a.j);D.Hd(b,a.j.cmp,a.N.Yb,!1,a.Pb,a.uid);a.Nc("Audience Stream");return!0}}};c.prototype.Le=function(){X.ja(this.id,"visit","count")||X.Ya(this.id,"number","visit");var a=this;this.Aa={show:function(){var b=X.ja(a.action.Re,"page","value");X.Ld(a.id,b,b);S(a.j);return!0}}};c.prototype.Je=function(){var a=this;if(!this.Ge()){this.j.oa=this.id;var b=this.j.type=this.action.type;"RECOMMENDATION"===b||"BANNER"===b||"BANNER_TEST"===b||"ABN_TEST"===b?this.type="MADE":"CUSTOMHTML"===
b?this.Me():"LAYER"===b?this.Ne():"REMARKETING"===b||"AUDIENCESTREAM"===b?this.Ke():"COMBINED"===b&&this.Le();(new qc(this)).Ve();oc(this);eb(this.id,this.Aa);if(this.action.urlRegex&&-1===window.location.href.search(this.action.urlRegex))D.log("clientRule: ".concat(this.j.cmp," urlRegex not fullfilled -> setting inactive.")),this.Da=!0;else if("MADE"!==this.type&&(this.Yc(),this.jf(),!this.Z))var d=window.setInterval(function(){document.body&&(window.clearInterval(d),d=null,a.eb(1))},100)}};c.prototype.evaluate=
function(a,b){void 0===a&&(a="MCP");void 0===b&&(b="");if(this.type!==a||b&&this.Pb!==b)return!1;if(this.Da)return D.log("clientRule: ".concat(this.j.cmp," is deactivated.")),!1;if(this.Db)return D.log("clientRule: ".concat(this.j.cmp," already fired -> suppressed.")),!1;if(-1!==this.action.$a&&X.ja(this.pb,"visit","count")>=this.action.$a)return D.log("clientRule: ".concat(this.j.cmp," sessionCount reached -> suppressed.")),this.Da=!0,!1;if(this.action.urlRegex&&-1===window.location.href.search(this.action.urlRegex))return D.log("clientRule: ".concat(this.j.cmp,
" urlRegex not fullfilled -> suppressed.")),this.Da=!0,!1;D.info("clientRule: eval rule ".concat(this.j.cmp," (").concat(this.id,") for type ").concat(a));try{if(null!==this.Z&&!rc.evaluate(this.Z))return this.Yc(),D.info("clientRule: ".concat(this.j.cmp," didnt eval true -> suppressed.")),!1}catch(d){return D.error("clientRule: exception in ".concat(this.j.Ja),d),D.H({trackId:this.N.trackId,D:this.N.h.eid,type:"error",I:"clientRule: exception in ".concat(this.j.Ja," - ").concat(d.message),Y:this.N.X}),
!1}a=!0;this.yc?this.Ha?(D.info("clientRule.checkOptIn: ".concat(this.j.cmp," need an opt-in.")),b=mc(this.Ob),"1"!==b&&(a=!1),D.info("clientRule.checkOptIn: ".concat(this.j.cmp," opt-in status: ").concat(a," (").concat(b,")"))):D.info("clientRule.checkOptIn: ".concat(this.j.cmp," opt-in key is empty.")):D.info("clientRule.checkOptIn: ".concat(this.j.cmp," doesn't need an opt-in."));if(!a)return!1;D.log("clientRule: ".concat(this.j.cmp," fired!"));if(this.Aa){a=this.Aa.show();D.log("clientRule: ".concat(this.j.cmp,
" action handle result (").concat(a,")!"));if(!a)return!1;"COMBINED"!==this.action.type&&this.rb(!1)}D.log("clientRule: ".concat(this.j.cmp," > ").concat(this.type," fired!"));"MCP"===this.type&&(this.Db=!0);D.log("clientRule: ".concat(this.j.cmp," > ").concat(this.type," fired (").concat(this.Db,")!"));-1!==this.action.$a&&(X.Ld(this.pb,1),X.ja(this.pb,"visit","count")>=this.action.$a&&(this.Da=!0));return!0};return c}();
function Pc(c,a){var b=Z,d=b.xa[a],e="(".concat(d.C.count,"/").concat(a,")");D.log("init.headCall ".concat(e));return(new Tb(c,void 0)).get(d).then(function(f){D.log("init.headCall ".concat(e,": got serverCfg"),f);d.ma=f;f.D&&f.D!==d.D?(d.D=f.D,c.h.eid=d.D):d.D&&!c.h.eid&&(c.h.eid=d.D);if(!f.ua||0===f.ua.length)return D.log("init.headCall ".concat(e,": rtb engine didnt start -> no rules")),f;D.info("init.headCall ".concat(e,": rtb engine starting"));return X.me(a).then(function(g){D.log("init.headCall ".concat(e,
": rtb engine started"),g);0<R&&(b.visitData=X.g);H(f.ua,function(k){var l=k.uuid;b.clientRules[l]?D.error("init.headCall ".concat(e,": addClientRule: rule already added:"),k):b.clientRules[l]=new pc(k,c,b,f.na)});b.store=g;X.Ec(c.h,f.na,c.X);return f})})}var Qc={};
function Rc(c,a,b){D.log("serverData.tracking: checking if insession data needs to be send");if(a&&w(a.gb)&&0<a.gb.length){D.log("serverData.tracking: Preparing sending of tracking data for config",a.gb);var d=c.trackId,e=[],f={},g="";H(a.gb,function(l){if("undefined"!==typeof c.h[l.data]){var m=c.h[l.data];"productCategory"===l.data&&(m=m["1"]);if(y(m)||x(m)||"boolean"===typeof m)H(l.h||[],function(p){"undefined"!==typeof c.h[p]&&(f[p]=c.h[p])}),w(l.h)&&l.h.length!==fa(f).length?D.log("serverData.tracking: No or not enough requested inputKey has been found for rule/key ",
l.Cb,l.data):(e.push({feedId:l.Cb,value:m}),g+="".concat(l.Cb,",").concat(m,","))}});if(0===e.length)D.log("serverData.tracking: No valid tracking data to send found");else{var k=[];t(f,function(l,m){k.push({name:m,value:l});g+="".concat(m,",").concat(l)});"undefined"===typeof Qc[d]&&(Qc[d]="");Qc[d]===g?D.log("serverData.tracking: ignore sending the same insession data",[e,k]):(Qc[d]=g,Sb(c.Qd,"POST",{data:e,inputKeys:k,sessionId:b,trackId:d}).catch(function(l){D.error("serverData.tracking: Error while sending tracking data",
l);D.H({trackId:c.trackId,D:c.h.eid,type:"error",I:"error retrieving serverCfg - ".concat(l),Y:c.X})}))}}}
function Sc(c){D.log("extToServerContent",c);var a=c.placement;a={ha:null,la:null,va:null,Jb:!0===c.isControlGroup,Pe:!0===c.isTesting,Za:c.requestID,s:{identifier:A(a.identifier,""),title:A(a.title,""),type:A(a.type,""),oa:a.uuid||"",sa:a.widgetConfig}};c.banner?a.ha={ha:c.banner.banner,Tc:c.banner.bannerCampaignTitle}:c.customHtml?a.va={ad:c.customHtml.contentTitle||"",Xc:c.customHtml.campTitle||"",le:c.customHtml.contentUrl||"",od:c.customHtml.html}:c.recos&&(a.la={items:c.recos.items,Nd:c.recos.valueMapping});
U(a.s.title);U(a.s.type);U(a.s.identifier);return a}
var Tc=function(){function c(a,b,d){D.log("Banner.ctor");this.P=a;this.o=b;this.xc=d;this.identifier=c.Oa(this.o.s.identifier)}c.Oa=function(a){return/^[#.].+/.test(a)?a:/^[1-9]/.test(a)?"[id='".concat(a,"']"):"#".concat(a)};c.prototype.ze=function(a){if(!a)return null;var b=a.clientHeight,d=a.clientWidth,e=(a.getAttribute("width")||a.style.width).search(/%/);"define"===this.P.Ic&&(d=this.P.qe.split("x"),b=parseInt(d[0],10),d=parseInt(d[1],10));a=this.P.width/d;D.log("Banner.getDimension (".concat(this.identifier,
"): scaling image ").concat(this.P.height," -> ").concat(b));var f=this.P.height/b;isFinite(a)||(a=1);isFinite(f)||(f=1);e=!e&&d?b/d:null;var g=this.P.height/this.P.width;D.log("Banner.getDimensions (".concat(this.identifier,") box ratio:").concat(e," and img ratio: ").concat(g));return{height:b,width:d,Gb:f,$b:a,ratio:e,qc:g}};c.prototype.oe=function(a){var b=this.ze(a),d=N.m("img",{src:this.P.url}),e=N.m("div",null,N.m("a",{href:this.P.lf},d));e.style.overflow="hidden";e.style["text-align"]="center";
var f=vc();f.item=e;f.data.Ma=this.o.s.title;f.data.Na=this.P.title;f.data.La=this.o.ha.Tc;f.data.variant="campaign";f.data.requestId=this.o.Za;this.o.Pe?f.data.variant="testing":this.o.Jb&&(f.data.variant="control group");f.xb=this.xc.Lc;f.W=this.xc.W;wc(f,"banner",this.xc.sb);N.Ad(a);N.appendChild(a,e);"define"===this.P.Ic?(a=b.height,Dc(e,b.width),Cc(e,a),1>=b.$b&&1>=b.Gb?(b=this.P.height,Dc(d,this.P.width),Cc(d,b)):(D.log("Banner.buildWidget (".concat(this.identifier,"): scaling image ").concat(b.$b,
"/").concat(b.Gb)),b.Gb*this.P.width>=b.width&&b.$b*this.P.height<b.height?(D.log("Banner.buildWidget (".concat(this.identifier,"): width is being scaled")),d.style.width="".concat(b.width,"px")):b.Gb<b.$b?(D.log("Banner.buildWidget (".concat(this.identifier,"): width is being scaled")),d.style.width="".concat(b.width,"px")):(D.log("Banner.buildWidget (".concat(this.identifier,"): height is being scaled")),d.style.height="".concat(b.height,"px")))):"contain"===this.P.Ic&&(Dc(e,"100%"),Cc(e,"auto"),
e.style.lineHeight="0",d.style.maxWidth="".concat(this.P.width,"px"),b.ratio&&b.ratio<b.qc?(e=b.height,Dc(d,"auto"),Cc(d,e),D.log("Banner (".concat(this.identifier,") contains in the resize case: width auto, height ").concat(b.height))):!b.ratio&&5<b.height?(Dc(d,"100%"),Cc(d,"auto"),d.style.maxWidth="".concat(b.height/b.qc,"px"),D.log("Banner (".concat(this.identifier,") contains in the responsive case: width 100%, height auto, max-width ").concat(b.height/b.qc))):(Dc(d,"100%"),Cc(d,"auto"),D.log("Banner (".concat(this.identifier,
") contains in the responsive case: width 100%, height auto"))))};c.prototype.ee=function(){D.log("Banner.buildWidget (".concat(this.identifier,")"));var a=this;H(N.Eb(this.identifier),function(b){a.oe(b)})};c.prototype.start=function(){D.log("Banner.start (".concat(this.identifier,")"));0>=N.Eb(this.identifier).length?D.error("Banner.start (".concat(this.identifier,"): couldnt find the target element ").concat(this.identifier)):this.ee()};return c}(),Uc=function(){function c(a,b){this.cc="wt-mcp-html-script-";
this.item=null;this.ob=[];D.log("CustomHtml.ctor");this.o=a;this.T=b;this.identifier=c.Oa(this.o.s.identifier);this.ta=N.Eb(this.identifier);this.Mb=this.o.va.od;0>=this.ta.length?D.error("customHtml.create: couldnt find element",this.identifier):y(this.Mb)||D.error("customHtml.create: no markup given")}c.Oa=function(a){return/^[#.].+/.test(a)?a:/^[1-9]/.test(a)?"[id='".concat(a,"']"):"#".concat(a)};c.prototype.$e=function(a){var b=this;D.log("CustomHtml.replaceScriptTags (markup)",a);return a.replace(/<script(.*?)>([\s\S]*?)<\/script>/gmi,
function(d,e,f){return b.af(d,e,f)})};c.prototype.af=function(a,b,d){D.log("CustomHtml.replaceScriptTagsMatchHandler (match, attrs, content)",[a,b,d]);b=N.createElement("div");b.innerHTML=a;a=b.firstChild;b={};for(var e=0;e<a.attributes.length;e++){var f=a.attributes[e];b[f.nodeName]=f.nodeValue}this.ob.push(N.m("script",b,d));return"<div class='".concat(this.cc).concat(this.ob.length,"'></div>")};c.prototype.Ie=function(){var a=this;D.log("CustomHtml.includeScriptTags",this.ob);H(this.ob,function(b,
d){var e=N.Ae("".concat(a.cc).concat(d+1),a.item);e?N.appendChild(e,b):D.error("Couldnt find script tag selector ".concat(a.cc).concat(d+1))});this.ob=[]};c.prototype.rb=function(a){D.log("CustomHtml._teaserTracking");var b=vc();b.item=a;b.data.Ma=this.o.s.title;b.data.Na=this.o.va.ad;b.data.La=this.o.va.Xc;b.data.variant="campaign";b.data.requestId=this.o.Za;this.o.Jb&&(b.data.variant="control group");b.xb=this.T.Lc;b.W=this.T.W;wc(b,"custom",this.T.sb)};c.prototype.start=function(){var a=this;D.log("CustomHtml.append");
var b=this;H(this.ta,function(d){N.Ad(d);b.Mb=b.$e(a.Mb);b.item=N.createElement("div");b.item.innerHTML=b.Mb;b.Ie();N.appendChild(d,b.item);b.rb(d)})};return c}(),Vc=!1,Wc=function(){function c(a,b,d){this.Ta={};this.Kb=!1;this.Rc=this.Ba=this.Ca=this.ba=this.$=this.za=this.U=this.O=this.Pa=null;this.align="horizontal";D.log("Reco(".concat(a.s.identifier,").ctor"));this.A=a.s.sa;this.o=a;this.T=b;this.lc="wt-".concat(this.o.Za);this.J=a.s.identifier;this.identifier=c.Oa(this.J);this.V=d;this.A.id=
this.J;this.cb=new zc(0,0);this.ca={ac:null,bc:null};this.o.hd=this.o.hd||!1;this.o.Bb=this.o.Bb||!1}c.Oa=function(a){return/^[#.].+/.test(a)?a:/^[1-9]/.test(a)?"[id='".concat(a,"']"):"#".concat(a)};c.prototype.Fa=function(a,b){D.log("Reco(".concat(this.J,").loadPage (next:").concat(a,", isEndless:").concat(b,")"));var d=this;return function(){D.info("Reco(".concat(d.J,").loadPage.click (isSlideshowActive:").concat(d.Kb,")"));if(!d.Kb){d.Kb=!0;var e=void 0!==d.U.style.transitionDuration,f=parseFloat(d.U.getAttribute("data-transition-duration")),
g=0;if("vertical"===d.align){var k=d.U.offsetTop;var l=d.O.clientHeight;var m=d.U.clientHeight;var p="top"}else k=d.U.offsetLeft,l=d.O.clientWidth,m=d.U.clientWidth,p="left";a?g=b&&-k===m-l?0:-(k-l)>=m-l?-(m-l):k-l:0<-k-l&&(g=k+l);d.md(-g,l,m);e&&b&&0===g&&(d.U.style.transitionDuration="0s");d.U.style[p]="".concat(g,"px");window.setTimeout(function(){e&&(d.U.style.transitionDuration="".concat(f,"s"));d.Kb=!1},1E3*f)}}};c.prototype.md=function(a,b,d){null!==this.ba&&null!==this.$&&(0>=a?(N.ec(this.ba,
"disabled"),N.Sb(this.$,"disabled")):(a+b>=d?N.ec(this.$,"disabled"):N.Sb(this.$,"disabled"),N.Sb(this.ba,"disabled")))};c.prototype.Mc=function(a){D.info("Reco(".concat(this.J,").toggleAutoCarousel stop:").concat(a));this.Qa&&window.clearInterval(this.Qa);a?this.Rc&&window.clearTimeout(this.Rc):this.Qa=window.setInterval(this.Fa(!0,!0),1E3*this.A.fa.Qa)};c.prototype.Oe=function(){D.log("Reco(".concat(this.J,").injectCss"));Vc||(Ac(".wt-widget, .wt-widget * {box-sizing: border-box;}.wt-widget {height: 100%;width: 100%;overflow: hidden;position: relative;}.wt-widget-row:after, .wt-widget-row:before {display: table;content: ' ';clear: both;}.wt-widget-col {height: 100%;float: left;}.wt-widget-nav-outer {width: 39px;cursor: pointer;}.wt-widget-vertical .wt-widget-nav-outer {height: 39px;width: 100%;text-align: center;}.wt-widget-nav {height: 100%;width: 100%;display: inline-block;}.wt-widget-nav:before {display: block;}.wt-widget-nav.up:before,.wt-widget-nav.left:before {content: '<';}.wt-widget-nav.down:before,.wt-widget-nav.right:before {content: '>';}.wt-widget-nav.up:before,.wt-widget-nav.down:before {position: relative;top: 50%;transform: translateY(-50%) rotate(90deg);-ms-transform: translateY(-50%) rotate(90deg);}.wt-widget-nav.right,.wt-widget-nav.left {text-align: center;}.wt-widget-horizontal .wt-widget-nav,.wt-widget-cubical .wt-widget-nav,.wt-widget-nav.right:before,.wt-widget-nav.left:before {position: relative;top: 50%;transform: translateY(-50%);-ms-transform: translateY(-50%);}.wt-reco-wrapper-outer {height: 100%;margin: 0;padding: 0;position: relative;overflow: hidden;}.wt-reco-wrapper-inner {height: 100%;margin: 0;padding: 0;display: block;list-style-type: none;position: absolute;left: 0;top: 0;overflow: hidden;white-space: nowrap;}.wt-widget-vertical .wt-reco-wrapper-inner {height: auto;width: 100%;}.wt-widget-vertical .wt-reco-item {width: auto;display: block;}.wt-reco-item img {max-width: 100%;height: auto;}.wt-reco-item {height: 100%;width: 160px;padding: 5px 8px;display: inline-block;white-space: nowrap;color: #333;font-size: 14px;text-align: center;text-decoration: none;}.wt-reco-item-empty {display: none;}.wt-reco-item a {display: block;max-height: 100%;overflow: hidden;color: inherit;text-decoration: inherit;}.wt-reco-item a:active, .wt-reco-item a:focus, .wt-reco-item a:visited {color: inherit;text-decoration: inherit;}.wt-reco-item img {max-height: 180px;width: auto;}.wt-widget-banner-front,.wt-widget-banner-back {display:none;}.wt-widget-banner a {height:100%;width: 100%;display:inline-block;}"),
Vc=!0);if(this.A.Sa&&y(this.A.Sa)){var a=this.identifier;this.A.Sa=this.A.Sa.replace(/(^|}|\*\/)\.(wt-widget-|wt-reco-)/gmi,function(d,e,f){return"".concat(e).concat(a," .").concat(f)});this.pa={};var b=this.A.Sa.match(/\.wt-reco-item\s{([^*]*)}/gmi);b&&y(b[0])&&(this.pa={width:(b[0].match(/min-width\s*:\s*(\d*)px/mi)||[])[1],height:(b[0].match(/min-height\s*:\s*(\d*)px/mi)||[])[1]},D.info("Reco(".concat(this.J,").injectCss: found reco item min width value ").concat(this.pa)));Ac(this.A.Sa)}};c.prototype.cd=
function(){D.log("Reco(".concat(this.J,").determineDimensions"));var a=this.o.Bb,b=this.Pa.clientHeight-1,d=this.Pa.clientWidth-1;null===this.ba||null===this.$||a||("vertical"!==this.align?(d-=this.ba.offsetWidth,d-=this.$.offsetWidth):(b-=this.ba.offsetHeight,b-=this.$.offsetHeight));"horizontal"!==this.align?(b-=this.Ba.offsetHeight,b-=this.Ca.offsetHeight):(d-=this.Ba.offsetWidth,d-=this.Ca.offsetWidth);return new zc(d,b)};c.prototype.rf=function(){var a=this.V.clientHeight,b=this.V.clientHeight;
this.o.hd&&null!==this.za?(a+=this.za.offsetHeight,a+=this.za.offsetTop):null!==this.za&&(b-=this.za.offsetHeight,b-=this.za.offsetTop);"vertical"!==this.align||this.o.Bb||null===this.ba||null===this.$||(b-=this.ba.offsetHeight,b-=this.$.offsetHeight);"horizontal"!==this.align&&(b-=this.Ca.offsetHeight,b-=this.Ba.offsetHeight);this.V.style.height="".concat(a,"px");this.O.parentElement.style.height="".concat(b,"px")};c.prototype.fe=function(){var a=this;D.log("Reco(".concat(this.J,").buildWidgetScaffold"));
this.V.innerHTML="";var b=this.A.fa.jd;this.Pa=N.m("div",{id:this.lc,"class":"wt-widget wt-widget-reco wt-widget-".concat(this.align),style:"visibility: hidden;"});N.appendChild(this.V,this.Pa);b&&0<b.length&&""!==b[0]&&(this.za=N.m("div",{"class":"wt-widget-headline",id:"".concat(this.J,"-wt-widget-headline")},b[0]),N.appendChild(this.Pa,N.m("div",{"class":"wt-widget-row"},this.za)));this.Ca=this.Uc("front",this.A.ye||"");this.Ba=this.Uc("back",this.A.$d||"");this.o.la.items.length>this.A.fa.Xb?
(this.ba=this.Vc("vertical"===this.align?"up":"left"),this.$=this.Vc("vertical"===this.align?"down":"right"),this.ba.onclick=this.Fa(),this.$.onclick=this.Fa(!0),this.md(0,0,0),-1!==this.A.fa.Qa&&(this.Mc(),J(this.V,"mouseover",function(){D.info("Reco(".concat(a.J,") autoCarousel: mouseover detected -> stopping auto scroll"));a.Mc(!0)}),J(this.V,"mouseout",function(){D.info("Reco(".concat(a.J,") autoCarousel: mouseout detected -> continuing auto scroll"));a.Mc()}))):this.o.Bb=!0;this.O=N.m("div",
{"class":"wt-widget-col wt-reco-wrapper-outer"});b=[];"vertical"===this.align?(b.push(N.m("div",{"class":"wt-widget-row"},this.Ca)),b.push(N.m("div",{"class":"wt-widget-row"},this.ba)),b.push(N.m("div",{"class":"wt-widget-row"},this.O)),b.push(N.m("div",{"class":"wt-widget-row"},this.$)),b.push(N.m("div",{"class":"wt-widget-row"},this.Ba))):"cubical"===this.align?(b.push(N.m("div",{"class":"wt-widget-row"},this.Ca)),b.push(N.m("div",{"class":"wt-widget-row"},this.ba,this.O,this.$)),b.push(N.m("div",
{"class":"wt-widget-row"},this.Ba))):b.push(N.m("div",{"class":"wt-widget-row"},this.Ca,this.ba,this.O,this.$,this.Ba));N.Zd(this.Pa,b);this.cb=this.cd();this.O.style.width="".concat(this.cb.width,"px");this.rf();this.be();N.appendChild(this.O,this.U);this.Pa.style.visibility=""};c.prototype.Uc=function(a,b){D.log("Reco(".concat(this.J,").buildBanner suffix: ").concat(a,", link: ").concat(b));return N.m("div",{id:"".concat(this.J,"-wt-widget-banner-").concat(a),"class":"wt-widget-col wt-widget-banner wt-widget-banner-".concat(a)},
N.m("a",{href:b,target:"_blank"}))};c.prototype.Vc=function(a){D.log("Reco(".concat(this.J,").buildNavItem orientation: ").concat(a));return N.m("div",{"class":"wt-widget-col wt-widget-nav-outer"},N.m("span",{"class":"wt-widget-nav ".concat(a)}))};c.prototype.be=function(){var a=this;D.log("Reco(".concat(this.J,").buildReco"));var b=this.Zc(),d=this.o.la.items,e=Math.ceil(d.length/b)*b;this.U=this.ce(this.he(b,e));var f=this.A.fa.zc,g=!1;H(this.o.la.Nd,function(m,p){a.Ta[m.id]=p;"url"===m.dataType&&
(a.pe=p);!g&&0<=G(f,m.id)&&(g=!0)});if(f&&f.length){b=Math.floor(100/e*100)/100;for(var k=0;k<e;k++){var l=void 0;l=d[k]?this.de(k+1,b,d[k]):this.ae(k+1,b);N.appendChild(this.U,l)}}};c.prototype.ce=function(a){return N.m("ol",{"class":"wt-widget-row wt-reco-wrapper-inner",style:("vertical"===this.align?"top":"left")+": 0px; transition-duration: 0.8s; ".concat(a),"data-transition-duration":"0.8"})};c.prototype.he=function(a,b){return"vertical"!==this.align?"width: ".concat(this.O.offsetWidth/a*b,"px;"):
"height: ".concat(this.O.offsetHeight/a*b,"px;")};c.prototype.Zc=function(){var a=this.A.fa.Xb;if(!this.pa)return a;"vertical"===this.align?this.pa.height&&this.O.offsetHeight/a<this.pa.height&&(a=parseInt("".concat(this.O.offsetHeight/this.pa.height))):this.pa.width&&this.O.offsetWidth/a<this.pa.width&&(a=parseInt("".concat(this.O.offsetWidth/this.pa.width)));return a};c.prototype.ae=function(a,b){var d=N.m("a");a=N.m("li",{"class":"wt-reco-item wt-reco-item-slot-".concat(a," wt-reco-item-empty"),
style:"".concat("vertical"===this.align?"height":"width",": ").concat(b,"%;")});N.appendChild(a,d);return a};c.prototype.de=function(a,b,d){D.info("Reco(".concat(this.J,").buildRecoItem (itemObject, itemIndex)"),d,a,b);for(var e=this.A.fa.zc,f=ka(),g=[],k=0;k<e.length;k++)if(x(this.Ta[e[k]])){var l=this.Ta[e[k]],m=this.o.la.Nd[l].dataType||"text";l=d[l];"undefined"===typeof l&&(l="");switch(m){case "currency":l=l.split(".");l[1]&&1===l[1].length&&(l[1]+="0");l=l.join(this.A.fa.bb);l="".concat(this.A.fa.bd,
" ").concat(l);m="wt-widget-currency-field";break;case "number":l="0.0"===l?"":l.split(".").join(this.A.fa.bb);m="wt-widget-number-field";break;case "pictureUrl":"https:"===f&&"-"!==l&&""!==l&&(l=l.replace(/http:/i,"https:"));l=N.m("img",{src:l});m="wt-widget-image-field";break;case "url":l=N.m("a",{href:l,target:"_top"});m="wt-widget-url-field";break;default:"-"===l?m="":(m=l,l=this.A.fa.Kc,m.length>l&&(m="".concat(m.substring(0,l-3),"..."))),l=m,m="wt-widget-text-field"}m+=" wt-widget-category-".concat(e[k].toLowerCase().split(" ").join(""));
g.push(N.m("div",{"class":m},l))}e=N.m.apply(N,n(["a",{href:d[this.pe]||"#",target:"_top"}],g,!1));f="width";"vertical"===this.align&&(f="height");b=N.m("li",{"class":"wt-reco-item wt-reco-item-slot-".concat(a),style:"".concat(f,": ").concat(b,"%;")},e);f=vc();g=this.Ta.campaignTitle||this.Ta.ruleTitle;f.item=e;f.ta=this.U;f.data.Ma=this.o.s.title;f.data.Na=d[this.Ta.id];f.data.La=d[g];f.data.variant="campaign";f.data.requestId=this.o.Za;f.data.qd="".concat(a);this.o.Jb&&(f.data.variant="control group");
f.xb=this.T.Lc;f.W=this.T.W;wc(f,"reco",this.T.sb);return b};c.prototype.nf=function(a){if(a=a.touches[0]||a.changedTouches[0])this.ca.move=!1,this.ca.ac=a.clientX,this.ca.bc=a.clientY};c.prototype.mf=function(a){if(this.ca.ac&&this.ca.bc&&this.ca.move){D.info("Reco(".concat(this.J,").touchend: detected touch swipe to change page"));var b=a.touches[0]||a.changedTouches[0];b&&(a=this.ca.ac-b.clientX,b=this.ca.bc-b.clientY,Math.abs(a)>Math.abs(b)?0<a?this.Fa(!0)():this.Fa(!1)():0<b?this.Fa(!0)():this.Fa(!1)(),
this.ca.ac=null,this.ca.bc=null,this.ca.move=!1)}};c.prototype.start=function(){var a=this;D.log("Reco(".concat(this.J,").start"),this.V);if(null===this.V)D.error("Reco(".concat(this.J,").start: couldnt find the target element ").concat(this.identifier));else if(w(this.o.la.items)&&0!==this.o.la.items.length){var b=this.V.clientHeight/this.V.clientWidth;this.align=.8<b&&1.2>b?"cubical":this.V.clientHeight>this.V.clientWidth?"vertical":"horizontal";this.Oe();this.fe();var d=J(window,"resize",function(){D.log("Reco(".concat(a.J,
").resize ").concat(a.lc));if(N.getElementById(a.lc)){var e=a.cd();if(0!==e.width&&0!==e.height&&!zc.te(a.cb,e)){D.log("RecoWidget.resize: size changed!");a.cb=e;a.O.style.width="".concat(a.cb.width,"px");e=a.Zc();var f=Math.ceil(a.o.la.items.length/e)*e;"vertical"===a.align?a.U.style.height="".concat(a.O.offsetHeight/e*f,"px"):a.U.style.width="".concat(a.O.offsetWidth/e*f,"px");var g=Math.floor(100/f*100)/100;H(N.Ce("wt-reco-item",a.U),function(k){"vertical"===a.align?k.style.height="".concat(g,
"%"):k.style.width="".concat(g,"%")})}}else Ca(d)});this.V.addEventListener("touchstart",function(e){a.nf(e)});this.V.addEventListener("touchmove",function(e){a.ca.move=!0;e.preventDefault()});this.V.addEventListener("touchend",function(e){a.mf(e)})}else D.log("Reco(".concat(this.J,").start: no items found aborting.")),!0===this.o.Jb&&(D.log("Reco(".concat(this.J,").start: this is an empty contrl grp, sending tracking data.")),"1"===this.T.sb?this.T.X.tt.addClickParameter(this.o.s.title,"no visible controlgroup",
"","1","","","","control group","",!1,this.o.Za,"","","",""):(b=this.T.W,window[b]=window[b]||[],window[b].push(["view",{name:"no visible controlgroup",rank:this.o.s.title,content:"",variant:"control group",requestId:this.o.Za,targetGroup:"",rule:"",itemPage:"",itemPosition:""}])))};return c}(),Xc=function(){function c(){}c.Oa=function(a){return/^[#.].+/.test(a)?a:/^[1-9]/.test(a)?"[id='".concat(a,"']"):"#".concat(a)};c.prototype.start=function(a,b){H(N.Eb(c.Oa(a.s.identifier)),function(d){D.log("wt.mcp.recommend.create",
a,b);(new Wc(a,b,d)).start()})};return c}();
function Yc(c,a,b,d){var e=c.trackId;D.log("(".concat(e,") serverContent: grabing widgetData"));if(window.wt_masterExampleMockResponse)return Promise.resolve(I(window.wt_masterExampleMockResponse.content,Sc));var f={};f=b&&b.filter.h&&0<=b.filter.h.length?ea(c.h,function(p,u){return 0<=G(b.filter.h,u)}):c.h;d&&v(d.h)&&t(d.h,function(p,u){f[u]=p});f.eid||(f.eid=c.h.eid);var g=[];if(b&&b.filter.mb&&0<=b.filter.mb.length){var k=W.pc(c.h,{},"");W.Dc(c.h,k,W.Gc(k));H(b.filter.mb,function(p){w(p.categoryFilters)&&
H(p.categoryFilters,function(u){if(y(u.inputKey)&&ma(k[u.inputKey])){var r=k[u.inputKey];w(r)&&(r=r.join(";"));u.inputValue=r}});-1!==G(a,p.identifier)&&g.push(p)})}var l={trackId:e,url:c.url||document.location.href,withConfig:!1,inputKeys:f,placements:g};d&&v(d.request)&&t(d.request,function(p,u){l[u]=p});var m;return Sb(c.Zb,"POST",l).then(function(p){p=E(p).content||[];D.log("(".concat(e,") serverContent: grabing widgetConfigs"));if(!p||0===p.length)return D.log("(".concat(e,") serverContent: no content retrieved -> stopping")),
Promise.all([]);var u=[];m=I(p,Sc);H(m,function(r){var B=c.Yb+r.s.sa;"ONSITEDIV_CUSTOM_HTML"===r.s.type&&(B=c.Yb+r.va.le);r.la&&0===r.la.items.length?(D.error("(".concat(e,") serverContent: no reco items transmitted, stopping for this widget cfg"),r.s.identifier),u.push(Promise.resolve("[]"))):u.push(Sb(B,"GET"))});return Promise.all(u)}).then(function(p){D.log("(".concat(e,") serverContent: merging serverContent and config"),m,p);var u=[];H(p||[],function(r,B){var P=m[B].s;if(v(r))D.error("(".concat(e,
") serverContent: couldn't grab widgetConfig"),r.text),D.H({trackId:e,D:c.h.eid,type:"error",I:"serverContent: couldn't grab widgetConfig (".concat(P.sa,") - ").concat(r.text),Y:c.X}),m[B].He=!0,u.push(m[B]);else{try{var na=E(r)}catch(gd){na=r}w(na)&&w(na)&&!na.length||("ONSITEDIV_CUSTOM_HTML"===P.type?m[B].va.od=r:P.sa=0!==r.length?na:null,u.push(m[B]))}});return u}).catch(function(p){D.error("(".concat(e,") error retrieving serverContent"),p);D.H({trackId:e,D:c.h.eid,type:"error",I:"error retrieving serverContent (".concat(a,
")- ").concat(p),Y:c.X});return[]})}
function Zc(c,a,b){var d=[],e,f=!1;H(c,function(g){D.log("switch: ".concat(g.s.type),g.s.identifier);d.push(g.s.identifier);if(!g.He)switch(g.s.type){case "ONSITEDIV_BANNER":f=!0;e=E(g.ha.ha);S({identifier:g.s.identifier,type:g.s.type,Xa:g.s.title,cmp:g.ha.Tc,content:(e||{}).title||""});D.log("Banner.create",g.ha.ha);var k=E(g.ha.ha);if(k){var l=g.s.sa;D.log("Banner.externalToBannerConfig");D.log("banner scaling type and size",l.bannerScaling,l.bannerSize);var m={id:k.id};m.width=k.width||0;m.height=
k.height;m.title=k.title;m.url=k.url;m.lf=k.targetUrl;m.Ic=A(l.bannerScaling,"contain");m.qe=A(l.bannerSize,"250x250");Eb(m.id,"invalid id");Eb(m.width,"invalid width");(new Tc(m,g,a)).start()}break;case "ONSITEDIV_RECO":if(!v(g.s.sa))break;f=!0;S({identifier:g.s.identifier,type:g.s.type,Xa:g.s.title,cmp:"",content:""});k=g.s;l=g.s.sa;D.log("extToRecoConfig",l);m=l.customCss;var p=l.layout;D.log("wt.mcp.recommendDiv.externalToLayoutConfig",p);p={Qa:A(p.autoCarousel,-1),bd:A(p.currencySymbol,"\u20ac"),
re:A(p.displayLoadingAnimation,!1),jd:A(p.feedRowTitles,[]),zc:A(p.objectPropertyDisplayOrder,[]),Kc:A(p.shortenTitlesTo,40),bb:A(p.thousandSeparator,"comma"),Xb:A(p.visibleObjectCount,6)};switch(p.bb){case "comma":p.bb=",";break;case "point":p.bb="."}Eb(p.Qa,"autoCarousel");U(p.bd,"currencySymbol");Fb(p.re,"displayLoadingAnimation");V(p.jd,"feedRowTitles");V(p.zc,"objectPropertyDisplayOrder");Eb(p.Kc,"shortenTitlesTo");Cb(10<p.Kc,"shortenTitlesTo > 10");U(p.bb,"thousandSeparator");Eb(p.Xb,"visibleObjectCount");
Cb(0<p.Xb,"config.visibleObjectCount > 0");k.sa={id:"",Sa:m,fa:p,ye:l.frontBannerLink,$d:l.backBannerLink,version:parseInt("".concat(l.version))||0};1<=g.s.sa.version&&(D.log("wt.mcp.recommendDiv.create",g,a),(new Xc).start(g,a));break;case "ONSITEDIV_CUSTOM_HTML":f=!0;S({identifier:g.s.identifier,type:g.s.type,Xa:g.s.title,cmp:g.va.Xc,content:g.va.ad});D.log("customHtml.create identifier ".concat(g.s.identifier));(new Uc(g,a)).start();break;default:D.log("init.bodyCall ".concat(b,": unknown channelType ").concat(g.s.type))}});
return{xe:d,Ze:f}}function $c(c,a){a=a||[];for(var b=[],d=0;d<c.length;d++){var e=c[d];if(-1===a.indexOf(e)){var f=N.Be(/^[#.].+/.test(e)?e:/^[1-9]/.test(e)?"[id='".concat(e,"']"):"#".concat(e));if(f){var g=!1;g||"hidden"!==(Fc(f,"visibility")||f.style.visibility)||(g=!0);g||"none"!==(Fc(f,"display")||f.style.display)||(g=!0);g?D.log("init.grabIdentifier: skipping hidden identifier",e):b.push(e)}}}return b}
function ad(c,a,b){var d=Z,e=d.xa[a],f="(".concat(e.C.count,"/").concat(a,")"),g=[];D.log("init.bodyCall ".concat(f));null===e.C.head&&(e.C.head=Pc(c,a));return e.C.head.then(function(){e.D!==c.h.eid&&(c.h.eid=e.D);var k=[];if(null!==d.store&&e.ma.ua&&0!==e.ma.ua.length)try{X.Ec(c.h,{},c.X),t(d.clientRules,function(m){oc(m);var p=(m.data||{}).vb;p&&-1===k.indexOf(p)&&m.evaluate("MADE",a)&&(k.push(p),D.log("init.bodyCall ".concat(f,": RTB  ").concat(m.j.Ja," for MADE triggered")))}),D.log("init.bodyCall ".concat(f,
": got MADE triggerUUUids ").concat(k))}catch(m){zb(a,b,["init.bodyCall ".concat(f,": processing inputKeys and triggerUUIDs"),m]),D.error("init.bodyCall ".concat(f,": processing inputKeys and triggerUUIDs"),m),D.H({trackId:a,D:e.D,type:"error",I:"bodyCall processing inputKeys and triggerUUIDs - ".concat(m),sessionId:e.sessionId,Y:c.X})}e.Gd||Rc(c,e.ma,e.sessionId);if(0===g.length){var l=I(e.ma.filter.mb,function(m){return m.urlRegex&&-1===window.location.href.search(m.urlRegex)?(D.log("init.bodyCall ".concat(f,
": urlregex(").concat(m.urlRegex,") not fullfilled for identifier ").concat(m.identifier)),""):m.identifier});sa(l);g=$c(l,e.ka);if(0===g.length)return D.log("init.bodyCall ".concat(f,": couldn't find any configured identifier (whiteList, blackList)"),l," || ",e.ka),Promise.resolve([]);D.log("init.bodyCall ".concat(f,": grabbed identifier (found, whiteList, blackList)"),g,l,e.ka)}e.ka=e.ka.concat(g);return Yc(c,g,e.ma,{request:{sessionId:e.sessionId,pageId:e.Cc},h:{triggerUuids:k}})}).then(function(k){D.log("init.bodyCall ".concat(f,
": process serverContents"),k);var l=Zc(k,c,f),m=l.xe;l.Ze?(Ab("rendering: '".concat(b,"' start timeout after 200ms for ").concat(a),k),window.setTimeout(function(){Ab("rendering: '".concat(b,"' start timeout for ").concat(a),k);zb(a,b,["after rendering",k]);tb()},200)):zb(a,b,["skipped rendering",k]);var p=x(window.wt_mcp_identifier_count)?window.wt_mcp_identifier_count:3;H(g,function(u){-1===m.indexOf(u)&&(e.C.fb[u]=e.C.fb[u]?++e.C.fb[u]:1,e.C.fb[u]>=p?D.log("init.bodyCall ".concat(f,": not unflagging ").concat(u,
" because of too many request tries")):(ra(e.ka,u),D.info("init.bodyCall ".concat(f,": unflagging ").concat(u," which was returned empty"),e.ka)))})}).catch(function(k){zb(a,b,["init.bodyCall ".concat(f,": sth. happened"),k]);D.error("init.bodyCall ".concat(f,": sth. happened"),k);D.H({trackId:a,D:c.h.eid,type:"error",I:"bodyCall sth. happened - ".concat(k),sessionId:e.sessionId,Y:c.X})})}
function bd(c,a,b){if(!y(a)||""===a)return D.error("init: trackId is empty or not a string"),Promise.reject(!1);D.log("extToMCPCfg",b);b={trackId:A(a,b.trackId),h:b.inputKeys,Lc:A(b.teaserAttribute,"data-teaser"),sb:A(b.teaserVersion,"1"),W:A(b.teaserName,"wt_ttv2"),Zb:A(b.widgetServiceUrl,"//r.mateti.net/rdfs"),Yb:A(b.widgetConfigUrlBase,"//cdn.mateti.net"),Qd:A(b.widgetTrackingUrlBase,"//t.mateti.net/t/insession/data"),Pd:A(b.widgetAudienceStreamTrackingUrlBase,"//t.mateti.net/mcp/t/c"),Af:A(b.withConfig,
!0),X:b.trackingPixel};y(window.widgetServiceUrl)&&(b.Zb=window.widgetServiceUrl);y(window.widgetTrackingUrlBase)&&(b.Qd=window.widgetTrackingUrlBase);y(window.widgetAudienceStreamTrackingUrlBase)&&(b.Pd=window.widgetAudienceStreamTrackingUrlBase);Cb(y(b.trackId));U(b.Zb);var d=Z;b.X&&(d.Y=b.X);d.xa[a]=d.xa[a]||{Cc:Oa(z()+(b.h.eid||0)+parseInt("".concat(100*Math.random()),10)),ma:null,T:null,Gd:!1,ka:[],D:b.h.eid,C:{history:[],count:0,body:null,head:null,ka:[],fb:{}}};d=d.xa[a];d.D||D.error("(".concat(d.C.count,
"/").concat(a,") No eid has been passed for ").concat(c));d.C.count++;if("body"===c&&-1!==d.C.history.indexOf("body"))D.log("(".concat(d.C.count,"/").concat(a,") body was already processed, changing to update")),c="update";else if("update"===c&&-1===d.C.history.indexOf("body"))D.log("(".concat(d.C.count,"/").concat(a,") no body was processed, changing to body")),c="body";else if("head"===c&&-1!==d.C.history.indexOf("head"))return D.log("(".concat(d.C.count,"/").concat(a,") head was already processed. Skipping it.")),
Promise.reject(!1);if("body"===c){var e=[d];"undefined"!==typeof T[a]&&(T[a].push("body"),vb("save: '".concat("body","' for ").concat(a),e))}d.C.history.push(c);if("head"===c)return d.C.head=Pc(b,a),d.C.head;if("body"===c)return d.C.ka=[],d.C.body=ad(b,a,"body"),d.C.body;"update"===c?(c=Z,d=c.xa[a],b.h&&b.h.linkId&&(b.h.contentId||(b.h.contentId=d.T.inputKeys.contentId)),b.h&&!b.h.contentId?(D.log("init.update (".concat(d.C.count,"/").concat(a,"): received request without contentId")),a=Promise.resolve()):
(b.h.contentId===d.T.inputKeys.contentId?(D.log("init.update (".concat(d.C.count,"/").concat(a,"): received update with unchanged contentId, same page")),c.store&&d.ma.ua&&0!==d.ma.ua.length&&X.Ec(b.h,d.ma?d.ma.na:{},b.X),d.C.body=ad(b,a,"update"),d.T=b):(D.log("init.update (".concat(d.C.count,"/").concat(a,"): received update, new page")),d.Gd=!1,d.C.fb={},d.Cc=Oa(z()+(d.D||"0")+parseInt("".concat(100*Math.random()),10)),d.ka=[],d.C.history=["head","body"],d.C.body=ad(b,a,"update")),a=d.C.body)):
a=Promise.resolve();return a}
function cd(c){if(c.inputKeys){var a=c.inputKeys;a.mediacode&&(a.mediacode=decodeURIComponent(a.mediacode.replace(/\+/g," ")),a.keyword||(a.keyword="-"));a.keyword&&(a.keyword=decodeURIComponent(a.keyword.replace(/\+/g," ")));a.referrer&&(a.referrer=decodeURIComponent(a.referrer.replace(/\+/g," ")));if(!a.productCategory){var b={};t(a,function(g,k){if(0===k.lastIndexOf("productCategory",0)){var l=k.split("productCategory")[1];l&&(b[l]=g,delete a[k])}});q(b)||(a.productCategory=b)}else if(w(a.productCategory)){var d=
{};H(a.productCategory,function(g,k){d[k]=g});q(d)||(a.productCategory=d)}if(!a.contentGroup){var e={};t(a,function(g,k){if(0===k.lastIndexOf("contentCategory",0)){var l=k.split("contentCategory")[1];l&&(e[l]=g,delete a[k])}});q(e)||(a.contentGroup=e)}var f={};t(a,function(g,k){if(!v(g)||v(g)&&!q(g))f[k]=g});c.inputKeys=f}}
var ed=function(){function c(a){this.ya=[];this.identifier="";this.uc=!1;this.ue=a}c.prototype.next=function(){var a=this;if(0>=this.ya.length)D.log("PromiseQueue (".concat(this.identifier,"): queue is empty, stop executing")),this.uc=!1;else{var b=this.ya[0];this.ue.apply(this,b).then(function(d){D.log.apply(D,n(["PromiseQueue (".concat(a.identifier,"): executor status"),d],b,!1))}).catch(function(d){D.error.apply(D,n(["PromiseQueue (".concat(a.identifier,"): executor error"),d],b,!1))}).finally(function(){a.ya.shift();
window.setTimeout(function(){0<a.ya.length&&D.log.apply(D,n(["PromiseQueue (".concat(a.identifier,"): execute next")],a.ya[0],!1));a.next()},200)})}};c.prototype.start=function(){!this.uc&&0<this.ya.length&&(this.uc=!0,D.log.apply(D,n(["PromiseQueue (".concat(this.identifier,"): execute next")],this.ya[0],!1)),this.next())};c.prototype.add=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];D.log.apply(D,n(["PromiseQueue (".concat(this.identifier,"): add data")],a,!1));this.ya.push(a);
this.start()};c.Fe=function(a){var b=dd;"undefined"===typeof c.Ib[a]&&(c.Ib[a]=new c(b),c.Ib[a].identifier=a);return c.Ib[a]};c.Ib={};return c}(),Z={xa:{},store:null,clientRules:{},serverCfg:{},storeHandle:{},visitData:{},Y:null};function dd(c,a,b){return bd(c,a,b).then(function(){Z.xa[a].T=b;return Promise.resolve(!0)}).catch(function(d){return Promise.reject(d)})}
function fd(c,a){D.log("init.MAIN",c,a);if("undefined"!==typeof Promise&&"function"===typeof fetch){var b=a.trackId,d=a.trackId;if(!w(d)){if(!y(d)){D.error("init: trackId doesnt have a valid format (".concat(d,")"));return}D.error("init: string trackId found, converting to array (".concat(d,")"));b=[d]}a.optOut||a.trackingPixel&&a.trackingPixel.optOut?(tb(),D.log("init: detected webtrekk optOut cookie. Disabling MCP"),Q("wt.mcp.optOut",1)):"head"===c&&ab("wt.mcp.optOut")?(tb(),D.log("init: detected webtrekk optOut cookie from previous pi. Disabling MCP")):
(cd(a),"head"===c&&yb(b,[c,a]),H(b,function(e){ed.Fe(e).add(c,e,a)}))}else tb(),D.log("init: stopping execution because required features are not supported"),D.H({trackId:a.trackId,type:"info",I:"stopping execution because required features are not supported"})}
(function(c){function a(d){try{w(d)&&fd(d[0],d[1])}catch(e){tb(),D.error("MCPinit: catching exception",e),D.H({type:"error",I:"MCPinit entry - ".concat(e.message)})}}if(v(c)&&!w(c))return window.wt_mcp_config;for(var b=0;b<c.length;b++)a(c[b]);window.wt_mcp_config={push:a,length:0,version:"1.0.11",mcpLoaded:!0,setDebug:function(d){Q("wt.mcp.debug",d||1);window.location.reload()},setPrediction:function(d){Q("wt.mcp.prediction",d||1);window.location.reload()},clearCache:function(d){Q("wt.mcp.debug",
"1");try{window.localStorage.removeItem("wt.mcp.visit")}catch(e){}t(window.localStorage,function(e,f){if(-1!==f.indexOf("wt.mcp.w"))try{window.localStorage.removeItem(f)}catch(g){}});Ib("wt_mcp_sid");"string"===typeof d&&window.wt&&window.wt.setCookie&&window.wt.setCookie("wt3_eid",";".concat(d));O.Qc({});window.location.reload()}};cb()&&(window.wt_mcp_config.debug=Z);db()&&(window.wt_mcp_config.prediction=Z);return window.wt_mcp_config})(window.wt_mcp_config||[]);}.call(this))