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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

Первый снимок

56c3b8455c6bbcf463b4ee3184a742754eef7e8305.12.2026, 07:01:09 МСК

Файлы в снимке 361

  • tilda-carousel-1.0.min.cssДобавлен
    Открыть файл
НазадДальше
tilda-cart-1.0.cssИзменён
Открыть файлСравнить версии
Построчное сравнение
@@ -411,4 +411,50 @@
411411 }412412  413+/*414+ * Строка «старая цена + скидка» занимает ширину по содержимому, но не больше 240px:415+ * обычно помещается в одну строку, а при длинной цене/валюте/скидке бейдж целиком уходит под цену.416+ */417
  • tilda-cart-1.0.jsДобавлен
    Открыть файл
  • tilda-cart-1.0.min.cssИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -285,4 +285,37 @@
    285285 display:block;286286 padding-bottom:0}287+.t706__product-amount-old{288+-ms-flex-align:center;289+-webkit-align-items:center;290+align-items:center;291+
  • tilda-cart-1.0.min.jsДобавлен
    Открыть файл
  • tilda-cart-1.1.jsИзменён
    Открыть файлСравнить версии
    Фрагмент изменений
    @@ -39,4 +39,10 @@
    3939 import { t_cart__maskEmail } from '../src/tilda-cart/shared/maskEmail/index.ts';4040 import {41+	t_cart__cleanPrice,42+	t_cart__roundPrice,43+	t_cart__formatWeight,44+	t_cart__formatPrice,45
  • tilda-cart-1.1.min.jsИзменён
    Открыть файлСравнить версии
    Фрагмент изменений
    @@ -26,14 +26,14 @@
    2626 function p(t){2727 if(!_(t))throw new TypeError("Attempted to access private element on non-instance")}28-var y=[].concat(e[0]),w=e[3],g=!s,b=1===n,S=3===n,A=4===n,T=2===n;29-function E(e,r,o){28+var y=[].concat(e[0]),w=e[3],g=!s,b=1===n,S=3===n,A=4===n,P=2===n;29+function T(e,r,o){30
  • tilda-catalog-1.1.cssДобавлен
    Открыть файл
  • tilda-catalog-1.1.jsИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -4,4 +4,9 @@
    44  55 import { t_cart__useRootZone } from '../src/tilda-cart/shared/rootZone/index.ts';6+import {7+	t_catalog__addVideoIconForGallery,8+	t_catalog__getVideoElement,9+	t_catalog__svgVideoIcon,10
  • tilda-catalog-1.1.min.cssДобавлен
    Открыть файл
  • tilda-catalog-1.1.min.jsИзменён
    Открыть файлСравнить версии
    Фрагмент изменений
    @@ -29,11 +29,11 @@
    2929 function x(e,r,o){3030 return function(n,i){31-return r&&(i=n,n=t),o&&o(n),C[e].call(n,i)}31+return r&&(i=n,n=t),o&&o(n),A[e].call(n,i)}3232 }3333 if(!b){34-
  • tilda-catalog-1.2.cssИзменён
    Открыть файлСравнить версии

    В каталоге мобильный режим «в одну строку» теперь определяется только для контейнера с классом js-catalog-grid-cont, так что вложенные сетки больше не задевают отступы, фильтры и стрелки прокрутки. Для страницы товара добавлено, что body растягивается минимум на высоту экрана, а #allrecords занимает свободное место, и на узких экранах у вкладок товара (t-catalog__tabs) появились боковые отступы по 20px.

    Построчное сравнение
    @@ -99,15 +99,15 @@
    9999  100100 @media screen and (max-width: 960px) {101-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont,102-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont_indent {101+	.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont,
  • tilda-catalog-1.2.jsИзменён
    Открыть файлСравнить версии

    В каталог добавлена инициализация шаблона страницы товара: новая функция t_catalog_productTemplateInit запускает сниппет товара по данным из script.js-catalog-product-init-data, а попап товара теперь строится через модуль product-template и только при его отказе откатывается на прежний HTML. Кроме того, блок похожих товаров (relevants) может выводиться в произвольный контейнер через relevantsOpts.container, а relevantsOpts передаётся дальше в t_catalog_process.

    Фрагмент изменений
    @@ -83,4 +83,7 @@
    8383 	t_catalog_editCache__respond,8484 } from '../src/tilda-catalog/shared/edit-cache/index.ts';85+import { t_catalog_productTemplate__initPopup, t_catalog_productTemplate__initPopupShell } from '../src/tilda-catalog/product-template/popup.ts';86+import { t_catalog_productTemplate__initSnippet } from '../src/tilda-catalog/product-template/snippet.ts';87
  • tilda-catalog-1.2.min.cssИзменён
    Открыть файлСравнить версии

    Для страниц товара каталога (класс `t-catalog-product-template-page`) body стал flex-колонкой с минимальной высотой 100vh, а `#allrecords` растягивается, так что контент занимает всё свободное место. Вкладки товара `t-catalog__tabs` в сниппете получили боковые отступы по 20px, а мобильные правила для сетки в одну строку (`mobile-one-row`) теперь срабатывают только на контейнере с классом `js-catalog-grid-cont`.

    Построчное сравнение
    @@ -166,19 +166,19 @@
    166166 padding:0 20px}167167 @media screen and (max-width:960px){168-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont,.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont_indent{168+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont,.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont_indent{169
  • tilda-catalog-1.2.min.jsИзменён
    Открыть файлСравнить версии

    Diff показывает только переименование локальных переменных (x↔A, P↔T↔k) в минифицированном коде декораторов и хлебных крошек, логика не изменилась. Но список новых имён (t_catalog_productTemplateInit, js-catalog-product-template, data-st-product-repeat, нулевой остаток t-catalog__prod__quantity_zero и др.) говорит о том, что в бандл добавлена система шаблонов карточки товара каталога: сборка данных, галерея, вкладки, навигация, попап и сниппет, связанные связкой связанных товаров и условными блоками, а также оформление иконки для нулевого остатка.

    Фрагмент изменений
    @@ -27,13 +27,13 @@
    2727 if(!_(t))throw new TypeError("Attempted to access private element on non-instance")}2828 var f=[].concat(e[0]),m=e[3],b=!c,w=1===a,S=3===a,E=4===a,C=2===a;29-function x(e,r,o){29+function A(e,r,o){3030 
  • tilda-catalog-filters-1.0.cssДобавлен
    Открыть файл
  • tilda-catalog-filters-1.0.min.cssДобавлен
    Открыть файл
  • tilda-cms-1.0.cssДобавлен
    Открыть файл
  • tilda-cms-1.0.jsДобавлен
    Открыть файл
  • tilda-cms-1.0.min.cssИзменён
    Открыть файлСравнить версии

    Для подписи слайда в карточках CMS (t-slds__caption) убран жирный шрифт — теперь текст выводится обычным начертанием (font-weight:400).

    Построчное сравнение
    @@ -1039,4 +1039,5 @@
    10391039 padding-left:0}10401040 .t-cms__page__caption-container .t-slds__caption{1041+font-weight:400;10411042 overflow:hidden;10421043 position:static;
  • tilda-cms-1.0.min.jsИзменён
    Открыть файлСравнить версии

    Только переименованы локальные переменные и функции в минифицированном бандле (например, `o` и `i` поменялись местами). Логика форматирования дат, подстановки значений в текст и атрибуты, а также построения превью-ссылок на thb.tildacdn не изменилась — похоже на побочный эффект пересборки.

    Фрагмент изменений
    @@ -1,29 +1,29 @@
    11 !function(){2-function e(o,i,a,s,l){3-if(!o)return"";4-var u=new Date(o),c;2+function e(i,o,a,s,l){3
  • tilda-conditional-form-1.0.jsИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -1275,4 +1275,7 @@
    12751275  * @typedef {Object} ConditionalStepFormConfig12761276  * @property {string} recId1277+ * @property {Element=} formContainer - контейнер формы, если форма лежит не в #rec{recId} (например, в Zero Block)1278+ * @property {boolean=} listenFields - следить ли за изменением полей, по умолчанию true.1279+ * Без слушателей условия рассчитываются один раз при инициализации (холст редактора Zero Block)12771280  * @property {NodeListOf<Element>} steps
  • tilda-conditional-form-1.0.min.jsИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -478,29 +478,31 @@
    478478 }479479 function t_form__conditionals__initStepForm(t){480-var n=t.ignoredSteps||[],e=t.ignoredInputGroups||[],o=t.recId,i=t.onConditionalFieldChange,r=Array.prototype.slice.call(t.steps),a=t.activeStepIndex,c=r[a],u,l,_,d,s=t_form__conditionals_initFields(o,e);481-function f(){480+var n=t.ignoredSteps||[],e=t.ignoredInputGroups||[],o=t.recId,i=t.onConditionalFieldChange,r=Array.prototype.slice.call(t.steps),a=t.activeStepIndex,c=r[a],u,l,_,d,s=t.formContainer||o,f=null;481
  • tilda-contact-method-1.0.cssИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -51,4 +51,9 @@
    5151 }5252  53+/* Поля скрыты, пока загружается маска телефона. Место под поля сохраняется, чтобы форма не меняла высоту */54+.t-contact-method__loading {55+	visibility: hidden;56+}57
  • tilda-contact-method-1.0.jsИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -14,5 +14,5 @@
    1414  1515 function t_contactMethod__init(recId, lid) {16-	const rec = document.querySelector(`#rec${recId}`);16+	const rec = t_contactMethod__getRec(recId);1717 	if (!rec) return;1818  
    @@ -32,15 +32,12 @@
  • tilda-contact-method-1.0.min.cssИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -45,4 +45,6 @@
    4545 .t-contact-method__hidden{4646 display:none!important}47+.t-contact-method__loading{48+visibility:hidden}4749 .t-form__inputsbox_inrow .t-contact-method__value-container .t-input-block.t-input-block{4850 width:100%}
  • tilda-contact-method-1.0.min.jsИзменён
    Открыть файлСравнить версии
    Построчное сравнение
    @@ -1,4 +1,4 @@
    11 function t_contactMethod__init(t,e){2-var o=document.querySelector("#rec"+t);2+var o=t_contactMethod__getRec(t);33 if(o){44 var n=o.querySelector('[data-input-lid="'+e+'"][data-field-type="contact_method"]');
    @@ -8,17 +8,13 @@
    88 
  • tilda-cover-1.0.cssДобавлен
    Открыть файл
  • tilda-cover-1.0.jsДобавлен
    Открыть файл
  • tilda-cover-1.0.min.cssДобавлен
    Открыть файл
  • +
    .t706__product-amount-old {
    418+ display: flex;
    419+ align-items: center;
    420+ flex-wrap: wrap;
    421+ column-gap: 5px;
    422+ row-gap: 0;
    423+ width: max-content;
    424+ max-width: 240px;
    425+ margin-top: 2px;
    426+ font-size: 12px;
    427+ line-height: 1.35;
    428+ font-weight: 300;
    429+}
    430+
    431+.t706__product-amount-old-price {
    432+ opacity: 0.5;
    433+ text-decoration: line-through;
    434+ text-decoration-thickness: from-font;
    435+}
    436+
    437+/* inline-block не наследует зачёркивание родителя, поэтому цену и валюту делаем строчными */
    438+.t706__product-amount-old-price .t706__cartwin-prodamount-price,
    439+.t706__product-amount-old-price .t706__cartwin-prodamount-currency {
    440+ display: inline;
    441+}
    442+
    443+/* отступ padding'ом не зачёркивается — заменяем его неразрывным пробелом, чтобы линия была сплошной */
    444+.t706__product-amount-old-price .t706__cartwin-prodamount-currency + .t706__cartwin-prodamount-price::before,
    445+.t706__product-amount-old-price .t706__cartwin-prodamount-price + .t706__cartwin-prodamount-currency::before {
    446+ content: '\00a0';
    447+ padding-left: 0;
    448+}
    449+
    450+.t706__product-amount-old-price,
    451+.t706__product-amount-badge {
    452+ white-space: nowrap;
    453+}
    454+
    455+.t706__product-amount-badge {
    456+ opacity: 0.8;
    457+}
    458+
    413459 .t706__product-del {
    414460 cursor: pointer;
    @@ -511,4 +557,15 @@
    511557 }512558  559+/* ST-3277: отступ перед бейджем — у текста, чтобы перенесённый на новую строку бейдж вставал по левому краю */560+.t706_promocode-details561+	.t706__cartwin-totalamount-wrap_flextotals562+	.t706__cartwin-totalamount-info_label-text:not(:last-child) {563+	margin-right: 5px;564+}565+ 566+.t706_promocode-details .t706__cartwin-totalamount-wrap_flextotals .t706__cartwin-totalamount-badge {567+	margin-left: 0;568+}569+ 513570 .t706__cartwin-totalamount-wrap_flextotals .t706__cartwin-totalamount-info_value {514571 	display: block;
    @@ -549,4 +606,22 @@
    549606 }550607  608+/* ST-3277: подпись с кодом промокода переносится как текст, бейджи не переносятся */609+.t706_promocode-details .t706__cartwin-totalamount-badge {610+	white-space: nowrap;611+}612+ 613+.t706_promocode-details .t706__cartwin-totalamount-hint {614+	display: inline-block;615+	width: 100%;616+}617+ 618+/* Отступ после подписи задаёт margin-right у .t706__cartwin-totalamount-hint-label */619+.t706_promocode-details .t706__cartwin-totalamount-hint_loyalty {620+	display: flex;621+	align-items: center;622+	flex-wrap: wrap;623+	gap: 0;624+}625+ 551626 .t706__cartwin-totalamount-hint-level {552627 	display: flex;
    @@ -567,4 +642,9 @@
    567642 }568643  644+.t706_promocode-details .t706__cartwin-totalamount-hint-label {645+	margin-right: 5px;646+	white-space: nowrap;647+}648+ 569649 .t706__cartwin-totalamount-hint-name {570650 	color: #000;
    @@ -731,4 +811,10 @@
    731811 	}732812  813+	/* ST-3277: кнопки количества по центру блока цены, когда под ценой есть старая цена со скидкой */814+	.t706_promocode-details .t706__product-plusminus,815+	.t706_promocode-details .t706__product-amount {816+		vertical-align: middle;817+	}818+ 733819 	.t706__product-del {734820 		position: absolute;
    @@ -1208,5 +1294,7 @@
    12081294 	background-color: #ececec;12091295 	margin-bottom: 20px;1210-	flex: 1;1296+	/* Отдельная строка в .t-form__inputsbox_flex, иначе плашка встаёт в ряд с объединёнными полями */1297+	flex: 0 0 100%;1298+	box-sizing: border-box;12111299 }12121300  
    -webkit-column-gap:5px;
    292+column-gap:5px;
    293+display:-webkit-flex;
    294+display:-ms-flexbox;
    295+display:flex;
    296+-webkit-flex-wrap:wrap;
    297+-ms-flex-wrap:wrap;
    298+flex-wrap:wrap;
    299+font-size:12px;
    300+font-weight:300;
    301+line-height:1.35;
    302+margin-top:2px;
    303+max-width:240px;
    304+row-gap:0;
    305+width:-webkit-max-content;
    306+width:max-content}
    307+.t706__product-amount-old-price{
    308+opacity:.5;
    309+text-decoration:line-through;
    310+text-decoration-thickness:from-font}
    311+.t706__product-amount-old-price .t706__cartwin-prodamount-currency,.t706__product-amount-old-price .t706__cartwin-prodamount-price{
    312+display:inline}
    313+.t706__product-amount-old-price .t706__cartwin-prodamount-currency+.t706__cartwin-prodamount-price:before,.t706__product-amount-old-price .t706__cartwin-prodamount-price+.t706__cartwin-prodamount-currency:before{
    314+content:"\00a0";
    315+padding-left:0}
    316+.t706__product-amount-badge,.t706__product-amount-old-price{
    317+white-space:nowrap}
    318+.t706__product-amount-badge{
    319+opacity:.8}
    287320 .t706__product-del{
    288321 cursor:pointer;
    @@ -360,4 +393,10 @@
    360393 .t706__cartwin-totalamount-wrap_flextotals .t706__cartwin-totalamount-info_label-text{361394 vertical-align:middle}395+.t706_promocode-details396+.t706__cartwin-totalamount-wrap_flextotals397+.t706__cartwin-totalamount-info_label-text:not(:last-child){398+margin-right:5px}399+.t706_promocode-details .t706__cartwin-totalamount-wrap_flextotals .t706__cartwin-totalamount-badge{400+margin-left:0}362401 .t706__cartwin-totalamount-wrap_flextotals .t706__cartwin-totalamount-info_value{363402 display:block;
    @@ -370,8 +409,5 @@
    370409 white-space:nowrap}371410 .t706__cartwin-totalamount-badge{372--ms-flex-align:center;373411 -ms-flex-pack:center;374--webkit-align-items:center;375-align-items:center;376412 background:#cd7f32;377413 border-radius:30px;
    @@ -384,9 +420,16 @@
    384420 -webkit-justify-content:center;385421 justify-content:center;386-line-height:1.35;387422 margin-left:5px;388423 padding:2px 8px;389424 vertical-align:middle}425+.t706__cartwin-totalamount-badge,.t706__cartwin-totalamount-hint{426+-ms-flex-align:center;427+-webkit-align-items:center;428+align-items:center;429+line-height:1.35}390430 .t706__cartwin-totalamount-hint{431+display:-webkit-flex;432+display:-ms-flexbox;433+display:flex;391434 -webkit-flex-wrap:wrap;392435 -ms-flex-wrap:wrap;
    @@ -395,10 +438,19 @@
    395438 font-weight:400;396439 gap:5px;397-line-height:1.35;398440 max-width:100%;399441 min-width:0;400442 overflow-wrap:break-word;401443 overflow-wrap:anywhere}402-.t706__cartwin-totalamount-hint,.t706__cartwin-totalamount-hint-level{444+.t706_promocode-details .t706__cartwin-totalamount-badge{445+white-space:nowrap}446+.t706_promocode-details .t706__cartwin-totalamount-hint{447+display:inline-block;448+width:100%}449+.t706_promocode-details .t706__cartwin-totalamount-hint_loyalty{450+-webkit-flex-wrap:wrap;451+-ms-flex-wrap:wrap;452+flex-wrap:wrap;453+gap:0}454+.t706__cartwin-totalamount-hint-level,.t706_promocode-details .t706__cartwin-totalamount-hint_loyalty{403455 -ms-flex-align:center;404456 -webkit-align-items:center;
    @@ -415,4 +467,7 @@
    415467 color:#000;416468 opacity:.5}469+.t706_promocode-details .t706__cartwin-totalamount-hint-label{470+margin-right:5px;471+white-space:nowrap}417472 .t706__cartwin-totalamount-hint-name{418473 color:#000;
    @@ -521,4 +576,6 @@
    521576 vertical-align:bottom;522577 width:auto}578+.t706_promocode-details .t706__product-amount,.t706_promocode-details .t706__product-plusminus{579+vertical-align:middle}523580 .t706__product-del{524581 padding:0;
    @@ -875,7 +932,8 @@
    875932 .t706__auth{876933 background-color:#ececec;877--webkit-flex:1;878--ms-flex:1;879-flex:1;934+box-sizing:border-box;935+-webkit-flex:0 0 100%;936+-ms-flex:0 0 100%;937+flex:0 0 100%;880938 font-size:16px;881939 margin-bottom:20px;
    +
    } from '../src/tilda-cart/domain/format/index.ts';
    46+import {
    4147 t_cart__getAuthExternalIconHtml,
    4248 t_cart__getAuthLogoutIconHtml,
    @@ -46,4 +52,7 @@
    4652  4753 const TCART_LOYALTY_DEFAULT_LEVEL_COLOR = '#F3C89D';54+const TCART_PROMOCODE_BADGE_COLOR = '#EBEBEB';55+// Сколько ждем мемберсы, прежде чем показать форму корзины без авторизации56+const TCART_MEMBERS_WAIT_TIMEOUT = 10 * 1000;4857  4958 window.t_cart__isiOS = false;
    @@ -76,5 +85,28 @@
    7685 const tcart_dict = (msg) => translate(msg);7786 window.tcart_dict = tcart_dict;87+ 7888 /**89+ * Возвращает блоки корзины (ST100) на странице без удалённых.90+ * В редакторе в режиме просмотра удалённых блоков (viewtrash=yes) они есть в DOM91+ * с атрибутом data-record-trash="y" и не должны учитываться92+ *93+ * @returns {HTMLElement[]}94+ */95+function tcart__getCartBlocks() {96+	return Array.from(/** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('.t706'))).filter(97+		cart => !cart.closest('[data-record-trash="y"]')98+	);99+}100+ 101+/**102+ * Возвращает первый блок корзины (ST100) на странице без учёта удалённых103+ *104+ * @returns {HTMLElement | null}105+ */106+function tcart__getCartBlock() {107+	return tcart__getCartBlocks()[0] || null;108+}109+ 110+/**79111  * Инит корзины80112  *
    @@ -87,14 +119,17 @@
    87119 	}88120  89-	const cartBlock = document.querySelector('.t706');121+	const cartBlock = tcart__getCartBlock();90122 	if (!cartBlock) return;91123  124+	// ST-3277: скидка и код промокода в итоге и в ценах товаров — пока только для team-пользователей125+	const isPromocodeDetails = isTeamUser();92126 	document.querySelectorAll('.t706').forEach(cart => {93127 		cart.classList.add('t706_flextotals');128+		if (isPromocodeDetails) cart.classList.add('t706_promocode-details');94129 	});95130  96131 	const { ymapApiKey = cartBlock.getAttribute('data-yandexmap-apikey') || '', cssClassName } = options;97132  98-	const cartBlocksLength = document.querySelectorAll('.t706').length;133+	const cartBlocksLength = tcart__getCartBlocks().length;99134 	const rec = document.querySelector('#rec' + recid);100135  
    @@ -108,4 +143,7 @@
    108143 	tcart__form__hideFormFields();109144 	tcart__hideBottomTotalAmount();145+	// Поля снова покажет tcart__initAuthAndDelivery, поэтому сбрасываем флаг: иначе при повторной инициализации146+	// (перерисовка блока в редакторе после сохранения, смена ширины у полноэкранной корзины) поля останутся скрытыми147+	window.tcart_isAuthInited = false;110148  111149 	window.t_cart__browserLang = t_cart__getCartLang();
    @@ -565,5 +603,5 @@
    565603  **/566604 function tcart__updateMinimals() {567-	var cartBlock = document.querySelector('.t706');605+	var cartBlock = tcart__getCartBlock();568606  569607 	// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
    @@ -655,5 +693,5 @@
    655693  **/656694 function tcart__loadLocalObj() {657-	const cartBlock = document.querySelector('.t706');695+	const cartBlock = tcart__getCartBlock();658696  659697 	window.tcart = t_cart__loadCartData();
    @@ -990,4 +1028,7 @@
    9901028 		var cartBtnLink = cartBtn.getAttribute('href');9911029 		var price = '0';1030+		/** Цена числом после tcart__cleanPrice. Пока её нет, цена товара — строка price */1031+		/** @type {number | undefined} */1032+		var cleanedPrice;9921033 		var name = '';9931034 		var img = '';
    30
    return function(n,a){
    31-return r&&(a=n,n=t),o&&o(n),L[e].call(n,a)}
    31+return r&&(a=n,n=t),o&&o(n),E[e].call(n,a)}
    3232 }
    3333 if(!g){
    34-var L={
    34+var E={
    3535 }
    36-,P=[],D=S?"get":A||b?"set":"value";
    37-if(d?(l||b?L={
    36+,L=[],D=S?"get":A||b?"set":"value";
    37+if(d?(l||b?E={
    3838 get:_setFunctionName((function(){
    3939 return w(this)}
    @@ -41,6 +41,6 @@
    4141 e[4](this,t)}4242 }43-:L[D]=w,l||_setFunctionName(L[D],o,T?"":D)):l||(L=Object.getOwnPropertyDescriptor(t,o)),!l&&!d){44-if((c=m[+u][o])&&7!=(c^n))throw Error("Decorating two elements with the same name ("+L[D].name+") is not supported yet");43+:E[D]=w,l||_setFunctionName(E[D],o,P?"":D)):l||(E=Object.getOwnPropertyDescriptor(t,o)),!l&&!d){44+if((c=m[+u][o])&&7!=(c^n))throw Error("Decorating two elements with the same name ("+E[D].name+") is not supported yet");4545 m[+u][o]=n<3?1:n}4646 }
    @@ -48,30 +48,30 @@
    4848 C>=0;4949 C-=r?2:1){50-var j=h(y[C],"A decorator","be",!0),k=r?y[C-1]:void 0,q={50+var k=h(y[C],"A decorator","be",!0),M=r?y[C-1]:void 0,j={5151 }52-,M={52+,R={5353 kind:["field","accessor","method","getter","setter","class"][n],name:o,metadata:i,addInitializer:function(t,e){5454 if(t.v)throw new TypeError("attempted to call addInitializer after decoration was finished");5555 h(e,"An initializer","be",!0),a.push(e)}56-.bind(null,q)}56+.bind(null,j)}5757 ;58-if(g)c=j.call(k,O,M),q.v=1,h(c,"class decorators","return")&&(O=c);59-else if(M.static=u,M.private=d,c=M.access={58+if(g)c=k.call(M,O,R),j.v=1,h(c,"class decorators","return")&&(O=c);59+else if(R.static=u,R.private=d,c=R.access={6060 has:d?_.bind():function(t){6161 return o in t}6262 }63-,A||(c.get=d?T?function(t){64-return p(t),L.value}65-:E("get",0,p):function(t){63+,A||(c.get=d?P?function(t){64+return p(t),E.value}65+:T("get",0,p):function(t){6666 return t[o]}67-),T||S||(c.set=d?E("set",0,p):function(t,e){67+),P||S||(c.set=d?T("set",0,p):function(t,e){6868 t[o]=e}69-),O=j.call(k,b?{70-get:L.get,set:L.set}71-:L[D],M),q.v=1,b){72-if("object"==typeof O&&O)(c=h(O.get,"accessor.get"))&&(L.get=c),(c=h(O.set,"accessor.set"))&&(L.set=c),(c=h(O.init,"accessor.init"))&&P.unshift(c);69+),O=k.call(M,b?{70+get:E.get,set:E.set}71+:E[D],R),j.v=1,b){72+if("object"==typeof O&&O)(c=h(O.get,"accessor.get"))&&(E.get=c),(c=h(O.set,"accessor.set"))&&(E.set=c),(c=h(O.init,"accessor.init"))&&L.unshift(c);7373 else if(void 0!==O)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}74-else h(O,(l?"field":"method")+" decorators","return")&&(l?P.unshift(O):L[D]=O)}75-return n<2&&s.push(v(P,u,1),v(a,u,0)),l||g||(d?b?s.splice(-1,0,E("get",u),E("set",u)):s.push(T?L[D]:h.call.bind(L[D])):f(t,o,L)),O}74+else h(O,(l?"field":"method")+" decorators","return")&&(l?L.unshift(O):E[D]=O)}75+return n<2&&s.push(v(L,u,1),v(a,u,0)),l||g||(d?b?s.splice(-1,0,T("get",u),T("set",u)):s.push(P?E[D]:h.call.bind(E[D])):f(t,o,E)),O}7676 function b(t){7777 return f(t,p,{
    @@ -1710,7 +1710,7 @@
    17101710 }17111711 else{1712-var T=p;1712+var P=p;17131713 p=function(t,e){1714-return T.call(t,e)}1714+return P.call(t,e)}17151715 }17161716 t.push(p)}
    @@ -1804,8 +1804,8 @@
    18041804 }18051805 :g[S]=v,_||_setFunctionName(g[S],o,2===n?"":S)):_||(g=Object.getOwnPropertyDescriptor(t,o))}1806-for(var A=t,T=w.length-1;1807-T>=0;1808-T-=r?2:1){1809-var E=w[T],L=r?w[T-1]:void 0,P={1806+for(var A=t,P=w.length-1;1807+P>=0;1808+P-=r?2:1){1809+var T=w[P],E=r?w[P-1]:void 0,L={18101810 }18111811 ,D={
    @@ -1813,8 +1813,8 @@
    18131813 if(t.v)throw Error("attempted to call addInitializer after decoration was finished");18141814 s(e,"An initializer","be",!0),c.push(e)}1815-.bind(null,P)}1815+.bind(null,L)}18161816 ;18171817 try{1818-if(h)(m=s(E.call(L,A,D),"class decorators","return"))&&(A=m);1818+if(h)(m=s(T.call(E,A,D),"class decorators","return"))&&(A=m);18191819 else{18201820 var O,C;
    @@ -1826,10 +1826,10 @@
    18261826 t[o]=e}18271827 ));1828-var j=D.access={1828+var k=D.access={18291829 has:l?f.bind():function(t){18301830 return o in t}18311831 }18321832 ;1833-if(O&&(j.get=O),C&&(j.set=C),A=E.call(L,p?{1833+if(O&&(k.get=O),C&&(k.set=C),A=T.call(E,p?{18341834 get:g.get,set:g.set}18351835 :g[S],D),p){
    @@ -1839,5 +1839,5 @@
    18391839 }18401840 finally{1841-P.v=!0}1841+L.v=!0}18421842 }18431843 return(_||p)&&u.push((function(t,e){
    +
    } from '../src/tilda-catalog/gallery-video/index.ts';
    611
    712 // global variables declaration
    @@ -6177,4 +6182,7 @@
    61776182 }61786183  6184+// Обёртки t_store__getVideoElement, t_store_addVideoIconForGallery и t_store_svgVideoIcon6185+// сохраняют глобальные функции для tilda-catalog-slds-1.0 и старых шаблонов.6186+ 61796187 /**61806188  * @typedef {Object} VideoParams
    @@ -6188,163 +6196,18 @@
    61886196 /**61896197  * Возвращает элемент видео (iframe или video) на основе переданных параметров.6190- * @param {'youtube' | 'youtube.com' | 'vimeo' | 'vimeo.com' | 'kinescope' | 'rutube' | 'vk' } videoType - Тип видео6198+ * @param {'youtube' | 'youtube.com' | 'vimeo' | 'vimeo.com' | 'kinescope' | 'rutube' | 'vk' | 'mp4' | 'webm' } videoType - Тип видео61916199  * @param {VideoParams} params - Параметры видео.6192- * @returns {HTMLIFrameElement | undefined} - Возвращает элемент iframe или video в зависимости от типа видео.6200+ * @returns {HTMLIFrameElement | HTMLVideoElement | null} - Возвращает элемент iframe или video в зависимости от типа видео.61936201  */61946202 function t_store__getVideoElement(videoType, params) {6195-	if (!videoType) return null;6196- 6197-	const { videoId: id, videoHash: hash, videoTime: time, vkOID, videoParams } = params;6198- 6199-	const filteredType = videoType.replace(/\.com/, '');6200- 6201-	const videoTypeConfig = {6202-		youtube: {6203-			baseUrl: `https://www.youtube.com/embed/${id}`,6204-			params: [6205-				'rel=0',6206-				'fmt=18',6207-				'html5=1',6208-				'showinfo=0',6209-				'autoplay=1',6210-				'muted=1',6211-				'enable',6212-				time && `start=${time}`,6213-			],6214-		},6215-		vimeo: {6216-			baseUrl: `https://player.vimeo.com/video/${id}`,6217-			params: [6218-				'title=0',6219-				'byline=0',6220-				'portrait=0',6221-				'badge=0',6222-				'color=ffffff',6223-				'autoplay=1',6224-				'muted=1',6225-				hash && `h=${hash}`,6226-			],6227-			hashtag: time ? `#t=${time}` : '',6228-		},6229-		kinescope: {6230-			baseUrl: `https://kinescope.io/embed/${id}`,6231-			params: ['autoplay=1', 'muted=1', time && `t=${time}`],6232-		},6233-		rutube: {6234-			baseUrl: `https://rutube.ru/embed/${id}`,6235-			params: ['autoplay=1', 'muted=1', time && `t=${time}`, hash && `p=${hash}`],6236-		},6237-		vk: {6238-			baseUrl: 'https://vkvideo.ru/video_ext.php',6239-			params: [6240-				'js_api=1',6241-				'hd=2',6242-				'autoplay=1',6243-				'muted=1',6244-				`id=${id}`,6245-				`oid=${vkOID}`,6246-				hash && `hash=${hash}`,6247-				time && `t=${time}`,6248-			],6249-		},6250-	};6251-	const config = videoTypeConfig[filteredType];6252-	if (!config) return null;6253- 6254-	const { baseUrl, params: hashQueryArr, hashtag = '' } = config;6255-	if (videoParams) {6256-		hashQueryArr.push(videoParams);6257-	}6258-	const hashQueryStr = hashQueryArr.filter(param => param).join('&');6259-	const src = `${baseUrl}?${hashQueryStr}${hashtag}`;6260- 6261-	return createIframe(src);6262- 6263-	/**6264-	 * Создает и возвращает элемент iframe6265-	 * @param {string} src - URL для iframe.6266-	 * @param {Record<string, string>} [attrs] - Дополнительные атрибуты для iframe.6267-	 * @returns {HTMLIFrameElement} - Возвращает элемент iframe.6268-	 */6269-	function createIframe(src, attrs) {6270-		const iframe = document.createElement('iframe');6271-		iframe.src = src;6272-		iframe.classList.add('t-slds__frame');6273-		iframe.width = '100%';6274-		iframe.height = '100%';6275-		iframe.frameBorder = '0';6276-		iframe.allowFullscreen = true;6277-		// Поддержка разными браузерами6278-		iframe.setAttribute('mozallowfullscreen', 'true');6279-		iframe.setAttribute('msallowfullscreen', 'true');6280-		iframe.setAttribute('oallowfullscreen', 'true');6281-		iframe.setAttribute('webkitallowfullscreen', 'true');6282-		iframe.scrolling = 'no';6283-		iframe.allow =6284-			'clipboard-write; autoplay; fullscreen; picture-in-picture; encrypted-media; gyroscope; accelerometer;';6285- 6286-		// Применение всех атрибутов из объекта attrs6287-		for (let key in attrs) {6288-			if (attrs.hasOwnProperty(key)) {6289-				iframe.setAttribute(key, attrs[key]);6290-			}6291-		}6292-		return iframe;6293-	}6203+	return t_catalog__getVideoElement(videoType, params);62946204 }62956205  6296-// get the video's play button62976206 function t_store_addVideoIconForGallery(options, element) {6298-	let str = '';6299-	const video = element.video;6300-	if (video) {6301-		const { videoid = '', vtype = '', vhash = '', vtime = '' } = element;6302-		const vkOID = element.void || ''; // vk oid6303- 6304-		// TODO Video Для чего это?6305-		var params = '';6306-		if (element.vtype === 'youtube.com') {6307-			if (video.indexOf('?v=' + element.videoid) !== -1) {6308-				params = video.split('?v=' + element.videoid)[1];6309-				params = params.replace(/&amp;/g, '&');6310-				if (params.indexOf('loop=1') !== -1 && params.indexOf('&playlist=') === -1) {6311-					params += '&playlist=' + element.videoid;6312-				}6313-			}6314-		}6315- 6316-		str += `6317-            <div class="t-slds__videowrapper">6318-                <div class="t-slds__play_icon"6319-                    data-slider-video-url="${videoid}"6320-                    data-slider-video-type="${vtype}"6321-                    data-slider-video-hash="${vhash}"6322-                    data-slider-video-oid="${vkOID}"6323-                    data-slider-video-time="${vtime}"6324-                    data-slider-video-params="${params}"6325-                    >6326-                    ${t_store_svgVideoIcon(options)}6327-                </div>6328-                <div class="t-slds__frame-wrapper"></div>6329-            </div>`;6330-	}6331-	return str;6207+	return t_catalog__addVideoIconForGallery(options, element);63326208 }63336209  63346210 function t_store_svgVideoIcon(options) {6335-	var str = '';6336-	var iconColor = options.slider_opts.videoPlayerIconColor || '#fff';6337- 6338-	str +=6339-		'<svg xmlns="http://www.w3.org/2000/svg" width="70px" height="70px" viewBox="0 0 60 60" style="width:100%;height:100%;">';6340-	str += '<g stroke="none" stroke-width="1" fill="" fill-rule="evenodd">';6341-	str += '<g transform="translate(-691.000000, -3514.000000)" fill="' + iconColor + '">';6342-	str +=6343-		'<path d="M721,3574 C737.568542,3574 751,3560.56854 751,3544 C751,3527.43146 737.568542,3514 721,3514 C704.431458,3514 691,3527.43146 691,3544 C691,3560.56854 704.431458,3574 721,3574 Z M715,3534 L732,3544.5 L715,3555 L715,3534 Z"></path>';6344-	str += '</g>';6345-	str += '</g>';6346-	str += '</svg>';6347- 6348-	return str;6211+	return t_catalog__svgVideoIcon(options);63496212 }63506213  
    @@ -7051,4 +6914,7 @@
    70516914  70526915 	var optsValsBeforeChangedArr = [];6916+	var hasAvailableEdition = product.editions.some(function (edition) {6917+		return parseInt(edition.quantity, 10) !== 0;6918+	});70536919  70546920 	if (product.editionOptions.length > 0) {
    @@ -7103,9 +6969,16 @@
    71036969 					el_optionTag.setAttribute('disabled', 'disabled');71046970 					// опция была выбрана ранее, а теперь отключена7105-					if (el_optionTag.selected) {6971+					// Выбор не сбрасывается, если переключаться не на что или проверка вызвана из обработчика change,6972+					// иначе обработчик и проверка бесконечно вызывают друг друга6973+					if (el_optionTag.selected && hasAvailableEdition && !el_product.isEditionVerifying) {71066974 						el_optionTag.selected = false;71076975 						var optionParent = el_optionTag.closest('.js-product-edition-option-variants');71086976 						if (optionParent) {7109-							t_store_triggerEvent(optionParent, 'change');6977+							el_product.isEditionVerifying = true;6978+							try {6979+								t_store_triggerEvent(optionParent, 'change');6980+							} finally {6981+								el_product.isEditionVerifying = false;6982+							}71106983 						}71116984 					}
    var C={
    34+var A={
    3535 }
    36-,A=[],j=S?"get":E||w?"set":"value";
    37-if(d?(p||w?C={
    36+,C=[],j=S?"get":E||w?"set":"value";
    37+if(d?(p||w?A={
    3838 get:_setFunctionName((function(){
    3939 return g(this)}
    @@ -41,6 +41,6 @@
    4141 e[4](this,t)}4242 }43-:C[j]=g,p||_setFunctionName(C[j],o,P?"":j)):p||(C=Object.getOwnPropertyDescriptor(t,o)),!p&&!d){44-if((a=v[+l][o])&&7!=(a^n))throw Error("Decorating two elements with the same name ("+C[j].name+") is not supported yet");43+:A[j]=g,p||_setFunctionName(A[j],o,P?"":j)):p||(A=Object.getOwnPropertyDescriptor(t,o)),!p&&!d){44+if((a=v[+l][o])&&7!=(a^n))throw Error("Decorating two elements with the same name ("+A[j].name+") is not supported yet");4545 v[+l][o]=n<3?1:n}4646 }
    @@ -62,5 +62,5 @@
    6262 }6363 ,E||(a.get=d?P?function(t){64-return _(t),C.value}64+return _(t),A.value}6565 :x("get",0,_):function(t){6666 return t[o]}
    @@ -68,10 +68,10 @@
    6868 t[o]=e}6969 ),O=L.call(T,w?{70-get:C.get,set:C.set}71-:C[j],I),q.v=1,w){72-if("object"==typeof O&&O)(a=h(O.get,"accessor.get"))&&(C.get=a),(a=h(O.set,"accessor.set"))&&(C.set=a),(a=h(O.init,"accessor.init"))&&A.unshift(a);70+get:A.get,set:A.set}71+:A[j],I),q.v=1,w){72+if("object"==typeof O&&O)(a=h(O.get,"accessor.get"))&&(A.get=a),(a=h(O.set,"accessor.set"))&&(A.set=a),(a=h(O.init,"accessor.init"))&&C.unshift(a);7373 else if(void 0!==O)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}74-else h(O,(p?"field":"method")+" decorators","return")&&(p?A.unshift(O):C[j]=O)}75-return n<2&&c.push(m(A,l,1),m(i,l,0)),p||b||(d?w?c.splice(-1,0,x("get",l),x("set",l)):c.push(P?C[j]:h.call.bind(C[j])):f(t,o,C)),O}74+else h(O,(p?"field":"method")+" decorators","return")&&(p?C.unshift(O):A[j]=O)}75+return n<2&&c.push(m(C,l,1),m(i,l,0)),p||b||(d?w?c.splice(-1,0,x("get",l),x("set",l)):c.push(P?A[j]:h.call.bind(A[j])):f(t,o,A)),O}7676 function w(t){7777 return f(t,_,{
    @@ -1807,5 +1807,5 @@
    18071807 P>=0;18081808 P-=r?2:1){1809-var x=g[P],C=r?g[P-1]:void 0,A={1809+var x=g[P],A=r?g[P-1]:void 0,C={18101810 }18111811 ,j={
    @@ -1813,8 +1813,8 @@
    18131813 if(t.v)throw Error("attempted to call addInitializer after decoration was finished");18141814 c(e,"An initializer","be",!0),a.push(e)}1815-.bind(null,A)}1815+.bind(null,C)}18161816 ;18171817 try{1818-if(h)(v=c(x.call(C,E,j),"class decorators","return"))&&(E=v);1818+if(h)(v=c(x.call(A,E,j),"class decorators","return"))&&(E=v);18191819 else{18201820 var O,k;
    @@ -1831,5 +1831,5 @@
    18311831 }18321832 ;1833-if(O&&(L.get=O),k&&(L.set=k),E=x.call(C,_?{1833+if(O&&(L.get=O),k&&(L.set=k),E=x.call(A,_?{18341834 get:b.get,set:b.set}18351835 :b[S],j),_){
    @@ -1839,5 +1839,5 @@
    18391839 }18401840 finally{1841-A.v=!0}1841+C.v=!0}18421842 }18431843 return(u||_)&&l.push((function(t,e){
    102+ .t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__grid-cont_indent {
    103103 padding: 0;
    104104 }
    105105
    106- .t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper,
    107- .t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container {
    106+ .t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper,
    107+ .t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container {
    108108 box-sizing: border-box;
    109109 }
    110110
    111- .t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper,
    111+ .t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper,
    112112 .t-catalog-parts-above__container:not(
    113113 :has(.t-catalog__parts-above-single, .t-catalog__parts-above-single--mobile)
    @@ -116,10 +116,10 @@
    116116 	}117117  118-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single, .t-catalog__parts-above-single--mobile)118+	.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single, .t-catalog__parts-above-single--mobile)119119 		.t-catalog__parts-above-scroll-arrow--right {120120 		margin-right: 20px;121121 	}122122  123-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single, .t-catalog__parts-above-single--mobile)123+	.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single, .t-catalog__parts-above-single--mobile)124124 		.t-catalog__parts-above-scroll-arrow--left {125125 		margin-left: 20px;
    @@ -127,9 +127,9 @@
    127127  128128 	.t-catalog__grid-cont_mobile-one-row .t-catalog__stretch-col:first-child,129-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__parts-above-single .t-catalog__parts-above-item:first-child {129+	.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__parts-above-single .t-catalog__parts-above-item:first-child {130130 		margin-left: 20px;131131 	}132132  133-	.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-container {133+	.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-container {134134 		max-width: unset;135135 	}
    @@ -2874,4 +2874,14 @@
    28742874 /* snippet */28752875  2876+body.t-catalog-product-template-page {2877+	min-height: 100vh;2878+	display: flex;2879+	flex-direction: column;2880+}2881+ 2882+body.t-catalog-product-template-page #allrecords {2883+	flex: 1 0 auto;2884+}2885+ 28762886 .t-catalog__prod-snippet__container {28772887 	padding-top: 120px;
    @@ -2902,4 +2912,9 @@
    29022912 	}29032913  2914+	.t-catalog .t-catalog__product-snippet .t-catalog__tabs.t-col[data-st-product-if='tabs'] {2915+		padding-left: 20px;2916+		padding-right: 20px;2917+	}2918+ 29042919 	.t-catalog__product-snippet .t-catalog__prod-popup__col-right,29052920 	.t-catalog__product-snippet .t-catalog__prod-popup__col-left {
    +
    import { t_catalog_productTemplate__updateEditionCharacteristics } from '../src/tilda-catalog/product-template/hydrate.ts';
    8588
    8689 // Expose for t_onFuncLoad from block templates (ST340 tile slider)
    @@ -94,5 +97,4 @@
    9497 // global variables declaration9598 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)96-// @ts-expect-error ST-2949_19799 window.tCatalogIsSearchBot = /Bot/i.test(navigator.userAgent);98100 // @ts-expect-error ST-2949_1
    @@ -141,4 +143,18 @@
    141143  142144 /**145+ * Инициализирует сниппет товара из общего шаблона на странице товара.146+ * Вызывается init-скриптом template с настройками блока из Smarty (tpl_catalog_setup_options.tpl);147+ * данные товара берутся из `script.js-catalog-product-init-data` в блоке.148+ *149+ * @param {string} recid150+ * @param {CatalogOptions} options151+ */152+function t_catalog_productTemplateInit(recid, options) {153+	t_onReady(function () {154+		t_catalog_productTemplate__initSnippet(recid, options);155+	});156+}157+ 158+/**143159  * Инициализация блоков с списком карточек товаров144160  *
    @@ -250,7 +266,9 @@
    250266 	// @ts-expect-error ST-2949_3251267 	var el_store = rec.querySelector('.js-catalog');252-	var prodPopup = t_catalog_get_productPopup_html(recid, options);253-	if (el_store) {254-		el_store.insertAdjacentHTML('beforeend', prodPopup);268+	if (rec && !t_catalog_productTemplate__initPopupShell(rec, options)) {269+		var prodPopup = t_catalog_get_productPopup_html(recid, options);270+		if (el_store) {271+			el_store.insertAdjacentHTML('beforeend', prodPopup);272+		}255273 	}256274  
    @@ -1365,4 +1383,5 @@
    13651383  * @param {number} slice - the number of the slice to load13661384  * @param {object} relevantsOpts1385+ * @param {HTMLElement} [relevantsOpts.container]13671386  **/13681387 function t_catalog_loadProducts(method, recid, options, slice, relevantsOpts) {
    @@ -1384,5 +1403,5 @@
    13841403 	if (!rec) return;13851404 	var gridContainer = showRelevants1386-		? rec.querySelector('.js-catalog-relevants-grid-cont')1405+		? (relevantsOpts && relevantsOpts.container) || rec.querySelector('.js-catalog-relevants-grid-cont')13871406 		: rec.querySelector('.js-catalog-grid-cont');13881407  
    @@ -1403,5 +1422,6 @@
    14031422 			sort: relevantsOpts.relevantsSort,14041423 		};1405-		gridContainer = rec.querySelector('.t-catalog__relevants-grid-cont');1424+		gridContainer =1425+			(relevantsOpts && relevantsOpts.container) || rec.querySelector('.t-catalog__relevants-grid-cont');14061426 		if (gridContainer) {14071427 			// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
    @@ -1667,5 +1687,5 @@
    16671687 		// TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)16681688 		// @ts-expect-error ST-2949_51669-		t_catalog_process(productsArr, recid, options, !!slice, showRelevants, obj);1689+		t_catalog_process(productsArr, recid, options, !!slice, showRelevants, obj, relevantsOpts);16701690  16711691 		// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
    169
    padding:0}
    170-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container,.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper{
    170+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container,.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper{
    171171 box-sizing:border-box}
    172-.t-catalog-parts-above__container:not(:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)),.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper{
    172+.t-catalog-parts-above__container:not(:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)),.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__filter-wrapper{
    173173 padding:0 20px}
    174-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)
    174+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)
    175175 .t-catalog__parts-above-scroll-arrow--right{
    176176 margin-right:20px}
    177-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)
    177+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog-parts-above__container:has(.t-catalog__parts-above-single,.t-catalog__parts-above-single--mobile)
    178178 .t-catalog__parts-above-scroll-arrow--left{
    179179 margin-left:20px}
    180-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-catalog__parts-above-single .t-catalog__parts-above-item:first-child,.t-catalog__grid-cont_mobile-one-row .t-catalog__stretch-col:first-child{
    180+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-catalog__parts-above-single .t-catalog__parts-above-item:first-child,.t-catalog__grid-cont_mobile-one-row .t-catalog__stretch-col:first-child{
    181181 margin-left:20px}
    182-.t-catalog:has(.t-catalog__grid-cont_mobile-one-row) .t-container{
    182+.t-catalog:has(:where(.js-catalog-grid-cont).t-catalog__grid-cont_mobile-one-row) .t-container{
    183183 max-width:unset}
    184184 }
    @@ -2010,4 +2010,16 @@
    20102010 right:10px}20112011 }2012+body.t-catalog-product-template-page{2013+display:-webkit-flex;2014+display:-ms-flexbox;2015+display:flex;2016+-webkit-flex-direction:column;2017+-ms-flex-direction:column;2018+flex-direction:column;2019+min-height:100vh}2020+body.t-catalog-product-template-page #allrecords{2021+-webkit-flex:1 0 auto;2022+-ms-flex:1 0 auto;2023+flex:1 0 auto}20122024 .t-catalog__prod-snippet__container{20132025 padding-bottom:120px;
    @@ -2028,5 +2040,5 @@
    20282040 .t-catalog__product-snippet .t-container{20292041 max-width:640px}2030-.t-catalog__product-snippet .t-catalog__prod-popup__col-left,.t-catalog__product-snippet .t-catalog__prod-popup__col-right{2042+.t-catalog .t-catalog__product-snippet .t-catalog__tabs.t-col[data-st-product-if=tabs],.t-catalog__product-snippet .t-catalog__prod-popup__col-left,.t-catalog__product-snippet .t-catalog__prod-popup__col-right{20312043 padding-left:20px;20322044 padding-right:20px}
    return function(a,n){
    31-return r&&(n=a,a=t),o&&o(a),A[e].call(a,n)}
    31+return r&&(n=a,a=t),o&&o(a),x[e].call(a,n)}
    3232 }
    3333 if(!b){
    34-var A={
    34+var x={
    3535 }
    36-,P=[],k=S?"get":E||w?"set":"value";
    37-if(d?(u||w?A={
    36+,T=[],P=S?"get":E||w?"set":"value";
    37+if(d?(u||w?x={
    3838 get:_setFunctionName((function(){
    3939 return m(this)}
    @@ -41,9 +41,9 @@
    4141 e[4](this,t)}4242 }43-:A[k]=m,u||_setFunctionName(A[k],o,C?"":k)):u||(A=Object.getOwnPropertyDescriptor(t,o)),!u&&!d){44-if((l=v[+s][o])&&7!=(l^a))throw Error("Decorating two elements with the same name ("+A[k].name+") is not supported yet");43+:x[P]=m,u||_setFunctionName(x[P],o,C?"":P)):u||(x=Object.getOwnPropertyDescriptor(t,o)),!u&&!d){44+if((l=v[+s][o])&&7!=(l^a))throw Error("Decorating two elements with the same name ("+x[P].name+") is not supported yet");4545 v[+s][o]=a<3?1:a}4646 }47-for(var T=t,L=f.length-1;47+for(var k=t,L=f.length-1;4848 L>=0;4949 L-=r?2:1){
    @@ -56,5 +56,5 @@
    5656 .bind(null,I)}5757 ;58-if(b)l=O.call(j,T,R),I.v=1,h(l,"class decorators","return")&&(T=l);58+if(b)l=O.call(j,k,R),I.v=1,h(l,"class decorators","return")&&(k=l);5959 else if(R.static=s,R.private=d,l=R.access={6060 has:d?_.bind():function(t){
    @@ -62,16 +62,16 @@
    6262 }6363 ,E||(l.get=d?C?function(t){64-return p(t),A.value}65-:x("get",0,p):function(t){64+return p(t),x.value}65+:A("get",0,p):function(t){6666 return t[o]}67-),C||S||(l.set=d?x("set",0,p):function(t,e){67+),C||S||(l.set=d?A("set",0,p):function(t,e){6868 t[o]=e}69-),T=O.call(j,w?{70-get:A.get,set:A.set}71-:A[k],R),I.v=1,w){72-if("object"==typeof T&&T)(l=h(T.get,"accessor.get"))&&(A.get=l),(l=h(T.set,"accessor.set"))&&(A.set=l),(l=h(T.init,"accessor.init"))&&P.unshift(l);73-else if(void 0!==T)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}74-else h(T,(u?"field":"method")+" decorators","return")&&(u?P.unshift(T):A[k]=T)}75-return a<2&&c.push(y(P,s,1),y(n,s,0)),u||b||(d?w?c.splice(-1,0,x("get",s),x("set",s)):c.push(C?A[k]:h.call.bind(A[k])):g(t,o,A)),T}69+),k=O.call(j,w?{70+get:x.get,set:x.set}71+:x[P],R),I.v=1,w){72+if("object"==typeof k&&k)(l=h(k.get,"accessor.get"))&&(x.get=l),(l=h(k.set,"accessor.set"))&&(x.set=l),(l=h(k.init,"accessor.init"))&&T.unshift(l);73+else if(void 0!==k)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}74+else h(k,(u?"field":"method")+" decorators","return")&&(u?T.unshift(k):x[P]=k)}75+return a<2&&c.push(y(T,s,1),y(n,s,0)),u||b||(d?w?c.splice(-1,0,A("get",s),A("set",s)):c.push(C?x[P]:h.call.bind(x[P])):g(t,o,x)),k}7676 function w(t){7777 return g(t,p,{
    @@ -1807,31 +1807,31 @@
    18071807 C>=0;18081808 C-=r?2:1){1809-var x=m[C],A=r?m[C-1]:void 0,P={1809+var A=m[C],x=r?m[C-1]:void 0,T={18101810 }1811-,k={1811+,P={18121812 kind:["field","accessor","method","getter","setter","class"][a],name:o,metadata:n,addInitializer:function(t,e){18131813 if(t.v)throw Error("attempted to call addInitializer after decoration was finished");18141814 c(e,"An initializer","be",!0),l.push(e)}1815-.bind(null,P)}1815+.bind(null,T)}18161816 ;18171817 try{1818-if(h)(v=c(x.call(A,E,k),"class decorators","return"))&&(E=v);1818+if(h)(v=c(A.call(x,E,P),"class decorators","return"))&&(E=v);18191819 else{1820-var T,L;1821-k.static=d,k.private=u,u?2===a?T=function(t){1820+var k,L;1821+P.static=d,P.private=u,u?2===a?k=function(t){18221822 return f(t),b.value}1823-:(a<4&&(T=i(b,"get",f)),3!==a&&(L=i(b,"set",f))):(T=function(t){1823+:(a<4&&(k=i(b,"get",f)),3!==a&&(L=i(b,"set",f))):(k=function(t){18241824 return t[o]}18251825 ,(a<2||4===a)&&(L=function(t,e){18261826 t[o]=e}18271827 ));1828-var O=k.access={1828+var O=P.access={18291829 has:u?g.bind():function(t){18301830 return o in t}18311831 }18321832 ;1833-if(T&&(O.get=T),L&&(O.set=L),E=x.call(A,p?{1833+if(k&&(O.get=k),L&&(O.set=L),E=A.call(x,p?{18341834 get:b.get,set:b.set}1835-:b[S],k),p){1835+:b[S],P),p){18361836 if("object"==typeof E&&E)(v=c(E.get,"accessor.get"))&&(b.get=v),(v=c(E.set,"accessor.set"))&&(b.set=v),(v=c(E.init,"accessor.init"))&&w.push(v);18371837 else if(void 0!==E)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}
    @@ -1839,5 +1839,5 @@
    18391839 }18401840 finally{1841-P.v=!0}1841+T.v=!0}18421842 }18431843 return(_||p)&&s.push((function(t,e){
    @@ -2799,8 +2799,8 @@
    27992799 var g=_.querySelector(".t-catalog__breadcrumbs");28002800 if(g){2801-var f,v=e.closest(".t-catalog__prod-snippet__container")||document.getElementById("rec"+t)||document,m=v.querySelector(".t-catalog__prod-popup__close-txt-wr .js-catalog-close-text[href]"),y=v.querySelector(".t-popup__close[href]"),h=getCatalogBaseHref(m,y),b=g.querySelectorAll('[data-breadcrumb-role="category"]'),w=b.length?b[b.length-1]:null,S,E,C,x;2801+var f,v=e.closest(".t-catalog__prod-snippet__container")||document.getElementById("rec"+t)||document,m=v.querySelector(".t-catalog__prod-popup__close-txt-wr .js-catalog-close-text[href]"),y=v.querySelector(".t-popup__close[href]"),h=getCatalogBaseHref(m,y),b=g.querySelectorAll('[data-breadcrumb-role="category"]'),w=b.length?b[b.length-1]:null,S,E,C,A;28022802 if(w){2803-var A=w.getAttribute("data-breadcrumb-alias"),P=w.getAttribute("data-breadcrumb-uid"),k=h.includes("?")?"&":"?",T=A||P&&""+h+k+"tfc_storepartnav%5B"+t+"%5D="+P+"&tfc_div=:::"||h;2804-setNewUrl(m,T),setNewUrl(y,T)}2803+var x=w.getAttribute("data-breadcrumb-alias"),T=w.getAttribute("data-breadcrumb-uid"),P=h.includes("?")?"&":"?",k=x||T&&""+h+P+"tfc_storepartnav%5B"+t+"%5D="+T+"&tfc_div=:::"||h;2804+setNewUrl(m,k),setNewUrl(y,k)}28052805 g.querySelectorAll('[data-breadcrumb-action="home"]').forEach((function(t){28062806 t.addEventListener("click",(function(t){
    @@ -3129,6 +3129,6 @@
    31293129 var C=p.scrollWidth<=_;31303130 if(E.remove(),b&&(b.style.display="",b.classList.remove("t-catalog__breadcrumbs-divider_hidden")),f(y),C&&y.length>0)return g(y),b&&(b.style.display="none",b.classList.add("t-catalog__breadcrumbs-divider_hidden")),void createOverflowElement(t,p,y,null,e,d)}3131-var x=u[0];3132-x&&v(x),g(u),createOverflowElement(t,p,u,null,e,d)}3131+var A=u[0];3132+A&&v(A),g(u),createOverflowElement(t,p,u,null,e,d)}31333133 }31343134 }
    +
    if(!i)return"";
    4+var u=new Date(i),c;
    55 if(isNaN(u.getTime()))return"";
    6-if(!i&&!a)return e(o,"dd.MM.yyyy",a,s,l);
    7-if("relative"===i)return n(u,s);
    8-var d=t(u,i,s,l),p=r(u,a,s,l);
    9-return i?a?d+" "+p:d:p}
    6+if(!o&&!a)return e(i,"dd.MM.yyyy",a,s,l);
    7+if("relative"===o)return n(u,s);
    8+var d=t(u,o,s,l),p=r(u,a,s,l);
    9+return o?a?d+" "+p:d:p}
    1010 function t(e,t,r,n){
    1111 return t?"auto"===t?new Intl.DateTimeFormat(r,{
    1212 dateStyle:"long",timeZone:n}
    13-).format(e):i(e,t,r,n):""}
    13+).format(e):o(e,t,r,n):""}
    1414 function r(e,t,r,n){
    1515 return t?"auto"===t?new Intl.DateTimeFormat(r,{
    1616 timeStyle:"short",timeZone:n}
    17-).format(e):i(e,t,r,n):""}
    17+).format(e):o(e,t,r,n):""}
    1818 function n(e,t){
    1919 var r=new Intl.RelativeTimeFormat(t,{
    2020 numeric:"auto"}
    21-),n=Math.round((e.getTime()-Date.now())/1e3),o=Math.abs(n);
    22-if(o<60)return r.format(n,"second");
    23-if(o<3600)return r.format(Math.round(n/60),"minute");
    24-if(o<86400)return r.format(Math.round(n/3600),"hour");
    25-var i=Math.round(n/86400),a=Math.abs(i);
    26-return a<7?r.format(i,"day"):a<30?r.format(Math.round(i/7),"week"):a<365?r.format(Math.round(i/30),"month"):r.format(Math.round(i/365),"year")}
    27-function o(e){
    21+),n=Math.round((e.getTime()-Date.now())/1e3),i=Math.abs(n);
    22+if(i<60)return r.format(n,"second");
    23+if(i<3600)return r.format(Math.round(n/60),"minute");
    24+if(i<86400)return r.format(Math.round(n/3600),"hour");
    25+var o=Math.round(n/86400),a=Math.abs(o);
    26+return a<7?r.format(o,"day"):a<30?r.format(Math.round(o/7),"week"):a<365?r.format(Math.round(o/30),"month"):r.format(Math.round(o/365),"year")}
    27+function i(e){
    2828 for(var t=[],r=0;
    2929 r<e.length;
    @@ -31,10 +31,10 @@
    3131 var n=e[r];3232 if("'"!==n)if(n>="a"&&n<="z"||n>="A"&&n<="Z"){33-for(var o=r+1;34-o<e.length&&e[o]===n;35-)o++;33+for(var i=r+1;34+i<e.length&&e[i]===n;35+)i++;3636 t.push({37-literal:!1,value:e.slice(r,o)}38-),r=o}37+literal:!1,value:e.slice(r,i)}38+),r=i}3939 else t.push({4040 literal:!0,value:n}
    @@ -46,21 +46,21 @@
    4646 ),r+=2;4747 continue}48-for(var i=r+1,a="";49-i<e.length;50-)if("'"===e[i]){51-if("'"!==e[i+1])break;52-a+="'",i+=2}53-else a+=e[i],i++;48+for(var o=r+1,a="";49+o<e.length;50+)if("'"===e[o]){51+if("'"!==e[o+1])break;52+a+="'",o+=2}53+else a+=e[o],o++;5454 t.push({5555 literal:!0,value:a}56-),r=i<e.length?i+1:i}56+),r=o<e.length?o+1:o}5757 }5858 return t}59-function i(e,t,r,n){60-return o(t).map((function(t){59+function o(e,t,r,n){60+return i(t).map((function(t){6161 return t.literal?t.value:a(e,t.value,r,n)}6262 )).join("")}6363 function a(e,t,r,n){64-var o,i,a={64+var i,o,a={6565 timeZone:n}6666 ,s,l;
    @@ -131,7 +131,7 @@
    131131 break;132132 default:return t}133-return null!=(o=null==(i=new Intl.DateTimeFormat(r,a).formatToParts(e).find((function(e){133+return null!=(i=null==(o=new Intl.DateTimeFormat(r,a).formatToParts(e).find((function(e){134134 return e.type===s}135-)))?void 0:i.value)?o:""}135+)))?void 0:o.value)?i:""}136136 var s=["href","target","src","data-original","style","content","aria-label","aria-controls","itemscope","itemtype","id","data-img-zoom-url","data-slide-bullet-for","data-slide-index","data-slide-caption","data-videolazy-type","data-videolazy-id","data-blocklazy-id","data-videolazy-hash"];137137 function l(){
    @@ -162,14 +162,14 @@
    162162 if("source"in e)return n(e.source)}163163 return""}164-var o,i=e.split("@").splice(1),a=i[0];164+var i,o=e.split("@").splice(1),a=o[0];165165 if(a in r){166166 var s=n(t),l=r[a](s);167-return f(i.join("@"),l)}167+return f(o.join("@"),l)}168168 if(a){169-if("string"==typeof t)return f(i.join("@"),t);169+if("string"==typeof t)return f(o.join("@"),t);170170 if(Array.isArray(t))return f(e,t[0]);171171 if(t&&a in t){172172 var u=t[a];173-return f(i.join("@"),u)}173+return f(o.join("@"),u)}174174 return""}175175 return n(t)}
    @@ -206,15 +206,15 @@
    206206 ))}207207 function v(e,t,r){208-for(var n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=[],i=n.nextNode();209-i;210-)o.push(i),i=n.nextNode();211-o.forEach((function(e){212-var n,o;208+for(var n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=[],o=n.nextNode();209+o;210+)i.push(o),o=n.nextNode();211+i.forEach((function(e){212+var n,i;213213 if(e.nodeValue&&t.test(e.nodeValue)){214214 t.lastIndex=0;215-for(var i=e.nodeValue,a=document.createDocumentFragment(),s=0,l=Boolean(null==(n=e.parentElement)?void 0:n.closest("code")),u=new RegExp(t.source,t.flags.includes("g")?t.flags:t.flags+"g"),c;216-null!==(c=u.exec(i));215+for(var o=e.nodeValue,a=document.createDocumentFragment(),s=0,l=Boolean(null==(n=e.parentElement)?void 0:n.closest("code")),u=new RegExp(t.source,t.flags.includes("g")?t.flags:t.flags+"g"),c;216+null!==(c=u.exec(o));217217 ){218-c.index>s&&a.appendChild(document.createTextNode(i.substring(s,c.index)));218+c.index>s&&a.appendChild(document.createTextNode(o.substring(s,c.index)));219219 var d=r(c[1]);220220 if(l)a.appendChild(document.createTextNode(d));
    @@ -223,15 +223,15 @@
    223223 p.innerHTML=d,a.appendChild(p.content)}224224 s=u.lastIndex}225-s<i.length&&a.appendChild(document.createTextNode(i.substring(s))),null==(o=e.parentNode)||o.replaceChild(a,e)}225+s<o.length&&a.appendChild(document.createTextNode(o.substring(s))),null==(i=e.parentNode)||i.replaceChild(a,e)}226226 }227227 ));228228 var a=function e(n){229229 n instanceof Element&&s.forEach((function(e){230-var o=n.getAttribute(e);231-if(o){232-var i=o.replace(t,(function(e,t){230+var i=n.getAttribute(e);231+if(i){232+var o=i.replace(t,(function(e,t){233233 return r(t)}234234 ));235-i!==o&&n.setAttribute(e,i)}235+o!==i&&n.setAttribute(e,o)}236236 }237237 ))}
    @@ -264,13 +264,13 @@
    264264 )(?:\/(?:-\/((?:[^\/]+\/)+))?)?([^\/]*)/i,n=e.match(t);265265 if(null==n||!n[1]||null==n||!n[2])return e;266-var o=n[1],i=n[2],a=e.indexOf("lib/"),s;266+var i=n[1],o=n[2],a=e.indexOf("lib/"),s;267267 if(-1!==a){268268 var u=e.indexOf("/",a+4);269--1!==u&&(o=e.substring(a,u+1)+o)}270-if("-"===i){269+-1!==u&&(i=e.substring(a,u+1)+i)}270+if("-"===o){271271 var c=e.match(r);272272 if(null==c||!c[3])return e;273-i=c[3]}274-return"https://thb.tildacdn."+l()+"/"+o+"/-/resizeb/20x/"+i}273+o=c[3]}274+return"https://thb.tildacdn."+l()+"/"+i+"/-/resizeb/20x/"+o}275275 function g(e){276276 var t=new Map([["=","_"],["/","."],["+","-"]]),r,n=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{
    12781281 * @property {number} activeStepIndex
    @@ -1309,5 +1312,14 @@
    13091312 	var nextStepIndex;13101313 	var prevStepIndex;1311-	var conditionalFields = t_form__conditionals_initFields(recId, ignoredInputs);1314+	var formContainer = config.formContainer || recId;1315+	var conditionalFields = null;1316+	if (config.listenFields === false) {1317+		t_form__conditionals_syncFields(formContainer, {1318+			shouldPreventSubmit: false,1319+			ignoredInputGroups: ignoredInputs,1320+		});1321+	} else {1322+		conditionalFields = t_form__conditionals_initFields(formContainer, ignoredInputs);1323+	}13121324 	syncSteps();13131325  
    @@ -1379,8 +1391,10 @@
    13791391 	}13801392  1381-	conditionalFields.addListeners(function () {1382-		syncSteps();1383-		onConditionalFieldChange(getFormState());1384-	});1393+	if (conditionalFields) {1394+		conditionalFields.addListeners(function () {1395+			syncSteps();1396+			onConditionalFieldChange(getFormState());1397+		});1398+	}13851399  13861400 	return {
    +
    function p(){
    482482 return{
    483483 nextStepIndex:_,prevStepIndex:d,activePossibleStepIndex:l,totalActiveStepsCount:u.length}
    484484 }
    485-function p(t){
    486-c=r[a=t],l=u.indexOf(c),_=y(),d=h()}
    487-function m(){
    485+function m(t){
    486+c=r[a=t],l=u.indexOf(c),_=h(),d=g()}
    487+function v(){
    488488 r.forEach((function(t){
    489-v(t)||(t_form__conditionals_isStepEmpty(t)?t.classList.add("t-form__hidden-by-condition"):t.classList.contains("t-form__hidden-by-condition")&&t.classList.remove("t-form__hidden-by-condition"))}
    489+y(t)||(t_form__conditionals_isStepEmpty(t)?t.classList.add("t-form__hidden-by-condition"):t.classList.contains("t-form__hidden-by-condition")&&t.classList.remove("t-form__hidden-by-condition"))}
    490490 )),u=r.filter((function(t){
    491491 return!t.classList.contains("t-form__hidden-by-condition")}
    492-)),l=u.indexOf(c),_=y(),d=h()}
    493-function v(t){
    492+)),l=u.indexOf(c),_=h(),d=g()}
    493+function y(t){
    494494 return!(!n||!n.length)&&t.matches(n.join(","))}
    495-function y(){
    495+function h(){
    496496 var t=Math.min(l+1,r.length-1),n=u[t];
    497497 return r.indexOf(n)}
    498-function h(){
    498+function g(){
    499499 var t=Math.max(l-1,0),n=u[t];
    500500 return r.indexOf(n)}
    501-return m(),s.addListeners((function(){
    502-m(),i(f())}
    501+return!1===t.listenFields?t_form__conditionals_syncFields(s,{
    502+shouldPreventSubmit:!1,ignoredInputGroups:e}
    503+):f=t_form__conditionals_initFields(s,e),v(),f&&f.addListeners((function(){
    504+v(),i(p())}
    503505 )),{
    504-getState:f,onStepChange:p}
    506+getState:p,onStepChange:m}
    505507 }
    506508 function t_form__conditionals_isStepEmpty(t){
    +
    5358 /* Перекрывает стили для полей в один ряд. Добавляется лишний стиль для внутреннего инпута способа связи */
    5459 .t-form__inputsbox_inrow .t-contact-method__value-container .t-input-block.t-input-block {
    3232 if (shouldInitPhoneInput) {
    3333 // Загружаем скрипт для работы маски телефона
    34- t_onFuncLoad('t_loadJsFile', () => {
    35- t_loadJsFile('https://static.tildacdn.' + t_contactMethod__getRootZone() + '/js/tilda-phone-mask-1.1.min.js', function () {
    36- t_onFuncLoad('t_form_phonemask__mulitple__load', function () {
    37- const phoneMasks = inputGroup.querySelectorAll(`[data-phonemask-lid="${lid}"]`);
    38- t_form_phonemask__mulitple__load(phoneMasks);
    39- });
    40- });
    34+ t_contactMethod__loadPhoneMask().then(() => {
    35+ const phoneMasks = inputGroup.querySelectorAll(`[data-phonemask-lid="${lid}"]`);
    36+ window.t_form_phonemask__mulitple__load(phoneMasks);
    4137 });
    4238
    4339 // Скрываем контейнер с полями, пока загружается скрипт.
    44- t_contactMethod__hide(valueInputContainer);
    40+ // Прячем через visibility, чтобы поле не меняло высоту формы
    41+ valueInputContainer.classList.add('t-contact-method__loading');
    4542 // Блокируем радио кнопки.
    4643 radioInputs.forEach(input => t_contactMethod__disable(input));
    @@ -64,5 +61,5 @@
    6461  6562 		// Показываем контейнер с полями.66-		t_contactMethod__show(valueInputContainer);63+		valueInputContainer.classList.remove('t-contact-method__loading');6764 		radioInputs.forEach(input => {6865 			// Разблокируем радио кнопки.
    @@ -123,13 +120,15 @@
    123120 		const { contactMethod, silent } = options;124121 		const valueGroup = t_contactMethod__getValueGroup(inputGroup, contactMethod);125-		if (t_contactMethod__isHidden(valueGroup)) return;126- 127122 		const { valueHolder, isoHolder, maskHolder } = t_contactMethod__getPhoneInputElements(valueGroup);128123 		const usernameInput = t_contactMethod__getInputElement(valueGroup, 'text');129124  130-		t_contactMethod__resetInputValue(valueGroup, 'text', { silent });131-		t_contactMethod__resetInputValue(valueGroup, 'phone', { silent });125+		// Группа может быть скрыта заранее (например, зеро-форма рендерит начальное состояние поля),126+		// но поля маски телефона в ней создаются позже и их все равно нужно отключить127+		if (!t_contactMethod__isHidden(valueGroup)) {128+			t_contactMethod__resetInputValue(valueGroup, 'text', { silent });129+			t_contactMethod__resetInputValue(valueGroup, 'phone', { silent });130+			t_contactMethod__hide(valueGroup);131+		}132132  133-		t_contactMethod__hide(valueGroup);134133 		t_contactMethod__disable(usernameInput);135134 		t_contactMethod__disable(valueHolder);
    @@ -254,5 +253,4 @@
    254253 		if (isEmptyValue && !isCurrentInputText) {255254 			showValueGroupInput({ inputType: 'text', autoFocus: true, group });256-			return;257255 		}258256 	}
    @@ -263,4 +261,68 @@
    263261 // #region Utilities264262 /**263+ * Возвращает блок, в котором находится поле.264+ * В редакторе Zero Block нет обертки #rec, блоком является .tn-artboard с data-record-id.265+ * @param {string} recId266+ * @returns {Element | null}267+ */268+function t_contactMethod__getRec(recId) {269+	const rec = document.getElementById(`rec${recId}`);270+	if (rec) return rec;271+ 272+	if (window.tildamode === 'zero') {273+		return document.querySelector(`.tn-artboard[data-record-id="${recId}"]`);274+	}275+ 276+	return null;277+}278+ 279+/**280+ * Ждет, пока на странице появится функция.281+ * В редакторе Zero Block нет tilda-scripts (t_onFuncLoad), поэтому ждем функцию самостоятельно.282+ * @param {string} funcName283+ * @returns {Promise<void>}284+ */285+function t_contactMethod__waitForFunc(funcName) {286+	return new Promise((resolve, reject) => {287+		if (typeof window.t_onFuncLoad === 'function') {288+			t_onFuncLoad(funcName, resolve);289+			return;290+		}291+ 292+		if (typeof window[funcName] === 'function') {293+			resolve();294+			return;295+		}296+ 297+		const MAX_WAITING_TIME = 15000;298+		const startTime = Date.now();299+		const intervalId = setInterval(() => {300+			if (typeof window[funcName] === 'function') {301+				clearInterval(intervalId);302+				resolve();303+			} else if (Date.now() - startTime > MAX_WAITING_TIME) {304+				clearInterval(intervalId);305+				reject(new Error(`${funcName} is undefined`));306+			}307+		}, 100);308+	});309+}310+ 311+/**312+ * Загружает скрипт маски телефона. Промис резолвится, когда маска готова к работе.313+ * Если на странице нет t_loadJsFile (редактор Zero Block), скрипт маски должен подключить тот, кто инициализирует поле.314+ * @returns {Promise<void>}315+ */316+async function t_contactMethod__loadPhoneMask() {317+	if (typeof window.t_onFuncLoad === 'function') {318+		await t_contactMethod__waitForFunc('t_loadJsFile');319+		const src = 'https://static.tildacdn.' + t_contactMethod__getRootZone() + '/js/tilda-phone-mask-1.1.min.js';320+		await new Promise(resolve => window.t_loadJsFile(src, resolve));321+	}322+ 323+	await t_contactMethod__waitForFunc('t_form_phonemask__mulitple__load');324+}325+ 326+/**265327  * @param {Element} valueGroup266328  */
    @@ -446,14 +508,14 @@
    446508  447509 	const lang = t_contactMethod__getLang() || 'EN';448-	449-	return dict[key][lang];510+ 511+	// Для языков без перевода используем английский, иначе в плейсхолдер попадает undefined512+	return dict[key][lang] || dict[key].EN;450513 }451514  452515 function t_contactMethod__getLang() {453-	const allrecords = document.getElementById('allrecords');454-	const projectLang = allrecords.getAttribute('data-tilda-project-lang');455-	516+	const projectLang = t_contactMethod__getProjectLang();517+ 456518 	if (projectLang) {457-		return projectLang;519+		return projectLang.toUpperCase();458520 	}459521 	
    @@ -463,4 +525,18 @@
    463525  464526 /**527+ * Возвращает язык проекта, чтобы переводы в редакторах совпадали с опубликованной страницей.528+ * В редакторе Zero Block нет #allrecords, язык проекта лежит в window.site_lang.529+ * @returns {string}530+ */531+function t_contactMethod__getProjectLang() {532+	const allrecords = document.getElementById('allrecords');533+	if (allrecords) return allrecords.getAttribute('data-tilda-project-lang') || '';534+ 535+	if (window.tildamode === 'zero') return window.site_lang || '';536+ 537+	return '';538+}539+ 540+/**465541  *466542  * @param {ContactMethod} contactMethod
    var c=a[0];
    99 if(c){
    10-var _=n.querySelector(".t-contact-method__value-container"),r=n.querySelectorAll('.t-contact-method__type input[type="radio"]'),u=Array.from(r).map((function(t){
    10+var r=n.querySelector(".t-contact-method__value-container"),_=n.querySelectorAll('.t-contact-method__type input[type="radio"]'),i=Array.from(_).map((function(t){
    1111 return t.value}
    12-)),d,i;
    13-if(u.some((function(t){
    12+)),d,u;
    13+if(i.some((function(t){
    1414 return["phone","telegram","whatsapp","viber"].includes(t)}
    15-)))t_onFuncLoad("t_loadJsFile",(function(){
    16-t_loadJsFile("https://static.tildacdn."+t_contactMethod__getRootZone()+"/js/tilda-phone-mask-1.1.min.js",(function(){
    17-t_onFuncLoad("t_form_phonemask__mulitple__load",(function(){
    15+)))t_contactMethod__loadPhoneMask().then((function(){
    1816 var t=n.querySelectorAll('[data-phonemask-lid="'+e+'"]');
    19-t_form_phonemask__mulitple__load(t)}
    20-))}
    21-))}
    22-)),t_contactMethod__hide(_),r.forEach((function(t){
    17+window.t_form_phonemask__mulitple__load(t)}
    18+)),r.classList.add("t-contact-method__loading"),_.forEach((function(t){
    2319 return t_contactMethod__disable(t)}
    2420 )),"yes"===n.getAttribute("data-init-mask")?l():n.addEventListener("phoneMaskReady",(function(){
    @@ -30,5 +26,5 @@
    3026 }3127 function l(){32-s(c.getAttribute("data-method-type")),t_contactMethod__show(_),r.forEach((function(t){28+s(c.getAttribute("data-method-type")),r.classList.remove("t-contact-method__loading"),_.forEach((function(t){3329 t_contactMethod__enable(t),t.addEventListener("change",(function(){3430 s(t.value)}
    @@ -41,5 +37,5 @@
    4137 }4238 ).silent,a=void 0!==n&&n;43-u.forEach((function(e){39+i.forEach((function(e){4440 e===t?h({4541 contactMethod:e}
    @@ -54,23 +50,20 @@
    5450 ),t_contactMethod__isHybridValueGroup(o)&&M(o)}5551 function p(t){56-var e=t.contactMethod,o=t.silent,a=t_contactMethod__getValueGroup(n,e);57-if(!t_contactMethod__isHidden(a)){58-var c=t_contactMethod__getPhoneInputElements(a),_=c.valueHolder,r=c.isoHolder,u=c.maskHolder,d=t_contactMethod__getInputElement(a,"text");59-t_contactMethod__resetInputValue(a,"text",{52+var e=t.contactMethod,o=t.silent,a=t_contactMethod__getValueGroup(n,e),c=t_contactMethod__getPhoneInputElements(a),r=c.valueHolder,_=c.isoHolder,i=c.maskHolder,d=t_contactMethod__getInputElement(a,"text");53+t_contactMethod__isHidden(a)||(t_contactMethod__resetInputValue(a,"text",{6054 silent:o}6155 ),t_contactMethod__resetInputValue(a,"phone",{6256 silent:o}63-),t_contactMethod__hide(a),t_contactMethod__disable(d),t_contactMethod__disable(_),t_contactMethod__disable(r),t_contactMethod__disable(u)}64-}57+),t_contactMethod__hide(a)),t_contactMethod__disable(d),t_contactMethod__disable(r),t_contactMethod__disable(_),t_contactMethod__disable(i)}6558 function m(t){66-var e=t.group,o=t.inputType,n=t.autoFocus,a=void 0!==n&&n,c=e.querySelector(".t-input-phonemask__wrap"),_=t_contactMethod__getPhoneInputElements(c),r=_.valueHolder,u=_.maskHolder,d=_.isoHolder,i=t_contactMethod__getInputElement(e,"phone"),l=t_contactMethod__getInputElement(e,"text"),s=i?i.closest(".t-input-block"):null,h=l?l.closest(".t-input-block"):null;67-return"phone"===o&&i?(t_contactMethod__hide(h),t_contactMethod__disable(l),t_contactMethod__show(s),t_contactMethod__enable(r),t_contactMethod__enable(d),t_contactMethod__enable(u),a&&i.focus(),{68-wrapper:c,input:i}69-):"text"===o&&l?(t_contactMethod__hide(s),t_contactMethod__disable(r),t_contactMethod__disable(d),t_contactMethod__disable(u),t_contactMethod__show(h),t_contactMethod__enable(l),a&&l.focus(),{59+var e=t.group,o=t.inputType,n=t.autoFocus,a=void 0!==n&&n,c=e.querySelector(".t-input-phonemask__wrap"),r=t_contactMethod__getPhoneInputElements(c),_=r.valueHolder,i=r.maskHolder,d=r.isoHolder,u=t_contactMethod__getInputElement(e,"phone"),l=t_contactMethod__getInputElement(e,"text"),s=u?u.closest(".t-input-block"):null,h=l?l.closest(".t-input-block"):null;60+return"phone"===o&&u?(t_contactMethod__hide(h),t_contactMethod__disable(l),t_contactMethod__show(s),t_contactMethod__enable(_),t_contactMethod__enable(d),t_contactMethod__enable(i),a&&u.focus(),{61+wrapper:c,input:u}62+):"text"===o&&l?(t_contactMethod__hide(s),t_contactMethod__disable(_),t_contactMethod__disable(d),t_contactMethod__disable(i),t_contactMethod__show(h),t_contactMethod__enable(l),a&&l.focus(),{7063 input:l}7164 ):void 0}7265 function f(){7366 var t=c.getAttribute("data-method-type"),e,o;74-r.forEach((function(e){67+_.forEach((function(e){7568 e.value===t&&(e.checked=!0,s(t,{7669 silent:!0}
    @@ -92,12 +85,44 @@
    9285 }9386 function v(t,e){94-var o=e.target.value,n,a=/^[+0-9]/.test(o),c=""===o,_=e.target.classList.contains("js-username-input");95-if(a&&_)return t_contactMethod__resetInputValue(t,"text"),void m({87+var o=e.target.value,n,a=/^[+0-9]/.test(o),c=""===o,r=e.target.classList.contains("js-username-input");88+if(a&&r)return t_contactMethod__resetInputValue(t,"text"),void m({9689 inputType:"phone",autoFocus:!0,group:t}9790 );98-!c||_||m({91+c&&!r&&m({9992 inputType:"text",autoFocus:!0,group:t}10093 )}10194 }95+function t_contactMethod__getRec(t){96+var e=document.getElementById("rec"+t);97+return e||("zero"===window.tildamode?document.querySelector('.tn-artboard[data-record-id="'+t+'"]'):null)}98+function t_contactMethod__waitForFunc(t){99+return new Promise((function(e,o){100+if("function"!=typeof window.t_onFuncLoad)if("function"!=typeof window[t])var n=15e3,a=Date.now(),c=setInterval((function(){101+"function"==typeof window[t]?(clearInterval(c),e()):Date.now()-a>n&&(clearInterval(c),o(new Error(t+" is undefined")))}102+),100);103+else e();104+else t_onFuncLoad(t,e)}105+))}106+var t_contactMethod__loadPhoneMask=function t(){107+try{108+function e(){109+return Promise.resolve(t_contactMethod__waitForFunc("t_form_phonemask__mulitple__load")).then((function(){110+}111+))}112+var o=function(){113+if("function"==typeof window.t_onFuncLoad)return Promise.resolve(t_contactMethod__waitForFunc("t_loadJsFile")).then((function(){114+var t="https://static.tildacdn."+t_contactMethod__getRootZone()+"/js/tilda-phone-mask-1.1.min.js";115+return Promise.resolve(new Promise((function(e){116+return window.t_loadJsFile(t,e)}117+))).then((function(){118+}119+))}120+))}121+();122+return Promise.resolve(o&&o.then?o.then(e):e(o))}123+catch(n){124+return Promise.reject(n)}125+}126+;102127 function t_contactMethod__isHybridValueGroup(t){103128 if(t)return t.classList.contains("t-contact-method__hybrid")}
    @@ -105,8 +130,8 @@
    105130 var n,a=(o||{106131 }107-).silent,c=void 0!==a&&a,_=t_contactMethod__getInputElement(t,e);108-if(_){109-var r=_.value,u="";110-_.value=u,_.classList.remove("t-input_has-content"),r===u||c||_.dispatchEvent(new Event("change",{132+).silent,c=void 0!==a&&a,r=t_contactMethod__getInputElement(t,e);133+if(r){134+var _=r.value,i="";135+r.value=i,r.classList.remove("t-input_has-content"),_===i||c||r.dispatchEvent(new Event("change",{111136 bubbles:!0}112137 ))}
    @@ -163,8 +188,11 @@
    163188 if(!e[t])return t;164189 var o=t_contactMethod__getLang()||"EN";165-return e[t][o]}190+return e[t][o]||e[t].EN}166191 function t_contactMethod__getLang(){167-var t,e=document.getElementById("allrecords").getAttribute("data-tilda-project-lang"),o;168-return e||(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2)}192+var t=t_contactMethod__getProjectLang(),e;193+return t?t.toUpperCase():(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2)}194+function t_contactMethod__getProjectLang(){195+var t=document.getElementById("allrecords");196+return t?t.getAttribute("data-tilda-project-lang")||"":"zero"===window.tildamode&&window.site_lang||""}169197 function t_contactMethod__getPlaceholder(t){170198 return"telegram"===t?t_contactMethod__tranlsate("username_or_phone"):"vk"===t||"fb_messenger"===t?t_contactMethod__tranlsate("username_id_or_link"):"skype"===t?t_contactMethod__tranlsate("username_email_or_phone"):"max_messenger"===t?t_contactMethod__tranlsate("link_or_phone"):void 0}