PageSourceSearch

https://cdn.monetnik.ru/bundles/new_design/app.js?vf6c69c5a52

js monetnik.ru collected 2026-10-01 11:29:39 UTC 71,725 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7ba408c3-29e3-4838-9f56-bac4b1c59ff6",e._sentryDebugIdIdentifier="sentry-dbid-7ba408c3-29e3-4838-9f56-bac4b1c59ff6")}catch(e){}}(),("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"f6c69c5a52"},function(){var e,t={40136:function(e,t,r){var a={};r.r(a),r.d(a,{initAnalyticsDelayed:function(){return N},makeCriteoProductList:function(){return S},makeEmarsysProductList:function(){return E},trackCartForEmarsys:function(){return _}});r(35666);var n=r(38946),i=r.n(n);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o.apply(this,arguments)}var s=class{constructor(e,t){this.context=e,this.carouselNode=e.querySelector("[data-carousel]"),this.carouselControls=[e.querySelector('[data-handle="carouselToLeft"]'),e.querySelector('[data-handle="carouselToRight"]')];var r,a,n=e.getAttribute("data-lazy"),i=null!=t&&t.slides?t.slides:e.getAttribute("data-slides"),o=i&&i.split(",")||0;(this.ReratePerPage={1279:Number(o[0])||5,768:Number(o[1])||3.25,0:Number(o[2])||2.25},n?(this.lazyInited=!1,document.addEventListener("lazyInitCarousel",(()=>{this.lazyInited||(this.init(),this.lazyInited=!0)}))):this.init(t),"m"===MNTK.deviceType)&&(this.context.querySelectorAll("[data-origin-width]").forEach((e=>{e.removeAttribute("style");var t=e.parentElement.getBoundingClientRect().height;e.style.maxHeight=(t||e.getAttribute("height"))+"px"})),null==(r=this.carousel)||null==(a=r.innerElements)||a.forEach((e=>{var t=e.querySelector(".product__labels-row1");t&&!t.childElementCount&&e.classList.add("no-labels")})))}init(e){var t=this.carouselNode||this.context;t.hasAttribute("data-inited")||(this.itemNumber=t.childElementCount,this.setNavigation(),this.carousel=new(i())(o({selector:t,perPage:this.ReratePerPage,draggable:"d"!==MNTK.deviceType,onInit(){t.closest('[data-component="AjaxSlider"]')&&MNTK.emit("ajaxSliderInit",t),t.setAttribute("data-inited","1")}},e)),this.bindEvents(),document.addEventListener("resize",(()=>{this.setNavigation()})))}setNavigation(){var e,t=[];for(var r in this.ReratePerPage)t.push(r);if(t.sort(((e,t)=>e-t)),t.forEach((t=>{window.innerWidth>=t&&(e=t)})),this.ReratePerPage[e]>=this.itemNumber)this.carouselControls.forEach((function(e){e&&(e.style.display="none")}));else{if(window.innerWidth<=768)return;this.carouselControls.forEach((function(e){e&&(e.style.display="flex")}))}}bindEvents(){var e,t;null==(e=this.carouselControls[0])||e.addEventListener("click",(()=>{var e;null==(e=this.carousel)||e.prev()})),null==(t=this.carouselControls[1])||t.addEventListener("click",(()=>{var e;null==(e=this.carousel)||e.next()}))}},d={getCookie:e=>{for(var t=e+"=",r=document.cookie.split(";"),a=0;a<r.length;a++){for(var n=r[a];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},getEscapedCookie:e=>{for(var t=e=>(e=>{0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){}})(e),r=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],n=0;n<a.length;n++){var i=a[n].split("="),o=decodeURIComponent(i.shift()),s=i.join("=");if(e&&e===o){r=t(s);break}e||void 0===(s=t(s))||(r[o]=s)}return r},setCookie:(e,t,r)=>{var a="";if(r){var n=new Date;n.setTime(n.getTime()+24*r*60*60*1e3),a="; expires="+n.toUTCString()}document.cookie=e+"="+(t||"")+a+"; path=/"},setEscapedCookie:function(e,t,r){if(void 0===r&&(r=30),t){var a=new Date;a.setTime(a.getTime()+24*r*60*60*1e3),document.cookie=e+"="+encodeURI(t)+"; expires="+a.toUTCString()+"; path=/"}},removeCookie:e=>{d.setCookie(e,"",-1)}},c=d;function l(e){if(!(!e instanceof Object)){var t=new FormData;for(var r of Object.keys(e))Boolean(e[r])&&t.append(r,e[r]);return t}
1console.warn("Ошибка! "+e+" не является объектом!")}var u={exception:["appbundle\\exception\\cartexception"]};function h(e,t){this.message=e,this.xhr=t}function m(e,t,r){(e.status<200||e.status>=300)&&(!function(e){var t=function(e){return e.getAllResponseHeaders().toLowerCase().split(/\n|\r|\r\n/g).reduce((function(e,t){if(t.length){var[r,a]=t.split(": ");e[r]=a}return e}),{})}(e);for(var r in u)if(t[r]&&-1!==t[r].indexOf(u[r]))return!0;return!1}(e)?r(new h("HTTP status code is "+e.status+" "+e.statusText,e)):r(new h(e.statusText?e.statusText:e.responseText,e)));var a=e.getResponseHeader("Content-Type");/json/i.test(a||"")||r(new h("Content-Type must contain JSON, returned "+a,e));var n=e.responseText;n||r(new h("Response is empty",e));try{var i=JSON.parse(n)}catch(t){r(new h("Cannot parse JSON: "+(t.message||"unknown error"),e))}t({json:i,xhr:e})}var g=function(e,t){var r=(t=t||{}).method||"GET",a=new XMLHttpRequest,n=null;if(a.open(r,e,!0),a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.customHeader)for(var i in t.customHeader)a.setRequestHeader(i,t.customHeader[i]);return t.urlEncodedBody?(a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n=t.urlEncodedBody):t.formData&&(n=t.formData),new Promise((function(e,t){a.onreadystatechange=function(){4===this.readyState&&m(a,e,t)},a.send(n)}))};var p=function(e,t,r,a,n){return new Promise((function(i,o){var s=new XMLHttpRequest;if(s.open(e,t,!0),a)for(var d in a)s.setRequestHeader(d,a[d]);n&&s.setRequestHeader("Content-Type",n),s.onload=function(){var{response:e,statusText:t,responseText:r}=s;this.status>=200&&this.status<300?i(e):o({status:this.status,statusText:t,response:e,responseText:r})},s.onerror=function(){var{response:e,statusText:t,responseText:r}=s;o({status:this.status,statusText:t,response:e,responseText:r})},s.send(r)}))};var v=class{constructor(e){void 0===e&&(e={}),this.options=e,this.container=null,this.interval=null,this.startTime=null}start(){var{context:e,endTime:t,timeInSeconds:r,selector:a}=this.options;if(!a)throw new Error("Необходимо указать селектор!");this.container=e?e.querySelector(a):document.querySelector(a),this.container&&(this.startTime=new Date,t?this.endTime=t:r&&(this.endTime=new Date(this.startTime.setSeconds(this.startTime.getSeconds()+Number(r)))),this.setTimeRemaining(),(!t||(new Date).getTime()<=t)&&(this.interval=setInterval((()=>this.setTimeRemaining()),1e3)))}get timeRemaining(){var e=Math.floor((this.endTime-(new Date).getTime())/1e3);if(e<0)return null;var t=Math.floor(e/86400);e%=86400;var r=Math.floor(e/3600);e%=3600;var a=Math.floor(e/60);return{timeRemaining:e%=60,days:t,hours:r,minutes:a,seconds:e}}setTimeRemaining(){var{digits:e,onTimerEnd:t}=this.options;this.timeRemaining?e?Object.keys(e).forEach((t=>{this.container.querySelector(e[t]).textContent=this.timeRemaining[t]})):this.container.textContent=this.printTimeRemainingAsString():(clearInterval(this.interval),"function"==typeof t&&t())}printTimeRemainingAsString(){var{appendText:e,prependText:t}=this.options,{days:r,hours:a,minutes:n,seconds:i}=this.timeRemaining,o=(r?r+" дн. ":"")+this.formatDigits(a)+":"+this.formatDigits(n)+":"+this.formatDigits(i);return t&&(o=t+o),e&&(o+=e),o}formatDigits(e){return e<10?"0"+e:""+e}},b={1:"https://www.google.com/shopping/customerreviews/merchantreviews?q=monetnik.ru",2:"https://play.google.com/store/apps/details?id=com.monetnik.app"};var f=class{go(e,t){return void 0===t&&(t=""),b.hasOwnProperty(e)&&(window.location.href=b[e]+t),!1}};window.MNTK&&(window.MNTK.Carousel=s,window.MNTK.cookieParse=c,window.MNTK.createFormData=l,window.MNTK.fetchJson=g,window.MNTK.makeRequest=p,window.MNTK.Timer=v,window.MNTK.UrlShortcut=new f,window.MNTK.execInIdleCallback=function(e){if("function"==typeof e)if("requestIdleCallback"in window)window.requestIdleCallback(e);else var t=setTimeout((function(){e(),clearTimeout(t)}),0);else console.warn("No callback provided!")},window.MNTK.isPageLoadFromExternalSource=function(){var e=window.location.search;"?"==e[0]&&(e=e.substring(1));for(var t=e.split("&"),r=0;r<t.length;r++){var a=t[r].split("="),n=void 0;try{n=decodeURIComponent(a[0])}catch(e){if(!(e instanceof URIError))throw e;console.log(e),n=""}if("utm_source"==n||"yclid"==n||"ymclid"==n||"gclid"==n)return!0}if(""!=document.referrer){var i=new URL(document.referrer).hostname.toLowerCase();if("l.monetnik.ru"==i)return!0;var o=i.split(".");if(o.length>=2&&"monetnik.ru"!=o.slice(-2).join("."))return!0}return!1},window.MNTK.isPageLoadFromExternalSourceFirstState=window.MNTK.isPageLoadFromExternalSource(),window.togglePreloader=function(){var e=document.querySelector(".preloader__overlay");null==e||e.classList.toggle("preloader__overlay--open")},function(){var e=null;function t(){if(!window.MNTK||!window.MNTK.isBlackFriday){var e=-(new Date).getTimezoneOffset()/60-3,t=new FormData;
1t.append("timeToMoscow",""+e),MNTK.makeRequest("POST",Routing.generate("api.web.cart.stamp"),t).catch(console.warn)}}function r(){e&&clearTimeout(e),e=setTimeout(t,1e3)}t(),document.body.addEventListener("mousemove",r),document.body.addEventListener("keydown",r)}(),function(){if(MNTK&&MNTK.cookieParse){var e=function(e){if(e&&e.length>=20){for(var t="",r=0;r<e.length;r++){var a=e[r];switch(a){case"3":a="x";break;case"x":a="3";break;case"a":a="t";break;case"t":a="a";break;case"/":a="l";break;case"l":a="/";break;case"=":a="f";break;case"f":a="="}t+=a}return t.split("").reverse().join("")}}(MNTK.cookieParse.getEscapedCookie("Etoken1"));MNTK.cookieParse.setCookie("Etoken2",encodeURIComponent(e),2)}}()),document.addEventListener("openWhatsAppLink",(e=>{window.open(function(e){for(var t="",r=0;r<e.length;r++){var a=10^e.charCodeAt(r);t+=String.fromCharCode(a)}return t}(e.detail),"_blank")}));var y=class{constructor(){this.events={},window.eventDelegate=this,this.setMatchesPolyfill()}addEvent(e,t,r){if(Array.isArray(e))for(var a of e)this._addOneEvent(a,t,r);else this._addOneEvent(e,t,r)}removeEvent(e,t,r){if(Array.isArray(event))for(var a of e)this._removeOneEvent(a,t,r);else this._removeOneEvent(e,t,r)}_addOneEvent(e,t,r){this.createEvent(e),this.events[e][t]||(this.events[e][t]=[]),this.events[e][t].indexOf(r)<0&&this.events[e][t].push(r)}_removeOneEvent(e,t,r){var a=this.events[e]&&this.events[e][t];if(a){var n=a.indexOf(r);n>=0&&a.splice(n,1)}}debugInfo(){console.log(this.events)}createEvent(e){this.events[e]||(this.events[e]={},this.bindEvent(e))}bindEvent(e){document.addEventListener(e,this.eventBubbling.bind(this))}eventBubbling(e){var t=e.type;if(this.events[t])for(var r=e.target;r&&r!==document.body;r=r.parentNode)for(var a in this.events[t])this.events[t].hasOwnProperty(a)&&r.matches&&"function"==typeof r.matches&&r.matches(a)&&this.runHandle(t,r,a,e)}runHandle(e,t,r,a){this.events[e][r].forEach((e=>{e.call(t,a,t)}))}setMatchesPolyfill(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||function(e){for(var t=document.querySelectorAll(e),r=0;t[r]&&t[r]!==element;)++r;return!!t[r]})}},w=new(r(19755).DetectUA),T=w.isTablet?"t":w.isMobile?"m":"d";window.MNTK&&(window.MNTK.device=w,window.MNTK.deviceType=T);var M,k=!1;function N(e){if(void 0===e&&(e=!1),window.MNTK.stat&&(!window.MNTK.stat||window.MNTK.stat.analyticsEnabled)&&!k){if(MNTK.stat&&MNTK.stat.onloadFired)return k=!0,void A(e);window.addEventListener("load",(function(){k||(k=!0,A(e)),Array.prototype.forEach.call(document.querySelectorAll("[data-send-goal]"),(e=>{e.addEventListener("click",(e=>{var t,r=(e.target.hasAttribute("data-send-goal")?e.target:e.target.closest("[data-send-goal]")).getAttribute("data-send-goal");null==(t=MNTK.stat)||t.onReady((()=>{MNTK.stat.trackYm("reachGoal",r),gtag("event","Click",{event_category:r,event_label:"No",non_interaction:!1})}))}))}));var t="NEW_EMAIL_OBTAINED";document.addEventListener(t,(function(){var e;null==(e=MNTK.stat)||e.onReady((function(){gtag("event","Click",{event_category:t,event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal",t)}))}))})),setTimeout((function(){k||(k=!0,A(e))}),1e4)}}var _=e=>{var t=E(e);window.ScarabQueue&&ScarabQueue.push(["cart",t]),window.ScarabQueue&&ScarabQueue.push(["go"])},E=e=>e.map((e=>{var{id:t,quantity:r,price:a}=e;return{item:""+t,quantity:r,price:a}})),S=e=>e.map((e=>{var{id:t,quantity:r,price:a}=e;return{id:t,quantity:r,price:a}}));function A(e){MNTK.stat.trackVk=C,MNTK.stat.trackYm=I,MNTK.stat.trackYmGa=K,q(),x();var t=window.ym=function(){(t.a=t.a||[]).push(arguments)};t.l=1*MNTK.stat.initTime,t(MNTK.stat.ya_counter_id,"init",{clickmap:!1,trackLinks:!1,accurateTrackBounce:!0,webvisor:!0,ecommerce:!0,params:{designVersion:"new",abVisitorSegment:MNTK.abSegmentName,cdVisitorSegment:MNTK.cdSegmentName,efVisitorSegment:MNTK.efSegmentName,ab6VisitorSegment:MNTK.ab6SegmentName,isMobileByServer:MNTK.isMobileByServer,pageLayoutCategory:MNTK.pageLayoutCategory}}),t(MNTK.stat.ya_counter_id,"getClientID",(function(e){e&&(document.cookie="yandexMetrikaClientId="+e+"; path=/; max-age=31536000")})),L("https://mc.yandex.ru/metrika/tag.js");var r,a,n,i=()=>{O(),window._tmr=window._tmr||(window._tmr=[]),window._tmr.push({id:MNTK.stat.top_mail_ru_code,type:"pageView",start:MNTK.stat.initTime.getTime()}),function(e,t,r){if(!e.getElementById(r)){var a=e.createElement("script");a.type="text/javascript",a.async=!0,a.id=r,a.src="https://top-fwz1.mail.ru/js/code.js";var n=function(){var t=e.getElementsByTagName("script")[0];t.parentNode.insertBefore(a,t)};"[object Opera]"==t.opera?e.addEventListener("DOMContentLoaded",n,!1):n()}}(document,window,"tmr-code")};e?setTimeout(i,4e3):i(),null!=(r=MNTK.stat)&&r.isAuthorized&&(gtag("event","Click",{event_category:"AuthorizedPageView",event_label:"No",non_interaction:!0}),MNTK.stat.trackYm("reachGoal","AuthorizedPageView"),null==(n=window._tmr)||n.push({type:"reachGoal",id:MNTK.stat.top_mail_ru_code,goal:"AuthorizedPageView"})),null!=(a=MNTK.stat)&&a.isNearlyRegistered&&(gtag("event","Click",{event_category:"Registration",event_label:"No",non_interaction:!0}),gtag("event","Click",{event_category:"NEW_EMAIL_OBTAINED",event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal","Registration"),MNTK.stat.trackYm("reachGoal","NEW_EMAIL_OBTAINED")),MNTK.stat&&MNTK.seoNonBrandVisit&&(gtag("event","Click",{event_category:"SKUPKA_WIDGET_VIEW",event_label:"No",non_interaction:!0}),MNTK.stat.trackYm("reachGoal","SKUPKA_WIDGET_VIEW")),function(){var e=MNTK.stat.onReady.queue;MNTK.stat.onReady=function(e){setTimeout(e,0)};for(;e.length>0;
1)M=e.shift(),setTimeout(M,0)}()}function C(e){C.queue.push(arguments)}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.unshift(MNTK.stat.ya_counter_id),window.ym.apply(null,t)}function K(e,t,r){void 0!==r?MNTK.stat.trackYm("reachGoal",e,{order_price:r,currency:"RUB"}):MNTK.stat.trackYm("reachGoal",e);var a={event_category:e,non_interaction:!0,event_label:"No"};void 0!==t&&(a.non_interaction=t),void 0!==r&&(a.value=r),gtag("event","Click",a)}function L(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=e;var r=document.getElementsByTagName("script")[0]||document.body;r.parentNode.insertBefore(t,r)}C.queue=[];var x=()=>{if(MNTK.stat){var{stat:{initTime:e,ga_track_id:t}}=MNTK;window.dataLayer=window.dataLayer||[];var r=window.gtag=function(){window.dataLayer.push(arguments)};r("js",e),r("config",t,{custom_map:{dimension4:"abSegmentName",dimension5:"currentOrderNewCustomer",dimension6:"ab6SegmentName",dimension7:"designVersion"}}),r("set",{abSegmentName:MNTK.abSegmentName,cdSegmentName:MNTK.cdSegmentName,efSegmentName:MNTK.efSegmentName,ab6SegmentName:MNTK.ab6SegmentName,designVersion:MNTK.designVersion}),L("https://www.googletagmanager.com/gtag/js?id="+t)}},q=()=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),L("https://www.googletagmanager.com/gtm.js?id=GTM-PFNDPX6")},O=()=>{for(var e=!0,t=["/prodat/monety/","/partner/"],r=0;r<t.length;r++)if(0===window.location.pathname.indexOf(t[r])){e=!1;break}e&&(window.mindbox=window.mindbox||function(){mindbox.queue.push(arguments)},mindbox.queue=mindbox.queue||[],mindbox("create",{endpointId:"monetnik-website"}),L("https://api.mindbox.ru/scripts/v1/tracker.js"))};MNTK.stat&&(MNTK.stat.trackAddToCart=(e,t,r,a,n)=>{MNTK.stat&&MNTK.stat.onReady((()=>{var e;MNTK.stat.trackYm("reachGoal","ADD_TO_CART"),577884==t&&(MNTK.stat.trackYm("reachGoal","GH_IN_CART_577884"),console.log("GH_IN_CART_577884")),588431==t&&MNTK.stat.trackYm("reachGoal","GH_IN_CART_588431"),window.gtag("event","add_to_cart",{currency:MNTK.currency,items:[{id:t,price:a,quantity:r,category:n}],value:a,non_interaction:!1}),null==(e=window._tmr)||e.push({type:"reachGoal",id:MNTK.stat.top_mail_ru_code,value:a,goal:"addToCart",params:{product_id:t}}),window.fbq&&window.fbq("track","AddToCart",{contents:[{id:t,quantity:r}],content_type:"product"}),MNTK.cookieParse.getEscapedCookie("lastShopOrderId")||(gtag("event","Click",{event_category:"ADD_TO_CART_NEW_CUSTOMER",event_label:"No",value:a,non_interaction:!1}),MNTK.stat.trackYm("reachGoal","ADD_TO_CART_NEW_CUSTOMER",{order_price:a})),document.querySelectorAll("#info[data-ab-test-long-descr]").length>0&&(MNTK.stat.trackYm("reachGoal","GH_3542_LOT_IN_CART",{lotId:(void 0).itemId,abSegment:MNTK.abSegmentName}),console.log("abTestContent track","GH_3542_LOT_IN_CART",{lotId:(void 0).itemId,abSegment:MNTK.abSegmentName})),window.DSPCounter&&DSPCounter("send",{sz:"add_basket",sid:225711,custom:{10:t}})}))},MNTK.stat.trackRemoveFromCart=(e,t,r,a,n)=>{MNTK.stat&&MNTK.stat.onReady((()=>{MNTK.stat.trackYm("reachGoal","REMOVE_FROM_CART"),window.gtag("event","remove_from_cart",{currency:MNTK.currency,items:[{id:t,price:a,quantity:r,category:n}],value:a,non_interaction:!1}),_(e),window.DSPCounter&&DSPCounter("send",{sz:"del_basket",sid:225711,custom:{10:t}})}))});var D='[data-handle="numberBox"] > input',R='[data-handle="quickCartAdd"]',P='[data-render="cartItems"]',H='[data-render="overItems"]';var B=class{constructor(){var e,t=document.querySelector(P);this.cartCount=t&&1*t.innerHTML,this.$holdItemsCounter=document.querySelector(H),this.overCount=parseInt(null==(e=this.$holdItemsCounter)?void 0:e.textContent)||0,this.cartRender(),this.holdRender(),this.blockButtons(),this.bindEvents(),this.renderCards()}renderCards(){document.querySelectorAll(".product__card--quick.in-cart").forEach((e=>this.renderNumberBoxAfterPageLoad(e))),this.updateCardLinks()}bindEvents(){var e=this,t={addToCart(t){e.addToCart(t.detail).then((e=>{MNTK.viewItemId&&MNTK.viewItemId===t.detail&&MNTK.emit("openSuccessModal",e)}
1)).catch(console.log)},hold(t,r){"click"===t.type&&t.preventDefault(),void 0===r&&(r=t.detail.element);var a=t.detail.forceAdd||!1,n=Number(t.detail.amount);e.pickItem(r,a,n)},setAmount(t,r){e.numberChange(r)},setAmountByInput(t,r){e.numberChangeInput(r)},showNumberBox(t,r){t.preventDefault(),e.showNumberBox(r)},updateItemsInCartCounter(){e.cartRender()},updateProductCards(){e.renderCards()}};eventDelegate.addEvent("click",'[data-handle="numberBox"] > button',t.setAmount),eventDelegate.addEvent("change",D,t.setAmountByInput),eventDelegate.addEvent("click",R,t.showNumberBox),eventDelegate.addEvent("click",'[data-handle="quickBasketPick"]',t.hold),document.addEventListener("cartRender",t.updateItemsInCartCounter),document.addEventListener("addToHold",t.hold),document.addEventListener("addToCart",t.addToCart),document.addEventListener("ajaxSliderInit",(e=>{e.detail&&e.detail.querySelectorAll(".in-cart").forEach((e=>this.renderNumberBoxAfterPageLoad(e)))})),document.addEventListener("initProductCards",t.updateProductCards)}togglePreloader(e){e.classList.toggle("product__card--overlay")}numberChangeInput(e){var t=e.parentNode.querySelector("input"),r=Number(t.value),a=Number(t.dataset.max),n=e.closest("[data-imp]"),i=JSON.parse(n.dataset.imp).id||n.dataset.id;if(!(r<0)){var o=r-Number(t.getAttribute("value"));this.togglePreloader(n);var s=Routing.generate("cart.set_amount",{item:i,amount:r});MNTK.fetchJson(s,{method:"POST"}).then((e=>{var{json:i}=e;this.togglePreloader(n),this.cartCount=Number(this.cartCount)+o,this.cartRender(),t.setAttribute("value",""+r),t.setAttribute("data-stored",r),n.querySelector('[data-steps="1"]').setAttribute("data-disabled",r<a?"":"1"),n.querySelector('[data-steps="-1"]').setAttribute("data-disabled",r<=1?"1":"");var s,d,{cartData:c,itemData:l}=i;o>0?null==(s=MNTK.stat)||s.trackAddToCart(c,l.id,o,l.price,l.categPath):null==(d=MNTK.stat)||d.trackRemoveFromCart(c,l.id,-o,l.price,l.categPath)})).catch((e=>{var r=Number(t.getAttribute("data-stored"));t.value=r,this.togglePreloader(n),window.openMessageModal("<p>"+decodeURIComponent(e.message)+"</p>","Произошла ошибка!")}))}}updateHoldItemsCounter(e){this.$holdItemsCounter&&(this.overCount=e,this.$holdItemsCounter.classList.remove("hidden"),this.$holdItemsCounter.textContent=this.overCount)}pickItem(e,t,r){var a,n,i,o,s=e.closest("[data-imp]"),{id:d,price:c}=JSON.parse(s.getAttribute("data-imp")),l=s.classList.contains("is-held")||e.classList.contains("picked"),u=t?{amount:r}:{};t||!l?(a=Routing.generate("api.web.goods.hold",Object.assign({item:d},u)),n=l?this.overCount:this.overCount+1,i="Отложен",o=!l):(a=Routing.generate("api.web.goods.unhold",{item:d}),n=this.overCount-1,i="Отложить",o=!0),this.togglePreloader(s),MNTK.fetchJson(a,{method:"POST"}).then((t=>{var{json:r}=t;if(r.success){var a=e.querySelector("[data-render-svg]");a?(a.setAttribute("data-render-svg",l?"star-empty":"favorite"),e.innerText=i,e.insertAdjacentElement("afterbegin",a),o&&e.classList.toggle("picked")):(e.innerText=i,o&&s.classList.toggle("is-held")),this.togglePreloader(s),this.updateHoldItemsCounter(n),this.holdRender(),l||this.trackItemAddedToFavorites(d,c)}else window.openMessageModal(r.error?decodeURIComponent(r.error):"","Произошла ошибка!")})).catch((e=>{this.togglePreloader(s),console.error(e),window.openMessageModal(e.message?decodeURIComponent(e.message):"","Произошла ошибка!")}))}toggleChangeAmountButtons(e,t){var r=e.querySelector("[data-max]"),a=Number(r.getAttribute("data-max"));e.querySelector('[data-steps="-1"]').setAttribute("data-disabled",t<=1?"1":""),e.querySelector('[data-steps="1"]').setAttribute("data-disabled",t===a?"1":"")}addToCart(e){return new Promise(((t,r)=>{var a={item:e,amount:1};MNTK.viewItemAccessToken&&(a.accessToken=MNTK.viewItemAccessToken),MNTK.fetchJson(Routing.generate("cart.add",a)).then((e=>{var r,{json:a}=e,{cartData:n,itemData:i}=a;null==(r=MNTK.stat)||r.trackAddToCart(n,i.id,1,i.price,i.categPath),t(a)})).catch((e=>{onModalClose(),openMessageModal(decodeURIComponent(e.message),"Произошла ошибка!"),r(e)}))}))}
1showNumberBox(e){var t=e.closest("[data-imp]"),{id:r}=JSON.parse(t.getAttribute("data-imp"));this.togglePreloader(t),this.addToCart(r).then((()=>{var r=e.getAttribute("data-send-goal-after-add-to-cart");if(r&&MNTK.stat.trackYmGa(r,!1),"1"!=e.getAttribute("data-reload-page-after-add-to-cart")){if("m"===MNTK.deviceType&&e.closest(".slider"))return t.classList.add("in-cart"),e.removeAttribute("data-handle"),e.setAttribute("href","/checkout"),void this.togglePreloader(t);this.renderNumberbox(t),this.togglePreloader(t)}else window.location.reload()})).then((()=>{this.cartCount=this.cartCount+1,this.cartRender()})).catch((e=>{console.log(e),this.togglePreloader(t)}))}numberChange(e){var t=e.parentNode,r="checkout"===t.getAttribute("data-type"),a=Boolean(e.getAttribute("data-disabled"));if(!r&&!a){var n,i=e.closest("[data-imp]"),o=JSON.parse(i.getAttribute("data-imp")).id||i.getAttribute("data-id"),s=t.querySelector("input"),d=Number(s.value),c=Number(e.getAttribute("data-steps"))>0;n=c?d+1:d-1<0?0:d-1;var l=Routing.generate("cart.set_amount",{item:o,amount:n});this.togglePreloader(i),MNTK.fetchJson(l).then((e=>{var{json:r}=e;s.value=n.toString(),this.togglePreloader(i),this.cartCount=Number(this.cartCount)+(n-d),this.cartRender(),this.toggleChangeAmountButtons(t,n);var a,o,{cartData:l,itemData:u}=r;
1c?null==(a=MNTK.stat)||a.trackAddToCart(l,u.id,1,u.price,u.categPath):null==(o=MNTK.stat)||o.trackRemoveFromCart(l,u.id,1,u.price,u.categPath)})).catch((e=>{this.togglePreloader(i),console.error(e),window.openMessageModal(decodeURIComponent(e.message),"Произошла ошибка!")}))}}cartRender(e){void 0===e&&(e=this.cartCount);var t=this.cartCount>0,r=document.querySelector('[data-render="cart"]'),a=document.querySelectorAll('[data-render="cartSticky"]');if(r&&a)if(t){r.className="button--blick",r.classList.toggle("lg-count",this.cartCount>99);for(var n=0;n<a.length;n++)a[n].classList.add("button"),a[n].classList.add("button--blick"),a[n].innerHTML+='<span class="button-cart__count">'+e+"</span>"}else r.className=" navigation__link";document.querySelector(P)&&(document.querySelector(P).innerHTML=e)}holdRender(){var e=document.querySelector('[data-render="hold"]');e&&(this.overCount>0?e.className="button--blick":e.className="navigation__link",e.classList.toggle("lg-count",this.overCount>99),document.querySelector(H)&&(document.querySelector(H).innerHTML=this.overCount))}blockButtons(){var e=document.querySelectorAll(".product__card[data-imp]");Array.prototype.forEach.call(e,(e=>{var t=e.querySelector(D);if(t){var r=t.dataset.max;1===Number(t.value)&&(e.querySelector('button[data-steps="-1"]').dataset.disabled="1"),Number(t.value)===Number(r)&&(e.querySelector('button[data-steps="1"]').dataset.disabled="1")}}))}trackItemAddedToFavorites(e,t){var r;null==(r=MNTK.stat)||r.onReady((()=>{var r;gtag("event","Click",{event_category:"ITEM_ADDED_TO_FAVORITES",event_label:"No",non_interaction:!1,itemId:e}),MNTK.stat.trackYm("reachGoal","ITEM_ADDED_TO_FAVORITES",{itemId:e}),null==(r=window._tmr)||r.push({type:"reachGoal",id:MNTK.stat.top_mail_ru_code,value:t,goal:"AddToWishlist",params:{product_id:e}}),window.fbq&&window.fbq("track","AddToWishlist",{content_ids:[e],content_type:"product"})}))}renderNumberbox(e){if(!e.querySelector(".quickcart")){var t,r=parseInt(e.getAttribute("data-cart-max")),a=parseInt(e.getAttribute("data-in-cart")),n=e.querySelector(".product__card-buttons");if(n)t=r>1?'<div class="product__card-numberbox" data-handle="numberBox"><button data-steps="-1" '+(a>1?"":'data-disabled="1"')+'></button><input type="text" data-max="'+r+'" value="'+(a||1)+'"><button data-steps="1"></button></div>':'<a href="/checkout" class="product__card-numberbox-short"></a>',n.insertAdjacentHTML("beforeend",t),n.classList.add("quickcart")}}addTargetBlank(e){null==e||e.querySelector("a.absolute-link").setAttribute("target","_blank")}renderNumberBoxAfterPageLoad(e){if("m"===MNTK.deviceType&&e.closest(".slider")){e.classList.add("in-cart");var t=e.querySelector(R);t&&(t.removeAttribute("data-handle"),t.setAttribute("href","/checkout"))}else this.renderNumberbox(e)}updateCardLinks(){"d"===MNTK.deviceType&&document.querySelectorAll(".product__card--quick[data-target]").forEach((e=>this.addTargetBlank(e)))}};var G=class{constructor(e){this.context=e;var t=this,r=document.querySelectorAll("[data-slide-wrapper]");Array.prototype.forEach.call(r,(e=>{e.querySelector("[data-slide-button]").addEventListener("click",(function(r){r.preventDefault(),t.toggleSlide(e.querySelector("[data-slide-container]"))}),!1)}))}getHeight(e){var t=window.getComputedStyle(e),r=t.display,a=t.position,n=t.visibility,i=t.maxHeight.replace("px","").replace("%","");if("none"!==r&&"0"!==i)return e.offsetHeight;e.style.position="absolute",e.style.visibility="hidden",e.style.display="block";var o=e.offsetHeight;return e.style.display=r,e.style.position=a,e.style.visibility=n,o}toggleSlide(e){var t=0;e.getAttribute("data-max-height")?"0"===e.style.maxHeight.replace("px","").replace("%","")?e.style.maxHeight=e.getAttribute("data-max-height"):e.style.maxHeight="0":(t=this.getHeight(e)+"px",e.style.transition="max-height 0.5s ease-in-out",e.style.overflowY="hidden",e.style.maxHeight="0",e.setAttribute("data-max-height",t),e.style.display="block",setTimeout((function(){e.style.maxHeight=t}),10))}};var j='[data-handle="openCatalog"]',V='.header__container [data-render="mobileMenu"]',U="data-subwindow",W="data-backwindow",z="data-special-category",F=e=>function(e,t,r,a){if(!Number.isInteger(e))return r;var n=e%100,i=e%10;return n>=5&&n<20||i>=5?a:i>1?r:t}(e,"С Вашего последнего визита был добавлен {count} новый товар","С Вашего последнего визита было добавлено {count} новых товара","С Вашего последнего визита было добавлено {count} новых товаров").replace("{count}",e),Y=Routing.generate("search.rasprodaja"),Q=e=>Routing.generate("shop.search",{activatedAfter:e,sort:"added_DESC",excludeAntiques:"1"}),J="navigation__link",$=J+"--sale",X=J+"--all",Z=J+"--count",ee=[{id:"89",name:"Монеты США",href:"/monety/mira/amerika/ssha/"},{id:"93",name:"Монеты Германии",href:"/monety/mira/evropa/germaniya/"},{id:"195",name:"Монеты ЕВРО",href:"/monety/mira/evropa/evro/"},{id:"90",name:"Монеты Приднестровья",href:"/monety/mira/evropa/prednestrove/"},{id:"91",name:"Монеты Украины",href:"/monety/mira/evropa/ukraina/"}];var te=class{constructor(e){this.context=e,this.goods=null,this.newGoods=null,this.mobileWrap=document.querySelector(V),this.mobileNavs=document.querySelectorAll('.header__container nav:not([data-render="mobileMenu"])'),this.mobileMenuIsOpened=!1,this.bindEvents(window.innerWidth>=1280),window.addEventListener("resize",(()=>{eventDelegate.events.click[j]=[],this.bindEvents(window.innerWidth>=1280)}))}bindEvents(e){if(e){this.fetchNewProducts();eventDelegate.addEvent("click",".nav__link--sub--show",((e,t)=>
1{this.showSubItems(e,t)}))}else{eventDelegate.addEvent("click",j,(()=>{this.goods||MNTK.fetchedGoods||this.initHamburgerMenu(),window.scrollY>0?(window.scrollTo(0,0),setTimeout((()=>{this.handleHamburgerClick()}),1)):this.handleHamburgerClick()}))}}initHamburgerMenu(){this.fetchNewProducts(),window.togglePreloader(),new Promise(((e,t)=>{MNTK.fetchJson(MNTK.menuCacheUrl).then((t=>{var{json:r}=t;return e(r)})).catch((e=>t(e)))})).then((e=>{this.goods=MNTK.fetchedGoods=e,window.togglePreloader()})).catch((e=>{console.log(e),window.togglePreloader()})),eventDelegate.addEvent("click",[".header__container [data-subwindow]",V],(e=>{Object.keys(e.target.dataset).length&&(e.preventDefault(),this.catalogMenuMobileRender(e.target))}))}handleHamburgerClick(){var e;(this.setVhCustomVariable(),document.body.classList.toggle("openMenu"),this.mobileMenuIsOpened)&&(null==(e=this.mobileNavs)||e.forEach((e=>e.style.display="flex")));this.mobileMenuIsOpened=!this.mobileMenuIsOpened,this.mobileWrap.style.display="none"}fetchNewProducts(){this.newGoods||MNTK.fetchJson(MNTK.newProductsUrl).then((e=>{var{json:t}=e;return this.newGoods=t})).then((()=>this.renderNewGoods())).catch(console.log)}renderNewGoods(){if(this.newGoods){var{categories:e,count:t,lastSessionFinish:r}=this.newGoods,{isDesktop:a}=MNTK.device;if(e.length&&e.sort(((e,t)=>(e.numberColumnInMenu||0)-(t.numberColumnInMenu||0))),a){var n=document.getElementById("head-new-products");if(!t){var i=n.parentElement;return void(i&&i.classList.add("hidden"))}n&&(n.insertAdjacentHTML("afterbegin",'<p class="nav__link--title">'+F(t)+'</p><a class="nav__link--title" href="'+Q(r)+'" rel="nofollow">Смотреть все новые товары</a>'),e.forEach((e=>{e.count>0&&n.insertAdjacentHTML("beforeend",'<a class="nav__link--title" href="'+e.url+'" rel="nofollow">'+e.name+(e.count?'<span class="nav__link--count">'+e.count+"</span>":"")+"</a>")})),eventDelegate.addEvent("click","#resetNewProducts",(e=>this.resetNewProducts(e))))}this.updateNewGoodsLinks(a)}else this.fetchNewProducts()}updateNewGoodsLinks(e){var t=document.getElementById(e?"desktopNewGoods":"mobileNewGoods");if(t){var{count:r,lastSessionFinish:a}=this.newGoods;if(t.setAttribute("href",Q(a)),t.setAttribute("rel","nofollow"),r>0){!e&&t.setAttribute("data-subwindow","newGoods");var n=t.querySelector(".last--view");n.textContent="+"+r,n.classList.add("last--view--visible")}}}resetNewProducts(e){e.preventDefault(),MNTK.cookieParse.setCookie("last_session_finish",+Math.floor(new Date/1e3),999),window.location.reload()}showSubItems(e,t){e.preventDefault(),t.closest(".nav__dropdown--item").classList.toggle("nav__dropdown--item--show")}toggleMobileLinks(e){document.querySelector(".header__container").querySelectorAll("nav").forEach((t=>{t.hasAttribute("data-render")?t.style.display=e?"flex":"none":t.style.display=e?"none":"flex"}))}catalogMenuMobileRender(e){var t,r;if(e.hasAttribute(W)){if(t=e.getAttribute(W).split(","),r=t[0],1===t.length)return this.toggleMobileLinks(!1);t.pop()}else if(e.hasAttribute(z)){this.specialCategoryItems=null;var a=Number(e.getAttribute(z)),n=this.goods?this.goods.goods:[];this.recursiveSearch(a,n[0].children)}else e.hasAttribute(U)&&(t=e.getAttribute(U).split(","),r=t[0]);var i=(()=>{if(t)switch(r){case"-1":return{children:this.goods?this.goods.actions:[],href:Y,name:"Распродажа"};case"newGoods":return{children:this.newGoods?this.newGoods.categories:[],href:Q(this.newGoods?this.newGoods.lastSessionFinish:""),name:"Новинки"};default:for(var e={children:[],count:0,href:"",id:null,name:""},a=this.goods?this.goods.goods:[],n=0;n<a.length;n++){var{id:i}=a[n];i.toString()===r&&(e=a[n])}for(var o=1;o<t.length;o++)e=e.children[t[o]];return e}})();this.mobileWrap.innerHTML=(()=>
1{if(!i&&this.specialCategoryItems){var{children:e,count:a,href:n,name:o}=this.specialCategoryItems,s='<a href="'+n+'" class="'+J+'" '+W+'="619,0">Монеты '+o.replace("я","и")+"</a>";return s+='<a href="'+n+'" class="'+J+" "+X+'">\n                    Смотреть все товары\n                    <span class="'+Z+'">'+a+"</span>\n                </a>",e.forEach((e=>{0!==e.count&&(s+='<a href="'+e.href+'" class="'+J+'">\n                            '+e.name+"\n                            "+(e.children&&e.children.length?"":'<span class="'+Z+'">'+e.count+"</span>")+"\n                        </a>")})),s}if(!i)return"";var{children:d,count:c,href:l,id:u,name:h}=i,m=W+'="'+t.join(",")+'"',g='<a href="'+l+'" class="'+J+'" '+m+">"+h+"</a>";return"-1"===r?g+=this.renderActionItems(d):"newGoods"===r?g+='<p class="new-goods">'+F(this.newGoods?this.newGoods.count:"")+'</p>\n                        <a href="'+l+'" class="'+J+" "+X+'" rel="nofollow">Смотреть все новинки</a>':(g+='<a href="'+l+'" class="'+J+" "+X+'" rel="nofollow">\n                            Смотреть все товары\n                            <span class="'+Z+'">'+c+"</span>\n                        </a>","619"===r&&1===t.length&&(g+='<a href="'+Routing.generate("goods.category",{slugPath:"monety",slabCompanyId:1})+'" class="'+J+" "+$+'" style="padding-right: 20px !important;">Монеты в слабах Монетник</a>')),d.forEach(((e,a)=>{if(22===e.id&&(g+=this.renderSpecialCategories()),0!==e.count){var n=e.children&&e.children.length&&U+"="+t.join(",")+","+a;g+="newGoods"===r?'<a href="'+(e.href||e.url)+'" class="'+J+'" '+n+">\n                                "+e.name+'<span class="'+Z+'">'+e.count+"</span>\n                            </a>":'<a href="'+(e.href||e.url)+'" class="'+J+'" '+n+">\n                            "+e.name+"\n                            "+(e.children&&e.children.length?"":'<span class="'+Z+'">'+e.count+"</span>")+"\n                        </a>"}})),g})(),this.toggleMobileLinks(!0)}renderSpecialCategories(){return ee.map((e=>{var t="89"===e.id||"93"===e.id;return'<a href="'+e.href+'" class="'+J+'" '+(t?'data-special-category="'+e.id+'"':"")+">"+e.name+"</a>"})).join("")}setVhCustomVariable(){var e=()=>{document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px")};e(),window.addEventListener("resize",e)}renderActionItems(e){for(var t='<a href="'+Y+'" class="'+J+" "+X+'" rel="nofollow">Смотреть все товары</a>',r=0;r<e.length;r++){var{href:a,name:n}=e[r];t+='<a href="'+a+'" class="'+J+'" rel="nofollow">'+n+"</a>"}return t}recursiveSearch(e,t){if(!Array.isArray(t))throw new Error(t+" не массив!");for(var r=0;r<t.length;r++){if(t[r].id===e)return this.specialCategoryItems=t[r];t[r].children&&t[r].children.length&&this.recursiveSearch(e,t[r].children)}}isNewGoods(e){return"#head-new-products"===e}isActions(e){return"#nav-actions"===e}};class re{constructor(e){this.policy=!1,this.oferta=!1,this.$modal=document.getElementById(e+"-modal"),this.fetchData(e),document.addEventListener("onModalClose",(()=>{MNTK.previouslyOpenedModal&&setTimeout((()=>{openModal(MNTK.previouslyOpenedModal),delete MNTK.previouslyOpenedModal,this.setModalHtml("")}),0)})),document.addEventListener("updatePolicyContent",(e=>{var{detail:t}=e;this.$modal=document.getElementById(t+"-modal"),this.fetchData(t)}))}fetchData(e){if(this[e])this.setModalHtml(this[e]);else{var t=Routing.generate("api.web.help."+e);MNTK.fetchJson(t).then((t=>{var{json:r}=t;this[e]=r.html,this.setModalHtml(r.html)})).catch((e=>{onModalClose(),openMessageModal(e.message,"Произошла ошибка!"),console.log(e)}))}}setModalHtml(e){var t=this.$modal.querySelector(".modal__body");t.innerHTML=e||'<div class="loader"></div>'}}var ae="quick-preorder",ne="quick-price-request",ie="quick-order";var oe=class{constructor(){this.policyPopup=null,this.init(),this.keepCheckboxesChecked()}init(){var e=document.createElement("div");e.className="modal__overlay",document.body.appendChild(e),e.addEventListener("click",this.closeModal),eventDelegate.addEvent("click",'[data-handle="toggleModal"]',((e,t)=>
1this.toggleModal(e,t))),window.onModalClose=this.closeModal,window.openModal=e=>this.toggleModal(null,e),window.openMessageModal=(e,t)=>{this.toggleMessageModal(e,t)},window.escapeKeyHandler=this.escapeKeyHandler,MNTK.quickPreviewLoadAssets=this.quickPreviewLoadAssets}escapeKeyHandler(e){var{key:t}=e;"Escape"===t&&onModalClose()}toggleModal(e,t){var r="";if("string"==typeof t)r=t,document.body.classList.toggle("openModal"),"add-to-cart-modal"===r&&(MNTK.coinUpgradeAvailable&&MNTK.stat&&MNTK.stat.onReady((()=>{gtag("event","Click",{event_category:"ADD_TO_CART_AVAILABLE_COIN_UPGRADE",event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal","ADD_TO_CART_AVAILABLE_COIN_UPGRADE")})),MNTK.crossSellAvailable&&(MNTK.stat&&MNTK.stat.onReady((()=>{gtag("event","Click",{event_category:"ADD_TO_CART_AVAILABLE_CROSS_SELL",event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal","ADD_TO_CART_AVAILABLE_CROSS_SELL")})),eventDelegate.addEvent("click",'[data-list="CROSS_SELL"] [data-handle="quickCartAdd"]',(()=>{MNTK.stat&&MNTK.stat.onReady((()=>{gtag("event","Click",{event_category:"ADD_TO_CART_USED_CROSS_SELL",event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal","ADD_TO_CART_USED_CROSS_SELL")}))})),setTimeout((()=>{MNTK.emit("lazyInitCarousel")}),1)));else if(e&&e.preventDefault(),r=t.dataset.link)switch(document.body.classList.add("openModal"),r){case"quick-preview":MNTK.quickPreviewItemId=t.getAttribute("data-preview"),MNTK.quickPreviewInstance?MNTK.emit("updateQuickPreview",MNTK.quickPreviewItemId):this.quickPreviewLoadAssets();break;case ae:var a=t.getAttribute("data-preorder"),n=t.getAttribute("data-item-name");MNTK.preorderInstance?MNTK.emit("updatePreorder",{itemId:a,name:n}):(MNTK.preorderItem={itemId:a,name:n},this.orderModalLoadAssets(ae));break;case ne:var i=t.getAttribute("data-price-request"),o=t.getAttribute("data-item-name");MNTK.priceRequestInstance?MNTK.emit("updatePriceRequest",{itemId:i,name:o}):(MNTK.priceRequestItem={itemId:i,name:o},this.orderModalLoadAssets(ne));break;case"policy-modal":case"confidential-modal":case"ads-modal":case"oferta-modal":var s=r.replace("-modal","");"oferta"===s&&(r="policy-modal"),"confidential"===s&&(r="confidential-modal"),this.policyPopup?MNTK.emit("updatePolicyContent",s):this.policyPopup=new re(s),MNTK.previouslyOpenedModal=t.getAttribute("data-open-modal");break;case ie:var d=t.getAttribute("data-item-id"),c=t.getAttribute("data-goal"),l=t.getAttribute("data-expensive-coin");MNTK.quickOrderInstance?MNTK.emit("quickOrderItemId",{itemId:d,goalType:c,isExpensiveCoinCommitent:l}):(MNTK.quickOrderItem={itemId:d,goalType:c,isExpensiveCoinCommitent:l},this.orderModalLoadAssets(ie));break;case"ask_photos":if(MNTK.viewItemId){var u=document.querySelector('[data-href="'+r+'"]');null==u||u.querySelector('input[type="email"]').setAttribute("data-id",MNTK.viewItemId)}}else window.onModalClose(),document.body.classList.remove("openModal");var h=document.querySelector(".openThisModal");h&&h.classList.remove("openThisModal");var m=document.querySelector('[data-href="'+r+'"]');m&&m.classList.add("openThisModal"),document.addEventListener("keyup",window.escapeKeyHandler)}toggleMessageModal(e,t){var r="Произошла ошибка!",a=e||'<p style="text-align: center;">Попробуйте отправить запрос позже или обратитесь к сотрудникам магазина.</p>';e&&(r=t||"Запрос успешно отправлен");var n=document.querySelector('[data-href="ajax-alert"]');
1document.body.classList.toggle("openModal"),n.classList.add("openThisModal"),n.querySelector("#aa-head").innerText=r,n.querySelector("#aa-body").innerHTML=a,n.querySelector(".contacts").classList.toggle("hidden",Boolean(e))}closeModal(){var e=document.querySelector(".openThisModal");e&&(MNTK.emit("onModalClose",e.id),document.querySelector(".openThisModal #leadCoupon")&&(document.location.href="/checkout/?fastAction=new-customer"),"quick-preview"!==e.id&&(e.classList.remove("openThisModal"),document.body.classList.remove("openModal")))}keepCheckboxesChecked(){document.querySelectorAll('[data-component="Policy"]').forEach((e=>{var t=e.querySelector('input[type="checkbox"]');t&&(t.checked=!0,t.addEventListener("change",(e=>e.target.checked=!0)))}))}quickPreviewLoadAssets(){if(!MNTK.quickPreviewInstance){var e="/bundles/new_design/quick-preview",t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=e+".js?"+MNTK.assetVersion,document.body.appendChild(t);var r=document.createElement("link");r.href=e+".css?"+MNTK.assetVersion,r.type="text/css",r.rel="stylesheet",document.body.appendChild(r),MNTK.quickPreviewInstance=!0}}orderModalLoadAssets(e){if(!(MNTK.preorderInstance&&e===ae||MNTK.quickOrderInstance&&e===ie||MNTK.priceRequestInstance&&e===ne)){var t=document.createElement("script");t.type="text/javascript",t.src="/bundles/new_design/"+e+".js?"+MNTK.assetVersion,document.body.appendChild(t)}}},se=r(52732),de=r.n(se);function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ce.apply(this,arguments)}var le=".product__card--quick.with-video",ue=".show-play-btn .product__card-wrap";var he=function(e){if(e){e=e.trim().toLowerCase();return/^(?:[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/.test(e)}return!1};function me(e,t,r,a,n,i,o){try{var s=e[i](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(a,n)}var ge='.subscribe input[type="email"]',pe='.subscribe button[type="submit"]';var ve=class{constructor(e){this.context=e,this.input=e.querySelector(ge),this.error=e.querySelector(".subscribe .form__error"),this.submit=e.querySelector(pe),eventDelegate.addEvent("click",pe,this.submitForm.bind(this)),eventDelegate.addEvent(["input","change"],ge,this.validateInput.bind(this)),this.toggleSubscriptions(),this.toggleSubscriptionsGlobal(),this.setWaitDays()}validateInput(e){this.changeCssClasses(!he(e.target.value))}changeCssClasses(e){this.error.classList.toggle("visible",e),this.input.classList.toggle("js-invalid",e)}handleSuccessResponse(e){var t=document.querySelector(".wrapper");t&&t.classList.add("wrapper_p-bottom"),window.openMessageModal(e,"Запрос успешно отправлен!")}destroySubscriptionForm(){this.context.parentNode&&this.context.parentNode.removeChild(this.context)}submitForm(e){var t,r=this;return(t=function*(){e.preventDefault();var t=r.input.value;if(r.changeCssClasses(!he(t)),he(t))try{window.togglePreloader();var a=Routing.generate("api.web.subscription.email",{email:t}),{json:n}=yield MNTK.fetchJson(a,{method:"POST"}),{message:i,newEmailObtained:o}=n;window.togglePreloader(),r.destroySubscriptionForm(),r.handleSuccessResponse(i),MNTK.cookieParse.setCookie("subscriptionEmail",encodeURIComponent(t),30),o&&r.trackSubscription(o)}catch(e){console.error(e),window.openMessageModal()}},function(){var e=this,r=arguments;return new Promise((function(a,n){var i=t.apply(e,r);function o(e){me(i,a,n,o,s,"next",e)}function s(e){me(i,a,n,o,s,"throw",e)}o(void 0)}))})()}trackSubscription(e){MNTK.stat&&MNTK.stat.onReady((()=>{gtag("event","Click",{event_category:"EMAIL_SUBSCRIBED",event_label:"No",non_interaction:!1}
1),MNTK.stat.trackYm("EMAIL_SUBSCRIBED"),e&&MNTK.emit("NEW_EMAIL_OBTAINED")}))}toggleSubscriptionsGlobal(){var e=document.querySelectorAll(".subscription_need_receive__button");Array.prototype.forEach.call(e,(e=>{e.addEventListener("change",(e=>{var t=e.target.closest(".subscription__lots,.subscription__items").querySelector(".subscription__contrainer_block"),r=e.target,a=r.dataset.subscriptionId,n=r.dataset.accessToken,i=r.dataset.param,o=r.checked?1:0,s={subscriptionId:a,accessToken:n,param:i,isActive:o};MNTK.makeRequest("GET",Routing.generate("api.web.subscription.following.need_receive.global.toogle",s)).then((()=>{o?t.classList.remove("disabled"):t.classList.add("disabled")})).catch((e=>{window.openMessageModal(),console.log(e)}))}))}))}toggleSubscriptions(){var e=document.getElementById("followingSearchSettings");if(e){var t=e.querySelectorAll(".subscription__button");Array.prototype.forEach.call(t,(t=>{t.addEventListener("click",(t=>{var r=t.target,a=e.dataset.subscriptionId,n=e.dataset.accessToken;if("1"===r.dataset.active){var i="search"===r.dataset.type?Routing.generate("api.web.subscription.following.search.unfollow",{hash:r.dataset.hash,subscriptionId:a,accessToken:n}):Routing.generate("api.web.subscription.following.lot.changeactive",{subscriptionId:a,accessToken:n,followingId:r.dataset.id,newState:0});MNTK.makeRequest("GET",i).then((()=>{r.dataset.active="0",r.dataset.defaultClass="cancel",r.classList.remove("success"),r.classList.add("cancel")})).catch((e=>{window.openMessageModal(),console.log(e)}))}else{var o="search"===r.dataset.type?Routing.generate("api.web.subscription.following-settings.search.follow",{params:JSON.parse(r.dataset.params),subscriptionId:a,accessToken:n}):Routing.generate("api.web.subscription.following.lot.changeactive",{subscriptionId:a,accessToken:n,followingId:r.dataset.id,newState:1});MNTK.makeRequest("GET",o).then((()=>{r.dataset.active="1",r.dataset.defaultClass="success",r.classList.remove("cancel"),r.classList.add("success")})).catch((e=>{window.openMessageModal(),console.log(e)}))}}))}));var r=e.querySelectorAll(".searchByFilter");Array.prototype.forEach.call(r,(e=>{var t=JSON.parse(e.dataset.params);Object.entries(t).forEach((e=>{var[r,a]=e;Array.isArray(a)&&(t[r]=a.join(","))}));var r=Routing.generate("shop.search",t);e.setAttribute("href",r)}))}}setWaitDays(){var e=document.getElementById("subscriptionWaitDays");if(e){var t=e.querySelector('input[type="hidden"]'),r=e.querySelectorAll(".switch__label");Array.prototype.forEach.call(r,(e=>{e.addEventListener("click",(e=>{var a=e.target.parentElement.dataset.value;e.target.classList.contains("active")||(e.target.classList.add("active"),t.value=a),Array.prototype.forEach.call(r,(t=>{t.classList.contains("active")&&t!==e.target&&t.classList.remove("active")}))}))}))}}},be="header__branding--search";var fe=class{constructor(e){this.context=e,this.input=e.querySelector("input"),this.clear=e.querySelector(".p-search__clear, .filter-panel__search-clear"),this.submit=e.querySelector('[type="submit"]'),this.suggestions=e.querySelector(".header__suggestions"),this.outsideClickListener=null,this.$header=document.querySelector(".header__branding"),this.bindEvents(),e.parentNode.classList.contains("header__container")&&eventDelegate.addEvent("click","[data-search-field-toggle]",(()=>this.toggleSearch()))}bindEvents(){this.clear.addEventListener("click",(()=>this.clearInput())),this.input.addEventListener("input",(e=>{this.setClearButton()})),this.input.addEventListener("change",(()=>this.setClearButton())),this.submit.addEventListener("click",(e=>{document.querySelector(".search")&&e.preventDefault(),this.initSearch(this.input.value)})),this.setClearButton(),document.addEventListener("deleteSearch",(()=>this.input.value="")),this.suggestions&&this.bindSuggestionsListener()}bindSuggestionsListener(){this.input.addEventListener("input",(e=>{var t=e.target.value;if(t){var r=Routing.generate("api.web.search.suggestions",{categId:this.getCurrentCategoryId(),layoutCategory:MNTK.pageLayoutCategory,q:t});MNTK.makeRequest("GET",r).then((e=>{this.suggestions&&(this.suggestions.innerHTML=e)})).then((()=>{this.toggleSearchSuggestions(!0),this.outsideClickListener||(document.addEventListener("click",this.handleOutsideClick.bind(this)),this.outsideClickListener=!0)}))}else this.toggleSearchSuggestions(!1),this.suggestions&&(this.suggestions.innerHTML="")}))}getCurrentCategoryId(){var e=document.querySelector('meta[name="current-category-id"]'),t=(null==e?void 0:e.content)||0;return parseInt(t,10)}setClearButton(){this.clear.style.display=this.input.value?"block":"none"}initSearch(e){MNTK.emit("startSearch",e),this.trackUsedSiteSearch(e)}clearInput(){this.input.value="",this.toggleSearchSuggestions(!1),MNTK.emit("deleteSearch"),this.trackUsedSiteSearch("")}trackUsedSiteSearch(e){var t;null==(t=MNTK.stat)||t.onReady((()=>{gtag("event","Click",{event_category:"UsedSiteSearch",event_label:"No",non_interaction:!1}),MNTK.stat.trackYm("reachGoal","UsedSiteSearch"),window.ScarabQueue&&ScarabQueue.push(["searchTerm",e]),window.ScarabQueue&&ScarabQueue.push(["go"])}))}toggleSearch(){this.$header&&(this.$header.classList.toggle(be),this.$header.classList.contains(be)&&this.input.focus())}toggleSearchSuggestions(e){this.suggestions&&this.suggestions.classList.toggle("hidden",!e)}handleOutsideClick(e){e.target.closest(".header__suggestions")||this.toggleSearchSuggestions(!1)}};window.MNTK||(MNTK={});var ye=".track-merchandising",we=".track-merchandising-debug",Te="data-merchandising-impressions",Me="data-merchandising-visible-count",ke=ye+" .product__card-img";var Ne=class{constructor(){this.f={debug:!1,tickWaitMs:200,tickElemMaxThreshold:4,impressionTickTimer:null,ticksSeriesNoUpdates:0,ticksMaxSeriesNoUpdates:40,already
1Queued:{},queueToServer:[],sendToServerTimer:null,sendToServerPeriodMs:500,observer:null,observingTimer:null,observingScrollThrottle:!1,observingScrollTimer:null,observingScrollThrottleMs:100,observerVisibleSet:null},this.init()}init(){this.f.debug="1"===this.getUrlParam("merchandisingDebug")||"1"===this.getUrlParam("debugMerchandising"),this.consoleDebug("INITIATED"),this.f.observerVisibleSet=new Set,Array.prototype.forEach.call(document.querySelectorAll(ke),(e=>this.f.debug&&this.addDebugIfNotSet(e))),this.f.sendToServerTimer=setInterval((()=>this.sendToServerTick()),this.f.sendToServerPeriodMs),this.browserHasIntersectionObserver?(this.consoleDebug("Using IntersectionObserver"),this.createIntersectionObserver(),this.setTrackElementsIntersectionObservers(),document.addEventListener("updateComponents",(()=>{setTimeout(this.setTrackElementsIntersectionObservers.bind(this),250)})),window.innerWidth>640&&window.addEventListener("scroll",(()=>this.intersectionObserverScrollThrottle())),this.f.observingTimer=setInterval((()=>this.intersectionObserverTick()),this.f.tickWaitMs),document.addEventListener("updateMerchandisingTrackedElements",(()=>this.updateMerchandisingTrackedElements()))):(this.consoleDebug("Using getBoundingClientRect and timer"),this.resetImpressionTickTimer(),window.addEventListener("scroll",(()=>this.scrollHandler()))),Array.prototype.forEach.call(document.querySelectorAll(ye),(e=>{this.addElementClickHandler(e,"click"),this.addElementClickHandler(e,"auxclick")}))}addElementClickHandler(e,t){e.getAttribute("merchandising-click-handler-set")||(e.setAttribute("merchandising-click-handler-set","1"),e.addEventListener(t,(()=>{var t=this.getElemProps(e);if(t.elementId){var r=JSON.parse(JSON.stringify(t));if(r.actionType=2,!this.isEntryQueued(r)){this.markEntryQueued(r),this.consoleDebug("Click on merchandising tracking element id = "+r.elementId);var a=[r],n=JSON.parse(JSON.stringify(t));n.actionType=1,this.isEntryQueued(n)||(this.markEntryQueued(n),a.push(n)),this.trackOtherMetrics(a),MNTK.isBlackFriday&&!this.f.debug||(this.sendBeaconMessage(JSON.stringify(a)),this.sendToServerTick())}}})))}updateMerchandisingTrackedElements(){this.setTrackElementsIntersectionObservers(),Array.prototype.forEach.call(document.querySelectorAll(ye),(e=>{this.addElementClickHandler(e,"click"),this.addElementClickHandler(e,"auxclick")}))}sendBeaconMessage(e){var t=this.getTrackUri();navigator.sendBeacon&&navigator.sendBeacon(t,e)||fetch(t,{params:e,method:"POST",keepalive:!0})}getTrackUri(){return Routing.generate("api.web.merchandising.track",{srcPageType:MNTK.srcMerchandising.pageType,srcPagination:MNTK.srcMerchandising.pagination,srcElementId:MNTK.srcMerchandising.elementId,srcRequestId:window.requestId,isIntersectionObserver:this.f.observer?1:0,srcIsAdvertising:window.MNTK.isPageLoadFromExternalSourceFirstState?1:0,debug:this.f.debug?1:0})}consoleDebug(e){this.f.debug&&console.log("[MERCHANDISING] "+e)}getUrlParam(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.href);return null==t?null:decodeURI(t[1])||0}addDebugIfNotSet(e){if(!e.querySelector(we)){e.setAttribute("style","border: 2px solid #b15566");var t=document.createElement("span");t.classList.add("track-merchandising-debug"),t.setAttribute("style","padding: 2px; background-color: #ecead0"),t.innerText="0",e.prepend(t)}}sendToServerTick(){if(this.f.queueToServer.length){for(var e,t=[];void 0!==(e=this.f.queueToServer.shift());)t.push(e);MNTK.isBlackFriday&&!this.f.debug||this.sendBeaconMessage(JSON.stringify(t)),this.trackOtherMetrics(t),this.consoleDebug("Queue sent = "+t.length)}}trackOtherMetrics(e){MNTK.stat&&MNTK.stat.onReady((()=>{e.forEach((e=>{1==e.actionType&&1==e.type&&(577884==e.elementId&&(MNTK.stat.trackYm("reachGoal","GH_VIEW_IN_SEARCH_577884"),console.log("GH_VIEW_IN_SEARCH_577884")),588431==e.elementId&&MNTK.stat.trackYm("reachGoal","GH_VIEW_IN_SEARCH_588431")),577884==e.elementId&&console.log("GH_577884",e),2==e.actionType&&1==e.type&&(MNTK.stat.trackYmGa("CLICK_LOT_SEARCH_RESULTS",!1),577884==e.elementId&&(MNTK.stat.trackYm("reachGoal","GH_CLICK_IN_SEARCH_577884"),console.log("GH_CLICK_IN_SEARCH_577884")),588431==e.elementId&&MNTK.stat.trackYm("reachGoal","GH_CLICK_IN_SEARCH_588431")),e.isExpensiveCoin&&MNTK.stat.trackYmGa("VIEW_EXPENSIVE_COIN_COMMITENT_SEARCH",!0)}))}))}get browserHasIntersectionObserver(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}createIntersectionObserver(){this.f.observer=new IntersectionObserver(((e,t)=>this.handleIntersection(e,t)),{root:null,rootMargin:"0px",threshold:[0,.25,.5,.75,.9,1]})}handleIntersection(e){var t=this.f.observerVisibleSet;e.forEach((e=>{e.isIntersecting&&e.intersectionRatio>=.9?t.add(e.target):t.delete(e.target)})),this.consoleDebug("Visible blocks count: "+t.size)}
1setTrackElementsIntersectionObservers(){if(this.browserHasIntersectionObserver){var e=0;Array.prototype.forEach.call(document.querySelectorAll(ke),(t=>{t.getAttribute(Me)||(e++,this.f.debug&&this.addDebugIfNotSet(t),t.setAttribute(Me,0),this.f.observer.observe(t))})),this.consoleDebug("Observers added: "+e)}}intersectionObserverScrollThrottle(){clearTimeout(this.f.observingScrollTimer),this.f.observingScrollThrottle=!0,this.f.observingScrollTimer=setTimeout((()=>this.f.observingScrollThrottle=!1),this.f.observingScrollThrottleMs)}intersectionObserverTick(){this.f.observingScrollThrottle||this.isDocumentHidden||this.f.observerVisibleSet.forEach((e=>{var t=parseInt(e.getAttribute(Me))+1;e.setAttribute(Me,t),this.updateDebugCounter(e,t),t<this.f.tickElemMaxThreshold||(this.updateDebugCounter(e,"OK"),this.pushElemImpressionToServerQueue(e),this.f.observer.unobserve(e),this.f.observerVisibleSet.delete(e))}))}get isDocumentHidden(){return void 0!==document.hidden?document.hidden:void 0!==document.mozHidden?document.mozHidden:void 0!==document.msHidden?document.msHidden:void 0!==document.webkitHidden&&document.webkitHidden}resetImpressionTickTimer(){clearTimeout(this.f.impressionTickTimer),this.f.impressionTickTimer=setTimeout((()=>this.tick()),this.f.tickWaitMs)}scrollHandler(){this.f.ticksSeriesNoUpdates=0,this.resetImpressionTickTimer()}tick(){var e=!1;this.isDocumentHidden?this.resetImpressionTickTimer():(Array.prototype.forEach.call(document.querySelectorAll(ke),(t=>{this.processTrackMerchandisingElem(t)&&(e=!0)})),e?this.f.ticksSeriesNoUpdates=0:this.f.ticksSeriesNoUpdates++,this.f.ticksSeriesNoUpdates<this.f.ticksMaxSeriesNoUpdates&&this.resetImpressionTickTimer())}processTrackMerchandisingElem(e){if(this.f.debug&&this.addDebugIfNotSet(e),!this.isElementInView(e))return!1;var t=e.getAttribute(Te)?parseInt(e.getAttribute(Te)):0;return e.setAttribute(Te,++t),t>=this.f.tickElemMaxThreshold&&(this.pushElemImpressionToServerQueue(e),e.classList.remove("track-merchandising"),this.f.debug&&e.setAttribute(Te,"OK")),this.updateDebugCounter(e,e.getAttribute(Te)),!0}isElementInView(e){var t=e.getBoundingClientRect(),r=t.top,a=t.top+t.height,n=t.left,i=t.left+t.width;return r>=0&&a<=Math.min(document.documentElement.clientHeight,window.innerHeight||0)&&n>=0&&i<=Math.min(document.documentElement.clientWidth,window.innerWidth||0)}getElemProps(e){return{type:e.getAttribute("data-merchandising-type"),position:e.getAttribute("data-merchandising-position"),elementId:e.getAttribute("data-merchandising-element-id"),isExpensiveCoin:e.getAttribute("data-expensive-coin")}}pushElemImpressionToServerQueue(e){var t=e.closest("[data-merchandising-type]");if(t){var r=this.getElemProps(t);r.actionType=1,this.isEntryQueued(r)||(this.f.queueToServer.push(r),this.markEntryQueued(r))}}markEntryQueued(e){e.elementId&&(this.f.alreadyQueued[this.getEntryQueuedKey(e)]=1)}isEntryQueued(e){return!!e.elementId&&void 0!==this.f.alreadyQueued[this.getEntryQueuedKey(e)]}getEntryQueuedKey(e){return e.type+"-"+e.actionType+"-"+e.elementId}updateDebugCounter(e,t){this.f.debug&&Array.prototype.forEach.call(e.querySelectorAll(we),(e=>{e.innerText=t,"OK"===t&&e.parentNode.setAttribute("style","border: 2px solid #068013")}))}};var _e=Routing.generate("purchase.checkout.new");var Ee=function(){eventDelegate.addEvent("click",["[data-open-checkout]","div.product__card-numberbox-short"],((e,t)=>{"#"===t.getAttribute("href")&&(e.preventDefault(),t.setAttribute("href",_e),t.click())}))};var Se=function(){"d"===MNTK.deviceType&&eventDelegate.addEvent(["mouseover","mouseout"],".with-video",((e,t)=>
1{var r=t.querySelector("video");if(r){var a=r.play();void 0!==a&&("mouseover"===e.type?a.catch(console.log):a.then((()=>r.pause())).catch(console.log))}}))};window.MNTK.stat&&(window.MNTK.stat.analytics=a,N());var Ae={EventDelegate:y,numberBox:B,newModal:oe,SlideToggle:G,lazyLoad:class{constructor(){this.lazyLoadInstance=new(de())({elements_selector:".lazyload",threshold:0}),this.videosLazyload=new(de())(this.getOptions({selector:".video-lazy",thresholds:"-100px 0px 250px 0px"})),this.autoplayErrorMobile=null,this.autoplayErrorDesktop=null,this.cardsWithVideo=document.querySelectorAll(le),this.bindEvents()}bindEvents(){document.addEventListener("updateLazyLoad",(()=>{this.updateLazyLoad()})),this.addEventListenersToCardsWithVideo()}getOptions(e){var t={elements_selector:e.selector,threshold:0};if("d"!==MNTK.deviceType){var r,a=e=>{this.handleAutoplayErrorMobile(e)};function i(e){setTimeout((function(){void 0!==(r=e.play())&&r.catch(a)}),1)}var n=ce({},t,{unobserve_completed:!1,callback_enter:i,callback_loaded:i,callback_exit(e){void 0!==r&&r.then((()=>e.pause())).catch(a)}});return e.thresholds&&(n.thresholds=e.thresholds),n}return t}handleAutoplayErrorMobile(e){if("NotAllowedError"===e.name){if(this.autoplayErrorMobile)return;this.autoplayErrorMobile=e,this.togglePlayButtons(!0),eventDelegate.addEvent("click",ue,(e=>{e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),document.querySelectorAll(ue+" video").forEach((e=>{if(e.getAttribute("src")){var t=e.play();void 0!==t&&t.catch((e=>{console.log("handleAutoplayErrorMobile",e)}))}})),this.togglePlayButtons(!1),eventDelegate.events.click.hasOwnProperty(ue)&&delete eventDelegate.events.click[ue]}))}else console.log("handleAutoplayErrorMobile",e)}handleAutoplayErrorDesktop(e){"NotAllowedError"!==e.name||this.autoplayErrorDesktop?console.log("handleAutoplayErrorDesktop",e):(this.autoplayErrorDesktop=!0,this.toggleVideoPlaceholders())}handlePauseError(e){console.log("pause error",e)}togglePlayButtons(e){this.cardsWithVideo.forEach((t=>{t.classList.toggle("show-play-btn",e)}))}toggleVideoPlaceholders(){var e=t=>{t.preventDefault(),this.cardsWithVideo.forEach((t=>{t.classList.remove("with-video-placeholder"),t.removeEventListener("click",e)}));var r=t.target.querySelector("video");if(r){var a=r.play();void 0!==a&&a.catch(this.handleAutoplayErrorDesktop.bind(this))}};this.cardsWithVideo.forEach((t=>{t.addEventListener("click",e),t.classList.add("with-video-placeholder")}))}addEventListenersToCardsWithVideo(){if(!("d"!==MNTK.deviceType||window.innerWidth<1280)){var e=e=>{this.handleAutoplayErrorDesktop(e)},t=e=>{this.handlePauseError(e)};this.cardsWithVideo.forEach((r=>{var a,n=r.querySelector("video");r.addEventListener("mouseenter",(()=>{void 0!==(a=n.play())&&a.catch(e)}));r.addEventListener("mouseleave",(()=>{void 0!==a&&a.then((()=>n.pause())).catch(t)}))}))}}updateLazyLoad(){var e,t;null==(e=this.lazyLoadInstance)||e.update(),null==(t=this.videosLazyload)||t.update(),this.cardsWithVideo=document.querySelectorAll(le),this.addEventListenersToCardsWithVideo()}},Catalog:te,searchField:fe,subscription:ve,Carousel:window.MNTK.Carousel,pixelRatio:class{constructor(){MNTK.cookieParse.setCookie(MNTK.cookies.PIXELRATIO,[window.devicePixelRatio,window.innerWidth].join("_"),70)}},Merchandising:Ne,Currency:class{constructor(){this.bindEvents()}bindEvents(){eventDelegate.addEvent("click",".currency",(()=>this.toggleList())),eventDelegate.addEvent("click","[data-code]",((e,t)=>{this.changeCurrency(t.getAttribute("data-code"))}))}changeCurrency(e){window.togglePreloader();var t=Routing.generate("api.web.set_currency",{code:e});fetch(t,{method:"POST"}).then((()=>window.location.reload())).catch((e=>{console.error(e),window.openMessageModal()}))}toggleList(){var e=document.querySelector(".currency__list");e&&e.classList.toggle("hidden")}},ActionBanner:function(e){var t,r,a="d"===MNTK.deviceType?"data-bg-desktop":"data-bg-mobile";t=e,r=e.getAttribute(a),t&&(t.style.backgroundImage="url("+r+")"),1===Number(e.getAttribute("data-remove-timer"))&&document.querySelector(".action__timer").classList.add("hidden");var n=Number(e.getAttribute("data-end"));window.MNTK&&window.MNTK.Timer?new window.MNTK.Timer({selector:".action__timer",endTime:new Date(1e3*n),onTimerEnd(){e.classList.add("hidden")}}
1).start():console.error("no Timer in MNTK object!")},OpenCheckout:Ee,VideoAutoplay:Se,CookiePolicy:class{constructor(){document.addEventListener("DOMContentLoaded",(()=>{var e,t=document.getElementById("cookie-policy-agree");if(t){var r=document.getElementById("cookie-policy");if(r)if(!(null==(e=document.cookie.split("; ").find((e=>e.startsWith("cookie-policy-agree="))))?void 0:e.split("=")[1])){r.style.display="block",t.addEventListener("click",(()=>{document.cookie="cookie-policy-agree=1; path=/; max-age=126144000",r.remove()}));var a=document.getElementsByClassName("product-hero__onscroll");a.length&&setInterval((()=>{a[0].classList.contains("visible")?r.style.bottom="68px":r.style.bottom="0px"}),100);var n=document.getElementsByClassName("card_promo");n.length&&n[0].classList.contains("sticky")&&(r.style.bottom="68px")}}}))}}},Ce="data-component";function Ie(e){void 0===e&&(e=document),NodeList.prototype.forEach=Array.prototype.forEach,e.querySelectorAll("["+Ce+"]").forEach((e=>{e.getAttribute(Ce).split(",").forEach((t=>{if(e._initialisedComponent=e._initialisedComponent||{},!e._initialisedComponent[t])if(Ae.hasOwnProperty(t)){var r=Ae[t];try{e._initialisedComponent[t]=new r(e,t)}catch(e){console.log(t,e)}}else e._notInitialisedComponents=e._notInitialisedComponents||[],e._notInitialisedComponents.includes(t)||e._notInitialisedComponents.push(t)}))}))}Ie(),document.addEventListener("updateComponents",(()=>Ie())),document.addEventListener("addNewComponent",(e=>function(e){Array.isArray(e.detail)?e.detail.forEach((function(e){var{componentName:t,component:r}=void 0===e?{}:e;Array.prototype.forEach.call(document.querySelectorAll("["+Ce+"]"),(e=>{if(e._notInitialisedComponents&&e._notInitialisedComponents.length)for(var a=0;a<e._notInitialisedComponents.length;a++)e._notInitialisedComponents[a]===t&&(e._initialisedComponent[t]=new r(e,t))}))})):console.warn("Initialized components should be typeof Array<Object>")}(e)))},19755:function(e,t){!function(e){var t="undefined"==typeof window,r=(a.prototype.match=function(e,t){return(t=this.userAgent.match(t))&&1<t.length&&t[e]||""},Object.defineProperty(a.prototype,"isMobile",{get:function(){return!this.isTablet&&(/[^-]mobi/i.test(this.userAgent)||"iphone"===this.iOSDevice||"ipod"===this.iOSDevice||this.isAndroidDevice||/nexus\s*[0-6]\s*/i.test(this.userAgent))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isTablet",{get:function(){return/tablet/i.test(this.userAgent)&&!/tablet pc/i.test(this.userAgent)||"ipad"===this.iOSDevice||this.isAndroidDevice&&!/[^-]mobi/i.test(this.userAgent)||!/nexus\s*[0-6]\s*/i.test(this.userAgent)&&/nexus\s*[0-9]+/i.test(this.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isDesktop",{get:function(){return!this.isMobile&&!this.isTablet},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isMacOS",{get:function(){return/macintosh/i.test(this.userAgent)&&{version:this.match(1,/mac os x (\d+(\.?_?\d+)+)/i).replace(/[_\s]/g,".").split(".").map((function(e){return e}))[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isWindows",{get:function(){return/windows /i.test(this.userAgent)&&{version:this.match(1,/Windows ((NT|XP)( \d\d?.\d)?)/i)}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isiOS",{get:function(){return!!this.iOSDevice&&{version:this.match(1,/os (\d+([_\s]\d+)*) like mac os x/i).replace(/[_\s]/g,".")||this.match(1,/version\/(\d+(\.\d+)?)/i)}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isAndroid",{get:function(){return this.isAndroidDevice&&{version:this.match(1,/android[ \/-](\d+(\.\d+)*)/i)}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"browser",{get:function(){var e=this.match(1,/version\/(\d+(\.\d+)?)/i);return/opera/i.test(this.userAgent)?{name:"Opera",version:e||this.match(1,/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(this.userAgent)?{name:"Opera",version:this.match(1,/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||e}:/SamsungBrowser/i.test(this.userAgent)?{name:"Samsung Internet for Android",version:e||this.match(1,/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(this.userAgent)?{name:"Yandex Browser",version:e||this.match(1,/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(this.userAgent)?{name:"UC Browser",version:this.match(1,/(?:ucbrowser)[\s\/](\d+(\.\d+)?)/i)}:/msie|trident/i.test(this.userAgent)?{name:"Internet Explorer",version:this.match(1,/(?:msie |rv:)(\d+(\.\d+)?)/i)}:/(edge|edgios|edga|edg)/i.test(this.userAgent)?{name:"Microsoft Edge",version:this.match(2,/(edge|edgios|edga|edg)\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(this.userAgent)?{name:"Firefox",version:this.match(1,/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)}:/chromium/i.test(this.userAgent)?{name:"Chromium",version:this.match(1,/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||e}:/chrome|crios|crmo/i.test(this.userAgent)?{name:"Chrome",version:this.match(1,/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/safari|applewebkit/i.test(this.userAgent)?{name:"Safari",version:e}:{name:this.match(1,/^(.*)\/(.*) /),version:this.match(2,/^(.*)\/(.*) /)}}
1,enumerable:!1,configurable:!0}),a);function a(e){this.userAgent=e||(!t&&window.navigator?window.navigator.userAgent:""),this.isAndroidDevice=!/like android/i.test(this.userAgent)&&/android/i.test(this.userAgent),this.iOSDevice=this.match(1,/(iphone|ipod|ipad)/i).toLowerCase(),!t&&"MacIntel"===navigator.platform&&2<navigator.maxTouchPoints&&!window.MSStream&&(this.iOSDevice="ipad")}e.DetectUA=r,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},r={};function a(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,a),i.exports}a.m=t,e=[],a.O=function(t,r,n,i){if(!r){var o=1/0;for(l=0;l<e.length;l++){r=e[l][0],n=e[l][1],i=e[l][2];for(var s=!0,d=0;d<r.length;d++)(!1&i||o>=i)&&Object.keys(a.O).every((function(e){return a.O[e](r[d])}))?r.splice(d--,1):(s=!1,i<o&&(o=i));if(s){e.splice(l--,1);var c=n();void 0!==c&&(t=c)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,n,i]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={143:0};a.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,o=r[0],s=r[1],d=r[2],c=0;if(o.some((function(t){return 0!==e[t]}))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(d)var l=d(a)}for(t&&t(r);c<o.length;c++)i=o[c],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(l)},r=self.webpackChunkmonetnik_frontend=self.webpackChunkmonetnik_frontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var n=a.O(void 0,[216],(function(){return a(40136)}));n=a.O(n)}();
2//# sourceMappingURL=app.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.