PageSourceSearch

https://nege.kz/static/js/default.bundle.js?v=1.6

js nege.kz collected 2026-10-02 07:24:22 UTC 15,143 bytes, 1 lines download raw bytes

1!function(){"use strict";function e(){const e=document.querySelector("[data-rates]");if(!e)return;const t=e.querySelector(".header__rates-toggle"),n=e.querySelector(".header__rates-current"),a=e.querySelector(".header__rates");if(!t||!n||!a)return;const s="nege-rates-v2",r=[{code:"USD",flag:"/static/img/header/flags/US.png",alt:"USD"},{code:"EUR",flag:"/static/img/header/flags/EU.png",alt:"EUR"},{code:"CNY",flag:"/static/img/header/flags/CN.png",alt:"CNY"},{code:"RUB",flag:"/static/img/header/flags/RU.png",alt:"RUB"}],o={data:{},selected:"USD",opened:!1,isMobile:window.matchMedia("(max-width: 768px)").matches};function c(e){try{localStorage.setItem(s,JSON.stringify(e))}catch{}}function i(e){if(null==e||""===e)return"—";const t=Number(e);return!Number.isFinite(t)||t<=0?"—":t.toLocaleString("ru-RU",{maximumFractionDigits:2})}function l(e,t){return`${i(e)} / ${i(t)}`}function d(){e.classList.remove("is-open"),e.setAttribute("aria-expanded","false"),o.opened=!1}function u(e){const t=o.data[e],a=t?l(t.buy,t.sell):"— / —";n.innerHTML=`\n      <img src="${function(e){return r.find((t=>t.code===e))?.flag||""}(e)}" alt="${e}" />\n      <span class="header__rate-code">${e}</span>\n      <span class="header__rate-val">${a}</span>\n    `}function m(e){const t=o.isMobile?r.filter((({code:t})=>t!==e)):r;a.innerHTML=t.map((({code:e,flag:t,alt:n})=>{const a=o.data[e],s=a?l(a.buy,a.sell):"— / —";return`\n          <div class="header__rate" ${o.isMobile?`data-rate-item data-code="${e}"`:""}>\n            <img src="${t}" alt="${n}" />\n            <span class="header__rate-code">${e}</span>\n            <span class="header__rate-val">${s}</span>\n          </div>\n        `})).join("")}!async function(){t.addEventListener("click",(()=>{o.isMobile&&(o.opened?d():(e.classList.add("is-open"),e.setAttribute("aria-expanded","true"),o.opened=!0))})),document.addEventListener("click",(t=>{o.opened&&o.isMobile&&(e.contains(t.target)||d())})),document.addEventListener("keydown",(e=>{o.isMobile&&"Escape"===e.key&&d()})),a.addEventListener("click",(e=>{if(!o.isMobile)return;const t=e.target.closest?.("[data-rate-item]");if(!t)return;const n=t.dataset.code;n&&(o.selected=n,u(n),m(n),c({ts:Date.now(),data:o.data,selected:n}),d())})),window.addEventListener("resize",(()=>{const e=window.matchMedia("(max-width: 768px)").matches;e!==o.isMobile&&(o.isMobile=e,d(),u(o.selected),m(o.selected))}));const n=function(){try{const e=localStorage.getItem(s);return e?JSON.parse(e):null}catch{return null}}();if(o.selected=n?.selected||"USD",n?.data&&"number"==typeof(i=n.ts)&&Date.now()-i<3e5)return o.data=n.data,u(o.selected),void m(o.selected);var i;try{o.data=await async function(){const e=await fetch("https://ex.prodengi.kz/api/v1/public/best-exchange?city_id=87",{method:"GET",headers:{Accept:"application/json"},cache:"no-store"});if(!e.ok)throw new Error(`Rates request failed: ${e.status}`);const t=await e.json(),n={};return r.forEach((({code:e})=>{const a=t.best_buy?.find((t=>t.currency===e)),s=t.best_sell?.find((t=>t.currency===e));n[e]={code:e,buy:a?.buy??null,sell:s?.sell??null}})),n}(),c({ts:Date.now(),data:o.data,selected:o.selected}),u(o.selected),m(o.selected)}catch(e){n?.data&&(o.data=n.data),u(o.selected),m(o.selected)}}()}function t(){const e=document.querySelector(".header"),t=document.querySelector("[data-weather-panel]"),n=document.querySelectorAll("[data-weather-toggle]"),a=document.querySelector("[data-weather-close]"),s=document.querySelector("[data-weather-list]")||document.querySelector(".weatherPanel__list"),r=document.querySelector(".header__weather-temp"),o=document.querySelector(".header__city");if(!(e&&t&&s&&r&&o))return;const c="nege-weather-v1",i=[{key:"astana",name:"Астана",lat:51.1694,lon:71.4491},{key:"almaty",name:"Алматы",lat:43.222,lon:76.8512},{key:"shymkent",name:"Шымкент",lat:42.3155,lon:69.5869},{key:"karaganda",name:"Қарағанды",lat:49.8064,lon:73.0855},{key:"aktobe",name:"Ақтөбе",lat:50.2839,lon:57.166},{key:"atyrau",name:"Атырау",lat:47.0945,lon:51.9239},{key:"aktau",name:"Ақтау",lat:43.6511,lon:51.1975},{key:"oskemen",name:"Өскемен",lat:49.9483,lon:82.6285},{key:"pavlodar",name:"Павлодар",lat:52.2873,lon:76.9674},{key:"kostanay",name:"Қостанай",lat:53.2144,lon:63.6246},{key:"kyzylorda",name:"Қызылорда",lat:44.8528,lon:65.5092},{key:"taraz",name:"Тараз",lat:42.9,lon:71.3667}],l={clear:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n  <path d="M12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM11 1H13V4H11V1ZM11 20H13V23H11V20ZM3.51472 4.92893L4.92893 3.51472L7.05025 5.63604L5.63604 7.05025L3.51472 4.92893ZM16.9497 18.364L18.364 16.9497L20.4853 19.0711L19.0711 20.4853L16.9497 18.364ZM19.0711 3.51472L20.4853 4.92893L18.364 7.05025L16.9497 5.63604L19.0711 3.51472ZM5.63604 16.9497L7.05025 18.364L4.92893 20.4853L3.51472 19.0711L5.63604 16.9497ZM23 11V13H20V11H23ZM4 11V13H1V11H4Z" fill="#0086C7"/>\n</svg>',snow:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n  <path d="M12.0007 3.29817L14.446 1.66797L15.5554 3.33207L13.0007 5.0352V10.2678L17.5323 7.65152L17.7299 4.58751L19.7257 4.71623L19.5366 7.64902L22.171 8.95162L21.2846 10.7444L18.5323 9.38357L14.001 11.9996L18.5326 14.616L21.2849 13.2551L22.1714 15.0479L19.537 16.3505L19.7261 19.2833L17.7302 19.412L17.5326 16.348L13.0007 13.7315V18.9648L15.5554 20.6679L14.446 22.332L12.0007 20.7018L9.55544 22.332L8.44604 20.6679L11.0007 18.9648V13.7319L6.46884 16.3484L6.27123 19.4124L4.27538 19.2836L4.46452 16.3508L1.83008 15.0483L2.71653 13.2554L5.46884 14.6163L10.001 11.9996L5.46922 9.38322
1L2.71691 10.7441L1.83046 8.95127L4.4649 7.64867L4.27576 4.71588L6.27161 4.58716L6.46922 7.65116L11.0007 10.2674V5.0352L8.44604 3.33207L9.55544 1.66797L12.0007 3.29817Z" fill="#0086C7"/>\n</svg>',rain:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n  <path d="M5 16.9297C2.60879 15.5465 1 12.9611 1 10C1 5.58172 4.58172 2 9 2C12.3949 2 15.2959 4.11466 16.4576 7.09864C16.7951 7.0339 17.1436 7 17.5 7C20.5376 7 23 9.46243 23 12.5C23 15.0176 21.3085 17.14 19 17.793V15.6632C20.1825 15.1015 21 13.8962 21 12.5C21 10.567 19.433 9 17.5 9C16.5205 9 15.6351 9.40232 14.9998 10.0507C14.9999 10.0338 15 10.0169 15 10C15 6.68629 12.3137 4 9 4C5.68629 4 3 6.68629 3 10C3 11.777 3.7725 13.3736 5 14.4722V16.9297ZM7 16H9V20H7V16ZM15 16H17V20H15V16ZM11 19H13V23H11V19Z" fill="#0086C7"/>\n</svg>',cloud:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n  <path d="M9.98392 5.05991C11.1323 3.22236 13.1734 2 15.5 2C19.0899 2 22 4.91015 22 8.5C22 9.58031 21.7365 10.5991 21.2701 11.4955C22.3351 12.4985 23 13.9216 23 15.5C23 18.5376 20.5376 21 17.5 21H9C4.58172 21 1 17.4183 1 13C1 8.58172 4.58172 5 9 5C9.33312 5 9.66149 5.02036 9.98392 5.05991ZM12.0554 5.60419C14.0675 6.43637 15.6662 8.06578 16.4576 10.0986C16.7951 10.0339 17.1436 10 17.5 10C18.2351 10 18.9366 10.1442 19.5776 10.4059C19.8486 9.82719 20 9.18128 20 8.5C20 6.01472 17.9853 4 15.5 4C14.1177 4 12.8809 4.6233 12.0554 5.60419ZM17.5 19C19.433 19 21 17.433 21 15.5C21 13.567 19.433 12 17.5 12C16.5205 12 15.6351 12.4023 14.9998 13.0507C14.9999 13.0338 15 13.0169 15 13C15 9.68629 12.3137 7 9 7C5.68629 7 3 9.68629 3 13C3 16.3137 5.68629 19 9 19H17.5Z" fill="#0086C7"/>\n</svg>',wind:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n  <path d="M10.5 17H4V15H10.5C12.433 15 14 16.567 14 18.5C14 20.433 12.433 22 10.5 22C8.99957 22 7.71966 21.0559 7.22196 19.7293L9.09513 19.0268C9.30843 19.5954 9.85696 20 10.5 20C11.3284 20 12 19.3284 12 18.5C12 17.6716 11.3284 17 10.5 17ZM5 11H18.5C20.433 11 22 12.567 22 14.5C22 16.433 20.433 18 18.5 18C16.9996 18 15.7197 17.0559 15.222 15.7293L17.0951 15.0268C17.3084 15.5954 17.857 16 18.5 16C19.3284 16 20 15.3284 20 14.5C20 13.6716 19.3284 13 18.5 13H5C3.34315 13 2 11.6569 2 10C2 8.34315 3.34315 7 5 7H13.5C14.3284 7 15 6.32843 15 5.5C15 4.67157 14.3284 4 13.5 4C12.857 4 12.3084 4.40463 12.0951 4.97317L10.222 4.27073C10.7197 2.94414 11.9996 2 13.5 2C15.433 2 17 3.567 17 5.5C17 7.433 15.433 9 13.5 9H5C4.44772 9 4 9.44772 4 10C4 10.5523 4.44772 11 5 11Z" fill="#0086C7"/>\n</svg>'};function d(e){if("number"!=typeof e)return"—";const t=Math.round(e);return`${t>0?"+":""}${t}°C`}const u=()=>{try{const e=localStorage.getItem(c);return e?JSON.parse(e):null}catch{return null}},m=e=>{try{localStorage.setItem(c,JSON.stringify(e))}catch{}},h=()=>{t.setAttribute("aria-hidden","false"),t.classList.add("is-open"),e.classList.add("is-weather-open")},y=()=>{t.setAttribute("aria-hidden","true"),t.classList.remove("is-open"),e.classList.remove("is-weather-open")};function L(e){const t=function(e){const t=Number(e);return 0===t?"clear":1===t||2===t||3===t||45===t||48===t?"cloud":51===t||53===t||55===t||56===t||57===t||61===t||63===t||65===t||66===t||67===t?"rain":71===t||73===t||75===t||77===t?"snow":80===t||81===t||82===t?"rain":85===t||86===t?"snow":95===t||96===t||99===t?"rain":"cloud"}(e.weathercode),n=l[t]||l.cloud;return`\n      <div class="weatherCol">\n        <button class="weatherRow__city" type="button" data-city-key="${e.key}">\n          ${e.name}\n        </button>\n        <span class="weatherRow__badge">\n          <span class="weatherRow__ico" aria-hidden="true">${n}</span>\n          ${d(e.temperature)}\n        </span>\n      </div>\n    `}function g(e){let t="";for(let n=0;n<e.length;n+=2){const a=e[n],s=e[n+1];t+='<div class="weatherRow">',t+=L(a),t+=s?L(s):'<div class="weatherCol weatherCol--empty"></div>',t+="</div>"}s.innerHTML=t}n.forEach((e=>e.addEventListener("click",h))),a&&a.addEventListener("click",y),document.addEventListener("keydown",(e=>{"Escape"===e.key&&y()})),document.addEventListener("click",(e=>{if("true"===t.getAttribute("aria-hidden"))return;const n=e.target,a=t.contains(n),s=n.closest?.("[data-weather-toggle]");a||s||y()}));const w={selectedCityKey:"almaty",items:[]};function f(){const e=w.items.find((e=>e.key===w.selectedCityKey));e&&(r.textContent=d(e.temperature),function(e){const t=o.querySelector("svg");o.textContent=e+" ",t&&o.appendChild(t)}(e.name),s.querySelectorAll(".weatherRow__city").forEach((e=>e.classList.toggle("is-active",e.dataset.cityKey===w.selectedCityKey))))}!async function(){w.selectedCityKey=function(){const e=u();if(e?.selectedCityKey)return e.selectedCityKey;const t=o.childNodes?.[0]?.textContent?.trim(),n=i.find((e=>e.name===t));return n?.key||"almaty"}(),s.addEventListener("click",(e=>{const t=e.target.closest?.("[data-city-key]");if(!t)return;const n=t.dataset.cityKey;w.selectedCityKey=n,f(),m({ts:Date.now(),items:w.items,selectedCityKey:w.selectedCityKey}),y()}));const e=u();if(e?.items&&"number"==typeof(t=e.ts)&&Date.now()-t<6e5)return w.items=e.items,g(w.items),void f();var t;try{w.items=await async function(e){const t=e.map((e=>e.lat)).join(","),n=e.map((e=>e.lon)).join(","),a=`https://api.open-meteo.com/v1/forecast?latitude=${encodeURIComponent(t)}&longitude=${encodeURIComponent(n)}&current_weather=true&timezone=auto`,s=await fetch(a,{cache:"no-store"});if(!s.ok)throw new Error("Weather request failed");const r=await s.json();return(Array.isArray(r)?r:[r]).map(((t,n)=>{const a=t?.current_weather;return{key:e[n].key,name:e[n].name,temperature:"number"==typeof a?.temperature?a.temperature:null,weathercode:a?.weathercode??null,time:a?.time??null}}))}(i),m({ts:Date.now(),items:w.items,selectedCityKey:w.selectedCityKey}),g(w.items),f()}catch{e?.items&&(w.items=e.items,g(w.items),f())}}()}function n(){const n=document.querySelector(".header");if(function(){const e="theme",t=document.documentElement,n=document.querySelector("[data-theme-toggle]");if(!n)return;const a=e=>{const a="dark"===e;t.classList.toggle("dark",a),n.setAttribute("aria-pressed",String(a))}
1,s=window.matchMedia("(prefers-color-scheme: dark)").matches,r=(()=>{try{return localStorage.getItem(e)}catch{return null}})();a("dark"===r||"light"===r?r:s?"dark":"light"),requestAnimationFrame((()=>{document.documentElement.classList.add("theme-ready")})),n.addEventListener("click",(()=>{const n=t.classList.contains("dark")?"light":"dark";a(n),(t=>{try{localStorage.setItem(e,t)}catch{}})(n)}))}(),!n)return e(),void t();!function(e){const t=e.querySelector("[data-search-toggle]"),n=e.querySelector("[data-search-panel]"),a=()=>e.classList.contains("is-search-open"),s=()=>{e.classList.remove("is-search-open")};t&&n&&(t.addEventListener("click",(t=>{t.preventDefault(),a()?s():(e.classList.remove("is-menu-open"),e.classList.remove("is-weather-open"),e.classList.add("is-search-open"),document.body.classList.remove("is-locked"))})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&s()})),document.addEventListener("click",(e=>{if(!a())return;const t=e.target;t instanceof Element&&(t.closest("[data-search-panel]")||t.closest("[data-search-toggle]")||s())})))}(n),function(e){const t=e.querySelector(".header__burger"),n=e.querySelector("[data-menu-sidebar]"),a=e.querySelector("[data-menu-close]");if(!t||!n)return;const s=()=>e.classList.contains("is-menu-open"),r=()=>{e.classList.remove("is-menu-open"),n.setAttribute("aria-hidden","true"),document.body.classList.remove("is-locked")};t.addEventListener("click",(t=>{t.preventDefault(),s()?r():(e.classList.remove("is-search-open"),e.classList.remove("is-weather-open"),e.classList.add("is-menu-open"),n.setAttribute("aria-hidden","false"),document.body.classList.add("is-locked"))})),a?.addEventListener("click",(e=>{e.preventDefault(),r()})),document.addEventListener("click",(e=>{if(!s())return;const t=e.target;t instanceof Element&&(t.closest("[data-menu-sidebar]")||t.closest(".header__burger")||r())})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&r()}))}(n),e(),t()}document.addEventListener("DOMContentLoaded",(()=>{n(),function(){let e=Array.from(document.querySelectorAll("img.lazy")),t=Array.from(document.querySelectorAll("source.lazy"));if("IntersectionObserver"in window){let n=new IntersectionObserver(((e,t)=>{e.forEach((e=>{if(e.isIntersecting){let n=e.target;"IMG"===n.tagName?n.src=n.dataset.src:"SOURCE"===n.tagName&&(n.srcset=n.dataset.srcset),n.classList.remove("lazy"),t.unobserve(n)}}))}));e.concat(t).forEach((e=>{n.observe(e)}))}else{let t=!1;const n=()=>{!1===t&&(t=!0,setTimeout((()=>{e.forEach((t=>{t.getBoundingClientRect().top<=window.innerHeight&&t.getBoundingClientRect().bottom>=0&&"none"!==getComputedStyle(t).display&&(t.src=t.dataset.src,t.srcset=t.dataset.srcset,t.classList.remove("lazy"),e=e.filter((e=>e!==t)),0===e.length&&(document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)))})),t=!1}),200))};document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationchange",n)}}()}))}();

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.