(()=>{var t={840:function(t,e,n){var r;!function(){"use strict";function o(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,r,i,a){return o((s=o(o(e,t),o(r,a)))<<(c=i)|s>>>32-c,n);var s,c}function a(t,e,n,r,o,a,s){return i(e&n|~e&r,t,e,o,a,s)}function s(t,e,n,r,o,a,s){return i(e&r|n&~r,t,e,o,a,s)}function c(t,e,n,r,o,a,s){return i(e^n^r,t,e,o,a,s)}function u(t,e,n,r,o,a,s){return i(n^(e|~r),t,e,o,a,s)}function l(t,e){var n,r,i,l,d;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var f=1732584193,m=-271733879,h=-1732584194,g=271733878;for(n=0;n<t.length;n+=16)r=f,i=m,l=h,d=g,f=a(f,m,h,g,t[n],7,-680876936),g=a(g,f,m,h,t[n+1],12,-389564586),h=a(h,g,f,m,t[n+2],17,606105819),m=a(m,h,g,f,t[n+3],22,-1044525330),f=a(f,m,h,g,t[n+4],7,-176418897),g=a(g,f,m,h,t[n+5],12,1200080426),h=a(h,g,f,m,t[n+6],17,-1473231341),m=a(m,h,g,f,t[n+7],22,-45705983),f=a(f,m,h,g,t[n+8],7,1770035416),g=a(g,f,m,h,t[n+9],12,-1958414417),h=a(h,g,f,m,t[n+10],17,-42063),m=a(m,h,g,f,t[n+11],22,-1990404162),f=a(f,m,h,g,t[n+12],7,1804603682),g=a(g,f,m,h,t[n+13],12,-40341101),h=a(h,g,f,m,t[n+14],17,-1502002290),f=s(f,m=a(m,h,g,f,t[n+15],22,1236535329),h,g,t[n+1],5,-165796510),g=s(g,f,m,h,t[n+6],9,-1069501632),h=s(h,g,f,m,t[n+11],14,643717713),m=s(m,h,g,f,t[n],20,-373897302),f=s(f,m,h,g,t[n+5],5,-701558691),g=s(g,f,m,h,t[n+10],9,38016083),h=s(h,g,f,m,t[n+15],14,-660478335),m=s(m,h,g,f,t[n+4],20,-405537848),f=s(f,m,h,g,t[n+9],5,568446438),g=s(g,f,m,h,t[n+14],9,-1019803690),h=s(h,g,f,m,t[n+3],14,-187363961),m=s(m,h,g,f,t[n+8],20,1163531501),f=s(f,m,h,g,t[n+13],5,-1444681467),g=s(g,f,m,h,t[n+2],9,-51403784),h=s(h,g,f,m,t[n+7],14,1735328473),f=c(f,m=s(m,h,g,f,t[n+12],20,-1926607734),h,g,t[n+5],4,-378558),g=c(g,f,m,h,t[n+8],11,-2022574463),h=c(h,g,f,m,t[n+11],16,1839030562),m=c(m,h,g,f,t[n+14],23,-35309556),f=c(f,m,h,g,t[n+1],4,-1530992060),g=c(g,f,m,h,t[n+4],11,1272893353),h=c(h,g,f,m,t[n+7],16,-155497632),m=c(m,h,g,f,t[n+10],23,-1094730640),f=c(f,m,h,g,t[n+13],4,681279174),g=c(g,f,m,h,t[n],11,-358537222),h=c(h,g,f,m,t[n+3],16,-722521979),m=c(m,h,g,f,t[n+6],23,76029189),f=c(f,m,h,g,t[n+9],4,-640364487),g=c(g,f,m,h,t[n+12],11,-421815835),h=c(h,g,f,m,t[n+15],16,530742520),f=u(f,m=c(m,h,g,f,t[n+2],23,-995338651),h,g,t[n],6,-198630844),g=u(g,f,m,h,t[n+7],10,1126891415),h=u(h,g,f,m,t[n+14],15,-1416354905),m=u(m,h,g,f,t[n+5],21,-57434055),f=u(f,m,h,g,t[n+12],6,1700485571),g=u(g,f,m,h,t[n+3],10,-1894986606),h=u(h,g,f,m,t[n+10],15,-1051523),m=u(m,h,g,f,t[n+1],21,-2054922799),f=u(f,m,h,g,t[n+8],6,1873313359),g=u(g,f,m,h,t[n+15],10,-30611744),h=u(h,g,f,m,t[n+6],15,-1560198380),m=u(m,h,g,f,t[n+13],21,1309151649),f=u(f,m,h,g,t[n+4],6,-145523070),g=u(g,f,m,h,t[n+11],10,-1120210379),h=u(h,g,f,m,t[n+2],15,718787259),m=u(m,h,g,f,t[n+9],21,-343485551),f=o(f,r),m=o(m,i),h=o(h,l),g=o(g,d);return[f,m,h,g]}function d(t){var e,n="",r=32*t.length;for(e=0;e<r;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function f(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var r=8*t.length;for(e=0;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function m(t){var e,n,r="0123456789abcdef",o="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),o+=r.charAt(e>>>4&15)+r.charAt(15&e);return o}function h(t){return unescape(encodeURIComponent(t))}function g(t){return function(t){return d(l(f(t),8*t.length))}(h(t))}function p(t,e){return function(t,e){var n,r,o=f(t),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=l(o,8*t.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],a[n]=1549556828^o[n];return r=l(i.concat(f(e)),512+8*e.length),d(l(a.concat(r),640))}(h(t),h(e))}function v(t,e,n){return e?n?p(e,t):m(p(e,t)):n?g(t):m(g(t))}void 0===(r=function(){return v}.call(e,n,e,t))||(t.exports=r)}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{start:()=>xt});const t={getItem:t=>{try{return localStorage.getItem(t)}catch{return console.warn("Failed get value from Storage"),"{}"}},setItem:(t,e)=>{try{localStorage.setItem(t,e)}catch{console.warn("Failed to save to Storage")}}},e="All",o="Desktop",i="Mobile";const a=window,s={sendEvent:function(t,e){c().push(Object.assign(Object.assign({},e),{event:t}))},pushData:function(t){t&&c().push(t)},isInStrictMode:function(){return!(!window.Kontur||!("GoogleTagManagerStrictMode"in window.Kontur))}};function c(){const t="dataLayer";return a[t]||(a[t]=[]),a[t]}const u="events",l="web_sites",d=window;function f(t){const e=`${t}Queue`;return d[e]||(d[e]=[]),d[e]}function m(t){var e;const{metrikaProjectName:n,eventName:r,value:o,category:i}=t,a=function(t){return t.replace(/[&=?#]/g,"").replace(/(\/|-)+/g,"-").replace(/^-+|-+$/g,"")}(r);s.isInStrictMode()?s.sendEvent(a,o):(function(t){const{metrikaProjectName:e,eventName:n,category:r,value:o,name:i}=t,a=e||l,s=function(t,e,n,r){const o=["trackEvent",t,e];return r&&o.push(r),n&&o.push(n),o}(r||u,n,o,i);f(a).push(s)}({metrikaProjectName:n,eventName:a,value:o,category:i}),null===(e=window.console)||void 0===e||e.info(`event was registered: ${a}`))}function h(t,e){!function(t,e){const n=function(t){return["setEventsContext",t]}(e);f(t).push(n)}(t,e)}const g="abtest_experiments",p="abtest_active";function v(t,e){return`${t}_${e}`}function w(){return`${window.location.protocol}//${window.location.hostname}${window.location.pathname}`}function b(t){return`${t.protocol}//${t.hostname}${t.pathname}`}function $(t){const e=[];for(const n of Object.values(t))n.variantName&&e.push(v(n.experimentName,n.variantName));return e.join("+")}function S(){return window.location.search.includes("abpreview=true")}function P(e){t.setItem(g,JSON.stringify(e)),t.setItem(p,$(e))}function y(t){return{abtest:$(t)}}const U="abtest_experiments";function k(t,e,n){"undefined"!=typeof Kontur&&void 0!==Kontur.Module&&Kontur.Module(t,e,n)}class I{static setCookie(t,e,n,r,o){let i=t+"="+e;if(void 0!==n){const t=new Date;t.setTime(t.getTime()+24*n*60*60*1e3),i=i+";expires="+t.toUTCString()}void 0===r?i+=";path=/":i=i+";path="+r,void 0!==o&&(i=i+";domain="+o),document.cookie=i}static getCookie(t){const e=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}}function C(t){if(!t)return t;try{return encodeURIComponent(t)}catch(e){return t}}k("Kontur.Cookie",(function(){this.setCookie=I.setCookie,this.getCookie=I.getCookie}));const x=function(t){t.forEach((t=>{const e=Array.isArray(t.search)?t.search.join(","):t.search,n=t.rootElement||document;[].slice.call(n.querySelectorAll(e)).forEach(t.decorator)}))},E=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;return t?t.substr(0,e):""};class N{static wordEndingByNumber(t,e,n,r){return(t=Math.abs(t)%100)>20&&(t%=10),1===t?e:t>1&&t<5?n:r}static separateThousandsInNumber(t,e){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e||"&nbsp;")}static numberWithLeadingZeros(t,e){const n=Array(e+1).join("0"),r=t.toString();if(r.length>=e)return r;const o=n+r,i=o.length-e;return o.slice(i)}static trimSpaces(t){return t?t.replace(/^\s+|\s+$/g,""):t}static trimEndSpaces(t){return t?String.prototype.trimEnd?t.trimEnd():t.replace(/\s+$/,""):t}static escapeHTML(t){return"string"!=typeof t?"":t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}}function R(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}k("Kontur.StringHelper",(function(){this.wordEndingByNumber=N.wordEndingByNumber,this.separateThousandsInNumber=N.separateThousandsInNumber,this.numberWithLeadingZeros=N.numberWithLeadingZeros,this.trimSpaces=N.trimSpaces}));class T{static getSiteUrl(){return this.siteUrl}static setSiteUrl(t){this.siteUrl=t}static addParameter(t,e,n){return R(T,this,A).call(this,e,n)?R(T,this,L).call(this,t,(t=>R(T,this,j).call(this,t,e,n))):t}static addParameters(t,e){return e=e||{},R(T,this,L).call(this,t,(t=>{let n=t;for(let t in e){const r=e[t];R(T,this,A).call(this,t,r)&&(n=R(T,this,j).call(this,n,t,r))}return n}))}static toAbsoluteUrl(t,e){const n=this.removeTrailingSlash(t)+"/"+this.trimSlashes(e);return this.removeTrailingSlash(n)}static removeTrailingSlash(t){return t.replace(/\/+$/g,"")}static trimSlashes(t){return t.replace(/^[\/]+|[\/]+$/g,"")}static removeParameters(t){return t.replace(/\?.*$/g,"")}static getQueryParams(){return this.getParameters(window.location.href)}static isRelative(t){let{hashAsRelative:e=!1,queryAsRelative:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=t.trim().toLowerCase();return!(r.includes("://")||r.startsWith("//")||!e&&r.startsWith("#")||!n&&r.startsWith("?"))}static getPath(t){return t.replace(/^(?:\/\/|[^\/]+)*\//,"/")}static getParameters(t){if("string"!=typeof t||-1===t.indexOf("?"))return{};const e=t.indexOf("#");-1!==e&&(t=t.substring(0,e));const n={},r=t.slice(t.indexOf("?")+1).split("&");for(let t=0;t<r.length;t++){const e=r[t].split("=");n[e[0]]=void 0===e[1]?"":e[1]}return n}static getSafeQueryParams(t){const e=t.trim(),n=Object.create(null);if(!e||e.length<=1)return n;const r=e.substring(1).split("&"),o=new Set(["__proto__","constructor","prototype"]);for(let t of r){const e=t.split("="),r=e[0];let i="";if(void 0!==e[1])try{i=decodeURIComponent(e[1])}catch(t){console.error(t)}let a=r,s=n;const c=r.split(".");if(c.some(((t,e)=>{const n=0===e?(t||"").toLowerCase():t||"";return!n||o.has(n)})))continue;for(let t=0;t<c.length;++t)a=c[t],0===t&&(a=a.toLowerCase()),t===c.length-1||("object"==typeof s[a]&&null!==s[a]||(s[a]=Object.create(null)),s=s[a]);const u=s[a],l=N.escapeHTML(i);void 0===u?s[a]=l:Array.isArray(u)?u.push(l):s[a]=[u,l]}return n}static getUrlParts(t){const e=document.createElement("a");return e.href=t,e.href=e.href,{href:e.href,host:e.host,hostname:e.hostname,port:e.port,pathname:0==e.pathname.indexOf("/")?e.pathname:"/"+e.pathname,protocol:e.protocol,hash:e.hash,search:e.search}}static toRelativeUrl(t){const e=this.getUrlParts(t);return e.pathname+e.search+e.hash}}function j(t,e,n){let r="",o=t.split("?");const i=o[0],a=o[1];let s="";if(a){o=a.split("&");for(let t=0;t<o.length;t++)o[t].split("=")[0].toLowerCase()!==e.toLowerCase()&&(r+=s+o[t],s="&")}return i+"?"+r+(s+e)+"="+n}function L(t,e){let n="";const r=t.indexOf("#");return-1!==r&&(n=t.substring(r),t=t.substring(0,r)),e(t)+n}function A(t,e){return Boolean(t)&&Boolean(e)}k("Kontur.UrlHelper",(function(){const t=this;t.getSiteUrl=function(){return T.getSiteUrl()},t.setSiteUrl=function(t){T.setSiteUrl(t)},t.addParameter=function(t,e,n){return T.addParameter(t,e,n)},t.addParameters=function(t,e){return T.addParameters(t,e)},t.toAbsoluteUrl=function(t,e){return T.toAbsoluteUrl(t,e)},t.removeTrailingSlash=function(t){return T.removeTrailingSlash(t)},t.trimSlashes=function(t){return T.trimSlashes(t)},t.removeParameters=function(t){return T.removeParameters(t)},t.getQueryParams=function(){return T.getQueryParams()},t.isRelative=function(t){return T.isRelative(t)},t.getPath=function(t){return T.getPath(t)},t.getParameters=function(t){return T.getParameters(t)},t.getUrlParts=function(t){return T.getUrlParts(t)},t.toRelativeUrl=function(t){return T.toRelativeUrl(t)}}));class O{static#t=(()=>(()=>{try{return window.localStorage}catch(t){}})())();static getItem(t){if(!this.#t)return I.getCookie(t);try{const e=this.#t.getItem(t),n=this.#t.getItem(`${t}.expire`),r=new Date;return!n||r<new Date(n)?e:null}catch(t){return null}}static setItem(t,e,n){if(this.#t)try{if(this.#t.setItem(t,e),n){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),this.#t.setItem(`${t}.expire`,e.toUTCString())}}catch(t){}else I.setCookie(t,e,n||365)}static removeItem(t){this.setItem(t,"expired",-1)}}function _(t,e,n){if(document.createEvent){const r=document.createEvent("CustomEvent");r.initCustomEvent(e,!0,!1,n),t.dispatchEvent(r)}else{const r=document.createEventObject();r.detail=n,t.fireEvent("on"+e,r)}}k("Kontur.Storage",(function(){const t=this;t.getItem=t=>O.getItem(t),t.setItem=(t,e,n)=>O.setItem(t,e,n),t.removeItem=t=>O.removeItem(t)}));const M="ktr_sid",D="referer",K="start_page";function W(t){return t?T.getUrlParts(t).hostname:""}function B(t){return null==I.getCookie(M)?"":O.getItem(t)}function z(t,e,n){B(t)!==e&&(O.setItem(t,e),_(window,n,e))}const H={init:function(){if(this.isInitialized)return;const t=document.referrer,e=location.href;window.KonturTrackerInitialized=!0,W(e)!==W(t)&&(I.setCookie(M,1),z(D,t,"tracker-set-referer"),z(K,e,"tracker-set-startPage"),_(window,"tracker-new-click",e))},getReferer:function(){return this.init(),B(D)},getStartPage:function(){return this.init(),B(K)},get isInitialized(){return Boolean(window.KonturTrackerInitialized)}};var J=n(840),Q=n.n(J);const F="ngtoken",Z="utm",q="promocode",G="utm_referer",V="utm_startpage",X="utm_orderpage",Y="utm_from";function tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)return;const n=function(t,e){let{promocodeUrlParameterName:n,customPromocode:r,defaultPromocode:o,excludedParameters:i,globalNgToken:a,disableNgTokenEncode:s}=e;const c=n||"p",u=T.getParameters(t),l=T.getParameters(window.location.href),d=r||l.p||I.getCookie(q)||u.p||o,f={...et(a,s),...u,[c]:d,...T.getParameters("?"+I.getCookie(Z)),[G]:nt(H.getReferer()),[V]:nt(H.getStartPage()),[X]:nt(location.href)};let m=i||[];return Object.keys(u).includes(Y)&&m.push(Y),rt(f,m)}(t,e),r=ot(n,((t,e)=>t&&t.match(/^(returnurl|back)$/i)&&e),(t=>{return(e=t)?function(t){if(!t)return t;try{return decodeURIComponent(t)}catch(e){return t}}(e):null;var e})),o=new it(e.allowedDomains,e.forbiddenDomains);let i=!0;const a={};for(const t in r){const e=r[t];e&&o.isDomainAllowed(e)&&(n[t]=a[t]=(s=t,c=e,C(T.addParameters(c,rt(n,s)))),i=!1)}var s,c;const u=e.debug;return o.isDomainAllowed(t,u)?(u&&console.info("domain allowed"),T.addParameters(t,n)):(u&&console.info("domain not allowed"),i?null:T.addParameters(t,a))}function et(t,e){const n=I.getCookie(F)??t;return n?e?{ngtoken:n}:{hashtoken:Q()(n)}:{}}function nt(t){if(!t||!t.match(/^https?:/))return null;const e=T.getUrlParts(t),n="/"!==e.pathname?e.pathname:"";return E(C(e.hostname+n),100)}function rt(t,e){return ot(t,((t,n)=>!e.includes(t)&&n))}function ot(t,e,n){const r={};return n=n||(t=>t),Object.keys(t).forEach((o=>{e(o,t[o])&&(r[o]=n(t[o]))})),r}class it{#e;#n;constructor(t,e){this.#e=t||[],this.#n=e||[]}isDomainAllowed(t,e){const n=at(t);if(e&&console.info("проверка url в методе isDomainAllowed",t,n),this.#n.length>0&&this.#n.indexOf(at(t))>=0)return e&&console.info("ссылка попала в запрещенные",at(t)),!1;if(this.#e.length<1)return!0;e&&console.info("разрешенные ссылки",this.#e);const r=this.#e.some((t=>{return r=t,!(!(e=n)||!r)&&(e===r||`.${e}`.indexOf(r)>=0);var e,r}));return e&&console.info("ссылка попала в разрешенные?",r),r}}function at(t){return T.getUrlParts(t).hostname}function st(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return t=t||window.Kontur?.UtmInserterSettings||{},function(t){const{filterSelector:e,rootElement:n,urlWhitelist:r,urlBlacklist:o,forceIncludeCurrentHostInBlacklist:i}=t,a=T.getUrlParts(document.location).hostname,s=[...o||[]];i&&!s.includes(a)&&s.push(a);const c={allowedDomains:ct(r,a),forbiddenDomains:s,...t},u=lt("href",c),l=lt("action",c);x([{search:[`a[href^=http]${e||""}`],decorator:u,rootElement:n},{search:[`form[action^=http]${e||""}`],decorator:l,rootElement:n}])}(t||{})}function ct(t,e){if(!t||t.length<1)return null;const n=[];for(const r of t){if(!r)continue;const{isWildCardDomain:t,url:o}=ut(r);try{const r=new URL(o).hostname;if(r===e&&!t)continue;n.push(t?`.${r}`:r)}catch{}}return n}function ut(t){const e=t.startsWith("."),n=e?t.slice(1):t;return{isWildCardDomain:e,url:n.startsWith("https://")||n.startsWith("http://")?n:`https://${n}`}}function lt(t,e){return n=>{const r=n[t],o=tt(r,e);if(!o)return void(e.debug&&(console.groupCollapsed("UTM PromoCode Inserter debug info"),console.info(`Skipping ${t}='${r}'`,n),console.groupEnd()));e.debug&&(console.groupCollapsed("UTM PromoCode Inserter debug info"),console.info(`Replacing ${t} from '${r}' to '${o}`,n),console.groupEnd());const i=e.onProcessItemCallback;"function"==typeof i&&i(n),n[t]=o}}const dt="utm",ft="utm_abtest";function mt(t,e){return function(t,e){return t.then((t=>200===t.status?t.json():(console.log(`${e}: ошибка получения данных`),null))).catch((()=>(console.log(`${e}: ошибка получения данных`),null)))}(fetch(t.toString(),{method:"GET",mode:"cors"}),e)}const ht="abtests/api/v1/experiments/active",gt="abtests/api/v1/experiments/active/map",pt="abtests/api/v1/variants/select",vt="getActiveExperiment",wt="getActiveExperiment",bt="getVariantToExperiment",$t="abtests/api/v1/changes",St="abtests/api/v1/preview";function Pt(t){const{url:e,onload:n=()=>null,onerror:r=()=>null,isAsync:o=!1}=t,i=document.createElement("script");i.src=e,i.async=o,i.onload=()=>{console.info(`JS успешно загружен ${e}`),n()},i.onerror=()=>{console.error(`Не удалось загрузить JS ${e}`),r()},document.head.appendChild(i)}const yt=180,Ut="ab_test_change_complete";function kt(){document.documentElement.setAttribute("style","opacity: 1")}const It="session-store-abtest-preview";function Ct(t){try{const e=new URL(t);return"https:"===e.protocol&&/^tools(-[a-zA-Z0-9-.]+)?\.(test)?kontur\.ru$/.test(e.hostname)}catch(t){return!1}}async function xt(n,r){!function(){const{currentScript:t,referrer:e}=document;Ct(e)&&window.opener&&(window.opener.postMessage({isOpen:!0},e),window.addEventListener("message",(e=>{if(!Ct(e.origin))return;if(!e.data.isAbTestPreview)return;sessionStorage.setItem(It,JSON.stringify(e.data));const{origin:n}=new URL(t.src),r=`${n}/abtests/api/v1/scripts/preview`;!function(t){const{url:e,onload:n=()=>null,onerror:r=()=>null}=t,o=document.createElement("link");o.href=e,o.rel="stylesheet",o.onload=()=>{console.info(`CSS загружено ${e}`),n()},o.onerror=()=>{console.error(`Не удалось загрузить СSS ${e}`),r()},document.head.appendChild(o)}({url:`${r}/css`}),Pt({url:`${r}/js`})})))}();const a=await function(t){return S()?function(t){const e=new URLSearchParams(window.location.search).get("experiment");return mt(new URL(`${t}/${St}/experiment/${e}`).toString(),vt)}(t):mt(new URL(`${t}/${ht}`).toString(),vt)}(n),s=await function(t){return S()?function(t){const e=new URLSearchParams(window.location.search).get("experiment");return mt(new URL(`${t}/${St}/experiment/map/${e}`).toString(),wt)}(t):mt(new URL(`${t}/${gt}`).toString(),wt)}(n),c=function(e){const n=JSON.parse(t.getItem(U))||{},r={};return e?(e.forEach((t=>{const{experimentId:e}=t,o=n[e];r[e]=o||{experimentName:t.experimentName}})),r):n}(a);if(h(r,y(c)),function(t,e){const n=w(),r=window.location.search;for(const o of Object.values(t))if(o.targetUrl&&o.targetUrl.split("?")[0]===n){const t=v(o.experimentName,o.variantName);if(r.includes(t))return m({metrikaProjectName:e,eventName:`event-abtest-jump-${t}`}),!0}return!1}(c,r))return void kt();const u=function(t,n){const r=function(t,e){const n=t.split("//")[1].split("/");let r=e;for(const t of n){const e=r.children[t];if(!e){const t=r.children["*"];return t?t.ids:[]}r=e}return r.isEndOfPath?r.ids:[]}(w(),n);if(1!==r.length)return null;const a=r[0],s=t.find((t=>t.experimentId===a));return s&&function(t){switch(t){case e:return console.log("триггер для всех"),!0;case o:return console.log("триггер для десктопов"),!0;case i:return console.log("триггер для мобильных"),!0;default:return!0}}(s.triggers)?s:null}(a,s);if(!u)return P(c),void kt();const l=u.experimentId,{experimentName:d}=u,f=c[l];if(!f.variantId||S()){const t=await function(t,e){return S()?function(t){const e=new URLSearchParams(window.location.search).get("variant");return mt(new URL(`${t}/${St}/variant/${e}`).toString(),bt)}(t):mt(new URL(`${t}/${pt}?experimentId=${e}`).toString(),bt)}(n,l);if(!t)return P(c),console.error(`Не удалось получить вариант для эксперимента: ${u.experimentName}`),void kt();Object.assign(f,t),c[l]=f,h(r,y(c)),m({metrikaProjectName:r,eventName:`event-abtest-start-${v(d,t.variantName)}`})}switch(P(c),u.experimentType){case"Redirect":!function(t,e,n){const r=function(t,e,n){const r=new URL(e.targetUrl),{search:o,hash:i}=window.location,a=b(r);if(w()===a){const n=v(t.experimentName,e.variantName);if(o.includes(n))return null}const s=function(t,e){const n=I.getCookie(dt)||"",r=T.addParameter(`?${n}`,ft,e).slice(1);return t.includes("?")?`${t}&${r}`:`${t}?${r}`}(function(t){const e=b(t);return t.search?`${e}${t.search}`:e}(r),$(n)),{hash:c}=r;return`${s}${c||i||""}`}(t,e,n);if(r){if(window.location.href===r)return void kt();window.location.replace(r)}}(u,f,c);break;case"PageChange":!function(t,e,n,r){!function(t){const e=function(t){let e="";try{e=I.getCookie(dt)||""}catch(t){console.warn("Failed to get cookie value",t)}if(e.includes(ft)){const n=`?${e}`;return T.getParameters(n)[ft]!==t?T.addParameter(n,ft,t).slice(1):e}return`${e}${e?"&":""}${ft}=${t}`}(t);try{I.setCookie(dt,e,yt)}catch(t){console.warn("Failed to set cookie value",t)}}($(t)),document.addEventListener(Ut,st),function(t,e){const n=function(t,e){if(S()){const e=new URLSearchParams(window.location.search).get("variant");return new URL(`${t}/${St}/change/${e}`)}return new URL(`${t}/${$t}?variantId=${e}`).toString()}(t,e);Pt({url:n,isAsync:!0,onerror:()=>{document.documentElement.setAttribute("style","opacity: 1");const t=new CustomEvent(Ut,{});document.dispatchEvent(t)}})}(e,n.variantId),function(t,e){m({metrikaProjectName:t,eventName:`event-abtest-replace-${v(e.experimentName,e.variantName)}`})}(r,n)}(c,n,f,r)}}})();var o=abTestStarter="undefined"==typeof abTestStarter?{}:abTestStarter;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); 
abTestStarter.start('https://services.kontur.ru', 'web_sites')