1import{c as ge,e as _e,f as fe,g as he}from"./chunk-AHVHXV5M.js";import{a as de}from"./chunk-IYIXZA2E.js";import"./chunk-T477LZZP.js";import{b as ue,c as pe}from"./chunk-X2S22MOD.js";import"./chunk-SZKC77YR.js";import"./chunk-STAFUBEC.js";import"./chunk-36QGUXGL.js";import"./chunk-4DFU7RH5.js";import"./chunk-J72GSHTC.js";import{a as se}from"./chunk-FZ5IS2D4.js";import{a as me,b as ce}from"./chunk-2J55GRCB.js";import"./chunk-GB5GBUON.js";import"./chunk-LKTRCDCR.js";import{b as le}from"./chunk-DMY3H4IB.js";import"./chunk-76W42G5L.js";import"./chunk-G6A6YPFG.js";import"./chunk-FDJDGCBD.js";import{j as oe}from"./chunk-L5YPXMLJ.js";import{a as X,c as q,e as H}from"./chunk-F5OCHRC5.js";import"./chunk-QTDTO7BC.js";import"./chunk-5BWHHP6R.js";import"./chunk-NB2M2N6L.js";import"./chunk-J5VBO6ZC.js";import"./chunk-EDO74B7O.js";import"./chunk-BMMKHR2B.js";import"./chunk-SUKSKTBG.js";import"./chunk-GI2MEETV.js";import"./chunk-2OZ3VZKX.js";import{a as ae}from"./chunk-YJACMEVJ.js";import"./chunk-EZAWR2KN.js";import{a as ee,c as ne}from"./chunk-OAEDTLGA.js";import"./chunk-XBINRJTF.js";import"./chunk-F2I26AL6.js";import"./chunk-CG7OMNUZ.js";import{a as ie}from"./chunk-QM2QG644.js";import{a as Z}from"./chunk-MVSTJOUV.js";import"./chunk-VN3FQGF2.js";import"./chunk-GREP6RXZ.js";import{r as W,s as G,t as J}from"./chunk-FDXXEPOG.js";import{a as re}from"./chunk-HGQXL2MS.js";import"./chunk-ZGRMU7QE.js";import{a as te}from"./chunk-M73RLUUB.js";import{a as Q,d as y}from"./chunk-UVSZBC4Q.js";import"./chunk-GLYOPDGR.js";import{i as Y}from"./chunk-6XDZRRGZ.js";import"./chunk-2V7R246S.js";import{$c as B,Ba as T,Bc as l,Ca as P,Ga as z,Gb as E,I as F,Ic as V,Jc as K,Ma as k,Mc as $,Oa as N,Pc as c,Qc as C,Rc as I,ad as A,cc as _,dc as f,ec as L,ed as S,fc as x,gc as h,gd as b,hc as w,ic as p,jc as n,kc as a,lc as m,ob as R,od as g,sb as o,ta as u,td as v,uc as U,ud as j,w as M,zc as D}from"./chunk-RUH5ZQFX.js";import"./chunk-ZGVHDELW.js";function ve(t,s){if(t&1&&(n(0,"span",5),c(1),a()),t&2){let e=s.$implicit;o(),C(e)}}function ye(t,s){if(t&1&&(n(0,"a",1)(1,"div",0)(2,"div",2)(3,"span",3),c(4),S(5,"date"),a(),n(6,"div",4),h(7,ve,2,1,"span",5,x),a()(),n(9,"div",6),m(10,"cu-site-kit-deffered-image-ui",7),a(),n(11,"div",8)(12,"h3",9),c(13),a(),n(14,"p",10),c(15),a()()()()),t&2){let e=l(2);p("href",e.newsLink(),R),o(4),C(b(5,6,e.startDate(),"dd.MM.yyyy")),o(3),w(e.tags()),o(3),p("src",e.previewImageUrl()||"https://static.centraluniversity.ru/app/site/assets/features/news/empty-preview-image.png")("alt",e.title()),o(3),C(e.title()),o(2),I(" ",e.summary()," ")}}function xe(t,s){if(t&1&&(n(0,"span",5),c(1),a()),t&2){let e=s.$implicit;o(),C(e)}}function Se(t,s){if(t&1&&(n(0,"div",0)(1,"div",2)(2,"span",3),c(3),S(4,"date"),a(),n(5,"div",4),h(6,xe,2,1,"span",5,x),a()(),n(8,"div",6),m(9,"cu-site-kit-deffered-image-ui",7),a(),n(10,"div",8)(11,"h3",9),c(12),a(),n(13,"p",10),c(14),a()()()),t&2){let e=l(2);o(3),C(b(4,5,e.startDate(),"dd.MM.yyyy")),o(3),w(e.tags()),o(3),p("src",e.previewImageUrl()||"https://static.centraluniversity.ru/app/site/assets/features/news/empty-preview-image.png")("alt",e.title()),o(3),C(e.title()),o(2),I(" ",e.summary()," ")}}function be(t,s){if(t&1&&_(0,ye,16,9,"a",1)(1,Se,15,8,"div",0),t&2){let e=l();f(e.hasValidLink()?0:1)}}function Me(t,s){t&1&&(n(0,"div",0)(1,"div",2),m(2,"cu-site-kit-skeleton-ui",11)(3,"cu-site-kit-skeleton-ui",12),a(),n(4,"div",13),m(5,"cu-site-kit-skeleton-ui",14),a(),n(6,"div",8),m(7,"cu-site-kit-skeleton-ui",15)(8,"cu-site-kit-skeleton-ui",16)(9,"cu-site-kit-skeleton-ui",17),a()())}var we=(()=>{class t{constructor(){this.title=v(""),this.summary=v(""),this.startDate=v(""),this.tags=v(null),this.previewImageUrl=v(null),this.newsLink=v(null),this.hasValidLink=g(()=>{let e=this.newsLink();return e&&e.trim().length>0}),this.isReady=g(()=>!!this.title()&&!!this.summary()&&!!this.startDate())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cu-site-kit-card-news-m-ui"]],inputs:{title:[1,"title"],summary:[1,"summary"],startDate:[1,"startDate"],tags:[1,"tags"],previewImageUrl:[1,"previewImageUrl"],newsLink:[1,"newsLink"]},decls:2,vars:1,consts:[[1,"card-news-m"],["rel","noopener noreferrer",1,"card-news-m__link",3,"href"],[1,"card-news-m__status"],[1,"card-news-m__date","font-body-m-400"],[1,"card-news-m__tags"],[1,"card-news-m__tag","font-body-m-400"],[1,"card-news-m__preview-wrapper"],["innerImgClass","object-cover overflow-hidden size-full rounded-md",1,"card-news-m__preview",3,"src","alt"],[1,"card-news-m__content"],[1,"card-news-m__title","font-h-s","d:font-h-s"],[1,"card-news-m__summary","d:font-body-m-400","font-body-m-400","cu-site-color-grey-300"],[1,"w-80","h-[1.125rem]"],[1,"w-160","h-[1.125rem]"],[1,"card-news-m__preview-skeleton"],[1,"h-[13.188rem]"],[1,"w-320","h-[3.75rem]"],[1,"w-320","h-[1.125rem]"],[1,"w-240","h-[1.125rem]"]],template:function(i,r){i&1&&_(0,be,2,1)(1,Me,10,0,"div",0),i&2&&f(r.isReady()?0:1)},dependencies:[le,ie,Y],styles:['[_nghost-%COMP%]{display:block;height:100%;width:20rem}@media screen and (max-width:63.999em){[_nghost-%COMP%]{width:22.188rem}}.card-news-m__link[_ngcontent-%COMP%]{display:block;height:100%;color:inherit;text-decoration:none}.card-news-m[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;flex-direction:column;align-items:flex-start;padding:1.5rem 0 0;gap:1.5rem;border-top:1px solid var(--cu-site-border-normal);color:#fff;height:100%}.card-news-m__status[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;gap:.5rem;height:2.75rem}.card-news-m__tags[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-news-m__tag[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:center;flex-shrink:0}.card-news-m__tag[_ngcontent-%COMP%]:not(:first-child):before{content:"\\2022";display:inline-block;margin:.375rem;color:#fff;font-size:1rem;line-height:1}.card-news-m__preview-wrapper[_ngcontent-%COMP%]{position:relative;max-height:13.188rem;overflow:hidden;border-radius:.375rem}.card-news-m__link[_ngcontent-%COMP%]:hover .card-news-m__preview[_ngcontent-%COMP%]{transform:scale(1.1)}.card-news-m__preview[_ngcontent-%COMP%]{display:block;width:22.125rem;height:13.188rem;object-fit:cover;transition:transform .5s cubic-bezier(.6,0,.4,1)}@media screen and (min-width:64em){.card-news-m__preview[_ngcontent-%COMP%]{width:20rem;height:13.188rem}}.card-news-m__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.card-news-m__summary[_ngcontent-%COMP%]{font-size:1rem;line-height:1.125rem}.card-news-m__preview-skeleton[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})}}return t})();var Te=["newsTitle"],Pe=()=>({nominative:"\u043D\u043E\u0432\u043E\u0441\u0442\u0438",genitive:"\u043D\u043E\u0432\u043E\u0441\u0442\u0435\u0439"}),ke=(t,s)=>s.id;function Ne(t,s){t&1&&(n(0,"div",4),m(1,"tui-icon",5),n(2,"div",6),c(3," \u0421\u043A\u043E\u0440\u043E \u0437\u0434\u0435\u0441\u044C \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043D\u043E\u0432\u043E\u0441\u0442\u0438 "),a()())}function Ee(t,s){if(t&1&&m(0,"cu-site-tab-ui",11),t&2){let e=s.$implicit;p("title",e.value)}}function De(t,s){if(t&1&&h(0,Ee,1,1,"cu-site-tab-ui",11,L),t&2){let e=l(2);w(e.tags())}}function Fe(t,s){t&1&&m(0,"cu-site-kit-card-news-m-ui")}function Ue(t,s){if(t&1&&(n(0,"div",12),h(1,Fe,1,0,"cu-site-kit-card-news-m-ui",null,x),a()),t&2){let e=l(2);$("news-list-animation",e.isRetrying()),o(),w(e.skeletonModeItems())}}function Ie(t,s){if(t&1&&(m(0,"cu-site-kit-card-news-m-ui",14),S(1,"mapTags")),t&2){let e=s.$implicit,i=l(4);p("title",e.title)("summary",e.summary)("startDate",e.startDate)("tags",b(1,6,e,i.tags()))("previewImageUrl",(e.previewImageDetails==null?null:e.previewImageDetails.url)||null)("newsLink",e.link.label||null)}}function Oe(t,s){if(t&1){let e=U();n(0,"div",12),h(1,Ie,2,9,"cu-site-kit-card-news-m-ui",14,ke),a(),n(3,"div",15)(4,"cu-site-kit-pagination-ui",16),D("indexChange",function(r){T(e);let d=l(3);return P(d.onPageChange(r))}),a(),n(5,"cu-site-kit-page-size-selector-ui",17),D("pageSizeChange",function(r){T(e);let d=l(3);return P(d.updatePageSize(r))}),a()()}if(t&2){let e=l(3);o(),w(e.news()),o(3),p("isMobile",e.isMobile())("length",e.totalPages())("index",e.currentPage()),o(),p("isMobile",e.isMobile())("pageSize",e.pageSize()??e.baseLimit())("declensionForms",A(9,Pe))("buttonSize","xs")("totalElements",e.totalNews()??0)("currentPage",e.currentPage())}}function ze(t,s){t&1&&(n(0,"div",13),m(1,"tui-icon",5),n(2,"div",6),c(3," \u0421\u043A\u043E\u0440\u043E \u0437\u0434\u0435\u0441\u044C \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043D\u043E\u0432\u043E\u0441\u0442\u0438 "),a()())}function Re(t,s){if(t&1&&_(0,Oe,6,10)(1,ze,4,0,"div",13),t&2){let e=l(2);f(e.news().length?0:1)}}function Le(t,s){if(t&1){let e=U();n(0,"div",7)(1,"cu-site-tabset-ui",8),D("onChange",function(r){T(e);let d=l();return P(d.onTabChange(r))}),_(2,De,2,0),a()(),n(3,"div",9),_(4,Ue,3,2,"div",10)(5,Re,2,1),a()}if(t&2){let e=l();o(2),f(e.tags().length?2:-1),o(2),f(e.isLoadingNews()?4:5)}}var gt=(()=>{class t{#s;#r;#t;#a;#n;#l;#e;constructor(){this.#s=u(z),this.#r=u(oe),this.#t=u(H),this.#a=u(q),this.#n=u(te,{optional:!0}),this.#l=u(ae,{optional:!0}),this.#e=u(de),this.isMobile=y(u(ne).isEqualToOrNarrowerThan$(ee.mobile),{initialValue:!1}),this.skeletonModeItems=g(()=>this.isMobile()?ge:_e),this.isRetrying=k(!1),this.currentPage=k(0),this.selectedTag=k(void 0),this.fb=u(W),this.newsResponse=y(this.#e.newsResponse$),this.news=g(()=>this.newsResponse()?.data.items??[]),this.pageSize=y(this.#e.newsResponse$.pipe(M(e=>e?.data?.paging?.limit??null)),{initialValue:null}),this.isLoadingNews=y(this.#e.isLoadingNews$),this.errorNews=y(this.#e.errorNews$),this.totalNews=y(this.#e.newsResponse$.pipe(M(e=>e?.data?.paging?.totalCount??null)),{initialValue:null}),this.baseLimit=g(()=>this.isMobile()?6:12),this.totalPages=g(()=>{let e=this.totalNews(),i=this.pageSize();return e!=null&&i!=null?Math.ceil(e/i):0}
1),this.headerStartElRef=j("newsTitle"),this.tags=g(()=>this.#e.hasValidTagsConfiguration()?this.#e.newsTags().map(i=>({key:i.key,value:(he[i.value]??i.value).toUpperCase()})):[]),!this.#n&&(N(()=>{this.#e.isRetrying()&&this.isRetrying.set(!0)}),N(()=>{if(this.newsResponse()?.isUpToDate===!1){let r=this.pageSize()??this.baseLimit(),d=this.currentPage()*r;this.#e.fetchNews({immediately:!1,force:!0,newsTag:this.selectedTag(),limit:r,offset:d})}}),N(()=>{let e=this.newsResponse(),i=this.#i();if(!e?.data)return;let r=this.totalPages();r>0&&i>r&&this.#t.navigate(["/news/page/1"],{replaceUrl:!0})}))}ngOnInit(){if(!this.#e.hasValidTagsConfiguration()){console.warn("news service configuration is invalid");return}let e=this.#e.getDefaultTag();if(this.selectedTag.set(e),this.#n){let d=this.#i(),O=this.baseLimit();this.#e.fetchNews({immediately:!0,newsTag:e,timeout:200,limit:O,offset:(d-1)*O}),this.currentPage.set(d-1);return}let i=this.#i(),r=this.baseLimit();this.#e.fetchNews({immediately:!0,newsTag:e,limit:r,offset:(i-1)*r}),this.currentPage.set(i-1),this.#m()}updatePageSize(e){let i=this.pageSize();i!=null&&i>e&&this.#o(),this.#e.fetchNews({immediately:!0,newsTag:this.selectedTag(),limit:e,offset:0}),this.currentPage.set(0),this.#i()!==1&&this.#t.navigate(["/news/page/1"],{replaceUrl:!0})}onTabChange(e){this.#o(),this.currentPage.set(0);let i=this.tags()[e]?.key;i&&(this.selectedTag.set(i),this.#e.fetchNews({immediately:!0,newsTag:i,limit:this.pageSize()??this.baseLimit(),offset:0}),this.#i()!==1&&this.#t.navigate(["./page",1],{relativeTo:this.#a.parent,replaceUrl:!0}))}onPageChange(e){this.#o(),this.#t.navigate(["/news/page",e+1],{replaceUrl:!0})}ngOnDestroy(){this.#n&&this.newsResponse()==null&&this.#l?.cancelCache()}#m(){this.#t.events.pipe(F(e=>e instanceof X),M(()=>this.#i()),F(e=>e!==this.currentPage()+1),Q(this.#s)).subscribe(e=>{let i=this.pageSize()??this.baseLimit();this.#e.fetchNews({immediately:!0,newsTag:this.selectedTag(),limit:i,offset:(e-1)*i}),this.currentPage.set(e-1)})}#i(){return Number(this.#a.snapshot.paramMap.get("numberPage"))||1}#o(){let e=this.headerStartElRef();e?.nativeElement&&this.#r.scrollToElement(e.nativeElement)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["cu-site-news-feature"]],viewQuery:function(i,r){i&1&&V(r.headerStartElRef,Te,5),i&2&&K()},features:[B([se])],decls:6,vars:2,consts:[["newsTitle",""],[1,"m-4","mb-56"],["aria-label","\u041D\u043E\u0432\u043E\u0441\u0442\u0438",1,"d:font-h-2xl","font-display","d:px-[1.25rem]","px-[0.625rem]","piano-active",3,"cuSiteUiPianoText"],[1,"news-feature__content"],[1,"flex","flex-col","items-center","justify-center","gap-24","mt-6","empty-state-animation"],["icon","cuSiteIconContentNotFound",1,"w-[13.75rem]","h-[13.75rem]","cu-site-blue-marguerite-500"],[1,"d:font-body-m-400","font-body-m-400","cu-site-color-grey-300"],[1,"d:mb-24","mb-24","d:px-[1.25rem]","tabset-animation","news-feature__tab-wrapper"],[1,"news-feature__tabs","pb-16",3,"onChange"],[1,"d:px-[1.25rem]","px-[0.625rem]","news-list-animation"],[1,"grid","grid-cols-1","gap-y-40","mb-40","d:grid-cols-[repeat(4,20rem)]","d:gap-40","d:pb-40","d:mb-0",3,"news-list-animation"],[3,"title"],[1,"grid","grid-cols-1","gap-y-40","mb-40","d:grid-cols-[repeat(4,20rem)]","d:gap-40","d:pb-40","d:mb-0"],[1,"flex","flex-col","items-center","justify-center","gap-24","mt-6"],[3,"title","summary","startDate","tags","previewImageUrl","newsLink"],[1,"flex","flex-col","items-center","justify-between","gap-8","w-full","d:flex-row","d:gap-0"],[1,"font-ui-m-500",3,"indexChange","isMobile","length","index"],[1,"d:font-body-m-400","font-body-m-400",3,"pageSizeChange","isMobile","pageSize","declensionForms","buttonSize","totalElements","currentPage"]],template:function(i,r){i&1&&(n(0,"div",1,0),m(2,"h2",2),a(),n(3,"div",3),_(4,Ne,4,0,"div",4)(5,Le,6,2),a()),i&2&&(o(2),p("cuSiteUiPianoText","\u041D\u043E\u0432\u043E\u0441\u0442\u0438"),o(2),f(r.errorNews()?4:5))},dependencies:[ce,me,re,pe,G,J,ue,Z,we,fe],styles:["@keyframes _ngcontent-%COMP%_slideUpAndFadeIn{0%{transform:translateY(1rem);opacity:0}
1to{transform:translateY(0);opacity:1}}@keyframes _ngcontent-%COMP%_scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _ngcontent-%COMP%_growHorizontal{0%{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes _ngcontent-%COMP%_slideUpAndFadeInPercent{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}[_nghost-%COMP%]{display:block;min-height:100vh;box-sizing:border-box;margin-top:calc(var(--cu-site-header-height) + 4rem)}.news-feature__content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.news-feature__title[_ngcontent-%COMP%]{margin-bottom:3.5rem}.news-feature__tabs[_ngcontent-%COMP%]{width:100%;--cu-site-tabset-ui-active-color: var(--cu-site-blue-marguerite-500)}.news-feature__tab-wrapper[_ngcontent-%COMP%]{position:sticky;top:4.875rem;z-index:100;padding-top:1rem;background-color:var(--cu-site-color-base-black)}.tabset-animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpAndFadeIn .5s cubic-bezier(.6,0,.4,1) forwards;opacity:0;animation-delay:calc(var(--animation-delay, .6s) + .3s)}.news-list-animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpAndFadeIn .5s cubic-bezier(.6,0,.4,1) forwards;opacity:0;animation-delay:calc(var(--animation-delay, .6s) + .3s + .25s)}.empty-state-animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_slideUpAndFadeIn .5s cubic-bezier(.6,0,.4,1) forwards;opacity:0;animation-delay:0ms}.news-list__not-found[_ngcontent-%COMP%]{display:flex;margin-top:2.5rem;flex-direction:column;justify-content:center;align-items:center;gap:1.5rem}.news_feature__not-found-image[_ngcontent-%COMP%]{width:11.53rem;height:11.15rem}"],changeDetection:0})}}return t})();export{gt as SiteNewsFeatureComponent};
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.