PageSourceSearch

https://mirame.chduero.es/chduero/3541.6c333c61bae02c61.js

js chduero.es collected 2026-09-24 18:09:47 UTC 99,814 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkchd_mirame_web=self.webpackChunkchd_mirame_web||[]).push([[3541],{6083:(it,q,r)=>{r.d(q,{G:()=>g});var a=r(5e3),u=r(8759),d=r(9783),M=r(60),t=r(4623),A=r(508);function N(f,E){if(1&f&&(a.ynx(0),a.TgZ(1,"div"),a._UZ(2,"img",5),a.qZA(),a.BQk()),2&f){const h=a.oxw().$implicit;a.xp6(2),a.s9C("src",h.url,a.LSH)}}function I(f,E){if(1&f&&(a.TgZ(0,"div",6),a._UZ(1,"img",7),a.qZA()),2&f){const h=a.oxw().$implicit;a.xp6(1),a.s9C("src",h.url,a.LSH)}}function O(f,E){if(1&f&&(a.TgZ(0,"div",8)(1,"mat-list")(2,"mat-list-item",9)(3,"div",10),a._uU(4),a.qZA()()()()),2&f){const h=a.oxw().$implicit;a.xp6(4),a.Oqu(h.comment)}}function U(f,E){if(1&f&&(a.YNc(0,N,3,1,"ng-container",2),a.YNc(1,I,2,1,"ng-template",null,3,a.W1O),a.YNc(3,O,5,1,"div",4)),2&f){const h=E.$implicit,x=a.MAs(2),P=a.oxw();a.Q6J("ngIf",P.width100)("ngIfElse",x),a.xp6(3),a.Q6J("ngIf",P.showComment&&""!==h.comment.trim())}}let g=(()=>{class f{constructor(){this.width100=!1,this.showComment=!0,this._images=[]}set images(h){this._images=h.map(x=>"string"==typeof x?{url:x,comment:""}:x)}get images(){return this._images}}return f.\u0275fac=function(h){return new(h||f)},f.\u0275cmp=a.Xpm({type:f,selectors:[["app-carousel-basic"]],inputs:{images:"images",config:"config",width100:"width100",showComment:"showComment"},decls:2,vars:8,consts:[[3,"value","numVisible","numScroll","circular","orientation","autoplayInterval","showIndicators","showNavigators"],["pTemplate","item"],[4,"ngIf","ngIfElse"],["other",""],["class","text-center",4,"ngIf"],[1,"d-block","w-100","bg-secondary",3,"src"],[1,"image-container"],[3,"src"],[1,"text-center"],[1,"bar-light-blue","h-auto","py-2"],["matLine","",1,"info","text-wrap"]],template:function(h,x){1&h&&(a.TgZ(0,"p-carousel",0),a.YNc(1,U,4,3,"ng-template",1),a.qZA()),2&h&&a.Q6J("value",x.images)("numVisible",x.config.numVisible)("numScroll",x.config.numScroll)("circular",x.config.circular)("orientation",x.config.orientation)("autoplayInterval",x.config.autoplayInterval)("showIndicators",x.config.showIndicators)("showNavigators",x.config.showNavigators)},directives:[u.l,d.jx,M.O5,t.i$,t.Tg,A.X2],styles:[".image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:20rem}img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.info[_ngcontent-%COMP%]{font-size:14px!important}"]}),f})()},1127:(it,q,r)=>{r.d(q,{y:()=>j});var a=r(5e3),u=r(3075),d=r(7470),M=r(3430),t=r(8825),A=r(60),N=r(7322),I=r(4107),O=r(508),U=r(5397),g=r(7423),f=r(4894);function E(p,Z){if(1&p&&(a.TgZ(0,"mat-option",18),a._uU(1),a.qZA()),2&p){const c=Z.$implicit;a.Q6J("value",c.id),a.xp6(1),a.hij(" ",c.nombre," ")}}function h(p,Z){1&p&&(a.TgZ(0,"mat-error"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&p&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"validacionForm.requerido")," "))}function x(p,Z){if(1&p){const c=a.EpF();a.TgZ(0,"mat-form-field",14)(1,"mat-label"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"mat-select",15),a.NdJ("selectionChange",function(D){return a.CHM(c),a.oxw().getAditionalDistances(D)}),a.YNc(5,E,2,2,"mat-option",16),a.qZA(),a.YNc(6,h,3,3,"mat-error",17),a.qZA()}if(2&p){const c=a.oxw();let v;a.xp6(2),a.Oqu(a.lcZ(3,4,"elementosRelacionados.nuevaRelacion.lblTipo")),a.xp6(2),a.Q6J("errorStateMatcher",c.matcher),a.xp6(1),a.Q6J("ngForOf",c.entityTypes),a.xp6(1),a.Q6J("ngIf",null==(v=c.newRelationGroup.get("tipoElemento"))?null:v.hasError("required"))}}function P(p,Z){if(1&p&&(a.TgZ(0,"mat-option",18),a._uU(1),a.qZA()),2&p){const c=Z.$implicit;a.Q6J("value",c.id),a.xp6(1),a.hij(" ",c.nombre," ")}}function b(p,Z){1&p&&(a.TgZ(0,"mat-error"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&p&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"validacionForm.requerido")," "))}function k(p,Z){if(1&p){const c=a.EpF();a.TgZ(0,"mat-form-field",19)(1,"mat-label"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"mat-select",20),a.NdJ("selectionChange",function(D){return a.CHM(c),a.oxw().getRelatableElements(D)}),a.YNc(5,P,2,2,"mat-option",16),a.qZA(),a.YNc(6,b,3,3,"mat-error",17),a.qZA()}if(2&p){const c=a.oxw();let v;a.xp6(2),a.Oqu(a.lcZ(3,4,"elementosRelacionados.nuevaRelacion.lblDistancia")),a.xp6(2),a.Q6J("errorStateMatcher",c.matcher),a.xp6(1),a.Q6J("ngForOf",c.distanceValues),a.xp6(1),a.Q6J("ngIf",null==(v=c.newRelationGroup.get("tipoElemento"))?null:v.hasError("required"))}}function W(p,Z){if(1&p&&(a.TgZ(0,"mat-option",18),a._uU(1),a.qZA()),2&p){const c=Z.$implicit;a.Q6J("value",c.id),a.xp6(1),a.AsE(" ",c.id," - ",c.nombre," ")}}function K(p,Z){1&p&&(a.TgZ(0,"mat-error"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&p&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"validacionForm.requerido")," "))}function Q(p,Z){if(1&p&&(a.TgZ(0,"mat-form-field",21)(1,"mat-label"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"mat-select",22),a.YNc(5,W,2,3,"mat-option",16),a.qZA(),a.YNc(6,K,3,3,"mat-error",17),a.qZA()),2&p){const c=a.oxw();let v;a.xp6(2),a.Oqu(a.lcZ(3,4,"elementosRelacionados.nuevaRelacion.lblRelacion")),a.xp6(2),a.Q6J("errorStateMatcher",c.matcher),a.xp6(1),a.Q6J("ngForOf",c.relatableElements),a.xp6(1),a.Q6J("ngIf",null==(v=c.newRelationGroup.get("tipoElemento"))?null:v.hasError("required"))}}function X(p,Z){if(1&p&&(a.TgZ(0,"p",25),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&p){const c=a.oxw(2);a.Q6J("hidden",!c.searched),a.xp6(1),a.Oqu(a.lcZ(2,2,"elementosRelacionados.nuevaRelacion.noRelacionables"))}}function L(p,Z){1&p&&a._UZ(0,"app-spinner")}function z(p,Z){if(1&p&&(a.YNc(0,X,3,4,"p",23),a.YNc(1,L,1,0,"ng-template",null,24,a.W1O)),2&p){const c=a.MAs(2),v=a.oxw();a.Q6J("ngIf",v.loaded)("ngIfElse",c)}}let j=(()=>
1{class p{constructor(c){this.fb=c,this.newTypeEvent=new a.vpe,this.newRelationDataEvent=new a.vpe,this.matcher=new t.o,this.disableDeleteBtn=!0,this.searched=!1,this.loaded=!1}ngOnInit(){this.createForm()}createForm(){this.newRelationGroup=this.fb.group({codTipo:this.fb.control({value:"",disabled:!1},u.kI.required),codDistancia:this.fb.control({value:"",disabled:!0},u.kI.required),elementosRelacionados:this.fb.control({value:"",disabled:!1},u.kI.required)}),this.distanceValues=Array.isArray(this.distanceCombo)?[...this.distanceCombo]:[...this.distanceCombo.distanciasDefecto],this.distanceValues.length>0&&this.newRelationGroup.get("codDistancia").patchValue(this.distanceValues[0].id)}getRelatableElements(c){this.loaded=!1,this.relatableElements=[],"codTipo"===c.source.ngControl.name&&!this.newRelationGroup.get("codDistancia").enabled&&this.newRelationGroup.get("codDistancia").enable(),this.newTypeEvent.emit(new M.o(this.newRelationGroup.value.codTipo,this.newRelationGroup.value.codDistancia))}ngOnChanges(c){c.relatableElements.isFirstChange()||(this.relatableElements=c.relatableElements.currentValue,this.searched=!0,this.disableDeleteBtn=0===this.relatableElements.length),this.loaded=!0}onSubmit(){this.newRelationGroup.invalid||this.newRelationDataEvent.emit(this.newRelationGroup.value)}getAditionalDistances(c){if(!Array.isArray(this.distanceCombo)&&!d.c.isNullOrEmptyOrUndefined(this.distanceCombo.distanciasEntidadesRelacionadas)){this.distanceValues=[...this.distanceCombo.distanciasDefecto];const v=this.distanceCombo.distanciasEntidadesRelacionadas.find(R=>R.idEntidadRelacionada===c.value);v&&v.distanciasAdicionales.length>0&&this.distanceValues.push(...v.distanciasAdicionales);const D=this.newRelationGroup.value.codDistancia;D&&this.distanceValues.length>0&&!this.distanceValues.find(R=>R.id===D)&&this.newRelationGroup.get("codDistancia").setValue(this.distanceValues[this.distanceValues.length-1].id)}this.getRelatableElements(c)}}return p.\u0275fac=function(c){return new(c||p)(a.Y36(u.qu))},p.\u0275cmp=a.Xpm({type:p,selectors:[["app-related-element-form"]],inputs:{elemName:"elemName",entityTypes:"entityTypes",distanceCombo:"distanceCombo",relatableElements:"relatableElements"},outputs:{newTypeEvent:"newTypeEvent",newRelationDataEvent:"newRelationDataEvent"},features:[a.TTD],decls:24,vars:13,consts:[[1,"container-subtitle","mt-1"],[3,"formGroup","ngSubmit"],["newRelationForm","ngForm"],[1,"container"],[1,"row"],[1,"col"],["appearance","fill","class","width-100",4,"ngIf"],["appearance","fill","class","width-50",4,"ngIf"],[1,"col-md-12"],["appearance","fill","class","width-76",4,"ngIf","ngIfElse"],["noRelacionables",""],[1,"float-end"],["type","submit","mat-flat-button","",1,"btn-first",3,"disabled"],[1,"fa-regular","fa-floppy-disk"],["appearance","fill",1,"width-100"],["id","codTipo","formControlName","codTipo",3,"errorStateMatcher","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"value"],["appearance","fill",1,"width-50"],["id","codDistancia","formControlName","codDistancia",3,"errorStateMatcher","selectionChange"],["appearance","fill",1,"width-76"],["id","elementosRelacionados","formControlName","elementosRelacionados","multiple","",3,"errorStateMatcher"],[3,"hidden",4,"ngIf","ngIfElse"],["loading",""],[3,"hidden"]],template:function(c,v){if(1&c&&(a.TgZ(0,"div",0)(1,"h2"),a._uU(2),a.ALo(3,"translate"),a.qZA()(),a.TgZ(4,"form",1,2),a.NdJ("ngSubmit",function(){return v.onSubmit()}),a.TgZ(6,"div",3)(7,"div",4)(8,"div",5),a.YNc(9,x,7,6,"mat-form-field",6),a.qZA(),a.TgZ(10,"div",5),a.YNc(11,k,7,6,"mat-form-field",7),a.qZA()(),a.TgZ(12,"div",4)(13,"div",8),a.YNc(14,Q,7,6,"mat-form-field",9),a.YNc(15,z,3,2,"ng-template",null,10,a.W1O),a.qZA()()(),a.TgZ(17,"div",4)(18,"div",8)(19,"div",11)(20,"button",12),a._uU(21),a.ALo(22,"translate"),a._UZ(23,"i",13),a.qZA()()()()()),2&c){const D=a.MAs(16);a.xp6(2),a.AsE("",a.lcZ(3,9,"elementosRelacionados.nuevaRelacion.titulo"),' "',v.elemName,'"'),a.xp6(2),a.Q6J("formGroup",v.newRelationGroup),a.xp6(5),a.Q6J("ngIf",v.entityTypes.length>0),a.xp6(2),a.Q6J("ngIf",v.distanceValues.length>0),a.xp6(3),a.Q6J("ngIf",v.relatableElements.length>0)("ngIfElse",D),a.xp6(6),a.Q6J("disabled",v.disableDeleteBtn),a.xp6(1),a.hij("",a.lcZ(22,11,"botones.guardar")," ")}},directives:[u._Y,u.JL,u.sg,A.O5,N.KE,N.hX,I.gD,u.JJ,u.u,A.sg,O.ey,N.TO,U.O,g.lW],pipes:[f.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),p})()},3541:(it,q,r)=>{r.r(q),r.d(q,{HttpLoaderFactory:()=>mt,SpringModule:()=>yn});
1var a=r(4486),u=r(3932),d=r(3179),M=r(7470),t=r(5e3),A=r(4961),N=r(8914),I=r(1250),O=r(4834),U=r(6083),g=r(60),f=r(4623),E=r(508),h=r(7278),x=r(7238),P=r(5397),b=r(4894);function k(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",9)(2,"mat-list",10)(3,"mat-list-item",11)(4,"div",12)(5,"span",13),t.ALo(6,"translate"),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"span",14),t._uU(10),t.qZA()()()()(),t.TgZ(11,"div",9)(12,"mat-list",10)(13,"mat-list-item",11)(14,"div",12)(15,"span",13),t.ALo(16,"translate"),t._uU(17),t.ALo(18,"translate"),t.qZA(),t.TgZ(19,"span",14),t._uU(20),t.ALo(21,"number"),t.ALo(22,"translate"),t.qZA()()()()(),t.BQk()),2&n){const e=s.ngIf,i=t.oxw();t.xp6(5),t.s9C("matTooltip",t.lcZ(6,7,"spring.data.tltipspring")),t.xp6(2),t.Oqu(t.lcZ(8,9,"spring.data.spring")),t.xp6(3),t.Oqu(null==e?null:e.manantiales),t.xp6(5),t.s9C("matTooltip",t.lcZ(16,11,"spring.data.tltipSupficieCuenca")),t.xp6(2),t.Oqu(t.lcZ(18,13,"spring.data.supficieCuenca")),t.xp6(3),t.AsE("",t.xi3(21,15,null==e?null:e.superficieCuenca,i.numEnt)," ",t.lcZ(22,18,"unidades.km2"),"")}}function W(n,s){1&n&&t._UZ(0,"app-spinner")}let K=(()=>{class n{constructor(e,i,o){this.springService=e,this.configService=i,this.selectedTabService=o,this.images=[],this.numEnt=d.C.numEnt,this.carouselConfiguration={numVisible:1,numScroll:1,circular:!0,orientation:"horizontal",autoplayInterval:1e4,showIndicators:!1,showNavigators:!0},this.selectedTabService.changeTab(0)}ngOnInit(){const e=this.configService.getCarouselImages("spring");this.images=M.c.getCarouselItems(e,d.C.tipoEntidad.manantiales),this.manantialEnCifras$=this.springService.getManantialesEnCifras()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(A.s),t.Y36(N.E),t.Y36(I.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-data"]],decls:23,vars:15,consts:[[1,"container-title"],[1,"mb-2"],[1,"container-text"],[1,"container","mb-4"],[1,"row"],[1,"col","carousel-basic"],[3,"images","config"],[4,"ngIf","ngIfElse"],["loading",""],[1,"col-md-6"],["dense",""],[1,"bar-gradient"],["matLine",""],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[1,"float-end"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.ALo(3,"translate"),t.qZA()(),t._UZ(4,"mat-divider",1),t.TgZ(5,"div",2)(6,"p"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",3)(10,"div",4)(11,"div",5),t._UZ(12,"app-carousel-basic",6),t.qZA()()(),t.TgZ(13,"div",0)(14,"h2"),t._uU(15),t.ALo(16,"translate"),t.qZA()(),t._UZ(17,"mat-divider",1),t.TgZ(18,"div",4),t.YNc(19,k,23,20,"ng-container",7),t.ALo(20,"async"),t.qZA(),t.YNc(21,W,1,0,"ng-template",null,8,t.W1O)),2&e){const o=t.MAs(22);t.xp6(2),t.Oqu(t.lcZ(3,7,"spring.data.queEsUnManantial")),t.xp6(5),t.Oqu(t.lcZ(8,9,"spring.data.defManantial")),t.xp6(5),t.Q6J("images",i.images)("config",i.carouselConfiguration),t.xp6(3),t.Oqu(t.lcZ(16,11,"spring.data.springCifras")),t.xp6(4),t.Q6J("ngIf",t.lcZ(20,13,i.manantialEnCifras$))("ngIfElse",o)}},directives:[O.d,U.G,g.O5,f.i$,f.Tg,E.X2,h.M,x.gM,P.O],pipes:[b.X$,g.Ov,g.JJ],styles:[".container-title[_ngcontent-%COMP%]{border-left:6px solid #1c7696;padding-left:1rem}.container-subtitle[_ngcontent-%COMP%]{color:#1c7696}.bar-gradient[_ngcontent-%COMP%]{margin-bottom:8px;border-radius:.85rem;background:-prefix-linear-gradient(left,#d1e3ea,#f1fafd);background:linear-gradient(to right,#d1e3ea 20%,#f1fafd)}.bar-light-bluewhite[_ngcontent-%COMP%]{display:inline-flex}.bar-light-text[_ngcontent-%COMP%]{border-top-left-radius:.85rem;border-bottom-left-radius:.85rem;padding:16px;background-color:#d1e3ea;font-weight:500}.bar-light-numbers[_ngcontent-%COMP%]{border-top-right-radius:.85rem;border-bottom-right-radius:.85rem;padding:16px;border:1px solid #d1e3ea}.bar-lighter-bluewhite[_ngcontent-%COMP%]{display:inline-flex}.bar-lighter-text[_ngcontent-%COMP%]{border-top-left-radius:.85rem;border-bottom-left-radius:.85rem;padding:16px;background-color:#f1fafd;font-weight:500}.bar-lighter-numbers[_ngcontent-%COMP%]{border-top-right-radius:.85rem;border-bottom-right-radius:.85rem;padding:16px;border:1px solid #f1fafd}.bar-light-blue[_ngcontent-%COMP%]{width:100%;border-radius:.85rem;padding:6px;background-color:#d1e3ea;float:right;font-weight:500}.bar-lighter-blue[_ngcontent-%COMP%]{width:90%;border-radius:.85rem;padding:6px;background-color:#f1fafd;float:right;font-weight:500}"]}),n})();var Q=r(7706);let X=(()=>{class n{constructor(e,i){this.languageChangeService=e,this.translate=i,this.languageChangeService.language$.subscribe(o=>{this.translate.use(o)})}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(Q.S),t.Y36(b.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-search"]],decls:1,vars:0,template:function(e,i){1&e&&t._UZ(0,"router-outlet")},directives:[u.lC],styles:[""]}),n})();var L=r(33),z=r(5563);let j=(()=>{class n{constructor(e,i,o){this.entityMenuService=e,this.translate=i,this.languageChangeService=o,this.languageChangeService.language$.subscribe(l=>{this.translate.currentLang="",this.translate.use(l),this.translate.get("spring.fichaGeneral.titulo").subscribe(m=>{this.entityMenu={type:m,datalink:"data",searchlink:"search",generalDataLink:"search/general",technicalDataLink:"search/technical",entityType:d.C.tipoEntidad.manantiales},this.entityMenuService.entityMenuChange(this.entityMenu)})})}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(L.$),t.Y36(b.sK),t.Y36(Q.S))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-spring"]],decls:5,vars:0,consts:[[1,"row"],[1,"col-12","col-md-auto"],[1,"col","col-lg-8","col-xl"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"app-entity-menu"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"router-outlet"),t.qZA()())},directives:[z.A,u.lC],styles:[""]}),n})();class p{constructor(s,e,i){this.newSearch=s,this.count=e,this.data=i}}var Z=r(6207),c=r(4511);
1function v(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"h3",5),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"app-search-table",6),t.NdJ("changePageEvent",function(o){return t.CHM(e),t.oxw().updatePage(o)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(2),t.Oqu(t.lcZ(3,4,"formBusqueda.resultado")),t.xp6(2),t.Q6J("searchResult",e.springs)("tableColumns",e.tableConfiguration)("visor",e.visorLink)}}function D(n,s){1&n&&(t.TgZ(0,"div")(1,"div",8)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()()()),2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"formBusqueda.noResultados")))}function R(n,s){if(1&n&&t.YNc(0,D,5,3,"div",7),2&n){const e=t.oxw();t.Q6J("ngIf",e.springs&&0===e.springs.data.length)}}let _t=(()=>{class n{constructor(e,i,o){this.springService=e,this.translate=i,this.selectedTabService=o,this.visorLink="/viewer/"+d.C.springEntity,this.disabledReportButton=!0,this.translate.get(["spring.busqueda.tabla.codigo","spring.busqueda.tabla.nombre"]).subscribe(l=>{this.tableConfiguration=this.getTableConfiguration(l)}),this.formStorageType=M.c.getEntityName(d.C.tipoEntidad.manantiales,!0),this.selectedTabService.changeTab(0)}getTableConfiguration(e){return[{columnDef:"detalle",header:"",cell:i=>""},{columnDef:e["spring.busqueda.tabla.codigo"],header:this.translate.instant("spring.busqueda.tabla.codigo"),cell:i=>`${i.id}`},{columnDef:e["spring.busqueda.tabla.nombre"],header:this.translate.instant("spring.busqueda.tabla.nombre"),cell:i=>`${i.nombre+this.nombresAltToString(i)}`}]}ngOnInit(){}ngOnDestroy(){}search(e){this.searchFilter=e,this.springService.getSprings(e).subscribe(i=>{this.springService.getCountSprings(e).subscribe(o=>{this.count=o,this.disabledReportButton=!(this.count>0),this.springs=new p(!0,o,i)})})}nombresAltToString(e){let i="";if(null!=e.alternativeNames)for(const o of e.alternativeNames)""==i&&(i=" ("),i=i+o+", ";return""!=i&&(i=i.substring(0,i.length-2)+")"),i}updatePage(e){"C\xf3digo"==e.sortField&&(e.sortField="id"),this.springService.getSprings(this.searchFilter,e.pageNumber.toString(),e.pageSize.toString(),e.sortDirection,e.sortField).subscribe(i=>{this.springs=new p(!1,this.count,i)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(A.s),t.Y36(b.sK),t.Y36(I.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-search-list"]],decls:9,vars:7,consts:[[1,"container-title"],[1,"mb-2"],[3,"typeKey","disabledReportButton","newSearchEvent"],[4,"ngIf","ngIfElse"],["noResultados",""],["appBold",""],[3,"searchResult","tableColumns","visor","changePageEvent"],[4,"ngIf"],[1,"container-subtitle"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.ALo(3,"translate"),t.qZA()(),t._UZ(4,"mat-divider",1),t.TgZ(5,"app-basic-form",2),t.NdJ("newSearchEvent",function(l){return i.search(l)}),t.qZA(),t.YNc(6,v,5,6,"ng-container",3),t.YNc(7,R,1,1,"ng-template",null,4,t.W1O)),2&e){const o=t.MAs(8);t.xp6(2),t.Oqu(t.lcZ(3,5,"spring.busqueda.titulo")),t.xp6(3),t.Q6J("typeKey",i.formStorageType)("disabledReportButton",i.disabledReportButton),t.xp6(1),t.Q6J("ngIf",i.tableConfiguration&&null!=i.springs&&i.springs.data.length>0)("ngIfElse",o)}},directives:[O.d,Z.P,g.O5,h.M,c.D],pipes:[b.X$],styles:[""]}),n})();var tt=r(2170),ft=r(2511),B=r(4209),S=r(3468),ht=r(5194),w=r(2600),F=r(7423),at=r(5245);function bt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",18)(1,"div",19)(2,"span",20),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",14),t._uU(7),t.qZA()()()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipNombre")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaGeneral.lblNombre")),t.xp6(3),t.Oqu(e.nombre)}}function vt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",18)(1,"div",19)(2,"span",20),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",14),t._uU(7),t.qZA()()()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipProvincia")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaGeneral.lblProvincia")),t.xp6(3),t.Oqu(e.provincia)}}
1function Ct(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",18)(1,"div",19)(2,"span",20),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",14),t._uU(7),t.qZA()()()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipMunicipios")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaGeneral.lblMunicipios")),t.xp6(3),t.Oqu(e.municipio)}}function xt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",25),t._uU(1),t.qZA()),2&n){const e=s.$implicit;t.xp6(1),t.Oqu(e)}}function Tt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"mat-list-item",21)(2,"span",22),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"mat-list",23),t.YNc(7,xt,2,1,"mat-list-item",24),t.qZA(),t.BQk()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipEspProtegidos")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaGeneral.lblEspProtegidos")),t.xp6(3),t.Q6J("ngForOf",e.espaciosProtegidos)}}function Zt(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",2)(1,"div",3)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",4),t.TgZ(5,"div",5)(6,"div",6)(7,"mat-list",7),t.YNc(8,bt,8,7,"mat-list-item",8),t.YNc(9,vt,8,7,"mat-list-item",8),t.YNc(10,Ct,8,7,"mat-list-item",8),t.YNc(11,Tt,8,7,"ng-container",9),t.qZA()(),t.TgZ(12,"div",10),t._UZ(13,"app-image-map",11),t.qZA()(),t.TgZ(14,"div",12)(15,"div",13)(16,"div",14),t._UZ(17,"app-map-icon",15),t.TgZ(18,"a",16),t.NdJ("click",function(){const l=t.CHM(e).ngIf;return t.oxw().printData(l.id)}),t.TgZ(19,"mat-icon",17),t.ALo(20,"translate"),t._uU(21,"print"),t.qZA()()()()()()}if(2&n){const e=s.ngIf,i=t.oxw();t.xp6(3),t.AsE("",e.id," - ",e.nombre,""),t.xp6(5),t.Q6J("ngIf",e.nombre),t.xp6(1),t.Q6J("ngIf",e.provincia),t.xp6(1),t.Q6J("ngIf",e.municipio),t.xp6(1),t.Q6J("ngIf",e.espaciosProtegidos&&e.espaciosProtegidos.length>0),t.xp6(2),t.Q6J("entityDataMap",i.photoMap)("entitiesLayers",i.layer)("foto",i.fotoPrincipal),t.xp6(4),t.Q6J("entityName",i.entityName)("entityId",e.id),t.xp6(2),t.s9C("matTooltip",t.lcZ(20,12,"tootips.tltipImprimirFicha"))}}function At(n,s){1&n&&t._UZ(0,"app-spinner")}let Mt=(()=>{class n{constructor(e,i,o,l,m,_,C,y){this.route=e,this.entityMenuService=i,this.springService=o,this.globalService=l,this.selectedTabService=m,this.translate=_,this.dialogModelService=C,this.configService=y,this.numRed=d.C.numRed,this.numEnt=d.C.numEnt,this.layer=[],this.entityName=d.C.springEntity,this.selectedTabService.changeTab(0),this.layer.push(this.configService.getItemLayerById(d.
1C.olMap.layerManantiales))}ngOnInit(){let e=this.route.snapshot.paramMap.get("gid");null!=e&&(this.entityMenuService.submenuChange(!0),this.spring$=this.springService.getSpring(Number(e)),this.entityMenuService.gidEntitySubject$.next(e),this.springService.getExtensionFeature(Number(e)).subscribe(i=>{this.photoMap=new tt.lC([Number(e)],200===i.status?i.body:[])}),this.springService.getFotoPrincipal(Number(e)).subscribe(i=>{this.fotoPrincipal=i}))}printData(e){ft.l.printData(e,d.C.tipoEntidad.manantiales,this.dialogModelService,this.translate,this.globalService)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.gz),t.Y36(L.$),t.Y36(A.s),t.Y36(B.U),t.Y36(I.O),t.Y36(b.sK),t.Y36(S.r),t.Y36(N.E))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-general-data"]],decls:4,vars:4,consts:[["class","container",4,"ngIf","ngIfElse"],["loading",""],[1,"container"],[1,"container-title"],[1,"mb-2"],[1,"row","mb-4"],[1,"col-5"],["dense",""],["class","bar-gradient",4,"ngIf"],[4,"ngIf"],[1,"col-7","iframeMapa"],[3,"entityDataMap","entitiesLayers","foto"],[1,"row"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId"],["mat-flat-button","",3,"click"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",1,"btn-icon-mat",3,"matTooltip"],[1,"bar-gradient"],["matLine",""],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[1,"bar-light-blue","mb-2"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"matTooltip"],["dense","",1,"ms-5"],["class","bar-lighter-blue mb-2",4,"ngFor","ngForOf"],[1,"bar-lighter-blue","mb-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Zt,22,14,"div",0),t.ALo(1,"async"),t.YNc(2,At,1,0,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.spring$))("ngIfElse",o)}},directives:[g.O5,O.d,f.i$,f.Tg,E.X2,h.M,x.gM,g.sg,ht.E,w.N,F.zs,at.Hw,P.O],pi
1pes:[g.Ov,b.X$],styles:[".container-title[_ngcontent-%COMP%]{border-left:6px solid #1c7696;padding-left:1rem}.container-subtitle[_ngcontent-%COMP%]{color:#1c7696}div.detail-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{font-weight:700}.detail-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}.iframeMapa[_ngcontent-%COMP%]{text-align:-webkit-center;margin-top:1rem}.btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();var H=r(7579),ot=r(2722),st=r(3251),Ot=r(7555);function Et(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",10),t._uU(7),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaTecnica.tltipId")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaTecnica.lblId")),t.xp6(3),t.Oqu(e.springDetail.id)}}function Pt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",10),t._uU(7),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipNombre")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaTecnica.lblNombre")),t.xp6(3),t.Oqu(e.springDetail.nombre)}}function Dt(n,s){if(1&n&&(t.TgZ(0,"div",13)(1,"span",20),t._uU(2),t.qZA()()),2&n){const e=s.$implicit;t.xp6(2),t.Oqu(e.nombre)}}function yt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"mat-list-item",15)(2,"span",16),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"mat-list",17)(7,"mat-list-item",18),t.YNc(8,Dt,3,1,"div",19),t.qZA()(),t.BQk()),2&n){const e=t.oxw();t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaGeneral.tltipNombresAlt")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaTecnica.lblNombresAlt")),t.xp6(4),t.Q6J("ngForOf",e.springDetail.nombresAlternativos)}}let Nt=(()=>{class n{constructor(){this.numRed=d.C.numRed}ngOnInit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data-no-perfil"]],inputs:{springDetail:"springDetail",entityName:"entityName"},decls:15,vars:7,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[1,"row","mb-4"],[1,"col-6"],["dense",""],["class","bar-gradient-float-right",4,"ngIf"],[4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId"],[1,"bar-gradient-float-right"],["matLine",""],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[1,"bar-light-blue","mb-2"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"matTooltip"],["dense","",1,"ms-5"],[1,"bar-lighter-blue","mb-2"],["matLine","",4,"ngFor","ngForOf"],[1,"float-start"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"mat-list",5),t.YNc(8,Et,8,7,"mat-list-item",6),t.YNc(9,Pt,8,7,"mat-list-item",6),t.YNc(10,yt,9,7,"ng-container",7),t.qZA()()(),t.TgZ(11,"div",8)(12,"div",9)(13,"div",10),t._UZ(14,"app-map-icon",11),t.qZA()()()()),2&e&&(t.xp6(2),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(6),t.Q6J("ngIf",i.springDetail.id),t.xp6(1),t.Q6J("ngIf",i.springDetail.nombre),t.xp6(1),t.Q6J("ngIf",i.springDetail.nombresAlternativos&&i.springDetail.nombresAlternativos.length>0),t.xp6(4),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id))},directives:[O.d,f.i$,g.O5,f.Tg,E.X2,h.M,x.gM,g.sg,w.N],pipes:[b.X$],styles:[""]}),n})();var J=r(7318),T=r(3075),rt=r(9506),lt=r(8825),It=r(9027),Y=r(5448),V=r(7322),ct=r(8833),dt=r(4533),pt=r(2546);function Rt(n,s){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=s.$implicit,i=s.last;t.xp6(1),t.AsE(" ",e.nombre,"",i?"":", "," ")}}function St(n,s){if(1&n&&(t.ynx(0),t.YNc(1,Rt,2,2,"ng-container",36),t.BQk()),2&n){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.springDetail.nombresAlternativos)}}function wt(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"mat-icon",37),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleAddName()}),t.ALo(1,"translate"),t._uU(2),t.qZA()}if(2&n){const e=t.oxw();t.s9C("matTooltip",t.lcZ(1,2,"tootips.tltipAnadirNomAlt")),t.xp6(2),t.Oqu(e.showAddName?"add_circle":"remove_circle")}}function qt(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.requerido")))}function Ft(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",41),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).validateVersions()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("disabled",e.disableValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}const Ut=function(){return["2"]};function Lt(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div",14)(2,"div",38)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"app-version-table",39),t.NdJ("newSelectEvent",function(o){return t.CHM(e),t.oxw().addSelection(o)})("newValidateVersionEvent",function(o){return t.CHM(e),t.oxw().validateVersions(o)})("newDeleteVersionEvent",function(o){return t.CHM(e),t.oxw().deleteVersion(o)}),t.qZA(),t.TgZ(7,"div",5)(8,"div",29)(9,"div",30),t.YNc(10,Ft,3,4,"button",40),t.qZA()()()()()}if(2&n){const e=t.oxw();
1t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(2),t.Q6J("searchResult",e.springControlVersiones)("tableColumns",e.tableConfiguration)("itemName",e.springDetail.nombre)("entityType",e.springType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,Ut))}}function Jt(n,s){1&n&&(t._uU(0),t.ALo(1,"translate")),2&n&&t.hij(" ",t.lcZ(1,1,"lblsGeneral.sinDatos"),"\n")}const Yt=function(){return["2","4"]},Vt=function(n,s,e){return["../../fieldsHistory",n,s,e]};let Qt=(()=>{class n{constructor(e,i,o,l,m,_,C,y){this.springService=e,this.rolesService=i,this.router=o,this.fb=l,this.activatedRoute=m,this.dialogModelService=_,this.translate=C,this.tableConfigurationService=y,this.numRed=d.C.numRed,this.existVersions=!1,this.selection=[],this.stop$=new H.x,this.showAddName=!0,this.disableValidateBtn=!0,this.selectedCombosTextValues={codRegimenPropiedad:"",codRegimenGestion:""},this.matcher=new lt.o,this.springType=d.C.tipoEntidad.manantiales,this.tabGeneralData=d.C.operacion.OPERACION_GENERAL,this.tableConfiguration=this.tableConfigurationService.getVersionTableConfiguration()}ngOnInit(){this.createForm(),this.springService.getControlDeVersiones(Number(this.springDetail.id),d.C.operacion.OPERACION_GENERAL).subscribe(e=>{e.length>0&&(this.existVersions=!0),this.springControlVersiones=e})}createForm(){this.technicalGroup=this.fb.group({nombre:this.fb.control({value:this.springDetail.nombre,disabled:!1}),comentarios:this.fb.control({value:this.springDetail.comentarios,disabled:!1})}),this.nomAltGroup=this.fb.group({nombreAlt:this.fb.control({value:"",disabled:!1},T.kI.required)}),this.initialValues=this.technicalGroup.value}addSelection(e){this.disableValidateBtn=0===e.length,this.selection=e}ngOnDestroy(){this.stop$.next(!0)}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}toggleAddName(){this.showAddName=!this.showAddName}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}onSubmit(){if(this.technicalGroup.invalid)return;let e=M.c.compareObjects(this.initialValues,this.technicalGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.springDetail.id}`],{relativeTo:this.activatedRoute,state:this.prepareData(e)}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}onSubmitNomAlt(){this.nomAltGroup.invalid||(""!==this.nomAltGroup.controls.nombreAlt.value.trim()?this.router.navigate([`../../fieldsVersion/${this.springDetail.id}`],{relativeTo:this.activatedRoute,state:this.prepareData(this.nomAltGroup.value)}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.tituloNomAlt"),this.translate.instant("dialogos.guardarCambios.sinNombreAlt")))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(l=>l);let o=[];for(const l in e){let m,_;_=i.includes(l)?this.selectedCombosTextValues[l]:e[l],m=new rt.i(l,this.translate.instant(`spring.fichaTecnica.lblsGuardarCambios.${l}`),e[l],_),o.push(m)}return o}validateVersions(e){let i=[];e?i.push(e):i=this.selection.map(o=>o),this.springService.validarBloque(i).subscribe(o=>{200===o.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),`${this.translate.instant("dialogos.validarVersion.validacionCorrecta")} ${o.body} ${this.translate.instant(o.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),this.translate.instant("dialogos.validarVersion.validacionError"))})}deleteVersion(e){this.springService.descartarOperacion(e.version,e.operacionEntidad).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarCorrecta")),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartar
1Version.titulo"),this.translate.instant("dialogos.descartarVersion.descartarError"))})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(A.s),t.Y36(It.f),t.Y36(u.F0),t.Y36(T.qu),t.Y36(u.gz),t.Y36(S.r),t.Y36(b.sK),t.Y36(Y.A))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data-perfil"]],inputs:{springDetail:"springDetail",entityName:"entityName"},decls:63,vars:39,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["technicalForm","ngForm"],[1,"row"],[1,"col-6"],[1,"row","inputRow"],[1,"col-4","labelForm"],["appBold",""],[1,"col-8"],["appearance","standard",1,"width-100"],["matInput","","name","nombre","type","text","formControlName","nombre"],["nomAltForm","ngForm"],[1,"col"],[1,"col-7","mb-2"],[4,"ngIf","ngIfElse"],[1,"col-1"],["style","color: #1c7696;","matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"matTooltip","click",4,"appHasrole"],[1,"row","inputRow",3,"hidden"],[1,"col-4"],["appearance","standard",1,"me-4","width-100"],["matInput","","name","nombreAlt","type","text","formControlName","nombreAlt",3,"errorStateMatcher"],[4,"ngIf"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"col-2","labelForm"],[1,"col-10"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios",3,"maxLength"],["autosize","cdkTextareaAutosize"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],[1,"fa-regular","fa-floppy-disk"],[3,"entityName","entityId"],["class","row",4,"ngIf"],["sinDatos",""],[4,"ngFor","ngForOf"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",2,"color","#1c7696",3,"matTooltip","click"],[1,"container-subtitle","mb-2"],[3,"searchResult","tableColumns","itemName","entityType","newSelectEvent","newValidateVersionEvent","newDeleteVersionEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2)(5,"form",3,4),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"span",9),t._uU(12),t.ALo(13,"translate"),t.qZA()(),t.TgZ(14,"div",10)(15,"mat-form-field",11),t._UZ(16,"input",12),t.qZA()()(),t.TgZ(17,"form",3,13),t.NdJ("ngSubmit",function(){return i.onSubmitNomAlt()}),t.TgZ(19,"div",5)(20,"div",14)(21,"div",7)(22,"div",8)(23,"span",9),t._uU(24),t.ALo(25,"translate"),t.qZA()(),t.TgZ(26,"div",15),t.YNc(27,St,2,1,"ng-container",16),t.qZA(),t.TgZ(28,"div",17),t.YNc(29,wt,3,4,"mat-icon",18),t.qZA()(),t.TgZ(30,"div",19),t._UZ(31,"div",20),t.TgZ(32,"div",10)(33,"mat-form-field",21),t._UZ(34,"input",22),t.YNc(35,qt,3,3,"mat-error",23),t.qZA(),t.TgZ(36,"button",24),t._uU(37),t.ALo(38,"translate"),t.qZA()()()()()()()(),t.TgZ(39,"div",5)(40,"div",25)(41,"span",9),t._uU(42),t.ALo(43,"translate"),t.qZA()(),t.TgZ(44,"div",26)(45,"mat-form-field",11)(46,"textarea",27,28),t._uU(48),t.qZA()()()(),t.TgZ(49,"div",5)(50,"div",29)(51,"div",30)(52,"button",31),t._uU(53),t.ALo(54,"translate"),t.qZA(),t.TgZ(55,"button",24),t._uU(56),t.ALo(57,"translate"),t._UZ(58,"i",32),t.qZA(),t._UZ(59,"app-map-icon",33),t.qZA()()(),t.YNc(60,Lt,11,9,"div",34),t.qZA()(),t.YNc(61,Jt,2,3,"ng-template",null,35,t.W1O)),2&e){const o=t.MAs(62);let l;t.xp6(2),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(3),t.Q6J("formGroup",i.technicalGroup),t.xp6(7),t.Oqu(t.lcZ(13,22,"spring.fichaTecnica.lblNombre")),t.xp6(5),t.Q6J("formGroup",i.nomAltGroup),t.xp6(7),t.Oqu(t.lcZ(25,24,"spring.fichaTecnica.lblNombresAlt")),t.xp6(3),t.Q6J("ngIf",i.springDetail.nombresAlternativos&&i.springDetail.nombresAlternativos.length>0)("ngIfElse",o),t.xp6(2),t.Q6J("appHasrole",t.DdM(34,Yt)),t.xp6(1),t.Q6J("hidden",i.showAddName),t.xp6(4),t.Q6J("errorStateMatcher",i.matcher),t.xp6(1),t.Q6J("ngIf",null==(l=i.nomAltGroup.get("nombreAlt"))?null:l.hasError("required")),t.xp6(2),t.Oqu(t.lcZ(38,26,"botones.anadir")),t.xp6(5),t.hij("",t.lcZ(43,28,"spring.fichaTecnica.lblComentarios")," "),t.xp6(4),t.Q6J("maxLength",2e3),t.xp6(2),t.Oqu(i.springDetail.comentarios),t.xp6(4),t.Q6J("routerLink",t.kEZ(35,Vt,i.springDetail.id,i.tabGeneralData,i.springDetail.nombre)),t.xp6(1),t.Oqu(t.lcZ(54,30,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(57,32,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id),t.xp6(1),t.Q6J("ngIf",i.existVersions)}},directives:[O.d,T._Y,T.JL,T.sg,h.M,V.KE,ct.Nt,T.Fj,T.JJ,T.u,g.O5,g.sg,J.I,at.Hw,x.gM,V.TO,F.lW,dt.IC,u.rH,w.N,pt.L],pipes:[b.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}"]}),n})();
1function Bt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"date"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblFechaVisita")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.fechaVisita,e.dateFormat))}}function Ht(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",15),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",10),t._uU(7),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"spring.fichaTecnica.tltipHoraVisita")),t.xp6(2),t.Oqu(t.lcZ(5,5,"spring.fichaTecnica.lblHoraVisita")),t.xp6(3),t.Oqu(e.springDetail.horaVisita)}}function $t(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblCaudal")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.caudal,e.numEnt))}}function Gt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"number"),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblTemperaturaAgua")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.temperaturaAgua,e.numEnt))}}function kt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblTemperaturaAmbiente")),t.xp6(3),t.Oqu(e.springDetail.temperaturaAmbiente)}}function Wt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblConductividad")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.conductividad,e.numEnt))}}function Kt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblPh")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.ph,e.numRed))}}function Xt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.ALo(7,"number"),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblNitratos")),t.xp6(3),t.Oqu(t.xi3(7,4,e.springDetail.nitratos,e.numRed))}}function zt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblAspecto")),t.xp6(3),t.Oqu(e.springDetail.aspecto)}}function jt(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblAnalisisAnteriores")),t.xp6(3),t.Oqu(e.springDetail.analisisAnterioresDescripcion)}}function te(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",16)(1,"div",13)(2,"span",17),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",18),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblDatosHidrogeologicos")),t.xp6(3),t.Oqu(e.springDetail.datosHidrogeologicos)}}function ee(n,s){if(1&n&&(t.TgZ(0,"mat-list-item",16)(1,"div",13)(2,"span",17),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",18),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"spring.fichaTecnica.lblObservaciones")),t.xp6(3),t.Oqu(e.springDetail.observaciones)}}let ne=(()=>{class n{constructor(){this.numRed=d.C.numRed,this.numEnt=d.C.numEnt,this.dateFormat=d.C.dateFormat}ngOnInit(){}onSubmit(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-field-data-no-perfil"]],inputs:{springDetail:"springDetail",entityName:"entityName"},decls:26,vars:16,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[1,"row","mb-4"],[1,"col-6"],["dense",""],["class","bar-gradient-float-right",4,"ngIf"],["class","bar-gradient-float-right comentarios",4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId"],[1,"bar-gradient-float-right"],["matLine",""],["appBold","",1,"float-start"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[1,"bar-gradient-float-right","comentarios"],["appBold","","appBold","",1,"float-start"],[1,"float-end","text-wrap"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"mat-list",5),t.YNc(8,Bt,8,7,"mat-list-item",6),t.YNc(9,Ht,8,7,"mat-list-item",6),t.YNc(10,$t,8,7,"mat-list-item",6),t.YNc(11,Gt,8,7,"mat-list-item",6),t.YNc(12,kt,7,4,"mat-list-item",6),t.YNc(13,Wt,8,7,"mat-list-item",6),t.YNc(14,Kt,8,7,"mat-list-item",6),t.YNc(15,Xt,8,7,"mat-list-item",6),t.YNc(16,zt,7,4,"mat-list-item",6),t.YNc(17,jt,7,4,"mat-list-item",6),t.qZA()(),t.TgZ(18,"div",4)(19,"mat-list",5),t.YNc(20,te,7,4,"mat-list-item",7),t.YNc(21,ee,7,4,"mat-list-item",7),t.qZA()()(),t.TgZ(22,"div",8)(23,"div",9)(24,"div",10),t._UZ(25,"app-map-icon",11),t.qZA()()()()),2&e&&(t.xp6(2),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(6),t.Q6J("ngIf",i.springDetail.fechaVisita),t.xp6(1),t.Q6J("ngIf",i.springDetail.horaVisita),t.xp6(1),t.Q6J("ngIf",i.springDetail.caudal),t.xp6(1),t.Q6J("ngIf",i.springDetail.temperaturaAgua),t.xp6(1),t.Q6J("ngIf",i.springDetail.temperaturaAmbiente),t.xp6(1),t.Q6J("ngIf",i.springDetail.conductividad),t.xp6(1),t.Q6J("ngIf",i.springDetail.ph),t.xp6(1),t.Q6J("ngIf",i.springDetail.nitratos),t.xp6(1),t.Q6J("ngIf",i.springDetail.aspecto),t.xp6(1),t.Q6J("ngIf",i.springDetail.analisisAnterioresDescripcion),t.xp6(3),t.Q6J("ngIf",i.springDetail.datosHidrogeologicos),t.xp6(1),t.Q6J("ngIf",i.springDetail.observaciones),t.xp6(4),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id))},directives:[O.d,f.i$,g.O5,f.Tg,E.X2,h.M,x.gM,w.N],pipes:[b.X$,g.uU,g.JJ],styles:[""]}),n})();var et=r(6856),ie=r(4107);function ae(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.formatoFecha")))}function oe(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.formatoHora")))}function se(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numEntero")))}function re(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numEntero")))}function le(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numEntero")))}function ce(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numEntero")))}function de(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function pe(n,s){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function me(n,s){if(1&n&&(t.TgZ(0,"mat-option",44),t._uU(1),t.qZA()),2&n){const e=s.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function ge(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",11)(1,"mat-select",42),t.NdJ("selectionChange",function(o){return t.CHM(e),t.oxw().selectedValue(o)}),t.YNc(2,me,2,2,"mat-option",43),t.qZA()()}if(2&n){const e=s.ngIf,i=t.oxw();
1t.xp6(1),t.Q6J("errorStateMatcher",i.matcher),t.xp6(1),t.Q6J("ngForOf",e.data)}}function ue(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",50),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).validateVersions()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("disabled",e.disableValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}const _e=function(){return["2"]};function fe(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",45)(1,"div",46)(2,"div",45)(3,"div",47)(4,"h2"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"app-version-table",48),t.NdJ("newSelectEvent",function(o){return t.CHM(e),t.oxw().addSelection(o)})("newValidateVersionEvent",function(o){return t.CHM(e),t.oxw().validateVersions(o)})("newDeleteVersionEvent",function(o){return t.CHM(e),t.oxw().deleteVersion(o)}),t.qZA()(),t.TgZ(8,"div",45)(9,"div",35)(10,"div",36),t.YNc(11,ue,3,4,"button",49),t.qZA()()()()()}if(2&n){const e=t.oxw();t.xp6(5),t.Oqu(t.lcZ(6,6,"versionado.controlVersiones")),t.xp6(2),t.Q6J("searchResult",e.springControlVersiones)("tableColumns",e.tableConfiguration)("itemName",e.springDetail.nombre)("entityType",e.springType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,_e))}}const he=function(n,s,e){return["../../fieldsHistory",n,s,e]};let be=(()=>{class n{constructor(e,i,o,l,m,_,C){this.springService=e,this.router=i,this.fb=o,this.activatedRoute=l,this.dialogModelService=m,this.translate=_,this.tableConfigurationService=C,this.numRed=d.C.numRed,this.selectedCombosTextValues={idAnalisis:""},this.matcher=new lt.o,this.existVersions=!1,this.selection=[],this.springType=d.C.tipoEntidad.manantiales,this.showAddName=!0,this.disableValidateBtn=!0,this.tabGeneralData=d.C.operacion.OPERACION_DATOS_CAMPO,this.stop$=new H.x,this.numberPipe=new g.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.elementCheckNameNumEntList=[],this.tableConfiguration=this.tableConfigurationService.getVersionTableConfiguration()}ngOnInit(){this.createForm(),this.analisisAnterioresCombo$=this.springService.getComboSiNoDescSinCatalogar(),this.springService.getControlDeVersiones(Number(this.springDetail.id),d.C.operacion.OPERACION_DATOS_CAMPO).subscribe(e=>{e.length>0&&(this.existVersions=!0),this.springControlVersiones=e})}createForm(){this.datosGroup=this.fb.group({fechaVisita:this.fb.control({value:this.springDetail.fechaVisita,disabled:!1}),horaVisita:this.fb.control({value:this.springDetail.horaVisita,disabled:!1},T.kI.pattern("^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$")),caudal:this.fb.control({value:this.numberPipe.transform(this.springDetail.caudal,d.C.numEnt),disabled:!1},T.kI.pattern(d.C.regExpNumEntFormatted)),temperaturaAgua:this.fb.control({value:this.numberPipe.transform(this.springDetail.temperaturaAgua,d.C.numEnt),disabled:!1},T.kI.pattern(d.C.regExpNumEntFormatted)),temperaturaAmbiente:this.fb.control({value:this.numberPipe.transform(this.springDetail.temperaturaAmbiente,d.C.numEnt),disabled:!1},T.kI.pattern(d.C.regExpNumEntFormatted)),conductividad:this.fb.control({value:this.numberPipe.transform(this.springDetail.conductividad,d.C.numEnt),disabled:!1},T.kI.pattern(d.C.regExpNumEntFormatted)),ph:this.fb.control({value:this.numberPipe.transform(this.springDetail.ph,d.C.numRed),disabled:!1},T.kI.pattern(d.C.regExpNumFormatted)),nitratos:this.fb.control({value:this.numberPipe.transform(this.springDetail.nitratos,d.C.numRed),disabled:!1},T.kI.pattern(d.C.regExpNumFormatted)),aspecto:this.fb.control({value:this.springDetail.aspecto,disabled:!1}),analisisAnteriores:this.fb.control({value:this.springDetail.analisisAnteriores,disabled:!1}),analisisAnterioresDescripcion:this.fb.control({value:this.springDetail.analisisAnterioresDescripcion,disabled:!1}),datosHidrogeologicos:this.fb.control({value:this.springDetail.datosHidrogeologicos,disabled:!1}),observaciones:this.fb.control({value:this.springDetail.observaciones,disabled:!1})}),this.initialValues=this.datosGroup.value,this.elementCheckNameList=["ph","nitratos"],this.elementCheckNameNumEntList=["caudal","temperaturaAgua","temperaturaAmbiente","conductividad"]}onSubmit(){if(this.datosGroup.invalid)return;let e=M.c.compareObjects(this.initialValues,this.datosGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.springDetail.id}`],{relativeTo:this.activatedRoute,state:this.prepareData(e)}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(l=>l);let o=[];for(const l in e){let m,_,C=e[l];i.includes(l)?_=this.selectedCombosTextValues[l]:(C&&(this.elementCheckNameList.includes(l)?C=M.c.convertFormattedNumber(C.toString()):this.elementCheckNameNumEntList.includes(l)&&(C=M.c.convertFormattedEntNumber(C.toString()))),_=e[l]),m=new rt.i(l,this.translate.instant(`spring.fichaGeneral.ppalesCaracteristicas.${l}`),C,_),o.push(m)}return o}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}addSelection(e){this.disableValidateBtn=0===e.length,this.selection=e}validateVersions(e){let i=[];e?i.push(e):i=this.selection.map(o=>o),this.springService.validarBloque(i).subscribe(o=>{200===o.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),`${this.translate.instant("dialogos.validarVersion.validacionCorrecta")} ${o.body}
1 ${this.translate.instant(o.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),this.translate.instant("dialogos.validarVersion.validacionError"))})}deleteVersion(e){this.springService.descartarOperacion(e.version,e.operacionEntidad).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarCorrecta")),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarError"))})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(A.s),t.Y36(u.F0),t.Y36(T.qu),t.Y36(u.gz),t.Y36(S.r),t.Y36(b.sK),t.Y36(Y.A))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-field-data-perfil"]],inputs:{springDetail:"springDetail",combos:"combos",entityName:"entityName"},decls:136,vars:75,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["technicalForm","ngForm"],[1,"row","gx-4"],[1,"col-6"],[1,"row","inputRow"],[1,"col-4","labelForm"],["appBold",""],[1,"col-8"],["appearance","standard",1,"width-100"],["matInput","","type","text","name","fechaVisita","formControlName","fechaVisita","required","",3,"matDatepicker","errorStateMatcher"],["matSuffix","",3,"for"],["picker",""],[4,"ngIf"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"matTooltip"],["matInput","","name","horaVisita","type","text","formControlName","horaVisita"],["matInput","","name","caudal","type","text","formControlName","caudal",3,"errorStateMatcher"],["matInput","","name","temperaturaAgua","type","text","formControlName","temperaturaAgua"],["matInput","","name","temperaturaAmbiente","type","text","formControlName","temperaturaAmbiente"],[1,"col-5","labelForm"],[1,"col-7"],["matInput","","name","conductividad","type","text","formControlName","conductividad"],["matInput","","name","ph","type","text","formControlName","ph"],["matInput","","name","nitratos","type","text","formControlName","nitratos"],["matInput","","name","aspecto","type","text","formControlName","aspecto"],["appearance","standard","class","width-100",4,"ngIf"],[1,"col-12"],[1,"col-2","labelForm"],[1,"col-10"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","datosHidrogeologicos","formControlName","datosHidrogeologicos",3,"maxLength"],["autosize","cdkTextareaAutosize"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","observaciones","formControlName","observaciones",3,"maxLength"],[1,"row","mt-4"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],[3,"entityName","entityId"],["class","row",4,"ngIf"],["name","analisis","formControlName","analisisAnteriores",3,"errorStateMatcher","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"row"],[1,"col"],[1,"container-subtitle","mb-2"],[3,"searchResult","tableColumns","itemName","entityType","newSelectEvent","newValidateVersionEvent","newDeleteVersionEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2)(5,"form",3,4),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"span",9),t._uU(12),t.ALo(13,"translate"),t.qZA()(),t.TgZ(14,"div",10)(15,"mat-form-field",11),t._UZ(16,"input",12)(17,"mat-datepicker-toggle",13)(18,"mat-datepicker",null,14),t.YNc(20,ae,3,3,"mat-error",15),t.qZA()()(),t.TgZ(21,"div",7)(22,"div",8)(23,"span",16),t.ALo(24,"translate"),t._uU(25),t.ALo(26,"translate"),t.qZA()(),t.TgZ(27,"div",10)(28,"mat-form-field",11),t._UZ(29,"input",17),t.YNc(30,oe,3,3,"mat-error",15),t.qZA()()(),t.TgZ(31,"div",7)(32,"div",8)(33,"span",9),t._uU(34),t.ALo(35,"translate"),t.qZA()(),t.TgZ(36,"div",10)(37,"mat-form-field",11),t._UZ(38,"input",18),t.YNc(39,se,3,3,"mat-error",15),t.qZA()()(),t.TgZ(40,"div",7)(41,"div",8)(42,"span",9),t._uU(43),t.ALo(44,"translate"),t.qZA()(),t.TgZ(45,"div",10)(46,"mat-form-field",11),t._UZ(47,"input",19),t.YNc(48,re,3,3,"mat-error",15),t.qZA()()(),t.TgZ(49,"div",7)(50,"div",8)(51,"span",9),t._uU(52),t.ALo(53,"translate"),t.qZA()(),t.TgZ(54,"div",10)(55,"mat-form-field",11),t._UZ(56,"input",20),t.YNc(57,le,3,3,"mat-error",15),t.qZA()()()(),t.TgZ(58,"div",6)(59,"div",7)(60,"div",21)(61,"span",9),t._uU(62),t.ALo(63,"translate"),t.qZA()(),t.TgZ(64,"div",22)(65,"mat-form-field",11),t._UZ(66,"input",23),t.YNc(67,ce,3,3,"mat-error",15),t.qZA()()(),t.TgZ(68,"div",7)(69,"div",21)(70,"span",9),t._uU(71),t.ALo(72,"translate"),t.qZA()(),t.TgZ(73,"div",22)(74,"mat-form-field",11),t._UZ(75,"input",24),t.YNc(76,de,3,3,"mat-error",15),t.qZA()()(),t.TgZ(77,"div",7)(78,"div",21)(79,"span",9),t._uU(80),t.ALo(81,"translate"),t.qZA()(),t.TgZ(82,"div",22)(83,"mat-form-field",11),t._UZ(84,"input",25),t.YNc(85,pe,3,3,"mat-error",15),t.qZA()()(),t.TgZ(86,"div",7)(87,"div",21)(88,"span",9),t._uU(89),t.ALo(90,"translate"),t.qZA()(),t.TgZ(91,"div",22)(92,"mat-form-field",11),t._UZ(93,"input",26),t.qZA()()(),t.TgZ(94,"div",7)(95,"div",21)(96,"span",9),t._uU(97),t.ALo(98,"translate"),t.qZA()(),t.TgZ(99,"div",22),t.YNc(100,ge,3,2,"mat-form-field",27),t.ALo(101,"async"),t.qZA()()(),t.TgZ(102,"div",28)(103,"div",7)(104,"div",29)(105,"span",9),t._uU(106),t.ALo(107,"translate"),t.qZA()(),t.TgZ(108,"div",30)(109,"mat-form-field",11)(110,"textarea",31,32),t._uU(112),t.qZA()()()()(),t.TgZ(113,"div",28)(114,"div",7)(115,"div",29)(116,"span",9),t._uU(117),t.ALo(118,"translate"),t.qZA()(),t.TgZ(119,"div",30)(120,"mat-form-field",11)(121,"textarea",33,32),t._uU(123),t.qZA()()()()()(),t.TgZ(124,"div",34)(125,"div",35)(126,"div",36)(127,"button",37),t._uU(128),t.ALo(129,"translate"),t.qZA(),t.TgZ(130,"button",38),t._uU(131),t.ALo(132,"translate"),t._UZ(133,"i",39),t.qZA(),t._UZ(134,"app-map-icon",40),t.qZA()()(),t.YNc(135,fe,12,9,"div",41),t.qZA()()),2&e){const o=t.MAs(19);let l,m,_,C,y,G,gt,ut;t.xp6(2),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(3),t.Q6J("formGroup",i.datosGroup),t.xp6(7),t.Oqu(t.lcZ(13,39,"spring.fichaTecnica.lblFechaVisita")),t.xp6(4),t.Q6J("matDatepicker",o)("errorStateMatcher",i.matcher),t.xp6(1),t.Q6J("for",o),t.xp6(3),t.Q6J("ngIf",null==(l=i.datosGroup.get("fechaVisita"))?null:l.hasError),t.xp6(3),t.s9C("matTooltip",t.lcZ(24,41,"spring.fichaTecnica.tltipHoraVisita")),t.xp6(2),t.Oqu(t.lcZ(26,43,"spring.fichaTecnica.lblHoraVisita")),t.xp6(5),t.Q6J("ngIf",null==(m
1=i.datosGroup.get("horaVisita"))?null:m.hasError),t.xp6(4),t.Oqu(t.lcZ(35,45,"spring.fichaTecnica.lblCaudal")),t.xp6(4),t.Q6J("errorStateMatcher",i.matcher),t.xp6(1),t.Q6J("ngIf",null==(_=i.datosGroup.get("caudal"))?null:_.hasError),t.xp6(4),t.Oqu(t.lcZ(44,47,"spring.fichaTecnica.lblTemperaturaAgua")),t.xp6(5),t.Q6J("ngIf",null==(C=i.datosGroup.get("temperaturaAgua"))?null:C.hasError),t.xp6(4),t.Oqu(t.lcZ(53,49,"spring.fichaTecnica.lblTemperaturaAmbiente")),t.xp6(5),t.Q6J("ngIf",null==(y=i.datosGroup.get("temperaturaAmbiente"))?null:y.hasError),t.xp6(5),t.Oqu(t.lcZ(63,51,"spring.fichaTecnica.lblConductividad")),t.xp6(5),t.Q6J("ngIf",null==(G=i.datosGroup.get("conductividad"))?null:G.hasError),t.xp6(4),t.Oqu(t.lcZ(72,53,"spring.fichaTecnica.lblPh")),t.xp6(5),t.Q6J("ngIf",null==(gt=i.datosGroup.get("ph"))?null:gt.hasError),t.xp6(4),t.Oqu(t.lcZ(81,55,"spring.fichaTecnica.lblNitratos")),t.xp6(5),t.Q6J("ngIf",null==(ut=i.datosGroup.get("nitratos"))?null:ut.hasError),t.xp6(4),t.Oqu(t.lcZ(90,57,"spring.fichaTecnica.lblAspecto")),t.xp6(8),t.Oqu(t.lcZ(98,59,"spring.fichaTecnica.lblAnalisisAnteriores")),t.xp6(3),t.Q6J("ngIf",t.lcZ(101,61,i.analisisAnterioresCombo$)),t.xp6(6),t.Oqu(t.lcZ(107,63,"spring.fichaTecnica.lblDatosHidrogeologicos")),t.xp6(4),t.Q6J("maxLength",2e3),t.xp6(2),t.Oqu(i.springDetail.datosHidrogeologicos),t.xp6(5),t.Oqu(t.lcZ(118,65,"spring.fichaTecnica.lblObservaciones")),t.xp6(4),t.Q6J("maxLength",2e3),t.xp6(2),t.Oqu(i.springDetail.observaciones),t.xp6(4),t.Q6J("routerLink",t.kEZ(71,he,i.springDetail.id,i.tabGeneralData,i.springDetail.nombre)),t.xp6(1),t.Oqu(t.lcZ(129,67,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(132,69,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id),t.xp6(1),t.Q6J("ngIf",i.existVersions)}},directives:[O.d,T._Y,T.JL,T.sg,h.M,V.KE,ct.Nt,T.Fj,et.hl,T.JJ,T.u,T.Q7,et.nW,V.R9,et.Mq,g.O5,V.TO,x.gM,ie.gD,g.sg,E.ey,dt.IC,F.lW,u.rH,w.N,pt.L,J.I],pipes:[b.X$,g.Ov],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}"]}),n})();var ve=r(975),Ce=r(1127);const nt=function(){return["2","7"]};
1function xe(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",14)(1,"div",15)(2,"h3",16),t._uU(3),t.qZA(),t.TgZ(4,"app-basic-table",17),t.NdJ("newSelectEvent",function(o){return t.CHM(e),t.oxw(3).addSelection(o)}),t.qZA()()()}if(2&n){const e=s.$implicit,i=t.oxw(3);t.xp6(3),t.Oqu(e.tipo),t.xp6(1),t.Q6J("searchResult",e.elementos)("profilesCheckTabla",t.DdM(4,nt))("tableColumns",i.getConfigRelatedElementTable(e.codigoTipo))}}function Te(n,s){if(1&n&&(t.ynx(0),t.YNc(1,xe,5,5,"div",13),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.relatedElements)}}function Ze(n,s){1&n&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"elementosRelacionados.noRelacionados")))}function Ae(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).deleteRelated()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("disabled",e.disableDeleteBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.desvincularElemento"))}}function Me(n,s){1&n&&(t.ynx(0),t.YNc(1,Ae,3,4,"button",18),t.BQk()),2&n&&(t.xp6(1),t.Q6J("appHasrole",t.DdM(1,nt)))}function Oe(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",20),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).showNewElementForm()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"botones.vincularElemento")))}function Ee(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"app-related-element-form",21),t.NdJ("newTypeEvent",function(o){return t.CHM(e),t.oxw(2).getRelatableElements(o)})("newRelationDataEvent",function(o){return t.CHM(e),t.oxw(2).saveRelation(o)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("elemName",e.springDetail.nombre)("entityTypes",e.relatedElementsTypes)("relatableElements",e.relatableElements)("distanceCombo",e.distanceCombo)}}
1function Pe(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4),t.YNc(6,Te,2,1,"ng-container",0),t.YNc(7,Ze,3,3,"ng-template",null,5,t.W1O),t.TgZ(9,"div",6)(10,"div",7)(11,"div",8),t.YNc(12,Me,2,2,"ng-container",9),t.YNc(13,Oe,3,3,"button",10),t._UZ(14,"app-map-icon",11),t.qZA()()(),t.YNc(15,Ee,2,4,"div",12),t.qZA(),t.BQk()),2&n){const e=t.MAs(8),i=t.oxw();t.xp6(3),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(3),t.Q6J("ngIf",i.relatedElements.length>0)("ngIfElse",e),t.xp6(6),t.Q6J("ngIf",i.relatedElements.length>0),t.xp6(1),t.Q6J("appHasrole",t.DdM(9,nt)),t.xp6(1),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id),t.xp6(1),t.Q6J("ngIf",i.showAddNewElement)}}function De(n,s){1&n&&t._UZ(0,"app-spinner")}let ye=(()=>{class n{constructor(e,i,o,l,m,_,C){this.springService=e,this.translate=i,this.dialogModelService=o,this.router=l,this.tableConfigurationService=m,this.globalService=_,this.activatedRoute=C,this.relatableElements=[],this.showAddNewElement=!1,this.disableDeleteBtn=!0,this.selection=[],this.loaded=!1}ngOnInit(){this.globalService.getComboDistanciaElementosRelacionados().subscribe(e=>{this.distanceCombo=e}),this.springService.getElementosRelacionados(Number(this.springDetail.id)).subscribe(e=>{this.loaded=!0,this.relatedElements=e.elementosRelacionados,this.relatedElementsTypes=e.tiposEntidadesRelacionadas,this.relatedElements=M.c.setViewerUrlToRelatedElements(this.relatedElements)})}getConfigRelatedElementTable(e){return this.tableConfigurationService.getRelatedElementTableConfiguration(e)}showNewElementForm(){this.showAddNewElement=!0}addSelection(e){for(const i of e.selected)this.selection.includes(i)||this.selection.push(i);for(const i of e.deselected)if(this.selection.includes(i)){const o=this.selection.indexOf(i);this.selection.splice(o,1)}this.disableDeleteBtn=0===this.selection.length}deleteRelated(){this.dialogModelService.openConfirmDialog(this.translate.instant("dialogos.descartarRelacion.titulo"),this.translate.instant("dialogos.descartarRelacion.msgConfirmacion")).subscribe(e=>{if(e){let i=this.selection.map(o=>o);this.springService.borrarRelacionados(this.springDetail.id,i).subscribe(o=>{200===o.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarRelacion.titulo"),`${this.translate.instant("dialogos.descartarRelacion.descartarCorrecta")} ${o.body} ${this.translate.instant(o.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarRelacion.titulo"),this.translate.instant("dialogos.descartarRelacion.descartarError"))})}})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}getRelatableElements(e){this.springService.getElementosRelacionablesPorIdYTipo(this.springDetail.id,e.codTipo,e.codDistancia).subscribe(i=>{this.relatableElements=i})}saveRelation(e){this.springService.guardarRelacion(this.springDetail.id,e).subscribe(i=>{200===i.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarRelacion.titulo"),`${this.translate.instant("dialogos.guardarRelacion.guardadoCorrecto")} ${i.body} ${this.translate.instant(i.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarRelacion.titulo"),this.translate.instant("dialogos.guardarRelacion.guardadoError"))})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(A.s),t.Y36(b.sK),t.Y36(S.r),t.Y36(u.F0),t.Y36(Y.A),t.Y36(B.U),t.Y36(u.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-related-elements"]],inputs:{springDetail:"springDetail",entityName:"entityName"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],["noRelatedElements",""],[1,"row"],[1,"col-md-12"],[1,"float-end"],[4,"ngIf"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"appHasrole"],[3,"entityName","entityId"],["class","row",4,"ngIf"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"col"],["appBold",""],[3,"searchResult","profilesCheckTabla","tableColumns","newSelectEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"],["type","button","mat-flat-button","",1,"btn-first",3,"click"],[3,"elemName","entityTypes","relatableElements","distanceCombo","
1newTypeEvent","newRelationDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,Pe,16,10,"ng-container",0),t.YNc(1,De,1,0,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",i.loaded)("ngIfElse",o)}},directives:[g.O5,O.d,g.sg,h.M,ve.N,J.I,F.lW,w.N,Ce.y,P.O],pipes:[b.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();var Ne=r(4821),Ie=r(9646),Re=r(4128),Se=r(2215),we=r(8966),qe=r(4752),Fe=r(42),Ue=r(1155);function Le(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",14)(2,"div",15)(3,"app-photo-metadata",16),t.NdJ("newMetadataEditEvent",function(o){return t.CHM(e),t.oxw(3).setPhotoMetadata(o)}),t.qZA()(),t.TgZ(4,"div",17)(5,"h3",18),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"app-manage-basic-table",19),t.NdJ("newSelectEvent",function(o){return t.CHM(e),t.oxw(3).addSelection(o)}),t.qZA(),t.TgZ(9,"div",7)(10,"button",20),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return o.validatePhoto(o.imageDetailId)}),t._uU(11),t.ALo(12,"translate"),t.qZA()()()(),t.BQk()}if(2&n){const e=t.oxw().ngIf,i=t.oxw(2);t.xp6(3),t.Q6J("dataId",i.imageDetailId)("showForm",!0),t.xp6(3),t.Oqu(t.lcZ(7,6,"validacionFotos.elemCercanos.titulo")),t.xp6(2),t.Q6J("searchResult",e)("tableColumns",i.tableRelatedElemConfiguration),t.xp6(3),t.Oqu(t.lcZ(12,8,"botones.validarFoto"))}}function Je(n,s){if(1&n&&(t.ynx(0),t.YNc(1,Le,13,10,"ng-container",13),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showEdit)}}function Ye(n,s){if(1&n){const e=t.EpF();
1t.ynx(0),t.TgZ(1,"div",10)(2,"div",11)(3,"app-carousel",12),t.NdJ("sendItemIdEvent",function(o){return t.CHM(e),t.oxw().seeDetail(o)})("favoriteEvent",function(o){return t.CHM(e),t.oxw().setFavorite(o)})("newDeleteEvent",function(o){return t.CHM(e),t.oxw().reloadPhotos(o)})("newEditEvent",function(o){return t.CHM(e),t.oxw().getRelatedElements(o)}),t.qZA()()(),t.YNc(4,Je,2,1,"ng-container",13),t.ALo(5,"async"),t.BQk()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("images",e.photos)("config",e.carouselConfiguration)("entityId",e.springDetail.id)("entityType",e.entityType),t.xp6(1),t.Q6J("ngIf",t.lcZ(5,5,e.relatedElements$))}}function Ve(n,s){1&n&&(t.TgZ(0,"div",21)(1,"p"),t._uU(2),t.ALo(3,"translate"),t.qZA()()),2&n&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"fotosRelacionadas.sinFotos")))}function Qe(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",20),t.NdJ("click",function(){return t.CHM(e),t.oxw().addPhoto()}),t._uU(1),t.ALo(2,"translate"),t._UZ(3,"i",22),t.qZA()}2&n&&(t.xp6(1),t.hij("",t.lcZ(2,1,"botones.nuevaFoto")," "))}const Be=function(){return["4","2"]};let He=(()=>{class n{constructor(e,i,o,l,m,_,C,y,G){this.dialog=e,this.springService=i,this.dialogModelService=o,this.translate=l,this.globalService=m,this.tableConfigurationService=_,this.router=C,this.activatedRoute=y,this.configService=G,this.photos=[],this.imagesMetadata=[],this.coordinates=[],this.coordinatesEvent=new t.vpe,this.entityType=d.C.tipoEntidad.manantiales,this.selectionCloseElements=[],this.showEdit=!1,this.carouselConfiguration={numVisible:1,numScroll:1,circular:!0,orientation:"horizontal",autoplayInterval:null},this.tableRelatedElemConfiguration=this.tableConfigurationService.getRelatedElemTableConfiguration()}ngOnInit(){this.getRelatedPhotos(!0)}getRelatedPhotos(e){this.springService.getfotosManantial(Number(this.springDetail.id)).subscribe(i=>{this.imagesMetadata=i,this.setRelatedPhotos(),this.photos.length>0&&(this.imageDetailId=e?this.photos[0].id:this.currentId)})}getRelatedElements(e){this.relatedElements$=this.globalService.getElementosCercanos(e),this.showEdit=!0}setRelatedPhotos(){this.photos=[];for(let e of this.imagesMetadata)this.photos.push(M.c.createNewPhoto(e))}seeDetail(e){this.currentId=e,this.imageDetailId=this.currentId,this.showEdit=!1}addPhoto(){this.springService.getExtensionFeature(this.springDetail.id).subscribe(e=>{if(200===e.status){let i=new tt.lC([this.springDetail.id],e.body);this.dialog.open(Ne.k,{width:"800px",data:{photoMap:i,layerName:this.configService.getLayerConfiguration(d.C.olMap.layerManantiales).layerName}}).afterClosed().subscribe(l=>{l&&!1!==l&&l.length>0&&(this.coordinates=l,this.coordinatesEvent.emit(l))})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.titulo"),this.translate.instant("dialogos.fotos.anadirFotoError"))})}reloadPhotos(e){this.getRelatedPhotos(!0)}setFavorite(e){this.springService.setFotoFavorita(Number(this.springDetail.id),e).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.establecerFotoFavorita.titulo"),this.translate.instant("dialogos.establecerFotoFavorita.favoritaCorrecto")),this.getRelatedPhotos(!1)):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.establecerFotoFavorita.titulo"),this.translate.instant("dialogos.establecerFotoFavorita.favoritaError"))})}addSelection(e){this.selectionCloseElements=e}validatePhoto(e){this.selectionCloseElements.length>0?this.saveData(e):this.dialogModelService.openConfirmDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),`${this.translate.instant("dialogos.fotos.validacion.msgConfirmacionDescartarAsociacion")} ${this.translate.instant("dialogos.fotos.validacion.msgConfirmacionDescartar2")}`).subscribe(i=>{i&&this.saveData(e)})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}setPhotoMetadata(e){this.photoMetadata=e}saveData(e){let i=new Se.K(this.selectionCloseElements,e),o={agregarRelacionFoto:this.globalService.agregarRelacionFoto(i),actualizarFoto:this.photoMetadata?this.globalService.actualizarFoto(this.photoMetadata):(0,Ie.of)(null)};(0,Re.D)(o).subscribe(l=>{200!==l.agregarRelacionFoto.status||!M.c.isNullorEmpty(l.actualizarFoto)&&200!==l.actualizarFoto.status?this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),this.translate.instant("dialogos.fotos.validacion.validarError")):(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),this.translate.instant("dialogos.fotos.validacion.validar
1Correcto")),this.reloadComponent())})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(we.uw),t.Y36(A.s),t.Y36(S.r),t.Y36(b.sK),t.Y36(B.U),t.Y36(Y.A),t.Y36(u.F0),t.Y36(u.gz),t.Y36(N.E))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-related-photos"]],inputs:{springDetail:"springDetail",entityName:"entityName"},outputs:{coordinatesEvent:"coordinatesEvent"},decls:13,vars:8,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[4,"ngIf","ngIfElse"],["noPhotos",""],[1,"row"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"appHasrole"],[3,"entityName","entityId"],[1,"row","mb-4"],[1,"col"],[3,"images","config","entityId","entityType","sendItemIdEvent","favoriteEvent","newDeleteEvent","newEditEvent"],[4,"ngIf"],[1,"row","justify-content-center","mb-4"],[1,"col","col-xl-10","mb-4"],[3,"dataId","showForm","newMetadataEditEvent"],[1,"col-12"],["appBold",""],[3,"searchResult","tableColumns","newSelectEvent"],["type","button","mat-flat-button","",1,"btn-first",3,"click"],[1,"container-text"],[1,"fa-solid","fa-camera"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2),t.YNc(5,Ye,6,7,"ng-container",3),t.YNc(6,Ve,4,3,"ng-template",null,4,t.W1O),t.TgZ(8,"div",5)(9,"div",6)(10,"div",7),t.YNc(11,Qe,4,3,"button",8),t._UZ(12,"app-map-icon",9),t.qZA()()()()),2&e){const o=t.MAs(7);t.xp6(2),t.AsE("",i.springDetail.id," - ",i.springDetail.nombre,""),t.xp6(3),t.Q6J("ngIf",i.imagesMetadata.length>0)("ngIfElse",o),t.xp6(6),t.Q6J("appHasrole",t.DdM(7,Be)),t.xp6(1),t.Q6J("entityName",i.entityName)("entityId",i.springDetail.id)}},directives:[O.d,g.O5,qe.F,Fe.P,h.M,Ue.D,F.lW,J.I,w.N],pipes:[g.Ov,b.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();var $e=r(8892),Ge=r(3456);function ke(n,s){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-technical-data-no-perfil",6),t.qZA()),2&n){const e=t.oxw().ngIf,i=t.oxw();t.xp6(1),t.Q6J("springDetail",e)("entityName",i.entityName)}}function We(n,s){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-technical-data-perfil",6),t.qZA()),2&n){const e=t.oxw().ngIf,i=t.oxw();t.xp6(1),t.Q6J("springDetail",e)("entityName",i.entityName)}}function Ke(n,s){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-field-data-no-perfil",6),t.qZA()),2&n){const e=t.oxw().ngIf,i=t.oxw();t.xp6(1),t.Q6J("springDetail",e)("entityName",i.entityName)}}function Xe(n,s){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-field-data-perfil",6),t.qZA()),2&n){const e=t.oxw().ngIf,i=t.oxw();t.xp6(1),t.Q6J("springDetail",e)("entityName",i.entityName)}}function ze(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"app-related-photos",10),t.NdJ("coordinatesEvent",function(o){return t.CHM(e),t.oxw(2).addCoordinates(o)}),t.qZA()}if(2&n){const e=t.oxw().ngIf,i=t.oxw();t.Q6J("springDetail",e)("entityName",i.entityName)}}function je(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"app-image-management",12),t.NdJ("associationEvent",function(o){return t.CHM(e),t.oxw(3).changeAssociation(o)}),t.qZA()}if(2&n){const e=t.oxw(2).ngIf,i=t.oxw();t.Q6J("entityDetail",e)("coords",i.coordinates)}}function tn(n,s){if(1&n&&t.YNc(0,je,1,2,"app-image-management",11),2&n){t.oxw();const e=t.MAs(18),i=t.oxw();t.Q6J("ngIf",!i.imgAsociated)("ngIfElse",e)}}function en(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"app-photo-relationship",13),t.NdJ("validateEvent",function(o){return t.CHM(e),t.oxw(2).resetTab(o)}),t.qZA()}if(2&n){const e=t.oxw().ngIf,i=t.oxw();t.Q6J("entityDetail",e)("photoId",i.newPhotoid)}}const $=function(){return["4","2"]};function nn(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"mat-tab-group",2),t.NdJ("selectedTabChange",function(o){return t.CHM(e),t.oxw().tabChanged(o)}),t.TgZ(1,"mat-tab",3),t.ALo(2,"translate"),t.YNc(3,ke,2,2,"div",4),t.YNc(4,We,2,2,"div",5),t.qZA(),t.TgZ(5,"mat-tab",3),t.ALo(6,"translate"),t.YNc(7,Ke,2,2,"div",4),t.YNc(8,Xe,2,2,"div",5),t.qZA(),t.TgZ(9,"mat-tab",3),t.ALo(10,"translate"),t._UZ(11,"app-related-elements",6),t.qZA(),t.TgZ(12,"mat-tab",3),t.ALo(13,"translate"),t.YNc(14,ze,1,2,"app-related-photos",7),t.YNc(15,tn,1,2,"ng-template",null,8,t.W1O),t.YNc(17,en,1,2,"ng-template",null,9,t.W1O),t.qZA()()}if(2&n){const e=s.ngIf,i=t.MAs(16),o=t.oxw();t.Q6J("selectedIndex",o.selectedTab),t.xp6(1),t.s9C("label",t.lcZ(2,13,"pestanas.datosGenerales")),t.xp6(2),t.Q6J("appNothasrole",t.DdM(21,$)),t.xp6(1),t.Q6J("appHasrole",t.DdM(22,$)),t.xp6(1),t.s9C("label",t.lcZ(6,15,"pestanas.datosTecnicos")),t.xp6(2),t.Q6J("appNothasrole",t.DdM(23,$)),t.xp6(1),t.Q6J("appHasrole",t.DdM(24,$)),t.xp6(1),t.s9C("label",t.lcZ(10,17,"pestanas.elemRel")),t.xp6(2),t.Q6J("springDetail",e)("entityName",o.entityName),t.xp6(1),t.s9C("label",t.lcZ(13,19,"pestanas.fotos")),t.xp6(2),t.Q6J("ngIf",0===o.coordinates.length)("ngIfElse",i)}}function an(n,s){1&n&&t._UZ(0,"app-spinner")}let on=(()=>{class n{constructor(e,i,o,l){this.route=e,this.entityMenuService=i,this.springService=o,this.selectedTabService=l,this.numRed=d.C.numRed,this.coordinates=[],this.selectedTab=0,this.imgAsociated=!1,this.entityName=d.C.springEntity,this.stop$=new H.x;
1let m=this.route.snapshot.paramMap.get("gid");null!=m&&(this.entityMenuService.submenuChange(!0),this.spring$=this.springService.getSpring(Number(m)),this.entityMenuService.gidEntitySubject$.next(m))}ngOnInit(){this.selectedTabService.tabIndexSubject$.pipe((0,ot.R)(this.stop$)).subscribe(e=>{this.selectedTab=e})}tabChanged(e){this.resetTab(!0),this.selectedTabService.changeTab(e.index)}addCoordinates(e){this.coordinates=e}changeAssociation(e){this.imgAsociated=!M.c.isUndefined(e),this.newPhotoid=e}ngOnDestroy(){this.stop$.next(!0)}resetTab(e){e&&(this.coordinates=[],this.imgAsociated=!1)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.gz),t.Y36(L.$),t.Y36(A.s),t.Y36(I.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data"]],decls:4,vars:4,consts:[[3,"selectedIndex","selectedTabChange",4,"ngIf","ngIfElse"],["loading",""],[3,"selectedIndex","selectedTabChange"],[3,"label"],[4,"appNothasrole"],[4,"appHasrole"],[3,"springDetail","entityName"],[3,"springDetail","entityName","coordinatesEvent",4,"ngIf","ngIfElse"],["imageManagement",""],["photoRelationship",""],[3,"springDetail","entityName","coordinatesEvent"],[3,"entityDetail","coords","associationEvent",4,"ngIf","ngIfElse"],[3,"entityDetail","coords","associationEvent"],[3,"entityDetail","photoId","validateEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,nn,19,25,"mat-tab-group",0),t.ALo(1,"async"),t.YNc(2,an,1,0,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.spring$))("ngIfElse",o)}},directives:[g.O5,st.SP,st.uX,Ot.b,Nt,J.I,Qt,ne,be,ye,He,$e.A,Ge.C,P.O],pipes:[g.Ov,b.X$],styles:[""]}),n})();class sn{constructor(s,e){this.camposInforme=s,this.parametrosBusqueda=e}}var rn=r(4327),ln=r(4239),cn=r(1889);function dn(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).generateReport()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"botones.generarInforme")))}function pn(n,s){1&n&&t._UZ(0,"app-generating-report-icon")}const mn=function(){return["../"]};function gn(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",3)(6,"div",4)(7,"div",5)(8,"app-pick-list-form",6),t.NdJ("newSelectionEvent",function(o){return t.CHM(e),t.oxw().addSelectedItems(o)}),t.qZA()()(),t.TgZ(9,"div",7)(10,"div",8)(11,"div",9),t.YNc(12,dn,3,3,"button",10),t.YNc(13,pn,1,0,"ng-template",null,11,t.W1O),t.TgZ(15,"button",12),t._uU(16),t.ALo(17,"translate"),t.qZA()()()()(),t.BQk()}if(2&n){const e=s.ngIf,i=t.MAs(14),o=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,6,"informes.msgCampos")),t.xp6(5),t.Q6J("sourceList",e),t.xp6(4),t.Q6J("ngIf",!o.generatingReport)("ngIfElse",i),t.xp6(3),t.Q6J("routerLink",t.DdM(10,mn)),t.xp6(1),t.Oqu(t.lcZ(17,8,"botones.volver"))}}function un(n,s){1&n&&t._UZ(0,"app-spinner")}let _n=(()=>{class n{constructor(e,i,o,l,m){var _;this.globalService=e,this.router=i,this.dialogModelService=o,this.translate=l,this.springService=m,this.selectedItems=[],this.generatingReport=!1,this.formData=null===(_=this.router.getCurrentNavigation())||void 0===_?void 0:_.extras.state}ngOnInit(){this.parameterization$=this.globalService.getParametrizacionInforme(d.C.tipoEntidad.manantiales)}addSelectedItems(e){this.selectedItems=e}generateReport(){if(this.selectedItems.length>0){this.generatingReport=!0;let e=new sn(this.selectedItems,this.formData);this.springService.generarInformeGeneral(e).subscribe(i=>{if(200===i.status){let o=M.c.toArrayBuffer(i.body.contenido);const l=new Blob([o],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),m=new File([l],i.body.nombre,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});(0,rn.saveAs)(m)}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.informes.titulo"),this.translate.instant("dialogos.informes.informeError"));this.generatingReport=!1})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.informes.titulo"),this.translate.instant("dialogos.informes.seleccionCampos"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(B.U),t.Y36(u.F0),t.Y36(S.r),t.Y36(b.sK),t.Y36(A.s))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-report"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-text"],[1,"container"],[1,"row","mb-2"],[1,"col"],[3,"sourceList","newSelectionEvent"],[1,"row"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"ngIf","ngIfElse"],["generating",""],["type","button","mat-flat-button","",1,"btn-second",3,"routerLink"],["type","button","mat-flat-button","",1,"btn-first",3,"click"]],template:function(e,i){if(1&e&&(t.YNc(0,gn,18,11,"ng-container",0),t.ALo(1,"async"),t.YNc(2,un,1,0,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.parameterization$))("ngIfElse",o)}}
1,directives:[g.O5,ln.N,F.lW,cn.C,u.rH,P.O],pipes:[g.Ov,b.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%]   .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%]   .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}"]}),n})();var fn=r(2941),hn=r(2367);function bn(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-historical-fields",3),t.NdJ("newSearchEvent",function(o){return t.CHM(e),t.oxw().searchChanges(o)}),t.qZA(),t.BQk()}if(2&n){const e=s.ngIf,i=t.oxw();t.xp6(1),t.Q6J("fields",e)("gid",i.gid)}}function vn(n,s){if(1&n&&(t.ynx(0),t._UZ(1,"app-historical-table",4),t.BQk()),2&n){const e=s.ngIf,i=t.oxw();t.xp6(1),t.Q6J("searchResult",e)("gid",i.gid)("searchField",i.selectedValueName)("tableColumns",i.tableConfiguration)}}let Cn=(()=>{class n{constructor(e,i,o,l){this.route=e,this.springService=i,this.translate=o,this.tableConfigurationService=l,this.gid="",this.tab="",this.name="",this.selectedValueName="",this.gid=this.route.snapshot.paramMap.get("gid")||"",this.tab=this.route.snapshot.paramMap.get("tab")||"",this.name=this.route.snapshot.paramMap.get("name")||"",this.tableConfiguration=this.tableConfigurationService.getHistoricalTableConfiguration(),""!==this.tab&&(this.historicalFields$=this.springService.getListadoCamposHistorico(Number(this.tab)))}ngOnInit(){}searchChanges(e){this.selectedValueName=e.nombreOriginal,""!==this.gid&&""!==this.tab&&(this.historical$=this.springService.getHistoricoCampo(Number(this.gid),Number(this.tab),e.nombre))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.gz),t.Y36(A.s),t.Y36(b.sK),t.Y36(Y.A))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-historical"]],decls:8,vars:8,consts:[[1,"container-title"],[1,"mb-2"],[4,"ngIf"],[3,"fields","gid","newSearchEvent"],[3,"searchResult","gid","searchField","tableColumns"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.YNc(4,bn,2,2,"ng-container",2),t.ALo(5,"async"),t.YNc(6,vn,2,4,"ng-container",2),t.ALo(7,"async")),2&e&&(t.xp6(2),t.AsE("",i.gid," - ",i.name,""),t.xp6(2),t.Q6J("ngIf",t.lcZ(5,4,i.historicalFields$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(7,6,i.historical$)))},directives:[O.d,g.O5,fn.f,hn.q],pipes:[g.Ov],styles:[""]}),n})();class xn{constructor(s,e){this.manantial=s,this.datosAdicionales=e}}var Tn=r(6159),Zn=r(291);function An(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"app-version-fields-form",4),t.NdJ("newSelectionEvent",function(o){return t.CHM(e),t.oxw().setSelectedItems(o)}),t.qZA(),t.TgZ(6,"app-aditional-data-form",5),t.NdJ("newAditionalDataEvent",function(o){return t.CHM(e),t.oxw().saveData(o)}),t.qZA(),t.BQk()}if(2&n){const e=s.ngIf,i=t.oxw();
1t.xp6(3),t.AsE("",e.id," - ",e.nombre,""),t.xp6(2),t.Q6J("modifiedData",i.navigationData),t.xp6(1),t.Q6J("entityId",e.id)("guardando",i.guardando)}}function Mn(n,s){1&n&&t._UZ(0,"app-spinner")}const On=[{path:"",data:{breadcrumb:"bCManantiales"},component:j,children:[{path:"",data:{breadcrumb:"null"},redirectTo:"data",pathMatch:"full"},{path:"data",data:{breadcrumb:"bCData"},component:K},{path:"search",data:{breadcrumb:"bCBusInf"},component:X,children:[{path:"",data:{breadcrumb:"null"},component:_t},{path:"general/:gid",data:{breadcrumb:"bCFichaGral"},component:Mt},{path:"technical/:gid",data:{breadcrumb:"bCFichaTec"},component:on},{path:"report",data:{breadcrumb:"bCInf"},component:_n},{path:"fieldsHistory/:gid/:tab/:name",data:{breadcrumb:"bCHist"},component:Cn},{path:"fieldsVersion/:gid",data:{breadcrumb:"bCVers"},component:(()=>{class n{constructor(e,i,o,l,m){var _;this.router=e,this.springService=i,this.activatedRoute=o,this.dialogModelService=l,this.translate=m,this.selectedItems=[],this.stop$=new H.x,this.guardando=!1;let C=this.activatedRoute.snapshot.paramMap.get("gid");null!=C&&(this.spring$=this.springService.getSpring(Number(C))),this.navigationData=null===(_=this.router.getCurrentNavigation())||void 0===_?void 0:_.extras.state}ngOnInit(){}setSelectedItems(e){this.selectedItems=e}saveData(e){this.spring$.pipe((0,ot.R)(this.stop$)).subscribe(i=>{let o=i;if(o.nombresAlternativos=[],this.selectedItems.length>0){for(const m of this.selectedItems){let _=m.name,C=this.navigationData.find(y=>y.name===_).value;"nombreAlt"===_?o.nombresAlternativos.push({id:i.id,nombre:C}):o[_]=C}let l=new xn(o,e);this.springService.guardarVersionado(l).subscribe(m=>{200===m.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionCorrecta")),this.router.navigate([`../../technical/${m.body.id}`],{relativeTo:this.activatedRoute})):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionError"))})}else this.guardando=!this.guardando,this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.seleccionCampos"))})}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.F0),t.Y36(A.s),t.Y36(u.gz),t.Y36(S.r),t.Y36(b.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-fields-version"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title"],[1,"mb-2"],[3,"modifiedData","newSelectionEvent"],[3,"entityId","guardando","newAditionalDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,An,7,5,"ng-container",0),t.ALo(1,"async"),t.YNc(2,Mn,1,0,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.spring$))("ngIfElse",o)}},directives:[g.O5,O.d,Tn.L,Zn.T,P.O],pipes:[g.Ov],styles:[""]}),n})()}]}]}];let En=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[u.Bz.forChild(On)],u.Bz]}),n})();var Pn=r(40),Dn=r(520);function mt(n){return new Pn.w(n,"./assets/i18n/spring/",".json")}let yn=(()=>{class n{constructor(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[],imports:[[a.m,En,b.aw.forChild({defaultLanguage:d.C.defaultLanguage,loader:{provide:b.Zw,useFactory:mt,deps:[Dn.eN]},isolate:!1,extend:!0})]]}),n})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.