PageSourceSearch

https://jesusmaria-santander.gov.co/chunk-JRXJXHCH.js

js jesusmaria-santander.gov.co collected 2026-10-03 02:31:14 UTC 5,453 bytes, 1 lines download raw bytes

1import{e as T,g as k}from"./chunk-SB5L2XE4.js";import{A as q,D as H,c as D,g as O,h as L,j as P,l as j,m as U,x as $}from"./chunk-ICJV4PL6.js";import{a as N}from"./chunk-RIRGXRXY.js";import"./chunk-3GN2FC7K.js";import{t as B}from"./chunk-47CSRN7C.js";import{c as F}from"./chunk-SKH2MXBC.js";import{i as A,j as V,k as R,v as M}from"./chunk-BQLJE42W.js";import{$b as y,Db as v,Ib as f,Jb as m,Sb as b,Tb as l,Vb as I,Xa as d,Ya as h,Zb as S,_b as C,bc as E,da as w,dc as W,ib as _,mb as c,na as p,oa as u,xb as a,yb as o,zb as x}from"./chunk-YE3BF7DR.js";import"./chunk-4IDNTCH7.js";var z=i=>({"btn-search":!0,"disabled-button":i});function J(i,e){i&1&&(a(0,"span"),l(1,"Debes ingresar una palabra"),o())}function K(i,e){if(i&1&&(a(0,"div",15),_(1,J,2,0,"span",16),o()),i&2){let t;m();let r=b(6);d(),c("ngIf",(t=r.form.get("name"))==null||t.errors==null?null:t.errors.required)}}function Q(i,e){if(i&1&&(a(0,"div"),l(1),o()),i&2){let t=m().$implicit;d(),I(" ",t.name," ")}}function X(i,e){i&1&&(a(0,"div",15)(1,"span"),l(2,"Debes ingresar una palabra"),o()())}function Y(i,e){if(i&1){let t=v();a(0,"div")(1,"input",18),y("ngModelChange",function(n){p(t);let s=m().$implicit;return C(s.editname,n)||(s.editname=n),u(n)}),o(),_(2,X,3,0,"div",8),o()}if(i&2){let t=m().$implicit;d(),S("ngModel",t.editname),d(),c("ngIf",t.error)}}function Z(i,e){if(i&1){let t=v();a(0,"div")(1,"button",19),f("click",function(){p(t);let n=m().$implicit,s=m();return u(s.edit(n))}),l(2," Editar "),o(),a(3,"button",19),f("click",function(){p(t);let n=m().$implicit,s=m();return u(s.remove(n))}),l(4," Eliminar "),o()()}}function ee(i,e){if(i&1){let t=v();a(0,"div")(1,"button",19),f("click",function(){p(t);let n=m().$implicit,s=m();return u(s.save(n))}),l(2," Guardar "),o(),a(3,"button",19),f("click",function(){p(t);let n=m().$implicit,s=m();return u(s.cancel(n))}),l(4," Cancelar "),o()()}}function te(i,e){if(i&1&&(a(0,"tr")(1,"td"),_(2,Q,2,1,"div",16)(3,Y,3,2,"div",16),o(),a(4,"td",17),_(5,Z,5,0,"div",16)(6,ee,5,0,"div",16),o()()),i&2){let t=e.$implicit;d(2),c("ngIf",!t.edit),d(),c("ngIf",t.edit),d(2),c("ngIf",!t.edit),d(),c("ngIf",t.edit)}}var G=class i{constructor(e,t,r){this.settingService=e;this.helperService=t;this.modalService=r}words=[];model={};setting={};formIsBusy=!1;formSubmitted=!1;ngOnInit(){this.activate()}activate(){this.model.name="",this.settingService.get({keyword:"CommentSettings.InvalidWords"}).subscribe({next:e=>this.setSetting(e),error:e=>this.helperService.handlerException(e)})}edit(e){for(var t=this.words.filter(n=>n.edit),r=0;r<t.length;r++)t[r].edit=!1;e.edit=!e.edit}remove(e){this.modalService.showConfirm(this.settingService.settings.resources["InvalidWord.ConfirmDelete"]).subscribe({next:()=>{this.formIsBusy=!0;var t=this.words.indexOf(e);this.words.splice(t,1),this.update()},error:t=>console.error(t),complete:()=>this.formIsBusy=!1})}save(e){e.editname!==""?(e.name=e.editname,e.error=!1,e.edit=!e.edit,this.update()):e.error=!0}cancel(e){e.editname=e.name,e.edit=!e.edit,e.error=!1}send(e){e.valid&&!this.formIsBusy?(this.formIsBusy=!0,this.words.push({name:this.model.name,edit:!1,editname:this.model.name}),this.model.name="",this.update(),this.formSubmitted=!1):this.formSubmitted=!0}update(){var e=this.words.map(t=>t.name).join(",");this.setting.value=e,this.settingService.update(this.setting).subscribe({next:t=>this.setUpdate(t),error:t=>this.errorUpdate(t),complete:()=>this.formIsBusy=!1})}setUpdate(e){}setSetting(e){if(e.results.length){this.setting=e.results[0];for(var t=this.setting.value,r=t.split(","),n=0;n<r.length;n++)this.words.push({name:r[n],edit:!1,editname:r[n]})}}errorUpdate(e){this.helperService.handlerException(e)}trackByIndex(e,t){return e}static \u0275fac=function(t){return new(t||i)(h(F),h(N),h(B))};static \u0275cmp=w({type:i,selectors:[["app-admin-restricted-words"]],standalone:!0,features:[E],decls:24,vars:7,consts:[["form","ngForm"],[1,"admin-content"],[1,"section-tit"],["routerLink","/administrador",1,"btn-close"],[1,"icon-close"],["novalidate","","name","form",1,"form-table",3,"ngSubmit"],[2,"width","100%"],["name","name","type","text","required","","maxlength","20",3,"ngModelChange","ngModel"],["class","error",4,"ngIf"],["type","submit","value","Agregar",3,"ngClass"],[1,"content-table"],[1,"table-admin"],["width","70%"],["width","30%",2,"text-align","right"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"error"],[4,"ngIf"],[2,"text-align","right"],["maxlength","50","type","text","value","",3,"ngModelChange","ngModel"],[1,"btn-save",2,"display","inline-block",3,"click"]],template:function(t,r){if(t&1){let n=v();a(0,"div",1)(1,"h1",2),l(2,"Palabras inadecuadas"),o(),a(3,"a",3),x(4,"span",4),o(),a(5,"form",5,0),f("ngSubmit",function(){p(n);let g=b(6);return u(r.send(g))}),a(7,"div",6)(8,"label"),l(9,"Agrega una nueva palabra"),o(),a(10,"input",7),y("ngModelChange",function(g){return p(n),C(r.model.name,g)||(r.model.name=g),u(g)}),o(),_(11,K,2,1,"div",8),o(),x(12,"input",9)(13,"br"),o(),a(14,"div",10)(15,"table",11)(16,"thead")(17,"tr")(18,"th",12),l(19,"Palabra"),o(),a(20,"th",13),l(21,"Acciones"),o()()(),a(22,"tbody"),_(23,te,7,4,"tr",14),o()()()()}if(t&2){let n,s=b(6);d(10),S("ngModel",r.model.name),d(),c("ngIf",((n=s.form.get("name"))==null?null:n.invalid)&&s.submitted),d(),c("ngClass",W(5,z,r.formIsBusy)),d(11),c("ngForOf",r.words)("ngForTrackBy",r.trackByIndex)}},dependencies:[M,A,V,R,H,U,D,O,L,$,q,j,P,k,T]})};export{G as AdminRestrictedWordsComponent};

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.