1import{a as V}from"./chunk-LG43OBZI.js";import{a as X}from"./chunk-6LAZXM7D.js";import{a as $}from"./chunk-CKFXJ4M6.js";import{a as j}from"./chunk-RT3CAFKL.js";import{a as k}from"./chunk-VO6FFMQ2.js";import"./chunk-X73BQY4W.js";import{a as G}from"./chunk-VRY2PTRO.js";import{f as H}from"./chunk-WDOKTICK.js";import"./chunk-W4BNGQYG.js";import"./chunk-CJRMVZKU.js";import{c as L}from"./chunk-MS6LDHGK.js";import{s as w,t as F}from"./chunk-Z4UR2IU6.js";import{Q as N,T as U,f as y,g as O,p as M}from"./chunk-C3SWPGF7.js";import{$b as p,Bb as x,Hb as d,Pb as r,Qc as _,Sc as h,Uc as D,_b as a,ac as m,ec as P,ia as E,jb as R,jc as I,kc as s,na as S,oa as c,ob as o,vc as b,wa as T,wc as l,xa as C,xc as g,yc as A}from"./chunk-7RSPASZG.js";import{g as v}from"./chunk-TSRGIXR5.js";var f=class t{constructor(i){this.apiService=i}search(i=0,e=1e3,n=""){return v(this,null,function*(){return yield this.apiService.api("GET",`/searches?page=${i}&limit=${e}&query=${n}`)})}static \u0275fac=function(e){return new(e||t)(S(H))};static \u0275prov=E({token:t,factory:t.\u0275fac,providedIn:"root"})};function J(t,i){if(t&1&&(a(0,"a",17),_(1,"imageThumb"),l(2," Read More"),m(3,"i",18),p()),t&2){let e=s().$implicit;r("href",h(1,1,e.url,!1),R)}}function K(t,i){if(t&1&&(a(0,"a",19),l(1," Read More"),m(2,"i",18),p()),t&2){let e=s().$implicit;r("routerLink",e.url)}}function Q(t,i){if(t&1&&(a(0,"div",9)(1,"div",10)(2,"div",11)(3,"span",12),l(4),p(),a(5,"div",13)(6,"h3"),l(7),_(8,"limitTo"),p()(),a(9,"div",14)(10,"h3"),l(11),p(),a(12,"div",15),d(13,J,4,4,"a",16)(14,K,3,1,"ng-template",null,0,D),p()()()()()),t&2){let e=i.$implicit,n=b(15),u=s();o(4),A(" ",e.type," "),o(3),g(h(8,5,e.title,100)),o(4),g(e.title),o(2),r("ngIf",u.isDocumentLink(e.url))("ngIfElse",n)}}function W(t,i){if(t&1){let e=P();a(0,"div",20)(1,"app-pom-paginator",21),I("goPage",function(u){T(e);let q=s();return C(q.goToPage(u))}),p()()}if(t&2){let e=s();o(),r("pagesToShow",5)("page",e.CURRENT_PAGE)("perPage",e.PER_PAGE)("count",e.ITEM_COUNT)("loading",e.LOADED)}}function Y(t,i){if(t&1&&m(0,"app-pom-not-found-template",22),t&2){let e=s();r("titlePrefix",e.SEARCH_TEXT||"Page ")}}var B=class t{dataService=c(L);searchService=c(f);spinnerService=c(k);results=[];CURRENT_PAGE=1;PER_PAGE=9;ITEM_COUNT=0;LOADED=!1;SEARCH_TEXT="";pageTitle="Search results ";ngOnInit(){this.spinnerService.visibility.subscribe(i=>{this.LOADED=i}),this.dataService.globalSearch.subscribe(i=>{this.SEARCH_TEXT=i,this.SEARCH_TEXT&&this.SEARCH_TEXT.trim().length>0&&this.loadData()})}loadData(){let i=this.CURRENT_PAGE-1;this.searchService.search(i,this.PER_PAGE,this.SEARCH_TEXT).then(e=>{this.results=e,this.ITEM_COUNT=e.length})}goToPage(i){this.CURRENT_PAGE=i,this.loadData()}isDocumentLink(i){return this.dataService.isDocumentLink(i)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=x({type:t,selectors:[["app-search-result"]],decls:8,vars:4,consts:[["routerTpl",""],[3,"title"],[1,"pages-list","mb-5"],[1,"auto-container"],[1,"page-list-content"],[1,"schedule-inner"],["class","schedule-block-three",4,"ngFor","ngForOf"],["aria-label","Page navigation","class","pagination-wrapper centred",4,"ngIf"],[3,"titlePrefix",4,"ngIf"],[1,"schedule-block-three"],[1,"inner-box"],[1,"inner","mb-3"],[1,"badge","bg-pink","text-uppercase","small"],[1,"schedule-date"],[1,"text"],[1,"link"],["target","_blank","rel","noopener noreferrer",3,"href",4,"ngIf","ngIfElse"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"flaticon-right-arrow"],[3,"routerLink"],["aria-label","Page navigation",1,"pagination-wrapper","centred"],[3,"goPage","pagesToShow","page","perPage","count","loading"],[3,"titlePrefix"]],template:function(e,n){e&1&&(m(0,"app-page-title",1),a(1,"section",2)(2,"div",3)(3,"div",4)(4,"div",5),d(5,Q,16,8,"div",6)(6,W,2,5,"div",7),p()()()(),d(7,Y,1,1,"app-pom-not-found-template",8)),e&2&&(r("title",n.pageTitle),o(5),r("ngForOf",n.results),o(),r("ngIf",n.ITEM_COUNT>n.PER_PAGE),o(),r("ngIf",n.ITEM_COUNT===0&&!n.LOADED))},dependencies:[j,M,y,O,w,F,U,N,X,G,V,$],encapsulation:2})};export{B as SearchResultComponent};
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.