7001);7002}70037004var str =7005'' +7006'<span class="t706__cartwin-discounts__description-wrapper">' +7007'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 100 100" version="1.1"><defs><path d="M50,100 C22.3857625,100 0,77.6142375 0,50 C0,22.3857625 22.3857625,0 50,0 C77.6142375,0 100,22.3857625 100,50 C100,77.6142375 77.6142375,100 50,100 Z M58.315357,47.8754138 C64.89496,45.1601848 68.6565657,39.5064417 68.6565657,32.4846866 C68.6565657,22.841424 60.0015458,15.1818182 49.4949495,15.1818182 C41.3938959,15.1818182 34.1961467,19.7654779 31.4653335,26.6083919 L37.0379757,28.8322756 C38.8326304,24.3352021 43.7844087,21.1818182 49.4949495,21.1818182 C56.8399815,21.1818182 62.6565657,26.3294369 62.6565657,32.4846866 C62.6565657,37.0829994 60.3544491,40.5431111 56.0265483,42.3291218 L58.315357,47.8754138 Z M46.4949495,65.9659424 L52.4949495,65.9659424 C52.4949495,65.8347613 52.4965643,57.1867246 52.499763,57.0584416 C52.6251391,52.0302323 55.1839146,49.2186694 58.315357,47.8754138 L56.0265483,42.3291218 C50.3793252,44.7515403 46.6063369,49.847676 46.4973739,57.1228386 C46.4957596,57.2306251 46.4949495,65.8572009 46.4949495,65.9659424 Z M45.4949495,73.7777778 L45.4949495,83.2929293 L53.4949495,83.2929293 L53.4949495,73.7777778 L45.4949495,73.7777778 Z" id="path-1"/></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Artboard-Copy-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"/></mask><use id="Combined-Shape" fill="#000000" xlink:href="#path-1"/></g></g></svg>' +
'<ul class="t706__cartwin-discounts__description' + (discountRulesArr.length > 1 ? '' : ' t706__cartwin-discounts__description_single') + '">'; discountRulesArr.forEach(function (rule) { str += '<li>' + rule + '</li>'; }); str += '</ul></span>'; return { html: str, loyaltyOnly: hasLoyaltyDiscount && !hasCatalogDiscount, };}/** * Обновляет превью цены при наведении на иконку-виджет корзины * Для пошаговой корзины на первом шаге не указывается скидка, поэтому сумма меняться не должна * * @returns {void} */function tcart__updateCartIconDiscountAmount() { if (window.tcart_fullscreen) return; var cartIconTextEl = document.querySelector('.t706__carticon-text'); // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (!cartIconTextEl || typeof window.tcart.prodamount_withdyndiscount === 'undefined') return; // @ts-expect-error ST-2949_1 cartIconTextEl.innerHTML = '= ' + tcart__showPrice(window.tcart.prodamount_withdyndiscount, 'acceptzero');}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function tcart__calcPromocode(amount) { // если прокода нет, возвращаем тот же amount и удаляем старые поля промокода (если они есть) // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (typeof window.tcart.promocode !== 'object') { // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) // @ts-expect-error ST-2949_2 delete window.tcart['prodamount_discountsum']; // @ts-expect-error ST-2949_2 delete window.tcart['prodamount_withdiscount']; return amount; } // если промокод вроде и был, но нет правил на которые опираться, возвращаем тот же amount // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (!(window.tcart.promocode.discountsum > 0) && !(window.tcart.promocode.discountpercent > 0)) { console.error('Cart Some error.'); return amount; } var prodamount_discountsum = 0; var prodamount_withdiscount = 0; var lastSingleId = false; // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 var prodAmount = window.tcart.prodamount; if ( window.t_cart__discounts && window.t_cart__discounts.length > 0 && // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 typeof window.tcart.prodamount_withdyndiscount !== 'undefined' ) { // @ts-expect-error ST-2949_1 prodAmount = window.tcart.prodamount_withdyndiscount; } // @ts-expect-error ST-2949_1 window.tcart.products.forEach(function (product) { if (product.deleted === 'yes') return; if (Object.keys(product).length === 0) return; var newPriceWithPromocode = ''; var productPrice = product.price; var productAmount = product.amount; var hasPortion = false; var portion = parseInt(product.portion, 10); if ( window.t_cart__discounts && window.t_cart__discounts.length > 0 && typeof product.amount_withdiscount !== 'undefined' ) { productPrice = product.price_withdiscount;