. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 52.223.31.75  /  Your IP : 172.31.6.220   [ Reverse IP ]
Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 4 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/scuolaviva/www/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/scuolaviva/www/431.fa8efbaac497114e.js
"use strict";(self.webpackChunkSapere=self.webpackChunkSapere||[]).push([[431],{8431:(ji,B,m)=>{m.r(B),m.d(B,{PagesRoutes:()=>Ei});var b=m(4394),t=m(4438),w=m(3922),s=m(5596);let ct=(()=>{class a{constructor(e){this.vsidenav=e,this.options=this.vsidenav.getOptions()}getUserInfo(e){let n=localStorage.getItem("user_info");if(e&&n){let i=JSON.parse(n)[e];if(i)return i}return""}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-welcome-card"]],standalone:!0,features:[t.aNF],decls:10,vars:4,consts:[[1,"cardWithShadow"],[1,"row","justify-content-between"],[1,"col-sm-6"],[1,"mat-body-1","lh-24","m-b-30"],[1,"col-sm-5"],["src","assets/images/backgrounds/welcome-bg.png","alt","welcome","width","340",1,"welcome-img","d-none","d-lg-flex"]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"mat-card-title"),t.EFF(5),t.k0s(),t.j41(6,"mat-card-subtitle",3),t.EFF(7,"Controlla qui le tue statistiche"),t.k0s()(),t.j41(8,"div",4),t.nrm(9,"img",5),t.k0s()()()()),2&n&&(t.R7$(4),t.xc7("color","dark"==i.options.theme?"white":""),t.R7$(),t.Lme("Bentornato ",i.vsidenav.getUserInfo("nome")," ",i.vsidenav.getUserInfo("cognome"),""))},dependencies:[b.G,s.RN,s.m2,s.Lc,s.dh],encapsulation:2})}}return a})();var d=m(467),f=m(4912),F=m(15);function st(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG();t.SpI(" ",e.statistiche.numero_articoli," ")}}function mt(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG();t.SpI(" ",e.statistiche.numero_eventi," ")}}function dt(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG();t.SpI(" ",e.statistiche.like," ")}}function pt(a,l){1&a&&t.EFF(0," 0 ")}let ut=(()=>{class a{constructor(e,n){this.vsidenav=e,this.api=n}ngOnInit(){var e=this;return(0,d.A)(function*(){e.statistiche=yield e.api.call("getHomeTopCards",{},!1,!1,!1)})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(w.P),t.rXU(F.W))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-top-cards"]],standalone:!0,features:[t.aNF],decls:32,vars:3,consts:[[1,"row"],[1,"col-lg-4"],[1,"cardWithShadow","bg-primary","text-white","overflow-hidden"],["src","assets/images/backgrounds/top-warning-shape.png",1,"top-img"],["name","book",1,"icon-30","d-flex"],[1,"m-t-35"],[1,"f-w-600","f-s-21","m-0"],[1,"f-s-14"],["src","assets/images/backgrounds/top-error-shape.png",1,"top-img"],["name","vocabulary",1,"icon-30","d-flex"],["src","assets/images/backgrounds/top-info-shape.png",1,"top-img"],["name","calendar",1,"icon-30","d-flex"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"mat-card",2),t.nrm(3,"img",3),t.j41(4,"mat-card-content"),t.nrm(5,"i-tabler",4),t.j41(6,"div",5)(7,"h5",6),t.DNE(8,st,1,1),t.k0s(),t.j41(9,"span",7),t.EFF(10,"Totale articoli"),t.k0s()()()()(),t.j41(11,"div",1)(12,"mat-card",2),t.nrm(13,"img",8),t.j41(14,"mat-card-content"),t.nrm(15,"i-tabler",9),t.j41(16,"div",5)(17,"h5",6),t.DNE(18,mt,1,1),t.k0s(),t.j41(19,"span",7),t.EFF(20,"Totale Eventi"),t.k0s()()()()(),t.j41(21,"div",1)(22,"mat-card",2),t.nrm(23,"img",10),t.j41(24,"mat-card-content"),t.nrm(25,"i-tabler",11),t.j41(26,"div",5)(27,"h5",6),t.DNE(28,dt,1,1)(29,pt,1,0),t.k0s(),t.j41(30,"span",7),t.EFF(31,"Like Ricevuti"),t.k0s()()()()()()),2&n&&(t.R7$(8),t.vxM(i.statistiche&&i.statistiche.numero_articoli?8:-1),t.R7$(10),t.vxM(i.statistiche&&i.statistiche.numero_eventi?18:-1),t.R7$(10),t.vxM(i.statistiche&&i.statistiche.like?28:29))},dependencies:[b.G,s.RN,s.m2,f.X4,f.Jc],encapsulation:2})}}return a})();var W=m(4626);const ft=["chart"];function gt(a,l){if(1&a&&t.nrm(0,"apx-chart",5),2&a){const e=t.XpG();t.Y8G("series",e.revenuetwoChart.series)("chart",e.revenuetwoChart.chart)("plotOptions",e.revenuetwoChart.plotOptions)("dataLabels",e.revenuetwoChart.dataLabels)("stroke",e.revenuetwoChart.stroke)("legend",e.revenuetwoChart.legend)("colors",e.revenuetwoChart.colors)("grid",e.revenuetwoChart.grid)("xaxis",e.revenuetwoChart.xaxis)("fill",e.revenuetwoChart.fill)("tooltip",e.revenuetwoChart.tooltip)("plotOptions",e.revenuetwoChart.plotOptions)}}let vt=(()=>{class a{constructor(e,n){this.vsidenav=e,this.api=n}ngOnInit(){var e=this;return(0,d.A)(function*(){e.statistiche=yield e.api.call("getHomeProfileExpance",{},!1,!1,!1),e.chart=Object.create(null),console.log("stat:",e.statistiche),e.revenuetwoChart={series:[{colors:"#0085db",name:"Articoli inseriti",data:e.statistiche.articoli},{colors:"#fb977d",name:"Eventi inseriti",data:e.statistiche.eventi}],chart:{type:"bar",fontFamily:"'Plus Jakarta Sans', sans-serif;",foreColor:"#adb0bb",toolbar:{show:!1},height:300,stacked:!0},colors:["#0085db","#fb977d"],plotOptions:{bar:{horizontal:!1,columnWidth:"27%",borderRadius:6}},dataLabels:{enabled:!1},stroke:{show:!1},legend:{show:!0},grid:{borderColor:"rgba(0,0,0,0.1)",padding:{top:0,bottom:-8,left:20,right:20}},xaxis:{categories:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],axisBorder:{show:!1},axisTicks:{show:!1}},fill:{opacity:1},tooltip:{theme:"dark",fillSeriesColor:!1}}})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(w.P),t.rXU(F.W))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-profile-expance"]],viewQuery:function(n,i){if(1&n&&t.GBs(ft,5),2&n){let o;t.mGM(o=t.lsd())&&(i.chart=o.first)}},standalone:!0,features:[t.aNF],decls:10,vars:1,consts:[[1,"cardWithShadow"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"row"],[1,"col-lg-12"],[1,"rounded-bars"],[3,"series","chart","plotOptions","dataLabels","stroke","legend","colors","grid","xaxis","fill","tooltip"]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-header")(2,"div",1)(3,"mat-card-title"),t.EFF(4,"Pubblicazione"),t.k0s()()(),t.j41(5,"mat-card-content")(6,"div",2)(7,"div",3)(8,"div",4),t.DNE(9,gt,1,12,"apx-chart",5),t.k0s()()()()()),2&n&&(t.R7$(9),t.vxM(i.statistiche?9:-1))},dependencies:[b.G,s.RN,s.m2,s.MM,s.dh,W.J,W.Q,f.X4],encapsulation:2})}}return a})(),_t=(()=>{class a{constructor(){}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-dashboard"]],standalone:!0,features:[t.aNF],decls:7,vars:0,consts:[[1,"row"],[1,"col-lg-6"],[1,"col-lg-12"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"div",1),t.nrm(2,"app-welcome-card"),t.k0s(),t.j41(3,"div",1),t.nrm(4,"app-top-cards"),t.k0s(),t.j41(5,"div",2),t.nrm(6,"app-profile-expance"),t.k0s()())},dependencies:[ct,ut,vt],encapsulation:2})}}return a})();var u=m(8887);let A=(()=>{class a{constructor(e){this.routes=e}canActivate(e,n){let i=localStorage.getItem("username"),o=localStorage.getItem("user_type_id"),c=localStorage.getItem("profile_check");return console.log("profile_check:",c),console.log(e.routeConfig?.path),"false"==c&&"anagrafica"!=e.routeConfig?.path?(this.routes.navigate(["/studenti/anagrafica"]),!0):null!=i&&"1"==o||(this.routes.navigate(["/authentication/login"]),!1)}static{this.\u0275fac=function(n){return new(n||a)(t.KVO(u.Ix))}}static{this.\u0275prov=t.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();var p=m(9159),h=m(177),ht=m(9327);const Ct=(a,l)=>l.id_categoria,wt=a=>["/studenti/categorie/visualizza-categoria/",a];function bt(a,l){if(1&a&&(t.j41(0,"div",1)(1,"mat-card",2),t.nrm(2,"img",3),t.j41(3,"mat-card-content",4)(4,"mat-card-title",5),t.EFF(5),t.k0s(),t.j41(6,"div",6)(7,"div",7)(8,"span",8),t.nrm(9,"i-tabler",9),t.EFF(10),t.k0s(),t.j41(11,"span",10),t.nrm(12,"i-tabler",11),t.EFF(13),t.k0s()()()()()()),2&a){const e=l.$implicit;t.R7$(),t.Y8G("routerLink",t.eq3(5,wt,e.id_categoria)),t.R7$(),t.FS9("src",e.image,t.B4B),t.R7$(3),t.JRh(e.nome_categoria),t.R7$(5),t.JRh(e.numero_articoli),t.R7$(3),t.JRh(e.numero_eventi)}}let Ft=(()=>{class a{constructor(e,n,i){this.api=n,this.settings=i}ngOnInit(){var e=this;return(0,d.A)(function*(){e.categorie=yield e.api.call("getCategorieFull")})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(ht.QP),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-categorie"]],standalone:!0,features:[t.aNF],decls:3,vars:0,consts:[[1,"row"],[1,"col-sm-6","col-lg-4"],[1,"cardWithShadow","card2","position-relative","card-hover","cursor-pointer",3,"routerLink"],["mat-card-image","",2,"max-height","220px",3,"src"],[1,"p-y-24"],[1,"mat-headline-6","m-t-15"],[1,"d-flex","align-items-center","justify-content-center","m-t-24"],[1,"d-flex","align-items-center"],[1,"m-r-12","f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","writing-sign",1,"icon-18","m-r-4"],[1,"f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","calendar-event",1,"icon-18","m-r-4"]],template:function(n,i){1&n&&(t.j41(0,"div",0),t.Z7z(1,bt,14,7,"div",1,Ct),t.k0s()),2&n&&(t.R7$(),t.Dyx(i.categorie))},dependencies:[b.G,s.RN,s.m2,s.kF,s.dh,p.tP,h.MD,s.Hu,u.iI,u.Wk,f.X4,f.Jc],encapsulation:2})}}return a})();var r=m(9417),X=m(6695),N=m(2042),y=m(6600),g=m(5324),H=m(3649),q=m(7518),Q=m(5818),k=m(5084),Y=m(5263),P=m(5574),Z=m(1413),z=m(4006),I=m(5911),C=m(8834),j=m(9213),T=m(4823);const K=a=>["/studenti/articoli/visualizza-articolo/",a],kt=a=>["/studenti/categorie/visualizza-categoria/",a],At=a=>["/studenti/amministratori/visualizza-amministratore/",a],yt=a=>["/studenti/editori/visualizza-editore/",a],Et=a=>["/studenti/articoli/modifica-articolo/",a];function zt(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-month-view",45),t.bIt("dayClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.dayClicked(i.day))})("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("events",e.events)("weekStartsOn",e.weekStartsOn)("refresh",e.refresh)("activeDayIsOpen",e.activeDayIsOpen)}}function jt(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-week-view",46),t.bIt("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("weekStartsOn",e.weekStartsOn)("events",e.events)("refresh",e.refresh)}}function xt(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-day-view",47),t.bIt("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("events",e.events)("refresh",e.refresh)}}function Dt(a,l){1&a&&(t.j41(0,"th",48),t.EFF(1," Articolo "),t.k0s())}function Mt(a,l){if(1&a&&(t.j41(0,"td",49)(1,"div",50)(2,"div",51)(3,"h6",52)(4,"a",53),t.EFF(5),t.k0s()(),t.j41(6,"span",54)(7,"a",55),t.EFF(8),t.k0s()()()()()),2&a){const e=l.$implicit;t.R7$(4),t.Y8G("routerLink",t.eq3(4,K,e.id_articolo)),t.R7$(),t.SpI(" ",e.titolo,""),t.R7$(2),t.Y8G("routerLink",t.eq3(6,kt,e.id_categoria)),t.R7$(),t.SpI(" ",e.nome_categoria,"")}}function Rt(a,l){1&a&&(t.j41(0,"th",56),t.EFF(1," Stato "),t.k0s())}function Tt(a,l){1&a&&(t.j41(0,"span",58),t.EFF(1,"Non Attivo - Richiesta Rivesione"),t.k0s())}function St(a,l){1&a&&(t.j41(0,"span",59),t.EFF(1,"Attivo"),t.k0s())}function It(a,l){if(1&a&&(t.j41(0,"td",49)(1,"div",50)(2,"div",57),t.DNE(3,Tt,2,0,"span",58)(4,St,2,0,"span",59),t.k0s()()()),2&a){const e=l.$implicit;t.R7$(3),t.vxM(0==e.attivo?3:4)}}function $t(a,l){1&a&&(t.j41(0,"th",60),t.EFF(1," Date "),t.k0s())}function Gt(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG().$implicit,n=t.XpG();t.SpI(" Ultima Modifica: ",n.settings.convertInItDataOra(e.updated)," ")}}function Vt(a,l){if(1&a&&(t.j41(0,"td",61),t.EFF(1),t.DNE(2,Gt,1,1),t.k0s()),2&a){const e=l.$implicit,n=t.XpG();t.R7$(),t.SpI(" Inserimento: ",n.settings.convertInItDataOra(e.insert_time)," "),t.R7$(),t.vxM(e.updated?2:-1)}}function Ot(a,l){1&a&&(t.j41(0,"th",60),t.EFF(1," Inserito Da "),t.k0s())}function Xt(a,l){if(1&a&&(t.j41(0,"button",63)(1,"span",59),t.EFF(2),t.k0s()()),2&a){const e=t.XpG().$implicit;t.Y8G("routerLink",t.eq3(3,At,e.id_user_insert)),t.R7$(2),t.Lme(" ",e.nome," ",e.cognome,"")}}function Nt(a,l){if(1&a&&(t.j41(0,"button",63)(1,"span",64),t.EFF(2),t.k0s()()),2&a){const e=t.XpG().$implicit;t.Y8G("routerLink",t.eq3(3,yt,e.id_user_insert)),t.R7$(2),t.Lme(" ",e.nome," ",e.cognome,"")}}function Yt(a,l){if(1&a&&(t.j41(0,"td",62),t.DNE(1,Xt,3,5,"button",63)(2,Nt,3,5,"button",63),t.k0s()),2&a){const e=l.$implicit;t.R7$(),t.vxM("830830"==e.user_type_id?1:2)}}function Pt(a,l){1&a&&(t.j41(0,"th",65),t.EFF(1," Azioni "),t.k0s())}function Jt(a,l){if(1&a&&(t.j41(0,"td",62)(1,"a",66),t.nrm(2,"i-tabler",67),t.k0s(),t.j41(3,"a",68),t.nrm(4,"i-tabler",69),t.k0s()()),2&a){const e=l.$implicit;t.R7$(),t.Y8G("routerLink",t.eq3(2,K,e.id_articolo)),t.R7$(2),t.Y8G("routerLink",t.eq3(4,Et,e.id_articolo))}}function Lt(a,l){1&a&&t.nrm(0,"tr",70)}function Ut(a,l){1&a&&t.nrm(0,"tr",71)}(0,h.EO)(H.A);let Bt=(()=>{class a{constructor(e,n,i,o,c){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.router=c,this.weekStartsOn=1,this.activeDayIsOpen=!0,this.displayedColumns=["articolo","stato","descrizione","Azioni"],this.dataSource=new p.I6,this.sort=Object.create(null),this.paginator=Object.create(null),this.view="month",this.viewDate=new Date,this.events=[],this.refresh=new Z.B,this.actions=[{label:'<i class="fas fa-fw fa-pencil-alt text-warning"></i>',a11yLabel:"Modifica",onClick:({event:_})=>{this.modaleEditaEvento(_)}}],this.route=c}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_categoria=e.activatedRouter.snapshot.paramMap.get("id"),e.categoria=yield e.api.call("getCategoria",{id_categoria:e.id_categoria}),e.refresh_api()})()}modaleEditaEvento(e){this.router.navigate(["/studenti/eventi/modifica-evento/"+e.id],{relativeTo:this.route})}refresh_api(){var e=this;return(0,d.A)(function*(){e.articoli=yield e.api.call("getArticoliCategoria",{id_categoria:e.id_categoria}),e.dataSource=new p.I6(e.articoli),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort;let n=yield e.api.call("getEventiCategoria",{id_categoria:e.id_categoria});e.events=[];for(let i=0;i<n.length;i++){let o="<b>"+n[i].titolo+"</b> - "+n[i].nome_categoria+" - dal: <b>"+e.settings.convertInItData(n[i].data_inizio)+"</b> al: <b>"+e.settings.convertInItData(n[i].data_fine)+"</b>",c={start:new Date(n[i].data_inizio),end:new Date(n[i].data_fine),title:o,actions:e.actions,color:{primary:"1"==n[i].attivo?"#4bd08b":"#fa896b",secondary:"#ecf2ff"},id_evento:n[i].id_evento,id:n[i].id_evento};e.events.push(c)}e.refresh.next(!0)})()}cancellaArticolo(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare la comunicazione?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("deleteArticolo",{id_articolo:e},!0),n.refresh_api())});return function(c){return o.apply(this,arguments)}}())})()}cambiaStato(e){var n=this;return(0,d.A)(function*(){let i=1==parseInt(e.attivo)?0:1;yield n.api.call("cambiaStatoArticolo",{id_articolo:e.id_articolo,stato:i},!0),n.refresh_api()})()}dayClicked({date:e,events:n}){(0,q.t)(e,this.viewDate)&&((0,Q.r)(this.viewDate,e)&&!0===this.activeDayIsOpen||0===n.length?this.activeDayIsOpen=!1:(this.activeDayIsOpen=!0,this.viewDate=e))}apriEvento(e){this.router.navigate(["/studenti/eventi/visualizza-evento/"+e.id],{relativeTo:this.route})}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P),t.rXU(u.Ix))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-visualizza-categoria"]],viewQuery:function(n,i){if(1&n&&(t.GBs(N.B4,5),t.GBs(X.iy,5)),2&n){let o;t.mGM(o=t.lsd())&&(i.sort=o.first),t.mGM(o=t.lsd())&&(i.paginator=o.first)}},standalone:!0,features:[t.Jv_([(0,y.aw)(),g.jc,{provide:g.MJ,useClass:Y.ZG,useFactory:P.a},g.AD,{provide:y.Ju,useValue:"it-IT"}]),t.aNF],decls:86,vars:32,consts:[[1,"cardWithShadow","bg-success","text-white"],[1,"d-flex","m-r-10","p-10"],[1,"w-100","text-center"],[1,"row"],[1,"col-sm-6","col-lg-6"],[1,"shadow-none"],[1,"p-30","bg-warning","text-center","cursor-pointer","rounded"],[1,"f-s-24","text-white","m-0","m-b-4"],[1,"text-white","f-w-400","m-0","f-s-16"],[1,"p-30","bg-info","text-center","cursor-pointer","rounded"],[1,"f-s-24","text-white","f-w-600","m-0","m-b-4"],[1,"col-lg-6"],[1,"cardWithShadow","overflow-hidden"],["color","primary",1,"no-shadow"],[1,"d-flex","align-items-center","w-100"],[1,"m-l-auto","d-flex","align-items-center"],["mat-button","",3,"click"],["mat-icon-button","",3,"click"],["mat-icon-button","","mwlCalendarPreviousView","",3,"viewDateChange","view","viewDate"],["mat-icon-button","","mwlCalendarToday","",3,"viewDateChange","viewDate"],["mat-icon-button","","mwlCalendarNextView","",3,"viewDateChange","view","viewDate"],[3,"ngSwitch"],["locale","it",3,"viewDate","events","weekStartsOn","refresh","activeDayIsOpen","dayClicked","eventClicked",4,"ngSwitchCase"],["locale","it",3,"viewDate","weekStartsOn","events","refresh","eventClicked",4,"ngSwitchCase"],["locale","it",3,"viewDate","events","refresh","eventClicked",4,"ngSwitchCase"],[1,"cardWithShadow"],[1,"d-flex"],[1,"m-r-auto"],[1,"mat-body-1"],[1,"table-responsive","m-t-0"],["mat-table","",1,"w-100",3,"dataSource"],["matColumnDef","articolo"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1 p-l-0",4,"matHeaderCellDef"],["mat-cell","","class","p-l-0",4,"matCellDef"],["matColumnDef","stato"],["mat-header-cell","","class","f-w-600 mat-subtitle-1 f-s-14 p-l-0",4,"matHeaderCellDef"],["matColumnDef","descrizione"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1",4,"matHeaderCellDef"],["mat-cell","","class","mat-body-1 f-s-10",4,"matCellDef"],["matColumnDef","data"],["mat-cell","",4,"matCellDef"],["matColumnDef","Azioni"],["mat-header-cell","","class","f-w-600 mat-subtitle-1 f-s-14",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["locale","it",3,"dayClicked","eventClicked","viewDate","events","weekStartsOn","refresh","activeDayIsOpen"],["locale","it",3,"eventClicked","viewDate","weekStartsOn","events","refresh"],["locale","it",3,"eventClicked","viewDate","events","refresh"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1","p-l-0"],["mat-cell","",1,"p-l-0"],[1,"d-flex","align-items-center"],[1,"m-l-16"],[1,"f-s-14","mat-subtitle-1","f-w-600"],[2,"text-decoration","none","color","black",3,"routerLink"],[1,"mat-body-1","f-s-12"],[1,"color-info",2,"text-decoration","none",3,"routerLink"],["mat-header-cell","",1,"f-w-600","mat-subtitle-1","f-s-14","p-l-0"],[1,"m-0"],[1,"bg-error","text-white","rounded","f-w-600","p-6","f-s-10"],[1,"bg-success","text-white","rounded","f-w-600","p-6","f-s-10"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1"],["mat-cell","",1,"mat-body-1","f-s-10"],["mat-cell",""],["mat-button","",3,"routerLink"],[1,"bg-info","text-white","rounded","f-w-600","p-6","f-s-10"],["mat-header-cell","",1,"f-w-600","mat-subtitle-1","f-s-14"],["mat-icon-button","","matTooltip","Visualizza Articolo",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","eye",1,"icon-18","d-flex","align-items-center"],["mat-icon-button","","matTooltip","Modifica Articolo",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","edit",1,"icon-18","d-flex","align-items-center"],["mat-header-row",""],["mat-row",""]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-header",1)(2,"mat-card-title",2),t.EFF(3),t.k0s()()(),t.j41(4,"div",3)(5,"div",4)(6,"mat-card",5)(7,"div",6)(8,"h3",7),t.EFF(9),t.k0s(),t.j41(10,"h6",8),t.EFF(11,"Numero di Eventi"),t.k0s()()()(),t.j41(12,"div",4)(13,"mat-card",5)(14,"div",9)(15,"h3",10),t.EFF(16),t.k0s(),t.j41(17,"h6",8),t.EFF(18,"Numero di Articoli"),t.k0s()()()()(),t.j41(19,"div",3)(20,"div",11)(21,"mat-card",12)(22,"mat-toolbar",13)(23,"mat-toolbar-row")(24,"div",14)(25,"span"),t.EFF(26),t.nI1(27,"calendarDate"),t.k0s(),t.j41(28,"div",15)(29,"button",16),t.bIt("click",function(){return i.view="month"}),t.EFF(30," Mese "),t.k0s(),t.j41(31,"button",16),t.bIt("click",function(){return i.view="week"}),t.EFF(32," Settimana "),t.k0s(),t.j41(33,"button",16),t.bIt("click",function(){return i.view="day"}),t.EFF(34," Giorno "),t.k0s(),t.j41(35,"button",17),t.bIt("click",function(){return i.view="month"}),t.j41(36,"mat-icon"),t.EFF(37,"view_module"),t.k0s()(),t.j41(38,"button",17),t.bIt("click",function(){return i.view="week"}),t.j41(39,"mat-icon"),t.EFF(40,"view_week"),t.k0s()(),t.j41(41,"button",17),t.bIt("click",function(){return i.view="day"}),t.j41(42,"mat-icon"),t.EFF(43,"view_day"),t.k0s()(),t.j41(44,"button",18),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(45,"mat-icon"),t.EFF(46,"chevron_left"),t.k0s()(),t.j41(47,"button",19),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(48,"mat-icon"),t.EFF(49,"today"),t.k0s()(),t.j41(50,"button",20),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(51,"mat-icon"),t.EFF(52,"chevron_right"),t.k0s()()()()()(),t.j41(53,"mat-card-content")(54,"div",21),t.DNE(55,zt,1,5,"mwl-calendar-month-view",22)(56,jt,1,4,"mwl-calendar-week-view",23)(57,xt,1,3,"mwl-calendar-day-view",24),t.k0s()()()(),t.j41(58,"div",11)(59,"mat-card",25)(60,"mat-card-header",26)(61,"div",27)(62,"mat-card-title"),t.EFF(63,"Articoli"),t.k0s(),t.j41(64,"mat-card-subtitle",28),t.EFF(65,"Qui puoi inserire gli articoli visibili in questa categoria tematica"),t.k0s()()(),t.j41(66,"mat-card-content")(67,"div",29)(68,"table",30),t.qex(69,31),t.DNE(70,Dt,2,0,"th",32)(71,Mt,9,8,"td",33),t.bVm(),t.qex(72,34),t.DNE(73,Rt,2,0,"th",35)(74,It,5,1,"td",33),t.bVm(),t.qex(75,36),t.DNE(76,$t,2,0,"th",37)(77,Vt,3,2,"td",38),t.bVm(),t.qex(78,39),t.DNE(79,Ot,2,0,"th",37)(80,Yt,3,1,"td",40),t.bVm(),t.qex(81,41),t.DNE(82,Pt,2,0,"th",42)(83,Jt,5,6,"td",40),t.bVm(),t.DNE(84,Lt,1,0,"tr",43)(85,Ut,1,0,"tr",44),t.k0s()()()()()()),2&n&&(t.R7$(3),t.JRh(i.categoria.nome_categoria),t.R7$(6),t.JRh(i.categoria.numero_eventi),t.R7$(7),t.JRh(i.categoria.numero_articoli),t.R7$(10),t.JRh(t.brH(27,28,i.viewDate,i.view+"ViewTitle","it")),t.R7$(3),t.AVh("active","month"===i.view),t.R7$(2),t.AVh("active","week"===i.view),t.R7$(2),t.AVh("active","day"===i.view),t.R7$(2),t.AVh("active","month"===i.view),t.R7$(3),t.AVh("active","week"===i.view),t.R7$(3),t.AVh("active","day"===i.view),t.R7$(3),t.Y8G("view",i.view),t.R50("viewDate",i.viewDate),t.R7$(3),t.R50("viewDate",i.viewDate),t.R7$(3),t.Y8G("view",i.view),t.R50("viewDate",i.viewDate),t.R7$(4),t.Y8G("ngSwitch",i.view),t.R7$(),t.Y8G("ngSwitchCase","month"),t.R7$(),t.Y8G("ngSwitchCase","week"),t.R7$(),t.Y8G("ngSwitchCase","day"),t.R7$(11),t.Y8G("dataSource",i.dataSource),t.R7$(16),t.Y8G("matHeaderRowDef",i.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",i.displayedColumns))},dependencies:[b.G,I.KQ,I.uu,s.RN,s.m2,s.MM,s.Lc,s.dh,C.$z,C.pQ,C.iY,j.An,T.oV,p.Zl,p.tL,p.ji,p.cC,p.YV,p.iL,p.KS,p.$R,p.YZ,p.NB,g.rO,g.xt,g.Nl,g.u8,g.Sz,g.jD,g.tG,g.T$,h.MD,h.ux,h.e1,k.X6,u.Wk,r.YN,r.X1,f.X4,f.Jc],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{display:flex;text-align:center;flex-grow:0;flex-basis:0;margin-right:16px;align-items:center}.course-header[_ngcontent-%COMP%]{padding:12px!important;color:#fff}.course-header[_ngcontent-%COMP%]   .mat-card-header-text[_ngcontent-%COMP%]{width:100%!important}.course-header.Angular[_ngcontent-%COMP%]{background-color:#fc4b6c}.course-header.Web[_ngcontent-%COMP%]{background-color:#1e88e5}.course-header.Design[_ngcontent-%COMP%]{background-color:#26c6da}.course-header.Android[_ngcontent-%COMP%]{background-color:#ffb22b}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]   .course-duration[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center}.mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid rgba(120,130,140,.13);padding:8px 0!important}.ilabel[_ngcontent-%COMP%]{font-weight:400!important}.text-accent_p[_ngcontent-%COMP%]{color:#38a1cf!important}"]})}}return a})();var v=m(3719),E=m(9631);const tt=a=>["/studenti/segnalazioni/visualizza-segnalazione/",a];function Wt(a,l){1&a&&(t.j41(0,"th",28),t.EFF(1," Titolo "),t.k0s())}function Ht(a,l){if(1&a&&(t.j41(0,"td",29)(1,"div",30)(2,"div",31)(3,"h6",32)(4,"a",33),t.EFF(5),t.k0s()(),t.j41(6,"span",34),t.EFF(7),t.k0s()()()()),2&a){const e=l.$implicit;t.R7$(4),t.Y8G("routerLink",t.eq3(3,tt,e.id_segnalazione)),t.R7$(),t.SpI(" ",e.titolo,""),t.R7$(2),t.SpI(" ",e.nome_categoria," ")}}function qt(a,l){1&a&&(t.j41(0,"th",35),t.EFF(1," Data Inserimento "),t.k0s())}function Qt(a,l){if(1&a&&(t.j41(0,"td",36),t.EFF(1),t.k0s()),2&a){const e=l.$implicit,n=t.XpG();t.R7$(),t.SpI(" ",n.settings.convertInItDataOra(e.insert_time)," ")}}function Zt(a,l){1&a&&(t.j41(0,"th",37),t.EFF(1," Ricevuto Da "),t.k0s())}function Kt(a,l){if(1&a&&(t.j41(0,"td",38)(1,"span",39),t.EFF(2),t.k0s(),t.nrm(3,"br")(4,"br"),t.j41(5,"span",40),t.EFF(6),t.k0s()()),2&a){const e=l.$implicit;t.R7$(2),t.SpI(" ",e.email,""),t.R7$(4),t.SpI(" ",e.telefono,"")}}function te(a,l){1&a&&(t.j41(0,"th",41),t.EFF(1," Azioni "),t.k0s())}function ee(a,l){if(1&a&&(t.j41(0,"td",42)(1,"a",43),t.nrm(2,"i-tabler",44),t.k0s()()),2&a){const e=l.$implicit;t.R7$(),t.Y8G("routerLink",t.eq3(1,tt,e.id_segnalazione))}}function ie(a,l){1&a&&t.nrm(0,"tr",45)}function ae(a,l){1&a&&t.nrm(0,"tr",46)}let ne=(()=>{class a{filter(e){this.dataSource.filter=e.trim().toLowerCase()}constructor(e,n,i,o){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.displayedColumns=["segnalazione","descrizione","data","Azioni"],this.dataSource=new p.I6,this.sort=Object.create(null),this.paginator=Object.create(null)}ngOnInit(){var e=this;return(0,d.A)(function*(){e.refresh()})()}refresh(){var e=this;return(0,d.A)(function*(){e.segnalazioni=yield e.api.call("getSegnalazioni"),e.dataSource=new p.I6(e.segnalazioni),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort})()}cancellaSegnalazione(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare la segnalazione?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("deleteSegnalazione",{id_segnalazione:e},!0),n.refresh())});return function(c){return o.apply(this,arguments)}}())})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-segnalazioni"]],viewQuery:function(n,i){if(1&n&&(t.GBs(N.B4,5),t.GBs(X.iy,5)),2&n){let o;t.mGM(o=t.lsd())&&(i.sort=o.first),t.mGM(o=t.lsd())&&(i.paginator=o.first)}},standalone:!0,features:[t.aNF],decls:34,vars:3,consts:[[1,"cardWithShadow"],[1,"row","justify-content-between","gap-16"],[1,"col-sm-12"],["appearance","outline",1,"w-100","hide-hint"],["matInput","","placeholder","Cerca qui",3,"keyup"],["matSuffix",""],["name","search",1,"icon-20"],[1,"row"],[1,"col-lg-12"],[1,"d-flex"],[1,"m-r-auto"],[1,"mat-body-1"],[1,"table-responsive","m-t-0"],["mat-table","",1,"w-100",3,"dataSource"],["matColumnDef","segnalazione"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1 p-l-0",4,"matHeaderCellDef"],["mat-cell","","class","p-l-0",4,"matCellDef"],["matColumnDef","descrizione"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1",4,"matHeaderCellDef"],["mat-cell","","class","mat-body-1",4,"matCellDef"],["matColumnDef","data"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1 text-center",4,"matHeaderCellDef"],["mat-cell","","class","text-center",4,"matCellDef"],["matColumnDef","Azioni"],["mat-header-cell","","class","f-w-600 mat-subtitle-1 f-s-14",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1","p-l-0"],["mat-cell","",1,"p-l-0"],[1,"d-flex","align-items-center"],[1,"m-l-16"],[1,"f-s-14","mat-subtitle-1","f-w-600"],[2,"text-decoration","none","color","black",3,"routerLink"],[1,"mat-body-1","f-s-12"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1"],["mat-cell","",1,"mat-body-1"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1","text-center"],["mat-cell","",1,"text-center"],[1,"bg-success","text-white","rounded","f-w-600","p-6","f-s-10"],[1,"bg-info","text-white","rounded","f-w-600","p-6","f-s-10"],["mat-header-cell","",1,"f-w-600","mat-subtitle-1","f-s-14"],["mat-cell",""],["mat-icon-button","","matTooltip","Visualizza Segnalazione",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","eye",1,"icon-18","d-flex","align-items-center"],["mat-header-row",""],["mat-row",""]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"mat-form-field",3)(5,"input",4),t.bIt("keyup",function(c){return i.filter(c.target.value)}),t.k0s(),t.j41(6,"mat-icon",5),t.nrm(7,"i-tabler",6),t.k0s()()()()()(),t.j41(8,"div",7)(9,"div",8)(10,"mat-card",0)(11,"mat-card-header",9)(12,"div",10)(13,"mat-card-title"),t.EFF(14,"Segnalazioni Ricevute"),t.k0s(),t.j41(15,"mat-card-subtitle",11),t.EFF(16,"Qui puoi visualizzare le segnalazioni ricevute dall'app"),t.k0s()()(),t.j41(17,"mat-card-content")(18,"div",12)(19,"table",13),t.qex(20,14),t.DNE(21,Wt,2,0,"th",15)(22,Ht,8,5,"td",16),t.bVm(),t.qex(23,17),t.DNE(24,qt,2,0,"th",18)(25,Qt,2,1,"td",19),t.bVm(),t.qex(26,20),t.DNE(27,Zt,2,0,"th",21)(28,Kt,7,2,"td",22),t.bVm(),t.qex(29,23),t.DNE(30,te,2,0,"th",24)(31,ee,3,3,"td",25),t.bVm(),t.DNE(32,ie,1,0,"tr",26)(33,ae,1,0,"tr",27),t.k0s()()()()()()),2&n&&(t.R7$(19),t.Y8G("dataSource",i.dataSource),t.R7$(13),t.Y8G("matHeaderRowDef",i.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",i.displayedColumns))},dependencies:[b.G,v.rl,v.yw,E.fg,s.RN,s.m2,s.MM,s.Lc,s.dh,C.pQ,j.An,T.oV,p.Zl,p.tL,p.ji,p.cC,p.YV,p.iL,p.KS,p.$R,p.YZ,p.NB,h.MD,u.Wk,r.YN,r.X1,f.X4,f.Jc],encapsulation:2})}}return a})();function oe(a,l){1&a&&(t.j41(0,"div",2)(1,"div",3)(2,"mat-card",4)(3,"h2",5),t.EFF(4," Non hai i permessi per accedere a questa risorsa! "),t.k0s()()()())}function re(a,l){if(1&a&&(t.j41(0,"div")(1,"div",2)(2,"div",3)(3,"mat-card",4)(4,"div",2)(5,"div",6)(6,"mat-card-title",7)(7,"div",2)(8,"div",8),t.EFF(9),t.k0s(),t.nrm(10,"div",9),t.k0s()(),t.j41(11,"mat-card-subtitle",10),t.nrm(12,"br"),t.j41(13,"div",2)(14,"div",11)(15,"span",12),t.EFF(16),t.k0s()(),t.j41(17,"div",13),t.EFF(18," Inserita il: "),t.j41(19,"span",14),t.EFF(20),t.k0s()(),t.j41(21,"div",15),t.EFF(22," Inserita da: "),t.j41(23,"span",16),t.EFF(24),t.k0s(),t.j41(25,"span",16),t.EFF(26),t.k0s()()()()()()()(),t.j41(27,"div",17)(28,"mat-card",4)(29,"mat-card-content",18),t.nrm(30,"div",19),t.k0s()()()()()),2&a){const e=t.XpG();t.R7$(9),t.SpI(" ",e.segnalazione.titolo," "),t.R7$(7),t.SpI(" ",e.segnalazione.nome_categoria," "),t.R7$(4),t.SpI(" ",e.settings.convertInItDataOra(e.segnalazione.insert_time)," "),t.R7$(4),t.SpI(" ",e.segnalazione.email," "),t.R7$(2),t.SpI(" ",e.segnalazione.telefono," "),t.R7$(4),t.Y8G("innerHTML",e.segnalazione.descrizione,t.npT)}}let le=(()=>{class a{constructor(e,n,i,o){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.avatar_location="/assets/images/logos/no-logo.webp"}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_segnalazione=e.activatedRouter.snapshot.paramMap.get("id"),e.segnalazione=yield e.api.call("getSegnalazione",{id_segnalazione:e.id_segnalazione})})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-visualizza-segnalazione"]],standalone:!0,features:[t.aNF],decls:2,vars:2,consts:[["class","row",4,"ngIf"],[4,"ngIf"],[1,"row"],[1,"col-sm-12"],[1,"cardWithShadow"],[1,"text-center","p-10"],[1,"col-sm-12","p-15"],[1,"p-l-15"],[1,"col-sm-11","p-l-20","p-t-10"],[1,"col-sm-1","text-right"],[1,"mat-body-1","p-l-15","p-r-15","m-b-15"],[1,"col-sm-3"],[1,"bg-light-success","text-success","text-left","rounded","f-w-600","p-6","f-s-12"],[1,"col-sm-3","text-center","f-s-10"],[1,"bg-light-primary","text-primary","text-center","rounded","f-w-600","p-6","f-s-12"],[1,"col-sm-6","text-right","f-s-10"],[1,"bg-light-info","text-info","text-center","rounded","f-w-600","p-6","f-s-12"],[1,"col-12"],[1,"p-b-30","position-relative"],["id","contenitore-comunicazione",3,"innerHTML"]],template:function(n,i){1&n&&t.DNE(0,oe,5,0,"div",0)(1,re,31,6,"div",1),2&n&&(t.Y8G("ngIf",!i.segnalazione),t.R7$(),t.Y8G("ngIf",i.segnalazione))},dependencies:[b.G,s.RN,s.m2,s.Lc,s.dh,h.MD,h.bT,r.YN,r.X1,f.X4],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{display:flex;text-align:center;flex-grow:0;flex-basis:0;margin-right:16px;align-items:center}.course-header[_ngcontent-%COMP%]{padding:12px!important;color:#fff}.course-header[_ngcontent-%COMP%]   .mat-card-header-text[_ngcontent-%COMP%]{width:100%!important}.course-header.Angular[_ngcontent-%COMP%]{background-color:#fc4b6c}.course-header.Web[_ngcontent-%COMP%]{background-color:#1e88e5}.course-header.Design[_ngcontent-%COMP%]{background-color:#26c6da}.course-header.Android[_ngcontent-%COMP%]{background-color:#ffb22b}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]   .course-duration[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center}.mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid rgba(120,130,140,.13);padding:8px 0!important}.ilabel[_ngcontent-%COMP%]{font-weight:400!important}.text-accent_p[_ngcontent-%COMP%]{color:#38a1cf!important}"]})}}return a})();const ce=()=>["/studenti/articoli/aggiungi-articolo"],et=a=>["/studenti/articoli/visualizza-articolo/",a],se=a=>["/studenti/categorie/visualizza-categoria/",a],me=a=>["/studenti/amministratori/visualizza-amministratore/",a],de=a=>["/studenti/editori/visualizza-editore/",a],pe=a=>["/studenti/articoli/modifica-articolo/",a];function ue(a,l){1&a&&(t.j41(0,"th",30),t.EFF(1," Articolo "),t.k0s())}function fe(a,l){if(1&a&&(t.j41(0,"td",31)(1,"div",32)(2,"div",33)(3,"h6",34)(4,"a",35),t.EFF(5),t.k0s()(),t.j41(6,"span",36)(7,"a",37),t.EFF(8),t.k0s()()()()()),2&a){const e=l.$implicit;t.R7$(4),t.Y8G("routerLink",t.eq3(4,et,e.id_articolo)),t.R7$(),t.SpI(" ",e.titolo,""),t.R7$(2),t.Y8G("routerLink",t.eq3(6,se,e.id_categoria)),t.R7$(),t.SpI(" ",e.nome_categoria,"")}}function ge(a,l){1&a&&(t.j41(0,"th",38),t.EFF(1," Stato "),t.k0s())}function ve(a,l){1&a&&(t.j41(0,"span",40),t.EFF(1,"Non Attivo - Richiesta Rivesione"),t.k0s())}function _e(a,l){1&a&&(t.j41(0,"span",41),t.EFF(1,"Attivo"),t.k0s())}function he(a,l){if(1&a&&(t.j41(0,"td",31)(1,"div",32)(2,"div",39),t.DNE(3,ve,2,0,"span",40)(4,_e,2,0,"span",41),t.k0s()()()),2&a){const e=l.$implicit;t.R7$(3),t.vxM(0==e.attivo?3:4)}}function Ce(a,l){1&a&&(t.j41(0,"th",42),t.EFF(1," Date "),t.k0s())}function we(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG().$implicit,n=t.XpG();t.SpI(" Ultima Modifica: ",n.settings.convertInItDataOra(e.updated)," ")}}function be(a,l){if(1&a&&(t.j41(0,"td",43),t.EFF(1),t.DNE(2,we,1,1),t.k0s()),2&a){const e=l.$implicit,n=t.XpG();t.R7$(),t.SpI(" Inserimento: ",n.settings.convertInItDataOra(e.insert_time)," "),t.R7$(),t.vxM(e.updated?2:-1)}}function Fe(a,l){1&a&&(t.j41(0,"th",42),t.EFF(1," Inserito Da "),t.k0s())}function ke(a,l){if(1&a&&(t.j41(0,"button",45)(1,"span",41),t.EFF(2),t.k0s()()),2&a){const e=t.XpG().$implicit;t.Y8G("routerLink",t.eq3(3,me,e.id_user_insert)),t.R7$(2),t.Lme(" ",e.nome," ",e.cognome,"")}}function Ae(a,l){if(1&a&&(t.j41(0,"button",45)(1,"span",46),t.EFF(2),t.k0s()()),2&a){const e=t.XpG().$implicit;t.Y8G("routerLink",t.eq3(3,de,e.id_user_insert)),t.R7$(2),t.Lme(" ",e.nome," ",e.cognome,"")}}function ye(a,l){if(1&a&&(t.j41(0,"td",44),t.DNE(1,ke,3,5,"button",45)(2,Ae,3,5,"button",45),t.k0s()),2&a){const e=l.$implicit;t.R7$(),t.vxM("830830"==e.user_type_id?1:2)}}function Ee(a,l){1&a&&(t.j41(0,"th",47),t.EFF(1," Azioni "),t.k0s())}function ze(a,l){if(1&a&&(t.j41(0,"td",44)(1,"a",48),t.nrm(2,"i-tabler",49),t.k0s(),t.j41(3,"a",50),t.nrm(4,"i-tabler",51),t.k0s()()),2&a){const e=l.$implicit;t.R7$(),t.Y8G("routerLink",t.eq3(2,et,e.id_articolo)),t.R7$(2),t.Y8G("routerLink",t.eq3(4,pe,e.id_articolo))}}function je(a,l){1&a&&t.nrm(0,"tr",52)}function xe(a,l){1&a&&t.nrm(0,"tr",53)}let De=(()=>{class a{filter(e){this.dataSource.filter=e.trim().toLowerCase()}constructor(e,n,i,o){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.displayedColumns=["articolo","stato","descrizione","Azioni"],this.dataSource=new p.I6,this.sort=Object.create(null),this.paginator=Object.create(null)}ngOnInit(){var e=this;return(0,d.A)(function*(){e.refresh()})()}refresh(){var e=this;return(0,d.A)(function*(){e.articoli=yield e.api.call("getArticoli"),e.dataSource=new p.I6(e.articoli),e.dataSource.paginator=e.paginator,e.dataSource.sort=e.sort})()}cancellaArticolo(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare la comunicazione?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("deleteArticolo",{id_articolo:e},!0),n.refresh())});return function(c){return o.apply(this,arguments)}}())})()}cambiaStato(e){var n=this;return(0,d.A)(function*(){let i=1==parseInt(e.attivo)?0:1;yield n.api.call("cambiaStatoArticolo",{id_articolo:e.id_articolo,stato:i},!0),n.refresh()})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-articoli"]],viewQuery:function(n,i){if(1&n&&(t.GBs(N.B4,5),t.GBs(X.iy,5)),2&n){let o;t.mGM(o=t.lsd())&&(i.sort=o.first),t.mGM(o=t.lsd())&&(i.paginator=o.first)}},standalone:!0,features:[t.aNF],decls:40,vars:5,consts:[[1,"cardWithShadow"],[1,"row","justify-content-between","gap-16"],[1,"col-sm-6"],["appearance","outline",1,"w-100","hide-hint"],["matInput","","placeholder","Cerca qui",3,"keyup"],["matSuffix",""],["name","search",1,"icon-20"],[1,"col-sm-4","d-flex","align-items-center","justify-content-end"],["mat-button","","mat-flat-button","","color","primary",3,"routerLink"],[1,"row"],[1,"col-lg-12"],[1,"d-flex"],[1,"m-r-auto"],[1,"mat-body-1"],[1,"table-responsive","m-t-0"],["mat-table","",1,"w-100",3,"dataSource"],["matColumnDef","articolo"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1 p-l-0",4,"matHeaderCellDef"],["mat-cell","","class","p-l-0",4,"matCellDef"],["matColumnDef","stato"],["mat-header-cell","","class","f-w-600 mat-subtitle-1 f-s-14 p-l-0",4,"matHeaderCellDef"],["matColumnDef","descrizione"],["mat-header-cell","","class","f-w-600 f-s-14 mat-subtitle-1",4,"matHeaderCellDef"],["mat-cell","","class","mat-body-1 f-s-10",4,"matCellDef"],["matColumnDef","data"],["mat-cell","",4,"matCellDef"],["matColumnDef","Azioni"],["mat-header-cell","","class","f-w-600 mat-subtitle-1 f-s-14",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1","p-l-0"],["mat-cell","",1,"p-l-0"],[1,"d-flex","align-items-center"],[1,"m-l-16"],[1,"f-s-14","mat-subtitle-1","f-w-600"],[2,"text-decoration","none","color","black",3,"routerLink"],[1,"mat-body-1","f-s-12"],[1,"color-info",2,"text-decoration","none",3,"routerLink"],["mat-header-cell","",1,"f-w-600","mat-subtitle-1","f-s-14","p-l-0"],[1,"m-0"],[1,"bg-error","text-white","rounded","f-w-600","p-6","f-s-10"],[1,"bg-success","text-white","rounded","f-w-600","p-6","f-s-10"],["mat-header-cell","",1,"f-w-600","f-s-14","mat-subtitle-1"],["mat-cell","",1,"mat-body-1","f-s-10"],["mat-cell",""],["mat-button","",3,"routerLink"],[1,"bg-info","text-white","rounded","f-w-600","p-6","f-s-10"],["mat-header-cell","",1,"f-w-600","mat-subtitle-1","f-s-14"],["mat-icon-button","","matTooltip","Visualizza Articolo",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","eye",1,"icon-18","d-flex","align-items-center"],["mat-icon-button","","matTooltip","Modifica Articolo",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","edit",1,"icon-18","d-flex","align-items-center"],["mat-header-row",""],["mat-row",""]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"div",1)(3,"div",2)(4,"mat-form-field",3)(5,"input",4),t.bIt("keyup",function(c){return i.filter(c.target.value)}),t.k0s(),t.j41(6,"mat-icon",5),t.nrm(7,"i-tabler",6),t.k0s()()(),t.j41(8,"div",7)(9,"a",8),t.EFF(10,"Aggiungi Articolo"),t.k0s()()()()(),t.j41(11,"div",9)(12,"div",10)(13,"mat-card",0)(14,"mat-card-header",11)(15,"div",12)(16,"mat-card-title"),t.EFF(17,"Articoli"),t.k0s(),t.j41(18,"mat-card-subtitle",13),t.EFF(19,"Qui puoi inserire gli articoli visibili nell'app"),t.k0s()()(),t.j41(20,"mat-card-content")(21,"div",14)(22,"table",15),t.qex(23,16),t.DNE(24,ue,2,0,"th",17)(25,fe,9,8,"td",18),t.bVm(),t.qex(26,19),t.DNE(27,ge,2,0,"th",20)(28,he,5,1,"td",18),t.bVm(),t.qex(29,21),t.DNE(30,Ce,2,0,"th",22)(31,be,3,2,"td",23),t.bVm(),t.qex(32,24),t.DNE(33,Fe,2,0,"th",22)(34,ye,3,1,"td",25),t.bVm(),t.qex(35,26),t.DNE(36,Ee,2,0,"th",27)(37,ze,5,6,"td",25),t.bVm(),t.DNE(38,je,1,0,"tr",28)(39,xe,1,0,"tr",29),t.k0s()()()()()()),2&n&&(t.R7$(9),t.Y8G("routerLink",t.lJ4(4,ce)),t.R7$(13),t.Y8G("dataSource",i.dataSource),t.R7$(16),t.Y8G("matHeaderRowDef",i.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",i.displayedColumns))},dependencies:[b.G,v.rl,v.yw,E.fg,s.RN,s.m2,s.MM,s.Lc,s.dh,C.It,C.$z,C.pQ,j.An,T.oV,p.Zl,p.tL,p.ji,p.cC,p.YV,p.iL,p.KS,p.$R,p.YZ,p.NB,h.MD,u.Wk,r.YN,r.X1,f.X4,f.Jc],encapsulation:2})}}return a})();var $=m(2798),G=m(450),V=m(6850),x=m(452),D=m(5312),O=m(992);function Me(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Titolo "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function Re(a,l){if(1&a&&(t.j41(0,"option",11),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e.id_categoria),t.R7$(),t.JRh(e.nome_categoria)}}function Te(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Categoria "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}class Se{isErrorState(l,e){return!!(l&&l.invalid&&(l.dirty||l.touched||e&&e.submitted))}}let Ie=(()=>{class a{constructor(e,n,i,o){this.api=e,this.settings=n,this.router=i,this.route=o,this.apikey_tinymce=D.c.apikey_tinymce,this.avatarLocation="/assets/images/logos/no-logo.webp",this.initTinyMce={plugins:"lists link image table code help wordcount",menubar:"edit insert view format table tools",language:"it",language_url:D.c.tinymce_lang},this.matcher=new Se,this.anagraficaFormControl=new r.gE({id_articolo:new r.MJ(null),titolo:new r.MJ(""),descrizione:new r.MJ(""),id_categoria:new r.MJ(1),attivo:new r.MJ(""),insert_time:new r.MJ(""),updated:new r.MJ(""),files:new r.MJ(null,[]),link_video:new r.MJ(""),link_esterno:new r.MJ("")})}ngOnInit(){var e=this;return(0,d.A)(function*(){e.categorie=yield e.api.call("getCategorie",{})})()}inserisciAnagrafica(e){var n=this;return(0,d.A)(function*(){if(e&&!n.anagraficaFormControl.valid)return;let i=n.anagraficaFormControl.value;yield n.api.call("inserisciArticolo",i,!0,!0),n.router.navigate(["/studenti/articoli"],{relativeTo:n.route})})()}setFiles(e){this.anagraficaFormControl.patchValue({files:e})}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(F.W),t.rXU(w.P),t.rXU(u.Ix),t.rXU(u.nX))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-aggiungi-articolo"]],viewQuery:function(n,i){if(1&n&&t.GBs(x.l,5),2&n){let o;t.mGM(o=t.lsd())&&(i.fileUploaderComponent=o.first)}},standalone:!0,features:[t.aNF],decls:42,vars:13,consts:[[1,"cardWithShadow"],[3,"ngSubmit","formGroup"],[1,"d-flex","align-items-center","p-b-30","b-b-1"],[1,"mat-body-1"],[1,"row","m-t-24"],[1,"col-sm-12"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block"],["appearance","outline","color","primary",1,"w-100"],["matInput","","type","text",3,"formControl","errorStateMatcher"],["appearance","outline",1,"w-100"],["matNativeControl","","required","",3,"formControl"],[3,"value"],[3,"init","apiKey","formControl"],[1,"col-sm-6","m-t-20"],[1,"mat-subtitle-2","f-w-600","m-b-8","m-t-20","d-block"],[3,"filesEvent"],[1,"text-right","p-24","p-t-20","m-b-0","p-b-0","p-r-0"],["type","submit","mat-flat-button","","color","primary",1,"m-r-0"]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"form",1),t.bIt("ngSubmit",function(){return i.inserisciAnagrafica(!0)}),t.j41(3,"div",2)(4,"mat-card-subtitle",3),t.EFF(5,"Inserisci qui i dati e poi clicca sul pulsante salva."),t.k0s()(),t.j41(6,"div",4)(7,"div",5)(8,"mat-label",6),t.EFF(9,"Titolo"),t.k0s(),t.j41(10,"mat-form-field",7),t.nrm(11,"input",8),t.DNE(12,Me,4,0,"mat-error"),t.k0s()(),t.j41(13,"div",5)(14,"mat-label",6),t.EFF(15,"Categoria Tematica"),t.k0s(),t.j41(16,"mat-form-field",9)(17,"select",10),t.Z7z(18,Re,2,2,"option",11,t.Vm6),t.k0s(),t.DNE(20,Te,4,0,"mat-error"),t.k0s()(),t.j41(21,"div",5)(22,"mat-label",6),t.EFF(23,"Descrizione"),t.k0s(),t.nrm(24,"editor",12),t.k0s(),t.j41(25,"div",13)(26,"mat-label",6),t.EFF(27,"Link Video"),t.k0s(),t.j41(28,"mat-form-field",7),t.nrm(29,"input",8),t.k0s()(),t.j41(30,"div",13)(31,"mat-label",6),t.EFF(32,"Link Esterno"),t.k0s(),t.j41(33,"mat-form-field",7),t.nrm(34,"input",8),t.k0s()(),t.j41(35,"div",5)(36,"mat-label",14),t.EFF(37,"Allega qui le immagini sfondo"),t.k0s(),t.j41(38,"app-file-uploader",15),t.bIt("filesEvent",function(c){return i.setFiles(c)}),t.k0s()()(),t.j41(39,"div",16)(40,"button",17),t.EFF(41,"Salva Modifiche"),t.k0s()()()()()),2&n&&(t.R7$(2),t.Y8G("formGroup",i.anagraficaFormControl),t.R7$(9),t.Y8G("formControl",i.anagraficaFormControl.controls.titolo)("errorStateMatcher",i.matcher),t.R7$(),t.vxM(i.anagraficaFormControl.controls.titolo.hasError("required")?12:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.id_categoria),t.R7$(),t.Dyx(i.categorie),t.R7$(2),t.vxM(i.anagraficaFormControl.controls.id_categoria.hasError("required")?20:-1),t.R7$(4),t.FS9("apiKey",i.apikey_tinymce),t.Y8G("init",i.initTinyMce)("formControl",i.anagraficaFormControl.controls.descrizione),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_video)("errorStateMatcher",i.matcher),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_esterno)("errorStateMatcher",i.matcher))},dependencies:[s.Hu,s.RN,s.m2,s.Lc,O.xn,j.m_,f.X4,V.RI,v.RG,v.rl,v.nJ,v.TL,G.mV,$.Ve,E.fS,E.fg,C.Hl,C.$z,r.X1,r.qT,r.xH,r.y7,r.me,r.wz,r.BC,r.cb,r.YS,r.l_,r.j4,r.YN,x.l],encapsulation:2})}}return a})();const it=a=>["/studenti/articoli/modifica-articolo/",a];function $e(a,l){1&a&&(t.j41(0,"div",21)(1,"div",22)(2,"mat-card",23)(3,"h2",24),t.EFF(4," Non hai i permessi per accedere a questa risorsa! "),t.k0s()()()())}function Ge(a,l){if(1&a&&(t.qex(0),t.nrm(1,"img",26),t.bVm()),2&a){const e=t.XpG(2);t.R7$(),t.Y8G("src",e.copertine[e.copertinaIndex],t.B4B)("@fade",void 0)}}function Ve(a,l){if(1&a&&t.DNE(0,Ge,2,2,"ng-container",25),2&a){const e=t.XpG();t.Y8G("ngIf",e.copertinaIndex>=0&&e.copertinaIndex<e.copertine.length)}}function Oe(a,l){1&a&&t.nrm(0,"img",3)}function Xe(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG(2);t.SpI(" ",e.articolo.nome.charAt(0).toUpperCase()," ")}}function Ne(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG(2);t.SpI(" ",e.articolo.cognome.charAt(0).toUpperCase()," ")}}function Ye(a,l){if(1&a&&(t.j41(0,"span",10),t.DNE(1,Xe,1,1)(2,Ne,1,1),t.k0s()),2&a){const e=t.XpG();t.FCK("matTooltip","Inserito da ",e.articolo.nome," ",e.articolo.cognome,""),t.R7$(),t.vxM(e.articolo&&e.articolo.nome?1:-1),t.R7$(),t.vxM(e.articolo&&e.articolo.cognome?2:-1)}}let Pe=(()=>{class a{constructor(e,n,i,o){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.utente={id_user:"",nome:"",cognome:"",cdf:"",id_affiliato:"",affiliato_nome:"",corsi_titolo:"",corsi_id:""},this.avatar_location="/assets/images/logos/no-logo.webp",this.articolo={},this.copertinaIndex=0}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_articolo=e.activatedRouter.snapshot.paramMap.get("id"),e.articolo=yield e.api.call("getArticolo",{id_articolo:e.id_articolo}),e.articolo&&(e.files=yield e.api.call("getFilesArticolo",{id_articolo:e.id_articolo})),e.files.length>1&&(console.log("f length",e.files.length),setInterval(()=>{e.copertinaIndex=(e.copertinaIndex+1)%2,console.log(e.copertinaIndex)},5e3)),e.copertine=[],e.caricaCopertina()})()}get copertinaKey(){return this.copertine?.[this.copertinaIndex]??"default"}caricaCopertina(){var e=this;return(0,d.A)(function*(){e.files.forEach(function(){var n=(0,d.A)(function*(i,o,c){let _=yield e.api.call("getFileArticolo",{id_articolo:e.id_articolo,filename:c[o]},!1,!1,!1);_&&e.copertine.push(_)});return function(i,o,c){return n.apply(this,arguments)}}())})()}scaricaFile(e){var n=this;return(0,d.A)(function*(){let i=yield n.api.call("getFileArticolo",{id_articolo:n.id_articolo,filename:e});i&&window.open(i,"_blank")})()}cancellaFile(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare il file?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("cancellaFileArticolo",{id_articolo:n.id_articolo,filename:e},!0),n.files=yield n.api.call("getFilesArticolo",{id_articolo:n.id_articolo}))});return function(c){return o.apply(this,arguments)}}())})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-visualizza-articolo"]],standalone:!0,features:[t.aNF],decls:30,vars:14,consts:[["class","row",4,"ngIf"],[1,"col-12"],[1,"cardWithShadow","card2","position-relative","featured-card","overflow-hidden"],["mat-card-image","","ngSrc","assets/images/logos/no-logo.webp","alt","Immaggine di copertina dell'articolo","loading","eager"],[1,"text-right",2,"position","absolute","right","0","color","white"],["mat-icon-button","","matTooltip","Modifica articolo",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","edit",1,"icon-18","d-flex","align-items-center"],[1,"featured-overlay","h-100","p-24","d-flex","flex-column","align-items-end","justify-content-start"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"f-s-16","f-w-600"],["mat-icon-button","",1,"align-items-center","justify-content-center","text-white","bg-info","rounded-circle","p-10",3,"matTooltip"],[1,"f-s-12","f-w-600","bg-primary","text-white","rounded","p-x-8","p-y-4"],[1,"m-t-auto","w-100"],[1,"mat-headline-5"],[1,"d-flex","align-items-left","justify-content-left","m-t-24"],[1,"d-flex","align-items-left","justify-content-start"],[1,"m-r-12","f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","thumb-up",1,"icon-18","m-r-4"],[1,"m-l-auto","f-s-14","mat-subtitle-2","d-flex","align-items-center",3,"innerHTML"],[1,"d-flex","align-items-center","justify-content-center","w-100","m-t-24"],["mat-button","","matTooltip","Modifica Evento",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],[1,"row"],[1,"col-sm-12"],[1,"cardWithShadow"],[1,"text-center","p-10"],[4,"ngIf"],["mat-card-image","","alt","Immaggine di copertina dell'articolo","loading","eager",3,"src"]],template:function(n,i){1&n&&(t.DNE(0,$e,5,0,"div",0),t.j41(1,"div",1)(2,"mat-card",2),t.DNE(3,Ve,1,1,"ng-container")(4,Oe,1,0,"img",3),t.j41(5,"div",4)(6,"a",5),t.nrm(7,"i-tabler",6),t.k0s()(),t.j41(8,"div",7)(9,"div",8)(10,"span",9),t.DNE(11,Ye,3,5,"span",10),t.k0s(),t.j41(12,"span",11),t.EFF(13),t.k0s()(),t.j41(14,"div",12),t.nrm(15,"br"),t.j41(16,"mat-card-title",13),t.EFF(17),t.k0s(),t.j41(18,"div",14)(19,"div",15)(20,"span",16),t.nrm(21,"i-tabler",17),t.EFF(22),t.k0s()()(),t.nrm(23,"br")(24,"hr")(25,"span",18),t.k0s(),t.j41(26,"div",19)(27,"a",20)(28,"span",11),t.EFF(29," Modifica Articolo "),t.k0s()()()()()()),2&n&&(t.Y8G("ngIf",!i.articolo),t.R7$(3),t.vxM(i.copertine&&i.copertine.length>0?3:-1),t.R7$(),t.vxM(i.copertine&&0!=i.copertine.length?-1:4),t.R7$(2),t.Y8G("routerLink",t.eq3(10,it,i.id_articolo)),t.R7$(5),t.vxM(i.articolo&&i.articolo.nome?11:-1),t.R7$(2),t.JRh(i.articolo.nome_categoria),t.R7$(4),t.JRh(i.articolo.titolo),t.R7$(5),t.JRh(i.articolo.like),t.R7$(3),t.Y8G("innerHTML",i.articolo.descrizione,t.npT),t.R7$(2),t.Y8G("routerLink",t.eq3(12,it,i.id_articolo)))},dependencies:[b.G,s.RN,s.kF,s.dh,C.It,C.pQ,T.oV,h.MD,h.bT,u.Wk,r.YN,r.X1,f.X4,f.Jc,h.kt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{display:flex;text-align:center;flex-grow:0;flex-basis:0;margin-right:16px;align-items:center}.course-header[_ngcontent-%COMP%]{padding:12px!important;color:#fff}.course-header[_ngcontent-%COMP%]   .mat-card-header-text[_ngcontent-%COMP%]{width:100%!important}.course-header.Angular[_ngcontent-%COMP%]{background-color:#fc4b6c}.course-header.Web[_ngcontent-%COMP%]{background-color:#1e88e5}.course-header.Design[_ngcontent-%COMP%]{background-color:#26c6da}.course-header.Android[_ngcontent-%COMP%]{background-color:#ffb22b}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]   .course-duration[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center}.mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid rgba(120,130,140,.13);padding:8px 0!important}.ilabel[_ngcontent-%COMP%]{font-weight:400!important}.text-accent_p[_ngcontent-%COMP%]{color:#38a1cf!important}"]})}}return a})();function Je(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Titolo "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function Le(a,l){if(1&a&&(t.j41(0,"option",11),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e.id_categoria),t.R7$(),t.JRh(e.nome_categoria)}}function Ue(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Categoria "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function Be(a,l){1&a&&(t.j41(0,"div",17)(1,"div",23),t.EFF(2," Non sono presenti immagini "),t.k0s()())}function We(a,l){if(1&a){const e=t.RV6();t.j41(0,"div",18)(1,"div",24)(2,"span",25),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.scaricaFile(i))}),t.nrm(3,"i-tabler",26),t.k0s(),t.j41(4,"div",27)(5,"a",28),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.scaricaFile(i))}),t.EFF(6),t.k0s()(),t.j41(7,"span",29),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.cancellaFile(i))}),t.nrm(8,"i-tabler",30),t.k0s()()()}if(2&a){const e=l.$implicit,n=t.XpG();t.R7$(5),t.FS9("matTooltip",e),t.R7$(),t.JRh(n.settings.parseOnlyFilename(e))}}class He{isErrorState(l,e){return!!(l&&l.invalid&&(l.dirty||l.touched||e&&e.submitted))}}let qe=(()=>{class a{constructor(e,n,i,o){this.api=e,this.settings=n,this.activatedRouter=i,this.router=o,this.apikey_tinymce=D.c.apikey_tinymce,this.avatarLocation="/assets/images/logos/no-logo.webp",this.initTinyMce={plugins:"lists link image table code help wordcount ",menubar:"edit insert view format table tools",language:"it",language_url:D.c.tinymce_lang},this.matcher=new He,this.anagraficaFormControl=new r.gE({id_articolo:new r.MJ(null),titolo:new r.MJ(""),descrizione:new r.MJ(""),id_categoria:new r.MJ(1),attivo:new r.MJ(""),insert_time:new r.MJ(""),updated:new r.MJ(""),files:new r.MJ(null,[]),link_video:new r.MJ(""),link_esterno:new r.MJ(""),id_user_insert:new r.MJ(""),like:new r.MJ(""),user_type_id:new r.MJ(""),nome:new r.MJ(""),cognome:new r.MJ(""),nome_categoria:new r.MJ(""),image:new r.MJ("")})}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_articolo=e.activatedRouter.snapshot.paramMap.get("id"),e.refresh()})()}refresh(){var e=this;return(0,d.A)(function*(){e.categorie=yield e.api.call("getCategorie",{}),e.articolo=yield e.api.call("getArticolo",{id_articolo:e.id_articolo}),e.anagraficaFormControl.setValue(e.articolo),e.fileUploaderComponent.flushFilesList(),e.articolo&&(e.files=yield e.api.call("getFilesArticolo",{id_articolo:e.id_articolo}))})()}aggiornaAnagrafica(e){var n=this;return(0,d.A)(function*(){if(e&&!n.anagraficaFormControl.valid)return;let i=n.anagraficaFormControl.value;yield n.api.call("updateArticolo",i,!0,!0),n.router.navigate(["/studenti/articoli"],{relativeTo:n.activatedRouter})})()}setFiles(e){console.log("Set file:"),console.log(e),this.anagraficaFormControl.patchValue({files:e})}cancellaFile(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare il file, l'azione \xe8 inreversibile?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("cancellaFileArticolo",{id_articolo:n.id_articolo,filename:e},!0),n.files=yield n.api.call("getFilesArticolo",{id_articolo:n.id_articolo}))});return function(c){return o.apply(this,arguments)}}())})()}scaricaFile(e){var n=this;return(0,d.A)(function*(){let i=yield n.api.call("getFileArticolo",{id_articolo:n.id_articolo,filename:e});i&&window.open(i,"_blank")})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(F.W),t.rXU(w.P),t.rXU(u.nX),t.rXU(u.Ix))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-articolo-centro"]],viewQuery:function(n,i){if(1&n&&t.GBs(x.l,5),2&n){let o;t.mGM(o=t.lsd())&&(i.fileUploaderComponent=o.first)}},standalone:!0,features:[t.Jv_([(0,y.aw)(),{provide:g.MJ,useClass:Y.ZG,useFactory:P.a},{provide:y.Ju,useValue:"it-IT"}]),t.aNF],decls:51,vars:14,consts:[[1,"cardWithShadow"],[3,"ngSubmit","formGroup"],[1,"d-flex","align-items-center","p-b-30","b-b-1"],[1,"mat-body-1"],[1,"row","m-t-24"],[1,"col-sm-12"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block"],["appearance","outline","color","primary",1,"w-100"],["matInput","","type","text",3,"formControl","errorStateMatcher"],["appearance","outline",1,"w-100"],["matNativeControl","","required","",3,"formControl"],[3,"value"],[3,"init","apiKey","formControl"],[1,"col-sm-6","m-t-20"],[1,"col-12"],[1,"p-b-30","position-relative"],["id","lipsum"],[1,"m-t-24","text-center"],[1,"m-t-24"],[1,"mat-subtitle-2","f-w-600","m-b-8","m-t-20","d-block"],[3,"filesEvent"],[1,"text-right","p-24","p-t-20","m-b-0","p-b-0","p-r-0"],["type","submit","mat-flat-button","","color","primary",1,"m-r-0"],[1,"text-center"],[1,"d-flex","align-items-center"],[1,"text-info","bg-light-info","rounded-circle","icon-46","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click"],["name","download",1,"icon-22","d-flex"],[1,"m-l-16","m-r-auto"],[3,"click","matTooltip"],[1,"text-error","bg-light-error","rounded-circle","icon-46","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click"],["name","x",1,"icon-22","d-flex"]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content")(2,"form",1),t.bIt("ngSubmit",function(){return i.aggiornaAnagrafica(!0)}),t.j41(3,"div",2)(4,"mat-card-subtitle",3),t.EFF(5,"Edita i dati e poi clicca sul pulsante salva."),t.k0s()(),t.j41(6,"div",4)(7,"div",5)(8,"mat-label",6),t.EFF(9,"Titolo"),t.k0s(),t.j41(10,"mat-form-field",7),t.nrm(11,"input",8),t.DNE(12,Je,4,0,"mat-error"),t.k0s()(),t.j41(13,"div",5)(14,"mat-label",6),t.EFF(15,"Categoria Tematica"),t.k0s(),t.j41(16,"mat-form-field",9)(17,"select",10),t.Z7z(18,Le,2,2,"option",11,t.Vm6),t.k0s(),t.DNE(20,Ue,4,0,"mat-error"),t.k0s()(),t.j41(21,"div",5)(22,"mat-label",6),t.EFF(23,"Descrizione"),t.k0s(),t.nrm(24,"editor",12),t.k0s(),t.j41(25,"div",13)(26,"mat-label",6),t.EFF(27,"Link Video"),t.k0s(),t.j41(28,"mat-form-field",7),t.nrm(29,"input",8),t.k0s()(),t.j41(30,"div",13)(31,"mat-label",6),t.EFF(32,"Link Esterno"),t.k0s(),t.j41(33,"mat-form-field",7),t.nrm(34,"input",8),t.k0s()(),t.j41(35,"div",14)(36,"mat-label",6),t.EFF(37,"Immagini sfondo associate"),t.k0s(),t.j41(38,"mat-card",0)(39,"mat-card-content",15)(40,"div",16),t.DNE(41,Be,3,0,"div",17),t.Z7z(42,We,9,2,"div",18,t.Vm6),t.k0s()()()(),t.j41(44,"div",5)(45,"mat-label",19),t.EFF(46,"Aggiungi qui le immagini di sfondo"),t.k0s(),t.j41(47,"app-file-uploader",20),t.bIt("filesEvent",function(c){return i.setFiles(c)}),t.k0s()()(),t.j41(48,"div",21)(49,"button",22),t.EFF(50,"Salva Modifiche"),t.k0s()()()()()),2&n&&(t.R7$(2),t.Y8G("formGroup",i.anagraficaFormControl),t.R7$(9),t.Y8G("formControl",i.anagraficaFormControl.controls.titolo)("errorStateMatcher",i.matcher),t.R7$(),t.vxM(i.anagraficaFormControl.controls.titolo.hasError("required")?12:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.id_categoria),t.R7$(),t.Dyx(i.categorie),t.R7$(2),t.vxM(i.anagraficaFormControl.controls.id_categoria.hasError("required")?20:-1),t.R7$(4),t.FS9("apiKey",i.apikey_tinymce),t.Y8G("init",i.initTinyMce)("formControl",i.anagraficaFormControl.controls.descrizione),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_video)("errorStateMatcher",i.matcher),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_esterno)("errorStateMatcher",i.matcher),t.R7$(7),t.vxM(i.files&&0==i.files.length?41:-1),t.R7$(),t.Dyx(i.files))},dependencies:[b.G,v.rl,v.nJ,v.TL,E.fg,s.RN,s.m2,s.Lc,C.$z,T.oV,O.xn,k.X6,s.Hu,j.m_,f.X4,f.Jc,V.RI,v.RG,G.mV,$.Ve,E.fS,C.Hl,r.X1,r.qT,r.xH,r.y7,r.me,r.wz,r.BC,r.cb,r.YS,r.l_,r.j4,r.YN,x.l],encapsulation:2})}}return a})();const Qe=()=>["/studenti/eventi/aggiungi-evento"];function Ze(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-month-view",18),t.bIt("dayClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.dayClicked(i.day))})("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("events",e.events)("weekStartsOn",e.weekStartsOn)("refresh",e.refresh)("activeDayIsOpen",e.activeDayIsOpen)}}function Ke(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-week-view",19),t.bIt("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("weekStartsOn",e.weekStartsOn)("events",e.events)("refresh",e.refresh)}}function ti(a,l){if(1&a){const e=t.RV6();t.j41(0,"mwl-calendar-day-view",20),t.bIt("eventClicked",function(i){t.eBV(e);const o=t.XpG();return t.Njj(o.apriEvento(i.event))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("viewDate",e.viewDate)("events",e.events)("refresh",e.refresh)}}(0,h.EO)(H.A);let ei=(()=>{class a{constructor(e,n,i,o,c){this.dialog=e,this.api=n,this.settings=i,this.router=o,this.route=c,this.weekStartsOn=1,this.lastCloseResult="",this.actionsAlignment="",this.numTemplateOpens=0,this.view="month",this.viewDate=new Date,this.actions=[{label:'<i class="fas fa-fw fa-pencil-alt text-warning"></i>',a11yLabel:"Modifica",onClick:({event:_})=>{this.modaleEditaEvento(_)}}],this.refresh=new Z.B,this.events=[],this.activeDayIsOpen=!0,this.doc=(0,t.WQX)(h.qQ)}dayClicked({date:e,events:n}){(0,q.t)(e,this.viewDate)&&((0,Q.r)(this.viewDate,e)&&!0===this.activeDayIsOpen||0===n.length?this.activeDayIsOpen=!1:(this.activeDayIsOpen=!0,this.viewDate=e))}apriEvento(e){this.router.navigate(["/studenti/eventi/visualizza-evento/"+e.id],{relativeTo:this.route})}modaleEditaEvento(e){this.router.navigate(["/studenti/eventi/modifica-evento/"+e.id],{relativeTo:this.route})}deleteEvent(e){this.events=this.events.filter(n=>n!==e)}setView(e){this.view=e}ngOnInit(){var e=this;return(0,d.A)(function*(){e.reload()})()}reload(){var e=this;return(0,d.A)(function*(){let n=yield e.api.call("getEventi");e.events=[];for(let i=0;i<n.length;i++){let o="<b>"+n[i].titolo+"</b> - "+n[i].nome_categoria+" - dal: <b>"+e.settings.convertInItData(n[i].data_inizio)+"</b> al: <b>"+e.settings.convertInItData(n[i].data_fine)+"</b>",c={start:new Date(n[i].data_inizio),end:new Date(n[i].data_fine),title:o,actions:e.actions,attivo:n[i].attivo,color:{primary:"1"==n[i].attivo?"#4bd08b":"#fa896b",secondary:"#ecf2ff"},id_evento:n[i].id_evento,id:n[i].id_evento};e.events.push(c)}e.refresh.next(!0)})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P),t.rXU(u.Ix),t.rXU(u.nX))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-eventi"]],standalone:!0,features:[t.Jv_([(0,y.aw)(),g.jc,{provide:g.MJ,useClass:Y.ZG,useFactory:P.a},g.AD,{provide:y.Ju,useValue:"it-IT"}]),t.aNF],decls:43,vars:28,consts:[[1,"cardWithShadow"],[2,"padding","16px !important"],[1,"d-flex","align-items-center"],[1,"m-l-auto"],["mat-flat-button","","color","primary",3,"routerLink"],[1,"cardWithShadow","overflow-hidden"],["color","primary",1,"no-shadow"],[1,"d-flex","align-items-center","w-100"],[1,"m-l-auto","d-flex","align-items-center"],["mat-button","",3,"click"],["mat-icon-button","",3,"click"],["mat-icon-button","","mwlCalendarPreviousView","",3,"viewDateChange","view","viewDate"],["mat-icon-button","","mwlCalendarToday","",3,"viewDateChange","viewDate"],["mat-icon-button","","mwlCalendarNextView","",3,"viewDateChange","view","viewDate"],[3,"ngSwitch"],["locale","it",3,"viewDate","events","weekStartsOn","refresh","activeDayIsOpen","dayClicked","eventClicked",4,"ngSwitchCase"],["locale","it",3,"viewDate","weekStartsOn","events","refresh","eventClicked",4,"ngSwitchCase"],["locale","it",3,"viewDate","events","refresh","eventClicked",4,"ngSwitchCase"],["locale","it",3,"dayClicked","eventClicked","viewDate","events","weekStartsOn","refresh","activeDayIsOpen"],["locale","it",3,"eventClicked","viewDate","weekStartsOn","events","refresh"],["locale","it",3,"eventClicked","viewDate","events","refresh"]],template:function(n,i){1&n&&(t.j41(0,"mat-card",0)(1,"mat-card-content",1)(2,"div",2)(3,"div",3)(4,"button",4),t.EFF(5," Aggiungi Evento "),t.k0s()()()()(),t.j41(6,"mat-card",5)(7,"mat-toolbar",6)(8,"mat-toolbar-row")(9,"div",7)(10,"span"),t.EFF(11),t.nI1(12,"calendarDate"),t.k0s(),t.j41(13,"div",8)(14,"button",9),t.bIt("click",function(){return i.view="month"}),t.EFF(15," Mese "),t.k0s(),t.j41(16,"button",9),t.bIt("click",function(){return i.view="week"}),t.EFF(17," Settimana "),t.k0s(),t.j41(18,"button",9),t.bIt("click",function(){return i.view="day"}),t.EFF(19," Giorno "),t.k0s(),t.j41(20,"button",10),t.bIt("click",function(){return i.view="month"}),t.j41(21,"mat-icon"),t.EFF(22,"view_module"),t.k0s()(),t.j41(23,"button",10),t.bIt("click",function(){return i.view="week"}),t.j41(24,"mat-icon"),t.EFF(25,"view_week"),t.k0s()(),t.j41(26,"button",10),t.bIt("click",function(){return i.view="day"}),t.j41(27,"mat-icon"),t.EFF(28,"view_day"),t.k0s()(),t.j41(29,"button",11),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(30,"mat-icon"),t.EFF(31,"chevron_left"),t.k0s()(),t.j41(32,"button",12),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(33,"mat-icon"),t.EFF(34,"today"),t.k0s()(),t.j41(35,"button",13),t.mxI("viewDateChange",function(c){return t.DH7(i.viewDate,c)||(i.viewDate=c),c}),t.j41(36,"mat-icon"),t.EFF(37,"chevron_right"),t.k0s()()()()()(),t.j41(38,"mat-card-content")(39,"div",14),t.DNE(40,Ze,1,5,"mwl-calendar-month-view",15)(41,Ke,1,4,"mwl-calendar-week-view",16)(42,ti,1,3,"mwl-calendar-day-view",17),t.k0s()()()),2&n&&(t.R7$(4),t.Y8G("routerLink",t.lJ4(27,Qe)),t.R7$(7),t.JRh(t.brH(12,23,i.viewDate,i.view+"ViewTitle","it")),t.R7$(3),t.AVh("active","month"===i.view),t.R7$(2),t.AVh("active","week"===i.view),t.R7$(2),t.AVh("active","day"===i.view),t.R7$(2),t.AVh("active","month"===i.view),t.R7$(3),t.AVh("active","week"===i.view),t.R7$(3),t.AVh("active","day"===i.view),t.R7$(3),t.Y8G("view",i.view),t.R50("viewDate",i.viewDate),t.R7$(3),t.R50("viewDate",i.viewDate),t.R7$(3),t.Y8G("view",i.view),t.R50("viewDate",i.viewDate),t.R7$(4),t.Y8G("ngSwitch",i.view),t.R7$(),t.Y8G("ngSwitchCase","month"),t.R7$(),t.Y8G("ngSwitchCase","week"),t.R7$(),t.Y8G("ngSwitchCase","day"))},dependencies:[b.G,I.KQ,I.uu,s.RN,s.m2,C.$z,C.iY,j.An,r.YN,f.X4,r.X1,h.ux,g.rO,g.xt,g.Nl,g.u8,g.Sz,g.jD,g.tG,g.T$,h.MD,h.e1,k.X6,z.hM,v.RG,u.Wk],styles:['.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.text-red[_ngcontent-%COMP%]{color:red!important}.text-success[_ngcontent-%COMP%]{color:green}.gg-shield[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:14px;height:4px;background:currentColor;border-radius:100px;margin-top:-6px}.gg-shield[_ngcontent-%COMP%]:after, .gg-shield[_ngcontent-%COMP%]:before{content:"";display:block;box-sizing:border-box;position:absolute;border-radius:3px;width:8px;height:16px;border:2px solid}.gg-shield[_ngcontent-%COMP%]:before{border-bottom-left-radius:40px;border-right:0;left:0}.gg-shield[_ngcontent-%COMP%]:after{border-bottom-right-radius:40px;border-left:0;right:0}.gg-trash[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;display:block;transform:scale(var(--ggs, 1));width:10px;height:12px;border:2px solid transparent;box-shadow:0 0 0 2px,inset -2px 0,inset 2px 0;border-bottom-left-radius:1px;border-bottom-right-radius:1px;margin-top:4px}.gg-trash[_ngcontent-%COMP%]:after, .gg-trash[_ngcontent-%COMP%]:before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-trash[_ngcontent-%COMP%]:after{background:currentColor;border-radius:3px;width:16px;height:2px;top:-4px;left:-5px}.gg-trash[_ngcontent-%COMP%]:before{width:10px;height:4px;border:2px solid;border-bottom:transparent;border-top-left-radius:2px;border-top-right-radius:2px;top:-7px;left:-2px}.gg-pen[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;display:block;transform:rotate(-45deg) scale(var(--ggs, 1));width:14px;height:4px;border-right:2px solid transparent;box-shadow:0 0 0 2px,inset -2px 0;border-top-right-radius:1px;border-bottom-right-radius:1px;margin-right:-2px}.gg-pen[_ngcontent-%COMP%]:after, .gg-pen[_ngcontent-%COMP%]:before{content:"";display:block;box-sizing:border-box;position:absolute}.gg-pen[_ngcontent-%COMP%]:before{background:currentColor;border-left:0;right:-6px;width:3px;height:4px;border-radius:1px;top:0}.gg-pen[_ngcontent-%COMP%]:after{width:8px;height:7px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-right:7px solid;left:-11px;top:-2px}'],changeDetection:0})}}return a})();var at=m(152),nt=m(3294),ot=m(5558),rt=m(1626),S=m(850);function ii(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Titolo "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function ai(a,l){if(1&a&&(t.j41(0,"option",13),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e.id_categoria),t.R7$(),t.JRh(e.nome_categoria)}}function ni(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Categoria "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function oi(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Data di inizio non valida!"),t.k0s())}function ri(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Data di fine non valida!"),t.k0s())}function li(a,l){if(1&a&&(t.j41(0,"mat-option",13),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e),t.R7$(),t.JRh(e)}}class ci{isErrorState(l,e){return!!(l&&l.invalid&&(l.dirty||l.touched||e&&e.submitted))}}let si=(()=>{class a{constructor(e,n,i,o,c){this.api=e,this.settings=n,this.router=i,this.route=o,this.http=c,this.apikey_tinymce=D.c.apikey_tinymce,this.avatarLocation="/assets/images/logos/no-logo.webp",this.initTinyMce={plugins:"lists link image table code help wordcount",menubar:"edit insert view format table tools",language:"it",language_url:D.c.tinymce_lang},this.matcher=new ci,this.indirizzi=[],this.anagraficaFormControl=new r.gE({id_evento:new r.MJ(null),titolo:new r.MJ("",[r.k0.required,r.k0.nullValidator]),descrizione:new r.MJ("",[r.k0.required,r.k0.nullValidator]),id_categoria:new r.MJ(1,[r.k0.required,r.k0.nullValidator]),attivo:new r.MJ(""),files:new r.MJ(null,[]),link_video:new r.MJ(""),link_esterno:new r.MJ(""),data_inizio:new r.MJ(new Date,[r.k0.required,r.k0.nullValidator]),data_fine:new r.MJ(new Date,[r.k0.required,r.k0.nullValidator]),indirizzo:new r.MJ("",[r.k0.required,r.k0.nullValidator]),location_lat:new r.MJ(""),location_long:new r.MJ("")});const _=new Date;this.minDate=new Date,this.maxDate=new Date(_.getFullYear(),_.getMonth(),_.getDay()+365),this.anagraficaFormControl.controls.indirizzo.valueChanges.pipe((0,at.B)(500),(0,nt.F)(),(0,ot.n)(R=>this.geocodeCity(R))).subscribe(R=>{if(this.indirizzi=[],R&&R.length>0){for(let L=0;L<R.length;L++){const U=R[L];this.indirizzi.push(U.display_name),1==R.length&&(this.anagraficaFormControl.controls.location_lat.setValue(U.lat),this.anagraficaFormControl.controls.location_long.setValue(U.lon))}console.log("Indirizzi:",R)}})}ngOnInit(){var e=this;return(0,d.A)(function*(){e.categorie=yield e.api.call("getCategorie",{})})()}inserisciAnagrafica(e){var n=this;return(0,d.A)(function*(){if(e&&!n.anagraficaFormControl.valid)return;let i=n.anagraficaFormControl.value,o=i.data_inizio,c=i.data_fine;o=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0-o.getTimezoneOffset(),1),c=new Date(c.getFullYear(),c.getMonth(),c.getDate(),23,59-c.getTimezoneOffset(),59),i.data_inizio=o.toISOString().split("T")[0]+" "+o.toTimeString().split(" ")[0],i.data_fine=c.toISOString().split("T")[0]+" "+c.toTimeString().split(" ")[0],yield n.api.call("inserisciEvento",i,!0,!0),n.router.navigate(["/studenti/eventi"],{relativeTo:n.route})})()}setFiles(e){this.anagraficaFormControl.patchValue({files:e})}geocodeCity(e){const i=`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(e)}`;return this.http.get(i)}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(F.W),t.rXU(w.P),t.rXU(u.Ix),t.rXU(u.nX),t.rXU(rt.Qq))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-aggiungi-evento"]],viewQuery:function(n,i){if(1&n&&t.GBs(x.l,5),2&n){let o;t.mGM(o=t.lsd())&&(i.fileUploaderComponent=o.first)}},standalone:!0,features:[t.Jv_([(0,y.aw)(),{provide:y.Ju,useValue:"it-IT"}]),t.aNF],decls:63,vars:23,consts:[["picker",""],["auto","matAutocomplete"],[1,"cardWithShadow"],[3,"ngSubmit","formGroup"],[1,"d-flex","align-items-center","p-b-30","b-b-1"],[1,"mat-body-1"],[1,"row","m-t-24"],[1,"col-sm-12"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block"],["appearance","outline","color","primary",1,"w-100"],["matInput","","type","text",3,"formControl","errorStateMatcher"],["appearance","outline",1,"w-100"],["matNativeControl","","required","",3,"formControl"],[3,"value"],[1,"col-12"],[3,"rangePicker","min","max"],["matStartDate","","placeholder","Data inizio",3,"formControl"],["matEndDate","","placeholder","Data fine",3,"formControl"],["matIconSuffix","",3,"for"],["type","text","placeholder","Scrivi qui l'indirizzo","aria-label","Number","matInput","",3,"formControl","matAutocomplete"],[3,"init","apiKey","formControl"],[1,"mat-subtitle-2","f-w-600","m-b-8","m-t-20","d-block"],[3,"filesEvent"],[1,"col-sm-6"],[1,"text-right","p-24","p-t-20","m-b-0","p-b-0","p-r-0"],["type","submit","mat-flat-button","","color","primary",1,"m-r-0"]],template:function(n,i){if(1&n){const o=t.RV6();t.j41(0,"mat-card",2)(1,"mat-card-content")(2,"form",3),t.bIt("ngSubmit",function(){return t.eBV(o),t.Njj(i.inserisciAnagrafica(!0))}),t.j41(3,"div",4)(4,"mat-card-subtitle",5),t.EFF(5,"Inserisci qui i dati e poi clicca sul pulsante salva."),t.k0s()(),t.j41(6,"div",6)(7,"div",7)(8,"mat-label",8),t.EFF(9,"Titolo"),t.k0s(),t.j41(10,"mat-form-field",9),t.nrm(11,"input",10),t.DNE(12,ii,4,0,"mat-error"),t.k0s()(),t.j41(13,"div",7)(14,"mat-label",8),t.EFF(15,"Categoria Tematica"),t.k0s(),t.j41(16,"mat-form-field",11)(17,"select",12),t.Z7z(18,ai,2,2,"option",13,t.Vm6),t.k0s(),t.DNE(20,ni,4,0,"mat-error"),t.k0s()(),t.j41(21,"div",14)(22,"mat-label",8),t.EFF(23,"Seleziona le date di inizio e fine dell'evento"),t.k0s(),t.j41(24,"mat-form-field",11)(25,"mat-date-range-input",15),t.nrm(26,"input",16)(27,"input",17),t.k0s(),t.nrm(28,"mat-datepicker-toggle",18)(29,"mat-date-range-picker",null,0),t.DNE(31,oi,2,0,"mat-error")(32,ri,2,0,"mat-error"),t.k0s()(),t.j41(33,"div",7)(34,"mat-label",8),t.EFF(35,"Indirizzo"),t.k0s(),t.j41(36,"mat-form-field",9),t.nrm(37,"input",19),t.j41(38,"mat-autocomplete",null,1),t.Z7z(40,li,2,2,"mat-option",13,t.fX1),t.k0s()()(),t.j41(42,"div",7)(43,"mat-label",8),t.EFF(44,"Descrizione"),t.k0s(),t.nrm(45,"editor",20),t.k0s(),t.j41(46,"div",7)(47,"mat-label",21),t.EFF(48,"Allega qui le immagini sfondo"),t.k0s(),t.j41(49,"app-file-uploader",22),t.bIt("filesEvent",function(_){return t.eBV(o),t.Njj(i.setFiles(_))}),t.k0s()(),t.j41(50,"div",23)(51,"mat-label",8),t.EFF(52,"Link Video"),t.k0s(),t.j41(53,"mat-form-field",9),t.nrm(54,"input",10),t.k0s()(),t.j41(55,"div",23)(56,"mat-label",8),t.EFF(57,"Link Esterno"),t.k0s(),t.j41(58,"mat-form-field",9),t.nrm(59,"input",10),t.k0s()()(),t.j41(60,"div",24)(61,"button",25),t.EFF(62,"Salva Modifiche"),t.k0s()()()()()}if(2&n){const o=t.sdS(30),c=t.sdS(39);t.R7$(2),t.Y8G("formGroup",i.anagraficaFormControl),t.R7$(9),t.Y8G("formControl",i.anagraficaFormControl.controls.titolo)("errorStateMatcher",i.matcher),t.R7$(),t.vxM(i.anagraficaFormControl.controls.titolo.hasError("required")?12:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.id_categoria),t.R7$(),t.Dyx(i.categorie),t.R7$(2),t.vxM(i.anagraficaFormControl.controls.id_categoria.hasError("required")?20:-1),t.R7$(5),t.Y8G("rangePicker",o)("min",i.minDate)("max",i.maxDate),t.R7$(),t.Y8G("formControl",i.anagraficaFormControl.controls.data_inizio),t.R7$(),t.Y8G("formControl",i.anagraficaFormControl.controls.data_fine),t.R7$(),t.Y8G("for",o),t.R7$(3),t.vxM(i.anagraficaFormControl.controls.data_inizio.hasError("matStartDateInvalid")?31:-1),t.R7$(),t.vxM(i.anagraficaFormControl.controls.data_fine.hasError("matEndDateInvalid")?32:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.indirizzo)("matAutocomplete",c),t.R7$(3),t.Dyx(i.indirizzi),t.R7$(5),t.FS9("apiKey",i.apikey_tinymce),t.Y8G("init",i.initTinyMce)("formControl",i.anagraficaFormControl.controls.descrizione),t.R7$(9),t.Y8G("formControl",i.anagraficaFormControl.controls.link_video)("errorStateMatcher",i.matcher),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_esterno)("errorStateMatcher",i.matcher)}},dependencies:[b.G,S.$3,y.wT,S.pN,k.bU,k.el,k.xR,k.IG,k.SG,v.rl,v.nJ,v.TL,v.yw,E.fg,s.RN,s.m2,s.Lc,C.$z,s.Hu,O.xn,j.m_,f.X4,V.RI,v.RG,G.mV,$.Ve,E.fS,C.Hl,r.X1,r.qT,r.xH,r.y7,r.me,r.wz,r.BC,r.cb,r.YS,r.l_,r.j4,r.YN,x.l],encapsulation:2})}}return a})();var M=m(9969);const lt=a=>["/studenti/eventi/modifica-evento/",a];function mi(a,l){1&a&&(t.j41(0,"div",25)(1,"div",26)(2,"mat-card",27)(3,"h2",28),t.EFF(4," Non hai i permessi per accedere a questa risorsa! "),t.k0s()()()())}function di(a,l){if(1&a&&(t.qex(0),t.nrm(1,"img",30),t.bVm()),2&a){const e=t.XpG(2);t.R7$(),t.Y8G("src",e.copertine[e.copertinaIndex],t.B4B)("@fade",void 0)}}function pi(a,l){if(1&a&&t.DNE(0,di,2,2,"ng-container",29),2&a){const e=t.XpG();t.Y8G("ngIf",e.copertinaIndex>=0&&e.copertinaIndex<e.copertine.length)}}function ui(a,l){1&a&&t.nrm(0,"img",3)}function fi(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG();t.SpI(" ",e.evento.nome.charAt(0).toUpperCase()," ")}}function gi(a,l){if(1&a&&t.EFF(0),2&a){const e=t.XpG();t.SpI(" ",e.evento.cognome.charAt(0).toUpperCase()," ")}}let vi=(()=>{class a{constructor(e,n,i,o){this.activatedRouter=e,this.dialog=n,this.api=i,this.settings=o,this.avatar_location="/assets/images/logos/no-logo.webp",this.copertinaIndex=0,this.evento={}}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_evento=e.activatedRouter.snapshot.paramMap.get("id"),e.evento=yield e.api.call("getEvento",{id_evento:e.id_evento}),e.evento&&(e.files=yield e.api.call("getFilesEvento",{id_evento:e.id_evento}),console.log("Files:",e.files.length),e.files.length>1&&setInterval(()=>{e.copertinaIndex=(e.copertinaIndex+1)%2,console.log(e.copertinaIndex)},5e3)),e.copertine=[],e.caricaCopertina()})()}get copertinaKey(){return this.copertine?.[this.copertinaIndex]??"default"}caricaCopertina(){var e=this;return(0,d.A)(function*(){e.files.forEach(function(){var n=(0,d.A)(function*(i,o,c){let _=yield e.api.call("getFileEvento",{id_evento:e.id_evento,filename:c[o]},!1,!1,!1);_&&e.copertine.push(_)});return function(i,o,c){return n.apply(this,arguments)}}())})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(u.nX),t.rXU(z.bZ),t.rXU(F.W),t.rXU(w.P))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-visualizza-evento"]],standalone:!0,features:[t.aNF],decls:40,vars:27,consts:[["class","row",4,"ngIf"],[1,"col-12"],[1,"cardWithShadow","card2","position-relative","featured-card","overflow-hidden"],["mat-card-image","","ngSrc","assets/images/logos/no-logo.webp","alt","Immaggine di copertina dell'evento","loading","eager"],[1,"text-right",2,"position","absolute","right","0","color","white"],["mat-icon-button","","matTooltip","Modifica Evento",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],["name","edit",1,"icon-18","d-flex","align-items-center"],[1,"featured-overlay","h-100","p-24","d-flex","flex-column","align-items-end","justify-content-start"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"f-s-16","f-w-600"],["mat-icon-button","",1,"align-items-center","justify-content-center","text-white","bg-info","rounded-circle","p-10",3,"matTooltip"],[1,"f-s-12","f-w-600","bg-primary","text-white","rounded","p-x-8","p-y-4"],[1,"m-t-auto","w-100"],[1,"mat-headline-5"],[1,"d-flex","align-items-center","justify-content-center","m-t-24"],[1,"d-flex","align-items-center"],[1,"m-r-12","f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","thumb-up",1,"icon-18","m-r-4"],[1,"f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","map-pin",1,"icon-18","m-r-4"],[1,"m-l-auto","f-s-14","mat-subtitle-2","d-flex","align-items-center"],["name","calendar-event",1,"icon-14","m-r-4"],[1,"m-l-auto","f-s-14","mat-subtitle-2","d-flex","align-items-center",3,"innerHTML"],[1,"d-flex","align-items-center","justify-content-center","w-100","m-t-24"],["mat-button","","matTooltip","Modifica Evento",1,"d-flex","align-items-center","justify-content-center",3,"routerLink"],[1,"row"],[1,"col-sm-12"],[1,"cardWithShadow"],[1,"text-center","p-10"],[4,"ngIf"],["mat-card-image","","alt","Immaggine di copertina dell'evento","loading","eager",3,"src"]],template:function(n,i){1&n&&(t.DNE(0,mi,5,0,"div",0),t.j41(1,"div",1)(2,"mat-card",2),t.DNE(3,pi,1,1,"ng-container")(4,ui,1,0,"img",3),t.j41(5,"div",4)(6,"a",5),t.nrm(7,"i-tabler",6),t.k0s()(),t.j41(8,"div",7)(9,"div",8)(10,"span",9)(11,"span",10),t.DNE(12,fi,1,1)(13,gi,1,1),t.k0s()(),t.j41(14,"span",11),t.EFF(15),t.k0s()(),t.j41(16,"div",12),t.nrm(17,"br"),t.j41(18,"mat-card-title",13),t.EFF(19),t.k0s(),t.j41(20,"div",14)(21,"div",15)(22,"span",16),t.nrm(23,"i-tabler",17),t.EFF(24),t.k0s(),t.j41(25,"span",18),t.nrm(26,"i-tabler",19),t.EFF(27),t.k0s()(),t.j41(28,"span",20),t.nrm(29,"i-tabler",21),t.EFF(30),t.nI1(31,"date"),t.nI1(32,"date"),t.k0s()(),t.nrm(33,"br")(34,"hr")(35,"span",22),t.k0s(),t.j41(36,"div",23)(37,"a",24)(38,"span",11),t.EFF(39," Modifica Evento "),t.k0s()()()()()()),2&n&&(t.Y8G("ngIf",!i.evento),t.R7$(3),t.vxM(i.copertine&&i.copertine.length>0?3:-1),t.R7$(),t.vxM(i.copertine&&0!=i.copertine.length?-1:4),t.R7$(2),t.Y8G("routerLink",t.eq3(23,lt,i.id_evento)),t.R7$(5),t.FCK("matTooltip","Inserito da ",i.evento.nome," ",i.evento.cognome,""),t.R7$(),t.vxM(i.evento&&i.evento.nome?12:-1),t.R7$(),t.vxM(i.evento&&i.evento.cognome?13:-1),t.R7$(2),t.JRh(i.evento.nome_categoria),t.R7$(4),t.JRh(i.evento.titolo),t.R7$(5),t.JRh(i.evento.like),t.R7$(3),t.JRh(i.evento.indirizzo),t.R7$(3),t.Lme(" ",t.i5U(31,17,i.evento.data_inizio,"dd/MM/yyyy")," - ",t.i5U(32,20,i.evento.data_fine,"dd/MM/yyyy")," "),t.R7$(5),t.Y8G("innerHTML",i.evento.descrizione,t.npT),t.R7$(2),t.Y8G("routerLink",t.eq3(25,lt,i.id_evento)))},dependencies:[b.G,s.RN,s.kF,s.dh,C.It,C.pQ,T.oV,h.MD,h.bT,h.vh,u.Wk,r.YN,r.X1,f.X4,f.Jc,h.kt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{display:flex;text-align:center;flex-grow:0;flex-basis:0;margin-right:16px;align-items:center}.course-header[_ngcontent-%COMP%]{padding:12px!important;color:#fff}.course-header[_ngcontent-%COMP%]   .mat-card-header-text[_ngcontent-%COMP%]{width:100%!important}.course-header.Angular[_ngcontent-%COMP%]{background-color:#fc4b6c}.course-header.Web[_ngcontent-%COMP%]{background-color:#1e88e5}.course-header.Design[_ngcontent-%COMP%]{background-color:#26c6da}.course-header.Android[_ngcontent-%COMP%]{background-color:#ffb22b}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:16px}.course-header[_ngcontent-%COMP%]   .mat-card-title[_ngcontent-%COMP%]   .course-duration[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center}.mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid rgba(120,130,140,.13);padding:8px 0!important}.ilabel[_ngcontent-%COMP%]{font-weight:400!important}.text-accent_p[_ngcontent-%COMP%]{color:#38a1cf!important}"],data:{animation:[(0,M.hZ)("fade",[(0,M.kY)(":enter",[(0,M.iF)({opacity:0}),(0,M.i0)("500ms ease-in",(0,M.iF)({opacity:1}))]),(0,M.kY)(":leave",[(0,M.i0)("500ms ease-out",(0,M.iF)({opacity:0}))])])]}})}}return a})();function _i(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Titolo "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function hi(a,l){if(1&a&&(t.j41(0,"option",13),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e.id_categoria),t.R7$(),t.JRh(e.nome_categoria)}}function Ci(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Categoria "),t.j41(2,"strong"),t.EFF(3,"obbligatoria!"),t.k0s()())}function wi(a,l){if(1&a&&(t.j41(0,"mat-option",13),t.EFF(1),t.k0s()),2&a){const e=l.$implicit;t.Y8G("value",e),t.R7$(),t.JRh(e)}}function bi(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Data di inizio non valida!"),t.k0s())}function Fi(a,l){1&a&&(t.j41(0,"mat-error"),t.EFF(1,"Data di fine non valida!"),t.k0s())}function ki(a,l){1&a&&(t.j41(0,"div",24)(1,"div",31),t.EFF(2," Non sono presenti immagini "),t.k0s()())}function Ai(a,l){if(1&a){const e=t.RV6();t.j41(0,"div",25)(1,"div",32)(2,"span",33),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.scaricaFile(i))}),t.nrm(3,"i-tabler",34),t.k0s(),t.j41(4,"div",35)(5,"a",36),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.scaricaFile(i))}),t.EFF(6),t.k0s()(),t.j41(7,"span",37),t.bIt("click",function(){const i=t.eBV(e).$implicit,o=t.XpG();return t.Njj(o.cancellaFile(i))}),t.nrm(8,"i-tabler",38),t.k0s()()()}if(2&a){const e=l.$implicit,n=t.XpG();t.R7$(5),t.FS9("matTooltip",e),t.R7$(),t.JRh(n.settings.parseOnlyFilename(e))}}class yi{isErrorState(l,e){return!!(l&&l.invalid&&(l.dirty||l.touched||e&&e.submitted))}}const Ei=[{path:"home",component:_t,canActivate:[A],data:{title:"Dashboard"}},{path:"categorie",component:Ft,canActivate:[A],data:{title:"Categorie Tematiche"}},{path:"categorie/visualizza-categoria/:id",canActivate:[A],component:Bt,data:{title:"Scheda Categoria Tematica",padre:"/studenti/categorie",padre_titolo:"Cateogirie Tematiche"}},{path:"segnalazioni",canActivate:[A],component:ne,data:{title:"Gestisci le segnalazioni ricevute"}},{path:"segnalazioni/visualizza-segnalazione/:id",canActivate:[A],component:le,data:{title:"Scheda segnalazione ricevuta"}},{path:"articoli",canActivate:[A],component:De,data:{title:"Area Aricoli"}},{path:"articoli/aggiungi-articolo",canActivate:[A],component:Ie,data:{title:"Aggiungi qui un nuovo articolo",padre:"/studenti/articoli",padre_titolo:"Aricoli"}},{path:"articoli/visualizza-articolo/:id",canActivate:[A],component:Pe,data:{title:"Scheda Articolo",padre:"/studenti/articoli",padre_titolo:"Aricoli"}},{path:"articoli/modifica-articolo/:id",canActivate:[A],component:qe,data:{title:"Modifica Articlo",padre:"/studenti/articoli",padre_titolo:"Aricoli"}},{path:"eventi",canActivate:[A],component:ei,data:{title:"Area Eventi"}},{path:"eventi/aggiungi-evento",canActivate:[A],component:si,data:{title:"Aggiungi qui un nuovo evento",padre:"/studenti/eventi",padre_titolo:"Eventi"}},{path:"eventi/visualizza-evento/:id",canActivate:[A],component:vi,data:{title:"Scheda Evento",padre:"/studenti/eventi",padre_titolo:"Eventi"}},{path:"eventi/modifica-evento/:id",canActivate:[A],component:(()=>{class a{constructor(e,n,i,o,c){this.api=e,this.settings=n,this.activatedRouter=i,this.router=o,this.http=c,this.apikey_tinymce=D.c.apikey_tinymce,this.avatarLocation="/assets/images/logos/no-logo.webp",this.initTinyMce={plugins:"lists link image table code help wordcount ",menubar:"edit insert view format table tools",language:"it",language_url:D.c.tinymce_lang},this.matcher=new yi,this.indirizzi=[],this.anagraficaFormControl=new r.gE({id_evento:new r.MJ(-1),titolo:new r.MJ("",[r.k0.required,r.k0.nullValidator]),descrizione:new r.MJ("",[r.k0.required,r.k0.nullValidator]),id_categoria:new r.MJ(-1,[r.k0.required,r.k0.nullValidator]),attivo:new r.MJ("1"),link_video:new r.MJ(""),link_esterno:new r.MJ(""),indirizzo:new r.MJ("",[r.k0.required]),location_lat:new r.MJ(""),location_long:new r.MJ(""),data_fine:new r.MJ(new Date(""),[r.k0.required,r.k0.nullValidator]),data_inizio:new r.MJ(new Date(""),[r.k0.required,r.k0.nullValidator]),files:new r.MJ(null,[])});const _=new Date;this.minDate=new Date,this.maxDate=new Date(_.getFullYear(),_.getMonth(),_.getDay()+365)}ngOnInit(){var e=this;return(0,d.A)(function*(){e.id_evento=e.activatedRouter.snapshot.paramMap.get("id"),e.refresh()})()}refresh(){var e=this;return(0,d.A)(function*(){e.categorie=yield e.api.call("getCategorie",{}),e.evento=yield e.api.call("getEvento",{id_evento:e.id_evento}),e.anagraficaFormControl.controls.id_evento.setValue(e.evento.id_evento),e.anagraficaFormControl.controls.titolo.setValue(e.evento.titolo),e.anagraficaFormControl.controls.descrizione.setValue(e.evento.descrizione),e.anagraficaFormControl.controls.id_categoria.setValue(e.evento.id_categoria),e.anagraficaFormControl.controls.attivo.setValue(e.evento.attivo),e.anagraficaFormControl.controls.link_video.setValue(e.evento.link_video),e.anagraficaFormControl.controls.link_esterno.setValue(e.evento.link_esterno),e.anagraficaFormControl.controls.indirizzo.setValue(e.evento.indirizzo),e.anagraficaFormControl.controls.location_lat.setValue(e.evento.location_lat),e.anagraficaFormControl.controls.location_long.setValue(e.evento.location_long),e.anagraficaFormControl.controls.data_fine.setValue(new Date(e.evento.data_fine)),e.anagraficaFormControl.controls.data_inizio.setValue(new Date(e.evento.data_inizio)),e.minDate=new Date(e.evento.data_inizio),e.anagraficaFormControl.controls.indirizzo.valueChanges.pipe((0,at.B)(500),(0,nt.F)(),(0,ot.n)(n=>e.geocodeCity(n))).subscribe(n=>{if(e.indirizzi=[],n&&n.length>0){for(let i=0;i<n.length;i++){const o=n[i];e.indirizzi.push(o.display_name),1==n.length&&(e.anagraficaFormControl.controls.location_lat.setValue(o.lat),e.anagraficaFormControl.controls.location_long.setValue(o.lon))}console.log("Indirizzi:",n)}}),e.evento&&(e.files=yield e.api.call("getFilesEvento",{id_evento:e.id_evento}))})()}aggiornaAnagrafica(e){var n=this;return(0,d.A)(function*(){if(e&&!n.anagraficaFormControl.valid)return;let i=n.anagraficaFormControl.value,o=i.data_inizio,c=i.data_fine;o=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0-o.getTimezoneOffset(),1),c=new Date(c.getFullYear(),c.getMonth(),c.getDate(),23,59-c.getTimezoneOffset(),59),i.data_inizio=o.toISOString().split("T")[0]+" "+o.toTimeString().split(" ")[0],i.data_fine=c.toISOString().split("T")[0]+" "+c.toTimeString().split(" ")[0],yield n.api.call("updateEvento",i,!0,!0),n.router.navigate(["/studenti/eventi"],{relativeTo:n.activatedRouter})})()}geocodeCity(e){const i=`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(e)}`;return this.http.get(i)}setFiles(e){this.anagraficaFormControl.patchValue({files:e})}cancellaFile(e){var n=this;return(0,d.A)(function*(){n.settings.openDialogElimina("Sei sicuro di voler cancellare il file, l'azione \xe8 inreversibile?").afterClosed().subscribe(function(){var o=(0,d.A)(function*(c){c&&(yield n.api.call("cancellaFileEvento",{id_evento:n.id_evento,filename:e},!0),n.files=yield n.api.call("getFilesEvento",{id_evento:n.id_evento}))});return function(c){return o.apply(this,arguments)}}())})()}scaricaFile(e){var n=this;return(0,d.A)(function*(){let i=yield n.api.call("getFileEvento",{id_evento:n.id_evento,filename:e});i&&window.open(i,"_blank")})()}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(F.W),t.rXU(w.P),t.rXU(u.nX),t.rXU(u.Ix),t.rXU(rt.Qq))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-evento-centro"]],viewQuery:function(n,i){if(1&n&&t.GBs(x.l,5),2&n){let o;t.mGM(o=t.lsd())&&(i.fileUploaderComponent=o.first)}},standalone:!0,features:[t.Jv_([(0,y.aw)(),{provide:y.Ju,useValue:"it-IT"}]),t.aNF],decls:72,vars:24,consts:[["auto","matAutocomplete"],["picker",""],[1,"cardWithShadow"],[3,"ngSubmit","formGroup"],[1,"d-flex","align-items-center","p-b-30","b-b-1"],[1,"mat-body-1"],[1,"row","m-t-24"],[1,"col-sm-12"],[1,"mat-subtitle-2","f-w-600","m-b-8","d-block"],["appearance","outline","color","primary",1,"w-100"],["matInput","","type","text",3,"formControl","errorStateMatcher"],["appearance","outline",1,"w-100"],["matNativeControl","","required","",3,"formControl"],[3,"value"],["type","text","placeholder","Scrivi qui l'indirizzo","aria-label","Number","matInput","",3,"formControl","matAutocomplete"],[1,"col-12"],[3,"rangePicker","min","max"],["matStartDate","","placeholder","Data inizio",3,"formControl"],["matEndDate","","placeholder","Data fine",3,"formControl"],["matIconSuffix","",3,"for"],[3,"init","apiKey","formControl"],[1,"col-12","m-t-20"],[1,"p-b-30","position-relative"],["id","lipsum"],[1,"m-t-24","text-center"],[1,"m-t-24"],[1,"mat-subtitle-2","f-w-600","m-b-8","m-t-20","d-block"],[3,"filesEvent"],[1,"col-sm-6"],[1,"text-right","p-24","p-t-20","m-b-0","p-b-0","p-r-0"],["type","submit","mat-flat-button","","color","primary",1,"m-r-0"],[1,"text-center"],[1,"d-flex","align-items-center"],[1,"text-info","bg-light-info","rounded-circle","icon-46","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click"],["name","download",1,"icon-22","d-flex"],[1,"m-l-16","m-r-auto"],[3,"click","matTooltip"],[1,"text-error","bg-light-error","rounded-circle","icon-46","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click"],["name","x",1,"icon-22","d-flex"]],template:function(n,i){if(1&n){const o=t.RV6();t.j41(0,"mat-card",2)(1,"mat-card-content")(2,"form",3),t.bIt("ngSubmit",function(){return t.eBV(o),t.Njj(i.aggiornaAnagrafica(!0))}),t.j41(3,"div",4)(4,"mat-card-subtitle",5),t.EFF(5,"Edita i dati e poi clicca sul pulsante salva."),t.k0s()(),t.j41(6,"div",6)(7,"div",7)(8,"mat-label",8),t.EFF(9,"Titolo"),t.k0s(),t.j41(10,"mat-form-field",9),t.nrm(11,"input",10),t.DNE(12,_i,4,0,"mat-error"),t.k0s()(),t.j41(13,"div",7)(14,"mat-label",8),t.EFF(15,"Categoria Tematica"),t.k0s(),t.j41(16,"mat-form-field",11)(17,"select",12),t.Z7z(18,hi,2,2,"option",13,t.Vm6),t.k0s(),t.DNE(20,Ci,4,0,"mat-error"),t.k0s()(),t.j41(21,"div",7)(22,"mat-label",8),t.EFF(23,"Indirizzo"),t.k0s(),t.j41(24,"mat-form-field",9),t.nrm(25,"input",14),t.j41(26,"mat-autocomplete",null,0),t.Z7z(28,wi,2,2,"mat-option",13,t.fX1),t.k0s()()(),t.j41(30,"div",15)(31,"mat-label",8),t.EFF(32,"Seleziona le date di inizio e fine dell'evento"),t.k0s(),t.j41(33,"mat-form-field",11)(34,"mat-date-range-input",16),t.nrm(35,"input",17)(36,"input",18),t.k0s(),t.nrm(37,"mat-datepicker-toggle",19)(38,"mat-date-range-picker",null,1),t.DNE(40,bi,2,0,"mat-error")(41,Fi,2,0,"mat-error"),t.k0s()(),t.j41(42,"div",7)(43,"mat-label",8),t.EFF(44,"Descrizione"),t.k0s(),t.nrm(45,"editor",20),t.k0s(),t.j41(46,"div",21)(47,"mat-label",8),t.EFF(48,"Immagini sfondo associate"),t.k0s(),t.j41(49,"mat-card",2)(50,"mat-card-content",22)(51,"div",23),t.DNE(52,ki,3,0,"div",24),t.Z7z(53,Ai,9,2,"div",25,t.Vm6),t.k0s()()()(),t.j41(55,"div",7)(56,"mat-label",26),t.EFF(57,"Allega qui le immagini sfondo"),t.k0s(),t.j41(58,"app-file-uploader",27),t.bIt("filesEvent",function(_){return t.eBV(o),t.Njj(i.setFiles(_))}),t.k0s()(),t.j41(59,"div",28)(60,"mat-label",8),t.EFF(61,"Link Video"),t.k0s(),t.j41(62,"mat-form-field",9),t.nrm(63,"input",10),t.k0s()(),t.j41(64,"div",28)(65,"mat-label",8),t.EFF(66,"Link Esterno"),t.k0s(),t.j41(67,"mat-form-field",9),t.nrm(68,"input",10),t.k0s()()(),t.j41(69,"div",29)(70,"button",30),t.EFF(71,"Salva Modifiche"),t.k0s()()()()()}if(2&n){const o=t.sdS(27),c=t.sdS(39);t.R7$(2),t.Y8G("formGroup",i.anagraficaFormControl),t.R7$(9),t.Y8G("formControl",i.anagraficaFormControl.controls.titolo)("errorStateMatcher",i.matcher),t.R7$(),t.vxM(i.anagraficaFormControl.controls.titolo.hasError("required")?12:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.id_categoria),t.R7$(),t.Dyx(i.categorie),t.R7$(2),t.vxM(i.anagraficaFormControl.controls.id_categoria.hasError("required")?20:-1),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.indirizzo)("matAutocomplete",o),t.R7$(3),t.Dyx(i.indirizzi),t.R7$(6),t.Y8G("rangePicker",c)("min",i.minDate)("max",i.maxDate),t.R7$(),t.Y8G("formControl",i.anagraficaFormControl.controls.data_inizio),t.R7$(),t.Y8G("formControl",i.anagraficaFormControl.controls.data_fine),t.R7$(),t.Y8G("for",c),t.R7$(3),t.vxM(i.anagraficaFormControl.controls.data_inizio.hasError("matStartDateInvalid")?40:-1),t.R7$(),t.vxM(i.anagraficaFormControl.controls.data_fine.hasError("matEndDateInvalid")?41:-1),t.R7$(4),t.FS9("apiKey",i.apikey_tinymce),t.Y8G("init",i.initTinyMce)("formControl",i.anagraficaFormControl.controls.descrizione),t.R7$(7),t.vxM(i.files&&0==i.files.length?52:-1),t.R7$(),t.Dyx(i.files),t.R7$(10),t.Y8G("formControl",i.anagraficaFormControl.controls.link_video)("errorStateMatcher",i.matcher),t.R7$(5),t.Y8G("formControl",i.anagraficaFormControl.controls.link_esterno)("errorStateMatcher",i.matcher)}},dependencies:[b.G,S.$3,y.wT,S.pN,k.bU,k.el,k.xR,k.IG,k.SG,v.rl,v.nJ,v.TL,v.yw,E.fg,s.RN,s.m2,s.Lc,C.$z,T.oV,S.jL,O.xn,k.X6,s.Hu,j.m_,f.X4,f.Jc,V.RI,v.RG,G.mV,$.Ve,E.fS,C.Hl,r.X1,r.qT,r.xH,r.y7,r.me,r.wz,r.BC,r.cb,r.YS,r.l_,r.j4,r.YN,x.l],encapsulation:2})}}return a})(),data:{title:"Modifica Evento",padre:"/studenti/eventi",padre_titolo:"Eventi"}}]}}]);

Anon7 - 2022
AnonSec Team