Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-blocks-page189718009.min.js

Код файла
Версия от 13.09.2026, 07:00:42 МСК
Оригинал на CDNСнимок 56c3b845Полный текст

Это первая доступная в Git версия файла.

1window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}2window.isiOS=!1;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){window.isiOS=!0}3window.isiOSVersion='';if(window.isiOS){var version=(navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);if(version!==null){window.isiOSVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}4window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}5window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}6window.browserLang=(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2);window.tildaBrowserLang=window.browserLang;function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}7t_onReady(function(){t_onFuncLoad('t782_init',function(){t782_init()})});function t782_init(){var allBlocksST105=document.querySelectorAll('[data-record-type="782"], [data-parenttplid="782"]');if(window.st105_inited==='yes'&&allBlocksST105.length>1){console.error('Error: More than one payment block (ST105) on the page. Remove a duplicate.');return}
История файла и сравнение версий
  • 13.09.2026, 07:00:42 · 56c3b845
8window.st105_inited='yes';window.tildaGetPaymentForm=function(price,product,paysystem,blockid,lid,uid,orderLink,capthaKey){var allRecords=document.querySelector('#allrecords');var nextUrl='htt'+'ps://'+window.tildaForm.endpoint+'/payment/next/';var virtualPage='/tilda/'+blockid+'/payment/';var virtualTitle='Go to payment from '+blockid;if(window.Tilda&&typeof Tilda.sendEventToStatistics==='function'){Tilda.sendEventToStatistics(virtualPage,virtualTitle,product,price)}
9var requestData={projectid:allRecords.getAttribute('data-tilda-project-id'),pageid:allRecords.getAttribute('data-tilda-page-id'),formskey:allRecords.getAttribute('data-tilda-formskey'),price:price,product:product,system:paysystem,recid:blockid,'tildaspec-version-lib':2.1,lid:lid?lid:'',uid:uid?uid:'',};if(capthaKey)requestData['tildaspec-tildacaptcha']=capthaKey;var formData=new FormData();for(var key in requestData){formData.append(key,requestData[key])}
10var request=new XMLHttpRequest();request.open('POST',nextUrl,!0);request.timeout=10000;request.responseType='json';request.send(formData);request.onload=function(){var data=request.response;if(orderLink){orderLink.classList.remove('t-btn_sending')}
11submitFlag=0;if(data&&data.redirectto&&data.redirectto.length==3){window.tildaForm.endpoint='forms.tildaapi'+'.'+data.redirectto;tildaGetPaymentForm(price,product,paysystem,blockid,lid,uid,orderLink,capthaKey);return!1}
12if(data&&data.needcaptcha){t782_drawRecaptcha(price,product,paysystem,blockid,lid,uid,orderLink);return!1}
13if(data&&data.next&&data.next.type>''){var result=window.tildaForm.payment(document.querySelector('#'+blockid),data.next);successurl='';return!1}
14if(data&&data.error){alert(data.error)}};request.onerror=function(error){if(orderLink){orderLink.classList.remove('t-btn_sending')}
15submitFlag=0;var errorText='';if(error&&error.responseText>''){errorText=error.responseText+'. Please, try again later.'}else if(error&&error.statusText){errorText='Error ['+error.statusText+']. Please, try again later.'}else{errorText='Unknown error. Please, try again later.'}
16alert(errorText)}};var payBox=document.querySelector('.js-payment-systembox');var submitFlag=0;var clickEvent=function(event){var orderLink=event.target.closest('a[href^="#order:"]');if(!orderLink)return;event.preventDefault();if(submitFlag===1){return!1}
17var isST100Exist=document.querySelector('.t706');if(isST100Exist){var text='Conflict error: there are two incompatible blocks on the page: ST100 and ST105. Please go to Tilda Editor and delete one of these blocks.';if(window.browserLang==='RU'){text='Ошибка: на странице есть два несовместимых блока: ST100 и ST105. Пожалуйста, перейдите в редактор Тильды и удалите один из этих блоков.'}
18console.error(text);return!1}
19orderLink.classList.add('t-btn_sending');submitFlag=1;var tempOrder=orderLink.getAttribute('href');var orderParameters;var price=0;var product='';var lid='';var uid='';if(tempOrder.substring(0,7)==='#order:'){tempOrder=tempOrder.split(':');orderParameters=tempOrder[1].split('=');price=t782_cart__cleanPrice(orderParameters[1]);product=t782_cart__escapeHtml(orderParameters[0])}else{var productElement=orderLink.closest('.js-product');if(productElement){if(product===''){product=productElement.querySelector('.js-product-name').textContent;product=product?product:''}
20if(price===''||price===0){price=productElement.querySelector('.js-product-price').textContent;price=t782_cart__cleanPrice(price)}
21lid=productElement.getAttribute('data-product-lid')||'';uid=productElement.getAttribute('data-product-uid')||productElement.getAttribute('data-product-gen-uid')||'';var optprice=0;var options=[];var productOptions=productElement.querySelectorAll('.js-product-option');Array.prototype.forEach.call(productOptions,function(option){var productOption=option.querySelector('.js-product-option-name').textContent;var checkedOption=option.querySelector('option:checked');if(!checkedOption)return;var productVariant=checkedOption.value;var productPrice=checkedOption.getAttribute('data-product-variant-price');productPrice=t782_cart__cleanPrice(productPrice);if(productOption&&productVariant){productOption=t782_cart__escapeHtml(productOption);productVariant=t782_cart__escapeHtml(productVariant);productVariant=productVariant.replace(/(?:\r\n|\r|\n)/g,'');if(productOption.length>1&&productOption.charAt(productOption.length-1)==':'){productOption=productOption.substring(0,productOption.length-1)}
22optprice=optprice+parseFloat(productPrice).toFixed(2);options.push(productOption+'='+productVariant)}});if(options.length){product=product+': '+options.join(', ')}}}
23var blockid=orderLink.closest('.r').getAttribute('id');var paySystems=document.querySelectorAll('.js-dropdown-paysystem .js-payment-system');if(!product){var closestTitle=orderLink.closest('.r').querySelector('.title');if(closestTitle){product=closestTitle.textContent}else{product=orderLink.textContent}}
24if(paySystems.length===0){alert('Error: payment system is not assigned. Add payment system in the Site Settings.');orderLink.classList.remove('t-btn_sending');submitFlag=0;return}
25if(paySystems.length/allBlocksST105.length===1){var currentPaySystem=paySystems[0].getAttribute('data-payment-system');tildaGetPaymentForm(price,product,currentPaySystem,blockid,lid,uid,orderLink);return}else{var payBoxPaddingLeft=parseInt(window.getComputedStyle(payBox).paddingLeft,10);var payBoxPaddingRight=parseInt(window.getComputedStyle(payBox).paddingRight,10);var payBoxOuterWidth=parseInt(window.getComputedStyle(payBox).width,10);var payBoxWidth=payBoxOuterWidth-(payBoxPaddingLeft+payBoxPaddingRight);var orderLinkOffset={top:orderLink.getBoundingClientRect().top+window.pageYOffset,left:orderLink.getBoundingClientRect().left+window.pageXOffset,};payBox.style.top=orderLinkOffset.top+'px';t782_setPayBoxCoordinate(payBox,payBoxWidth,orderLinkOffset,orderLink);payBox.style.marginTop='-40px';payBox.style.position='absolute';payBox.style.zIndex='9999999';document.querySelector('body').appendChild(payBox);window.addEventListener('resize',function(){if(window.getComputedStyle(payBox).display==='block'&&orderLink){payBox.style.top=orderLinkOffset.top+'px';t782_setPayBoxCoordinate(payBox,payBoxWidth,orderLinkOffset,orderLink)}});payBox.style.display='block';document.addEventListener('click',hidePayBox,!1);function hidePayBox(event){event.stopPropagation();event.preventDefault();const isTriggerClicked=orderLink.parentElement&&!orderLink.parentNode.contains(event.target);if(isTriggerClicked){var closestOrderLink=event.target.closest('a[href^="#order"]');orderLink.classList.remove('t-btn_sending');submitFlag=0;payBox.style.display='none';payBox.removeEventListener('click',sendRequest,!1);document.removeEventListener('click',hidePayBox,!1);if(closestOrderLink)closestOrderLink.click()}}
26function sendRequest(event){event.preventDefault();var paySystem=event.target;payBox.style.display='none';tildaGetPaymentForm(price,product,paySystem.getAttribute('data-payment-system'),blockid,lid,uid,orderLink);payBox.removeEventListener('click',sendRequest,!1)}
27payBox.addEventListener('click',sendRequest,!1)}};var allRecords=document.querySelectorAll('.r');Array.prototype.forEach.call(allRecords,function(rec){rec.addEventListener('click',function(event){clickEvent(event)})});function t782_setPayBoxCoordinate(payBox,payBoxWidth,orderLinkOffset,orderLink){var orderLinkWidth=orderLink.getBoundingClientRect().width;var currentOrderLinkOffset=orderLinkOffset.left+orderLinkWidth/2;var payBoxMargin=payBoxWidth/2;if(window.innerWidth<=375){payBox.style.left='50%';payBox.style.marginLeft='-'+payBoxWidth/2+'px'}else if(t782_isInViewport(payBox)){payBox.style.marginLeft='-'+payBoxMargin+'px'}else{payBox.style.left=currentOrderLinkOffset+'px';payBox.style.marginLeft='-'+payBoxMargin+'px'}}
28function t782_isInViewport(element){var rect=element.getBoundingClientRect();return(rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth))}
29function t782_cart__escapeHtml(text){var map={'<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#039;',};return text.replace(/[<>"']/g,function(m){return map[m]})}
30function t782_cart__cleanPrice(price){if(!price){price=0}else{price=price.replace(',','.');price=price.replace(/[^0-9\.]/g,'');price=parseFloat(price).toFixed(2);if(isNaN(price))price=0;price=parseFloat(price);price=price*1;if(price<0)price=0}
31return price}}
32function t782_drawRecaptcha(price,product,paysystem,blockid,lid,uid,orderLink){var allRecords=document.getElementById('allrecords');var formKey=allRecords.getAttribute('data-tilda-formskey');var rec=document.querySelector('[data-record-type="782"], [data-parenttplid="782"]');var recId=rec.getAttribute('id').replace('rec','');var formCaptchaBox=document.getElementById('tilda-form-captcha-box');if(formCaptchaBox)t_removeEl(formCaptchaBox);var randomKey;try{randomKey=''+new Date().getTime()+'='+parseInt(Math.random()*8,10)}catch(e){randomKey='rnd='+parseInt(Math.random()*8,10)}
33var html='';html+='<div id="tilda-form-captcha-box" style="z-index: 99999999999; position:fixed; text-align: center; vertical-align: middle; top: 0px; left:0px; bottom: 0px; right: 0px; background: rgba(255,255,255,0.97);">';html+='<iframe id="captchaIframeBox" src="//'+window.tildaForm.endpoint+'/procces/captcha/?tildaspec-formid=';html+=recId+'&tildaspec-formskey='+formKey+'&'+randomKey+'"';html+=' frameborder="0" width="100%" height="100%">';html+='</iframe>';html+='</div>';document.body.insertAdjacentHTML('beforeend',html);if(!window.isT782AddRecaptchaEvent){window.isT782AddRecaptchaEvent=!0;window.addEventListener('message',function(event){t782_checkVerifyTildaCaptcha(event,price,product,paysystem,blockid,lid,uid,orderLink)})}}
34function t782_checkVerifyTildaCaptcha(event,price,product,paysystem,blockid,lid,uid,orderLink){event=event||window.event;if(event.origin.indexOf(window.tildaForm.endpoint)!==-1){var formCaptchaBox=document.getElementById('tilda-form-captcha-box');if(event.data=='closeiframe'){if(formCaptchaBox)t_removeEl(formCaptchaBox);return}
35var capthaKey=event.data;if(formCaptchaBox)t_removeEl(formCaptchaBox);tildaGetPaymentForm(price,product,paysystem,blockid,lid,uid,orderLink,capthaKey)}}
36if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
37if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
38el=el.parentElement||el.parentNode}
39return null}}
40function t744_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid)});setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t744__hoverZoom_init(recid)},500);var wrapperBlock=rec.querySelector('.t744');if(wrapperBlock){wrapperBlock.addEventListener('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)})})}
41var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)}
42function t744__hoverZoom_init(recid){if(window.isMobile)return;var rec=document.getElementById('rec'+recid);if(!rec)return;try{if(!rec.querySelector('[data-hover-zoom]')){return}
43var hoverZoomScript='https://static.tildacdn.com/js/tilda-hover-zoom-1.0.min.js';if(document.querySelector("script[src^='"+hoverZoomScript+"']")){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})}else{var script=document.createElement('script');script.src=hoverZoomScript;script.onload=function(){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})};script.onerror=function(error){console.log('Upload script error: '+error)};document.head.appendChild(script)}}catch(error){console.log('Zoom image init error: '+error.message)}}
44function t744_updateSlider(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;t_onFuncLoad('t_slds_SliderWidth',function(){t_slds_SliderWidth(recid)});var slider=rec.querySelector('.t-slds__container');var paddingLeft=parseInt(slider.style.paddingLeft,10)||0;var paddingRight=parseInt(slider.style.paddingRight,10)||0;var sliderWidth=slider.clientWidth-(paddingLeft+paddingRight);var sliderWrapper=rec.querySelector('.t-slds__items-wrapper');var pos=parseFloat(sliderWrapper.getAttribute('data-slider-pos'),10);sliderWrapper.style.transform='translate3d(-'+sliderWidth*pos+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
45function t762_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;t_onFuncLoad('t_sldsInit',function(){setTimeout(function(){t_sldsInit(recid)},200)});setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t762__hoverZoom_init(recid)},500);var wrapperBlock=rec.querySelector('.t762');if(wrapperBlock){wrapperBlock.addEventListener('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)})})}
46var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)}
47function t762__hoverZoom_init(recid){if(window.isMobile)return;var rec=document.getElementById('rec'+recid);if(!rec)return;try{if(!rec.querySelector('[data-hover-zoom]')){return}
48var hoverZoomScript='https://static.tildacdn.com/js/tilda-hover-zoom-1.0.min.js';if(document.querySelector("script[src^='"+hoverZoomScript+"']")){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})}else{var script=document.createElement('script');script.src=hoverZoomScript;script.onload=function(){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})};script.onerror=function(error){console.log('Upload script error: '+error)};document.head.appendChild(script)}}catch(error){console.log('Zoom image init error: '+error.message)}}
49function t760_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)})},500);var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event);if(window.isMobile)return;window.addEventListener('scroll',t_throttle(function(){t760_floating_scroll(recid)},25));t760_floating_updateDimension(recid);var images=rec.querySelectorAll('.t760__img');Array.prototype.forEach.call(images,function(image){image.onload=function(){t760_floating_updateDimension(recid)}});window.addEventListener('resize',t_throttle(function(){t760_floating_updateDimension(recid)}));var wrapperBlock=rec.querySelector('.t760');if(wrapperBlock){wrapperBlock.addEventListener('displayChanged',t_throttle(function(){t760_floating_updateDimension(recid)}))}}
50function t760_floating_updateDimension(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var floatableElements=rec.querySelectorAll('.t760__floatable[data-floating="yes"]');Array.prototype.forEach.call(floatableElements,function(element){var column=element.parentNode;column.style.minHeigh='';if(element.classList){element.classList.remove('t760__fixedTop');element.classList.remove('t760__fixedBottom');element.classList.remove('t760__floating')}
51element.style.maxWidth='';var elementDimension=t760_getElementDimension(element);if(elementDimension.height){column.style.minHeight=elementDimension.height+'px'}
52if(elementDimension.width){element.style.maxWidth=elementDimension.width+'px'}});var event=document.createEvent('HTMLEvents');event.initEvent('scroll',!0,!1);window.dispatchEvent(event)}
53function t760_floating_scroll(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var windowWidth=window.innerWidth;var floatableElements=rec.querySelectorAll('.t760__floatable[data-floating="yes"]');Array.prototype.forEach.call(floatableElements,function(element){if(windowWidth<=1024){element.classList.remove('t760__fixedTop');element.classList.remove('t760__fixedBottom');element.classList.remove('t760__floating');return}
54var column=element.parentNode;var elementDimension=t760_getElementDimension(element);var columnDimension=t760_getElementDimension(column);element.style.maxWidth=columnDimension.width+'px';if(columnDimension.height<elementDimension.height&&columnDimension.height>0){column.style.height=elementDimension.height}
55var columnTop=column.getBoundingClientRect().top+window.pageYOffset;var columnBottom=columnTop+columnDimension.height;var windowTop=window.pageYOffset;var offset=parseFloat(element.getAttribute('data-offset-top'));if(windowTop+elementDimension.height+offset>=columnBottom){element.style.top='';element.classList.add('t760__fixedBottom');element.classList.remove('t760__fixedTop');element.classList.remove('t760__floating')}else if(windowTop+offset>columnTop){element.style.top=offset+'px';element.classList.add('t760__floating');element.classList.remove('t760__fixedBottom');element.classList.remove('t760__fixedTop')}else{element.style.top='';element.classList.add('t760__fixedTop');element.classList.remove('t760__fixedBottom');element.classList.remove('t760__floating')}})}
56function t760_getElementDimension(element){var elementStyles=window.getComputedStyle(element);return{height:parseInt(elementStyles.height,10)||0,width:parseInt(elementStyles.width,10)||0,}}
57function t922_init(recid){setTimeout(function(){var rec=document.getElementById('rec'+recid);if(!rec)return;var coverCarrier=rec.querySelector('.t-cover__carrier');if(!coverCarrier)return;coverCarrier.classList.add('js-product-img');t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)})},500);var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)}
58var t754_POPUP_SHOWED_EVENT_NAME='catalog:popupShowed';var t754_POPUP_CLOSED_EVENT_NAME='catalog:popupClosed';function t754__init(recid){setTimeout(function(){t_onFuncLoad('t_prod__init',function(){t_prod__init(recid)});t754__hoverZoom_init(recid);t754_initPopup(recid);t754__updateLazyLoad(recid);t_onFuncLoad('t_store_addProductQuantityEvents',function(){t754_initProductQuantity(recid)});var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);document.body.dispatchEvent(event)},500)}
59function t754_initProductQuantity(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var productList=rec.querySelectorAll('.t754__col, .t754__product-full');Array.prototype.forEach.call(productList,function(product){t_store_addProductQuantityEvents(product)})}
60function t754__showMore(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t754');if(!wrapperBlock)return;var productColumns=wrapperBlock.querySelectorAll('.t754__col');var cardsSize=productColumns.length;var cardsCount=parseInt(wrapperBlock.getAttribute('data-show-count'),10);if(isNaN(cardsCount)||cardsCount<1)return;Array.prototype.forEach.call(productColumns,function(column){column.style.display='none'});for(var i=0;i<cardsCount;i++){if(productColumns[i]){productColumns[i].style.display='inline-block'}}
61var showMoreButton=wrapperBlock.querySelector('.t754__showmore');if(!showMoreButton)return;const showMoreTextContainer=showMoreButton.querySelector('.js-btn-txt');if(showMoreTextContainer){showMoreTextContainer.textContent=t754__dict()}
62if(cardsCount<productColumns.length){showMoreButton.style.removeProperty('display')}
63t754__showSeparator(wrapperBlock,cardsCount);showMoreButton.addEventListener('click',function(){var currentColumns=wrapperBlock.querySelectorAll('.t754__col');var currentColumnsShowed=0;Array.prototype.forEach.call(currentColumns,function(column){if(column.style.display==='inline-block'){++currentColumnsShowed}});for(var i=0;i<cardsCount+currentColumnsShowed;i++){if(currentColumns[i]){currentColumns[i].style.display='inline-block'}}
64if(cardsCount+currentColumnsShowed>=cardsSize){showMoreButton.style.display='none'}
65if(!document.querySelector('.t-records').getAttribute('data-tilda-mode')){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
66t754__showSeparator(wrapperBlock,cardsCount+currentColumnsShowed)})}
67function t754__showSeparator(rec,cardsCount){if(window.jQuery&&rec instanceof jQuery){rec=rec.get(0)}
68var allSeparators=rec.querySelectorAll('.t754__separator_number');Array.prototype.forEach.call(allSeparators,function(separator){separator.classList.add('t754__separator_hide');if(separator.getAttribute('data-product-separator-number')<=cardsCount){separator.classList.remove('t754__separator_hide')}})}
69function t754__dict(){var dictionary={EN:'Load more',RU:'Загрузить ещё',FR:'Charger plus',DE:'Mehr laden',ES:'Carga más',PT:'Carregue mais',UK:'Завантажити ще',JA:'もっと読み込む',ZH:'裝載更多',};var language=window.browserLang;var allrecords=document.getElementById('allrecords');if(allrecords){var projectLang=allrecords.getAttribute('data-tilda-project-lang');if(projectLang){language=projectLang}}
70return dictionary[language]?dictionary[language]:dictionary.EN}
71function t754__hoverZoom_init(recid){if(window.isMobile)return;var rec=document.getElementById('rec'+recid);if(!rec)return;try{if(!rec.querySelector('[data-hover-zoom]')){return}
72var hoverScript='https://static.tildacdn.com/js/tilda-hover-zoom-1.0.min.js';if(document.querySelector("script[src^='"+hoverScript+"']")){t_onFuncLoad('t_hoverZoom_init',function(){t_hoverZoom_init(recid)})}else{var script=document.createElement('script');script.type='text/javascript';script.src=hoverScript;script.onload=function(){setTimeout(function(){t_hoverZoom_init(recid)},500)};script.onerror=function(error){console.log('Upload script error: ',error)};document.head.appendChild(script)}}catch(error){console.log('Zoom image init error: '+error.message)}}
73function t754__updateLazyLoad(recid){var scrollContainer=document.querySelector('#rec'+recid+' .t754__container_mobile-flex');var tRecords=document.querySelector('.t-records');if(!tRecords)return;var currentMode=tRecords.getAttribute('data-tilda-mode');if(scrollContainer&&currentMode!=='edit'&&currentMode!=='preview'){scrollContainer.addEventListener('scroll',t_throttle(function(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}))}}
74function t754_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var popup=rec.querySelector('.t-popup');var body=document.body;var linksProd=rec.querySelectorAll('[href^="#prodpopup"]');Array.prototype.forEach.call(linksProd,function(popupLink){var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');var productLinks=document.querySelectorAll('.r a[href$="#!/tproduct/'+recid+'-'+productLid+'"]');Array.prototype.forEach.call(productLinks,function(productLink){productLink.addEventListener('click',function(){if(rec.querySelector('[data-product-lid="'+productLid+'"]')){var linkToPopup=product.querySelector('[href^="#prodpopup"]');if(linkToPopup){var event=document.createEvent('HTMLEvents');event.initEvent('click',!0,!1);linkToPopup.dispatchEvent(event)}}})});popupLink.addEventListener('click',clickOnceHandler,!1);function clickOnceHandler(event){event.preventDefault();var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid+' #t754__product-'+productLid)});popupLink.removeEventListener('click',clickOnceHandler,!1)}
75popupLink.addEventListener('click',showPopupHandler,!1);function showPopupHandler(event){event.preventDefault();var isT1002Button=event.target.classList.contains('t1002__addBtn')||event.target.parentNode.classList.contains('t1002__addBtn');if(isT1002Button)return;t754_showPopup(recid);var product=popupLink.closest('.js-product');var productLid=product.getAttribute('data-product-lid');var productFull=popup.querySelector('.js-product[data-product-lid="'+productLid+'"]');productFull.style.display='block';var lazyGalleryImgs=productFull.querySelectorAll('img[data-src]');Array.prototype.forEach.call(lazyGalleryImgs,function(img){img.src=img.getAttribute('data-src')});var analitics=popupLink.getAttribute('data-track-popup');if(analitics&&productFull&&window.Tilda){var productName=productFull.querySelector('.js-product-name');if(productName){var virtTitle=productName.textContent;if(!virtTitle){virtTitle='prod'+productLid}
76Tilda.sendEventToStatistics(analitics,virtTitle)}}
77var currentUrl=window.location.href;if(currentUrl.indexOf('#!/tproduct/')<0&&currentUrl.indexOf('%23!/tproduct/')<0&&currentUrl.indexOf('#%21%2Ftproduct%2F')<0){if(history.replaceState){var baseUrl=currentUrl.split('#')[0];window.history.replaceState('','',baseUrl+'#!/tproduct/'+recid+'-'+productLid)}}
78t754_updateSlider(recid+' #t754__product-'+productLid);if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}});if(popup){popup.addEventListener('mousedown',function(event){var windowWidth=window.innerWidth;var maxScrollBarWidth=17;var windowWithoutScrollBar=windowWidth-maxScrollBarWidth;if(event.clientX>windowWithoutScrollBar){return}
79if(event.target===this){t754_closePopup(body,popup)}});var allRecords=document.getElementById('allrecords');var currentMode=allRecords.getAttribute('data-tilda-mode');var isPublishedPage=currentMode!=='edit'&&currentMode!=='preview';if(isPublishedPage&&(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes')){popup.addEventListener('scroll',function(event){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})})}}
80var closeButtons=rec.querySelectorAll('.t-popup__close, .t754__close-text');Array.prototype.forEach.call(closeButtons,function(button){button.addEventListener('click',function(){t754_closePopup(body,popup)})});document.addEventListener('keydown',function(event){var isGalleryShowedOldLib=document.body.classList.contains('t-zoomer__show');if(isGalleryShowedOldLib)return;var isGalleryShowedNewLib=document.body.classList.contains('t-zoomer__active');if(isGalleryShowedNewLib)return;var isPopupShowed=document.body.classList.contains('t-body_popupshowed');if(!isPopupShowed)return;if(popup&&popup.classList.contains('t-popup_show')){if(event.keyCode===27){t754_closePopup(body,popup)}}});if(!document.getElementById('record'+recid)){t754_checkUrl(recid)}
81if(popup&&popup.hasAttribute('data-fixed-button')){t754_fixedPopupButton(recid)}}
82function t754_showPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;if(rec.classList.contains('r_hidden')){rec.classList.remove('r_hidden');if(rec.classList.contains('r_anim')){rec.classList.remove('r_anim')}}
83var popup=rec.querySelector('.t-popup');var fullProducts=popup.querySelectorAll('.t754__product-full');Array.prototype.forEach.call(fullProducts,function(product){product.style.display='none'});popup.style.display='block';setTimeout(function(){popup.querySelector('.t-popup__container').classList.add('t-popup__container-animated');popup.classList.add('t-popup_show');t_triggerEvent(popup,t754_POPUP_SHOWED_EVENT_NAME)},50);setTimeout(function(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},300);var body=document.body;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');body.classList.add('t-body_popupshowed');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event)}
84function t754_closePopup(body,popup){var fullProducts=popup.querySelectorAll('.t754__product-full');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');var currentUrl=window.location.href;var indexToRemove=currentUrl.indexOf('#!/tproduct/');var event=document.createEvent('HTMLEvents');event.initEvent('twishlist_addbtn',!0,!1);body.dispatchEvent(event);if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&indexToRemove<0){indexToRemove=currentUrl.indexOf('%23!/tproduct/');if(indexToRemove<0){indexToRemove=currentUrl.indexOf('#%21%2Ftproduct%2F')}}
85currentUrl=currentUrl.substring(0,indexToRemove);setTimeout(function(){popup.scrollTop=0;popup.style.display='none';Array.prototype.forEach.call(fullProducts,function(product){product.style.display='none'});if(history.replaceState){window.history.replaceState('','',currentUrl)}},300);t_triggerEvent(popup,t754_POPUP_CLOSED_EVENT_NAME)}
86function t754_updateSlider(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;t_onFuncLoad('t_slds_SliderWidth',function(){t_slds_SliderWidth(recid)});var slider=rec.querySelector('.t-slds__container');var paddingLeft=parseInt(slider.style.paddingLeft)||0;var paddingRight=parseInt(slider.style.paddingRight)||0;var sliderWrapper=rec.querySelector('.t-slds__items-wrapper');var sliderWidth=slider.clientWidth-(paddingLeft+paddingRight);var pos=parseFloat(sliderWrapper.getAttribute('data-slider-pos'));sliderWrapper.style.transform='translate3d(-'+sliderWidth*pos+'px, 0, 0)';t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
87function t754_checkUrl(recid){if(window.catalogUrlProcessed)return;var currentUrl=window.location.href;var tprodIndex=(currentUrl.indexOf('#!/tproduct/')+1||currentUrl.indexOf('%23!/tproduct/')+1||currentUrl.indexOf('#%21%2Ftproduct%2F')+1||currentUrl.indexOf('#!%2Ftproduct%2F')+1||currentUrl.indexOf('%23%21%2Ftproduct%2F')+1)-1;if(tprodIndex!==-1){var currentUrl=currentUrl.substring(tprodIndex,currentUrl.length);var curProdLid=currentUrl.substring(currentUrl.indexOf('-')+1,currentUrl.length);if(curProdLid){var curProdLidMatch=curProdLid.match(/([0-9]+)/g);if(curProdLidMatch){curProdLid=curProdLidMatch[0]}}
88if(currentUrl.indexOf(recid)===-1)return;var rec=document.getElementById('rec'+recid);if(!rec)return;if(currentUrl.indexOf(recid)!==0&&rec.querySelector('[data-product-lid="'+curProdLid+'"]')){var currentLink=rec.querySelector('[data-product-lid="'+curProdLid+'"] [href^="#prodpopup"]');var event=document.createEvent('HTMLEvents');event.initEvent('click',!0,!1);if(currentLink){currentLink.dispatchEvent(event)}
89if(typeof rec.scrollIntoView==='function'){rec.scrollIntoView({block:'start'})}
90window.catalogUrlProcessed=!0}}}
91function t754_fixedPopupButton(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var MOBILE_MAX_WIDTH=560;var popup=rec.querySelector('.t-popup');var popupContainer=popup.querySelector('.t-popup__container');var btnWrappers=rec.querySelectorAll('.t754__btn-wrapper');Array.prototype.forEach.call(btnWrappers,function(el){el.classList.add('t754__btn-wrapper-fixed')});function addStyle(){popupContainer.style.paddingBottom='90px';popupContainer.style.cssText+=';transform:none !important;'}
92function resetStyle(){popupContainer.style.paddingBottom='';popupContainer.style.transform=''}
93function handleResize(){if(window.innerWidth>MOBILE_MAX_WIDTH){resetStyle();return}
94addStyle()}
95if(window.isMobile){window.addEventListener('orientationchange',handleResize)}
96popup.addEventListener(t754_POPUP_SHOWED_EVENT_NAME,function(){setTimeout(function(){handleResize()},0)});popup.addEventListener(t754_POPUP_CLOSED_EVENT_NAME,function(){resetStyle()});window.addEventListener('resize',handleResize)}
97if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
98if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
99el=el.parentElement||el.parentNode}
100return null}}
Следующие 100 строк