@infordata-web/portal-common-component-lib
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.14.
17 lines • 310 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("@angular/material/dialog"),require("@angular/platform-browser"),require("@angular/platform-browser/animations"),require("@angular/localize/init"),require("@angular/forms"),require("@angular/material/table"),require("@angular/cdk/collections"),require("portal-i18n-lib"),require("@angular/material/select"),require("@angular/material/core"),require("@angular/material/button"),require("@angular/material/card"),require("@angular/material/input"),require("@angular/material/form-field"),require("@angular/material/paginator"),require("@angular/material/icon"),require("@angular/material/progress-bar"),require("@angular/material/expansion"),require("@angular/material/radio"),require("@angular/material/checkbox"),require("moment"),require("angular-portal-shell-app"),require("@angular/material/datepicker"),require("@ng-bootstrap/ng-bootstrap"),require("@angular/material/list"),require("file-saver"),require("ngx-json-viewer"),require("@angular/material/sort"),require("@angular/material/tooltip"),require("@angular/material-moment-adapter"),require("ngx-iban"),require("@ngxs/form-plugin")):"function"==typeof define&&define.amd?define("@infordata-web/portal-common-component-lib",["exports","@angular/core","@angular/common","@angular/common/http","rxjs","rxjs/operators","@angular/material/dialog","@angular/platform-browser","@angular/platform-browser/animations","@angular/localize/init","@angular/forms","@angular/material/table","@angular/cdk/collections","portal-i18n-lib","@angular/material/select","@angular/material/core","@angular/material/button","@angular/material/card","@angular/material/input","@angular/material/form-field","@angular/material/paginator","@angular/material/icon","@angular/material/progress-bar","@angular/material/expansion","@angular/material/radio","@angular/material/checkbox","moment","angular-portal-shell-app","@angular/material/datepicker","@ng-bootstrap/ng-bootstrap","@angular/material/list","file-saver","ngx-json-viewer","@angular/material/sort","@angular/material/tooltip","@angular/material-moment-adapter","ngx-iban","@ngxs/form-plugin"],e):e(((t=t||self)["infordata-web"]=t["infordata-web"]||{},t["infordata-web"]["portal-common-component-lib"]={}),t.ng.core,t.ng.common,t.ng.common.http,t.rxjs,t.rxjs.operators,t.ng.material.dialog,t.ng.platformBrowser,t.ng.platformBrowser.animations,t.ng.localize.init,t.ng.forms,t.ng.material.table,t.ng.cdk.collections,t.i1$2,t.ng.material.select,t.ng.material.core,t.ng.material.button,t.ng.material.card,t.ng.material.input,t.ng.material.formField,t.ng.material.paginator,t.ng.material.icon,t.ng.material.progressBar,t.ng.material.expansion,t.ng.material.radio,t.ng.material.checkbox,t.moment,t.angularPortalShellApp,t.ng.material.datepicker,t.ngBootstrap,t.ng.material.list,t.fileSaver,t.ngxJsonViewer,t.ng.material.sort,t.ng.material.tooltip,t.ng.materialMomentAdapter,t.ngxIban,t.formPlugin)}(this,(function(t,e,i,n,o,a,r,s,l,c,d,p,u,m,f,h,g,v,b,z,y,F,C,S,w,I,P,x,D,R,V,E,A,N,T,$,M,O){"use strict";var G=function(t){this.nameApp=t.nameApp,this.lingua$=t.lingua$,this.servicePaths=t.servicePaths,this.userProfile=t.userProfile,this.appPath=t.appPath};G.decorators=[{type:e.Injectable}],G.ctorParameters=function(){return[{type:void 0}]};var k=function(){function t(t,e,i){var n=this;this.http=t,this.appRef=e,this.configurationService=i,this.traduzioniLib$=new o.Observable,this.communicatoreConEsterno$=new o.Subject,this.i18nApiUrl=this.configurationService.servicePaths.get("I18N_MS_API_URL"),console.log("[DAG_I18N_MS_URL]",this.i18nApiUrl),this.traduzioniLib$=this.configurationService.lingua$.pipe(a.switchMap((function(t){return n.getBundleTraduzioni$(t)})),a.tap((function(t){return setTimeout((function(){return n.appRef.tick()}),0)})),a.shareReplay())}return t.prototype.getTraduzione$=function(t){var e=this;return o.defer((function(){return e.traduzioniLib$.pipe(a.map((function(e){return e.get(t)||t})))}))},t.prototype.getBundleTraduzioni$=function(t){var e=this,i=this.i18nApiUrl+"/v1/labels/"+this.configurationService.nameApp+"/"+t;return this.http.get(i).pipe(a.map(this.reduceLabels),a.tap((function(t){return e.communicatoreConEsterno$.next(!0)})))},t.prototype.reduceLabels=function(t){return t.reduce((function(t,e){return t.set(e.codiceLabel,e.label)}),new Map)},t}();k.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new k(e.ɵɵinject(n.HttpClient),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(G))},token:k,providedIn:"root"}),k.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],k.ctorParameters=function(){return[{type:n.HttpClient},{type:e.ApplicationRef},{type:G}]};var L=function(){function t(t,n){this.translate=t,this.injector=n,this.asyncPipe=new i.AsyncPipe(n.get(e.ChangeDetectorRef))}return t.prototype.transform=function(t){return this.asyncPipe.transform(this.translate.getTraduzione$(t))},t.prototype.ngOnDestroy=function(){this.asyncPipe.ngOnDestroy()},t}();L.decorators=[{type:e.Pipe,args:[{name:"traduzione"}]}],L.ctorParameters=function(){return[{type:k},{type:e.Injector}]};var q=function(){};q.decorators=[{type:e.NgModule,args:[{declarations:[L],imports:[n.HttpClientModule,i.CommonModule,r.MatDialogModule,s.BrowserModule,l.BrowserAnimationsModule],providers:[L],exports:[L]}]}],q.ctorParameters=function(){return[]};var _=function(){function t(){}return t.of=function(e,i){var n=new t;return n.status=e,n.output=i,n},t.prototype.ifValid=function(t){status&&t(this.output)},t.prototype.each=function(t){t(this.output)},t.prototype.mapValue=function(e){return t.of(this.status,e(this.output))},t}(),B=function(){},j=function(){function t(){this.defaultMessage="required",this.messages={maxlength:"validation-maxlength",requiredInfoDecreto:"validation-requiredInfoDecreto",requiredMail:"validation-requiredMail",cfInvalidoFormalmente:"validation-cfInvalidoFormalmente",invalidCF:"validation-invalidCF",nSentenza:"validation-nSentenza",required:"validation-required",email:"validation-email",tel:"validation-tel",iban:"validation-iban",partitaIVAInvalida:"validation-partitaIVAInvalida",partitaIVAMaxLen2:"validation-partitaIVAMaxLen2",money:"validation-money",invalidName:"validation-invalidName",invalidDate:"validation-invalidDate",pattern:"validation-pattern",invalidDateFormat:"validation-invalidDateFormat",requiredDefinizione:"validation-requiredDefinizione",validationServiceFailed:"validation-validationServiceFailed",cfValidationPG:"validation-cfValidationPG",cfDifferentRichiedente:"validation-cfDifferentRichiedente",requiredDomicilio:"validation-requiredDomicilio",requiredSede:"validation-requiredSede"}}return t.prototype.produceMessage=function(t,e){return Object.keys(e.errors)[0]?this.getMessage(Object.keys(e.errors)[0]):this.getMessage(this.defaultMessage)},t.prototype.getMessage=function(t){var e=this.messages[t];return e||t},t.prototype.produceCFMessage=function(t){var e=this.getMessage(this.defaultMessage);return t.hasError("cfInvalidoFormalmente")?e=this.messages.cfInvalidoFormalmente:t.hasError("invalidCF")?e=this.messages.invalidCF:t.hasError("cfDifferentRichiedente")&&(e=this.messages.cfDifferentRichiedente),e},t.prototype.getErrorData=function(t){var e=this.getMessage(this.defaultMessage);return t.hasError("required")&&!t.errors.matDatepickerParse?e=this.messages.required:t.hasError("invalidDate")?e=this.messages.invalidDate:t.errors.matDatepickerParse&&(e=this.messages.invalidDateFormat),e},t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[]};var H=function(){function t(t){this.msg=t,this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.recapiti$&&this.initContatto();var e=new d.FormControl({value:this.contatti.email,disabled:!1});this.form.addControl("email",e);var i=new d.FormControl({value:this.contatti.pec,disabled:!1});this.form.addControl("pec",i);var n=new d.FormControl({value:this.contatti.telefono,disabled:!1});this.form.addControl("telefono",n);var o=this.form.valueChanges.pipe(a.map((function(o){var a=new B;return a.email=e.value,a.pec=i.value,a.telefono=n.value,_.of(t.form.valid,a)})));this.form.setValidators((function(t){return t.get("pec").value||t.get("email").value?null:{requiredMail:!0}})),this.subscription=o.subscribe((function(e){return t.done.emit(e)}))},t.prototype.initContatto=function(){this.listaEmail$=this.recapiti$.pipe(a.map((function(t){return t.filter((function(t){return"EMAIL"==t.tipoRecapito.codice}))}))),this.listaPec$=this.recapiti$.pipe(a.map((function(t){return t.filter((function(t){return"PEC"==t.tipoRecapito.codice}))}))),this.listaTelefono$=this.recapiti$.pipe(a.map((function(t){return t.filter((function(t){return"PHONE"==t.tipoRecapito.codice||"CELL"==t.tipoRecapito.codice}))})))},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.ngAfterContentInit=function(){this.form.updateValueAndValidity({emitEvent:!0})},t}();H.decorators=[{type:e.Component,args:[{selector:"lib-contatti",template:'\t<form [formGroup]="form">\r\n\t\t<div class="collapse-body mt-2">\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'email-recapito\' | traduzione}}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="email">\r\n\t\t\t\t\t\t\t<mat-option [value]="null">{{ \'seleziona\' | traduzione }}</mat-option>\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let item of listaEmail$ | async" [value]="item.id">\r\n\t\t\t\t\t\t\t\t{{ item.recapito}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'email\'].invalid">\r\n\t\t\t\t\t\t\t{{msg.produceMessage(\'email\', form.controls[\'email\']) | traduzione}}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t<mat-hint *infoTip="\'email-recapito\'"></mat-hint>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'pec-recapito\' | traduzione}}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="pec">\r\n\t\t\t\t\t\t\t<mat-option [value]="null"> {{ \'seleziona\' | traduzione }} </mat-option>\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let item of listaPec$ | async" [value]="item.id">\r\n\t\t\t\t\t\t\t\t{{ item.recapito}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'pec\'].invalid">\r\n\t\t\t\t\t\t\t{{msg.produceMessage(\'email\', form.controls[\'pec\']) | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t<mat-hint *infoTip="\'pec-recapito\'"></mat-hint>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{\'telefono-recapito\' | traduzione}}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="telefono">\r\n\t\t\t\t\t\t\t<mat-option [value]="null"> {{ \'seleziona\' | traduzione }} </mat-option>\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let item of listaTelefono$ | async" [value]="item.id">\r\n\t\t\t\t\t\t\t\t{{ item.recapito}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'telefono\'].invalid">\r\n\t\t\t\t\t\t\t{{msg.produceMessage(\'tel\', form.controls[\'telefono\']) | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t<mat-hint *infoTip="\'telefono-recapito\'"></mat-hint>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<br><br>\r\n\t\t<div class="col-md-12">\r\n\t\t\t<mat-error *ngIf="form.getError(\'requiredMail\')">\r\n\t\t\t\t{{msg.produceMessage(\'requiredMail\', form) | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\t</form>\r\n',styles:[""]}]}],H.ctorParameters=function(){return[{type:j}]},H.propDecorators={recapiti$:[{type:e.Input}],contatti:[{type:e.Input}],done:[{type:e.Output}]};var U=function(){function t(){}return t.prototype.ngOnChanges=function(t){},t.prototype.ngOnInit=function(){this.form=new d.FormGroup({})},t}();U.decorators=[{type:e.Component,args:[{selector:"lib-dati-anagrafici",template:'<div form [formGroup]="form" *ngIf="datiPersonaFisica$ | async as datiPersonaFisica">\r\n\t\x3c!-- <h2 class="border-bottom font-weight-bold h3">{{\'dati-anagrafici\' | traduzione}}</h2> --\x3e\r\n\t<h3 class="border-bottom font-weight-bold h5"><info-tip-label label="dati-anagrafici"></info-tip-label></h3>\r\n\t<div class="row mt-3">\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'codice-fiscale\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.codiceFiscale}}</p>\r\n\t\t\t<mat-hint *infoTip="\'codice-fiscale\'"></mat-hint>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'nome\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.nome}}</p>\r\n\t\t\t<mat-hint *infoTip="\'nome\'"></mat-hint>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'cognome\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.cognome}}</p>\r\n\t\t\t<mat-hint *infoTip="\'cognome\'"></mat-hint>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'data-nascita\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.dataNascita}}</p>\r\n\t\t\t<mat-hint *infoTip="\'data-nascita\'"></mat-hint>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class="row mt-4">\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'stato-nascita\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.nazioneNascita.denominazione}}</p>\r\n\t\t\t<mat-hint *infoTip="\'stato-nascita\'"></mat-hint>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-3">\r\n\t\t\t<p class="mb-0 font-weight-bold">{{\'sesso\' | traduzione}}:</p>\r\n\t\t\t<p>{{datiPersonaFisica.tipoSesso.codice}}</p>\r\n\t\t\t<mat-hint *infoTip="\'sesso\'"></mat-hint>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n',styles:[""]}]}],U.ctorParameters=function(){return[]},U.propDecorators={datiPersonaFisica$:[{type:e.Input}]};var Z=function(){function t(){this.indirizzoToltip="INDIRIZZO",this.civicoToltip="civico",this.nazioneToltip="nazione",this.provinciaToltip="provincia",this.regioneToltip="regione",this.comuneToltip="comune",this.capToltip="cap"}return t.prototype.ngOnChanges=function(t){},t.prototype.ngOnInit=function(){this.form=new d.FormGroup({})},t}();Z.decorators=[{type:e.Component,args:[{selector:"lib-dati-residenza",template:'\x3c!-- <p>Dati Residenza works!</p> --\x3e\r\n<mat-expansion-panel class="panel" [expanded]="true">\r\n\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t<mat-panel-title>\r\n\t\t\t\x3c!-- <h3>{{\'dati-residenza\' | traduzione}}</h3> --\x3e\r\n\t\t\t<h3 class="mb-0 h5"><info-tip-label label="dati-residenza"></info-tip-label></h3>\r\n\t\t</mat-panel-title>\r\n\t</mat-expansion-panel-header>\r\n\t<div form [formGroup]="form" class="collapse-body mt-2">\r\n\t\t<ng-container *ngIf="residenza$ | async as residenza">\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-md-10">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'indirizzo\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.indirizzo}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="indirizzoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-2">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'civico\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.civico}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="civicoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'nazione\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.nazione?.denominazione}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="nazioneToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-8">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'regione\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.regione?.denominazione}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="regioneToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'provincia\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.provincia?.denominazione}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="provinciaToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'comune\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.comune?.denominazione}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="comuneToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4">\r\n\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'cap\' | traduzione }}:</p>\r\n\t\t\t\t\t<p>{{residenza?.cap}}</p>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="capToltip"></mat-hint> --\x3e\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n</mat-expansion-panel>\r\n',styles:[""]}]}],Z.ctorParameters=function(){return[]},Z.propDecorators={residenza$:[{type:e.Input}]};var Y=function(){},W=function(){function t(){}return t.of=function(e,i){var n=new t;return n._1=e,n._2=i,n},t}(),K=function(){function t(){}return t.reducer2=function(e,i,n,a){var r=o.merge(t.ordinal(e,1),t.ordinal(i,2));return t.reducerInternal(r,a,2,n)},t.reducer3=function(e,i,n,a,r){var s=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3));return t.reducerInternal(s,r,3,a)},t.reducer4=function(e,i,n,a,r,s){var l=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4));return t.reducerInternal(l,s,4,r)},t.reducer5=function(e,i,n,a,r,s,l){var c=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4),t.ordinal(r,5));return t.reducerInternal(c,l,5,s)},t.reducer6=function(e,i,n,a,r,s,l,c){var d=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4),t.ordinal(r,5),t.ordinal(s,6));return t.reducerInternal(d,c,6,l)},t.reducer7=function(e,i,n,a,r,s,l,c,d){var p=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4),t.ordinal(r,5),t.ordinal(s,6),t.ordinal(l,7));return t.reducerInternal(p,d,7,c)},t.reducer8=function(e,i,n,a,r,s,l,c,d,p){var u=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4),t.ordinal(r,5),t.ordinal(s,6),t.ordinal(l,7),t.ordinal(c,8));return t.reducerInternal(u,p,8,d)},t.reducer9=function(e,i,n,a,r,s,l,c,d,p,u){var m=o.merge(t.ordinal(e,1),t.ordinal(i,2),t.ordinal(n,3),t.ordinal(a,4),t.ordinal(r,5),t.ordinal(s,6),t.ordinal(l,7),t.ordinal(c,8),t.ordinal(d,9));return t.reducerInternal(m,u,9,p)},t.reducerInternal=function(t,e,i,n){var o=W.of([],e);return t.pipe(a.scan((function(t,e){return t._2.mapValue(e._2.output),t._1[e._1]=e._2.status,t}),o),a.map((function(t){var e=t._1,i=n(t._2.output)&&e.reduce((function(t,e){return t&&(null==e||e)}),!0);return _.of(i,t._2.output)})),a.delay(0),a.startWith(e))},t.ordinal=function(t,e){return t.pipe(a.map((function(t){return W.of(e,t)})))},t}(),J=function(){function t(t){this.msg=t,this.done=new e.EventEmitter,this.displayedColumns=["tipo","presso","indirizzo","preferito","seleziona"],this.changesRecapito$=new o.Subject,this.validazioneDomicilio=!1,this.tipoToltip="tipo",this.pressoToltip="presso",this.indirizzoToltip="indirizzo",this.selezionaToltip="seleziona",this.preferitoToltip="preferito"}return t.prototype.ngOnInit=function(){var t=this;console.log("[domicili]",this.domicili),this.form=new d.FormGroup({});this.domicilio||this.initDomicilio(),this.dataSource=new p.MatTableDataSource(this.domicili),this.selection=new u.SelectionModel(!1,[]),this.initialSelection();var e=new d.FormControl({value:this.domicilio.hasSelezionatoDomicilio,disabled:!1});this.form.addControl("domicilio",e);var i=new d.FormControl({value:"",disabled:!1});this.form.addControl("selected",i),this.checkDomicilio$=e.valueChanges.pipe(a.shareReplay()).pipe(a.tap((function(e){0==e&&t.selection.clear()})),a.startWith(null!=this.domicilio.idDomicilioSelezionato));var n=this.checkDomicilio$.pipe(a.map((function(e){return _.of(!0,(function(i){i.hasSelezionatoDomicilio=e,0==e&&(i.contatto.email=null,i.contatto.pec=null,i.contatto.telefono=null,t.form.get("selected").setValue(""))}))}))),o=this.selection.changed.pipe(a.tap((function(e){t.validazioneDomicilio=!(e.added.length>0)})),a.map((function(t){return _.of(!0,(function(e){e.idDomicilioSelezionato=t.added.length>0?t.added[0].id:null}))})));this.subscription=K.reducer3(n,o,this.changesRecapito$,(function(t){return!t.hasSelezionatoDomicilio||null!=t.idDomicilioSelezionato}),_.of(!0,this.domicilio)).subscribe((function(e){t.done.emit(e)})),this.form.setValidators((function(e){return e.get("domicilio").value&&!e.get("selected").value?(t.validazioneDomicilio=!0,{requiredDomicilio:!0}):null}))},t.prototype.initialSelection=function(){var t=this;this.domicilio.idDomicilioSelezionato&&setTimeout((function(){t.dataSource.data.forEach((function(e){e.id==t.domicilio.idDomicilioSelezionato&&(t.selection.select(e),t.validazioneDomicilio=!1)}))}),0)},t.prototype.initDomicilio=function(){this.domicilio=new Y,this.domicilio.contatto=new B},t.prototype.recapitiReady=function(t){this.changesRecapito$.next(t.mapValue((function(t){return function(e){return e.contatto=t}})))},t.prototype.ngOnDestroy=function(){null!=this.subscription&&this.subscription.unsubscribe()},t}();J.decorators=[{type:e.Component,args:[{selector:"lib-dati-domicilio",template:'<mat-expansion-panel class="panel" [expanded]="domicilio.hasSelezionatoDomicilio">\r\n\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t<mat-panel-title>\r\n\t\t\t\x3c!-- <h3>{{\'domicilio\' | traduzione}}</h3> --\x3e\r\n\t\t\t<h3 class="mb-0 h5"><info-tip-label label="domicilio"></info-tip-label></h3>\r\n\t\t</mat-panel-title>\r\n\t</mat-expansion-panel-header>\r\n\t<form [formGroup]="form">\r\n\t\t<div class="collapse-body mt-2">\r\n\t\t\t<div class="row">\r\n\t\t\t\t<section class="example-section col-md-2">\r\n\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\tformControlName="domicilio"\r\n\t\t\t\t\t\tclass="example-margin">\r\n\t\t\t\t\t\t\x3c!-- {{\'seleziona-domicilio\' | traduzione}} --\x3e\r\n\t\t\t\t\t\t<info-tip-label label="seleziona-domicilio"></info-tip-label>\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t</section>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<ng-container *ngIf="checkDomicilio$ | async">\r\n\r\n\t\t<h4 class="border-bottom font-weight-bold mt-4 h5"><info-tip-label label="domicili-inseriti"></info-tip-label></h4>\r\n <ng-container *ngIf="domicili?.length > 0; else noDomicili">\r\n\t\t\t<mat-table [dataSource]="dataSource" class="mat-elevation-z8 mt-3 border">\r\n\r\n\t\t\t\t\x3c!-- Tipo Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="tipo">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'tipo\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.tipoDomicilio.descrizione}} </mat-cell>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="tipoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Presso Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="presso">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'presso\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.indirizzo.presso}} </mat-cell>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="pressoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Indirizzo Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="indirizzo">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'indirizzo\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element">\r\n\t\t\t\t\t\t<span *ngIf="!element.indirizzo.estero"> {{element.indirizzo.indirizzo}}\r\n\t\t\t\t\t\t\t{{element.indirizzo.civico}} {{element.indirizzo.cap}} -\r\n\t\t\t\t\t\t\t{{element.indirizzo.comune.denominazione}} {{element.indirizzo.provinciaLabel}}</span>\r\n\t\t\t\t\t\t<span *ngIf="element.indirizzo.estero"> {{element.indirizzo.nazione.denominazione}} -\r\n\t\t\t\t\t\t\t{{element.indirizzo.indirizzo}} </span>\r\n\t\t\t\t\t</mat-cell>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="indirizzoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Preferito Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="preferito">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'preferito\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element">\r\n\t\t\t\t\t\t\x3c!-- <mat-checkbox class="example-margin" [disabled]="true">\r\n\t\t\t\t\t\t</mat-checkbox> --\x3e\r\n\t\t\t\t\t\t\x3c!-- <mat-checkbox *ngIf="!element.preferito" class="example-margin" [disabled]="true">\r\n\t\t\t\t\t\t</mat-checkbox> --\x3e\r\n\t\t\t\t\t\t<mat-checkbox *ngIf="element.preferito" class="example-margin" [checked]="true"\r\n\t\t\t\t\t\t\t[disabled]="true"></mat-checkbox>\r\n\t\t\t\t\t</mat-cell>\r\n\t\t\t\t\t\x3c!-- <mat-hint *infoTip="preferitoToltip"></mat-hint> --\x3e\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Selezione Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="seleziona">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'seleziona\' | traduzione}}\r\n\t\t\t\t\t \t\x3c!-- <mat-checkbox (change)="$event ? masterToggle() : null"\r\n\t\t\t\t\t\t\t\t\t[checked]="selection.hasValue() && isAllSelected()"\r\n\t\t\t\t\t\t\t\t\t[indeterminate]="selection.hasValue() && !isAllSelected()"\r\n\t\t\t\t\t\t\t\t\tformControlName="selected2">\r\n\t\t\t\t\t\t</mat-checkbox> --\x3e\r\n\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="selezionaToltip"></mat-hint> --\x3e\r\n\t\t\t\t\t</mat-header-cell>\r\n\r\n\t\t\t\t\t<mat-cell *matCellDef="let row">\r\n\t\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\t\t(click)="$event.stopPropagation()"\r\n\t\t\t\t\t\t\t(change)="$event ? selection.toggle(row) : null"\r\n\t\t\t\t\t\t\t[checked]="selection.isSelected(row)"\r\n\t\t\t\t\t\t\tformControlName="selected">\r\n\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t</mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>\r\n\t\t\t\t<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>\r\n\r\n\t\t\t</mat-table>\r\n\t\t\t<div class="collapse-body mt-2">\r\n\t\t\t\t<div class="col-md-12">\r\n\t\t\t\t\t<mat-error *ngIf="validazioneDomicilio">\r\n\t\t\t\t\t\t{{\'validation-requiredDomicilio\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #noDomicili>\r\n\t\t\t<div class="collapse-body mt-2">\r\n\t\t\t\t<div class="col-md-12">\r\n\t\t\t\t\t<mat-error >\r\n\t\t\t\t\t\t{{\'no-domicili\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\r\n\t\t\t<div class="collapse-body mt-2" *ngIf="(recapiti$ | async)">\r\n\t\t\t\t<div class="row">\r\n\t\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t\t<mat-card>\r\n\t\t\t\t\t\t\t<lib-contatti\r\n\t\t\t\t\t\t\t\t[contatti]="domicilio.contatto"\r\n\t\t\t\t\t\t\t\t[recapiti$]="recapiti$"\r\n\t\t\t\t\t\t\t\t(done)="recapitiReady($event)"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t</lib-contatti>\r\n\t\t\t\t\t\t</mat-card>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t</ng-container>\r\n\t</form>\r\n</mat-expansion-panel>\r\n',styles:[""]}]}],J.ctorParameters=function(){return[{type:j}]},J.propDecorators={domicili:[{type:e.Input}],recapiti$:[{type:e.Input}],domicilio:[{type:e.Input}],done:[{type:e.Output}],formGroupDirective:[{type:e.ViewChild,args:[d.FormGroupDirective]}]};var Q=function(){},X=function(){function t(){this.nextStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.changesPersonaFisica$=new o.Subject,this.changesResidenza$=new o.Subject,this.changesRecapito$=new o.Subject,this.changesDomicilio$=new o.Subject,this.direction="only-forward",this.isFinal=!1,this.isDomicilioElettoValid=!1}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=!0;this.datiRichiedente||(this.initRichiedente(),e=!1),K.reducer4(this.changesPersonaFisica$,this.changesResidenza$,this.changesRecapito$,this.changesDomicilio$,(function(t){var i;return i=t.domicilio.hasSelezionatoDomicilio||null==t.domicilio.hasSelezionatoDomicilio?null!=t.domicilio:null!=t.contatto,e=i,i}),_.of(e,this.datiRichiedente)).subscribe((function(e){console.log("[RichiedenteComponent] datiRichiedente",e),0==e.output.domicilio.hasSelezionatoDomicilio?t.isDichiaranteValid=t.hasSelecteDichiarante(e):t.isDichiaranteValid=t.hasSelecteDichiaranteAnd(e)})),this.datiPersonaFisica$=this.personaFisica$.pipe(a.pluck("datiPersonaFisica")),this.residenza$=this.personaFisica$.pipe(a.pluck("residenza")),this.recapiti$=this.personaFisica$.pipe(a.pluck("recapiti"),a.map((function(t){return t||[]}))),this.domicili$=this.personaFisica$.pipe(a.pluck("domicili"))},t.prototype.recapitiReady=function(t){this.changesRecapito$.next(t.mapValue((function(t){return function(e){return e.contatto=t}})))},t.prototype.domiciliReady=function(t){this.changesDomicilio$.next(t.mapValue((function(t){return function(e){e.domicilio=t}})))},t.prototype.initRichiedente=function(){this.datiRichiedente=new Q,this.datiRichiedente.contatto=new B,this.datiRichiedente.domicilio=new Y,this.datiRichiedente.domicilio.contatto=new B,this.datiRichiedente.domicilio.idDomicilioSelezionato=null},t.prototype.forward=function(t){this.nextStep.emit(this.datiRichiedente)},t.prototype.complete=function(t){},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit(this.datiRichiedente)},t.prototype.ngOnDestroy=function(){this.domicilioElettoSub&&this.domicilioElettoSub.unsubscribe()},t.prototype.hasSelecteDichiarante=function(t){return null!=t.output.contatto.email||null!=t.output.contatto.pec},t.prototype.hasSelecteDichiaranteAnd=function(t){return this.hasSelecteDichiarante(t)&&null!=t.output.domicilio.idDomicilioSelezionato&&(null!=t.output.domicilio.contatto.email||null!=t.output.domicilio.contatto.pec)},t}();X.decorators=[{type:e.Component,args:[{selector:"lib-richiedente",template:'<div class="mt-3 mb-5" [formGroup]="form">\r\n\t\t<lib-dati-anagrafici\r\n\t\t\t[datiPersonaFisica$]="datiPersonaFisica$"\r\n\t\t>\r\n\t\t</lib-dati-anagrafici>\r\n\t<div class="mt-4"></div>\r\n\t<lib-dati-residenza\r\n\t\t[residenza$]="residenza$"\r\n\t>\r\n\t</lib-dati-residenza>\r\n\r\n\t<mat-expansion-panel class="panel mt-4" [expanded]="true">\r\n\t\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t\t<mat-panel-title>\r\n\t\t\t\t\x3c!-- <h3>{{\'recapiti\' | traduzione}}</h3> --\x3e\r\n\t\t\t\t<h3 class="mb-0 h5"><info-tip-label label="recapiti"></info-tip-label></h3>\r\n\t\t\t</mat-panel-title>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<lib-contatti\r\n\t\t\t[contatti]="datiRichiedente.contatto"\r\n\t\t\t[recapiti$]="recapiti$"\r\n\t\t\t(done)="recapitiReady($event)"\r\n\t\t>\r\n\t\t</lib-contatti>\r\n\t</mat-expansion-panel>\r\n\t<div class="mt-4"></div>\r\n\t<div *ngIf="(personaFisica$ | async)">\r\n\t\t<lib-dati-domicilio\r\n\t\t\t[domicilio]="datiRichiedente.domicilio"\r\n\t\t\t[domicili]="domicili$ | async"\r\n\t\t\t[recapiti$]="recapiti$"\r\n\t\t\t(done)="domiciliReady($event)"\r\n\t\t>\r\n\t\t</lib-dati-domicilio>\r\n\t</div>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isDichiaranteValid"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t\t(complete)="complete($event)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[".mat-card{border-radius:0!important;border-top:5px solid #0a2644}.divider{background-color:#737373;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-flex{background-color:#fff!important}.mat-select-value{max-width:100%;width:100%!important}"]}]}],X.ctorParameters=function(){return[]},X.propDecorators={datiRichiedente:[{type:e.Input}],personaFisica$:[{type:e.Input}],nextStep:[{type:e.Output}],salvaBozza:[{type:e.Output}]};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var tt=function(t,e){return(tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function et(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}tt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}Object.create;function it(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function nt(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,a=i.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r}function ot(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(nt(arguments[e]));return t}Object.create;var at="RICORRENTE",rt="ANTISTATARIO",st="EREDE_RICORRENTE",lt="RAPPR_LEG",ct="EREDE_ANTISTATARIO",dt="TUT",pt="CURATORE_FALLIMENTARE",ut="ME_MEDESIMO",mt=function(){},ft=function(){},ht=function(){},gt=function(){};function vt(){var t=new gt;return t.cognome="nuova-persona-fisica",t.nome="",t.idPersona="nuovo",t.codTipoDelega="",t}var bt=function(){},zt=function(){};function yt(){var t=new zt;return t.ragioneSociale="nuova-persona-giuridica",t.idPersona="nuovo",t.codTipoDelega="",t}var Ft=function(){},Ct=function(){},St=function(){},wt=function(){function t(t,e){this.http=t,this.configurationService=e,this.DELEGA_VALIDATA="TRUE",this.urlAnagrafe=this.configurationService.servicePaths.get("ANAGRAFE_MS_API_URL")+"/v1",this.urlAnagrafe2=this.configurationService.servicePaths.get("ANAGRAFE_MS_API_URL")+"/v2",this.urlDeleghe=this.configurationService.servicePaths.get("DELEGHE_MS_API_URL")+"/v1",this.urlDeposito=e.servicePaths.get("DEPOSITO_MS_API_URL")+"/v1"}return t.prototype.getDatiSocieta=function(t){return this.http.put(this.urlDeposito+"/supporto/personagiuridica/delega",t)},t.prototype.getPersona=function(t){return this.http.get(this.urlAnagrafe+"/personaFisica/"+t)},t.prototype.getMieDeleghe=function(){var t=this;return this.http.get(this.urlDeleghe+"/deleghe/mie").pipe(a.map((function(e){var i=e.personeFisiche?e.personeFisiche.filter((function(e){return t.DELEGA_VALIDATA==e.validata})):[],n=e.personeGiuridiche?e.personeGiuridiche.filter((function(e){return t.DELEGA_VALIDATA==e.validata})):[],o=new St;return o.personeFisiche=i,o.personeGiuridiche=n,o})))},t.prototype.getListaPfPaged=function(t,e,i){return this.http.post(this.urlAnagrafe+"/personeFisiche?offset=0&pageNumber="+e+"&pageSize="+t+"&paged=false&sort.sorted=false&sort.unsorted=false&unpaged=false",i)},t.prototype.getListaPg=function(t,e){return this.http.post(this.urlAnagrafe+"/personeGiuridiche",e,{params:t})},t.prototype.getListaPgPaged=function(t,e,i){return this.http.post(this.urlAnagrafe+"/personeGiuridiche?offset=0&pageNumber="+e+"&pageSize="+t+"&paged=false&sort.sorted=false&sort.unsorted=false&unpaged=false",i)},t.prototype.getPersonaGiuridicaCodiceFiscale=function(t){var e=this.urlDeposito+"/supporto/personagiuridica";return this.http.put(e,t)},t.prototype.getPersonaFiscaleCodiceFiscale=function(t){var e=this.urlAnagrafe2+"/personaFisica/codiceFiscale";return this.http.put(e,t)},t.prototype.getListRtsCodiceRegione=function(t){var e=this.urlDeposito+"/rtsdto";return this.http.put(e,t)},t.prototype.naturaRichiedente=function(t){var e=this.urlDeposito+"/naturarichiedente";return this.http.put(e,t)},t.prototype.getValidaPersonaFisica=function(t){console.log("[getValidaPersonaFisica] - request",t);var e=this.urlDeposito+"/supporto";return console.log("[getValidaPersonaFisica] - url",e),this.http.put(e,t)},t.prototype.getAllProvince=function(){var t=this.urlAnagrafe+"/province/mappa/";return console.log("[MappaProvince] - url",t),this.http.get(t).pipe(a.shareReplay())},t}();wt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new wt(e.ɵɵinject(n.HttpClient),e.ɵɵinject(G))},token:wt,providedIn:"root"}),wt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],wt.ctorParameters=function(){return[{type:n.HttpClient},{type:G}]};var It,Pt=function(){function t(t,e,i,n,o,a,r,s,l){this.codiceFiscale=t,this.nome=e,this.cognome=i,this.dataDiNascita=n,this.email=o,this.pec=a,this.denominazione=r,this.partitaIVA=s,this.idPersonaFisica=l}return t.prototype.hasPartitaIva=function(){return null!=this.partitaIVA&&11==this.partitaIVA.length},t}(),xt=function(){function t(t){this.configurationService=t,console.log("[UtenteService]");var e=new x.UtenteDTO;(e=t.userProfile)&&(this.userDetails=e.spidUserDetails,this.utente=new Pt(this.userDetails.fiscalNumber,this.userDetails.name,this.userDetails.familyName,this.userDetails.dateOfBirth,this.userDetails.email,this.userDetails.digitalAddress,this.userDetails.companyName,this.userDetails.ivaCode,e.idPersonaFisica))}return t.prototype.getSpidUserDetails=function(){return this.userDetails},t.prototype.getUtente=function(){return this.utente},t}();xt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new xt(e.ɵɵinject(G))},token:xt,providedIn:"root"}),xt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],xt.ctorParameters=function(){return[{type:G}]};var Dt=function(t){return void 0!==t},Rt=function(t){return void 0===t},Vt=Rt,Et=function(t){return le(Rt(t))},At=Et,Nt=function(t){return null===t},Tt=Nt,$t=function(t){return Nt(t)||Rt(t)},Mt=$t,Ot=function(t){return null!==t},Gt=Ot,kt=function(t){return le($t(t))},Lt=kt,qt=function(t){return"string"==typeof t},_t=function(t){return t},Bt=_t,jt=function(t){return function(){return t}},Ht=jt,Ut=function(t){return function(e){return t.bind(e)}},Zt=Ut,Yt=function(t){return function(e){return function(i){return t.apply(void 0,ot([e],i))}}},Wt=Yt,Kt=function(t){return function(e){return t(e)}},Jt=Kt,Qt=function(t){return function(e){return t===e}},Xt=Qt,te=function(t){return function(e){return e>t}},ee=te,ie=function(t){return function(e){return e<t}},ne=ie,oe=function(t){return function(e){return e>=t}},ae=oe,re=function(t){return function(e){return e<=t}},se=re,le=function(t){return!t},ce=le,de=function(t,e){return(i=function(i){return de((t||{})[i],e)}).valueOf=function(){return Dt(t)?t:e},i;var i},pe=de,ue=((It={})[!0]=function(){return me},It[!1]=function(){return he},It),me=function(t,e){return{when:function(){return me(t,e)},otherwise:function(){return me(t,e)},valueOf:jt(e)}},fe=me,he=function(t,e){return{when:function(e,i){return ue[e(t)]()(t,i)},otherwise:function(e){return he(t,e)},valueOf:jt(e)}},ge=he,ve=function(t){return{when:function(e,i){return ue[e(t)]()(t,i)},otherwise:jt,valueOf:jt(t)}},be=ve,ze=function(t){return{map:function(e){return ze(e(t))},valueOf:jt(t)}},ye=ze,Fe=function(t){return ve(t).when(Nt,jt(null)).when(Rt,jt(void 0)).otherwise((function(){return Object.getPrototypeOf(t)})).valueOf()()},Ce=Fe,Se=function(t){return Fe(t).constructor},we=Se,Ie=function(t){return Se(t).__annotations__},Pe=Ie,xe=function(t){return Se(t).name},De=xe,Re=function(){},Ve=function(t,e){void 0===e&&(e=function(){}),this.testo=t,this.effetto=e},Ee=function(){function t(t,e){this.modalData=t,this.dialogRef=e}return t.prototype.eseguiAzione=function(t){t.effetto&&t.effetto()},t}();Ee.decorators=[{type:e.Component,args:[{selector:"lib-generic-modal",template:'\x3c!-- <p>generic-modal works!</p> --\x3e\r\n<h1 mat-dialog-title>\r\n\t{{ modalData.title | traduzione }}\r\n</h1>\r\n<div mat-dialog-content>\r\n\t<p *ngFor="let paragrafo of modalData.paragrafi">\r\n\t\t{{paragrafo | traduzione}}\r\n\t</p>\r\n</div>\r\n<div mat-dialog-actions class="d-flex flex-row-reverse mb-0">\r\n\r\n\t<button *ngFor="let azione of modalData.azioni" mat-raised-button color="primary" [mat-dialog-close]=""\r\n\t\t(click)="eseguiAzione(azione)" cdkFocusInitial>\r\n\t\t{{azione.testo | traduzione}}\r\n\t</button>\r\n\r\n</div>',styles:[""]}]}],Ee.ctorParameters=function(){return[{type:Re,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:r.MatDialogRef}]};var Ae=function(){function t(t){this.dialog=t,this.AZIONE_DEFAULT=[new Ve("ok")]}return t.prototype.success=function(t,e){void 0===e&&(e=this.AZIONE_DEFAULT);var i=this.buildModalData("modal-ok",t,e);this.openConfirm(i)},t.prototype.failure=function(t,e){void 0===e&&(e=this.AZIONE_DEFAULT);var i=this.buildModalData("modal-ko",t,e);this.openConfirm(i)},t.prototype.buildModalData=function(t,e,i){var n=new Re;return n.title=t,n.paragrafi=e,n.azioni=i,n},t.prototype.openConfirm=function(t){this.dialog.open(Ee,{data:t,panelClass:"modal-ok"===t.title?"custom-modalbox-ok":"custom-modalbox-ko"})},t}();Ae.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Ae(e.ɵɵinject(r.MatDialog))},token:Ae,providedIn:"root"}),Ae.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Ae.ctorParameters=function(){return[{type:r.MatDialog}]};var Ne=function(){function t(t,i,n,a,r){this.delegheService=t,this.modals=i,this.msg=n,this.utenteService=a,this.ref=r,this.nextStep=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.isGeneralContractor=new e.EventEmitter,this.displayedColumns=["tipo","indirizzo","seleziona"],this.CODICE_LEGALE="LEGALE",this.direction="both-ways",this.isFinal=!1,this.defaultDeleghe=!1,this.showComponentPF=!1,this.showComponentPG=!1,this.isSearching=!1,this.formControlGeneralContractor=!1,this.flagDelegaSeStesso=!1,this.changesPersonaFisica$=new o.Subject,this.changesPersonaGiuridica$=new o.Subject,this.validazioneeSede=!1,this.couldBeDittaIndividuale=!0}return t.prototype.ngOnInit=function(){var t,e=this;this.utente=this.utenteService.getUtente(),console.log("[DelegheComponent] - Utente",this.utente),this.tipologiaDeposito$.subscribe((function(t){console.log("[tipologiaDeposito$]",t),"CDE"==t.codice&&(e.formControlGeneralContractor=!0),e.codiceTipoDeposito=t.codice}));this.tipologieRichiedenti$.subscribe((function(t){if(console.log("[NaturaRichiedenteDTO]",t),e.rappresentanza){var i=t.find((function(t){return t.codice==e.rappresentanza.codiceDelega}));i&&(e.couldBeDittaIndividuale=null==i?void 0:i.dittaIndividuale)}}),(function(t){}));this.form=new d.FormGroup({});var i,n,o=!0;if(this.rappresentanza){if(this.idSedeSelezionata=this.rappresentanza.idSedeSelezionata,this.rappresentanza.nuovaPersona){this.isNew=!0,this.delega="nuovo","PF"==this.rappresentanza.tipoRappresentante?(this.listaDelegheDefault=[vt()],this.showComponentPF=!0,i="showComponentPF",n=this.showComponentPF,console.log(i,n)):(this.listaDelegheDefault=[yt()],this.showComponentPG=!0),this.defaultDeleghe=!0,this.listaDeleghe=[];var r=this.tipologieRichiedenti$.pipe(a.map((function(t){return t.filter((function(t){return t.codice==e.rappresentanza.codiceDelega}))}))).subscribe((function(t){var i=function(e){return e.filter((function(e){return e.codTipoDelega==t[0].codice}))};e.isPersonaFisica(t[0].tipoPersona)&&e.deleghe$.pipe(a.pluck("personeFisiche"),a.map(i)).subscribe((function(t){t.length>0&&(e.listaDeleghe=ot(t,e.listaDeleghe))})),e.isPersonaGiuridica(t[0].tipoPersona)&&e.deleghe$.pipe(a.pluck("personeGiuridiche"),a.map(i)).subscribe((function(t){t.length>0&&(e.listaDeleghe.length>0?e.listaDeleghe=ot(t,e.listaDeleghe):e.listaDeleghe=ot(t))})),t[0].tipoPersona.length>1?"PF"==e.rappresentanza.tipoRappresentante?e.listaDeleghe=ot(e.listaDeleghe,[vt(),yt()]):e.listaDeleghe=ot(e.listaDeleghe,[yt(),vt()]):t[0].tipoPersona.find((function(t){return"PF"==t}))?e.listaDeleghe=ot(e.listaDeleghe,[vt()]):e.listaDeleghe=ot(e.listaDeleghe,[yt()]),e.listaDelegheDefault=[e.listaDeleghe.find((function(t){return"nuovo"==t.idPersona}))],e.deleghe.setValue(e.listaDelegheDefault[0]),r.unsubscribe()}),(function(t){}))}}else this.initRappresentante(),o=!1;if(this.nsDanteCausa="nsRapprDc",this.nsTutore="nsRapprTut",this.nsLegale="nsRapprLeg",this.namespaceInfoPf=this.nsTutore+"PFinfoPF",this.nspg=this.nsLegale+"pg",null===(t=null==this?void 0:this.rappresentanza)||void 0===t?void 0:t.codiceDelega){var s=this.fromIdAndTipo(this.rappresentanza.codiceDelega,this.rappresentanza.tipoRappresentante);this.tipoRichiedente=new d.FormControl({value:s,disabled:!1},[d.Validators.required])}else this.tipoRichiedente=new d.FormControl({value:null,disabled:!1},[d.Validators.required]);this.form.addControl("tipoRichiedente",this.tipoRichiedente),this.deleghe=new d.FormControl({value:"",disabled:!1},[d.Validators.required]),this.form.addControl("deleghe",this.deleghe),this.generalContractor=new d.FormControl({value:this.generalContractorValue,disabled:!1}),this.form.addControl("generalContractor",this.generalContractor),this.selection=new u.SelectionModel(!1,[]);var l=new d.FormControl({value:"",disabled:!1});if(this.form.addControl("selected",l),null!=this.tipoRichiedente.value&&!this.rappresentanza.nuovaPersona&&this.tipoRichiedente.value!=ut)var c=this.tipologieRichiedenti$.pipe(a.map((function(t){return t.filter((function(t){return t.codice==e.rappresentanza.codiceDelega}))})),a.tap((function(t){console.log("initDeleghe:",t[0]),e.initDeleghe(t[0])}))).subscribe((function(t){e.isPersonaFisica(t[0].tipoPersona)&&(e.personaFisicaBase=e.initPersonaFisica(e.rappresentanza.idPersona)),e.isPersonaGiuridica(t[0].tipoPersona)&&(e.personaGiuridicaBase=e.initPersonaGiuridica(e.rappresentanza.idPersona)),c.unsubscribe()}),(function(t){}));this.tipoRichiedente$=this.tipoRichiedente.valueChanges.pipe(a.tap((function(t){e.deleghe.setValue(null),e.resetValidation(),e.flagDelegaSeStesso=!1,e.ref.detectChanges()})),a.tap((function(t){var i;t.codice!=ut?(e.initDeleghe(t),e.rappresentanza.idSedeSelezionata=null):(e.resetDeleghe(),e.rappresentanza.idPersona=null===(i=e.utente)||void 0===i?void 0:i.idPersonaFisica,e.rappresentanza.tipoRappresentante="PF")})),a.shareReplay());var p=this.deleghe.valueChanges.pipe(a.map((function(t){return _.of(!0,(function(i){null!=t&&null!=t&&(e.delega=t.idPersona,e.defaultDeleghe?e.defaultDeleghe=!1:e.setDelega(t),e.flagDelegaSeStesso=!1,e.ref.detectChanges(),i.idPersona="nuovo"!=t.idPersona?t.idPersona:null)}))}))),m=this.tipoRichiedente$.pipe(a.map((function(t){return _.of(e.tipoRichiedente.valid,(function(e){e.codiceDelega=t.codice}))})));K.reducer4(m,p,this.changesPersonaFisica$,this.changesPersonaGiuridica$,(function(t){var i;return i=de(t,"")("codiceDelega").valueOf()==ut||("nuovo"==e.delega?(null!=e.rappresentanza.personaFisica||null!=e.rappresentanza.personaGiuridica)&&e.deleghe.value&&!e.flagDelegaSeStesso:null!=t.idPersona&&e.deleghe.value&&!e.flagDelegaSeStesso),e.ref.detectChanges(),i}),_.of(o,this.rappresentanza)).subscribe((function(t){console.log("[DelegheComponent] rappresentanza",t),e.isFormValid=t.status}))},t.prototype.resetValidation=function(){this.changesPersonaFisica$.next(_.of(!0,(function(t){return function(t){}}))),this.changesPersonaGiuridica$.next(_.of(!0,(function(t){return function(t){}})))},t.prototype.forward=function(t){this.nextStep.emit(this.rappresentanza)},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit(this.rappresentanza)},t.prototype.backward=function(t){this.previousStep.emit(this.rappresentanza)},t.prototype.complete=function(t){},t.prototype.initRappresentante=function(){this.rappresentanza=new Ct},t.prototype.ngOnDestroy=function(){this.tipoRichiedenteSub&&this.tipoRichiedenteSub.unsubscribe(),this.$selected&&this.$selected.unsubscribe()},t.prototype.setDelega=function(t){var e=this;this.delega=t.idPersona,this.resetDeleghe(),this.showComponentPF=!1,this.showComponentPG=!1,t.cognome&&("nuovo"!=t.idPersona?this.getPersonaFisica(t.idPersona):(this.mapperPersonaFisica(null),setTimeout((function(){return e.showComponentPF=!0}),0))),t.ragioneSociale&&("nuovo"!=t.idPersona?this.getPersonaGiuridica(t.idPersona):(this.mapperPersonaGiuridica(null),setTimeout((function(){return e.showComponentPG=!0}),0)))},t.prototype.hasSelecteDelegante=function(){return this.deleghe.value},t.prototype.viewDeleghe=function(){return""===de(this.tipoRichiedente.value,"")("codice").valueOf()||de(this.tipoRichiedente.value,"")("codice").valueOf()===ut},t.prototype.getPersonaFisica=function(t){var e=this;this.resetValidation(),this.rappresentanza.idSedeSelezionata=null,this.showComponentPF=!1,this.personaFisica$=this.delegheService.getPersona(t).pipe(a.shareReplay()),this.pfSubscription=this.personaFisica$.pipe().subscribe((function(i){var n,o;e.mapperPersonaFisica(i.datiPersonaFisica),e.personaFisica=i.datiPersonaFisica,e.rappresentanza.idPersona=t,e.rappresentanza.tipoRappresentante="PF",e.rappresentanza.codiceRegione=null===(o=null===(n=null==i?void 0:i.residenza)||void 0===n?void 0:n.regione)||void 0===o?void 0:o.sigla,e.showComponentPF=!0,e.showComponentPG=!1}),(function(t){}))},t.prototype.getPersonaGiuridica=function(t){var e=this;this.resetValidation(),this.rappresentanza.idSedeSelezionata=null,this.showComponentPG=!1,this.personaGiuridica$=this.delegheService.getDatiSocieta(t).pipe(a.shareReplay()),this.pgSubscription=this.personaGiuridica$.pipe().subscribe((function(i){var n,o,a;if(e.form.get("selected").setValue(""),e.mapperPersonaGiuridica(i),e.personaGiuridica=i,e.rappresentanza.idPersona=t,e.rappresentanza.tipoRappresentante="PG",e.showComponentPG=!0,e.showComponentPF=!1,null!=(null==i?void 0:i.sedi)){var r=i.sedi.filter((function(t){return"LEGALE"===t.tipoSede.codice}));e.rappresentanza.codiceRegione=null===(a=null===(o=null===(n=r[0])||void 0===n?void 0:n.indirizzo)||void 0===o?void 0:o.regione)||void 0===a?void 0:a.sigla}e.ref.detectChanges()}),(function(t){}))},t.prototype.isPersonaFisica=function(t){return!!t.find((function(t){return"PF"==t}))},t.prototype.isPersonaGiuridica=function(t){return!!t.find((function(t){return"PG"==t}))},t.prototype.initDeleghe=function(t){var e=this;this.listaDeleghe=[],console.log("tipoRichiedente:",t),this.couldBeDittaIndividuale=null==t?void 0:t.dittaIndividuale;var i=function(e){return e.filter((function(e){return e.codTipoDelega==t.codice}))};this.isPersonaFisica(t.tipoPersona)&&this.deleghe$.pipe(a.pluck("personeFisiche"),a.map(i)).subscribe((function(t){e.listaDeleghe=ot(t,[vt()]),e.deleghe.setValue(e.listaDeleghe.find((function(t){return t.idPersona==e.rappresentanza.idPersona})))})),this.isPersonaGiuridica(t.tipoPersona)&&this.deleghe$.pipe(a.pluck("personeGiuridiche"),a.map(i)).subscribe((function(t){e.listaDeleghe.length>0?e.listaDeleghe=e.listaDeleghe.reduce((function(i,n,o){return e.listaDeleghe.length-1==o&&i.push.apply(i,ot(t,[yt()])),i}),e.listaDeleghe):e.listaDeleghe=ot(t,[yt()]),e.deleghe.setValue(e.listaDeleghe.find((function(t){return t.idPersona==e.rappresentanza.idPersona})))}))},t.prototype.resetDeleghe=function(){this.rappresentanza.idPersona=null,this.rappresentanza.nuovaPersona=!1,this.rappresentanza.personaFisica=null,this.rappresentanza.personaGiuridica=null,this.rappresentanza.tipoRappresentante=null,this.personaGiuridica=null,this.personaGiuridica$=null,this.personaFisica=null},t.prototype.mapperPersonaFisica=function(t){var e,i,n=new bt,o=new mt;n.infoAnagrafiche=o;var a=new ft;n.infoNascita=a,t&&(o.codFiscale=t.codiceFiscale,o.cognome=t.cognome,o.nome=t.nome,n.infoAnagrafiche=o,a.comuneNascita=null===(e=t.comuneNascita)||void 0===e?void 0:e.codiceCatastale,a.provinciaNascita=null===(i=t.provinciaNascita)||void 0===i?void 0:i.sigla,a.dataNascita=P(t.dataNascita,"DD/MM/YYYY").toDate(),n.infoNascita=a),this.rappresentanza.personaFisica=n},t.prototype.initPersonaFisica=function(t){var e=this,i=new gt;return this.showComponentPF=!1,this.personaFisica$=this.delegheService.getPersona(t).pipe(a.shareReplay()),this.pfSubscription=this.personaFisica$.pipe(a.pluck("datiPersonaFisica")).subscribe((function(n){e.mapperPersonaFisica(n),e.rappresentanza.idPersona=t,i.codTipoDelega=e.rappresentanza.codiceDelega,i.codiceFiscale=n.codiceFiscale,i.cognome=n.cognome,i.nome=n.nome,i.idPersona=n.id,e.showComponentPF=!0,e.showComponentPG=!1}),(function(t){})),i},t.prototype.initPersonaGiuridica=function(t){var e=this,i=new zt;return this.showComponentPG=!1,this.personaGiuridica$=this.delegheService.getDatiSocieta(t).pipe(a.shareReplay()),this.pgSubscription=this.personaGiuridica$.pipe().subscribe((function(n){e.mapperPersonaGiuridica(n),i.codTipoDelega=e.rappresentanza.codiceDelega,i.codiceFiscale=n.datiPersonaGiuridica.codiceFiscale,i.ragioneSociale=n.datiPersonaGiuridica.ragioneSociale,i.pIva=n.datiPersonaGiuridica.partitaIVA,i.idPersona=n.datiPersonaGiuridica.id,e.rappresentanza.idPersona=t,e.showComponentPG=!0,e.showComponentPF=!1,e.deleghe.setValue(e.listaDeleghe.find((function(t){return t.idPersona==i.idPersona})))}),(function(t){})),i},t.prototype.mapperPersonaGiuridica=function(t){var e=new Ft;t&&(e.codiceFiscale=t.datiPersonaGiuridica.codiceFiscale,e.ragioneSociale=t.datiPersonaGiuridica.ragioneSociale,e.partitaIVA=t.datiPersonaGiuridica.partitaIVA,e.idPersonaGiuridica=t.datiPersonaGiuridica.id,e.sedi=t.sedi),this.rappresentanza.personaGiuridica=e},t.prototype.personaFisicaReady=function(t){var e=this;console.log("[personaFisicaReady]",t),this.resetValidation(),this.rappresentanza.idSedeSelezionata=null,this.changesPersonaFisica$.next(t.mapValue((function(t){return function(i){var n,o,a;e.rappresentanza.idPersona=t.id,i.personaFisica=t,"nuovo"==e.delega&&(i.codiceRegione=t.infoAnagrafiche.codiceRegione,i.nuovaPersona=!0),i.tipoRappresentante="PF",(null===(n=e.utente)||void 0===n?void 0:n.codiceFiscale)===(null===(a=null===(o=null==t?void 0:t.infoAnagrafiche)||void 0===o?void 0:o.codFiscale)||void 0===a?void 0:a.toUpperCase())?e.flagDelegaSeStesso=!0:e.flagDelegaSeStesso=!1,e.ref.detectChanges()}})))},t.prototype.personaGiuridicaReady=function(t){var e=this;console.log("[personaGiuridicaReady]",t),this.resetValidation(),this.flagDelegaSeStesso=!1,this.changesPersonaGiuridica$.next(t.mapValue((function(i){return function(n){var o;n.personaGiuridica=i,n.tipoRappresentante="PG",e.rappresentanza.idSedeSelezionata=null,e.rappresentanza.idPersona=i.idPersonaGiuridica,(null===(o=null==i?void 0:i.sedi)||void 0===o?void 0:o.length)>0&&(e.rappresentanza.idSedeSelezionata=i.sedi[0].id),"nuovo"==e.delega&&(e.isValidSedi=t.status,n.nuovaPersona=!0,n.codiceRegione=i.codiceRegione),e.ref.detectChanges()}})))},t.prototype.richiedenteComparator=function(t,e){return(t||{}).codice==(e||{}).codice},t.prototype.delegheComparator=function(t,e){return(t||{}).codTipoDelega==(e||{}).codTipoDelega},t.prototype.fromIdAndTipo=function(t,e){var i=new ht;return i.codice=t,i.descrizione=e,i},t.prototype.onChangeGeneralContractor=function(t){this.isGeneralContractor.emit(t.checked)},t}();Ne.decorators=[{type:e.Component,args:[{selector:"lib-deleghe",template:'<div class="mt-3 mb-5" [formGroup]="form">\r\n\t<mat-card>\r\n\t\t<h3 class="h5 mb-0">\r\n\t\t\t<info-tip-label label="tipo-richiedente"></info-tip-label>\r\n\t\t</h3>\r\n\t\t<div class="row">\r\n\r\n\t\t\t<div class="col-md-8">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'tipo-soggetto\' | traduzione}}</mat-label>\r\n\t\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="tipoRichiedente"\r\n\t\t\t\t\t\t\t\t\t\t\t[compareWith]="richiedenteComparator">\r\n\t\t\t\t\t\t<mat-option *ngFor="let tipoRichiedenteTipo of tipologieRichiedenti$ | async"\r\n\t\t\t\t\t\t\t\t\t\t\t\t[value]="tipoRichiedenteTipo">\r\n\t\t\t\t\t\t\t{{ tipoRichiedenteTipo.descrizione }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="form.touched && form.controls[ \'tipoRichiedente\'].invalid">\r\n\t\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'tipoRichiedente\']) | traduzione}}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t<mat-hint *infoTip="\'tipo-soggetto\'"></mat-hint>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class="row" *ngIf="!viewDeleghe()">\r\n\t\t\t<div class="col-md-8">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'deleghe-rappresentante\' | traduzione }}</mat-label>\r\n\t\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="deleghe"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-option *ngFor="let item of listaDeleghe" [value]="item">\r\n\t\t\t\t\t\t\t<ng-container *ngIf="item.ragioneSociale else templatePersonaFisica">\r\n\t\t\t\t\t\t\t\t{{item.idPersona === \'nuovo\' ? (item.ragioneSociale | traduzione) : item.ragioneSociale}}\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<ng-template #templatePersonaFisica>\r\n\t\t\t\t\t\t\t\t{{(item.idPersona === \'nuovo\' ? (item.nome + \' \' + (item.cognome | traduzione)) : (item.nome + \' \' + item.cognome))}}\r\n\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="form.controls[\'deleghe\'].invalid">\r\n\t\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'deleghe\']) | traduzione}}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t<mat-hint *infoTip="\'deleghe-rappresentante\'"></mat-hint>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<br>\r\n\t</mat-card>\r\n\t<div class="mt-4"></div>\r\n\t<mat-expansion-panel class="panel" *ngIf="hasSelecteDelegante() && !viewDeleghe()" [expanded]="true">\r\n\t\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t\t<mat-panel-title>\r\n\t\t\t\t<h3 class="h5 mb-0">\r\n\t\t\t\t\t<info-tip-label label="tipologia-rappresentante-{{codiceTipoDeposito}}"></info-tip-label>\r\n\t\t\t\t</h3>\r\n\t\t\t</mat-panel-title>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<div class="mt-4"></div>\r\n\t\t<div *ngIf="formControlGeneralContractor" class="col-md-4">\r\n\t\t\t<div class="row">\r\n\t\t\t\t<mat-checkbox formControlName="generalContractor" (change)="onChangeGeneralContractor($event)">\r\n\t\t\t\t\t<info-tip-label label="general-contractor"></info-tip-label>\r\n\t\t\t\t</mat-checkbox>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<lib-persona-fisica\r\n\t\t\t*ngIf="showComponentPF"\r\n\t\t\t(done)="personaFisicaReady($event)"\r\n\t\t\t[nazioni]="nazioni"\r\n\t\t\t[province]="province"\r\n\t\t\t[namespace]="namespaceInfoPf"\r\n\t\t\t[infoPersonaFisica]="rappresentanza?.personaFisica"\r\n\t\t\t[idDelega]="rappresentanza?.idPersona"\r\n\t\t\t[validatorFormControl]="true"\r\n\t\t\t[nuovaPersona]="isNew"\r\n\t\t>\r\n\t\t</lib-persona-fisica>\r\n\r\n\t\t<lib-persona-giuridica\r\n\t\t\t*ngIf="showComponentPG"\r\n\t\t\t(done)="personaGiuridicaReady($event)"\r\n\t\t\t[namespace]="nspg"\r\n\t\t\t[datisocieta]="rappresentanza?.personaGiuridica"\r\n\t\t\t[validatorFormControl]="true"\r\n\t\t\t[gestioneSedi]="true"\r\n\t\t\t[idSedeSelezionata]="idSedeSelezionata"\r\n\t\t\t[personaGiuridicaFromDeleghe$]="personaGiuridica$"\r\n\t\t\t[couldBeDittaIndividuale]="couldBeDittaIndividuale"\r\n\t\t>\r\n\t\t</lib-persona-giuridica>\r\n\t</mat-expansion-panel>\r\n\t<div class="collapse-body mt-2">\r\n\t\t<div class="col-md-12">\r\n\t\t\t<mat-error *ngIf="flagDelegaSeStesso">\r\n\t\t\t\t{{\'validation-tipo-ricorrente\' | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="mt-4"></div>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isFormValid"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t\t(complete)="complete($event)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[".mat-card{border-radius:0!important;border-top:5px solid #0a2644}.divider{background-color:#737373;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-flex{background-color:#fff!important}.mat-select-value{max-width:100%;width:100%!important}"]}]}],Ne.ctorParameters=function(){return[{type:wt},{type:Ae},{type:j},{type:xt},{type:e.ChangeDetectorRef}]},Ne.propDecorators={rappresentanza:[{type:e.Input}],province:[{type:e.Input}],nazioni:[{type:e.Input}],tipologieRichiedenti$:[{type:e.Input}],deleghe$:[{type:e.Input}],tipologiaDeposito$:[{type:e.Input}],generalContractorValue:[{type:e.Input}],nextStep:[{type:e.Output}],previousStep:[{type:e.Output}],salvaBozza:[{type:e.Output}],isGeneralContractor:[{type:e.Output}]};var Te={id:null,infoAnagrafiche:{codFiscale:null,codiceRegione:null,cognome:null,nome:null},infoNascita:{comuneNascita:null,dataNascita:null,provinciaNascita:null,nazioneNascita:null,isNatoEstero:null,codCatNazioneNascita:null}},$e=function(){function t(t){this.delegheService=t,this.done=new e.EventEmitter,this.changesPF$=new o.ReplaySubject(1),this.changesNascita$=new o.ReplaySubject(1),this.readOnly=!1,this.isPersonaFisicaValid=new o.BehaviorSubject(!1),this.datiVerifica={}}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=!1;this.infoPersonaFisica?this.readOnly=!0:(this.initPersonaFisica(),e=!1),(null==this.idDelega||this.nuovaPersona)&&(this.readOnly=!1),this.namespaceInfoPf=this.namespace+"infoPF",this.namespaceInfoNascita=this.namespace+"infoNascita";var i=this.delegheService.getAllProvince();this.personaFisicaChangedSub=o.combineLatest([this.changesPF$,this.changesNascita$,i]).pipe(a.map((function(t){var e,i=nt(t,3),n=i[0],o=i[1];return[n,o,i[2][null===(e=null==o?void 0:o.output)||void 0===e?void 0:e.provinciaNascita]]})),a.auditTime(1e3),a.concatMap((function(e){var i=nt(e,3),n=i[0],o=i[1],a=i[2];return t.getPersonaFisicaValid(n,o,a)})),a.startWith(_.of(e,this.infoPersonaFisica)),a.tap((function(e){return t.done.emit(e)}))).subscribe()},t.prototype.getPersonaFisicaValid=function(t,e,i){var n=this;return console.log("FORM VALIDITY",e.status),e.status&&t.status?this.validatePersonaFisica(t.output,e.output).pipe(a.tap((function(){return n.isPersonaFisicaValid.next(!0)})),a.map((function(o){var a=Ot(o);return n.toValidPf(a,o,t.output,i,e)})),a.tap((function(t){var e=t.isValid;return n.isPersonaFisicaValid.next(e)})),a.tap((function(t){var e=t.persona;return n.infoPersonaFisica=e})),a.map((function(t){return _.of(t.isValid,t.persona)})),a.catchError((function(t){return o.of(_.of(!1,Te))}))):(this.isPersonaFisicaValid.next(!1),o.of(_.of(!1,Te)))},t.prototype.toValidPf=function(t,e,i,n,o){var a,r;return{isValid:t,persona:{id:null==e?void 0:e.id,infoAnagrafiche:{codFiscale:String(i.codFiscale),codiceRegione:String(null==n?void 0:n.siglaReg),cognome:String(i.cognome),nome:String(i.nome)},infoNascita:{comuneNascita:(null===(a=null==o?void 0:o.output)||void 0===a?void 0:a.comuneNascita)?String(o.output.comuneNascita):null,dataNascita:o.output.dataNascita,provinciaNascita:String(o.output.provinciaNascita),nazioneNascita:String(o.output.nazioneNascita),codCatNazioneNascita:String(o.output.codCatNazioneNascita),isNatoEstero:!!(null===(r=o.output)||void 0===r?void 0:r.isNatoEstero)&&o.output.isNatoEstero}}}},t.prototype.validatePersonaFisica=function(t,e){return this.delegheService.getValidaPersonaFisica({codiceFiscale:t.codFiscale,cognome:t.cognome,comune:(null==e?void 0:e.isNatoEstero)?null:null==e?void 0:e.comuneNascita,dataNascita:new Date(e.dataNascita).toISOString(),nome:t.nome,provinciaNascita:e.provinciaNascita,siglaNazione:e.nazioneNascita,codCatNazioneNascita:null==e?void 0:e.codCatNazioneNascita})},t.prototype.initPersonaFisica=function(){this.infoPersonaFisica=new bt},t.prototype.infoPfReady=function(t){this.changesPF$.next(t)},t.prototype.infoNascitaReady=function(t){this.changesNascita$.next(t)},t.prototype.ngOnDestroy=function(){this.personaFisicaChangedSub.unsubscribe()},t.prototype.resetForm=function(){this.infoPF._resetForm(),this.infoNascita._resetForm()},t}();$e.decorators=[{type:e.Component,args:[{selector:"lib-persona-fisica",template:'<form [formGroup]="form">\r\n\t<lib-info-pf\r\n\t\t[cfDifferentFrom]="cfDifferentFrom"\r\n\t\t[namespace]="namespaceInfoPf"\r\n\t\t(done)="infoPfReady($event)"\r\n\t\t[infopf]="infoPersonaFisica?.infoAnagrafiche"\r\n\t\t[readOnly]="readOnly"\r\n\t\t[validatorFormControl]="true"\r\n\t\t#infoPF\r\n\t>\r\n\t</lib-info-pf>\r\n\t<lib-info-nascita\r\n\t\t[province]="province"\r\n\t\t(done)="infoNascitaReady($event)"\r\n\t\t[infonascita]="infoPersonaFisica?.infoNascita"\r\n\t\t[readOnly]="readOnly"\r\n\t\t#infoNascita\r\n\t>\r\n\t</lib-info-nascita>\r\n\t<div class="collapse-body mt-2">\r\n\t\t<div class="col-md-12">\r\n\t\t\t<mat-error *ngIf="!(isPersonaFisicaValid | async)">\r\n\t\t\t\t{{\'validationPF\' | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n',styles:[""]}]}],$e.ctorParameters=function(){return[{type:wt}]},$e.propDecorators={infoPersonaFisica:[{type:e.Input}],cfDifferentFrom:[{type:e.Input}],province:[{type:e.Input}],nazioni:[{type:e.Input}],namespace:[{type:e.Input}],idDelega:[{type:e.Input}],nuovaPersona:[{type:e.Input}],done:[{type:e.Output}],infoPF:[{type:e.ViewChild,args:["infoPF"]}],infoNascita:[{type:e.ViewChild,args:["infoNascita"]}]};var Me=function(){},Oe=function(){function t(t){this.checkCFService=t}return t.ValidateMail=function(e){return t.formatoEmail.test(e.value)?null:{invalidMail:!0}},t.ValidateDate=function(t){return(new Date).getTime()<t.value?{invalidDate:!0}:null},t.ValidateName=function(e){return t.formatoName.test(e.value)?null:{invalidName:!0}},t.ValidatePassword=function(e){return t.passwordPattern.test(e.value)?null:{invalidPassword:!0}},t.ValidateIban=function(e){return t.iban.test(e.value)?null:{invalidIban:!0}},t.ValidateCodiceFiscale=function(e){return t.codiceFiscale.test(e.value)?null:{codiceFiscaleInvalido:!0}},t.ValidatePartitaIva=function(e){return t.partitaIva.test(e.value)?null:{invalidPartitaIva:!0}},t.pattern=function(t,e){return function(i){var n;return d.Validators.pattern(t)(i)?((n={})[e]=!0,n):null}},t.trigger=function(t,e){void 0===e&&(e=function(t){return t});var i=t.validator;return function(n){return function(o){var a,r;if(e(o.value)){try{for(var s=it(n),l=s.next();!l.done;l=s.next()){var c=(0,l.value)(t);if(c){t.setErrors(c);break}}}catch(t){a={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(a)throw a.error}}t.setValidators(n)}else t.setValidators(i),t.setErrors(null);return null}}},t.NotEquals=function(t,e){return function(i){var n;return t!=i.value?null:((n={})[e]=!0,n)}},t.prototype.userValidator=function(t){var e=this;return function(i){return e.checkCFService.validaCodiceFiscale$(i.value,t).pipe(a.map((function(t){return t.valid?null:{invalidCF:!0}})),a.catchError((function(t){return o.of({validationServiceFailed:!0})})))}},t}();Oe.capPattern="[0-9][0-9][0-9][0-9][0-9]",Oe.passwordPattern=/^(?:(?=.*\d)(?=.*[A-Z]).{8,})/,Oe.zeroCentoPattern="^([0-9]|[1-9][0-9]|100)$",Oe.formatoData=/^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/,Oe.importoPattern="^[0-9]+(,[0-9]{1,2}){0,1}$",Oe.formatoEmail=/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/,Oe.iban=/^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$/,Oe.codiceFiscale=/([a-z]{6}|[A-Z]{6})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(a|b|c|d|e|h|l|m|p|r|s|t|A|B|C|D|E|H|L|M|P|R|S|T)((((l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|0|1|2|3|4|5|6)(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1}))|71|70|TM|Tm|tM|tm|TL|tl|Tl|tL))([a-z]{1}|[A-Z]{1})(L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})([a-z]{1}|[A-Z]{1})/,Oe.partitaIva=/^[0-9]{11}$/,Oe.partitaIvaMaxLen2=/^[0-9]{2,11}$/,Oe.codiceFiscalePiva="^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$|^[0-9]{11}$",Oe._codiceFiscalePiva=/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$|^[0-9]{11}$/,Oe.anno=/^[1-2][0-9]{3}$/,Oe.nSentenza=/^[0-9]*\/[1-2][0-9]{3}$/,Oe.numberPattern=/^[0-9]*$/,Oe.phoneNumberPattern=/^\+{0,1}[0-9]*$/,Oe.moneyPattern=/^([0-9]+)|((([1-9][0-9]*)|([0-9]))([,])[0-9]{2})$/,Oe.moneyCommaSeparated=/^\d+,\d{2}$/,Oe.numbers=/^\d+/,Oe.formatoName=/^[a-zA-Zàèìòùé ']+$/;var Ge=function(){function t(t,i,n,o){this.msg=t,this.validationService=i,this.cfService=n,this.delegheService=o,this.readOnly=!1,this.validatorFormControl=!1,this.done=new e.EventEmitter,this.codiceRegione=""}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.resetForm&&(this.subscription=this.resetForm.subscribe((function(e){return e?t.pulisciForm():""}))),this.infopf||this.initInfoPf();var e=[d.Validators.required,Oe.pattern(Oe.codiceFiscale,"cfInvalidoFormalmente")];null!=this.cfDifferentFrom&&e.push(Oe.NotEquals(this.cfDifferentFrom,"cfDifferentRichiedente"));var i=new d.FormControl({value:this.infopf.codFiscale,disabled:!1},[this.validatorFormControl?d.Validators.required:d.Validators.nullValidator,Oe.pattern(Oe.codiceFiscale,"cfInvalidoFormalmente")]);this.form.addControl("codiceFiscale",i);var n=new d.FormControl({value:this.infopf.nome,disabled:!1},[this.validatorFormControl?d.Validators.required:d.Validators.nullValidator,Oe.pattern(Oe.formatoName,"formatoName")]);this.form.addControl("nome",n);var o=new d.FormControl({value:this.infopf.cognome,disabled:!1},[this.validatorFormControl?d.Validators.required:d.Validators.nullValidator,Oe.pattern(Oe.formatoName,"formatoName")]);this.form.addControl("cognome",o);var r=this.form.valueChanges.pipe(a.map((function(e){t.removeSpace(t.form.controls.codiceFiscale.value);var i=new mt;return i.codFiscale=t.form.controls.codiceFiscale.value,i.nome=t.form.controls.nome.value,i.cognome=t.form.controls.cognome.value,i.codiceRegione=t.codiceRegione,i})),a.startWith(this.infopf),a.map((function(e){return _.of(!t.form.invalid||1==t.readOnly,e)})));this.pfSub=r.subscribe((function(e){return t.done.emit(e)})),this.readOnly&&this.form.disable()},t.prototype.removeSpace=function(t){var e=/\s/g;e.test(t)&&this.form.get("codiceFiscale").setValue(t.replace(e,""))},t.prototype.ngOnDestroy=function(){this.pfSub&&this.pfSub.unsubscribe(),this.validationSub&&this.validationSub.unsubscribe(),this.subscription&&this.subscription.unsubscribe()},t.prototype.initInfoPf=function(){var t=new mt;this.infopf=t},t.prototype.pulisciForm=function(){var t=this;Object.keys(this.form.value).forEach((function(e){t.form.get(e).setValue("")}))},t.prototype._resetForm=function(){var t;null===(t=this.form)||void 0===t||t.reset()},t}();Ge.decorators=[{type:e.Component,args:[{selector:"lib-info-pf",template:"<form [formGroup]=\"form\">\r\n\t<div class=\"row my-2\">\r\n\t\t<div class=\"col-md-4\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}}{{'codice-fiscale' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{validatorFormControl ? ('required' | traduzione): ''}} {{'codice-fiscale' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"codiceFiscale\" uppercase style=\"text-transform: uppercase\" maxlength=\"16\">\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['codiceFiscale'].invalid\">\r\n\t\t\t\t\t{{msg.produceCFMessage(form.controls['codiceFiscale']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'codice-fiscale'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"col-md-4\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}}{{'nome' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{validatorFormControl ? ('required' | traduzione): ''}} {{'nome' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"nome\">\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['nome'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('obbligatorio',form.controls['nome']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'nome'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"col-md-4\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}}{{'cognome' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{validatorFormControl ? ('required' | traduzione): ''}} {{'cognome' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"cognome\">\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['cognome'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('obbligatorio',form.controls['cognome']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'cognome'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</form>",styles:[""]}]}],Ge.ctorParameters=function(){return[{type:j},{type:Oe},{type:Me},{type:wt}]},Ge.propDecorators={infopf:[{type:e.Input}],namespace:[{type:e.Input}],cfDifferentFrom:[{type:e.Input}],readOnly:[{type:e.Input}],resetForm:[{type:e.Input}],validatorFormControl:[{type:e.Input}],done:[{type:e.Output}]};var ke=function(){function t(t,e,i){var o=this;this.http=t,this.configurationService=e,this.appRef=i,console.log("[TerritorioService]"),this.urlAnagrafe=e.servicePaths.get("ANAGRAFE_MS_API_URL")+"/v1",console.log("[urlAnagrafe - lib]",this.urlAnagrafe);var r=e.lingua$,s=this.urlAnagrafe+"/nazioni";this.nazioni$=r.pipe(a.switchMap((function(t){return o.http.get(s,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay());var l=this.urlAnagrafe+"/province",c=this.urlAnagrafe+"/regioni/nonSoppresse/";this.province$=r.pipe(a.switchMap((function(t){return o.http.get(l,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay()),this.regioni$=r.pipe(a.switchMap((function(t){return o.http.get(c,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay())}return t.prototype.getProvince$=function(){return this.province$},t.prototype.getProvincePerRegione$=function(t){var e=this,i=this.urlAnagrafe+"/regione/"+t.sigla+"/province/nonSoppresse/?codiceRegione="+t.sigla;return this.configurationService.lingua$.pipe(a.switchMap((function(t){return e.http.get(i,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return e.appRef.tick()})),a.shareReplay())},t.prototype.getComuni$=function(t){var e=this.urlAnagrafe+"/provincia/"+t+"/comuni/nonSoppressi";return this.http.get(e).pipe(a.shareReplay())},t.prototype.getComune$=function(t){var e=this.urlAnagrafe+"/comune/codiceCatastale/"+t;return this.http.get(e).pipe(a.shareReplay())},t.prototype.getNazioni$=function(){return this.nazioni$},t.prototype.getCap$=function(t){var e=this.urlAnagrafe+"/comuni/"+t+"/cap";return this.http.get(e)},t.prototype.getRegioni$=function(){return this.regioni$},t}();ke.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new ke(e.ɵɵinject(n.HttpClient),e.ɵɵinject(G),e.ɵɵinject(e.ApplicationRef))},token:ke,providedIn:"root"}),ke.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],ke.ctorParameters=function(){return[{type:n.HttpClient},{type:G},{type:e.ApplicationRef}]};var Le=function(){function t(t,i,n,o){var a=this;this.msg=t,this.territorio=i,this.validationService=n,this.territorioService=o,this.maxDate=new Date,this.readOnly=!1,this.done=new e.EventEmitter,this.ITALIA="IT",this.ITALIACodCat="Z000",this.nazioni$=o.getNazioni$(),this.nazioni$.subscribe((function(t){a.nazioni=t}))}return t.prototype.ngOnChanges=function(t){this.initialize()},t.prototype.ngOnInit=function(){var t,e,i,n=this;this.form=new d.FormGroup({}),this.initialize();var o=!!(null===(t=this.infonascita)||void 0===t?void 0:t.isNatoEstero)&&this.infonascita.isNatoEstero;o||(this.infonascita.nazioneNascita=this.ITALIA,this.infonascita.codCatNazioneNascita=this.ITALIACodCat);var r=new d.FormControl({value:o,disabled:!1},[d.Validators.required]);this.form.addControl("isNatoEstero",r);var s=new d.FormControl({value:this.infonascita.provinciaNascita,disabled:!1},[d.Validators.required]);this.form.addControl("provinciaNascita",s);var l=new d.FormControl({value:(null===(e=this.infonascita)||void 0===e?void 0:e.comuneNascita)?null===(i=this.infonascita)||void 0===i?void 0:i.comuneNascita:this.ITALIACodCat,disabled:!1},[d.Validators.required]);this.form.addControl("comuneNascita",l);var c=new d.FormControl({value:this.infonascita.dataNascita,disabled:!1},[d.Validators.required,Oe.ValidateDate]);this.form.addControl("dataNascita",c);var p=new d.FormControl({value:this.infonascita.codCatNazioneNascita,disabled:!1},[d.Validators.required]);this.form.addControl("codCatNazioneNascita",p),this.readOnly?(this.form.disable(),this.isNatoEstero$=r.valueChanges.pipe(a.startWith(o))):this.isNatoEstero$=r.valueChanges.pipe(a.tap((function(t){return t?p.setValue(null):(s.setValue(null),l.setValue(null))})),a.startWith(o),a.tap((function(t){t?(p.enable(),l.disable(),s.disable()):(p.disable(),l.enable(),s.enable())})));var u=this.form.valueChanges.pipe(a.map((function(t){var e,i,o=new ft;if(o.dataNascita=P(n.form.controls.dataNascita.value).toDate(),null===(e=n.form.controls.isNatoEstero)||void 0===e?void 0:e.value){if(o.isNatoEstero=n.form.controls.isNatoEstero.value,null===(i=n.form.controls.codCatNazioneNascita)||void 0===i?void 0:i.value){var a=n.nazioni.find((function(t){var e;return t.codiceCatastale==(null===(e=n.form.controls.codCatNazioneNascita)||void 0===e?void 0:e.value)}));a&&(o.codCatNazioneNascita=a.codiceCatastale,o.nazioneNascita=a.sigla,o.comuneNascita=a.codiceCatastale)}o.provinciaNascita="EE"}else o.isNatoEstero=null,o.comuneNascita=n.form.controls.comuneNascita.value,o.provinciaNascita=n.form.controls.provinciaNascita.value,o.codCatNazioneNascita=n.ITALIACodCat,o.nazioneNascita=n.ITALIA;return o})),a.startWith(this.infonascita),a.map((function(t){return _.of(n.form.valid||n.readOnly,t)})));this.subscription=u.subscribe((function(t){return n.done.emit(t)})),this.comuni$=s.valueChanges.pipe(a.tap((function(t){return l.setValue(null)})),a.startWith(this.infonascita.provinciaNascita),a.filter((function(t){return t})),a.switchMap((function(t){return n.territorio.getComuni$(t)})))},t.prototype.initialize=function(){this.infonascita||(this.infonascita=this.initInfoNascita())},t.prototype.initInfoNascita=function(){return new ft},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.compareComuni=function(t,e){return t&&e?t.codiceCatastale===e.codiceCatastale:t===e},t.prototype._resetForm=function(){var t;null===(t=this.form)||void 0===t||t.reset()},t}();Le.decorators=[{type:e.Component,args:[{selector:"lib-info-nascita",template:'<div [formGroup]="form">\r\n\t<mat-checkbox formControlName="isNatoEstero" *ngIf="!readOnly">\r\n\t\t\x3c!-- {{\'localita-nascita-estera\' | traduzione}} --\x3e\r\n\t\t<info-tip-label label="localita-nascita-estera"></info-tip-label>\r\n\t</mat-checkbox>\r\n\r\n\t<div class="row my-2">\r\n\t\t<div class="col-md-4" *ngIf="!(isNatoEstero$ | async)">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'provincia-nascita\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="provinciaNascita">\r\n\t\t\t\t\t<mat-option *ngFor="let provincia of province | async" [value]="provincia.sigla">\r\n\t\t\t\t\t\t{{ provincia.denominazione }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'provinciaNascita\'].invalid">\r\n\t\t\t\t\t{{\r\n\t\t\t\t\tmsg.produceMessage(\r\n\t\t\t\t\t"obbligatorio",\r\n\t\t\t\t\tform.controls["provinciaNascita"]\r\n\t\t\t\t\t) | traduzione\r\n\t\t\t\t\t}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'provincia-nascita\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-4" *ngIf="!(isNatoEstero$ | async)">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'comune-nascita\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="comuneNascita">\r\n\t\t\t\t\t<mat-option *ngFor="let comune of comuni$ | async" [value]="comune.codiceCatastale">\r\n\t\t\t\t\t\t{{ comune.denominazione }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'comuneNascita\'].invalid">\r\n\t\t\t\t\t{{\r\n\t\t\t\t\tmsg.produceMessage("obbligatorio", form.controls["comuneNascita"]) | traduzione\r\n\t\t\t\t\t}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'comune-nascita\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-4" *ngIf="isNatoEstero$ | async">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'nazione-nascita\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="codCatNazioneNascita">\r\n\t\t\t\t\t<mat-option *ngFor="let nazione of nazioni$ | async" [value]="nazione.codiceCatastale">\r\n\t\t\t\t\t\t{{ nazione.denominazione }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'codCatNazioneNascita\'].invalid">\r\n\t\t\t\t\t{{\r\n\t\t\t\t\tmsg.produceMessage("obbligatorio", form.controls["codCatNazioneNascita"]) | traduzione\r\n\t\t\t\t\t}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'nazione-nascita\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input [max]="maxDate" matInput [matDatepicker]="dataNascita"\r\n\t\t\t\t\tplaceholder="{{\'required\' | traduzione}}{{\'data-nascita\' | traduzione}}" formControlName="dataNascita" />\r\n\t\t\t\t<mat-datepicker-toggle matSuffix [for]="dataNascita"></mat-datepicker-toggle>\r\n\t\t\t\t<mat-datepicker #dataNascita></mat-datepicker>\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'dataNascita\'].invalid">\r\n\t\t\t\t\t{{ msg.getErrorData(form.controls["dataNascita"]) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'data-nascita\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n',styles:[""]}]}],Le.ctorParameters=function(){return[{type:j},{type:ke},{type:Oe},{type:ke}]},Le.propDecorators={infonascita:[{type:e.Input}],province:[{type:e.Input}],namespace:[{type:e.Input}],readOnly:[{type:e.Input}],done:[{type:e.Output}]};var qe=function(t){function e(e,i){var n=t.call(this)||this;return n.http=e,n.configurationService=i,console.log("[CodiceFiscaleService]"),n.urlArgo=i.servicePaths.get("ARGO_INTEGRATION_MS_API_URL")+"/v2",console.log("[urlArgo - lib]",n.urlArgo),n}return et(e,t),e.prototype.validaCodiceFiscale$=function(t,e){var i=this.urlArgo+"/checkfs/cf";return this.http.put(i,{codiceFiscale:t,tipoPersona:e})},e}(Me);qe.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new qe(e.ɵɵinject(n.HttpClient),e.ɵɵinject(G))},token:qe,providedIn:"root"}),qe.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],qe.ctorParameters=function(){return[{type:n.HttpClient},{type:G}]};var _e=function(t,e){this.valid=t,this.pg=e},Be=function(){function t(t,i,n){this.msg=t,this.delegheService=i,this.dialog=n,this.validatorFormControl=!1,this.couldBeDittaIndividuale=!0,this.done=new e.EventEmitter,this.changeSedi$=new o.ReplaySubject(1),this.changePG$=new o.ReplaySubject(1),this.personaSelected$=new o.BehaviorSubject(null),this.CODICE_LEGALE="LEGALE",this.errorSedi$=new o.Subject}return t.prototype.ngOnDestroy=function(){var t,e,i,n;null===(t=this.subscription)||void 0===t||t.unsubscribe(),null===(e=this.subValidation)||void 0===e||e.unsubscribe(),null===(i=this.subCF)||void 0===i||i.unsubscribe(),null===(n=this.invalidPgsSubscriptions)||void 0===n||n.unsubscribe()},t.prototype.ngOnInit=function(){var t,e,i,n=this;this.streamListaSedi$=new o.ReplaySubject,this.changeSedi$.next(_.of(!this.gestioneSedi,(function(t){return t}))),(null===(t=this.datisocieta)||void 0===t?void 0:t.sedi)&&this.streamListaSedi$.next(null===(e=this.datisocieta)||void 0===e?void 0:e.sedi);this.form=new d.FormGroup({}),this.resetForm&&(this.subscription=this.resetForm.subscribe((function(t){return t?n.pulisciForm():""}))),this.datisocieta||this.initDatiSocieta();var r=new d.FormControl({value:this.datisocieta.codiceFiscale,disabled:null!=this.personaGiuridicaFromDeleghe$},[this.validatorFormControl?d.Validators.required:d.Validators.nullValidator,Oe.pattern(this.couldBeDittaIndividuale?Oe._codiceFiscalePiva:Oe.partitaIva,"cfInvalidoFormalmente")]);this.form.addControl("codiceFiscale",r);var s=new d.FormControl({value:this.datisocieta.ragioneSociale,disabled:!0},[]);this.form.addControl("ragioneSociale",s);var l=new d.FormControl({value:this.datisocieta.partitaIVA,disabled:!0},[]);this.form.addControl("partitaIVA",l),this.personaGiuridicaFromDeleghe$?this.personaGiuridica$=this.personaGiuridicaFromDeleghe$.pipe(a.map((function(t){return new _e(!0,t)})),a.catchError((function(t){return o.of(new _e(!1,null))})),a.shareReplay()):this.personaGiuridica$=this.form.get("codiceFiscale").valueChanges.pipe(a.auditTime(1e3),a.switchMap((function(t){return n.couldBeDittaIndividuale&&(11==(null==t?void 0:t.length)||16==(null==t?void 0:t.length))||!n.couldBeDittaIndividuale&&11==(null==t?void 0:t.length)?n.delegheService.getPersonaGiuridicaCodiceFiscale(t).pipe(a.map((function(t){return new _e(!0,t)})),a.catchError((function(t){return n.catchPersonaGiuridicaError()}))):o.of(new _e(!1,null))})),a.shareReplay(),a.tap((function(t){console.log("[validationResult]",t)})),a.shareReplay());var c=this.personaGiuridica$.pipe(a.filter((function(t){return t.valid})),a.map((function(t){return t.pg}))),p=this.personaGiuridica$.pipe(a.filter((function(t){return!t.valid}))),u=this.buildStreamChangePG$(c).pipe(a.tap((function(t){return n.setSedi(t.sedi)})),a.tap((function(t){return n.controlloSedeLegale(t)})),a.map((function(t){var e,i=!!(null===(e=t.sedi)||void 0===e?void 0:e.find((function(t){return t.tipoSede.codice==n.CODICE_LEGALE})))&&!n.form.invalid;return _.of(i,(function(e){return Object.keys(t).forEach((function(i){return e[i]=t[i]}))}))}))),m=K.reducer2(u,this.changeSedi$,(function(t){return!0}),_.of(!1,this.datisocieta));this.subscription=m.subscribe((function(t){return n.done.emit(t)})),this.invalidPgsSubscriptions=p.subscribe((function(t){n.form.get("partitaIVA").setValue(""),n.form.get("ragioneSociale").setValue(""),n.personaSelected$.next(null),n.done.emit(_.of(!1,new Ft))})),this.datisocieta&&r.setValue(null===(i=this.datisocieta)||void 0===i?void 0:i.codiceFiscale),this.cf$&&(this.subCF=this.cf$.pipe(a.tap((function(t){return r.setValue(t)}))).subscribe())},t.prototype.ngOnChanges=function(t){var e,i,n,o,a,r,s,l,c,p,u,m,f,h;console.log("ngOnChanges:",t),(null===(i=null===(e=this.form)||void 0===e?void 0:e.controls)||void 0===i?void 0:i.codiceFiscale)&&(null===(o=null===(n=this.form)||void 0===n?void 0:n.controls)||void 0===o||o.codiceFiscale.setValidators(null),null===(r=null===(a=this.form)||void 0===a?void 0:a.controls)||void 0===r||r.codiceFiscale.setValidators([this.validatorFormControl?d.Validators.required:d.Validators.nullValidator,Oe.pattern(this.couldBeDittaIndividuale?Oe._codiceFiscalePiva:Oe.partitaIva,"cfInvalidoFormalmente")]),1!=(null===(s=null==t?void 0:t.couldBeDittaIndividuale)||void 0===s?void 0:s.currentValue)&&0!=(null===(l=null==t?void 0:t.couldBeDittaIndividuale)||void 0===l?void 0:l.currentValue)||(null===(c=null==t?void 0:t.couldBeDittaIndividuale)||void 0===c?void 0:c.currentValue)==(null===(p=null==t?void 0:t.couldBeDittaIndividuale)||void 0===p?void 0:p.previousValue)&&void 0!==(null===(u=null==t?void 0:t.couldBeDittaIndividuale)||void 0===u?void 0:u.previousValue)||null===(h=null===(f=null===(m=this.form)||void 0===m?void 0:m.controls)||void 0===f?void 0:f.codiceFiscale)||void 0===h||h.patchValue(null))},t.prototype.catchPersonaGiuridicaError=function(){return this.dialog.open(Ee,{data:{title:"persona-giuridica-by-cf-error-titolo",azioni:[new Ve("ok")],paragrafi:["modalita-pagamento-dialog-testo"]},panelClass:"custom-modalbox-ko"}),o.of(new _e(!1,null))},t.prototype.controlloSedeLegale=function(t){var e,i,n,o=this,a=null===(e=t.sedi)||void 0===e?void 0:e.find((function(t){return t.tipoSede.codice==o.CODICE_LEGALE}));0!=(null===(i=t.sedi)||void 0===i?void 0:i.length)&&t.sedi?a||(n="nessunaSedeLegale"):n="nessunaSede",this.errorSedi$.next(n)},t.prototype.buildStreamChangePG$=function(t){var e=this;return t.pipe(a.tap((function(t){return e.personaSelected$.next(t)})),a.map((function(t){var e,i,n,o;return{codiceFiscale:t.datiPersonaGiuridica.codiceFiscale,partitaIVA:t.datiPersonaGiuridica.partitaIVA,ragioneSociale:t.datiPersonaGiuridica.ragioneSociale,idPersonaGiuridica:t.datiPersonaGiuridica.id,codiceRegione:null===(o=null===(n=null===(i=null===(e=null==t?void 0:t.sedi)||void 0===e?void 0:e.filter((function(t){var e;return"LEGALE"===(null===(e=null==t?void 0:t.tipoSede)||void 0===e?void 0:e.codice)}))[0])||void 0===i?void 0:i.indirizzo)||void 0===n?void 0:n.regione)||void 0===o?void 0:o.sigla,sedi:t.sedi,hasAmmUtenze:t.hasAmmUtenze}})),a.tap((function(t){e.form.get("partitaIVA").setValue(t.partitaIVA),e.form.get("ragioneSociale").setValue(t.ragioneSociale)})),a.startWith(_.of(!1,(function(t){return t}))))},t.prototype.setSedi=function(t){var e=this;ve(t).when(Qt(null),(function(){return e.streamListaSedi$.next([])})).otherwise((function(){return e.streamListaSedi$.next(t)})).valueOf()()},t.prototype.sediReady=function(t){this.changeSedi$.next(t.mapValue((function(t){return function(e){return e.sedi=t}})))},t.prototype.initDatiSocieta=function(){this.datisocieta=new Ft},t.prototype.pulisciForm=function(){var t=this;Object.keys(this.form.value).forEach((function(e){t.form.get(e).setValue("")}))},t}();Be.decorators=[{type:e.Component,args:[{selector:"lib-persona-giuridica",template:'<div [formGroup]="form">\r\n\t<div class="row">\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}} {{\'codice-fiscale\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput\r\n\t\t\t\t\tplaceholder="{{validatorFormControl ? (\'required\' | traduzione): \'\'}} {{\'codice-fiscale\' | traduzione}}"\r\n\t\t\t\t\tformControlName="codiceFiscale" uppercase style="text-transform: uppercase" maxlength="16">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'codiceFiscale\'].invalid">\r\n\t\t\t\t\t{{msg.produceMessage(\'codiceFiscaleInvalido\', form.controls[ \'codiceFiscale\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'codice-fiscale\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t\x3c!-- <div class="col-md-4" [hidden]= "!editingDisabled"> --\x3e\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}}{{\'ragione-sociale\' | traduzione}}" --\x3e\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{validatorFormControl ? (\'required\' | traduzione): \'\'}} {{\'ragione-sociale\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput placeholder="{{\'ragione-sociale\' | traduzione}}" formControlName="ragioneSociale">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'ragioneSociale\'].invalid">\r\n\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'ragioneSociale\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'ragione-sociale\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t\x3c!-- <div class="col-md-4" [hidden]= "!editingDisabled"> --\x3e\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}}{{\'partita-iva\' | traduzione}}" --\x3e\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{validatorFormControl ? (\'required\' | traduzione): \'\'}} {{\'partita-iva\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput placeholder="{{\'partita-iva\' | traduzione}}" formControlName="partitaIVA">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'partitaIVA\'].invalid">\r\n\t\t\t\t\t{{msg.produceMessage(\'partitaIVAInvalida\', form.controls[\'partitaIVA\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'partita-iva\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<ng-container *ngIf="gestioneSedi; else noGestioneSedi">\r\n\t\t<ng-container *ngIf="personaSelected$ | async">\r\n\t\t\t<ng-container *ngIf="(personaGiuridicaFromDeleghe$ == null) && (personaSelected$ | async).hasAmmUtenze;\r\n\t\t\t\telse visualizzaSedi">\r\n\t\t\t\t<mat-error>\r\n\t\t\t\t\t{{\'contattare-amministratore\' | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-template #visualizzaSedi>\r\n\t\t\t\t<lib-tabella-sedi [sedi$]="streamListaSedi$" (done)="sediReady($event)"\r\n\t\t\t\t\t[idSedeSelezionata]="idSedeSelezionata">\r\n\t\t\t\t</lib-tabella-sedi>\r\n\t\t\t</ng-template>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\r\n\t<ng-template #noGestioneSedi>\r\n\t\t<div *ngIf=" errorSedi$ | async as errorSedi">\r\n\t\t\t<ng-container *ngIf="errorSedi==\'nessunaSede\'">\r\n\t\t\t\t<mat-error>\r\n\t\t\t\t\t{{\'nessunaSede\' | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container *ngIf="errorSedi==\'nessunaSedeLegale\'">\r\n\t\t\t\t<mat-error>\r\n\t\t\t\t\t{{\'nessunaSedeLegale\' | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t</ng-template>\r\n</div>',styles:[""]}]}],Be.ctorParameters=function(){return[{type:j},{type:wt},{type:r.MatDialog}]},Be.propDecorators={cf$:[{type:e.Input}],datisocieta:[{type:e.Input}],idSedeSelezionata:[{type:e.Input}],namespace:[{type:e.Input}],resetForm:[{type:e.Input}],validatorFormControl:[{type:e.Input}],gestioneSedi:[{type:e.Input}],couldBeDittaIndividuale:[{type:e.Input}],personaGiuridicaFromDeleghe$:[{type:e.Input}],done:[{type:e.Output}]};var je=function(){function t(){this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;console.log("[IndirizzoDTO]",this.indirizzo),this.form=new d.FormGroup({});var e=null!=this.indirizzo&&null!=this.indirizzo.localita&&null!=this.indirizzo.localita.comune&&this.indirizzo.localita.comune.startsWith("Z"),i=new d.FormControl({value:e,disabled:!1},[d.Validators.required]);this.form.addControl("indirizzoEstero",i),this.isIndirizzoEstero$=i.valueChanges.pipe(a.tap((function(e){t.done.emit(_.of(!1,null))})),a.shareReplay(),a.startWith(e))},t.prototype.indirizzoReady=function(t){this.done.emit(t)},t}();je.decorators=[{type:e.Component,args:[{selector:"lib-indirizzo",template:'<div [formGroup]="form">\r\n\t<mat-checkbox formControlName="indirizzoEstero" [disabled]="viewOnly">\r\n\t\t{{\'indirizzo-estero\' | traduzione}}\r\n\t</mat-checkbox>\r\n\r\n\t<lib-indirizzo-italiano\r\n\t\t*ngIf="!(isIndirizzoEstero$ | async)"\r\n\t\t(done)="indirizzoReady($event)"\r\n\t\t[indirizzo]="indirizzo"\r\n\t\t[province]="province"\r\n\t\t[viewOnly]="viewOnly"\r\n\t>\r\n\t</lib-indirizzo-italiano>\r\n\r\n\t<lib-indirizzo-estero\r\n\t\t*ngIf="isIndirizzoEstero$ | async"\r\n\t\t(done)="indirizzoReady($event)"\r\n\t\t[indirizzo]="indirizzo"\r\n\t\t[viewOnly]="viewOnly"\r\n\t>\r\n\t</lib-indirizzo-estero>\r\n</div>',styles:[""]}]}],je.ctorParameters=function(){return[]},je.propDecorators={indirizzo:[{type:e.Input}],viewOnly:[{type:e.Input}],province:[{type:e.Input}],descrizioneLocalia:[{type:e.Input}],done:[{type:e.Output}]};var He=function(){},Ue=function(){function t(t){this.msg=t,this.done=new e.EventEmitter,this.changesStrada$=new o.Subject,this.changesLocalita$=new o.Subject}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=!0;this.indirizzo||(this.indirizzo=new He,e=!1),this.namespaceStrada=this.namespace+"strada",this.namespaceLoc=this.namespace+"loc";var i=K.reducer2(this.changesStrada$,this.changesLocalita$,(function(t){return null!=t.localita&&null!=t.strada}),_.of(e,this.indirizzo));this.indirizzoChangedSub=i.subscribe((function(e){t.done.emit(e)}))},t.prototype.localitaReady=function(t){this.changesLocalita$.next(t.mapValue((function(t){return function(e){return e.localita=t}})))},t.prototype.stradaReady=function(t){this.changesStrada$.next(t.mapValue((function(t){return function(e){return e.strada=t}})))},t}();Ue.decorators=[{type:e.Component,args:[{selector:"lib-indirizzo-italiano",template:'<div [formGroup]="form">\r\n\t<lib-strada\r\n\t\t(done)="stradaReady($event)"\r\n\t\t[strada]="indirizzo.strada"\r\n\t\t[viewOnly]="viewOnly"\r\n\t>\r\n\t</lib-strada>\r\n\t<lib-localita\r\n\t\t(done)="localitaReady($event)"\r\n\t\t[localita]="indirizzo.localita"\r\n\t\t[province$]="province"\r\n\t\t[viewOnly]="viewOnly"\r\n\t>\r\n\t</lib-localita>\r\n</div>',styles:[""]}]}],Ue.ctorParameters=function(){return[{type:j}]},Ue.propDecorators={indirizzo:[{type:e.Input}],viewOnly:[{type:e.Input}],province:[{type:e.Input}],done:[{type:e.Output}],namespace:[{type:e.Input}]};var Ze=function(){},Ye=function(){},We=function(){function t(t,i){this.msg=t,this.territorioService=i,this.done=new e.EventEmitter,this.nazioni=i.getNazioni$()}return t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});this.indirizzo||(this.indirizzo=new He,this.indirizzo.localita=new Ze,this.indirizzo.strada=new Ye);var e=new d.FormControl({value:this.indirizzo.strada.inidirizzo,disabled:!1},[d.Validators.required,d.Validators.maxLength(50)]);this.form.addControl("indirizzo",e);var i=new d.FormControl({value:this.indirizzo.localita.comune,disabled:!1},[d.Validators.required]);this.form.addControl("nazioni",i);var n=this.form.valueChanges.pipe(a.map((function(n){var o=new Ze;o.provincia="EE",o.comune=i.value;var a=new Ye;a.inidirizzo=e.value;var r=new He;return r.localita=o,r.strada=a,_.of(t.form.valid,r)})));this.subscription=n.subscribe((function(e){return t.done.emit(e)}))},t}();We.decorators=[{type:e.Component,args:[{selector:"lib-indirizzo-estero",template:'<form [formGroup]="form">\r\n\t<div class="row my-2">\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'nazione\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="{{ \'nazioni\' }}">\r\n\t\t\t\t\t<mat-option *ngFor="let nazione of nazioni | async" [value]="nazione.codiceCatastale">\r\n\t\t\t\t\t\t{{ nazione.denominazione }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'nazioni\'].invalid">\r\n\t\t\t\t\t{{ msg.produceMessage("obbligatorio", form.controls["nazioni"]) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="row my-2">\r\n\t\t<div class="col-md-12">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder="{{\'required\' | traduzione}}{{\'indirizzo\' | traduzione}}"\r\n\t\t\t\t\tformControlName="{{ \'indirizzo\' }}" />\r\n\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'indirizzo\'].invalid">\r\n\t\t\t\t\t{{ msg.produceMessage("obbligatorio", form.controls["indirizzo"]) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</form>',styles:[""]}]}],We.ctorParameters=function(){return[{type:j},{type:ke}]},We.propDecorators={indirizzo:[{type:e.Input}],done:[{type:e.Output}]};var Ke=function(){function t(t,i){this.msg=t,this.territorio=i,this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.strada||this.initStrada();var e=new d.FormControl({value:this.strada.inidirizzo,disabled:this.viewOnly},(function(e){return t.viewOnly||String(e.value).trim().length>0?{}:{required:!0}}));this.form.addControl("stradaIndirizzo",e);var i=new d.FormControl({value:this.strada.civico,disabled:this.viewOnly},(function(e){return t.viewOnly||String(e.value).trim().length>0?{}:{required:!0}}));this.form.addControl("stradaCivico",i);var n=new Ye;n.inidirizzo=e.value,n.civico=i.value,this.changes$=new o.BehaviorSubject(_.of(!1,n)),this.subScriptionChange=this.form.valueChanges.pipe(a.tap((function(e){var i=new Ye;return i.inidirizzo=e.stradaIndirizzo,i.civico=e.stradaCivico,t.changes$.next(_.of(null!=i.inidirizzo&&null!=i.civico,i))}))).subscribe(),this.subscription=this.changes$.subscribe((function(e){t.done.emit(e),console.log("changes$",e)})),this.changes$.next(_.of(null!=n.inidirizzo&&null!=n.civico,n))},t.prototype.initStrada=function(){this.strada=new Ye},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe(),this.subScriptionChange.unsubscribe()},t.prototype.ngAfterContentInit=function(){null!=this.strada.inidirizzo&&null!=this.strada.tipoToponimo&&null!=this.strada.civico&&this.form.updateValueAndValidity({emitEvent:!0})},t}();Ke.decorators=[{type:e.Component,args:[{selector:"lib-strada",template:"<form [formGroup]=\"form\">\r\n\t<div class=\"row my-2\">\r\n\t\t<div class=\"col-md-8\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder=\"{{'required' | traduzione}}{{'indirizzo' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"stradaIndirizzo\">\r\n\t\t\t\t<mat-error *ngIf=\"form.touched && form.controls['stradaIndirizzo'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('obbligatorio', form.controls[ 'stradaIndirizzo']) | traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"col-md-4\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder=\"{{'required' | traduzione}}{{'civico' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"stradaCivico\">\r\n\t\t\t\t<mat-error *ngIf=\"form.touched && form.controls['stradaCivico'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('obbligatorio', form.controls['stradaCivico']) | traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</form>",styles:[""]}]}],Ke.ctorParameters=function(){return[{type:j},{type:ke}]},Ke.propDecorators={viewOnly:[{type:e.Input}],strada:[{type:e.Input}],done:[{type:e.Output}]};var Je=function(){function t(t,i){this.msg=t,this.territorio=i,this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.localita||this.initLocalita();var e=new d.FormControl({value:this.localita.provincia,disabled:this.viewOnly},(function(e){return t.viewOnly||String(e.value).trim().length>0?{}:{required:!0}}));this.form.addControl("localitaProvincia",e);var i=new d.FormControl({value:this.localita.comune,disabled:this.viewOnly},(function(e){return t.viewOnly||String(e.value).trim().length>0?{}:{required:!0}}));this.form.addControl("localitaComune",i);var n=new d.FormControl({value:this.localita.cap,disabled:this.viewOnly},(function(e){return t.viewOnly||String(e.value).trim().length>0?{}:{required:!0}}));this.form.addControl("localitaCap",n),this.comuni$=e.valueChanges.pipe(a.startWith(this.localita.provincia),a.filter((function(t){return t})),a.switchMap((function(e){return t.territorio.getComuni$(e)})),a.shareReplay()),this.cap$=i.valueChanges.pipe(a.startWith(this.localita.comune),a.filter((function(t){return null!=t})),a.switchMap((function(e){return t.comuni$.pipe(a.map((function(t){return t.filter((function(t){return t.codiceCatastale===e}))})),a.filter((function(t){return t.length>0})),a.map((function(t){return t[0]})),a.switchMap((function(e){return t.territorio.getCap$(e.codiceIstat)})))})));var o=this.form.valueChanges.pipe(a.map((function(e){var i=new Ze;return i.cap=t.form.controls.localitaCap.value,i.provincia=t.form.controls.localitaProvincia.value,i.comune=t.form.controls.localitaComune.value,_.of(t.form.valid,i)})));this.subscription=o.subscribe((function(e){return t.done.emit(e)}))},t.prototype.initLocalita=function(){this.localita=new Ze},t.prototype.compareComuni=function(t,e){return t&&e?t.cop===e.cop:t===e},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t}();Je.decorators=[{type:e.Component,args:[{selector:"lib-localita",template:'<div [formGroup]="form">\r\n\t<div class="row my-2">\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'provincia\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="localitaProvincia">\r\n\t\t\t\t\t<mat-option *ngFor="let provincia of province$ | async" [value]="provincia.sigla">\r\n\t\t\t\t\t\t{{provincia.denominazione}}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'localitaProvincia\'].invalid">\r\n\t\t\t\t\t{{\r\n\t\t\t\t\tmsg.produceMessage(\r\n\t\t\t\t\t"obbligatorio",\r\n\t\t\t\t\tform.controls["localitaProvincia"]\r\n\t\t\t\t\t) | traduzione\r\n\t\t\t\t\t}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'comune\' | traduzione}}</mat-label>\r\n\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="localitaComune">\r\n\t\t\t\t\t<mat-option *ngFor="let comune of comuni$ | async" [value]="comune.codiceCatastale">\r\n\t\t\t\t\t\t{{ comune.denominazione }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'localitaComune\'].invalid">\r\n\t\t\t\t\t{{\r\n\t\t\t\t\tmsg.produceMessage("obbligatorio", form.controls["localitaComune"]) | traduzione\r\n\t\t\t\t\t}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-select placeholder="{{\'required\' | traduzione}}{{\'cap\' | traduzione}}" formControlName="localitaCap">\r\n\t\t\t\t\t<mat-option *ngFor="let cap of cap$ | async" [value]="cap">\r\n\t\t\t\t\t\t{{ cap }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'localitaCap\'].invalid">\r\n\t\t\t\t\t{{ msg.produceMessage("obbligatorio", form.controls["localitaCap"]) | traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</div>',styles:[""]}]}],Je.ctorParameters=function(){return[{type:j},{type:ke}]},Je.propDecorators={viewOnly:[{type:e.Input}],localita:[{type:e.Input}],province$:[{type:e.Input}],done:[{type:e.Output}]};var Qe=function(){},Xe=function(){function t(){this.completeProcess=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.direction="only-backward",this.isFinal=!0}return t.prototype.ngOnInit=function(){this.form=new d.FormGroup({});var t=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk1",t);var e=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk2",e);var i=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk3",i);var n=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk4",n);var o=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk5",o);var a=new d.FormControl({value:!1,disabled:!1},[d.Validators.required]);this.form.addControl("chk6",a),this.dichiarazioni||this.initDichiarazione()},t.prototype.forward=function(t){},t.prototype.backward=function(t){this.previousStep.emit(this.dichiarazioni)},t.prototype.complete=function(t){this.setFormFieldControls(),this.completeProcess.emit(this.dichiarazioni)},t.prototype.onSalvaBozza=function(t){this.setFormFieldControls(),this.salvaBozza.emit(this.dichiarazioni)},t.prototype.isFormValid=function(){return this.form.valid&&this.form.controls.chk1.value&&this.form.controls.chk2.value&&this.form.controls.chk3.value&&this.form.controls.chk4.value&&this.form.controls.chk5.value&&(this.isPersonaGiuridica&&this.form.controls.chk6.value||!this.isPersonaGiuridica)},t.prototype.initDichiarazione=function(){this.dichiarazioni=new Array},t.prototype.setFormFieldControls=function(){this.initDichiarazione();var t=new Qe;t.isChecked=this.form.controls.chk1.value,t.dichiarazione="1",this.dichiarazioni.push(t);var e=new Qe;e.isChecked=this.form.controls.chk2.value,e.dichiarazione="2",this.dichiarazioni.push(e);var i=new Qe;i.isChecked=this.form.controls.chk3.value,i.dichiarazione="3",this.dichiarazioni.push(i);var n=new Qe;n.isChecked=this.form.controls.chk4.value,n.dichiarazione="4",this.dichiarazioni.push(n);var o=new Qe;o.isChecked=this.form.controls.chk5.value,o.dichiarazione="5",this.dichiarazioni.push(o);var a=new Qe;a.isChecked=this.form.controls.chk6.value,a.dichiarazione="6",this.dichiarazioni.push(a)},t}();Xe.decorators=[{type:e.Component,args:[{selector:"lib-accettazione",template:'<div class="mt-3 mb-5" [formGroup]="form">\r\n\t<mat-expansion-panel class="panel" [expanded]="true" >\r\n <mat-expansion-panel-header\r\n [collapsedHeight]="\'48px\'"\r\n [expandedHeight]="\'48px\'"\r\n class="custom-header"\r\n >\r\n <mat-panel-title>\r\n <h3 class="h5 mb-0"><info-tip-label label="dichiarazioni-richiedente"></info-tip-label></h3>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\t<div class="row">\r\n\t\t<div class="col-12 mb-3">\r\n\t\t\t<h3 class="h5 mb-0">\r\n\t\t\t\t\x3c!-- <info-tip-label label="dichiarazioni-header"></info-tip-label> --\x3e\r\n\t\t\t\t<h3 class="h5 mb-0"> <info-tip-label label="dichiarazioni-header"></info-tip-label> </h3>\r\n\t\t\t\t<div class="divider"></div>\r\n\t\t\t</h3>\r\n\t\t</div>\r\n\t\t<div class="col-12">\r\n\t\t\t<mat-checkbox formControlName="chk1">\r\n\t\t\t\t{{ \'dichiarazioni-row-1\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox formControlName="chk2">\r\n\t\t\t\t{{ \'dichiarazioni-row-2\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox formControlName="chk3">\r\n\t\t\t\t{{ \'dichiarazioni-row-3\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox formControlName="chk4">\r\n\t\t\t\t{{ \'dichiarazioni-row-4\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox formControlName="chk5">\r\n\t\t\t\t{{ \'dichiarazioni-row-5\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox formControlName="chk6" *ngIf="isPersonaGiuridica">\r\n\t\t\t\t{{ \'dichiarazioni-row-6\' | traduzione }}\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t</div>\r\n\t</mat-expansion-panel>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isFormValid()"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(complete)="complete($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[""]}]}],Xe.ctorParameters=function(){return[]},Xe.propDecorators={dichiarazioni:[{type:e.Input}],isPersonaGiuridica:[{type:e.Input}],tipologiaDichiarazioni:[{type:e.Input}],completeProcess:[{type:e.Output}],salvaBozza:[{type:e.Output}],previousStep:[{type:e.Output}]};var ti="DSAN_EREDI",ei="ATTO_COSTITUTIVO",ii="PROCURA",ni="PROVVEDIMENTO_FALLIMENTO",oi="PROVVEDIMENTO_DEL_GIUDICE_TUTELARE",ai="PROVVEDIMENTO_DI_INCASSO_SOMME",ri="ALTRO",si=function(){function t(t){this.modals=t,this.allegatiMock=[{chiaveCollegamento:"7afe2d6c-5757-4684-91fc-387c7c15dbf6",dataCreazione:"2021-01-08",dataInizioStaging:"2021-01-08",dataStaging:"2021-01-08",dataValidazione:null,descrizione:"Test request10",idCreatore:"1",idDocumento:"ad397ac0-f017-48e1-98fb-3e4c514adbdb",idIstanza:"2380b34a-4b2d-4a9b-896b-ba4a27cdbf7f",jsonMetadati:"",nome:"fileditest10.txt",proprietario:{tipoProprietario:"PF",idProprietario:"1",idSottoProprietario:null},statiDocumento:[{idDocumento:"ad397ac0-f017-48e1-98fb-3e4c514adbdb",stato:"DOC_VALID",dataCambiamentoStato:"2021-01-08",nota:null,lastState:!0}],tipoDocumento:{id:"e617df75-0c3b-41a6-b7a0-c514ede2e9ee",codice:"CU",descrizione:"Certifcazione Unica"},tipoServizio:{id:"f2c7415f-5a20-4f14-a379-d07d0d1cbd9a",codice:"CU",descrizione:"Certificazione Unica"},url:"/v1/documento/ad397ac0-f017-48e1-98fb-3e4c514adbdb/download"}],this.nextStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.direction="both-ways",this.isFinal=!1,this.avantiClicks$=new o.Subject,this.indietroClicks$=new o.Subject}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.documenti||this.initDocumnetazione(),this.addFiles$=new o.Subject,this.removeFile$=new o.Subject,this.removeFile$.subscribe(console.log);var e=this.addFiles$.pipe(a.map((function(e){return function(i){if(null!=e.file){if(!e.file.name.toLowerCase().endsWith(".pdf"))return t.modals.openConfirm(t.buildErrore("Si prega di inserire solamente file in formato pdf")),i;if(0==e.file.size)return t.modals.openConfirm(t.buildErrore("zero-file-size")),i;if(null!=i.find((function(t){return t.file.name===e.file.name})))return t.modals.openConfirm(t.buildErrore("Si prega di inserire un file diverso da quelli che sono stati inseriti")),i;t.caricaDocumenti.resetForm()}return ot(i,[e])}})));this.nomeColonne$=new o.Observable((function(t){return t.next(["nr._Documento","tipo_Documento","data_Documento","tipologia_emittente","organo_emittente","obbligatorio"])})),this.mappatura$=this.addFiles$.pipe(a.map((function(t){return Object.keys(t[0])})));var i=this.removeFile$.pipe(a.map((function(t){return function(e){return e.filter((function(e,i){return t!==i}))}})));this.files$=o.merge(e,i).pipe(a.scan((function(t,e){return e(t)}),[]),a.startWith([]),a.tap((function(t){return console.log("[DocumentazioneComponent] - metadatiDocumenti",t)})),a.shareReplay()),this.viewList$=this.files$.pipe(a.map((function(t){return t.length>0})));var n=o.combineLatest([this.files$,this.tipologieDocumento$]).pipe(a.map((function(t){var e=nt(t,2),i=e[0],n=e[1],o=(n?n.filter((function(t){return t.codice!=ri})):[]).filter((function(t){return!i.find((function(e){return e.tipoDocumento.codice==t.codice}))}));return W.of(i,o)})),a.shareReplay());this.hasMissingFileTypes$=n.pipe(a.map((function(t){return t._2.length>0})),a.startWith(!1)),this.missingFileTypes$=n.pipe(a.map((function(t){return t._2})));var r=n.pipe(a.map((function(t){return t._1})));this.subscription=this.avantiClicks$.pipe(a.debounceTime(250),a.withLatestFrom(r),a.tap((function(e){var i=nt(e,2),n=(i[0],i[1]);return t.nextStep.emit(n)}))).subscribe(),this.tipologieDocumentoAll$=this.tipologieDocumento$},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.forward=function(t){this.avantiClicks$.next(t)},t.prototype.backward=function(t){this.previousStep.emit([])},t.prototype.complete=function(t){},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit([])},t.prototype.initDocumnetazione=function(){this.documenti=new Array},t.prototype.buildErrore=function(t){var e=new Re;e.title="dialogTitleError",e.paragrafi=[t];var i=new Ve("ko");return i.testo="KO",e.azioni=[i],e},t}();si.decorators=[{type:e.Component,args:[{selector:"lib-documentazione",template:'<div class="row" class="mt-3 mb-5">\r\n\t<mat-expansion-panel class="panel" [expanded]="true" [formGroup]="form">\r\n <mat-expansion-panel-header\r\n [collapsedHeight]="\'48px\'"\r\n [expandedHeight]="\'48px\'"\r\n class="custom-header"\r\n >\r\n <mat-panel-title>\r\n <h3 class="h5 mb-0"><info-tip-label label="documentazione"></info-tip-label></h3>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\t<div class="col-12">\r\n\t\t<br>\r\n\t\t<div class="row">\r\n\t\t\t<div class="col-12 mb-3">\r\n\t\t\t\t<h3 class="h5 mb-0"><info-tip-label label="documentazione-da-allegare"></info-tip-label></h3>\r\n\t\t\t\t<div class="divider"></div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<lib-carica-documenti\r\n\t\t\t[tipologieDocumento]="tipologieDocumentoAll$ | async"\r\n\t\t\t[tipologieTipiEmittenti$]="tipologieTipiEmittenti$"\r\n\t\t\t(onFileAdded)="addFiles$.next($event)"\r\n\t\t\t#caricaDocumenti\r\n\t\t>\r\n\t\t</lib-carica-documenti>\r\n\t</div>\r\n\t<div class="col-12" *ngIf="viewList$ | async">\r\n\t\t<div class="d-flex border-bottom align-items-baseline mb-3">\r\n\t\t\t<h3 class="h5 mb-0">{{\'documentazione-inserita\' | traduzione}}</h3>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="col-12" *ngIf="viewList$ | async">\r\n\t\t<lib-tabella-documenti [files$]="files$" (indiceSelezionato)="removeFile$.next($event)">\r\n\t\t</lib-tabella-documenti>\r\n\t</div>\r\n\t<div class="col-md-12">\r\n\t\t<mat-error *ngIf="hasMissingFileTypes$ | async">\r\n\t\t\t<p class="h6 mt-4">{{\'documenti-mancanti\' | traduzione}}</p>\r\n\t\t\t<p *ngFor="let missing of missingFileTypes$ | async">\r\n\t\t\t\t{{ missing.descrizione }}\r\n\t\t\t</p>\r\n\t\t</mat-error>\r\n\t</div>\r\n\t</mat-expansion-panel>\r\n\t<div class="mt-4"></div>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(goBackward)="complete($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t\t[isContainerValid]="!(hasMissingFileTypes$ | async)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[""]}]}],si.ctorParameters=function(){return[{type:Ae}]},si.propDecorators={documenti:[{type:e.Input}],tipologieDocumento$:[{type:e.Input}],tipologieTipiEmittenti$:[{type:e.Input}],nextStep:[{type:e.Output}],salvaBozza:[{type:e.Output}],previousStep:[{type:e.Output}],caricaDocumenti:[{type:e.ViewChild,args:["caricaDocumenti"]}]};var li=function(t,e,i,n,o,a,r,s){this.tempId=t,this.file=e,this.tipoDocumento=i,this.soggettoEmittente=n,this.dataDocumento=o,this.numeroDocumento=a,this.codiceTipoEmittente=r,this.nota=s},ci=function(){function t(t){this.i18nService=t,this.i18n$=this.i18nService.model$.pipe(a.catchError((function(t){return console.error(t),o.of([])}))).pipe(a.shareReplay(1))}return t.prototype.getInfo$=function(t){return this.i18n$.pipe(a.map((function(e){return e.find((function(e){return e.codiceLabel==t}))})))},t}();ci.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new ci(e.ɵɵinject(m.I18NService))},token:ci,providedIn:"root"}),ci.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],ci.ctorParameters=function(){return[{type:m.I18NService}]};var di=function(){function t(t,i){this.msg=t,this.infoTipService=i,this.onFileAdded=new e.EventEmitter,this.maxDate=new Date,this.validitaForm$=new o.Subject,this.files$=new o.BehaviorSubject(null)}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=new d.FormControl({value:null,disabled:!1},[d.Validators.required]),i=new d.FormControl({value:"",disabled:!1},[d.Validators.required]),n=new d.FormControl({value:"",disabled:!1},[d.Validators.required,Oe.ValidateDate]),r=new d.FormControl({value:"",disabled:!1},[d.Validators.required]),s=new d.FormControl({value:null,disabled:!1},[]),l=new d.FormControl({value:"",disabled:!1},[]);this.form.addControl("tipoDocumento",e),this.form.addControl("soggettoEmittente",i),this.form.addControl("dataDocumento",n),this.form.addControl("numeroDocumento",r),this.form.addControl("tipologiaEmittente",s),this.form.addControl("note",l),this.tipoDocumento$=e.valueChanges.pipe(a.shareReplay()),this.soggettoEmittente$=i.valueChanges.pipe(a.shareReplay()),this.dataDocumento$=n.valueChanges.pipe(a.shareReplay()),this.numeroDocumento$=r.valueChanges.pipe(a.debounceTime(800),a.shareReplay()),this.addFiles$=new o.Subject,this.note$=new o.Subject,this.tipologieEmittente$=new o.Subject;var c=o.combineLatest([this.tipoDocumento$,this.files$,this.soggettoEmittente$,this.dataDocumento$,this.numeroDocumento$,this.tipologieEmittente$,this.note$]).pipe(a.map((function(t){var e=nt(t,7),i=e[0],n=e[1],o=e[2],a=e[3],r=e[4],s=e[5],l=e[6];return new li((new Date).getTime().toString(),n,i,o,a,r,s,l)})));this.addFiles$.pipe(a.debounceTime(300),a.withLatestFrom(c),a.tap((function(e){var i=nt(e,2),n=(i[0],i[1]);t.onFileAdded.emit(n),t.validitaForm$.next(!0),t.pulisciForm()}))).subscribe(),this.infoTipService.getInfo$("numero-documento").subscribe((function(e){t.numeroDocumentoCaption=e.tooltip}))},t.prototype.sfoglia=function(t){this.fileInput.nativeElement&&this.fileInput.nativeElement.click()},t.prototype.filesChanged=function(){var t=this.fileInput.nativeElement.files[0];this.files$.next(t),this.nameFileTruncated=this.formatFunction(t.name)},t.prototype.aggiungiFile=function(t){this.tipologieEmittente$.next(this.form.value.tipologiaEmittente),this.note$.next(this.form.value.note),this.addFiles$.next(t),this.fileInput.nativeElement.value=""},t.prototype.resetForm=function(){this.form.reset()},t.prototype.ngOnDistory=function(){this.subscription.unsubscribe()},t.prototype.formatFunction=function(t){return t.length>18?t.substring(0,18)+"..."+t.substring(t.length,t.length-4):t},t.prototype.pulisciForm=function(){var t=this;Object.keys(this.form.value).forEach((function(e){t.form.get(e).setValue("")})),this.files$.next(null)},t}();di.decorators=[{type:e.Component,args:[{selector:"lib-carica-documenti",template:'<div class="row d-flex align-items-center" [formGroup]="form">\r\n\t<div class="col-12 col-md-6 my-2">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'tipo-documento\' | traduzione}} {{\' *\'}}</mat-label>\r\n\t\t\t<mat-select formControlName="tipoDocumento">\r\n\t\t\t\t<mat-option *ngFor="let tipoDocumento of tipologieDocumento" [value]="tipoDocumento">\r\n\t\t\t\t\t{{tipoDocumento.descrizione}}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t\t<mat-error *ngIf="form.controls[\'tipoDocumento\'].invalid">\r\n\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'tipoDocumento\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'tipo-documento\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class="col-12 col-md-6 my-2">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'soggetto-emittente\' | traduzione}}{{\' *\'}}</mat-label>\r\n\t\t\t<input matInput formControlName="soggettoEmittente">\r\n\t\t\t<mat-error *ngIf="form.controls[\'soggettoEmittente\'].invalid">\r\n\t\t\t\t{{ msg.produceMessage(\'obbligatorio\', form.controls[\'soggettoEmittente\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'soggetto-emittente\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\r\n\t<div class="col-12 col-md-6 col-lg-3 my-2">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'data-documento\' | traduzione}}{{\' *\'}}</mat-label>\r\n\t\t\t<input matInput [matDatepicker]="picker" formControlName="dataDocumento" [max]="maxDate">\r\n\t\t\t<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>\r\n\t\t\t<mat-datepicker #picker></mat-datepicker>\r\n\t\t\t<mat-error *ngIf="form.controls[\'dataDocumento\'].invalid">\r\n\t\t\t\t{{ msg.getErrorData(form.controls["dataDocumento"]) | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'data-documento\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\r\n\t</div>\r\n\t<div class="col-12 col-md-6 col-lg-3 my-2">\r\n\t\t<mat-form-field appearance=""> \r\n\t\t\t<mat-label>{{\'numero-documento\' | traduzione}}{{\'*\'}}</mat-label>\r\n\t\t\t<input matInput formControlName="numeroDocumento" #numeroDoc maxlength="49">\r\n\t\t\t<mat-error *ngIf="form.controls[\'numeroDocumento\'].invalid">\r\n\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'numeroDocumento\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint align="start" style="max-width: 70%!important;color: black!important;">{{numeroDocumentoCaption}}</mat-hint>\r\n\t\t\t<mat-hint align="end">{{numeroDoc.value.length}} / 49</mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\r\n\r\n\t<div class="col-12 col-md-9 col-lg-3 my-2">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'tipologia-emittente\' | traduzione}}</mat-label>\r\n\t\t\t\x3c!-- TODO --\x3e\r\n\t\t\t\x3c!-- <mat-select formControlName="tipologiaEmittente">\r\n\t\t\t\t<mat-option [value]="null">-- {{ \'placeholder\' | traduzione }} --</mat-option>\r\n\t\t\t\t<mat-option *ngFor="let tipologiaEmittente of tipologieEmittente" [value]="tipologiaEmittente">\r\n\t\t\t\t\t{{tipologiaEmittente.descrizione}}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select> --\x3e\r\n\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="tipologiaEmittente">\r\n\t\t\t\t<mat-option \r\n\t\t\t\t\t*ngFor="let tipoEmittente of tipologieTipiEmittenti$ | async"\r\n\t\t\t\t\t[value]="tipoEmittente.codice"\r\n\t\t\t\t>\r\n\t\t\t\t{{ tipoEmittente.descrizione }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t\t<mat-hint *infoTip="\'tipologia-emittente\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class="col-12 col-md-3 col-lg-3 my-2">\r\n\t\t<button mat-stroked-button color="primary" class="text-uppercase mb-2" (click)="sfoglia($event)">\r\n\t\t\t<i class="fas fa-upload"></i> {{\'upload-file\' | traduzione}}\r\n\t\t</button>\r\n\r\n\t\t<p *ngIf="files$ | async as files" class="position-absolute mb-0 mt-2 text-muted file-upl">\r\n\t\t\t<i class="far fa-file-alt text-primary mr-1" aria-hidden="true"></i>\r\n\t\t\t{{nameFileTruncated}}\r\n\t\t\t\x3c!-- <a href="#" (click)="files$.next(null)"><span class=" ml-1 sr-only">{{\'scarta_il_file\' |\r\n\t\t\t\t\ttraduzione}}</span><i class="fas fa-times-circle ml-2 text-danger"></i></a> --\x3e\r\n\t\t</p>\r\n\t</div>\r\n\t<div class="col-12 my-2">\r\n\t\t<mat-form-field class="example-full-width">\r\n\t\t\t<mat-label>{{\'note\' | traduzione}}</mat-label>\r\n\t\t\t<textarea matInput \r\n\t\t\tplaceholder="Lorem ipsum..." \r\n\t\t\tformControlName="note"\r\n\t\t\tmaxlength="511"\r\n\t\t\t#testo\r\n\t\t\t></textarea>\r\n\t\t\t<mat-hint *infoTip="\'note\'"></mat-hint>\r\n\t\t\t<mat-hint align="end">{{testo.value.length}} / 511</mat-hint>\r\n\t\t</mat-form-field>\r\n\r\n\t</div>\r\n\t<div class="col-12 text-right my-2">\r\n\t\t<button type="button" mat-flat-button color="primary" class="text-uppercase mb-2" (click)="aggiungiFile($event)"\r\n\t\t\t[disabled]="form.invalid || (files$ | async) == null">\r\n\t\t\t{{\'aggiungi\' | traduzione}}\r\n\t\t</button>\r\n\t</div>\r\n\t<input #fileInput *ngIf="(tipoDocumento$ | async) != null" type="file" class="hidden"\r\n\t\t(change)="filesChanged($event)" accept=".pdf">\r\n</div>',styles:["button#buttoneCarica{display:none}.file-upl{white-space:nowrap}"]}]}],di.ctorParameters=function(){return[{type:j},{type:ci}]},di.propDecorators={tipologieDocumento:[{type:e.Input}],tipologieEmittente:[{type:e.Input}],tipologieTipiEmittenti$:[{type:e.Input}],onFileAdded:[{type:e.Output}],fileInput:[{type:e.ViewChild,args:["fileInput"]}]};var pi=function(){function t(t){this.msg=t,this.tipologiaDepositoReady=new e.EventEmitter,this.dateRichiesta=new Date}return t.prototype.ngOnInit=function(){this.form=new d.FormGroup({}),this.tipologiaDeposito=new d.FormControl({value:null,disabled:!1},[d.Validators.required]),this.form.addControl("tipologiaDeposito",this.tipologiaDeposito),this.dataRichiesta=new d.FormControl({value:new Date(Date.now()),disabled:!0},[d.Validators.required,Oe.ValidateDate]),this.form.addControl("dataRichiesta",this.dataRichiesta)},t.prototype.compilaRichiesta=function(){this.selectedTipoDeposito=this.depositoReady();var t=_.of(!0,this.selectedTipoDeposito);this.tipologiaDepositoReady.emit(t)},t.prototype.depositoReady=function(){return{tipologiaDeposito:this.form.value.tipologiaDeposito,dataRichiesta:new Date(P(this.dataRichiesta.value,"DD/MM/YYYY").toDate())}},t}();pi.decorators=[{type:e.Component,args:[{selector:"lib-tipologia-deposito",template:'<div class="row">\r\n\t<div class="col-12">\r\n\t\t\x3c!-- <h2 class="h2">{{\'tipologia-deposito\' | traduzione}}</h2> --\x3e\r\n\t\t<h2><info-tip-label label="tipologia-deposito"></info-tip-label></h2>\r\n\t</div>\r\n\t<div class="col-12">\r\n\t\t<p>I depositi definitivi sono somme di denaro che devono essere versate da parte di soggetti pubblici o privati\r\n\t\t\t(persone fisiche o giuridiche) in base a legge o per disposizione delle Pubbliche Amministrazioni e che\r\n\t\t\tvengono poi custodite dal Ministero dell’Economia e delle Finanze che cura anche la loro restituzione ai\r\n\t\t\tsoggetti che ne hanno diritto.</p>\r\n\t\t<p>\r\n\t\t\tSi classificano in depositi definitivi obbligatori e volontari:\r\n\t\t</p>\r\n\t\t<ul>\r\n\t\t\t<li>\r\n\t\t\t\t<p><b>Obbligatori:</b> sono quelli prescritti da Leggi o Regolamenti ovvero dall’Autorità giudiziaria o\r\n\t\t\t\t\tamministrativa. Inoltre, sono obbligatori i depositi definitivi eseguiti in dipendenza di un vincolo\r\n\t\t\t\t\tlegale o sono ammessi dalla legge per conseguire un determinato effetto giuridico. Possono essere\r\n\t\t\t\t\teffettuati sia da soggetti privati che da soggetti pubblici.\r\n\t\t\t\t\tSi suddividono in:</p>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p><b>amministrativi:</b> sono i depositi di somme relative alle procedure di esproprio ovvero\r\n\t\t\t\t\t\t\tquelli eseguiti o ordinati da una Pubblica Amministrazione (o soggetto delegato) o, infine,\r\n\t\t\t\t\t\t\tquelli che non possono essere restituiti senza il consenso di una Pubblica Amministrazione\r\n\t\t\t\t\t\t\t(o soggetto delegato). La più rilevante figura di depositi definitivi amministrativi è\r\n\t\t\t\t\t\t\tquella per espropri</p>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p><b>cauzionali:</b> effettuati a garanzia di Pubbliche Amministrazioni in forza di leggi o\r\n\t\t\t\t\t\t\tregolamenti;\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p><b>giudiziari:</b> ordinati dall’Autorità giudiziaria o la cui proprietà sia contestata\r\n\t\t\t\t\t\t\tgiudizialmente ovvero sia in attesa di definizione giudiziale;</p>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</li>\r\n\t\t\t<li>\r\n\t\t\t\t<p><b>Volontari:</b> possono essere effettuati depositi definitivi volontari allo scopo di impiego di\r\n\t\t\t\t\tcapitali esclusivamente da Enti ed Amministrazioni statali, Regioni, Enti locali e altri Enti\r\n\t\t\t\t\tpubblici ai sensi dell’art. 1, comma1, lett.a) del D.Lgs. 30 luglio 1999 n. 284</p>\r\n\t\t\t</li>\r\n\t\t</ul>\r\n\r\n\t\t<p>\r\n\t\t\tIl servizio depositi definitivi è gestito su tutto il territorio nazionale dalle Ragionerie territoriali\r\n\t\t\tdello Stato, il cui coordinamento giuridico, amministrativo e contabile è affidato all’Ufficio VI Direzione\r\n\t\t\tdei Servizi erogati alle Amministrazioni e ai terzi (DST).\r\n\t\t</p>\r\n\t</div>\r\n</div>\r\n<div class="d-flex border-bottom align-items-baseline mb-3">\r\n\t\x3c!-- <h3 class="mr-auto font-weight-bold mt-4 mb-0">{{\'seleziona-tipo-deposito\' | traduzione}}</h3> --\x3e\r\n\t<h3 class="mr-auto font-weight-bold mt-4 mb-0"><info-tip-label label="seleziona-tipo-deposito"></info-tip-label></h3>\r\n</div>\r\n<div class="row d-flex align-items-center" [formGroup]="form">\r\n\t<div class="col-12">\r\n\t\t<div class="alert alert-info" role="alert">\r\n\t\t\t<span class="fas fa-info mr-2 info-icon" aria-hidden="ture"></span> {{\'campi-obbligatori\' | i18n }}\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="col-12 col-md-6 col-lg-6">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'required\'| traduzione}}{{\'tipologia-deposito\' | traduzione }}</mat-label>\r\n\t\t\t<mat-select formControlName="tipologiaDeposito">\r\n\t\t\t\t<mat-option *ngFor="let deposito of tipologieDeposito$ | async" [value]="deposito">\r\n\t\t\t\t\t{{deposito.descrizione}}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t\t<mat-error *ngIf="form.controls[\'tipologiaDeposito\'].invalid">\r\n\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'tipologiaDeposito\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'tipologia-deposito\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\r\n\t<div class="col-12 col-md-3 col-lg-4">\r\n\t\t<mat-form-field>\r\n\t\t\t<input [max]="dateRichiesta" matInput [matDatepicker]="dataRichiesta"\r\n\t\t\t\tplaceholder="{{\'required\' | traduzione}}{{\'data-richiesta\' | traduzione}}"\r\n\t\t\t\tformControlName="dataRichiesta" />\r\n\t\t\t<mat-datepicker-toggle matSuffix [for]="dataRichiesta"></mat-datepicker-toggle>\r\n\t\t\t<mat-datepicker #dataRichiesta></mat-datepicker>\r\n\t\t\t<mat-error *ngIf="form.controls[\'dataRichiesta\'].invalid">\r\n\t\t\t\t{{ msg.getErrorData(form.controls["dataRichiesta"]) | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'data-richiesta\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\r\n\t<div class="col-12 col-md-3 col-lg-2 text-right">\r\n\t\t<button mat-flat-button color="primary" class="text-uppercase mb-2" \r\n\t\t\t[disabled]="form.invalid"\r\n\t\t\t(click)="compilaRichiesta()">\r\n\t\t\t{{\'compila-richiesta\' | traduzione}}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n',styles:[".mat-form-field-appearance-legacy .mat-form-field-wrapper{padding-bottom:1.34375em}"]}]}],pi.ctorParameters=function(){return[{type:j}]},pi.propDecorators={tipologieDeposito$:[{type:e.Input}],tipologiaDepositoReady:[{type:e.Output}]};var ui=function(){function t(t,i,n,a){this.translateService=t,this.translatePipe=i,this.http=n,this.configurationService=a,this.documentoDownload$=new o.Subject,this.allegati=[],this.colonne=[],this.dettaglioDoc=new e.EventEmitter,this.cl1=!1,this.cl2=!1,this.cl3=!1,this.cl4=!1,this.cl5=!1,this.cl6=!1,this.cl7=!1,this.cl8=!1}return t.prototype.ngOnInit=function(){var t=this;this.documentaleServiceUrl=this.configurationService.servicePaths.get("DOCUMENTALE_MS_API_URL"),this.translatePipe.transform(""),this.translateService.traduzioniLib$.pipe(a.tap((function(e){return e?t.loadingLinguage=!0:null}))).subscribe(),this.cl1=this.colonne.find((function(t){return"colonna_allegati_1"==t.chiave})).visibile,this.cl2=this.colonne.find((function(t){return"colonna_allegati_2"==t.chiave})).visibile,this.cl3=this.colonne.find((function(t){return"colonna_allegati_3"==t.chiave})).visibile,this.cl4=this.colonne.find((function(t){return"colonna_allegati_4"==t.chiave})).visibile,this.cl5=this.colonne.find((function(t){return"colonna_allegati_5"==t.chiave})).visibile,this.cl6=this.colonne.find((function(t){return"colonna_allegati_6"==t.chiave})).visibile,this.cl7=this.colonne.find((function(t){return"colonna_allegati_7"==t.chiave})).visibile,this.cl8=this.colonne.find((function(t){return"colonna_allegati_8"==t.chiave})).visibile},t.prototype.downloadFile=function(t){var e=this,i=this.documentaleServiceUrl+t.url;console.log("[url]",i);var o=new n.HttpHeaders;o.append("Accept","text/plain"),this.http.get(i,{headers:o,responseType:"blob"}).subscribe((function(i){return e.saveFile(i,t.nome)}))},t.prototype.saveFile=function(t,e){var i=new Blob([t],{type:"text/plain"});E.saveAs(i,e)},t.prototype.isValid=function(t){return!!t.filter((function(t){return 1==t.lastState}))},t.prototype.visualizzaDettaglio=function(t){this.visualizzaDettagli=!0;try{this.dataJson=JSON.parse(t.jsonMetadati)}catch(t){this.dataJson=null,console.log("[error occored while you were typing the JSON]")}this.documentoSelezionato=t,this.dettaglioDoc.emit(this.visualizzaDettagli)},t}();ui.decorators=[{type:e.Component,args:[{selector:"lib-allegati",template:'\x3c!-- <p>allegati works!</p> --\x3e\r\n<div *ngIf="loadingLinguage" class="row">\r\n\t<div *ngIf="!visualizzaDettagli" class="col-12">\r\n\t\t<div class="table-responsive">\r\n\t\t\t<table class="table border">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th *ngIf="cl1" scope="col">{{\'colonna_allegati_1\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl2" scope="col">{{\'colonna_allegati_2\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl3" scope="col">{{\'colonna_allegati_3\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl4" scope="col">{{\'colonna_allegati_4\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl5" scope="col">{{\'colonna_allegati_5\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl6" scope="col">{{\'colonna_allegati_6\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl7" scope="col">{{\'colonna_allegati_7\' | traduzione}}</th>\r\n\t\t\t\t\t\t<th *ngIf="cl8" scope="col">{{\'colonna_allegati_8\' | traduzione}}</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr *ngFor="let allegato of allegati let i = index">\r\n\t\t\t\t\t\t<td *ngIf="cl1">{{allegato?.dataDocumento | date:\'dd/MM/yyyy\'}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl2">{{allegato?.dataCreazione | date:\'dd/MM/yyyy\'}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl3">{{allegato?.tipoServizio?.descrizione}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl4">{{allegato.descrizione}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl5">{{allegato.nome}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl6">{{allegato?.tipoDocumento?.descrizione}}</td>\r\n\t\t\t\t\t\t<td *ngIf="cl7">\r\n\t\t\t\t\t\t\t<button mat-flat-button color="" class="btn btn-link"\r\n\t\t\t\t\t\t\t\t[disabled]="!isValid(allegato.statiDocumento)"\r\n\t\t\t\t\t\t\t\t(click)="downloadFile(allegato)"\r\n\t\t\t\t\t\t\t\t[attr.aria-label]="\'bt-download-doc\' | traduzione"\r\n\t\t\t\t\t\t\t\ttitle="{{\'bt-download-doc\' | traduzione}}">\r\n\t\t\t\t\t\t\t\t<span class="fas fa-download" aria-hidden="true"></span>\r\n\t\t\t\t\t\t\t\t<p class="sr-only">{{\'bt-download-doc\' | traduzione}}</p>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td *ngIf="allegato.jsonMetadati && cl8">\r\n\t\t\t\t\t\t\t<button mat-flat-button color="" class="btn btn-link"\r\n\t\t\t\t\t\t\t\t(click)="visualizzaDettaglio(allegato)"\r\n\t\t\t\t\t\t\t\t[attr.aria-label]="\'bt-visualizza-dettaglio\' | traduzione"\r\n\t\t\t\t\t\t\t\ttitle="{{\'bt-visualizza-dettaglio\' | traduzione}}">\r\n\t\t\t\t\t\t\t\t<span class="fas fa-eye ml-2" aria-hidden="true"></span>\r\n\t\t\t\t\t\t\t\t<p class="sr-only">{{\'bt-visualizza-dettaglio\' | traduzione}}</p>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\x3c!-- TODO --\x3e\r\n\t\t\t\t\t\x3c!-- <tr *ngIf="allegato.jsonMetadati">\r\n\t\t\t\t\t\t<button mat-flat-button color="link" class="btn btn-link"\r\n\t\t\t\t\t\t\t(click)="visualizzaDettaglio(allegato)">\r\n\t\t\t\t\t\t\t{{\'colonna_allegati_8\' | traduzione}}\r\n\t\t\t\t\t\t\t{{\'Visualizza dettaglio\' | traduzione}}\r\n\t\t\t\t\t\t\t<i class="fas fa-arrow-right ml-2"></i>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<a (click)="visualizzaDettaglio(allegato)" class="float"\r\n\t\t\t\t\t\t\t>{{\'Visualizza dettaglio\' | traduzione}}\r\n\t\t\t\t\t\t\t<i class="bg-primary text-white fas fa-arrow-right ml-1 p-2 rounded "></i>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t<lib-visualizza-dettagli\r\n\t\t\t\t\t\t\t\t[documentoSelezionato]="allegato"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t</lib-visualizza-dettagli>\r\n\t\t\t\t\t</tr> --\x3e\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t\t<div class="col-12">\r\n\t\t\t<div *ngIf="visualizzaDettagli" class="card card-primary shadow">\r\n\t\t\t\t<div class="card-header px-3 py-2">\r\n\t\t\t\t\t<h4 class="card-title mb-0 font-weight-bold d-inline text-uppercase h5">\r\n\t\t\t\t\t\t{{documentoSelezionato?.tipoServizio?.descrizione}}</h4>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="card-body px-3 py-2">\r\n\t\t\t\t\t<div class="row mt-2 mb-3">\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_1\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p >{{documentoSelezionato?.dataDocumento | date:\'dd/MM/yyyy\'}}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_2\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p>{{documentoSelezionato?.dataCreazione | date:\'dd/MM/yyyy\'}}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_3\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p >{{documentoSelezionato?.tipoServizio?.descrizione}}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_5\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p>{{documentoSelezionato?.nome}}</p>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_4\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p>{{documentoSelezionato?.descrizione}}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">\r\n\t\t\t\t\t\t\t\t{{\'colonna_allegati_6\' | traduzione }}:\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p >{{documentoSelezionato?.tipoDocumento?.descrizione}}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12 mb-3">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold"><strong>{{\'colonna_allegati_7\' | traduzione }}</strong></p>\r\n\t\t\t\t\t\t\t<button mat-flat-button color="link" class="btn btn-primary"\r\n\t\t\t\t\t\t\t\t[disabled]="!isValid(documentoSelezionato.statiDocumento)"\r\n\t\t\t\t\t\t\t\t(click)="downloadFile(documentoSelezionato)" aria-label="scarica il documento">\r\n\t\t\t\t\t\t\t\tDownload <span class="fas fa-download fa-lg ml-2" aria-hidden="true"></span>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold" aria-labelledby="ulteriori_documento">{{\'Ulteriori Dettagli\' | traduzione }}:</p>\r\n\t\t\t\t\t\t\t<ngx-json-viewer *ngIf="dataJson"\r\n\t\t\t\t\t\t\t\t[json]="dataJson"\r\n\t\t\t\t\t\t\t\t[expanded]="true"\r\n\t\t\t\t\t\t\t\tid="ulteriori_documento"\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t</ngx-json-viewer>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n',styles:[".card-primary>.card-header{background-color:#d3deea}.table>thead{background-color:#0a2644;color:#fff}.table td,.table th{border-top:0;padding:.75rem;vertical-align:top}.table tr{border-bottom:1px solid #dee2e6}.table tbody tr:hover{background-color:#dee2e6}.btn-link{color:#0061c2}.btn-link:hover{color:#053a9a}.btn-primary{background-color:#0061c2}.btn-primary:hover{background-color:#053a9a}"]}]}],ui.ctorParameters=function(){return[{type:k},{type:L},{type:n.HttpClient},{type:G}]},ui.propDecorators={allegati:[{type:e.Input}],visualizzaDettagli:[{type:e.Input}],colonne:[{type:e.Input}],dettaglioDoc:[{type:e.Output}]};var mi=function(){function t(t,e,i){this.traduzione=t,this.http=e,this.configurationService=i}return t.prototype.ngOnInit=function(){console.log("[Documentale]",this.documentoSelezionato),this.documentaleServiceUrl=this.configurationService.servicePaths.get("DOCUMENTALE_MS_API_URL"),this.dettagli=this.traduzione.transform("visualizzaDettagli");try{this.dataJson=JSON.parse(this.documentoSelezionato.jsonMetadati)}catch(t){this.dataJson=null,console.log("[error occored while you were typing the JSON]")}},t.prototype.accordionOpened=function(){this.dettagli=this.traduzione.transform("nascondiDettagli")},t.prototype.accordionClosed=function(){this.dettagli=this.traduzione.transform("visualizzaDettagli")},t.prototype.contaRighe=function(){},t.prototype.downloadFile=function(t){var e=this,i=this.documentaleServiceUrl+t.url;console.log("[url]",i);var o=new n.HttpHeaders;o.append("Accept","text/plain"),this.http.get(i,{headers:o,responseType:"blob"}).subscribe((function(i){return e.saveFile(i,t.nome)}))},t.prototype.isValid=function(t){return!!t.filter((function(t){return 1==t.lastState}))},t.prototype.saveFile=function(t,e){var i=new Blob([t],{type:"text/plain"});E.saveAs(i,e)},t}();mi.decorators=[{type:e.Component,args:[{selector:"lib-visualizza-dettagli",template:'\x3c!-- <p>visualizza-dettagli works!</p> --\x3e\r\n<mat-accordion class="example-headers-align" multi>\r\n\t<mat-expansion-panel class="panel-dettagli" (opened)="accordionOpened()" (closed)="accordionClosed()">\r\n\t\t<mat-expansion-panel-header class="detail-pagamenti">\r\n\t\t\t<mat-panel-title class="text-white">\r\n\t\t\t\t{{dettagli}}\r\n\t\t\t</mat-panel-title>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<div class="row mt-2">\r\n\t\t\t\x3c!-- <div class="col-4">\r\n <p class="mb-0"><b>{{\'beneficiario\' | traduzione}}</b></p>\r\n <p>{{pagamento?.denominazione}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0"><b>{{\'dataValuta\' | traduzione}}</b></p>\r\n <p>{{data}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0"><b>{{\'cro\' | traduzione}}</b></p>\r\n <p>{{pagamento?.cro}}</p>\r\n </div>\r\n <div class="col-12">\r\n <p class="mb-0"><b>{{\'modalitaPagamaneto\' | traduzione}}</b></p>\r\n <p>{{pagamento.modalitaPagamento?.descrizione}}</p>\r\n </div>\r\n <div *ngIf="pagamento.motivoScarto" class="col-12 col-md-12">\r\n <p class="mb-0"><b>{{\'motivoScarto\' | traduzione}}</b></p>\r\n <textarea disabled="true" matInput value={{pagamento.motivoScarto}} rows={{numeroRighe}}></textarea>\r\n </div> --\x3e\r\n\r\n\t\t</div>\r\n\t\t<div class="card-header px-3 py-2">\r\n\t\t\t<h3 class="card-title mb-0 font-weight-bold d-inline text-uppercase !important">\r\n\t\t\t\t{{documentoSelezionato.tipoServizio.descrizione}}</h3>\r\n\t\t</div>\r\n\t\t<div class="card-body px-3 py-2">\r\n\t\t\t<div class="row mt-2 mb-3">\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_1\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Data Documento\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.dataCreazione | date:\'dd/MM/yyyy\'}}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_2\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Data Caricamento\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.dataCreazione | date:\'dd/MM/yyyy\'}}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_3\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Servizio\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.tipoServizio.descrizione}}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_5\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Nome Documento\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.nome}}</p>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_4\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Descrizione\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.descrizione}}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t<p class="mb-0">\r\n\t\t\t\t\t\t\x3c!-- <b>{{\'colonna_allegati_6\' | traduzione }}</b> --\x3e\r\n\t\t\t\t\t\t<b>{{\'Tipo Documento\' | traduzione }}</b>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<p>{{documentoSelezionato.tipoDocumento.descrizione}}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-4 col-sm-6 col-xs-12">\r\n\t\t\t\t\t\x3c!-- <p class="mb-0"><b>{{\'colonna_allegati_7\' | traduzione }}</b></p> --\x3e\r\n\t\t\t\t\t<p class="mb-0"><b>{{\'Scarica\' | traduzione }}</b></p>\r\n\t\t\t\t\t<button mat-flat-button color="link" class="btn btn-link"\r\n\t\t\t\t\t\t[disabled]="!isValid(documentoSelezionato.statiDocumento)"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t<i class="fas fa-download text-subtitle"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t\x3c!-- <p class="mb-0"><b>{{\'colonna_allegati_8\' | traduzione }}</b></p> --\x3e\r\n\t\t\t\t\t<p class="mb-0"><b>{{\'Visualizza dettaglio\' | traduzione }}</b></p>\r\n\t\t\t\t\t<ngx-json-viewer *ngIf="dataJson"\r\n\t\t\t\t\t\t[json]="dataJson"\r\n\t\t\t\t\t\t[expanded]="true"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</ngx-json-viewer>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</mat-expansion-panel>\r\n</mat-accordion>\r\n',styles:[".mat-flat-button{line-height:25px;padding:0 12px}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px transparent,0 0 0 0 transparent,0 0 0 0 transparent}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:#1d65da}.mat-expansion-panel-header.mat-expanded:focus{background:#1953b0}.mat-expansion-indicator:after{color:#fff!important;margin-top:-3px}.mat-expansion-panel-header{background-color:#1953b0!important;display:inline-flex;height:25px;padding:0 12px}.mat-expansion-panel-header.mat-expanded:hover{background:#1d65da!important}.mat-expansion-panel-body{padding:0 3px 16px}.mat-input-element:disabled{color:#000}"]}]}],mi.ctorParameters=function(){return[{type:L},{type:n.HttpClient},{type:G}]},mi.propDecorators={documentoSelezionato:[{type:e.Input}]};var fi=function(){};fi.decorators=[{type:e.NgModule,args:[{declarations:[ui,mi],imports:[i.CommonModule,n.HttpClientModule,p.MatTableModule,q,S.MatExpansionModule,A.NgxJsonViewerModule],exports:[ui],providers:[]}]}];var hi=function(){function t(t,e,i){var o,r=this;this.http=t,this.configurationService=e,this.appRef=i,this.documentiObbligatoriByTipoRichiedente=((o={})[at]=[ri],o[st]=[ti,ri],o[lt]=[ei,ri],o[rt]=[ri],o[ct]=[ti,ri],o[dt]=[ii,ai,oi,ri],o[pt]=[ei,ni,ri],o),console.log("[TipologicheService]");var s=e.lingua$;this.urlAnagrafe=this.configurationService.servicePaths.get("ANAGRAFE_MS_API_URL")+"/api/v1",this.urlDeposito=e.servicePaths.get("DEPOSITO_MS_API_URL")+"/v1",console.log("[urlDeposito - lib]",this.urlDeposito);var l=this.urlDeposito+"/tipologiche";this.tipologiche=s.pipe(a.switchMap((function(t){return r.http.get(l,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay()),this.V1_ORGANI_GIURISDIZIONALI=this.urlDeposito+"/organiGiurisdizionali?tipo={tipoorgano}",this.V1_TRIBUNALI=this.V1_ORGANI_GIURISDIZIONALI+"&provincia={provincia}"}return t.prototype.getTipiDocumento$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipiDocumento})),a.shareReplay())},t.prototype.getTipiDomicilio$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipiDomicilio})),a.shareReplay())},t.prototype.getTipoEmittente$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipiEmittente})),a.shareReplay())},t.prototype.getRts$=function(){return this.tipologiche.pipe(a.map((function(t){return t.rts})),a.shareReplay())},t.prototype.getTipoContenzioso$=function(){return o.of(this.getTipoContenzioso()).pipe(a.shareReplay())},t.prototype.getTipiRuoloAltriSoggetti$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipiRuoloAltriSoggetti})),a.shareReplay())},t.prototype.getTipiDeposito$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipoDeposito})),a.shareReplay())},t.prototype.getTipiCatasto$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipoCatasto})),a.shareReplay())},t.prototype.filterTipiPagamentoByTipoRichiedente=function(t,e){return e==lt||e==pt?t:t.filter((function(t){return"C"!=t.codice}))},t.prototype.getTipoPagamentoByTipoRichiedente$=function(t){var e=this;return this.getTipiModalitaDiPagamento$().pipe(a.map((function(i){return e.filterTipiPagamentoByTipoRichiedente(i,t)})))},t.prototype.getCortiAppello$=function(){},t.prototype.getTar$=function(){},t.prototype.getTribunali$=function(t){return this.http.get(this.urlAnagrafe+"/tribunale/provincia/"+t+"/").pipe(a.shareReplay())},t.prototype.get_V1Tribunale=function(t,e){var i=new RegExp("{tipoorgano}","gi"),n=new RegExp("{provincia}","gi");return this.V1_TRIBUNALI.replace(i,t).replace(n,e)},t.prototype.getTipoContenzioso=function(){return[{codice:"1",descrizione:"Contenziosi giustizia amministrativa e Corte dei Conti",id:"1",codiceLingua:"it_IT"}]},t.prototype.getTipiModalitaDiPagamento$=function(){return this.tipologiche.pipe(a.pluck("tipiModalitaDiPagamento"))},t.prototype.getTipoDescrizioneCausale$=function(){return this.tipologiche.pipe(a.map((function(t){return t.tipoDescrizioneCausale})),a.shareReplay())},t}();hi.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new hi(e.ɵɵinject(n.HttpClient),e.ɵɵinject(G),e.ɵɵinject(e.ApplicationRef))},token:hi,providedIn:"root"}),hi.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],hi.ctorParameters=function(){return[{type:n.HttpClient},{type:G},{type:e.ApplicationRef}]};var gi=function(){function t(t,i,n){this.msg=t,this.tipologiche=i,this.appRef=n,this.form=new d.FormGroup({}),this.done=new e.EventEmitter}return t.prototype.ngOnDestroy=function(){this.$valuechangeTrib&&this.$valuechangeTrib.unsubscribe(),this.$changeTribunale&&this.$changeTribunale.unsubscribe()},t.prototype.ngOnInit=function(){var t,e,i=this,n=new d.FormControl({value:null===(t=null==this?void 0:this.autoritaOrdinante)||void 0===t?void 0:t.codiceProvincia,disabled:!1},[d.Validators.required]);this.form.addControl("localitaProvinciaAC",n);var r=new d.FormControl({value:"",disabled:!1},(function(t){return String(t.value||"").length>0?{}:{required:"Il campo è obbligatorio."}}));this.form.addControl("tribunaleAC",r),this.tribunali$=n.valueChanges.pipe(a.startWith(null===(e=this.autoritaOrdinante)||void 0===e?void 0:e.codiceProvincia),a.switchMap((function(t){return i.tipologiche.getTribunali$(t).pipe(a.withLatestFrom(o.of(t)))})),a.tap((function(t){var e,n=nt(t,2);n[0];n[1]==(null===(e=i.autoritaOrdinante)||void 0===e?void 0:e.codiceProvincia)?r.setValue(i.autoritaOrdinante.idTribunale):r.setValue(null)})),a.map((function(t){var e=nt(t,2),i=e[0];e[1];return i})),a.shareReplay());var s=o.defer((function(){return i.tribunali$})),l=o.combineLatest([s,r.valueChanges]).pipe(a.map((function(t){var e=nt(t,2),i=e[0],n=e[1];return i.find((function(t){return t.id==n}))})),a.map((function(t){return _.of(i.form.valid,t)})));this.$valuechangeTrib=l.pipe().subscribe((function(t){return i.done.emit(t)}))},t.prototype.resetTribunale=function(){},t}();gi.decorators=[{type:e.Component,args:[{selector:"lib-dati-tribunale",template:'<div class="row" [formGroup]="form">\r\n\t<div class="col-12">\r\n\t\t\x3c!-- <h4 class="h5">{{\'inserisci-dati-tribunale\' | traduzione}}</h4> --\x3e\r\n\t\t<h3 class="h5 mb-0"><info-tip-label label="inserisci-dati-tribunale"></info-tip-label></h3>\r\n\t</div>\r\n\t<div class="col-md-6">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'provincia\' | traduzione}}</mat-label>\r\n\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="localitaProvinciaAC">\r\n\t\t\t\t<mat-option *ngFor="let provincia of province | async" [value]="provincia.sigla">\r\n\t\t\t\t\t{{provincia.denominazione}}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t\t<mat-error *ngIf="form.touched && form.controls[ \'localitaProvinciaAC\'].invalid">\r\n\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[ \'localitaProvinciaAC\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'provincia\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class="col-md-6">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'required\' | traduzione}}{{\'tribunale\' | traduzione}}</mat-label>\r\n\t\t\t<mat-select formControlName="tribunaleAC">\r\n\t\t\t\t<mat-option *ngFor="let tribunale of tribunali$ | async" [value]="tribunale.id">\r\n\t\t\t\t\t{{tribunale.nomeUfficio}}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t\t<mat-error *ngIf="form.controls[ \'tribunaleAC\'].invalid">\r\n\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[ \'tribunaleAC\']) | traduzione}}\r\n\t\t\t</mat-error>\r\n\t\t\t<mat-hint *infoTip="\'tribunale\'"></mat-hint>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t\x3c!-- <div class="col-md-4" *ngIf="cf$ | async">\r\n\t\t<mat-form-field>\r\n\t\t\t<mat-label>{{\'codice-fiscale\' | traduzione}}</mat-label>\r\n\t\t\t<input matInput formControlName="tribunaleCF" [value]="cf$ | async">\r\n\t\t</mat-form-field>\r\n\t</div> --\x3e\r\n</div>\r\n',styles:[""]}]}],gi.ctorParameters=function(){return[{type:j},{type:hi},{type:e.ApplicationRef}]},gi.propDecorators={province:[{type:e.Input}],autoritaOrdinante:[{type:e.Input}],done:[{type:e.Output}]};var vi="A",bi="B",zi="C",yi="D",Fi=function(){};function Ci(t,e){var i=new Fi;return i.idModalitaPagamento=t,i.tipologiaPagamento={codice:e,id:"",descrizione:"",codiceLingua:""},i}var Si=function(){},wi=function(){},Ii=function(){},Pi=function(){},xi=function(){};var Di=function(){function t(t){this.msg=t,this.nextStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.direction="both-ways",this.isFinal=!1,this.changesVagliaBdi$=new o.Subject,this.changesAttoPignoramento$=new o.Subject}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=!0;this.pagamento||(this.initPagamento(),e=!1),this.tipoModalitaPagamento=new d.FormControl({value:this.pagamento.tipoPagamento,disabled:!1},[d.Validators.required]),this.form.addControl("tipoModalitaPagamento",this.tipoModalitaPagamento);var i=Ci(this.pagamento.idModalitaPagamento,this.pagamento.tipoPagamento);this.modalitaPagamento=new d.FormControl({value:i,disabled:!1},[d.Validators.required]),this.form.addControl("modalitaPagamento",this.modalitaPagamento);var n=this.tipoModalitaPagamento.valueChanges.pipe(a.shareReplay());this.modalitaPagamentoPerTipoSelezionato$=n.pipe(a.tap((function(e){return t.modalitaPagamento.setValue(null)})),a.tap((function(e){return t.resetPagamenti()})),a.startWith(this.pagamento.tipoPagamento),a.switchMap((function(e){return t.modalitaPagamento$.pipe(a.map((function(t){return t.filter((function(t){return e==t.tipologiaPagamento.codice}))})))})));var o=n.pipe(a.map((function(t){return _.of(null!=t,(function(e){return e.tipoPagamento=t}))}))),r=this.modalitaPagamento.valueChanges.pipe(a.map((function(e){return _.of(!0,(function(i){null!=e&&""!=e&&t.setRimborso(e)}))}))),s=K.reducer4(o,r,this.changesVagliaBdi$,this.changesAttoPignoramento$,this.pagamentoValid(),_.of(e,this.pagamento)).pipe(a.shareReplay());this.isFormValid$=s.pipe(a.map((function(t){return t.status})),a.startWith(e)),s.subscribe((function(t){console.log("[PagamentoComponent] status",t)}))},t.prototype.pagamentoValid=function(){return function(t){var e;if(t.tipoPagamento)switch(t.tipoPagamento){case vi:e=null!=t.bonifico;break;case bi:e=null!=t.bonificoExtraSepa;break;case zi:e=null!=t.tesoreria;break;case yi:e=null!=t.vagliaBDI;break;default:e=!1}else e=!1;return e}},t.prototype.modalitaComparator=function(t,e){return(t||{}).idModalitaPagamento==(e||{}).idModalitaPagamento},t.prototype.resetPagamenti=function(){this.changesVagliaBdi$.next(_.of(!0,(function(t){return t.vagliaBDI=null})))},t.prototype.setRimborso=function(t){switch(this.resetModalitaPagamento(),this.pagamento.idModalitaPagamento=t.idModalitaPagamento,t.tipologiaPagamento.codice){case vi:this.pagamento.bonifico=(i=t,(n=new wi).iban=i.conto,n);break;case bi:this.pagamento.bonificoExtraSepa=function(t){console.log("[toBonificoExtraSepa]",t);var e=new Ii;return e.indirizzo=t.indirizzo,e.istitutoBancario=t.denominazione,e.nazione=t.nazione,e.numeroConto=t.conto+" "+t.swiftBic,e}(t);break;case zi:this.pagamento.tesoreria=function(t){var e=new Pi;return e.numeroConto=t.conto,e.tesoreria=t.tesoreria.codice,e}(t);break;case yi:this.pagamento.vagliaBDI=((e=new xi).meMedesimo=!0,e.studioLegale=!1,e)}var e,i,n},t.prototype.resetModalitaPagamento=function(){this.pagamento.idModalitaPagamento=null,this.pagamento.vagliaBDI=null,this.pagamento.tesoreria=null,this.pagamento.bonificoExtraSepa=null,this.pagamento.bonifico=null},t.prototype.hasSelectedModalitaDiPagamentoAnd=function(t){return this.hasSelectedModalitaDiPagamento()&&t},t.prototype.hasSelectedModalitaDiPagamento=function(){return this.modalitaPagamento.value},t.prototype.isAutoritaGiudiziaria=function(){return this.hasSelectedModalitaDiPagamentoAnd(vi==this.tipoModalitaPagamento.value)},t.prototype.forward=function(t){this.nextStep.emit(this.pagamento)},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit(this.pagamento)},t.prototype.backward=function(t){this.previousStep.emit(this.pagamento)},t.prototype.complete=function(t){},t.prototype.initPagamento=function(){this.pagamento=new Si},t.prototype.attoPignoramentoReady=function(t){this.changesAttoPignoramento$.next(t.mapValue((function(t){return function(e){return e.tribunale=t}})))},t}();Di.decorators=[{type:e.Component,args:[{selector:"lib-pagamento",template:'<mat-expansion-panel class="panel" [expanded]="true">\r\n\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t<mat-panel-title>\r\n\t\t\t<h3>{{\'modalita-pagamento\' | traduzione}}</h3>\r\n\t\t</mat-panel-title>\r\n\t</mat-expansion-panel-header>\r\n\t<form [formGroup]="form">\r\n\t\t<div class="collapse-body mt-2">\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-md-6">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{\'required\'| traduzione}}{{\'tipologia-pagamento\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="tipoModalitaPagamento">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let pagamento of tipologiePagamento$ | async"\r\n\t\t\t\t\t\t\t\t[value]="pagamento.codice">\r\n\t\t\t\t\t\t\t\t{{pagamento.descrizione}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'tipoModalitaPagamento\'].invalid">\r\n\t\t\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'tipoModalitaPagamento\']) | traduzione}}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-6">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{\'required\'| traduzione}}{{\'modalita-pagamento\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="modalitaPagamento" [compareWith]="modalitaComparator">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let modalita of modalitaPagamentoPerTipoSelezionato$ | async"\r\n\t\t\t\t\t\t\t\t[value]="modalita">\r\n\t\t\t\t\t\t\t\t{{modalita.conto || modalita.tipologiaPagamento.descrizione}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'modalitaPagamento\'].invalid">\r\n\t\t\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'modalitaPagamento\']) | traduzione}}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<lib-dati-tribunale *ngIf="isAutoritaGiudiziaria()"\r\n\t\t\t\t(attoPignoramentoReady)="attoPignoramentoReady($event)"\r\n\t\t\t\t[attoPignoramento]="attoPignoramento"\r\n\t\t\t\t[province]="province"\r\n\t\t\t>\r\n\t\t\t</lib-dati-tribunale>\r\n\t\t</div>\r\n\t</form>\r\n</mat-expansion-panel>\r\n\x3c!-- TODO --\x3e\r\n\x3c!-- <div class="mt-4"></div>\r\n<lp-stepper-navigator-rx\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isFormValid$"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(complete)="complete($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n>\r\n</lp-stepper-navigator-rx> --\x3e\r\n',styles:[".mat-card{border-radius:0!important;border-top:5px solid #0a2644}.divider{background-color:#737373;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-flex{background-color:#fff!important}.mat-select-value{max-width:100%;width:100%!important}"]}]}],Di.ctorParameters=function(){return[{type:j}]},Di.propDecorators={pagamento:[{type:e.Input}],tipologiePagamento$:[{type:e.Input}],modalitaPagamento$:[{type:e.Input}],province:[{type:e.Input}],attoPignoramento:[{type:e.Input}],nextStep:[{type:e.Output}],salvaBozza:[{type:e.Output}],previousStep:[{type:e.Output}]};var Ri=function(){},Vi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),e}(Ri),Ei=function(){function t(t,i,n){this.msg=t,this._ref=i,this.delegheService=n,this.datiDeposito={},this.visibilityMask={},this.nextStep=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.direction="both-ways",this.isFinal=!1}return t.prototype.isImportoFormatoValidoOLD=function(t){return/^(?:[0-9]+|(?:[0-9]{1,3}\.?)+)(?:,[0-9]{1,2})?€?$/.test(t)},t.prototype.currencyToNumber=function(t){return Number(t.replace(/\./g,"").replace(",",".")||void 0)},t.prototype.isImportoFormatoValido=function(t){return/^(?:0|[1-9](?:[0-9]{0,2}\.[0-9]{3}(?:\.[0-9]{3})*|[0-9]*))(?:,[0-9]{2,2})€?$/.test(t)},t.prototype.ngAfterViewInit=function(){this._ref.detectChanges()},t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({causale:new d.FormControl({value:"",disabled:!this.visibilityMask.causale},(function(e){return t.visibilityMask.causale?String(e.value||"").length>0?{}:{required:"Il campo è obbligatorio."}:{}})),importo:new d.FormControl({value:"",disabled:!this.visibilityMask.importo},(function(e){return t.visibilityMask.importo?t.isImportoFormatoValido(e.value)?{}:{pattern:"Formato non valido"}:{}})),"rts-inoltro":new d.FormControl({value:"",disabled:!this.visibilityMask.codiceRtsInoltro},(function(e){return t.visibilityMask.codiceRtsInoltro?String(e.value||"").length>0?{}:{required:"Il campo è obbligatorio."}:{}})),nota:new d.FormControl({value:"",disabled:!this.visibilityMask.nota},(function(e){if(!t.visibilityMask.nota)return{}}))});var e=!0;this.datiDeposito||(this.initDatiDeposito(),e=!1),this.listaRts$.subscribe((function(e){console.log("[listaRts$]",e),null!=e&&(t.rts$=t.delegheService.getListRtsCodiceRegione(e),t.rts$.subscribe((function(e){t._rts=e})))})),this.form.controls.causale.setValue(this.datiDeposito.causale),this.form.controls.importo.setValue(this.datiDeposito.importo),this.form.controls["rts-inoltro"].setValue(this.datiDeposito.codiceRtsInoltro),this.form.controls.nota.setValue(this.datiDeposito.nota);var i=this.form.valueChanges.pipe(a.map((function(e){var i,n=new Vi;return n.causale=t.form.controls.causale.value,null!=t.form.controls.importo.value&&(n.importo=t.currencyToNumber(t.form.controls.importo.value)),n.codiceRtsInoltro=t.form.controls["rts-inoltro"].value,(null==n?void 0:n.codiceRtsInoltro)&&(null==t?void 0:t._rts)&&(n.denominazioneRTS=null===(i=t._rts.find((function(t){return t.codiceFiscale==(null==n?void 0:n.codiceRtsInoltro)})))||void 0===i?void 0:i.denominazioneRTS),n.nota=t.form.controls.nota.value,t.datiDeposito=n,_.of(t.form.valid,t.datiDeposito)})),a.startWith(_.of(e,this.datiDeposito)));this.subscription=i.subscribe((function(t){return console.log("[DatiDepositoComponent] datiSpecificiDeposito",t)}))},t.prototype.forward=function(t){this.nextStep.emit(this.datiDeposito)},t.prototype.backward=function(t){this.previousStep.emit(this.datiDeposito)},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit(this.datiDeposito)},t.prototype.complete=function(t){},t.prototype.isFormValid=function(){return this.form.valid},t.prototype.initDatiDeposito=function(){this.datiDeposito=new Vi},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t}();Ei.decorators=[{type:e.Component,args:[{selector:"lib-dati-deposito",template:'<div class="mt-3 mb-5">\r\n\t\t<mat-expansion-panel class="panel" [expanded]="true">\r\n\t\t\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t<h3 class="h5 mb-0"><info-tip-label label="dati-deposito"></info-tip-label></h3>\r\n\t\t\t\t</mat-panel-title>\r\n\t\t\t</mat-expansion-panel-header>\r\n\t\t\t<form [formGroup]="form">\r\n\t\t\t\t<div class="collapse-body mt-2">\r\n\t\t\t\t\t<div class="row" *ngIf="visibilityMask.causale">\r\n\t\t\t\t\t\t<div class="col-md-12">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\t\t\tplaceholder="{{ \'required\' | traduzione }}{{ \'dati-deposito-causale\' | traduzione }}"\r\n\t\t\t\t\t\t\t\t\tformControlName="causale"\r\n\t\t\t\t\t\t\t\t\tmaxlength="127"\r\n\t\t\t\t\t\t\t\t\t#testoCausale>\r\n\t\t\t\t\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'causale\'].invalid">\r\n\t\t\t\t\t\t\t\t\t{{ msg.produceMessage(\'required\', form.controls[\'causale\']) | traduzione }}\r\n\t\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t\t<mat-hint *infoTip="\'dati-deposito-causale\'"></mat-hint>\r\n\t\t\t\t\t\t\t\t<mat-hint align="end">{{testoCausale.value.length}} / 127</mat-hint>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="row">\r\n\t\t\t\t\t\t<div class="col-md-4" *ngIf="visibilityMask.importo">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\t\t\tplaceholder="{{\'required\' | traduzione }}{{\'inserire-importo\' | traduzione}}"\r\n\t\t\t\t\t\t\t\t\tformControlName="importo">\r\n\t\t\t\t\t\t\t\t\t<span matPrefix>€</span>\r\n\t\t\t\t\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'importo\'].invalid">\r\n\t\t\t\t\t\t\t\t\t{{ msg.produceMessage(\'required\', form.controls[\'importo\']) | traduzione }}\r\n\t\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t\t<mat-hint *infoTip="\'inserire-importo\'"></mat-hint>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class="col-md-4" *ngIf="visibilityMask.codiceRtsInoltro">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'dati-deposito-rts-inoltro\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="rts-inoltro">\r\n\t\t\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t\t\t*ngFor="let rts of rts$ | async"\r\n\t\t\t\t\t\t\t\t\t\t[value]="rts.codiceFiscale"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{{ rts.denominazioneRTS }}\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\x3c!-- <mat-option\r\n\t\t\t\t\t\t\t\t\t\t*ngFor="let rts of listaRts"\r\n\t\t\t\t\t\t\t\t\t\t[value]="rts.codiceFiscale"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{{ rts.codiceFiscale }}\r\n\t\t\t\t\t\t\t\t</mat-option> --\x3e\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'rts-inoltro\'].invalid">\r\n\t\t\t\t\t\t\t\t\t{{ msg.produceMessage(\'required\', form.controls[\'rts-inoltro\']) | traduzione }}\r\n\t\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t\t<mat-hint *infoTip="\'dati-deposito-rts-inoltro\'"></mat-hint>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="row" *ngIf="visibilityMask.nota">\r\n\t\t\t\t\t\t<div class="col-md-12">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<textarea \r\n\t\t\t\t\t\t\t\t matInput\r\n\t\t\t\t\t\t\t\t\tplaceholder="{{ \'dati-deposito-nota\' | traduzione }}"\r\n\t\t\t\t\t\t\t\t\tformControlName="nota"\r\n\t\t\t\t\t\t\t\t\tmaxlength="511"\r\n\t\t\t\t\t\t\t\t\t#testo>\r\n\t\t\t\t\t\t\t\t</textarea>\r\n\t\t\t\t\t\t\t\t<mat-error *ngIf="form.touched && form.controls[\'nota\'].invalid">\r\n\t\t\t\t\t\t\t\t\t{{ msg.produceMessage(\'required\', form.controls[\'nota\']) | traduzione }}\r\n\t\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t\t<mat-hint *infoTip="\'dati-deposito-nota\'"></mat-hint>\r\n\t\t\t\t\t\t\t\t<mat-hint align="end">{{testo.value.length}} / 511</mat-hint>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</form>\r\n\t\t</mat-expansion-panel>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isFormValid()"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t\t(complete)="complete($event)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[".mat-card{border-radius:0!important;border-top:5px solid #0a2644}.divider{background-color:#737373;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-flex{background-color:#fff!important}.mat-select-value{max-width:100%;width:100%!important}"]}]}],Ei.ctorParameters=function(){return[{type:j},{type:e.ChangeDetectorRef},{type:wt}]},Ei.propDecorators={datiDeposito:[{type:e.Input}],visibilityMask:[{type:e.Input}],listaRts$:[{type:e.Input}],nextStep:[{type:e.Output}],previousStep:[{type:e.Output}],salvaBozza:[{type:e.Output}]};var Ai=function(){function t(){this.indiceSelezionato=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t}();Ai.decorators=[{type:e.Component,args:[{selector:"lib-tabella-documenti",template:'<mat-accordion displayMode="flat" multi class="mat-table">\r\n\t<section matSort class="mat-elevation-z2 mat-header-row">\r\n\t\t<div class="mat-header-cell" mat-sort-header="nrDocumento">{{\'nr-Documento\' | traduzione}}</div>\r\n\t\t<div class="mat-header-cell" mat-sort-header="tipoDocumento"> {{\'tipo-documento\' | traduzione}}</div>\r\n\t\t<div class="mat-header-cell" mat-sort-header="dataDocumento">{{\'data-documento\' | traduzione}}</div>\r\n\t\t<div class="mat-header-cell" mat-sort-header="fileName">{{\'file-name\' | traduzione}}</div>\r\n\t\t<div class="mat-header-cell" mat-sort-header="elimina"></div>\r\n\t</section>\r\n\r\n\t<mat-expansion-panel *ngFor="let file of files$ | async; let i=index">\r\n\t\t<mat-expansion-panel-header class="mat-row">\r\n\t\t\t<div class="mat-cell">{{file.numeroDocumento}}</div>\r\n\t\t\t<div class="mat-cell">{{file.tipoDocumento.descrizione}}</div>\r\n\t\t\t<div class="mat-cell">{{file.dataDocumento | date:\'dd/MM/yyyy\'}}</div>\r\n\t\t\t<div class="mat-cell">{{file.file.name}}</div>\r\n\t\t\t<div class="mat-cell">\r\n\t\t\t\t<button mat-flat-button\r\n\t\t\t\t\t\t\t\t(click)="indiceSelezionato.emit(i)"\r\n\t\t\t\t\t\t\t\t[attr.aria-label]="\'bt-elimina-documento\' | traduzione"\r\n\t\t\t\t\t\t\t\ttitle="{{\'bt-elimina-documento\' | traduzione}}">\r\n\t\t\t\t\t<span class="fas fa-trash-alt icon-color-primary font-weight-bold" aria-hidden="true"></span>\r\n\t\t\t\t\t<p class="sr-only">{{\'bt-elimina-documento\' | traduzione}}</p>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</mat-expansion-panel-header>\r\n\r\n\t\t<div class="mt-2">\r\n\t\t\t<span class="font-weight-bold">\r\n\t\t\t\t{{\'obbligatori\' | traduzione}}:\r\n\t\t\t</span>\r\n\t\t\t<mat-checkbox [checked]="file.tipoDocumento.codice != \'ALTRO\'" [disabled]="true"\r\n\t\t\t\t\t\t\t\t\t\tname="obbligatorio">\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\r\n\t\t<div>\r\n\t\t\t<span class="font-weight-bold">\r\n\t\t\t\t{{\'tipologia-emittente\' | traduzione}}:\r\n\t\t\t</span>\r\n\t\t\t<span class="ml-2">{{file.codiceTipoEmittente || \'\' | titlecase }}</span>\r\n\t\t</div>\r\n\r\n\t\t<div class="mt-2">\r\n\t\t\t<span class="font-weight-bold">\r\n\t\t\t\t{{\'organo-emittente\' | traduzione}}:\r\n\t\t\t</span>\r\n\t\t\t<span class="ml-2">{{file.soggettoEmittente}}</span>\r\n\t\t</div>\r\n\r\n\t\t<div class="mt-2">\r\n\t\t\t<span class="font-weight-bold">\r\n\t\t\t\t{{\'nota\' | traduzione}}:\r\n\t\t\t</span>\r\n\t\t\t<span class="ml-2">{{file.nota}}</span>\r\n\t\t</div>\r\n\r\n\t</mat-expansion-panel>\r\n</mat-accordion>\r\n',encapsulation:e.ViewEncapsulation.None,styles:['lib-tabella-documenti .mat-accordion .mat-header-row{background-color:#0a2644!important;border-bottom:none;padding-left:1.5rem;padding-right:2rem}lib-tabella-documenti .mat-expansion-panel-header.mat-row{border-bottom:none;margin-top:2px}lib-tabella-documenti .mat-table{display:block}lib-tabella-documenti .mat-header-row{min-height:56px}lib-tabella-documenti .mat-row{min-height:48px}lib-tabella-documenti .mat-header-row,lib-tabella-documenti .mat-row{align-items:center;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;display:flex;padding:0 24px}lib-tabella-documenti .mat-header-row:after,lib-tabella-documenti .mat-row:after{content:"";display:inline-block;min-height:inherit}lib-tabella-documenti .mat-cell,lib-tabella-documenti .mat-header-cell{flex:1;overflow:hidden;word-wrap:break-word}lib-tabella-documenti .mat-row{min-height:120px}lib-tabella-documenti mat-checkbox label{margin-bottom:.25rem!important}']}]}],Ai.ctorParameters=function(){return[]},Ai.propDecorators={files$:[{type:e.Input}],indiceSelezionato:[{type:e.Output}]};var Ni=function(){},Ti=function(){},$i=function(){function t(t,i,n){this.delegheService=t,this.modals=i,this.msg=n,this.nextStep=new e.EventEmitter,this.salvaBozza=new e.EventEmitter,this.previousStep=new e.EventEmitter,this.changesRicercaPG$=new o.Subject,this.changesRicercaPF$=new o.Subject,this.changesPersonaGiuridica$=new o.Subject,this.changesPersonaFisica$=new o.Subject,this.direction="both-ways",this.isFinal=!1,this.showComponentRicercaPF=!1,this.showComponentRicercaPG=!1,this.isSearching=!1}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({});var e=!0;this.nspg="nsRapprLegpg",this.altriSoggetti?this.formControlSoggetto?(this.personaGiuridica=this.altriSoggetti.personaGiuridica,this.personaGiuridica&&(this.showComponentRicercaPG=!0),this.personaFisica=this.altriSoggetti.personaFisica,this.personaFisica&&(this.showComponentRicercaPF=!0),"SOGGETTO_DA_IDENTIFICARE"===this.altriSoggetti.codiceTipoAltroSoggetto&&(this.altriSoggetti.codiceRegione="")):this.altriSoggetti.soggettoNonIdentificato||(this.personaFisica=this.mapperPersonaFisica(this.altriSoggetti)):(this.initAltriSoggetti(),e=!1),this.tipoSoggetto=new d.FormControl({value:this.altriSoggetti.codiceTipoAltroSoggetto,disabled:!1},[d.Validators.required]),this.form.addControl("tipoSoggetto",this.tipoSoggetto),this.soggettoNonIdentificato=new d.FormControl({value:this.altriSoggetti.soggettoNonIdentificato,disabled:!1}),this.form.addControl("soggettoNonIdentificato",this.soggettoNonIdentificato),this.namespaceInfoPf=this.namespace+"infoPF",this.formControlSoggetto||(this.altriSoggetti.soggettoNonIdentificato?this.showComponentRicercaPF=!1:this.showComponentRicercaPF=!0),this.checkSoggetto$=this.soggettoNonIdentificato.valueChanges.pipe(a.tap((function(e){e?(t.resetSoggetti(),t.showComponentRicercaPF=!1,t.isSearching=!1):(t.showComponentRicercaPF=!0,t.isSearching=!1)})),a.shareReplay());var i=this.checkSoggetto$.pipe(a.map((function(e){return t.changesPersonaFisica$.next(_.of(!0,(function(t){return function(t){}}))),_.of(!0,(function(t){return t.soggettoNonIdentificato=e}))})));this.tipoSoggetto$=this.tipoSoggetto.valueChanges.pipe(a.tap((function(e){"SOGGETTO_DA_IDENTIFICARE"!=e?(t.setSoggetto(e),t.isSearching=!1):(t.resetSoggetti(),t.showComponentRicercaPF=!1,t.showComponentRicercaPG=!1,t.isSearching=!1,t.resetValidation())})),a.shareReplay());var n=this.tipoSoggetto$.pipe(a.map((function(e){return _.of(t.tipoSoggetto.valid,(function(t){return t.codiceTipoAltroSoggetto=e}))})));K.reducer4(n,i,this.changesPersonaFisica$,this.changesPersonaGiuridica$,(function(e){var i;if(t.formControlSoggetto)switch(e.codiceTipoAltroSoggetto){case"PRESUNTO_BENEFICIARIO":case"AUTORITA_ORDINANTE":i=null!=e.idPersona&&t.tipoSoggetto.value;break;default:i=!0}else i=!!e.soggettoNonIdentificato||null!=e.idPersona;return i}),_.of(e,this.altriSoggetti)).subscribe((function(e){t.altriSoggetti=e.output,t.altriSoggetti.idPersona=e.output.idPersona,t.isFormValid=e.status}))},t.prototype.resetValidation=function(){this.changesPersonaFisica$.next(_.of(!0,(function(t){return function(t){}}))),this.changesPersonaGiuridica$.next(_.of(!0,(function(t){return function(t){}})))},t.prototype.initAltriSoggetti=function(){this.formControlSoggetto?this.altriSoggetti=new Ti:this.altriSoggetti=new Ni},t.prototype.viewPersona=function(){return this.formControlSoggetto?!this.tipoSoggetto.value||"SOGGETTO_DA_IDENTIFICARE"===this.tipoSoggetto.value:(this.checkSoggetto$.subscribe((function(e){t=e.valueOf()})),t);var t},t.prototype.setSoggetto=function(t){this.resetSoggetti(),this.isPersonaFisica(t)&&(this.showComponentRicercaPF=!0,this.showComponentRicercaPG=!1),this.isPersonaGiuridica(t)&&(this.showComponentRicercaPF=!1,this.showComponentRicercaPG=!0)},t.prototype.resetSoggetti=function(){this.altriSoggetti||this.initAltriSoggetti(),this.formControlSoggetto?(this.altriSoggetti.personaGiuridica=null,this.personaGiuridica=null,this.altriSoggetti.codiceRegione=""):(this.altriSoggetti.soggettoNonIdentificato=this.soggettoNonIdentificato.value,this.altriSoggetti.cognome=null,this.altriSoggetti.nome=null,this.altriSoggetti.codFiscale=null,this.altriSoggetti.comuneNascita=null,this.altriSoggetti.provinciaNascita=null,this.altriSoggetti.dataNascita=null),this.altriSoggetti.idPersona=null,this.altriSoggetti.personaFisica=null,this.personaFisica=null},t.prototype.isPersonaFisica=function(t){return"PRESUNTO_BENEFICIARIO"===t},t.prototype.isPersonaGiuridica=function(t){return"AUTORITA_ORDINANTE"===t},t.prototype.ricercaPFReady=function(t){var e=this;this.changesRicercaPF$.next(t.mapValue((function(t){return function(i){e.getPersonaFisica(t.id),e.formControlSoggetto||(i.soggettoNonIdentificato=!1),i.idPersona=t.id}})))},t.prototype.personaFisicaReady=function(t){var e=this;this.changesPersonaFisica$.next(t.mapValue((function(t){return function(i){var n,o,a,r,s,l,c=new bt;c.infoAnagrafiche=t.infoAnagrafiche,c.infoNascita=t.infoNascita,c.id=t.id,t.id&&(i.idPersona=t.id),i.personaFisica=c,e.formControlSoggetto||(e.soggettoNonIdentificato.value?i.soggettoNonIdentificato=e.soggettoNonIdentificato.value:i.soggettoNonIdentificato=!1,i.cognome=null===(n=null==t?void 0:t.infoAnagrafiche)||void 0===n?void 0:n.cognome,i.nome=null===(o=null==t?void 0:t.infoAnagrafiche)||void 0===o?void 0:o.nome,i.codFiscale=null===(a=null==t?void 0:t.infoAnagrafiche)||void 0===a?void 0:a.codFiscale,i.comuneNascita=null===(r=null==t?void 0:t.infoNascita)||void 0===r?void 0:r.comuneNascita,i.provinciaNascita=null===(s=null==t?void 0:t.infoNascita)||void 0===s?void 0:s.provinciaNascita,i.dataNascita=null===(l=null==t?void 0:t.infoNascita)||void 0===l?void 0:l.dataNascita)}})))},t.prototype.ricercaPGReady=function(t){var e=this;this.changesRicercaPG$.next(t.mapValue((function(t){return function(i){e.getPersonaGiuridica(t.datiPersonaGiuridica.id),i.idPersona=t.datiPersonaGiuridica.id}})))},t.prototype.personaGiuridicaReady=function(t){this.changesPersonaGiuridica$.next(t.mapValue((function(t){return function(e){var i,n,o,a=new Ft;a.codiceFiscale=t.codiceFiscale,a.ragioneSociale=t.ragioneSociale,a.partitaIVA=t.partitaIVA,a.idPersonaGiuridica=t.idPersonaGiuridica,e.idPersona=t.idPersonaGiuridica,e.personaGiuridica=a,null!=t.sedi&&(e.codiceRegione=null===(o=null===(n=null===(i=null==t?void 0:t.sedi[0])||void 0===i?void 0:i.indirizzo)||void 0===n?void 0:n.regione)||void 0===o?void 0:o.sigla)}})))},t.prototype.getPersonaFisica=function(t){var e=this;this.showComponentRicercaPF=!1,this.personaFisica$=this.delegheService.getPersona(t).pipe(a.shareReplay()),this.pfSubscription=this.personaFisica$.pipe().subscribe((function(i){var n,o;e.personaFisica=e.mapperPersonaFisica(i.datiPersonaFisica),e.altriSoggetti.codiceRegione=null===(o=null===(n=null==i?void 0:i.residenza)||void 0===n?void 0:n.regione)||void 0===o?void 0:o.sigla,e.altriSoggetti.idPersona=t,e.personaFisica&&setTimeout((function(){return e.showComponentRicercaPF=!0}),0),e.isSearching=!0}),(function(t){e.modals.failure(["recupero.datipersonafisica.failure"],[])}))},t.prototype.getPersonaGiuridica=function(t){var e=this;this.personaGiuridica$=this.delegheService.getDatiSocieta(t).pipe(a.shareReplay()),this.pgSubscription=this.personaGiuridica$.pipe().subscribe((function(i){if(e.mapperPersonaGiuridica(i),e.personaGiuridica=i,e.altriSoggetti.idPersona=t,e.showComponentRicercaPG=!1,e.isSearching=!0,null!=i.sedi){var n=i.sedi.filter((function(t){return"LEGALE"===t.tipoSede.codice}));e.altriSoggetti.codiceRegione=n[0].indirizzo.regione.sigla}}),(function(t){e.modals.failure(["recupero.datipersonagiuridica.failure"],[])}))},t.prototype.mapperPersonaFisica=function(t){var e=this,i=new bt,n=new mt;n.codFiscale=t.codFiscale,n.cognome=t.cognome,n.nome=t.nome,i.infoAnagrafiche=n,i.id=t.idPersona;var o=new ft;return o.comuneNascita=t.comuneNascita,o.provinciaNascita=t.provinciaNascita,o.dataNascita=t.dataNascita,i.infoNascita=o,this.altriSoggetti.personaFisica=i,setTimeout((function(){return e.showComponentRicercaPF=!0}),0),i},t.prototype.mapperPersonaGiuridica=function(t){this.altriSoggetti||this.initAltriSoggetti();var e=new Ft;e.codiceFiscale=t.datiPersonaGiuridica.codiceFiscale,e.ragioneSociale=t.datiPersonaGiuridica.ragioneSociale,e.partitaIVA=t.datiPersonaGiuridica.partitaIVA,this.altriSoggetti.personaGiuridica=e},t.prototype.enableSearch=function(){var t=this;this.resetSoggetti(),this.altriSoggetti.codiceTipoAltroSoggetto?(this.tipoSoggetto.setValue(this.altriSoggetti.codiceTipoAltroSoggetto),this.isPersonaFisica(this.altriSoggetti.codiceTipoAltroSoggetto)&&setTimeout((function(){return t.showComponentRicercaPF=!0}),0),this.isPersonaGiuridica(this.altriSoggetti.codiceTipoAltroSoggetto)&&setTimeout((function(){return t.showComponentRicercaPG=!0}),0)):(this.soggettoNonIdentificato.setValue(this.altriSoggetti.soggettoNonIdentificato),setTimeout((function(){return t.showComponentRicercaPF=!0}),0))},t.prototype.forward=function(t){this.nextStep.emit(this.altriSoggetti)},t.prototype.backward=function(t){this.previousStep.emit(this.altriSoggetti)},t.prototype.complete=function(t){},t.prototype.onSalvaBozza=function(t){this.salvaBozza.emit(this.altriSoggetti)},t.prototype.ngOnDestroy=function(){this.altriSoggettiChangedSub&&this.altriSoggettiChangedSub.unsubscribe()},t}();$i.decorators=[{type:e.Component,args:[{selector:"lib-altri-soggetti",template:'\x3c!-- <p>altri-soggetti works!</p> --\x3e\r\n<div class="mt-3 mb-5">\r\n\t<mat-expansion-panel class="panel" [expanded]="true">\r\n\t\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\r\n\t\t\t<mat-panel-title>\r\n\t\t\t\t\x3c!-- <h3>{{\'altri-soggetti\' | traduzione}}</h3> --\x3e\r\n\r\n\t\t\t\t<div *ngIf="!formControlSoggetto">\r\n\t\t\t\t\t<h3 class="h5 mb-0"><info-tip-label label="altri-soggetti"></info-tip-label></h3>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div *ngIf="formControlSoggetto">\r\n\t\t\t\t\t<h3 class="h5 mb-0"><info-tip-label label="altri-soggetti-interessati"></info-tip-label></h3>\r\n\t\t\t\t</div>\r\n\t\t\t</mat-panel-title>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<form [formGroup]="form">\r\n\t\t\t<div class="collapse-body mt-2">\r\n\t\t\t\t<div class="row">\r\n\t\t\t\t\t<div *ngIf="formControlSoggetto" class="col-md-4">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-label>{{\'required\'| traduzione}}{{\'soggetto\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t\t<mat-select placeholder="{{\'seleziona\' | traduzione}}" formControlName="tipoSoggetto">\r\n\t\t\t\t\t\t\t\t<mat-option *ngFor="let soggetto of tipologieSoggetto$ | async"\r\n\t\t\t\t\t\t\t\t\t[value]="soggetto.codice">\r\n\t\t\t\t\t\t\t\t\t{{soggetto.descrizione}}\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t<mat-error *ngIf="form.controls[\'tipoSoggetto\'].invalid">\r\n\t\t\t\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\', form.controls[\'tipoSoggetto\']) | traduzione}}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t<mat-hint *infoTip="\'soggetto\'"></mat-hint>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div *ngIf="!formControlSoggetto" class="col-md-4">\r\n\t\t\t\t\t\t<div class="row">\r\n\t\t\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\t\t\tformControlName="soggettoNonIdentificato">\r\n\t\t\t\t\t\t\t\t{{\'soggetto-non-identificato\' | traduzione }}\r\n\t\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t\t\t<mat-hint *infoTip="\'soggetto-non-identificato\'"></mat-hint>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="col-md-8">\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\t*ngIf="isSearching && !showComponentRicercaPF && !showComponentRicercaPG"\r\n\t\t\t\t\t\t\tmat-flat-button color="primary"\r\n\t\t\t\t\t\t\tclass="text-uppercase mb-2"\r\n\t\t\t\t\t\t\t(click)="enableSearch()"\r\n\t\t\t\t\t\t\t> {{\'ricerca\' | traduzione}}\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\x3c!-- TODO --\x3e\r\n\t\t\t\t\x3c!-- <lib-info-pf *ngIf="!viewPersona() " --\x3e\r\n\t\t\t\t\x3c!-- <lib-info-pf *ngIf="!(checkSoggetto$ | async)" --\x3e\r\n\t\t\t\t\x3c!-- <lib-info-pf *ngIf="!viewPersona()"\r\n\t\t\t\t\t[cfDifferentFrom]="cfDifferentFrom"\r\n\t\t\t\t\t[namespace]="namespaceInfoPf"\r\n\t\t\t\t\t(done)="infoPfReady2($event)"\r\n\t\t\t\t\t[infopf]="altriSoggetti"\r\n\t\t\t\t\t[readOnly]="false"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-info-pf> --\x3e\r\n\t\t\t\t<div class="mt-4"></div>\r\n\t\t\t\t\x3c!-- <lib-ricerca-pf\r\n\t\t\t\t\t*ngIf="showComponentRicercaPF"\r\n\t\t\t\t\t[namespace]="namespaceInfoPf"\r\n\t\t\t\t\t[readOnly]="false"\r\n\t\t\t\t\t(done)="ricercaPFReady($event)"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-ricerca-pf>\r\n\t\t\t\t<lib-info-pf\r\n\t\t\t\t\t*ngIf="personaFisica"\r\n\t\t\t\t\t[cfDifferentFrom]="cfDifferentFrom"\r\n\t\t\t\t\t[namespace]="namespaceInfoPf"\r\n\t\t\t\t\t[infopf]="altriSoggetti?.personaFisica?.infoAnagrafiche"\r\n\t\t\t\t\t[readOnly]="true"\r\n\t\t\t\t\t[validatorFormControl]="false"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-info-pf> --\x3e\r\n\t\t\t\t<lib-persona-fisica\r\n\t\t\t\t\t*ngIf="showComponentRicercaPF"\r\n\t\t\t\t\t(done)="personaFisicaReady($event)"\r\n\t\t\t\t\t[nazioni]="nazioni"\r\n\t\t\t\t\t[province]="province"\r\n\t\t\t\t\t[namespace]="namespaceInfoPf"\r\n\t\t\t\t\t[infoPersonaFisica]="altriSoggetti?.personaFisica"\r\n\t\t\t\t\t[idDelega]="null"\r\n\t\t\t\t\t[validatorFormControl]="true"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-persona-fisica>\r\n\t\t\t\t\x3c!-- <lib-ricerca-pg\r\n\t\t\t\t\t*ngIf="showComponentRicercaPG"\r\n\t\t\t\t\t[namespace]="nspg"\r\n\t\t\t\t\t[readOnly]="false"\r\n\t\t\t\t\t(done)="ricercaPGReady($event)"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-ricerca-pg>\r\n\t\t\t\t<lib-persona-giuridica\r\n\t\t\t\t\t*ngIf="personaGiuridica"\r\n\t\t\t\t\t[namespace]="nspg"\r\n\t\t\t\t\t[datisocieta]="altriSoggetti?.personaGiuridica"\r\n\t\t\t\t\t[idDelega]="altriSoggetti.idPersona"\r\n\t\t\t\t\t[validatorFormControl]="false"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-persona-giuridica> --\x3e\r\n\t\t\t\t\x3c!-- TODO --\x3e\r\n\t\t\t\t<lib-persona-giuridica\r\n\t\t\t\t\t*ngIf="showComponentRicercaPG"\r\n\t\t\t\t\t(done)="personaGiuridicaReady($event)"\r\n\t\t\t\t\t[namespace]="nspg"\r\n\t\t\t\t\t[datisocieta]="altriSoggetti?.personaGiuridica"\r\n\t\t\t\t\t[idDelega]="null"\r\n\t\t\t\t\t[validatorFormControl]="false"\r\n\t\t\t\t\t[gestioneSedi]="false"\r\n\t\t\t\t\t[couldBeDittaIndividuale]="false"\r\n\t\t\t\t>\r\n\t\t\t\t</lib-persona-giuridica>\r\n\t\t\t</div>\r\n\t\t</form>\r\n\t</mat-expansion-panel>\r\n\t<div class="mt-4"></div>\r\n\t<lib-stepper-navigator\r\n\t\t[form]="form"\r\n\t\t[direction]="direction"\r\n\t\t[isFinal]="isFinal"\r\n\t\t[isContainerValid]="isFormValid"\r\n\t\t(goForward)="forward($event)"\r\n\t\t(goBackward)="backward($event)"\r\n\t\t(salvaBozza)="onSalvaBozza($event)"\r\n\t\t(complete)="complete($event)"\r\n\t>\r\n\t</lib-stepper-navigator>\r\n</div>\r\n',styles:[""]}]}],$i.ctorParameters=function(){return[{type:wt},{type:Ae},{type:j}]},$i.propDecorators={altriSoggetti:[{type:e.Input}],tipologieSoggetto$:[{type:e.Input}],cfDifferentFrom:[{type:e.Input}],namespace:[{type:e.Input}],formControlSoggetto:[{type:e.Input}],province:[{type:e.Input}],nazioni:[{type:e.Input}],nextStep:[{type:e.Output}],salvaBozza:[{type:e.Output}],previousStep:[{type:e.Output}]};var Mi=function(){function t(){this.complete=new e.EventEmitter,this.goBackward=new e.EventEmitter,this.goForward=new e.EventEmitter,this.salvaBozza=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.canGoForWard=function(){var t=!1;return"only-forward"!==this.direction&&"both-ways"!==this.direction||(t=!0),t},t.prototype.canGoBackWard=function(){var t=!1;return"only-backward"!==this.direction&&"both-ways"!==this.direction||(t=!0),t},t.prototype.canComplete=function(){var t=!1;return this.isFinal&&this.isContainerValid&&(t=!0),t},t.prototype.onComplete=function(){this.complete.emit()},t.prototype.onForward=function(){this.goForward.emit()},t.prototype.onBackward=function(){this.goBackward.emit()},t.prototype.onSalvaBozza=function(){this.salvaBozza.emit()},t}();Mi.decorators=[{type:e.Component,args:[{selector:"lib-stepper-navigator",template:'<div class="row mt-4">\r\n<div class="col-6">\r\n\t<button *ngIf="canGoBackWard()" mat-stroked-button (click)="onBackward()" color="primary">\r\n\t\t{{\'indietro\' | traduzione }}\r\n\t</button>\r\n</div>\r\n<div class="col-6 text-right">\r\n\t<button class="ml-2" *ngIf="isContainerValid" mat-raised-button (click)="onSalvaBozza()" color="primary">\r\n\t\t{{ \'salva-bozza\' | traduzione }}\r\n\t</button>\r\n\t<button class="ml-2" *ngIf="canGoForWard() && isContainerValid" mat-raised-button (click)="onForward()"\r\n\t\tcolor="primary">\r\n\t\t{{\'avanti\' | traduzione }}\r\n\t</button>\r\n\t<button class="ml-2" *ngIf="canComplete()" mat-raised-button color="primary" (click)="onComplete()">\r\n\t\t{{\'invia\' | traduzione }}\r\n\t</button>\r\n\t</div>\r\n</div>',styles:[""]}]}],Mi.ctorParameters=function(){return[]},Mi.propDecorators={direction:[{type:e.Input}],isFinal:[{type:e.Input}],form:[{type:e.Input}],isContainerValid:[{type:e.Input}],complete:[{type:e.Output}],goBackward:[{type:e.Output}],goForward:[{type:e.Output}],salvaBozza:[{type:e.Output}]};var Oi=function(){function t(t){this.delegheService=t,this.done=new e.EventEmitter,this.resetForm=new o.Subject,this.codiceFiscale="",this.cognome="",this.nome="",this.offset=0,this.pageNumber=0,this.pageSize=5,this.paged=!0,this.viewIntPf=!1,this.viewResultTable=!1,this.resLenPf=0,this.validationFormPF=!1,this.displayedColumns=["codiceFiscale","nome","cognome","seleziona"]}return t.prototype.ngOnInit=function(){},t.prototype.infoPfReady=function(t){this.validationFormPF=t.status,null!=t.output.codFiscale&&(this.codiceFiscale=null==t?void 0:t.output.codFiscale.toUpperCase().trim()),null!=t.output.cognome&&(this.cognome=null==t?void 0:t.output.cognome.toUpperCase().trim()),null!=t.output.nome&&(this.nome=null==t?void 0:t.output.nome.toUpperCase().trim())},t.prototype.getListaPf=function(){var t=this;this.listaPf="",this.dataSource=new p.MatTableDataSource(this.listaPf);var e=new gt;e.codiceFiscale=this.codiceFiscale,e.cognome=this.cognome,e.nome=this.nome,""!=e.codiceFiscale&&""==e.cognome&&""==e.nome?(console.log("[Ricerca Anagrafe Tributaria]"),this.delegheService.getPersonaFiscaleCodiceFiscale(e.codiceFiscale).pipe().subscribe((function(e){console.log("[pg]",e),t.listaPf=e,console.log("[listaPf]",t.listaPf),t.listaPf?(t.showNoResults=!1,t.viewIntPf=!0,t.viewResultTable=!0,t.dataSource=new p.MatTableDataSource([t.listaPf]),t.resLenPf=1):(t.showNoResults=!0,t.viewIntPf=!1,t.viewResultTable=!1,t.resLenPf=0)}),(function(e){t.showNoResults=!0,t.viewIntPf=!1,t.viewResultTable=!1,t.resLenPf=0}))):(console.log("[Ricerca Sul Portale]"),this.personaFisica$=this.delegheService.getListaPfPaged(this.pageSize,this.pageNumber,e).pipe(a.shareReplay()),this.pfSubscription=this.personaFisica$.pipe().subscribe((function(e){console.log("[pf]",e),t.listaPf=e,t.listaPf?(t.showNoResults=!1,t.viewIntPf=!0,t.viewResultTable=!0,t.dataSource=new p.MatTableDataSource(t.listaPf.content),t.dataSource.paginator=t.paginator,t.resLenPf=e.content.length):(t.viewIntPf=!1,t.viewResultTable=!1,t.showNoResults=!0,t.resLenPf=0)}),(function(e){t.viewIntPf=!1,t.viewResultTable=!1,t.showNoResults=!0,t.resLenPf=0})))},t.prototype.pulisciForm=function(){this.resetForm.next(!0),this.viewResultTable=!1,this.dataSource=new p.MatTableDataSource(null),this.viewIntPf=!1},t.prototype.areSearchParameterValid=function(){return this.validationFormPF&&(""!=this.codiceFiscale||""!=this.cognome||""!=this.nome)},t.prototype.personaFisicaSelected=function(t){this.done.emit(_.of(!0,t.datiPersonaFisica))},t}();Oi.decorators=[{type:e.Component,args:[{selector:"lib-ricerca-pf",template:'\x3c!-- <p>ricerca-pf works!</p> --\x3e\r\n\x3c!-- <div class="row">\r\n\t<div class="col-12">\r\n\t\t<p class="h6"> {{\'ricerca-nel-portale-dag\' | traduzione}} </p>\r\n\t</div>\r\n</div> --\x3e\r\n<div class="row">\r\n\t<div class="col-12">\r\n\t\t<p class="mt-3">{{\'spiegazione\' | traduzione }}</p>\r\n\t</div>\r\n</div>\r\n\x3c!-- <lib-info-pf\r\n\t[namespace]="namespace"\r\n\t(done)="infoPfReady($event)"\r\n\t[readOnly]="false"\r\n\t[resetForm]="resetForm"\r\n\t[validatorFormControl]="false"\r\n>\r\n</lib-info-pf> --\x3e\r\n<lib-pf\r\n\t(done)="infoPfReady($event)"\r\n\t[resetForm]="resetForm"\r\n>\r\n</lib-pf>\r\n<div class="col-12">\r\n\t<div class="float-right mt-4">\r\n\t\t<button \r\n\t\t\t(click)="pulisciForm();"\r\n\t\t\tmat-stroked-button color="primary"\r\n\t\t\tclass="mr-3"\r\n\t\t\t[disabled]="!areSearchParameterValid()"\r\n\t\t> {{\'pulisci\' | traduzione | uppercase}}\r\n\t\t</button>\r\n\t\t<button\r\n\t\t\t(click)="getListaPf();"\r\n\t\t\tmat-flat-button color="primary"\r\n\t\t\t[disabled]="!areSearchParameterValid()"\r\n\t\t> {{\'ricerca\' | traduzione | uppercase}}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n<br>\r\n<br>\r\n<div class="col-12">\r\n\t<ng-container>\r\n\t\t<div class="col-md-12 mt-3">\r\n\t\t\t<div *ngIf="showNoResults">\r\n\t\t\t\t<p>\r\n\t\t\t\t{{\'nessuno-risultato\' | traduzione}}\r\n\t\t\t\t</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf="viewIntPf" class="mb-5">\r\n\t\t\t<div class="col-md-12 mt-3">\r\n\t\t\t\t<mat-chip-list>\r\n\t\t\t\t\t<p class="mr-3 mb-0">{{\'totale-risultati\' | traduzione }} : {{resLenPf}}</p>\r\n\t\t\t\t</mat-chip-list>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div [hidden]="!viewResultTable">\r\n\t\t\t<mat-table\r\n\t\t\t\tmat-table\r\n\t\t\t\t[dataSource]="dataSource"\r\n\t\t\t\tclass="mat-elevation-z8 mt-3 border">\r\n\r\n\t\t\t\t\x3c!-- Codice Fiscale Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="codiceFiscale">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'codice-fiscale\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaFisica.codiceFiscale}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Nome Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="nome">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'nome\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaFisica.nome}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Cognome Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="cognome">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'cognome\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaFisica.cognome}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t\r\n\t\t\t\t\x3c!-- Selezione Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="seleziona">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'seleziona\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> \r\n\t\t\t\t\t\t<button (click)="personaFisicaSelected(element)" mat-flat-button color="primary">\r\n\t\t\t\t\t\t\t{{\'seleziona\' | traduzione}}\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>\r\n\t\t\t\t<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>\r\n\r\n\t\t\t</mat-table>\r\n\t\t\t<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</div>',styles:[".mat-paginator{background:#fff}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{color:rgba(0,0,0,.54)}.mat-paginator-decrement,.mat-paginator-increment{border-right:2px solid rgba(0,0,0,.54);border-top:2px solid rgba(0,0,0,.54)}.mat-paginator-first,.mat-paginator-last{border-top:2px solid rgba(0,0,0,.54)}.mat-icon-button[disabled] .mat-paginator-decrement,.mat-icon-button[disabled] .mat-paginator-first,.mat-icon-button[disabled] .mat-paginator-increment,.mat-icon-button[disabled] .mat-paginator-last{border-color:rgba(0,0,0,.38)}"]}]}],Oi.ctorParameters=function(){return[{type:wt}]},Oi.propDecorators={namespace:[{type:e.Input}],readOnly:[{type:e.Input}],done:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[y.MatPaginator,{static:!0}]}]};var Gi=function(){function t(t){this.delegheService=t,this.showRagioneSociale=!0,this.showPartitaIVA=!0,this.done=new e.EventEmitter,this.resetForm=new o.Subject,this.codiceFiscale="",this.ragioneSociale="",this.partitaIVA="",this.offset=0,this.pageNumber=0,this.pageSize=5,this.paged=!0,this.viewIntPg=!1,this.viewResultTable=!1,this.resLenPg=0,this.validationFormPG=!1,this.displayedColumns=["ragioneSociale","pIva","codFiscale","seleziona"]}return t.prototype.ngOnInit=function(){},t.prototype.personaGiuridicaReady=function(t){var e,i;this.validationFormPG=t.status,null!=t.output.codiceFiscale&&(this.codiceFiscale=null==t?void 0:t.output.codiceFiscale.toUpperCase().trim()),null!=(null===(e=t.output)||void 0===e?void 0:e.ragioneSociale)&&(this.ragioneSociale=null==t?void 0:t.output.ragioneSociale.toUpperCase().trim()),null!=(null===(i=t.output)||void 0===i?void 0:i.partitaIVA)&&(this.partitaIVA=null==t?void 0:t.output.partitaIVA.toUpperCase().trim())},t.prototype.getListaPg=function(){var t=this;this.listaPg="",this.dataSource=new p.MatTableDataSource(this.listaPg);var e=new Ft;e.codiceFiscale=this.codiceFiscale,e.ragioneSociale=this.ragioneSociale,e.partitaIVA=this.partitaIVA,""!=e.codiceFiscale&&""==e.partitaIVA&&""==e.ragioneSociale?(console.log("[Ricerca Anagrafe Tributaria]"),this.delegheService.getPersonaGiuridicaCodiceFiscale(e.codiceFiscale).pipe().subscribe((function(e){console.log("[pg]",e),t.listaPg=e,t.listaPg?(t.showNoResults=!1,t.viewIntPg=!0,t.viewResultTable=!0,t.dataSource=new p.MatTableDataSource([t.listaPg]),t.resLenPg=1):(t.showNoResults=!0,t.viewIntPg=!1,t.viewResultTable=!1,t.resLenPg=0)}),(function(e){t.showNoResults=!0,t.viewIntPg=!1,t.viewResultTable=!1,t.resLenPg=0}))):(console.log("[Ricerca Sul Portale]"),this.delegheService.getListaPgPaged(this.pageSize,this.pageNumber,e).subscribe((function(e){console.log("[pg]",e),t.listaPg=e,t.listaPg?(t.showNoResults=!1,t.viewIntPg=!0,t.viewResultTable=!0,t.dataSource=new p.MatTableDataSource(t.listaPg.content),t.dataSource.paginator=t.paginator,t.resLenPg=e.content.length):(t.showNoResults=!0,t.viewIntPg=!1,t.viewResultTable=!1,t.resLenPg=0)}),(function(e){t.showNoResults=!0,t.viewIntPg=!1,t.viewResultTable=!1,t.resLenPg=0})))},t.prototype.pulisciForm=function(){this.resetForm.next(!0),this.viewResultTable=!1,this.dataSource=new p.MatTableDataSource(null),this.viewIntPg=!1},t.prototype.areSearchParameterValid=function(){return this.validationFormPG&&(""!=this.codiceFiscale||""!=this.ragioneSociale||""!=this.partitaIVA)},t.prototype.personaGiuridicaSelected=function(t){this.done.emit(_.of(!0,t))},t}();Gi.decorators=[{type:e.Component,args:[{selector:"lib-ricerca-pg",template:'\x3c!-- <p>ricerca-pg works!</p> --\x3e\r\n\x3c!-- <div class="row">\r\n\t<div class="col-12">\r\n\t\t<p class="h6"> {{\'ricerca-nel-portale-dag\' | traduzione}} </p>\r\n\t</div>\r\n</div> --\x3e\r\n\x3c!-- <div class="row">\r\n\t<div class="col-12">\r\n\t\t<p class="mt-3">{{\'spiegazione\' | traduzione }}</p>\r\n\t</div>\r\n</div> --\x3e\r\n\x3c!-- <lib-persona-giuridica\r\n\t(done)="personaGiuridicaReady($event)"\r\n\t[namespace]="namespace"\r\n\t[resetForm]="resetForm"\r\n\t[validatorFormControl]="false"\r\n>\r\n</lib-persona-giuridica> --\x3e\r\n<lib-pg\r\n\t(done)="personaGiuridicaReady($event)"\r\n\t[resetForm]="resetForm"\r\n\t[showPartitaIVA]="showPartitaIVA"\r\n\t[showRagioneSociale]="showRagioneSociale"\r\n>\r\n</lib-pg>\r\n<div class="col-12">\r\n\t<div class="float-right mt-4">\r\n\t\t<button\r\n\t\t\t(click)="pulisciForm();"\r\n\t\t\tmat-stroked-button color="primary"\r\n\t\t\tclass="mr-3"\r\n\t\t\t[disabled]="!areSearchParameterValid()"\r\n\t\t> {{\'pulisci\' | traduzione | uppercase}}\r\n\t\t</button>\r\n\t\t<button\r\n\t\t\t(click)="getListaPg();"\r\n\t\t\tmat-flat-button color="primary"\r\n\t\t\t[disabled]="!areSearchParameterValid()"\r\n\t\t>{{\'ricerca\' | traduzione | uppercase}}\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n<br>\r\n<br>\r\n<div class="col-12">\r\n\t<ng-container>\r\n\t\t<div class="col-md-12 mt-3">\r\n\t\t\t<div *ngIf="showNoResults">\r\n\t\t\t\t<p>\r\n\t\t\t\t\t{{\'nessuno-risultato\' | traduzione}}\r\n\t\t\t\t</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf="viewIntPg" class="mb-5">\r\n\t\t\t<div class="col-md-12 mt-3">\r\n\t\t\t\t<mat-chip-list>\r\n\t\t\t\t\t<p class="mr-3 mb-0">{{\'totale-risultati\' | traduzione }} : {{resLenPg}}</p>\r\n\t\t\t\t</mat-chip-list>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div [hidden]="!viewResultTable">\r\n\t\t\t<mat-table mat-table [dataSource]="dataSource" class="mat-elevation-z8 mt-3 border">\r\n\r\n\t\t\t\t\x3c!-- Ragione Sociale Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="ragioneSociale">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'ragione-sociale\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaGiuridica.ragioneSociale}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- PIVA Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="pIva">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'pIva\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaGiuridica.partitaIVA}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Codice Fiscale Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="codFiscale">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'codice-fiscale\' | traduzione }} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element"> {{element.datiPersonaGiuridica.codiceFiscale}} </mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\x3c!-- Selezione Column --\x3e\r\n\t\t\t\t<ng-container matColumnDef="seleziona">\r\n\t\t\t\t\t<mat-header-cell *matHeaderCellDef> {{\'seleziona\' | traduzione}} </mat-header-cell>\r\n\t\t\t\t\t<mat-cell *matCellDef="let element">\r\n\t\t\t\t\t\t<button (click)="personaGiuridicaSelected(element)" mat-flat-button color="primary">\r\n\t\t\t\t\t\t\t{{\'seleziona\' | traduzione}}\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</mat-cell>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>\r\n\t\t\t\t<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>\r\n\r\n\t\t\t</mat-table>\r\n\t\t\t<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</div>\r\n',styles:[".mat-header-cell{background-color:#dce9f5;color:#092644!important;font-weight:600}.mat-paginator{background:#fff}.mat-paginator,.mat-paginator-page-size .mat-select-trigger{color:rgba(0,0,0,.54)}.mat-paginator-decrement,.mat-paginator-increment{border-right:2px solid rgba(0,0,0,.54);border-top:2px solid rgba(0,0,0,.54)}.mat-paginator-first,.mat-paginator-last{border-top:2px solid rgba(0,0,0,.54)}.mat-icon-button[disabled] .mat-paginator-decrement,.mat-icon-button[disabled] .mat-paginator-first,.mat-icon-button[disabled] .mat-paginator-increment,.mat-icon-button[disabled] .mat-paginator-last{border-color:rgba(0,0,0,.38)}"]}]}],Gi.ctorParameters=function(){return[{type:wt}]},Gi.propDecorators={namespace:[{type:e.Input}],readOnly:[{type:e.Input}],showRagioneSociale:[{type:e.Input}],showPartitaIVA:[{type:e.Input}],done:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[y.MatPaginator,{static:!0}]}]};var ki=function(){function t(t){this.msg=t,this.showRagioneSociale=!0,this.showPartitaIVA=!0,this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.resetForm&&(this.subscription=this.resetForm.subscribe((function(e){return e?t.pulisciForm():""})));var e=new d.FormControl({value:"",disabled:!1},[Oe.pattern(Oe._codiceFiscalePiva,"cfInvalidoFormalmente")]);if(this.form.addControl("codiceFiscale",e),this.showRagioneSociale){var i=new d.FormControl({value:"",disabled:!1});this.form.addControl("ragioneSociale",i)}if(this.showPartitaIVA){var n=new d.FormControl({value:"",disabled:!1},[Oe.pattern(Oe.partitaIva,"partitaIVAInvalida")]);this.form.addControl("partitaIVA",n)}var o=this.form.valueChanges.pipe(a.map((function(e){var i,n,o=new Ft;return o.codiceFiscale=t.form.controls.codiceFiscale.value,o.ragioneSociale=null===(i=t.form.controls.ragioneSociale)||void 0===i?void 0:i.value,o.partitaIVA=null===(n=t.form.controls.partitaIVA)||void 0===n?void 0:n.value,_.of(t.form.valid,o)})));this.form.setValidators((function(e){return e.get("codiceFiscale").value||!t.showPartitaIVA||e.get("partitaIVA").value?null:{requiredPG:!0}})),this.subscription=o.subscribe((function(e){return t.done.emit(e)}))},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.pulisciForm=function(){var t=this;Object.keys(this.form.value).forEach((function(e){t.form.get(e).setValue("")}))},t}();ki.decorators=[{type:e.Component,args:[{selector:"lib-pg",template:"<div [formGroup]=\"form\">\r\n\t<div class=\"row\">\r\n\t\t<div class=\"col-md-4\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}} {{'codice-fiscale' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{'codice-fiscale' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"codiceFiscale\" maxlength=\"16\" >\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['codiceFiscale'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('codiceFiscaleInvalido', form.controls[ 'codiceFiscale']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'codice-fiscale'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"col-md-4\" *ngIf=\"showRagioneSociale\">\r\n <mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}}{{'ragione-sociale' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{'ragione-sociale' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"ragioneSociale\">\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['ragioneSociale'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('obbligatorio', form.controls['ragioneSociale']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'ragione-sociale'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"col-md-4\" *ngIf=\"showPartitaIVA\">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder=\"{{'required' | traduzione}}{{'partita-iva' | traduzione}}\" --\x3e\r\n\t\t\t\t<input matInput placeholder=\"{{'partita-iva' | traduzione}}\"\r\n\t\t\t\t\tformControlName=\"partitaIVA\">\r\n\t\t\t\t<mat-error *ngIf=\"form.controls['partitaIVA'].invalid\">\r\n\t\t\t\t\t{{msg.produceMessage('partitaIVAInvalida', form.controls['partitaIVA']) | traduzione }}\r\n\t\t\t\t\t\x3c!-- {{msg.produceMessage('partitaIVAMaxLen2', form.controls['partitaIVA']) | traduzione }} --\x3e\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip=\"'partita-iva'\"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n <div class=\"col-md-12\">\r\n <mat-error *ngIf=\"form.getError('requiredPG')\">\r\n {{msg.produceMessage('requiredPG', form) | traduzione }}\r\n </mat-error>\r\n </div>\r\n\t</div>\r\n</div>\r\n",styles:[""]}]}],ki.ctorParameters=function(){return[{type:j}]},ki.propDecorators={resetForm:[{type:e.Input}],showRagioneSociale:[{type:e.Input}],showPartitaIVA:[{type:e.Input}],done:[{type:e.Output}]};var Li=function(){function t(t){this.msg=t,this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.form=new d.FormGroup({}),this.resetForm&&(this.subscription=this.resetForm.subscribe((function(e){return e?t.pulisciForm():""})));var e=new d.FormControl({value:"",disabled:!1},[Oe.pattern(Oe.codiceFiscale,"cfInvalidoFormalmente")]);this.form.addControl("codiceFiscale",e);var i=new d.FormControl({value:"",disabled:!1},[Oe.pattern(Oe.formatoName,"formatoName")]);this.form.addControl("nome",i);var n=new d.FormControl({value:"",disabled:!1},[Oe.pattern(Oe.formatoName,"formatoName")]);this.form.addControl("cognome",n);var o=this.form.valueChanges.pipe(a.map((function(e){var i=new mt;return i.codFiscale=t.form.controls.codiceFiscale.value,i.nome=t.form.controls.nome.value,i.cognome=t.form.controls.cognome.value,_.of(t.form.valid,i)})));this.form.setValidators((function(t){return t.get("codiceFiscale").value||t.get("cognome").value||t.get("nome").value?null:{requiredPF:!0}})),this.subscription=o.subscribe((function(e){return t.done.emit(e)}))},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.pulisciForm=function(){var t=this;Object.keys(this.form.value).forEach((function(e){t.form.get(e).setValue("")}))},t}();Li.decorators=[{type:e.Component,args:[{selector:"lib-pf",template:'<form [formGroup]="form">\r\n\t<div class="row my-2">\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}}{{\'codice-fiscale\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput placeholder="{{\'codice-fiscale\' | traduzione}}"\r\n\t\t\t\t\tformControlName="codiceFiscale" maxlength="16">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'codiceFiscale\'].invalid">\r\n\t\t\t\t\t{{msg.produceCFMessage(form.controls[\'codiceFiscale\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-md-4">\r\n <mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}}{{\'cognome\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput placeholder="{{\'cognome\' | traduzione}}"\r\n\t\t\t\t\tformControlName="cognome">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'cognome\'].invalid">\r\n\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\',form.controls[\'cognome\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-md-4">\r\n <mat-form-field>\r\n\t\t\t\t\x3c!-- <input matInput placeholder="{{\'required\' | traduzione}}{{\'nome\' | traduzione}}" --\x3e\r\n\t\t\t\t<input matInput placeholder="{{\'nome\' | traduzione}}"\r\n\t\t\t\t\tformControlName="nome">\r\n\t\t\t\t<mat-error *ngIf="form.controls[\'nome\'].invalid">\r\n\t\t\t\t\t{{msg.produceMessage(\'obbligatorio\',form.controls[\'nome\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n <div class="col-md-12">\r\n <mat-error *ngIf="form.getError(\'requiredPF\')">\r\n {{msg.produceMessage(\'requiredPF\', form) | traduzione }}\r\n </mat-error>\r\n </div>\r\n\t</div>\r\n</form>',styles:[""]}]}],Li.ctorParameters=function(){return[{type:j}]},Li.propDecorators={resetForm:[{type:e.Input}],done:[{type:e.Output}]};var qi=function(){function t(t){this.ref=t,this.showLargeHeader=!0,this.displayedColumns=["tipo","indirizzo","seleziona"],this.done=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.valid=!1,this.selection=new u.SelectionModel(!1,[]),this.form=new d.FormGroup({}),this.selected=new d.FormControl({value:"",disabled:!1}),this.form.addControl("selected",this.selected);var e=this.selection.changed.pipe(a.map((function(e){return t.validazioneeSede=e.added.length>0,_.of(t.validazioneeSede,e.added)})),a.tap((function(t){return console.log("changeSelection",t)})));this.dataSource$=this.sedi$.pipe(a.tap((function(e){t.selected.setValue(""),t.selection.clear()})),a.map((function(t){return new p.MatTableDataSource(t)})),a.tap((function(t){return console.log("dataSource",t.data)})),a.tap((function(e){t.idSedeSelezionata&&t.initialSelection(e.data),t.ref.detectChanges()}))),e.subscribe((function(e){return t.done.emit(e)}))},t.prototype.initialSelection=function(t){var e=this;this.idSedeSelezionata&&setTimeout((function(){t.forEach((function(t){t.id==e.idSedeSelezionata&&e.selection.select(t)}))}),0)},t}();qi.decorators=[{type:e.Component,args:[{selector:"lib-tabella-sedi",template:'<ng-container *ngIf="dataSource$ | async as dataSource" [formGroup]="form">\r\n\r\n <h4 *ngIf="showLargeHeader" class="border-bottom font-weight-bold mt-4 h5"><info-tip-label label="sedi"></info-tip-label></h4>\r\n\r\n <h5 *ngIf="!showLargeHeader" class="border-bottom font-weight-bold mt-4" style="font-family: \'Roboto\', Helvetica Neue, Arial, Noto Sans, sans-serif !important;font-size: 1rem;"><info-tip-label label="sedi"></info-tip-label></h5>\r\n\r\n <mat-table *ngIf="dataSource.data.length > 0" [dataSource]="dataSource" class="mat-elevation-z8 mt-3 border">\r\n\r\n \x3c!-- Tipo Column --\x3e\r\n <ng-container matColumnDef="tipo">\r\n <mat-header-cell *matHeaderCellDef> {{\'tipo\' | traduzione}} </mat-header-cell>\r\n <mat-cell *matCellDef="let element"> {{element.tipoSede.descrizione}} </mat-cell>\r\n <mat-hint *infoTip="\'tipo\'"></mat-hint>\r\n </ng-container>\r\n\r\n \x3c!-- Indirizzo Column --\x3e\r\n <ng-container matColumnDef="indirizzo">\r\n <mat-header-cell *matHeaderCellDef> {{\'indirizzo\' | traduzione}} </mat-header-cell>\r\n <mat-cell *matCellDef="let element">\r\n <span *ngIf="!element?.indirizzo?.estero"> {{element?.indirizzo?.indirizzo}}\r\n {{element?.indirizzo?.civico}} {{element?.indirizzo?.cap}} -\r\n {{element?.indirizzo?.comune?.denominazione}}\r\n {{element?.indirizzo?.provincia?.denominazione}}</span>\r\n <span *ngIf="element?.indirizzo?.estero"> {{element?.indirizzo?.nazione?.denominazione}} -\r\n {{element?.indirizzo?.indirizzo}} </span>\r\n </mat-cell>\r\n <mat-hint *infoTip="\'indirizzo\'"></mat-hint>\r\n </ng-container>\r\n\r\n \x3c!-- Selezione Column --\x3e\r\n <ng-container matColumnDef="seleziona">\r\n <mat-header-cell *matHeaderCellDef> {{\'seleziona\' | traduzione}}\r\n </mat-header-cell>\r\n <mat-cell *matCellDef="let row">\r\n <mat-checkbox\r\n (click)="$event.stopPropagation()"\r\n (change)="$event ? selection.toggle(row) : null"\r\n [checked]="selection.isSelected(row)"\r\n formControlName="selected"\r\n [disabled]="disabled">\r\n </mat-checkbox>\r\n </mat-cell>\r\n <mat-hint *infoTip="\'seleziona\'"></mat-hint>\r\n </ng-container>\r\n\r\n <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>\r\n <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>\r\n\r\n </mat-table>\r\n <ng-container *ngIf="dataSource.data.length > 0; else nessunaSede">\r\n <div class="collapse-body mt-2">\r\n <div class="col-md-12">\r\n <mat-error *ngIf="!validazioneeSede">\r\n {{\'requiredSede\' | traduzione }}\r\n </mat-error>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #nessunaSede>\r\n <mat-error>\r\n {{\'nessunaSede\' | traduzione }}\r\n </mat-error>\r\n </ng-template>\r\n\r\n</ng-container>\r\n',styles:[""]}]}],qi.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},qi.propDecorators={sedi$:[{type:e.Input}],idSedeSelezionata:[{type:e.Input}],disabled:[{type:e.Input}],showLargeHeader:[{type:e.Input}],done:[{type:e.Output}]};var _i=function(){};_i.decorators=[{type:e.Component,args:[{selector:"info-tip-label",template:'<ng-container *infoTip="label; showIcon: true"></ng-container>'}]}],_i.propDecorators={label:[{type:e.Input}]};var Bi=function(){};Bi.decorators=[{type:e.Component,args:[{exportAs:"dag-info-tip-wrapper",template:'<ng-container *ngIf="(showIcon || false); else noIcon">\r\n\t<ng-container *ngIf="(info$ | async) as tip; else noTip">\r\n\t\t\x3c!-- {{tip.tipoLabel == "CAMPO" && "SEZIONE_PAGINA" ? \'\': tip.label}} --\x3e\r\n\t\t{{ tip.label }}\r\n\t\t\x3c!-- OLD\r\n\t\t<button class="dag-info-label mat-flat-button bg-transparent px-0">\r\n\t\t\t<span class="fas fa-info-circle icon-color-primary ml-1"\r\n\t\t\t\t[matTooltip]="tip.tooltip || tip.label"\r\n\t\t\t><p class="sr-only">{{ tip.tooltip }}</p></span>\r\n\t\t</button> --\x3e\r\n\t\t<button class="dag-info-label mat-flat-button bg-transparent px-0"\r\n\t\t\t[matTooltip]="tip.tooltip || tip.label"\r\n\t\t\taria-label="{{tip.tooltip}}">\r\n\t\t\t<span class="fas fa-info-circle icon-color-primary ml-1">\r\n\t\t\t\t<p class="sr-only">{{ tip.tooltip }}</p>\r\n\t\t\t</span>\r\n\t\t</button>\r\n\t</ng-container>\r\n\t<ng-template #noTip>\r\n\t\t<span class="dag-info-label">\r\n\t\t\t{{ elseLabel }}\r\n\t\t\t<span\r\n\t\t\t\tclass="dag-info-tip ml-1"\r\n\t\t\t\t[matTooltip]="elseLabel"\r\n\t\t\t></span>\r\n\t\t</span>\r\n\t</ng-template>\r\n</ng-container>\r\n<ng-template #noIcon>\r\n\t<ng-container *ngIf="(info$ | async) as tip">\r\n\t\t{{ tip.tooltip }}\r\n\t</ng-container>\r\n</ng-template>\r\n',styles:['span.dag-info-tip:after{--color:#06f;--size:1rem;border:1px solid var(--color);border-color:var(--color);border-radius:var(--size);color:var(--color);content:"i";cursor:help;display:inline-block;font-size:var(--size);font-weight:700;height:var(--size);line-height:var(--size);text-align:center;vertical-align:middle;width:var(--size)}.dag-info-label{min-width:15px!important}']}]}],Bi.propDecorators={info$:[{type:e.Input}],elseLabel:[{type:e.Input}],showIcon:[{type:e.Input}]};var ji=function(){function t(t,e,i,n){this.infoTipService=t,this.templateRef=e,this.viewContainer=i,this.componentFactoryResolver=n}return t.prototype.ngOnInit=function(){var t=this.viewContainer.createEmbeddedView(this.templateRef);t.detach(),this.wrapperRef=this.viewContainer.createComponent(this.componentFactoryResolver.resolveComponentFactory(Bi)),this.wrapperRef.instance.elseLabel=this.infoTip,this.wrapperRef.instance.showIcon=this.infoTipShowIcon||!1,this.wrapperRef.instance.info$=this.infoTipService.getInfo$(this.infoTip),t.reattach()},t.prototype.ngOnDestroy=function(){this.wrapperRef.destroy()},t}();ji.decorators=[{type:e.Directive,args:[{exportAs:"dag-info-tip",selector:"[infoTip]"}]}],ji.ctorParameters=function(){return[{type:ci},{type:e.TemplateRef},{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver}]},ji.propDecorators={infoTip:[{type:e.Input}],infoTipShowIcon:[{type:e.Input}]};var Hi=function(){};Hi.decorators=[{type:e.NgModule,args:[{declarations:[ji,Bi,_i],exports:[ji,_i],imports:[T.MatTooltipModule,i.CommonModule,m.I18nLibModule],id:"dag-info-tip"}]}];var Ui=function(){function t(t,e){this.ref=t,this.control=e}return t.prototype.input=function(t){var e;this.ref.nativeElement.value=t.target.value.toUpperCase(),(null===(e=null==this?void 0:this.control)||void 0===e?void 0:e.control)&&this.control.control.setValue(this.ref.nativeElement.value)},t}();Ui.decorators=[{type:e.Directive,args:[{selector:"[uppercase]"}]}],Ui.ctorParameters=function(){return[{type:e.ElementRef},{type:d.NgControl}]},Ui.propDecorators={input:[{type:e.HostListener,args:["input",["$event"]]}]};var Zi=function(){};Zi.decorators=[{type:e.NgModule,args:[{declarations:[Ui],imports:[i.CommonModule],exports:[Ui],providers:[]}]}];var Yi={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MM YYYY",dateA11yLabel:"DD/MM/YYYY",monthYearA11yLabel:"MM YYYY"}};function Wi(t,e){return new qe(t,e)}function Ki(t){return new Oe(t)}h.NativeDateAdapter;var Ji={strict:!0},Qi=function(){};Qi.decorators=[{type:e.NgModule,args:[{declarations:[H,U,J,Z,X,Ne,Ee,$e,Ge,Le,Be,je,Ue,We,Ke,Je,Xe,si,di,pi,Di,gi,Ei,Ai,$i,Mi,Oi,Gi,ki,Li,qi],entryComponents:[Ee],imports:[i.CommonModule,n.HttpClientModule,p.MatTableModule,q,S.MatExpansionModule,m.I18nLibModule,f.MatSelectModule,h.MatNativeDateModule,g.MatButtonModule,v.MatCardModule,b.MatInputModule,d.ReactiveFormsModule,z.MatFormFieldModule,r.MatDialogModule,y.MatPaginatorModule,F.MatIconModule,C.MatProgressBarModule,w.MatRadioModule,I.MatCheckboxModule,D.MatDatepickerModule,h.MatOptionModule,V.MatListModule,fi,Zi,R.NgbModule,N.MatSortModule,Hi,$.MomentDateModule],exports:[X,Ne,Xe,si,pi,Di,Ei,Mi,$i,Gi,Oi,$i,Ee,gi,je,H,$e,Be,qi,Zi],providers:[{provide:Me,useFactory:Wi,deps:[n.HttpClient,G]},{provide:Oe,useFactory:Ki,deps:[qe]},{provide:h.MAT_DATE_LOCALE,useValue:"it-IT"},{provide:h.MAT_DATE_FORMATS,useValue:Yi},{provide:$.MAT_MOMENT_DATE_ADAPTER_OPTIONS,useValue:Ji},{provide:h.DateAdapter,useClass:$.MomentDateAdapter,deps:[h.MAT_DATE_LOCALE,$.MAT_MOMENT_DATE_ADAPTER_OPTIONS]}]}]}];var Xi=function(){},tn=function(){function t(){}return t.of=function(e,i){var n=new t;return n.codice=e,n.descrizione=i,n},t}(),en=function(){},nn=function(){},on=function(){},an=function(){},rn=function(){},sn=function(){},ln=function(){},cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),e}(Ri),dn=function(){},pn=function(){},un=function(){},mn=function(){},fn=function(){},hn=function(){},gn=function(){},vn=function(){},bn=function(){},zn=function(){},yn=function(){},Fn=function(){},Cn=function(){},Sn=function(){},wn=function(){},In=function(){},Pn=function(){},xn=function(){},Dn=function(){function t(t,e){this.translateService=t,this.translatePipe=e}return t.prototype.ngOnInit=function(){var t=this;this.translatePipe.transform(""),this.translateService.traduzioniLib$.pipe(a.tap((function(e){return e?t.loadingLinguage=!0:null}))).subscribe()},t}();Dn.decorators=[{type:e.Component,args:[{selector:"lib-lista-pagamenti",template:'<div *ngIf="loadingLinguage">\r\n <div *ngFor="let pagamento of pagamenti; let indice = index " class="card card-primary shadow mb-3">\r\n <div class="card-header px-3 py-2">\r\n <h4 class="card-title mb-0 font-weight-bold d-inline text-uppercase h5">\r\n {{pagamento.servizio?.descrizione}} - {{pagamento?.idPagamento}}</h4>\r\n <span class="badge badge-light float-right text-uppercase"><span\r\n class="font-weight-normal">{{\'statoPagamento\' | traduzione }}</span>\r\n {{pagamento?.stato}}</span>\r\n </div>\r\n <div class="card-body px-3 py-2">\r\n <lib-dati-pagamento [pagamento]="pagamento"></lib-dati-pagamento>\r\n <lib-visualizza-dettagli [pagamento]="pagamento"></lib-visualizza-dettagli>\r\n </div>\r\n \x3c!-- <div class="col-12 text-right mb-3">\r\n <button mat-flat-button color="primary">\r\n {{\'buttonDownload\' | traduzione }}\r\n </button>\r\n </div> --\x3e\r\n </div>\r\n</div>',styles:[".card-primary>.card-header{background-color:#b9c9d8}.btn-excel{line-height:27px;padding:0 8px}.mat-expansion-panel-body{padding-left:0!important;padding-right:0!important}"]}]}],Dn.ctorParameters=function(){return[{type:k},{type:L}]},Dn.propDecorators={pagamenti:[{type:e.Input}]};var Rn=function(){function t(t){this.traduzione=t}return t.prototype.ngOnInit=function(){this.dettagli=this.traduzione.transform("visualizzaDettagli"),this.data=null!=this.pagamento.dataValuta?P(new Date(this.pagamento.dataValuta)).format("DD/MM/YYYY"):"",this.contaRighe()},t.prototype.accordionOpened=function(){this.dettagli=this.traduzione.transform("nascondiDettagli")},t.prototype.accordionClosed=function(){this.dettagli=this.traduzione.transform("visualizzaDettagli")},t.prototype.contaRighe=function(){if(this.pagamento.motivoScarto){var t=this.pagamento.motivoScarto,e=(t=(t=(t=t.replace(/(^\s*)|(\s*$)/gi,"")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).split("").length/180;this.numeroRighe=Math.ceil(e).toString()}},t}();Rn.decorators=[{type:e.Component,args:[{selector:"lib-visualizza-dettagli",template:'<mat-accordion class="example-headers-align" multi>\r\n <mat-expansion-panel class="panel-dettagli" (opened)="accordionOpened()" (closed)="accordionClosed()">\r\n <mat-expansion-panel-header class="detail-pagamenti">\r\n <mat-panel-title class="text-white">\r\n {{dettagli}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class="detail-content">\r\n <div class="row mt-4">\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'beneficiario\' | traduzione}}:</p>\r\n <p>{{pagamento?.denominazione}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'dataValuta\' | traduzione}}:</p>\r\n <p>{{data}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'cro\' | traduzione}}:</p>\r\n <p>{{pagamento?.cro}}</p>\r\n </div>\r\n <div class="col-12">\r\n <p class="mb-0 font-weight-bold">{{\'modalitaPagamaneto\' | traduzione}}:</p>\r\n <p>{{pagamento.modalitaPagamento?.descrizione}}</p>\r\n </div>\r\n <div *ngIf="pagamento.motivoScarto" class="col-12 col-md-12">\r\n <p class="mb-0 font-weight-bold">{{\'motivoScarto\' | traduzione}}:</p>\r\n <textarea disabled="true" matInput value={{pagamento.motivoScarto}} rows={{numeroRighe}}></textarea>\r\n </div>\r\n </div>\r\n <h5 class="border-bottom font-weight-bold mt-4">{{\'titolo_cronologia_stati\' | traduzione}}</h5>\r\n <lib-tabella-cronologica-stati [idPagamento]="pagamento?.idPagamento"></lib-tabella-cronologica-stati>\r\n </div>\r\n </mat-expansion-panel>\r\n</mat-accordion>\r\n',styles:[".mat-flat-button{line-height:25px;padding:0 12px}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px transparent,0 0 0 0 transparent,0 0 0 0 transparent}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:#1d65da}.mat-expansion-panel-header.mat-expanded:focus{background:#1953b0}.mat-expansion-indicator:after{color:#fff!important;margin-top:-3px}.mat-expansion-panel-header{background-color:#1953b0!important;display:inline-flex;height:25px;padding:0 12px}.mat-expansion-panel-header.mat-expanded:hover{background:#1d65da!important}.detail-content{margin:0 -24px}.mat-input-element:disabled{color:#000}","\n ::ng-deep .detail-pagamenti > .mat-expansion-indicator:after {\n color: white;\n margin-top: -3px;\n }\n"]}]}],Rn.ctorParameters=function(){return[{type:L}]},Rn.propDecorators={pagamento:[{type:e.Input}]};var Vn=function(){function t(){}return t.prototype.ngOnInit=function(){this.dataR=null!=this.pagamento.dataEmissione?P(new Date(this.pagamento.dataEmissione)).format("DD/MM/YYYY"):""},t}();Vn.decorators=[{type:e.Component,args:[{selector:"lib-dati-pagamento",template:'<div class="row mt-2 mb-3">\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'dataPagamento\' | traduzione }}:</p>\r\n <p>{{dataR}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'causale\' | traduzione }}:</p>\r\n <p>{{pagamento?.causale}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'importo\' | traduzione }}:</p>\r\n <p>{{pagamento?.importo | number :\'1.2-2\' | formattaImporto}}</p>\r\n </div>\r\n <div class="col-4">\r\n <p class="mb-0 font-weight-bold">{{\'identificativo\' | traduzione }}:</p>\r\n <p>{{pagamento?.identificativo}}</p>\r\n </div>\r\n</div>\r\n',styles:[""]}]}],Vn.ctorParameters=function(){return[]},Vn.propDecorators={pagamento:[{type:e.Input}]};var En=function(){function t(){}return t.prototype.transform=function(t){if(t){return[[",","v"],[".",","],["v","."]].reduce((function(t,e){return t.replace(e[0],e[1])}),t)}return""},t}();En.decorators=[{type:e.Pipe,args:[{name:"formattaImporto"}]}];var An=function(){function t(t){this.configurationService=t,this.V1=this.configurationService.servicePaths.get("GESTIONE_PAGAMENTI_MS_API_URL")+"/v1/"}return t.prototype.get_V1_CRONOLOGIA_STATI=function(t){return this.V1+"cronologia/"+t},t}();An.decorators=[{type:e.Injectable}],An.ctorParameters=function(){return[{type:G}]};var Nn=function(){function t(t,e){this.paths=t,this.http=e}return t.prototype.getCronologiaStati$=function(t){var e=this.paths.get_V1_CRONOLOGIA_STATI(t);return this.http.get(e).pipe(a.shareReplay())},t}();Nn.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Nn(e.ɵɵinject(An),e.ɵɵinject(n.HttpClient))},token:Nn,providedIn:"root"}),Nn.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Nn.ctorParameters=function(){return[{type:An},{type:n.HttpClient}]};var Tn=function(){function t(t){this.pagamentiService=t}return t.prototype.ngOnInit=function(){this.cronologiaStati$=this.pagamentiService.getCronologiaStati$(this.idPagamento)},t}();Tn.decorators=[{type:e.Component,args:[{selector:"lib-tabella-cronologica-stati",template:'<div class="table-responsive">\r\n\t<table class="table border">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope="col">{{\'colonna_data\' | traduzione}}</th>\r\n\t\t\t\t<th scope="col">{{\'colonna_stato\'| traduzione}}</th>\r\n\t\t\t\t<th scope="col">{{\'colonna_note\' | traduzione}}</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr *ngFor="let stato of cronologiaStati$ | async">\r\n\t\t\t\t<td>{{stato.dataModifica | date: "dd/MM/yyyy"}}</td>\r\n\t\t\t\t<td>{{stato.descrizioneStato}}</td>\r\n\t\t\t\t<td>{{stato.nota}}</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n</div>\r\n',styles:[".card-primary>.card-header{background-color:#d3deea}.table>thead{background-color:#0a2644;color:#fff}.table td,.table th{border-top:0;padding:.75rem;vertical-align:top}.table tr{border-bottom:1px solid #dee2e6}.table tbody tr:hover{background-color:#dee2e6}.btn-link{color:#0061c2}.btn-link:hover{color:#053a9a}.btn-primary{background-color:#0061c2}.btn-primary:hover{background-color:#053a9a}"]}]}],Tn.ctorParameters=function(){return[{type:Nn}]},Tn.propDecorators={idPagamento:[{type:e.Input}]};var $n=function(){};$n.decorators=[{type:e.NgModule,args:[{declarations:[Dn,Vn,Rn,En,Tn],imports:[i.CommonModule,n.HttpClientModule,p.MatTableModule,q,S.MatExpansionModule,g.MatButtonModule,b.MatInputModule],exports:[Dn],providers:[An]}]}];var Mn=function(){},On=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:G,useFactory:function(){return new G(e)}}]}},t}();On.decorators=[{type:e.NgModule,args:[{declarations:[],imports:[i.CommonModule]}]}];var Gn=/^(?:(?=.*\d)(?=.*[A-Z]).{8,})/,kn=/^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/,Ln=/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/,qn=/^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$/,_n=/^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$/,Bn=/([a-z]{6}|[A-Z]{6})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(a|b|c|d|e|h|l|m|p|r|s|t|A|B|C|D|E|H|L|M|P|R|S|T)((((l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|0|1|2|3|4|5|6)(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1}))|71|70|TM|Tm|tM|tm|TL|tl|Tl|tL))([a-z]{1}|[A-Z]{1})(L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})(l|m|n|p|q|r|s|t|u|v|L|M|N|P|Q|R|S|T|U|V|\d{1})([a-z]{1}|[A-Z]{1})/,jn=/^[0-9]{11}$/,Hn=/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$|^[0-9]{11}$/,Un=/^\+{0,1}[0-9]*$/,Zn=/^[a-zA-Zàèìòùé ']+$/,Yn={maxlength:"validation-maxlength",requiredInfoDecreto:"validation-requiredInfoDecreto",requiredMail:"validation-requiredMail",cfInvalidoFormalmente:"validation-cfInvalidoFormalmente",invalidCF:"validation-invalidCF",nSentenza:"validation-nSentenza",required:"obbligatorio",email:"validation-email",tel:"validation-tel",iban:"validation-iban",partitaIVAInvalida:"validation-partitaIVAInvalida",money:"validation-money",invalidName:"validation-invalidName",invalidDate:"validation-invalidDate",pattern:"validation-pattern",invalidDateFormat:"validation-invalidDateFormat",requiredDefinizione:"validation-requiredDefinizione",validationServiceFailed:"validation-validationServiceFailed",cfValidationPG:"validation-cfValidationPG",cfDifferentRichiedente:"validation-cfDifferentRichiedente",requiredDomicilio:"validation-requiredDomicilio",requiredSede:"validation-requiredSede",matDatepickerParse:"validation-invalidDateFormat",matDatepickerMax:"error-upper-bound"};function Wn(t){return Jn(Object.keys(t.errors)[0])}function Kn(t){return Object.keys(t.errors).find((function(t){return"matDatepickerParse"==t}))?Jn("matDatepickerParse"):Jn(Object.keys(t.errors)[0])}function Jn(t){var e=Yn[t];return e||t}var Qn=function(){function t(){this.viewSessoPF=!1,this.validateSepaPersonaFisicaEmitter=new e.EventEmitter,this.resetEstremiPersonaFisicaSepaFormEmitter=new e.EventEmitter,this.bonificoSepaReady=new e.EventEmitter,this.personaFisicaEmitter=new e.EventEmitter,this.getErrorMessage=Wn,this.ibanValidators=[d.Validators.required,this.sepaCountriesValidator(),M.ibanValidator()],this.sepaCountries=[{name:"Austria",code:"AT",iban:"AT493200056563289974"},{name:"Belgium",code:"BE",iban:"BE65561689528896"},{name:"Bulgaria",code:"BG",iban:"BG92TTBB94006559266188"},{name:"Cyprus",code:"CY",iban:"CY52665561416772369457864437"},{name:"Croatia",code:"HR",iban:"HR5523400098663266246"},{name:"Denmark",code:"DK",iban:"DK2550515918328528"},{name:"Estonia",code:"EE",iban:"EE591286653867491786"},{name:"Finland",code:"FI",iban:"FI8479486911788598"},{name:"France",code:"FR",iban:"FR8514508000707239488738J21"},{name:"Germany",code:"DE",iban:"DE14500105174185484177"},{name:"Greece",code:"GR",iban:"GR9201494491588141549531799"},{name:"Ireland",code:"IE",iban:"IE29AIBK93115212345678"},{name:"Italy",code:"IT",iban:"IT77R0300203280648419668253"},{name:"Latvia",code:"LV",iban:"LV80BANK0000435195001"},{name:"Lithuania",code:"LT",iban:"LT275168179993645428"},{name:"Luxembourg",code:"LU",iban:"LU350106814331716425"},{name:"Malta",code:"MT",iban:"MT54WLCI12377529685589454747835"},{name:"Netherlands",code:"NL",iban:"NL13INGB6755037397"},{name:"Poland",code:"PL",iban:"PL06109024023962236263666664"},{name:"Portugal",code:"PT",iban:"PT26003506516995234369482"},{name:"Czech Republic",code:"CZ",iban:"CZ1350515343291243261222"},{name:"Romania",code:"RO",iban:"RO64RZBR2335521926768262"},{name:"Slovakia",code:"SK",iban:"SK6053419589142643828262"},{name:"Slovenia",code:"SI",iban:"SI97975426678332786"},{name:"Spain",code:"ES",iban:"ES7231904977492569944158"},{name:"Sweden",code:"SE",iban:"SE4949996195749755572136"},{name:"Hungary",code:"HU",iban:"HU42117730161111101800000000"},{name:"Norway",code:"NO",iban:"NO9386011117947"},{name:"Liechtenstein",code:"LI",iban:"LI7008800683146527484"},{name:"Iceland",code:"IS",iban:"IS140159260076545510730339"},{name:"Switzerland",code:"CH",iban:"CH4789144623328263139"},{name:"United Kingdom",code:"GB",iban:"GB09BARC20040416289669"},{name:"Monaco",code:"MC",iban:"MC2112739000407179846124F08"},{name:"Andorra",code:"AD",iban:"AD5127638574262995775744"},{name:"San Marino",code:"SM",iban:"SM86U0322509800000000270100"},{name:"Holy See (Vatican City State)",code:"VA",iban:"VA59001123000012345678"}]}return t.prototype.ngOnInit=function(){var t=this;this.initSepaForm(),this.sepaForm.valueChanges.subscribe((function(){var e={iban:t.sepaForm.get("iban").value,delegato:t.sepaForm.get("existsDelegatoRiscossione").value,delegatoRiscossione:t.sepaForm.get("existsDelegatoRiscossione").value?t.delegato:null},i=t.sepaForm.valid,n=!0!==t.sepaForm.get("existsDelegatoRiscossione").value||t.isDelegatoValid,o=i&&n;t.bonificoSepaReady.emit({bonifico:e,isValid:o})}))},t.prototype.initSepaForm=function(){var t;this.sepaForm=new d.FormGroup({existsDelegatoRiscossione:new d.FormControl(null!=this.bonificoSepa&&this.bonificoSepa.delegato,[d.Validators.required]),iban:new d.FormControl(null===(t=this.bonificoSepa)||void 0===t?void 0:t.iban,this.ibanValidators)})},t.prototype.onValidateSepaPersonaFisica=function(){this.validateSepaPersonaFisicaEmitter.emit()},t.prototype.onExistsDelegatoRiscossioneChange=function(t){t.value||this.resetEstremiPersonaFisicaSepaFormEmitter.emit()},t.prototype.sepaCountriesValidator=function(){var t=this;return function(e){var i=e.value;if(!i||(null==i?void 0:i.length)<2)return null;var n=i.substring(0,2);return t.sepaCountries.some((function(t){return t.code===n}))?null:{ibanExtraSepa:!0}}},t.prototype.onDelegatoRiscossioneReady=function(t){this.delegato=t.persona,this.isDelegatoValid=t.isValid,this.personaFisicaEmitter.emit({persona:t.persona,isValid:t.isValid})},t.prototype.convertToUppercase=function(t){this.sepaForm.get("iban").setValue(t.toUpperCase())},t}();function Xn(t){return Zn.test(t.value)?null:{invalidName:!0}}function to(t){var e;return Hn.test(t.value)&&(null===(e=t.value)||void 0===e?void 0:e.length)>=11?null:{cfInvalidoFormalmente:!0}}function eo(t){return!t.value||Un.test(t.value)?null:{pattern:!0}}Qn.decorators=[{type:e.Component,args:[{selector:"lib-bonifico-sepa",template:'<form [formGroup]="sepaForm" [ngxsForm]="sepaFormPath">\r\n\t<div class="row">\r\n\t\t<div class="col-md-8">\r\n\t\t\t<label id="existsDelegatoRiscossioneLabel">{{ "exists-delegato-riscossione" | traduzione }}</label>\r\n\t\t\t<mat-radio-group class="radio-group" aria-labelledby="existsDelegatoRiscossioneLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t formControlName="existsDelegatoRiscossione"\r\n\t\t\t\t\t\t\t\t\t\t\t (change)="onExistsDelegatoRiscossioneChange($event)">\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="true">\r\n\t\t\t\t\t{{ "si" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="false">\r\n\t\t\t\t\t{{ "no" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t\t<br/>\r\n\t\t\t<mat-hint *infoTip="\'exists-delegato-riscossione\'"></mat-hint>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div *ngIf="sepaForm.controls[\'existsDelegatoRiscossione\'].value" class="row mt-3">\r\n\t\t<div class="col-12">\r\n\t\t\t<div class="row mt-4">\r\n\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t<lib-estremi-persona-fisica [ngxsFormPath]="estremiPFSepaFormPath"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[province]="province"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[nazioni]="nazioni"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[isPersonaFisicaValid]="isPersonaFisicaSepaValid"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[personaFisica]="bonificoSepa?.delegatoRiscossione"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[viewSessoPF]="viewSessoPF"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(validatePersonaFisicaEmitter)="onValidateSepaPersonaFisica()"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(personaFisicaEmitter)="onDelegatoRiscossioneReady($event)">\r\n\t\t\t\t\t</lib-estremi-persona-fisica>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<lib-dati-residenza [validateAndGetResidenza]="validateAndGetResidenza"></lib-dati-residenza>\r\n\t</div>\r\n\t</div>\r\n\r\n\t<div class="row my-4 mt-4">\r\n\t\t<div class="col-md-4">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder="{{ \'required\' | traduzione }}{{ \'codice-iban\' | traduzione }}"\r\n\t\t\t\t\tformControlName="iban"\r\n\t\t\t\t\t(input)="convertToUppercase($event.target.value)"/>\r\n\t\t\t\t<mat-error *ngIf="sepaForm.controls[\'iban\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(sepaForm.controls[\'iban\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n',styles:[""]}]}],Qn.ctorParameters=function(){return[]},Qn.propDecorators={bonificoSepa:[{type:e.Input}],nazioni:[{type:e.Input}],province:[{type:e.Input}],isPersonaFisicaSepaValid:[{type:e.Input}],sepaFormPath:[{type:e.Input}],estremiPFSepaFormPath:[{type:e.Input}],viewSessoPF:[{type:e.Input}],validateAndGetResidenza:[{type:e.Input}],validateSepaPersonaFisicaEmitter:[{type:e.Output}],resetEstremiPersonaFisicaSepaFormEmitter:[{type:e.Output}],bonificoSepaReady:[{type:e.Output}],personaFisicaEmitter:[{type:e.Output}]};var io=function(){function t(t,e,i){var o=this;this.http=t,this.configurationService=e,this.appRef=i,console.log("[ModalitaPagamentoService]"),this.urlAnagrafe=e.servicePaths.get("ANAGRAFE_MS_API_URL")+"/v1",console.log("[urlAnagrafe - lib]",this.urlAnagrafe);var r=e.lingua$,s=this.urlAnagrafe+"/nazioni";this.nazioni$=r.pipe(a.switchMap((function(t){return o.http.get(s,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay());var l=this.urlAnagrafe+"/province",c=this.urlAnagrafe+"/regioni/nonSoppresse/";this.province$=r.pipe(a.switchMap((function(t){return o.http.get(l,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay()),this.regioni$=r.pipe(a.switchMap((function(t){return o.http.get(c,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return i.tick()})),a.shareReplay())}return t.prototype.getProvince$=function(){return this.province$},t.prototype.getProvincePerRegione$=function(t){var e=this,i=this.urlAnagrafe+"/regione/"+t.sigla+"/province/nonSoppresse/?codiceRegione="+t.sigla;return this.configurationService.lingua$.pipe(a.switchMap((function(t){return e.http.get(i,{headers:new n.HttpHeaders({i18n_language:t})})})),a.tap((function(t){return e.appRef.tick()})),a.shareReplay())},t.prototype.getComuni$=function(t){var e=this.urlAnagrafe+"/provincia/"+t+"/comuni/nonSoppressi";return this.http.get(e).pipe(a.shareReplay())},t.prototype.getComune$=function(t){var e=this.urlAnagrafe+"/comune/codiceCatastale/"+t;return this.http.get(e).pipe(a.shareReplay())},t.prototype.getNazioni$=function(){return this.nazioni$},t.prototype.getCap$=function(t){var e=this.urlAnagrafe+"/comuni/"+t+"/cap";return this.http.get(e)},t.prototype.getRegioni$=function(){return this.regioni$},t}();io.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new io(e.ɵɵinject(n.HttpClient),e.ɵɵinject(G),e.ɵɵinject(e.ApplicationRef))},token:io,providedIn:"root"}),io.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],io.ctorParameters=function(){return[{type:n.HttpClient},{type:G},{type:e.ApplicationRef}]};var no=function(){function t(t){this.modalitaPagamentoService=t,this.viewSessoPF=!1,this.validatePersonaFisicaEmitter=new e.EventEmitter,this.personaFisicaEmitter=new e.EventEmitter,this.maxDataNascita=new Date,this.subscription=new o.Subscription,this.getErrorMessage=Wn,this.getDateErrorMessage=Kn}return Object.defineProperty(t.prototype,"_disableForm",{set:function(t){this.disableForm=t,this.disableForm?(this.estremiPersonaFisicaForm.disable(),this.validatePersonaFisicaEmitter.emit()):this.estremiPersonaFisicaForm.enable()},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.initPersonaFisicaForm(),this.setFormControlsValue(),this.setCodiceFiscaleValidators(),this.subscription.add(this.estremiPersonaFisicaForm.controls.isNatoEstero.valueChanges.subscribe((function(e){e?(t.estremiPersonaFisicaForm.controls.provinciaNascita.setValidators([]),t.estremiPersonaFisicaForm.controls.provinciaNascita.patchValue(null),t.estremiPersonaFisicaForm.controls.provinciaNascita.updateValueAndValidity(),t.estremiPersonaFisicaForm.controls.codiceComuneNascita.setValidators([]),t.estremiPersonaFisicaForm.controls.codiceComuneNascita.patchValue(null),t.estremiPersonaFisicaForm.controls.codiceComuneNascita.updateValueAndValidity(),t.estremiPersonaFisicaForm.controls.nazioneNascita.setValidators([d.Validators.required]),t.estremiPersonaFisicaForm.controls.nazioneNascita.updateValueAndValidity()):(t.estremiPersonaFisicaForm.controls.provinciaNascita.setValidators([d.Validators.required]),t.estremiPersonaFisicaForm.controls.provinciaNascita.updateValueAndValidity(),t.estremiPersonaFisicaForm.controls.codiceComuneNascita.setValidators([d.Validators.required]),t.estremiPersonaFisicaForm.controls.codiceComuneNascita.updateValueAndValidity(),t.estremiPersonaFisicaForm.controls.nazioneNascita.setValidators([]),t.estremiPersonaFisicaForm.controls.nazioneNascita.patchValue(null),t.estremiPersonaFisicaForm.controls.nazioneNascita.updateValueAndValidity())}))),this.getComuniOnProvinciaChange(),this.validatePersonaFisica(),this.personaFisicaEmit()},t.prototype.getComuniOnProvinciaChange=function(){var t=this;this.subscription.add(this.estremiPersonaFisicaForm.controls.provinciaNascita.valueChanges.pipe(a.distinctUntilChanged(),a.switchMap((function(e){return o.iif((function(){return!!e}),t.modalitaPagamentoService.getComuni$(e).pipe(a.take(1)),o.of([]))}))).subscribe((function(e){t.comuni=e})))},t.prototype.validatePersonaFisica=function(){var t=this;this.subscription.add(this.estremiPersonaFisicaForm.valueChanges.pipe(a.debounceTime(500),a.filter((function(){return t.estremiPersonaFisicaForm.valid}))).subscribe((function(e){t.validatePersonaFisicaEmitter.emit()})))},t.prototype.personaFisicaEmit=function(){var t=this;this.subscription.add(this.estremiPersonaFisicaForm.valueChanges.pipe(a.debounceTime(500)).subscribe((function(e){var i={infoAnagrafiche:{codFiscale:t.estremiPersonaFisicaForm.controls.codiceFiscale.value,cognome:t.estremiPersonaFisicaForm.controls.cognome.value,nome:t.estremiPersonaFisicaForm.controls.nome.value},infoNascita:{comuneNascita:t.estremiPersonaFisicaForm.controls.codiceComuneNascita.value,provinciaNascita:t.estremiPersonaFisicaForm.controls.provinciaNascita.value,dataNascita:t.estremiPersonaFisicaForm.controls.dataNascita.value}},n=t.estremiPersonaFisicaForm.valid;t.personaFisicaEmitter.emit({persona:i||null,isValid:n})})))},t.prototype.initPersonaFisicaForm=function(){this.estremiPersonaFisicaForm=new d.FormGroup({codiceFiscale:new d.FormControl(null),nome:new d.FormControl(null,[d.Validators.required,Xn]),cognome:new d.FormControl(null,[d.Validators.required,Xn]),isNatoEstero:new d.FormControl(!1),provinciaNascita:new d.FormControl(null),codiceComuneNascita:new d.FormControl(null),nazioneNascita:new d.FormControl(null),dataNascita:new d.FormControl(null,[d.Validators.required]),sesso:new d.FormControl(null,this.viewSessoPF?[d.Validators.required]:[])})},t.prototype.setCodiceFiscaleValidators=function(){this.estremiPersonaFisicaForm.controls.codiceFiscale.setValidators([d.Validators.required,to])},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.convertToUppercase=function(t){this.estremiPersonaFisicaForm.get("codiceFiscale").setValue(t.target.value.toUpperCase())},t.prototype.onProvinciaChange=function(){this.estremiPersonaFisicaForm.controls.codiceComuneNascita.patchValue(null),this.estremiPersonaFisicaForm.controls.codiceComuneNascita.markAsTouched()},t.prototype.setFormControlsValue=function(){var t;this.estremiPersonaFisicaForm.controls.codiceFiscale.setValue(this.personaFisica?this.personaFisica.infoAnagrafiche.codFiscale:null),this.estremiPersonaFisicaForm.controls.nome.setValue(this.personaFisica?this.personaFisica.infoAnagrafiche.nome:null),this.estremiPersonaFisicaForm.controls.cognome.setValue(this.personaFisica?this.personaFisica.infoAnagrafiche.cognome:null),this.estremiPersonaFisicaForm.controls.isNatoEstero.setValue(!(!this.personaFisica||!this.personaFisica.infoNascita.comuneNascita.startsWith("Z"))),this.estremiPersonaFisicaForm.controls.provinciaNascita.setValue(this.personaFisica&&!this.personaFisica.infoNascita.comuneNascita.startsWith("Z")?this.personaFisica.infoNascita.provinciaNascita:null),this.estremiPersonaFisicaForm.controls.codiceComuneNascita.setValue(this.personaFisica&&!this.personaFisica.infoNascita.comuneNascita.startsWith("Z")?this.personaFisica.infoNascita.comuneNascita:null),this.estremiPersonaFisicaForm.controls.dataNascita.setValue(this.personaFisica?this.personaFisica.infoNascita.dataNascita:null),this.estremiPersonaFisicaForm.controls.sesso.setValue(this.viewSessoPF?"M":null),this.estremiPersonaFisicaForm.controls.nazioneNascita.setValue(this.personaFisica&&this.personaFisica.infoNascita.comuneNascita.startsWith("Z")?null===(t=this.personaFisica.infoNascita)||void 0===t?void 0:t.comuneNascita:null)},t}();no.decorators=[{type:e.Component,args:[{selector:"lib-estremi-persona-fisica",template:'<form [formGroup]="estremiPersonaFisicaForm" [ngxsForm]="ngxsFormPath">\r\n\t<div class="row">\r\n\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input formControlName="codiceFiscale"\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t[maxlength]="16"\r\n\t\t\t\t\t\tplaceholder="{{ \'required\' | traduzione }} {{ \'codice-fiscale\' | traduzione }}"\r\n\t\t\t\t\t\t(input)="convertToUppercase($event)" />\r\n\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'codiceFiscale\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(estremiPersonaFisicaForm.controls[\'codiceFiscale\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input formControlName="nome"\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t[maxlength]="100"\r\n\t\t\t\t\t\tplaceholder="{{ \'required\' | traduzione }} {{ \'nome\' | traduzione }}"/>\r\n\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm?.controls[\'nome\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(estremiPersonaFisicaForm.controls[\'nome\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input formControlName="cognome"\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t[maxlength]="100"\r\n\t\t\t\t\t\tplaceholder="{{ \'required\' | traduzione }} {{ \'cognome\' | traduzione }}"/>\r\n\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm?.controls[\'cognome\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(estremiPersonaFisicaForm.controls[\'cognome\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="row">\r\n\t\t<div class="col-12 pt-3 pb-2 pt-lg-2 pb-lg-2">\r\n\t\t\t<mat-checkbox formControlName="isNatoEstero"\r\n\t\t\t\t\t\t color="primary">\r\n\t\t\t\t<info-tip-label label="localita-nascita-estera"></info-tip-label>\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="row">\r\n\t\t<ng-container *ngIf="!estremiPersonaFisicaForm?.controls[\'isNatoEstero\']?.value else nascitaEstera">\r\n\t\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'provincia-nascita\' | traduzione }}</mat-label>\r\n\t\t\t\t\t<mat-select [placeholder]="\'seleziona\' | traduzione" formControlName="provinciaNascita" (valueChange)="onProvinciaChange()">\r\n\t\t\t\t\t\t<mat-option *ngFor="let provincia of province" [value]="provincia.sigla">\r\n\t\t\t\t\t\t\t{{ provincia.denominazione }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'provinciaNascita\'].invalid">\r\n\t\t\t\t\t\t{{ \'obbligatorio\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'comune-nascita\' | traduzione }}</mat-label>\r\n\t\t\t\t\t<mat-select placeholder="{{ \'seleziona\' | traduzione }}" formControlName="codiceComuneNascita">\r\n\t\t\t\t\t\t<mat-option *ngFor="let comune of comuni" [value]="comune.codiceCatastale">\r\n\t\t\t\t\t\t\t{{ comune.denominazione }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'codiceComuneNascita\'].invalid">\r\n\t\t\t\t\t\t{{ \'obbligatorio\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #nascitaEstera>\r\n\t\t\t<div class="col-12 col-lg-4 mt-2 mt-lg-0">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'nazione-nascita\' | traduzione }}</mat-label>\r\n\t\t\t\t\t<mat-select [placeholder]="\'seleziona\' | traduzione" formControlName="nazioneNascita">\r\n\t\t\t\t\t\t<mat-option *ngFor="let nazione of nazioni" [value]="nazione.codiceCatastale">\r\n\t\t\t\t\t\t\t{{ nazione.denominazione }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'nazioneNascita\'].invalid">\r\n\t\t\t\t\t\t{{ \'obbligatorio\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t\t<div class="col-12" [ngClass]="viewSessoPF ?\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\testremiPersonaFisicaForm?.controls[\'isNatoEstero\']?.value ? \' col-lg-4 mt-2 mt-lg-0\'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \' col-lg-2 mt-2 mt-lg-0\'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \' col-lg-4 mt-2 mt-lg-0\'">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input formControlName="dataNascita"\r\n\t\t\t\t\t\t[max]="maxDataNascita"\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t[matDatepicker]="dataNascita"\r\n\t\t\t\t\t\t[placeholder]="(\'required\' | traduzione) + (\'data-nascita\' | traduzione)">\r\n\t\t\t\t<mat-datepicker-toggle matSuffix [for]="dataNascita"></mat-datepicker-toggle>\r\n\t\t\t\t<mat-datepicker #dataNascita></mat-datepicker>\r\n\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'dataNascita\'].invalid">\r\n\t\t\t\t\t{{ getDateErrorMessage(estremiPersonaFisicaForm.controls[\'dataNascita\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-hint *infoTip="\'formato-data\'"></mat-hint>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div *ngIf="viewSessoPF" class="col-12 col-lg-2 mt-2 mt-lg-0">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'sesso\' | traduzione }}</mat-label>\r\n\t\t\t\t<mat-select [placeholder]="\'seleziona\' | traduzione" formControlName="sesso">\r\n\t\t\t\t\t<mat-option [value]="null"> {{ "seleziona" | traduzione }} </mat-option>\r\n\t\t\t\t\t<mat-option value="M">{{ "maschio" | traduzione }}</mat-option>\r\n\t\t\t\t\t<mat-option value="F">{{ "femmina" | traduzione }}</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t\t<mat-error *ngIf="estremiPersonaFisicaForm.controls[\'sesso\'].invalid">\r\n\t\t\t\t\t{{ \'obbligatorio\' | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="row">\r\n\t\t<div class="col-12 mt-2 mt-lg-0">\r\n\t\t\t<mat-error *ngIf="!isPersonaFisicaValid && (estremiPersonaFisicaForm.dirty)">\r\n\t\t\t\t{{\'invalid-dati-anagrafici\' | traduzione }}\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n\r\n',styles:[""]}]}],no.ctorParameters=function(){return[{type:io}]},no.propDecorators={ngxsFormPath:[{type:e.Input}],province:[{type:e.Input}],nazioni:[{type:e.Input}],isPersonaFisicaValid:[{type:e.Input}],personaFisica:[{type:e.Input}],viewSessoPF:[{type:e.Input}],validatePersonaFisicaEmitter:[{type:e.Output}],personaFisicaEmitter:[{type:e.Output}],_disableForm:[{type:e.Input,args:["disableForm"]}]};var oo=function(){function t(){this.viewSessoPF=!1,this.validateExtraSepaPersonaFisicaEmitter=new e.EventEmitter,this.resetEstremiPersonaFisicaExtraSepaFormEmitter=new e.EventEmitter,this.bonificoExtraSepaReady=new e.EventEmitter,this.personaFisicaEmitter=new e.EventEmitter,this.ibanValidators=[d.Validators.required,this.extraSepaCountriesValidator(),M.ibanValidator()],this.codiceContoValidators=[d.Validators.required,this.ValidateNotIban,d.Validators.maxLength(44)],this.subscription=new o.Subscription,this.getErrorMessage=Wn,this.sepaCountries=[{name:"Austria",code:"AT",iban:"AT493200056563289974"},{name:"Belgium",code:"BE",iban:"BE65561689528896"},{name:"Bulgaria",code:"BG",iban:"BG92TTBB94006559266188"},{name:"Cyprus",code:"CY",iban:"CY52665561416772369457864437"},{name:"Croatia",code:"HR",iban:"HR5523400098663266246"},{name:"Denmark",code:"DK",iban:"DK2550515918328528"},{name:"Estonia",code:"EE",iban:"EE591286653867491786"},{name:"Finland",code:"FI",iban:"FI8479486911788598"},{name:"France",code:"FR",iban:"FR8514508000707239488738J21"},{name:"Germany",code:"DE",iban:"DE14500105174185484177"},{name:"Greece",code:"GR",iban:"GR9201494491588141549531799"},{name:"Ireland",code:"IE",iban:"IE29AIBK93115212345678"},{name:"Italy",code:"IT",iban:"IT77R0300203280648419668253"},{name:"Latvia",code:"LV",iban:"LV80BANK0000435195001"},{name:"Lithuania",code:"LT",iban:"LT275168179993645428"},{name:"Luxembourg",code:"LU",iban:"LU350106814331716425"},{name:"Malta",code:"MT",iban:"MT54WLCI12377529685589454747835"},{name:"Netherlands",code:"NL",iban:"NL13INGB6755037397"},{name:"Poland",code:"PL",iban:"PL06109024023962236263666664"},{name:"Portugal",code:"PT",iban:"PT26003506516995234369482"},{name:"Czech Republic",code:"CZ",iban:"CZ1350515343291243261222"},{name:"Romania",code:"RO",iban:"RO64RZBR2335521926768262"},{name:"Slovakia",code:"SK",iban:"SK6053419589142643828262"},{name:"Slovenia",code:"SI",iban:"SI97975426678332786"},{name:"Spain",code:"ES",iban:"ES7231904977492569944158"},{name:"Sweden",code:"SE",iban:"SE4949996195749755572136"},{name:"Hungary",code:"HU",iban:"HU42117730161111101800000000"},{name:"Norway",code:"NO",iban:"NO9386011117947"},{name:"Liechtenstein",code:"LI",iban:"LI7008800683146527484"},{name:"Iceland",code:"IS",iban:"IS140159260076545510730339"},{name:"Switzerland",code:"CH",iban:"CH4789144623328263139"},{name:"United Kingdom",code:"GB",iban:"GB09BARC20040416289669"},{name:"Monaco",code:"MC",iban:"MC2112739000407179846124F08"},{name:"Andorra",code:"AD",iban:"AD5127638574262995775744"},{name:"San Marino",code:"SM",iban:"SM86U0322509800000000270100"},{name:"Holy See (Vatican City State)",code:"VA",iban:"VA59001123000012345678"}]}return t.prototype.ngOnInit=function(){var t=this;this.initExtraSepaForm(),this.subscription.add(this.extraSepaForm.controls.codiceContoPresent.valueChanges.subscribe((function(e){e?(t.extraSepaForm.controls.iban.setValidators([]),t.extraSepaForm.controls.iban.patchValue(null),t.extraSepaForm.controls.iban.updateValueAndValidity(),t.extraSepaForm.controls.codiceConto.setValidators(t.codiceContoValidators),t.extraSepaForm.controls.codiceConto.updateValueAndValidity()):(t.extraSepaForm.controls.codiceConto.setValidators([]),t.extraSepaForm.controls.codiceConto.patchValue(null),t.extraSepaForm.controls.codiceConto.updateValueAndValidity(),t.extraSepaForm.controls.iban.setValidators(t.ibanValidators),t.extraSepaForm.controls.iban.updateValueAndValidity())}))),this.subscription.add(this.extraSepaForm.controls.swiftBicPresent.valueChanges.subscribe((function(e){e?(t.extraSepaForm.controls.swift.setValidators([d.Validators.required,d.Validators.maxLength(11),d.Validators.minLength(8)]),t.extraSepaForm.controls.swift.updateValueAndValidity(),t.extraSepaForm.controls.nazione.setValidators([]),t.extraSepaForm.controls.nazione.patchValue(null),t.extraSepaForm.controls.nazione.updateValueAndValidity(),t.extraSepaForm.controls.citta.setValidators([]),t.extraSepaForm.controls.citta.patchValue(null),t.extraSepaForm.controls.citta.updateValueAndValidity(),t.extraSepaForm.controls.banca.setValidators([]),t.extraSepaForm.controls.banca.patchValue(null),t.extraSepaForm.controls.banca.updateValueAndValidity(),t.extraSepaForm.controls.indirizzo.setValidators([]),t.extraSepaForm.controls.indirizzo.patchValue(null),t.extraSepaForm.controls.indirizzo.updateValueAndValidity(),t.extraSepaForm.controls.zipCode.setValidators([]),t.extraSepaForm.controls.zipCode.patchValue(null),t.extraSepaForm.controls.zipCode.updateValueAndValidity(),t.extraSepaForm.controls.civico.setValidators([]),t.extraSepaForm.controls.civico.updateValueAndValidity(),t.extraSepaForm.controls.civico.patchValue(null)):(t.extraSepaForm.controls.swift.setValidators([]),t.extraSepaForm.controls.swift.patchValue(null),t.extraSepaForm.controls.swift.updateValueAndValidity(),t.extraSepaForm.controls.nazione.setValidators([d.Validators.required]),t.extraSepaForm.controls.nazione.updateValueAndValidity(),t.extraSepaForm.controls.citta.setValidators([d.Validators.required]),t.extraSepaForm.controls.citta.updateValueAndValidity(),t.extraSepaForm.controls.banca.setValidators([d.Validators.required]),t.extraSepaForm.controls.banca.updateValueAndValidity(),t.extraSepaForm.controls.indirizzo.setValidators([d.Validators.required]),t.extraSepaForm.controls.indirizzo.updateValueAndValidity(),t.extraSepaForm.controls.zipCode.setValidators([d.Validators.required]),t.extraSepaForm.controls.zipCode.updateValueAndValidity(),t.extraSepaForm.controls.civico.setValidators([d.Validators.required]),t.extraSepaForm.controls.civico.updateValueAndValidity())}))),this.extraSepaForm.valueChanges.subscribe((function(){var e={swift:t.extraSepaForm.get("swift").value,codiceContoPresent:t.extraSepaForm.get("codiceContoPresent").value,codiceConto:t.extraSepaForm.get("codiceConto").value,iban:t.extraSepaForm.get("iban").value,delegato:t.extraSepaForm.get("existsDelegatoRiscossione").value,delegatoRiscossione:t.extraSepaForm.get("existsDelegatoRiscossione").value?t.delegato:null,banca:t.extraSepaForm.get("banca").value,filiale:t.extraSepaForm.get("citta").value,indirizzo:t.extraSepaForm.get("indirizzo").value,swiftBicPresent:t.extraSepaForm.get("swiftBicPresent").value,nazione:t.extraSepaForm.get("nazione").value,zipCode:t.extraSepaForm.get("zipCode").value,codiceProvincia:"EE",civico:t.extraSepaForm.get("civico").value},i=t.extraSepaForm.valid,n=!0!==t.extraSepaForm.get("existsDelegatoRiscossione").value||t.isDelegatoValid,o=i&&n;t.bonificoExtraSepaReady.emit({bonifico:e,isValid:o})}))},t.prototype.initExtraSepaForm=function(){var t,e,i,n,o,a,r,s,l,c;this.extraSepaForm=new d.FormGroup({existsDelegatoRiscossione:new d.FormControl(null!=this.bonificoExtraSepa&&this.bonificoExtraSepa.delegato,[d.Validators.required]),swift:new d.FormControl(null===(t=this.bonificoExtraSepa)||void 0===t?void 0:t.swift,[d.Validators.required,d.Validators.maxLength(11),d.Validators.minLength(8)]),banca:new d.FormControl(null===(e=this.bonificoExtraSepa)||void 0===e?void 0:e.banca,[d.Validators.required]),indirizzo:new d.FormControl(null===(i=this.bonificoExtraSepa)||void 0===i?void 0:i.indirizzo,[d.Validators.required]),codiceContoPresent:new d.FormControl(null!=this.bonificoExtraSepa&&this.bonificoExtraSepa.codiceContoPresent,[d.Validators.required]),codiceConto:new d.FormControl(null===(n=this.bonificoExtraSepa)||void 0===n?void 0:n.codiceConto,this.codiceContoValidators),iban:new d.FormControl(null===(o=this.bonificoExtraSepa)||void 0===o?void 0:o.iban,this.ibanValidators),swiftBicPresent:new d.FormControl(!!(null===(a=this.bonificoExtraSepa)||void 0===a?void 0:a.swift),[d.Validators.required]),nazione:new d.FormControl(null===(r=this.bonificoExtraSepa)||void 0===r?void 0:r.nazione,[d.Validators.required]),citta:new d.FormControl(null===(s=this.bonificoExtraSepa)||void 0===s?void 0:s.filiale,[d.Validators.required]),zipCode:new d.FormControl(null===(l=this.bonificoExtraSepa)||void 0===l?void 0:l.zipCode,[d.Validators.required]),civico:new d.FormControl(null===(c=this.bonificoExtraSepa)||void 0===c?void 0:c.civico,[d.Validators.required])})},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onValidateExtraSepaPersonaFisica=function(){this.validateExtraSepaPersonaFisicaEmitter.emit()},t.prototype.onExistsDelegatoRiscossioneChange=function(t){t.value||(this.isDelegatoValid=!0,this.resetEstremiPersonaFisicaExtraSepaFormEmitter.emit())},t.prototype.byCode=function(t,e){return(null==t?void 0:t.codiceCatastale)==(null==e?void 0:e.codiceCatastale)},t.prototype.ValidateNotIban=function(t){if(!t.value)return null;return/^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$/.test(t.value.toString().trim())?{codiceContoSchouldNotBeIban:!0}:null},t.prototype.extraSepaCountriesValidator=function(){var t=this;return function(e){var i=e.value;if(!i||(null==i?void 0:i.length)<2)return null;var n=i.substring(0,2);return t.sepaCountries.some((function(t){return t.code===n}))?{ibanSepa:!0}:null}},t.prototype.onDelegatoRiscossioneReady=function(t){this.delegato=t.persona,this.isDelegatoValid=t.isValid,this.personaFisicaEmitter.emit({persona:t.persona,isValid:t.isValid})},t.prototype.convertToUppercase=function(t){this.extraSepaForm.controls.codiceContoPresent.value?this.extraSepaForm.get("codiceConto").setValue(t.toUpperCase()):this.extraSepaForm.get("iban").setValue(t.toUpperCase())},t}();oo.decorators=[{type:e.Component,args:[{selector:"lib-bonifico-extra-sepa",template:'<ng-container [formGroup]="extraSepaForm" [ngxsForm]="extraSepaFormPath">\r\n\t<div class="row">\r\n\t\t<div class="col-md-8">\r\n\t\t\t<label id="existsDelegatoRiscossioneLabel">{{ "exists-delegato-riscossione" | traduzione }}</label>\r\n\t\t\t<mat-radio-group class="radio-group"\r\n\t\t\t\t\t\t\t aria-labelledby="existsDelegatoRiscossioneLabel"\r\n\t\t\t\t\t\t\t formControlName="existsDelegatoRiscossione"\r\n\t\t\t\t\t\t\t (change)="onExistsDelegatoRiscossioneChange($event)">\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="true">\r\n\t\t\t\t\t{{ "si" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="false">\r\n\t\t\t\t\t{{ "no" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t\t<br /><br />\r\n\t\t\t<mat-hint *infoTip="\'exists-delegato-riscossione\'"></mat-hint>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div *ngIf="extraSepaForm.controls[\'existsDelegatoRiscossione\'].value" class="row mt-3">\r\n\t\t<div class="col-12">\r\n\t\t\t<div class="row mt-4">\r\n\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t<lib-estremi-persona-fisica [ngxsFormPath]="estremiPFExtraSepaFormPath"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[province]="province"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[nazioni]="nazioni"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[isPersonaFisicaValid]="isPersonaFisicaExtraSepaValid"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[personaFisica]="bonificoExtraSepa?.delegatoRiscossione"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[viewSessoPF]="viewSessoPF"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(validatePersonaFisicaEmitter)="onValidateExtraSepaPersonaFisica()"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(personaFisicaEmitter)="onDelegatoRiscossioneReady($event)">\r\n\t\t\t\t\t</lib-estremi-persona-fisica>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<lib-dati-residenza [validateAndGetResidenza]="validateAndGetResidenza"></lib-dati-residenza>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class="row mt-4">\r\n\t\t<div class="col-md-8">\r\n\t\t\t<label id="existsBicSwiftLabel">{{ "exists-bic-swift" | traduzione }}</label>\r\n\t\t\t<mat-radio-group class="radio-group"\r\n\t\t\t\t\t\t\t aria-labelledby="existsBicSwiftLabel"\r\n\t\t\t\t\t\t\t formControlName="swiftBicPresent">\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="true">\r\n\t\t\t\t\t{{ "si" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="false">\r\n\t\t\t\t\t{{ "no" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div *ngIf="extraSepaForm.controls[\'swiftBicPresent\'].value; else noswiftBic" class="row">\r\n\t\t<div class="col-md-8">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder="{{ \'required\' | traduzione }}{{ \'swift\' | traduzione }}" formControlName="swift" />\r\n\t\t\t\t\x3c!-- <mat-error *ngIf="extraSepaForm.controls[\'swift\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'swift\']) | traduzione }}\r\n\t\t\t\t</mat-error> --\x3e\r\n\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'swift\']?.hasError(\'required\')">\r\n\t\t\t\t\t{{\'validation-required\'| traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'swift\']?.hasError(\'minlength\')">\r\n\t\t\t\t\t{{\'validation-swift-min\' | traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'swift\']?.hasError(\'maxlength\')">\r\n\t\t\t\t\t{{\'validation-swift-max\' | traduzione}}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<ng-template #noswiftBic>\r\n\t\t<div class="row my-4 mt-4">\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'nazione\' | traduzione }}</mat-label>\r\n\t\t\t\t\t<mat-select [placeholder]="\'seleziona\' | traduzione" formControlName="nazione" [compareWith]="byCode">\r\n\t\t\t\t\t\t<mat-option *ngFor="let nazione of nazioni" [value]="nazione">\r\n\t\t\t\t\t\t\t{{ nazione.denominazione }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'nazione\'].invalid">\r\n\t\t\t\t\t\t{{ \'obbligatorio\' | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput [maxlength]="70" formControlName="banca" placeholder="{{ \'required\' | traduzione }}{{ \'banca\' | traduzione }}" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'banca\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'banca\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput [maxlength]="35" placeholder="{{ \'required\' | traduzione }}{{ \'citta\' | traduzione }}" formControlName="citta" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'citta\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'citta\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class="row mt-4">\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput [maxlength]="70" formControlName="indirizzo" placeholder="{{ \'required\' | traduzione }}{{ \'indirizzo\' | traduzione }}" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'indirizzo\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'indirizzo\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput [maxlength]="16" placeholder="{{ \'required\' | traduzione }}{{ \'civico\' | traduzione }}" formControlName="civico" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'civico\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'civico\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-md-4">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput [maxlength]="16" placeholder="{{ \'required\' | traduzione }}{{ \'cap-estero\' | traduzione }}" formControlName="zipCode" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'zipCode\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'zipCode\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<div class="row mt-4">\r\n\t\t<div class="col-md-8">\r\n\t\t\t<mat-radio-group class="radio-group" aria-labelledby="codiceContoPresentLabel" formControlName="codiceContoPresent">\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="true">\r\n\t\t\t\t\t{{ "codice-conto" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\r\n\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="false">\r\n\t\t\t\t\t{{ "codice-iban" | traduzione }}\r\n\t\t\t\t</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class="row mt-4">\r\n\t\t<div class="col-md-8" *ngIf="extraSepaForm.controls[\'codiceContoPresent\'].value; else iban">\r\n\t\t\t<mat-form-field>\r\n\t\t\t\t<input matInput placeholder="{{ \'required\' | traduzione }}{{ \'codice-conto\' | traduzione }}"\r\n\t\t\t\t\tformControlName="codiceConto"\r\n\t\t\t\t\t(input)="convertToUppercase($event.target.value)" />\r\n\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'codiceConto\'].invalid">\r\n\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'codiceConto\']) | traduzione }}\r\n\t\t\t\t</mat-error>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\r\n\t\t<ng-template #iban>\r\n\t\t\t<div class="col-md-8">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input matInput placeholder="{{ \'required\' | traduzione }}{{ \'codice-iban\' | traduzione }}"\r\n\t\t\t\t\t\tformControlName="iban"\r\n\t\t\t\t\t\t(input)="convertToUppercase($event.target.value)" />\r\n\t\t\t\t\t<mat-error *ngIf="extraSepaForm.controls[\'iban\'].invalid">\r\n\t\t\t\t\t\t{{ getErrorMessage(extraSepaForm.controls[\'iban\']) | traduzione }}\r\n\t\t\t\t\t</mat-error>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</ng-container>\r\n',styles:[""]}]}],oo.ctorParameters=function(){return[]},oo.propDecorators={bonificoExtraSepa:[{type:e.Input}],isPersonaFisicaExtraSepaValid:[{type:e.Input}],nazioni:[{type:e.Input}],province:[{type:e.Input}],extraSepaFormPath:[{type:e.Input}],estremiPFExtraSepaFormPath:[{type:e.Input}],viewSessoPF:[{type:e.Input}],validateAndGetResidenza:[{type:e.Input}],validateExtraSepaPersonaFisicaEmitter:[{type:e.Output}],resetEstremiPersonaFisicaExtraSepaFormEmitter:[{type:e.Output}],bonificoExtraSepaReady:[{type:e.Output}],personaFisicaEmitter:[{type:e.Output}]};var ao=function(){function t(t){this.modalitaPagamentoService=t,this.setComuni=new e.EventEmitter,this.getCapOptions=new e.EventEmitter,this.resetIndirizzoForm=new e.EventEmitter,this.vagliaReady=new e.EventEmitter,this.indirizzoEmitter=new e.EventEmitter,this.subscription=new o.Subscription,this.getErrorMessage=Wn}return t.prototype.ngOnInit=function(){var t=this;this.initVagliaForm(),this.vagliaForm.setValidators((function(t){return t.get("pec").value||t.get("email").value||!1!==t.get("domicilioRichiedenteCoincideConResidenza").value?null:{requiredMail:!0}})),this.subscription.add(this.vagliaForm.controls.domicilioRichiedenteCoincideConResidenza.valueChanges.subscribe((function(e){e?(t.vagliaForm.controls.nome.setValidators([]),t.vagliaForm.controls.nome.patchValue(null),t.vagliaForm.controls.nome.updateValueAndValidity(),t.vagliaForm.controls.cognome.setValidators([]),t.vagliaForm.controls.cognome.patchValue(null),t.vagliaForm.controls.cognome.updateValueAndValidity(),t.vagliaForm.controls.email.patchValue(null),t.vagliaForm.controls.pec.patchValue(null),t.vagliaForm.controls.telefono.patchValue(null),t.resetIndirizzoForm.emit()):(t.vagliaForm.controls.nome.setValidators([d.Validators.required,Xn]),t.vagliaForm.controls.nome.updateValueAndValidity(),t.vagliaForm.controls.cognome.setValidators([d.Validators.required,Xn]),t.vagliaForm.controls.cognome.updateValueAndValidity())}))),this.vagliaForm.valueChanges.subscribe((function(){var e={intestatarioStudioLegale:t.vagliaForm.get("intestatoSudioLegale").value,domicilioRichiedenteCoincideConResidenza:t.vagliaForm.get("domicilioRichiedenteCoincideConResidenza").value,nome:t.vagliaForm.get("nome").value,denominazione:t.vagliaForm.get("cognome").value,contatti:!0===t.vagliaForm.get("domicilioRichiedenteCoincideConResidenza").value?null:{email:t.vagliaForm.get("email").value,pec:t.vagliaForm.get("pec").value,telefono:t.vagliaForm.get("telefono").value},indirizzo:!0===t.vagliaForm.get("domicilioRichiedenteCoincideConResidenza").value?null:t.indirizzo},i=t.vagliaForm.valid,n=!0===t.vagliaForm.get("domicilioRichiedenteCoincideConResidenza").value||t.isIndirizzoValid,o=i&&n;t.vagliaReady.emit({vaglia:e,isValid:o})}))},t.prototype.initVagliaForm=function(){var t,e,i,n,o,a,r,s;this.vagliaForm=new d.FormGroup({nome:new d.FormControl(null===(t=this.vagliaBDI)||void 0===t?void 0:t.nome),cognome:new d.FormControl(null===(e=this.vagliaBDI)||void 0===e?void 0:e.denominazione),email:new d.FormControl(null===(n=null===(i=this.vagliaBDI)||void 0===i?void 0:i.contatti)||void 0===n?void 0:n.email,[this.ValidateMail,d.Validators.maxLength(200)]),pec:new d.FormControl(null===(a=null===(o=this.vagliaBDI)||void 0===o?void 0:o.contatti)||void 0===a?void 0:a.pec,[this.ValidateMail,d.Validators.maxLength(200)]),telefono:new d.FormControl(null===(s=null===(r=this.vagliaBDI)||void 0===r?void 0:r.contatti)||void 0===s?void 0:s.telefono,[eo]),intestatoSudioLegale:new d.FormControl(null!=this.vagliaBDI&&this.vagliaBDI.intestatarioStudioLegale,this.isAntistatario?[d.Validators.required]:null),domicilioRichiedenteCoincideConResidenza:new d.FormControl(null!=this.vagliaBDI&&this.vagliaBDI.domicilioRichiedenteCoincideConResidenza,[d.Validators.required])})},t.prototype.getComuni=function(t){var e=this;t?this.modalitaPagamentoService.getComuni$(t).pipe(a.take(1)).subscribe((function(t){e.setComuni.emit(t);var i=t.find((function(t){return t.codiceCatastale===e.codiceCatastale}));e.getCapOptions.emit(null==i?void 0:i.codiceIstat)})):this.setComuni.emit([])},t.prototype.getCap=function(t){var e;t&&(this.codiceCatastale=t);var i=null===(e=this.comuni)||void 0===e?void 0:e.find((function(e){return e.codiceCatastale===t}));this.getCapOptions.emit(null==i?void 0:i.codiceIstat)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.ValidateMail=function(t){if(!t.value)return null;return/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/.test(t.value)?null:{invalidMail:!0}},t.prototype.onIndirizzoReady=function(t){this.indirizzo=t.indirizzo,this.isIndirizzoValid=t.isValid,this.indirizzoEmitter.emit({indirizzo:t.indirizzo,isValid:t.isValid})},t}();ao.decorators=[{type:e.Component,args:[{selector:"lib-vaglia-bdi",template:'<form [formGroup]="vagliaForm" [ngxsForm]="vagliaFormPath">\r\n\t<div class="row">\r\n\t\t<div class="col-12">\r\n\t\t\t<div class="col-12">\r\n\t\t\t\t<h3 class="h5 mb-0">{{ "accreditamento-bdi" | traduzione }}</h3>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-md-12 my-3">\r\n\t\t\t\t<div class="alert alert-primary" role="alert">\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t{{ "nota-bdi" | traduzione }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-12">\r\n\t\t\t\t\t<mat-radio-group class="radio-group"\r\n\t\t\t\t\t\t\t\t\taria-labelledby="radio-group-label-1"\r\n\t\t\t\t\t\t\t\t\tformControlName="domicilioRichiedenteCoincideConResidenza">\r\n\t\t\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="true">\r\n\t\t\t\t\t\t\t{{ "domicilio-coincide-con-residenza" | traduzione }}\r\n\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t\t<mat-radio-button class="radio-button pl-2" [value]="false">\r\n\t\t\t\t\t\t\t{{ "domicilio-non-coincide-con-residenza" | traduzione }}\r\n\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="col-12" *ngIf="!vagliaForm.controls[\'domicilioRichiedenteCoincideConResidenza\'].value">\r\n\t\t\t\t<div class="row my-2">\r\n\t\t\t\t\t<div class="col-md-6">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<input matInput [maxlength]="100" placeholder="{{ \'required\' | traduzione }}{{ \'nome\' | traduzione }}" formControlName="nome" />\r\n\t\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.controls[\'nome\'].invalid">\r\n\t\t\t\t\t\t\t\t{{ getErrorMessage(vagliaForm.controls[\'nome\']) | traduzione }}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="col-md-6">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<input matInput [maxlength]="100" placeholder="{{ \'required\' | traduzione }}{{ \'denominazione\' | traduzione }}" formControlName="cognome" />\r\n\t\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.controls[\'cognome\'].invalid">\r\n\t\t\t\t\t\t\t\t{{ getErrorMessage(vagliaForm.controls[\'cognome\']) | traduzione }}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<lib-indirizzo-pagamento [ngxsFormPath]="indirizzoVagliaFormPath"\r\n\t\t\t\t\t\t\t\t[nazioni]="nazioni"\r\n\t\t\t\t\t\t\t\t[province]="province"\r\n\t\t\t\t\t\t\t\t[comuni]="comuni"\r\n\t\t\t\t\t\t\t\t[capOptions]="capOptions"\r\n\t\t\t\t\t\t\t\t[indirizzo]="vagliaBDI?.indirizzo"\r\n\t\t\t\t\t\t\t\t(selectedProvinciaEmitter)="getComuni($event)"\r\n\t\t\t\t\t\t\t\t(selectedComuneEmitter)="getCap($event)"\r\n\t\t\t\t\t\t\t\t(indirizzoEmitter)="onIndirizzoReady($event)">\r\n\t\t\t\t>\r\n\t\t\t\t</lib-indirizzo-pagamento>\r\n\t\t\t\t<div class="row mt-2">\r\n\t\t\t\t\t<div class="col-12 col-md-4">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{\'email\' | traduzione}}</mat-label>\r\n\t\t\t\t\t\t\t<input matInput formControlName="email" />\r\n\t\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.controls[\'email\'].invalid">\r\n\t\t\t\t\t\t\t\t{{ getErrorMessage(vagliaForm.controls[\'email\']) | traduzione }}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="col-12 col-md-4">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{\'pec\' | traduzione}}</mat-label>\r\n\t\t\t\t\t\t\t<input matInput formControlName="pec" />\r\n\t\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.controls[\'pec\'].invalid">\r\n\t\t\t\t\t\t\t\t{{ getErrorMessage(vagliaForm.controls[\'pec\']) | traduzione }}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="col-12 col-md-4">\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-label>{{ "telefono" | traduzione }}</mat-label>\r\n\t\t\t\t\t\t\t<input matInput [maxlength]="20" formControlName="telefono" />\r\n\t\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.controls[\'telefono\'].invalid">\r\n\t\t\t\t\t\t\t\t{{ getErrorMessage(vagliaForm.controls[\'telefono\']) | traduzione }}\r\n\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class="col-md-12">\r\n\t\t\t\t\t\t<mat-error *ngIf="vagliaForm.getError(\'requiredMail\')">\r\n\t\t\t\t\t\t\t{{ "validation-requiredMail" | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<ng-container *ngIf="isAntistatario">\r\n\t\t\t\t<div class="col-12 mt-3">\r\n\t\t\t\t\t<h3 class="h5 mb-0">{{ "intestatario" | traduzione }}</h3>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-md-12 my-3">\r\n\t\t\t\t\t<mat-radio-group class="radio-group" aria-labelledby="radio-group-label-1" formControlName="intestatoSudioLegale">\r\n\t\t\t\t\t\t<mat-radio-button class="radio-button" [value]="false">{{ "me-medesimo" | traduzione }} </mat-radio-button>\r\n\t\t\t\t\t\t<mat-radio-button class="pl-3 radio-button" [value]="true">{{ "studio-legale" | traduzione }} </mat-radio-button>\r\n\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n\r\n',styles:[""]}]}],ao.ctorParameters=function(){return[{type:io}]},ao.propDecorators={vagliaBDI:[{type:e.Input}],comuni:[{type:e.Input}],capOptions:[{type:e.Input}],isAntistatario:[{type:e.Input}],nazioni:[{type:e.Input}],province:[{type:e.Input}],vagliaFormPath:[{type:e.Input}],indirizzoVagliaFormPath:[{type:e.Input}],setComuni:[{type:e.Output}],getCapOptions:[{type:e.Output}],resetIndirizzoForm:[{type:e.Output}],vagliaReady:[{type:e.Output}],indirizzoEmitter:[{type:e.Output}]};var ro=function(){function t(){this.selectedProvinciaEmitter=new e.EventEmitter,this.selectedComuneEmitter=new e.EventEmitter,this.indirizzoEmitter=new e.EventEmitter,this.subscription=new o.Subscription}return Object.defineProperty(t.prototype,"_disableForm",{set:function(t){this.disableForm=t,this.disableForm?this.indirizzoForm.disable():this.indirizzoForm.enable()},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.initIndirizzoForm(),this.setFormControlsValue(),this.subscription.add(this.indirizzoForm.controls.isEstero.valueChanges.subscribe((function(e){t.indirizzoForm.controls.civico.setValidators(e?[]:[d.Validators.required]),t.indirizzoForm.controls.civico.patchValue(null),t.indirizzoForm.controls.civico.updateValueAndValidity(),t.indirizzoForm.controls.provincia.setValidators(e?[]:[d.Validators.required]),t.indirizzoForm.controls.provincia.patchValue(null),t.indirizzoForm.controls.provincia.updateValueAndValidity(),t.indirizzoForm.controls.comune.setValidators(e?[]:[d.Validators.required]),t.indirizzoForm.controls.comune.patchValue(null),t.indirizzoForm.controls.comune.updateValueAndValidity(),t.indirizzoForm.controls.cap.setValidators(e?[]:[d.Validators.required]),t.indirizzoForm.controls.cap.patchValue(null),t.indirizzoForm.controls.cap.updateValueAndValidity(),t.indirizzoForm.controls.nazione.setValidators(e?[d.Validators.required]:[]),t.indirizzoForm.controls.nazione.patchValue(null),t.indirizzoForm.controls.nazione.updateValueAndValidity()}))),this.subscription.add(this.indirizzoForm.controls.provincia.valueChanges.subscribe((function(e){return t.selectedProvinciaEmitter.emit(e)}))),this.subscription.add(this.indirizzoForm.controls.comune.valueChanges.subscribe((function(e){return t.selectedComuneEmitter.emit(e)}))),this.indirizzoEmit()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.initIndirizzoForm=function(){this.indirizzoForm=new d.FormGroup({isEstero:new d.FormControl(null),indirizzo:new d.FormControl(null,[d.Validators.required]),nazione:new d.FormControl(null),civico:new d.FormControl(null),provincia:new d.FormControl(null),comune:new d.FormControl(null),cap:new d.FormControl(null)})},t.prototype.onProvinciaChange=function(t){this.indirizzoForm.controls.comune.patchValue(null),this.indirizzoForm.controls.comune.markAsTouched(),this.indirizzoForm.controls.cap.patchValue(null),this.indirizzoForm.controls.cap.markAsTouched()},t.prototype.onComuneChange=function(t){this.indirizzoForm.controls.cap.patchValue(null),this.indirizzoForm.controls.cap.markAsTouched()},t.prototype.indirizzoEmit=function(){var t=this;this.subscription.add(this.indirizzoForm.valueChanges.pipe(a.debounceTime(500)).subscribe((function(e){var i={strada:{civico:t.indirizzoForm.controls.civico.value,inidirizzo:t.indirizzoForm.controls.indirizzo.value,tipoToponimo:null},localita:{cap:t.indirizzoForm.controls.cap.value,comune:t.indirizzoForm.controls.comune.value,nazione:t.indirizzoForm.controls.nazione.value,provincia:t.indirizzoForm.controls.provincia.value}},n=t.indirizzoForm.valid;t.indirizzoEmitter.emit({indirizzo:i||null,isValid:n})})))},t.prototype.setFormControlsValue=function(){var t,e,i,n,o,a,r,s,l,c;this.indirizzoForm.controls.isEstero.setValue(!(!this.indirizzo||!(null===(e=null===(t=this.indirizzo)||void 0===t?void 0:t.localita)||void 0===e?void 0:e.comune.startsWith("Z")))),this.indirizzoForm.controls.indirizzo.setValue(this.indirizzo?this.indirizzo.strada.inidirizzo:null),this.indirizzoForm.controls.nazione.setValue(this.indirizzo?null===(n=null===(i=this.indirizzo)||void 0===i?void 0:i.localita)||void 0===n?void 0:n.nazione:null),this.indirizzoForm.controls.civico.setValue(this.indirizzo?this.indirizzo.strada.civico:null),this.indirizzoForm.controls.provincia.setValue(this.indirizzo&&!(null===(a=null===(o=this.indirizzo)||void 0===o?void 0:o.localita)||void 0===a?void 0:a.comune.startsWith("Z"))?this.indirizzo.localita.provincia:null),this.indirizzoForm.controls.comune.setValue(this.indirizzo&&!(null===(s=null===(r=this.indirizzo)||void 0===r?void 0:r.localita)||void 0===s?void 0:s.comune.startsWith("Z"))?this.indirizzo.localita.comune:null),this.indirizzoForm.controls.cap.setValue(this.indirizzo&&!(null===(c=null===(l=this.indirizzo)||void 0===l?void 0:l.localita)||void 0===c?void 0:c.comune.startsWith("Z"))?this.indirizzo.localita.cap:null)},t}();ro.decorators=[{type:e.Component,args:[{selector:"lib-indirizzo-pagamento",template:'<form [formGroup]="indirizzoForm" [ngxsForm]="ngxsFormPath">\r\n\t<div class="row">\r\n\t\t<div class="col-12">\r\n\t\t\t<div class="row align-items-center">\r\n\t\t\t\t<div class="col-12 col-md-4">\r\n\t\t\t\t\t<mat-checkbox formControlName="isEstero" color="primary">\r\n\t\t\t\t\t\t<info-tip-label label="indirizzo-estero"></info-tip-label>\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="row">\r\n\t\t\t\t<div class="col-12 col-md-4" *ngIf="indirizzoForm.controls[\'isEstero\'].value">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'nazione\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="nazione">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let nazione of nazioni" [value]="nazione.codiceCatastale">\r\n\t\t\t\t\t\t\t\t{{ nazione.denominazione }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'nazione\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-12" [ngClass]="indirizzoForm.controls[\'isEstero\'].value ? \' col-md-8\': \' col-md-10\'">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{\'indirizzo\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<input [maxlength]="70" formControlName="indirizzo" matInput>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'indirizzo\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-12 col-md-2" *ngIf="!indirizzoForm.controls[\'isEstero\'].value">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{\'civico\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<input [maxlength]="16" formControlName="civico" matInput>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'civico\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class="row" *ngIf="!indirizzoForm.controls[\'isEstero\'].value">\r\n\t\t\t\t<div class="col-12 col-md-5">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'provincia\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="provincia" (valueChange)="onProvinciaChange($event)">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let provincia of province" [value]="provincia.sigla">\r\n\t\t\t\t\t\t\t\t{{ provincia.denominazione }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'provincia\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-12 col-md-5">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'comune\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="comune" (valueChange)="onComuneChange($event)">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let comune of comuni" [value]="comune.codiceCatastale">\r\n\t\t\t\t\t\t\t\t{{ comune.denominazione }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'comune\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="col-12 col-md-2">\r\n\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t<mat-label>{{ \'required\' | traduzione }}{{ \'cap\' | traduzione }}</mat-label>\r\n\t\t\t\t\t\t<mat-select formControlName="cap">\r\n\t\t\t\t\t\t\t<mat-option *ngFor="let cap of capOptions" [value]="cap">\r\n\t\t\t\t\t\t\t\t{{ cap }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t<mat-error *ngIf="indirizzoForm.controls[\'cap\'].invalid">\r\n\t\t\t\t\t\t\t{{ \'validation-required\' | traduzione }}\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n\r\n\r\n',styles:[""]}]}],ro.ctorParameters=function(){return[]},ro.propDecorators={ngxsFormPath:[{type:e.Input}],nazioni:[{type:e.Input}],province:[{type:e.Input}],comuni:[{type:e.Input}],capOptions:[{type:e.Input}],indirizzo:[{type:e.Input}],_disableForm:[{type:e.Input,args:["disableForm"]}],selectedProvinciaEmitter:[{type:e.Output}],selectedComuneEmitter:[{type:e.Output}],indirizzoEmitter:[{type:e.Output}]};var so=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();so.decorators=[{type:e.Component,args:[{selector:"lib-dati-residenza",template:'<div class="row mt-4">\n\t<div class="col-12">\n\t\t<mat-expansion-panel class="panel" [expanded]="true" *ngIf="validateAndGetResidenza !=null && validateAndGetResidenza?.valido">\n\t\t\t<mat-expansion-panel-header [collapsedHeight]="\'48px\'" [expandedHeight]="\'48px\'" class="custom-header">\n\t\t\t\t<mat-panel-title>\n\t\t\t\t\t<h3 class="h5 mb-0"><info-tip-label label="dati-residenza"></info-tip-label></h3>\n\t\t\t\t</mat-panel-title>\n\t\t\t</mat-expansion-panel-header>\n\t\t\t<div class="collapse-body mt-2">\n\t\t\t\t<ng-container>\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'nazione\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="nazioneToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.nazione?.denominazione}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf="!validateAndGetResidenza?.residenza.estero" class="col-md-8">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'regione\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="regioneToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.regione?.denominazione}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-md-4">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'indirizzo\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="indirizzoToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.indirizzo}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div *ngIf="!validateAndGetResidenza?.residenza.estero" class="col-md-8">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'civico\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="civicoToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.civico}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngIf="!validateAndGetResidenza?.residenza.estero" class="row">\n\t\t\t\t\t\t<div class="col-md-4">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'provincia\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="provinciaToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.provincia?.denominazione}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-4">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'comune\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="comuneToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.comune?.denominazione}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-md-4">\n\t\t\t\t\t\t\t<p class="mb-0 font-weight-bold">{{\'cap\' | traduzione }}:</p>\n\t\t\t\t\t\t\t\x3c!-- <mat-hint *infoTip="capToltip"></mat-hint> --\x3e\n\t\t\t\t\t\t\t<p>{{validateAndGetResidenza?.residenza?.cap}}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t</mat-expansion-panel>\n\t</div>\n</div>\n',styles:[""]}]}],so.ctorParameters=function(){return[]},so.propDecorators={validateAndGetResidenza:[{type:e.Input}]};var lo=function(){};lo.decorators=[{type:e.NgModule,args:[{declarations:[Qn,no,oo,ao,ro,so],imports:[i.CommonModule,n.HttpClientModule,d.ReactiveFormsModule,O.NgxsFormPluginModule,z.MatFormFieldModule,f.MatSelectModule,q,b.MatInputModule,w.MatRadioModule,Hi,D.MatDatepickerModule,I.MatCheckboxModule,S.MatExpansionModule],exports:[Qn,no,oo,ao,ro],providers:[]}]}];var co=function(){},po=function(){},uo=function(){},mo=function(){function t(){}return t.prototype.isIncaricato=function(){return this.incaricatoTrasmissione},t.prototype.isPersonaGiuridica=function(){var t;return"PG"==(null===(t=this.tipoRicorrente)||void 0===t?void 0:t.codice)},t.prototype.isPersonaFisica=function(){var t;return"PF"==(null===(t=this.tipoRicorrente)||void 0===t?void 0:t.codice)},t.prototype.isAntistatario=function(){var t;return"AN"==(null===(t=this.tipoRicorrente)||void 0===t?void 0:t.codice)},t}(),fo=function(){};t.AccettazioneComponent=Xe,t.AllegatiComponent=ui,t.AllegatiModule=fi,t.AltriSoggettiComponent=$i,t.AltriSoggettiGiudiziarioDTO=Ni,t.AltriSoggettiNoEsproprioDTO=Ti,t.AutoritaEsproprianteDTO=pn,t.AutoritaOrdinanteDTO=ln,t.Azione=Ve,t.BonificoExtraSepaComponent=oo,t.BonificoSepaComponent=Qn,t.BozzaDepositoDTO=fn,t.ComponentOutputStatus=_,t.ComponentReducer=K,t.ComuneDTO=vn,t.ConfigurationModule=On,t.ContattiComponent=H,t.ContattoDTO=B,t.CostituzioneDepositoCauzionaleDTO=on,t.CostituzioneDepositoDTO=en,t.CostituzioneDepositoEsproprioDTO=an,t.CostituzioneDepositoGiudiziarioDTO=rn,t.CostituzioneDepositoNoEsproprioDTO=sn,t.CostituzioneDepositoVolontarioDTO=nn,t.Country=co,t.CreazioneBozzaResponse=gn,t.CronologiaStatoDTO=Mn,t.DatiDeposito=Ei,t.DatiDepositoDTO=Ri,t.DatiDepositoGiudiziarioDTO=Vi,t.DatiDepositoNoEsproprioDTO=cn,t.DatiOperaDTO=yn,t.DatiRichiedenteDTO=Q,t.DatiTribunaleComponent=gi,t.DelegheComponent=Ne,t.DelegheService=wt,t.DepositiModule=Qi,t.DichiarazioneDTO=Qe,t.DocumentazioneComponent=si,t.DocumentoDTO=mn,t.DomicilioDTO=Y,t.EMPTY_INDIRIZZO_MODEL={cap:"",civico:"",comune:{codiceCatastale:"",codiceIstat:"",denominazione:""},estero:!1,id:null,indirizzo:"",nazione:{codiceCatastale:"",denominazione:"",sigla:"",id:""},presso:"",provincia:{denominazione:"",sigla:""},regione:{denominazione:"",sigla:""}},t.EnteRichiedenteCauzioneDTO=dn,t.EstremiPersonaFisicaComponent=no,t.GenericModalComponent=Ee,t.GenericModalData=Re,t.IdentificativoRichiestaDTO=hn,t.IndirizzoComponent=je,t.IndirizzoDTO=He,t.IndirizzoPagamentoComponent=ro,t.InfoAnagrafichePFDTO=mt,t.InfoNascitaPFDTO=ft,t.InfoTip=ji,t.InfoTipLabelComponent=_i,t.InfoTipModule=Hi,t.ListaPagamentiComponent=Dn,t.LocalitaDTO=Ze,t.MY_DATE_FORMATS=Yi,t.MessageService=j,t.MieDelegheDTO=St,t.ModalitaPagamentoDTO=Fi,t.ModalitaPagamentoExtraSepaForm=po,t.ModalitaPagamentoModule=lo,t.ModalitaPagamentoVagliaForm=fo,t.Modals=Ae,t.NaturaRichiedenteDTO=ht,t.NaturaRichiedenteRequestDTO=Fn,t.NazioneDTO=xn,t.ORGANO_CORTE_DI_APPELLO="CA",t.ORGANO_TAR="TA",t.PagamentiModule=$n,t.PagamentoComponent=Di,t.ParticellaDTO=un,t.PersonaFisicaComponent=$e,t.PersonaFisicaDTO=bt,t.PersonaGiuridicaComponent=Be,t.PersonaGiuridicaDTO=Ft,t.PfComponent=Li,t.PgComponent=ki,t.ProprietarioDTO=bn,t.ProvinciaDTO=zn,t.RappresentanteDTO=Ct,t.RicercaPfComponent=Oi,t.RicercaPgComponent=Gi,t.RichiedenteComponent=X,t.RtsDTO=In,t.StepperNavigatorComponent=Mi,t.StradaDTO=Ye,t.TIPOLOGIE_ATTORE=[{value:!1,descrizione:"richiedente"},{value:!0,descrizione:"incaricato-alla-trasmissione"}],t.TRIBUNALE="T",t.TabellaSediComponent=qi,t.TerritorioService=ke,t.TipiDocumentoRequestDTO=Cn,t.TipoAttore=uo,t.TipoDocumento=tn,t.TipoDocumentoDTO=Sn,t.TipologiaDepositoComponent=pi,t.TipologiaRichiedente=mo,t.TipologicaDTO=Xi,t.TipologicheService=hi,t.TranslateModule=q,t.TranslatePipe=L,t.TranslateService=k,t.TribunaleDTO=wn,t.UpperCaseDirective=Ui,t.UppercaseModule=Zi,t.Utente=Pt,t.UtenteService=xt,t.VagliaBdiComponent=ao,t.ValidateCodiceFiscale=function(t){return Bn.test(t.value)?null:{codiceFiscaleInvalido:!0}},t.ValidateCodiceFiscalePIVA=to,t.ValidateDate=function(t){return(new Date).getTime()<t.value?{invalidDate:!0}:null},t.ValidateIban=function(t){return qn.test(t.value)?null:{invalidIban:!0}},t.ValidateImportoFormato=function(t){return/^[0-9]*,[0-9]{2}$/.test(t)},t.ValidateMail=function(t){return Ln.test(t.value)?null:{invalidMail:!0}},t.ValidateName=Xn,t.ValidatePartitaIva=function(t){return jn.test(t.value)?null:{cfInvalidoFormalmente:!0}},t.ValidatePassword=function(t){return Gn.test(t.value)?null:{invalidPassword:!0}},t.ValidatePhone=eo,t.ValidatoreSwift=function(t){return _n.test(t.value)?null:{invalidSwift:!0}},t.ValidazioneData=function(t){return kn.test(t.value)?null:{invalidFormatDate:!0}},t._codiceFiscalePiva=Hn,t.anno=/^[1-2][0-9]{3}$/,t.annotationsOf=Ie,t.bind=Ut,t.capPattern="[0-9][0-9][0-9][0-9][0-9]",t.coalesce=de,t.codiceFiscale=Bn,t.codiceFiscalePiva="^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$|^[0-9]{11}$",t.codiceFiscaleServiceFactory=Wi,t.constructorNameOf=xe,t.constructorOf=Se,t.curry=jt,t.formatoData=kn,t.formatoEmail=Ln,t.formatoName=Zn,t.formatoSwift=_n,t.fromIdAndTipo=Ci,t.ftor=ze,t.getDateErrorMessage=Kn,t.getErrorMessage=Wn,t.given=ve,t.iban=qn,t.is=Qt,t.isDefined=Dt,t.isGreaterOrEqualTo=oe,t.isGreaterThan=te,t.isLessOrEqualTo=re,t.isLessThan=ie,t.isNotNull=Ot,t.isNotNullOrUndefined=kt,t.isNotUndefined=Et,t.isNull=Nt,t.isNullOrUndefined=$t,t.isUndefined=Rt,t.lazyApply1=Kt,t.modalitaPagamentoExtraSepaFormDefaults={existsDelegatoRiscossione:!1,swift:null,banca:null,indirizzo:null,codiceContoPresent:!1,codiceConto:null,iban:null,swiftBicPresent:!1,nazione:null,citta:null,zipCode:null},t.modalitaPagamentoVagliaFormDefaults={nome:null,cognome:null,email:null,pec:null,telefono:null,intestatoSudioLegale:!1,domicilioRichiedenteCoincideConResidenza:!1},t.moneyCommaSeparated=/^\d+,\d{2}$/,t.moneyCommaSeparatedGreaterThanZero=/^\s*(?=.*[1-9])\d*(?:\,\d{1,2})?\s*$/,t.moneyPattern=/^([0-9]+)|((([1-9][0-9]*)|([0-9]))([,])[0-9]{2})$/,t.nSentenza=/^[0-9]*\/[1-2][0-9]{3}$/,t.not=le,t.numRegex=/^-?\d*[.,]?\d{0,2}$/,t.numberPattern=/^[0-9]*$/,t.numbers=/^\d+/,t.partial1=Yt,t.partitaIva=jn,t.passwordPattern=Gn,t.phoneNumberPattern=Un,t.protoOf=Fe,t.regioneDTO=Pn,t.self=_t,t.validationMessages=Yn,t.validationServiceFactory=Ki,t.zeroCentoPattern="^([0-9]|[1-9][0-9]|100)$",t.ɵ0=Ji,t.ɵ1=Vt,t.ɵ10=Zt,t.ɵ11=Wt,t.ɵ12=Jt,t.ɵ13=Xt,t.ɵ14=ee,t.ɵ15=ne,t.ɵ16=ae,t.ɵ17=se,t.ɵ18=ce,t.ɵ19=pe,t.ɵ2=At,t.ɵ20=fe,t.ɵ21=ge,t.ɵ22=be,t.ɵ23=ye,t.ɵ24=Ce,t.ɵ25=we,t.ɵ26=Pe,t.ɵ27=De,t.ɵ3=Tt,t.ɵ4=Mt,t.ɵ5=Gt,t.ɵ6=Lt,t.ɵ7=qt,t.ɵ8=Bt,t.ɵ9=Ht,t.ɵa=G,t.ɵb=qe,t.ɵc=Me,t.ɵd=Oe,t.ɵe=U,t.ɵf=J,t.ɵg=Z,t.ɵh=Ge,t.ɵi=Le,t.ɵj=Ue,t.ɵk=We,t.ɵl=Ke,t.ɵm=Je,t.ɵn=di,t.ɵo=ci,t.ɵp=Ai,t.ɵq=mi,t.ɵr=Bi,t.ɵs=Vn,t.ɵt=Rn,t.ɵu=En,t.ɵv=Tn,t.ɵw=Nn,t.ɵx=An,t.ɵy=io,t.ɵz=so,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=infordata-web-portal-common-component-lib.umd.min.js.map