import{j as e,a as L,o as S,r as g,u as R,h as E,aI as H,aK as k,aQ as O,aR as P}from"./index-DAC_nvu_.js";import{c as D,d as F,e as V}from"./selectors-BzGTQ3YA.js";import{S as G}from"./plus_icon-nnEyrxG2.js";import{s as I}from"./Toast-qkLTujD4.js";import{a as Q,b as U,s as Y,p as Z,e as J,c as K}from"./skills_icon-DNdLw3P0.js";import{t as X}from"./timer_icon-BN-Yr58j.js";import{s as A}from"./share_icon-DjRp4IpP.js";import{S as _}from"./Skeleton-B9qjVT1Z.js";import{E as ee}from"./ErrorTooltip-CSGzOk8l.js";import{S as te}from"./SEO-D3SqufAR.js";import"./info_icon-CdnwKllQ.js";const se="_link_gblad_1",M={link:se},ae=/^(https?:|mailto:|\/|#)/i,ne=({href:s,children:t})=>{const a=ae.test(s)?s:"#";return e.jsx("a",{href:a,className:M.link,target:"_blank",rel:"noopener noreferrer",children:t})},oe=({children:s})=>{const t=L();return e.jsx("button",{type:"button",className:M.link,onClick:()=>t(S("auth")),children:s})};function $(s){return typeof s=="string"?s:s.map((t,a)=>typeof t=="string"?t:t.action==="openAuth"?e.jsx(oe,{children:t.text},a):e.jsx(ne,{href:t.href??"#",children:t.text},a))}const ce="_textBlock_qn8bx_1",ie="_blockTitle_qn8bx_8",re="_blockContent_qn8bx_13",le="_paragraph_qn8bx_19",v={textBlock:ce,blockTitle:ie,blockContent:re,paragraph:le},de=({id:s,title:t,paragraphs:a=[]})=>{const n=a&&a.length>0;return e.jsxs("div",{className:v.textBlock,children:[t&&e.jsx("h2",{id:s,className:`h2 ${v.blockTitle}`,children:t}),n&&e.jsx("div",{className:v.blockContent,children:a.map((o,l)=>e.jsx("p",{className:`body-1 ${v.paragraph}`,children:$(o)},l))})]})},_e="_imageBlock_kk8dm_1",he="_image_kk8dm_1",me="_caption_kk8dm_18",B={imageBlock:_e,image:he,caption:me},xe=({id:s,src:t,caption:a})=>e.jsxs("figure",{id:s,className:B.imageBlock,children:[e.jsx("img",{src:t,alt:a||"Article image",className:B.image}),a&&e.jsx("figcaption",{className:`body-3 ${B.caption}`,children:a})]}),pe="_quoteBlock_195yu_1",ue="_quoteHeader_195yu_12",ge="_quoteAvatar_195yu_20",je="_quoteMeta_195yu_27",Ne="_quoteAuthor_195yu_33",ye="_quoteRole_195yu_39",$e="_quoteContent_195yu_44",fe="_quoteText_195yu_49",p={quoteBlock:pe,quoteHeader:ue,quoteAvatar:ge,quoteMeta:je,quoteAuthor:Ne,quoteRole:ye,quoteContent:$e,quoteText:fe},we=({id:s,text:t,author:a,role:n,avatar:o})=>e.jsxs("blockquote",{id:s,className:p.quoteBlock,children:[e.jsxs("header",{className:p.quoteHeader,children:[o&&e.jsx("img",{src:o,alt:a,className:p.quoteAvatar}),e.jsxs("div",{className:p.quoteMeta,children:[e.jsx("cite",{className:`h3 ${p.quoteAuthor}`,children:a}),n&&e.jsx("span",{className:`body-4 ${p.quoteRole}`,children:n})]})]}),e.jsx("div",{className:p.quoteContent,children:e.jsx("p",{className:`body-1 ${p.quoteText}`,children:t})})]}),ve="_listBlock_1m2h6_1",Ce="_listTitle_1m2h6_8",be="_list_1m2h6_1",C={listBlock:ve,listTitle:Ce,list:be},qe=({id:s,title:t,items:a,ordered:n})=>{const o=n?"ol":"ul";return e.jsxs("div",{className:C.listBlock,children:[t&&e.jsx("h3",{id:s,className:`h3 ${C.listTitle}`,children:t}),e.jsx(o,{className:C.list,children:a.map((l,c)=>e.jsx("li",{className:`body-1 ${C.listItem}`,children:$(l)},c))})]})},ke="_faqWrapper_1wyhx_1",Be="_mainTitle_1wyhx_8",Te="_list_1wyhx_13",Ie="_item_1wyhx_19",Ae="_questionRow_1wyhx_26",We="_question_1wyhx_26",Re="_icon_1wyhx_45",Me="_answerWrapper_1wyhx_55",ze="_itemOpen_1wyhx_61",Le="_answerContent_1wyhx_65",Se="_answer_1wyhx_55",h={faqWrapper:ke,mainTitle:Be,list:Te,item:Ie,questionRow:Ae,question:We,icon:Re,answerWrapper:Me,itemOpen:ze,answerContent:Le,answer:Se},Ee=s=>g.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},g.createElement("path",{d:"M13.5833 10.417H17.9167C18.204 10.417 18.4795 10.5311 18.6827 10.7343C18.8859 10.9375 19 11.213 19 11.5003C19 11.7876 18.8859 12.0632 18.6827 12.2664C18.4795 12.4695 18.204 12.5837 17.9167 12.5837H13.5833H11.4167H7.08333C6.79602 12.5837 6.52047 12.4695 6.3173 12.2664C6.11414 12.0632 6 11.7876 6 11.5003C6 11.213 6.11414 10.9375 6.3173 10.7343C6.52047 10.5311 6.79602 10.417 7.08333 10.417H11.4167H13.5833Z",fill:"#31323A"})),He=({id:s,items:t})=>{const[a,n]=g.useState([0]),o=l=>{n(c=>c.includes(l)?c.filter(d=>d!==l):[...c,l])};return e.jsxs("div",{id:s,className:h.faqWrapper,children:[e.jsx("h2",{className:`h2 ${h.mainTitle}`,children:"FAQ: Ответы на частые вопросы"}),e.jsx("div",{className:h.list,children:t.map((l,c)=>{const d=a.includes(c);return e.jsxs("div",{className:`${h.item} ${d?h.itemOpen:""}`,children:[e.jsxs("button",{type:"button",className:h.questionRow,onClick:()=>o(c),"aria-expanded":d,children:[e.jsx("span",{className:`body-1 ${h.question}`,children:$(l.question)}),d?e.jsx(Ee,{className:h.icon}):e.jsx(G,{className:h.icon})]}),e.jsx("div",{className:h.answerWrapper,children:e.jsx("div",{className:h.answerContent,children:e.jsx("p",{className:`body-1 ${h.answer}`,children:$(l.answer)})})})]},c)})})]})},Oe="_accentContainer_1xbx9_1",Pe="_title_1xbx9_12",De="_textWrapper_1xbx9_17",Fe="_text_1xbx9_17",Ve="_list_1xbx9_28",Ge="_listItem_1xbx9_36",f={accentContainer:Oe,title:Pe,textWrapper:De,text:Fe,list:Ve,listItem:Ge},Qe=({id:s,title:t,paragraphs:a,items:n,ordered:o})=>{const l=o?"ol":"ul";return e.jsxs("div",{id:s,className:f.accentContainer,children:[t&&e.jsx("h3",{className:`h3 ${f.title}`,children:t}),a&&a.length>0&&e.jsx("div",{className:f.textWrapper,children:a.map((c,d)=>e.jsx("p",{className:`body-1 ${f.text}`,children:$(c)},d))}),n&&n.length>0&&e.jsx(l,{className:f.list,children:n.map((c,d)=>e.jsx("li",{className:`body-1 ${f.listItem}`,children:$(c)},d))})]})},Ue="_container_1axuq_1",Ye="_header_1axuq_12",Ze="_title_1axuq_18",Je="_copyBtn_1axuq_24",Ke="_copied_1axuq_45",Xe="_contentWrapper_1axuq_50",et="_code_1axuq_54",N={container:Ue,header:Ye,title:Ze,copyBtn:Je,copied:Ke,contentWrapper:Xe,code:et},tt="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.54688%203.33772V1.63561C3.54697%201.36081%203.6562%201.0973%203.85055%200.903025C4.0449%200.708747%204.30845%200.599609%204.58324%200.599609H13.5631C13.838%200.599609%2014.1016%200.708798%2014.296%200.903155C14.4903%201.09751%2014.5995%201.36112%2014.5995%201.63598V10.6162C14.5994%2010.891%2014.4902%2011.1546%2014.2958%2011.3488C14.1015%2011.5431%2013.8379%2011.6523%2013.5631%2011.6523H11.8426'%20stroke='%239A9CB0'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.6162%203.54688H1.63524C1.36051%203.54707%201.09709%203.65635%200.902894%203.85068C0.708697%204.04502%200.599609%204.30851%200.599609%204.58324V13.5631C0.599609%2013.838%200.708798%2014.1016%200.903155%2014.296C1.09751%2014.4903%201.36112%2014.5995%201.63598%2014.5995H10.6162C10.891%2014.5994%2011.1546%2014.4902%2011.3488%2014.2958C11.5431%2014.1015%2011.6523%2013.8379%2011.6523%2013.5631V4.58361C11.6523%204.44748%2011.6255%204.31268%2011.5735%204.1869C11.5214%204.06112%2011.4451%203.94683%2011.3488%203.85055C11.2526%203.75428%2011.1383%203.6779%2011.0126%203.6258C10.8868%203.57369%2010.7524%203.54687%2010.6162%203.54688Z'%20stroke='%239A9CB0'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e",st=({id:s,title:t,content:a,copyable:n=!0})=>{const[o,l]=g.useState(!1),c=()=>{navigator.clipboard.writeText(a),l(!0),setTimeout(()=>l(!1),2e3)};return e.jsxs("div",{id:s,className:N.container,children:[e.jsxs("div",{className:N.header,children:[e.jsx("span",{className:`body-1 ${N.title}`,children:t}),n&&e.jsx("button",{type:"button",onClick:c,className:`${N.copyBtn} ${o?N.copied:""}`,"aria-label":"Копировать",children:e.jsx("img",{src:tt,alt:""})})]}),e.jsx("div",{className:N.contentWrapper,children:e.jsx("pre",{className:N.code,children:a})})]})},at="_wrapper_za34d_1",nt="_mainTitle_za34d_8",ot="_container_za34d_14",ct="_textColumn_za34d_22",it="_textContent_za34d_30",rt="_title_za34d_36",lt="_paragraph_za34d_41",dt="_imageColumn_za34d_46",_t="_image_za34d_46",ht="_caption_za34d_66",mt="_reverse_za34d_86",m={wrapper:at,mainTitle:nt,container:ot,textColumn:ct,textContent:it,title:rt,paragraph:lt,imageColumn:dt,image:_t,caption:ht,reverse:mt},xt=({id:s,mainTitle:t,title:a,text:n,imageSrc:o,imageCaption:l,imagePosition:c="right"})=>e.jsxs("div",{id:s,className:m.wrapper,children:[t&&e.jsx("h2",{className:`h2 ${m.mainTitle}`,children:t}),e.jsxs("div",{className:`${m.container} ${c==="left"?m.reverse:""}`,children:[e.jsxs("div",{className:m.textColumn,children:[a&&e.jsx("h3",{className:`h3 ${m.title}`,children:a}),e.jsx("div",{className:m.textContent,children:n.map((d,r)=>e.jsx("p",{className:`body-1 ${m.paragraph}`,children:$(d)},r))})]}),e.jsxs("figure",{className:m.imageColumn,children:[e.jsx("img",{src:o,alt:l||a,className:m.image}),l&&e.jsx("figcaption",{className:`body-4 ${m.caption}`,children:l})]})]})]}),pt="_wrapper_1dwnx_1",ut="_mainTitle_1dwnx_8",gt="_description_1dwnx_13",jt="_grid_1dwnx_18",Nt="_card_1dwnx_32",yt="_itemTitle_1dwnx_39",$t="_itemText_1dwnx_44",ft="_tagsWrapper_1dwnx_49",wt="_tag_1dwnx_49",x={wrapper:pt,mainTitle:ut,description:gt,grid:jt,card:Nt,itemTitle:yt,itemText:$t,tagsWrapper:ft,tag:wt},vt=({id:s,title:t,description:a,items:n})=>e.jsxs("div",{id:s,className:x.wrapper,children:[t&&e.jsx("h2",{className:`h2 ${x.mainTitle}`,children:t}),a&&e.jsx("p",{className:`body-1 ${x.description}`,children:a}),e.jsx("div",{className:x.grid,children:n.map((o,l)=>e.jsxs("div",{className:x.card,children:[e.jsx("h4",{className:`h3 ${x.itemTitle}`,children:o.title}),e.jsx("p",{className:`body-1 ${x.itemText}`,children:o.text}),o.tags&&o.tags.length>0&&e.jsx("div",{className:x.tagsWrapper,children:o.tags.map(c=>e.jsx("span",{className:`body-2 ${x.tag}`,children:c},c))})]},l))})]}),Ct="_container_ugke6_1",bt="_title_ugke6_7",qt="_list_ugke6_12",kt="_item_ugke6_20",Bt="_itemText_ugke6_24",Tt="_link_ugke6_28",w={container:Ct,title:bt,list:qt,item:kt,itemText:Bt,link:Tt},It=({id:s,title:t,items:a})=>e.jsxs("div",{id:s,className:w.container,children:[t&&e.jsx("h2",{className:`h2 ${w.title}`,children:t}),e.jsx("ol",{className:w.list,children:a.map((n,o)=>e.jsxs("li",{className:w.item,children:[e.jsx("span",{className:`body-1 ${w.itemText}`,children:n.title}),n.link&&e.jsx("p",{className:`body-1 ${w.link}`,children:n.link})]},o))})]}),At="_articleBody_1xryy_1",Wt={articleBody:At},Rt=({blocks:s})=>s!=null&&s.length?e.jsx("div",{className:Wt.articleBody,children:s.map(t=>{switch(t.type){case"text":return e.jsx(de,{...t},t.id);case"image":return e.jsx(xe,{...t},t.id);case"quote":return e.jsx(we,{...t},t.id);case"list":return e.jsx(qe,{...t},t.id);case"faq":return e.jsx(He,{...t},t.id);case"accent":return e.jsx(Qe,{...t},t.id);case"code":return e.jsx(st,{...t},t.id);case"textWithImage":return e.jsx(xt,{...t},t.id);case"cardGrid":return e.jsx(vt,{...t},t.id);case"references":return e.jsx(It,{...t},t.id);default:return null}})}):null,Mt="_tocWrapper_z75mj_1",zt="_header_z75mj_11",Lt="_title_z75mj_17",St="_toggleBtn_z75mj_23",Et="_list_z75mj_37",Ht="_item_z75mj_46",Ot="_link_z75mj_51",Pt="_subListWrapper_z75mj_61",u={tocWrapper:Mt,header:zt,title:Lt,toggleBtn:St,list:Et,item:Ht,link:Ot,subListWrapper:Pt},Dt=({blocks:s,manualToc:t})=>{const[a,n]=g.useState(!0),o=g.useMemo(()=>{if(t&&t.length>0)return t;const d=[];return s.forEach(r=>{r.type==="text"&&r.title&&d.push({id:r.id,title:r.title}),r.type==="list"&&r.title&&d.push({id:r.id,title:r.title}),r.type==="faq"&&d.push({id:r.id,title:"FAQ: Ответы на частые вопросы"})}),d},[s,t]);if(o.length===0)return null;const l=(d,r)=>{d.preventDefault();const j=document.getElementById(r);if(j){const z=j.getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:z,behavior:"smooth"}),window.history.pushState(null,"",`#${r}`)}else console.warn(`Element with id "${r}" not found in DOM`)},c=d=>e.jsx("ul",{className:u.list,children:d.map(r=>e.jsxs("li",{className:u.item,children:[e.jsx("a",{href:`#${r.id}`,onClick:j=>l(j,r.id),className:`body-1 ${u.link}`,children:r.title}),r.items&&r.items.length>0&&e.jsx("div",{className:u.subListWrapper,children:c(r.items)})]},r.id))});return e.jsxs("nav",{className:u.tocWrapper,children:[e.jsxs("div",{className:u.header,children:[e.jsx("h3",{className:`h2 ${u.title}`,children:"Содержание"}),e.jsxs("button",{className:`body-4 ${u.toggleBtn}`,onClick:()=>n(!a),type:"button",children:["[ ",a?"Скрыть":"Показать"," ]"]})]}),a&&c(o)]})},Ft="_container_1gct8_1",Vt="_header_1gct8_10",Gt="_meta_1gct8_17",Qt="_mainMeta_1gct8_27",Ut="_categoryName_1gct8_34",Yt="_categoryIcon_1gct8_41",Zt="_dot_1gct8_50",Jt="_readTime_1gct8_55",Kt="_timeIcon_1gct8_65",Xt="_title_1gct8_70",es="_description_1gct8_80",ts="_coverImage_1gct8_85",ss="_authorBlock_1gct8_94",as="_avatar_1gct8_100",ns="_authorInfo_1gct8_107",os="_authorName_1gct8_114",cs="_authorRole_1gct8_119",is="_body_1gct8_124",rs="_footer_1gct8_132",ls="_tags_1gct8_139",ds="_tag_1gct8_139",_s="_shareBtn_1gct8_149",hs="_footerContainer_1gct8_162",i={container:Ft,header:Vt,meta:Gt,mainMeta:Qt,categoryName:Ut,categoryIcon:Yt,dot:Zt,readTime:Jt,timeIcon:Kt,title:Xt,description:es,coverImage:ts,authorBlock:ss,avatar:as,authorInfo:ns,authorName:os,authorRole:cs,body:is,footer:rs,tags:ls,tag:ds,shareBtn:_s,footerContainer:hs},W={career:{label:"Карьера и работа",icon:K},training:{label:"Обучение и траектории",icon:J},hiring:{label:"Найм и команды",icon:Z},research:{label:"Исследования",icon:Y},skills:{label:"Навыки и развитие",icon:U},all:{label:"Блог",icon:Q}},ms=({article:s})=>{const t=g.useMemo(()=>W[s.category]||W.all,[s.category]),a=async n=>{n.preventDefault(),n.stopPropagation();const o=`${window.location.origin}/blog/${s.id}`;if(window.matchMedia("(max-width: 768px)").matches&&navigator.share)try{await navigator.share({title:s.title,text:s.description,url:o})}catch(c){c.name!=="AbortError"&&console.log(c)}else try{await navigator.clipboard.writeText(o),I({children:"Ссылка скопирована в буфер обмена"})}catch{I({children:"Не удалось скопировать ссылку"})}};return e.jsxs("article",{className:i.container,children:[e.jsxs("header",{className:i.header,children:[e.jsxs("div",{className:`body-3 ${i.meta}`,children:[e.jsxs("div",{className:i.mainMeta,children:[e.jsxs("span",{className:i.categoryName,children:[e.jsx("img",{src:t.icon,alt:t.label,className:i.categoryIcon}),t.label]}),e.jsx("span",{className:i.dot,children:"•"}),e.jsx("span",{children:s.createdAt})]}),e.jsx("button",{className:i.shareBtn,onClick:a,"aria-label":"Поделиться статьей",children:e.jsx("img",{src:A,alt:"Share"})})]}),e.jsx("h1",{className:i.title,children:s.title}),e.jsx("p",{className:`body-3 ${i.description}`,children:s.description}),e.jsx("img",{src:s.coverUrl,alt:"Cover",className:i.coverImage}),e.jsxs("div",{className:i.authorBlock,children:[e.jsx("img",{src:s.author.avatar,alt:s.author.name,className:i.avatar}),e.jsxs("div",{className:i.authorInfo,children:[e.jsx("h3",{className:`h3 ${i.authorName}`,children:s.author.name}),e.jsx("p",{className:`body-4 ${i.authorRole}`,children:s.author.role})]}),e.jsxs("span",{className:i.readTime,children:[e.jsx("img",{src:X,alt:s.readTime,className:i.timeIcon}),s.readTime]})]})]}),e.jsxs("div",{className:i.body,children:[e.jsx(Dt,{blocks:s.blocks,manualToc:s.toc}),e.jsx(Rt,{blocks:s.blocks})]}),e.jsxs("footer",{className:i.footer,children:[e.jsxs("div",{className:i.authorBlock,children:[e.jsx("img",{src:s.author.avatar,alt:s.author.name,className:i.avatar}),e.jsxs("div",{className:i.authorInfo,children:[e.jsx("h3",{className:`h3 ${i.authorName}`,children:s.author.name}),e.jsx("p",{className:`body-4 ${i.authorRole}`,children:s.author.role})]})]}),e.jsxs("div",{className:i.footerContainer,children:[e.jsx("div",{className:i.tags,children:s.tags.map(n=>e.jsx("span",{className:`body-3 ${i.tag}`,children:n},n))}),e.jsx("button",{className:i.shareBtn,onClick:a,"aria-label":"Поделиться статьей",children:e.jsx("img",{src:A,alt:"Share"})})]})]})]})},xs="_container_fe7g4_1",ps="_header_fe7g4_8",us="_meta_fe7g4_14",gs="_title_fe7g4_19",js="_description_fe7g4_25",Ns="_author_fe7g4_29",ys="_body_fe7g4_36",y={container:xs,header:ps,meta:us,title:gs,description:js,author:Ns,body:ys},$s=()=>(R(),e.jsxs("div",{className:y.container,children:[e.jsxs("div",{className:y.header,children:[e.jsxs("div",{className:y.meta,children:[e.jsx(_,{width:120,height:20}),e.jsx(_,{width:80,height:20}),e.jsx(_,{width:60,height:20})]}),e.jsxs("div",{className:y.title,children:[e.jsx(_,{height:40,width:"80%"}),e.jsx(_,{height:40,width:"60%"})]}),e.jsx("div",{className:y.description,children:e.jsx(_,{lines:2,height:20})}),e.jsx(_,{height:300,width:"100%",style:{borderRadius:"20px"}}),e.jsxs("div",{className:y.author,children:[e.jsx(_,{variant:"circle",width:48,height:48}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[e.jsx(_,{width:120,height:16}),e.jsx(_,{width:80,height:14})]})]})]}),e.jsxs("div",{className:y.body,children:[e.jsx(_,{lines:4,height:16,lineGap:10}),e.jsx(_,{height:200,width:"100%",style:{borderRadius:"12px"}}),e.jsx(_,{lines:6,height:16,lineGap:10})]})]})),fs="_contentLayout_ui60d_1",T={contentLayout:fs},Rs=()=>{var r,j,b,q;R();const{id:s}=E(),t=H(),a=k(D),n=k(F),o=k(V);if(g.useEffect(()=>(s&&t(O(s)),()=>{t(P())}),[t,s]),n)return e.jsx("div",{className:T.contentLayout,children:e.jsx($s,{})});if(o||!a)return e.jsx("div",{className:T.center,children:e.jsx(ee,{title:"Статья не найдена",message:"Возможно, она была удалена или ссылка некорректна."})});const l=`Статья - ${((r=a.seo)==null?void 0:r.title)||a.title}`,c=((j=a.seo)==null?void 0:j.description)||a.description,d={"@context":"https://schema.org","@type":"BlogPosting",headline:a.title,image:[a.coverUrl],datePublished:a.createdAt,author:{"@type":"Person",name:a.author.name},description:a.description};return e.jsxs(e.Fragment,{children:[e.jsx(te,{title:l,description:c,ogImage:a.coverUrl,keywords:(b=a.seo)==null?void 0:b.keywords,type:"article",jsonLd:d,noindex:(q=a.seo)==null?void 0:q.noindex}),e.jsx("div",{className:T.contentLayout,children:e.jsx(ms,{article:a})})]})};export{Rs as ArticlePage};