PageSourceSearch

https://kemenbud.go.id/chunk-J67JRQXH.js

js kemenbud.go.id collected 2026-09-25 04:05:17 UTC 4,453 bytes, 1 lines download raw bytes

1import{d as I}from"./chunk-V4XFLAKJ.js";import{a as L}from"./chunk-OMFKJIJB.js";import{a as T}from"./chunk-BBFFKPAK.js";import{b as h}from"./chunk-C63A4UX3.js";import{a as D,c as o,d as P,e as f,f as B}from"./chunk-AQ76VVSD.js";import{O as v,T as m,a as l,b,da as S,fc as A,ha as r,p}from"./chunk-7X46AU6Y.js";var k=class g{http=m(D);languageService=m(P);destroyRef=m(S);appIdService=m(B);imageParser=m(T);hasInitialLoad=!1;langActive=this.languageService.currentLanguage();beritaParams=r({$top:9});beritaLake=r([]);beritaTotal=r(0);isLoadingBerita=r(!1);headlineParams=r({$top:10});headlineLake=r([]);headlineTotal=r(0);isLoadingHeadline=r(!1);customAppId=r(null);isCustomAPI=r(!1);constructor(){A(()=>{let i=this.languageService.currentLanguage();this.hasInitialLoad&&this.langActive!==i&&(this.langActive=i,this.isCustomAPI()||(this.loadBerita(),this.loadHeadline()))},{allowSignalWrites:!0})}loadBerita(){let i=o.base_api_content_url,s=o.schema.news,e=`${i}${this.customAppId()||this.appIdService.getAppId()}/${s}`,n=l({},this.beritaParams());this.hasInitialLoad=!0,this.isLoadingBerita.set(!0),this.httpGetSubs({url:e,params:n}).subscribe({next:t=>{t.items&&t.items.length>0?(this.beritaLake.set(t.items),this.beritaTotal.set(t.total)):(this.beritaLake.set([]),this.beritaTotal.set(0)),this.isLoadingBerita.set(!1)},error:t=>{console.error("Error fetching Berita data:",t),this.isLoadingBerita.set(!1)}})}loadHeadline(){let i=o.base_api_content_url,s=o.schema.news,e=`${i}${this.customAppId()||this.appIdService.getAppId()}/${s}`,n=l({},this.headlineParams());this.hasInitialLoad=!0,this.isLoadingHeadline.set(!0),this.httpGetSubs({url:e,params:n}).subscribe({next:t=>{t.items&&t.items.length>0?(this.headlineLake.set(t.items),this.headlineTotal.set(t.total)):(this.headlineLake.set([]),this.headlineTotal.set(0)),this.isLoadingHeadline.set(!1)},error:t=>{console.error("Error fetching Headline data:",t),this.isLoadingHeadline.set(!1)}})}loadBeritaCustomAPI(){let i=o.base_api_custom_url,s=o.schema.news,e=`${i}Publication`,n=l({},this.beritaParams());this.hasInitialLoad=!0,this.isLoadingBerita.set(!0),this.httpGetSubsCustom({url:e,params:n}).subscribe({next:t=>{t.items&&t.items.length>0?(this.beritaLake.set(t.items),this.beritaTotal.set(t.total)):(this.beritaLake.set([]),this.beritaTotal.set(0)),this.isLoadingBerita.set(!1)},error:t=>{console.error("Error fetching Berita data:",t),this.isLoadingBerita.set(!1)}})}loadHeadlineCustomAPI(){let i=o.base_api_custom_url,s=o.schema.news,e=`${i}Publication`,n=l({},this.headlineParams());this.hasInitialLoad=!0,this.isLoadingHeadline.set(!0),this.httpGetSubsCustom({url:e,params:n}).subscribe({next:t=>{t.items&&t.items.length>0?(this.headlineLake.set(t.items),this.headlineTotal.set(t.total)):(this.headlineLake.set([]),this.headlineTotal.set(0)),this.isLoadingHeadline.set(!1)},error:t=>{console.error("Error fetching Headline data:",t),this.isLoadingHeadline.set(!1)}})}resetSignals(){this.beritaLake.set([]),this.beritaTotal.set(0),this.isLoadingBerita.set(!1),this.headlineLake.set([]),this.headlineTotal.set(0),this.isLoadingHeadline.set(!1),this.customAppId.set(null)}httpGetSubs({url:i,params:s={}}){return this.http.get(i,{params:l({},s)}).pipe(p(e=>{if(e.items&&e.items.length>0){let t=e.items.map(a=>
1{let u=(h(a.data.Thumbnail,this.languageService)||[])?.map(c=>this.imageParser.getUrlImage(c)||"")||[],d=(h(a.data.ThumbnailMobile,this.languageService)||[])?.map(c=>this.imageParser.getUrlImage(c)||"")||[];return{thumbnails:u,thumbnailsMobile:d,tags:h(a.data.Tags,this.languageService)||[],publishDate:I(h(a.data.PublishDate,this.languageService)||""),title:h(a.data.Title,this.languageService)||"",content:L(h(a.data.Content,this.languageService)||""),slug:h(a.data.Slug,this.languageService)||""}});return b(l({},e),{items:t,total:e.total})}return{items:[],total:0}}),f(this.destroyRef))}httpGetSubsCustom({url:i,params:s={}}){return this.http.get(i,{params:l({},s)}).pipe(p(e=>{if(e.items&&e.items.length>0){let t=e.items.map(a=>{let u=a.thumbnail?[a.thumbnail]:[],d=a.thumbnailMobile?[a.thumbnailMobile]:[];return{thumbnails:u,thumbnailsMobile:d,tags:a.tags||[],publishDate:I(a.publishDate||""),title:a.title||"",content:L(a.content||""),slug:a.slug||""}});return b(l({},e),{items:t,total:e?.totalCount||e?.total||0})}return{items:[],total:0}}),f(this.destroyRef))}static \u0275fac=function(s){return new(s||g)};static \u0275prov=v({token:g,factory:g.\u0275fac})};export{k as a};

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.