1"use strict";(self.webpackChunkbrussels_frontend=self.webpackChunkbrussels_frontend||[]).push([[158],{8659:(S,h,n)=>{n.d(h,{t:()=>I});var v=n(9646),u=n(8505),f=n(502),O=n(2176),P=n(2185),x=n(9223),p=n(4755),e=n(2223);function E(o,a){if(1&o&&e._UZ(0,"img",6),2&o){const i=e.oxw();e.Q6J("src",i.imageFromCDN(i.image),e.LSH)}}function M(o,a){1&o&&e._UZ(0,"brusselstimes-plus-badge")}const A=function(o,a,i){return["/",o,a,i]};let T=(()=>{class o{constructor(){this.id=-1,this.categories=[],this.slug="",this.title="",this.position=1,this.plus=!1,this.firstCategory="",this.imageFromCDN=O.w}ngOnInit(){this.firstCategory=this.categories&&this.categories[0]||""}}return o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["brusselstimes-article-card-most-read"]],inputs:{id:"id",categories:"categories",slug:"slug",title:"title",position:"position",image:"image",plus:"plus"},standalone:!0,features:[e.jDz],decls:8,vars:9,consts:[[1,"article-most-read"],[1,"article-most-read-position"],["loading","lazy","alt","",3,"src",4,"ngIf"],[1,"article-most-read-title",3,"routerLink"],[4,"ngIf"],[3,"innerHTML"],["loading","lazy","alt","",3,"src"]],template:function(i,l){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._uU(3),e.qZA(),e.YNc(4,E,1,1,"img",2),e.qZA(),e.TgZ(5,"a",3),e.YNc(6,M,1,0,"brusselstimes-plus-badge",4),e._UZ(7,"span",5),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(l.position),e.xp6(1),e.Q6J("ngIf",l.image&&l.image.file),e.xp6(1),e.Q6J("routerLink",e.kEZ(5,A,l.firstCategory,l.id,l.slug)),e.xp6(1),e.Q6J("ngIf",l.plus),e.xp6(1),e.Q6J("innerHTML",l.title,e.oJD))},dependencies:[p.O5,x.rH,P.u],styles:['[_nghost-%COMP%] .article-most-read[_ngcontent-%COMP%]{display:flex;align-items:flex-start}[_nghost-%COMP%] .article-most-read-title[_ngcontent-%COMP%]{font-family:var(--fs-head);font-weight:500;font-size:18px;line-height:24px;margin-bottom:.5rem;transition:color var(--transition);cursor:pointer;display:block;color:var(--dark)}[_nghost-%COMP%] .article-most-read-title[_ngcontent-%COMP%]:hover{color:var(--primary)}[_nghost-%COMP%] .article-most-read-title[_ngcontent-%COMP%] brusselstimes-plus-badge[_ngcontent-%COMP%]{float:left;margin-top:2px;margin-right:.5rem}[_nghost-%COMP%] .article-most-read-position[_ngcontent-%COMP%]{background-color:var(--dark);width:4rem;height:4rem;border-radius:2rem;margin-right:1rem;display:flex;align-items:center;justify-content:center;flex:0 0 auto;position:relative;overflow:hidden}[_nghost-%COMP%] .article-most-read-position[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{z-index:1;color:var(--white);font-size:24px;font-family:var(--fs-head);font-weight:700;opacity:1;transition:opacity var(--transition);cursor:pointer}[_nghost-%COMP%] .article-most-read-position[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;content:" ";position:absolute;width:100%;height:100%;z-index:0;opacity:.5;transition:opacity var(--transition),filter var(--transition);object-fit:cover;filter:grayscale(100%)}[_nghost-%COMP%] .article-most-read[_ngcontent-%COMP%]:hover .article-most-read-position[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{opacity:1;filter:grayscale(0%)}[_nghost-%COMP%] .article-most-read[_ngcontent-%COMP%]:hover .article-most-read-position[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{opacity:0}']}),o})();var R=n(5778);function C(o,a){if(1&o&&(e.TgZ(0,"div",5),e._UZ(1,"brusselstimes-article-card-most-read",6),e.qZA()),2&o){const i=a.$implicit;e.xp6(1),e.Q6J("id",i.id)("slug",i.slug)("categories",i.categories)("title",i.title)("position",i.rank)("image",i.image)("plus",i.plus)}}function t(o,a){if(1&o&&(e.TgZ(0,"div",3),e.YNc(1,C,2,7,"div",4),e.qZA()),2&o){const i=a.ngIf;e.xp6(1),e.Q6J("ngForOf",i)}}function D(o,a){1&o&&(e.TgZ(0,"div",5)(1,"div",7),e._UZ(2,"ngx-skeleton-loader",8)(3,"ngx-skeleton-loader",9),e.qZA()()),2&o&&(e.xp6(3),e.Udp("width","100%"))}function Z(o,a){if(1&o&&(e.TgZ(0,"div",3),e.YNc(1,D,4,2,"div",4),e.qZA()),2&o){const i=e.oxw();e.xp6(1),e.Q6J("ngForOf",i.skeletons)}}let I=(()=>{class o{constructor(i){this.wordPressService=i,this.articles=(0,v.of)([]),this.title="Most Read",this.skeletons=Array(5)}ngOnInit(){this.articles$=this.articles.pipe((0,u.b)(i=>{this.wordPressService.mostReads$.next(i.map(({slug:l})=>l))}))}}return o.\u0275fac=function(i){return new(i||o)(e.Y36(R.e))}
1,o.\u0275cmp=e.Xpm({type:o,selectors:[["brusselstimes-most-read-articles"]],inputs:{articles:"articles",title:"title"},standalone:!0,features:[e.jDz],decls:5,vars:5,consts:[[3,"innerHTML"],["class","most-read",4,"ngIf","ngIfElse"],["loading",""],[1,"most-read"],["class","most-read-item",4,"ngFor","ngForOf"],[1,"most-read-item"],[3,"id","slug","categories","title","position","image","plus"],[1,"most-read-loading"],["appearance","circle"],["count","2"]],template:function(i,l){if(1&i&&(e._UZ(0,"h2",0),e.YNc(1,t,2,1,"div",1),e.ALo(2,"async"),e.YNc(3,Z,2,1,"ng-template",null,2,e.W1O)),2&i){const y=e.MAs(4);e.Q6J("innerHTML",l.title,e.oJD),e.xp6(1),e.Q6J("ngIf",e.lcZ(2,3,l.articles$))("ngIfElse",y)}},dependencies:[p.O5,p.ax,T,f.hx,f.xr,p.Ov],styles:["[_nghost-%COMP%] .most-read[_ngcontent-%COMP%]{margin-bottom:2rem}[_nghost-%COMP%] .most-read-item[_ngcontent-%COMP%]{padding:1rem 0;border-bottom:1px solid var(--gray)}[_nghost-%COMP%] .most-read-loading[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] h2[_ngcontent-%COMP%]{text-align:center}@media screen and (max-width: 54rem){[_nghost-%COMP%] h2[_ngcontent-%COMP%]{text-align:left}}"]}),o})()},4158:(S,h,n)=>{n.r(h),n.d(h,{SearchResultsComponent:()=>Y});var v=n(5861),u=n(1135),f=n(4707),O=n(9841),P=n(2722),x=n(8505),p=n(4004),e=n(590),E=n(1365),M=n(502),A=n(8659),T=n(8285),R=n(3569),C=n(4755),t=n(2223),D=n(5778),Z=n(9223),I=n(359),o=n(9677),a=n(2344);function i(r,d){if(1&r&&t._UZ(0,"brusselstimes-articles-grid",7),2&r){const s=t.oxw().ngIf;t.Q6J("articles",s)}}function l(r,d){1&r&&(t.TgZ(0,"h2"),t._uU(1," No articles found. "),t.qZA())}function y(r,d){if(1&r&&(t.TgZ(0,"div"),t.YNc(1,i,1,1,"brusselstimes-articles-grid",2),t.YNc(2,l,2,0,"h2",4),t.qZA()),2&r){const s=d.ngIf;t.xp6(1),t.Q6J("ngIf",s.length),t.xp6(1),t.Q6J("ngIf",!s.length)}}const b=function(){return[]};function L(r,d){1&r&&t._UZ(0,"brusselstimes-articles-grid",8),2&r&&t.Q6J("articles",t.DdM(2,b))("loading",4)}function J(r,d){if(1&r){const s=t.EpF();t.TgZ(0,"div",9),t.NdJ("click",function(){t.CHM(s);const g=t.oxw(2);return t.KtG(g.loadMore())}),t.TgZ(1,"brusselstimes-button"),t._uU(2," Load more "),t.qZA()()}}function $(r,d){if(1&r&&(t.TgZ(0,"main")(1,"h1"),t._uU(2),t.qZA(),t.YNc(3,y,3,2,"div",4),t.ALo(4,"async"),t.YNc(5,L,1,3,"brusselstimes-articles-grid",5),t.YNc(6,J,3,0,"div",6),t.qZA()),2&r){const s=t.oxw();t.xp6(2),t.hij("Search / ",s.search,""),t.xp6(1),t.Q6J("ngIf",t.lcZ(4,4,s.articles$)),t.xp6(2),t.Q6J("ngIf",s.loadingMore),t.xp6(1),t.Q6J("ngIf",!s.loadingMore&&s.hasMore)}}function Q(r,d){if(1&r&&t._UZ(0,"brusselstimes-most-read-articles",7),2&r){const s=t.oxw();t.Q6J("articles",s.mostRead$)}}const W=function(){return{"height.px":40,width:"50%"}},K=function(){return{"height.px":32,width:"30%"}};function B(r,d){1&r&&(t.TgZ(0,"div",0)(1,"main")(2,"h1"),t._UZ(3,"ngx-skeleton-loader",10),t.qZA(),t.TgZ(4,"h2"),t._UZ(5,"ngx-skeleton-loader",10),t.qZA(),t._UZ(6,"brusselstimes-articles-grid",8),t.qZA(),t.TgZ(7,"aside"),t._UZ(8,"brusselstimes-most-read-articles",11),t.qZA()()),2&r&&(t.xp6(3),t.Q6J("theme",t.DdM(5,W)),t.xp6(2),t.Q6J("theme",t.DdM(6,K)),t.xp6(1),t.Q6J("articles",t.DdM(7,b))("loading",20),t.xp6(2),t.Q6J("title",""))}let Y=(()=>{class r{constructor(s,c,g,_,m){this.wordPressService=s,this.route=c,this.chartbeatService=g,this.metadataService=_,this.pianoService=m,this.searchArticles$=new u.X([]),this.loadingMore=!1,this.hasMore=!0,this.search="",this.destroyed$=new f.t(1),this.offset=20,this.moreArticles$=new u.X([])}ngOnInit(){var s=this;return(0,v.Z)(function*(){yield s.pianoService.init(),s.mostRead$=s.wordPressService.mostRead(),s.route.params.pipe((0,P.R)(s.destroyed$)).subscribe(({search:c})=>{s.moreArticles$.next([]),s.search=c;const g=`Search: ${c} | The Brussels Times`;s.chartbeatService.update({title:g}),s.metadataService&&s.metadataService.updateMetadata({title:g}),s.searchCall$=s.wordPressService.search(c).pipe((0,x.b)(_=>{s.hasMore=!(_.length<20),s.searchArticles$.next(_)})),s.articles$=(0,O.a)([s.searchArticles$,s.moreArticles$]).pipe((0,p.U)(([_,m])=>[..._,...m]),(0,p.U)(_=>_.map(m=>{m.published=new Date(m.published).toISOString().replace("T"," ").replace(".000Z","");const U=(m.image||"").replace("https://storage.googleapis.com/article-contents/media/","").replace("https://storage.cloud.google.com/article-contents/media/","").split("/");return m.image={path:`${U[0]}/${U[1]}
1`,file:U[2]},m})))})})()}ngOnDestroy(){this.destroyed$.next(!0),this.destroyed$.complete()}loadMore(){this.loadingMore=!0,this.wordPressService.search(this.search,this.offset).pipe((0,e.P)(),(0,E.M)(this.moreArticles$)).subscribe(([s,c])=>{this.offset+=s.length,this.hasMore=!(c.length<20),this.moreArticles$.next([...c,...s]),this.loadingMore=!1})}}return r.\u0275fac=function(s){return new(s||r)(t.Y36(D.e),t.Y36(Z.gz),t.Y36(I.r),t.Y36(o.D,8),t.Y36(a.K))},r.\u0275cmp=t.Xpm({type:r,selectors:[["brusselstimes-search-results"]],standalone:!0,features:[t.jDz],decls:7,vars:5,consts:[[1,"one-sidebar--right"],[4,"ngIf","ngIfElse"],[3,"articles",4,"ngIf"],["loading",""],[4,"ngIf"],[3,"articles","loading",4,"ngIf"],["class","load-more",3,"click",4,"ngIf"],[3,"articles"],[3,"articles","loading"],[1,"load-more",3,"click"],[3,"theme"],[3,"title"]],template:function(s,c){if(1&s&&(t.TgZ(0,"div",0),t.YNc(1,$,7,6,"main",1),t.ALo(2,"async"),t.TgZ(3,"aside"),t.YNc(4,Q,1,1,"brusselstimes-most-read-articles",2),t.qZA()(),t.YNc(5,B,9,8,"ng-template",null,3,t.W1O)),2&s){const g=t.MAs(6);t.xp6(1),t.Q6J("ngIf",t.lcZ(2,3,c.searchCall$))("ngIfElse",g),t.xp6(3),t.Q6J("ngIf",c.mostRead$)}},dependencies:[C.O5,R.d,T.r,A.t,M.hx,M.xr,C.Ov],styles:["[_nghost-%COMP%] h1[_ngcontent-%COMP%]{padding-bottom:1rem;margin-bottom:1rem;border-bottom:2px solid var(--gray)}[_nghost-%COMP%] h2[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:0}[_nghost-%COMP%] brusselstimes-most-read-articles[_ngcontent-%COMP%]{position:sticky;top:3rem;display:block}[_nghost-%COMP%] .articles-grid{padding-top:0}[_nghost-%COMP%] .load-more[_ngcontent-%COMP%]{padding:2rem;display:flex;justify-content:center}"]}),r})()}}]);
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.