PageSourceSearch

https://datosdelanzarote.com/chunk-LQIDJT57.js

js datosdelanzarote.com collected 2026-09-24 22:21:59 UTC 7,802 bytes, 1 lines download raw bytes

1import{a as H}from"./chunk-4XRPF7XI.js";import{a as oe,b as ae,c as re,d as le}from"./chunk-KGT5ODQN.js";import"./chunk-XOS2K4QD.js";import{c as Q}from"./chunk-V6ZBCUUV.js";import"./chunk-VNLNOMZD.js";import"./chunk-ZQY3KJRG.js";import{b as W,e as X,g as Z,l as ee,o as ie,p as ne}from"./chunk-CJHKHCTN.js";import{b as te}from"./chunk-GCCMCCPD.js";import{a as G}from"./chunk-FIZAGUBW.js";import{h as q,i as U}from"./chunk-BGHLFMSC.js";import"./chunk-VHQKI56J.js";import{W as Y}from"./chunk-B7JXNQ2P.js";import"./chunk-3XZEQ5JD.js";import{$a as x,$b as J,Aa as f,Ha as b,Hb as O,Ja as y,Jb as C,Ka as s,Lb as R,M as c,O as g,P as _,T as w,Tb as K,Ub as P,X as u,Yb as $,Za as d,Zb as j,_a as N,aa as E,ac as z,ba as I,ea as o,ec as S,ka as A,kb as V,mb as k,nb as B,pa as T,qb as L,ta as h,ua as v,va as D,w as M,wa as F,xa as p,ya as r,za as a}from"./chunk-N5VPP4KZ.js";var me=t=>["/noticia",t],ce=(t,i)=>i.id;function pe(t,i){if(t&1&&(r(0,"div",7)(1,"a",8)(2,"div",9)(3,"div",10),f(4,"img",11),a(),r(5,"div",12)(6,"h2",13),d(7),a(),r(8,"p",14),f(9,"i",15),d(10),k(11,"date"),a(),r(12,"div",16),d(13),a(),f(14,"p-button",17),a()()()()),t&2){let e=i.$implicit,n=s(2);o(),p("routerLink",V(10,me,e.slug)),o(3),p("ngSrc",n.mediauri+e.ficheroimagen)("alt",e.titulo),o(3),N(e.titulo),o(3),x(" ",B(11,7,e.fecha,"dd-MM-yyyy")," "),o(3),x(" ",e.entradilla," "),o(),p("text",!0)}}function de(t,i){if(t&1&&(r(0,"div",3),D(1,pe,15,12,"div",7,ce),a()),t&2){let e=s();o(),F(e.noticias())}}function ue(t,i){t&1&&(r(0,"h2",4),f(1,"i",18),d(2," No hay resultados con estos filtros "),a())}function fe(t,i){if(t&1){let e=b();r(0,"div",5)(1,"p-button",19),y("click",function(){g(e);let l=s();return _(l.verMas())}),a()()}t&2&&(o(),p("outlined",!0))}function ge(t,i){if(t&1&&(r(0,"div"),d(1),a()),t&2){let e=s(3);o(),N(e.filtroTema().nombre)}}function _e(t,i){if(t&1&&h(0,ge,2,1,"div"),t&2){let e=s(2);v(e.filtroTema()?0:-1)}}function he(t,i){t&1&&f(0,"i",27)}function ve(t,i){if(t&1&&f(0,"span",28),t&2){let e=s().$implicit;p("innerHTML",e.icono,I)}}function ye(t,i){if(t&1&&(r(0,"div"),h(1,he,1,0,"i",27),h(2,ve,1,1,"span",28),d(3),a()),t&2){let e=i.$implicit;o(),v(e.padre?1:-1),o(),v(e.icono?2:-1),o(),x(" ",e.nombre," ")}}function xe(t,i){if(t&1){let e=b();r(0,"div",20)(1,"strong"),d(2,"Filtros"),a(),r(3,"input",21),y("ngModelChange",function(l){g(e);let m=s();return _(m.searchBox.set(l))})("keyup.enter",function(){g(e);let l=s();return _(l.onKeywordEnter())}),a(),r(4,"p-select",22),y("ngModelChange",function(l){g(e);let m=s();return _(m.onTemaChange(l))}),T(5,_e,1,1,"ng-template",23)(6,ye,4,3,"ng-template",24),a(),r(7,"p-select",25),y("ngModelChange",function(l){g(e);let m=s();return _(m.onAnyoChange(l))}),a(),r(8,"p-button",26),y("click",function(){g(e);let l=s();return _(l.cleanFilter())}),a()()}if(t&2){let e=s();o(3),p("ngModel",e.searchBox()),o(),p("options",e.temas())("ngModel",e.filtroTema())("showClear",!0),o(3),p("options",e.anyos())("ngModel",e.filtroAnyo())("showClear",!0)}}var se=class t{noticiaService=c(H);familiaService=c(G);titleService=c(P);meta=c(K);route=c(j);router=c(J);platformId=c(E);destroyRef=c(w);mediauri=S.mediauri;siteuri=S.siteuri;noticias=u([]);temas=u([]);filtroTema=u(null);filtroAnyo=u(null);searchBox=u("");first=u(12);firstVisit=u(!0);anyos=L(()=>{let i=new Date().getFullYear(),e=[];for(let n=i;n>=1977;n--)e.push(n);return e});constructor(){let i=this.route.snapshot.data.title;this.titleService.setTitle(i),this.meta.updateTag({property:"og:title",content:i}),this.meta.updateTag({property:"og:url",content:`${this.siteuri}/noticias`});let e="\xDAltimas noticias del Centro de Datos de Lanzarote sobre estad\xEDsticas, publicaciones y datos de la isla.";if(this.meta.updateTag({name:"description",content:e}),this.meta.updateTag({property:"og:description",content:e}),this.router.events.pipe(M(n=>n instanceof $),Q(this.destroyRef)).subscribe(n=>{n.url.split("/")[1].includes("noticia")||this.cleanFilter()}),this.familiaService.getAllFamilias().then(()=>{this.temas.set(this.familiaService.familias.filter(n=>!n.padre))}),C(this.platformId)){let n=localStorage.getItem("notTema"),l=localStorage.getItem("notAnyo"),m=localStorage.getItem("notKey");if(n||l||m){n&&this.filtroTema.set(JSON.parse(n)),l&&this.filtroAnyo.set(JSON.parse(l)),m&&this.searchBox.set(JSON.parse(m)),this.filtrar();return}}this.noticiaService.getAllNoticias(0,this.first()).then(()=>
1{this.noticias.set(this.noticiaService.noticias)})}verMas(){this.firstVisit.set(!1),this.first.update(i=>i+12),this.noticiaService.getAllNoticias(0,this.first(),this.searchBox()||void 0,this.filtroTema()?.id,this.filtroAnyo()??void 0).then(()=>{this.noticias.set(this.noticiaService.noticias)})}filtrar(){this.firstVisit.set(!1),this.first.set(12),this.noticiaService.getAllNoticias(0,this.first(),this.searchBox()||void 0,Number(this.filtroTema()?.id)||void 0,this.filtroAnyo()??void 0).then(()=>{this.noticias.set(this.noticiaService.noticias)})}onTemaChange(i){this.filtroTema.set(i),this.filtrar(),this.saveFilter("tema")}onAnyoChange(i){this.filtroAnyo.set(i),this.filtrar(),this.saveFilter("anyo")}onKeywordEnter(){this.filtrar(),this.saveFilter("keyword")}saveFilter(i){if(!C(this.platformId))return;let e={tema:["notTema",this.filtroTema()],anyo:["notAnyo",this.filtroAnyo()],keyword:["notKey",this.searchBox()]};localStorage.setItem(e[i][0],JSON.stringify(e[i][1]))}cleanFilter(){C(this.platformId)&&(localStorage.removeItem("notTema"),localStorage.removeItem("notAnyo"),localStorage.removeItem("notKey")),this.filtroTema.set(null),this.filtroAnyo.set(null),this.searchBox.set(""),this.filtrar()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-noticias"]],decls:9,vars:2,consts:[[1,"container","my-2"],[1,"text-center"],[1,"stats-decorator","my-3",2,"margin","0 auto"],[1,"grid","mt-4"],["role","status",1,"text-center","text-pink-500","my-6"],[1,"flex","justify-content-center","mt-2","mb-3"],["pTemplate","start"],[1,"col-12","md:col-6","lg:col-4"],[1,"no-underline",3,"routerLink"],[1,"shadow-1","surface-card","text-center","h-full"],[1,"noticia-imagen","overflow-hidden"],["fill","",1,"object-fit-cover",3,"ngSrc","alt"],[1,"p-3"],[1,"text-xl","mb-2","font-medium"],[1,"text-500","text-sm","font-italic","m-0"],["aria-hidden","true",1,"pi","pi-calendar","mr-2"],[1,"text-700","text-sm","my-4","line-height-3"],["label","Leer m\xE1s...",3,"text"],["aria-hidden","true",1,"pi","pi-info-circle","text-4xl","mr-2"],["label","Ver m\xE1s noticias",3,"click","outlined"],[1,"flex","flex-column","align-items-start","justify-content-start","md:flex-row","md:align-items-center","gap-2"],["pInputText","","type","text","placeholder","T\xE9rmino de b\xFAsqueda","aria-label","Buscar por t\xE9rmino",3,"ngModelChange","keyup.enter","ngModel"],["optionLabel","nombre","filterBy","nombre","placeholder","Seleccione un tema","aria-label","Filtrar por tema",3,"ngModelChange","options","ngModel","showClear"],["pTemplate","selectedItem"],["pTemplate","item"],["placeholder","Seleccione a\xF1o","aria-label","Filtrar por a\xF1o",3,"ngModelChange","options","ngModel","showClear"],["icon","pi pi-trash","ariaLabel","Limpiar filtros","title","Limpiar filtros",3,"click"],["aria-hidden","true",1,"pi","pi-angle-right","ml-3","text-500"],["aria-hidden","true",1,"text-blue-500",3,"innerHTML"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"h2",1),d(2,"NOTICIAS"),a(),f(3,"div",2),h(4,de,3,0,"div",3)(5,ue,3,0,"h2",4),h(6,fe,2,1,"div",5),r(7,"p-toolbar"),T(8,xe,9,7,"ng-template",6),a()()),e&2&&(o(4),v(n.noticias().length>0||n.firstVisit()?4:5),o(2),v(n.noticias().length>0?6:-1))},dependencies:[ee,W,X,Z,R,z,U,q,Y,te,ne,ie,ae,oe,le,re,O],styles:[".noticia-imagen[_ngcontent-%COMP%]{position:relative;height:12rem}"],changeDetection:0})};export{se as NoticiasComponent};

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.