var SSPBanner=function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,i){var r,u;if((1&i&&(n=t(n)),8&i)||4&i&&"object"==typeof n&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&i&&"string"!=typeof n)for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r},t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=5)}([function(n){n.exports=function(){"use strict";function e(n){return"function"==typeof n}function o(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function s(n,t){return null!=n&&"object"==typeof n&&t in n}function v(n){return!function(n,t){return l.call(n,t)}(a,n)}function u(n){this.string=n;this.tail=n;this.pos=0}function i(n,t){this.view=n;this.cache={".":this.view};this.parent=t}function n(){this.templateCache={_cache:{},set:function(n,t){this._cache[n]=t},get:function(n){return this._cache[n]},clear:function(){this._cache={}}}}var c=Object.prototype.toString,f=Array.isArray||function(n){return"[object Array]"===c.call(n)},l=RegExp.prototype.test,a=/\S/,y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},p=/\s*/,w=/\s+/,h=/\s*=/,b=/\s*\}/,k=/#|\^|\/|>|\{|&|=|!/,t,r;return u.prototype.eos=function(){return""===this.tail},u.prototype.scan=function(n){var i=this.tail.match(n),t;return!i||0!==i.index?"":(t=i[0],this.tail=this.tail.substring(t.length),this.pos+=t.length,t)},u.prototype.scanUntil=function(n){var t,i=this.tail.search(n);switch(i){case-1:t=this.tail;this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,i);this.tail=this.tail.substring(i)}return this.pos+=t.length,t},i.prototype.push=function(n){return new i(n,this)},i.prototype.lookup=function(n){var i,o,l,c=this.cache,t,u,f,r,h;if(c.hasOwnProperty(n))i=c[n];else{for(r=this,h=!1;r;){if(n.indexOf(".")>0)for(t=r.view,u=n.split("."),f=0;null!=t&&f<u.length;)f===u.length-1&&(h=s(t,u[f])||(o=t,l=u[f],null!=o&&"object"!=typeof o&&o.hasOwnProperty&&o.hasOwnProperty(l))),t=t[u[f++]];else t=r.view[n],h=s(r.view,n);if(h){i=t;break}r=r.parent}c[n]=i}return e(i)&&(i=i.call(this.view)),i},n.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},n.prototype.parse=function(n,i){var e=this.templateCache,s=n+":"+(i||t.tags).join(":"),c=void 0!==e,r=c?e.get(s):void 0;return null==r&&(r=function(n,i){function ct(){if(et&&!g)for(;d.length;)delete a[d.pop()];else d=[];et=!1;g=!1}function lt(n){if("string"==typeof n&&(n=n.split(w,2)),!f(n)||2!==n.length)throw new Error("Invalid tags: "+n);rt=new RegExp(o(n[0])+"\\s*");l=new RegExp("\\s*"+o(n[1]));ht=new RegExp("\\s*"+o("}"+n[1]))}var c,e,s,tt,st,y,r,it,at;if(!n)return[];var rt,l,ht,ut=!1,ft=[],a=[],d=[],et=!1,g=!1,nt="",ot=0;for(lt(i||t.tags),r=new u(n);!r.eos();){if(c=r.pos,s=r.scanUntil(rt))for(it=0,at=s.length;it<at;++it)v(tt=s.charAt(it))?(d.push(a.length),nt+=tt):(g=!0,ut=!0,nt+=" "),a.push(["text",tt,c,c+1]),c+=1,"\n"===tt&&(ct(),nt="",ot=0,ut=!1);if(!r.scan(rt))break;if(et=!0,e=r.scan(k)||"name",r.scan(p),"="===e?(s=r.scanUntil(h),r.scan(h),r.scanUntil(l)):"{"===e?(s=r.scanUntil(ht),r.scan(b),r.scanUntil(l),e="&"):s=r.scanUntil(l),!r.scan(l))throw new Error("Unclosed tag at "+r.pos);if(st=">"==e?[e,s,c,r.pos,nt,ot,ut]:[e,s,c,r.pos],ot++,a.push(st),"#"===e||"^"===e)ft.push(st);else if("/"===e){if(!(y=ft.pop()))throw new Error('Unopened section "'+s+'" at '+c);if(y[1]!==s)throw new Error('Unclosed section "'+y[1]+'" at '+c);}else"name"===e||"{"===e||"&"===e?g=!0:"="===e&&lt(s)}if(ct(),y=ft.pop())throw new Error('Unclosed section "'+y[1]+'" at '+r.pos);return function(n){for(var t,u=[],r=u,i=[],f=0,e=n.length;f<e;++f)switch((t=n[f])[0]){case"#":case"^":r.push(t);i.push(t);r=t[4]=[];break;case"/":i.pop()[5]=t[2];r=i.length>0?i[i.length-1][4]:u;break;default:r.push(t)}return u}(function(n){for(var t,i,u=[],r=0,f=n.length;r<f;++r)(t=n[r])&&("text"===t[0]&&i&&"text"===i[0]?(i[1]+=t[1],i[3]=t[3]):(u.push(t),i=t));return u}(a))}(n,i),c&&e.set(s,r)),r},n.prototype.render=function(n,t,r,u){var f=this.parse(n,u),e=t instanceof i?t:new i(t,void 0);return this.renderTokens(f,e,r,n,u)},n.prototype.renderTokens=function(n,t,i,r,u){for(var e,o,f,h="",s=0,c=n.length;s<c;++s)f=void 0,"#"===(o=(e=n[s])[0])?f=this.renderSection(e,t,i,r):"^"===o?f=this.renderInverted(e,t,i,r):">"===o?f=this.renderPartial(e,t,i,u):"&"===o?f=this.unescapedValue(e,t):"name"===o?f=this.escapedValue(e,t):"text"===o&&(f=this.rawValue(e)),void 0!==f&&(h+=f);return h},n.prototype.renderSection=function(n,t,i,r){var c=this,o="",u=t.lookup(n[1]),s,h;if(u){if(f(u))for(s=0,h=u.length;s<h;++s)o+=this.renderTokens(n[4],t.push(u[s]),i,r);else if("object"==typeof u||"string"==typeof u||"number"==typeof u)o+=this.renderTokens(n[4],t.push(u),i,r);else if(e(u)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(u=u.call(t.view,r.slice(n[3],n[5]),function(n){return c.render(n,t,i)}))&&(o+=u)}else o+=this.renderTokens(n[4],t,i,r);return o}},n.prototype.renderInverted=function(n,t,i,r){var u=t.lookup(n[1]);if(!u||f(u)&&0===u.length)return this.renderTokens(n[4],t,i,r)},n.prototype.indentPartial=function(n,t,i){for(var f=t.replace(/[^ \t]/g,""),u=n.split("\n"),r=0;r<u.length;r++)u[r].length&&(r>0||!i)&&(u[r]=f+u[r]);return u.join("\n")},n.prototype.renderPartial=function(n,t,i,r){var u;if(i&&(u=e(i)?i(n[1]):i[n[1]],null!=u)){var s=n[6],h=n[5],o=n[4],f=u;return 0==h&&o&&(f=this.indentPartial(u,o,s)),this.renderTokens(this.parse(f,r),t,i,f)}},n.prototype.unescapedValue=function(n,t){var i=t.lookup(n[1]);if(null!=i)return i},n.prototype.escapedValue=function(n,i){var r=i.lookup(n[1]);if(null!=r)return t.escape(r)},n.prototype.rawValue=function(n){return n[1]},t={name:"mustache.js",version:"4.0.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(n){r.templateCache=n},get templateCache(){return r.templateCache}},r=new n,t.clearCache=function(){return r.clearCache()},t.parse=function(n,t){return r.parse(n,t)},t.render=function(n,t,i,u){if("string"!=typeof n)throw new TypeError('Invalid template! Template should be a "string" but "'+(f(e=n)?"array":typeof e)+'" was given as the first argument for mustache#render(template, view, partials)');var e;return r.render(n,t,i,u)},t.escape=function(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return y[n]})},t.Scanner=u,t.Context=i,t.Writer=n,t}()},function(n,t,i){"use strict";i.d(t,"a",function(){return r});var r=function(n,t){this.Items=n;this.IsGroup=t}},function(n,t,i){"use strict";i.d(t,"a",function(){return r});var r=function(n,t){this.InputData=t;this.Banners=n}},function(n,t,i){"use strict";i.d(t,"a",function(){return o});var e=i(4),u=i(1),r=i(0),s=i.n(r),f=i(2),o=function(){function n(n){var t=this;this.isInited=!1;this.HNPlace="HN";this.HWTopPlace="HWTop";this.HW1Place="HW1";this.VSidePlace="VSide";this.collections=[];this.TemplateCollection=[];this.service=new e.a(n);window.userContextInstance.externalUser.subscribe(function(i){i.isFetching||t.isInited||(t.Initialize(n.bannersCollection,i.phone),t.isInited=!0)})}return n.prototype.promoInit=function(n){n==this.HWTopPlace&&setTimeout(function(){window.UI.Toggler.init()},100)},n.prototype.Initialize=function(n,t){var i=this;n&&n.length&&(this.collections.push(new u.a(n.filter(function(n){return n.BannerPlace==i.HNPlace}),!0)),this.collections.push(new u.a(n.filter(function(n){return n.BannerPlace!=i.HNPlace}),!1)),this.collections.forEach(function(n){i.InitBannerCollection(n.Items,n.IsGroup,t)},null))},n.prototype.InitBannerCollection=function(n,t,i){var r=this,e=!1,u;t?(u=[],n.forEach(function(n,t){var e=r.CreateRequestData(n,t,i);u.push(r.service.GetBanner(e).then(function(t){return new f.a(r.MapSSPResponse(t),n)}))},null),Promise.all(u).then(function(n){n.forEach(function(response){if(!e)if(response.Banners&&response.Banners.length)document.getElementById(response.InputData.SSPId).innerHTML=r.RenderTemlpate(response);else try{eval(response.InputData.AdFoxCode);e=!0}catch(e){console.debug("AdfoxCodeInitError")}})})):n.forEach(function(n,t){if(n.BannerPlace!=r.HWTopPlace||1!=sessionStorage.getItem("isSSPHWTopClosed")){var u=r.CreateRequestData(n,t,i);r.service.GetBanner(u).then(function(result){var bannersItems=r.MapSSPResponse(result),html;if(!bannersItems||!bannersItems.length)try{eval(n.AdFoxCode);r.promoInit(n.BannerPlace)}catch(e){console.debug("AdfoxCodeInitError")}html=r.RenderTemlpate(new f.a(bannersItems,n));document.getElementById(n.SSPId).innerHTML=html;r.promoInit(n.BannerPlace)})}},null)},n.prototype.CreateRequestData=function(n,t,i){var r={};return i&&(r.msisdn=+("7"+i)),r.place_id=n.SSPId,r.place_num=t,r.screen_color_depth=screen.colorDepth,r.screen_width=screen.width,r.screen_height=screen.height,r.user_agent=navigator.userAgent,r.language=navigator.language,r.local_time=(new Date).toUTCString(),r},n.prototype.MapSSPResponse=function(n){var r=[],t,i;if(n&&n.length)for(t=0;t<n.length;t++)i={},i.Image=n[t].img,i.MobileImage=n[t].img_mob,i.Link=n[t].clk,i.Text=n[t].txt,i.Title=n[t].title,i.Label=n[t].label,r.push(i);return r},n.prototype.GetTemplate=function(n){return this.TemplateCollection[n]||(this.TemplateCollection[n]=document.getElementById(n).innerHTML),this.TemplateCollection[n]},n.prototype.RenderTemlpate=function(n){for(var i="",t=0;t<n.Banners.length;t++)switch(n.InputData.BannerPlace){case this.HNPlace:i+=r.render(this.GetTemplate(this.HNPlace),n.Banners[t]);break;case this.HW1Place:n.Banners[t].MobileImage||(n.Banners[t].MobileImage=n.Banners[t].Image);i+=r.render(this.GetTemplate(this.HW1Place),n.Banners[t]);break;case this.HWTopPlace:i+=r.render(this.GetTemplate(this.HWTopPlace),n.Banners[t]);$("#"+n.InputData.SSPId).on("click",".js-qa-adfox-hwtop-close",function(n){return n.preventDefault(),sessionStorage.setItem("isSSPHWTopClosed","1"),!0});break;case this.VSidePlace:case"VSideRight":n.Banners[t].AdditionalClasses="filters__bottom-block g-only-desktop g-only-small-desktop g-only-laptop";i+=this.RenderVside(n.Banners[t]);break;case"VSideMobile":n.Banners[t].AdditionalClasses="g-only-device";i+=this.RenderVside(n.Banners[t])}return i},n.prototype.RenderVside=function(n){return r.render(this.GetTemplate(this.VSidePlace),{banner:n,label:n.Label?{Text:n.Label}:null})},n}()},function(n,t,i){"use strict";i.d(t,"a",function(){return r});var r=function(){function n(n){this.sspMethod="/teaser";this.timeout=5e3;this.baseUrl=n.baseUrl;this.timeout=n.timeout}return n.prototype.SendRequest=function(n,t,i){return void 0===i&&(i=5e3),$.ajax({url:t,method:"POST",contentType:"application/json;charset=utf-8",data:JSON.stringify(n),type:"JSON",timeout:i,xhrFields:{withCredentials:!0}})},n.prototype.GetBanner=function(n){return this.SendRequest(n,""+this.baseUrl+this.sspMethod,this.timeout)},n}()},function(n,t,i){"use strict";function u(n){new r.a(n)}i.r(t);i.d(t,"main",function(){return u});var r=i(3)}])