PageSourceSearch

https://mk-kz.kz/media/mkru2020/js/580c00110d1f5d88976f.js

js mk-kz.kz collected 2026-10-02 18:00:57 UTC 57,922 bytes, 1 lines download raw bytes

1(self.webpackChunkmk_ru_redisign=self.webpackChunkmk_ru_redisign||[]).push([[345],{6345:function(e,t,i){"use strict";i.r(t),i(8674),i(6992),i(3948);var s=i(9308),r=(i(3210),i(2172)),n=(i(2707),i(3507)),a=function(e){var t=e%100;return t>=11&&t<=19||t%10>=5&&t%10<=9||t%10==0?e+" материалов по теме":t%10>=2&&t%10<=4?e+" материала по теме":e+" материал по теме"},o=function(e){var t="meta"in e?(0,n.ZP)(e.meta):"",i="coverPicture"in e?'\n  <picture class="article-preview__image">\n    <img class="article-preview__image-content" width="240" height="135" loading="lazy" src="'+e.coverPicture[0].src+'" srcset="'+e.coverPicture.sort(((e,t)=>e.size-t.size)).map((e=>void 0!==e.src&&void 0!==e.size?e.src+" "+e.size+"w":"")).filter((e=>""!==e)).join(", ")+'" sizes="90px" alt="">\n  </picture>':'<picture class="article-preview__image"><img class="article-preview__image-content" width="240" height="135" loading="lazy" src="'+e.picture.src+'" alt=""></picture>';return'\n  <article class="article-preview article-preview_simple">\n    <a class="article-preview__content" href="'+e.url+'">\n      <div class="article-preview__title-photo-group"><h3 class="article-preview__title">'+e.title+"</h3>"+i+"</div>\n    </a>\n    "+t+"\n  </article>"},l=i(7572),c=(i(9601),i(5827),{increase:"js-font-size-increase",reduce:"js-font-size-reduce",reset:"js-font-size-reset"}),h={min:18,max:30,step:1,default:18,localStorageKey:"fontSize"},d=function(e){var t=e.nextElementSibling.children.length>0&&"STRONG"!==e.nextElementSibling.children[0].tagName||0===e.nextElementSibling.children.length;return"P"===e.tagName&&"P"===e.nextElementSibling.tagName&&"P"===e.nextElementSibling.nextElementSibling.tagName&&t},u=i(8809),_=i(8584),p=i(2289),v=i(4436),g=(i(4603),i(4916),i(9714),i(4723),class{constructor(e,t){this._voice=t,this._playProgress=0,this._phraseParts=g.getParts(e),this._currentPlay=null,this._onEndPart=this._onEndPart.bind(this)}static getParts(e){var t=new RegExp("(.{1,180}[,.!?]|.{1,180})","g");return e.match(t).map((e=>e.trim()))}play(){if(!(this._playProgress>=this._phraseParts.length)){if(null!==this._currentPlay)return this._currentPlay.addEventListener("end",this._onEndPart),void window.speechSynthesis.speak(this._currentPlay);var e=new SpeechSynthesisUtterance;e.lang=this._voice.lang,e.voice=this._voice,e.text=this._phraseParts[this._playProgress],e.rate=1,window.speechSynthesis.cancel(),window.speechSynthesis.speak(e),e.addEventListener("end",this._onEndPart),this._currentPlay=e}}pause(){null!==this._currentPlay&&this._currentPlay.removeEventListener("end",this._onEndPart)}stop(){this.pause(),this._playProgress=0}_onEndPart(){this._currentPlay.removeEventListener("end",this._onEndPart),this._currentPlay=null,this._playProgress++,this._playProgress===this._phraseParts.length?(this._playProgress=0,this.onEndPhrase()):this.play()}onEndPhrase(){}}),m=class{constructor(){this._isInit=!1,this._textParts=null,this._phrases=[],this._currentPlay=0,this._voice=null,this.activateButton=null,this._onPageHide=this._onPageHide.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._initVoice=this._initVoice.bind(this),this._bindActivateButton=this._bindActivateButton.bind(this),m.getVoicesIfAvailible().then(this._initVoice).then(this._bindActivateButton,(e=>{console.warn(e)}))}_initVoice(e){return new Promise(((t,i)=>{var s=m.findRuVoice(e);null!==s?(this._voice=s,this._isInit=!0,t(s)):i("Russian voice no found")}))}_bindActivateButton(e){return this.activateButton=document.querySelector(".article-tool__item_sound"),null===this.activateButton||(this.activateButton.disabled=!1,this.activateButton.checked=!1,this.activateButton.addEventListener("change",(e=>{!0===e.target.checked?(this.play(),"ga"in window&&ga("send","event","Article Reading","play"),ym(1598573,"reachGoal","textplay")):(this.pause(),"ga"in window&&ga("send","event","Article Reading","pause"))}))),e}getPhraseByNumber(e){return null===this.textParts||void 0===this.textParts[e]?null:(void 0===this._phrases[e]&&(this._phrases[e]=new g(this.textParts[e],this._voice),this._phrases[e].onEndPhrase=()=>{var t=this.getPhraseByNumber(e+1);null!==t?(this._currentPlay=e+1,t.play()):(this.activateButton.checked=!1,this._currentPlay=0)}),this._phrases[e])}get textParts(){if(null!==this._textParts)return this._textParts;var e=document.querySelector(".article__title"),t=document.querySelector(".article__subtitle"),i=document.querySelectorAll(".article__description p"),s=document.querySelectorAll(".article__body p");return this._textParts=[...m.getTextFromNode(e),...m.getTextFromNode(t),...m.getTextFromNodes(i),...m.getTextFromNodes(s)],this._textParts}static getTextFromNode(e){return null!=e?[e.innerText]:[]}static getTextFromNodes(e){if(!1 in e)return[];var t=[];for(var i of e)t.push(...m.getTextFromNode(i));return t}static getVoicesIfAvailible(){return new Promise((function(e,t){if("speechSynthesis"in window){var i=window.speechSynthesis.getVoices();void 0===i||0===i.length?window.speechSynthesis.onvoiceschanged=function(){var i=window.speechSynthesis.getVoices();void 0===i||0===i.length?t("Voices no found"):e(i)}:e(i)}else t("Too old browser")}))}static findRuVoice(e){for(var t of e)if("ru"===t.lang||"ru-RU"===t.lang||"ru_RU"===t.lang)return t;return null}play(){var e=this.getPhraseByNumber(this._currentPlay);null!==e&&(this.bindStopEvents(),e.play())}pause(){var e=this.getPhraseByNumber(this._currentPlay);this.unBindStopEvents(),e.pause(),window.speechSynthesis.cancel(),this.activateButton.checked=!1}
1bindStopEvents(){window.addEventListener("pagehide",this._onPageHide),window.addEventListener("visibilitychange",this._onVisibilityChange)}unBindStopEvents(){window.removeEventListener("pagehide",this._onPageHide),window.removeEventListener("visibilitychange",this._onVisibilityChange)}_onPageHide(){this.pause()}_onVisibilityChange(){document.hidden&&this.pause()}},w=m,y=(i(1817),class{constructor(e){this._pictureData=e,this._onImageLoad=this._onImageLoad.bind(this),this._picture=document.createElement("picture"),this._picture.innerHTML=y.innerSouce("source"in this._pictureData?this._pictureData.source:void 0),this._image=document.createElement("img"),this._image.alt="alt"in this._pictureData.img?this._pictureData.img.alt:"",this._image.addEventListener("load",this._onImageLoad),this._picture.appendChild(this._image),this._isLoaded=!1}get isLoaded(){return this._isLoaded}get innerPicture(){return this._picture.innerHTML}addClassToImage(e){this._image.classList.add(e)}removeClassFromImage(e){this._image.classList.remove(e)}static innerSouce(e){if(!e||!Array.isArray(e))return"";var t="";for(var i of e){var s="<source";for(var r in i)s+=" "+r+'="'+i[r]+'"';t+=s+=">"}return t}load(){this.isLoaded||(this._image.srcset="srcset"in this._pictureData.img?this._pictureData.img.srcset:"",this._image.src="src"in this._pictureData.img?this._pictureData.img.src:"")}_onImageLoad(e){this._image.removeEventListener("load",this._onImageLoad),this.onImageLoadCallback(e),this._isLoaded=!0}onImageLoadCallback(){}}),f=y,b={pictureContainerLoading:"gallery__image_loading",picture:"gallery__image-picture",pictureImage:"gallery__image-content",previewsContainer:"gallery__preview-link",previewsContainerLoading:"gallery__preview-link_loading",previewsContainerActive:"gallery__preview-link_active",previewPicture:"gallery__preview-image",previewPictureImage:"gallery__preview-image-content",descriptionText:"gallery__description-text",descriptionTextRemoving:"gallery__description-text_removing",imageData:"gallery__image-data"},S=class{constructor(e,t){void 0===t&&(t=b),this.settings=Object.assign(Object.assign({},b),t);var i=e.querySelector("."+this.settings.imageData);if(i){this.imageData=JSON.parse(i.innerText),i.remove(),this._photoLoading=new f(this.imageData.photo),this._photoLoading.addClassToImage(this.settings.pictureImage),this._photoLoading.onImageLoadCallback=this._onPhotoLoad.bind(this),this._previewLoading=new f(this.imageData.preview),this._previewLoading.addClassToImage(this.settings.previewPictureImage),this._previewLoading.onImageLoadCallback=this._onPreviewLoad.bind(this),this.photoContainer=e,this.photoContainer.classList.add(this.settings.pictureContainerLoading);var s=e.querySelector("."+this.settings.picture);s?this.photo=s:(this.photo=document.createElement("picture"),this.photo.classList.add(this.settings.picture)),this._photoObserver=new IntersectionObserver((e=>{e[0].intersectionRatio>.5?this.observerCallback("photo",!0):this.observerCallback("photo",!1)}),{threshold:[.1,.9]}),this._photoObserver.observe(this.photo),this.previewContainer=document.createElement("a"),this.previewContainer.href="url"in this.imageData?this.imageData.url:"#",this.previewContainer.classList.add(this.settings.previewsContainer),this.previewContainer.classList.add(this.settings.previewsContainerLoading),this.previewContainer.addEventListener("click",(e=>{this.onPreviewClick(e)})),this._preview=document.createElement("picture"),this._preview.classList.add(this.settings.previewPicture),this._previewObserver=new IntersectionObserver((e=>{e[0].isIntersecting&&this.observerCallback("preview",!0)}),{threshold:.5}),this._previewObserver.observe(this._preview),this.activateTimer=null,this.descriptionAuthorNode=null,this.descriptionTextContainer=null,this._descriptionTextNode=null,this._descriptionRemovingTimer=null,this.updateCounterCallback=null,"description"in this.imageData&&(this._descriptionTextNode=document.createElement("span"),this._descriptionTextNode.classList.add(this.settings.descriptionText),this._descriptionTextNode.innerText=this.imageData.description)}else console.log("Error: dataNode not found")}get isLoaded(){return this._photoLoading.isLoaded&&this._previewLoading.isLoaded}_onPhotoLoad(){this.photo.innerHTML=this._photoLoading.innerPicture,this.photoContainer.classList.remove(this.settings.pictureContainerLoading),this.photo.parentElement||this.photoContainer.insertAdjacentElement("afterbegin",this.photo)}_onPreviewLoad(){this._preview.innerHTML=this._previewLoading.innerPicture,this.previewContainer.classList.remove(this.settings.previewsContainerLoading),this.previewContainer.insertAdjacentElement("afterbegin",this._preview),this._previewLoading.removeClassFromImage(this.settings.previewPictureImage),this._previewLoading.addClassToImage(this.settings.pictureImage),this.photo.parentElement||(this.photo.innerHTML=this._previewLoading.innerPicture,this.photoContainer.insertAdjacentElement("afterbegin",this.photo))}onPreviewClick(){}loadPhoto(){this.isLoaded||this._photoLoading.load()}loadPreview(){this.isLoaded||this._previewLoading.load()}disconnectPreviewObserver(){this._previewObserver.disconnect()}activate(){this.previewContainer.classList.add(this.settings.previewsContainerActive),this._descriptionTextNode.classList.remove(this.settings.descriptionTextRemoving),clearTimeout(this._descriptionRemovingTimer),this._descriptionTextNode&&this.descriptionTextContainer.insertAdjacentElement("beforeend",this._descriptionTextNode),this.descriptionAuthorNode&&"author"in this.imageData&&(this.descriptionAuthorNode.innerText=this.imageData.author),this.updateCounterCallback&&this.updateCounterCallback()}deactivate(){if(this.previewContainer.classList.remove(this.settings.previewsContainerActive),this._descriptionTextNode){this._descriptionTextNode.classList.add(this.settings.descriptionTextRemoving);var e=setTimeout((()=>{this._descriptionTextNode.remove()}),500);this._descriptionRemovingTimer=e}}observerCallback(){}},L={pictureContainerLoading:"gallery__image_loading",picture:"gallery__image-picture",pictureImage:"gallery__image-content",previewsContainer:"gallery__preview-link",previewsContainerLoading:"gallery__preview-link_loading",previewsContainerActive:"gallery__preview-link_active",previewPicture:"gallery__preview-image",previewPictureImage:"gallery__preview-image-content",descriptionAuthor:"gallery__description-author",descriptionTextContainer:"gallery__description-container",descriptionText:"gallery__description-text",descriptionTextRemoving:"gallery__description-text_removing",imageData:"gallery__image-data"},C={pictureContainer:"gallery__image",pictureContainerBeforeInit:"gallery__image_no-init",picturesSlider:"gallery__images-scroll",previewsSlider:"gallery__previews-scroll",picturePreviewButton:"js-gallery-preview",pictureNextButton:"js-gallery-next",pictureNoInitButton:"gallery__image-changer_no_init",previewsSliderToStartButton:"gallery__previews-changer_preview",previewsSliderToEndButton:"gallery__previews-changer_next",descriptionAuthor:"gallery__author-name",descriptionShowMoreAuthor:"gallery__author",descriptionTextContainer:"gallery__description",counterCurrent:"js-gallery-counte_current",counterAll:"js-gallery-counte_all",activePhotoLoadingRange:1,inViewportPhotoActivateTimeout:200,activePreviewsLoadingRange:5,inViewportPreviewsLoadingRange:5,pictureClickAria:.33},k=class{constructor(e,t){var i=this;if(void 0===t&&(t=C),e){this.root=e,this.settings=Object.assign(Object.assign({},C),t);var s=k.getItemSettings(this.settings);this.picturesSlider=e.querySelector("."+this.settings.picturesSlider),"navigator"in window&&"userAgent"in window.navigator&&-1!==window.navigator.userAgent.indexOf("Version/12")&&(this.picturesSlider.style.overflow="hidden"),window.onpopstate=e=>
1{null!==e.state&&"index"in e.state&&this.activate(e.state.index,!0,!1)},this.previewSlider=document.createElement("div"),this.previewSlider.classList.add(this.settings.previewsSlider),this._isActivated=!1,this._mainPhotoLink=null,this._picturesSliderCallback=e=>{e.preventDefault();var t=this.picturesSlider.offsetWidth;e.layerX<t*this.settings.pictureClickAria&&this.activate(this._previewPictureNumber),e.layerX>t*(1-this.settings.pictureClickAria)&&this.activate(this._nextPictureNumber)},this._activeSlide=null;var r=0;this.pictures=[];var n=e.querySelectorAll("."+this.settings.pictureContainer),a=e.querySelector("."+this.settings.descriptionTextContainer),o=e.querySelector("."+this.settings.descriptionAuthor),c=e.querySelector("."+this.settings.counterCurrent),h=e.querySelector("."+this.settings.counterAll),d=0;for(var u of n){var _=new S(u,s);_&&function(){var e=d;u.classList.contains(i.settings.pictureContainerBeforeInit)||(r=e),u.classList.remove(i.settings.pictureContainerBeforeInit),i.previewSlider.append(_.previewContainer),i.pictures.push(_),_.observerCallback=i._observerCallbackGenerator(e),_.onPreviewClick=i._onPreviewClickGenerator(e),_.descriptionAuthorNode=o,_.descriptionTextContainer=a,_.updateCounterCallback=function(){c.innerText=e+1},d++}()}h&&(h.innerText=this.pictures.length);var p=document.querySelector(".gallery__more"),v=this._picturesSliderCallback;if(p){var g=new class{constructor(e,t){void 0===t&&(t=L),this.settings=Object.assign(Object.assign({},L),t);var i=e.querySelector("."+this.settings.imageData);i?(this.imageData=JSON.parse(i.innerText),i.remove(),this._isLoadedPreview=!1,this._isLoadedPhoto=!1,this.photoContainer=e,this._photoObserver=new IntersectionObserver((e=>{e[0].intersectionRatio>.5?this.observerCallback("photo",!0):this.observerCallback("photo",!1)}),{threshold:[.1,.9]}),this._photoObserver.observe(this.photoContainer),this.previewContainer=document.createElement("a"),this.previewContainer.href="url"in this.imageData?this.imageData.url:"#",this.previewContainer.classList.add("gallery__preview-link"),this.previewContainer.addEventListener("click",(e=>{this.onPreviewClick(e)})),this.previewContainer.innerHTML='<svg class="gallery__more-preview-icon" width="106" height="60" viewB
1ox="0 0 135 76" xmlns="http://www.w3.org/2000/svg"><path d="M44 29h22v12H44V29zm0 14h22v1H44v-1zm0 2h22v1H44v-1zm0 2h12v1H44v-1zM70 29h22v12H70V29zm0 14h22v1H70v-1zm0 2h22v1H70v-1zm0 2h12v1H70v-1z"></path></svg>',this.activateTimer=null,this._moreContentData=null,this._recommendContentData=null,this.backLinkNode=null,this.nextLinkNode=null,this.showMoreBackLink=document.createElement("a"),this.showMoreBackLink.classList.add("media-more__back-link"),this.showMoreBackLink.innerHTML='\n      <svg class="media-more__back-icon" width="48" height="48" style="transform: scale(-1, 1)"><use xlink:href="#icon-arrow"></use></svg>\n      <span class="visually-hidden">Предыдущее изображение</span>',this.showMoreToStartLink=document.createElement("a"),this.showMoreToStartLink.classList.add("media-more__to-start-link"),this.showMoreToStartLink.innerHTML='\n      <svg class="media-more__to-start-icon" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8.707 4.046a1 1 0 11.573 1.916 6 6 0 106.721 2.432v1.318a1 1 0 11-2 0v-5h5a1 1 0 010 2h-1.755a8 8 0 11-8.539-2.666z"></path></svg>
1\n      <span class="media-more__to-start-text">Вернуться в начало галереи</span>',this.updateCounterCallback=null,this.siteId="MKPageState"in window&&"siteId"in window.MKPageState?window.MKPageState.siteId:1):console.log("Error: dataNode not found")}get isLoaded(){return this._isLoadedPhoto&&this._isLoadedPreview}get moreContentData(){return null===this._moreContentData&&(this._moreContentData=fetch(window.MKPageState.apiDomain+"/photo-reports/recommended/").then(l.XZ).then(l.au)),this._moreContentData}get recommendContentData(){return null===this._recommendContentData&&(this._recommendContentData=fetch(window.MKPageState.apiDomain+"/section/253/articles/publications/?limit=10",{method:"GET",headers:{"X-Site-Id":""+this.siteId,"Content-Type":"application/json"}}).then(l.XZ).then(l.au)),this._recommendContentData}loadPhoto(){!1===this.isLoaded&&this.loadPreview()}_createPreviewString(e){var t=e.images.filter((e=>e.isCover));return'\n    <article class="media-more__preview">\n      <a href="'+e.url+'" class="media-more__preview-link">\n        <picture class="media-more__preview-image">\n          <img class="media-more__preview-image-content" src="'+(0!==t.length?t[0].sizes.announcePicture:e[0].images.sizes.announcePicture)+'" alt="">\n        </picture>\n        <h3 class="media-more__preview-title">'+e.title+"</h3>\n      </a>\n    </article>"}_renderContent(e,t){var i,s=null==(i=e.photoReports)?void 0:i.filter((e=>e.id!==this.imageData.id)).slice(0,2);t.articles.length>0&&(t.articles[0].images=[{isCover:!0,sizes:{announcePicture:t.articles[0].announceImage}}],t.articles[0].url=t.articles[0].url+"?from=fotorep",s.splice(1,1,t.articles[0]));var r=document.createElement("div");return r.classList.add("gallery__more-content"),r.classList.add("media-more"),r.innerHTML='\n      <h2 class="media-more__title">Смотреть ещё фото:</h2>\n      '+s.map((e=>this._createPreviewString(e))).join("")+'\n      <div class="media-more__back"></div>\n      <div class="media-more__to-start"></div>',r.querySelector(".media-more__back").append(this.showMoreBackLink),r.querySelector(".media-more__to-start").append(this.showMoreToStartLink),r}loadPreview(){if(!1===this.isLoaded){var e=this.photoContainer.dataset.background;this.moreContentData.then((e=>{this.recommendContentData.then((t=>{this.photoContainer.innerHTML="",this.photoContainer.append(this._renderContent(e,t))}))})),e&&(this.photoContainer.style.backgroundImage="url("+e+")",this.photoContainer.removeAttribute("data-background")),this._isLoadedPreview=!0,this._isLoadedPhoto=!0}}onPreviewClick(){}activate(){this.previewContainer.classList.add(this.settings.previewsContainerActive),this.photoContainer.children[0].classList.remove("media-more_hidden"),null!==this.backLinkNode&&(this.backLinkNode===document.activeElement&&this.showMoreBackLink.focus(),this.backLinkNode.style.visibility="hidden"),null!==this.nextLinkNode&&(this.nextLinkNode===document.activeElement&&this.showMoreToStartLink.focus(),this.nextLinkNode.style.visibility="hidden"),null!==this.descriptionAuthorNode&&(this.descriptionAuthorNode.style.visibility="hidden"),null!==this.updateCounterCallback&&this.updateCounterCallback()}deactivate(){this.previewContainer.classList.remove(this.settings.previewsContainerActive),this.photoContainer.children[0].classList.add("media-more_hidden"),null!==this.backLinkNode&&(this.backLinkNode.style.visibility=""),null!==this.nextLinkNode&&(this.nextLinkNode.style.visibility=""),null!==this.descriptionAuthorNode&&(this.descriptionAuthorNode.style.visibility="")}}(p);this.pictures.push(g),this._mainPhotoLink="url"in g.imageData?g.imageData.url:null,g.backLinkNode=e.querySelector(".gallery__image-changer_preview"),g.nextLinkNode=e.querySelector(".gallery__image-changer_next"),g.showMoreBackLink.href=this.pictures[this.pictures.length-2].imageData.url,g.showMoreBackLink.addEventListener("click",(e=>{e.preventDefault(),this.activate(this.pictures.length-2),0===e.x&&0===e.y&&g.backLinkNode.focus()})),g.showMoreToStartLink.href=this.pictures[0].imageData.url,g.showMoreToStartLink.addEventListener("click",(e=>{e.preventDefault(),this.activate(0),0===e.x&&0===e.y&&g.nextLinkNode.focus()})),g.observerCallback=function(e,t){this.photoVisible(this.pictures.length-1,t),this._picturesSliderCallback=t?function(){}:v}.bind(this),this.previewSlider.append(g.previewContainer),g.onPreviewClick=this._onPreviewClickGenerator(this.pictures.length-1),g.descriptionAuthorNode=e.querySelector("."+this.settings.descriptionShowMoreAuthor),g.updateCounterCallback=function(){c.innerText=d}}var m=e.querySelector("."+this.settings.previewsSlider);for(var w of(m&&m.parentNode.replaceChild(this.previewSlider,m),this._previewPictureButtons=e.querySelectorAll("."+this.settings.picturePreviewButton),this._previewPictureButtons))w.classList.remove(this.settings.pictureNoInitButton),w.addEventListener("click",(e=>{e.preventDefault(),this.activate(this._previewPictureNumber)}));for(var y of(this._nextPictureButtons=e.querySelectorAll("."+this.settings.pictureNextButton),this._nextPictureButtons))y.classList.remove(this.settings.pictureNoInitButton),y.addEventListener("click",(e=>{e.preventDefault(),this.activate(this._nextPictureNumber)}));this.picturesSlider.addEventListener("click",(e=>{this._picturesSliderCallback(e)})),this._dots=new class{constructor(e,t){this._dots=[0,0],this._pictures=t;var i=this._pictures.length-1,s=e-2<0?2-e:0,r=e+2>i?2+e-i:0;this._dots[0]=e-2-r<0?0:e-2-r,this._dots[1]=e+2+s>i?i:e+2+s;for(var n=this._dots[0];n<=this._dots[1];n++)this._pictures[n].previewContainer.setAttribute("data-dot","1");this._pictures[this._dots[0]-1]&&this._pictures[this._dots[0]-1].previewContainer.setAttribute("data-dot","0"),this._pictures[this._dots[1]+1]&&this._pictures[this._dots[1]+1].previewContainer.setAttribute("data-dot","0"),this.dotsUpdate=this._dots[1]-this._dots[0]+1===this._pictures.length?()=>{}:e=>{this._inRange(e)||(e<this._dots[0]?this._toStart(e):this._toEnd(e))}}_inRange(e){return e>=this._dots[0]&&e<=this._dots[1]}_toStart(e){this._pictures[this._dots[0]-1]&&(this._pictures[this._dots[1]+1]&&this._pictures[this._dots[1]+1].previewContainer.removeAttribute("data-dot"),this._pictures[this._dots[0]-2]&&this._pictures[this._dots[0]-2].previewContainer.setAttribute("data-dot","0"),this._pictures[this._dots[0]-1].previewContainer.setAttribute("data-dot","1"),this._pictures[this._dots[1]].previewContainer.setAttribute("data-dot","0"),this._dots=this._dots.map((e=>e-1)),this._inRange(e)||requestAnimationFrame((()=>this._toStart(e))))}_toEnd(e){this._pictures[this._dots[1]+1]&&(this._pictures[this._dots[0]-1]&&this._pictures[this._dots[0]-1].previewContainer.removeAttribute("data-dot"),this._pictures[this._dots[1]+2]&&this._pictures[this._dots[1]+2].previewContainer.setAttribute("data-dot","0"),this._pictures[this._dots[1]+1].previewContainer.setAttribute("data-dot","1"),this._pictures[this._dots[0]].previewContainer.setAttribute("data-dot","0"),this._dots=this._dots.map((e=>e+1)),this._inRange(e)||requestAnimationFrame((()=>this._toEnd(e))))}}(r,this.pictures),this._previewScrollButtonsUpdate=this._previewScrollButtonsUpdate.bind(this),this._previewScrollToStart=this._previewScrollToStart.bind(this),this._previewScrollToEnd=this._previewScrollToEnd.bind(this);var f=null;this.previewSlider.addEventListener("scroll",(()=>{f&&clearTimeout(f),f=setTimeout(this._previewScrollButtonsUpdate,200)})),this._toStartButton=e.querySelector("."+this.settings.previewsSliderToStartButton),this._toStartButton.addEventListener("click",this._previewScrollToStart),this._toEndButton=e.querySelector("."+this.settings.previewsSliderToEndButton),this._toEndButton.addEventListener("click",this._previewScrollToEnd),this._previewScrollButtonsUpdate(),this.activate(r),e.classList.remove("gallery_no-init"),window.addEventListener("resize",(()=>{this._slidersToActive()}
1)),e.classList.contains("gallery_no-urls")||window.history.replaceState({index:this._activeSlide,url:this.pictures[this._activeSlide].imageData.url},null,this.pictures[this._activeSlide].imageData.url),this.galleryInsertNode=document.querySelector(".gallery__insert"),this.galleryInsertClose=document.querySelector(".gallery__insert-close"),this.galleryInsertID=document.getElementById("yandex_rtb_R-A-592219-83"),this.changeCount=0,this.insertCount=0}}get _previewPictureNumber(){return this._activeSlide-1<0?this.pictures.length-1:this._activeSlide-1}get _nextPictureNumber(){return this._activeSlide+1>this.pictures.length-1?0:this._activeSlide+1}_observerCallbackGenerator(e){return(t,i)=>{"photo"===t&&this.photoVisible(e,i),"preview"===t&&this.previewVisible(e,i)}}_onPreviewClickGenerator(e){return t=>{t.preventDefault(),this.activate(e)}}_slidersToActive(e){void 0===e&&(e=!0),e&&this.picturesSlider.scrollTo(this.pictures[this._activeSlide].photoContainer.offsetLeft,0),this.previewSlider.scrollTo(this.pictures[this._activeSlide].previewContainer.offsetLeft+this.pictures[this._activeSlide].previewContainer.offsetWidth/2-this.previewSlider.offsetWidth/2,0)}galleryInsert(){this.galleryInsertNode&&(console.log("galleryInsert count",this.changeCount),this.galleryInsertClose.addEventListener("click",(e=>{this.root.classList.remove("gallery__insert_show"),this.galleryInsertNode.classList.add("gallery__insert_hidden")})),3===this.changeCount&&(this.insertCount++,this.galleryInsertID.innerHTML="",this.galleryInsertID.id="yandex_rtb_R-A-592219-83-"+this.insertCount,window.yaContextCb.push((()=>{Ya.Context.AdvManager.render({blockId:"R-A-592219-83",renderTo:"yandex_rtb_R-A-592219-83-"+this.insertCount})}))),10===this.changeCount&&(this.galleryInsertID.hasChildNodes()&&(this.galleryInsertNode.classList.remove("gallery__insert_hidden"),this.root.classList.add("gallery__insert_show")),this.changeCount=0))}updateUrl(e,t){if(!1===this._isActivated)this._isActivated=!0;else{var i;!0===t&&(this.root.classList.contains("gallery_no-urls")||(this.changeCount++,this.galleryInsert(),window.history.pushState({index:this._activeSlide,url:this.pictures[this._activeSlide].imageData.url},null,this.pictures[this._activeSlide].imageData.url)));var s=null==(i=document.URL.match(new RegExp(/([0-9]+)-([0-9]+)/)))?void 0:i[0];s&&((new Image).src="/photo/gallery/"+s+".gif"),"MKCounterCallbacksOnHit"in window&&window.MKCounterCallbacksOnHit.forEach((e=>{e()}))}}activate(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),this.pictures[e]&&e!==this._activeSlide&&(null!==this._activeSlide&&this.pictures[this._activeSlide].deactivate(),this.pictures[e].activate(),this._activeSlide=e,this._loadPictureFromRange(e,this.settings.activePreviewsLoadingRange,(e=>{this.pictures[e].loadPreview()})),this._loadPictureFromRange(e,this.settings.activePhotoLoadingRange,(e=>{this.pictures[e].loadPhoto()})),this._updateLinksByNumber(this._previewPictureButtons,this._previewPictureNumber),this._updateLinksByNumber(this._nextPictureButtons,this._nextPictureNumber),this._slidersToActive(t),this.updateUrl(e,i),this._dots.dotsUpdate(e))}_previewScrollToStart(){this.previewSlider.scrollTo(this.previewSlider.scrollLeft-.8*this.previewSlider.offsetWidth,0)}_previewScrollToEnd(){this.previewSlider.scrollTo(this.previewSlider.scrollLeft+.8*this.previewSlider.offsetWidth,0)}_previewScrollButtonsUpdate(){var e=this.previewSlider.scrollLeft;this._toStartButton.disabled=0===e,this._toEndButton.disabled=e+this.previewSlider.offsetWidth===this.previewSlider.scrollWidth}_loadPictureFromRange(e,t,i){for(var s=e-t<0?0:e-t,r=e+t+1>this.pictures.length?this.pictures.length:e+t+1,n=s;n<r;n++)i(n)}_updateLinksByNumber(e,t){for(var i of e)i.href="url"in this.pictures[t].imageData?this.pictures[t].imageData.url:"#"}photoVisible(e,t){t?this.pictures[e].activateTimer=setTimeout((()=>{this.activate(e,!1)}),this.settings.inViewportPhotoActivateTimeout):clearTimeout(this.pictures[e].activateTimer)}previewVisible(e,t){t&&(this.pictures[e].disconnectPreviewObserver(),this._loadPictureFromRange(e,this.settings.inViewportPreviewsLoadingRange,(e=>{this.pictures[e].loadPreview()})))}static getItemSettings(e){var t={};for(var i of["pictureContainer","pictureContainerLoading","picture","pictureImage","previewsContainer","previewsContainerLoading","previewsContainerActive","previewPicture","previewPictureImage","imageData"])i in e&&(t[i]=e[i])}},P=k,x=i(8981),E=i(2722),T=i(9275),A={isPwaInstall:!0,img:"/media/mkru2020/pwa/pwa-app.png"};i(2743),new class{constructor(e){this.container=document.querySelector(e),this.container&&(this.anchorLinks=this.container.querySelectorAll("a"),this.wrapper=this.container.parentNode,this.endArticle=document.querySelector(".article__subscription")||document.querySelector(".article-listing__header"),this.endArticle&&(this.endArticleHeight=this.endArticle.getBoundingClientRect().top+document.documentElement.scrollTop,this.init()))}init(){this.anchorLinks.forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),this.container.classList.add("article__toc_pin"),this.container.classList.remove("article__toc_show")}))}
1)),this.container.parentNode.style.setProperty("--toc-height",this.container.offsetHeight+"px"),this.container.insertAdjacentHTML("afterbegin",'<svg class="header__menu-dots-icon" width="32" height="32"><use xlink:href="#icon-menu-dots"></use></svg>'),this.container.addEventListener("click",(e=>{this.container.classList.contains("article__toc_pin")&&this.container.classList.toggle("article__toc_show")}));var e=this.throttle(this.changeState.bind(this),100);window.addEventListener("scroll",e.bind(this)),this.wrapper.getBoundingClientRect().bottom<120&&this.container.classList.add("article__toc_pin")}throttle(e,t){var i=null;return function(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];i||(i=setTimeout((()=>{e(...r),clearTimeout(i),i=null}),t))}}changeState(){this.endArticleHeight=this.endArticle.getBoundingClientRect().top+document.documentElement.scrollTop,this.endArticleHeight<window.scrollY?this.container.hidden=!0:(this.container.hidden=!1,this.wrapper.getBoundingClientRect().bottom<120?this.container.classList.add("article__toc_pin"):this.container.classList.remove("article__toc_pin"))}}(".article__toc");var I=document.querySelector(".article .js-mk-item-settings"),N=null===I?{}:JSON.parse(I.innerText);new v.Z(document.querySelector(".article-grid__in-region"),{rootShowMod:"interesting_mob-shown",item:"interesting__item",numberOfShown:1});var B=document.querySelector(".js-federal-news-in-region"),q=document.querySelector(".js-news-without-hot");if(null!==q?new v.Z(q,{rootShowMod:"js-mob-shown",item:"news-listing__item",numberOfShown:4}):null===B?new p.Z({root:"js-federal-news"}):new p.Z({root:"js-federal-news-in-region",numberOfShown:4}),null===q)new _.Z({root:"article-grid__most-read",toggle:"most-read__sort",elementsList:"most-read",currentElements:"most-read__item",numberOfShown:3});else{var M=document.querySelector(".article-grid__most-read");null!==M&&new v.Z(M,{item:"most-read__item",numberOfShown:3})}var D=new class{constructor(e){void 0===e&&(e=h),this._settings=Object.assign(Object.assign({},h),e),this._fontSize=null,this._activeArticle=new Set,this._callbacks=new Set}get fontSize(){if(null===this._fontSize){var e=localStorage&&this.settings.localStorageKey in localStorage?parseInt(localStorage[this.settings.localStorageKey],10):this.settings.default;this._fontSize=this._normalize(e)}return this._fontSize}set fontSize(e){this._fontSize=this._normalize(e),this._callCallbacks(),"localStorage"in window&&(localStorage[this.settings.localStorageKey]=this._fontSize)}_normalize(e){return e<this.settings.min?e=this.settings.min:e>this.settings.max&&(e=this.settings.max),e}addCallback(e){this._callbacks.add(e)}removeCallback(e){this._callbacks.has(e)&&this._callbacks.delete(e)}_callCallbacks(){this._callbacks.forEach((e=>{e(this.fontSize)}))}get settings(){return this._settings}increase(){this.fontSize+=1}reduce(){this.fontSize-=1}};new class{constructor(e,t,i){void 0===i&&(i=c),this._settings=Object.assign(Object.assign({},c),i),this.root=e,this._state=t,this.reduceButton=document.querySelector("."+this.settings.reduce),this.increaseButton=document.querySelector("."+this.settings.increase),this.resetButton=document.querySelector("."+this.settings.reset),this.root&&this._init()}get settings(){return this._settings}_init(){this._state.addCallback((()=>{this.update()})),this.update(),null!==this.reduceButton&&this.reduceButton.addEventListener("click",(()=>{this._state.reduce(),ym(1598573,"reachGoal","enlarge")})),null!==this.increaseButton&&this.increaseButton.addEventListener("click",(()=>{this._state.increase(),ym(1598573,"reachGoal","enlarge")})),null!==this.resetButton&&this.resetButton.addEventListener("click",(()=>{this._state.fontSize=this._defaultFontSize,ym(1598573,"reachGoal","enlarge")}))}get _minFontSize(){return this._state.settings.min}get _defaultFontSize(){return this._state.settings.default}get _maxFontSize(){return this._state.settings.max}update(){this.root.style.fontSize=this._state.fontSize===this._state.settings.default?"":this._state.fontSize+"px",null!==this.reduceButton&&(this.reduceButton.disabled=this._state.fontSize===this._minFontSize),null!==this.increaseButton&&(this.increaseButton.disabled=this._state.fontSize===this._maxFontSize),null!==this.resetButton&&(this.resetButton.disabled=this._state.fontSize===this._defaultFontSize)}}(document.querySelector(".article"),D);var j=document.querySelector(".gallery");j&&(window.gallery=new P(j)),void 0!==window.mkVideoInitSettings&&new x.Z(window.mkVideoInitSettings),new w,"MKInreadsInArticle"in window&&function(e){var t,i=document.querySelector(".article__body"),s=window.innerHeight,r=0;if(e.length>0&&null!==i){for(var n=document.querySelector(".article__header"),a=document.querySelector(".article__description"),o=document.querySelector(".article__picture-group"),c=(null!==n?n.offsetHeight:0)+(null!==a?a.offsetHeight:0)+(null!==o?o.offsetHeight:0),h=0;h<i.childElementCount-2&&0!==e.length;h++){var u=i.children[h];if(u.classList.contains("additional")?c=s>c?c-300:s-300:c+=u.offsetHeight,c>s&&d(u)){c=0;try{console.log("try-try-try-try"),u.insertAdjacentElement("afterend",(0,l.Pj)(e.pop())),r++}catch(e){console.log("Error in inread adv"),console.log(e)}}}console.log("adsInsertedCount",r),0===r&&(t=document.querySelector(".article__after-figure-banner"))&&(t.style.display="block")}}(window.MKInreadsInArticle);var z,O="MKPageState"in window&&"siteId"in window.MKPageState?window.MKPageState.siteId:1;if(!1==("type"in N&&"photoReport"===N.type)){var R=new class{constructor(){var e=document.querySelector(".js-article-post-editor-related-articles");if(null===e)return null;var t=JSON.parse(e.innerText).map((e=>
1({title:e.title,url:e.url,meta:{exclusive:"isExclusive"in e&&e.isExclusive,photo:"hasPhotos"in e&&e.hasPhotos,video:"hasVideos"in e&&e.hasVideos,views:"views"in e?e.views:0},coverPicture:[{src:e.teaserImage,size:90},{src:e.announceImage,size:210},{src:e.detailImage,size:550}]})));if(0===t.length)return null;var i,s='\n  <aside class="additional">\n    <div class="additional__content">\n      <header class="additional__header">\n        <h2 class="additional__title">Материалы по теме</h2>\n        <button class="additional__close-button">\n          <svg class="additional__close-button-icon" width="24" height="24"><use xlink:href="#icon-menu-close"></use></svg>\n          <span class="visually-hidden">Закрыть</span>\n        </button>\n      </header>\n      '+function(e){var t="";for(var i of e)t+='<li class="additional__item">'+o(i)+"</li>";return'<ul class="additional__list">'+t+"</ul>"}(i=t)+'\n      <button class="additional__show-all-button"'+(i.length<3?" disabled":"")+'>\n        <span class="additional__show-all-text">'+a(i.length)+'</span>\n        <span class="additional__show-all-icon-wrap">\n          <svg class="additional__show-all-icon" width="16" height="16"><use xlink:href="#icon-show-more"></use></svg>\n        </span>\n      </button>\n    </div>\n  </aside>',n=(0,l.JE)(s);this._root=n,this._bannerData=document.querySelector(".js-article-post-additional-banner"),this.onOpenButtonClick=this.open.bind(this),this.onCloseButtonClick=this.close.bind(this),this._onOutsideClick=this._onOutsideClick.bind(this),this.focusTrap=new r.Z(this._root),this.focusTrap.onEscCallback=this.onCloseButtonClick,this.openButton=n.querySelector(".additional__show-all-button"),this.closeButton=n.querySelector(".additional__close-button"),this.openButton.addEventListener("click",this.onOpenButtonClick),this.closeButton.addEventListener("click",this.onCloseButtonClick)}_onOutsideClick(e){for(var t=e.target;null!==t;){if(t===this._root)return;if(null===t.parentNode)return void this.close();t=t.parentNode}}open(){this._root.style.minHeight=this._root.offsetHeight+"px",document.addEventListener("click",this._onOutsideClick),window.addEventListener("keydown",this.focusTrap.onKeydownControl),this._root.classList.add("additional_open"),this.closeButton.focus()}close(){var e=document.activeElement===this.closeButton;this._root.classList.remove("additional_open"),document.removeEventListener("click",this._onOutsideClick),window.removeEventListener("keydown",this.focusTrap.onKeydownControl),this._root.removeAttribute("style"),e&&this.openButton.focus()}initBanner(){if(null!==this._bannerData)try{var e=JSON.parse(this._bannerData.textContent);if(""===e.trim())return;var t=document.createElement("li");t.innerHTML='<p class="meta" style="display:none;"><span class="meta__item meta__item_adv">Реклама</span></p>'+e,t.classList.add("additional__item"),this._root.querySelectorAll(".additional__item")[1].insertAdjacentElement("afterend",t),(0,l.fz)(t),this._updateItemCounter()}catch(e){console.log("Banner error in additional."),console.error(e)}}_updateItemCounter(){var e=this._root.querySelector(".additional__show-all-button"),t=e.querySelector(".additional__show-all-text"),i=this._root.querySelectorAll(".additional__item");t.innerText=a(i.length),e.disabled=i.length<3}};"_root"in R&&(!0===function(e){var t=e._root.querySelector(".additional__list");console.log("additionalList",t);var i=document.querySelector(".article__body");console.log("articleAllBodyNodes",i),console.log("articleAllBodyNodes.children",i.children);var s=null!==i?Array.from(i.children).filter((e=>"P"!==e.tagName||""!==e.innerText)):[];if(console.log("articleBody",s),s.length<4)return!1;5===s.length&&t.classList.add("additional__list_in-short");for(var r=Math.floor(s.length/2);r<s.length-2;r++)if("P"===s[r].tagName&&"P"===s[r+1].tagName&&"P"===s[r+2].tagName)return s[r].insertAdjacentElement("afterend",e._root),!0;return!1}(R)&&R.initBanner(),z=R._root.querySelectorAll(".additional__list li"),fetch(window.MKPageState.apiDomain+"/section/245/articles/publications/?limit=10",{method:"GET",headers:{"X-Site-Id":""+O,"Content-Type":"application/json"}}).then(l.XZ).then(l.au).then((e=>{if(!(e.articles.length<1)){var t=Math.floor(Math.random()*(e.articles.length-1)),i=e.articles[t],s=document.createElement("li");s.classList.add("additional__item"),s.classList.add("randomArticle"),s.innerHTML='<article class="article-preview article-preview_simple">\n                          <a class="article-preview__content" href="'+i.url+'?from=mat-po-teme">\n                            <div class="article-preview__title-photo-group">\n                              <h3 class="article-preview__title">'+i.title+'</h3>\n                              <picture class="article-preview__image">\n                                <img class="article-preview__image-content" loading="lazy" src="'+i.teaserImage+'" srcset="'+i.teaserImage+" 90w, "+i.teaserImage+" 210w, "+i.teaserImage+' 550w" sizes="90px" alt="" width="240" height="135">\n                              </picture>\n                            </div>\n                          </a>\n                          <p class="meta">
1\n                            <span class="meta__item meta__item_views">\n                              <svg class="meta__icon" width="16" height="16"><use xlink:href="#icon-views"></use></svg>\n                              <span class="meta__text">'+i.viewsCount+"</span>\n                            </span>\n                          </p>\n                        </article>";var r=Array.from(z).find((e=>null!==e.querySelector(".meta__item_adv"))),n=z[Math.min(1,z.length-1)];void 0!==r&&void 0!==z[0]?(z[0].after(s),s.after(r)):void 0!==n&&n.after(s)}})))}if((0,E.L)(),function(){var e=function(e){var t=[];return e.forEach((e=>{var i;t.push({class:(i=e).class,href:i.href,text:i.text,target:i.target,img:i.img?i.img:null,btn:i.btn?i.btn:null})})),t},t=document.querySelector(".article-social-networks-promotion"),i=document.querySelector(".article-subscription-inject");if(t){var s=document.querySelector(".subscription_article");if(s){var r,n,a=s.cloneNode(!0),o=i?+i.dataset.probability:0;if(Math.floor(100*Math.random())<100-o)r=(0,l.br)(t,e);else{if(!i)return;r=(0,l.br)(i,e)}window.addEventListener("mk:pwa-install-state-change",c),c()}}function c(){var e,t=null==(e=window.MKPwaUi)||null==e.getInstallMode?void 0:e.getInstallMode(),i="native"===t||"ios-manual"===t;if(i!==n){n=i;var o=i?[...r,A]:r;if(o.length){var c=o[(0,l.Al)(0,o.length-1)],h=a.cloneNode(!0),d=h.querySelector(".subscription__desc"),u=h.querySelector(".subscription__image"),_=h.querySelector(".subscription__link-wraper"),p=h.querySelector(".subscription__link-text");if(c.isPwaInstall){var v=document.createElement("button");v.type="button",v.className=h.className+" pwa-install-button",v.classList.remove("subscription_hidden"),v.setAttribute("data-pwa-install-button",""),v.innerHTML=h.innerHTML;var g=v.querySelector(".subscription__link-text");g&&(g.textContent="Установить");var m=v.querySelector(".subscription__desc");m&&(m.textContent="Установите на своё устройство «МК» на случай отключения Интернета");var w=v.querySelector(".subscription__image");return w&&(w.setAttribute("class","subscription__image subsctibe-under-article_inject"),w.style.setProperty("--inject-image","url("+c.img+")"),w.style.setProperty("background-size","contain")),s.replaceWith(v),void(s=v)}d.innerText=c.text,h.setAttribute("target",c.target),h.setAttribute("href",c.href),c.img?(u.setAttribute("class","subscription__image subsctibe-under-article_inject"),u.style.setProperty("--inject-image","url("+c.img+")"),c.btn?p.textContent=""+c.btn:_.style.display="none"):u.setAttribute("class","subscription__image "+c.class),h.classList.remove("subscription_hidden"),s.replaceWith(h),s=h}else s.classList.add("subscription_hidden")}}}(),document.querySelector(".js-not-init_most-inresectiong")){var H=e=>e.id!==N.id,V=(0,T.Hf)(".js-content-data__most-interest-region",H),F=(0,T.Hf)(".js-content-data__most-interest",H),K=document.querySelector(".js-not-init_most-inresectiong");if(null!==K){var U=(0,T.w2)(F,V,[]);if(U.length>=5){N.hasOwnProperty("type")&&"article"===N.type&&U.forEach((e=>{e.url+="?from=article_mi_b"}));var Z=(0,T.Nx)(U);Z.classList.add("interesting_mob-shown"),(0,T.GM)(Z,document.querySelector(".js-content-data__extra-data-mi")),K.replaceWith(Z),(0,s.c)()}}}else"type"in N&&"article"===N.type?(0,T.W1)(N,(function(e){if(""===e||e===[]||!Array.isArray(e))return null;var t=[];for(var i of e)if(i.id!==N.id&&(t.push(i),5===t.length))return t;return null})):(0,T.W1)(N),(0,s.c)();new v.Z(document.querySelector(".article-grid__read-more"),{rootShowMod:"interesting_mob-shown",item:"interesting__item",numberOfShown:1}),document.querySelectorAll(".js-media-slider.js-not-init").forEach((e=>{var t=e.querySelector(".js-content-data");if(null===t)return null;var i=JSON.parse(t.innerText),s=function(e){return e!==[]&&""!==e&&Array.isArray(e)?e.filter((e=>e.id!==N.id)):null},r="regionMarker"in t.dataset?{regionMarker:t.dataset.regionMarker}:{};"video"===t.dataset.content?(i.forEach((e=>{e.type="video"})),i="type"in N&&"video"===N.type?s(i):i):i="type"in N&&"photoReport"===N.type?s(i):i,i=i!==[]&&Array.isArray(i)?i:null,(0,u.CC)(e,i,r),e.classList.remove("js-media-slider")})),document.querySelectorAll(".js-media-block.js-not-init").forEach((e=>{var t=e.querySelector(".js-content-data");if(null===t)return null;var i=JSON.parse(t.innerText),s=function(e){return e!==[]&&""!==e&&Array.isArray(e)?e.filter((e=>e.id!==N.id)):null},r="regionMarker"in t.dataset?{regionMarker:t.dataset.regionMarker}:{};"video"===t.dataset.content?(i.forEach((e=>{e.type="video"})),i="type"in N&&"video"===N.type?s(i):i):i="type"in N&&"photoReport"===N.type?s(i):i,i=i!==[]&&Array.isArray(i)?i.slice(0,6):null,(0,u.JS)(e,i,r),e.classList.remove("js-media-block"),e.classList.add("media-listing_mob-shown"),new v.Z(e,{rootShowMod:"media-listing_mob-shown",item:"media-listing__item",lastShownClass:"last-shown-item_mob",numberOfShown:3})}))},9275:function(e,t,i){"use strict";i.d(t,{W1:function(){return n},Nx:function(){return a},GM:function(){return o},Hf:function(){return l},w2:function(){return c}}),i(2707),i(6992),i(3948);var s=i(7572),r=(i(4436),function(e,t){var i,s="coverPicture"in e?'\n  <picture class="article-preview__image article-preview__image_in-story">\n    <img class="article-preview__image-content" width="210" height="147" loading="lazy" src="'+e.coverPicture[0].src+'" srcset="'+e.coverPicture.sort(((e,t)=>e.size-t.size)).map((e=>void 0!==e.src&&void 0!==e.size?e.src+" "+e.size+"w":"")).filter((e=>""!==e)).join(", ")+'" sizes="'+(t>2?"90px":"(min-width: 1690px) 316px, (min-width: 1050px) 198px, (min-width: 768px) 104px, "+(0===t?"calc(100% - 40px)":"90px"))+'" alt="">\n  </picture>':'<picture class="article-preview__image article-preview__image_in-story"><img class="article-preview__image-content" width="210" height="147" loading="lazy" src="'+e.announceImage+'" alt=""></picture>';return'\n  <li class="interesting__item'+(0===t?" interesting__item_first":"")+'">\n    <article class="article-preview'+(t>2?" article-preview_interesting_last":"")+'">\n      <a class="article-preview__content'+(t>2?" article-preview__content_last-interesting":"")+'" href="'+e.url+'">\n        <div class="article-preview__story-title-group">'+s+'\n          <h3 class="article-preview__title">'+e.title+'</h3>\n        </div>\n      </a>\n      <p class="meta">\n        '+(e.isExclusive?'<span class="meta__item meta__item_exclusive"><span class="meta__text">Эксклюзив</span></span>':"")+"\n        "+(e.hasPhotos?'<span class="meta__item"><svg class="meta__icon" width="16" height="16"><use xlink:href="#icon-photo"></use></svg><span class="meta__text">Фото</span></span>':"")+"\n        "+(e.hasVideos?'<span class="meta__item"><svg class="meta__icon" width="16" height="16"><use xlink:href="#icon-video"></use></svg><span class="meta__text">Видео</span></span>
1':"")+'\n        <span class="meta__item meta__item_views meta__item_first-line"><svg class="meta__icon" width="18" height="16"><use xlink:href="#icon-views"></use></svg><span class="meta__text">'+e.viewsCount+"</span></span>\n      </p>\n      "+(null===(i=e.authors)?"":'<div class="article-preview__authors-wrap"><div class="article-preview__authors-list">'+i.map((e=>'<a class="article-preview__author" href="'+e.url+'">'+e.name+"</a>")).join("")+"</div></div>")+"\n      "+(null!==e.region?'<a class="article-preview__regions article-preview__regions_accent-left" href="'+e.region.url+'"><svg class="article-preview__regions-icon" width="24" height="24"><use xlink:href="#icon-geo-pin"></use></svg> '+e.region.name+"</a>":"")+"\n    </article>\n  </li>"}),n=function(e,t){void 0===t&&(t=function(e){return Array.isArray(e)?e.slice(0,5):null});var i=document.querySelector(".article-grid__interesting.js-not-init");if(null===i)return null;var n=i.querySelector(".js-content-data"),a=i.querySelector(".js-extra-data");if(null===n)return null;var o=t(JSON.parse(n.innerText));if(e.hasOwnProperty("type")&&"article"===e.type&&o.forEach((e=>{e.url+="?from=article_mi_a"})),null===o)return null;var l=document.createElement("div"),c="";o.forEach(((e,t)=>{c+=r(e,t)}));var h='\n<header class="aside-head"><h2 class="aside-head__title">Самое интересное</h2></header>\n<ul class="interesting interesting_under-article">\n  '+c+"\n</ul>\n";if(i.parentElement.replaceChild(l,i),i.innerHTML=h,null!==a){var d=i.querySelector(".interesting");try{var u=(0,s.Pj)(JSON.parse(a.innerText),"li");u.classList.add("last-shown-item"),u.style.display="none",d.append(u)}catch(e){console.log("Relap in most interest problem"),console.log(e)}}i.classList.remove("js-not-init"),l.parentElement.replaceChild(i,l)},a=function(e,t){void 0===t&&(t="Самое интересное");var i=document.createElement("section");i.classList.add("article-grid__interesting");var s="";e.forEach(((e,t)=>{s+=r(e,t)}));var n='\n<header class="aside-head"><h2 class="aside-head__title">'+t+'</h2></header>\n<ul class="interesting interesting_under-article">\n  '+s+"\n</ul>\n";return i.innerHTML=n,i},o=function(e,t){if(void 0===t&&(t=null),null!==t){var i=e.querySelector(".interesting");try{var r=(0,s.Pj)(JSON.parse(t.innerText),"li");r.classList.add("last-shown-item"),r.style.display="none",i.append(r)}catch(e){console.log("Relap in most interest problem"),console.log(e)}}},l=function(e,t){void 0===t&&(t=null);var i=(0,s.ch)(e,[]);return null!==t&&(i=i.filter(t)),(0,s.oA)(i)},c=function(e,t,i){var r=[];t.length>0&&r.push(t.pop());var n=i.splice(0,2-r.length);return n=n.concat(e.splice(0,5-r.length-n.length)),r.push(...(0,s.oA)(n)),r}},2722:function(e,t,i){"use strict";i.d(t,{L:function(){return o}}),i(6992),i(3948);var s=[["vk",{api:"https://vk.com/share.php",mod:"vk",title:"ВКонтакте",keys:{url:"url",title:"title",image:"image"}}],["fb",{api:"https://www.facebook.com/sharer.php",mod:"fb",title:"Facebook",keys:{url:"u"}}],["ok",{api:"https://connect.ok.ru/offer",mod:"ok",title:"Одноклассники",keys:{url:"url",title:"title",image:"imageUrl"}}],["twitter",{api:"https://twitter.com/share",mod:"tw",title:"Twitter",keys:{url:"url",title:"text"}}],["tg",{api:"https://telegram.me/share/url",mod:"tg",title:"WhatsApp",keys:{url:"url",title:"text"}}],["whatsapp",{api:"https://api.whatsapp.com/send",mod:"wa",title:"Telegram",keys:{messangerText:"text"}}],["viber",{api:"viber://forward",mod:"vb",title:"Viber",keys:{messangerText:"text"}}],["max",{api:"https://max.ru/:share",mod:"max",title:"Max",keys:{title:"text"}}]],r={url:location.href,messangerText:location.href,title:document.title},n=function(e,t){if(!e.api)return null;var i=!0,s=e.api;return"additionalKey"in e&&(s+=i?"?":"&",s+=e.additionalKey,i=!1),Object.keys(e.keys).forEach((r=>{r in t&&(s+=i?"?":"&",i=!1,s+="title"!==r||"url"in e.keys?e.keys[r]+"="+encodeURIComponent(t[r]):e.keys[r]+"="+encodeURIComponent(t[r]+" "+t.url))})),s},a=function(e,t,i){var s=e.querySelectorAll(".share__link");for(var r of s)"mod"in r.dataset&&t.has(r.dataset.mod)&&function(){var e=n(t.get(r.dataset.mod),i);r.href=e,r.addEventListener("click",(function(t){t.preventDefault(),window.open(e,"","toolbar=0,status=0,width=626,height=436")}))}()},o=function(e,t){void 0===e&&(e=new Map(s)),void 0===t&&(t=r);var i=document.querySelectorAll(".share_no-init"),n=document.createElement("div");for(var o of i)o.parentElement.replaceChild(n,o),a(o,e,t),o.classList.remove("share_no-init"),o.removeAttribute("aria-hidden"),n.parentElement.replaceChild(o,n)}},9308:function(e,t,i){"use strict";function s(e){ym(1598573,"reachGoal",e)}function r(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function n(){var e=document.querySelectorAll(".top10 .top10__item");if(e.length){var t=new Set,i=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&!t.has(e.target)&&r(e.target)&&(t.add(e.target),s("top10_"+e.target.dataset.top10Index+"_view"),i.unobserve(e.target))}))}),{threshold:1});e.forEach(((e,t)=>{var r=t+1;if(e.dataset.top10Index=r,e.addEventListener("click",(()=>{s("top10_"+r+"_click")})),1===r){var n=e.querySelector(".article-preview__title");n?(n.dataset.top10Index=r,i.observe(n)):i.observe(e)}else i.observe(e)}))}}function a(){var e=document.querySelectorAll(".interesting.interesting_under-article .interesting__item");if(e.length){var t=new Set,i=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&!t.has(e.target)&&r(e.target)&&(t.add(e.target),s("mostint_"+e.target.dataset.mostintIndex+"_view"),i.unobserve(e.target))}))}),{threshold:1});e.forEach(((e,t)=>{var r=t+1;e.dataset.mostintIndex=r,e.addEventListener("click",(()=>{s("mostint_"+r+"_click")})),i.observe(e)}))}}i.d(t,{N:function(){return n},c:function(){return a}}),i(6992),i(3948)},8981:function(e,t,i){"use strict";i(6992),i(3948),i(8674);var s=i(7572),r=class{constructor(e){this.onPlayerEnded=this.onPlayerEnded.bind(this),this.players=new Map,this.externalPlayers=e.f
1ilter((e=>e.isExternalPlayer)),this.externalPlayersInit(),this._recomendations=null,this._recomendationsData=null}get isExternalInit(){return"VIQEO"in window}get recomendations(){return null===this._recomendations&&(this._recomendations=fetch(window.MKPageState.apiDomain+"/video/popular/").then(s.XZ).then(s.au).then((e=>(this._recomendationsData=e,Promise.resolve(this._recomendationsData))))),this._recomendations}externalPlayersInit(){if(0!==this.externalPlayers.length){var e=document.createElement("script");e.src="https://cdn.viqeo.tv/js/vq_init_external_player.js?_=4518673689321",e.addEventListener("load",(e=>{window.VIQEO.subscribeTracking(this.onPlayerStarted.bind(this),"Player:started"),window.VIQEO.subscribeTracking(this.onPlayerEnded.bind(this),"Player:ended"),this.externalPlayers.forEach((e=>{var t=new class{constructor(e){void 0!==e&&"videoPath"in e&&"selector"in e&&(this.option=e,this.root=document.querySelector(e.selector),this.showMore=null,null!==this.root&&(this.playerOption={videoSrc:"https://static.mk.ru"+this.option.videoPath,profileId:this.profileId,parent:this.root},"previewPath"in this.option&&(this.playerOption.previewSrc=""+this.option.previewPath),this._player=window.VIQEO.createPlayer(this.playerOption),this._startPlaing=null,this._endPlaing=null))}get profileId(){return 180}}(e);t._player.then((e=>{this.players.has(e)||this.players.set(e,t)}))}))})),document.head.appendChild(e)}}static _previewItem(e){return'<article class="media-more__preview"><a href="'+e.url+'" class="media-more__preview-link"><picture class="media-more__preview-image"><img class="media-more__preview-image-content" src="https://static.mk.ru'+e.previewPicture+'" alt=""></picture><h3 class="media-more__preview-title">'+e.name+"</h3></a></article>"}static showMoreScreen(e){var t=document.createElement("div");return t.classList.add("article-incut__video-embed"),t.innerHTML='<div class="media-more"><h2 class="media-more__title">Смотреть ещё видео:</h2>\n      '+r._previewItem(e[0])+"\n      "+r._previewItem(e[1])+'\n      <div class="media-more__back"></div>\n      <div class="media-more__to-start"><a href="#" class="media-more__to-start-link">\n        <svg class="media-more__to-start-icon" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8.707 4.046a1 1 0 11.573 1.916 6 6 0 106.721 2.432v1.318a1 1 0 11-2 0v-5h5a1 1 0 010 2h-1.755a8 8 0 11-8.539-2.666z"></path></svg>\n        <span class="media-more__to-start-text">Вернуться в видео</span>\n      </a></div>\n    </div>',t}static hitCounter(e,t){void 0===t&&(t=!1);var i={video:e.option.id,hash:e.option.hash,isArticleInset:!!e.option.inset};t&&(i.complete=1);var s=Object.entries(i).map((e=>e[0]+"="+e[1])).join("&");return fetch(location.origin+"/counter",{method:"POST",body:s,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}})}onPlayerStarted(e){if(this.players.has(e.player)){var t=this.players.get(e.player);null===t._startPlaing&&(t._startPlaing=r.hitCounter(t))}}onPlayerEnded(e){if(this.players.has(e.player)){var t=this.players.get(e.player),i=window.VIQEO.getPlayerBy(t.option.selector);if(void 0!==t._recomendationsScreen)return i.slot.style.display="none",void(t._recomendationsScreen.style.display="");null===t._endPlaing&&(t._endPlaing=r.hitCounter(t,!0)),this.recomendations.then((e=>{var t=e.filter((e=>!0!==e.shown));return t.length<2?e.map((e=>(e.shown=!1,e))):t})).then(r.getNthItemRecomendation(2)).then((e=>{t._recomendationsScreen=r.showMoreScreen(e),t._recomendationsScreen.style.backgroundImage="url('"+t.playerOption.previewSrc+"')",t._recomendationsScreen.querySelector(".media-more__to-start-link").addEventListener("click",(e=>{e.preventDefault(),i.slot.style.display="",t._recomendationsScreen.style.display="none",i.play()})),i.slot.style.display="none",i.slot.insertAdjacentElement("afterend",t._recomendationsScreen)}))}}static getNthItemRecomendation(e){return function(t){var i=[];return(0,s.in)(e,0,t.length-1).forEach(((e,s)=>{t[e].shown=!0,i.push(t[e])})),i}}};t.Z=r}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.