var _tmr=_tmr||[];
(function(){function x(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function B(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}function Y(a){for(var b="",c,d=0;d<a;d++)c=16*Math.random()|0,b+=c.toString(16);return b}function q(){return(new Date).getTime()}function sa(){var a="tmr"+(""+Math.random()).slice(2);try{return G.setItem(a,a),G.removeItem(a),!0}catch(b){return!1}}function S(a){try{return G.getItem(Z+"_"+
a)}catch(b){}return null}function C(a,b){try{G.setItem(Z+"_"+a,b)}catch(c){}}function $(a){var b=";e="+escape("detect");k(r(a,!0,!1,!1)+b)}function h(){}function H(a){a&&"object"===typeof a&&(!t&&"id"in a)&&(t=a.id)}function aa(a){return a||"https:"==document.location.protocol||"chrome-extension:"==document.location.protocol?"https:":"http:"}function ta(a){return(a=!u?void 0:u[a])&&T?a-T:void 0}function ba(){if(u){for(var a=0,b="domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),
c=0;c<b.length;c++){var d=!u?void 0:u[b[c]];if(0<d&&(d<a||0==a))a=d}return a?a:void 0}}function k(a){var b=aa(D)+"//top-fwz1.mail.ru"+a;"function"===typeof navigator.sendBeacon&&!0===navigator.sendBeacon(b)||(a=new Image,a.src=b)}function I(a,b,c){if(!(b&&"object"===typeof b))return m&&console.warn("[TopMailRu]: Invalid event of "+a),null;var d={name:a,title:c.title||null};"id"in c&&!1!==c.id&&(d.id="id"in b&&b.id,!0!==c.id&&(d.id=d.id||c.id));if(m){var e=ca(b,{params:c.required,fn:c.fn});if(e.missed.length)return console.warn("[TopMailRu]"+
(d.id?"["+d.id+"]":"")+": Unspecified "+(1<e.missed.length&&e.missed.slice(0,-1).join(", ")+" and "||"")+e.missed.slice(-1)+" in "+a),null;var f=ca(b,{params:c.optional,fn:c.fn}),h=[].concat(e.values).concat(f.values),e=[].concat(e.missed).concat(f.missed);c.value&&(b="value"in b&&b.value,!0!==c.value&&(b=b||c.value),b?h.push("value: "+b):e.push("value"));d.value=h.length?"{ "+h.join(", ")+" }":"";d.empty=e.length?"("+(1<e.length?e.slice(0,-1).join(", ")+" and "+e.slice(-1)+" are":e.slice(-1)+" is")+
" empty)":""}return"id"in c&&!1!==c.id&&!d.id?(m&&console.warn("[TopMailRu]: Undefined counter ID of "+a+" "+d.value),null):d}function ca(a,b){var c=[],d=[],e,f;if(b.params)for(e in b.params)b.params.hasOwnProperty(e)&&!1!==b.params[e]&&(f=e in a&&a[e],!0!==b.params[e]&&(f=f||b.params[e]),f?c.push(e+': "'+(b.fn?b.fn.call(self,e,f):f)+'"'):d&&d.push(e));return{values:c,missed:d}}function J(a){console.info("[TopMailRu]["+a.id+"]: "+(a.title||a.name)+" "+a.value+" "+a.empty)}function r(a,b,c,d){v&&C(K,
++s);var e="id"in a?a.id:t,f="url"in a?a.url:location.href,h="referrer"in a?a.referrer:document.referrer,l="title"in a?a.title:document.title,g;g=U;null===g&&(g=ua());g=null!==g?g?1:0:null;var m="userid"in a?a.userid:y||0===y?y:void 0,k;k=[];t&&e!==t&&k.push("sec");k=k.join(",");var n=window.screen;a.start=ba();b=(b?"/tracker":"/counter")+"?js=13"+(e?";id="+escape(e):"")+(f?";u="+escape(f):"")+(h?";r="+escape(h):"")+(a.start?";st="+escape(a.start):"")+("gender"in a?";gender="+escape(a.gender):"")+
("age"in a?";age="+escape(a.age):"")+("pid"in a?";pid="+escape(a.pid):"")+(void 0!==m?";userid="+escape(m):"")+(d&&l?";title="+encodeURIComponent(l):"")+(n?";s="+n.width+"*"+n.height:"")+";vp=";e=d=0;document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(d=document.documentElement.clientWidth,e=document.documentElement.clientHeight):"number"==typeof window.innerWidth&&(d=window.innerWidth,e=window.innerHeight);b=b+(""+d+"*"+e)+";touch="+va+";hds="+
wa+";flash="+V+";sid="+da+";ver="+ea;if(c){if(!u||!W)c="";else{c=[];c.push(W.type);c.push(W.redirectCount);c.push(T);for(d=0;d<fa.length;d++)c.push(ta(fa[d]));c=c.join("/")}c=";nt="+c}else c="";c=b+c+("device"in a?";device="+escape(a.device):"");var p;if("params"in a){b=escape;if(a=a.params)if(d=typeof a,"number"===d||"boolean"===d||"string"===d||a.nodeType||a===a.window)p="";else{e=[];for(p in a)if(a.hasOwnProperty(p)){f=a[p];d=typeof f;if("string"===d)f='"'+f.replace(/[\"\']/g,"\\$&")+'"';else if(!("number"===
d||"boolean"===d))continue;e.push('"'+p+'":'+f)}p=!e.length?"":"{"+e.join(",")+"}"}else p="";p=";params="+b(p)}else p="";return c+p+(null!==g?";detect="+g:"")+(v?";lvid="+escape(v?""+L+":"+q()+":"+s+":"+M:""):"")+(k?";opts="+escape(k):"")+";_="+Math.random()}function ga(a){a=";e="+escape("PVT/"+a);for(var b=0;b<l.length;b++)k(r(l[b],!0,!1,!0)+a)}function xa(){U=!0;ha(1);if(!ia&&!E){E=!0;for(var a=0;a<l.length;a++)$(l[a])}}function ya(){ha(0);U=!1}function ua(){var a;a=(a=ja.cookie.match(RegExp("(?:^|; )"+
ka.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):null;if(null===a)return null;a=a.split("|");if(2!==a.length)return null;var b=a[1],b=q()-b;if(0>b||b>la)return null;a=parseInt(a[0],10);return isNaN(a)?null:a}function ha(a){var b=q(),b=[a,b].join("|"),c=ka;a={path:"/",expires:la};var d=a.expires;"number"===typeof a.expires&&(d=new Date,d.setTime(d.getTime()+a.expires));d&&d.toUTCString&&(d=d.toUTCString());a.expires=d;var b=c+"="+encodeURIComponent(b),e;for(e in a)b+=
"; "+e,c=a[e],!0!==c&&(b+="="+c);ja.cookie=b}function N(){document.addEventListener?(B(document,"DOMContentLoaded",N),_tmr.onready()):document.attachEvent&&"complete"===document.readyState&&(B(document,"readystatechange",N),_tmr.onready())}function ma(){B(window,"load",ma);_tmr.onready();_tmr.onload()}function O(){B(window,"unload",O);B(window,"beforeunload",O);_tmr.unload()}if("[object Array]"===Object.prototype.toString.call(_tmr)){var n=window,g=navigator,ja=document,G=window.localStorage||null,
Z="tmr",v=sa(),E=!1,U=null,la=864E5,ka="tmr_detect",za=function(){function a(a,c){var d=document.createElement("div");d.setAttribute("class",String.fromCharCode(97,100,118,98,108,111,99,107,32,97,100,118,101,114,116,98,108,111,99,107,32,97,109,109,98,108,111,99,107,32,98,45,98,97,110,110,101,114,32,98,45,109,101,100,105,97,45,98,97,110,110,101,114,32,112,117,98,95,51,48,48,120,50,53,48,32,112,117,98,95,51,48,48,120,50,53,48,109,32,109,101,100,105,117,109,95,114,101,99,116,97,110,103,108,101,95,51,
48,48,95,50,53,48,32,112,117,98,95,55,50,56,120,57,48,32,108,101,97,100,101,114,98,111,97,114,100,95,55,50,56,95,57,48,32,119,105,100,101,95,115,107,121,115,99,114,97,112,101,114,95,49,54,48,95,54,48,48,32,119,105,100,101,95,115,107,121,115,99,114,97,112,101,114,95,49,54,48,120,54,48,48,32,116,101,120,116,45,97,100,32,116,101,120,116,65,100,32,116,101,120,116,95,97,100,32,116,101,120,116,95,97,100,115,32,116,101,120,116,45,97,100,115,32,116,101,120,116,45,97,100,45,108,105,110,107,115,32,97,100,95,
116,101,120,116,32,97,100,95,116,101,120,116,32,98,97,110,110,101,114,95,116,101,120,116,32,116,101,120,116,45,98,97,110,110,101,114,32,98,45,114,98,32,114,98,45,115,108,111,116,32,98,45,112,114,111,109,111,45,97,100,32,105,45,98,114,97,110,100,105,110,103,32,98,114,97,110,100,105,110,103,45,112,32,114,98,45,118,105,100,101,111,45,119,105,100,103,101,116,32,98,45,109,105,109,105,99,45,97,100,118,32,112,109,45,116,111,111,108,98,97,114,95,95,98,97,110,110,101,114,32,114,98,95,98,111,100,121,32,115,
116,105,99,107,121,45,115,112,114,105,110,103,115,32,97,100,118,95,115,108,111,116,95,49,32,98,97,110,110,101,114,95,50,52,48,32,98,108,111,99,107,95,115,104,97,114,101,32,97,99,116,105,111,110,45,45,115,104,97,114,101,32,115,104,97,114,101,108,105,115,116,32,106,115,45,98,97,110,110,101,114,32,100,105,114,101,99,116,32,112,99,45,109,105,109,105,99,32,116,103,98,45,98,97,110,110,101,114,32,121,97,100,105,114,101,99,116,32,106,115,45,112,114,111,109,111,45,112,111,112,117,112,32,109,45,115,117,98,
115,99,114,105,112,116,105,111,110,32,112,45,116,97,114,103,101,116,32,112,45,100,105,114,101,99,116,104,97,99,107,32,114,98,45,102,108,111,97,116,105,110,103,32,116,114,103,45,98,45,98,97,110,110,101,114,45,98,108,111,99,107));d.setAttribute("style","position: absolute !important; top: -9999px !important; left: -9999px !important; width: 1px !important; height: 1px !important;");d.setAttribute("id","trg-b-banners-1");d.setAttribute("data-view","SlotView.mimic");this.bait=document.body.appendChild(d);
this.bait.offsetParent;this.bait.offsetHeight;this.bait.offsetLeft;this.bait.offsetTop;this.bait.offsetWidth;this.bait.clientHeight;this.bait.clientWidth;this.loopNumber=0;this.fnPositive=a||null;this.fnNegative=c||null;var e=this;setTimeout(function(){e._checkBait.call(e)},1)}a.prototype._checkBait=function(){if(E)this._stop();else{var a=!1;null!==document.body.getAttribute("abp")||null===this.bait.offsetParent||0==this.bait.offsetHeight||0==this.bait.offsetLeft||0==this.bait.offsetTop||0==this.bait.offsetWidth||
0==this.bait.clientHeight||0==this.bait.clientWidth?a=!0:void 0!==window.getComputedStyle&&(a=window.getComputedStyle(this.bait,null),a="none"==a.getPropertyValue("display")||"hidden"==a.getPropertyValue("visibility"));(!0===a||10<=++this.loopNumber)&&this._stop();if(a&&this.fnPositive)try{this.fnPositive()}catch(c){}else if(!a&&10>this.loopNumber){var d=this;setTimeout(function(){d._checkBait.call(d)},50*this.loopNumber)}else try{this.fnNegative()}catch(e){}}};a.prototype._stop=function(){try{document.body.removeChild(this.bait)}catch(a){}};
return function(b,c){new a(b,c)}}(),ea="60.0.1",X=0,P=0,da=Y(16),y=null,Q=0,K="reqNum",s=v&&S(K);null===s?(s=0,v&&C(K,s)):s=parseInt(s,10);var M=v&&S("lvid"),L=v&&S("lvidTS");if(null===M||null===L)M=Y(32),L=""+q(),s=0,v&&(C("lvid",M),C("lvidTS",L),C(K,s));var t=0,l=[],F=[],R=[],w="string"===typeof location.hostname&&(-1!=location.hostname.search(/^odnoklassniki\.ru$/)||-1!=location.hostname.search(/\.odnoklassniki\.ru$/)||-1!=location.hostname.search(/^ok\.ru$/)||-1!=location.hostname.search(/\.ok\.ru$/)),
D="string"===typeof location.hostname&&(-1!=location.hostname.search(/^vk\.com$/)||-1!=location.hostname.search(/\.vk\.com$/)),z="string"===typeof location.hostname&&(-1!=location.hostname.search(/^lamoda\.ru$/)||-1!=location.hostname.search(/\.lamoda\.ru$/)),Aa="string"===typeof location.search&&-1!=location.search.search(/[?&]rb_clickid=/),m="string"===typeof location.search&&-1!=location.search.search(/[?&]tmr_debug=1(?:&|$)/),na=w||D||z,Ba=!Aa,Ca=w||D,Da=w||D,oa=w||D,ia=!1,va="ontouchstart"in
n||1<(g.maxTouchPoints||g.msMaxTouchPoints)?"1":"0",wa=window.devicePixelRatio||0,V="";if(g.plugins&&g.plugins["Shockwave Flash"])V=g.plugins["Shockwave Flash"].description.split(" ")[2];else if(window.ActiveXObject)try{var A=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),A=A.GetVariable("$version"),A=A.split(" ")[1].split(","),V=A[0]+"."+A[1]}catch(Ea){}var n=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},u=n.timing||{},W=n.navigation||{},fa="unloadEventStart unloadEventEnd redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart connectEnd secureConnectionStart requestStart responseStart responseEnd domLoading domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),
T=!u?void 0:u.navigationStart;h.prototype.pageView=function(a){H(a);var b;if(b=a&&"object"===typeof a)if(b="id"in a)if(b=5>F.length){b:{for(b=0;b<F.length;b++)if(F[b]===a.id){b=!0;break b}b=!1}b=!b}b&&(F.push(a.id),!1!==a.beat&&R.push(a.id),l.push(a),E&&$(a));if(b=I("pageView",a,{title:"Page view",id:!0,optional:{url:location.href}}))k(r(a,!1,!1,!0)),P=q(),m&&J(b)};h.prototype.reachGoal=function(a){H(a);var b=I("reachGoal",a,{title:"Reach goal",id:t,value:!0,required:{goal:!0},optional:null,fn:null});
if(b&&"goal"in a&&a.goal){var c="";"value"in a&&a.value&&(c=parseInt(a.value)||"");k(r(a,!0,!1,!0)+(";e="+escape("RG:"+c+"/"+a.goal)));m&&J(b)}};h.prototype.itemView=function(a){var b=I("itemView",a,{title:"Item view",id:t,optional:{list:!0,productid:!0,pagetype:!0,totalvalue:!0},fn:function(a,b){return(""+b).replace(/;/g," ")}});if(b){var c=a.list||"",d=a.productid||"",e=a.pagetype||"",f=a.totalvalue||0;(new Image).src=aa(0)+"//ad.mail.ru/retarget/?counter="+b.id+"&list="+c+"&productid="+d+"&pagetype="+
e+"&totalvalue="+f+"&_="+Math.random();c="IV:"+f+"/"+(""+c).replace(/;/g," ")+";"+(""+d).replace(/;/g," ")+";"+(""+e).replace(/;/g," ");k(r(a,!0,!1,!1)+(";e="+escape(c)));m&&J(b)}};h.prototype.sendEvent=function(a){H(a);var b=I("sendEvent",a,{title:"Send event",id:t,value:!0,required:{category:!0,action:!0},optional:{label:!0},fn:function(a,b){return(""+b).substr(0,300).replace(/;/g," ")}});if(b&&"category"in a&&a.category&&"action"in a&&a.action){var c=(""+a.category).substr(0,300),d=(""+a.action).substr(0,
300),e="";"label"in a&&a.label&&(e=(""+a.label).substr(0,300));var f="";"value"in a&&a.value&&(f=parseInt(a.value)||"");c="CE:"+f+"/"+(""+c).replace(/;/g," ")+";"+(""+d).replace(/;/g," ")+";"+(""+e).replace(/;/g," ");k(r(a,!0,!1,!1)+(";e="+escape(c)));m&&J(b)}};h.prototype.setUserID=function(a){if(null===a||!1===a||void 0===a)this.deleteUserID();else{var b=typeof a;"number"!==b&&"string"!==b?m&&console.warn("[TopMailRu]: Invalid user ID in setUserID"):(y=a,m&&console.info("[TopMailRu]: Global user ID = "+
y))}};h.prototype.deleteUserID=function(){y=null;m&&console.info("[TopMailRu]: Reset global user ID to null")};h.prototype.processEvent=function(a){if(a&&"object"===typeof a)if("type"in a)switch(a.type){case "pageView":this.pageView(a);break;case "reachGoal":this.reachGoal(a);break;case "itemView":this.itemView(a);break;case "sendEvent":this.sendEvent(a);break;case "setUserID":"userid"in a&&this.setUserID(a.userid);break;case "deleteUserID":this.deleteUserID()}else m&&console.warn("[TopMailRu]: Unspecified push event type");
else m&&console.warn("[TopMailRu]: Invalid push event")};h.prototype.push=function(a){for(var b=0,c=arguments.length;b<c;b++)this.processEvent(arguments[b])};var pa=!1;h.prototype.onready=function(){pa||(pa=!0,!ia&&!E&&za(xa,ya))};var qa=!1;h.prototype.onload=function(){if(!qa){qa=!0;Q=q();if(!Da&&0<l.length){for(var a=";e="+escape("RT/load")+";et="+Q,b=0;b<l.length;b++)k(r(l[b],!0,!0,!1)+a);P=Q}Ba||setTimeout(function(){ga(2)},2E3);Ca||setTimeout(function(){ga(15)},15E3)}};h.prototype.beat=function(){if(!na&&
0!=R.length&&X){var a=q(),b=a-X;if(!(12E4<b)){if(12E4<a-P)for(var b=";e="+escape("RT/resend")+";et="+Q+";active="+(b?"1":"0"),c=0;c<l.length;c++)!1!==l[c].beat&&k(r(l[c],!0,!1,!0)+b);else k("/tracker?js=13;id="+R[0]+";e="+escape("RT/beat")+";sid="+da+";ids="+R.join()+";ver="+ea+";_="+Math.random());P=a}}};var ra=!1;h.prototype.unload=function(){if(!ra&&(ra=!0,!oa)){var a;a=(a=ba())?q()-a:void 0;a=";e="+escape("RT/unload")+";et="+q()+(a?";pvt="+escape(a):"");for(var b=0;b<l.length;b++)k(r(l[b],!0,
!1,!1)+a)}};h.prototype.activity=function(a){X=q()};n=new h;g=0;for(w=_tmr.length;g<w;g++)(z=_tmr[g])&&"object"===typeof z&&H(z);g=0;for(w=_tmr.length;g<w;g++)z=_tmr[g],n.processEvent(z);_tmr=n;if("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll)_tmr.onready();else document.addEventListener?x(document,"DOMContentLoaded",N):document.attachEvent&&x(document,"readystatechange",N);if("complete"===document.readyState)_tmr.onload();else x(window,"load",
ma);oa||(x(window,"unload",O),x(window,"beforeunload",O));if(!na&&0<F.length){setInterval(_tmr.beat,3E4);try{n=function(a){function b(a){x(document,a,function(){_tmr.activity(a)})}for(var c=0;c<a.length;c++)b(a[c])},n(["scroll","gesturechange","touchmove"]),n(["mousedown","mousemove","mouseup","touch"]),x(window,"scroll",function(){_tmr.activity("scallback")})}catch(Fa){}}}})();
