1 2; /* Start:"a:4:{s:4:"full";s:86:"/local/modules/mango.pages/static_files/js/mango-pages-onclick-helper.js?1790626630575";s:6:"source";s:72:"/local/modules/mango.pages/static_files/js/mango-pages-onclick-helper.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3class MangoPagesOnClickHelper { 4 constructor(dataAttributeName, onClicks) { 5 this.init(dataAttributeName, onClicks); 6 } 7 8 init(dataAttributeName, onClicks) { 9 for (let key in onClicks) { 10 let items = document.querySelectorAll(`[${dataAttributeName}="${key}"]`); 11 if (!items || !items.length) { 12 continue; 13 } 14 15 items.forEach(item => { 16 item.addEventListener('click', () => { 17 new Function(onClicks[key])() 18 }); 19 }); 20 } 21 } 22} 23 24/* End */ 25; 26; /* Start:"a:4:{s:4:"full";s:86:"/local/modules/mango.pages/static_files/js/all-buttons-click-handler.js?17906266291778";s:6:"source";s:71:"/local/modules/mango.pages/static_files/js/all-buttons-click-handler.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 27/** 28 * ÐлаÑÑ Ð²ÐµÑÐ°ÐµÑ Ð½Ð° вÑе кнопки нового конÑÑÑÑкÑоÑа Ñ ÐºÐ»Ð°ÑÑами .button и .btn 29 * ÑобÑÑие клика Ð´Ð»Ñ Ð¾ÑпÑавки в Ð¯Ð½Ð´ÐµÐºÑ ÐеÑÑÐ¸ÐºÑ 30 * */ 31class AllButtonsClickHandler { 32 _WRAPPER_CLASS = '.js-constructor-page' 33 _BUTTON_CLASS = '.button' 34 _BTN_CLASS = '.btn' 35 _buttons = [] 36 37 constructor() { 38 if (typeof window.mgoTriggerEvent === 'function') { 39 this.run() 40 } 41 } 42 43 run() { 44 this.wrapper = this.getWrapper() 45 if (!this.wrapper) { 46 console.error('Can\'t find ' + this._WRAPPER_CLASS + ' class') 47 return 48 } 49 50 this.getButtons() 51 if (this._buttons.length < 1) { 52 return 53 } 54 55 this.addEvents() 56 } 57 58 getWrapper() { 59 return document.querySelector(this._WRAPPER_CLASS) 60 } 61 62 getButtons() { 63 let buttons = this.wrapper.querySelectorAll(this._BUTTON_CLASS) 64 if (buttons && buttons.length > 0) { 65 buttons.forEach(button => { 66 this.addButtonToArray(button) 67 }); 68 } 69 70 let btns = this.wrapper.querySelectorAll(this._BTN_CLASS) 71 if (btns && btns.length > 0) { 72 btns.forEach(button => { 73 this.addButtonToArray(button) 74 }); 75 } 76 } 77 78 addButtonToArray(button) { 79 if (this._buttons.indexOf(button) === -1) { 80 this._buttons.push(button) 81 } 82 } 83 84 addEvents() { 85 this._buttons.forEach(button => { 86 button.addEventListener('click', () => { 87 mgoTriggerEvent('allButtons') 88 }) 89 }) 90 } 91} 92 93window.addEventListener('DOMContentLoaded', () => { 94 new AllButtonsClickHandler() 95}) 96/* End */ 97; 98; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/components/mango_pages/page/templates/.default/script.js?17906266292547";s:6:"source";s:64:"/bitrix/components/mango_pages/page/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 99class PageControllerComponent 100{ 101 constructor(pageId, haveRights, mertrikaCounterId, abId, abContext) { 102 this.page = document.querySelector('.js-constructor-page') 103 if (!this.page) { 104 return 105 } 106 107 this.isSendPageView = false 108 this.urlPageViewAction = '/api/mango-pages/block/pageView/' 109 110 this.mertrikaCounterId = mertrikaCounterId 111 this.abParam = abId && abContext ? 'ab_' + abId : '' 112 this.abContext = abContext 113 114 if (haveRights === 'Y') { 115 new PagesEditMode(pageId) 116 PagesEditMode.disableSortButtons() 117 } 118 119 this.init() 120 } 121 122 init() { 123 const self = this 124 125 if ( 126 self.abParam 127 && self.mertrikaCounterId 128 ) { 129 let obParams = {} 130 obParams[self.abParam] = this.abContext 131 self.metrikaTriggerUserParams(self.mertrikaCounterId, obParams) 132 } 133 134 window.addEventListener('load', function () { 135 setTimeout(() => { 136 self.pageView() 137 }, 30000) 138 }) 139 window.addEventListener('unload', function () { 140 self.pageViewBeacon() 141 }) 142 } 143 144 pageView() { 145 const self = this 146 147 if (self.isSendPageView) { 148 return 149 } 150 self.isSendPageView = true 151 152 let pageEl = document.querySelector('.page') 153 if (pageEl) { 154 return 155 } 156 157 BX.ajax({ 158 url: self.urlPageViewAction, 159 method: 'POST', 160 data: { 161 'sessid': BX.bitrix_sessid(), 162 'action': 'pageView', 163 'pid': pageEl.dataset.id 164 }, 165 dataType: 'json', 166 timeout: 60, 167 }) 168 } 169 170 pageViewBeacon() { 171 const self = this 172 173 if (self.isSendPageView) { 174 return 175 } 176 177 let formData = new FormData() 178 formData.append('sessid', BX.bitrix_sessid()) 179 formData.append('action', 'pageView') 180 formData.append('pid', self.page.dataset.id) 181 182 navigator.sendBeacon(self.urlPageViewAction, formData) 183 } 184 185 metrikaTriggerUserParams(mertrikaCounterId, obParams, count = 0) { 186 if (!window.hasOwnProperty('ym')) { 187 if (count < 20) { 188 setTimeout(() => { 189 this.metrikaTriggerUserParams(mertrikaCounterId, obParams, count + 1) 190 }, 500) 191 } 192 } else { 193 window.ym(mertrikaCounterId, 'userParams', obParams) 194 } 195 } 196} 197/* End */ 198; 199; /* Start:"a:4:{s:4:"full";s:74:"/local/components/mango/shop.numbers/templates/vue/script.js?1790626629114";s:6:"source";s:60:"/local/components/mango/shop.numbers/templates/vue/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 200$(function() { 201 $('body').append($('<div class="scroll-up"><div class="container"><span /></div></div>')); 202}); 203 204/* End */ 205; 206; /* Start:"a:4:{s:4:"full";s:83:"/local/components/mango/shop.breadcrumbs/templates/.default/script.js?1790626629245";s:6:"source";s:69:"/local/components/mango/shop.breadcrumbs/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 207$(function() { 208 let $backContainer = $('.back-to-prev-step--container'); 209 let $prevHeader = $backContainer.siblings('h1').eq(0); 210 211 if ($prevHeader.size()) { 212 $backContainer.removeClass('hide').insertBefore($prevHeader); 213 } 214}); 215/* End */ 216; 217; /* Start:"a:4:{s:4:"full";s:86:"/local/components/mango/buy.step.motivations/templates/popover/script.js?1790626629788";s:6:"source";s:72:"/local/components/mango/buy.step.motivations/templates/popover/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 218$(function () { 219 $(document).on('close_screen', '.js-close-screen', function () { 220 var screen = $(this).closest('.js-screen'); 221 var screenId = screen.data('id'); 222 screen.hide(); 223 224 AJAX.send( 225 '/ajax_new/cookieFunctions.php', 226 { 227 action: 'set', 228 name: 'TIME_MOTIVATION_' + screenId, 229 value: 1, 230 time: 86400*365 231 } 232 ); 233 }); 234 235 $(document).on('click', '.js-close-screen, .js-screen', function () { 236 $('.js-close-screen').trigger('close_screen'); 237 }); 238 setTimeout(function () { 239 var closeButton = $('.js-close-screen'); 240 241 if (closeButton.length > 0) { 242 closeButton.trigger('close_screen'); 243 } 244 }, 15000); 245}); 246/* End */ 247; 248; /* Start:"a:4:{s:4:"full";s:85:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha_reloader.js?17906266302010";s:6:"source";s:70:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha_reloader.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 249class BitrixCaptchaReloader { 250 uri = '/ajax/reload_captcha.php'; 251 reloadBtnClass = '.js-reload-captcha'; 252 253 constructor(formId) { 254 this.formId = formId; 255 this.addReloadEvent(); 256 } 257 258 addReloadEvent() { 259 let form = document.querySelector('#' + this.formId); 260 if (!form) { 261 console.log('FORM NOT FOUND'); 262 return; 263 } 264 265 if (form.id === 'new-register-form') { 266 return; 267 } 268 269 let reloadBtn = form.querySelector(this.reloadBtnClass); 270 if (!reloadBtn) { 271 console.log('RELOAD BTN NOT FOUND'); 272 return; 273 } 274 275 let hiddenInput = form.querySelector('[name="captcha_sid"]'); 276 if (!hiddenInput) { 277 console.log('hiddenInput BTN NOT FOUND'); 278 return; 279 } 280 281 let img = form.querySelector('.captcha_img').querySelector('img'); 282 if (!img) { 283 console.log('img BTN NOT FOUND'); 284 return; 285 } 286 287 reloadBtn.addEventListener('click', () => { 288 console.log('click'); 289 290 this.request() 291 .then(function (captchaSid) { 292 console.log('captchaSid', captchaSid); 293 294 if (captchaSid.length === 0) { 295 console.error('Ðе ÑдалоÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð¸ÑÑ ÐºÐ°Ð¿ÑÑ Ñ ÑоÑÐ¼Ñ Ñ id = ' + form.id + '. Ðе пеÑедан captchaSid'); 296 return; 297 } 298 299 hiddenInput.value = captchaSid; 300 img.src = '/bitrix/tools/captcha.php?captcha_sid=' + captchaSid; 301 }).catch(function (err) { 302 console.error(err); 303 }); 304 }); 305 } 306 307 request() { 308 return fetch(this.uri, { 309 headers: { 310 'Content-Type': 'application/json', 311 'X-Requested-With': 'XMLHttpRequest' 312 }, 313 }).then(function (response) { 314 return response.json(); 315 }) 316 } 317} 318/* End */ 319; 320; /* Start:"a:4:{s:4:"full";s:76:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha.js?17906266305020";s:6:"source";s:61:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 321class BitrixCaptcha { 322 formId; 323 captchaSid; 324 containerClass = '.js-smart-captcha'; 325 uri = '/ajax/reload_captcha.php'; 326 327 constructor(formId, captchaSid = 0) { 328 this.formId = formId; 329 this.captchaSid = captchaSid; 330 } 331 332 init() { 333 this.form = document.querySelector('#' + this.formId); 334 if (!this.form) { 335 console.error('ФоÑма Ñ id = ' + this.formId + ' не найдена'); 336 } 337 338 this.container = this.form.querySelector(this.containerClass); 339 if (!this.container) { 340 console.error('ÐонÑÐµÐ¹Ð½ÐµÑ ' + this.containerClass + ' Ñ ÑоÑÐ¼Ñ c id = ' + this.formId + ' не найден'); 341 } 342 343 this.container.innerHTML = ''; 344 this.container.classList.remove('smart-captcha_invisible'); 345 346 if (this.captchaSid === 0) { 347 this.addContentByRequest(); 348 return; 349 } 350 351 this.addContent(); 352 new BitrixCaptchaReloader(this.formId); 353 } 354 355 addContentByRequest() { 356 let self = this; 357 this.request() 358 .then(function(captchaSid) { 359 if (captchaSid.length === 0) { 360 console.error('Ðе ÑдалоÑÑ Ð¿Ð¾Ð»ÑÑиÑÑ captchaSid Ð´Ð»Ñ ÑоÑÐ¼Ñ Ñ id = ' + self.formId); 361 return; 362 } 363 364 self.captchaSid = captchaSid; 365 self.addContent(); 366 new BitrixCaptchaReloader(self.formId); 367 }).catch(function (err) { 368 console.error(err); 369 }); 370 } 371 372 addContent() {
373 // <input type="hidden" name="captcha_sid" value="0e7576bc78ecabf071c8c357e93daa75"> 374 this.hiddenInput = document.createElement('input'); 375 this.hiddenInput.type = 'hidden'; 376 this.hiddenInput.name = 'captcha_sid'; 377 this.hiddenInput.value = this.captchaSid; 378 379 // <input type="text" name="captcha_word" size="30" maxlength="50" value="" class="inputtext"> 380 this.input = document.createElement('input'); 381 this.input.type = 'text'; 382 this.input.name = 'captcha_word'; 383 this.input.size = 30; 384 this.input.maxlength = 50; 385 386 // <img src="/bitrix/tools/captcha.php?captcha_sid=0e7576bc78ecabf071c8c357e93daa75" width="180" height="40" alt=""> 387 this.img = document.createElement('img'); 388 this.img.src = '/bitrix/tools/captcha.php?captcha_sid=' + this.captchaSid; 389 this.img.width = 180; 390 this.img.height = 40; 391 392 this.a = document.createElement('a'); 393 this.a.dataset.type = 'link'; 394 this.a.classList.add('js-reload-captcha', 'captcha_reload'); 395 this.a.title = 'ÐбновиÑÑ'; 396 397 const svgNS = 'http://www.w3.org/2000/svg'; 398 this.svg = document.createElementNS(svgNS, 'svg'); 399 this.svg.classList.add('icon', 'icon--reload'); 400 401 this.use = document.createElementNS(svgNS, 'use'); 402 this.use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#icon--reload'); 403 404 this.svg.appendChild(this.use); 405 this.a.appendChild(this.svg); 406 407 this.container.appendChild(this.hiddenInput); 408 this.container.appendChild(this.input); 409 this.container.appendChild(this.img); 410 this.container.appendChild(this.a); 411 412 this.container.classList.add('captcha_img'); 413 } 414 415 request() { 416 return fetch(this.uri, { 417 headers: { 418 'Content-Type': 'application/json', 419 'X-Requested-With': 'XMLHttpRequest' 420 }, 421 }).then(function (response) { 422 return response.json(); 423 }) 424 } 425 426 static reloadBitrixCaptcha(formId) { 427 let form = document.querySelector('#' + formId); 428 if (!form) { 429 console.error('Ðевозможно обновиÑÑ Ð¸Ð·Ð¾Ð±Ñажение капÑи. Ðе найдена ÑоÑма Ñ id = ' + formId); 430 } 431 432 let container = form.querySelector('.js-smart-captcha'); 433 if (!container) { 434 return; 435 } 436 437 let input = container.querySelector('[name="captcha_sid"]'); 438 if (!input) { 439 return; 440 } 441 442 let img = container.querySelector('img'); 443 if (!img) { 444 return; 445 } 446 447 let self = this; 448 fetch('/ajax/reload_captcha.php', { 449 headers: { 450 'Content-Type': 'application/json', 451 'X-Requested-With': 'XMLHttpRequest' 452 }, 453 }).then(function (response) { 454 return response.json(); 455 }).then(function (captchaSid) { 456 if (captchaSid.length === 0) { 457 console.error('Ðе ÑдалоÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð¸ÑÑ ÐºÐ°Ð¿ÑÑ Ñ ÑоÑÐ¼Ñ Ñ id = ' + self.formId + '. Ðе пеÑедан captchaSid'); 458 return; 459 } 460 461 input.value = captchaSid; 462 img.src = '/bitrix/tools/captcha.php?captcha_sid=' + captchaSid; 463 }).catch(function (err) { 464 console.error(err); 465 }); 466 } 467} 468 469/* End */ 470; 471; /* Start:"a:4:{s:4:"full";s:90:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha_register_form.js?17906266302967";s:6:"source";s:75:"/local/templates/mango_ru/js/custom/captcha/bitrix_captcha_register_form.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 472class BitrixCaptchaRegisterForm extends BitrixCaptcha { 473 containerClass = '.js-smart-captcha-container'; 474 475 addContent() { 476 let divFormGroup = document.createElement('div'); 477 divFormGroup.classList.add('form-group', 'js-form-group', 'js-captcha'); 478 479 let label = document.createElement('label'); 480 label.classList.add('bold'); 481 label.textContent = 'ÐведиÑе ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ñ ÐºÐ°ÑÑинки'; 482 483 let divCaptcha = document.createElement('div'); 484 divCaptcha.classList.add('captcha'); 485 486 let divCaptchaWord = document.createElement('div');
487 divCaptchaWord.classList.add('captcha_word'); 488 489 let divCaptchaImg = document.createElement('div'); 490 divCaptchaImg.classList.add('captcha_img'); 491 492 // <input type="hidden" name="captcha_sid" value="0e7576bc78ecabf071c8c357e93daa75"> 493 this.hiddenInput = document.createElement('input'); 494 this.hiddenInput.type = 'hidden'; 495 this.hiddenInput.name = 'captcha_sid'; 496 this.hiddenInput.value = this.captchaSid; 497 this.hiddenInput.id = 'captcha_sid'; 498 499 // <input type="text" name="captcha_word" size="30" maxlength="50" value="" class="inputtext"> 500 this.input = document.createElement('input'); 501 this.input.classList.add('js-required'); 502 this.input.type = 'text'; 503 this.input.name = 'captcha_word'; 504 this.input.size = 30; 505 this.input.maxlength = 5; 506 this.input.dataset.fieldname = 'Слово Ñ ÐºÐ°ÑÑинки'; 507 this.input.dataset.id = 'reg_captcha_word'; 508 509 // <img src="/bitrix/tools/captcha.php?captcha_sid=0e7576bc78ecabf071c8c357e93daa75" width="180" height="40" alt=""> 510 this.img = document.createElement('img'); 511 this.img.src = '/bitrix/tools/captcha.php?captcha_sid=' + this.captchaSid; 512 this.img.width = 180; 513 this.img.height = 40; 514 this.img.id = 'captcha_img'; 515 516 this.a = document.createElement('a'); 517 this.a.dataset.type = 'link'; 518 this.a.classList.add('js-reload-captcha', 'captcha_reload'); 519 this.a.title = 'ÐбновиÑÑ'; 520 521 const svgNS = 'http://www.w3.org/2000/svg'; 522 this.svg = document.createElementNS(svgNS, 'svg'); 523 this.svg.classList.add('icon', 'icon--reload'); 524 525 this.use = document.createElementNS(svgNS, 'use'); 526 this.use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#icon--reload'); 527 528 this.svg.appendChild(this.use); 529 this.a.appendChild(this.svg); 530 531 divCaptchaWord.appendChild(this.input); 532 divCaptchaImg.appendChild(this.hiddenInput); 533 divCaptchaImg.appendChild(this.img); 534 divCaptchaImg.appendChild(this.a); 535 536 divCaptcha.appendChild(divCaptchaWord); 537 divCaptcha.appendChild(divCaptchaImg); 538 539 divFormGroup.appendChild(label); 540 divFormGroup.appendChild(divCaptcha); 541 542 this.container.appendChild(divFormGroup); 543 } 544} 545 546/* End */ 547; 548; /* Start:"a:4:{s:4:"full";s:69:"/local/templates/mango_ru/js/custom/captcha/captcha.js?17906266306464";s:6:"source";s:54:"/local/templates/mango_ru/js/custom/captcha/captcha.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 549class SmartCaptcha { 550 elemId = 'captchaScript'; 551 isInited = false; 552 doNotInit = false; 553 scriptLoad = false; 554 555 constructor() { 556 if (document.getElementById(this.elemId)) { 557 return; 558 } 559 560 this.initLoadSmartCaptchaScriptEvent(); 561 this.initShowBitrixCaptchaEvent(); 562 563 this.checkSmartCaptchaLoaded().then(() => { 564 }).catch((e) => { 565 this.doNotInit = true; 566 let containers = document.querySelectorAll('.js-smart-captcha'); 567 if (containers.length === 0) { 568 console.error('ÐонÑейнеÑÑ js-smart-captcha не найденÑ'); 569 return; 570 } 571 572 containers.forEach((container) => { 573 container.dataset.captchaType = 'bitrix'; 574 let formId = container.closest('form').id; 575 576 formId === 'new-register-form' ? new BitrixCaptchaRegisterForm(formId).init() : new BitrixCaptcha(formId).init(); 577 }); 578 }) 579 } 580 581 init() { 582 let self = this; 583 document.addEventListener('loadInlineMessage', (event) => { 584 console.log('captcha loadInlineMessage', event.detail.target); 585 self.onloadSmartCaptcha(event.detail.target); 586 }); 587 588 if (window.frameCacheVars === undefined) { 589 BX.ready(function () { 590 self.onloadSmartCaptcha(); 591 }); 592 return; 593 } 594 595 if (BX.frameCache.frameDataReceived) { 596 self.onloadSmartCaptcha(); 597 } else { 598 BX.addCustomEvent("onFrameDataReceived", function () { 599 self.onloadSmartCaptcha(); 600 }); 601 BX.addCustomEvent("onFrameDataRequestFail", function () { 602 self.onloadSmartCaptcha(); 603 }); 604 } 605 } 606 607 initLoadSmartCaptchaScriptEvent() { 608 document.addEventListener('loadSmartCaptchaScript', () => { 609 if ( 610 !this.isInited 611 && !this.doNotInit 612 ) { 613 this.isInited = true; 614 this.init(); 615 } 616 }); 617 } 618 619 initShowBitrixCaptchaEvent() { 620 document.addEventListener('ShowBitrixCaptcha', (event) => { 621 event.detail.formId === 'new-register-form' 622 ? new BitrixCaptchaRegisterForm(event.detail.formId, event.detail.captchaSid).init() 623 : new BitrixCaptcha(event.detail.formId, event.detail.captchaSid).init(); 624 }); 625 } 626 627 addSmartCaptchaScript() { 628 let head = document.querySelector('head'); 629 let script = document.createElement("script"); 630 script.innerHTML = function onloadCaptchaFunction() { 631 document.dispatchEvent(new Event('loadSmartCaptchaScript')); 632 }; 633 head.append(script); 634 635 let captchaScript = document.createElement('script'); 636 captchaScript.id = this.elemId; 637 captchaScript.async = true; 638 captchaScript.defer = true; 639 captchaScript.src = 'https://smartcaptcha.yandexcloud.net/captcha.js?render=onload&onload=onloadCaptchaFunction'; 640 document.head.appendChild(captchaScript); 641 } 642 643 onloadSmartCaptcha(context) { 644 if (!window.smartCaptcha) { 645 return; 646 } 647 648 if (context === undefined) { 649 context = document; 650 } else if(typeof context.get === 'function') { 651 context = context.get(0); 652 } 653 654 window.smartCaptchaLoad = true; 655 let self = this; 656 let jsSmartCaptcha = context.querySelectorAll('.js-smart-captcha:empty');
657 jsSmartCaptcha.forEach((element) => { 658 self.initSmartCaptcha(element); 659 }); 660 } 661 662 initSmartCaptcha(element) { 663 let form = element.closest('form'); 664 let isInvisible = element.dataset.captchaType === 'invisible'; 665 666 element.closest('.js-form-group')?.classList.add('hide'); 667 let widgetId = window.smartCaptcha.render(element.id, { 668 sitekey: MangoVars['CAPTCHA_CLIENT_KEY'], 669 invisible: isInvisible, 670 hideShield: true, 671 callback: (token) => { 672 form.querySelector('[name="smart-token"]').value = token; 673 form.dispatchEvent(new CustomEvent('onRenderSmartCaptcha')); 674 } 675 }); 676 form.dataset.widgetId = widgetId; 677 678 form.captchaSubmitHandler = () => { 679 return new Promise((resolve, reject) => { 680 let token = form.querySelector('[name="smart-token"]'); 681 let invisible = token && token.closest('.js-smart-captcha').dataset.captchaType === 'invisible'; 682 if ( 683 token?.value.length > 0 684 || !invisible 685 ) { 686 resolve(); 687 } 688 form.addEventListener('onRenderSmartCaptcha', resolve); 689 690 if (window.smartCaptcha) { 691 window.smartCaptcha.execute(widgetId); 692 } else { 693 reject(); 694 } 695 }); 696 } 697 } 698 699 checkSmartCaptchaLoaded() { 700 let self = this; 701 702 return new Promise(function (resolve, reject) { 703 let timeCurrent = 0 704 let timeStep = 500 705 let timeStop = 5000 706 707 let intervalId = setInterval(() => { 708 timeCurrent += timeStep 709 710 if (window.smartCaptcha) { 711 clearInterval(intervalId) 712 return resolve() 713 } 714 715 if (timeCurrent >= timeStop) { 716 clearInterval(intervalId) 717 return reject(new Error('СкÑÐ¸Ð¿Ñ Ð½Ðµ загÑÑжен')) 718 } 719 720 if (!self.scriptLoad) { 721 self.scriptLoad = true 722 723 self.addSmartCaptchaScript(); 724 } 725 }, timeStep) 726 }) 727 } 728} 729 730(function () { 731 if (window.frameCacheVars !== undefined) { 732 // оÑÑабоÑÐ°ÐµÑ Ð½Ð° аÑÐºÑ Ñ Ð¸Ñе пÑи вклÑÑенном композиÑе 733 BX.addCustomEvent("onFrameDataReceived", function () { 734 window.SmartCaptchaObject = new SmartCaptcha(); 735 }); 736 BX.addCustomEvent('onFrameDataRequestFail', () => { 737 window.SmartCaptchaObject = new SmartCaptcha(); 738 }); 739 } else { 740 BX.ready(function () { 741 window.SmartCaptchaObject = new SmartCaptcha(); 742 }); 743 } 744}()); 745/* End */ 746; 747; /* Start:"a:4:{s:4:"full";s:120:"/local/modules/mango.constructor/components/constructor/form.result.new/templates/vertical/form_script.js?17906266297907";s:6:"source";s:105:"/local/modules/mango.constructor/components/constructor/form.result.new/templates/vertical/form_script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 748$(function () { 749 document.dispatchEvent(new CustomEvent('MangoFormInit', {'detail': '.js-contact-form-block'})) 750 751 $(document).on('click', '.js-captcha-reload', function () { 752 return reloadCaptcha(this) 753 }); 754 755 $(document).on('click', '.js-form-datepicker', function () { 756 if ($(this).data('datepicker') === undefined) { 757 var isTime = $(this).data('time') === 'Y', 758 dateStart = $(this).data('start'), 759 dateEnd = $(this).data('end'), 760 dateCurrent = new Date(); 761 762 dateStart = dateStart ? new Date(dateStart*1000) : false; 763 dateEnd = dateEnd ? new Date(dateEnd*1000) : false; 764 765 var params = { 766 timepicker: isTime, 767 startDate: dateCurrent, 768 minDate: dateStart, 769 maxDate: dateEnd, 770 autoClose: true, 771 keyboardNav: false 772 }; 773 774 if (isTime) { 775 params.autoClose = false;
776 } 777 $(this).datepicker(params); 778 $(this).focus(); 779 } 780 }); 781 782 $(document).on('click', '.js-contact-form-block--set-status', function () { 783 $(this) 784 .closest('form') 785 .find('[name=STATUS_ID]') 786 .val($(this).data('status-id')); 787 788 $('.js-contact-form-block--submit').trigger('click'); 789 return false; 790 }); 791 792 $(document).on('change', '[data-callback]', function () { 793 794 var newVal, 795 arCallbacks = $(this).data('callback').split('|'); 796 797 for (var i = arCallbacks.length - 1; i >= 0; i--) { 798 799 switch (arCallbacks[i]) { 800 801 case 'firstCharUp': 802 newVal = $(this).val().replace(/(^|\s)\S/g, function(l) { 803 return l.toUpperCase(); 804 }); 805 $(this).val(newVal); 806 break; 807 808 case 'firstCharUpStringDown': 809 newVal = $(this).val().toLowerCase(); 810 newVal = newVal.replace(/^\S/g, function(l) { 811 return l.toUpperCase(); 812 }); 813 $(this).val(newVal); 814 break; 815 816 case 'trimWhitespace': 817 newVal = $(this).val().replace(/\s+/g, ''); 818 $(this).val(newVal); 819 break; 820 821 } 822 823 } 824 825 }); 826 827 $(document).on('click', '.js-delete-file', function(e) { 828 var inputCont = $(this).closest('.js-input-file-container'); 829 inputCont.removeClass('process'); 830 inputCont.find('.js-input-file-del').attr('disabled', false).val('Y'); 831 inputCont.find('.js-input-field').data('selected', '').val(''); 832 inputCont.find('.js-file-name').text(''); 833 return false; 834 }); 835 836 $(document).on('change', '.js-input-file-container .js-input-field', function(e) { 837 var fileName = e.target.files[0].name, 838 inputCont = $(this).closest('.js-input-file-container'); 839 840 if (!fileName) { 841 fileName = ''; 842 inputCont.removeClass('process'); 843 } else { 844 inputCont.addClass('process'); 845 inputCont.find('.js-input-file-del').attr('disabled', true).val('N'); 846 } 847 inputCont.data('selected', ''); 848 inputCont.find('.js-file-name').text(fileName); 849 }); 850 $(document).on('change', '.js-custom-ib-consult', function(e) { 851 var $checkbox = $(this), 852 $parents = $checkbox.parents('.js-custom-promo'); 853 if ($(this).is(':checked')) { 854 $parents.addClass('active-checkbox'); 855 } else { 856 $parents.removeClass('active-checkbox'); 857 } 858 }); 859 setTimeout(() => {$('.js-custom-ib-consult:checked').parents('.js-custom-promo').addClass('active-checkbox');}, 20); 860 861}); 862 863function reloadCaptcha(t) { 864 var $captchaImg = $(t).closest('form').find(".js-captcha-img img").eq(0), 865 $captchaSid = $(t).closest('form').find("[name=captcha_sid]").eq(0), 866 loader = new Loader($captchaImg); 867 868 $.getJSON('/ajax/reload_captcha.php', 869 function (data) { 870 $captchaSid.val(data); 871 $captchaImg 872 .attr('src', '/bitrix/tools/captcha.php?captcha_sid=' + data) 873 .one( 874 'load', 875 function () { 876 loader.stopLoader(); 877 } 878 ); 879 } 880 ); 881 return false; 882} 883 884var uniqueId = function () { 885 return '_' + Math.random().toString(36).substr(2, 9); 886}; 887 888var customField = function (type, name, label, items, value, disabled, readonly, required) { 889 this.type = type; 890 this.name = name; 891 this.label = label; 892 this.items = items; 893 this.value = value; 894 895 this.disabled = disabled; 896 this.readonly = readonly; 897 this.required = required; 898 899 this.init(); 900}; 901 902customField.prototype = { 903 makeid: function() { 904 var text = ""; 905 var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 906 907 for (var i = 0; i < 15; i++) 908 text += possible.charAt(Math.floor(Math.random() * possible.length)); 909 910 return text; 911 }, 912 init: function () { 913 var $input = ''; 914 switch (this.type) { 915 case 'text': 916 $input = $('<input/>') 917 .attr({ 918 'type': 'text' 919 }); 920 break; 921 922 case 'select': 923 $input = $('<select/>'); 924 var itemsFill = function (items, $field, val) { 925 for (var i in items) { 926 var idx = i.substring(0, 2) === 'js' ? i.substring(2) : i ; 927 $field.append( 928 $('<option></option>') 929 .attr('value', '[' + idx + '] ' + items[i])
930 .attr('selected', ('[' + idx + '] ' + items[i] === val ? 'selected' : false)) 931 .text(items[i]) 932 ); 933 } 934 }; 935 936 var val = this.value; 937 if (typeof this.items === 'string') { 938 AJAX.send( 939 this.items + '' + (this.items.indexOf('?') > -1 ? '&' : '?') + 'uid=' + this.makeid(), 940 {}, 941 function (items) { 942 itemsFill(items, $input, val); 943 }, 944 'json' 945 ); 946 } else if (typeof this.items === 'object') { 947 itemsFill(this.items, $input, val); 948 } 949 950 break; 951 } 952 953 $input.attr('id', uniqueId()); 954 $input.attr('name', this.name); 955 $input.addClass('form-control'); 956 957 if (this.disabled === 'Y') { 958 $input.attr('disabled', true).css('pointer-events', 'none').addClass('disabled'); 959 } 960 961 if (this.readonly === 'Y') { 962 $input.attr('readonly', true).css('pointer-events', 'none').addClass('disabled'); 963 } 964 965 this.$input = $input; 966 967 this.$label = $('<label></label>') 968 .attr('for', $input.attr('id')); 969 970 if (this.required === 'Y') { 971 this.$label.append($('<strong>').text(this.label)); 972 } else { 973 this.$label.text(this.label); 974 } 975 }, 976 render: function () { 977 if (request[this.name]) { 978 this.$input.val( 979 request[this.name] 980 ); 981 } 982 983 var $template = $('.js-field-template').eq(0) 984 .clone() 985 .removeClass('js-field-template') 986 .show(); 987 988 $template.find('.js-label-container').append(this.$label); 989 $template.find('.js-input-container').append(this.$input); 990 991 return $template; 992 } 993}; 994/* End */ 995; 996; /* Start:"a:4:{s:4:"full";s:78:"/design_kit/site/blocks/favorable-packages/text-tooltip.min.js?179062676113236";s:6:"source";s:58:"/design_kit/site/blocks/favorable-packages/text-tooltip.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 997if("undefined"==typeof PageBlockClampTooltip){let l={COMPONENT:".text-clamp"},d={TOOLTIP:"text-clamp-tooltip"},c={TOOLTIP_OFFSET:15,TOOLTIP_HIDE_DELAY:200,MOBILE_BREAKPOINT:768},p={DESKTOP_TRIGGER:"hover"},h={ALLOW_LINK:"data-clamp-allow-link",LINES:"data-clamp-lines",CHARS:"data-clamp-chars",TOOLTIP:"data-clamp-tooltip",TOOLTIP_MODE:"data-clamp-tooltip-mode"},T={HAS_TOOLTIP:"hasTooltip",CLAMP_OVERFLOW:"clampOverflow",CLAMP_TRUNCATED:"clampTruncated",ORIGINAL_TEXT:"originalText",TOOLTIP_SIDE:"tooltipSide"};window.PageBlockClampTooltip=class PageBlockClampTooltip{constructor(t){t.classList.contains("initialized")||(t.classList.add("initialized"),this.element=t,this.tooltip=null,this.isMobileMode=null,this.init())}init(){this.detectLayout(),this.detectScreenSize(),this.setupComponent(),this.bindEvents(),this.updateState()}detectLayout(){}detectScreenSize(){}setupComponent(){this.createTooltip(),this.applyClamp()}bindEvents(){this.bindTooltipEvents()}updateState(){}static initItems(){document.querySelectorAll(l.COMPONENT).forEach(t=>{t._pageBlockClampTooltip=new PageBlockClampTooltip(t)})}static isMobile(){var t=window.matchMedia&&(window.matchMedia("(hover: none)").matches||window.matchMedia("(any-hover: none)").matches),e=window.matchMedia&&(window.matchMedia("(pointer: coarse)").matches||window.matchMedia("(any-pointer: coarse)").matches),i=window.innerWidth<=c.MOBILE_BREAKPOINT;return t||e||i}static ensureMobileDelegation(){if(!PageBlockClampTooltip._mobileDelegationReady){PageBlockClampTooltip._mobileDelegationReady=!0,PageBlockClampTooltip._hideTimerId=null,PageBlockClampTooltip._openInstance=null;let o=()=>{var t=PageBlockClampTooltip._openInstance;t&&t.tooltip&&t.hideTooltipImmediate(),PageBlockClampTooltip._openInstance=null};document.addEventListener("click",t=>{var e=PageBlockClampTooltip.isMobile(),i=!e&&"click"===p.DESKTOP_TRIGGER;!e&&!i||!(e=PageBlockClampTooltip._openInstance)||(i=t.target)&&(t=i.closest&&i.closest(l.COMPONENT)===e.element,e=e.tooltip&&e.tooltip.contains(i),t||e)||o()},!0),document.addEventListener("click",t=>{if(PageBlockClampTooltip.isMobile()){t=t.target;let e=t&&t.closest&&t.closest(l.COMPONENT);if(e){var t=e.hasAttribute(h.LINES),i=e.hasAttribute(h.CHARS);if(t||i){t=e.getAttribute(h.ALLOW_LINK);if("true"!==t){let t=e._pageBlockClampTooltip;t||(t=new PageBlockClampTooltip(e),e._pageBlockClampTooltip=t),requestAnimationFrame(()=>{(t=>{if(t){var e=t.hasAttribute(h.LINES),i=t.hasAttribute(h.CHARS);if(e||i){var e=t.dataset&&"true"===t.dataset[T.HAS_TOOLTIP],o=t.dataset&&"true"===t.dataset[T.CLAMP_TRUNCATED],l=t.dataset&&"true"===t.dataset[T.CLAMP_OVERFLOW];if(e&&(l||o))return!0;
997if(o)return!0;if(t.clientHeight<t.scrollHeight||t.scrollWidth>t.clientWidth)return!0;if(i){e=t.dataset&&t.dataset[T.ORIGINAL_TEXT],l=t.textContent||"";if(e&&e.length>l.length)return!0;o=parseInt(t.getAttribute(h.CHARS)||"",10);if(!Number.isNaN(o)&&l.length>=o&&l.endsWith("â¦"))return!0}}}return!1})(e)&&(PageBlockClampTooltip._openInstance&&PageBlockClampTooltip._openInstance!==t&&PageBlockClampTooltip._openInstance.hideTooltipImmediate(),PageBlockClampTooltip._openInstance===t&&t.tooltip&&"block"===t.tooltip.style.display?(t.hideTooltipImmediate(),PageBlockClampTooltip._openInstance=null):(t.showTooltipMobileAuto(e),PageBlockClampTooltip._openInstance=t))})}}}}}),window.addEventListener("resize",()=>{var t=PageBlockClampTooltip.isMobile(),e=!t&&"click"===p.DESKTOP_TRIGGER;(t||e)&&((t=PageBlockClampTooltip._openInstance)&&t.hideTooltipImmediate(),PageBlockClampTooltip._openInstance=null)}),window.addEventListener("scroll",()=>{var t=PageBlockClampTooltip.isMobile(),e=!t&&"click"===p.DESKTOP_TRIGGER;(t||e)&&((t=PageBlockClampTooltip._openInstance)&&t.hideTooltipImmediate(),PageBlockClampTooltip._openInstance=null)},!0)}}showTooltipMobile(t,e){var i=this._computeTooltipText();"true"===this.element.dataset[T.HAS_TOOLTIP]&&i?(this.tooltip.textContent=i,this.tooltip.style.display="block",this.tooltip.style.opacity="1",i=c.TOOLTIP_OFFSET,this.tooltip.style.left=t+i+"px",this.tooltip.style.top=e+i+"px"):this.tooltip&&(this.tooltip.style.display="none")}showTooltipDesktopClick(o,l){PageBlockClampTooltip._hideTimerId&&(clearTimeout(PageBlockClampTooltip._hideTimerId),PageBlockClampTooltip._hideTimerId=null);var s=this._computeTooltipText();if("true"===this.element.dataset[T.HAS_TOOLTIP]&&s){this.createTooltip(),this.tooltip.textContent=s,this.tooltip.style.left="",this.tooltip.style.top="",this.tooltip.style.transform="",this.tooltip.style.display="block",this.tooltip.style.opacity="1";var s=window.innerWidth,n=window.innerHeight,a=c.TOOLTIP_OFFSET,r=this.tooltip.offsetWidth,p=this.tooltip.offsetHeight,h=l<n/2,m=s/2<o;let t;n=n-l,s=s-o,h=("top-right"===(t=h&&m?"top-right":!h&&m?"bottom-right":h||m?"top-left":"bottom-left")&&(l<p+a||s<r+a)?l<=n&&p+a<=n?t="bottom-right":s<=o&&r+a<=o?t="top-left":p+a<=n?t="bottom-right":r+a<=o&&(t="top-left"):"bottom-right"===t&&(n<p+a||s<r+a)?n<=l&&p+a<=l?t="top-right":s<=o&&r+a<=o?t="bottom-left":p+a<=l?t="top-right":r+a<=o&&(t="bottom-left"):"bottom-left"===t&&(n<p+a||o<r+a)?n<=l&&p+a<=l?t="top-left":o<=s&&r+a<=s?t="bottom-right":p+a<=l?t="top-left":r+a<=s&&(t="bottom-right"):"top-left"===t&&(l<p+a||o<r+a)&&(l<=n&&p+a<=n?t="bottom-left":o<=s&&r+a<=s?t="top-right":p+a<=n?t="bottom-left":r+a<=s&&(t="top-right")),d.TOOLTIP);this.tooltip.className=h,this.tooltip.dataset[T.TOOLTIP_SIDE]=t,this.tooltip.classList.add(h+"--"+t);let e,i;switch(t){case"top-left":e=o+a+"px",i=l-p-a+"px";break;case"bottom-left":e=o+a+"px",i=l+a+"px";break;case"bottom-right":e=o-r-a+"px",i=l+a+"px";break;case"top-right":e=o-r-a+"px",i=l-p-a+"px";break;default:e=o+a+"px",i=l+a+"px"}this.tooltip.style.left=e,this.tooltip.style.top=i}else this.tooltip&&(this.tooltip.style.opacity="0",this.tooltip.style.display="none")}showTooltipMobileAuto(t){PageBlockClampTooltip._hideTimerId&&(clearTimeout(PageBlockClampTooltip._hideTimerId),PageBlockClampTooltip._hideTimerId=null);parseInt(this.element.getAttribute(h.LINES)||"",10);var i=parseInt(this.element.getAttribute(h.CHARS)||"",10);if("false"===this.element.getAttribute(h.ALLOW_LINK))this.tooltip&&(this.tooltip.style.opacity="0",this.tooltip.style.display="none");else{var o=this.element.dataset[T.ORIGINAL_TEXT]||this.element.textContent||"",i=!Number.isNaN(i)&&o.length>i,l=this.computeOverflow(this.element),s=this._computeTooltipText();if(!!s||i||l){this.createTooltip(),this.tooltip.textContent=s||o,this.tooltip.style.display="block",this.tooltip.style.opacity="1";var i=t.getBoundingClientRect(),l=window.innerWidth,s=window.innerHeight,o=c.TOOLTIP_OFFSET,t=this.tooltip.offsetWidth,n=this.tooltip.offsetHeight,a=[{side:"top",space:i.top,needs:n+o},{side:"bottom",space:s-i.bottom,needs:n+o},{side:"left",space:i.left,needs:t+o},{side:"right",space:l-i.right,needs:t+o}].sort((t,e)=>e.space-t.space);let e=a[0].side;for(let t=0;t<a.length;t++)if(a[t].space>=a[t].needs){e=a[t].side;break}s=i.left+i.width/2,n=i.top+i.height/2,l=(this.tooltip.style.setProperty("--anchor-x",s+"px"),this.tooltip.style.setProperty("--anchor-y",n+"px"),this.tooltip.style.setProperty("--anchor-offset",o+"px"),d.TOOLTIP);this.tooltip.className=l,this.tooltip.dataset[T.TOOLTIP_SIDE]=e,this.tooltip.classList.add(l+"--"+e),this.tooltip.style.display="block",this.tooltip.style.opacity="1"}else this.tooltip&&(this.tooltip.style.opacity="0",this.tooltip.style.display="none")}}hideTooltipImmediate(){this.tooltip&&(PageBlockClampTooltip._hideTimerId&&(clearTimeout(PageBlockClampTooltip._hideTimerId),PageBlockClampTooltip._hideTimerId=null),this.tooltip.style.opacity="0",this.tooltip.style.display="none")}_computeTooltipText(){var t=parseInt(this.element.getAttribute(h.LINES)||"",10),e=parseInt(this.element.getAttribute(h.CHARS)||"",10),i=this.element.getAttribute(h.TOOLTIP)||"",o=(this.element.getAttribute(h.TOOLTIP_MODE)||"").toLowerCase(),l=this.element.dataset[T.ORIGINAL_TEXT]||this.element.textContent||"",s=this.element.textContent||"",n="true"===this.element.dataset[T.CLAMP_OVERFLOW]||"true"===this.element.dataset[T.CLAMP_TRUNCATED];if(i)return i.replace("{lines}",Number.isNaN(t)?"":String(t)).replace("{chars}",Number.isNaN(e)?"":String(e)).replace("{full}",l).replace("{current}",s).trim();if(n){if("limit"===o){if(!Number.isNaN(t))return`ÐгÑаниÑение: ${t} ÑÑÑок`;if(!Number.isNaN(e))return`ÐгÑаниÑение: ${e} Ñимволов`}return"current"===o?s:"both"===o?(Number.isNaN(t)?Number.isNaN(e)?"":`ÐгÑаниÑение: ${e} Ñимволов 998 999`:`ÐгÑаниÑение: ${t} ÑÑÑок 1000 1001`)+l:l}return""}createTooltip(){PageBlockClampTooltip._tooltipEl||(PageBlockClampTooltip._tooltipEl=document.querySelector("."+d.TOOLTIP)||document.createElement("div"),PageBlockClampTooltip._tooltipEl.className=d.TOOLTIP,PageBlockClampTooltip._tooltipEl.parentNode)||document.body.appendChild(PageBlockClampTooltip._tooltipEl),this.tooltip=PageBlockClampTooltip._tooltipEl}applyClamp(){var t,e=parseInt(this.element.getAttribute(h.LINES)||"",10),i=parseInt(this.element.getAttribute(h.CHARS)||"",10);let o="false"===this.element.getAttribute(h.ALLOW_LINK),l=!1;Number.isNaN(e)||(this.element.style.display="-webkit-box",this.element.style.webkitLineClamp=String(e),this.element.style.webkitBoxOrient="vertical",this.element.style.overflow="hidden",this.element.style.textOverflow="ellipsis",requestAnimationFrame(()=>{var t=this.computeOverflow(this.element),t=(this.element.dataset[T.CLAMP_OVERFLOW]=t?"true":"false",t||l);this.element.dataset[T.HAS_TOOLTIP]=t?"true":"false",!o&&t?this.element.style.cursor="help":o&&(this.element.style.cursor="")}
1001)),Number.isNaN(i)||(this.element.dataset[T.ORIGINAL_TEXT]||(this.element.dataset[T.ORIGINAL_TEXT]=this.element.textContent||""),(t=this.element.dataset[T.ORIGINAL_TEXT]).length>i&&(this.element.textContent=t.slice(0,Math.max(0,i)).trimEnd()+"â¦",l=!0)),Number.isNaN(e)&&Number.isNaN(i)&&(t=this.computeOverflow(this.element),this.element.dataset[T.CLAMP_OVERFLOW]=t?"true":"false"),this.element.dataset[T.CLAMP_TRUNCATED]=l?"true":this.element.dataset[T.CLAMP_OVERFLOW]||"false",Number.isNaN(e)&&(i="true"===this.element.dataset[T.CLAMP_OVERFLOW]||l,this.element.dataset[T.HAS_TOOLTIP]=i?"true":"false",!o&&i?this.element.style.cursor="help":o&&(this.element.style.cursor=""))}computeOverflow(t){return!!t&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)}bindTooltipEvents(){let o=parseInt(this.element.getAttribute(h.LINES)||"",10),l=parseInt(this.element.getAttribute(h.CHARS)||"",10),s=this.element.getAttribute(h.TOOLTIP)||"",n=(this.element.getAttribute(h.TOOLTIP_MODE)||"").toLowerCase();let e="false"===this.element.getAttribute(h.ALLOW_LINK),i=()=>{var t=this.element.dataset[T.ORIGINAL_TEXT]||this.element.textContent||"",e=this.element.textContent||"",i=(Number.isNaN(o)&&Number.isNaN(l),"true"===this.element.dataset[T.CLAMP_OVERFLOW]||"true"===this.element.dataset[T.CLAMP_TRUNCATED]);if(s)return s.replace("{lines}",Number.isNaN(o)?"":String(o)).replace("{chars}",Number.isNaN(l)?"":String(l)).replace("{full}",t).replace("{current}",e).trim();if(i){if("limit"===n){if(!Number.isNaN(o))return`ÐгÑаниÑение: ${o} ÑÑÑок`;if(!Number.isNaN(l))return`ÐгÑаниÑение: ${l} Ñимволов`}return"current"===n?e:"both"===n?(Number.isNaN(o)?Number.isNaN(l)?"":`ÐгÑаниÑение: ${l} Ñимволов 1002 1003`:`ÐгÑаниÑение: ${o} ÑÑÑок 1004 1005`)+t:t}return""};var t=()=>{PageBlockClampTooltip._hideTimerId&&(clearTimeout(PageBlockClampTooltip._hideTimerId),PageBlockClampTooltip._hideTimerId=null);var t="true"===this.element.dataset[T.HAS_TOOLTIP],e=i();t&&e?(this.tooltip.textContent=e,this.tooltip.style.display="block",this.tooltip.style.opacity="1",this.element.style.cursor="help"):(this.tooltip&&(this.tooltip.style.display="none"),this.element.style.cursor="default")},a=t=>{var e;this.tooltip&&"block"===this.tooltip.style.display&&(e=t.clientX+c.TOOLTIP_OFFSET,t=t.clientY+c.TOOLTIP_OFFSET,this.tooltip.style.left=e+"px",this.tooltip.style.top=t+"px")},r=()=>{this.tooltip&&(this.tooltip.style.opacity="0",PageBlockClampTooltip._hideTimerId&&clearTimeout(PageBlockClampTooltip._hideTimerId),PageBlockClampTooltip._hideTimerId=setTimeout(()=>{this.tooltip&&(this.tooltip.style.display="none"),PageBlockClampTooltip._hideTimerId=null},c.TOOLTIP_HIDE_DELAY))};PageBlockClampTooltip.isMobile()||"hover"!==p.DESKTOP_TRIGGER||(this.element.addEventListener("mouseenter",t),this.element.addEventListener("mousemove",a),this.element.addEventListener("mouseleave",r)),PageBlockClampTooltip.isMobile()||"click"!==p.DESKTOP_TRIGGER||this.element.addEventListener("click",t=>{"true"!==this.element.dataset[T.HAS_TOOLTIP]||e||(t.stopPropagation(),this.tooltip&&"block"===this.tooltip.style.display?(this.hideTooltipImmediate(),PageBlockClampTooltip._openInstance=null):(PageBlockClampTooltip._openInstance&&PageBlockClampTooltip._openInstance!==this&&PageBlockClampTooltip._openInstance.hideTooltipImmediate(),this.showTooltipDesktopClick(t.clientX,t.clientY),PageBlockClampTooltip._openInstance=this))})}},window.addEventListener("load",()=>{PageBlockClampTooltip.initItems(),PageBlockClampTooltip.ensureMobileDelegation()})}PageBlockClampTooltip.initItems(); 1006/* End */ 1007;; /* /local/modules/mango.pages/static_files/js/mango-pages-onclick-helper.js?1790626630575*/ 1008; /* /local/modules/mango.pages/static_files/js/all-buttons-click-handler.js?17906266291778*/ 1009; /* /bitrix/components/mango_pages/page/templates/.default/script.js?17906266292547*/ 1010; /* /local/components/mango/shop.numbers/templates/vue/script.js?1790626629114*/ 1011; /* /local/components/mango/shop.breadcrumbs/templates/.default/script.js?1790626629245*/ 1012; /* /local/components/mango/buy.step.motivations/templates/popover/script.js?1790626629788*/ 1013; /* /local/templates/mango_ru/js/custom/captcha/bitrix_captcha_reloader.js?17906266302010*/ 1014; /* /local/templates/mango_ru/js/custom/captcha/bitrix_captcha.js?17906266305020*/ 1015; /* /local/templates/mango_ru/js/custom/captcha/bitrix_captcha_register_form.js?17906266302967*/ 1016; /* /local/templates/mango_ru/js/custom/captcha/captcha.js?17906266306464*/ 1017; /* /local/modules/mango.constructor/components/constructor/form.result.new/templates/vertical/form_script.js?17906266297907*/ 1018; /* /design_kit/site/blocks/favorable-packages/text-tooltip.min.js?179062676113236*/
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.