import{F as R}from"./hoisted.Dsop4A3f.js";import"./_commonjsHelpers.DLRdUVbD.js";import{l as j,c as x,m as y,g as B,R as T,e as q,f as M,n as F,s as U,a as W,o as $}from"./_baseToString.BF64sBRd.js";import{e as z,c as K,d as P}from"./scroll.D6z732Vi.js";import{A as m,J as V}from"./localization.6UVxnx2i.js";import{e as X,s as H}from"./v4.BUi6ZNk5.js";import"./helpers.M5brrsJZ.js";import"./device-id-helpers.B2Idniwd.js";import"./ui-kit.CdKkDd1h.js";import"./index.sJbE5A2F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bdce30cb-60c4-4160-adf7-f08f7d383902",e._sentryDebugIdIdentifier="sentry-dbid-bdce30cb-60c4-4160-adf7-f08f7d383902")}catch{}})();const g=1152,G={ownerId:252771,containerId:"js-adfox-fullscreen",params:{p1:"cogpj",p2:"hcqy"}},Y=[{containerId:"js-adfox-desktop-main",ownerId:252771,platform:{desktop:!0,mobile:!1},params:{p1:"dameg",p2:"gfdy"}},{containerId:"js-adfox-interscroller",ownerId:252771,params:{p1:"bzpgs",p2:"fvcx"}},{containerId:"js-adfox-scrollroll",ownerId:252771,params:{p1:"cmydr",p2:"gzqa"}},{containerId:"js-adfox-main-branding-desk",ownerId:252771,platform:{desktop:!0,mobile:!1},params:{p1:"coatn",p2:"fylw"}},{containerId:"js-adfox-main-branding-mob",ownerId:252771,platform:{desktop:!1,mobile:!0},params:{p1:"coato",p2:"fylw"}},{containerId:"js-adfox-news-branding-desk",ownerId:252771,params:{p1:"coatp",p2:"fylw"}},{containerId:"js-adfox-news-branding-mob",ownerId:252771,params:{p1:"coatq",p2:"fylw"}},{containerId:"js-adfox-profitbutton",ownerId:252771,params:{p1:"cobal",p2:"gttr"}},{ownerId:252771,containerId:"js-adfox-anchor",params:{p1:"cxead",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-right",reloadInterval:60,params:{p1:"crsny",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-right-family",reloadInterval:60,params:{p1:"crsob",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-slot2",reloadInterval:60,platform:{desktop:!1,mobile:!0},params:{p1:"crsnz",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-slot2-family",reloadInterval:60,params:{p1:"crsoc",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-slot3",platform:{desktop:!1,mobile:!0},params:{p1:"cwavd",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-slot3-family",params:{p1:"cwcab",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-slot2",reloadInterval:60,params:{p1:"crsoa",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-slot2-family",reloadInterval:60,params:{p1:"crsoe",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-top",platform:{desktop:!0,mobile:!1},params:{p1:"crsnx",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-top-family",params:{p1:"crsod",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-right2",params:{p1:"cwzkf",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-slot4",platform:{desktop:!1,mobile:!0},params:{p1:"cwzks",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-bottom1",reloadInterval:60,platform:{desktop:!0,mobile:!1},params:{p1:"cwzkh",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-bottom2",reloadInterval:60,platform:{desktop:!0,mobile:!1},params:{p1:"cwzki",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-desktop-bottom3",platform:{desktop:!0,mobile:!1},reloadInterval:60,params:{p1:"cwzkj",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-in-news1",platform:{desktop:!1,mobile:!0},params:{p1:"cwzkq",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-in-news2",platform:{desktop:!1,mobile:!0},params:{p1:"cwzkr",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-mobile-in-news3",params:{p1:"cghwl",p2:"gfdy"}},{ownerId:252771,containerId:"js-adfox-betting",params:{p1:"ddlgi",p2:"gfdy"}}],E=(e,t)=>{const n=document.createElement("a");n.href=e.href,e.target&&!j&&!document.getElementById("js-adfox-fullscreen")&&(n.target=e.target,n.rel=e.rel),n.click()},J=(e,t,n)=>{if(!window.Ya?.adfoxCode?.create)return n?.();e?.preventDefault(),t?.classList?.add("js-disabled-link"),window.handleCloseFullscreen=()=>E(t),window.Ya.adfoxCode.create({...G,onStub:()=>{t&&(t?.classList?.remove("js-disabled-link"),E(t))},onError:()=>{t&&(t?.classList?.remove("js-disabled-link"),E(t))},onRender:()=>{t?.classList?.remove("js-disabled-link")}})};class Z extends x{constructor(t=""){super(t)}async getArticlesReactionsCount(t){try{return this.get(`articles/reactions/count?articleIds=${t}`)}catch(n){throw console.error(n),n}}async getArticlesCommentsCount(t){try{return this.get(`articles/comments/count?articleIds=${t}`)}catch(n){throw console.error(n),n}}}const L=new Z("https://comments.nur.kz/"),S=999,Q=()=>Array.from(document.querySelectorAll(".js-article")),ee=e=>{const t=e.dataset.id;if(!t)return null;const n={articleId:t,articleCommentsLoaderElement:e.querySelector(".js-article-preview-comments-loader"),articleCommentsCountElement:e.querySelector(".js-article-preview-comments-count"),articleCommentsIconElement:e.querySelector(".js-article-preview-comments-icon"),articleReactionsLoaderElement:e.querySelector(".js-article-preview-reactions-loader"),articleReactionsCountElement:e.querySelector(".js-article-preview-reactions-count"),articleReactionsIconElement:e.querySelector(".js-article-preview-reactions-icon")};return Object.values(n).every(Boolean)?n:null},te=e=>{const t=new Map;return e.forEach(n=>{const o=ee(n);o&&t.set(o.articleId,o)}),t},k=(e,t,n)=>{const o=n==="reaction"?e.articleReactionsLoaderElement:e.articleCommentsLoaderElement,r=n==="reaction"?e.articleReactionsCountElement:e.articleCommentsCountElement;o.classList.add("hidden"),r.innerText=typeof t=="number"&&t>S?`${S}+`:t.toString()},ne=(e,t)=>{L.getArticlesCommentsCount(e).then(n=>{n.forEach(({id:o,count:r})=>{requestAnimationFrame(()=>{const i=t.get(o);i&&r>0&&(k(i,r,"comment"),i.articleCommentsIconElement.classList.remove("hidden"),i.articleCommentsCountElement.classList.remove("hidden"))})})}).catch(n=>{console.error("Failed to fetch articles comments on home page:",n)}),L.getArticlesReactionsCount(e).then(n=>{n.forEach(({id:o,count:r})=>{requestAnimationFrame(()=>{const i=t.get(o);i&&r>0&&(k(i,r,"reaction"),i.articleReactionsIconElement.classList.remove("hidden"),i.articleReactionsCountElement.classList.remove("hidden"))})})}).catch(n=>{console.error("Failed to fetch articles reactions on home page:",n)})},oe=()=>{const e=te(Q());if(e.size===0)return;const t=[...e.keys()].join(",");ne(t,e)};oe();document.addEventListener("click",e=>{const t=e.target.closest(".js-article-link");if(t)return J(e,t,()=>{})});const v={top:".js-branding-top",left:".js-branding-left",right:".js-branding-right"};function re(e,t){const o=document.querySelector("[data-class-names]").dataset.classNames;return new IntersectionObserver(r=>{r[0].isIntersecting?(e.classList.remove(o),t.classList.remove(o)):(e.classList.add(o),t.classList.add(o))})}const I=(e,t,n,o,r="_blank")=>{e.style.backgroundColor=n,e.style.backgroundImage=`url(${t})`,e.href=o,e.target=r};function ie(e,t=v){const n=document.querySelector(t.left),o=document.querySelector(t.right),r=document.querySelector(t.top);if(!n||!o||!r||!e)return null;const{defaultBgColor:i,link:c,imageLeft:p,imageRight:d,imageTop:s,target:a}=e;I(n,p,i,c,a),I(o,d,i,c,a),I(r,s,i,c,a),n.classList.remove("hidden"),o.classList.remove("hidden");const u=re(n,o);return u.observe(r),u}function se(e,t=v){const n=document.querySelector(t.top);if(!n||!e)return null;const{defaultBgColor:o,link:r,imageTop:i,target:c}=e;I(n,i,o,r,c)}const ae=()=>{j&&document.querySelector(v.top)?.setAttribute("href",`https://apps.apple.com/kz/app/nur-kz-%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8-%D0%BA%D0%B0%D0%B7%D0%B0%D1%85%D1%81%D1%82%D0%B0%D0%BD%D0%B0/id830230766?utm_source=nur.kz&utm_medium=organic&utm_campaign=app_install&utm_content=app_install_header_banner
`)};ae();window.enableBrandingBehavior=ie;window.enableMobileBrandingBehavior=se;const de=e=>[{imageUrl:`https://cdn.nur.kz/static/onboarding/${e}/slide-1.png`,mobileImageUrl:`https://cdn.nur.kz/static/onboarding/${e}/mobile-slide-1.png`,titleKey:"onboarding.slides.slide1.title",descriptionKey:"onboarding.slides.slide1.description",actionButtonKey:"onboarding.slides.slide1.actionButtonText"},{imageUrl:`https://cdn.nur.kz/static/onboarding/${e}/slide-2.png`,mobileImageUrl:`https://cdn.nur.kz/static/onboarding/${e}/mobile-slide-2.png`,titleKey:"onboarding.slides.slide2.title",descriptionKey:"onboarding.slides.slide2.description",actionButtonKey:"onboarding.slides.slide2.actionButtonText"},{imageUrl:`https://cdn.nur.kz/static/onboarding/${e}/slide-3.png`,mobileImageUrl:`https://cdn.nur.kz/static/onboarding/${e}/mobile-slide-3.png`,titleKey:"onboarding.slides.slide3.title",descriptionKey:"onboarding.slides.slide3.description",actionButtonKey:"onboarding.slides.slide3.actionButtonText",isFinal:!0}],ce="1",le=45*24,me=-1;function ue(e){H(`onboarding_hide_${y(e)}`,ce,le)}const pe=e=>!X(`onboarding_hide_${y(e)}`),fe=de(y(window.location.host));function h(){document.querySelector(".onboarding__dialog")?.close(),z(),ue(window.location.host)}function ge(){const e=document.querySelector(".onboarding__dialog");e&&document.addEventListener("click",t=>{t?.target?.contains(e)&&h()})}function be(){const e=document.querySelector(".onboarding__slides");let t=0,n=0;function o(){const r=document.querySelector(".onboarding__slide--active"),i=Number(r?.dataset?.slide);n