"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[913],{"../node_modules/@roots/bud-client/lib/dom-ready.js":(t,e,o)=>{o.d(e,{Z:()=>c});const c=t=>{window.requestAnimationFrame((async function e(){document.body?await t():window.requestAnimationFrame(e)}))}},"./scripts/post.js":(t,e,o)=>{var c=o("../node_modules/@roots/bud-client/lib/dom-ready.js");const n=window.jQuery;function i(){const t=document.querySelectorAll(".accordion");t.length>0&&t.forEach((function(t){const e=t.querySelector(".accordion__list"),o=parseInt(e.getAttribute("data-limit-rows"),10),c=Array.from(t.querySelectorAll(".accordion__box"));let n=[];function i(){Array.from(t.querySelectorAll(".accordion__heading")).forEach((t=>{t.addEventListener("click",s)}))}function s(t){if(t.target&&t.target.classList){let e=t.target.closest(".accordion__box");c.forEach((t=>{t!==e&&t.classList.remove("accordion__box_active")})),e.classList.toggle("accordion__box_active")}}function r(){const c=Array.from(t.querySelectorAll(".accordion__box"));if(c.length>o){c.slice(o).forEach((function(t){n.push(t.cloneNode(!0)),t.parentNode.removeChild(t)}))}else n.forEach((function(t){e.appendChild(t)})),n=[]}function l(){const e=t.querySelector(".accordion__button"),o=t.querySelector(".accordion__box-all-number");let i=c.length,s=n.length,r="\u0432\u043e\u043f\u0440\u043e\u0441\u0430";o&&(1===s?r="\u0432\u043e\u043f\u0440\u043e\u0441":s>4&&(r="\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432")),e&&(o.textContent=n.length>0?`\u0415\u0449\u0435 ${s} ${r} \u0438\u0437 ${i}`:"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c")}let a=!1;function d(){Array.from(t.querySelectorAll(".accordion__heading")).forEach((t=>{t.removeEventListener("click",s)})),a=!a,r(),l(),i()}i(),r(),l();const u=t.querySelector(".accordion__button");u&&u.addEventListener("click",(function(t){t.preventDefault(),d()}))}));let e=document.querySelectorAll(".list-branches__item");e.length>0&&e.forEach((t=>{let e=t.querySelectorAll(".list-branches__tab-btn"),o=t.querySelectorAll(".list-branches__tab-content");e.forEach(((t,c)=>{t.addEventListener("click",(()=>{o.forEach((t=>{t.classList.remove("view")})),o[c].classList.add("view"),e.forEach((t=>{t.classList.remove("active")})),t.classList.add("active")}))}))}))}(0,c.Z)((async()=>{!function(){const t=document.querySelector(".lwptoc_itemWrap");if(t){let e=!1;function o(){const e=document.querySelectorAll("h2.wp-block-heading"),o=document.querySelectorAll(".lwptoc_item");window.scrollY;let n=Number.POSITIVE_INFINITY,i=-1;if(e.forEach((function(t,e){let o=t.getBoundingClientRect().top;if(o<=120){let t=Math.abs(o-120);t<n&&(i=e,n=t)}})),-1!==i&&o[i]){o.forEach((function(t){t.classList.remove("anchor-links-plugin--active")})),o[i].classList.add("anchor-links-plugin--active");let e=o[i].offsetTop-t.offsetTop;c(t,e,800)}}function c(t,e,o){const c=t.scrollTop,i=e-c;let s=0;!function e(){s+=20;let r=n(s,c,i,o);t.scrollTop=r,s<o&&requestAnimationFrame(e)}()}function n(t,e,o,c){return(t/=c/2)<1?o/2*t*t+e:-o/2*(--t*(t-2)-1)+e}window.addEventListener("scroll",(function(){e||(e=!0,requestAnimationFrame((function(){o(),e=!1})))})),document.querySelectorAll(".lwptoc_item a").forEach((t=>{t.addEventListener("click",(function(t){t.preventDefault();const e=this.getAttribute("href").substring(1),o=document.getElementById(e);if(o){const t=100,e=o.getBoundingClientRect().top+window.scrollY-t;c(document.documentElement,e,100)}}))}))}}(),function(){const t=Array.from(document.querySelectorAll(".services__box")),e=Array.from(document.querySelectorAll(".services__box-item")),o=Array.from(document.querySelectorAll(".services__button")),c=Array.from(document.querySelectorAll(".services__button-item"));if(t){function i(o){if(o.target&&o.target.classList){let c=o.target.closest(".services__box");t.forEach((t=>{t!==c&&t.classList.remove("services__box--active")})),e.forEach((t=>{t.classList.remove("services__box-item--active")})),c.classList.toggle("services__box--active")}}function s(t){if(t.target&&t.target.classList){let o=t.target.closest(".services__box-item");e.forEach((t=>{t!==o&&t.classList.remove("services__box-item--active")})),o.classList.toggle("services__box-item--active")}}o.forEach((t=>{t.addEventListener("click",i)})),c.forEach((t=>{t.addEventListener("click",s)}))}function n(t,e,o){const c=t.querySelectorAll(`[${e}]`),n=t.querySelectorAll(`[${o}]`);c.length>0&&(c[0].classList.add("active"),n[0].classList.add("active"),c.forEach(((t,e)=>{t.addEventListener("click",(()=>{c.forEach((t=>t.classList.remove("active"))),n.forEach((t=>t.classList.remove("active"))),t.classList.add("active"),n[e].classList.add("active")}))})))}document.querySelectorAll("[data-tab]").forEach((t=>{n(t,"data-tab-btn","data-tab-content")})),document.querySelectorAll("[data-tab-\u0441hildren]").forEach((t=>{n(t,"data-tab-btn-\u0441hildren","data-tab-content-\u0441hildren")}))}(),jQuery((function(t){function e(e){const o=e.find(".tooltip-content"),c=t(".content");if(o.length&&c.length){const t=o.offset(),e=c.offset(),n=c.outerWidth(),i=o.outerWidth();if(t.left<e.left){const c=e.left-t.left+10;o.css("transform",`translateX(${c}px)`)}else if(t.left+i>e.left+n){const c=t.left+i-(e.left+n)+10;o.css("transform",`translateX(-${c}px)`)}}}t(".tooltip").each((function(){const e=t(this),o=e.attr("title");if(o){const c=t('<span class="tooltip-content"></span>').html(o);e.append(c);const n=t('<button><svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 6L6 18" stroke="#2E3A4C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 6L18 18" stroke="#2E3A4C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg></button>');c.prepend(n),e.removeAttr("title"),e.removeAttr("style")}})),t(".tooltip").on("mouseenter",(function(){t(window).width()>=1200&&e(t(this))})),t(".tooltip").on("click",(function(o){if(!(t(window).width()>1200)&&o.target===this){const o=t(this);o.addClass("active"),e(o)}})),t(".tooltip button").on("click",(function(e){e.stopPropagation(),t(this).closest(".tooltip").removeClass("active")})),t(document).on("click",(function(e){t(e.target).closest(".tooltip").length||t(".tooltip.active").removeClass("active")}))})),n((function(t){t(".info-block > div > .list").each((function(){let e=t(this),o=e.children("li");o.length>10&&t("<span/>",{text:"\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a",class:"info-block__btn-list-toggle btn-list-toggle-js",click:function(){o.slice(10).is(":hidden")?(o.fadeIn(300),t(this).text("\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a").addClass("--active"),t(this).prev().addClass("--active")):(o.slice(10).fadeOut(200),t(this).text("\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a").removeClass("--active"),t(this).prev().removeClass("--active"))}}).insertAfter(e),o.slice(10).hide()}))})),i()}))}},t=>{var e;e="./scripts/post.js",t(t.s=e)}]);