const yearsSince2011 = new Date().getFullYear() - 2011; function esc(s) { return String(s||'').replace(/&/g,'&').replace(/"/g,'"').replace(//g,'>'); } function imgSrc(path) { if (!path) return './img/hero-bg.webp'; if (path.startsWith('./')) return path; if (path.startsWith('http')) return path; if (/^(equipment|partner|license|activity|hero)_images\//.test(path)) return '/data/' + path; return './img/' + path; } var CONTRACT_ICON = { income: '', expense: '' }; // Тип договора («Доходный/Расходный договор для заказчика») выносим из описания в заметную плашку function splitContract(desc) { var text = String(desc || ''); var m = text.match(/\s*(Доходный|Расходный)\s+договор(\s+для\s+заказчика)?\.?/i); if (!m) return { tag: '', rest: text }; var kind = /^доходный/i.test(m[1]) ? 'income' : 'expense'; var tag = '
' + (h.subtitle || '').replace('{years}', yearsSince2011) + '
' + '' + '' + (a.section_subtitle || '') + '
' + a.paragraph_1 + '
' : '') + (a.paragraph_2 ? '' + a.paragraph_2 + '
' : '') + (a.paragraph_3 ? '' + a.paragraph_3 + '
' : '') + '' + (s.description || '') + '
' + (items.length ? '' + (st.section_services_subtitle || '') + '
' + c.rest + '
' + (items.length ? '' + (st.section_schemes_subtitle || '') + '
' + (s.description || '') + '
' + (st.section_process_subtitle || '') + '
' + esc(st.section_equipment_subtitle || '') + '
' + (geo.section_subtitle || st.section_services_subtitle || '') + '
' + (geo.difficult_desc || '') + '
' + (l.description || '') + '
' + (g.description || '') + '
' + (st.section_licenses_subtitle || '') + '
' + (a.description || '') + '
' + (g.description || '') + '
' + (st.section_activity_subtitle || '') + '
' + (st.section_partners_subtitle || '') + '
' + (s.section_contacts_subtitle || '') + '
' + (s.form_subtitle || 'Заполните форму и мы свяжемся с вами') + '
' + '' + 'Мы свяжемся с вами в ближайшее время