1import{a as P}from"./chunk-3QAEEWMF.js";import{a as G}from"./chunk-SPSMUDOJ.js";import"./chunk-BAGWPQZV.js";import{A as W,D as z,c as R,g as k,h as A,j as B,l as q,m as j,x as L,z as Q}from"./chunk-TZ2MW36L.js";import{a as F}from"./chunk-3KOQRKYT.js";import{s as T,t as N}from"./chunk-MTKRVMUJ.js";import"./chunk-SHTGYNA2.js";import{k as w,u as M}from"./chunk-4YERUHPX.js";import{Db as h,Ib as _,Jb as d,Pb as C,Qb as b,Rb as y,Sb as x,Tb as c,Xa as o,Ya as v,Yb as D,Zb as E,_b as V,ac as I,da as S,ib as p,mb as a,na as u,oa as f,xb as n,yb as i,zb as s}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";var J=["form"];function K(t,r){t&1&&(n(0,"span"),c(1,"Debes ingresar un c\xF3digo"),i())}function O(t,r){t&1&&(n(0,"span"),c(1,"Debes ingresar un c\xF3digo v\xE1lido"),i())}function U(t,r){t&1&&(n(0,"span"),c(1,"Debes ingresar un c\xF3digo v\xE1lido"),i())}function X(t,r){if(t&1&&(n(0,"div",18),p(1,K,2,0,"span",7)(2,O,2,0,"span",7)(3,U,2,0,"span",7),i()),t&2){d();let e=x(9);o(),a("ngIf",e==null||e.errors==null?null:e.errors.required),o(),a("ngIf",e==null||e.errors==null?null:e.errors.maxlength),o(),a("ngIf",e==null||e.errors==null?null:e.errors.minlength)}}function Y(t,r){t&1&&(n(0,"div",18)(1,"span"),c(2,"Debes ingresar el Captcha"),i()())}function Z(t,r){if(t&1){let e=h();n(0,"form",8,0),_("ngSubmit",function(){u(e);let m=d();return f(m.send())}),n(2,"div",9)(3,"h2",10),c(4," Datos del documento "),i(),n(5,"div")(6,"label",11),c(7," Ingresa el n\xFAmero de validez "),i(),n(8,"input",12,1),V("ngModelChange",function(m){u(e);let g=d();return E(g.model.id,m)||(g.model.id=m),f(m)}),i(),p(10,X,4,3,"div",13),i(),n(11,"div",14),s(12,"app-captcha"),p(13,Y,3,0,"div",13),i(),n(14,"div",15)(15,"button",16),_("click",function(){u(e);let m=d();return f(m.clear())}),n(16,"span"),c(17,"LIMPIAR"),i()(),n(18,"button",17),c(19,"ENVIAR"),i()()()()}if(t&2){let e=x(1),l=x(9),m=d();o(8),D("ngModel",m.model.id),o(2),a("ngIf",(l==null?null:l.errors)&&e.submitted),o(3),a("ngIf",e.submitted&&m.captchaValid),o(2),a("disabled",m.formIsBusy),o(3),a("disabled",m.formIsBusy)}}function $(t,r){if(t&1&&(n(0,"div",26)(1,"b"),c(2,"Documento:"),i(),s(3,"div",24),i()),t&2){let e=d(2);o(3),a("textContent",e.response.nameSubDocumentType)}}function ee(t,r){if(t&1&&(n(0,"div",26)(1,"b"),c(2,"No de identificaci\xF3n del interesado"),i(),s(3,"div",24),i()),t&2){let e=d(2);o(3),a("textContent",e.response.numeroIdentificacion)}}function te(t,r){if(t&1&&(n(0,"div")(1,"div",9)(2,"div",19)(3,"div",20),s(4,"i",21),i(),n(5,"span"),c(6," Documento v\xE1lido "),i()(),n(7,"div",10),c(8," Resumen de la solicitud "),i(),n(9,"div",22)(10,"div",23)(11,"b"),c(12,"C\xF3digo verificado"),i(),s(13,"div",24),i(),p(14,$,4,1,"div",25)(15,ee,4,1,"div",25),i()()()),t&2){let e=d();o(13),a("textContent",e.response.guid),o(),a("ngIf",e.response.nameSubDocumentType),o(),a("ngIf",e.response.numeroIdentificacion)}}var H=class t{constructor(r,e,l){this.documentService=r;this.modalService=e;this.eventEmitterService=l}model={};title=null;captchaValid=!1;form;formIsBusy;formSubmitted;response;send(){var r=!0,e=window.sessionStorage.getItem("keyValueCaptcha");this.captchaValid=!1,window.sessionStorage.getItem("visibleCaptcha")==="true"&&(this.captchaValid=!1,e=hcaptcha.getResponse(window.sessionStorage.getItem("captchaWidgetID")),e?.length===0&&(this.captchaValid=!0,r=!1)),r&&(this.model.captcha=e,this.form.valid&&!this.formIsBusy?this.documentService.validateDocument(this.model.id).subscribe({next:l=>{l.guid!=null?this.response=l:this.modalService.showAlert("C\xF3digo inv\xE1lido")},error:l=>{this.eventEmitterService.reloadCaptchaEvent.emit(!0),this.modalService.showAlert("C\xF3digo inv\xE1lido")}}):this.formSubmitted=!0)}clear(){this.formSubmitted=!1,this.model={},this.eventEmitterService.reloadCaptchaEvent.emit(!0)}static \u0275fac=function(e){return new(e||t)(v(T),v(N),v(F))};static \u0275cmp=S({type:t,selectors:[["app-validate-document"]],viewQuery:function(e,l){if(e&1&&C(J,5),e&2){let m;b(m=y())&&(l.form=m.first)}},standalone:!0,features:[I],decls:8,vars:3,consts:[["form","ngForm"],["identification","ngModel"],[1,"content_all"],[3,"seedValue"],[1,"section-tit"],[1,"certificate-bg"],["novalidate","","name","form",3,"ngSubmit",4,"ngIf"],[4,"ngIf"],["novalidate","","name","form",3,"ngSubmit"],[1,"certificate-wData"],[1,"sub-title"],[1,"label"],["maxlength","100","minlength","32","required","","aria-required","true","autocomplete","off","placeholder","Ej. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type","text","name","identification",3,"ngModelChange","ngModel"],["class","error",4,"ngIf"],[1,"certificate-wCaptcha"],[1,"createCon-colBtns"],["type","button",1,"btn-progNew2",3,"click","disabled"],["type","submit",1,"btn-main","btn-main--publicar",3,"disabled"],[1,"error"],[1,"certificate-sucsessRow"],[1,"certificate-wCheck"],[1,"icon-check"],[1,"certificate-wColData","certificate-wColData--valid"],[1,"certificate-colData"],[3,"textContent"],["class","certificate-colData certificate-colData--valid",4,"ngIf"],[1,"certificate-colData","certificate-colData--valid"]],template:function(e,l){e&1&&(n(0,"section",2),s(1,"app-seed",3),n(2,"h2",4),c(3,"Validez del documento"),i()(),n(4,"div",5)(5,"section",2),p(6,Z,20,5,"form",6)(7,te,16,3,"div",7),i()()),e&2&&(o(),a("seedValue","Validez"),o(5),a("ngIf",!l.response),o(),a("ngIf",l.response))},dependencies:[G,M,w,z,j,R,k,A,L,Q,W,q,B,P]})};export{H as ValidateDocumentComponent};
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.