1 2; /* Start:"a:4:{s:4:"full";s:80:"/bitrix/components/constructor/page/templates/.default/script.js?179062662913857";s:6:"source";s:64:"/bitrix/components/constructor/page/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3;$(function () { 4 var componentDir = "/bitrix/components/constructor/page"; 5 6 function checkBlockView(block) { 7 if (!MangoVars.hasOwnProperty('blocksShown')) { 8 MangoVars.blocksShown = {}; 9 } 10 11 let screenTop = $(window).scrollTop(); 12 let screenBot = $(window).scrollTop() + $(window).height(); 13 let bannerTop = block.offset().top; 14 let bannerBot = block.offset().top + block.height(); 15 16 if (bannerTop > screenTop && bannerTop < screenBot || 17 bannerBot > screenTop && bannerBot < screenBot || 18 bannerTop < screenTop && bannerBot > screenBot) { 19 if (block.data('id') && !MangoVars.blocksShown[block.data('id')]) { 20 $.ajax({ 21 type: 'POST', 22 url: componentDir + '/ajax_block_view.php?block='+block.data('id'), 23 dataType: 'json', 24 data: { 25 'b': block.data('id'), 26 'pid': block.closest('.js-constructor-page').data('id') 27 } 28 }); 29 MangoVars.blocksShown[block.data('id')] = true; 30 } 31 } 32 } 33 34 var isSendPageView = false; 35 36 function pageViewBeacon() { 37 if (isSendPageView) { 38 return false; 39 } 40 let formData = new FormData(); 41 formData.append('sessid', BX.bitrix_sessid()); 42 formData.append('a', 'pageView'); 43 formData.append('pid', $('.js-constructor-page').data('id')); 44 45 navigator.sendBeacon(componentDir + '/ajax.php', formData); 46 } 47 48 function pageView() { 49 if (isSendPageView) { 50 return false; 51 } 52 isSendPageView = true; 53 BX.ajax({ 54 url: componentDir + '/ajax.php', 55 method: 'POST', 56 data: { 57 'sessid': BX.bitrix_sessid(), 58 'a': 'pageView', 59 'pid': $('.js-constructor-page').data('id') 60 }, 61 dataType: 'json', 62 timeout: 60, 63 }); 64 } 65 66 function getAjaxBlock(blockId, pageId, cookieKey) { 67 BX.ajax({ 68 url: componentDir +'/ajax_blocks.php?ncc=1&BLOCK_ID='+blockId, 69 method: 'POST', 70 data: { 71 'ACTION': 'blockView', 72 'PAGE_ID': pageId, 73 'COOKIE_KEY': cookieKey 74 }, 75 dataType: 'json', 76 timeout: 60, 77 success: function(data) { 78 if (data) { 79 $('[data-id='+blockId+']').replaceWith(data); 80 if (typeof initBigSlider === 'function') 81 initBigSlider(); 82 } 83 } 84 }); 85 } 86 87 $(window).scroll(function () { 88 $('.js-section').each(function () { 89 checkBlockView($(this)); 90 }); 91 }); 92 93 94 // ÐозвÑаÑÐ°ÐµÑ ÑлÑÑайное ÑиÑло Ð¼ÐµÐ¶Ð´Ñ min (вклÑÑиÑелÑно) и max (не вклÑÑÐ°Ñ max) 95 function getRandomArbitrary(min, max) { 96 return Math.random() * (max - min) + min; 97 } 98 99 $(function () { 100 function updateAjaxBlocks() { 101 $('.js-section.js-ajax').each(function() { 102 getAjaxBlock( 103 $(this).data('id'), 104 $(this).closest('.js-constructor-page').data('id'), 105 $(this).data('key') 106 ); 107 }); 108 109 setTimeout(updateAjaxBlocks, 15000); 110 } 111 112 updateAjaxBlocks(); 113 114 if (typeof $.fn.initInputMask !== 'function') { 115 $('.js-phone').mask('+7(999)999-99-99'); 116 } else { 117 $('.js-phone').initInputMask(['+', '7', '(', /[1-9]/, /\d/, /\d/, ')', /\d/, /\d/, /\d/, '-', /\d/, /\d/, '-', /\d/, /\d/], '+7(___)___-__-__', 3); 118 } 119 120 $('[data-toggle="collapse"]').click(function () { 121 var text = $(this).data('text_expanded'); 122 if (text) 123 $(this).data('text_expanded', $(this).text()).text(text); 124 }); 125 126 $('.js-column-animated:visible').css('opacity', 0).each(function () { 127 $(this).onScrollToElement(function () { 128 (function (t) { 129 $(t).animate({'opacity': 1}, 1500); 130 })(this); 131 }, function () { 132 $(this).css({'opacity': 1}); 133 }, false, false, {'offset': 200}); 134 }); 135 136 var $ebookForm = $('.js-e-book-form'); 137 var eBookForm = new Form($ebookForm); 138 var ajaxRequest; 139 $ebookForm.submit(function () { 140 if (ajaxRequest) return; 141 if (eBookForm.validate()) { 142 ajaxRequest = AJAX.send( 143 '/ajax_new/ebook.php', 144 { 145 'sessid': BX.bitrix_sessid(), 146 'action': 'send', 147 'ID': $ebookForm.find('[name=ID]').val(),
148 'NAME': $ebookForm.find('[name=NAME]').val(), 149 'EMAIL': $ebookForm.find('[name=EMAIL]').val(), 150 'PHONE': $ebookForm.find('[name=PHONE]').val(), 151 'COMPANY': $ebookForm.find('[name=COMPANY]').val() 152 }, 153 function (data) { 154 ERROR_REPORTER.showMessage(data.text, MESSAGE_TYPE_SUCCESS); 155 $ebookForm.find('[type=text], [type=email]').val(''); 156 }, 157 'json' 158 ); 159 160 } else { 161 ERROR_REPORTER.showMessage('ÐаполниÑе, пожалÑйÑÑа, вÑе Ð½ÐµÐ±Ñ Ð¾Ð´Ð¸Ð¼Ñе полÑ.', MESSAGE_TYPE_WARNING); 162 } 163 return false; 164 }); 165 166 var $leadsForm = $('form.contact-us-form'); 167 var leadsForm = new Form($leadsForm); 168 var ajaxLFRequest; 169 $leadsForm.submit(function (e) { 170 e.preventDefault(); 171 if (ajaxLFRequest) return; 172 if (leadsForm.validate()) { 173 ajaxLFRequest = AJAX.send( 174 '/ajax_new/leadsFormHorizontal.php', 175 { 176 'sessid': BX.bitrix_sessid(), 177 'event': MangoVars.form_event_type, 178 'data': $leadsForm.serializeArray(), 179 }, 180 function (data) { 181 ERROR_REPORTER.showMessage(data.text, MESSAGE_TYPE_SUCCESS); 182 $leadsForm.find('[type=text], [type=email]').prop('readonly', true); 183 $('#js-submit-contact-us-form').prop('disabled', true); 184 }, 185 'json' 186 ); 187 188 } else { 189 ERROR_REPORTER.showMessage('ÐаполниÑе, пожалÑйÑÑа, вÑе Ð½ÐµÐ±Ñ Ð¾Ð´Ð¸Ð¼Ñе полÑ.', MESSAGE_TYPE_WARNING); 190 $('#js-submit-contact-us-form').prop('disabled', false); 191 } 192 return false; 193 }); 194 195 $('#accordion') 196 .on('show.bs.collapse', function (e) { 197 $('.js-tabs-block').removeClass('active'); 198 $(e.target).closest('.js-tabs-block').addClass('active'); 199 }) 200 .on('hide.bs.collapse', function (e) { 201 $(e.target).closest('.js-tabs-block').removeClass('active'); 202 }); 203 204 $('.js-tabs-block-tablink').click(function() { 205 var block = $(this).closest('.js-tabs-block'); 206 block.toggleClass('open').find('.js-tabs-block-content').slideToggle(); 207 if ($(window).width() < 768 ) { 208 setTimeout(function() { 209 $.scrollTo(block , 300, {offset: -70}); 210 }, 351); 211 } 212 }); 213 214 if (typeof MangoVars['BLOCK_TYPES_ON_PAGE'] == 'object' && Array.isArray(MangoVars['BLOCK_TYPES_ON_PAGE'])) { 215 if (MangoVars['BLOCK_TYPES_ON_PAGE'].indexOf('clients_calculator') >= 0) { 216 $(document).on('click', 'label[for="nice-toggler-yes"]', function () { 217 var chk = !$('#nice-toggler-yes').is(':checked'); 218 if (chk) { 219 $('.js-calculator_clients-field-3').removeClass('hidden'); 220 } else { 221 $('.js-calculator_clients-field-3').addClass('hidden'); 222 $('.js-calculator_clients-field-3 input').val('0'); 223 $('.js-calculator_b1').trigger('keyup'); 224 } 225 }); 226 227 $(document).on('keyup change', '.js-calculator_b1, .js-calculator_b2', function (e) { 228 if ([8, 9, 16, 37, 38, 39, 40, 46].indexOf(e.which) >= 0) { 229 return true; 230 } 231 var txt = $(this).val(); 232 var matches = txt.match(/\d+/); 233 if (matches && matches[0]) { 234 $(this).val(parseInt(matches[0])); 235 } else { 236 $(this).val('0'); 237 } 238 }); 239 240 $(document).on('focusin', '.js-calculator_b1, .js-calculator_b2', function () { 241 $(this).select(); 242 }); 243 244 $(document).on('keyup', '.js-calculator_b1, .js-calculator_b2', function () { 245 var canToCalc = true; 246 $('.js-calculator_b1').each(function () { 247 if (canToCalc) 248 canToCalc = ($(this).val().length > 0); 249 }); 250 if (canToCalc) { 251 var sum = 0; 252 var a1 = parseFloat($('.js-calculator_clients-field-1 input').val()); 253 var a2 = parseFloat($('.js-calculator_clients-field-2 input').val()); 254 var a3 = parseFloat($('.js-calculator_clients-field-3 input').val()); 255 sum = (a1 + a3) * a2; 256 if (sum >= 0) {
257 // $('.js-calculator_clients-sum').closest('p').removeClass('hidden'); 258 $('.js-calculator_clients-sum').html(sum.toLocaleString()); 259 } 260 } else { 261 // $('.js-calculator_clients-sum').closest('p').addClass('hidden'); 262 } 263 }); 264 } 265 if (MangoVars['BLOCK_TYPES_ON_PAGE'].indexOf('wheel') >= 0) { 266 var wheelSlick = '.js-wheel-items'; 267 $(wheelSlick).slick({ 268 infinite: true, 269 dots: false, 270 arrows: false, 271 // centerMode: true, 272 slidesToShow: 1, 273 slidesToScroll: 1, 274 autoplay: true, 275 fade: true, 276 autoplaySpeed: 5000, 277 }); 278 279 $('li.js-wheel-nav').on('click', function () { 280 var index = $(this).data('slick-index'); 281 $(wheelSlick).slick('slickGoTo', index); 282 $('li.js-wheel-nav').not($(this)).removeClass('active'); 283 $(wheelSlick).slick('slickPause'); 284 285 }); 286 287 $(wheelSlick).on('beforeChange', function (event, slick, currentSlide, nextSlide) { 288 var nextNav = $('li.js-wheel-nav[data-slick-index="'+nextSlide+'"]'); 289 $(nextNav).addClass('active'); 290 $('li.js-wheel-nav').not($(nextNav)).removeClass('active'); 291 $('.js-select-wheel option[value="'+nextSlide+'"]').prop('selected', true); 292 }); 293 294 $('.js-select-wheel').on('change', function () { 295 var index = $(this).val(); 296 $(wheelSlick).slick('slickGoTo', index); 297 }); 298 299 $('.js-wheel-label').each(function (i, wItem) { 300 // console.log($(wItem).css('top')); 301 var rnd1 = getRandomArbitrary(0.85, 1.15); 302 var rnd2 = getRandomArbitrary(-8, 8); 303 var rnd3 = getRandomArbitrary(-8, 8); 304 var vScale = Math.round(rnd1 * 100); 305 var nTop = $(wItem).css('top'); 306 var nLeft = $(wItem).css('left'); 307 var newDiffTop = Math.round(rnd2 * 2); 308 var newDiffLeft = Math.round(rnd3 * 2); 309 nTop = parseInt(nTop); 310 nLeft = parseInt(nLeft); 311 $(wItem).css({ 312 'top': nTop + newDiffTop + 'px', 313 'left': nLeft + newDiffLeft + 'px', 314 }); 315 $(wItem).find('.non-gradient-cloud-wrapper-img').css({'zoom': vScale+'%'}); 316 // $(wItem).find('img').css({'zoom': vScale+'%'}); 317 }); 318 } 319 } 320 321 if ($('.gradient-cloud-wrapper-img').length > 0) { 322 $('.gradient-cloud-wrapper-img').each(function (i, wItem) { 323 var rnd1 = getRandomArbitrary(0.85, 1.15); 324 var vScale = Math.round(rnd1 * 100); 325 $(wItem).css({'zoom': vScale+'%'}); 326 }) 327 } 328 }); 329 330 $('.js-collapse-btn').on('click', function () { 331 var btn = $(this), 332 parent = btn.closest('section'), 333 target = parent.find('.bg'), 334 isOpen = (parent.hasClass('state-open')); 335 336 if (isOpen) { 337 target.slideUp(300); 338 parent.removeClass('state-open'); 339 } else { 340 target.slideDown(300); 341 parent.addClass('state-open'); 342 } 343 }); 344 345 var showRibbon = function() { 346 var modalClientDialog = $('#show-client-dialog'), 347 mcdLocalStorageName = 'clientDialog_isClient', 348 mcdLocalStorage = localStorage.getItem(mcdLocalStorageName), 349 mcdCookieName = 'BITRIX_SM_clientDialog_isClient', 350 mcdCookie = BX.getCookie(mcdCookieName); 351 352 if ( (mcdCookie != undefined && mcdCookie == 'Y') || mcdLocalStorage == 'N' ) 353 return false; 354 355 setTimeout( function () { 356 $('.js-isclient').addClass('in') 357 .on('click', '.js-isclient-yes', function() { 358 metrikaTriggerEvent('user_is_client_yes'); 359 if (mcdLocalStorage && mcdLocalStorage.length) { 360 localStorage.removeItem(mcdLocalStorageName); 361 } 362 363 BX.setCookie(mcdCookieName, 'Y', {expires: cookieExpires}); 364 $(modalClientDialog).arcticmodal('close'); 365 location.reload(); 366 }) 367 .on('click', '.js-isclient-no', function() { 368 metrikaTriggerEvent('user_is_client_no'); 369 localStorage.setItem(mcdLocalStorageName, 'N'); 370 $(modalClientDialog).arcticmodal('close'); 371 }); 372 }, 500); 373 }; 374 375 $(document).on('click', '.js-isclient' , function () { 376 $(this).addClass('active'); 377 }); 378 379 if ($('.js-replace-for-clients').get(0)) { 380 showRibbon(); 381 } 382 383 if (!window.hasOwnProperty('roistatGoal')) { 384 window.roistatGoal = {}; 385 window.roistatGoal.reach = function () {}; 386 } 387}); 388/* End */ 389; 390; /* Start:"a:4:{s:4:"full";s:86:"/bitrix/components/constructor/block/templates/products_price/script.js?17906266296995";s:6:"source";
390s:71:"/bitrix/components/constructor/block/templates/products_price/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 391$(function () { 392 let tabs = $('.showroom-tabs'); 393 let tabItems = $('.showroom-tabs-item'); 394 let items = tabs.find('li'); 395 396 items.click(function () { 397 let t = $(this); 398 let ind = t.index(); 399 400 t.siblings().removeClass('active'); 401 tabItems.removeClass('active'); 402 t.addClass('active'); 403 tabItems.eq(ind).addClass('active'); 404 405 let tabsWidth = tabs.width(); 406 let prevElems = t.prevAll(); 407 let elWidth = t.width(); 408 let prevElemsWidth = 0; 409 410 prevElems.each(function () { 411 let el = $(this); 412 prevElemsWidth += (el.width() + 24); 413 }); 414 415 let offset = prevElemsWidth - ((tabsWidth - elWidth)/2); 416 417 tabs.animate({scrollLeft: offset}, 70); 418 }); 419 420 $('.showroom-card').each(function() { 421 let itemContainer = $(this), 422 button = itemContainer.find('.js-product-add'), 423 quantityControl = itemContainer.find('.js-quantity-control'), 424 quantityInput = quantityControl.find('input[name="quantity"]'), 425 cartUpdateButton = itemContainer.find('.sip-cart'), 426 updateItemTimeout, 427 itemUpdating = false; 428 button.on('click', (e) => { 429 let button = $(e.target); 430 let action = button.data('action'); 431 switch (action) { 432 case 'add_device': 433 button.addClass('wait'); 434 addDevices( 435 button.data('id'), 436 button.data('quantity'), 437 'Y', 438 true, 439 function (status) { 440 button.removeClass('wait'); 441 if (status !== 'error') { 442 button.hide(); 443 quantityControl.show(); 444 quantityInput.val(button.data('quantity') + ' ÑÑ.'); 445 cartUpdateButton.data('changed', false); 446 } 447 }); 448 break; 449 default: 450 if (action !== undefined) { 451 let data = { 452 'chain': 'vats', 453 'id': button.data('product-id'), 454 'isDemo': 'N', 455 'vats_anchor': 'new', 456 'resetChain': 'Y', 457 'sessid': BX.bitrix_sessid(), 458 } 459 let loader = new Loader(button); 460 BX.ajax({ 461 url: '/api/cart/' + action + '/', 462 method: 'POST', 463 data: data, 464 dataType: 'json', 465 timeout: 30, 466 onsuccess: function(response) { 467 loader.stopLoader(); 468 if (response.hasOwnProperty('status') && response.status === 'success') { 469 if (typeof mgoTriggerEvent === 'function') { 470 mgoTriggerEvent('addOrDelProductCart', [response['arrEcommerce']]); 471 } 472 location.href = response.data.url; 473 } else { 474 let message = 'ÐÑибка пÑи добавлении в коÑзинÑ.' 475 if (response.hasOwnProperty('message')) { 476 message = response.message; 477 } 478 ERROR_REPORTER.showMessage(message, MESSAGE_TYPE_ERROR); 479 } 480 }, 481 onfailure: function() { 482 loader.stopLoader(); 483 ERROR_REPORTER.showMessage('ÐÑибка пÑи добавлении в коÑзин
483Ñ.', MESSAGE_TYPE_ERROR); 484 } 485 }); 486 487 } 488 } 489 }); 490 491 itemContainer.find('.showroom-remove').on('click', function () { 492 if (itemUpdating) { 493 return; 494 } 495 496 let v = parseInt(quantityInput.val()) - 1; 497 if (v < 0 || isNaN(v)) { 498 v = 0; 499 } 500 501 quantityInput.val(v + ' ÑÑ.'); 502 cartUpdateButton.data('changed', true); 503 clearTimeout(updateItemTimeout); 504 updateItemTimeout = setTimeout(function () { 505 quantityInput.addClass('wait'); 506 itemUpdating = true; 507 addDevices( 508 button.data('id'), 509 quantityInput.val().split(' ÑÑ.').join(''), 510 'Y', 511 true, 512 function (status) { 513 quantityInput.removeClass('wait'); 514 if (status !== 'error') { 515 if (v === 0) { 516 quantityControl.hide(); 517 button.show(); 518 } 519 quantityInput.removeClass('wait'); 520 itemUpdating = false; 521 } 522 }); 523 }, 500); 524 }); 525 526 itemContainer.find('.showroom-add').on('click', function () { 527 if (itemUpdating) { 528 return; 529 } 530 531 let v = parseInt(quantityInput.val().split(' ÑÑ.').join('')) + 1; 532 if (v >= 1 ) { 533 itemContainer.find('.showroom-remove').removeClass('disabled'); 534 } 535 if (v <= 0 || isNaN(v)) { 536 v = 1; 537 } 538 539 if (v > 999) { 540 v = 999; 541 } 542 543 quantityInput.val(v + ' ÑÑ.'); 544 cartUpdateButton.data('changed', true); 545 546 clearTimeout(updateItemTimeout); 547 updateItemTimeout = setTimeout(function () { 548 itemUpdating = true; 549 quantityInput.addClass('wait'); 550 addDevices( 551 button.data('id'), 552 quantityInput.val().split(' ÑÑ.').join(''), 553 'Y', 554 true, 555 function (status) { 556 if (status !== 'error') { 557 itemUpdating = false; 558 quantityInput.removeClass('wait'); 559 } 560 }); 561 }, 500); 562 }); 563 }); 564 565 $('.showroom-tabs-items').find('.js-product-add').removeAttr('disabled'); 566 567 $('a.showroom-label').on('click', () => { 568 if (typeof mgoTriggerEvent === 'function') { 569 mgoTriggerEvent('showroom-pdf'); 570 } 571 }); 572}); 573 574 575/* End */ 576;; /* /bitrix/components/constructor/page/templates/.default/script.js?179062662913857*/ 577; /* /bitrix/components/constructor/block/templates/products_price/script.js?17906266296995*/
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.