1function e(e,t){let n=e.image?.trim();if(!n)return null;if(/^https?:\/\//i.test(n)||n.startsWith(`/`))return n;let r=`/userdata/article/${(()=>{if(!e.publish_date)return new Date().getFullYear();let t=new Date(e.publish_date);return Number.isNaN(t.getTime())?new Date().getFullYear():t.getFullYear()})()}/article_${e.id}`;return t?`${r}/${t}/${n}`:`${r}/${n}`}function t(e,t){if(!e)return``;let n=new Date(e);return Number.isNaN(n.getTime())?``:new Intl.DateTimeFormat(t===`kk`?`kk-KZ`:`ru-RU`,{day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`}).format(n)}var n={а:`a`,б:`b`,в:`v`,г:`g`,д:`d`,е:`e`,Ñ:`e`,ж:`zh`,з:`z`,и:`i`,й:`y`,к:`k`,л:`l`,м:`m`,н:`n`,о:`o`,п:`p`,Ñ:`r`,Ñ:`s`,Ñ:`t`,Ñ:`u`,Ñ:`f`,Ñ
:`h`,Ñ:`ts`,Ñ:`ch`,Ñ:`sh`,Ñ:`sch`,Ñ:``,Ñ:`y`,Ñ:``,Ñ:`e`,Ñ:`yu`,Ñ:`ya`,Ó:`a`,Ò:`g`,Ò:`q`,Ò£:`n`,Ó©:`o`,Ò±:`u`,Ò¯:`u`,Ò»:`h`,Ñ:`i`};function r(e){if(!e)return`article`;let t=e.trim().toLowerCase(),r=``;for(let e of t)n[e]===void 0?/[a-z0-9]/.test(e)?r+=e:/\s|-|_/.test(e)&&(r+=`-`):r+=n[e];return r.replace(/-+/g,`-`).replace(/^-|-$/g,``)||`article`}function i(e,t){return`${r(e)}-${t}`}function a(e){let t=e.match(/-(\d+)$/);if(!t)return null;let n=Number(t[1]);return Number.isFinite(n)&&n>0?n:null}function o(e,t){return`/${e}/${t.rubric_keyword||`news`}/${i(t.title,t.id)}`}export{e as i,a as n,t as r,o as t};
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.