widget-web-component 1.0.21-dev.20251014-1504 → 1.0.21-dev.20251015-0217

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -56,7 +56,7 @@
56
56
  const observer = new MutationObserver(() => injectStyles());
57
57
  observer.observe(document.documentElement, { childList: true, subtree: true });
58
58
  })();
59
- "use strict";if((self.webpackChunkvex=self.webpackChunkvex||[]).push([[163],{4163:(e,t,n)=>{n.r(t),n.d(t,{ClientCertModule:()=>Ft});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(8259),j=n(2340),F=n(1363),q=n(6830),Y=n(4650),V=n(5089),H=n(8460),z=n(529),B=n(6554);let U=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSignedFile(e){return new Promise(((t,n)=>{this.localFetch.postFile(j.N.baseUrl+"/requests/client-certificate/upload-file-signed",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(j.N.baseUrl+"/requests/client-certificate/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/pre-request/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/client-certificate/otp";j.N.scraperMock&&(i="/mockscrapper/requests/client-certificate/otp"),this.localFetch.postFetchWhitoutToken(j.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵinject(V.F),Y.ɵɵinject(z.eN),Y.ɵɵinject(B.r))},e.ɵprov=Y.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var W=n(5412),$=n(833),G=n(4302),Z=n(3731);function K(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function Q(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}const X=function(e,t,n){return{color:e,border:t,background:n}};function J(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"small",13),Y.ɵɵtemplate(2,K,2,1,"span",7),Y.ɵɵtemplate(3,Q,2,2,"span",7),Y.ɵɵelementEnd(),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction3(3,X,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.lastNumberPhone)}}function ee(e,t){1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),Y.ɵɵelementEnd())}function te(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}const ne=function(e,t){return{color:e,background:t}};function ie(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"small",13),Y.ɵɵtemplate(2,ee,2,0,"span",7),Y.ɵɵtemplate(3,te,2,1,"span",7),Y.ɵɵelementStart(4,"a",14),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.resendOTP())})),Y.ɵɵtext(5,"Reenviar"),Y.ɵɵelementEnd()(),Y.ɵɵelementContainerEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction3(4,X,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction2(8,ne,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}function re(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementStart(5,"div",6),Y.ɵɵtemplate(6,J,4,7,"ng-container",7),Y.ɵɵtemplate(7,ie,6,11,"ng-container",7),Y.ɵɵelementEnd(),Y.ɵɵelementStart(8,"div",8)(9,"mat-form-field",9)(10,"mat-label"),Y.ɵɵtext(11," Código OTP "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"input",10),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.capturePasteEvent(t))}))("keyup",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setInputEvent(t))})),Y.ɵɵelementEnd()()()(),Y.ɵɵelementStart(13,"div",11)(14,"button",12),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(15,"Siguiente"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.otp.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,18,e.texts.otp.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵproperty("ngIf",e.secsCount&&e.secsCount>0),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.secsCount||e.secsCount<=0),Y.ɵɵadvance(7),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function se(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"p",17),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let oe=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new Y.EventEmitter(null),this.errPhone=new Y.EventEmitter(null),this.resendO=new Y.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?R(e.target).next().focus():"Backspace"==e.code&&R(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(P.gz))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,re,16,20,"form",0),Y.ɵɵtemplate(1,se,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ae=n(342);function le(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",3),Y.ɵɵelement(1,"div",4)(2,"div",5),Y.ɵɵpipe(3,"safeHtml"),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.success.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(3,8,e.texts.success.description||""),Y.ɵɵsanitizeHtml)}}function ce(e,t){if(1&e&&Y.ɵɵelement(0,"widget-documents",6),2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function de(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",7)(1,"button",8),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.gotoRedirect())})),Y.ɵɵtext(2),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1(" ",e.data.ClientCertificate.btnTextCallBack||"Haga click aquí para finalizar"," ")}}let ue=(()=>{class e{constructor(e){this.utils=e,this.showDocuments=!1}ngOnInit(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.automaticRedirectCallBack&&this.data.ClientCertificate.callBackUrl?setTimeout((()=>{location.assign(this.data.ClientCertificate.callBackUrl)}),2e3):this.data.ClientCertificate.showDocumentsOnSuccess&&(this.showDocuments=!0)}gotoRedirect(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.callBackUrl&&location.assign(this.data.ClientCertificate.callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",packId:"packId",requestID:"requestID",userId:"userId"},decls:3,vars:3,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,le,4,10,"div",0),Y.ɵɵtemplate(1,ce,1,3,"widget-documents",1),Y.ɵɵtemplate(2,de,3,7,"div",2)),2&e&&(Y.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.showDocuments),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.data.ClientCertificate.enableUrlCallBack))},dependencies:[i.O5,u.lW,ae.A,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function he(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",5)(1,"button",6),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.retry())})),Y.ɵɵtext(2,"Intentarlo nuevamente"),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function pe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",5)(1,"button",6),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.newRequest())})),Y.ɵɵtext(2,"Crear nueva solicitud"),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let me=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new Y.EventEmitter(null),this.newReq=new Y.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(y.o),Y.ɵɵdirectiveInject(I.T))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵtemplate(5,he,3,6,"div",4),Y.ɵɵtemplate(6,pe,3,6,"div",4),Y.ɵɵelementEnd()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵproperty("innerHTML",t.texts.fail.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,6,t.texts.fail.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(2),Y.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function fe(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span",7),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1("El archivo no puede pesar mas de ",e.max/1e3,"MB")}}function ge(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵtextInterpolate2("",e.fileName," ",e.fileSize?"("+e.fileSize+"Kb)":"","")}}n(6866);const _e=function(e,t){return{"bg-red-500/20":e,"bg-slate-100/80":t}};let ve=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.max=1e4,this.newItemEvent=new Y.EventEmitter(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){const t=e.target.files[0];this.uploadForm.patchValue({file:t}),this.uploadForm.get("file").updateValueAndValidity();const n=new FormData;let i=this.uploadForm.get("file").value;this.fileName=i.name,this.fileSize=+(+i.size/1e3).toFixed(1),n.append("file",i),console.warn(this.uploadForm.get("file").value),console.error(t),t.size<=3e6&&this.newItemEvent.emit({file:t}),this.newItemEvent.emit(n)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["app-upload-file"]],inputs:{label:"label",acceptFiles:"acceptFiles",max:"max"},outputs:{newItemEvent:"change"},decls:11,vars:9,consts:[[1,"flex","flex-col","items-start","input-file-wrapper","my-1",3,"formGroup","ngClass"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"],["class","text-red-500",4,"ngIf"],[4,"ngIf"],[1,"text-red-500"]],template:function(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",0)(1,"mat-label"),Y.ɵɵtext(2),Y.ɵɵelementEnd(),Y.ɵɵelementStart(3,"input",1,2),Y.ɵɵlistener("change",(function(e){return t.fileChange(e)})),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",3)(6,"button",4),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵreference(4);return Y.ɵɵresetView(t.click())})),Y.ɵɵtext(7,"Seleccionar archivo"),Y.ɵɵelementEnd(),Y.ɵɵtext(8,"     "),Y.ɵɵtemplate(9,fe,2,1,"span",5),Y.ɵɵtemplate(10,ge,2,2,"span",6),Y.ɵɵelementEnd()()}2&e&&(Y.ɵɵproperty("formGroup",t.uploadForm)("ngClass",Y.ɵɵpureFunction2(6,_e,!t.fileName||t.fileSize>3e3,t.fileName&&t.fileSize<=3e3)),Y.ɵɵadvance(2),Y.ɵɵtextInterpolate(t.label),Y.ɵɵadvance(1),Y.ɵɵproperty("accept",t.acceptFiles),Y.ɵɵadvance(6),Y.ɵɵproperty("ngIf",t.fileSize>t.max),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.fileSize<=t.max))},dependencies:[i.mk,i.O5,p.ɵNgNoValidate,p.NgControlStatusGroup,p.FormGroupDirective,A.hX,u.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})();function ye(e,t){if(1&e&&(Y.ɵɵelementStart(0,"mat-hint",21),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate(e.errorDNI)}}function be(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),Y.ɵɵtext(8,"Nombre de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(9,"input",8),Y.ɵɵelementEnd(),Y.ɵɵelementStart(10,"mat-form-field",7)(11,"mat-label"),Y.ɵɵtext(12,"Primer apellido de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(13,"input",9),Y.ɵɵelementEnd(),Y.ɵɵelementStart(14,"mat-form-field",7)(15,"mat-label"),Y.ɵɵtext(16,"Segundo apellido de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(17,"input",10),Y.ɵɵelementEnd(),Y.ɵɵelementStart(18,"mat-form-field",7)(19,"mat-label"),Y.ɵɵtext(20,"Email"),Y.ɵɵelementEnd(),Y.ɵɵelement(21,"input",11),Y.ɵɵelementEnd(),Y.ɵɵelementStart(22,"mat-form-field",7)(23,"mat-label"),Y.ɵɵtext(24,"Telefono"),Y.ɵɵelementEnd(),Y.ɵɵelement(25,"input",12),Y.ɵɵelementEnd(),Y.ɵɵelementStart(26,"mat-form-field",7)(27,"mat-label"),Y.ɵɵtext(28,"Número de documento de identificación"),Y.ɵɵelementEnd(),Y.ɵɵelement(29,"input",13),Y.ɵɵtemplate(30,ye,2,1,"mat-hint",14),Y.ɵɵelementEnd(),Y.ɵɵelementStart(31,"mat-form-field",7)(32,"mat-label"),Y.ɵɵtext(33,"Razón social"),Y.ɵɵelementEnd(),Y.ɵɵelement(34,"input",15),Y.ɵɵelementEnd(),Y.ɵɵelementStart(35,"mat-form-field",7)(36,"mat-label"),Y.ɵɵtext(37,"CIF"),Y.ɵɵelementEnd(),Y.ɵɵelement(38,"input",16),Y.ɵɵelementEnd(),Y.ɵɵelementStart(39,"app-upload-file",17),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setAnvers(t))})),Y.ɵɵelementEnd(),Y.ɵɵelementStart(40,"app-upload-file",18),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setRevers(t))})),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(41,"div",19)(42,"button",20),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(43," Siguiente "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.form.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,51,e.texts.form.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.name?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.lastname?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.secondlastname?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.phone?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.phone?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.dni?-1:1),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorDNI),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.razon?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.cif?-1:1),Y.ɵɵadvance(1),Y.ɵɵproperty("max",2e3),Y.ɵɵadvance(1),Y.ɵɵproperty("max",2e3),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function xe(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",22),Y.ɵɵelement(1,"mat-progress-spinner",23),Y.ɵɵelementStart(2,"p",24),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}const we={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.next=new Y.EventEmitter(null),this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1}}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}setForm(e){let t=e&&e.person_name?e.person_name:null,n=e&&(e.email||e.email_copy)?e.email||e.email_copy:null,i=e&&e.person_last_name?e.person_last_name:null,r=e&&e.person_last_name2?e.person_last_name2:null,s=e?e.person_document_number||e.document_number:null,o=e&&e.razon_social?e.razon_social:null,a=e&&e.cif?e.cif:null,l=e&&e.phone?e.phone:null;this.form=this.fb.group({name:[t||null,[p.Validators.required]],lastname:[i||null,[p.Validators.required]],lastname2:[r||null],dni:[s||null,[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9),this.regexDNI()]],razon:[o||null,[p.Validators.required]],email:[n,[p.Validators.required,p.Validators.email]],phone:[l,[p.Validators.required]],cif:[a||null,[p.Validators.required,p.Validators.minLength(9),p.Validators.maxLength(9)]],document_front:[null,[p.Validators.required]],document_back:[null,[p.Validators.required]]}),this.requestIDFromURL&&this.disableEnableInputs(!1,t,i,r,n,l,s,o,a),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,r,s,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:r||!1,phone:s||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}if(e){this.setRegex(e)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),console.warn(this.isDni,this.isNie),this.errorDNI=this.isDni||this.isNie?null:"Debes ingresar un DNI o NIE válido!",this.cd.markForCheck())}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}nextStep(){let e={name:this.form.get("name").value,lastname:this.form.get("lastname").value,lastname2:this.form.get("lastname2").value,dni:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,document_front:this.form.get("document_front").value,document_back:this.form.get("document_back").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("lastname2").value,email_copy:this.form.get("email").value,phone:this.form.get("phone").value,document_number:this.form.get("dni").value,check_legal:!0,type:"LEGAL",rmc_validation:!0,validation_id:!0};this.data.config.activatePower&&(e.power_activate=1),this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(Y.ChangeDetectorRef))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",loading:"loading",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep"},features:[Y.ɵɵProvidersFeature([{provide:M.sG,useValue:we},{provide:Y.LOCALE_ID,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","lastname2","matInput","",3,"tabindex"],["formControlName","email","matInput","",3,"tabindex"],["formControlName","phone","maxlength","9","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","placeholder","Ej: 12345678R","matInput","",3,"tabindex"],["class","text-xs text-red-500",4,"ngIf"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","maxlength","9","placeholder","Ej: B12345678","type","text","matInput","",3,"tabindex"],["label","Anverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],["label","Reverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-xs","text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,be,44,53,"form",0),Y.ɵɵtemplate(1,xe,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,ve,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Se=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"form",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd()()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",t.texts.noService.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,8,t.texts.noService.description),Y.ɵɵsanitizeHtml))},dependencies:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Me=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new Y.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(y.o),Y.ɵɵdirectiveInject(I.T))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-md","mb-2","mt-2"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementStart(5,"div",4),Y.ɵɵtext(6),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(7,"div",5)(8,"button",6),Y.ɵɵlistener("click",(function(){return t.retry()})),Y.ɵɵtext(9,"Intentarlo nuevamente"),Y.ɵɵelementEnd()()()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",t.texts.abandoned.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,15,t.texts.abandoned.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" Estado: ",t.getTextStatus()," "),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ie(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function ke(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña es requerida "),Y.ɵɵelementEnd())}function Ee(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),Y.ɵɵelementEnd())}function Te(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," Es necesario repetir la contraseña "),Y.ɵɵelementEnd())}function Pe(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," Las contraseñas deben coincidir "),Y.ɵɵelementEnd())}function Oe(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),Y.ɵɵelementEnd())}function De(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),Y.ɵɵtext(8,"Contraseña"),Y.ɵɵelementEnd(),Y.ɵɵelement(9,"input",8),Y.ɵɵtemplate(10,ke,2,0,"mat-hint",9),Y.ɵɵtemplate(11,Ee,2,0,"mat-hint",9),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"mat-form-field",10)(13,"mat-label"),Y.ɵɵtext(14,"Repite Contraseña"),Y.ɵɵelementEnd(),Y.ɵɵelement(15,"input",11),Y.ɵɵtemplate(16,Te,2,0,"mat-hint",9),Y.ɵɵtemplate(17,Pe,2,0,"mat-hint",9),Y.ɵɵtemplate(18,Oe,2,0,"mat-hint",9),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(19,"div",12)(20,"button",13),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(21," Guardar "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.password.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,21,e.texts.password.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(7),Y.ɵɵproperty("ngIf",e.f.password.touched&&e.f.password.invalid&&e.f.password.errors.required),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.password.invalid&&e.f.password.errors.minlength),Y.ɵɵadvance(5),Y.ɵɵproperty("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.required),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.confirmedValidator),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.confirm_password.invalid&&e.f.confirm_password.errors.minlength),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function Le(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"p",17),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}const Ae={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ne=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new Y.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Ie("password","confirm_password")})}nextStep(){this.next.emit(this.form.get("password").value)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder),Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep"},features:[Y.ɵɵProvidersFeature([{provide:M.sG,useValue:Ae},{provide:Y.LOCALE_ID,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,De,22,23,"form",0),Y.ɵɵtemplate(1,Le,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Re=n(1763),je=n(5696);function Fe(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function qe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setTerms(t))})),Y.ɵɵelementStart(2,"belender-terms-and-policy-links",12),Y.ɵɵlistener("goToTerms",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.gotoTermsAndConditions(t))})),Y.ɵɵelementEnd()(),Y.ɵɵtemplate(3,Fe,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("mt-8 flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.acceptTerms?"bg-orange-500/10 ":""," pr-4 rounded-sm"),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(1),Y.ɵɵproperty("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorType.termsRead||e.errorType.acceptTerms)}}function Ye(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function Ve(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setPower(t))})),Y.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),Y.ɵɵelementStart(3,"a",15),Y.ɵɵlistener("click",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.gotoPowerConditions(t))})),Y.ɵɵelementStart(4,"u"),Y.ɵɵtext(5,"aquí"),Y.ɵɵelementEnd()()(),Y.ɵɵtemplate(6,Ye,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.powerAccept?"bg-orange-500/10 ":"",""),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(5),Y.ɵɵproperty("ngIf",e.errorType.powerAccept)}}function He(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function ze(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setAssignment(t))})),Y.ɵɵelement(2,"div",16),Y.ɵɵelementEnd(),Y.ɵɵtemplate(3,He,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("flex justify-between items-center w-full flex-100 ",e.errorType.assignment?"bg-orange-500/10 ":""," pr-4 rounded-sm"),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(1),Y.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorType.assignment)}}function Be(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",19),Y.ɵɵelement(1,"mat-icon",20),Y.ɵɵtext(2),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext().$implicit;Y.ɵɵadvance(2),Y.ɵɵtextInterpolate1(" ",e," ")}}function Ue(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,Be,3,1,"div",18),Y.ɵɵelementContainerEnd()),2&e){const e=t.index;Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e<3)}}function We(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,Ue,2,1,"ng-container",17),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngForOf",e.errors)}}function $e(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6),Y.ɵɵtemplate(6,qe,4,7,"div",7),Y.ɵɵtemplate(7,Ve,7,5,"div",7),Y.ɵɵtemplate(8,ze,4,6,"div",7),Y.ɵɵelementEnd(),Y.ɵɵtemplate(9,We,2,1,"ng-container",8),Y.ɵɵelementStart(10,"div",9)(11,"button",10),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(12,"Siguiente"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.tyc.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,19,e.texts.tyc.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵproperty("ngIf",!e.data.config.hideCheckLegal),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.requestID?null==e.solicitud?null:e.solicitud.power_activate:null==e.data?null:e.data.config.activatePower),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",null==e.data?null:e.data.config.dataAssignmentCheck),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errors&&e.errors.length),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.getErrorValidation()?"":e.data.styles.colors.btnText)("background",e.getErrorValidation()?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.getErrorValidation())}}function Ge(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",21),Y.ɵɵelement(1,"mat-progress-spinner",22),Y.ɵɵelementStart(2,"p",23),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let Ze=(()=>{class e{constructor(e){this.utils=e,this.requestID=null,this.powerAccepted=!1,this.next=new Y.EventEmitter(null),this.goTerms=new Y.EventEmitter(null),this.goTermsCert=new Y.EventEmitter(null),this.gotoPower=new Y.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!0,this.powerActivate=!1,this.termsReaded=!1,this.terms2Readed=!0,this.assignment=!1,this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1}}ngOnInit(){}nextStep(){this.next.emit(this.powerActivate)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.terms2Readed=!0,this.goTermsCert.emit(!0)}gotoPowerConditions(e){e.preventDefault(),e.stopPropagation(),this.gotoPower.emit(!0)}setAssignment(e){this.assignment=e}setPower(e){this.powerActivate=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}getErrorValidation(){this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1};let e=!1;return this.data.config.forceChecks&&(!this.termsReaded&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe leer los términos y condiciones del servicio"),this.errorType.termsRead=!0,e=!0),this.terms2Readed||(this.errors.push("Debe leer los términos y condiciones para la emisión de certificado"),this.errorType.terms2Read=!0,e=!0)),!this.acceptTerms&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe aceptar los términos y condiciones del servicio"),this.errorType.acceptTerms=!0,e=!0),this.acceptTerms2||(this.errors.push("Debe aceptar los términos y condiciones para la emisión de certificado"),this.errorType.acceptTerms2=!0,e=!0),this.data.config.dataAssignmentCheck&&!this.assignment&&(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.assignment=!0,e=!0),(this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&(this.powerActivate||(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.powerAccept=!0,e=!0)),e}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-terms-step"]],inputs:{userId:"userId",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",powerAccepted:"powerAccepted"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",gotoPower:"gotoPowerConditions"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[3,"class",4,"ngIf"],[4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"color","changeCheckbox"],[3,"userId","showPolicyLink","goToTerms"],["class","text-xs w-4 h-4 text-orange-500","svgIcon","mat:warning",4,"ngIf"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4","text-orange-500"],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[1,"custom-html",3,"innerHTML"],[4,"ngFor","ngForOf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500 ",4,"ngIf"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,$e,13,21,"div",0),Y.ɵɵtemplate(1,Ge,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.sg,i.O5,d.Hw,u.lW,b.Ou,Re.b,je.T,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ke=n(4468);function Qe(e,t){1&e&&(Y.ɵɵelementStart(0,"div",12),Y.ɵɵelement(1,"mat-icon",13),Y.ɵɵtext(2," Archivo firmado cargado "),Y.ɵɵelementEnd())}function Xe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"button",14),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.onClickAutofirma())})),Y.ɵɵtext(1,"Firmar certificado"),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function Je(e,t){1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"span",17),Y.ɵɵtext(3,"Esperando autofirma..."),Y.ɵɵelementEnd()())}function et(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3)(2,"h1",4),Y.ɵɵtext(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(4,"p"),Y.ɵɵtext(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(6,"p"),Y.ɵɵtext(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(8,"p"),Y.ɵɵtext(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(10,"p"),Y.ɵɵtext(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"p"),Y.ɵɵtext(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(14,"p"),Y.ɵɵtext(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(16,"p"),Y.ɵɵtext(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(18,"p"),Y.ɵɵtext(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(20,"h1",5),Y.ɵɵtext(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(22,"p"),Y.ɵɵtext(23," Firmo el presente documento para dejar constancia: "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(24,"p"),Y.ɵɵtext(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(26,"p"),Y.ɵɵtext(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(28,"p"),Y.ɵɵtext(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(30,"p"),Y.ɵɵtext(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(32,"div",6),Y.ɵɵtemplate(33,Qe,3,0,"div",7),Y.ɵɵtemplate(34,Xe,2,6,"button",8),Y.ɵɵtemplate(35,Je,4,0,"div",9),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(36,"div",10)(37,"button",11),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(38,"Completar"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(33),Y.ɵɵproperty("ngIf",e.signedFile&&!e.loadingAutofirma),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.signedFile&&!e.loadingAutofirma),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.loadingAutofirma),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.signedFile?e.data.styles.colors.btnText:"")("background",e.signedFile?e.data.styles.colors.btnBg:"")("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",!e.signedFile)}}function tt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",18),Y.ɵɵelement(1,"mat-progress-spinner",19),Y.ɵɵelementStart(2,"p",20),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let nt=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.notis=t,this.utils=n,this._autofirma=i,this.form=new p.FormGroup({}),this.next=new Y.EventEmitter(null),this.loadingAutofirma=!1}ngOnInit(){this.setForm(),this.blobFile=this.base64ToBlob(this.pdfFile64,"application/pdf");const e=URL.createObjectURL(this.blobFile);this.pdfHtml="<iframe width='100%' height='100%' src='"+e+"'></iframe>",this.pdfHtml+=`<img style="width: 100%; min-heigth: 300px" src="${e}" />`}base64ToBlob(e,t="application/octet-stream"){const n=atob(e),i=n.length,r=new Uint8Array(i);for(let e=0;e<i;e++)r[e]=n.charCodeAt(e);return new Blob([r],{type:t})}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({file_signed:["",[p.Validators.required]]})}nextStep(){this.next.emit({file_signed:this.signedFile})}onChangeFile(e){const t=e.target;!t||!t.files||(this.file=t.files[0])}blobToFile(e,t){return e.lastModifiedDate=new Date,e.name=t,e}onClickAutofirma(){var e=this;return(0,D.Z)((function*(){e.loadingAutofirma=!0;let t,n="signed_document";e.file=e.blobToFile(e.blobFile,n),e._autofirma.requestPDFSignature(e.file,{headless:!0,filters:{"issuer.rfc2254":"(CN=AC Representa*)"}}).then((i=>{t=i,e.loadingAutofirma=!1;let r=new File([t],n+"_signed.pdf",{type:e.file.type});e.signedFile=r,e.nextStep()})).catch((t=>{t?.message?.includes("ApplicationNotFoundException")?e.notis.showAlert("No se encuentra AutoFirma","No se ha encontrado el programa de autofirma instalado en su computador, por favor descarguelo en el siguiente link y vuelva a intentarlo.","info",{cancelButtonLabel:"Ir a Autofirma",okButtonLabel:"Cerrar",cancelAction:function(){window.open("https://firmaelectronica.gob.es/Home/Descargas.html","_blank")}}):e.notis.showAlert("Error desconocido","Ha ocurrido un error: "+t)}))}))()}fileToUrl(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.readAsDataURL(e)}))}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder),Y.ɵɵdirectiveInject(I.T),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(Ke.Kj))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-autofirma-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",pdfFile64:"pdfFile64"},outputs:{next:"nextStep"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"my-3","bg-slate-50","p-2","rounded-md","flex","max-h-[300px]","overflow-y-auto","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[1,"font-bold"],[1,"pt-3","font-bold"],[1,"flex","w-full","items-center","justify-end","gap-2","p-4"],["class","flex gap-1 text-green-500 items-center justify-end w-full",4,"ngIf"],["class","px-8","mat-flat-button","","type","button",3,"color","background","border-radius","click",4,"ngIf"],["class","flex items-center gap-2",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"flex","gap-1","text-green-500","items-center","justify-end","w-full"],["svgIcon","mat:check_circle"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2"],["color","accent","diameter","20","value","0","mode","indeterminate",1,"spinner"],[1,"text-black"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,et,39,11,"form",0),Y.ɵɵtemplate(1,tt,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,d.Hw,u.lW,p.ɵNgNoValidate,p.NgControlStatusGroup,p.FormGroupDirective,b.Ou],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),it=(()=>{class e{constructor(){this.next=new Y.EventEmitter(null)}ngOnInit(){}nextStep(){this.next.emit(!0)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-requisites-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},outputs:{next:"nextStep"},decls:15,vars:18,consts:[[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],["href","https://firmaelectronica.gob.es/Home/Descargas.html","target","_blank",1,"text-blue-500","font-bold","underline"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0),Y.ɵɵelement(1,"div",1)(2,"div",2),Y.ɵɵpipe(3,"safeHtml"),Y.ɵɵelementStart(4,"div",3),Y.ɵɵtext(5," Si no tiene "),Y.ɵɵelementStart(6,"strong"),Y.ɵɵtext(7,"Autofirma"),Y.ɵɵelementEnd(),Y.ɵɵtext(8," instalado, antes de continuar, puedes instalarlo siguiendo este "),Y.ɵɵelementStart(9,"a",4),Y.ɵɵtext(10,"link"),Y.ɵɵelementEnd(),Y.ɵɵtext(11,". "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"div",5)(13,"button",6),Y.ɵɵlistener("click",(function(){return t.nextStep()})),Y.ɵɵtext(14,"Siguiente"),Y.ɵɵelementEnd()()()),2&e&&(Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",null==t.texts||null==t.texts.requisites?null:t.texts.requisites.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(3,16,null==t.texts||null==t.texts.requisites?null:t.texts.requisites.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵadvance(9),Y.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function rt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"vex-power-cert",3),Y.ɵɵlistener("accept",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.acceptPowerCert())})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("hideButtons",!1)("flow","ClientCertificate")("userId",e.userId)}}function st(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",9),Y.ɵɵelement(1,"img",10),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("src",e.data.styles.logoUrl,Y.ɵɵsanitizeUrl)}}function ot(e,t){1&e&&(Y.ɵɵelementStart(0,"div",11),Y.ɵɵelement(1,"mat-progress-spinner",12),Y.ɵɵelementEnd()),2&e&&(Y.ɵɵadvance(1),Y.ɵɵproperty("value",0))}function at(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-form-step",24),Y.ɵɵlistener("gotoPowerConditions",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoPowerConditions())}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendFormData(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("flowName",e.flowName)("loading",e.loading)("requestIDFromURL",e.requestIDFromURL)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function lt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-requisites-step",25),Y.ɵɵlistener("nextStep",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.showRequisitesPage=!1)})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function ct(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-terms-step",26),Y.ɵɵlistener("goToTerms",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoTermsAndConditions())}))("gotoPowerConditions",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.acceptTerms(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("userId",e.userId)("requestID",e.requestID)("data",e.data)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)("loading",e.loading)}}function dt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-password-step",27),Y.ɵɵlistener("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendPassword(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ut(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-autofirma-step",28),Y.ɵɵlistener("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendDocument(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("pdfFile64",e.pdfFile64)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ht(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-otp-step",29),Y.ɵɵlistener("resendOTP",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.requestOTP(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function pt(e,t){if(1&e&&Y.ɵɵelement(0,"belender-success-step",30),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function mt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-fail-step",31),Y.ɵɵlistener("retry",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.newRequest(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ft(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-abandoned-step",32),Y.ɵɵlistener("retry",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.retryRequest(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function gt(e,t){if(1&e&&Y.ɵɵelement(0,"belender-no-service-step",33),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("data",e.data)}}function _t(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",34)(1,"div",35)(2,"h1",36),Y.ɵɵtext(3,"No existe la solicitud"),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(4,"div",37),Y.ɵɵtext(5," No existen solicitudes activas con el código requerido "),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(4),Y.ɵɵstyleProp("color",e.data.styles.colors.text)}}function vt(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,at,1,6,"belender-form-step",13),Y.ɵɵtemplate(2,lt,1,3,"belender-requisites-step",14),Y.ɵɵtemplate(3,ct,1,6,"belender-terms-step",15),Y.ɵɵtemplate(4,dt,1,4,"belender-password-step",16),Y.ɵɵtemplate(5,ut,1,5,"belender-autofirma-step",17),Y.ɵɵtemplate(6,ht,1,4,"belender-otp-step",18),Y.ɵɵtemplate(7,pt,1,6,"belender-success-step",19),Y.ɵɵtemplate(8,mt,1,4,"belender-fail-step",20),Y.ɵɵtemplate(9,ft,1,4,"belender-abandoned-step",21),Y.ɵɵtemplate(10,gt,1,3,"belender-no-service-step",22),Y.ɵɵtemplate(11,_t,6,2,"div",23),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data&&"form"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","autofirma"==e.getStatus()&&e.showRequisitesPage),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","terms"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","password"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","autofirma"==e.getStatus()&&e.pdfFile64&&!e.showRequisitesPage),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","otp"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","success"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","failed"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","abandoned"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","no-service"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function yt(e,t){1&e&&Y.ɵɵelement(0,"belender-disabled-url")}function bt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",38),Y.ɵɵelement(1,"mat-progress-spinner",39),Y.ɵɵelementStart(2,"p",40),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}function xt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",41)(1,"div",34)(2,"div",42),Y.ɵɵtext(3,"Error!"),Y.ɵɵelementEnd(),Y.ɵɵelement(4,"div",43),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",44)(6,"button",45),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.error=!1)})),Y.ɵɵtext(7," Ingresar manualmente "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(4),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",e.error,Y.ɵɵsanitizeHtml)}}function wt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",4)(1,"div"),Y.ɵɵtemplate(2,st,2,1,"div",5),Y.ɵɵtemplate(3,ot,2,1,"div",6),Y.ɵɵtemplate(4,vt,12,11,"ng-container",2),Y.ɵɵtemplate(5,yt,1,0,"belender-disabled-url",2),Y.ɵɵtemplate(6,bt,4,1,"div",7),Y.ɵɵtemplate(7,xt,8,3,"div",8),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),Y.ɵɵstyleProp("background",e.data.styles.colors.background),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.error),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.error&&e.disableURL),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.loading&&e.error)}}function Ct(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"div",46),Y.ɵɵtext(2),Y.ɵɵelementEnd(),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(2),Y.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}let St=class{constructor(e,t,n,i,r,s,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.certificateService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.showRequisitesPage=!0,this.requestCreated=!1,this.requestIDFromURL=!1,this.flowName="ClientCertificate"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=j.N.env&&(R(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),R(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendPreRequest(){this.certificateService.preRequest({user_id:this.userId,package_id:this.packId}).then((e=>{e&&e.data&&(this.requestID=e.data.request_id),this.loading=!1})).catch((e=>{console.error(e),this.loading=!1}))}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.phone&&(this.solicitud.phone=e.phone),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_last_name&&(this.solicitud.person_last_name=e.lastname),e.second_lastname&&!this.solicitud.person_last_name2&&(this.solicitud.person_last_name2=e.second_lastname)}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){const e=this;this.Activatedroute.queryParams.subscribe((t=>{t&&this.setParamsToRequest(t),t&&t.acceptTerms&&(this.autoAcceptTerms=!0),t&&t.request_id?(this.disableURL=!1,e.requestID=t.request_id,this.setFormFromVcCode(t.request_id)):(e.sendPreRequest(),console.error("con paramas"))}),(e=>{this.loading=!1,console.error("sin paramas")}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.pdfFile64=t.solicitud.file,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=!0,t.autoAcceptTerms&&t.acceptTerms(!0)):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){const e=this;if(e.socket)return;let t="wss://notifications.dev.belender.net";"qa"==j.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==j.N.env&&(t="wss://notifications.belender.net"),j.N.notificationsBaseUrl&&(t=j.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${e.requestID}&user_id=${e.userId}`),this.socket.onopen=function(n){console.log("Conexión establecida: ",`${t}?requests_id=${e.requestID}&user_id=${e.userId}`)},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from ws:",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}sendFormData(e){this.requestID&&(e.request_id=this.requestID),e.user_id=this.userId,e.package_id=this.packId,e.validation_id=0;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.addRequest(t).then((e=>{e&&e.length&&this.setSubscriptionOfRequest(),this.loading=null})).catch((e=>{console.error("promise error: ",e),this.loading=null}))}uploadFiles(e){return new Promise(((t,n)=>{this.certificateService.addSignedFile(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),n(e),this.loading=null,this.cd.markForCheck()):e&&e.status&&"success"==e.status?t(!0):(this.showAlert("Error!","Error desconocido: "+e),n(e),this.loading=null,this.cd.markForCheck())})).catch((e=>{n(e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck()}))}))}addRequest(e){return new Promise(((t,n)=>{this.certificateService.addSolicitud(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),this.loading=null,this.cd.markForCheck(),n(e)):e&&e.status&&"success"==e.status?(this.solicitud=e.data,this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck(),t(e.data)):(this.showAlert("Error!","Error desconocido: "+e),n(e))})).catch((e=>{console.error("respuesta desde pin service: ",e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck(),n(e)}))}))}acceptTerms(e){this.loading="Iniciando el proceso de emisión de certificado..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e?1:0),this.certificateService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando información..",this.certificateService.sendPassword({request_id:this.solicitud.request_id,password:e}).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.pdfFile64=e.file,this.cd.markForCheck()),this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendDocument(e){e.request_id=this.requestID;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.uploadFiles(t).then((e=>{e&&(this.solicitud.status_code="consent_process_completed")})).catch((e=>{console.error(e)}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.certificateService.sendOtp(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck()),this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.requestCreated=!0,this.requestIDFromURL=!0,this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}disconnectWebsocket(){console.log("intentando desconectar ws..."),this.socket&&this.socket.close()}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":this.solicitud&&"terms_and_conditions"==this.solicitud.status_code?"terms":this.solicitud&&"waiting_acceptance_file_signed"==this.solicitud.status_code?(console.log("returning autofirma"),"autofirma"):!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"waiting_otp"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":"error-data":(this.disconnectWebsocket(),this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success"):"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(q.L,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};St.ɵfac=function(e){return new(e||St)(Y.ɵɵdirectiveInject(Y.ChangeDetectorRef),Y.ɵɵdirectiveInject(P.gz),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(C.w),Y.ɵɵdirectiveInject(H.r),Y.ɵɵdirectiveInject(I.T),Y.ɵɵdirectiveInject(U),Y.ɵɵdirectiveInject(W.uw))},St.ɵcmp=Y.ɵɵdefineComponent({type:St,selectors:[["belender-widget-client-cert"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[Y.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px]",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep",4,"ngIf"],[3,"data","loading","texts","nextStep",4,"ngIf"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","packId","userId","requestID","loading","texts",4,"ngIf"],[3,"data","loading","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","loading","texts","retry",4,"ngIf"],[3,"loading","texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep"],[3,"data","loading","texts","nextStep"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep"],[3,"data","loading","texts","solicitud","nextStep"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","packId","userId","requestID","loading","texts"],[3,"data","loading","texts","solicitud","retry","newRequest"],[3,"solicitud","data","loading","texts","retry"],[3,"loading","texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,rt,1,3,"vex-power-cert",0),Y.ɵɵtemplate(1,wt,8,11,"div",1),Y.ɵɵtemplate(2,Ct,3,1,"ng-container",2)),2&e&&(Y.ɵɵproperty("ngIf",t.viewPowerTerms),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.data),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.testMode))},dependencies:[i.O5,u.lW,b.Ou,$.L,G.q,oe,ue,me,Ce,Se,Me,Ne,Ze,nt,it],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),St=(0,L.gn)([(0,N.c)()],St);const Mt=[{path:":idUser",component:St},{path:":idUser/:packID",component:St}];let It=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({imports:[P.Bz.forChild(Mt),P.Bz,O.d8]}),e})();var kt=n(6981),Et=n(3848),Tt=n(1129),Pt=n(969),Ot=n(7009);let Dt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({imports:[i.ez,Ot.ZX,d.Ps,p.ReactiveFormsModule,w.c,u.ot]}),e})();var Lt=n(1145),At=n(2266),Nt=n(3300),Rt=n(865),jt=n(3033);let Ft=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,U,{provide:M.Ad,useValue:"es-ES"}],imports:[It,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,kt.x,Et.Nh,c.p9,Tt.n,Pt.O,Dt,Lt.j,At.L,Nt.C,Rt.q,jt.d]}),e})()}}]),(self.webpackChunkvex=self.webpackChunkvex||[]).push([[244],{667:(e,t,n)=>{n.d(t,{$:()=>r});var i=n(7340);const r=(s=400,(0,i.X$)("fadeInUp",[(0,i.eR)(":enter",[(0,i.oB)({transform:"translateY(20px)",opacity:0}),(0,i.jt)(`${s}ms cubic-bezier(0.35, 0, 0.25, 1)`,(0,i.oB)({transform:"translateY(0)",opacity:1}))])]));var s},5592:(e,t,n)=>{n.d(t,{J:()=>a});var i=n(6895),r=n(9299),s=n(7392),o=n(4650);let a=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({imports:[i.ez,r.Bz,s.Ps]}),e})()},1763:(e,t,n)=>{n.d(t,{b:()=>l});var i=n(4650),r=n(6895),s=n(7392);function o(e,t){1&e&&i.ɵɵelement(0,"mat-icon",3)}const a=["*"];let l=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.ccb=new i.EventEmitter,this.checked=!1}ngOnInit(){}emitChange(){this.checked=!this.checked,this.ccb.emit(this.checked)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-checkbox"]],inputs:{text:"text",color:"color",checked:"checked"},outputs:{ccb:"changeCheckbox"},ngContentSelectors:a,decls:5,vars:5,consts:[[1,"flex","items-center","gap-2","justify-start","w-fit","hover:bg-slate-700/10","pl-2","pr-3","py-2","rounded-sm","cursor-pointer",3,"click"],[1,"check-wrapper","w-5","h-5","border","mr-1","rounded-sm","flex","justify-center","items-center","p-0"],["style","font-size: 5px","class","m-0 p-0 text-white","svgIcon","mat:check",4,"ngIf"],["svgIcon","mat:check",1,"m-0","p-0","text-white",2,"font-size","5px"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0),i.ɵɵlistener("click",(function(){return t.emitChange()})),i.ɵɵelementStart(1,"div",1),i.ɵɵtemplate(2,o,1,0,"mat-icon",2),i.ɵɵelementEnd(),i.ɵɵelementStart(3,"div"),i.ɵɵprojection(4),i.ɵɵelementEnd()()),2&e&&(i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate2("background: ",t.checked?t.color:"transparent","; border-color: ",t.checked?t.color:"rgba(0,0,0,.7)",""),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.checked))},dependencies:[r.O5,s.Hw],styles:[".check-wrapper[_ngcontent-%COMP%]{transition:all .3s ease;min-width:1.25rem}"]}),e})()},1129:(e,t,n)=>{n.d(t,{n:()=>c});var i=n(6895),r=n(4006),s=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.ɵɵdefineNgModule({type:e}),e.ɵinj=l.ɵɵdefineInjector({imports:[i.ez,r.FormsModule,r.ReactiveFormsModule,s.lN,o.ot,a.Ps]}),e})()},8008:(e,t,n)=>{n.d(t,{O:()=>o});var i=n(4650),r=n(6895);function s(e,t){if(1&e&&(i.ɵɵnamespaceSVG(),i.ɵɵnamespaceHTML(),i.ɵɵelementStart(0,"p",4),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate(e.text)}}let o=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.zoom=1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-spinner"]],inputs:{text:"text",color:"color",zoom:"zoom"},decls:4,vars:7,consts:[[1,"flex","w-full","justify-center","items-center","flex-col","gap-4"],["width","65px","height","65px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg",1,"spinner"],["fill","none","stroke-width","6","stroke-linecap","round","cx","33","cy","33","r","30",1,"path"],["class","text-center",4,"ngIf"],[1,"text-center"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵnamespaceSVG(),i.ɵɵelementStart(1,"svg",1),i.ɵɵelement(2,"circle",2),i.ɵɵelementEnd(),i.ɵɵtemplate(3,s,2,1,"p",3),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate1("zoom: ",t.zoom,"; "),i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate1("stroke: ",t.color,""),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.text))},dependencies:[r.O5],styles:[".spinner[_ngcontent-%COMP%]{animation:rotator 1.4s linear infinite}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(270deg)}}.path[_ngcontent-%COMP%]{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}to{stroke-dashoffset:187;transform:rotate(450deg)}}"]}),e})()},9476:(e,t,n)=>{n.d(t,{F:()=>c});var i=n(6895),r=n(4006),s=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.ɵɵdefineNgModule({type:e}),e.ɵinj=l.ɵɵdefineInjector({imports:[i.ez,r.FormsModule,r.ReactiveFormsModule,s.lN,o.ot,a.Ps]}),e})()},833:(e,t,n)=>{n.d(t,{L:()=>d});var i=n(4650),r=n(9299),s=n(7367),o=n(8460),a=n(6895),l=n(9101);function c(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",5)(1,"button",6),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.accept())})),i.ɵɵtext(2,"Cerrar"),i.ɵɵelementEnd()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.funderStyles.colors.btnText)("background",e.funderStyles.colors.btnBg)("border-radius",e.funderStyles.btnRound+"px")}}let d=(()=>{class e{constructor(e,t,n){this.Activatedroute=e,this.customizationService=t,this.customizationStoreService=n,this.loading=!0,this.hideButtons=!0,this.acceptTerms=new i.EventEmitter(null),this.cancelTerms=new i.EventEmitter(null)}ngOnInit(){this.loading=!0,this.userId&&this.flow?(this.userID=this.userId,this.flowName=this.flow,this.customizationStoreService.getFunderStyles().subscribe((e=>{this.funderStyles=e})),this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:`\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para el flujo <b>${this.flowName}</b></p> \n </div>`,this.loading=!1})).catch((e=>{this.loading=!1}))):this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userID=e.idUser,this.flowName=this.getParsedFlowName(e.flow),this.userID?this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:'\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para este flujo</p> \n </div>',this.loading=!1})).catch((e=>{this.loading=!1})):this.loading=!1):this.loading=!1}),(e=>{this.loading=!1}))}getParsedFlowName(e){switch(e){case"sms":case"Sms":return"SMS";case"clavepin":case"ClavePin":case"CLAVEPIN":return"ClavePin";case"videoid":return"VideoID";case"personal":case"presencial":case"client-cert":return"KnownClient";default:return e}}accept(){this.acceptTerms.emit(!0)}cancel(){this.cancelTerms.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.gz),i.ɵɵdirectiveInject(s.w),i.ɵɵdirectiveInject(o.r))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["vex-power-cert"]],inputs:{flow:"flow",userId:"userId",hideButtons:"hideButtons"},outputs:{acceptTerms:"accept",cancelTerms:"cancel"},decls:33,vars:1,consts:[[1,"py-12","flex","flex-col","items-center","overflow-auto","max-h-[96vh]","terms-page"],[1,"max-w-xl","overflow-y-auto"],[1,"font-bold"],[1,"pt-6","font-bold"],["class","w-full max-w-xl flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"w-full","max-w-xl","flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"h1",2),i.ɵɵtext(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),i.ɵɵelementEnd(),i.ɵɵelementStart(4,"p"),i.ɵɵtext(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),i.ɵɵelementEnd(),i.ɵɵelementStart(6,"p"),i.ɵɵtext(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),i.ɵɵelementEnd(),i.ɵɵelementStart(8,"p"),i.ɵɵtext(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),i.ɵɵelementEnd(),i.ɵɵelementStart(10,"p"),i.ɵɵtext(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),i.ɵɵelementEnd(),i.ɵɵelementStart(12,"p"),i.ɵɵtext(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),i.ɵɵelementEnd(),i.ɵɵelementStart(14,"p"),i.ɵɵtext(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),i.ɵɵelementEnd(),i.ɵɵelementStart(16,"p"),i.ɵɵtext(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),i.ɵɵelementEnd(),i.ɵɵelementStart(18,"p"),i.ɵɵtext(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),i.ɵɵelementEnd(),i.ɵɵelementStart(20,"h1",3),i.ɵɵtext(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),i.ɵɵelementEnd(),i.ɵɵelementStart(22,"p"),i.ɵɵtext(23," Firmo el presente documento para dejar constancia: "),i.ɵɵelementEnd(),i.ɵɵelementStart(24,"p"),i.ɵɵtext(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),i.ɵɵelementEnd(),i.ɵɵelementStart(26,"p"),i.ɵɵtext(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),i.ɵɵelementEnd(),i.ɵɵelementStart(28,"p"),i.ɵɵtext(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),i.ɵɵelementEnd(),i.ɵɵelementStart(30,"p"),i.ɵɵtext(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),i.ɵɵelementEnd()(),i.ɵɵtemplate(32,c,3,6,"div",4),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(32),i.ɵɵproperty("ngIf",t.funderStyles&&!t.hideButtons))},dependencies:[a.O5,l.lW],styles:["h1[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700}h2[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700;line-height:25px;margin:15px 0}p[_ngcontent-%COMP%]{margin:10px 0}.terms-page[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;background:white;z-index:9999999!important;height:100vh;max-height:100vh}"]}),e})()},2266:(e,t,n)=>{n.d(t,{L:()=>g});var i=n(9299),r=n(833),s=n(6e3),o=n(4650);const a=[{path:":flow",component:r.L},{path:":flow/:idUser",component:r.L}];let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({imports:[i.Bz.forChild(a),i.Bz,s.d8]}),e})();var c=n(7533),d=n(1572),u=n(7367),h=n(6383),p=n(6895),m=n(4006),f=n(9101);let g=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({providers:[u.w],imports:[l,c.q,d.Cq,h.G,p.ez,m.FormsModule,f.ot]}),e})()},1145:(e,t,n)=>{n.d(t,{j:()=>l});var i=n(4650),r=n(6895);let s=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.ɵɵdefineNgModule({type:e}),e.ɵinj=i.ɵɵdefineInjector({imports:[[r.ez]]}),e})();var o=n(7392),a=n(4006);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.ɵɵdefineNgModule({type:e}),e.ɵinj=i.ɵɵdefineInjector({imports:[r.ez,a.FormsModule,s,o.Ps]}),e})()},4302:(e,t,n)=>{n.d(t,{q:()=>a});var i=n(7582),r=n(9933),s=n(667),o=n(4650);let a=class{constructor(){}};a.ɵfac=function(e){return new(e||a)},a.ɵcmp=o.ɵɵdefineComponent({type:a,selectors:[["belender-disabled-url"]],decls:6,vars:1,consts:[[1,"p-2","w-full","flex","justify-start","flex-wrap"],[1,"py-4","px-6","w-full","rounded-md","bg-red-500/10","text-red-600","flex","flex-col","gap-3"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"h2"),o.ɵɵtext(3,"Servicio desactivado"),o.ɵɵelementEnd(),o.ɵɵelementStart(4,"p"),o.ɵɵtext(5,"El servicio que intenta acceder está desactivado. "),o.ɵɵelementEnd()()()),2&e&&o.ɵɵproperty("@fadeInUp",void 0)},data:{animation:[s.$]}}),a=(0,i.gn)([(0,r.c)()],a)},3300:(e,t,n)=>{n.d(t,{C:()=>o});var i=n(6895),r=n(4006),s=n(4650);let o=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=s.ɵɵdefineNgModule({type:e}),e.ɵinj=s.ɵɵdefineInjector({imports:[i.ez,r.FormsModule]}),e})()},342:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(2340),r=n(4650),s=n(4006),o=n(5089),a=n(5601),l=n(9617),c=n(6895),d=n(7392),u=n(1572);function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"span",11),r.ɵɵtext(1),r.ɵɵelement(2,"mat-progress-spinner",12),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function p(e,t){if(1&e&&(r.ɵɵelementStart(0,"span",13),r.ɵɵtext(1),r.ɵɵelement(2,"mat-icon",14),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"span",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit,n=r.ɵɵreference(5);return r.ɵɵnextContext().setDocumentName(t.document_name),r.ɵɵresetView(n.click())})),r.ɵɵtext(1),r.ɵɵelement(2,"mat-icon",16),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function f(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtemplate(1,h,3,1,"span",6),r.ɵɵtemplate(2,p,3,1,"span",7),r.ɵɵtemplate(3,m,3,1,"span",8),r.ɵɵelementStart(4,"input",9,10),r.ɵɵlistener("change",(function(t){r.ɵɵrestoreView(e);const n=r.ɵɵnextContext();return r.ɵɵresetView(n.fileChange(t))})),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.document_status_code),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.document_status_code&&"downloaded"===e.document_status_code&&!n.loadingDocs),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.document_status_code&&"failed_download"===e.document_status_code&&!n.loadingDocs),r.ɵɵadvance(1),r.ɵɵproperty("accept",n.acceptFiles)}}let g=(()=>{class e{constructor(e,t,n,i,r){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=r,this.totalDocuments=[],this.totalDownloaded=0,this.totalNotDownloaded=0,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.loadingDocs=!0,this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.loadingDocs=!0,this.uploadForm=this.formBuilder.group({file:[""]}),this.setPacksAndDocuments(),this.initIntervalDocs()}initIntervalDocs(){this.intDocs=setInterval((()=>{this.setDocumentsFromPack()}),4e3)}setPacksAndDocuments(){this.packsS.getPacksByPackId(this.packId).then((e=>{this.totalDocuments=this.parseDocumentsFromPack(e.data.documents),this.setDocumentsFromPack()}))}setDocumentsFromPack(){this.solicitudesService.getDocumentsIds(this.requestID).then((e=>{e.data&&this.setDocumentsReports(e.data),this.loadingDocs=!1})).catch((()=>{this.loadingDocs=!1}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==i.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==i.N.env&&(e="wss://notifications.belender.net"),i.N.notificationsBaseUrl&&(e=i.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.totalDocuments&&this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)})),this.cd.markForCheck()}parseDocumentsFromPack(e){let t=[];return e&&e.length&&e.forEach((e=>{t.push({document_name:e,document_status_code:null})})),t}setDocumentsReports(e){e&&e.length&&e.forEach((e=>{this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)}))})),this.checkIfAllReported(),this.cd.markForCheck()}checkIfAllReported(){this.totalDocuments.find((e=>!e.document_status_code||"downloaded"!=e.document_status_code))||this.intDocs&&clearInterval(this.intDocs)}fileChange(e){e.preventDefault(),e.stopPropagation();let t=e.target.files[0];const n=new FormData;n.append("file",t),n.append("request_id",this.requestID),n.append("document_name",this.docName),this.loadingDocs=!0,this.solicitudesService.uploadFileFromWidget(n).then((e=>{console.log("success"),this.setPacksAndDocuments()})).catch((e=>{console.error(e),this.setPacksAndDocuments()}))}setDocumentName(e){this.docName=e}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(s.FormBuilder),r.ɵɵdirectiveInject(o.F),r.ɵɵdirectiveInject(a.M),r.ɵɵdirectiveInject(l.U),r.ɵɵdirectiveInject(r.ChangeDetectorRef))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["widget-documents"]],inputs:{packId:"packId",requestID:"requestID",userId:"userId",acceptFiles:"acceptFiles"},decls:7,vars:1,consts:[[1,"px-4","py-3","bg-slate-300/10","rounded-md"],[1,"w-full","flex","mb-4","justify-between","items-center"],[1,"text-xl","font-bold"],[1,"flex","justify-end","items-center"],[1,"flex","gap-1","flex-wrap","items-start","justify-start","w-full","flex-col"],[4,"ngFor","ngForOf"],["class","bg-black/10 items-center w-full h-8 gap-2 pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between",4,"ngIf"],["class","bg-green-500/10 items-center text-green-500 w-full justify-between border border-green-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs ",4,"ngIf"],["class","bg-red-500/10 items-center text-red-500 border border-red-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between w-full cursor-pointer hover:bg-red-500 hover:text-red-50",3,"click",4,"ngIf"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"bg-black/10","items-center","w-full","h-8","gap-2","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between"],["color","accent","diameter","12","value","0","mode","indeterminate",1,"spinner"],[1,"bg-green-500/10","items-center","text-green-500","w-full","justify-between","border","border-green-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs"],["svgIcon","mat:check",1,"w-4"],[1,"bg-red-500/10","items-center","text-red-500","border","border-red-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between","w-full","cursor-pointer","hover:bg-red-500","hover:text-red-50",3,"click"],["svgIcon","mat:upload",1,"w-4"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"p",2),r.ɵɵtext(3,"Documentos: "),r.ɵɵelementEnd(),r.ɵɵelement(4,"div",3),r.ɵɵelementEnd(),r.ɵɵelementStart(5,"div",4),r.ɵɵtemplate(6,f,6,4,"ng-container",5),r.ɵɵelementEnd()()),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngForOf",t.totalDocuments))},dependencies:[c.sg,c.O5,d.Hw,u.Ou]}),e})()},3033:(e,t,n)=>{n.d(t,{d:()=>l});var i=n(6895),r=n(4006),s=n(7392),o=n(1572),a=n(4650);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=a.ɵɵdefineNgModule({type:e}),e.ɵinj=a.ɵɵdefineInjector({imports:[i.ez,s.Ps,r.ReactiveFormsModule,o.Cq]}),e})()},1406:(e,t,n)=>{n.d(t,{Y:()=>a});var i=n(4650),r=n(4006),s=n(9549),o=n(9101);let a=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.acceptFiles="image/png, image/jpeg, image/jpg, .pdf",this.newItemEvent=new i.EventEmitter(null),this.uploadFile=new i.EventEmitter(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){this.uploadForm.patchValue({file:e.target.files[0]}),this.uploadForm.get("file").updateValueAndValidity();const t=new FormData;let n=this.uploadForm.get("file").value;this.fileName=n.name,this.fileSize=+(+n.size/1e3).toFixed(1),t.append("file",n),console.warn(this.uploadForm.get("file").value),this.newItemEvent.emit({file:t}),this.uploadFile.emit(n)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.FormBuilder))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-file-upload"]],inputs:{label:"label",acceptFiles:"acceptFiles"},outputs:{newItemEvent:"change",uploadFile:"fileUpload"},decls:11,vars:5,consts:[[1,"flex","flex-col","w-full","items-start","input-file-wrapper","my-1",3,"formGroup"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"]],template:function(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",0)(1,"mat-label"),i.ɵɵtext(2),i.ɵɵelementEnd(),i.ɵɵelementStart(3,"input",1,2),i.ɵɵlistener("change",(function(e){return t.fileChange(e)})),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",3)(6,"button",4),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵreference(4);return i.ɵɵresetView(t.click())})),i.ɵɵtext(7,"Seleccionar archivo"),i.ɵɵelementEnd(),i.ɵɵtext(8,"     "),i.ɵɵelementStart(9,"span"),i.ɵɵtext(10),i.ɵɵelementEnd()()()}2&e&&(i.ɵɵproperty("formGroup",t.uploadForm),i.ɵɵadvance(2),i.ɵɵtextInterpolate(t.label),i.ɵɵadvance(1),i.ɵɵproperty("accept",t.acceptFiles),i.ɵɵadvance(7),i.ɵɵtextInterpolate2("",t.fileName," ",t.fileSize?"("+t.fileSize+"Kb)":"",""))},dependencies:[r.ɵNgNoValidate,r.NgControlStatusGroup,r.FormGroupDirective,s.hX,o.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{background:rgba(0,0,0,.0117647059);padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})()},969:(e,t,n)=>{n.d(t,{O:()=>d});var i=n(6895),r=n(4006),s=n(9101),o=n(7392),a=n(4144),l=n(7009),c=n(4650);let d=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=c.ɵɵdefineNgModule({type:e}),e.ɵinj=c.ɵɵdefineInjector({imports:[i.ez,l.ZX,o.Ps,r.ReactiveFormsModule,a.c,s.ot]}),e})()},4246:(e,t,n)=>{n.d(t,{t:()=>r});var i=n(4650);let r=(()=>{class e{constructor(){this.DNI_REGEX=/^(\d{8})([A-Z])$/,this.CIF_REGEX=/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/,this.NIE_REGEX=/^[XYZ]\d{7,8}[A-Z]$/}convertObjectArrayToArray(e){return Object.keys(e).map((t=>{const n=e[t];return n.key=t,n}))}ValidateIDType(e){e=e.toUpperCase().replace(/\s/,"");var t=!1,n=this.spainIdType(e);switch(n){case"dni":t=this.validDNI(e);break;case"nie":t=this.validNIE(e)}return{type:n,valid:t}}spainIdType(e){return e.match(this.DNI_REGEX)?"dni":e.match(this.NIE_REGEX)?"nie":void 0}validDNI(e){return"TRWAGMYFPDXBNJZSQVHLCKE".charAt(parseInt(e,10)%23)==e.charAt(8)}validNIE(e){var t=e.charAt(0);switch(t){case"X":t=0;break;case"Y":t=1;break;case"Z":t=2}return this.validDNI(t+e.substr(1))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=i.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},3364:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4650),r=(n(6866),n(5089)),s=n(9299),o=n(9101),a=n(3731);let l=(()=>{class e{constructor(e,t){this.utils=e,this.Activatedroute=t,this.goFlow=new i.EventEmitter(null),this.goManual=new i.EventEmitter(null)}ngOnInit(){console.error("data: ",this.data)}gotoFlow(){this.goFlow.emit(!0)}gotoManual(){this.goManual.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.F),i.ɵɵdirectiveInject(s.gz))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-intro-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName"},outputs:{goFlow:"gotoFlow",goManual:"gotoManual"},decls:10,vars:18,consts:[[1,"flex","flex-col","justify-between","h-full","fixed-content"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"click"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0)(1,"div",1),i.ɵɵelement(2,"div",2)(3,"div",3),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",4)(6,"button",5),i.ɵɵlistener("click",(function(){return t.gotoManual()})),i.ɵɵtext(7,"Subida manual"),i.ɵɵelementEnd(),i.ɵɵelementStart(8,"button",6),i.ɵɵlistener("click",(function(){return t.gotoFlow()})),i.ɵɵtext(9,"Subida automatica"),i.ɵɵelementEnd()()()),2&e&&(i.ɵɵadvance(2),i.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.data.intro?t.data.intro.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",t.data.intro?t.data.intro.title:"Intro de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",t.data.styles.colors.text),i.ɵɵproperty("innerHTML",t.data.intro?t.data.intro.description:i.ɵɵpipeBind1(4,16,"Descripcion de la intro"),i.ɵɵsanitizeHtml),i.ɵɵadvance(3),i.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[o.lW,a.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},8962:(e,t,n)=>{n.d(t,{A:()=>S});var i=n(6895),r=n(9101),s=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),v=n(1948),y=n(4246),b=n(6981),x=n(1129),w=n(9476),C=n(4650);let S=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=C.ɵɵdefineNgModule({type:e}),e.ɵinj=C.ɵɵdefineInjector({providers:[a.M,c.o,p.w,u.t,g.T,y.t],imports:[i.ez,r.ot,s.Tx,h.c,o.FormsModule,o.ReactiveFormsModule,l.a,d.Cq,m.FA,f.XK,_.T5,v.Fk,b.x,x.n,w.F]}),e})()},1760:(e,t,n)=>{n.d(t,{u:()=>w});var i=n(4650),r=(n(6866),n(4006)),s=n(5089),o=n(9391),a=n(9299),l=n(9617),c=n(5895),d=n(6895),u=n(9101),h=n(9549),p=n(4144),m=n(8008),f=n(1406),g=n(3731);function _(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",1)(1,"div",2),i.ɵɵelement(2,"div",3)(3,"div",4),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",5)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),i.ɵɵtext(9,"DNI / NIE"),i.ɵɵelementEnd(),i.ɵɵelement(10,"input",8),i.ɵɵelementEnd()()(),i.ɵɵelementStart(11,"div",9)(12,"button",10),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goBack())})),i.ɵɵtext(13," Volver "),i.ɵɵelementEnd(),i.ɵɵelementStart(14,"button",11),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.gotoStep2())})),i.ɵɵtext(15," Siguiente "),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵproperty("formGroup",e.formDni),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.data.styles.colors.text),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.description:i.ɵɵpipeBind1(4,18,"Descripcion de la subida manual"),i.ɵɵsanitizeHtml),i.ɵɵadvance(9),i.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.formDni.invalid?"":e.data.styles.colors.btnText)("background",e.formDni.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.ɵɵproperty("disabled",e.formDni.invalid)}}function v(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementContainerStart(0),i.ɵɵelementStart(1,"app-file-upload",15),i.ɵɵlistener("fileUpload",(function(t){const n=i.ɵɵrestoreView(e).$implicit,r=i.ɵɵnextContext(3);return i.ɵɵresetView(r.setFile(n,t))})),i.ɵɵelementEnd(),i.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit;i.ɵɵadvance(1),i.ɵɵpropertyInterpolate("label",e)}}function y(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",5),i.ɵɵtemplate(1,v,2,1,"ng-container",14),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵproperty("ngForOf",e.pack.documents)}}function b(e,t){1&e&&(i.ɵɵelementStart(0,"div",16),i.ɵɵelement(1,"belender-spinner",17),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵproperty("zoom",.6))}function x(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",1)(1,"div",2),i.ɵɵelement(2,"div",3)(3,"div",4),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵtemplate(5,y,2,1,"div",12),i.ɵɵtemplate(6,b,2,1,"div",13),i.ɵɵelementStart(7,"div",9)(8,"button",10),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goBack())})),i.ɵɵtext(9," Volver "),i.ɵɵelementEnd(),i.ɵɵelementStart(10,"button",11),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.uploadFiles())})),i.ɵɵtext(11," Subir archivos "),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵproperty("formGroup",e.form),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.data.styles.colors.text),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.description:i.ɵɵpipeBind1(4,20,"Descripcion de la subida manual"),i.ɵɵsanitizeHtml),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",e.pack&&!e.loadingPack),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",e.loadingPack),i.ɵɵadvance(2),i.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.ɵɵproperty("disabled",e.form.invalid)}}let w=(()=>{class e{constructor(e,t,n,r,s,o){this.fb=e,this.utils=t,this.attachmentsS=n,this.ar=r,this.packsS=s,this.notis=o,this.upload=new i.EventEmitter(null),this.back=new i.EventEmitter(null),this.sendDNI=new i.EventEmitter(null),this.loadingPack=!1,this.step=1}ngOnInit(){this.form=this.fb.group({}),console.warn("data: ",this.data),this.loadingPack=!0,this.packsS.getPackagesByUserID(this.userId).then((e=>{console.warn(e),e&&e.data?this.setPack(e.data):this.loadingPack=!1})).catch((e=>{console.error(e),this.loadingPack=!1})),this.formDni=this.fb.group({dni:[null,[r.Validators.required,r.Validators.maxLength(9)]]}),console.error(this.solicitud),this.solicitud&&this.solicitud.request_id&&(this.step=2)}setRequestStep(){}gotoStep2(){this.sendDNI.emit(this.formDni.get("dni").value)}setPack(e){this.pack=e.find((e=>e.id==this.packId)),this.loadingPack=!1,this.setForm()}setForm(){this.pack&&this.pack.documents&&this.pack.documents.forEach((e=>{this.form.addControl(e,new r.FormControl("",r.Validators.required))}))}uploadFiles(){this.upload.emit(!0)}goBack(){this.back.emit(!0)}fileChange(e){e.preventDefault(),e.stopPropagation()}setFile(e,t){const n=new FormData;n.append("file",t),n.append("request_id",this.solicitud.request_id),n.append("document_name",e),this.notis.showToast("Subiendo documento: "+e,6e3,"info"),this.attachmentsS.uploadFile(n).then((n=>{n&&n.status&&"error"!=n.status?(this.form.get(e).setValue(t),this.notis.showToast("Documento "+e+" subido correctamente",4e3,"success")):n&&n.status&&"error"==n.status&&this.notis.showToast("El documento "+e+" no se ha podido subir: "+n.message,4e3,"error")})).catch((t=>{console.error(t),this.notis.showToast("El documento "+e+" no se ha podido subir: "+t,4e3,"error")}))}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.UntypedFormBuilder),i.ɵɵdirectiveInject(s.F),i.ɵɵdirectiveInject(o.o),i.ɵɵdirectiveInject(a.gz),i.ɵɵdirectiveInject(l.U),i.ɵɵdirectiveInject(c.T))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-manual-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName",packId:"packId",userId:"userId"},outputs:{upload:"uploadFiles",back:"goBack",sendDNI:"dniChange"},decls:2,vars:2,consts:[["class","flex flex-col justify-between h-full fixed-content",3,"formGroup",4,"ngIf"],[1,"flex","flex-col","justify-between","h-full","fixed-content",3,"formGroup"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["maxlength","9","formControlName","dni","type","text","placeholder","Ingresa tu DNI o NIE","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"disabled","click"],["class","py-4",4,"ngIf"],["class","py-10 px-4",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"label","fileUpload"],[1,"py-10","px-4"],["text","Cargando documentos",3,"zoom"]],template:function(e,t){1&e&&(i.ɵɵtemplate(0,_,16,20,"form",0),i.ɵɵtemplate(1,x,12,22,"form",0)),2&e&&(i.ɵɵproperty("ngIf",1==t.step),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",2==t.step))},dependencies:[d.sg,d.O5,u.lW,h.KE,h.hX,p.Nt,r.ɵNgNoValidate,r.DefaultValueAccessor,r.NgControlStatus,r.NgControlStatusGroup,r.MaxLengthValidator,r.FormGroupDirective,r.FormControlName,m.O,f.Y,g.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},3468:(e,t,n)=>{n.d(t,{f:()=>M});var i=n(6895),r=n(9101),s=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),v=n(1948),y=n(4246),b=n(6981),x=n(1129),w=n(9476),C=n(969),S=n(4650);let M=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=S.ɵɵdefineNgModule({type:e}),e.ɵinj=S.ɵɵdefineInjector({providers:[a.M,c.o,p.w,u.t,g.T,y.t],imports:[i.ez,r.ot,s.Tx,h.c,o.FormsModule,o.ReactiveFormsModule,l.a,d.Cq,m.FA,f.XK,_.T5,v.Fk,b.x,x.n,w.F,C.O]}),e})()},8526:(e,t,n)=>{n.r(t),n.d(t,{PersonalModule:()=>ht});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(5762),j=n(8259),F=n(2340),q=n(1363),Y=n(6830),V=n(4650),H=n(5089),z=n(8460),B=n(529),U=n(6554);let W=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(F.N.baseUrl+"/requests/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(F.N.baseUrl+"/requests/known-client/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/pre-request/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/known-client/otp";F.N.scraperMock&&(i="/mockscrapper/requests/known-client/otp"),this.localFetch.postFetchWhitoutToken(F.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵinject(H.F),V.ɵɵinject(B.eN),V.ɵɵinject(U.r))},e.ɵprov=V.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var $=n(5412),G=n(833),Z=n(4302),K=n(3731);function Q(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function J(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,Q,2,1,"span",5),V.ɵɵtemplate(3,X,2,2,"span",5),V.ɵɵtemplate(4,J,2,1,"span",5),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),V.ɵɵelementEnd())}function ie(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function re(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en el teléfono? "),V.ɵɵelementEnd())}const se=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,ne,2,0,"span",5),V.ɵɵtemplate(3,ie,2,1,"span",5),V.ɵɵtemplate(4,re,2,0,"span",5),V.ɵɵelementStart(5,"a",12),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.resendOTP())})),V.ɵɵtext(6,"Reenviar"),V.ɵɵelementEnd()(),V.ɵɵelementContainerEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction2(9,se,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new V.EventEmitter(null),this.errPhone=new V.EventEmitter(null),this.resendO=new V.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?j(e.target).next().focus():"Backspace"==e.code&&j(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,te,5,8,"ng-container",5),V.ɵɵtemplate(7,oe,7,12,"ng-container",5),V.ɵɵelementEnd(),V.ɵɵelementStart(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),V.ɵɵtext(11," Código OTP "),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"input",8),V.ɵɵlistener("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),V.ɵɵelementEnd()()()(),V.ɵɵelementStart(13,"div",9)(14,"button",10),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(15,"Siguiente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.otp.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,18,t.texts.otp.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),V.ɵɵadvance(7),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1),V.ɵɵelement(1,"div",2)(2,"div",3),V.ɵɵpipe(3,"safeHtml"),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",e.texts.success.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(3,8,e.texts.success.description||""),V.ɵɵsanitizeHtml)}}let ce=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r}ngOnInit(){}save(){}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts"},decls:1,vars:1,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,le,4,10,"div",0),2&e&&V.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted)},dependencies:[i.O5,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function de(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.retry())})),V.ɵɵtext(2,"Intentarlo nuevamente"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",7),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.newRequest())})),V.ɵɵtext(2,"Crear nueva solicitud"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let he=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null),this.newReq=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵtemplate(5,de,3,6,"div",4),V.ɵɵtemplate(6,ue,3,6,"div",4),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",t.texts.fail.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,6,t.texts.fail.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var pe=n(1763),me=n(5696);const fe=["termsCheckbox"],ge=["termsCertCheckbox"],_e=["assignmentCheckbox"];function ve(e,t){1&e&&(V.ɵɵelementStart(0,"div",15)(1,"mat-form-field",16)(2,"mat-label"),V.ɵɵtext(3,"Email"),V.ɵɵelementEnd(),V.ɵɵelement(4,"input",17),V.ɵɵelementEnd()())}function ye(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",18)(1,"belender-checkbox",19,20),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setTerms(t))})),V.ɵɵelementStart(3,"belender-terms-and-policy-links",21),V.ɵɵlistener("goToTerms",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoTermsAndConditions(t))})),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function be(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",22)(1,"belender-checkbox",9),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setPower(t))})),V.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),V.ɵɵelementStart(3,"a",11),V.ɵɵlistener("click",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoPowerConditions(t))})),V.ɵɵelementStart(4,"u"),V.ɵɵtext(5,"aquí"),V.ɵɵelementEnd()()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title)}}function xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",18)(1,"belender-checkbox",9,23),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setAssignment(t))})),V.ɵɵelement(3,"div",24),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,V.ɵɵsanitizeHtml)}}function we(e,t){1&e&&(V.ɵɵelementStart(0,"div",25),V.ɵɵelement(1,"mat-icon",26),V.ɵɵtext(2," Debes leer los términos y condiciones para poder continuar "),V.ɵɵelementEnd())}const Ce={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Se=(()=>{class e{constructor(e,t){this.utils=e,this.fb=t,this.requestID=null,this.next=new V.EventEmitter(null),this.goTerms=new V.EventEmitter(null),this.goTermsCert=new V.EventEmitter(null),this.goPower=new V.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.termsReaded=!1,this.terms2Readed=!1,this.step=0,this.assignment=!1,this.powerActivate=!1}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}tabChanged(e){this.step=e,this.setForm(null)}setForm(e){let t=e?e.person_email||e.email:null;this.form=this.fb.group(this.data.config.followMail?{email:[t,[p.Validators.required,p.Validators.email]]}:{email:[t]})}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}setAssignment(e){this.assignment=e}nextStep(){let e={terms_and_conditions_service:this.acceptTerms,terms_and_conditions_certificate_emition:this.acceptTerms2,request_id:this.solicitud.request_id};this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email").value),(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=!0,e.terms_and_conditions_power=this.powerActivate?1:0),this.next.emit(e)}gotoTermsAndConditions(e){this.termsReaded=!0,e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){this.terms2Readed=!0,e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}getIfValid(){return!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&this.getAssignmentValidation()}getAssignmentValidation(){return!!(!this.data.config.forceChecks||this.termsReaded&&this.terms2Readed)&&(this.data.config.hideCheckLegal&&(this.acceptTerms=!0),this.data.config.dataAssignmentCheck?this.acceptTerms&&this.acceptTerms2&&this.assignment:this.acceptTerms&&this.acceptTerms2)}gotoPowerConditions(e){this.goPower.emit(!0)}setPower(e){this.powerActivate=e}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(p.UntypedFormBuilder))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(V.ɵɵviewQuery(fe,5),V.ɵɵviewQuery(ge,5),V.ɵɵviewQuery(_e,5)),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.checkComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.certCheckComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",acceptTerms:"acceptTerms",acceptTerms2:"acceptTerms2",termsReaded:"termsReaded",terms2Readed:"terms2Readed"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Ce},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:24,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","email","type","email","placeholder","Ingresa tu email","matInput",""],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,ve,5,0,"div",5),V.ɵɵtemplate(7,ye,4,9,"div",6),V.ɵɵtemplate(8,be,6,1,"div",7),V.ɵɵelementStart(9,"div",8)(10,"belender-checkbox",9,10),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms2(e)})),V.ɵɵtext(12," He leído y acepto los "),V.ɵɵelementStart(13,"a",11),V.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),V.ɵɵelementStart(14,"u"),V.ɵɵtext(15,"términos y condiciones"),V.ɵɵelementEnd()(),V.ɵɵtext(16," para la emisión del certificado "),V.ɵɵelementEnd()(),V.ɵɵtemplate(17,xe,4,2,"div",6),V.ɵɵtemplate(18,we,3,0,"div",12),V.ɵɵelementEnd(),V.ɵɵelementStart(19,"div",13)(20,"button",14),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Siguiente "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.form.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,22,t.texts.form.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data.config.forceChecks&&(!t.termsReaded||!t.terms2Readed)),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnText)("background",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid||!t.getIfValid()))},dependencies:[i.O5,d.Hw,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.FormGroupDirective,p.FormControlName,pe.b,me.T,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Me=n(5145);let Ie=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Me.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"mat-progress-spinner"),V.ɵɵelementStart(3,"p"),V.ɵɵtext(4),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(4),V.ɵɵtextInterpolate(t.label))},dependencies:[b.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),ke=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.noService.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,8,t.texts.noService.description),V.ɵɵsanitizeHtml))},dependencies:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtext(6),V.ɵɵelementEnd()(),V.ɵɵelementStart(7,"div",5)(8,"button",6),V.ɵɵlistener("click",(function(){return t.retry()})),V.ɵɵtext(9,"Intentarlo nuevamente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.abandoned.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,15,t.texts.abandoned.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Te(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Pe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña es requerida "),V.ɵɵelementEnd())}function Oe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}function De(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Es necesario repetir la contraseña "),V.ɵɵelementEnd())}function Le(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Las contraseñas deben coincidir "),V.ɵɵelementEnd())}function Ae(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}const Ne={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Re=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new V.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Te("password","confirm_password")})}nextStep(){let e={set_password_certificate:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.FormBuilder),V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Ne},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(9,"input",6),V.ɵɵtemplate(10,Pe,2,0,"mat-hint",7),V.ɵɵtemplate(11,Oe,2,0,"mat-hint",7),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-form-field",8)(13,"mat-label"),V.ɵɵtext(14,"Repite Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(15,"input",9),V.ɵɵtemplate(16,De,2,0,"mat-hint",7),V.ɵɵtemplate(17,Le,2,0,"mat-hint",7),V.ɵɵtemplate(18,Ae,2,0,"mat-hint",7),V.ɵɵelementEnd()(),V.ɵɵelementStart(19,"div",10)(20,"button",11),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Guardar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.password.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,21,t.texts.password.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),V.ɵɵadvance(5),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const je=["formStep"];function Fe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"vex-power-cert",3),V.ɵɵlistener("accept",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.acceptPowerCert())})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵproperty("hideButtons",!1)("flow","KnownClient")("userId",e.userId)}}function qe(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"img",9),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function Ye(e,t){if(1&e&&V.ɵɵelement(0,"belender-loading-step",19),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("status",null==e.solicitud?null:e.solicitud.status_code)("data",e.data)}}function Ve(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-form-step",20,21),V.ɵɵlistener("goToTerms",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoTermsAndConditions())}))("goToPower",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.gotoPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("userId",e.userId)("requestID",e.requestID)("data",e.data)("flowName",e.flowName)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function He(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-password-step",22),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.sendPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-otp-step",23),V.ɵɵlistener("resendOTP",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.requestOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e&&V.ɵɵelement(0,"belender-success-step",24),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-fail-step",25),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.newRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function We(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-abandoned-step",26),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.retryRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function $e(e,t){if(1&e&&V.ɵɵelement(0,"belender-no-service-step",27),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("data",e.data)}}function Ge(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",28)(1,"div",29)(2,"h1",30),V.ɵɵtext(3,"No existe la solicitud"),V.ɵɵelementEnd()(),V.ɵɵelementStart(4,"div",31),V.ɵɵtext(5,"No existen solicitudes activas con el código requerido"),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Ze(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵtemplate(1,Ye,1,2,"belender-loading-step",10),V.ɵɵtemplate(2,Ve,2,6,"belender-form-step",11),V.ɵɵtemplate(3,He,1,3,"belender-password-step",12),V.ɵɵtemplate(4,ze,1,3,"belender-otp-step",13),V.ɵɵtemplate(5,Be,1,2,"belender-success-step",14),V.ɵɵtemplate(6,Ue,1,3,"belender-fail-step",15),V.ɵɵtemplate(7,We,1,3,"belender-abandoned-step",16),V.ɵɵtemplate(8,$e,1,2,"belender-no-service-step",17),V.ɵɵtemplate(9,Ge,6,2,"div",18),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("ngIf","loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","form"==e.getStatus()&&!e.loading),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","password"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","otp"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","success"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","failed"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","abandoned"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-service"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function Ke(e,t){1&e&&V.ɵɵelement(0,"belender-disabled-url")}function Qe(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",32),V.ɵɵelement(1,"mat-progress-spinner",33),V.ɵɵelementStart(2,"p",34),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function Xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",35)(1,"div",28)(2,"div",36),V.ɵɵtext(3,"Error!"),V.ɵɵelementEnd(),V.ɵɵelement(4,"div",37),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",38)(6,"button",39),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(2);return V.ɵɵresetView(t.error=!1)})),V.ɵɵtext(7,"Ingresar manualmente"),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",e.error,V.ɵɵsanitizeHtml)}}function Je(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",4)(1,"div"),V.ɵɵtemplate(2,qe,2,1,"div",5),V.ɵɵtemplate(3,Ze,10,9,"ng-container",2),V.ɵɵtemplate(4,Ke,1,0,"belender-disabled-url",2),V.ɵɵtemplate(5,Qe,4,3,"div",6),V.ɵɵtemplate(6,Xe,8,3,"div",7),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&!e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.loading&&e.error)}}function et(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"div",40),V.ɵɵtext(2),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(2),V.ɵɵtextInterpolate1("TestMode ",e.testMode?"ON":"OFF","")}}let tt=class{constructor(e,t,n,i,r,s,o,a,l,c){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.webhooksService=a,this.knownService=l,this.dialog=c,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="KnownClient"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=!1}),(e=>{this.loading=!1}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{console.warn("solicitud: ",e.data),e&&e.data?(t.solicitud=e.data,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),t.setSubscriptionOfRequestOld()},this.socket.onclose=function(e){console.log("Conexión cerrada"),t.setSubscriptionOfRequestOld()}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp",this.loading=!1}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):(this.solicitud.status_code="no_service",this.loading=!1):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=!1})))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}gotoPassword(e){this.loading="Iniciando el proceso de emisión de certificado..";let t=e;(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.knownService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{t&&t.error&&this.showAlert("Error!",t.error),this.loading=!1}))}gotoOTP(e){let t=e;t.request_id=this.requestID,t.user_id=this.userId,this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),setTimeout((()=>{this.solicitud=new R.l,this.loading=!1,this.solicitud.status_code="waiting_otp"}),2e3)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.knownService.sendOtp(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}sendPassword(e){let t={password:e.set_password_certificate,request_id:this.solicitud.request_id};this.loading="Enviando contraseña..",this.knownService.sendPassword(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((t=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code&&"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"certificate_created"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"success_otp"!=this.solicitud.status_code&&"otp_success"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(Y.L,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTermsCheck(!0)}))}gotoTermsAndConditionsCertificate(){this.dialog.open(q.v,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};tt.ɵfac=function(e){return new(e||tt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(z.r),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t),V.ɵɵdirectiveInject(W),V.ɵɵdirectiveInject($.uw))},tt.ɵcmp=V.ɵɵdefineComponent({type:tt,selectors:[["belender-widget-personal"]],viewQuery:function(e,t){if(1&e&&V.ɵɵviewQuery(je,5),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[3,"status","data",4,"ngIf"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"status","data"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","nextStep"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","retry"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,Fe,1,3,"vex-power-cert",0),V.ɵɵtemplate(1,Je,7,10,"div",1),V.ɵɵtemplate(2,et,3,1,"ng-container",2)),2&e&&(V.ɵɵproperty("ngIf",t.viewPowerTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.testMode))},dependencies:[i.O5,u.lW,b.Ou,G.L,Z.q,ae,ce,he,Se,Ie,ke,Ee,Re],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),tt=(0,L.gn)([(0,N.c)()],tt);const nt=[{path:":idUser",component:tt},{path:":idUser/:packID",component:tt}];let it=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({imports:[P.Bz.forChild(nt),P.Bz,O.d8]}),e})();var rt=n(6981),st=n(3848),ot=n(1129),at=n(3295),lt=n(1258),ct=n(2266),dt=n(3300),ut=n(865);let ht=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,W,{provide:M.Ad,useValue:"es-ES"}],imports:[it,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,rt.x,st.Nh,ot.n,at.g,lt.H,ct.L,dt.C,ut.q]}),e})()},920:(e,t,n)=>{n.d(t,{n:()=>rt});var i=n(5861),r=n(7582),s=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667),u=n(3842);const h={created:"form",form:"form",prerequest:"form",terms_and_conditions:"form",waiting_otp_seguridad_social:"otp_ss",waiting_login_seguridad_social:"otp_ss",invalid_otp_seguridad_social:"otp_ss",waiting_otp_aeat:"otp_aeat",waiting_login_aeat:"otp_aeat",invalid_otp_aeat:"otp_aeat",abandoned_after_bad_phone:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",abandoned_after_invalid_otp_aeat:"abandoned",abandoned_after_waiting_otp_aeat:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",failed_with_retry:"failed",failed_without_retry:"failed",failed_documents_downloaded:"failed",consent_process_canceled:"failed",no_service:"no-service",no_clave_pin_service:"no-service",stand_by:"standby","no-phone":"no-phone","no-more-phone":"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var p=n(6830),m=n(1931),f=n(4650),g=n(9299),_=n(5089),v=n(7489),y=n(5895),b=n(182),x=n(5206),w=n(8460),C=n(9045),S=n(7367),M=n(5412),I=n(7308),k=n(6895),E=n(4302),T=n(3046),P=n(9112),O=n(9382),D=n(7392),L=n(9101),A=n(1572),N=n(4006),R=n(5601),j=n(9617),F=n(342),q=n(3731);function Y(e,t){if(1&e&&f.ɵɵelement(0,"widget-documents",6),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function V(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",2),f.ɵɵelement(1,"div",3)(2,"div",4),f.ɵɵpipe(3,"safeHtml"),f.ɵɵtemplate(4,Y,1,3,"widget-documents",5),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",e.texts.success.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(3,9,e.texts.success.description||""),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.showDocuments)}}function H(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",7)(1,"button",8),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.gotoRedirect())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let z=(()=>{class e{constructor(e,t,n,i,r){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=r,this.showDocuments=!1}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]}),this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.FormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(j.U),f.ɵɵdirectiveInject(f.ChangeDetectorRef))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName",labels:"labels"},decls:2,vars:2,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID",4,"ngIf"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵtemplate(0,V,5,11,"div",0),f.ɵɵtemplate(1,H,3,7,"div",1)),2&e&&(f.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[k.O5,F.A,L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var B=n(9391);function U(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",5)(1,"button",6),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.retry())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.retry," ")}}function W(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",5)(1,"button",7),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.newRequest())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.newRequest," ")}}let $=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryR=new f.EventEmitter(null),this.newR=new f.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryR.emit(this.solicitud.request_id)}newRequest(){this.newR.emit(this.solicitud.request_id)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(B.o),f.ɵɵdirectiveInject(y.T))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",labels:"labels"},outputs:{retryR:"retryRequest",newR:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd(),f.ɵɵtemplate(5,U,3,7,"div",4),f.ɵɵtemplate(6,W,3,7,"div",4),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵproperty("innerHTML",t.texts.fail.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,6,t.texts.fail.description),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[k.O5,L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var G=n(3238),Z=n(5439),K=n.n(Z),Q=n(3755),X=n(3746),J=n(2932),ee=n(4246),te=n(1763),ne=n(7795),ie=n(5696),re=n(4144);const se=["termsCheckbox"],oe=["assignmentCheckbox"];function ae(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",e.labels.warnings.invalidNieOrDni," ")}}function le(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"mat-hint")(1,"a",17),f.ɵɵlistener("click",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(2);return f.ɵɵresetView(n.gotoExpirationDate(t))})),f.ɵɵelementStart(2,"u"),f.ɵɵtext(3),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(3),f.ɵɵtextInterpolate(e.labels.findExpiration)}}const ce=function(e){return{mask:e}};function de(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",16),f.ɵɵtemplate(4,le,4,1,"mat-hint",8),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵclassMapInterpolate1("",e.disabledInputs.expiration?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.expiration),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.expiration?-1:1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(7,ce,e.datemask)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.isDni)}}function ue(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," El formato debe ser DD/MM/AAAA "),f.ɵɵelementEnd())}function he(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," Fecha inválida "),f.ɵɵelementEnd())}function pe(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," Debe ser mayor de 18 años "),f.ɵɵelementEnd())}function me(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",16),f.ɵɵtemplate(4,ue,2,0,"mat-error",8),f.ɵɵtemplate(5,he,2,0,"mat-error",8),f.ɵɵtemplate(6,pe,2,0,"mat-error",8),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();let t,n,i;f.ɵɵclassMapInterpolate1("",e.disabledInputs.birthday?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.birthday),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.birthday?-1:1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(9,ce,e.datemask)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate")),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(i=e.form.get("expired_date"))?null:i.hasError("underAge"))}}function fe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",18),f.ɵɵelementStart(4,"mat-hint")(5,"a",17),f.ɵɵlistener("click",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.gotoSupportAclaration(t))})),f.ɵɵelementStart(6,"u"),f.ɵɵtext(7),f.ɵɵelementEnd()()()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵclassMapInterpolate1("",e.disabledInputs.supportNumber?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.support),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.supportNumber?-1:1),f.ɵɵadvance(4),f.ɵɵtextInterpolate(e.labels.findExpiration)}}function ge(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",19)(1,"mat-form-field",6)(2,"mat-label"),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelement(4,"input",20),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.email),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1)}}function _e(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",22,23),f.ɵɵlistener("changeCheckbox",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.setTerms(t))})),f.ɵɵelementStart(3,"belender-terms-and-policy-links",24),f.ɵɵlistener("goToTerms",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.gotoTermsAndConditions(t))})),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵproperty("color",e.data.styles.colors.title),f.ɵɵadvance(2),f.ɵɵproperty("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function ve(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",25,26),f.ɵɵlistener("changeCheckbox",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.setAssignment(t))})),f.ɵɵelement(3,"div",27),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵproperty("color",e.data.styles.colors.title),f.ɵɵadvance(2),f.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,f.ɵɵsanitizeHtml)}}function ye(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",28),f.ɵɵelement(1,"mat-icon",29),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.labels.warnings.haveToReadTerms," ")}}function be(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",30),f.ɵɵelement(1,"mat-icon",29),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}const xe=function(e){return{"dont-show-data":e}},we={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=r,this.lang="",this.next=new f.EventEmitter(null),this.esDNI=new f.EventEmitter(null),this.goTerms=new f.EventEmitter(null),this.acceptTerms=!1,this.step=0,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.disabledInputs={dni:!1,birthday:!1,supportNumber:!1,email:!1,expiration:!1},this.noValidate=!1,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.solicitud?(this.setBaseForm(this.solicitud),this.noValidate="terms_and_conditions"==this.solicitud.status_code):this.setBaseForm(null)}sendPestana(){window.parent.open("www.google.com","_blank")}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:this.labels.warnings.invalidDni):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:this.labels.warnings.invalidNie):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI=this.labels.warnings.invalidNieOrDni),this.cd.markForCheck()}setBaseForm(e){console.error(e);let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.birth_date?K()(e.birth_date).format("DD/MM/YYYY"):null,i=e&&e.person_document_expiration_date?K()(e.person_document_expiration_date).format("DD/MM/YYYY"):null,r=e&&e.document_support?e.document_support:null,s=e&&e.person_birth_date?K()(e.person_birth_date).format("DD/MM/YYYY"):n,o=i,a=e?e.person_email||e.email||e.email_copy:null,l=e&&e.person_document_support?e.person_document_support:r;t&&this.setRegex(t),this.form=this.fb.group(this.isDni?this.data.config.followMail?{dni:[t,this.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],email:[a],document_type:["dni"],expired_date:[o,[(0,J.s)({checkFormat:!0,checkDate:!0})]],support_number:[null],person_phone:[]}:{dni:[t,this.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],document_type:["dni"],expired_date:[o,[(0,J.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:this.data.config.followMail?{dni:[t,[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],expired_date:[s,[(0,J.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],document_type:["nie"],support_number:[l],email:[a]}:{dni:[t,[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],expired_date:[s,[(0,J.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],document_type:["nie"],support_number:[l]}),this.form.markAllAsTouched(),this.form.updateValueAndValidity(),this.requestIDFromURL&&this.disableEnableInputs(t,n||s,i,r||l,a)}forceEnableDisableInputs(e,t,n,i,r){let s=t?t.value:this.disabledInputs.birthday,o=i?i.value:this.disabledInputs.supportNumber;this.isNie&&s&&!s.value&&(o={value:!1}),this.disableEnableInputs(e?e.value:this.disabledInputs.dni,s,n?n.value:this.disabledInputs.expiration,o,r?r.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i,r){this.disabledInputs={dni:e||!1,birthday:t||!1,supportNumber:i||!1,email:!!r,expiration:n||!1},this.cd.markForCheck()}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}nextStep(){let e;this.isDni?(e={document_number:this.form.get("dni").value.toUpperCase(),check_legal:!0,document_expiration_date:this.utils.formatDate(this.form.get("expired_date").value)},this.solicitud.person_document_number=e.document_number,this.solicitud.person_document_expiration_date=e.document_expiration_date):(e={document_number:this.form.get("dni").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("expired_date").value),check_legal:!0,document_support:this.form.get("support_number").value},this.solicitud.person_document_number=e.document_number,this.solicitud.person_birth_date=e.birth_date,this.solicitud.person_document_support=e.document_support),this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email")?this.form.get("email").value:""),e.document_type=this.isDni?"dni":"nie",this.esDNI.emit(this.isDni),this.next.emit(e)}getHTML(e){return'\n <div style="color: red !important">\n Taitooo\n </div>\n '}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(Q.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(X.R,{panelClass:"fullscreen-dialog"})}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getFormsValid(){let e=!this.form.invalid,t=this.form&&this.form.get("support_number")?this.form.get("support_number").value:null;this.data.config.dontShowDataInTerms&&this.solicitud&&this.solicitud.status_code&&"terms_and_conditions"===this.solicitud.status_code&&(e=!0);let n=this.form.get("dni").value;return n?this.setRegex(n):e=!1,this.isNie&&(!t||""==t)&&(e=!1),!this.isDni&&!this.isNie&&(this.disabledInputs.dni=!1,e=!1),this.errorDNI&&(e=!1),e}getIfValid(){if(this.data.config.dontShowDataInTerms&&this.solicitud&&this.solicitud.status_code&&"terms_and_conditions"===this.solicitud.status_code&&(this.acceptTerms=!0),this.isDni||this.isNie)return this.errorDNI=null,!!this.data.config.hideCheckLegal||this.acceptTerms;this.errorDNI=this.labels.warnings.invalidNieOrDni}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(f.ChangeDetectorRef),f.ɵɵdirectiveInject(ee.t),f.ɵɵdirectiveInject(M.uw))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(se,5),f.ɵɵviewQuery(oe,5)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.checkComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",requestIDFromURL:"requestIDFromURL",labels:"labels",lang:"lang"},outputs:{next:"nextStep",esDNI:"isDni",goTerms:"goToTerms"},features:[f.ɵɵProvidersFeature([{provide:G.sG,useValue:we},{provide:f.LOCALE_ID,useValue:"es-ES"}])],decls:23,vars:36,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[3,"ngClass"],[1,"mb-3","pt-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["id","dniInput","formControlName","dni","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["appearance","outline",3,"class",4,"ngIf"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 w-fit flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","sendBtn","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","matInput","",3,"tabindex","textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["id","supportNumberInput","maxlength","9","minlength","6","required","","formControlName","support_number","matInput","",3,"tabindex"],[1,"w-full"],["id","emailInput","formControlName","email","required","","type","email","placeholder","Ingresa tu email","matInput","",3,"tabindex"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","w-fit","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd(),f.ɵɵelementStart(5,"div",4)(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",7),f.ɵɵtemplate(11,ae,2,1,"mat-error",8),f.ɵɵelementEnd(),f.ɵɵtemplate(12,de,5,9,"mat-form-field",9),f.ɵɵtemplate(13,me,7,11,"mat-form-field",9),f.ɵɵtemplate(14,fe,8,6,"mat-form-field",9),f.ɵɵtemplate(15,ge,5,5,"div",10),f.ɵɵelementEnd()(),f.ɵɵtemplate(16,_e,4,12,"div",11),f.ɵɵtemplate(17,ve,4,2,"div",11),f.ɵɵtemplate(18,ye,3,1,"div",12),f.ɵɵtemplate(19,be,3,1,"div",13),f.ɵɵelementStart(20,"div",14)(21,"button",15),f.ɵɵlistener("click",(function(){return t.nextStep()})),f.ɵɵtext(22),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.form.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,32,t.texts.form.description||""),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(34,xe,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),f.ɵɵadvance(2),f.ɵɵclassMapInterpolate1("",t.disabledInputs.dni?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.dni?-1:1),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!t.isNie&&!t.isDni),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isDni),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isNie),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isNie),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",(null==t.data||null==t.data.config?null:t.data.config.followMail)&&(t.isDni||t.isNie)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.data.config.forceChecks&&!t.termsReaded),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.errorDNI),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",!t.getFormsValid()||!t.getIfValid()||!t.getAssignmentValidation()),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.continue," "))},dependencies:[k.mk,k.O5,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.MinLengthValidator,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,te.b,ne.hd,ie.T,D.Hw,L.lW,s.TO,s.KE,s.bx,s.hX,re.Nt,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hiden-input[_ngcontent-%COMP%]{height:0!important;max-height:0px!important;overflow:hidden!important;opacity:0!important}"]}),e})(),Se=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.noService.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,8,t.texts.noService.description),f.ɵɵsanitizeHtml))},dependencies:[N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,q.z]}),e})(),Me=(()=>{class e{constructor(e){this.utils=e,this.retryR=new f.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryR.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{data:"data",solicitud:"solicitud",labels:"labels",texts:"texts"},outputs:{retryR:"retryRequest"},decls:10,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementStart(5,"div",4),f.ɵɵtext(6),f.ɵɵelementEnd()(),f.ɵɵelementStart(7,"div",5)(8,"button",6),f.ɵɵlistener("click",(function(){return t.retry()})),f.ɵɵtext(9),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.abandoned.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,16,t.texts.abandoned.description),f.ɵɵsanitizeHtml),f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels.actions?null:t.labels.actions.retry," "))},dependencies:[L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ie=n(5145);let ke=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.nr=new f.EventEmitter(null)}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=Ie.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:"Estado desconocido"}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(B.o),f.ɵɵdirectiveInject(y.T))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:15,vars:20,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"div",4),f.ɵɵtext(7),f.ɵɵelementStart(8,"div",5),f.ɵɵtext(9),f.ɵɵelementEnd()()(),f.ɵɵelementStart(10,"div",6)(11,"button",7),f.ɵɵlistener("click",(function(){return t.newRequest()})),f.ɵɵtext(12),f.ɵɵelementEnd(),f.ɵɵelementStart(13,"button",8),f.ɵɵlistener("click",(function(){return t.gotoRequest()})),f.ɵɵtext(14),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.duplicatedRequest," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.alreadyHaveRequest," "),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",t.labels.warnings.currentRequestStatus," "),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",t.getStatus()," "),f.ɵɵadvance(2),f.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.newRequest," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[L.lW],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),f.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.description:f.ɵɵpipeBind1(4,8,"Descripcion del estado Stand By"),f.ɵɵsanitizeHtml))},dependencies:[N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,q.z]}),e})(),Te=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementStart(11,"mat-hint"),f.ɵɵtext(12,"DD/MM/YYYY"),f.ɵɵelementEnd()()()(),f.ɵɵelementStart(13,"div",7)(14,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(15),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongExpiration," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputExpiration," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate(null==t.labels?null:t.labels.expiration),f.ɵɵadvance(5),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,L.lW,s.KE,s.bx,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Pe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementEnd()()(),f.ɵɵelementStart(11,"div",7)(12,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(13),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongSupport," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputSupport," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate(null==t.labels||null==t.labels.warnings?null:t.labels.warnings.support),f.ɵɵadvance(3),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NumberValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,L.lW,s.KE,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Oe=function(e){return{mask:e}};let De=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null),this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.form=this.fb.group({birth_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:21,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","belender-form-field"],["type","text","required","","formControlName","birth_date","matInput","",3,"textMask"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementStart(11,"mat-hint"),f.ɵɵtext(12,"DD/MM/YYYY"),f.ɵɵelementEnd()()()(),f.ɵɵelementStart(13,"div",7)(14,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(15),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongBirthday," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.inputBirthDay," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",t.labels.warnings.birthday," "),f.ɵɵadvance(1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(19,Oe,t.datemask)),f.ɵɵadvance(4),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,ne.hd,L.lW,s.KE,s.bx,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Le=["formStep"],Ae=["otpStep"];function Ne(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",8),f.ɵɵelement(1,"mat-icon",9),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("@fadeInUp",void 0),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.warningAlert," ")}}function Re(e,t){if(1&e&&f.ɵɵelement(0,"belender-widget-logo",10),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function je(e,t){1&e&&(f.ɵɵelementStart(0,"div",11),f.ɵɵelement(1,"mat-progress-spinner",12),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵproperty("value",0))}function Fe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-form-step",24,25),f.ɵɵlistener("goToTerms",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(3);return f.ɵɵresetView(t.gotoTermsAndConditions())}))("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.validateRequest(t))}))("isDni",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setIsDni(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("userId",e.userId)("flowName",e.flowName)("lang",e.currentLang)("requestIDFromURL",e.requestIDFromURL)("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)("lang",e.currentLang)("solicitud",e.solicitud)}}function qe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-shared-otp-step",26,27),f.ɵɵlistener("resendOTP",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(3);return f.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.requestOTP(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("otpType","otp_ss"==e.requestStatus?"otpSS":"otpAEAT")("flowType",e.flowName)("data",e.data)("labels",e.labels)("solicitud",e.solicitud)("minLength",e.getOTPMinLength())("lastThreeNumbersPhone",e.lastThreeNumbersPhone)("texts",e.data[e.flowName].texts)}}function Ye(e,t){if(1&e&&f.ɵɵelement(0,"belender-success-step",28),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function Ve(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-duplicated-request-step",29),f.ɵɵlistener("newRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.newRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function He(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-birthday-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setBirthDate(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function ze(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-expiration-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setExpiration(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Be(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-support-number-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setSupportNumber(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Ue(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-fail-step",31),f.ɵɵlistener("retryRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.newRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("solicitud",e.solicitud)("texts",e.data[e.flowName].texts)}}function We(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-abandoned-step",32),f.ɵɵlistener("retryRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.retryRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)}}function $e(e,t){if(1&e&&f.ɵɵelement(0,"belender-no-service-step",33),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)}}function Ge(e,t){if(1&e&&f.ɵɵelement(0,"belender-standby-step",33),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)}}function Ze(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",34)(1,"div",35)(2,"h1",36),f.ɵɵtext(3,"No existe la solicitud"),f.ɵɵelementEnd()(),f.ɵɵelementStart(4,"div",37),f.ɵɵtext(5," No existen solicitudes activas con el código requerido "),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext(3);f.ɵɵadvance(4),f.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Ke(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-cancel-request",38),f.ɵɵlistener("updateStatusCode",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setCancel(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("flowType",e.flowName)("request_id",e.requestID)("labels",e.labels)("user_id",e.userId)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function Qe(e,t){if(1&e&&(f.ɵɵelement(0,"div",39),f.ɵɵpipe(1,"safeHtml")),2&e){const e=f.ɵɵnextContext(3);f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription?f.ɵɵpipeBind1(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""):"",f.ɵɵsanitizeHtml)}}function Xe(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtemplate(1,Fe,2,9,"belender-form-step",13),f.ɵɵtemplate(2,qe,2,8,"belender-shared-otp-step",14),f.ɵɵtemplate(3,Ye,1,7,"belender-success-step",15),f.ɵɵtemplate(4,Ve,1,3,"belender-duplicated-request-step",16),f.ɵɵtemplate(5,He,1,3,"belender-error-birthday-step",17),f.ɵɵtemplate(6,ze,1,3,"belender-error-expiration-step",17),f.ɵɵtemplate(7,Be,1,3,"belender-error-support-number-step",17),f.ɵɵtemplate(8,Ue,1,4,"belender-fail-step",18),f.ɵɵtemplate(9,We,1,4,"belender-abandoned-step",19),f.ɵɵtemplate(10,$e,1,2,"belender-no-service-step",20),f.ɵɵtemplate(11,Ge,1,2,"belender-standby-step",20),f.ɵɵtemplate(12,Ze,6,2,"div",21),f.ɵɵtemplate(13,Ke,1,6,"belender-cancel-request",22),f.ɵɵtemplate(14,Qe,2,5,"div",23),f.ɵɵelementContainerEnd()),2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(1),f.ɵɵproperty("ngIf","form"===e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","otp_ss"==e.requestStatus||"otp_aeat"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","success"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","duplicated"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-birth-date"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-expiration-date"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-support-number"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","failed"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","abandoned"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","no-service"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","standby"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","created"!=e.step),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.showCancelRequest&&e.data.config.cancelRequest),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.loadingRequestData&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription))}}function Je(e,t){1&e&&f.ɵɵelement(0,"belender-disabled-url")}function et(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",40)(1,"div",34)(2,"div",41),f.ɵɵtext(3,"Error!"),f.ɵɵelementEnd(),f.ɵɵelement(4,"div",42),f.ɵɵelementEnd(),f.ɵɵelementStart(5,"div",43)(6,"button",44),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(2);return f.ɵɵresetView(t.error=!1)})),f.ɵɵtext(7," Ingresar manualmente "),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(4),f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",e.error,f.ɵɵsanitizeHtml)}}function tt(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",3)(1,"div"),f.ɵɵtemplate(2,Ne,3,2,"div",4),f.ɵɵtemplate(3,Re,1,1,"belender-widget-logo",5),f.ɵɵtemplate(4,je,2,1,"div",6),f.ɵɵtemplate(5,Xe,15,14,"ng-container",2),f.ɵɵtemplate(6,Je,1,0,"belender-disabled-url",2),f.ɵɵtemplate(7,et,8,3,"div",7),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵclassMapInterpolate1("h-full w-full relative flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),f.ɵɵstyleProp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.warningAlert&&"success"!=e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.getIfShowLogo()),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.error&&!e.disableURL),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.error&&e.disableURL),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",45),f.ɵɵelement(1,"mat-progress-spinner",46),f.ɵɵelementStart(2,"p",47),f.ɵɵtext(3),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",e.loading," ")}}function it(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵelementStart(1,"div",48),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelementContainerEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}let rt=class{constructor(e,t,n,i,r,s,o,a,l,d,u,h){this.cd=e,this.Activatedroute=t,this.utils=n,this.pinService=i,this.notis=r,this.webhooksService=s,this.flowsS=o,this.customizationStoreService=a,this.deviceInfoService=l,this.customizationService=d,this.dialog=u,this.translationService=h,this.data=null,this.disableActions=!1,this.step="created",this.clientEnviroment="belender",this.showCancelRequest=!1,this.loading=null,this.error=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.lastThreeNumbersPhone=null,this.requestIDFromURL=!1,this.paramsSetted=!1,this.stopPropagationOfSuccess=!1,this.picturesTaken=[],this.disableURL=!1,this.selectedLanguage="es",this.isDni=!0,this.loadingRequestData=!1,this.env=c.N,this.intervalToAskBack=null,this.requestedFromDetail=!1,this.intervalCount=0,this.requestStatus="",this.currentHeight=0,this.isScaled=!1,this.termsOpened=!1,this.flowName="ClavePin",this.labels=m.S.es,this.currentLang="",localStorage.getItem("belender-language")&&(this.selectedLanguage=localStorage.getItem("belender-language")),this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.getWindowsScreenOrientation();const e=this;e.setWarningPortals(),this.loading="Obteniendo información de la solicitud",this.checkClientUrl(),this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.labels.loadings.gettingData,e.userId?e.setInitialData(e.userId):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}getWindowsScreenOrientation(){window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.sendMessageToParent({type:"widgetHeight",data:e})}setRequestStatus(e){if(this.solicitud)this.solicitud.status_code=e;else{let t=new a.l;t.status_code=e,this.solicitud=t}this.setStatus()}checkClientUrl(){const e=window.location.href;this.clientEnviroment=this.getClientFromUrl(e)}getOTPMinLength(){return this.env?"dev"===this.env.env&&"belender"===this.clientEnviroment?6:"qa"===this.env.env||"dev"===this.env.env&&"opendata"===this.clientEnviroment?3:6:6}getClientFromUrl(e){return e.includes("opendata")?"opendata":"belender"}setWarningPortals(){this.flowsS.getFlows().then((e=>{if(e&&e.data&&e.data.length){let t=e.data.find((e=>e.name==this.flowName));t&&t.status&&"OCCASIONAL_FAIL"==t.status&&(this.warningAlert=this.labels.warnings.ocassionalError)}})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){if(t.flowConfig=yield t.getFlow(e),t.funderConfig=t.customizationStoreService.FUNDER_CONFIG,t.funderStyles=t.customizationStoreService.FUNDER_STYLES,t.data={config:t.funderConfig,styles:t.funderStyles,[t.flowName]:t.flowConfig},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.loading=null,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe({next:e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id,e),this.requestIDFromURL=!0):e?this.setParamsToRequest(e):this.loading=null},error:()=>{this.loading=null}})}setParamsToRequest(e){this.solicitud||this.setRequestStatus("form"),e.success&&(this.stopPropagationOfSuccess=!0),(e.document_number||e.document)&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0),(e.birth_date||e.birthday)&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0),(e.document_expiration_date||e.expiration)&&!this.solicitud.person_document_expiration_date&&(this.solicitud.person_document_expiration_date=e.document_expiration_date||e.expiration,this.requestIDFromURL=!0),(e.document_support||e.supportNumber)&&!this.solicitud.document_support&&(this.solicitud.document_support=e.document_support||e.supportNumber,this.requestIDFromURL=!0),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.paramsSetted=!0}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){n.loading=n.labels.loadings.gettingData,n.loadingRequestData=!0,n.testMode?setTimeout((()=>{n.solicitud=u.VU.data,n.setRequestStatus(n.solicitud.status_code),n.setSubscriptionOfRequest(),n.loading=null,n.loadingRequestData=!1,n.skipCreationOfRequest=!0,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)}),4e3):n.pinService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.solicitud=e.data,n.setRequestStatus(n.solicitud.status_code),n.setSubscriptionOfRequest(),n.loading=null,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.loading=null,n.loadingRequestData=!1})).catch((e=>{n.loading=null,n.loadingRequestData=!1}))}))()}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}console.log("Message to parent:",e,this.currentHeight),window.top.postMessage(e,"*")}handlePusherNotification(e){if(e&&(this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase=e,e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.dataFromFirebase)){if(this.dataFromFirebase.hasOwnProperty("match_phone")&&!this.dataFromFirebase.match_phone)return void this.handleBadPhone();this.dataFromFirebase.person_last_three_phone_number&&(this.lastThreeNumbersPhone=this.dataFromFirebase.person_last_three_phone_number),this.dataFromFirebase.status_code&&("consent_process_completed"===this.dataFromFirebase.status_code&&this.disconnectWebsocket(),this.setRequestStatus(this.dataFromFirebase.status_code),"terms_and_conditions"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}}handleBadPhone(){this.disconnectWebsocket(),this.loading=this.labels.loadings.validatingData,this.pinService.noMatchPhone({request_id:this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID,user_id:this.userId}).then((e=>{setTimeout((()=>{this.solicitud||(this.solicitud=new a.l,this.setRequestStatus(this.solicitud.status_code)),e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null}),3e3)})).catch((e=>{this.showAlert("Error!",e),setTimeout((()=>{this.solicitud||(this.solicitud=new a.l,this.setRequestStatus(this.solicitud.status_code)),this.setRequestStatus("failed_without_retry"),this.loading=null}),1e3)}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==c.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==c.N.env&&(e="wss://notifications.belender.net"),c.N.notificationsBaseUrl&&(e=c.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setIsDni(e){this.isDni=e}setSubscriptionOfRequestOld(){}sendNewData(e){this.loading=this.labels.loadings.sendingData,this.pinService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e,"error"),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error,"error")}))}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}showAlert(e,t,n){this.loading=null;let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}setNoService(e){this.loading=this.labels.loadings.validatingData,e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.pinService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()}))}))}validateRequest(e){e.user_id=this.userId,e.package_id=this.packId,this.loading=this.labels.loadings.validatingData,this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.checkService(e).then((t=>{if(t&&t.status&&"success"==t.status)this.gotoTerms(e);else if(t.message){let n=this.parseErrorResponse(t.message);"no-service"==n.title?this.setNoService(e):(this.notis.showAlert(n.title,n.description),this.loading=null),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.setNoService(e)})).catch((t=>{if(console.error(t),t.message){let n=this.parseErrorResponse(t.message);"no-service"!=n.title?(this.notis.showAlert(n.title,n.description),this.loading=null):(this.pinService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null}))})),this.loading=null,this.cd.markForCheck()),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.notis.showAlert("Error indefinido!",t),this.loading=null,this.cd.markForCheck()}))}handleDisableInputs(e){!e||setTimeout((()=>{"venc"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"sop"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"nac"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),this.cd.markForCheck()}),1e3)}parseErrorResponse(e){if(Array.isArray(e)){let t="";return e.forEach((e=>{t+=e+" "})),{title:this.labels.warnings.errorSomeData,description:t}}return"does not have pin service"==e.toLowerCase()||"does not have clave pin service"==e.toLowerCase()?{title:"no-service",description:this.labels.warnings.noPinService}:"document number invalid."==e.toLowerCase()?{title:this.labels.warnings.wrongDni,description:this.labels.warnings.wrongDniDesc}:"Incorrect support number"==e.toLowerCase()?{title:this.labels.warnings.error,code:"sop",description:this.labels.warnings.wrongSupport}:"incorrect date"==e.toLowerCase()?this.isDni?{title:this.labels.warnings.wrongDate,code:"venc",description:this.labels.warnings.wrongDateDesc}:{title:this.labels.warnings.wrongDate,code:"nac",description:this.labels.warnings.wrongDateDesc}:{title:"Error!",description:e}}gotoTerms(e){e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.loading=this.labels.loadings.sendingData,this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("waiting_otp_seguridad_social"),this.loading=null}),4e3):this.skipCreationOfRequest?(this.acceptTerms(),this.setSubscriptionOfRequest()):this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.solicitud=e,400==t.code&&"Does not have Pin service"==t.message?(t.data&&(this.requestID=t.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null}))):400==t.code&&"Incorrect support number"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert("Error!",t.message))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.setRequestStatus(this.solicitud.status_code),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:t.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert(this.labels.warnings.error,e.errorMessage)}))}acceptTerms(e=!0){let t={user_id:this.userId,request_id:this.requestID,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingData),this.pinService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message&&"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.setSubscriptionOfRequest(),this.setRequestStatus(e.data&&e.data.next_step_detail&&e.data.next_step_detail.portal&&"Seguridad Social"===e.data.next_step_detail.portal?"waiting_otp_seguridad_social":e.data&&e.data.next_step_detail&&e.data.next_step_detail.portal&&"AEAT"===e.data.next_step_detail.portal?"waiting_otp_aeat":e.data&&e.data.next_step_detail&&e.data.next_step_detail[0]&&e.data.next_step_detail[0].portal&&"Seguridad Social"===e.data.next_step_detail[0].portal?"waiting_otp_seguridad_social":e.data&&e.data.next_step_detail&&e.data.next_step_detail[0]&&e.data.next_step_detail[0].portal&&"AEAT"===e.data.next_step_detail[0].portal?"waiting_otp_aeat":e.data.status_code),this.loading=null,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando información..",this.pinService.sendOTP({user_id:this.userId,request_id:this.requestID,code:e.code}).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.labels.warnings.error,this.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=null):e&&"success"==e.status?(this.handleRequestStatus(e.data||e),this.cd.markForCheck()):this.loading=null})).catch((e=>{this.showAlert("Error!",e&&e.error?e.error:e),this.loading=null}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,t.status_code="consent_process_completed",this.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.solicitud&&this.solicitud.widget_url?this.solicitud.widget_url:this.widgetUrl||"",status_code:"consent_process_completed",user_id:this.solicitud&&this.solicitud.user_id?this.solicitud.user_id:this.userId||"",funder_id:this.solicitud&&this.solicitud.funder_id?this.solicitud.funder_id:"",request_id:this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID||"",widget_url_boxed:this.solicitud&&this.solicitud.widget_url_boxed?this.solicitud.widget_url_boxed:this.widgetUrlBoxed||""}}),this.solicitud=t,setTimeout((()=>{this.disconnectWebsocket()}),3e3),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status||e.next_step_detail?e.otp_status&&"VALID"===e.otp_status?Array.isArray(e.next_step_detail)?t.status_code="Seguridad Social"===e.next_step_detail[0].portal?"waiting_otp_seguridad_social":"AEAT"===e.next_step_detail[0].portal?"waiting_otp_aeat":e.status_code:Array.isArray(e.next_step_detail)||(t.status_code="Seguridad Social"===e.next_step_detail.portal?"waiting_otp_seguridad_social":"AEAT"===e.next_step_detail.portal?"waiting_otp_aeat":e.status_code):e.otp_status&&"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)),this.sendMessageToParent({type:"response",data:e})),this.solicitud=t,this.setRequestStatus(this.solicitud.status_code),this.loading=null}askToBack(){this.pinService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code),this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.pinService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}retryRequest(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingRequest,this.setSubscriptionOfRequest(),this.pinService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.setRequestStatus("created")}disconnectWebsocket(){this.socket&&this.socket.close()}initIntervalToAskBack(){!this.solicitud||!this.solicitud.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.solicitud.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){let t=JSON.parse(JSON.stringify(this.solicitud.status_code));e||this.requestID?this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1})):this.stopInterval()}setStatus(){if(this.showCancelRequest=!0,this.solicitud){if(this.solicitud){let e=h[this.solicitud.status_code];e&&("success"===e&&this.funderConfig&&this.funderConfig.infiniteLoopInCompleted&&(this.loading=" "),("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),this.requestStatus=e)}}else this.requestStatus="form";this.cd.markForCheck()}sendRetry(){}setCancel(e){this.setRequestStatus(e)}gotoTermsAndConditions(){this.dialog.open(p.L,{panelClass:"fullscreen-dialog",data:{flow:this.flowName,allData:this.data,lang:this.currentLang}}).afterClosed().subscribe((e=>{e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}))}pictureTaken(e){this.picturesTaken.push(e._imageAsDataUrl)}getIfShowLogo(){return("loading"!=this.requestStatus&&"success"!=this.requestStatus&&!this.loading||!this.funderConfig?.infiniteLoopInCompleted)&&this.funderStyles?.withLogo}};rt.ɵfac=function(e){return new(e||rt)(f.ɵɵdirectiveInject(f.ChangeDetectorRef),f.ɵɵdirectiveInject(g.gz),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(v.v),f.ɵɵdirectiveInject(y.T),f.ɵɵdirectiveInject(b.t),f.ɵɵdirectiveInject(x.s),f.ɵɵdirectiveInject(w.r),f.ɵɵdirectiveInject(C.H),f.ɵɵdirectiveInject(S.w),f.ɵɵdirectiveInject(M.uw),f.ɵɵdirectiveInject(I.D))},rt.ɵcmp=f.ɵɵdefineComponent({type:rt,selectors:[["belender-widget-pin"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(Le,5),f.ɵɵviewQuery(Ae,5),f.ɵɵviewQuery(Le,5)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.formComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.otpComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[f.ɵɵProvidersFeature([{provide:s.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[["id","widget-wrapper","class","h-full widget-belender",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[4,"ngIf"],["id","widget-wrapper",1,"h-full","widget-belender"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],[3,"logoUrl",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[3,"logoUrl"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"userId","flowName","lang","requestIDFromURL","texts","data","labels","solicitud","goToTerms","nextStep","isDni",4,"ngIf"],[3,"otpType","flowType","data","labels","solicitud","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"data","labels","solicitud","texts","retryRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","solicitud","retryRequest",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"flowType","request_id","labels","user_id","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[3,"userId","flowName","lang","requestIDFromURL","texts","data","labels","solicitud","goToTerms","nextStep","isDni"],["formStep",""],[3,"otpType","flowType","data","labels","solicitud","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","flowName","packId","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","texts","nextStep"],[3,"data","labels","solicitud","texts","retryRequest","newRequest"],[3,"data","labels","texts","solicitud","retryRequest"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[3,"flowType","request_id","labels","user_id","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(f.ɵɵtemplate(0,tt,8,11,"div",0),f.ɵɵtemplate(1,nt,4,1,"div",1),f.ɵɵtemplate(2,it,3,1,"ng-container",2)),2&e&&(f.ɵɵproperty("ngIf",t.data&&t.data.styles&&t.data.styles.colors&&!t.loading),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",(t.loading||"loading"===t.requestStatus)&&!t.error),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.testMode))},dependencies:[k.O5,E.q,T.X,P.y,O.i,D.Hw,L.lW,A.Ou,z,$,Ce,Se,Me,ke,Ee,Te,Pe,De,q.z],styles:[".widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.card[_ngcontent-%COMP%]{transition:all .2s ease;overflow:hidden;width:500px;max-width:100%;margin:0 auto}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}.webcam-wrapper[_ngcontent-%COMP%]{position:relative}.webcam-overlay[_ngcontent-%COMP%]{position:absolute;z-index:99;width:500px;top:0;left:0;width:100%;height:100%;justify-content:center}.webcam-overlay[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background:url(/assets/img/exclude.png);width:100%;height:100%;background-repeat:no-repeat;background-size:cover;opacity:.7;max-width:500px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;background:#fff}"],data:{animation:[d.$]}}),rt=(0,r.gn)([(0,o.c)()],rt)},1916:(e,t,n)=>{n.r(t),n.d(t,{PinModule:()=>O});var i=n(6895),r=n(6383),s=n(5592),o=n(4006),a=n(3798),l=n(9391),c=n(182),d=n(7367),u=n(3238),h=n(5895),p=n(4246),m=n(9299),f=n(6e3),g=n(920),_=n(4650);const v=[{path:":idUser",component:g.n},{path:":idUser/:packID",component:g.n}];let y=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=_.ɵɵdefineNgModule({type:e}),e.ɵinj=_.ɵɵdefineInjector({imports:[m.Bz.forChild(v),m.Bz,f.d8]}),e})();var b=n(7489),x=n(6981),w=n(1129),C=n(9476),S=n(3295),M=n(1145),I=n(3300),k=n(7795),E=n(865),T=n(3033),P=n(5028);let O=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=_.ɵɵdefineNgModule({type:e}),e.ɵinj=_.ɵɵdefineInjector({providers:[b.v,l.o,d.w,c.t,h.T,p.t,{provide:u.Ad,useValue:"es-ES"}],imports:[y,i.ez,r.G,s.J,o.FormsModule,o.ReactiveFormsModule,a.a,x.x,w.n,C.F,S.g,M.j,I.C,k.QA,E.q,T.d,P.q]}),e})()},8364:(e,t,n)=>{n.d(t,{T:()=>Ft});var i=n(5861),r=n(7582),s=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667);const u={created:"form",form:"form",terms_and_conditions:"form",waiting_otp_seguridad_social:"otp",waiting_login_seguridad_social:"otp",invalid_otp_seguridad_social:"otp",abandoned_after_bad_phone:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",waiting_documents:"success",failed_with_retry:"failed",failed_without_retry:"failed",failed_documents_downloaded:"failed",consent_process_canceled:"failed",no_service:"no-service",no_sms_service:"no-service",stand_by:"standby","no-phone":"no-phone",no_phone:"no-phone","no-more-phone":"no-phone",no_more_phone:"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var h=n(6830),p=n(1931),m=n(4650),f=n(9299),g=n(5089),_=n(5601),v=n(7367),y=n(8460),b=n(5895),x=n(5206),w=n(7489),C=n(9045),S=n(5412),M=n(7308),I=n(6895),k=n(7392),E=n(9101),T=n(1572),P=n(3364),O=n(1760),D=n(4302),L=n(9112),A=n(9382),N=n(4006),R=n(9391),j=n(3046),F=n(342),q=n(3731);function Y(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function V(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",6),m.ɵɵelement(1,"div",7)(2,"div",8),m.ɵɵpipe(3,"safeHtml"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",e.texts.success.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(3,8,e.texts.success.description||""),m.ɵɵsanitizeHtml)}}function H(e,t){if(1&e&&m.ɵɵelement(0,"widget-documents",9),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function z(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",10),m.ɵɵelement(1,"mat-progress-spinner",11),m.ɵɵelementStart(2,"p",12),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}function B(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",13)(1,"button",14),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.gotoRedirect())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let U=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.loading=null,this.showDocuments=!1}ngOnInit(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",requestID:"requestID",packId:"packId",userId:"userId",flowName:"flowName",labels:"labels"},decls:5,vars:5,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Y,1,2,"belender-widget-logo",0),m.ɵɵtemplate(1,V,4,10,"div",1),m.ɵɵtemplate(2,H,1,3,"widget-documents",2),m.ɵɵtemplate(3,z,4,2,"div",3),m.ɵɵtemplate(4,B,3,7,"div",4)),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.showDocuments),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[I.O5,E.lW,T.Ou,j.X,F.A,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var W=n(4144);function $(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",7),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.errorPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function G(e,t){if(1&e&&(m.ɵɵelementStart(0,"form",8)(1,"mat-form-field",9)(2,"mat-label"),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelement(4,"input",10),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("formGroup",e.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(e.labels.phone)}}function Z(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",11)(1,"button",12),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.no())})),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelementStart(3,"button",13),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.next())})),m.ɵɵtext(4),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.warnings.dontHavePhone," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",e.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.next," ")}}let K=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.cd=n,this.notifications=i,this.loading=null,this.noPhone=new m.EventEmitter(null),this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({phone:[null,[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]]})}next(){this.nextStep.emit(this.form.get("phone").value)}no(){this.noPhone.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-phone-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{noPhone:"noPhone",nextStep:"nextStep"},decls:9,vars:13,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","w-full",3,"formGroup",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["maxlength","9","formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"bg-red-500","text-red-50","px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"click"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,$,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelement(6,"br"),m.ɵɵtemplate(7,G,5,2,"form",5),m.ɵɵelementEnd(),m.ɵɵtemplate(8,Z,5,11,"div",6),m.ɵɵelementEnd()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.errorPhone.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,11,t.texts.errorPhone.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",!t.data.config.noRetryInBadPhone),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.data.config.noRetryInBadPhone))},dependencies:[I.O5,E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Q(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",3),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function X(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",9)(1,"button",10),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.retry())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.retry," ")}}function J(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",9)(1,"button",10),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.newRequest())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.labels.actions.newRequest)}}function ee(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",4)(1,"div",5),m.ɵɵelement(2,"div",6)(3,"div",7),m.ɵɵpipe(4,"safeHtml"),m.ɵɵelementEnd(),m.ɵɵtemplate(5,X,3,7,"div",8),m.ɵɵtemplate(6,J,3,7,"div",8),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵproperty("innerHTML",e.texts.fail.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(4,6,e.texts.fail.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.solicitud&&"failed_with_retry"==e.solicitud.status_code),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.solicitud&&"failed_documents_downloaded"==e.solicitud.status_code)}}function te(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",11),m.ɵɵelement(1,"mat-progress-spinner",12),m.ɵɵelementStart(2,"p",13),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}let ne=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.loading=null,this.retryOp=new m.EventEmitter(null),this.newReq=new m.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",labels:"labels"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class","animated fadeIn fixed-content",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Q,1,2,"belender-widget-logo",0),m.ɵɵtemplate(1,ee,7,8,"div",1),m.ɵɵtemplate(2,te,4,2,"div",2)),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading))},dependencies:[I.O5,E.lW,T.Ou,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ie=n(5439),re=n.n(ie),se=(n(6866),n(3238)),oe=n(3755),ae=n(3746),le=n(2932),ce=n(4246),de=n(1763),ue=n(7795),he=n(5696);const pe=["termsCheckbox"],me=["assignmentCheckbox"];function fe(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",22),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function ge(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}function _e(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," El formato debe ser DD/MM/AAAA "),m.ɵɵelementEnd())}function ve(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," Fecha inválida "),m.ɵɵelementEnd())}function ye(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," Debe ser mayor de 18 años "),m.ɵɵelementEnd())}const be=function(e){return{mask:e}};function xe(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"mat-form-field",23)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",24),m.ɵɵelementStart(4,"mat-hint")(5,"a",25),m.ɵɵlistener("click",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.gotoExpirationDate(t))})),m.ɵɵelementStart(6,"u"),m.ɵɵtext(7),m.ɵɵelementEnd()()()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.expiration),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(3,be,e.datemask)),m.ɵɵadvance(4),m.ɵɵtextInterpolate(e.labels.findExpiration)}}function we(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-form-field",23)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",26),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.support)}}function Ce(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",27)(1,"mat-form-field",6)(2,"mat-label"),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelement(4,"input",28),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.email),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1),m.ɵɵpropertyInterpolate("placeholder",e.labels.inputEmail)}}function Se(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",29)(1,"belender-checkbox",30,31),m.ɵɵlistener("changeCheckbox",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setTerms(t))})),m.ɵɵelementStart(3,"belender-terms-and-policy-links",32),m.ɵɵlistener("goToTerms",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.gotoTermsAndConditions(t))})),m.ɵɵelementEnd()()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("color",e.data.styles.colors.title),m.ɵɵadvance(2),m.ɵɵproperty("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function Me(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",33)(1,"belender-checkbox",34,35),m.ɵɵlistener("changeCheckbox",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setAssignment(t))})),m.ɵɵelement(3,"div",36),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("color",e.data.styles.colors.title),m.ɵɵadvance(2),m.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,m.ɵɵsanitizeHtml)}}function Ie(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",37),m.ɵɵelement(1,"mat-icon",38),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.labels.warnings.haveToReadTerms," ")}}function ke(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",39),m.ɵɵelement(1,"mat-icon",38),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}function Ee(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",40),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.goBack())})),m.ɵɵtext(1),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.back," ")}}function Te(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",41),m.ɵɵelement(1,"mat-progress-spinner",42),m.ɵɵelementStart(2,"p",43),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.loading," ")}}const Pe=function(e){return{"dont-show-data":e}},Oe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let De=(()=>{class e{constructor(e,t,n,i,r,s){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=r,this.customService=s,this.next=new m.EventEmitter(null),this.goTerms=new m.EventEmitter(null),this.goIntro=new m.EventEmitter(null),this.acceptTerms=!1,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.errorDNI=null,this.disabledInputs={document_number:!1,birth_date:!1,email:!1,phone:!1},this.noValidate=!1,this.testMode=!0,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],this.lang=""}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setForm(e){console.warn("setForm");let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.person_birth_date?re()(e.person_birth_date).format("DD/MM/YYYY"):null,i=e&&e.birth_date?re()(e.birth_date).format("DD/MM/YYYY"):n,r=e?e.person_phone||e.phone:null,s=e?e.person_email||e.email:null;t&&this.setRegex(t);const o=this;o.form=o.fb.group(o.data&&o.data.config&&o.data.config.followMail?{document_number:[t||null,o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[N.Validators.required,(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[r||"",o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]],email:[s||null,o.noValidate?[]:[N.Validators.required,N.Validators.email]],document_expiration:[null,[(0,le.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:{document_number:[t||null,o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[N.Validators.required,(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[r||"",o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]],email:[s||null],document_expiration:[null,[(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],support_number:[null]}),this.form.markAllAsTouched(),this.form.updateValueAndValidity(),o.requestIDFromURL&&o.disableEnableInputs(t,n,r,s)}forceEnableDisableInputs(e,t,n,i){this.disableEnableInputs(e?e.value:this.disabledInputs.document_number,t?t.value:this.disabledInputs.birth_date,n?n.value:this.disabledInputs.phone,i?i.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i){this.disabledInputs={document_number:e||!1,birth_date:t||!1,email:i||!1,phone:n||!1},console.warn("this.disabledInputs",this.disabledInputs)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:"Debes ingresar un DNI válido!"):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:"Debes ingresar un NIE válido!"):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI="Debes ingresar un DNI o NIE válido!"),this.cd.markForCheck()}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getIfValid(){return!!this.data.config.hideCheckLegal||this.acceptTerms}getFormsValid(){let e=!this.form.invalid,t=this.form.get("document_number").value;return t?this.setRegex(t):e=!1,!this.isDni&&!this.isNie&&(this.disabledInputs.document_number=!1,e=!1),this.errorDNI&&(e=!1),this.cd.markForCheck(),e}nextStep(){let e;e=this.data&&this.data.config&&this.data.config.followMail?{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,email_copy:this.form.get("email").value,check_legal:!0,document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"}:{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,check_legal:!0,email_copy:"roger.checa@belender.eu",document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"},this.next.emit(e)}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}goBack(){this.goIntro.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(oe.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ae.R,{panelClass:"fullscreen-dialog"})}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(ce.t),m.ɵɵdirectiveInject(S.uw),m.ɵɵdirectiveInject(v.w))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(pe,5),m.ɵɵviewQuery(me,5)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.checkComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",pinMode:"pinMode",requestIDFromURL:"requestIDFromURL",labels:"labels",lang:"lang"},outputs:{next:"nextStep",goTerms:"goToTerms",goIntro:"goIntro"},features:[m.ɵɵProvidersFeature([{provide:se.sG,useValue:{parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}])],decls:36,vars:62,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["placeholder","Ej: 12312345R","formControlName","document_number","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["type","text","placeholder","Ej: 22/03/1990","formControlName","birth_date","matInput","",3,"tabindex","textMask"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["class","w-full",4,"ngIf"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 flex w-fit items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","gap-2","p-4","flex-col","md:flex-row",3,"ngClass"],["class","px-8 py-1 bg-slate-100 hover:bg-slate-200 text-slate-900 w-full max-w-none md:max-w-[220px]","mat-flat-button","","type","button",3,"border-radius","click",4,"ngIf"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration","matInput","",3,"textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["type","text","placeholder","22211134","required","","formControlName","support_number","matInput",""],[1,"w-full"],["formControlName","email","type","email","matInput","",3,"tabindex","placeholder"],[1,"flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","flex","w-fit","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["mat-flat-button","","type","button",1,"px-8","py-1","bg-slate-100","hover:bg-slate-200","text-slate-900","w-full","max-w-none","md:max-w-[220px]",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){if(1&e&&(m.ɵɵtemplate(0,fe,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",7),m.ɵɵtemplate(11,ge,2,1,"mat-error",8),m.ɵɵelementEnd(),m.ɵɵelementStart(12,"mat-form-field",6)(13,"mat-label"),m.ɵɵtext(14),m.ɵɵelementEnd(),m.ɵɵelement(15,"input",9),m.ɵɵtemplate(16,_e,2,0,"mat-error",8),m.ɵɵtemplate(17,ve,2,0,"mat-error",8),m.ɵɵtemplate(18,ye,2,0,"mat-error",8),m.ɵɵelementEnd(),m.ɵɵtemplate(19,xe,8,5,"mat-form-field",10),m.ɵɵtemplate(20,we,4,1,"mat-form-field",10),m.ɵɵelementStart(21,"mat-form-field",6)(22,"mat-label"),m.ɵɵtext(23),m.ɵɵelementEnd(),m.ɵɵelement(24,"input",11),m.ɵɵelementEnd(),m.ɵɵtemplate(25,Ce,5,6,"div",12),m.ɵɵelementEnd(),m.ɵɵelementStart(26,"div",13),m.ɵɵtemplate(27,Se,4,12,"div",14),m.ɵɵtemplate(28,Me,4,2,"div",15),m.ɵɵtemplate(29,Ie,3,1,"div",16),m.ɵɵtemplate(30,ke,3,1,"div",17),m.ɵɵelementEnd(),m.ɵɵelementStart(31,"div",18),m.ɵɵtemplate(32,Ee,2,3,"button",19),m.ɵɵelementStart(33,"button",20),m.ɵɵlistener("click",(function(){return t.nextStep()})),m.ɵɵtext(34),m.ɵɵelementEnd()()(),m.ɵɵtemplate(35,Te,4,2,"div",21)),2&e){let e,n,i;m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("animated ",t.loading?"hide-content":""," fadeIn fixed-content px-2"),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.form.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,52,t.texts.form.description||""),m.ɵɵsanitizeHtml),m.ɵɵadvance(2),m.ɵɵproperty("ngClass",m.ɵɵpureFunction1(54,Pe,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.document_number?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.document_number?-1:1),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.errorDNI),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.birth_date?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.labels.birthday),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.birth_date?-1:1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(56,be,t.datemask)),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(e=t.form.get("expired_date"))?null:e.hasError("invalidFormat")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(n=t.form.get("birth_date"))?null:n.hasError("invalidDate")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(i=t.form.get("birth_date"))?null:i.hasError("underAge")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.pinMode&&!t.isNie),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.pinMode&&t.isNie),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.labels.phone),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.phone?-1:1),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data.config.forceChecks&&!t.termsReaded),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.errorDNI),m.ɵɵadvance(1),m.ɵɵproperty("ngClass",m.ɵɵpureFunction3(58,Oe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data.config.introEnabled),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",!t.getFormsValid()||!t.getAssignmentValidation()||!t.getIfValid()),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.continue," "),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading)}},dependencies:[I.mk,I.O5,k.Hw,E.lW,s.TO,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,T.Ou,de.b,ue.hd,j.X,he.T,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hide-content[_ngcontent-%COMP%]{opacity:0!important;max-height:0px!important;overflow:hidden!important;padding:0!important}"]}),e})(),Le=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new m.EventEmitter(null),this.loading=null,this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",N.Validators.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(f.gz))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud",loading:"loading",labels:"labels"},outputs:{next:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"form",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd()(),m.ɵɵelementStart(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementEnd()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.nextStep()})),m.ɵɵtext(13),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.warnings.phoneError),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.warnings.badPhoneSS),m.ɵɵadvance(4),m.ɵɵtextInterpolate(t.labels.phone),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.actions.continue))},dependencies:[E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.FormGroupDirective,N.FormControlName],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ae(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ne=(()=>{class e{constructor(){this.loading=null}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Ae,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.noService.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,9,t.texts.noService.description),m.ɵɵsanitizeHtml))},dependencies:[I.O5,N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Re(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",8),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let je=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new m.EventEmitter(null),this.loading=null}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",labels:"labels",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:11,vars:19,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Re,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementStart(6,"div",5),m.ɵɵtext(7),m.ɵɵelementEnd()(),m.ɵɵelementStart(8,"div",6)(9,"button",7),m.ɵɵlistener("click",(function(){return t.retry()})),m.ɵɵtext(10),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.abandoned.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,17,t.texts.abandoned.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.actions.retry))},dependencies:[I.O5,E.lW,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Fe=n(5145);function qe(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",10),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ye=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.nr=new m.EventEmitter(null),this.loading=null}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=Fe.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:this.labels.unknownState}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",loading:"loading",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:16,vars:21,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,qe,1,1,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2)(3,"div",3),m.ɵɵtext(4),m.ɵɵelementEnd(),m.ɵɵelementStart(5,"div",4),m.ɵɵtext(6),m.ɵɵelementEnd(),m.ɵɵelementStart(7,"div",5),m.ɵɵtext(8),m.ɵɵelementStart(9,"div",6),m.ɵɵtext(10),m.ɵɵelementEnd()()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.newRequest()})),m.ɵɵtext(13),m.ɵɵelementEnd(),m.ɵɵelementStart(14,"button",9),m.ɵɵlistener("click",(function(){return t.gotoRequest()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.duplicatedRequest," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.alreadyHaveRequest," "),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",t.labels.warnings.currentRequestStatus," "),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",t.getStatus()," "),m.ɵɵadvance(2),m.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.newRequest," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[I.O5,E.lW,j.X],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ve(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.standby.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let He=(()=>{class e{constructor(){this.loading=null}ngOnInit(){console.error(this.data,this.texts)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Ve,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),m.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.description:m.ɵɵpipeBind1(5,9,"Descripcion del estado Stand By"),m.ɵɵsanitizeHtml))},dependencies:[I.O5,N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,j.X,q.z]}),e})();const ze=function(e){return{mask:e}};let Be=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null),this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.form=this.fb.group({birth_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:21,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","birth_date","matInput","",3,"textMask"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementStart(11,"mat-hint"),m.ɵɵtext(12,"DD/MM/YYYY"),m.ɵɵelementEnd()()()(),m.ɵɵelementStart(13,"div",7)(14,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongBirthday," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputBirthDay," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.birthday),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(19,ze,t.datemask)),m.ɵɵadvance(4),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.send," "))},dependencies:[E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,ue.hd],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ue=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementEnd()()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(13),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongSupport," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputSupport," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.support),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.send," "))},dependencies:[E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NumberValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),We=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementStart(11,"mat-hint"),m.ɵɵtext(12,"DD/MM/YYYY"),m.ɵɵelementEnd()()()(),m.ɵɵelementStart(13,"div",7)(14,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongExpiration," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputExpiration," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.expiration),m.ɵɵadvance(5),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.send))},dependencies:[E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function $e(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.noPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ge=function(e){return{mask:e}};function Ze(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"mat-form-field",12)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",13),m.ɵɵelementStart(4,"mat-hint")(5,"a",14),m.ɵɵlistener("click",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(2);return m.ɵɵresetView(n.gotoExpirationDate(t))})),m.ɵɵelementStart(6,"u"),m.ɵɵtext(7),m.ɵɵelementEnd()()()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.expiration),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(3,Ge,e.datemask)),m.ɵɵadvance(4),m.ɵɵtextInterpolate(e.labels.findExpiration)}}function Ke(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-form-field",15)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",16),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.support)}}function Qe(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",6),m.ɵɵelement(1,"div",7)(2,"div",8),m.ɵɵpipe(3,"safeHtml"),m.ɵɵelement(4,"br"),m.ɵɵelementStart(5,"form",9),m.ɵɵtemplate(6,Ze,8,5,"mat-form-field",10),m.ɵɵtemplate(7,Ke,4,1,"mat-form-field",11),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",null==e.texts.noPhone?null:e.texts.noPhone.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(3,11,e.texts.noPhone.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵproperty("formGroup",e.form),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.isDni),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.isNie)}}function Xe(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",17)(1,"button",18),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.next())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",e.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.next," ")}}function Je(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",19),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.loadings.gettingData," ")}}let et=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.cd=n,this.dialog=i,this.loading=null,this.solicitud=null,this.answered=!1,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],this.nextStep=new m.EventEmitter(null),this.isNie=!1,this.isDni=!1}ngOnInit(){console.warn(this.solicitud),this.loading=!0,this.checkIfDniOrNie(),this.isDni&&(this.form=this.fb.group({document_expiration_date:[null,N.Validators.required]})),this.isNie&&(this.form=this.fb.group({document_support:[null,N.Validators.required]})),this.loading=!1}checkIfDniOrNie(){this.setRegex(this.solicitud.person_document_number)}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),this.cd.markForCheck())}next(){let e={};this.isDni?e.document_expiration_date=this.utils.formatDate(this.form.get("document_expiration_date").value):this.isNie&&(e.document_support=this.form.get("document_support").value),this.nextStep.emit(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(oe.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ae.R,{panelClass:"fullscreen-dialog"})}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(S.uw))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-no-phone-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud",labels:"labels"},outputs:{nextStep:"nextStep"},decls:5,vars:4,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],["class","py-4 flex flex-col",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],["class","w-full flex justify-center p-4 items-center",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"w-full",3,"formGroup"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["appearance","outline","class","mb-4 w-full md:max-w-[500px]",4,"ngIf"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/2030","formControlName","document_expiration_date","matInput","",3,"textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["formControlName","document_support","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full","flex","justify-center","p-4","items-center"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,$e,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1),m.ɵɵtemplate(2,Qe,8,13,"div",2),m.ɵɵtemplate(3,Xe,3,8,"div",3),m.ɵɵtemplate(4,Je,2,1,"div",4),m.ɵɵelementEnd()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",(t.isDni||t.isNie)&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",(t.isDni||t.isNie)&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.isDni&&!t.isNie||t.loading))},dependencies:[I.O5,E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.FormGroupDirective,N.FormControlName,ue.hd,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var tt=n(4385);const nt=["formStep"];function it(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-option",8),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=t.$implicit;m.ɵɵpropertyInterpolate("value",e),m.ɵɵadvance(1),m.ɵɵtextInterpolate(e)}}function rt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementContainerStart(0),m.ɵɵelementStart(1,"mat-form-field",5)(2,"mat-label"),m.ɵɵtext(3,"Estado"),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"mat-select",6),m.ɵɵlistener("selectionChange",(function(t){const n=m.ɵɵrestoreView(e).index,i=m.ɵɵnextContext();return m.ɵɵresetView(i.setItemSelected(t,n))})),m.ɵɵtemplate(5,it,2,2,"mat-option",7),m.ɵɵelementEnd()(),m.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit,n=t.index,i=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1(" w-full ",n===i.triggerObject.index-1?"!border-t-2 border-green-500 ":"",""),m.ɵɵadvance(3),m.ɵɵproperty("value",e),m.ɵɵadvance(1),m.ɵɵproperty("ngForOf",i.items)}}function st(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTrigger())})),m.ɵɵtext(1,"Empezar"),m.ɵɵelementEnd()}}function ot(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTrigger())})),m.ɵɵtext(1,"Continuar"),m.ɵɵelementEnd()}}function at(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTriggerFromZero())})),m.ɵɵtext(1,"Volver a empezar"),m.ɵɵelementEnd()}}let lt=class{constructor(e,t){this.cd=e,this.utils=t,this.sendMessage=new m.EventEmitter,this.requestedToPin=!1,this.items=["created","form","terms_and_conditions","waiting_otp_seguridad_social","waiting_login_seguridad_social","invalid_otp_seguridad_social","abandoned_after_bad_phone","abandoned_after_invalid_otp_seguridad_social","abandoned_after_terms_and_conditions","abandoned_after_waiting_otp_seguridad_social","all_documents_downloaded","partial_documents_downloaded","consent_process_completed","partial_documents_downloaded_and_deleted","all_documents_downloaded_and_deleted","failed_with_retry","failed_without_retry","failed_documents_downloaded","no_service","no_sms_service","stand_by","no-phone","no-more-phone","bad_phone","error_expiration_date","error_birth_date","error_support_number","duplicated"],this.triggerObject={index:0,items:["form","waiting_otp_seguridad_social","all_documents_downloaded"]}}ngOnInit(){}setItemSelected(e,t){console.warn(e,t),this.triggerObject.items[t]=e.value,console.warn(this.triggerObject)}initTrigger(){this.emitMessage(this.triggerObject.items[this.triggerObject.index]),this.triggerObject.index++}initTriggerFromZero(){this.triggerObject.index=0,this.initTrigger()}emitMessage(e){let t={status_code:e};console.log(t),this.sendMessage.emit(t)}closeInterval(){this.int&&clearInterval(this.int),this.triggerObject.index=0}addState(){this.triggerObject.items.push("")}};lt.ɵfac=function(e){return new(e||lt)(m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(g.F))},lt.ɵcmp=m.ɵɵdefineComponent({type:lt,selectors:[["belender-tester-sms"]],viewQuery:function(e,t){if(1&e&&m.ɵɵviewQuery(nt,5),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.theDiv=e.first)}},outputs:{sendMessage:"sendMessage"},decls:9,vars:4,consts:[[1,"wrapper","flex","flex-col","justify-between","bg-slate-100","w-[200px]","h-full","p-2","gap-0"],[1,"flex","flex-col","h-full","dd-wrapper"],[4,"ngFor","ngForOf"],["mat-button","",1,"w-full","rounded-md",3,"click"],["mat-raised-button","","class","w-full rounded-md bg-blue-500 text-blue-50",3,"click",4,"ngIf"],["appearance","outline"],[1,"border",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","",1,"w-full","rounded-md","bg-blue-500","text-blue-50",3,"click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1),m.ɵɵtemplate(2,rt,6,5,"ng-container",2),m.ɵɵelementStart(3,"button",3),m.ɵɵlistener("click",(function(){return t.addState()})),m.ɵɵtext(4,"Agregar estado"),m.ɵɵelementEnd()(),m.ɵɵelementStart(5,"div"),m.ɵɵtemplate(6,st,2,0,"button",4),m.ɵɵtemplate(7,ot,2,0,"button",4),m.ɵɵtemplate(8,at,2,0,"button",4),m.ɵɵelementEnd()()),2&e&&(m.ɵɵadvance(2),m.ɵɵproperty("ngForOf",t.triggerObject.items),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",!t.triggerObject.index||0==t.triggerObject.index),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.triggerObject.index&&t.triggerObject.index<t.triggerObject.items.length),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.triggerObject.index&&t.triggerObject.index>=t.triggerObject.items.length))},dependencies:[I.sg,I.O5,E.lW,s.KE,s.hX,tt.gD,se.ey],styles:[".wrapper[_ngcontent-%COMP%]{position:fixed;top:0;right:0;box-shadow:-10px 20px 30px #0000004d;z-index:99!important;max-height:100vh}.dd-wrapper[_ngcontent-%COMP%]{max-height:calc(100vh - 70px)!important;overflow:auto}"],data:{animation:[d.$]}}),lt=(0,r.gn)([(0,o.c)()],lt);const ct=["formStep"],dt=["otpStep"];function ut(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",7),m.ɵɵelement(1,"mat-icon",8),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵproperty("@fadeInUp",void 0),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.warningAlert," ")}}function ht(e,t){1&e&&(m.ɵɵelementStart(0,"div",9),m.ɵɵelement(1,"mat-progress-spinner",10),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵproperty("value",0))}function pt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-intro-step",25),m.ɵɵlistener("gotoFlow",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.goFlow())}))("gotoManual",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoManual())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("flowName",e.flowName)}}function mt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-manual-step",26),m.ɵɵlistener("dniChange",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.createRequestFromDNI(t))}))("goBack",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoIntro())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("flowName",e.flowName)("solicitud",e.solicitud)("packId",e.packId)("userId",e.userId)}}function ft(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-form-step",27,28),m.ɵɵlistener("goIntro",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.goIntro())}))("goToTerms",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoTermsAndConditions())}))("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.gotoTerms(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("requestIDFromURL",e.requestIDFromURL)("lang",e.currentLang)("userId",e.userId)("flowName",e.flowName)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)("pinMode",e.pinMode)}}function gt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-form-step",29),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.sendNewData(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function _t(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-birthday-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setBirthDate(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function vt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-expiration-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setExpiration(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function yt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-support-number-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setSupportNumber(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function bt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-abandoned-step",31),m.ɵɵlistener("retry",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.retryRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function xt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-shared-otp-step",32,33),m.ɵɵlistener("resendOTP",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.requestOTP(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("otpType","otpSS")("labels",e.labels)("logoCustom",e.data[e.flowName].texts.otpSS.customImage)("flowType",e.flowName)("data",e.data)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)("minLength",6)}}function wt(e,t){if(1&e&&m.ɵɵelement(0,"belender-success-step",34),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("packId",e.packId)("flowName",e.flowName)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function Ct(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-duplicated-request-step",35),m.ɵɵlistener("newRequest",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.newRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function St(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-no-phone-step",29),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.sendDataToPin(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Mt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-phone-step",36),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setPhone(t))}))("noPhone",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.setNoPhone())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function It(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-fail-step",37),m.ɵɵlistener("retry",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.newRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)}}function kt(e,t){if(1&e&&m.ɵɵelement(0,"belender-no-service-step",38),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function Et(e,t){if(1&e&&m.ɵɵelement(0,"belender-standby-step",38),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function Tt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-cancel-request",39),m.ɵɵlistener("updateStatusCode",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setCancel(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("flowType",e.flowName)("request_id",e.requestID)("user_id",e.userId)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function Pt(e,t){if(1&e&&(m.ɵɵelement(0,"div",40),m.ɵɵpipe(1,"safeHtml")),2&e){const e=m.ɵɵnextContext(3);m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""),m.ɵɵsanitizeHtml)}}function Ot(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtemplate(1,pt,1,2,"belender-intro-step",11),m.ɵɵtemplate(2,mt,1,5,"belender-manual-step",12),m.ɵɵtemplate(3,ft,2,9,"belender-form-step",13),m.ɵɵtemplate(4,gt,1,4,"belender-error-form-step",14),m.ɵɵtemplate(5,_t,1,3,"belender-error-birthday-step",15),m.ɵɵtemplate(6,vt,1,3,"belender-error-expiration-step",15),m.ɵɵtemplate(7,yt,1,3,"belender-error-support-number-step",15),m.ɵɵtemplate(8,bt,1,4,"belender-abandoned-step",16),m.ɵɵtemplate(9,xt,2,8,"belender-shared-otp-step",17),m.ɵɵtemplate(10,wt,1,7,"belender-success-step",18),m.ɵɵtemplate(11,Ct,1,3,"belender-duplicated-request-step",19),m.ɵɵtemplate(12,St,1,4,"belender-no-phone-step",14),m.ɵɵtemplate(13,Mt,1,3,"belender-error-phone-step",20),m.ɵɵtemplate(14,It,1,4,"belender-fail-step",21),m.ɵɵtemplate(15,kt,1,3,"belender-no-service-step",22),m.ɵɵtemplate(16,Et,1,3,"belender-standby-step",22),m.ɵɵtemplate(17,Tt,1,6,"belender-cancel-request",23),m.ɵɵtemplate(18,Pt,2,5,"div",24),m.ɵɵelementContainerEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵproperty("ngIf","intro"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","manual"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.settingRequestFromBack),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-data"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-birth-date"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-expiration-date"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-support-number"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","abandoned"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","otp"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","success"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","duplicated"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","no-phone"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","bad-phone"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","failed"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","no-service"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","standby"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.showCancelRequest&&e.data.config.cancelRequest&&e.requestIDFromURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.loading&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription)&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription)}}function Dt(e,t){1&e&&m.ɵɵelement(0,"belender-disabled-url")}function Lt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div")(1,"div",41)(2,"div",42),m.ɵɵtext(3,"Error!"),m.ɵɵelementEnd(),m.ɵɵelement(4,"div",43),m.ɵɵelementEnd(),m.ɵɵelementStart(5,"div",44)(6,"button",45),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.error=!1)})),m.ɵɵtext(7,"Ingresar manualmente"),m.ɵɵelementEnd()()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",e.error,m.ɵɵsanitizeHtml)}}function At(e,t){if(1&e&&(m.ɵɵelementStart(0,"div"),m.ɵɵtemplate(1,ut,3,2,"div",5),m.ɵɵtemplate(2,ht,2,1,"div",6),m.ɵɵtemplate(3,Ot,19,18,"ng-container",3),m.ɵɵtemplate(4,Dt,1,0,"belender-disabled-url",3),m.ɵɵtemplate(5,Lt,8,3,"div",3),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),m.ɵɵstyleProp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.warningAlert&&"success"!=e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.error&&!e.disableURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.error&&e.disableURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.loading&&e.error&&"loading"!=e.requestStatus)}}function Nt(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",46),m.ɵɵelement(1,"mat-progress-spinner",47),m.ɵɵelementStart(2,"p",48),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}function Rt(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵelementStart(1,"div",49),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelementContainerEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1("TestMode ",e.testMode?"ON":"OFF","")}}function jt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-tester-sms",50),m.ɵɵlistener("sendMessage",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setMessageFromTest(t))})),m.ɵɵelementEnd()}}let Ft=class{constructor(e,t,n,i,r,s,o,a,l,d,u,h){if(this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.flowsS=a,this.pinService=l,this.deviceInfoService=d,this.dialog=u,this.translationService=h,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.introEnabled=!1,this.manual=!1,this.pinMode=!1,this.requestIDFromURL=!1,this.warningAlert=null,this.stopPropagationOfSuccess=!1,this.paramsSetted=!1,this.requestStatus="loading",this.disableURL=!1,this.settingRequestFromBack=!1,this.showCancelRequest=!1,this.requestedFromDetail=!1,this.env=c.N,this.intervalToAskBack=null,this.loadingRequestData=!1,this.intervalCount=0,this.requestedToPin=!1,this.currentHeight=0,this.socketOpened=!0,this.isScaled=!1,this.termsOpened=!1,this.flowName="SMS",this.labels=p.S.es,this.currentLang="","OTPCredential"in window){const e=new AbortController;navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then((e=>{this.showAlert("otp",e)})).catch((e=>{console.log(e)}))}this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.getWindowsScreenOrientation(),this.setWarningPortals();const e=this;this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.labels.loadings.gettingData,e.userId?e.setInitialData(e.userId):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}testAlert(e){this.showAlert("Error de prueba","Esta es una prueba de un error",e)}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}getWindowsScreenOrientation(){window.screen&&window.screen.orientation&&(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler))}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.sendMessageToParent({type:"widgetHeight",data:e})}setWarningPortals(){this.flowsS.getFlows().then((e=>{e&&e.data&&e.data.length&&"OCCASIONAL_FAIL"==e.data.find((e=>e.name==this.flowName)).status&&!this.warningAlert&&(this.warningAlert=this.labels.warnings.ocassionalError)})).catch((e=>{console.error(e)}))}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,i.Z)((function*(){const n=yield t.getFlow(e),i=t.customizationStoreService.FUNDER_CONFIG;if(t.funderStyles=t.customizationStoreService.FUNDER_STYLES,console.warn(t.funderStyles),t.data={config:i,styles:t.funderStyles,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.introEnabled=t.data.config.introEnabled,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}getConfig(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderConfig(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.loading=!1}))}))}))()}getStyle(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderStyles(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.loading=!1}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&(this.setParamsToRequest(e),this.loading=!1),e&&e.acceptTerms&&(this.paramsSetted=!0,this.autoAcceptTerms=!0),e.success&&(this.stopPropagationOfSuccess=!0,this.paramsSetted=!0),e&&e.request_id?(this.requestID=e.request_id,this.disableURL=!1,this.setFormFromVcCode(e.request_id,e),this.requestIDFromURL=!0,this.paramsSetted=!0):this.loading=!1}),(e=>{this.loading=!1}))}setParamsToRequest(e){this.solicitud||this.setRequestStatus("form"),(e.document_number||e.document)&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0,this.paramsSetted=!0),(e.birth_date||e.birthday)&&!this.solicitud.person_birth_date&&(this.solicitud.person_birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0,this.paramsSetted=!0),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone,this.requestIDFromURL=!0,this.paramsSetted=!0),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0)}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){n.loading=n.labels.loadings.gettingData,n.settingRequestFromBack=!0,n.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.solicitud=e.data,n.setStatus(),n.setSubscriptionOfRequest(),n.loading=!1,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.loading=null,n.settingRequestFromBack=!1})).catch((e=>{n.loading=null,n.settingRequestFromBack=!1}))}))()}setMessageFromTest(e){this.handlePusherNotification(e)}handlePusherNotification(e){this.dataFromFirebase=e,e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&("consent_process_completed"===this.dataFromFirebase.status_code&&this.disconnectWebsocket(),this.setRequestStatus(JSON.parse(JSON.stringify(this.dataFromFirebase.status_code))),"terms_and_conditions"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingOtp,this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setStatus()),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading=this.labels.loadings.sendingData,e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("waiting_otp_seguridad_social"),this.loading=!1}),4e3):this.skipCreationOfRequest?(this.acceptTerms(),this.setSubscriptionOfRequest()):this.checkSmsService(e)}checkSmsService(e){this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.solicitudesService.checkService(e).then((t=>{t&&t.message&&t.status&&"error"==t.status?t.message.birth_date?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&" fecha de nacimiento incorrecta"==t.message.toLowerCase()?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&"does not have sms service"==t.message.toLowerCase()?(this.loading=this.labels.loadings.creatingRequest,e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.solicitudesService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.solicitudesService.setNoService({request_id:this.requestID}).then((()=>{this.loading=null})),this.setRequestStatus("no_service"),this.setStatus()}))):"string"==typeof t.message&&"birthdate incorrect"==t.message.toLowerCase()?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):(this.setRequestStatus("form"),this.setStatus(),this.loading=null):t&&t.status&&"success"==t.status?this.addSolicitudSMS(e):(this.loading=null,this.setRequestStatus("form"),this.setStatus(),this.notis.showAlert("Error:",t.message||t))})).catch((e=>{console.error(e),this.loading=null,e.message&&"birthdate incorrect"==e.message.toLowerCase()&&(this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc))}))}addSolicitudPIN(e){this.data[this.flowName]&&this.data[this.flowName].packID&&(e.package_id=this.data[this.flowName].packID),this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.solicitud=e,400==t.code&&"Does not have Pin service"==t.message?(this.setRequestStatus("no_service"),this.loading=!1):400==t.code&&"Incorrect support number"==t.message?(this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,t.message)),this.setStatus()):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,location.pathname.indexOf("widget-boxed")>-1?location.assign(t.data.widget_url_boxed+"&acceptTerms=true"):location.assign(t.data.widget_url+"&acceptTerms=true")):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage)}))}addSolicitudSMS(e){this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==t.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.setRequestStatus("no_service"),this.loading=!1):(this.setRequestStatus("form"),this.showAlert("Error!",t.message)),this.setStatus())):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.setStatus(),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:t.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}validateHaveSmsMode(e){this.solicitudesService.checkService(e).then((t=>{t&&t.message&&"does not have sms service"==t.message.toLowerCase()?(this.solicitud=e,this.setRequestStatus("form"),this.pinMode=!0,this.loading=null,this.showAlert(this.labels.warnings.noSms,this.labels.warnings.noSmsDesc)):this.addSolicitudSMS(e)})).catch((e=>{console.error(e)}))}createRequestFromDNI(e){let t={document_number:e,user_id:this.userId,package_id:this.packId,check_legal:!0};this.solicitudesService.addSolicitud(t,this.packId,this.userId).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==e.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.setRequestStatus("no_service"),this.loading=!1):(this.setRequestStatus("form"),this.showAlert("Error!",e.message))),this.setStatus()):e&&e.status&&"success"==e.status?(this.requestID=e.data.request_id,this.solicitud=e.data,this.setStatus(),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:e.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequest(){if(this.socket)return;const e=this;let t="wss://notifications.dev.belender.net";"qa"==c.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==c.N.env&&(t="wss://notifications.belender.net"),c.N.notificationsBaseUrl&&(t=c.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${this.requestID}&user_id=${this.userId}`),this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from wss: ",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada"),this.socketOpened=!1}}sendNewData(e){this.loading=this.labels.loadings.sendingData,this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e.message,"error"),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t,n){this.loading=!1;let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}acceptTerms(e=!0){let t={request_id:this.requestID,user_id:this.userId,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingAndLoginSS),this.solicitudesService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message?"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status?(this.sendMessageToParent({type:"response",data:e.data||e}),this.solicitud=e.data,this.setStatus(),this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck()):this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}requestOTP(e){this.loading=this.labels.loadings.sendingData,this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("all_documents_downloaded"),this.setStatus(),this.loading=!1}),2e3):this.solicitudesService.sendOTP({request_id:this.requestID,user_id:this.userId,code:e.code}).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.labels.warnings.error,this.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status&&(this.handleRequestStatus(e.data||e),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.setStatus(),this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){if(this.solicitud)this.solicitud.status_code=e;else{let t=new a.l;t.status_code=e,this.solicitud=t}this.setStatus()}retryRequest(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingRequest,this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setStatus()),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.setRequestStatus("created")}gotoManual(){this.manual=!0,this.cd.markForCheck()}gotoIntro(){this.manual=!1}goFlow(){this.introEnabled=!1}goIntro(){this.manual=!1,this.introEnabled=!0}disconnectWebsocket(){this.socket&&this.socket.close()}gotoPin(){this.requestedToPin=!0;let e={request_id:this.solicitud.request_id};this.loading=this.labels.loadings.smsToPin,this.solicitudesService.noPhone(e).then((e=>{this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoClavePinUrl(e){location.href.indexOf("widget-boxed")>-1?location.assign(e.widget_url_boxed):location.assign(e.widget_url)}setPhone(e){this.loading=this.labels.loadings.sendingNewPhone,this.solicitudesService.setPhone({phone:e},this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)}setNoPhone(){this.loading=this.labels.loadings.validatingData,this.solicitudesService.noPhone({request_id:this.solicitud.request_id})}sendDataToPin(e){e.request_id=this.solicitud.request_id,this.loading=this.labels.loadings.sendingData,this.solicitudesService.smsToPin(e).then((e=>{e&&e.status&&"success"===e.status&&this.gotoClavePinUrl(e.data),e&&e.status&&"error"===e.status&&(e.message?"Does not have Pin service"==e.message?this.setRequestStatus("no-service"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.loading=null)})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}requestStatusFromDetail(){this.requestedFromDetail=!0,this.loading=this.labels.loadings.validatingRequest,this.solicitudesService.getSolicitudByCode(this.solicitud.request_id).then((e=>{e&&e.consent_process_completed&&this.setRequestStatus("consent_process_completed"),this.loading=null})).catch((e=>{this.loading=null,this.setRequestStatus("failed")}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,this.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.widgetUrl||"",status_code:"consent_process_completed",user_id:this.solicitud?this.solicitud.user_id:this.userId||"",funder_id:this.solicitud?this.solicitud.funder_id:"",request_id:this.solicitud?this.solicitud.request_id:this.requestID||"",widget_url_boxed:this.widgetUrlBoxed||""}}),t.status_code="consent_process_completed",this.solicitud=t,setTimeout((()=>{this.disconnectWebsocket()}),3e3),this.setStatus(),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status?"VALID"===e.otp_status?e.nex_step_detail&&"Seguridad Social"===e.nex_step_detail.portal&&(t.status_code="waiting_otp_seguridad_social",this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)),this.sendMessageToParent({type:"response",data:e})),this.loading=null}initIntervalToAskBack(){!this.solicitud||!this.solicitud.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.solicitud.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){if(!e&&!this.requestID)return void this.stopInterval();let t=JSON.parse(JSON.stringify(this.solicitud.status_code));this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1}))}handleBadPhone(){this.disconnectWebsocket(),this.loading=this.labels.loadings.validatingData,setTimeout((()=>{this.solicitud||(this.solicitud=new a.l),this.setRequestStatus("failed_without_retry"),this.setStatus(),this.loading=null}),3e3)}setCancel(e){this.setRequestStatus(e),this.setStatus()}setStatus(){if(this.showCancelRequest=!0,this.manual)this.requestStatus="manual";else if(this.introEnabled)this.requestStatus="intro";else if(this.solicitud){if(this.solicitud){let e=u[this.solicitud.status_code];if(e){if("success"===e&&this.data.config&&this.data.config.infiniteLoopInCompleted)return void(this.requestStatus="loading");if(("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),"phone_not_exist_otp"===e)return void(this.data&&this.data.config&&this.data.config.tryPinWithoutSMS?(this.showCancelRequest=!1,this.gotoPin(),this.requestStatus="loading"):this.requestStatus=this.data.config.noRetryInBadPhone?"otp":"error-data");if("no-service"===e&&(this.requestStatus=e,this.data&&this.data.config&&this.data.config.tryPinWithoutSMS))return void(!this.requestedToPin&&this.gotoPin());if("bad-phone"===e&&this.data&&this.data.config&&this.data.config.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone");this.requestStatus=e}}}else this.requestStatus="form"}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(h.L,{panelClass:"fullscreen-dialog",data:{flow:this.flowName,allData:this.data,lang:this.currentLang}}).afterClosed().subscribe((e=>{e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}))}};Ft.ɵfac=function(e){return new(e||Ft)(m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(f.gz),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(v.w),m.ɵɵdirectiveInject(y.r),m.ɵɵdirectiveInject(b.T),m.ɵɵdirectiveInject(x.s),m.ɵɵdirectiveInject(w.v),m.ɵɵdirectiveInject(C.H),m.ɵɵdirectiveInject(S.uw),m.ɵɵdirectiveInject(M.D))},Ft.ɵcmp=m.ɵɵdefineComponent({type:Ft,selectors:[["belender-widget-sms"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(ct,5),m.ɵɵviewQuery(dt,5),m.ɵɵviewQuery(ct,5)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.formComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.otpComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[m.ɵɵProvidersFeature([{provide:s.o2,useValue:{appearance:"standard"}}])],decls:5,vars:4,consts:[[1,"h-full","widget-belender"],[3,"class","background",4,"ngIf"],["class","loading-wrapper",4,"ngIf"],[4,"ngIf"],[3,"sendMessage",4,"ngIf"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],["class","h-full ",3,"data","flowName","gotoFlow","gotoManual",4,"ngIf"],["class","h-full ",3,"data","flowName","solicitud","packId","userId","dniChange","goBack",4,"ngIf"],[3,"requestIDFromURL","lang","userId","flowName","data","labels","texts","solicitud","pinMode","goIntro","goToTerms","nextStep",4,"ngIf"],[3,"solicitud","data","labels","texts","nextStep",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"solicitud","data","labels","texts","retry",4,"ngIf"],[3,"otpType","labels","logoCustom","flowType","data","texts","solicitud","minLength","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","packId","flowName","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","nextStep","noPhone",4,"ngIf"],[3,"data","labels","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"texts","data","labels",4,"ngIf"],[3,"flowType","request_id","user_id","labels","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[1,"h-full",3,"data","flowName","gotoFlow","gotoManual"],[1,"h-full",3,"data","flowName","solicitud","packId","userId","dniChange","goBack"],[3,"requestIDFromURL","lang","userId","flowName","data","labels","texts","solicitud","pinMode","goIntro","goToTerms","nextStep"],["formStep",""],[3,"solicitud","data","labels","texts","nextStep"],[3,"data","labels","texts","nextStep"],[3,"solicitud","data","labels","texts","retry"],[3,"otpType","labels","logoCustom","flowType","data","texts","solicitud","minLength","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","packId","flowName","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","texts","nextStep","noPhone"],[3,"data","labels","texts","solicitud","retry","newRequest"],[3,"texts","data","labels"],[3,"flowType","request_id","user_id","labels","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"px-6","py-4","flex","flex-col"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"sendMessage"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtemplate(1,At,6,10,"div",1),m.ɵɵtemplate(2,Nt,4,3,"div",2),m.ɵɵelementEnd(),m.ɵɵtemplate(3,Rt,3,1,"ng-container",3),m.ɵɵtemplate(4,jt,1,0,"belender-tester-sms",4)),2&e&&(m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data&&t.data.styles&&t.data.styles.colors),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading&&!t.error),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.testMode),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.testMode))},dependencies:[I.O5,k.Hw,E.lW,T.Ou,P.R,O.u,D.q,L.y,A.i,U,K,ne,De,Le,Ne,je,Ye,He,Be,Ue,We,et,lt,q.z],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative;min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"],data:{animation:[d.$]}}),Ft=(0,r.gn)([(0,o.c)()],Ft)},3006:(e,t,n)=>{n.r(t),n.d(t,{SmsModule:()=>W});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(8364),L=n(4650);const A=[{path:":idUser",component:D.T},{path:":idUser/:packID",component:D.T}];let N=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=L.ɵɵdefineNgModule({type:e}),e.ɵinj=L.ɵɵdefineInjector({imports:[P.Bz.forChild(A),P.Bz,O.d8]}),e})();var R=n(6981),j=n(1129),F=n(9476),q=n(8962),Y=n(3468),V=n(3295),H=n(3300),z=n(7795),B=n(865),U=n(3033);let W=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=L.ɵɵdefineNgModule({type:e}),e.ɵinj=L.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,{provide:M.Ad,useValue:"es-ES"}],imports:[N,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,R.x,j.n,F.F,q.A,Y.f,V.g,H.C,z.QA,B.q,U.d]}),e})()},1724:(e,t,n)=>{n.r(t),n.d(t,{VideoIdModule:()=>Ct});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(5762),j=n(8259),F=n(2340),q=n(1363),Y=n(6830),V=n(4650),H=n(5089),z=n(529),B=n(6554);let U=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(F.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(F.N.baseUrl+"/requests/"+e)}setState(e,t){let n={request_id:e,status:t};return new Promise(((e,t)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/status",n).then((n=>{n?e(n):t(n)})).catch((e=>{console.error("addSolicitud",e),t(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,i)=>{this.localFetch.putFetchWhitoutToken(`${F.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,i)=>{this.localFetch.postFetch(`${F.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵinject(H.F),V.ɵɵinject(z.eN),V.ɵɵinject(B.r))},e.ɵprov=V.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var W=n(8460),$=n(5412),G=n(833),Z=n(4302),K=n(3731);function Q(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function J(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,Q,2,1,"span",5),V.ɵɵtemplate(3,X,2,2,"span",5),V.ɵɵtemplate(4,J,2,1,"span",5),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),V.ɵɵelementEnd())}function ie(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function re(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en el teléfono? "),V.ɵɵelementEnd())}const se=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,ne,2,0,"span",5),V.ɵɵtemplate(3,ie,2,1,"span",5),V.ɵɵtemplate(4,re,2,0,"span",5),V.ɵɵelementStart(5,"a",12),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.resendOTP())})),V.ɵɵtext(6,"Reenviar"),V.ɵɵelementEnd()(),V.ɵɵelementContainerEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction2(9,se,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new V.EventEmitter(null),this.errPhone=new V.EventEmitter(null),this.resendO=new V.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?j(e.target).next().focus():"Backspace"==e.code&&j(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,te,5,8,"ng-container",5),V.ɵɵtemplate(7,oe,7,12,"ng-container",5),V.ɵɵelementEnd(),V.ɵɵelementStart(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),V.ɵɵtext(11," Código OTP "),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"input",8),V.ɵɵlistener("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),V.ɵɵelementEnd()()()(),V.ɵɵelementStart(13,"div",9)(14,"button",10),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(15,"Siguiente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.otp.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,18,t.texts.otp.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),V.ɵɵadvance(7),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",2),V.ɵɵelement(1,"div",3)(2,"div",4),V.ɵɵpipe(3,"safeHtml"),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",e.texts.success.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(3,8,e.texts.success.description||""),V.ɵɵsanitizeHtml)}}function ce(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.gotoRedirect())})),V.ɵɵtext(2),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||"Haga click aquí para finalizar"," ")}}let de=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.videoS=n,this.route=i}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"success").then((e=>{console.log("Se ha seteado el status success correctamente")})).catch((e=>{console.error("No se ha seteado el status success. Error: ",e)})))}))}save(){}gotoRedirect(){this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName"},decls:2,vars:2,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,le,4,10,"div",0),V.ɵɵtemplate(1,ce,3,7,"div",1)),2&e&&(V.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data[t.flowName].enableUrlCallBack))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.retry())})),V.ɵɵtext(2,"Intentarlo nuevamente"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function he(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",7),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.newRequest())})),V.ɵɵtext(2,"Crear nueva solicitud"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let pe=(()=>{class e{constructor(e,t,n){this.utils=e,this.videoS=t,this.route=n,this.retryOp=new V.EventEmitter(null),this.newReq=new V.EventEmitter(null)}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"failed").then((e=>{console.log("Se ha seteado el status failed correctamente")})).catch((e=>{console.error("No se ha seteado el status failed. Error: ",e)})))}))}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵtemplate(5,ue,3,6,"div",4),V.ɵɵtemplate(6,he,3,6,"div",4),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",t.texts.fail.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,6,t.texts.fail.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var me=n(1763),fe=n(5696);const ge=["termsCheckbox"],_e=["termsCertCheckbox"],ve=["assignmentCheckbox"];function ye(e,t){if(1&e&&(V.ɵɵelementStart(0,"mat-form-field",5)(1,"mat-label"),V.ɵɵtext(2,"Razón social"),V.ɵɵelementEnd(),V.ɵɵelement(3,"input",28),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵclassMapInterpolate1("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.razon?-1:1)}}function be(e,t){if(1&e&&(V.ɵɵelementStart(0,"mat-form-field",5)(1,"mat-label"),V.ɵɵtext(2,"CIF"),V.ɵɵelementEnd(),V.ɵɵelement(3,"input",29),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵclassMapInterpolate1("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.cif?-1:1)}}function xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",30)(1,"belender-checkbox",22),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setPower(t))})),V.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),V.ɵɵelementStart(3,"a",24),V.ɵɵlistener("click",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoPowerConditions(t))})),V.ɵɵelementStart(4,"u"),V.ɵɵtext(5,"aquí"),V.ɵɵelementEnd()()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title)}}function we(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",22,31),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setAssignment(t))})),V.ɵɵelement(3,"div",32),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,V.ɵɵsanitizeHtml)}}const Ce=function(e){return{"dont-show-data":e}},Se={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Me=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.requestID=null,this.next=new V.EventEmitter(null),this.goTerms=new V.EventEmitter(null),this.goTermsCert=new V.EventEmitter(null),this.goPower=new V.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.step=0,this.assignment=!1,this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1},this.requestAux={phone:null,email:null,razon:null,cif:null,name:null,lastname:null,secondLastname:null,dni:null,type:"NATURAL"},this.noValidate=!1,this.powerActivate=!1}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}tabChanged(e){this.requestAux.type=e.value,this.setForm(this.requestAux)}setForm(e){this.requestAux.phone=e?e.person_phone||e.phone:null,this.requestAux.email=e?e.person_email||e.email||e.email_copy:null,this.requestAux.razon=e&&e.razon_social?e.razon_social:null,this.requestAux.cif=e&&e.cif?e.cif:null,this.requestAux.name=e?e.person_name||e.name:null,this.requestAux.lastname=e?e.person_first_surname||e.first_surname:null,this.requestAux.secondLastname=e?e.person_second_surname||e.second_surname:null,this.requestAux.dni=e&&e.document_number?e.document_number:e&&e.person_document_number?e.person_document_number:null,this.requestAux.type=e&&e.person_type?e.person_type:this.requestAux.type,this.form=this.fb.group("NATURAL"==this.requestAux.type?{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.Validators.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.Validators.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.Validators.required,p.Validators.email]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9)]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.Validators.required]]}:{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.Validators.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.Validators.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.Validators.required,p.Validators.email]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.Validators.required]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9)]],razon:[this.requestAux.razon||null,this.noValidate?[]:[p.Validators.required]],cif:[this.requestAux.cif||null,this.noValidate?[]:[p.Validators.required]]}),this.requestIDFromURL&&this.disableEnableInputs(this.requestAux.type,this.requestAux.name,this.requestAux.lastname,this.requestAux.secondLastname,this.requestAux.email,this.requestAux.phone,this.requestAux.dni,this.requestAux.razon,this.requestAux.cif),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,r,s,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:r||!1,phone:s||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}enableInput(e){this.disabledInputs[e]=!1,this.cd.markForCheck()}nextStep(){let e;e="NATURAL"==this.requestAux.type?{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,type:"Natural"}:{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,type:"Legal",rmc_validation:this.userId},(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=1,e.terms_and_conditions_power=1),this.next.emit(e)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}setAssignment(e){this.assignment=e}getAssignmentValidation(){return!this.data.config.dataAssignmentCheck||this.assignment}setTerms2(e){this.acceptTerms2=e}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}getIfValid(){let e=this.form.invalid;return this.noValidate&&(e=!1),!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&!e&&this.acceptTerms&&this.acceptTerms2&&this.getAssignmentValidation()}setPower(e){this.powerActivate=e}gotoPowerConditions(e){this.goPower.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(V.ChangeDetectorRef))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(V.ɵɵviewQuery(ge,5),V.ɵɵviewQuery(_e,5),V.ɵɵviewQuery(ve,5)),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.checkComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.certCheckComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",userId:"userId",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Se},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:57,vars:63,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-1","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["formControlName","type",3,"tabindex","selectionChange"],["value","NATURAL"],["value","LEGAL"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","secondLastname","matInput","",3,"tabindex"],["formControlName","email","placeholder","Ej: mi_email@dominio.com","type","email","matInput","",3,"tabindex"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","minlength","9","placeholder","Ej: 2222221R","type","text","matInput","",3,"tabindex"],["appearance","outline",3,"class",4,"ngIf"],[1,"mt-8","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","placeholder","Ej: 123123123","type","text","matInput","",3,"tabindex"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Tipo de persona"),V.ɵɵelementEnd(),V.ɵɵelementStart(9,"mat-select",6),V.ɵɵlistener("selectionChange",(function(e){return t.tabChanged(e)})),V.ɵɵelementStart(10,"mat-option",7),V.ɵɵtext(11,"Natural"),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-option",8),V.ɵɵtext(13,"Legal"),V.ɵɵelementEnd()()(),V.ɵɵelementStart(14,"mat-form-field",5)(15,"mat-label"),V.ɵɵtext(16,"Nombre"),V.ɵɵelementEnd(),V.ɵɵelement(17,"input",9),V.ɵɵelementEnd(),V.ɵɵelementStart(18,"mat-form-field",5)(19,"mat-label"),V.ɵɵtext(20,"Primer apellido"),V.ɵɵelementEnd(),V.ɵɵelement(21,"input",10),V.ɵɵelementEnd(),V.ɵɵelementStart(22,"mat-form-field",5)(23,"mat-label"),V.ɵɵtext(24,"Segundo apellido"),V.ɵɵelementEnd(),V.ɵɵelement(25,"input",11),V.ɵɵelementEnd(),V.ɵɵelementStart(26,"mat-form-field",5)(27,"mat-label"),V.ɵɵtext(28,"Email"),V.ɵɵelementEnd(),V.ɵɵelement(29,"input",12),V.ɵɵelementEnd(),V.ɵɵelementStart(30,"mat-form-field",5)(31,"mat-label"),V.ɵɵtext(32,"Telefono"),V.ɵɵelementEnd(),V.ɵɵelement(33,"input",13),V.ɵɵelementEnd(),V.ɵɵelementStart(34,"mat-form-field",5)(35,"mat-label"),V.ɵɵtext(36,"DNI"),V.ɵɵelementEnd(),V.ɵɵelement(37,"input",14),V.ɵɵelementEnd(),V.ɵɵtemplate(38,ye,4,4,"mat-form-field",15),V.ɵɵtemplate(39,be,4,4,"mat-form-field",15),V.ɵɵelementEnd(),V.ɵɵelementStart(40,"div",16)(41,"belender-checkbox",17,18),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms2(e)})),V.ɵɵelementStart(43,"belender-terms-and-policy-links",19),V.ɵɵlistener("goToTerms",(function(e){return t.gotoTermsAndConditions(e)})),V.ɵɵelementEnd()()(),V.ɵɵtemplate(44,xe,6,1,"div",20),V.ɵɵelementStart(45,"div",21)(46,"belender-checkbox",22,23),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms(e)})),V.ɵɵtext(48," He leído y acepto los "),V.ɵɵelementStart(49,"a",24),V.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),V.ɵɵelementStart(50,"u"),V.ɵɵtext(51,"términos y condiciones"),V.ɵɵelementEnd()(),V.ɵɵtext(52," para la emisión del certificado "),V.ɵɵelementEnd()(),V.ɵɵtemplate(53,we,4,2,"div",25),V.ɵɵelementStart(54,"div",26)(55,"button",27),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(56," Continuar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.form.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,59,t.texts.form.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngClass",V.ɵɵpureFunction1(61,Ce,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.type?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.type?-1:1),V.ɵɵadvance(5),V.ɵɵclassMapInterpolate1("",t.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.name?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.lastname?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.secondlastname?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.email?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.email?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.phone?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.dni?-1:1),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","LEGAL"==t.requestAux.type),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","LEGAL"==t.requestAux.type),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("userId",t.userId)("showPolicyLink",null==t.data?null:t.data.config.showPolicyLink)("firstSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.firstSentence)("secondSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.secondSentence)("thirdSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.thirdSentence)("policyActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.policyActionText)("termsActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.termsActionText)("customTerms",t.data[t.flowName].customTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",!t.getIfValid()))},dependencies:[i.mk,i.O5,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,f.gD,M.ey,me.b,fe.T,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})(),Ie=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new V.EventEmitter(null),this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.Validators.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud"},outputs:{next:"nextStep"},decls:14,vars:14,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1)(2,"div",2),V.ɵɵtext(3," Error con el teléfono "),V.ɵɵelementEnd(),V.ɵɵelementStart(4,"div",3),V.ɵɵtext(5," El teléfono ingresado no coincide con registrado en la Seguridad Social, por favor ingrese otro "),V.ɵɵelementEnd()(),V.ɵɵelementStart(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),V.ɵɵtext(9,"Telefono"),V.ɵɵelementEnd(),V.ɵɵelement(10,"input",6),V.ɵɵelementEnd()(),V.ɵɵelementStart(11,"div",7)(12,"button",8),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(13," Continuar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵadvance(8),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.FormGroupDirective,p.FormControlName],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ke=n(5145);let Ee=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":ke.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"mat-progress-spinner"),V.ɵɵelementStart(3,"p"),V.ɵɵtext(4),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(4),V.ɵɵtextInterpolate(t.label))},dependencies:[b.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Te=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtext(6),V.ɵɵelementEnd()(),V.ɵɵelementStart(7,"div",5)(8,"button",6),V.ɵɵlistener("click",(function(){return t.retry()})),V.ɵɵtext(9,"Intentarlo nuevamente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.abandoned.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,15,t.texts.abandoned.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Pe(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Oe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña es requerida "),V.ɵɵelementEnd())}function De(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}function Le(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Es necesario repetir la contraseña "),V.ɵɵelementEnd())}function Ae(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Las contraseñas deben coincidir "),V.ɵɵelementEnd())}function Ne(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}const Re={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let je=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new V.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Pe("password","confirm_password")})}nextStep(){let e={password:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.FormBuilder),V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Re},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(9,"input",6),V.ɵɵtemplate(10,Oe,2,0,"mat-hint",7),V.ɵɵtemplate(11,De,2,0,"mat-hint",7),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-form-field",8)(13,"mat-label"),V.ɵɵtext(14,"Repite Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(15,"input",9),V.ɵɵtemplate(16,Le,2,0,"mat-hint",7),V.ɵɵtemplate(17,Ae,2,0,"mat-hint",7),V.ɵɵtemplate(18,Ne,2,0,"mat-hint",7),V.ɵɵelementEnd()(),V.ɵɵelementStart(19,"div",10)(20,"button",11),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Guardar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.password.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,21,t.texts.password.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),V.ɵɵadvance(5),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Fe=["formStep"];function qe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"vex-power-cert",2),V.ɵɵlistener("accept",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.acceptPowerCert())})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵproperty("hideButtons",!1)("flow","VideoID")("userId",e.userId)}}function Ye(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",9),V.ɵɵelement(1,"img",10),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function Ve(e,t){1&e&&(V.ɵɵelementStart(0,"div",11),V.ɵɵelement(1,"mat-progress-spinner",12),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(1),V.ɵɵproperty("value",0))}function He(e,t){if(1&e&&V.ɵɵelement(0,"belender-loading-step",22),2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("status",null==e.solicitud?null:e.solicitud.status_code)}}function ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-form-step",23,24),V.ɵɵlistener("goToTerms",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoTermsAndConditions())}))("goToPower",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.gotoOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("flowName",e.flowName)("requestID",e.requestID)("requestIDFromURL",e.requestIDFromURL)("userId",e.userId)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-otp-step",25),V.ɵɵlistener("resendOTP",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.requestOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-password-step",26),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.sendPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function We(e,t){if(1&e&&V.ɵɵelement(0,"belender-success-step",27),2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function $e(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-fail-step",28),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.newRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Ge(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-error-form-step",29),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.sendNewData(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-abandoned-step",30),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.retryRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ke(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",31)(1,"div",32)(2,"h1",33),V.ɵɵtext(3,"No existe la solicitud"),V.ɵɵelementEnd()(),V.ɵɵelementStart(4,"div",34),V.ɵɵtext(5," No existen solicitudes activas con el código requerido "),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(4);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Qe(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵtemplate(1,He,1,2,"belender-loading-step",13),V.ɵɵtemplate(2,ze,2,7,"belender-form-step",14),V.ɵɵtemplate(3,Be,1,3,"belender-otp-step",15),V.ɵɵtemplate(4,Ue,1,3,"belender-password-step",16),V.ɵɵtemplate(5,We,1,6,"belender-success-step",17),V.ɵɵtemplate(6,$e,1,3,"belender-fail-step",18),V.ɵɵtemplate(7,Ge,1,3,"belender-error-form-step",19),V.ɵɵtemplate(8,Ze,1,3,"belender-abandoned-step",20),V.ɵɵtemplate(9,Ke,6,2,"div",21),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("ngIf","loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","form"==e.getStatus()&&!e.loading),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","otp"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","password"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","success"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","failed"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","error-data"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","abandoned"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function Xe(e,t){1&e&&V.ɵɵelement(0,"belender-disabled-url")}function Je(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",35),V.ɵɵelement(1,"mat-progress-spinner",36),V.ɵɵelementStart(2,"p",37),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate1(" ",e.loading," ")}}function et(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",38)(1,"div",31)(2,"div",39),V.ɵɵtext(3,"Error!"),V.ɵɵelementEnd(),V.ɵɵelement(4,"div",40),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",41)(6,"button",42),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.error=!1)})),V.ɵɵtext(7," Ingresar manualmente "),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",e.error,V.ɵɵsanitizeHtml)}}function tt(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",3)(1,"div"),V.ɵɵtemplate(2,Ye,2,1,"div",5),V.ɵɵtemplate(3,Ve,2,1,"div",6),V.ɵɵtemplate(4,Qe,10,9,"ng-container",4),V.ɵɵtemplate(5,Xe,1,0,"belender-disabled-url",4),V.ɵɵtemplate(6,Je,4,3,"div",7),V.ɵɵtemplate(7,et,8,3,"div",8),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&!e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"div",43),V.ɵɵtext(2),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(2),V.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}function it(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",3),V.ɵɵtemplate(1,tt,8,11,"div",1),V.ɵɵtemplate(2,nt,3,1,"ng-container",4),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.testMode)}}let rt=class{constructor(e,t,n,i,r,s,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.webhooksService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.requestIDFromURL=!1,this.requestCreated=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="VideoID"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}sendMessageToParent(e){window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&this.setParamsToRequest(e),e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=null}),(e=>{this.loading=null}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.videoIDService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.requestCreated=!0,t.requestIDFromURL=!0,t.setSubscriptionOfRequest(),t.loading=null,t.solicitud.status_code&&"waiting_video"===t.solicitud.status_code&&t.solicitud.url_video_id&&location.assign(t.solicitud.url_video_id),t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=null})).catch((e=>{t.loading=null}))}))()}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone),e.email&&!this.solicitud.person_email&&(this.solicitud.person_email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_first_surname&&(this.solicitud.person_first_surname=e.lastname),e.second_lastname&&!this.solicitud.person_second_surname&&(this.solicitud.person_second_surname=e.second_lastname)}handlePusherNotification(e){this.dataFromFirebase=e,this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.videoIDService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.videoIDService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}sendNewData(e){this.loading="Enviando información..",this.videoIDService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}gotoOTP(e){let t=e;t.user_id=this.userId,t.package_id=this.packId,this.requestCreated?this.setTerms(e):(this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),this.videoIDService.addSolicitud(t).then((n=>{n.status&&"error"==n.status?(console.error("error en el then",n),this.solicitud=t,this.solicitud.status_code="form",n.message?(this.showAlert("Error!",n.message),n.message&&" Teléfono incorrecto"===n.message&&setTimeout((()=>{this.formComponent.enableInput("phone")}),1e3)):this.showAlert("Error!",n)):n&&"success"==n.status&&(this.sendMessageToParent({type:"response",data:n.data||n}),this.solicitud=n.data,this.requestID=n.data.request_id,this.setSubscriptionOfRequest(),this.cd.markForCheck(),this.setTerms(e))})).catch((e=>{console.error("errooooooorrrrr",e),e&&e.error&&this.showAlert("Error!",e.error),this.loading=null})))}setTerms(e){this.loading="Enviando datos..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.videoIDService.acceptTerms(t).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta!")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",e.message)))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_password",this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=null):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando password..",console.error("password: ",e),e.request_id=this.requestID,this.videoIDService.sendPassword(e).then((e=>{e&&e.status&&"error"==e.status?e.message&&(400==e.code?(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="waiting_password",this.showAlert("Error!",e.message))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_otp",this.sendMessageToParent({type:"response",data:e.data||e})):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando OTP..",this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="all_documents_downloaded",this.loading=null}),2e3):this.videoIDService.sendOTP({request_id:this.requestID,otp:e.code}).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?"invalid_otp"==e.message?"El código introducido no es correcto. Por favor, inténtelo de nuevo":e.message:e),this.loading=!1):e&&"success"==e.status&&(this.loading="Redirigiendo a Vintegris, aguarde por favor...",this.solicitud.status_code="loading",this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck(),location.assign(e.message))})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.videoIDService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"loading"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"certificate_created"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_video"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"rejected_identity"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.infiniteLoopInCompleted||"waiting_video"==this.solicitud.status_code?(this.loading="Aguardando validación por Video ID","loading"):"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(Y.L,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTermsCheck(!0)}))}gotoTermsAndConditionsCertificate(){this.dialog.open(q.v,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};function st(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",6),V.ɵɵelement(1,"img",7),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function ot(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"mat-progress-spinner",9),V.ɵɵelementStart(2,"p",10),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function at(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1)(1,"div",2),V.ɵɵtemplate(2,st,2,1,"div",3),V.ɵɵelement(3,"belender-success-step",4),V.ɵɵtemplate(4,ot,4,3,"div",5),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo),V.ɵɵadvance(1),V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error)}}rt.ɵfac=function(e){return new(e||rt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(W.r),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t),V.ɵɵdirectiveInject($.uw))},rt.ɵcmp=V.ɵɵdefineComponent({type:rt,selectors:[["belender-widget-videoid"]],viewQuery:function(e,t){if(1&e&&V.ɵɵviewQuery(Fe,5),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:2,vars:2,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],[4,"ngIf"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","status",4,"ngIf"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","nextStep",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","status"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts","solicitud","nextStep"],[3,"data","flowName","packId","userId","requestID","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","nextStep"],[3,"solicitud","data","texts","retry"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,qe,1,3,"vex-power-cert",0),V.ɵɵtemplate(1,it,3,2,"div",1)),2&e&&(V.ɵɵproperty("ngIf",t.viewPowerTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data))},dependencies:[i.O5,u.lW,b.Ou,G.L,Z.q,ae,de,pe,Me,Ie,Ee,Te,je],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),rt=(0,L.gn)([(0,N.c)()],rt);let lt=class{constructor(e,t,n,i,r,s,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.notis=s,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};function ct(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",6),V.ɵɵelement(1,"img",7),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function dt(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"mat-progress-spinner",9),V.ɵɵelementStart(2,"p",10),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function ut(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1)(1,"div",2),V.ɵɵtemplate(2,ct,2,1,"div",3),V.ɵɵelement(3,"belender-fail-step",4),V.ɵɵtemplate(4,dt,4,3,"div",5),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo),V.ɵɵadvance(1),V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error)}}lt.ɵfac=function(e){return new(e||lt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t))},lt.ɵcmp=V.ɵɵdefineComponent({type:lt,selectors:[["belender-widget-videoid-success"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,at,5,6,"div",0),2&e&&V.ɵɵproperty("ngIf",t.data)},dependencies:[i.O5,b.Ou,de],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),lt=(0,L.gn)([(0,N.c)()],lt);let ht=class{constructor(e,t,n,i,r,s,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.notis=s,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};ht.ɵfac=function(e){return new(e||ht)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t))},ht.ɵcmp=V.ɵɵdefineComponent({type:ht,selectors:[["belender-widget-videoid-fail"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts","solicitud"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,ut,5,7,"div",0),2&e&&V.ɵɵproperty("ngIf",t.data)},dependencies:[i.O5,b.Ou,pe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),ht=(0,L.gn)([(0,N.c)()],ht);const pt=[{path:":idUser",component:rt},{path:":idUser/:packID",component:rt},{path:":idUser/:packID/success",component:lt},{path:":idUser/:packID/fail",component:ht}];let mt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({imports:[P.Bz.forChild(pt),P.Bz,O.d8]}),e})();var ft=n(6981),gt=n(3848),_t=n(1129),vt=n(1258),yt=n(3295),bt=n(2266),xt=n(3300),wt=n(865);let Ct=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,{provide:M.Ad,useValue:"es-ES"}],imports:[mt,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,ft.x,gt.Nh,_t.n,vt.H,yt.g,bt.L,xt.C,wt.q]}),e})()},5469:(e,t,n)=>{n.d(t,{B:()=>v});var i=n(7582),r=n(9933),s=n(8259),o=n(4650),a=n(5089),l=n(7367),c=n(8460),d=n(9299),u=n(9045),h=n(6895),p=n(2237),m=n(9199);const f=["widgetCard"];function g(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵelement(1,"router-outlet"),o.ɵɵelementContainerEnd())}const _=function(e){return{"margin-top":e}};let v=class{constructor(e,t,n,i,r){this.utils=e,this.customizationService=t,this.customizationStoreService=n,this.router=i,this.deviceInfoService=r,this.type="",this.widgetHeight=0,this.warningsSpace=0,this.isScaled=!1,this.funderConfigLoaded=!1,this.funderStylesLoaded=!1}ngOnInit(){this.getWindowsScreenOrientation(),this.utils.getWarningsSpaces().subscribe((e=>{this.warningsSpace=e}));let e=this.router.url.split("/");this.userId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-3]?e[e.length-3]:"":e&&e.length&&e[e.length-2]?e[e.length-2]:"",this.packId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-2]?e[e.length-2]:"":e&&e.length&&e[e.length-1]?e[e.length-1]:"";let t=this.packId.split("?");t&&t.length&&(this.packId=t[0]),console.error("packId",this.packId),this.userId&&(this.customizationStoreService.setUserID(this.userId),this.setCustomization()),this.packId&&this.customizationStoreService.setPackID(this.packId)}ngDoCheck(){this.getWidgetCardHeight()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewInit(){s("body").css("background","transparent"),s("body").css("background-color","transparent")}getWindowsScreenOrientation(){window.addEventListener("resize",(()=>{this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight})})),window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){this.widgetCard&&this.widgetHeight!=this.widgetCard.nativeElement.offsetHeight&&(this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled$=this.deviceInfoService.isScaled$.subscribe((e=>{this.isScaled=e,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight)})),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight}))}sendMessageToParent(e){window.top.postMessage(e,"*")}setCustomization(){this.customizationService.getFunderConfig(this.userId).then((e=>{this.customizationStoreService.setFunderConfig(e.data),this.funderConfigLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)})),this.customizationService.getFunderStyles(this.userId).then((e=>{this.customizationStoreService.setFunderStyles(e.data),this.funderStylesLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)}))}};v.ɵfac=function(e){return new(e||v)(o.ɵɵdirectiveInject(a.F),o.ɵɵdirectiveInject(l.w),o.ɵɵdirectiveInject(c.r),o.ɵɵdirectiveInject(d.F0),o.ɵɵdirectiveInject(u.H))},v.ɵcmp=o.ɵɵdefineComponent({type:v,selectors:[["belender-widget"]],viewQuery:function(e,t){if(1&e&&o.ɵɵviewQuery(f,5),2&e){let e;o.ɵɵqueryRefresh(e=o.ɵɵloadQuery())&&(t.widgetCard=e.first)}},inputs:{type:"type"},decls:4,vars:4,consts:[[1,"belender-page-layout","h-auto","p-0","md:p-4","overflow-y-visible",3,"ngStyle"],[1,"h-auto","overflow-y-visible","content-layout","overflow-x-hidden","content-widget","p-0","md:p-3"],["widgetCard",""],[4,"ngIf"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"vex-page-layout",0)(1,"vex-page-layout-content",1,2),o.ɵɵtemplate(3,g,2,0,"ng-container",3),o.ɵɵelementEnd()()),2&e&&(o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(2,_,t.warningsSpace+"px")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.funderConfigLoaded&&t.funderStylesLoaded))},dependencies:[h.O5,h.PC,d.lC,p.w,m.d],styles:[".badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.card[_ngcontent-%COMP%]{margin:0 auto;max-width:440px}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.content-layout[_ngcontent-%COMP%]{max-height:none;max-height:initial;overflow-y:auto;padding:0!important}.belender-page-layout[_ngcontent-%COMP%]{padding:0!important}"]}),v=(0,i.gn)([(0,r.c)()],v)},2932:(e,t,n)=>{function i(e={}){return t=>{const n=t.value;if(!n)return null;const i=n.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(e.checkFormat&&!i)return{invalidFormat:!0};if(!i)return null;const r=parseInt(i[1],10),s=parseInt(i[2],10)-1,o=parseInt(i[3],10),a=new Date(o,s,r);if(e.checkDate&&(a.getFullYear()!==o||a.getMonth()!==s||a.getDate()!==r))return{invalidDate:!0};if(e.checkAge){const e=new Date;let t=e.getFullYear()-o;const n=e.getMonth()-s;if((n<0||0===n&&e.getDate()<r)&&t--,t<18)return{underAge:!0}}return null}}n.d(t,{s:()=>i})},3842:(e,t,n)=>{n.d(t,{VU:()=>i});const i={status:"success",data:{request_id:"a29879d5-1f42-400a-bcb5-caa69ab31402",user_id:"f2216861-9119-4f74-94ff-677a8926b77c",user_name:"Roger BackOffice",person_id:"fc02a51d-7782-4cb3-882d-cad847e5d9b5",person_name:"Roger",person_phone:"666666666",person_document_number:"44011547N",person_document_expiration_date:"2032-10-24",person_document_support:"",person_birth_date:"1981-08-12",person_email:"test@gmail.com",flow_id:"d73a6c00-3ab9-46c4-9a85-471c14ec361d",flow_name:"ClavePin",funder_id:"5468ba73-7d05-4c9c-a81f-748fe7dafaba",funder_name:"Belender",status_code:"terms_and_conditions",status_message:"La solicitud se encuentra en estado de espera de terminos y condiciones",package_id:"2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7",widget_url:"https://widget.dev.belender.net/widget/clavepin/f2216861-9119-4f74-94ff-677a8926b77c/2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7?request_id=a29879d5-1f42-400a-bcb5-caa69ab31402",widget_url_boxed:"https://widget.dev.belender.net/widget-boxed/clavepin/f2216861-9119-4f74-94ff-677a8926b77c/2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7?request_id=a29879d5-1f42-400a-bcb5-caa69ab31402",has_documents:!1,created_at:"2025-01-07T20:31:55.000000Z",updated_at:"2025-01-07T20:31:55.000000Z"}}},9382:(e,t,n)=>{n.d(t,{i:()=>d});var i=n(4650),r=n(5601),s=n(5895),o=n(6895),a=n(3731);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",2),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goToCancelRequest())})),i.ɵɵpipe(1,"safeHtml"),i.ɵɵelementEnd()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵstyleProp("color",e.textColor),i.ɵɵproperty("innerHTML",i.ɵɵpipeBind1(1,3,e.customText),i.ɵɵsanitizeHtml)}}function c(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",3),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",e.labels.loadings.cancelingRequest,"\n")}}let d=(()=>{class e{constructor(e,t){this.solicitudesService=e,this.notis=t,this.customText="",this.textColor="",this.flowType="SMS",this.updateStatusCode=new i.EventEmitter,this.requestType="sms",this.loading=!1}goToCancelRequest(){this.loading=!0;const e={request_id:this.request_id,user_id:this.user_id};this.requestType="ClavePin"===this.flowType?"clave-pin":"sms",this.solicitudesService.cancelRequest(e,this.requestType).then((e=>{e&&e.data&&this.updateStatusCode.emit("consent_process_canceled"),e.message&&this.showAlert(e.status?this.capitalizeFirstLetter(e.status)+"!":"Aviso!",e.message),setTimeout((()=>{this.loading=!1}),1e3)})).catch((e=>{this.loading=!1,this.showAlert("Error!",e.message||e)}))}capitalizeFirstLetter(e){return"string"!=typeof e||0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}showAlert(e,t){this.notis.showAlert(e,t)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.M),i.ɵɵdirectiveInject(s.T))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-cancel-request"]],inputs:{data:"data",customText:"customText",textColor:"textColor",flowType:"flowType",request_id:"request_id",user_id:"user_id",labels:"labels"},outputs:{updateStatusCode:"updateStatusCode"},decls:2,vars:2,consts:[["class","subheading-1 px-6 text-right underline cursor-pointer custom-html",3,"color","innerHTML","click",4,"ngIf"],["class","subheading-1 px-6 text-right text-orange-500 custom-html",4,"ngIf"],[1,"subheading-1","px-6","text-right","underline","cursor-pointer","custom-html",3,"innerHTML","click"],[1,"subheading-1","px-6","text-right","text-orange-500","custom-html"]],template:function(e,t){1&e&&(i.ɵɵtemplate(0,l,2,5,"div",0),i.ɵɵtemplate(1,c,2,1,"div",1)),2&e&&(i.ɵɵproperty("ngIf",!t.loading),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.loading))},dependencies:[o.O5,a.z]}),e})()},9112:(e,t,n)=>{n.d(t,{y:()=>T});var i=n(5861),r=n(4650),s=n(4006),o=n(8259),a=n(2340),l=n(5089),c=n(6895),d=n(9101),u=n(2440),h=n(3046),p=n(3731);function m(e,t){if(1&e&&r.ɵɵelement(0,"belender-widget-logo",12),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("firstOption",e.logoCustom)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function f(e,t){if(1&e&&r.ɵɵelement(0,"div",13),2&e){const e=r.ɵɵnextContext();r.ɵɵstyleProp("color",null==e.data.styles?null:e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),r.ɵɵproperty("innerHTML",e.texts[e.otpType].title,r.ɵɵsanitizeHtml)}}function g(e,t){if(1&e&&(r.ɵɵelement(0,"div",14),r.ɵɵpipe(1,"safeHtml")),2&e){const e=r.ɵɵnextContext();r.ɵɵstyleProp("color",null==e.data.styles?null:e.data.styles.colors.text),r.ɵɵproperty("innerHTML",r.ɵɵpipeBind1(1,3,null==e.texts[e.otpType]?null:e.texts[e.otpType].description),r.ɵɵsanitizeHtml)}}function _(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.requestingOtp:"Estamos solicitando el código. Por favor, espere un momento."," ")}}function v(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate2(" ",e.labels?e.labels.otp.otpSentToNumber:"El código ha sido enviado al teléfono acabado en"," ",e.lastThreeNumbersPhone,". ")}}function y(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.requestingCode:"Estamos solicitando el código. Por favor, espere un momento."," ")}}const b=function(e,t,n){return{color:e,border:t,background:n}};function x(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵelementStart(1,"small",15),r.ɵɵtemplate(2,_,2,1,"ng-container",6),r.ɵɵtemplate(3,v,2,2,"ng-container",6),r.ɵɵtemplate(4,y,2,1,"ng-container",6),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction3(4,b,null==e.data.styles?null:e.data.styles.colors.accentColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.accentColor),null==e.data.styles?null:e.data.styles.colors.accentBgColor)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.lastThreeNumbersPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&(null==e.data.config?null:e.data.config.noRetryInBadPhone))}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}function C(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate2("",e.labels?e.labels.otp.noReceivedCode2:"¿No has recibido el código en el teléfono acabado en"," ",e.lastThreeNumbersPhone,"? ")}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}const M=function(e,t){return{color:e,background:t}};function I(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext(2);return r.ɵɵresetView(t.resendOTP())})),r.ɵɵtext(1),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngStyle",r.ɵɵpureFunction2(2,M,null==e.data.styles?null:e.data.styles.colors.dangerTextButtonColor,null==e.data.styles?null:e.data.styles.colors.dangerColor)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.actions.resend:"Reenviar"," ")}}function k(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵelementStart(1,"small",16),r.ɵɵtemplate(2,w,2,1,"span",6),r.ɵɵtemplate(3,C,2,2,"span",6),r.ɵɵtemplate(4,S,2,1,"span",6),r.ɵɵtemplate(5,I,2,5,"a",17),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction3(5,b,null==e.data.styles?null:e.data.styles.colors.dangerColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.dangerColor),null==e.data.styles?null:e.data.styles.colors.dangerBgColor)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.lastThreeNumbersPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",null==e.data.config?null:e.data.config.noRetryInBadPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.secondTry)}}const E=function(e,t){return{length:e,allowNumbersOnly:t}};let T=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.minLength=3,this.logoCustom="",this.next=new r.EventEmitter(null),this.errPhone=new r.EventEmitter(null),this.resendO=new r.EventEmitter(null),this.secsCount=60,this.secondTry=!1,this.timerIsRunning=!1,this.env=a.N.env}ngOnInit(){this.form=this.fb.group({code1:[null,[s.Validators.required,s.Validators.maxLength(6),s.Validators.minLength(this.minLength)]]}),"SMS"==this.flowType&&this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}resetOtpNumber(){this.form.get("code1").setValue("")}ngOnChanges(e){e.otpType&&!e.otpType.previousValue&&(this.secsCount="otpAEAT"==e.otpType?.currentValue||"otpIRS"==e.otpType?.currentValue?300:60,this.initSecsInterval())}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastThreeNumbersPhone=t}initSecsInterval(){this.timerIsRunning||(this.interv=setInterval((()=>{this.timerIsRunning=!0,this.secsCount=this.secsCount-1,this.secsRemaining=this.getRemaining(),this.secsCount<=0&&this.finishSecsInterval()}),1e3))}getRemaining(){let e=Math.floor(this.secsCount/60),t=this.secsCount%60;return this.addZero(e)+":"+this.addZero(t)}addZero(e){return e>=10?e:"0"+e}finishSecsInterval(){this.timerIsRunning=!1,this.interv&&clearInterval(this.interv)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){var t=this;return(0,i.Z)((function*(){console.log(e),t.form.get("code1").setValue(e)}))()}setInputEvent(e){""!=e.target.value?o(e.target).next().focus():"Backspace"==e.code&&o(e.target).prev().focus()}nextStep(){let e={code:this.getCode()};this.next.emit(e)}resendOTP(){this.secondTry=!0,this.initSecsInterval(),this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(s.UntypedFormBuilder),r.ɵɵdirectiveInject(l.F))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["belender-shared-otp-step"]],inputs:{data:"data",texts:"texts",lastThreeNumbersPhone:"lastThreeNumbersPhone",solicitud:"solicitud",otpType:"otpType",minLength:"minLength",flowType:"flowType",logoCustom:"logoCustom",labels:"labels"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},features:[r.ɵɵNgOnChangesFeature],decls:15,vars:21,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-1","flex","flex-col"],["id","otpTitle","class","title m-0",3,"color","font-size","innerHTML",4,"ngIf"],["id","otpDescription","class","subheading-1 pt-4",3,"color","innerHTML",4,"ngIf"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","w-full","flex-col","gap-2","py-2"],[1,"subheading-1","py-1","custom-html"],[3,"config","onInputChange"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"firstOption","logoUrl"],["id","otpTitle",1,"title","m-0",3,"innerHTML"],["id","otpDescription",1,"subheading-1","pt-4",3,"innerHTML"],["id","secsCountContainer",1,"info-time","w-fit",3,"ngStyle"],[1,"info-time","w-fit",3,"ngStyle"],["id","resendOTPButton","class","ml-4",3,"ngStyle","click",4,"ngIf"],["id","resendOTPButton",1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,m,1,2,"belender-widget-logo",0),r.ɵɵelementStart(1,"form",1)(2,"div",2),r.ɵɵtemplate(3,f,1,5,"div",3),r.ɵɵtemplate(4,g,2,5,"div",4),r.ɵɵelementStart(5,"div",5),r.ɵɵtemplate(6,x,5,8,"ng-container",6),r.ɵɵtemplate(7,k,6,9,"ng-container",6),r.ɵɵelementEnd(),r.ɵɵelementStart(8,"div",7)(9,"p",8),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵelementStart(11,"ng-otp-input",9),r.ɵɵlistener("onInputChange",(function(e){return t.capturePasteEvent(e)})),r.ɵɵelementEnd()()(),r.ɵɵelementStart(12,"div",10)(13,"button",11),r.ɵɵlistener("click",(function(){return t.nextStep()})),r.ɵɵtext(14),r.ɵɵelementEnd()()()),2&e&&(r.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),r.ɵɵadvance(1),r.ɵɵproperty("formGroup",t.form),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),r.ɵɵadvance(2),r.ɵɵstyleProp("color",t.data.styles.colors.text),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",t.labels?t.labels.otp.otpCode:"Código OTP (recibido por SMS)"," "),r.ɵɵadvance(1),r.ɵɵproperty("config",r.ɵɵpureFunction2(18,E,t.minLength,"qa"!=t.env&&"dev"!=t.env)),r.ɵɵadvance(2),r.ɵɵstyleProp("color",null==t.data.styles?null:t.data.styles.colors.btnText)("background",t.form.invalid?"":null==t.data.styles?null:t.data.styles.colors.btnBg)("border-radius",(null==t.data.styles?null:t.data.styles.btnRound)+"px"),r.ɵɵproperty("disabled",t.form.invalid),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",t.labels?t.labels.actions.next:"Siguiente"," "))},dependencies:[c.O5,c.PC,d.lW,s.ɵNgNoValidate,s.NgControlStatusGroup,s.FormGroupDirective,u.df,h.X,p.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.code-wrapper[_ngcontent-%COMP%]{padding:5px;height:50px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:40px;min-width:136px;border-radius:6px;border:1px solid rgba(0,0,0,.1);text-transform:uppercase;text-align:left;font-weight:700;transition:all .3s ease;outline:1px solid transparent;letter-spacing:12px;padding:0 18px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{background:#fcfcfc;border:1px solid rgba(0,0,0,.2);transition:all .3s ease}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:1px solid #4e98d0;border:1px solid #4e98d0}.info-time[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;min-height:40px;font-size:14px;line-height:14px;border-radius:5px;border-width:1px;border-style:solid;margin:10px 0;width:-moz-fit-content;width:fit-content}.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px;line-height:24px;padding:0 10px;border-radius:5px;cursor:pointer;transition:all .2s ease}@media (max-width: 576px){.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:0 20px}}"]}),e})()},5696:(e,t,n)=>{n.d(t,{T:()=>c});var i=n(4650),r=n(7403),s=n(5412),o=n(7308),a=n(6895);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"span"),i.ɵɵtext(1),i.ɵɵelementStart(2,"a",0),i.ɵɵlistener("click",(function(t){i.ɵɵrestoreView(e);const n=i.ɵɵnextContext();return i.ɵɵresetView(n.gotoLegalDocument(t))})),i.ɵɵelementStart(3,"u"),i.ɵɵtext(4),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",e.parts.p3," "),i.ɵɵadvance(3),i.ɵɵtextInterpolate(e.parts.a2)}}let c=(()=>{class e{constructor(e,t){this.dialog=e,this.translationService=t,this.goTerms=new i.EventEmitter(null),this.customTerms=!1,this.lang="",this.parts={p1:"He leído y acepto los",p2:"del servicio",p3:"y la",a1:"términos y condiciones",a2:"política de privacidad"},this.translatedParts={ca:{p1:"He llegit i accepto els",p2:"del servei",p3:"i la",a1:"termes i condicions",a2:"política de privacitat"},en:{p1:"I have read and accept the",p2:"of the service",p3:"and the",a1:"terms and conditions",a2:"privacy policy"},fr:{p1:"J'ai lu et j'accepte les",p2:"du service",p3:"et la",a1:"conditions générales",a2:"politique de confidentialité"},it:{p1:"Ho letto e accetto i",p2:"del servizio",p3:"e la",a1:"termini e condizioni",a2:"informativa sulla privacy"},pt:{p1:"Li e aceito os",p2:"do serviço",p3:"e a",a1:"termos e condições",a2:"política de privacidade"},de:{p1:"Ich habe die",p2:"des Dienstes gelesen und akzeptiere sie",p3:"sowie die",a1:"Nutzungsbedingungen",a2:"Datenschutzrichtlinie"}}}ngOnInit(){this.parts={p1:this.getPart(this.firstSentence,"p1"),p2:this.getPart(this.secondSentence,"p2"),p3:this.getPart(this.thirdSentence,"p3"),a1:this.getPart(this.termsActionText,"a1"),a2:this.getPart(this.policyActionText,"a2")}}getPart(e,t){return e||(this.data&&this.lang&&this.translatedParts[this.lang]?this.translatedParts[this.lang][t]||this.parts[t]||"":this.parts[t]||"")}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(e)}gotoLegalDocument(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(r.N,{panelClass:"fullscreen-dialog",data:{lang:this.lang,allData:this.data,flow:this.flowName}})}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(s.uw),i.ɵɵdirectiveInject(o.D))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-terms-and-policy-links"]],inputs:{userId:"userId",showPolicyLink:"showPolicyLink",firstSentence:"firstSentence",secondSentence:"secondSentence",thirdSentence:"thirdSentence",policyActionText:"policyActionText",termsActionText:"termsActionText",customTerms:"customTerms",lang:"lang",data:"data",flowName:"flowName"},outputs:{goTerms:"goToTerms"},decls:6,vars:4,consts:[["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵtext(0),i.ɵɵelementStart(1,"a",0),i.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditions(e)})),i.ɵɵelementStart(2,"u"),i.ɵɵtext(3),i.ɵɵelementEnd()(),i.ɵɵtext(4),i.ɵɵtemplate(5,l,5,2,"span",1)),2&e&&(i.ɵɵtextInterpolate1(" ",t.parts.p1," "),i.ɵɵadvance(3),i.ɵɵtextInterpolate(t.parts.a1),i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",t.parts.p2," "),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.showPolicyLink))},dependencies:[a.O5]}),e})()},3046:(e,t,n)=>{n.d(t,{X:()=>a});var i=n(4650),r=n(6895);function s(e,t){1&e&&i.ɵɵelement(0,"div",4)}const o=function(e){return{display:e}};let a=(()=>{class e{constructor(){this.logoUrl="",this.firstOption=this.logoUrl,this.logoUrlIsLoaded=!1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-widget-logo"]],inputs:{logoUrl:"logoUrl",firstOption:"firstOption"},decls:4,vars:5,consts:[[1,"img-wrapper","p-6","flex","justify-center","items-center"],["class","animated-bg h-full w-full",4,"ngIf"],[1,"img-card",3,"src","ngStyle","load"],["img",""],[1,"animated-bg","h-full","w-full"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtemplate(1,s,1,0,"div",1),i.ɵɵelementStart(2,"img",2,3),i.ɵɵlistener("load",(function(){return t.logoUrlIsLoaded=!0})),i.ɵɵelementEnd()()),2&e&&(i.ɵɵadvance(1),i.ɵɵproperty("ngIf",!t.logoUrlIsLoaded),i.ɵɵadvance(1),i.ɵɵproperty("src",t.firstOption||t.logoUrl,i.ɵɵsanitizeUrl)("ngStyle",i.ɵɵpureFunction1(3,o,t.logoUrlIsLoaded?"block":"none")))},dependencies:[r.O5,r.PC],styles:[".img-wrapper[_ngcontent-%COMP%]{height:240px}.img-wrapper[_ngcontent-%COMP%] .img-card[_ngcontent-%COMP%], .img-wrapper[_ngcontent-%COMP%] .animated-bg[_ngcontent-%COMP%]{max-width:240px;max-height:240px}"]}),e})()},5762:(e,t,n)=>{n.d(t,{l:()=>i});class i{constructor(){}}},3731:(e,t,n)=>{n.d(t,{z:()=>s});var i=n(4650),r=n(1481);let s=(()=>{class e{constructor(e){this.sanitized=e}transform(e){return this.sanitized.bypassSecurityTrustHtml(e)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.DomSanitizer,16))},e.ɵpipe=i.ɵɵdefinePipe({name:"safeHtml",type:e,pure:!0}),e})()},9391:(e,t,n)=>{n.d(t,{o:()=>l});var i=n(7396),r=n(9331),s=n(2340),o=n(4650),a=n(6554);let l=(()=>{class e{constructor(e){this.localFetch=e}getAttachmentsOld(e){return new Promise(((t,n)=>{const s=(0,i.IO)((0,i.hJ)(r.db,"solicitudes"),(0,i.ar)("id","==",e),(0,i.b9)(1));(0,i.cf)(s,(e=>{let n;e.forEach((e=>{n=e.data().attachments})),t(n)}),(e=>{n(e)}))}))}getAttachments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${s.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}uploadFile(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(`${s.N.baseUrl}/documents/upload-files`,e).then((e=>{e?t(e):n("No se pudieron subir los documentos..")})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.r))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},7489:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}noMatchPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/cancel",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/no-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendOTP(e){let t="/requests/clave-pin/otp";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/otp"),new Promise(((n,r)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendSecondTask(e){let t="/requests/clave-pin/secondTask";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/secondTask"),new Promise(((n,r)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5206:(e,t,n)=>{n.d(t,{s:()=>l});var i=n(6197),r=n(2340),s=n(4650),o=n(5089),a=n(6554);let l=(()=>{class e{constructor(e,t){this.utils=e,this.localFetch=t,this.db=(0,i.N8)()}getFlows(){return new Promise(((e,t)=>{this.localFetch.getFetch(r.N.baseUrl+"/flows").then((n=>{n?e(n):t(!1)}),(e=>{t(!1)}))}))}getFlowsByUserID(e){return new Promise(((t,n)=>{const r=(0,i.iH)((0,i.N8)());(0,i.U2)((0,i.iU)(r,`documents/flows/${e}`)).then((e=>{e.exists()?t(e.val()):n("No data!")})).catch((e=>{console.error(e),n("Error!: "+e)}))}))}}return e.ɵfac=function(t){return new(t||e)(s.ɵɵinject(o.F),s.ɵɵinject(a.r))},e.ɵprov=s.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},9617:(e,t,n)=>{n.d(t,{U:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getPackagesByUserID(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/users/"+e+"/pack-documents").then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getPacksByPackId(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/pack-documents/"+e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getFlowPackagesByUserID(e,t){}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5601:(e,t,n)=>{n.d(t,{M:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}setPhone(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${t}/person`,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}noPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-phone",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}smsToPin(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms-clave",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e,t,n){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let r="/requests/sms/otp";i.N.scraperMock&&(r="/mockscrapper/requests/sms/otp"),this.localFetch.postFetchWhitoutToken(i.N.baseUrl+r,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}uploadFileFromWidget(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(i.N.baseUrl+"/documents/upload-files-from-widget",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}getDocuments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}getDocumentsIds(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents-ids-widget`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}cancelRequest(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(i.N.baseUrl+`/requests/${t}/cancel`,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5145:(e,t,n)=>{n.d(t,{Z:()=>i});const i=[{id:0,text:"error_clave_pin",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Error con la clave PIN"},{id:1,text:"failed_without_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo sin reintento"},{id:111,text:"failed_with_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo con reintento"},{id:2,text:"bad_phone",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Teléfono erróneo"},{id:3,text:"failed_documents_downloaded",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo al descargar Documentos"},{id:4,text:"invalid_otp_aeat",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de AEAT inválido"},{id:5,text:"invalid_otp_seguridad_social",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de Seg. Social inválido"},{id:6,text:"max_entries_otp",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"not_interested",label:"Max intentos OTP"},{id:7,text:"abandoned_after_bad_phone",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"phonelink_erase",label:"Abandonado (bad phone)"},{id:8,text:"abandoned_after_terms",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (términos y condiciones)"},{id:9,text:"abandoned_after_invalid_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP SS)"},{id:10,text:"abandoned_after_invalid_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP AEAT)"},{id:11,text:"abandoned_after_waiting_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP AEAT)"},{id:12,text:"abandoned_after_waiting_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP SS)"},{id:13,text:"waiting_login_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login SS"},{id:14,text:"waiting_login_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login AEAT"},{id:15,text:"waiting_otp_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP AEAT"},{id:16,text:"waiting_otp_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP SS"},{id:17,text:"saved_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP guardado"},{id:171,text:"picked_up_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP recogido"},{id:18,text:"terms_and_conditions",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"Términos y condiciones"},{id:19,text:"waiting_documents",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"hourglass_empty",label:"Esperando documentos"},{id:20,text:"created",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"fiber_new",label:"Solicitud creada"},{id:21,text:"all_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Todo los documentos descargados"},{id:22,text:"partial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:23,text:"parcial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:24,text:"all_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Todos descargados y eliminados"},{id:25,text:"partial_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Algunos descargados y eliminados"},{id:26,text:"updated_data",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"check",label:"Datos del cliente actualizados"},{id:27,text:"resend_otp",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"refresh",label:"OTP reenviado"}]},8259:function(e,t){var n,i,r;
59
+ "use strict";if((self.webpackChunkvex=self.webpackChunkvex||[]).push([[163],{4163:(e,t,n)=>{n.r(t),n.d(t,{ClientCertModule:()=>Ft});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(8259),j=n(2340),F=n(1363),q=n(6830),Y=n(4650),V=n(5089),H=n(8460),z=n(529),B=n(6554);let U=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSignedFile(e){return new Promise(((t,n)=>{this.localFetch.postFile(j.N.baseUrl+"/requests/client-certificate/upload-file-signed",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(j.N.baseUrl+"/requests/client-certificate/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/requests/client-certificate/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(j.N.baseUrl+"/pre-request/client-certificate",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/client-certificate/otp";j.N.scraperMock&&(i="/mockscrapper/requests/client-certificate/otp"),this.localFetch.postFetchWhitoutToken(j.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵinject(V.F),Y.ɵɵinject(z.eN),Y.ɵɵinject(B.r))},e.ɵprov=Y.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var W=n(5412),$=n(833),G=n(4302),Z=n(3731);function K(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function Q(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}const X=function(e,t,n){return{color:e,border:t,background:n}};function J(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"small",13),Y.ɵɵtemplate(2,K,2,1,"span",7),Y.ɵɵtemplate(3,Q,2,2,"span",7),Y.ɵɵelementEnd(),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction3(3,X,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.lastNumberPhone)}}function ee(e,t){1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),Y.ɵɵelementEnd())}function te(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}const ne=function(e,t){return{color:e,background:t}};function ie(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"small",13),Y.ɵɵtemplate(2,ee,2,0,"span",7),Y.ɵɵtemplate(3,te,2,1,"span",7),Y.ɵɵelementStart(4,"a",14),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.resendOTP())})),Y.ɵɵtext(5,"Reenviar"),Y.ɵɵelementEnd()(),Y.ɵɵelementContainerEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction3(4,X,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.lastNumberPhone),Y.ɵɵadvance(1),Y.ɵɵproperty("ngStyle",Y.ɵɵpureFunction2(8,ne,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}function re(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementStart(5,"div",6),Y.ɵɵtemplate(6,J,4,7,"ng-container",7),Y.ɵɵtemplate(7,ie,6,11,"ng-container",7),Y.ɵɵelementEnd(),Y.ɵɵelementStart(8,"div",8)(9,"mat-form-field",9)(10,"mat-label"),Y.ɵɵtext(11," Código OTP "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"input",10),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.capturePasteEvent(t))}))("keyup",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setInputEvent(t))})),Y.ɵɵelementEnd()()()(),Y.ɵɵelementStart(13,"div",11)(14,"button",12),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(15,"Siguiente"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.otp.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,18,e.texts.otp.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵproperty("ngIf",e.secsCount&&e.secsCount>0),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.secsCount||e.secsCount<=0),Y.ɵɵadvance(7),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function se(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"p",17),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let oe=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new Y.EventEmitter(null),this.errPhone=new Y.EventEmitter(null),this.resendO=new Y.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?R(e.target).next().focus():"Backspace"==e.code&&R(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(P.gz))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,re,16,20,"form",0),Y.ɵɵtemplate(1,se,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ae=n(342);function le(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",3),Y.ɵɵelement(1,"div",4)(2,"div",5),Y.ɵɵpipe(3,"safeHtml"),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.success.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(3,8,e.texts.success.description||""),Y.ɵɵsanitizeHtml)}}function ce(e,t){if(1&e&&Y.ɵɵelement(0,"widget-documents",6),2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function de(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",7)(1,"button",8),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.gotoRedirect())})),Y.ɵɵtext(2),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1(" ",e.data.ClientCertificate.btnTextCallBack||"Haga click aquí para finalizar"," ")}}let ue=(()=>{class e{constructor(e){this.utils=e,this.showDocuments=!1}ngOnInit(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.automaticRedirectCallBack&&this.data.ClientCertificate.callBackUrl?setTimeout((()=>{location.assign(this.data.ClientCertificate.callBackUrl)}),2e3):this.data.ClientCertificate.showDocumentsOnSuccess&&(this.showDocuments=!0)}gotoRedirect(){this.data.ClientCertificate.enableUrlCallBack&&this.data.ClientCertificate.callBackUrl&&location.assign(this.data.ClientCertificate.callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",packId:"packId",requestID:"requestID",userId:"userId"},decls:3,vars:3,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,le,4,10,"div",0),Y.ɵɵtemplate(1,ce,1,3,"widget-documents",1),Y.ɵɵtemplate(2,de,3,7,"div",2)),2&e&&(Y.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.showDocuments),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.data.ClientCertificate.enableUrlCallBack))},dependencies:[i.O5,u.lW,ae.A,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function he(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",5)(1,"button",6),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.retry())})),Y.ɵɵtext(2,"Intentarlo nuevamente"),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function pe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",5)(1,"button",6),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.newRequest())})),Y.ɵɵtext(2,"Crear nueva solicitud"),Y.ɵɵelementEnd()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let me=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new Y.EventEmitter(null),this.newReq=new Y.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(y.o),Y.ɵɵdirectiveInject(I.T))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵtemplate(5,he,3,6,"div",4),Y.ɵɵtemplate(6,pe,3,6,"div",4),Y.ɵɵelementEnd()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵproperty("innerHTML",t.texts.fail.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,6,t.texts.fail.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(2),Y.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function fe(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span",7),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵtextInterpolate1("El archivo no puede pesar mas de ",e.max/1e3,"MB")}}function ge(e,t){if(1&e&&(Y.ɵɵelementStart(0,"span"),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵtextInterpolate2("",e.fileName," ",e.fileSize?"("+e.fileSize+"Kb)":"","")}}n(6866);const _e=function(e,t){return{"bg-red-500/20":e,"bg-slate-100/80":t}};let ve=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.max=1e4,this.newItemEvent=new Y.EventEmitter(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){const t=e.target.files[0];this.uploadForm.patchValue({file:t}),this.uploadForm.get("file").updateValueAndValidity();const n=new FormData;let i=this.uploadForm.get("file").value;this.fileName=i.name,this.fileSize=+(+i.size/1e3).toFixed(1),n.append("file",i),console.warn(this.uploadForm.get("file").value),console.error(t),t.size<=3e6&&this.newItemEvent.emit({file:t}),this.newItemEvent.emit(n)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["app-upload-file"]],inputs:{label:"label",acceptFiles:"acceptFiles",max:"max"},outputs:{newItemEvent:"change"},decls:11,vars:9,consts:[[1,"flex","flex-col","items-start","input-file-wrapper","my-1",3,"formGroup","ngClass"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"],["class","text-red-500",4,"ngIf"],[4,"ngIf"],[1,"text-red-500"]],template:function(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",0)(1,"mat-label"),Y.ɵɵtext(2),Y.ɵɵelementEnd(),Y.ɵɵelementStart(3,"input",1,2),Y.ɵɵlistener("change",(function(e){return t.fileChange(e)})),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",3)(6,"button",4),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵreference(4);return Y.ɵɵresetView(t.click())})),Y.ɵɵtext(7,"Seleccionar archivo"),Y.ɵɵelementEnd(),Y.ɵɵtext(8,"     "),Y.ɵɵtemplate(9,fe,2,1,"span",5),Y.ɵɵtemplate(10,ge,2,2,"span",6),Y.ɵɵelementEnd()()}2&e&&(Y.ɵɵproperty("formGroup",t.uploadForm)("ngClass",Y.ɵɵpureFunction2(6,_e,!t.fileName||t.fileSize>3e3,t.fileName&&t.fileSize<=3e3)),Y.ɵɵadvance(2),Y.ɵɵtextInterpolate(t.label),Y.ɵɵadvance(1),Y.ɵɵproperty("accept",t.acceptFiles),Y.ɵɵadvance(6),Y.ɵɵproperty("ngIf",t.fileSize>t.max),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.fileSize<=t.max))},dependencies:[i.mk,i.O5,p.ɵNgNoValidate,p.NgControlStatusGroup,p.FormGroupDirective,A.hX,u.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})();function ye(e,t){if(1&e&&(Y.ɵɵelementStart(0,"mat-hint",21),Y.ɵɵtext(1),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵtextInterpolate(e.errorDNI)}}function be(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),Y.ɵɵtext(8,"Nombre de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(9,"input",8),Y.ɵɵelementEnd(),Y.ɵɵelementStart(10,"mat-form-field",7)(11,"mat-label"),Y.ɵɵtext(12,"Primer apellido de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(13,"input",9),Y.ɵɵelementEnd(),Y.ɵɵelementStart(14,"mat-form-field",7)(15,"mat-label"),Y.ɵɵtext(16,"Segundo apellido de la persona responsable"),Y.ɵɵelementEnd(),Y.ɵɵelement(17,"input",10),Y.ɵɵelementEnd(),Y.ɵɵelementStart(18,"mat-form-field",7)(19,"mat-label"),Y.ɵɵtext(20,"Email"),Y.ɵɵelementEnd(),Y.ɵɵelement(21,"input",11),Y.ɵɵelementEnd(),Y.ɵɵelementStart(22,"mat-form-field",7)(23,"mat-label"),Y.ɵɵtext(24,"Telefono"),Y.ɵɵelementEnd(),Y.ɵɵelement(25,"input",12),Y.ɵɵelementEnd(),Y.ɵɵelementStart(26,"mat-form-field",7)(27,"mat-label"),Y.ɵɵtext(28,"Número de documento de identificación"),Y.ɵɵelementEnd(),Y.ɵɵelement(29,"input",13),Y.ɵɵtemplate(30,ye,2,1,"mat-hint",14),Y.ɵɵelementEnd(),Y.ɵɵelementStart(31,"mat-form-field",7)(32,"mat-label"),Y.ɵɵtext(33,"Razón social"),Y.ɵɵelementEnd(),Y.ɵɵelement(34,"input",15),Y.ɵɵelementEnd(),Y.ɵɵelementStart(35,"mat-form-field",7)(36,"mat-label"),Y.ɵɵtext(37,"CIF"),Y.ɵɵelementEnd(),Y.ɵɵelement(38,"input",16),Y.ɵɵelementEnd(),Y.ɵɵelementStart(39,"app-upload-file",17),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setAnvers(t))})),Y.ɵɵelementEnd(),Y.ɵɵelementStart(40,"app-upload-file",18),Y.ɵɵlistener("change",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext();return Y.ɵɵresetView(n.setRevers(t))})),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(41,"div",19)(42,"button",20),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(43," Siguiente "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.form.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,51,e.texts.form.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.name?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.lastname?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.secondlastname?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.phone?"disabled-input":""," w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.phone?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.dni?-1:1),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorDNI),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.razon?-1:1),Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),Y.ɵɵadvance(3),Y.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.cif?-1:1),Y.ɵɵadvance(1),Y.ɵɵproperty("max",2e3),Y.ɵɵadvance(1),Y.ɵɵproperty("max",2e3),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function xe(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",22),Y.ɵɵelement(1,"mat-progress-spinner",23),Y.ɵɵelementStart(2,"p",24),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}const we={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.next=new Y.EventEmitter(null),this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1}}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}setForm(e){let t=e&&e.person_name?e.person_name:null,n=e&&(e.email||e.email_copy)?e.email||e.email_copy:null,i=e&&e.person_last_name?e.person_last_name:null,r=e&&e.person_last_name2?e.person_last_name2:null,s=e?e.person_document_number||e.document_number:null,o=e&&e.razon_social?e.razon_social:null,a=e&&e.cif?e.cif:null,l=e&&e.phone?e.phone:null;this.form=this.fb.group({name:[t||null,[p.Validators.required]],lastname:[i||null,[p.Validators.required]],lastname2:[r||null],dni:[s||null,[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9),this.regexDNI()]],razon:[o||null,[p.Validators.required]],email:[n,[p.Validators.required,p.Validators.email]],phone:[l,[p.Validators.required]],cif:[a||null,[p.Validators.required,p.Validators.minLength(9),p.Validators.maxLength(9)]],document_front:[null,[p.Validators.required]],document_back:[null,[p.Validators.required]]}),this.requestIDFromURL&&this.disableEnableInputs(!1,t,i,r,n,l,s,o,a),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,r,s,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:r||!1,phone:s||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}if(e){this.setRegex(e)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),console.warn(this.isDni,this.isNie),this.errorDNI=this.isDni||this.isNie?null:"Debes ingresar un DNI o NIE válido!",this.cd.markForCheck())}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}nextStep(){let e={name:this.form.get("name").value,lastname:this.form.get("lastname").value,lastname2:this.form.get("lastname2").value,dni:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,document_front:this.form.get("document_front").value,document_back:this.form.get("document_back").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("lastname2").value,email_copy:this.form.get("email").value,phone:this.form.get("phone").value,document_number:this.form.get("dni").value,check_legal:!0,type:"LEGAL",rmc_validation:!0,validation_id:!0};this.data.config.activatePower&&(e.power_activate=1),this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(Y.ChangeDetectorRef))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",loading:"loading",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep"},features:[Y.ɵɵProvidersFeature([{provide:M.sG,useValue:we},{provide:Y.LOCALE_ID,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","lastname2","matInput","",3,"tabindex"],["formControlName","email","matInput","",3,"tabindex"],["formControlName","phone","maxlength","9","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","placeholder","Ej: 12345678R","matInput","",3,"tabindex"],["class","text-xs text-red-500",4,"ngIf"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","maxlength","9","placeholder","Ej: B12345678","type","text","matInput","",3,"tabindex"],["label","Anverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],["label","Reverso documento de identificación (Max 2MB)",1,"w-full",3,"max","change"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-xs","text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,be,44,53,"form",0),Y.ɵɵtemplate(1,xe,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,ve,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Se=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"form",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd()()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",t.texts.noService.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,8,t.texts.noService.description),Y.ɵɵsanitizeHtml))},dependencies:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Me=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new Y.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.UntypedFormBuilder),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(y.o),Y.ɵɵdirectiveInject(I.T))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-md","mb-2","mt-2"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0)(1,"div",1),Y.ɵɵelement(2,"div",2)(3,"div",3),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementStart(5,"div",4),Y.ɵɵtext(6),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(7,"div",5)(8,"button",6),Y.ɵɵlistener("click",(function(){return t.retry()})),Y.ɵɵtext(9,"Intentarlo nuevamente"),Y.ɵɵelementEnd()()()),2&e&&(Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",t.texts.abandoned.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,15,t.texts.abandoned.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" Estado: ",t.getTextStatus()," "),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ie(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function ke(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña es requerida "),Y.ɵɵelementEnd())}function Ee(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),Y.ɵɵelementEnd())}function Te(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," Es necesario repetir la contraseña "),Y.ɵɵelementEnd())}function Pe(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," Las contraseñas deben coincidir "),Y.ɵɵelementEnd())}function Oe(e,t){1&e&&(Y.ɵɵelementStart(0,"mat-hint",14),Y.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),Y.ɵɵelementEnd())}function De(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),Y.ɵɵtext(8,"Contraseña"),Y.ɵɵelementEnd(),Y.ɵɵelement(9,"input",8),Y.ɵɵtemplate(10,ke,2,0,"mat-hint",9),Y.ɵɵtemplate(11,Ee,2,0,"mat-hint",9),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"mat-form-field",10)(13,"mat-label"),Y.ɵɵtext(14,"Repite Contraseña"),Y.ɵɵelementEnd(),Y.ɵɵelement(15,"input",11),Y.ɵɵtemplate(16,Te,2,0,"mat-hint",9),Y.ɵɵtemplate(17,Pe,2,0,"mat-hint",9),Y.ɵɵtemplate(18,Oe,2,0,"mat-hint",9),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(19,"div",12)(20,"button",13),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(21," Guardar "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.password.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,21,e.texts.password.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(7),Y.ɵɵproperty("ngIf",e.f.password.touched&&e.f.password.invalid&&e.f.password.errors.required),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.password.invalid&&e.f.password.errors.minlength),Y.ɵɵadvance(5),Y.ɵɵproperty("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.required),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.confirm_password.touched&&e.f.confirm_password.touched&&e.f.confirm_password.invalid&&e.f.confirm_password.errors.confirmedValidator),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.f.confirm_password.invalid&&e.f.confirm_password.errors.minlength),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.form.invalid)}}function Le(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"p",17),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}const Ae={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ne=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new Y.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Ie("password","confirm_password")})}nextStep(){this.next.emit(this.form.get("password").value)}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder),Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading"},outputs:{next:"nextStep"},features:[Y.ɵɵProvidersFeature([{provide:M.sG,useValue:Ae},{provide:Y.LOCALE_ID,useValue:"es-ES"}])],decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,De,22,23,"form",0),Y.ɵɵtemplate(1,Le,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,b.Ou,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Re=n(1763),je=n(5696);function Fe(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function qe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setTerms(t))})),Y.ɵɵelementStart(2,"belender-terms-and-policy-links",12),Y.ɵɵlistener("goToTerms",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.gotoTermsAndConditions(t))})),Y.ɵɵelementEnd()(),Y.ɵɵtemplate(3,Fe,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("mt-8 flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.acceptTerms?"bg-orange-500/10 ":""," pr-4 rounded-sm"),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(1),Y.ɵɵproperty("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorType.termsRead||e.errorType.acceptTerms)}}function Ye(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function Ve(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setPower(t))})),Y.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),Y.ɵɵelementStart(3,"a",15),Y.ɵɵlistener("click",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.gotoPowerConditions(t))})),Y.ɵɵelementStart(4,"u"),Y.ɵɵtext(5,"aquí"),Y.ɵɵelementEnd()()(),Y.ɵɵtemplate(6,Ye,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("flex justify-between items-center w-full flex-100 ",e.errorType.termsRead||e.errorType.powerAccept?"bg-orange-500/10 ":"",""),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(5),Y.ɵɵproperty("ngIf",e.errorType.powerAccept)}}function He(e,t){1&e&&Y.ɵɵelement(0,"mat-icon",14)}function ze(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div")(1,"belender-checkbox",11),Y.ɵɵlistener("changeCheckbox",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(2);return Y.ɵɵresetView(n.setAssignment(t))})),Y.ɵɵelement(2,"div",16),Y.ɵɵelementEnd(),Y.ɵɵtemplate(3,He,1,0,"mat-icon",13),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵclassMapInterpolate1("flex justify-between items-center w-full flex-100 ",e.errorType.assignment?"bg-orange-500/10 ":""," pr-4 rounded-sm"),Y.ɵɵadvance(1),Y.ɵɵproperty("color",e.data.styles.colors.title),Y.ɵɵadvance(1),Y.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errorType.assignment)}}function Be(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",19),Y.ɵɵelement(1,"mat-icon",20),Y.ɵɵtext(2),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext().$implicit;Y.ɵɵadvance(2),Y.ɵɵtextInterpolate1(" ",e," ")}}function Ue(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,Be,3,1,"div",18),Y.ɵɵelementContainerEnd()),2&e){const e=t.index;Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e<3)}}function We(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,Ue,2,1,"ng-container",17),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngForOf",e.errors)}}function $e(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",2)(1,"div",3),Y.ɵɵelement(2,"div",4)(3,"div",5),Y.ɵɵpipe(4,"safeHtml"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",6),Y.ɵɵtemplate(6,qe,4,7,"div",7),Y.ɵɵtemplate(7,Ve,7,5,"div",7),Y.ɵɵtemplate(8,ze,4,6,"div",7),Y.ɵɵelementEnd(),Y.ɵɵtemplate(9,We,2,1,"ng-container",8),Y.ɵɵelementStart(10,"div",9)(11,"button",10),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(12,"Siguiente"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",e.texts.tyc.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(4,19,e.texts.tyc.description||""),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(3),Y.ɵɵproperty("ngIf",!e.data.config.hideCheckLegal),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.requestID?null==e.solicitud?null:e.solicitud.power_activate:null==e.data?null:e.data.config.activatePower),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",null==e.data?null:e.data.config.dataAssignmentCheck),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.errors&&e.errors.length),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.getErrorValidation()?"":e.data.styles.colors.btnText)("background",e.getErrorValidation()?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",e.getErrorValidation())}}function Ge(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",21),Y.ɵɵelement(1,"mat-progress-spinner",22),Y.ɵɵelementStart(2,"p",23),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let Ze=(()=>{class e{constructor(e){this.utils=e,this.requestID=null,this.powerAccepted=!1,this.next=new Y.EventEmitter(null),this.goTerms=new Y.EventEmitter(null),this.goTermsCert=new Y.EventEmitter(null),this.gotoPower=new Y.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!0,this.powerActivate=!1,this.termsReaded=!1,this.terms2Readed=!0,this.assignment=!1,this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1}}ngOnInit(){}nextStep(){this.next.emit(this.powerActivate)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.terms2Readed=!0,this.goTermsCert.emit(!0)}gotoPowerConditions(e){e.preventDefault(),e.stopPropagation(),this.gotoPower.emit(!0)}setAssignment(e){this.assignment=e}setPower(e){this.powerActivate=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}getErrorValidation(){this.errors=[],this.errorType={termsRead:!1,terms2Read:!1,powerRead:!1,powerAccept:!1,acceptTerms:!1,acceptTerms2:!1,assignment:!1,acceptPower:!1};let e=!1;return this.data.config.forceChecks&&(!this.termsReaded&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe leer los términos y condiciones del servicio"),this.errorType.termsRead=!0,e=!0),this.terms2Readed||(this.errors.push("Debe leer los términos y condiciones para la emisión de certificado"),this.errorType.terms2Read=!0,e=!0)),!this.acceptTerms&&!this.data.config.hideCheckLegal&&(this.errors.push("Debe aceptar los términos y condiciones del servicio"),this.errorType.acceptTerms=!0,e=!0),this.acceptTerms2||(this.errors.push("Debe aceptar los términos y condiciones para la emisión de certificado"),this.errorType.acceptTerms2=!0,e=!0),this.data.config.dataAssignmentCheck&&!this.assignment&&(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.assignment=!0,e=!0),(this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&(this.powerActivate||(this.errors.push("Debe consentir la activación de un poder digital registrado en el REA"),this.errorType.powerAccept=!0,e=!0)),e}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(V.F))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-terms-step"]],inputs:{userId:"userId",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",powerAccepted:"powerAccepted"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",gotoPower:"gotoPowerConditions"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[3,"class",4,"ngIf"],[4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"color","changeCheckbox"],[3,"userId","showPolicyLink","goToTerms"],["class","text-xs w-4 h-4 text-orange-500","svgIcon","mat:warning",4,"ngIf"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4","text-orange-500"],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[1,"custom-html",3,"innerHTML"],[4,"ngFor","ngForOf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500 ",4,"ngIf"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,$e,13,21,"div",0),Y.ɵɵtemplate(1,Ge,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.sg,i.O5,d.Hw,u.lW,b.Ou,Re.b,je.T,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ke=n(4468);function Qe(e,t){1&e&&(Y.ɵɵelementStart(0,"div",12),Y.ɵɵelement(1,"mat-icon",13),Y.ɵɵtext(2," Archivo firmado cargado "),Y.ɵɵelementEnd())}function Xe(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"button",14),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.onClickAutofirma())})),Y.ɵɵtext(1,"Firmar certificado"),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function Je(e,t){1&e&&(Y.ɵɵelementStart(0,"div",15),Y.ɵɵelement(1,"mat-progress-spinner",16),Y.ɵɵelementStart(2,"span",17),Y.ɵɵtext(3,"Esperando autofirma..."),Y.ɵɵelementEnd()())}function et(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"form",2)(1,"div",3)(2,"h1",4),Y.ɵɵtext(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),Y.ɵɵelementEnd(),Y.ɵɵelementStart(4,"p"),Y.ɵɵtext(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(6,"p"),Y.ɵɵtext(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(8,"p"),Y.ɵɵtext(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(10,"p"),Y.ɵɵtext(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"p"),Y.ɵɵtext(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(14,"p"),Y.ɵɵtext(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(16,"p"),Y.ɵɵtext(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(18,"p"),Y.ɵɵtext(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(20,"h1",5),Y.ɵɵtext(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(22,"p"),Y.ɵɵtext(23," Firmo el presente documento para dejar constancia: "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(24,"p"),Y.ɵɵtext(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(26,"p"),Y.ɵɵtext(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(28,"p"),Y.ɵɵtext(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(30,"p"),Y.ɵɵtext(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(32,"div",6),Y.ɵɵtemplate(33,Qe,3,0,"div",7),Y.ɵɵtemplate(34,Xe,2,6,"button",8),Y.ɵɵtemplate(35,Je,4,0,"div",9),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(36,"div",10)(37,"button",11),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.nextStep())})),Y.ɵɵtext(38,"Completar"),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("formGroup",e.form),Y.ɵɵadvance(33),Y.ɵɵproperty("ngIf",e.signedFile&&!e.loadingAutofirma),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.signedFile&&!e.loadingAutofirma),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.loadingAutofirma),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",e.signedFile?e.data.styles.colors.btnText:"")("background",e.signedFile?e.data.styles.colors.btnBg:"")("border-radius",e.data.styles.btnRound+"px"),Y.ɵɵproperty("disabled",!e.signedFile)}}function tt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",18),Y.ɵɵelement(1,"mat-progress-spinner",19),Y.ɵɵelementStart(2,"p",20),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(3),Y.ɵɵtextInterpolate(e.loading)}}let nt=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.notis=t,this.utils=n,this._autofirma=i,this.form=new p.FormGroup({}),this.next=new Y.EventEmitter(null),this.loadingAutofirma=!1}ngOnInit(){this.setForm(),this.blobFile=this.base64ToBlob(this.pdfFile64,"application/pdf");const e=URL.createObjectURL(this.blobFile);this.pdfHtml="<iframe width='100%' height='100%' src='"+e+"'></iframe>",this.pdfHtml+=`<img style="width: 100%; min-heigth: 300px" src="${e}" />`}base64ToBlob(e,t="application/octet-stream"){const n=atob(e),i=n.length,r=new Uint8Array(i);for(let e=0;e<i;e++)r[e]=n.charCodeAt(e);return new Blob([r],{type:t})}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({file_signed:["",[p.Validators.required]]})}nextStep(){this.next.emit({file_signed:this.signedFile})}onChangeFile(e){const t=e.target;!t||!t.files||(this.file=t.files[0])}blobToFile(e,t){return e.lastModifiedDate=new Date,e.name=t,e}onClickAutofirma(){var e=this;return(0,D.Z)((function*(){e.loadingAutofirma=!0;let t,n="signed_document";e.file=e.blobToFile(e.blobFile,n),e._autofirma.requestPDFSignature(e.file,{headless:!0,filters:{"issuer.rfc2254":"(CN=AC Representa*)"}}).then((i=>{t=i,e.loadingAutofirma=!1;let r=new File([t],n+"_signed.pdf",{type:e.file.type});e.signedFile=r,e.nextStep()})).catch((t=>{t?.message?.includes("ApplicationNotFoundException")?e.notis.showAlert("No se encuentra AutoFirma","No se ha encontrado el programa de autofirma instalado en su computador, por favor descarguelo en el siguiente link y vuelva a intentarlo.","info",{cancelButtonLabel:"Ir a Autofirma",okButtonLabel:"Cerrar",cancelAction:function(){window.open("https://firmaelectronica.gob.es/Home/Descargas.html","_blank")}}):e.notis.showAlert("Error desconocido","Ha ocurrido un error: "+t)}))}))()}fileToUrl(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.readAsDataURL(e)}))}setAnvers(e){e&&e.file&&this.form.patchValue({document_front:e.file})}setRevers(e){e&&e.file&&this.form.patchValue({document_back:e.file})}}return e.ɵfac=function(t){return new(t||e)(Y.ɵɵdirectiveInject(p.FormBuilder),Y.ɵɵdirectiveInject(I.T),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(Ke.Kj))},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-autofirma-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",pdfFile64:"pdfFile64"},outputs:{next:"nextStep"},decls:2,vars:2,consts:[["class","animated fadeIn fixed-content px-2",3,"formGroup",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px] animated fadeIn",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"my-3","bg-slate-50","p-2","rounded-md","flex","max-h-[300px]","overflow-y-auto","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],[1,"font-bold"],[1,"pt-3","font-bold"],[1,"flex","w-full","items-center","justify-end","gap-2","p-4"],["class","flex gap-1 text-green-500 items-center justify-end w-full",4,"ngIf"],["class","px-8","mat-flat-button","","type","button",3,"color","background","border-radius","click",4,"ngIf"],["class","flex items-center gap-2",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"flex","gap-1","text-green-500","items-center","justify-end","w-full"],["svgIcon","mat:check_circle"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"flex","items-center","gap-2"],["color","accent","diameter","20","value","0","mode","indeterminate",1,"spinner"],[1,"text-black"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,et,39,11,"form",0),Y.ɵɵtemplate(1,tt,4,1,"div",1)),2&e&&(Y.ɵɵproperty("ngIf",!t.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.loading))},dependencies:[i.O5,d.Hw,u.lW,p.ɵNgNoValidate,p.NgControlStatusGroup,p.FormGroupDirective,b.Ou],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),it=(()=>{class e{constructor(){this.next=new Y.EventEmitter(null)}ngOnInit(){}nextStep(){this.next.emit(!0)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=Y.ɵɵdefineComponent({type:e,selectors:[["belender-requisites-step"]],inputs:{data:"data",texts:"texts",loading:"loading"},outputs:{next:"nextStep"},decls:15,vars:18,consts:[[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],["href","https://firmaelectronica.gob.es/Home/Descargas.html","target","_blank",1,"text-blue-500","font-bold","underline"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(Y.ɵɵelementStart(0,"div",0),Y.ɵɵelement(1,"div",1)(2,"div",2),Y.ɵɵpipe(3,"safeHtml"),Y.ɵɵelementStart(4,"div",3),Y.ɵɵtext(5," Si no tiene "),Y.ɵɵelementStart(6,"strong"),Y.ɵɵtext(7,"Autofirma"),Y.ɵɵelementEnd(),Y.ɵɵtext(8," instalado, antes de continuar, puedes instalarlo siguiendo este "),Y.ɵɵelementStart(9,"a",4),Y.ɵɵtext(10,"link"),Y.ɵɵelementEnd(),Y.ɵɵtext(11,". "),Y.ɵɵelementEnd(),Y.ɵɵelementStart(12,"div",5)(13,"button",6),Y.ɵɵlistener("click",(function(){return t.nextStep()})),Y.ɵɵtext(14,"Siguiente"),Y.ɵɵelementEnd()()()),2&e&&(Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),Y.ɵɵproperty("innerHTML",null==t.texts||null==t.texts.requisites?null:t.texts.requisites.title,Y.ɵɵsanitizeHtml),Y.ɵɵadvance(1),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵproperty("innerHTML",Y.ɵɵpipeBind1(3,16,null==t.texts||null==t.texts.requisites?null:t.texts.requisites.description),Y.ɵɵsanitizeHtml),Y.ɵɵadvance(2),Y.ɵɵstyleProp("color",t.data.styles.colors.text),Y.ɵɵadvance(9),Y.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,Z.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function rt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"vex-power-cert",3),Y.ɵɵlistener("accept",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext();return Y.ɵɵresetView(t.acceptPowerCert())})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext();Y.ɵɵproperty("hideButtons",!1)("flow","ClientCertificate")("userId",e.userId)}}function st(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",9),Y.ɵɵelement(1,"img",10),Y.ɵɵelementEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("src",e.data.styles.logoUrl,Y.ɵɵsanitizeUrl)}}function ot(e,t){1&e&&(Y.ɵɵelementStart(0,"div",11),Y.ɵɵelement(1,"mat-progress-spinner",12),Y.ɵɵelementEnd()),2&e&&(Y.ɵɵadvance(1),Y.ɵɵproperty("value",0))}function at(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-form-step",24),Y.ɵɵlistener("gotoPowerConditions",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoPowerConditions())}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendFormData(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("flowName",e.flowName)("loading",e.loading)("requestIDFromURL",e.requestIDFromURL)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function lt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-requisites-step",25),Y.ɵɵlistener("nextStep",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.showRequisitesPage=!1)})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function ct(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-terms-step",26),Y.ɵɵlistener("goToTerms",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoTermsAndConditions())}))("gotoPowerConditions",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.acceptTerms(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("userId",e.userId)("requestID",e.requestID)("data",e.data)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)("loading",e.loading)}}function dt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-password-step",27),Y.ɵɵlistener("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendPassword(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ut(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-autofirma-step",28),Y.ɵɵlistener("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.sendDocument(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("pdfFile64",e.pdfFile64)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ht(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-otp-step",29),Y.ɵɵlistener("resendOTP",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(3);return Y.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.requestOTP(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function pt(e,t){if(1&e&&Y.ɵɵelement(0,"belender-success-step",30),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function mt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-fail-step",31),Y.ɵɵlistener("retry",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.newRequest(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("solicitud",e.solicitud)}}function ft(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"belender-abandoned-step",32),Y.ɵɵlistener("retry",(function(t){Y.ɵɵrestoreView(e);const n=Y.ɵɵnextContext(3);return Y.ɵɵresetView(n.retryRequest(t))})),Y.ɵɵelementEnd()}if(2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)}}function gt(e,t){if(1&e&&Y.ɵɵelement(0,"belender-no-service-step",33),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵproperty("loading",e.loading)("texts",null==e.data.ClientCertificate?null:e.data.ClientCertificate.texts)("data",e.data)}}function _t(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",34)(1,"div",35)(2,"h1",36),Y.ɵɵtext(3,"No existe la solicitud"),Y.ɵɵelementEnd()(),Y.ɵɵelementStart(4,"div",37),Y.ɵɵtext(5," No existen solicitudes activas con el código requerido "),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext(3);Y.ɵɵadvance(4),Y.ɵɵstyleProp("color",e.data.styles.colors.text)}}function vt(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵtemplate(1,at,1,6,"belender-form-step",13),Y.ɵɵtemplate(2,lt,1,3,"belender-requisites-step",14),Y.ɵɵtemplate(3,ct,1,6,"belender-terms-step",15),Y.ɵɵtemplate(4,dt,1,4,"belender-password-step",16),Y.ɵɵtemplate(5,ut,1,5,"belender-autofirma-step",17),Y.ɵɵtemplate(6,ht,1,4,"belender-otp-step",18),Y.ɵɵtemplate(7,pt,1,6,"belender-success-step",19),Y.ɵɵtemplate(8,mt,1,4,"belender-fail-step",20),Y.ɵɵtemplate(9,ft,1,4,"belender-abandoned-step",21),Y.ɵɵtemplate(10,gt,1,3,"belender-no-service-step",22),Y.ɵɵtemplate(11,_t,6,2,"div",23),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data&&"form"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","autofirma"==e.getStatus()&&e.showRequisitesPage),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","terms"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","password"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","autofirma"==e.getStatus()&&e.pdfFile64&&!e.showRequisitesPage),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","otp"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","success"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","failed"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","abandoned"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","no-service"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function yt(e,t){1&e&&Y.ɵɵelement(0,"belender-disabled-url")}function bt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",38),Y.ɵɵelement(1,"mat-progress-spinner",39),Y.ɵɵelementStart(2,"p",40),Y.ɵɵtext(3),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(3),Y.ɵɵtextInterpolate1(" ",e.loading," ")}}function xt(e,t){if(1&e){const e=Y.ɵɵgetCurrentView();Y.ɵɵelementStart(0,"div",41)(1,"div",34)(2,"div",42),Y.ɵɵtext(3,"Error!"),Y.ɵɵelementEnd(),Y.ɵɵelement(4,"div",43),Y.ɵɵelementEnd(),Y.ɵɵelementStart(5,"div",44)(6,"button",45),Y.ɵɵlistener("click",(function(){Y.ɵɵrestoreView(e);const t=Y.ɵɵnextContext(2);return Y.ɵɵresetView(t.error=!1)})),Y.ɵɵtext(7," Ingresar manualmente "),Y.ɵɵelementEnd()()()}if(2&e){const e=Y.ɵɵnextContext(2);Y.ɵɵadvance(4),Y.ɵɵstyleProp("color",e.data.styles.colors.text),Y.ɵɵproperty("innerHTML",e.error,Y.ɵɵsanitizeHtml)}}function wt(e,t){if(1&e&&(Y.ɵɵelementStart(0,"div",4)(1,"div"),Y.ɵɵtemplate(2,st,2,1,"div",5),Y.ɵɵtemplate(3,ot,2,1,"div",6),Y.ɵɵtemplate(4,vt,12,11,"ng-container",2),Y.ɵɵtemplate(5,yt,1,0,"belender-disabled-url",2),Y.ɵɵtemplate(6,bt,4,1,"div",7),Y.ɵɵtemplate(7,xt,8,3,"div",8),Y.ɵɵelementEnd()()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(1),Y.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),Y.ɵɵstyleProp("background",e.data.styles.colors.background),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.error),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.error&&e.disableURL),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",e.loading),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",!e.loading&&e.error)}}function Ct(e,t){if(1&e&&(Y.ɵɵelementContainerStart(0),Y.ɵɵelementStart(1,"div",46),Y.ɵɵtext(2),Y.ɵɵelementEnd(),Y.ɵɵelementContainerEnd()),2&e){const e=Y.ɵɵnextContext();Y.ɵɵadvance(2),Y.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}let St=class{constructor(e,t,n,i,r,s,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.certificateService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.showRequisitesPage=!0,this.requestCreated=!1,this.requestIDFromURL=!1,this.flowName="ClientCertificate"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=j.N.env&&(R(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),R(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendPreRequest(){this.certificateService.preRequest({user_id:this.userId,package_id:this.packId}).then((e=>{e&&e.data&&(this.requestID=e.data.request_id),this.loading=!1})).catch((e=>{console.error(e),this.loading=!1}))}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.phone&&(this.solicitud.phone=e.phone),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_last_name&&(this.solicitud.person_last_name=e.lastname),e.second_lastname&&!this.solicitud.person_last_name2&&(this.solicitud.person_last_name2=e.second_lastname)}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){const e=this;this.Activatedroute.queryParams.subscribe((t=>{t&&this.setParamsToRequest(t),t&&t.acceptTerms&&(this.autoAcceptTerms=!0),t&&t.request_id?(this.disableURL=!1,e.requestID=t.request_id,this.setFormFromVcCode(t.request_id)):(e.sendPreRequest(),console.error("con paramas"))}),(e=>{this.loading=!1,console.error("sin paramas")}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.pdfFile64=t.solicitud.file,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=!0,t.autoAcceptTerms&&t.acceptTerms(!0)):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){const e=this;if(e.socket)return;let t="wss://notifications.dev.belender.net";"qa"==j.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==j.N.env&&(t="wss://notifications.belender.net"),j.N.notificationsBaseUrl&&(t=j.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${e.requestID}&user_id=${e.userId}`),this.socket.onopen=function(n){console.log("Conexión establecida: ",`${t}?requests_id=${e.requestID}&user_id=${e.userId}`)},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from ws:",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}sendFormData(e){this.requestID&&(e.request_id=this.requestID),e.user_id=this.userId,e.package_id=this.packId,e.validation_id=0;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.addRequest(t).then((e=>{e&&e.length&&this.setSubscriptionOfRequest(),this.loading=null})).catch((e=>{console.error("promise error: ",e),this.loading=null}))}uploadFiles(e){return new Promise(((t,n)=>{this.certificateService.addSignedFile(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),n(e),this.loading=null,this.cd.markForCheck()):e&&e.status&&"success"==e.status?t(!0):(this.showAlert("Error!","Error desconocido: "+e),n(e),this.loading=null,this.cd.markForCheck())})).catch((e=>{n(e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck()}))}))}addRequest(e){return new Promise(((t,n)=>{this.certificateService.addSolicitud(e).then((e=>{e&&e.status&&"error"==e.status?(e.message&&(this.showAlert("Error!",400==e.code&&"Does not have Known client service"==e.message?"El usuario no tiene servicio PIN habilitado!":400==e.code&&"Incorrect date"==e.message?"Fecha incorrecta!":e.message),n(e.message)),this.loading=null,this.cd.markForCheck(),n(e)):e&&e.status&&"success"==e.status?(this.solicitud=e.data,this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck(),t(e.data)):(this.showAlert("Error!","Error desconocido: "+e),n(e))})).catch((e=>{console.error("respuesta desde pin service: ",e),e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage),this.loading=null,this.cd.markForCheck(),n(e)}))}))}acceptTerms(e){this.loading="Iniciando el proceso de emisión de certificado..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e?1:0),this.certificateService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando información..",this.certificateService.sendPassword({request_id:this.solicitud.request_id,password:e}).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.pdfFile64=e.file,this.cd.markForCheck()),this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendDocument(e){e.request_id=this.requestID;const t=new FormData;let n=Object.keys(e);for(const i of n)t.append(i,e[i]);this.loading="Subiendo documentación...",this.uploadFiles(t).then((e=>{e&&(this.solicitud.status_code="consent_process_completed")})).catch((e=>{console.error(e)}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.certificateService.sendOtp(t).then((e=>{e.status&&"error"==e.status?this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck()),this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.requestCreated=!0,this.requestIDFromURL=!0,this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}disconnectWebsocket(){console.log("intentando desconectar ws..."),this.socket&&this.socket.close()}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":this.solicitud&&"terms_and_conditions"==this.solicitud.status_code?"terms":this.solicitud&&"waiting_acceptance_file_signed"==this.solicitud.status_code?(console.log("returning autofirma"),"autofirma"):!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"waiting_otp"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":"error-data":(this.disconnectWebsocket(),this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success"):"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(q.L,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoTermsAndConditionsCertificate(){this.dialog.open(F.v,{panelClass:"fullscreen-dialog",data:{flow:"certificate"}})}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};St.ɵfac=function(e){return new(e||St)(Y.ɵɵdirectiveInject(Y.ChangeDetectorRef),Y.ɵɵdirectiveInject(P.gz),Y.ɵɵdirectiveInject(V.F),Y.ɵɵdirectiveInject(_.M),Y.ɵɵdirectiveInject(C.w),Y.ɵɵdirectiveInject(H.r),Y.ɵɵdirectiveInject(I.T),Y.ɵɵdirectiveInject(U),Y.ɵɵdirectiveInject(W.uw))},St.ɵcmp=Y.ɵɵdefineComponent({type:St,selectors:[["belender-widget-client-cert"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[Y.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper flex flex-col gap-2 items-center justify-center h-full min-h-[200px]",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep",4,"ngIf"],[3,"data","loading","texts","nextStep",4,"ngIf"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep",4,"ngIf"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","packId","userId","requestID","loading","texts",4,"ngIf"],[3,"data","loading","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","loading","texts","retry",4,"ngIf"],[3,"loading","texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","flowName","loading","requestIDFromURL","texts","solicitud","gotoPowerConditions","nextStep"],[3,"data","loading","texts","nextStep"],[3,"userId","requestID","data","texts","solicitud","loading","goToTerms","gotoPowerConditions","goToTermsCertificate","nextStep"],[3,"data","loading","texts","solicitud","nextStep"],[3,"data","pdfFile64","loading","texts","solicitud","nextStep"],[3,"data","loading","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","packId","userId","requestID","loading","texts"],[3,"data","loading","texts","solicitud","retry","newRequest"],[3,"solicitud","data","loading","texts","retry"],[3,"loading","texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","flex","flex-col","gap-2","items-center","justify-center","h-full","min-h-[200px]"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(Y.ɵɵtemplate(0,rt,1,3,"vex-power-cert",0),Y.ɵɵtemplate(1,wt,8,11,"div",1),Y.ɵɵtemplate(2,Ct,3,1,"ng-container",2)),2&e&&(Y.ɵɵproperty("ngIf",t.viewPowerTerms),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.data),Y.ɵɵadvance(1),Y.ɵɵproperty("ngIf",t.testMode))},dependencies:[i.O5,u.lW,b.Ou,$.L,G.q,oe,ue,me,Ce,Se,Me,Ne,Ze,nt,it],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),St=(0,L.gn)([(0,N.c)()],St);const Mt=[{path:":idUser",component:St},{path:":idUser/:packID",component:St}];let It=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({imports:[P.Bz.forChild(Mt),P.Bz,O.d8]}),e})();var kt=n(6981),Et=n(3848),Tt=n(1129),Pt=n(969),Ot=n(7009);let Dt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({imports:[i.ez,Ot.ZX,d.Ps,p.ReactiveFormsModule,w.c,u.ot]}),e})();var Lt=n(1145),At=n(2266),Nt=n(3300),Rt=n(865),jt=n(3033);let Ft=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=Y.ɵɵdefineNgModule({type:e}),e.ɵinj=Y.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,U,{provide:M.Ad,useValue:"es-ES"}],imports:[It,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,kt.x,Et.Nh,c.p9,Tt.n,Pt.O,Dt,Lt.j,At.L,Nt.C,Rt.q,jt.d]}),e})()}}]),(self.webpackChunkvex=self.webpackChunkvex||[]).push([[244],{667:(e,t,n)=>{n.d(t,{$:()=>r});var i=n(7340);const r=(s=400,(0,i.X$)("fadeInUp",[(0,i.eR)(":enter",[(0,i.oB)({transform:"translateY(20px)",opacity:0}),(0,i.jt)(`${s}ms cubic-bezier(0.35, 0, 0.25, 1)`,(0,i.oB)({transform:"translateY(0)",opacity:1}))])]));var s},5592:(e,t,n)=>{n.d(t,{J:()=>a});var i=n(6895),r=n(9299),s=n(7392),o=n(4650);let a=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({imports:[i.ez,r.Bz,s.Ps]}),e})()},1763:(e,t,n)=>{n.d(t,{b:()=>l});var i=n(4650),r=n(6895),s=n(7392);function o(e,t){1&e&&i.ɵɵelement(0,"mat-icon",3)}const a=["*"];let l=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.ccb=new i.EventEmitter,this.checked=!1}ngOnInit(){}emitChange(){this.checked=!this.checked,this.ccb.emit(this.checked)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-checkbox"]],inputs:{text:"text",color:"color",checked:"checked"},outputs:{ccb:"changeCheckbox"},ngContentSelectors:a,decls:5,vars:5,consts:[[1,"flex","items-center","gap-2","justify-start","w-fit","hover:bg-slate-700/10","pl-2","pr-3","py-2","rounded-sm","cursor-pointer",3,"click"],[1,"check-wrapper","w-5","h-5","border","mr-1","rounded-sm","flex","justify-center","items-center","p-0"],["style","font-size: 5px","class","m-0 p-0 text-white","svgIcon","mat:check",4,"ngIf"],["svgIcon","mat:check",1,"m-0","p-0","text-white",2,"font-size","5px"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0),i.ɵɵlistener("click",(function(){return t.emitChange()})),i.ɵɵelementStart(1,"div",1),i.ɵɵtemplate(2,o,1,0,"mat-icon",2),i.ɵɵelementEnd(),i.ɵɵelementStart(3,"div"),i.ɵɵprojection(4),i.ɵɵelementEnd()()),2&e&&(i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate2("background: ",t.checked?t.color:"transparent","; border-color: ",t.checked?t.color:"rgba(0,0,0,.7)",""),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.checked))},dependencies:[r.O5,s.Hw],styles:[".check-wrapper[_ngcontent-%COMP%]{transition:all .3s ease;min-width:1.25rem}"]}),e})()},1129:(e,t,n)=>{n.d(t,{n:()=>c});var i=n(6895),r=n(4006),s=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.ɵɵdefineNgModule({type:e}),e.ɵinj=l.ɵɵdefineInjector({imports:[i.ez,r.FormsModule,r.ReactiveFormsModule,s.lN,o.ot,a.Ps]}),e})()},8008:(e,t,n)=>{n.d(t,{O:()=>o});var i=n(4650),r=n(6895);function s(e,t){if(1&e&&(i.ɵɵnamespaceSVG(),i.ɵɵnamespaceHTML(),i.ɵɵelementStart(0,"p",4),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate(e.text)}}let o=(()=>{class e{constructor(){this.text="",this.color="rgb(14, 197, 151)",this.zoom=1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-spinner"]],inputs:{text:"text",color:"color",zoom:"zoom"},decls:4,vars:7,consts:[[1,"flex","w-full","justify-center","items-center","flex-col","gap-4"],["width","65px","height","65px","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg",1,"spinner"],["fill","none","stroke-width","6","stroke-linecap","round","cx","33","cy","33","r","30",1,"path"],["class","text-center",4,"ngIf"],[1,"text-center"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵnamespaceSVG(),i.ɵɵelementStart(1,"svg",1),i.ɵɵelement(2,"circle",2),i.ɵɵelementEnd(),i.ɵɵtemplate(3,s,2,1,"p",3),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate1("zoom: ",t.zoom,"; "),i.ɵɵadvance(1),i.ɵɵstyleMapInterpolate1("stroke: ",t.color,""),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.text))},dependencies:[r.O5],styles:[".spinner[_ngcontent-%COMP%]{animation:rotator 1.4s linear infinite}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(270deg)}}.path[_ngcontent-%COMP%]{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}to{stroke-dashoffset:187;transform:rotate(450deg)}}"]}),e})()},9476:(e,t,n)=>{n.d(t,{F:()=>c});var i=n(6895),r=n(4006),s=n(9549),o=n(9101),a=n(7392),l=n(4650);let c=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=l.ɵɵdefineNgModule({type:e}),e.ɵinj=l.ɵɵdefineInjector({imports:[i.ez,r.FormsModule,r.ReactiveFormsModule,s.lN,o.ot,a.Ps]}),e})()},833:(e,t,n)=>{n.d(t,{L:()=>d});var i=n(4650),r=n(9299),s=n(7367),o=n(8460),a=n(6895),l=n(9101);function c(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",5)(1,"button",6),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.accept())})),i.ɵɵtext(2,"Cerrar"),i.ɵɵelementEnd()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.funderStyles.colors.btnText)("background",e.funderStyles.colors.btnBg)("border-radius",e.funderStyles.btnRound+"px")}}let d=(()=>{class e{constructor(e,t,n){this.Activatedroute=e,this.customizationService=t,this.customizationStoreService=n,this.loading=!0,this.hideButtons=!0,this.acceptTerms=new i.EventEmitter(null),this.cancelTerms=new i.EventEmitter(null)}ngOnInit(){this.loading=!0,this.userId&&this.flow?(this.userID=this.userId,this.flowName=this.flow,this.customizationStoreService.getFunderStyles().subscribe((e=>{this.funderStyles=e})),this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:`\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para el flujo <b>${this.flowName}</b></p> \n </div>`,this.loading=!1})).catch((e=>{this.loading=!1}))):this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userID=e.idUser,this.flowName=this.getParsedFlowName(e.flow),this.userID?this.customizationService.getCustomizationByFlow(this.userID,this.flowName).then((e=>{this.flowConfig=e,this.terms_and_conditions=this.flowConfig&&this.flowConfig.terms_and_conditions?this.flowConfig.terms_and_conditions:'\n <div class="px-10 py-6 rounded-md text-center bg-orange-500/20 text-orange-600">\n <p>No hay términos y condiciones para este flujo</p> \n </div>',this.loading=!1})).catch((e=>{this.loading=!1})):this.loading=!1):this.loading=!1}),(e=>{this.loading=!1}))}getParsedFlowName(e){switch(e){case"sms":case"Sms":return"SMS";case"clavepin":case"ClavePin":case"CLAVEPIN":return"ClavePin";case"videoid":return"VideoID";case"personal":case"presencial":case"client-cert":return"KnownClient";default:return e}}accept(){this.acceptTerms.emit(!0)}cancel(){this.cancelTerms.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.gz),i.ɵɵdirectiveInject(s.w),i.ɵɵdirectiveInject(o.r))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["vex-power-cert"]],inputs:{flow:"flow",userId:"userId",hideButtons:"hideButtons"},outputs:{acceptTerms:"accept",cancelTerms:"cancel"},decls:33,vars:1,consts:[[1,"py-12","flex","flex-col","items-center","overflow-auto","max-h-[96vh]","terms-page"],[1,"max-w-xl","overflow-y-auto"],[1,"font-bold"],[1,"pt-6","font-bold"],["class","w-full max-w-xl flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"w-full","max-w-xl","flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"h1",2),i.ɵɵtext(3,"HOJA DE ACEPTACIÓN DE CERTIFICADO ELECTRONICO CUALIFICADO RÉGIMEN OBLIGATORIO DE USO DEL CERTIFICADO ELECTRONICO: “CERTIFICADO DE PERSONA FÍSICA REPRESENTANTE DE EMPRESA EMITIDO EN SOFTWARE”"),i.ɵɵelementEnd(),i.ɵɵelementStart(4,"p"),i.ɵɵtext(5," a) Que existen unas condiciones generales del servicio incorporadas en el texto de divulgación del certificado o PDS, y una declaración de prácticas de certificación, que regulan la emisión y utilización del certificado electrónico emitido porvinCAsign, cuyo texto íntegro se puede consultar en la dirección de Internet, https://policy.vincasign.net. "),i.ɵɵelementEnd(),i.ɵɵelementStart(6,"p"),i.ɵɵtext(7," b) Que el certificado electrónico emitido y el resto de los elementos que forman parte de la identificación electrónica son únicos para cada usuario. El certificado debe ser protegido por un código secreto (PIN), que sólo conoce el titular y que le será entregado en el momento de la emisión del certificado. Para utilizar el certificado es imprescindible conocer este código. "),i.ɵɵelementEnd(),i.ɵɵelementStart(8,"p"),i.ɵɵtext(9," c) Que este certificado permite al titular del certificado generar firmas electrónicas e identificarse de forma electrónica en aquellos sistemas de información que soporten este tipo de autenticación. "),i.ɵɵelementEnd(),i.ɵɵelementStart(10,"p"),i.ɵɵtext(11," d) Que el FIRMANTE debe custodiar, de forma diligente, el PIN que permite utilizarlo, para evitar que otras personas puedan suplantar su identidad y firmar documentos en su nombre, o acceder a mensajes confidenciales o sistemas de información de acceso restringido. "),i.ɵɵelementEnd(),i.ɵɵelementStart(12,"p"),i.ɵɵtext(13," e) Que, si el FIRMANTE detecta cualquier indicio de que su identificación electrónica ha podido ser utilizada por otras personas, tendrá que suspender el uso del certificado y notificarlo inmediatamente al responsable del servicio de certificación del SUSCRIPTOR, o a vinCAsign, para pedir la revocación del certificado y, en su caso, la emisión de uno nuevo. "),i.ɵɵelementEnd(),i.ɵɵelementStart(14,"p"),i.ɵɵtext(15," f) Que ante cualquier necesidad de información adicional, respecto de la utilización de los certificados emitidos en nombre de vinCAsign, el FIRMANTE se podrá dirigir al SUSCRIPTOR, al responsable del servicio de certificación del SUSCRIPTOR, y/o a VINTEGRIS. "),i.ɵɵelementEnd(),i.ɵɵelementStart(16,"p"),i.ɵɵtext(17," g) Que con el fin de obtener los correspondientes certificados, y dentro del marco del Reglamento (UE) 2016/679 del Parlamento Europeo y del Consejo de 27 de abril de 2016 relativo a la protección de las personas físicas en lo que respecta al tratamiento de datos personales y a la libre circulación de estos datos y por el que se deroga la Directiva 95/46/CE (Reglamento general de protección de datos), el SUSCRIPTOR ha comunicado a vinCAsign los datos identificativos del FIRMANTE con el fin de emitir y gestionar el certificado corporativo de persona física emitido en software, en el ámbito de la relación de trabajo entre dicho FIRMANTE y el SUSCRIPTOR, todo ello a los efectos de lo previsto en el artículo 28 del Reglamento general de protección de datos. "),i.ɵɵelementEnd(),i.ɵɵelementStart(18,"p"),i.ɵɵtext(19," h) Que sabe que, en cumplimiento de lo establecido en los artículos 24.2 y 28 del Reglamento (UE) 910/2014 del Parlamento Europeo y del Consejo de 23 de julio de 2014, los datos contenidos en el certificado corporativo de persona física emitido en software están publicados en la página web de vinCAsign a efectos del Registro de Certificados y de las listas de revocación, toda vez que ha prestado su consentimiento durante el proceso de solicitud. "),i.ɵɵelementEnd(),i.ɵɵelementStart(20,"h1",3),i.ɵɵtext(21," ACTO DE ACEPTACIÓN DEL CERTIFICADO ELECTRÓNICO "),i.ɵɵelementEnd(),i.ɵɵelementStart(22,"p"),i.ɵɵtext(23," Firmo el presente documento para dejar constancia: "),i.ɵɵelementEnd(),i.ɵɵelementStart(24,"p"),i.ɵɵtext(25," Que ha sido informado del contenido del texto de divulgación del certificado o PDS, en el que se incluyen las condiciones generales del servicio aplicable al certificado corporativo de persona física emitido en software. "),i.ɵɵelementEnd(),i.ɵɵelementStart(26,"p"),i.ɵɵtext(27," Que ha sido informado del régimen obligatorio de uso del certificado emitido, sus condiciones de uso y sus responsabilidades. "),i.ɵɵelementEnd(),i.ɵɵelementStart(28,"p"),i.ɵɵtext(29," Que ha sido informado de las circunstancias relativas al tratamiento de sus datos personales para la correcta emisión y gestión del certificado que se emite. "),i.ɵɵelementEnd(),i.ɵɵelementStart(30,"p"),i.ɵɵtext(31," Firma de conformidad, en virtud de la cual ha leído y entiende las obligaciones y responsabilidades que asume. "),i.ɵɵelementEnd()(),i.ɵɵtemplate(32,c,3,6,"div",4),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(32),i.ɵɵproperty("ngIf",t.funderStyles&&!t.hideButtons))},dependencies:[a.O5,l.lW],styles:["h1[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700}h2[_ngcontent-%COMP%]{font-size:20px!important;font-weight:700;line-height:25px;margin:15px 0}p[_ngcontent-%COMP%]{margin:10px 0}.terms-page[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;background:white;z-index:9999999!important;height:100vh;max-height:100vh}"]}),e})()},2266:(e,t,n)=>{n.d(t,{L:()=>g});var i=n(9299),r=n(833),s=n(6e3),o=n(4650);const a=[{path:":flow",component:r.L},{path:":flow/:idUser",component:r.L}];let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({imports:[i.Bz.forChild(a),i.Bz,s.d8]}),e})();var c=n(7533),d=n(1572),u=n(7367),h=n(6383),p=n(6895),m=n(4006),f=n(9101);let g=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o.ɵɵdefineNgModule({type:e}),e.ɵinj=o.ɵɵdefineInjector({providers:[u.w],imports:[l,c.q,d.Cq,h.G,p.ez,m.FormsModule,f.ot]}),e})()},1145:(e,t,n)=>{n.d(t,{j:()=>l});var i=n(4650),r=n(6895);let s=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.ɵɵdefineNgModule({type:e}),e.ɵinj=i.ɵɵdefineInjector({imports:[[r.ez]]}),e})();var o=n(7392),a=n(4006);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=i.ɵɵdefineNgModule({type:e}),e.ɵinj=i.ɵɵdefineInjector({imports:[r.ez,a.FormsModule,s,o.Ps]}),e})()},4302:(e,t,n)=>{n.d(t,{q:()=>a});var i=n(7582),r=n(9933),s=n(667),o=n(4650);let a=class{constructor(){}};a.ɵfac=function(e){return new(e||a)},a.ɵcmp=o.ɵɵdefineComponent({type:a,selectors:[["belender-disabled-url"]],decls:6,vars:1,consts:[[1,"p-2","w-full","flex","justify-start","flex-wrap"],[1,"py-4","px-6","w-full","rounded-md","bg-red-500/10","text-red-600","flex","flex-col","gap-3"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"h2"),o.ɵɵtext(3,"Servicio desactivado"),o.ɵɵelementEnd(),o.ɵɵelementStart(4,"p"),o.ɵɵtext(5,"El servicio que intenta acceder está desactivado. "),o.ɵɵelementEnd()()()),2&e&&o.ɵɵproperty("@fadeInUp",void 0)},data:{animation:[s.$]}}),a=(0,i.gn)([(0,r.c)()],a)},3300:(e,t,n)=>{n.d(t,{C:()=>o});var i=n(6895),r=n(4006),s=n(4650);let o=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=s.ɵɵdefineNgModule({type:e}),e.ɵinj=s.ɵɵdefineInjector({imports:[i.ez,r.FormsModule]}),e})()},342:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(2340),r=n(4650),s=n(4006),o=n(5089),a=n(5601),l=n(9617),c=n(6895),d=n(7392),u=n(1572);function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"span",11),r.ɵɵtext(1),r.ɵɵelement(2,"mat-progress-spinner",12),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function p(e,t){if(1&e&&(r.ɵɵelementStart(0,"span",13),r.ɵɵtext(1),r.ɵɵelement(2,"mat-icon",14),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"span",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit,n=r.ɵɵreference(5);return r.ɵɵnextContext().setDocumentName(t.document_name),r.ɵɵresetView(n.click())})),r.ɵɵtext(1),r.ɵɵelement(2,"mat-icon",16),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.document_name," ")}}function f(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtemplate(1,h,3,1,"span",6),r.ɵɵtemplate(2,p,3,1,"span",7),r.ɵɵtemplate(3,m,3,1,"span",8),r.ɵɵelementStart(4,"input",9,10),r.ɵɵlistener("change",(function(t){r.ɵɵrestoreView(e);const n=r.ɵɵnextContext();return r.ɵɵresetView(n.fileChange(t))})),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.document_status_code),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.document_status_code&&"downloaded"===e.document_status_code&&!n.loadingDocs),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.document_status_code&&"failed_download"===e.document_status_code&&!n.loadingDocs),r.ɵɵadvance(1),r.ɵɵproperty("accept",n.acceptFiles)}}let g=(()=>{class e{constructor(e,t,n,i,r){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=r,this.totalDocuments=[],this.totalDownloaded=0,this.totalNotDownloaded=0,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.fileSize=0,this.acceptFiles="image/jpeg, image/jpg, application/pdf",this.loadingDocs=!0,this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.loadingDocs=!0,this.uploadForm=this.formBuilder.group({file:[""]}),this.setPacksAndDocuments(),this.initIntervalDocs()}initIntervalDocs(){this.intDocs=setInterval((()=>{this.setDocumentsFromPack()}),4e3)}setPacksAndDocuments(){this.packsS.getPacksByPackId(this.packId).then((e=>{this.totalDocuments=this.parseDocumentsFromPack(e.data.documents),this.setDocumentsFromPack()}))}setDocumentsFromPack(){this.solicitudesService.getDocumentsIds(this.requestID).then((e=>{e.data&&this.setDocumentsReports(e.data),this.loadingDocs=!1})).catch((()=>{this.loadingDocs=!1}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==i.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==i.N.env&&(e="wss://notifications.belender.net"),i.N.notificationsBaseUrl&&(e=i.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}handlePusherNotification(e){this.totalDocuments&&this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)})),this.cd.markForCheck()}parseDocumentsFromPack(e){let t=[];return e&&e.length&&e.forEach((e=>{t.push({document_name:e,document_status_code:null})})),t}setDocumentsReports(e){e&&e.length&&e.forEach((e=>{this.totalDocuments.forEach((t=>{t.document_name===e.document_name&&(t.document_status_code=e.document_status_code)}))})),this.checkIfAllReported(),this.cd.markForCheck()}checkIfAllReported(){this.totalDocuments.find((e=>!e.document_status_code||"downloaded"!=e.document_status_code))||this.intDocs&&clearInterval(this.intDocs)}fileChange(e){e.preventDefault(),e.stopPropagation();let t=e.target.files[0];const n=new FormData;n.append("file",t),n.append("request_id",this.requestID),n.append("document_name",this.docName),this.loadingDocs=!0,this.solicitudesService.uploadFileFromWidget(n).then((e=>{console.log("success"),this.setPacksAndDocuments()})).catch((e=>{console.error(e),this.setPacksAndDocuments()}))}setDocumentName(e){this.docName=e}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(s.FormBuilder),r.ɵɵdirectiveInject(o.F),r.ɵɵdirectiveInject(a.M),r.ɵɵdirectiveInject(l.U),r.ɵɵdirectiveInject(r.ChangeDetectorRef))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["widget-documents"]],inputs:{packId:"packId",requestID:"requestID",userId:"userId",acceptFiles:"acceptFiles"},decls:7,vars:1,consts:[[1,"px-4","py-3","bg-slate-300/10","rounded-md"],[1,"w-full","flex","mb-4","justify-between","items-center"],[1,"text-xl","font-bold"],[1,"flex","justify-end","items-center"],[1,"flex","gap-1","flex-wrap","items-start","justify-start","w-full","flex-col"],[4,"ngFor","ngForOf"],["class","bg-black/10 items-center w-full h-8 gap-2 pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between",4,"ngIf"],["class","bg-green-500/10 items-center text-green-500 w-full justify-between border border-green-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs ",4,"ngIf"],["class","bg-red-500/10 items-center text-red-500 border border-red-500 gap-2 h-8 font-bold pr-4 pl-3 py-1 rounded-sm flex text-xs justify-between w-full cursor-pointer hover:bg-red-500 hover:text-red-50",3,"click",4,"ngIf"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"bg-black/10","items-center","w-full","h-8","gap-2","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between"],["color","accent","diameter","12","value","0","mode","indeterminate",1,"spinner"],[1,"bg-green-500/10","items-center","text-green-500","w-full","justify-between","border","border-green-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs"],["svgIcon","mat:check",1,"w-4"],[1,"bg-red-500/10","items-center","text-red-500","border","border-red-500","gap-2","h-8","font-bold","pr-4","pl-3","py-1","rounded-sm","flex","text-xs","justify-between","w-full","cursor-pointer","hover:bg-red-500","hover:text-red-50",3,"click"],["svgIcon","mat:upload",1,"w-4"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"p",2),r.ɵɵtext(3,"Documentos: "),r.ɵɵelementEnd(),r.ɵɵelement(4,"div",3),r.ɵɵelementEnd(),r.ɵɵelementStart(5,"div",4),r.ɵɵtemplate(6,f,6,4,"ng-container",5),r.ɵɵelementEnd()()),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngForOf",t.totalDocuments))},dependencies:[c.sg,c.O5,d.Hw,u.Ou]}),e})()},3033:(e,t,n)=>{n.d(t,{d:()=>l});var i=n(6895),r=n(4006),s=n(7392),o=n(1572),a=n(4650);let l=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=a.ɵɵdefineNgModule({type:e}),e.ɵinj=a.ɵɵdefineInjector({imports:[i.ez,s.Ps,r.ReactiveFormsModule,o.Cq]}),e})()},1406:(e,t,n)=>{n.d(t,{Y:()=>a});var i=n(4650),r=n(4006),s=n(9549),o=n(9101);let a=(()=>{class e{constructor(e){this.formBuilder=e,this.file=null,this.fileName="No se ha seleccionado ningun archivo",this.acceptFiles="image/png, image/jpeg, image/jpg, .pdf",this.newItemEvent=new i.EventEmitter(null),this.uploadFile=new i.EventEmitter(null),this.toBase64=e=>new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=n}))}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]})}fileChange(e){this.uploadForm.patchValue({file:e.target.files[0]}),this.uploadForm.get("file").updateValueAndValidity();const t=new FormData;let n=this.uploadForm.get("file").value;this.fileName=n.name,this.fileSize=+(+n.size/1e3).toFixed(1),t.append("file",n),console.warn(this.uploadForm.get("file").value),this.newItemEvent.emit({file:t}),this.uploadFile.emit(n)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.FormBuilder))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-file-upload"]],inputs:{label:"label",acceptFiles:"acceptFiles"},outputs:{newItemEvent:"change",uploadFile:"fileUpload"},decls:11,vars:5,consts:[[1,"flex","flex-col","w-full","items-start","input-file-wrapper","my-1",3,"formGroup"],["hidden","true","onclick","this.value=null","type","file","name","file",3,"accept","change"],["fileInput",""],[1,"flex","items-center","justify-start","mt-3"],["mat-flat-button","","color","accent",1,"btn-file",3,"click"]],template:function(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",0)(1,"mat-label"),i.ɵɵtext(2),i.ɵɵelementEnd(),i.ɵɵelementStart(3,"input",1,2),i.ɵɵlistener("change",(function(e){return t.fileChange(e)})),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",3)(6,"button",4),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵreference(4);return i.ɵɵresetView(t.click())})),i.ɵɵtext(7,"Seleccionar archivo"),i.ɵɵelementEnd(),i.ɵɵtext(8,"     "),i.ɵɵelementStart(9,"span"),i.ɵɵtext(10),i.ɵɵelementEnd()()()}2&e&&(i.ɵɵproperty("formGroup",t.uploadForm),i.ɵɵadvance(2),i.ɵɵtextInterpolate(t.label),i.ɵɵadvance(1),i.ɵɵproperty("accept",t.acceptFiles),i.ɵɵadvance(7),i.ɵɵtextInterpolate2("",t.fileName," ",t.fileSize?"("+t.fileSize+"Kb)":"",""))},dependencies:[r.ɵNgNoValidate,r.NgControlStatusGroup,r.FormGroupDirective,s.hX,o.lW],styles:["button[aria-pressed=true][_ngcontent-%COMP%]{color:red!important}.btn-file[_ngcontent-%COMP%]{max-width:200px}.input-file-wrapper[_ngcontent-%COMP%]{background:rgba(0,0,0,.0117647059);padding:.7rem .5rem .7rem 1rem;border-radius:5px;border:2px dashed rgba(0,0,0,.1)}"]}),e})()},969:(e,t,n)=>{n.d(t,{O:()=>d});var i=n(6895),r=n(4006),s=n(9101),o=n(7392),a=n(4144),l=n(7009),c=n(4650);let d=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=c.ɵɵdefineNgModule({type:e}),e.ɵinj=c.ɵɵdefineInjector({imports:[i.ez,l.ZX,o.Ps,r.ReactiveFormsModule,a.c,s.ot]}),e})()},4246:(e,t,n)=>{n.d(t,{t:()=>r});var i=n(4650);let r=(()=>{class e{constructor(){this.DNI_REGEX=/^(\d{8})([A-Z])$/,this.CIF_REGEX=/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/,this.NIE_REGEX=/^[XYZ]\d{7,8}[A-Z]$/}convertObjectArrayToArray(e){return Object.keys(e).map((t=>{const n=e[t];return n.key=t,n}))}ValidateIDType(e){e=e.toUpperCase().replace(/\s/,"");var t=!1,n=this.spainIdType(e);switch(n){case"dni":t=this.validDNI(e);break;case"nie":t=this.validNIE(e)}return{type:n,valid:t}}spainIdType(e){return e.match(this.DNI_REGEX)?"dni":e.match(this.NIE_REGEX)?"nie":void 0}validDNI(e){return"TRWAGMYFPDXBNJZSQVHLCKE".charAt(parseInt(e,10)%23)==e.charAt(8)}validNIE(e){var t=e.charAt(0);switch(t){case"X":t=0;break;case"Y":t=1;break;case"Z":t=2}return this.validDNI(t+e.substr(1))}}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=i.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},3364:(e,t,n)=>{n.d(t,{R:()=>l});var i=n(4650),r=(n(6866),n(5089)),s=n(9299),o=n(9101),a=n(3731);let l=(()=>{class e{constructor(e,t){this.utils=e,this.Activatedroute=t,this.goFlow=new i.EventEmitter(null),this.goManual=new i.EventEmitter(null)}ngOnInit(){console.error("data: ",this.data)}gotoFlow(){this.goFlow.emit(!0)}gotoManual(){this.goManual.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.F),i.ɵɵdirectiveInject(s.gz))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-intro-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName"},outputs:{goFlow:"gotoFlow",goManual:"gotoManual"},decls:10,vars:18,consts:[[1,"flex","flex-col","justify-between","h-full","fixed-content"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"click"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0)(1,"div",1),i.ɵɵelement(2,"div",2)(3,"div",3),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",4)(6,"button",5),i.ɵɵlistener("click",(function(){return t.gotoManual()})),i.ɵɵtext(7,"Subida manual"),i.ɵɵelementEnd(),i.ɵɵelementStart(8,"button",6),i.ɵɵlistener("click",(function(){return t.gotoFlow()})),i.ɵɵtext(9,"Subida automatica"),i.ɵɵelementEnd()()()),2&e&&(i.ɵɵadvance(2),i.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.data.intro?t.data.intro.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",t.data.intro?t.data.intro.title:"Intro de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",t.data.styles.colors.text),i.ɵɵproperty("innerHTML",t.data.intro?t.data.intro.description:i.ɵɵpipeBind1(4,16,"Descripcion de la intro"),i.ɵɵsanitizeHtml),i.ɵɵadvance(3),i.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[o.lW,a.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},8962:(e,t,n)=>{n.d(t,{A:()=>S});var i=n(6895),r=n(9101),s=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),v=n(1948),y=n(4246),b=n(6981),x=n(1129),w=n(9476),C=n(4650);let S=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=C.ɵɵdefineNgModule({type:e}),e.ɵinj=C.ɵɵdefineInjector({providers:[a.M,c.o,p.w,u.t,g.T,y.t],imports:[i.ez,r.ot,s.Tx,h.c,o.FormsModule,o.ReactiveFormsModule,l.a,d.Cq,m.FA,f.XK,_.T5,v.Fk,b.x,x.n,w.F]}),e})()},1760:(e,t,n)=>{n.d(t,{u:()=>w});var i=n(4650),r=(n(6866),n(4006)),s=n(5089),o=n(9391),a=n(9299),l=n(9617),c=n(5895),d=n(6895),u=n(9101),h=n(9549),p=n(4144),m=n(8008),f=n(1406),g=n(3731);function _(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",1)(1,"div",2),i.ɵɵelement(2,"div",3)(3,"div",4),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵelementStart(5,"div",5)(6,"div",6)(7,"mat-form-field",7)(8,"mat-label"),i.ɵɵtext(9,"DNI / NIE"),i.ɵɵelementEnd(),i.ɵɵelement(10,"input",8),i.ɵɵelementEnd()()(),i.ɵɵelementStart(11,"div",9)(12,"button",10),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goBack())})),i.ɵɵtext(13," Volver "),i.ɵɵelementEnd(),i.ɵɵelementStart(14,"button",11),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.gotoStep2())})),i.ɵɵtext(15," Siguiente "),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵproperty("formGroup",e.formDni),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.data.styles.colors.text),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.description:i.ɵɵpipeBind1(4,18,"Descripcion de la subida manual"),i.ɵɵsanitizeHtml),i.ɵɵadvance(9),i.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.formDni.invalid?"":e.data.styles.colors.btnText)("background",e.formDni.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.ɵɵproperty("disabled",e.formDni.invalid)}}function v(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementContainerStart(0),i.ɵɵelementStart(1,"app-file-upload",15),i.ɵɵlistener("fileUpload",(function(t){const n=i.ɵɵrestoreView(e).$implicit,r=i.ɵɵnextContext(3);return i.ɵɵresetView(r.setFile(n,t))})),i.ɵɵelementEnd(),i.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit;i.ɵɵadvance(1),i.ɵɵpropertyInterpolate("label",e)}}function y(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",5),i.ɵɵtemplate(1,v,2,1,"ng-container",14),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵproperty("ngForOf",e.pack.documents)}}function b(e,t){1&e&&(i.ɵɵelementStart(0,"div",16),i.ɵɵelement(1,"belender-spinner",17),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵproperty("zoom",.6))}function x(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"form",1)(1,"div",2),i.ɵɵelement(2,"div",3)(3,"div",4),i.ɵɵpipe(4,"safeHtml"),i.ɵɵelementEnd(),i.ɵɵtemplate(5,y,2,1,"div",12),i.ɵɵtemplate(6,b,2,1,"div",13),i.ɵɵelementStart(7,"div",9)(8,"button",10),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goBack())})),i.ɵɵtext(9," Volver "),i.ɵɵelementEnd(),i.ɵɵelementStart(10,"button",11),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.uploadFiles())})),i.ɵɵtext(11," Subir archivos "),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵproperty("formGroup",e.form),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.data.Manual?e.data.Manual.titleSize+"px":"30px"),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.title:"Manual de descripción",i.ɵɵsanitizeHtml),i.ɵɵadvance(1),i.ɵɵstyleProp("color",e.data.styles.colors.text),i.ɵɵproperty("innerHTML",e.data.Manual?e.data.Manual.description:i.ɵɵpipeBind1(4,20,"Descripcion de la subida manual"),i.ɵɵsanitizeHtml),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",e.pack&&!e.loadingPack),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",e.loadingPack),i.ɵɵadvance(2),i.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),i.ɵɵadvance(2),i.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),i.ɵɵproperty("disabled",e.form.invalid)}}let w=(()=>{class e{constructor(e,t,n,r,s,o){this.fb=e,this.utils=t,this.attachmentsS=n,this.ar=r,this.packsS=s,this.notis=o,this.upload=new i.EventEmitter(null),this.back=new i.EventEmitter(null),this.sendDNI=new i.EventEmitter(null),this.loadingPack=!1,this.step=1}ngOnInit(){this.form=this.fb.group({}),console.warn("data: ",this.data),this.loadingPack=!0,this.packsS.getPackagesByUserID(this.userId).then((e=>{console.warn(e),e&&e.data?this.setPack(e.data):this.loadingPack=!1})).catch((e=>{console.error(e),this.loadingPack=!1})),this.formDni=this.fb.group({dni:[null,[r.Validators.required,r.Validators.maxLength(9)]]}),console.error(this.solicitud),this.solicitud&&this.solicitud.request_id&&(this.step=2)}setRequestStep(){}gotoStep2(){this.sendDNI.emit(this.formDni.get("dni").value)}setPack(e){this.pack=e.find((e=>e.id==this.packId)),this.loadingPack=!1,this.setForm()}setForm(){this.pack&&this.pack.documents&&this.pack.documents.forEach((e=>{this.form.addControl(e,new r.FormControl("",r.Validators.required))}))}uploadFiles(){this.upload.emit(!0)}goBack(){this.back.emit(!0)}fileChange(e){e.preventDefault(),e.stopPropagation()}setFile(e,t){const n=new FormData;n.append("file",t),n.append("request_id",this.solicitud.request_id),n.append("document_name",e),this.notis.showToast("Subiendo documento: "+e,6e3,"info"),this.attachmentsS.uploadFile(n).then((n=>{n&&n.status&&"error"!=n.status?(this.form.get(e).setValue(t),this.notis.showToast("Documento "+e+" subido correctamente",4e3,"success")):n&&n.status&&"error"==n.status&&this.notis.showToast("El documento "+e+" no se ha podido subir: "+n.message,4e3,"error")})).catch((t=>{console.error(t),this.notis.showToast("El documento "+e+" no se ha podido subir: "+t,4e3,"error")}))}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.UntypedFormBuilder),i.ɵɵdirectiveInject(s.F),i.ɵɵdirectiveInject(o.o),i.ɵɵdirectiveInject(a.gz),i.ɵɵdirectiveInject(l.U),i.ɵɵdirectiveInject(c.T))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-manual-step"]],inputs:{data:"data",solicitud:"solicitud",flowName:"flowName",packId:"packId",userId:"userId"},outputs:{upload:"uploadFiles",back:"goBack",sendDNI:"dniChange"},decls:2,vars:2,consts:[["class","flex flex-col justify-between h-full fixed-content",3,"formGroup",4,"ngIf"],[1,"flex","flex-col","justify-between","h-full","fixed-content",3,"formGroup"],[1,"flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"py-4"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["maxlength","9","formControlName","dni","type","text","placeholder","Ingresa tu DNI o NIE","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-2"],["mat-flat-button","","type","button",1,"px-8","bg-slate-100","hover:bg-slate-200","text-slate-900",3,"click"],["mat-flat-button","","type","button",1,"px-8","hover:opacity-90",3,"disabled","click"],["class","py-4",4,"ngIf"],["class","py-10 px-4",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"label","fileUpload"],[1,"py-10","px-4"],["text","Cargando documentos",3,"zoom"]],template:function(e,t){1&e&&(i.ɵɵtemplate(0,_,16,20,"form",0),i.ɵɵtemplate(1,x,12,22,"form",0)),2&e&&(i.ɵɵproperty("ngIf",1==t.step),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",2==t.step))},dependencies:[d.sg,d.O5,u.lW,h.KE,h.hX,p.Nt,r.ɵNgNoValidate,r.DefaultValueAccessor,r.NgControlStatus,r.NgControlStatusGroup,r.MaxLengthValidator,r.FormGroupDirective,r.FormControlName,m.O,f.Y,g.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})()},3468:(e,t,n)=>{n.d(t,{f:()=>M});var i=n(6895),r=n(9101),s=n(1561),o=n(4006),a=n(5601),l=n(3798),c=n(9391),d=n(1572),u=n(182),h=n(4144),p=n(7367),m=n(9602),f=n(3238),g=n(5895),_=n(6257),v=n(1948),y=n(4246),b=n(6981),x=n(1129),w=n(9476),C=n(969),S=n(4650);let M=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=S.ɵɵdefineNgModule({type:e}),e.ɵinj=S.ɵɵdefineInjector({providers:[a.M,c.o,p.w,u.t,g.T,y.t],imports:[i.ez,r.ot,s.Tx,h.c,o.FormsModule,o.ReactiveFormsModule,l.a,d.Cq,m.FA,f.XK,_.T5,v.Fk,b.x,x.n,w.F,C.O]}),e})()},8526:(e,t,n)=>{n.r(t),n.d(t,{PersonalModule:()=>ht});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(5762),j=n(8259),F=n(2340),q=n(1363),Y=n(6830),V=n(4650),H=n(5089),z=n(8460),B=n(529),U=n(6554);let W=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(F.N.baseUrl+"/requests/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addFiles(e){return new Promise(((t,n)=>{this.localFetch.postFile(F.N.baseUrl+"/requests/known-client/upload-files",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOtp(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/known-client/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}preRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/pre-request/known-client",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let i="/requests/known-client/otp";F.N.scraperMock&&(i="/mockscrapper/requests/known-client/otp"),this.localFetch.postFetchWhitoutToken(F.N.baseUrl+i,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵinject(H.F),V.ɵɵinject(B.eN),V.ɵɵinject(U.r))},e.ɵprov=V.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var $=n(5412),G=n(833),Z=n(4302),K=n(3731);function Q(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function J(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,Q,2,1,"span",5),V.ɵɵtemplate(3,X,2,2,"span",5),V.ɵɵtemplate(4,J,2,1,"span",5),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),V.ɵɵelementEnd())}function ie(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function re(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en el teléfono? "),V.ɵɵelementEnd())}const se=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,ne,2,0,"span",5),V.ɵɵtemplate(3,ie,2,1,"span",5),V.ɵɵtemplate(4,re,2,0,"span",5),V.ɵɵelementStart(5,"a",12),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.resendOTP())})),V.ɵɵtext(6,"Reenviar"),V.ɵɵelementEnd()(),V.ɵɵelementContainerEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction2(9,se,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new V.EventEmitter(null),this.errPhone=new V.EventEmitter(null),this.resendO=new V.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?j(e.target).next().focus():"Backspace"==e.code&&j(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,te,5,8,"ng-container",5),V.ɵɵtemplate(7,oe,7,12,"ng-container",5),V.ɵɵelementEnd(),V.ɵɵelementStart(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),V.ɵɵtext(11," Código OTP "),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"input",8),V.ɵɵlistener("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),V.ɵɵelementEnd()()()(),V.ɵɵelementStart(13,"div",9)(14,"button",10),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(15,"Siguiente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.otp.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,18,t.texts.otp.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),V.ɵɵadvance(7),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1),V.ɵɵelement(1,"div",2)(2,"div",3),V.ɵɵpipe(3,"safeHtml"),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",e.texts.success.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(3,8,e.texts.success.description||""),V.ɵɵsanitizeHtml)}}let ce=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r}ngOnInit(){}save(){}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts"},decls:1,vars:1,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,le,4,10,"div",0),2&e&&V.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted)},dependencies:[i.O5,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function de(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.retry())})),V.ɵɵtext(2,"Intentarlo nuevamente"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",7),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.newRequest())})),V.ɵɵtext(2,"Crear nueva solicitud"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let he=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null),this.newReq=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵtemplate(5,de,3,6,"div",4),V.ɵɵtemplate(6,ue,3,6,"div",4),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",t.texts.fail.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,6,t.texts.fail.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var pe=n(1763),me=n(5696);const fe=["termsCheckbox"],ge=["termsCertCheckbox"],_e=["assignmentCheckbox"];function ve(e,t){1&e&&(V.ɵɵelementStart(0,"div",15)(1,"mat-form-field",16)(2,"mat-label"),V.ɵɵtext(3,"Email"),V.ɵɵelementEnd(),V.ɵɵelement(4,"input",17),V.ɵɵelementEnd()())}function ye(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",18)(1,"belender-checkbox",19,20),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setTerms(t))})),V.ɵɵelementStart(3,"belender-terms-and-policy-links",21),V.ɵɵlistener("goToTerms",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoTermsAndConditions(t))})),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("userId",e.userId)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function be(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",22)(1,"belender-checkbox",9),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setPower(t))})),V.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),V.ɵɵelementStart(3,"a",11),V.ɵɵlistener("click",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoPowerConditions(t))})),V.ɵɵelementStart(4,"u"),V.ɵɵtext(5,"aquí"),V.ɵɵelementEnd()()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title)}}function xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",18)(1,"belender-checkbox",9,23),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setAssignment(t))})),V.ɵɵelement(3,"div",24),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,V.ɵɵsanitizeHtml)}}function we(e,t){1&e&&(V.ɵɵelementStart(0,"div",25),V.ɵɵelement(1,"mat-icon",26),V.ɵɵtext(2," Debes leer los términos y condiciones para poder continuar "),V.ɵɵelementEnd())}const Ce={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Se=(()=>{class e{constructor(e,t){this.utils=e,this.fb=t,this.requestID=null,this.next=new V.EventEmitter(null),this.goTerms=new V.EventEmitter(null),this.goTermsCert=new V.EventEmitter(null),this.goPower=new V.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.termsReaded=!1,this.terms2Readed=!1,this.step=0,this.assignment=!1,this.powerActivate=!1}ngOnInit(){this.setForm(this.solicitud?this.solicitud:null)}tabChanged(e){this.step=e,this.setForm(null)}setForm(e){let t=e?e.person_email||e.email:null;this.form=this.fb.group(this.data.config.followMail?{email:[t,[p.Validators.required,p.Validators.email]]}:{email:[t]})}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}setTerms2(e){this.acceptTerms2=e}setAssignment(e){this.assignment=e}nextStep(){let e={terms_and_conditions_service:this.acceptTerms,terms_and_conditions_certificate_emition:this.acceptTerms2,request_id:this.solicitud.request_id};this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email").value),(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=!0,e.terms_and_conditions_power=this.powerActivate?1:0),this.next.emit(e)}gotoTermsAndConditions(e){this.termsReaded=!0,e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){this.terms2Readed=!0,e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}getIfValid(){return!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&this.getAssignmentValidation()}getAssignmentValidation(){return!!(!this.data.config.forceChecks||this.termsReaded&&this.terms2Readed)&&(this.data.config.hideCheckLegal&&(this.acceptTerms=!0),this.data.config.dataAssignmentCheck?this.acceptTerms&&this.acceptTerms2&&this.assignment:this.acceptTerms&&this.acceptTerms2)}gotoPowerConditions(e){this.goPower.emit(!0)}setPower(e){this.powerActivate=e}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(p.UntypedFormBuilder))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(V.ɵɵviewQuery(fe,5),V.ɵɵviewQuery(ge,5),V.ɵɵviewQuery(_e,5)),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.checkComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.certCheckComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",requestID:"requestID",data:"data",texts:"texts",solicitud:"solicitud",acceptTerms:"acceptTerms",acceptTerms2:"acceptTerms2",termsReaded:"termsReaded",terms2Readed:"terms2Readed"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Ce},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:24,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","email","type","email","placeholder","Ingresa tu email","matInput",""],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,ve,5,0,"div",5),V.ɵɵtemplate(7,ye,4,9,"div",6),V.ɵɵtemplate(8,be,6,1,"div",7),V.ɵɵelementStart(9,"div",8)(10,"belender-checkbox",9,10),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms2(e)})),V.ɵɵtext(12," He leído y acepto los "),V.ɵɵelementStart(13,"a",11),V.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),V.ɵɵelementStart(14,"u"),V.ɵɵtext(15,"términos y condiciones"),V.ɵɵelementEnd()(),V.ɵɵtext(16," para la emisión del certificado "),V.ɵɵelementEnd()(),V.ɵɵtemplate(17,xe,4,2,"div",6),V.ɵɵtemplate(18,we,3,0,"div",12),V.ɵɵelementEnd(),V.ɵɵelementStart(19,"div",13)(20,"button",14),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Siguiente "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.form.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,22,t.texts.form.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data.config.forceChecks&&(!t.termsReaded||!t.terms2Readed)),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnText)("background",t.form.invalid||!t.getIfValid()?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid||!t.getIfValid()))},dependencies:[i.O5,d.Hw,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.FormGroupDirective,p.FormControlName,pe.b,me.T,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Me=n(5145);let Ie=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":Me.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"mat-progress-spinner"),V.ɵɵelementStart(3,"p"),V.ɵɵtext(4),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(4),V.ɵɵtextInterpolate(t.label))},dependencies:[b.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),ke=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.noService.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,8,t.texts.noService.description),V.ɵɵsanitizeHtml))},dependencies:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtext(6),V.ɵɵelementEnd()(),V.ɵɵelementStart(7,"div",5)(8,"button",6),V.ɵɵlistener("click",(function(){return t.retry()})),V.ɵɵtext(9,"Intentarlo nuevamente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.abandoned.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,15,t.texts.abandoned.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Te(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Pe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña es requerida "),V.ɵɵelementEnd())}function Oe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}function De(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Es necesario repetir la contraseña "),V.ɵɵelementEnd())}function Le(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Las contraseñas deben coincidir "),V.ɵɵelementEnd())}function Ae(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}const Ne={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Re=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new V.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Te("password","confirm_password")})}nextStep(){let e={set_password_certificate:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.FormBuilder),V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Ne},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(9,"input",6),V.ɵɵtemplate(10,Pe,2,0,"mat-hint",7),V.ɵɵtemplate(11,Oe,2,0,"mat-hint",7),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-form-field",8)(13,"mat-label"),V.ɵɵtext(14,"Repite Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(15,"input",9),V.ɵɵtemplate(16,De,2,0,"mat-hint",7),V.ɵɵtemplate(17,Le,2,0,"mat-hint",7),V.ɵɵtemplate(18,Ae,2,0,"mat-hint",7),V.ɵɵelementEnd()(),V.ɵɵelementStart(19,"div",10)(20,"button",11),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Guardar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.password.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,21,t.texts.password.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),V.ɵɵadvance(5),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const je=["formStep"];function Fe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"vex-power-cert",3),V.ɵɵlistener("accept",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.acceptPowerCert())})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵproperty("hideButtons",!1)("flow","KnownClient")("userId",e.userId)}}function qe(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"img",9),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function Ye(e,t){if(1&e&&V.ɵɵelement(0,"belender-loading-step",19),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("status",null==e.solicitud?null:e.solicitud.status_code)("data",e.data)}}function Ve(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-form-step",20,21),V.ɵɵlistener("goToTerms",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoTermsAndConditions())}))("goToPower",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.gotoPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("userId",e.userId)("requestID",e.requestID)("data",e.data)("flowName",e.flowName)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function He(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-password-step",22),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.sendPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-otp-step",23),V.ɵɵlistener("resendOTP",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.requestOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e&&V.ɵɵelement(0,"belender-success-step",24),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-fail-step",25),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.newRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function We(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-abandoned-step",26),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(3);return V.ɵɵresetView(n.retryRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function $e(e,t){if(1&e&&V.ɵɵelement(0,"belender-no-service-step",27),2&e){const e=V.ɵɵnextContext(3);V.ɵɵproperty("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("data",e.data)}}function Ge(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",28)(1,"div",29)(2,"h1",30),V.ɵɵtext(3,"No existe la solicitud"),V.ɵɵelementEnd()(),V.ɵɵelementStart(4,"div",31),V.ɵɵtext(5,"No existen solicitudes activas con el código requerido"),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Ze(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵtemplate(1,Ye,1,2,"belender-loading-step",10),V.ɵɵtemplate(2,Ve,2,6,"belender-form-step",11),V.ɵɵtemplate(3,He,1,3,"belender-password-step",12),V.ɵɵtemplate(4,ze,1,3,"belender-otp-step",13),V.ɵɵtemplate(5,Be,1,2,"belender-success-step",14),V.ɵɵtemplate(6,Ue,1,3,"belender-fail-step",15),V.ɵɵtemplate(7,We,1,3,"belender-abandoned-step",16),V.ɵɵtemplate(8,$e,1,2,"belender-no-service-step",17),V.ɵɵtemplate(9,Ge,6,2,"div",18),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("ngIf","loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","form"==e.getStatus()&&!e.loading),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","password"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","otp"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","success"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","failed"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","abandoned"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-service"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function Ke(e,t){1&e&&V.ɵɵelement(0,"belender-disabled-url")}function Qe(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",32),V.ɵɵelement(1,"mat-progress-spinner",33),V.ɵɵelementStart(2,"p",34),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function Xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",35)(1,"div",28)(2,"div",36),V.ɵɵtext(3,"Error!"),V.ɵɵelementEnd(),V.ɵɵelement(4,"div",37),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",38)(6,"button",39),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(2);return V.ɵɵresetView(t.error=!1)})),V.ɵɵtext(7,"Ingresar manualmente"),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",e.error,V.ɵɵsanitizeHtml)}}function Je(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",4)(1,"div"),V.ɵɵtemplate(2,qe,2,1,"div",5),V.ɵɵtemplate(3,Ze,10,9,"ng-container",2),V.ɵɵtemplate(4,Ke,1,0,"belender-disabled-url",2),V.ɵɵtemplate(5,Qe,4,3,"div",6),V.ɵɵtemplate(6,Xe,8,3,"div",7),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&!e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.loading&&e.error)}}function et(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"div",40),V.ɵɵtext(2),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(2),V.ɵɵtextInterpolate1("TestMode ",e.testMode?"ON":"OFF","")}}let tt=class{constructor(e,t,n,i,r,s,o,a,l,c){this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.webhooksService=a,this.knownService=l,this.dialog=c,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="KnownClient"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}sendMessageToParent(e){window.top.postMessage(e,"*")}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=!1}),(e=>{this.loading=!1}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.solicitudesService.getSolicitudByCode(e).then((e=>{console.warn("solicitud: ",e.data),e&&e.data?(t.solicitud=e.data,t.setSubscriptionOfRequest(),t.loading=!1,t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=!1})).catch((e=>{t.loading=!1}))}))()}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),t.setSubscriptionOfRequestOld()},this.socket.onclose=function(e){console.log("Conexión cerrada"),t.setSubscriptionOfRequestOld()}}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,this.sendMessageToParent({type:"websocket",data:e}),"invalid_otp"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),"terms_and_conditions"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=!1,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp",this.loading=!1}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):(this.solicitud.status_code="no_service",this.loading=!1):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=!1})))}sendNewData(e){this.loading="Enviando información..",this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t){this.loading=!1,this.notis.showAlert(e,t)}gotoPassword(e){this.loading="Iniciando el proceso de emisión de certificado..";let t=e;(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.knownService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{t&&t.error&&this.showAlert("Error!",t.error),this.loading=!1}))}gotoOTP(e){let t=e;t.request_id=this.requestID,t.user_id=this.userId,this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),setTimeout((()=>{this.solicitud=new R.l,this.loading=!1,this.solicitud.status_code="waiting_otp"}),2e3)}requestOTP(e){let t={otp:e.code,request_id:this.solicitud.request_id};this.loading="Enviando código OTP ..",this.knownService.sendOtp(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}sendPassword(e){let t={password:e.set_password_certificate,request_id:this.solicitud.request_id};this.loading="Enviando contraseña..",this.knownService.sendPassword(t).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status?this.sendMessageToParent({type:"response",data:e.data||e}):this.loading=!1})).catch((t=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"form"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code&&"waiting_otp_seguridad_social"!=this.solicitud.status_code&&"invalid_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp"!=this.solicitud.status_code?!this.solicitud||"all_documents_downloaded"!=this.solicitud.status_code&&"certificate_created"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"success_otp"!=this.solicitud.status_code&&"otp_success"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.config&&this.data.config.infiniteLoopInCompleted?"loading":"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(Y.L,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTermsCheck(!0)}))}gotoTermsAndConditionsCertificate(){this.dialog.open(q.v,{panelClass:"fullscreen-dialog",data:{flow:"presencial"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};tt.ɵfac=function(e){return new(e||tt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(z.r),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t),V.ɵɵdirectiveInject(W),V.ɵɵdirectiveInject($.uw))},tt.ɵcmp=V.ɵɵdefineComponent({type:tt,selectors:[["belender-widget-personal"]],viewQuery:function(e,t){if(1&e&&V.ɵɵviewQuery(je,5),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[3,"status","data",4,"ngIf"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"status","data"],[3,"userId","requestID","data","flowName","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","nextStep"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","retry"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,Fe,1,3,"vex-power-cert",0),V.ɵɵtemplate(1,Je,7,10,"div",1),V.ɵɵtemplate(2,et,3,1,"ng-container",2)),2&e&&(V.ɵɵproperty("ngIf",t.viewPowerTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.testMode))},dependencies:[i.O5,u.lW,b.Ou,G.L,Z.q,ae,ce,he,Se,Ie,ke,Ee,Re],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),tt=(0,L.gn)([(0,N.c)()],tt);const nt=[{path:":idUser",component:tt},{path:":idUser/:packID",component:tt}];let it=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({imports:[P.Bz.forChild(nt),P.Bz,O.d8]}),e})();var rt=n(6981),st=n(3848),ot=n(1129),at=n(3295),lt=n(1258),ct=n(2266),dt=n(3300),ut=n(865);let ht=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,W,{provide:M.Ad,useValue:"es-ES"}],imports:[it,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,rt.x,st.Nh,ot.n,at.g,lt.H,ct.L,dt.C,ut.q]}),e})()},920:(e,t,n)=>{n.d(t,{n:()=>rt});var i=n(5861),r=n(7582),s=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667),u=n(3842);const h={created:"form",form:"form",prerequest:"form",terms_and_conditions:"form",waiting_otp_seguridad_social:"otp_ss",waiting_login_seguridad_social:"otp_ss",invalid_otp_seguridad_social:"otp_ss",waiting_otp_aeat:"otp_aeat",waiting_login_aeat:"otp_aeat",invalid_otp_aeat:"otp_aeat",abandoned_after_bad_phone:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",abandoned_after_invalid_otp_aeat:"abandoned",abandoned_after_waiting_otp_aeat:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",failed_with_retry:"failed",failed_without_retry:"failed",failed_documents_downloaded:"failed",consent_process_canceled:"failed",no_service:"no-service",no_clave_pin_service:"no-service",stand_by:"standby","no-phone":"no-phone","no-more-phone":"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var p=n(6830),m=n(1931),f=n(4650),g=n(9299),_=n(5089),v=n(7489),y=n(5895),b=n(182),x=n(5206),w=n(8460),C=n(9045),S=n(7367),M=n(5412),I=n(7308),k=n(6895),E=n(4302),T=n(3046),P=n(9112),O=n(9382),D=n(7392),L=n(9101),A=n(1572),N=n(4006),R=n(5601),j=n(9617),F=n(342),q=n(3731);function Y(e,t){if(1&e&&f.ɵɵelement(0,"widget-documents",6),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function V(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",2),f.ɵɵelement(1,"div",3)(2,"div",4),f.ɵɵpipe(3,"safeHtml"),f.ɵɵtemplate(4,Y,1,3,"widget-documents",5),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",e.texts.success.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(3,9,e.texts.success.description||""),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.showDocuments)}}function H(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",7)(1,"button",8),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.gotoRedirect())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let z=(()=>{class e{constructor(e,t,n,i,r){this.formBuilder=e,this.utils=t,this.solicitudesService=n,this.packsS=i,this.cd=r,this.showDocuments=!1}ngOnInit(){this.uploadForm=this.formBuilder.group({file:[""]}),this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.FormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(j.U),f.ɵɵdirectiveInject(f.ChangeDetectorRef))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName",labels:"labels"},decls:2,vars:2,consts:[["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID",4,"ngIf"],[3,"userId","packId","requestID"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵtemplate(0,V,5,11,"div",0),f.ɵɵtemplate(1,H,3,7,"div",1)),2&e&&(f.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[k.O5,F.A,L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var B=n(9391);function U(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",5)(1,"button",6),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.retry())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.retry," ")}}function W(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",5)(1,"button",7),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext();return f.ɵɵresetView(t.newRequest())})),f.ɵɵtext(2),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==e.labels||null==e.labels.actions?null:e.labels.actions.newRequest," ")}}let $=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryR=new f.EventEmitter(null),this.newR=new f.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryR.emit(this.solicitud.request_id)}newRequest(){this.newR.emit(this.solicitud.request_id)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(B.o),f.ɵɵdirectiveInject(y.T))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",labels:"labels"},outputs:{retryR:"retryRequest",newR:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd(),f.ɵɵtemplate(5,U,3,7,"div",4),f.ɵɵtemplate(6,W,3,7,"div",4),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵproperty("innerHTML",t.texts.fail.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,6,t.texts.fail.description),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[k.O5,L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var G=n(3238),Z=n(5439),K=n.n(Z),Q=n(3755),X=n(3746),J=n(2932),ee=n(4246),te=n(1763),ne=n(7795),ie=n(5696),re=n(4144);const se=["termsCheckbox"],oe=["assignmentCheckbox"];function ae(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",e.labels.warnings.invalidNieOrDni," ")}}function le(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"mat-hint")(1,"a",17),f.ɵɵlistener("click",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(2);return f.ɵɵresetView(n.gotoExpirationDate(t))})),f.ɵɵelementStart(2,"u"),f.ɵɵtext(3),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(3),f.ɵɵtextInterpolate(e.labels.findExpiration)}}const ce=function(e){return{mask:e}};function de(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",16),f.ɵɵtemplate(4,le,4,1,"mat-hint",8),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵclassMapInterpolate1("",e.disabledInputs.expiration?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.expiration),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.expiration?-1:1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(7,ce,e.datemask)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.isDni)}}function ue(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," El formato debe ser DD/MM/AAAA "),f.ɵɵelementEnd())}function he(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," Fecha inválida "),f.ɵɵelementEnd())}function pe(e,t){1&e&&(f.ɵɵelementStart(0,"mat-error"),f.ɵɵtext(1," Debe ser mayor de 18 años "),f.ɵɵelementEnd())}function me(e,t){if(1&e&&(f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",16),f.ɵɵtemplate(4,ue,2,0,"mat-error",8),f.ɵɵtemplate(5,he,2,0,"mat-error",8),f.ɵɵtemplate(6,pe,2,0,"mat-error",8),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();let t,n,i;f.ɵɵclassMapInterpolate1("",e.disabledInputs.birthday?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.birthday),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.birthday?-1:1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(9,ce,e.datemask)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(t=e.form.get("expired_date"))?null:t.hasError("invalidFormat")),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(n=e.form.get("expired_date"))?null:n.hasError("invalidDate")),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==(i=e.form.get("expired_date"))?null:i.hasError("underAge"))}}function fe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"mat-form-field",6)(1,"mat-label"),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelement(3,"input",18),f.ɵɵelementStart(4,"mat-hint")(5,"a",17),f.ɵɵlistener("click",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.gotoSupportAclaration(t))})),f.ɵɵelementStart(6,"u"),f.ɵɵtext(7),f.ɵɵelementEnd()()()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵclassMapInterpolate1("",e.disabledInputs.supportNumber?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.support),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.supportNumber?-1:1),f.ɵɵadvance(4),f.ɵɵtextInterpolate(e.labels.findExpiration)}}function ge(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",19)(1,"mat-form-field",6)(2,"mat-label"),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelement(4,"input",20),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(e.labels.email),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1)}}function _e(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",22,23),f.ɵɵlistener("changeCheckbox",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.setTerms(t))})),f.ɵɵelementStart(3,"belender-terms-and-policy-links",24),f.ɵɵlistener("goToTerms",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.gotoTermsAndConditions(t))})),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵproperty("color",e.data.styles.colors.title),f.ɵɵadvance(2),f.ɵɵproperty("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function ve(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",25,26),f.ɵɵlistener("changeCheckbox",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext();return f.ɵɵresetView(n.setAssignment(t))})),f.ɵɵelement(3,"div",27),f.ɵɵelementEnd()()}if(2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵproperty("color",e.data.styles.colors.title),f.ɵɵadvance(2),f.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,f.ɵɵsanitizeHtml)}}function ye(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",28),f.ɵɵelement(1,"mat-icon",29),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.labels.warnings.haveToReadTerms," ")}}function be(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",30),f.ɵɵelement(1,"mat-icon",29),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}const xe=function(e){return{"dont-show-data":e}},we={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Ce=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=r,this.lang="",this.next=new f.EventEmitter(null),this.esDNI=new f.EventEmitter(null),this.goTerms=new f.EventEmitter(null),this.acceptTerms=!1,this.step=0,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.disabledInputs={dni:!1,birthday:!1,supportNumber:!1,email:!1,expiration:!1},this.noValidate=!1,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.solicitud?(this.setBaseForm(this.solicitud),this.noValidate="terms_and_conditions"==this.solicitud.status_code):this.setBaseForm(null)}sendPestana(){window.parent.open("www.google.com","_blank")}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:this.labels.warnings.invalidDni):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:this.labels.warnings.invalidNie):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI=this.labels.warnings.invalidNieOrDni),this.form.get("expired_date").setValidators([(0,J.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.cd.markForCheck()}setBaseForm(e){console.error(e);let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.birth_date?K()(e.birth_date).format("DD/MM/YYYY"):null,i=e&&e.person_document_expiration_date?K()(e.person_document_expiration_date).format("DD/MM/YYYY"):null,r=e&&e.document_support?e.document_support:null,s=e&&e.person_birth_date?K()(e.person_birth_date).format("DD/MM/YYYY"):n,o=i,a=e?e.person_email||e.email||e.email_copy:null,l=e&&e.person_document_support?e.person_document_support:r;t&&this.setRegex(t),this.form=this.fb.group(this.isDni?this.data.config.followMail?{dni:[t,this.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],email:[a],document_type:["dni"],expired_date:[o,[(0,J.s)({checkFormat:!0,checkDate:!0})]],support_number:[null],person_phone:[]}:{dni:[t,this.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],document_type:["dni"],expired_date:[o,[(0,J.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:this.data.config.followMail?{dni:[t,[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],expired_date:[s],document_type:["nie"],support_number:[l],email:[a]}:{dni:[t,[N.Validators.required,N.Validators.maxLength(9),this.regexDNI()]],expired_date:[s],document_type:["nie"],support_number:[l]}),this.form.get("expired_date").setValidators([(0,J.s)({checkFormat:!0,checkDate:!0,checkAge:!this.isDni})]),this.form.updateValueAndValidity(),this.requestIDFromURL&&this.disableEnableInputs(t,n||s,i,r||l,a)}forceEnableDisableInputs(e,t,n,i,r){let s=t?t.value:this.disabledInputs.birthday,o=i?i.value:this.disabledInputs.supportNumber;this.isNie&&s&&!s.value&&(o={value:!1}),this.disableEnableInputs(e?e.value:this.disabledInputs.dni,s,n?n.value:this.disabledInputs.expiration,o,r?r.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i,r){this.disabledInputs={dni:e||!1,birthday:t||!1,supportNumber:i||!1,email:!!r,expiration:n||!1},this.cd.markForCheck()}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}nextStep(){let e;this.isDni?(e={document_number:this.form.get("dni").value.toUpperCase(),check_legal:!0,document_expiration_date:this.utils.formatDate(this.form.get("expired_date").value)},this.solicitud.person_document_number=e.document_number,this.solicitud.person_document_expiration_date=e.document_expiration_date):(e={document_number:this.form.get("dni").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("expired_date").value),check_legal:!0,document_support:this.form.get("support_number").value},this.solicitud.person_document_number=e.document_number,this.solicitud.person_birth_date=e.birth_date,this.solicitud.person_document_support=e.document_support),this.data&&this.data.config&&this.data.config.followMail&&(e.email_copy=this.form.get("email")?this.form.get("email").value:""),e.document_type=this.isDni?"dni":"nie",this.esDNI.emit(this.isDni),this.next.emit(e)}getHTML(e){return'\n <div style="color: red !important">\n Taitooo\n </div>\n '}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(Q.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(X.R,{panelClass:"fullscreen-dialog"})}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getFormsValid(){let e=!this.form.invalid,t=this.form&&this.form.get("support_number")?this.form.get("support_number").value:null;this.data.config.dontShowDataInTerms&&this.solicitud&&this.solicitud.status_code&&"terms_and_conditions"===this.solicitud.status_code&&(e=!0);let n=this.form.get("dni").value;return n?this.setRegex(n):e=!1,this.isNie&&(!t||""==t)&&(e=!1),!this.isDni&&!this.isNie&&(this.disabledInputs.dni=!1,e=!1),this.errorDNI&&(e=!1),e}getIfValid(){if(this.data.config.dontShowDataInTerms&&this.solicitud&&this.solicitud.status_code&&"terms_and_conditions"===this.solicitud.status_code&&(this.acceptTerms=!0),this.isDni||this.isNie)return this.errorDNI=null,!!this.data.config.hideCheckLegal||this.acceptTerms;this.errorDNI=this.labels.warnings.invalidNieOrDni}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(f.ChangeDetectorRef),f.ɵɵdirectiveInject(ee.t),f.ɵɵdirectiveInject(M.uw))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(se,5),f.ɵɵviewQuery(oe,5)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.checkComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",requestIDFromURL:"requestIDFromURL",labels:"labels",lang:"lang"},outputs:{next:"nextStep",esDNI:"isDni",goTerms:"goToTerms"},features:[f.ɵɵProvidersFeature([{provide:G.sG,useValue:we},{provide:f.LOCALE_ID,useValue:"es-ES"}])],decls:23,vars:36,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[3,"ngClass"],[1,"mb-3","pt-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline"],["id","dniInput","formControlName","dni","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["appearance","outline",3,"class",4,"ngIf"],["class","w-full",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 w-fit flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","sendBtn","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["id","dniExpireInput","required","","formControlName","expired_date","type","text","matInput","",3,"tabindex","textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["id","supportNumberInput","maxlength","9","minlength","6","required","","formControlName","support_number","matInput","",3,"tabindex"],[1,"w-full"],["id","emailInput","formControlName","email","required","","type","email","placeholder","Ingresa tu email","matInput","",3,"tabindex"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","w-fit","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd(),f.ɵɵelementStart(5,"div",4)(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",7),f.ɵɵtemplate(11,ae,2,1,"mat-error",8),f.ɵɵelementEnd(),f.ɵɵtemplate(12,de,5,9,"mat-form-field",9),f.ɵɵtemplate(13,me,7,11,"mat-form-field",9),f.ɵɵtemplate(14,fe,8,6,"mat-form-field",9),f.ɵɵtemplate(15,ge,5,5,"div",10),f.ɵɵelementEnd()(),f.ɵɵtemplate(16,_e,4,12,"div",11),f.ɵɵtemplate(17,ve,4,2,"div",11),f.ɵɵtemplate(18,ye,3,1,"div",12),f.ɵɵtemplate(19,be,3,1,"div",13),f.ɵɵelementStart(20,"div",14)(21,"button",15),f.ɵɵlistener("click",(function(){return t.nextStep()})),f.ɵɵtext(22),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.form.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,32,t.texts.form.description||""),f.ɵɵsanitizeHtml),f.ɵɵadvance(2),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(34,xe,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),f.ɵɵadvance(2),f.ɵɵclassMapInterpolate1("",t.disabledInputs.dni?"disabled-input":""," w-full flex-1 belender-form-field"),f.ɵɵadvance(2),f.ɵɵtextInterpolate(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),f.ɵɵadvance(1),f.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.dni?-1:1),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!t.isNie&&!t.isDni),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isDni),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isNie),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.isNie),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",(null==t.data||null==t.data.config?null:t.data.config.followMail)&&(t.isDni||t.isNie)),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.data.config.forceChecks&&!t.termsReaded),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.errorDNI),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getIfValid()&&t.getAssignmentValidation()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",!t.getFormsValid()||!t.getIfValid()||!t.getAssignmentValidation()),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.continue," "))},dependencies:[k.mk,k.O5,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.MinLengthValidator,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,te.b,ne.hd,ie.T,D.Hw,L.lW,s.TO,s.KE,s.bx,s.hX,re.Nt,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hiden-input[_ngcontent-%COMP%]{height:0!important;max-height:0px!important;overflow:hidden!important;opacity:0!important}"]}),e})(),Se=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.noService.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,8,t.texts.noService.description),f.ɵɵsanitizeHtml))},dependencies:[N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,q.z]}),e})(),Me=(()=>{class e{constructor(e){this.utils=e,this.retryR=new f.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryR.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{data:"data",solicitud:"solicitud",labels:"labels",texts:"texts"},outputs:{retryR:"retryRequest"},decls:10,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementStart(5,"div",4),f.ɵɵtext(6),f.ɵɵelementEnd()(),f.ɵɵelementStart(7,"div",5)(8,"button",6),f.ɵɵlistener("click",(function(){return t.retry()})),f.ɵɵtext(9),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵproperty("innerHTML",t.texts.abandoned.title,f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",f.ɵɵpipeBind1(4,16,t.texts.abandoned.description),f.ɵɵsanitizeHtml),f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels.actions?null:t.labels.actions.retry," "))},dependencies:[L.lW,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Ie=n(5145);let ke=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.nr=new f.EventEmitter(null)}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=Ie.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:"Estado desconocido"}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(R.M),f.ɵɵdirectiveInject(B.o),f.ɵɵdirectiveInject(y.T))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:15,vars:20,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"div",4),f.ɵɵtext(7),f.ɵɵelementStart(8,"div",5),f.ɵɵtext(9),f.ɵɵelementEnd()()(),f.ɵɵelementStart(10,"div",6)(11,"button",7),f.ɵɵlistener("click",(function(){return t.newRequest()})),f.ɵɵtext(12),f.ɵɵelementEnd(),f.ɵɵelementStart(13,"button",8),f.ɵɵlistener("click",(function(){return t.gotoRequest()})),f.ɵɵtext(14),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.duplicatedRequest," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.alreadyHaveRequest," "),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",t.labels.warnings.currentRequestStatus," "),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",t.getStatus()," "),f.ɵɵadvance(2),f.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.newRequest," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[L.lW],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ee=(()=>{class e{constructor(){}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts"},decls:5,vars:10,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"form",0)(1,"div",1),f.ɵɵelement(2,"div",2)(3,"div",3),f.ɵɵpipe(4,"safeHtml"),f.ɵɵelementEnd()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),f.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",f.ɵɵsanitizeHtml),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.description:f.ɵɵpipeBind1(4,8,"Descripcion del estado Stand By"),f.ɵɵsanitizeHtml))},dependencies:[N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,q.z]}),e})(),Te=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementStart(11,"mat-hint"),f.ɵɵtext(12,"DD/MM/YYYY"),f.ɵɵelementEnd()()()(),f.ɵɵelementStart(13,"div",7)(14,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(15),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongExpiration," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputExpiration," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate(null==t.labels?null:t.labels.expiration),f.ɵɵadvance(5),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,L.lW,s.KE,s.bx,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Pe=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementEnd()()(),f.ɵɵelementStart(11,"div",7)(12,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(13),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.wrongSupport," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.warnings?null:t.labels.warnings.inputSupport," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate(null==t.labels||null==t.labels.warnings?null:t.labels.warnings.support),f.ɵɵadvance(3),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",null==t.labels||null==t.labels.actions?null:t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NumberValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,L.lW,s.KE,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Oe=function(e){return{mask:e}};let De=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new f.EventEmitter(null),this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.form=this.fb.group({birth_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(f.ɵɵdirectiveInject(N.UntypedFormBuilder),f.ɵɵdirectiveInject(_.F))},e.ɵcmp=f.ɵɵdefineComponent({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:21,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","belender-form-field"],["type","text","required","","formControlName","birth_date","matInput","",3,"textMask"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),f.ɵɵtext(3),f.ɵɵelementEnd(),f.ɵɵelementStart(4,"div",3),f.ɵɵtext(5),f.ɵɵelementEnd(),f.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),f.ɵɵtext(9),f.ɵɵelementEnd(),f.ɵɵelement(10,"input",6),f.ɵɵelementStart(11,"mat-hint"),f.ɵɵtext(12,"DD/MM/YYYY"),f.ɵɵelementEnd()()()(),f.ɵɵelementStart(13,"div",7)(14,"button",8),f.ɵɵlistener("click",(function(){return t.next()})),f.ɵɵtext(15),f.ɵɵelementEnd()()()),2&e&&(f.ɵɵadvance(2),f.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongBirthday," "),f.ɵɵadvance(1),f.ɵɵstyleProp("color",t.data.styles.colors.text),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.warnings.inputBirthDay," "),f.ɵɵadvance(1),f.ɵɵproperty("formGroup",t.form),f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",t.labels.warnings.birthday," "),f.ɵɵadvance(1),f.ɵɵproperty("textMask",f.ɵɵpureFunction1(19,Oe,t.datemask)),f.ɵɵadvance(4),f.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),f.ɵɵproperty("disabled",t.form.invalid),f.ɵɵadvance(1),f.ɵɵtextInterpolate1(" ",t.labels.actions.send," "))},dependencies:[N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,ne.hd,L.lW,s.KE,s.bx,s.hX,re.Nt],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Le=["formStep"],Ae=["otpStep"];function Ne(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",8),f.ɵɵelement(1,"mat-icon",9),f.ɵɵtext(2),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("@fadeInUp",void 0),f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" ",e.warningAlert," ")}}function Re(e,t){if(1&e&&f.ɵɵelement(0,"belender-widget-logo",10),2&e){const e=f.ɵɵnextContext(2);f.ɵɵproperty("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function je(e,t){1&e&&(f.ɵɵelementStart(0,"div",11),f.ɵɵelement(1,"mat-progress-spinner",12),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵproperty("value",0))}function Fe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-form-step",24,25),f.ɵɵlistener("goToTerms",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(3);return f.ɵɵresetView(t.gotoTermsAndConditions())}))("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.validateRequest(t))}))("isDni",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setIsDni(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("userId",e.userId)("flowName",e.flowName)("lang",e.currentLang)("requestIDFromURL",e.requestIDFromURL)("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)("lang",e.currentLang)("solicitud",e.solicitud)}}function qe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-shared-otp-step",26,27),f.ɵɵlistener("resendOTP",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(3);return f.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.requestOTP(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("otpType","otp_ss"==e.requestStatus?"otpSS":"otpAEAT")("flowType",e.flowName)("data",e.data)("labels",e.labels)("solicitud",e.solicitud)("minLength",e.getOTPMinLength())("lastThreeNumbersPhone",e.lastThreeNumbersPhone)("texts",e.data[e.flowName].texts)}}function Ye(e,t){if(1&e&&f.ɵɵelement(0,"belender-success-step",28),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function Ve(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-duplicated-request-step",29),f.ɵɵlistener("newRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.newRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function He(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-birthday-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setBirthDate(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function ze(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-expiration-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setExpiration(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Be(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-error-support-number-step",30),f.ɵɵlistener("nextStep",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setSupportNumber(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Ue(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-fail-step",31),f.ɵɵlistener("retryRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.newRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("solicitud",e.solicitud)("texts",e.data[e.flowName].texts)}}function We(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-abandoned-step",32),f.ɵɵlistener("retryRequest",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.retryRequest(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)}}function $e(e,t){if(1&e&&f.ɵɵelement(0,"belender-no-service-step",33),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)}}function Ge(e,t){if(1&e&&f.ɵɵelement(0,"belender-standby-step",33),2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)}}function Ze(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",34)(1,"div",35)(2,"h1",36),f.ɵɵtext(3,"No existe la solicitud"),f.ɵɵelementEnd()(),f.ɵɵelementStart(4,"div",37),f.ɵɵtext(5," No existen solicitudes activas con el código requerido "),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext(3);f.ɵɵadvance(4),f.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Ke(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"belender-cancel-request",38),f.ɵɵlistener("updateStatusCode",(function(t){f.ɵɵrestoreView(e);const n=f.ɵɵnextContext(3);return f.ɵɵresetView(n.setCancel(t))})),f.ɵɵelementEnd()}if(2&e){const e=f.ɵɵnextContext(3);f.ɵɵproperty("flowType",e.flowName)("request_id",e.requestID)("labels",e.labels)("user_id",e.userId)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function Qe(e,t){if(1&e&&(f.ɵɵelement(0,"div",39),f.ɵɵpipe(1,"safeHtml")),2&e){const e=f.ɵɵnextContext(3);f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription?f.ɵɵpipeBind1(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""):"",f.ɵɵsanitizeHtml)}}function Xe(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtemplate(1,Fe,2,9,"belender-form-step",13),f.ɵɵtemplate(2,qe,2,8,"belender-shared-otp-step",14),f.ɵɵtemplate(3,Ye,1,7,"belender-success-step",15),f.ɵɵtemplate(4,Ve,1,3,"belender-duplicated-request-step",16),f.ɵɵtemplate(5,He,1,3,"belender-error-birthday-step",17),f.ɵɵtemplate(6,ze,1,3,"belender-error-expiration-step",17),f.ɵɵtemplate(7,Be,1,3,"belender-error-support-number-step",17),f.ɵɵtemplate(8,Ue,1,4,"belender-fail-step",18),f.ɵɵtemplate(9,We,1,4,"belender-abandoned-step",19),f.ɵɵtemplate(10,$e,1,2,"belender-no-service-step",20),f.ɵɵtemplate(11,Ge,1,2,"belender-standby-step",20),f.ɵɵtemplate(12,Ze,6,2,"div",21),f.ɵɵtemplate(13,Ke,1,6,"belender-cancel-request",22),f.ɵɵtemplate(14,Qe,2,5,"div",23),f.ɵɵelementContainerEnd()),2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(1),f.ɵɵproperty("ngIf","form"===e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","otp_ss"==e.requestStatus||"otp_aeat"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","success"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","duplicated"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-birth-date"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-expiration-date"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","error-support-number"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","failed"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","abandoned"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","no-service"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","standby"==e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","created"!=e.step),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.showCancelRequest&&e.data.config.cancelRequest),f.ɵɵadvance(1),f.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.loadingRequestData&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription))}}function Je(e,t){1&e&&f.ɵɵelement(0,"belender-disabled-url")}function et(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"div",40)(1,"div",34)(2,"div",41),f.ɵɵtext(3,"Error!"),f.ɵɵelementEnd(),f.ɵɵelement(4,"div",42),f.ɵɵelementEnd(),f.ɵɵelementStart(5,"div",43)(6,"button",44),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext(2);return f.ɵɵresetView(t.error=!1)})),f.ɵɵtext(7," Ingresar manualmente "),f.ɵɵelementEnd()()()}if(2&e){const e=f.ɵɵnextContext(2);f.ɵɵadvance(4),f.ɵɵstyleProp("color",e.data.styles.colors.text),f.ɵɵproperty("innerHTML",e.error,f.ɵɵsanitizeHtml)}}function tt(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",3)(1,"div"),f.ɵɵtemplate(2,Ne,3,2,"div",4),f.ɵɵtemplate(3,Re,1,1,"belender-widget-logo",5),f.ɵɵtemplate(4,je,2,1,"div",6),f.ɵɵtemplate(5,Xe,15,14,"ng-container",2),f.ɵɵtemplate(6,Je,1,0,"belender-disabled-url",2),f.ɵɵtemplate(7,et,8,3,"div",7),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵclassMapInterpolate1("h-full w-full relative flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),f.ɵɵstyleProp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.warningAlert&&"success"!=e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.getIfShowLogo()),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.error&&!e.disableURL),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.error&&e.disableURL),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(f.ɵɵelementStart(0,"div",45),f.ɵɵelement(1,"mat-progress-spinner",46),f.ɵɵelementStart(2,"p",47),f.ɵɵtext(3),f.ɵɵelementEnd()()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(3),f.ɵɵtextInterpolate1(" ",e.loading," ")}}function it(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵelementStart(1,"div",48),f.ɵɵtext(2),f.ɵɵelementEnd(),f.ɵɵelementContainerEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}let rt=class{constructor(e,t,n,i,r,s,o,a,l,d,u,h){this.cd=e,this.Activatedroute=t,this.utils=n,this.pinService=i,this.notis=r,this.webhooksService=s,this.flowsS=o,this.customizationStoreService=a,this.deviceInfoService=l,this.customizationService=d,this.dialog=u,this.translationService=h,this.data=null,this.disableActions=!1,this.step="created",this.clientEnviroment="belender",this.showCancelRequest=!1,this.loading=null,this.error=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.lastThreeNumbersPhone=null,this.requestIDFromURL=!1,this.paramsSetted=!1,this.stopPropagationOfSuccess=!1,this.picturesTaken=[],this.disableURL=!1,this.selectedLanguage="es",this.isDni=!0,this.loadingRequestData=!1,this.env=c.N,this.intervalToAskBack=null,this.requestedFromDetail=!1,this.intervalCount=0,this.requestStatus="",this.currentHeight=0,this.isScaled=!1,this.termsOpened=!1,this.flowName="ClavePin",this.labels=m.S.es,this.currentLang="",localStorage.getItem("belender-language")&&(this.selectedLanguage=localStorage.getItem("belender-language")),this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.getWindowsScreenOrientation();const e=this;e.setWarningPortals(),this.loading="Obteniendo información de la solicitud",this.checkClientUrl(),this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.labels.loadings.gettingData,e.userId?e.setInitialData(e.userId):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}getWindowsScreenOrientation(){window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.sendMessageToParent({type:"widgetHeight",data:e})}setRequestStatus(e){if(this.solicitud)this.solicitud.status_code=e;else{let t=new a.l;t.status_code=e,this.solicitud=t}this.setStatus()}checkClientUrl(){const e=window.location.href;this.clientEnviroment=this.getClientFromUrl(e)}getOTPMinLength(){return this.env?"dev"===this.env.env&&"belender"===this.clientEnviroment?6:"qa"===this.env.env||"dev"===this.env.env&&"opendata"===this.clientEnviroment?3:6:6}getClientFromUrl(e){return e.includes("opendata")?"opendata":"belender"}setWarningPortals(){this.flowsS.getFlows().then((e=>{if(e&&e.data&&e.data.length){let t=e.data.find((e=>e.name==this.flowName));t&&t.status&&"OCCASIONAL_FAIL"==t.status&&(this.warningAlert=this.labels.warnings.ocassionalError)}})).catch((e=>{console.error(e)}))}setInitialData(e){var t=this;return(0,i.Z)((function*(){if(t.flowConfig=yield t.getFlow(e),t.funderConfig=t.customizationStoreService.FUNDER_CONFIG,t.funderStyles=t.customizationStoreService.FUNDER_STYLES,t.data={config:t.funderConfig,styles:t.funderStyles,[t.flowName]:t.flowConfig},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.loading=null,t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe({next:e=>{e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id,e),this.requestIDFromURL=!0):e?this.setParamsToRequest(e):this.loading=null},error:()=>{this.loading=null}})}setParamsToRequest(e){this.solicitud||this.setRequestStatus("form"),e.success&&(this.stopPropagationOfSuccess=!0),(e.document_number||e.document)&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0),(e.birth_date||e.birthday)&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0),(e.document_expiration_date||e.expiration)&&!this.solicitud.person_document_expiration_date&&(this.solicitud.person_document_expiration_date=e.document_expiration_date||e.expiration,this.requestIDFromURL=!0),(e.document_support||e.supportNumber)&&!this.solicitud.document_support&&(this.solicitud.document_support=e.document_support||e.supportNumber,this.requestIDFromURL=!0),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0),this.paramsSetted=!0}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){n.loading=n.labels.loadings.gettingData,n.loadingRequestData=!0,n.testMode?setTimeout((()=>{n.solicitud=u.VU.data,n.setRequestStatus(n.solicitud.status_code),n.setSubscriptionOfRequest(),n.loading=null,n.loadingRequestData=!1,n.skipCreationOfRequest=!0,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)}),4e3):n.pinService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.solicitud=e.data,n.setRequestStatus(n.solicitud.status_code),n.setSubscriptionOfRequest(),n.loading=null,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.loading=null,n.loadingRequestData=!1})).catch((e=>{n.loading=null,n.loadingRequestData=!1}))}))()}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}console.log("Message to parent:",e,this.currentHeight),window.top.postMessage(e,"*")}handlePusherNotification(e){if(e&&(this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase=e,e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.dataFromFirebase)){if(this.dataFromFirebase.hasOwnProperty("match_phone")&&!this.dataFromFirebase.match_phone)return void this.handleBadPhone();this.dataFromFirebase.person_last_three_phone_number&&(this.lastThreeNumbersPhone=this.dataFromFirebase.person_last_three_phone_number),this.dataFromFirebase.status_code&&("consent_process_completed"===this.dataFromFirebase.status_code&&this.disconnectWebsocket(),this.setRequestStatus(this.dataFromFirebase.status_code),"terms_and_conditions"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}}handleBadPhone(){this.disconnectWebsocket(),this.loading=this.labels.loadings.validatingData,this.pinService.noMatchPhone({request_id:this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID,user_id:this.userId}).then((e=>{setTimeout((()=>{this.solicitud||(this.solicitud=new a.l,this.setRequestStatus(this.solicitud.status_code)),e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null}),3e3)})).catch((e=>{this.showAlert("Error!",e),setTimeout((()=>{this.solicitud||(this.solicitud=new a.l,this.setRequestStatus(this.solicitud.status_code)),this.setRequestStatus("failed_without_retry"),this.loading=null}),1e3)}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==c.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==c.N.env&&(e="wss://notifications.belender.net"),c.N.notificationsBaseUrl&&(e=c.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),n&&t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setIsDni(e){this.isDni=e}setSubscriptionOfRequestOld(){}sendNewData(e){this.loading=this.labels.loadings.sendingData,this.pinService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e,"error"),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error,"error")}))}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}showAlert(e,t,n){this.loading=null;let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}setNoService(e){this.loading=this.labels.loadings.validatingData,e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.pinService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null,this.cd.markForCheck()}))}))}validateRequest(e){e.user_id=this.userId,e.package_id=this.packId,this.loading=this.labels.loadings.validatingData,this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.checkService(e).then((t=>{if(t&&t.status&&"success"==t.status)this.gotoTerms(e);else if(t.message){let n=this.parseErrorResponse(t.message);"no-service"==n.title?this.setNoService(e):(this.notis.showAlert(n.title,n.description),this.loading=null),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.setNoService(e)})).catch((t=>{if(console.error(t),t.message){let n=this.parseErrorResponse(t.message);"no-service"!=n.title?(this.notis.showAlert(n.title,n.description),this.loading=null):(this.pinService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null}))})),this.loading=null,this.cd.markForCheck()),console.log("handle code: ",n.code),this.handleDisableInputs(n.code)}else this.notis.showAlert("Error indefinido!",t),this.loading=null,this.cd.markForCheck()}))}handleDisableInputs(e){!e||setTimeout((()=>{"venc"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"sop"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),"nac"===e&&this.formComponent&&this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1},{value:!1}),this.cd.markForCheck()}),1e3)}parseErrorResponse(e){if(Array.isArray(e)){let t="";return e.forEach((e=>{t+=e+" "})),{title:this.labels.warnings.errorSomeData,description:t}}return"does not have pin service"==e.toLowerCase()||"does not have clave pin service"==e.toLowerCase()?{title:"no-service",description:this.labels.warnings.noPinService}:"document number invalid."==e.toLowerCase()?{title:this.labels.warnings.wrongDni,description:this.labels.warnings.wrongDniDesc}:"Incorrect support number"==e.toLowerCase()?{title:this.labels.warnings.error,code:"sop",description:this.labels.warnings.wrongSupport}:"incorrect date"==e.toLowerCase()?this.isDni?{title:this.labels.warnings.wrongDate,code:"venc",description:this.labels.warnings.wrongDateDesc}:{title:this.labels.warnings.wrongDate,code:"nac",description:this.labels.warnings.wrongDateDesc}:{title:"Error!",description:e}}gotoTerms(e){e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.loading=this.labels.loadings.sendingData,this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("waiting_otp_seguridad_social"),this.loading=null}),4e3):this.skipCreationOfRequest?(this.acceptTerms(),this.setSubscriptionOfRequest()):this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.solicitud=e,400==t.code&&"Does not have Pin service"==t.message?(t.data&&(this.requestID=t.data.request_id),this.pinService.setNoService({request_id:this.requestID}).then((()=>{this.setRequestStatus("no_service"),this.loading=null})).catch((e=>{this.setRequestStatus("no_service"),this.loading=null}))):400==t.code&&"Incorrect support number"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert("Error!",t.message))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.setRequestStatus(this.solicitud.status_code),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:t.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert(this.labels.warnings.error,e.errorMessage)}))}acceptTerms(e=!0){let t={user_id:this.userId,request_id:this.requestID,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingData),this.pinService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message&&"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message?e.message:e):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.setSubscriptionOfRequest(),this.setRequestStatus(e.data&&e.data.next_step_detail&&e.data.next_step_detail.portal&&"Seguridad Social"===e.data.next_step_detail.portal?"waiting_otp_seguridad_social":e.data&&e.data.next_step_detail&&e.data.next_step_detail.portal&&"AEAT"===e.data.next_step_detail.portal?"waiting_otp_aeat":e.data&&e.data.next_step_detail&&e.data.next_step_detail[0]&&e.data.next_step_detail[0].portal&&"Seguridad Social"===e.data.next_step_detail[0].portal?"waiting_otp_seguridad_social":e.data&&e.data.next_step_detail&&e.data.next_step_detail[0]&&e.data.next_step_detail[0].portal&&"AEAT"===e.data.next_step_detail[0].portal?"waiting_otp_aeat":e.data.status_code),this.loading=null,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando información..",this.pinService.sendOTP({user_id:this.userId,request_id:this.requestID,code:e.code}).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.labels.warnings.error,this.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=null):e&&"success"==e.status?(this.handleRequestStatus(e.data||e),this.cd.markForCheck()):this.loading=null})).catch((e=>{this.showAlert("Error!",e&&e.error?e.error:e),this.loading=null}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,t.status_code="consent_process_completed",this.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.solicitud&&this.solicitud.widget_url?this.solicitud.widget_url:this.widgetUrl||"",status_code:"consent_process_completed",user_id:this.solicitud&&this.solicitud.user_id?this.solicitud.user_id:this.userId||"",funder_id:this.solicitud&&this.solicitud.funder_id?this.solicitud.funder_id:"",request_id:this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID||"",widget_url_boxed:this.solicitud&&this.solicitud.widget_url_boxed?this.solicitud.widget_url_boxed:this.widgetUrlBoxed||""}}),this.solicitud=t,setTimeout((()=>{this.disconnectWebsocket()}),3e3),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status||e.next_step_detail?e.otp_status&&"VALID"===e.otp_status?Array.isArray(e.next_step_detail)?t.status_code="Seguridad Social"===e.next_step_detail[0].portal?"waiting_otp_seguridad_social":"AEAT"===e.next_step_detail[0].portal?"waiting_otp_aeat":e.status_code:Array.isArray(e.next_step_detail)||(t.status_code="Seguridad Social"===e.next_step_detail.portal?"waiting_otp_seguridad_social":"AEAT"===e.next_step_detail.portal?"waiting_otp_aeat":e.status_code):e.otp_status&&"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)),this.sendMessageToParent({type:"response",data:e})),this.solicitud=t,this.setRequestStatus(this.solicitud.status_code),this.loading=null}askToBack(){this.pinService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code),this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.pinService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}retryRequest(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingRequest,this.setSubscriptionOfRequest(),this.pinService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code)),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.setRequestStatus("created")}disconnectWebsocket(){this.socket&&this.socket.close()}initIntervalToAskBack(){!this.solicitud||!this.solicitud.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.solicitud.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){let t=JSON.parse(JSON.stringify(this.solicitud.status_code));e||this.requestID?this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1})):this.stopInterval()}setStatus(){if(this.showCancelRequest=!0,this.solicitud){if(this.solicitud){let e=h[this.solicitud.status_code];e&&("success"===e&&this.funderConfig&&this.funderConfig.infiniteLoopInCompleted&&(this.loading=" "),("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),this.requestStatus=e)}}else this.requestStatus="form";this.cd.markForCheck()}sendRetry(){}setCancel(e){this.setRequestStatus(e)}gotoTermsAndConditions(){this.dialog.open(p.L,{panelClass:"fullscreen-dialog",data:{flow:this.flowName,allData:this.data,lang:this.currentLang}}).afterClosed().subscribe((e=>{e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}))}pictureTaken(e){this.picturesTaken.push(e._imageAsDataUrl)}getIfShowLogo(){return("loading"!=this.requestStatus&&"success"!=this.requestStatus&&!this.loading||!this.funderConfig?.infiniteLoopInCompleted)&&this.funderStyles?.withLogo}};rt.ɵfac=function(e){return new(e||rt)(f.ɵɵdirectiveInject(f.ChangeDetectorRef),f.ɵɵdirectiveInject(g.gz),f.ɵɵdirectiveInject(_.F),f.ɵɵdirectiveInject(v.v),f.ɵɵdirectiveInject(y.T),f.ɵɵdirectiveInject(b.t),f.ɵɵdirectiveInject(x.s),f.ɵɵdirectiveInject(w.r),f.ɵɵdirectiveInject(C.H),f.ɵɵdirectiveInject(S.w),f.ɵɵdirectiveInject(M.uw),f.ɵɵdirectiveInject(I.D))},rt.ɵcmp=f.ɵɵdefineComponent({type:rt,selectors:[["belender-widget-pin"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(Le,5),f.ɵɵviewQuery(Ae,5),f.ɵɵviewQuery(Le,5)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.formComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.otpComponent=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[f.ɵɵProvidersFeature([{provide:s.o2,useValue:{appearance:"standard"}}])],decls:3,vars:3,consts:[["id","widget-wrapper","class","h-full widget-belender",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[4,"ngIf"],["id","widget-wrapper",1,"h-full","widget-belender"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],[3,"logoUrl",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[3,"logoUrl"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"userId","flowName","lang","requestIDFromURL","texts","data","labels","solicitud","goToTerms","nextStep","isDni",4,"ngIf"],[3,"otpType","flowType","data","labels","solicitud","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"data","labels","solicitud","texts","retryRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","solicitud","retryRequest",4,"ngIf"],[3,"texts","data",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"flowType","request_id","labels","user_id","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[3,"userId","flowName","lang","requestIDFromURL","texts","data","labels","solicitud","goToTerms","nextStep","isDni"],["formStep",""],[3,"otpType","flowType","data","labels","solicitud","minLength","lastThreeNumbersPhone","texts","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","flowName","packId","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","texts","nextStep"],[3,"data","labels","solicitud","texts","retryRequest","newRequest"],[3,"data","labels","texts","solicitud","retryRequest"],[3,"texts","data"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[3,"flowType","request_id","labels","user_id","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40","value","0","mode","indeterminate",1,"spinner"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(f.ɵɵtemplate(0,tt,8,11,"div",0),f.ɵɵtemplate(1,nt,4,1,"div",1),f.ɵɵtemplate(2,it,3,1,"ng-container",2)),2&e&&(f.ɵɵproperty("ngIf",t.data&&t.data.styles&&t.data.styles.colors&&!t.loading),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",(t.loading||"loading"===t.requestStatus)&&!t.error),f.ɵɵadvance(1),f.ɵɵproperty("ngIf",t.testMode))},dependencies:[k.O5,E.q,T.X,P.y,O.i,D.Hw,L.lW,A.Ou,z,$,Ce,Se,Me,ke,Ee,Te,Pe,De,q.z],styles:[".widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.card[_ngcontent-%COMP%]{transition:all .2s ease;overflow:hidden;width:500px;max-width:100%;margin:0 auto}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}.webcam-wrapper[_ngcontent-%COMP%]{position:relative}.webcam-overlay[_ngcontent-%COMP%]{position:absolute;z-index:99;width:500px;top:0;left:0;width:100%;height:100%;justify-content:center}.webcam-overlay[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background:url(/assets/img/exclude.png);width:100%;height:100%;background-repeat:no-repeat;background-size:cover;opacity:.7;max-width:500px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;top:0;left:0;background:#fff}"],data:{animation:[d.$]}}),rt=(0,r.gn)([(0,o.c)()],rt)},1916:(e,t,n)=>{n.r(t),n.d(t,{PinModule:()=>O});var i=n(6895),r=n(6383),s=n(5592),o=n(4006),a=n(3798),l=n(9391),c=n(182),d=n(7367),u=n(3238),h=n(5895),p=n(4246),m=n(9299),f=n(6e3),g=n(920),_=n(4650);const v=[{path:":idUser",component:g.n},{path:":idUser/:packID",component:g.n}];let y=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=_.ɵɵdefineNgModule({type:e}),e.ɵinj=_.ɵɵdefineInjector({imports:[m.Bz.forChild(v),m.Bz,f.d8]}),e})();var b=n(7489),x=n(6981),w=n(1129),C=n(9476),S=n(3295),M=n(1145),I=n(3300),k=n(7795),E=n(865),T=n(3033),P=n(5028);let O=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=_.ɵɵdefineNgModule({type:e}),e.ɵinj=_.ɵɵdefineInjector({providers:[b.v,l.o,d.w,c.t,h.T,p.t,{provide:u.Ad,useValue:"es-ES"}],imports:[y,i.ez,r.G,s.J,o.FormsModule,o.ReactiveFormsModule,a.a,x.x,w.n,C.F,S.g,M.j,I.C,k.QA,E.q,T.d,P.q]}),e})()},8364:(e,t,n)=>{n.d(t,{T:()=>Ft});var i=n(5861),r=n(7582),s=n(9549),o=n(9933),a=n(5762),l=n(8259),c=n(2340),d=n(667);const u={created:"form",form:"form",terms_and_conditions:"form",waiting_otp_seguridad_social:"otp",waiting_login_seguridad_social:"otp",invalid_otp_seguridad_social:"otp",abandoned_after_bad_phone:"abandoned",abandoned_after_invalid_otp_seguridad_social:"abandoned",abandoned_after_terms_and_conditions:"abandoned",abandoned_after_waiting_otp_seguridad_social:"abandoned",all_documents_downloaded:"success",partial_documents_downloaded:"success",consent_process_completed:"success",partial_documents_downloaded_and_deleted:"success",all_documents_downloaded_and_deleted:"success",waiting_documents:"success",failed_with_retry:"failed",failed_without_retry:"failed",failed_documents_downloaded:"failed",consent_process_canceled:"failed",no_service:"no-service",no_sms_service:"no-service",stand_by:"standby","no-phone":"no-phone",no_phone:"no-phone","no-more-phone":"no-phone",no_more_phone:"no-phone",bad_phone:"bad-phone",error_expiration_date:"error-expiration-date",error_birth_date:"error-birth-date",error_support_number:"error-support-number",duplicated:"duplicated"};var h=n(6830),p=n(1931),m=n(4650),f=n(9299),g=n(5089),_=n(5601),v=n(7367),y=n(8460),b=n(5895),x=n(5206),w=n(7489),C=n(9045),S=n(5412),M=n(7308),I=n(6895),k=n(7392),E=n(9101),T=n(1572),P=n(3364),O=n(1760),D=n(4302),L=n(9112),A=n(9382),N=n(4006),R=n(9391),j=n(3046),F=n(342),q=n(3731);function Y(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.success.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function V(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",6),m.ɵɵelement(1,"div",7)(2,"div",8),m.ɵɵpipe(3,"safeHtml"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",e.texts.success.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(3,8,e.texts.success.description||""),m.ɵɵsanitizeHtml)}}function H(e,t){if(1&e&&m.ɵɵelement(0,"widget-documents",9),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("userId",e.userId)("packId",e.packId)("requestID",e.requestID)}}function z(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",10),m.ɵɵelement(1,"mat-progress-spinner",11),m.ɵɵelementStart(2,"p",12),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}function B(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",13)(1,"button",14),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.gotoRedirect())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||e.labels.actions.clickToFinish," ")}}let U=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.loading=null,this.showDocuments=!1}ngOnInit(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].automaticRedirectCallBack&&this.data[this.flowName].callBackUrl?setTimeout((()=>{location.assign(this.data[this.flowName].callBackUrl)}),2e3):this.data&&this.data[this.flowName]&&this.data[this.flowName].showDocumentsOnSuccess&&(this.showDocuments=!0)}save(){}gotoRedirect(){this.data&&this.data[this.flowName]&&this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",loading:"loading",requestID:"requestID",packId:"packId",userId:"userId",flowName:"flowName",labels:"labels"},decls:5,vars:5,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class"," pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],[3,"userId","packId","requestID",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"userId","packId","requestID"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Y,1,2,"belender-widget-logo",0),m.ɵɵtemplate(1,V,4,10,"div",1),m.ɵɵtemplate(2,H,1,3,"widget-documents",2),m.ɵɵtemplate(3,z,4,2,"div",3),m.ɵɵtemplate(4,B,3,7,"div",4)),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.showDocuments),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data&&t.data[t.flowName]&&t.data[t.flowName].enableUrlCallBack&&!t.data[t.flowName].automaticRedirectCallBack))},dependencies:[I.O5,E.lW,T.Ou,j.X,F.A,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var W=n(4144);function $(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",7),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.errorPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function G(e,t){if(1&e&&(m.ɵɵelementStart(0,"form",8)(1,"mat-form-field",9)(2,"mat-label"),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelement(4,"input",10),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("formGroup",e.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(e.labels.phone)}}function Z(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",11)(1,"button",12),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.no())})),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelementStart(3,"button",13),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.next())})),m.ɵɵtext(4),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.warnings.dontHavePhone," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.form.invalid?"":e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",e.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.next," ")}}let K=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.cd=n,this.notifications=i,this.loading=null,this.noPhone=new m.EventEmitter(null),this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({phone:[null,[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]]})}next(){this.nextStep.emit(this.form.get("phone").value)}no(){this.noPhone.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-phone-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{noPhone:"noPhone",nextStep:"nextStep"},decls:9,vars:13,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","w-full",3,"formGroup",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["maxlength","9","formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"bg-red-500","text-red-50","px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"click"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,$,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelement(6,"br"),m.ɵɵtemplate(7,G,5,2,"form",5),m.ɵɵelementEnd(),m.ɵɵtemplate(8,Z,5,11,"div",6),m.ɵɵelementEnd()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.errorPhone.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,11,t.texts.errorPhone.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",!t.data.config.noRetryInBadPhone),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.data.config.noRetryInBadPhone))},dependencies:[I.O5,E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Q(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",3),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.fail.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function X(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",9)(1,"button",10),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.retry())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.retry," ")}}function J(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",9)(1,"button",10),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.newRequest())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.labels.actions.newRequest)}}function ee(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",4)(1,"div",5),m.ɵɵelement(2,"div",6)(3,"div",7),m.ɵɵpipe(4,"safeHtml"),m.ɵɵelementEnd(),m.ɵɵtemplate(5,X,3,7,"div",8),m.ɵɵtemplate(6,J,3,7,"div",8),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵproperty("innerHTML",e.texts.fail.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(4,6,e.texts.fail.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.solicitud&&"failed_with_retry"==e.solicitud.status_code),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.solicitud&&"failed_documents_downloaded"==e.solicitud.status_code)}}function te(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",11),m.ɵɵelement(1,"mat-progress-spinner",12),m.ɵɵelementStart(2,"p",13),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}let ne=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.loading=null,this.retryOp=new m.EventEmitter(null),this.newReq=new m.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud",loading:"loading",labels:"labels"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:3,vars:3,consts:[[3,"firstOption","logoUrl",4,"ngIf"],["class","animated fadeIn fixed-content",4,"ngIf"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Q,1,2,"belender-widget-logo",0),m.ɵɵtemplate(1,ee,7,8,"div",1),m.ɵɵtemplate(2,te,4,2,"div",2)),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading))},dependencies:[I.O5,E.lW,T.Ou,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ie=n(5439),re=n.n(ie),se=(n(6866),n(3238)),oe=n(3755),ae=n(3746),le=n(2932),ce=n(4246),de=n(1763),ue=n(7795),he=n(5696);const pe=["termsCheckbox"],me=["assignmentCheckbox"];function fe(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",22),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.form.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function ge(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}function _e(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," El formato debe ser DD/MM/AAAA "),m.ɵɵelementEnd())}function ve(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," Fecha inválida "),m.ɵɵelementEnd())}function ye(e,t){1&e&&(m.ɵɵelementStart(0,"mat-error"),m.ɵɵtext(1," Debe ser mayor de 18 años "),m.ɵɵelementEnd())}const be=function(e){return{mask:e}};function xe(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"mat-form-field",23)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",24),m.ɵɵelementStart(4,"mat-hint")(5,"a",25),m.ɵɵlistener("click",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.gotoExpirationDate(t))})),m.ɵɵelementStart(6,"u"),m.ɵɵtext(7),m.ɵɵelementEnd()()()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.expiration),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(3,be,e.datemask)),m.ɵɵadvance(4),m.ɵɵtextInterpolate(e.labels.findExpiration)}}function we(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-form-field",23)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",26),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.support)}}function Ce(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",27)(1,"mat-form-field",6)(2,"mat-label"),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelement(4,"input",28),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",e.disabledInputs.email?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.email),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.email?-1:1),m.ɵɵpropertyInterpolate("placeholder",e.labels.inputEmail)}}function Se(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",29)(1,"belender-checkbox",30,31),m.ɵɵlistener("changeCheckbox",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setTerms(t))})),m.ɵɵelementStart(3,"belender-terms-and-policy-links",32),m.ɵɵlistener("goToTerms",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.gotoTermsAndConditions(t))})),m.ɵɵelementEnd()()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("color",e.data.styles.colors.title),m.ɵɵadvance(2),m.ɵɵproperty("userId",e.userId)("lang",e.lang)("flowName",e.flowName)("data",e.data)("showPolicyLink",null==e.data?null:e.data.config.showPolicyLink)("firstSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.firstSentence)("secondSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.secondSentence)("thirdSentence",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.thirdSentence)("policyActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.policyActionText)("termsActionText",null==e.data[e.flowName]||null==e.data[e.flowName].texts||null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.termsActionText)("customTerms",e.data[e.flowName].customTerms)}}function Me(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",33)(1,"belender-checkbox",34,35),m.ɵɵlistener("changeCheckbox",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setAssignment(t))})),m.ɵɵelement(3,"div",36),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("color",e.data.styles.colors.title),m.ɵɵadvance(2),m.ɵɵproperty("innerHTML",e.data[e.flowName]&&e.data[e.flowName].texts&&e.data[e.flowName].texts.dataAssignmentText?e.data[e.flowName].texts.dataAssignmentText:null==e.data?null:e.data.config.dataAssignmentText,m.ɵɵsanitizeHtml)}}function Ie(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",37),m.ɵɵelement(1,"mat-icon",38),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.labels.warnings.haveToReadTerms," ")}}function ke(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",39),m.ɵɵelement(1,"mat-icon",38),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.errorDNI," ")}}function Ee(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",40),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.goBack())})),m.ɵɵtext(1),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵstyleProp("border-radius",e.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.back," ")}}function Te(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",41),m.ɵɵelement(1,"mat-progress-spinner",42),m.ɵɵelementStart(2,"p",43),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",0),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.loading," ")}}const Pe=function(e){return{"dont-show-data":e}},Oe=function(e,t,n){return{"justify-start":e,"justify-center":t,"justify-end":n}};let De=(()=>{class e{constructor(e,t,n,i,r,s){this.fb=e,this.utils=t,this.cd=n,this.widgetUtils=i,this.dialog=r,this.customService=s,this.next=new m.EventEmitter(null),this.goTerms=new m.EventEmitter(null),this.goIntro=new m.EventEmitter(null),this.acceptTerms=!1,this.assignment=!1,this.termsReaded=!1,this.isDni=!1,this.isNie=!1,this.errorDNI=null,this.disabledInputs={document_number:!1,birth_date:!1,email:!1,phone:!1},this.noValidate=!1,this.testMode=!0,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],this.lang=""}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setForm(e){console.warn("setForm");let t=e?e.person_document_number||e.dni||e.document_number:null,n=e&&e.person_birth_date?re()(e.person_birth_date).format("DD/MM/YYYY"):null,i=e&&e.birth_date?re()(e.birth_date).format("DD/MM/YYYY"):n,r=e?e.person_phone||e.phone:null,s=e?e.person_email||e.email:null;t&&this.setRegex(t);const o=this;o.form=o.fb.group(o.data&&o.data.config&&o.data.config.followMail?{document_number:[t||null,o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[N.Validators.required,(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[r||"",o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]],email:[s||null,o.noValidate?[]:[N.Validators.required,N.Validators.email]],document_expiration:[null,[(0,le.s)({checkFormat:!0,checkDate:!0})]],support_number:[null]}:{document_number:[t||null,o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),o.regexDNI()]],birth_date:[i||null,o.noValidate?[]:[N.Validators.required,(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],type:["DNI"],phone:[r||"",o.noValidate?[]:[N.Validators.required,N.Validators.maxLength(9),N.Validators.minLength(9)]],email:[s||null],document_expiration:[null,[(0,le.s)({checkFormat:!0,checkDate:!0,checkAge:!0})]],support_number:[null]}),this.form.markAllAsTouched(),this.form.updateValueAndValidity(),o.requestIDFromURL&&o.disableEnableInputs(t,n,r,s)}forceEnableDisableInputs(e,t,n,i){this.disableEnableInputs(e?e.value:this.disabledInputs.document_number,t?t.value:this.disabledInputs.birth_date,n?n.value:this.disabledInputs.phone,i?i.value:this.disabledInputs.email)}disableEnableInputs(e,t,n,i){this.disabledInputs={document_number:e||!1,birth_date:t||!1,email:i||!1,phone:n||!1},console.warn("this.disabledInputs",this.disabledInputs)}regexDNI(){return e=>{const t=e.value;return t?(this.setRegex(t),this.isDni||this.isNie?null:{regexDNI:!0}):null}}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.termsReaded=!0,this.goTerms.emit(!0)}setRegex(e){if(!e)return;let t=this.widgetUtils.ValidateIDType(e);t&&t.type?("dni"===t.type?(this.isDni=!0,this.errorDNI=t.valid?null:"Debes ingresar un DNI válido!"):this.isDni=!1,"nie"===t.type?(this.isNie=!0,this.errorDNI=t.valid?null:"Debes ingresar un NIE válido!"):this.isNie=!1):(this.isDni=!1,this.isNie=!1,this.errorDNI="Debes ingresar un DNI o NIE válido!"),this.cd.markForCheck()}setTerms(e){this.acceptTerms=e}setAssignment(e){this.assignment=e}getIfValid(){return!!this.data.config.hideCheckLegal||this.acceptTerms}getFormsValid(){let e=!this.form.invalid,t=this.form.get("document_number").value;return t?this.setRegex(t):e=!1,!this.isDni&&!this.isNie&&(this.disabledInputs.document_number=!1,e=!1),this.errorDNI&&(e=!1),this.cd.markForCheck(),e}nextStep(){let e;e=this.data&&this.data.config&&this.data.config.followMail?{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,email_copy:this.form.get("email").value,check_legal:!0,document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"}:{document_number:this.form.get("document_number").value.toUpperCase(),birth_date:this.utils.formatDate(this.form.get("birth_date").value),type:this.form.get("type").value,phone:this.form.get("phone").value,check_legal:!0,email_copy:"roger.checa@belender.eu",document_expiration_date:this.form.get("document_expiration")?this.utils.formatDate(this.form.get("document_expiration").value):"2029-04-11"},this.next.emit(e)}getAssignmentValidation(){return!(this.data.config.forceChecks&&!this.termsReaded)&&(!this.data.config.dataAssignmentCheck||this.assignment)}goBack(){this.goIntro.emit(!0)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(oe.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ae.R,{panelClass:"fullscreen-dialog"})}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(ce.t),m.ɵɵdirectiveInject(S.uw),m.ɵɵdirectiveInject(v.w))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(pe,5),m.ɵɵviewQuery(me,5)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.checkComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{userId:"userId",data:"data",flowName:"flowName",texts:"texts",solicitud:"solicitud",pinMode:"pinMode",requestIDFromURL:"requestIDFromURL",labels:"labels",lang:"lang"},outputs:{next:"nextStep",goTerms:"goToTerms",goIntro:"goIntro"},features:[m.ɵɵProvidersFeature([{provide:se.sG,useValue:{parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}}}])],decls:36,vars:62,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["placeholder","Ej: 12312345R","formControlName","document_number","maxlength","9","matInput","",3,"tabindex"],[4,"ngIf"],["type","text","placeholder","Ej: 22/03/1990","formControlName","birth_date","matInput","",3,"tabindex","textMask"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["class","w-full",4,"ngIf"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],["class","mt-6 flex justify-start items-center w-full flex-100",4,"ngIf"],["class","px-2 flex items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],["class","pl-3 pr-4 flex w-fit items-center gap-2 py-2 rounded-sm mt-3 bg-orange-500/10 text-orange-500",4,"ngIf"],[1,"flex","items-center","gap-2","p-4","flex-col","md:flex-row",3,"ngClass"],["class","px-8 py-1 bg-slate-100 hover:bg-slate-200 text-slate-900 w-full max-w-none md:max-w-[220px]","mat-flat-button","","type","button",3,"border-radius","click",4,"ngIf"],["mat-flat-button","","type","button",1,"px-8","py-1","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["class","loading-wrapper flex flex-col items-center animated fadeIn",4,"ngIf"],[3,"firstOption","logoUrl"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration","matInput","",3,"textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["type","text","placeholder","22211134","required","","formControlName","support_number","matInput",""],[1,"w-full"],["formControlName","email","type","email","matInput","",3,"tabindex","placeholder"],[1,"flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","lang","flowName","data","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],[1,"mt-6","flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"],[1,"px-2","flex","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["svgIcon","mat:warning",1,"text-xs","w-4","h-4"],[1,"pl-3","pr-4","flex","w-fit","items-center","gap-2","py-2","rounded-sm","mt-3","bg-orange-500/10","text-orange-500"],["mat-flat-button","","type","button",1,"px-8","py-1","bg-slate-100","hover:bg-slate-200","text-slate-900","w-full","max-w-none","md:max-w-[220px]",3,"click"],[1,"loading-wrapper","flex","flex-col","items-center","animated","fadeIn"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){if(1&e&&(m.ɵɵtemplate(0,fe,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",7),m.ɵɵtemplate(11,ge,2,1,"mat-error",8),m.ɵɵelementEnd(),m.ɵɵelementStart(12,"mat-form-field",6)(13,"mat-label"),m.ɵɵtext(14),m.ɵɵelementEnd(),m.ɵɵelement(15,"input",9),m.ɵɵtemplate(16,_e,2,0,"mat-error",8),m.ɵɵtemplate(17,ve,2,0,"mat-error",8),m.ɵɵtemplate(18,ye,2,0,"mat-error",8),m.ɵɵelementEnd(),m.ɵɵtemplate(19,xe,8,5,"mat-form-field",10),m.ɵɵtemplate(20,we,4,1,"mat-form-field",10),m.ɵɵelementStart(21,"mat-form-field",6)(22,"mat-label"),m.ɵɵtext(23),m.ɵɵelementEnd(),m.ɵɵelement(24,"input",11),m.ɵɵelementEnd(),m.ɵɵtemplate(25,Ce,5,6,"div",12),m.ɵɵelementEnd(),m.ɵɵelementStart(26,"div",13),m.ɵɵtemplate(27,Se,4,12,"div",14),m.ɵɵtemplate(28,Me,4,2,"div",15),m.ɵɵtemplate(29,Ie,3,1,"div",16),m.ɵɵtemplate(30,ke,3,1,"div",17),m.ɵɵelementEnd(),m.ɵɵelementStart(31,"div",18),m.ɵɵtemplate(32,Ee,2,3,"button",19),m.ɵɵelementStart(33,"button",20),m.ɵɵlistener("click",(function(){return t.nextStep()})),m.ɵɵtext(34),m.ɵɵelementEnd()()(),m.ɵɵtemplate(35,Te,4,2,"div",21)),2&e){let e,n,i;m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("animated ",t.loading?"hide-content":""," fadeIn fixed-content px-2"),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.form.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,52,t.texts.form.description||""),m.ɵɵsanitizeHtml),m.ɵɵadvance(2),m.ɵɵproperty("ngClass",m.ɵɵpureFunction1(54,Pe,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.document_number?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.isDni?t.labels.dni:t.isNie?t.labels.nie:t.labels.nieOrDni),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.document_number?-1:1),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.errorDNI),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.birth_date?"disabled-input":""," w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.labels.birthday),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.birth_date?-1:1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(56,be,t.datemask)),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(e=t.form.get("expired_date"))?null:e.hasError("invalidFormat")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(n=t.form.get("birth_date"))?null:n.hasError("invalidDate")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==(i=t.form.get("birth_date"))?null:i.hasError("underAge")),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.pinMode&&!t.isNie),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.pinMode&&t.isNie),m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),m.ɵɵadvance(2),m.ɵɵtextInterpolate(t.labels.phone),m.ɵɵadvance(1),m.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.phone?-1:1),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==t.data||null==t.data.config?null:t.data.config.followMail),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.data.config.hideCheckLegal),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data.config.forceChecks&&!t.termsReaded),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.errorDNI),m.ɵɵadvance(1),m.ɵɵproperty("ngClass",m.ɵɵpureFunction3(58,Oe,"left"===t.data.styles.alignButtons,"center"===t.data.styles.alignButtons,"right"===t.data.styles.alignButtons||!t.data.styles.alignButtons)),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data.config.introEnabled),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getFormsValid()&&t.getAssignmentValidation()&&t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",!t.getFormsValid()||!t.getAssignmentValidation()||!t.getIfValid()),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.continue," "),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading)}},dependencies:[I.mk,I.O5,k.Hw,E.lW,s.TO,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.MaxLengthValidator,N.FormGroupDirective,N.FormControlName,T.Ou,de.b,ue.hd,j.X,he.T,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}.hide-content[_ngcontent-%COMP%]{opacity:0!important;max-height:0px!important;overflow:hidden!important;padding:0!important}"]}),e})(),Le=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new m.EventEmitter(null),this.loading=null,this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",N.Validators.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(f.gz))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud",loading:"loading",labels:"labels"},outputs:{next:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"form",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd()(),m.ɵɵelementStart(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementEnd()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.nextStep()})),m.ɵɵtext(13),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.warnings.phoneError),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.warnings.badPhoneSS),m.ɵɵadvance(4),m.ɵɵtextInterpolate(t.labels.phone),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.actions.continue))},dependencies:[E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.FormGroupDirective,N.FormControlName],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ae(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.noService.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ne=(()=>{class e{constructor(){this.loading=null}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-no-service-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Ae,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.noService.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,9,t.texts.noService.description),m.ɵɵsanitizeHtml))},dependencies:[I.O5,N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Re(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",8),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.abandoned.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let je=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new m.EventEmitter(null),this.loading=null}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return this.labels.abandoned.afterWaitingOtpSS;case"abandoned_after_invalid_otp_seguridad_social":return this.labels.abandoned.afterInvalidOtpSS;case"abandoned_after_invalid_otp_aeat":return this.labels.abandoned.afterInvalidOtpAEAT;case"abandoned_after_waiting_otp_aeat":return this.labels.abandoned.afterWaitingOtpAEAT;default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",loading:"loading",labels:"labels",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:11,vars:19,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Re,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementStart(6,"div",5),m.ɵɵtext(7),m.ɵɵelementEnd()(),m.ɵɵelementStart(8,"div",6)(9,"button",7),m.ɵɵlistener("click",(function(){return t.retry()})),m.ɵɵtext(10),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",t.texts.abandoned.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(5,17,t.texts.abandoned.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.actions.retry))},dependencies:[I.O5,E.lW,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var Fe=n(5145);function qe(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",10),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let Ye=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.nr=new m.EventEmitter(null),this.loading=null}ngOnInit(){}newRequest(){this.nr.emit(!0)}gotoRequest(){location.assign(this.currentRequest.widget_url_boxed)}getStatus(){let e=Fe.Z.find((e=>e.text==this.currentRequest.status_code));return e?e.label:this.labels.unknownState}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(R.o),m.ɵɵdirectiveInject(b.T))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-duplicated-request-step"]],inputs:{currentRequest:"currentRequest",loading:"loading",data:"data",texts:"texts",labels:"labels"},outputs:{nr:"newRequest"},decls:16,vars:21,consts:[[3,"logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"flex","gap-2","justify-start","items-center","py-2"],[1,"w-fit","p-1","px-2","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"],[3,"logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,qe,1,1,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1)(2,"div",2)(3,"div",3),m.ɵɵtext(4),m.ɵɵelementEnd(),m.ɵɵelementStart(5,"div",4),m.ɵɵtext(6),m.ɵɵelementEnd(),m.ɵɵelementStart(7,"div",5),m.ɵɵtext(8),m.ɵɵelementStart(9,"div",6),m.ɵɵtext(10),m.ɵɵelementEnd()()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.newRequest()})),m.ɵɵtext(13),m.ɵɵelementEnd(),m.ɵɵelementStart(14,"button",9),m.ɵɵlistener("click",(function(){return t.gotoRequest()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.duplicatedRequest," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.alreadyHaveRequest," "),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",t.labels.warnings.currentRequestStatus," "),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",t.getStatus()," "),m.ɵɵadvance(2),m.ɵɵstyleProp("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.newRequest," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.actions.gotoCurrentRequest," "))},dependencies:[I.O5,E.lW,j.X],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Ve(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.standby.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}let He=(()=>{class e{constructor(){this.loading=null}ngOnInit(){console.error(this.data,this.texts)}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-standby-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},decls:6,vars:11,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[3,"firstOption","logoUrl"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,Ve,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"form",1)(2,"div",2),m.ɵɵelement(3,"div",3)(4,"div",4),m.ɵɵpipe(5,"safeHtml"),m.ɵɵelementEnd()()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.standby?t.texts.standby.titleSize+"px":"20px"),m.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.title:"Solicitud en Stand By",m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵproperty("innerHTML",t.texts.standby?t.texts.standby.description:m.ɵɵpipeBind1(5,9,"Descripcion del estado Stand By"),m.ɵɵsanitizeHtml))},dependencies:[I.O5,N.ɵNgNoValidate,N.NgControlStatusGroup,N.NgForm,j.X,q.z]}),e})();const ze=function(e){return{mask:e}};let Be=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null),this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/]}ngOnInit(){this.form=this.fb.group({birth_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("birth_date").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-birthday-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:21,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","text","placeholder","Ej: 22/03/1990","required","","formControlName","birth_date","matInput","",3,"textMask"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementStart(11,"mat-hint"),m.ɵɵtext(12,"DD/MM/YYYY"),m.ɵɵelementEnd()()()(),m.ɵɵelementStart(13,"div",7)(14,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongBirthday," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputBirthDay," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.birthday),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(19,ze,t.datemask)),m.ɵɵadvance(4),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.send," "))},dependencies:[E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName,ue.hd],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Ue=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({support_number:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("support_number").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-support-number-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:14,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","number","placeholder","Ej: 1233443","required","","formControlName","support_number","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementEnd()()(),m.ɵɵelementStart(11,"div",7)(12,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(13),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongSupport," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputSupport," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.support),m.ɵɵadvance(3),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.send," "))},dependencies:[E.lW,s.KE,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NumberValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),We=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.loading=null,this.nextStep=new m.EventEmitter(null)}ngOnInit(){this.form=this.fb.group({document_expiration_date:[null,[N.Validators.required]]})}next(){this.nextStep.emit(this.form.get("document_expiration_date").value)}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-error-expiration-step"]],inputs:{data:"data",texts:"texts",loading:"loading",labels:"labels"},outputs:{nextStep:"nextStep"},decls:16,vars:18,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"w-full",3,"formGroup"],["appearance","outline",1,"w-full","flex-1"],["type","date","placeholder","Ej: 22/03/1990","required","","formControlName","document_expiration_date","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8",3,"disabled","click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1)(2,"div",2),m.ɵɵtext(3),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"div",3),m.ɵɵtext(5),m.ɵɵelementEnd(),m.ɵɵelementStart(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),m.ɵɵtext(9),m.ɵɵelementEnd(),m.ɵɵelement(10,"input",6),m.ɵɵelementStart(11,"mat-hint"),m.ɵɵtext(12,"DD/MM/YYYY"),m.ɵɵelementEnd()()()(),m.ɵɵelementStart(13,"div",7)(14,"button",8),m.ɵɵlistener("click",(function(){return t.next()})),m.ɵɵtext(15),m.ɵɵelementEnd()()()),2&e&&(m.ɵɵadvance(2),m.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.wrongExpiration," "),m.ɵɵadvance(1),m.ɵɵstyleProp("color",t.data.styles.colors.text),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",t.labels.warnings.inputExpiration," "),m.ɵɵadvance(1),m.ɵɵproperty("formGroup",t.form),m.ɵɵadvance(3),m.ɵɵtextInterpolate(t.labels.expiration),m.ɵɵadvance(5),m.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",t.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate(t.labels.send))},dependencies:[E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.RequiredValidator,N.FormGroupDirective,N.FormControlName],styles:[".label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function $e(e,t){if(1&e&&m.ɵɵelement(0,"belender-widget-logo",5),2&e){const e=m.ɵɵnextContext();m.ɵɵproperty("firstOption",e.texts.noPhone.customImage)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}const Ge=function(e){return{mask:e}};function Ze(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"mat-form-field",12)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",13),m.ɵɵelementStart(4,"mat-hint")(5,"a",14),m.ɵɵlistener("click",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(2);return m.ɵɵresetView(n.gotoExpirationDate(t))})),m.ɵɵelementStart(6,"u"),m.ɵɵtext(7),m.ɵɵelementEnd()()()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.expiration),m.ɵɵadvance(1),m.ɵɵproperty("textMask",m.ɵɵpureFunction1(3,Ge,e.datemask)),m.ɵɵadvance(4),m.ɵɵtextInterpolate(e.labels.findExpiration)}}function Ke(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-form-field",15)(1,"mat-label"),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelement(3,"input",16),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.labels.support)}}function Qe(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",6),m.ɵɵelement(1,"div",7)(2,"div",8),m.ɵɵpipe(3,"safeHtml"),m.ɵɵelement(4,"br"),m.ɵɵelementStart(5,"form",9),m.ɵɵtemplate(6,Ze,8,5,"mat-form-field",10),m.ɵɵtemplate(7,Ke,4,1,"mat-form-field",11),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),m.ɵɵproperty("innerHTML",null==e.texts.noPhone?null:e.texts.noPhone.title,m.ɵɵsanitizeHtml),m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(3,11,e.texts.noPhone.description),m.ɵɵsanitizeHtml),m.ɵɵadvance(3),m.ɵɵproperty("formGroup",e.form),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.isDni),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.isNie)}}function Xe(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",17)(1,"button",18),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.next())})),m.ɵɵtext(2),m.ɵɵelementEnd()()}if(2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.form.invalid?"":e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),m.ɵɵproperty("disabled",e.form.invalid),m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.actions.next," ")}}function Je(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",19),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1(" ",e.labels.loadings.gettingData," ")}}let et=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.cd=n,this.dialog=i,this.loading=null,this.solicitud=null,this.answered=!1,this.datemask=[/\d/,/\d/,"/",/\d/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],this.nextStep=new m.EventEmitter(null),this.isNie=!1,this.isDni=!1}ngOnInit(){console.warn(this.solicitud),this.loading=!0,this.checkIfDniOrNie(),this.isDni&&(this.form=this.fb.group({document_expiration_date:[null,N.Validators.required]})),this.isNie&&(this.form=this.fb.group({document_support:[null,N.Validators.required]})),this.loading=!1}checkIfDniOrNie(){this.setRegex(this.solicitud.person_document_number)}setRegex(e){e&&(this.isDni=!!e.toUpperCase().match(/^(\d{8})([A-Z])$/),this.isNie=!!e.toUpperCase().match(/^[XYZ]\d{7,8}[A-Z]$/),this.cd.markForCheck())}next(){let e={};this.isDni?e.document_expiration_date=this.utils.formatDate(this.form.get("document_expiration_date").value):this.isNie&&(e.document_support=this.form.get("document_support").value),this.nextStep.emit(e)}gotoSupportAclaration(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(oe.$,{panelClass:"fullscreen-dialog"})}gotoExpirationDate(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(ae.R,{panelClass:"fullscreen-dialog"})}}return e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(N.UntypedFormBuilder),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(S.uw))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["belender-no-phone-step"]],inputs:{data:"data",texts:"texts",loading:"loading",solicitud:"solicitud",labels:"labels"},outputs:{nextStep:"nextStep"},decls:5,vars:4,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content"],["class","py-4 flex flex-col",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],["class","w-full flex justify-center p-4 items-center",4,"ngIf"],[3,"firstOption","logoUrl"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"w-full",3,"formGroup"],["appearance","outline","class","w-full flex-1 belender-form-field",4,"ngIf"],["appearance","outline","class","mb-4 w-full md:max-w-[500px]",4,"ngIf"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["type","text","placeholder","Ej: 22/03/2030","formControlName","document_expiration_date","matInput","",3,"textMask"],["target","_blank",1,"text-sm","hover:text-blue-500","cursor-pointer",3,"click"],["appearance","outline",1,"mb-4","w-full","md:max-w-[500px]"],["formControlName","document_support","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"w-full","flex","justify-center","p-4","items-center"]],template:function(e,t){1&e&&(m.ɵɵtemplate(0,$e,1,2,"belender-widget-logo",0),m.ɵɵelementStart(1,"div",1),m.ɵɵtemplate(2,Qe,8,13,"div",2),m.ɵɵtemplate(3,Xe,3,8,"div",3),m.ɵɵtemplate(4,Je,2,1,"div",4),m.ɵɵelementEnd()),2&e&&(m.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",(t.isDni||t.isNie)&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",(t.isDni||t.isNie)&&!t.loading),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!t.isDni&&!t.isNie||t.loading))},dependencies:[I.O5,E.lW,s.KE,s.bx,s.hX,W.Nt,N.ɵNgNoValidate,N.DefaultValueAccessor,N.NgControlStatus,N.NgControlStatusGroup,N.FormGroupDirective,N.FormControlName,ue.hd,j.X,q.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var tt=n(4385);const nt=["formStep"];function it(e,t){if(1&e&&(m.ɵɵelementStart(0,"mat-option",8),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=t.$implicit;m.ɵɵpropertyInterpolate("value",e),m.ɵɵadvance(1),m.ɵɵtextInterpolate(e)}}function rt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementContainerStart(0),m.ɵɵelementStart(1,"mat-form-field",5)(2,"mat-label"),m.ɵɵtext(3,"Estado"),m.ɵɵelementEnd(),m.ɵɵelementStart(4,"mat-select",6),m.ɵɵlistener("selectionChange",(function(t){const n=m.ɵɵrestoreView(e).index,i=m.ɵɵnextContext();return m.ɵɵresetView(i.setItemSelected(t,n))})),m.ɵɵtemplate(5,it,2,2,"mat-option",7),m.ɵɵelementEnd()(),m.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit,n=t.index,i=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵclassMapInterpolate1(" w-full ",n===i.triggerObject.index-1?"!border-t-2 border-green-500 ":"",""),m.ɵɵadvance(3),m.ɵɵproperty("value",e),m.ɵɵadvance(1),m.ɵɵproperty("ngForOf",i.items)}}function st(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTrigger())})),m.ɵɵtext(1,"Empezar"),m.ɵɵelementEnd()}}function ot(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTrigger())})),m.ɵɵtext(1,"Continuar"),m.ɵɵelementEnd()}}function at(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",9),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext();return m.ɵɵresetView(t.initTriggerFromZero())})),m.ɵɵtext(1,"Volver a empezar"),m.ɵɵelementEnd()}}let lt=class{constructor(e,t){this.cd=e,this.utils=t,this.sendMessage=new m.EventEmitter,this.requestedToPin=!1,this.items=["created","form","terms_and_conditions","waiting_otp_seguridad_social","waiting_login_seguridad_social","invalid_otp_seguridad_social","abandoned_after_bad_phone","abandoned_after_invalid_otp_seguridad_social","abandoned_after_terms_and_conditions","abandoned_after_waiting_otp_seguridad_social","all_documents_downloaded","partial_documents_downloaded","consent_process_completed","partial_documents_downloaded_and_deleted","all_documents_downloaded_and_deleted","failed_with_retry","failed_without_retry","failed_documents_downloaded","no_service","no_sms_service","stand_by","no-phone","no-more-phone","bad_phone","error_expiration_date","error_birth_date","error_support_number","duplicated"],this.triggerObject={index:0,items:["form","waiting_otp_seguridad_social","all_documents_downloaded"]}}ngOnInit(){}setItemSelected(e,t){console.warn(e,t),this.triggerObject.items[t]=e.value,console.warn(this.triggerObject)}initTrigger(){this.emitMessage(this.triggerObject.items[this.triggerObject.index]),this.triggerObject.index++}initTriggerFromZero(){this.triggerObject.index=0,this.initTrigger()}emitMessage(e){let t={status_code:e};console.log(t),this.sendMessage.emit(t)}closeInterval(){this.int&&clearInterval(this.int),this.triggerObject.index=0}addState(){this.triggerObject.items.push("")}};lt.ɵfac=function(e){return new(e||lt)(m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(g.F))},lt.ɵcmp=m.ɵɵdefineComponent({type:lt,selectors:[["belender-tester-sms"]],viewQuery:function(e,t){if(1&e&&m.ɵɵviewQuery(nt,5),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.theDiv=e.first)}},outputs:{sendMessage:"sendMessage"},decls:9,vars:4,consts:[[1,"wrapper","flex","flex-col","justify-between","bg-slate-100","w-[200px]","h-full","p-2","gap-0"],[1,"flex","flex-col","h-full","dd-wrapper"],[4,"ngFor","ngForOf"],["mat-button","",1,"w-full","rounded-md",3,"click"],["mat-raised-button","","class","w-full rounded-md bg-blue-500 text-blue-50",3,"click",4,"ngIf"],["appearance","outline"],[1,"border",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","",1,"w-full","rounded-md","bg-blue-500","text-blue-50",3,"click"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0)(1,"div",1),m.ɵɵtemplate(2,rt,6,5,"ng-container",2),m.ɵɵelementStart(3,"button",3),m.ɵɵlistener("click",(function(){return t.addState()})),m.ɵɵtext(4,"Agregar estado"),m.ɵɵelementEnd()(),m.ɵɵelementStart(5,"div"),m.ɵɵtemplate(6,st,2,0,"button",4),m.ɵɵtemplate(7,ot,2,0,"button",4),m.ɵɵtemplate(8,at,2,0,"button",4),m.ɵɵelementEnd()()),2&e&&(m.ɵɵadvance(2),m.ɵɵproperty("ngForOf",t.triggerObject.items),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",!t.triggerObject.index||0==t.triggerObject.index),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.triggerObject.index&&t.triggerObject.index<t.triggerObject.items.length),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.triggerObject.index&&t.triggerObject.index>=t.triggerObject.items.length))},dependencies:[I.sg,I.O5,E.lW,s.KE,s.hX,tt.gD,se.ey],styles:[".wrapper[_ngcontent-%COMP%]{position:fixed;top:0;right:0;box-shadow:-10px 20px 30px #0000004d;z-index:99!important;max-height:100vh}.dd-wrapper[_ngcontent-%COMP%]{max-height:calc(100vh - 70px)!important;overflow:auto}"],data:{animation:[d.$]}}),lt=(0,r.gn)([(0,o.c)()],lt);const ct=["formStep"],dt=["otpStep"];function ut(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",7),m.ɵɵelement(1,"mat-icon",8),m.ɵɵtext(2),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵproperty("@fadeInUp",void 0),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",e.warningAlert," ")}}function ht(e,t){1&e&&(m.ɵɵelementStart(0,"div",9),m.ɵɵelement(1,"mat-progress-spinner",10),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵproperty("value",0))}function pt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-intro-step",25),m.ɵɵlistener("gotoFlow",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.goFlow())}))("gotoManual",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoManual())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("flowName",e.flowName)}}function mt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-manual-step",26),m.ɵɵlistener("dniChange",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.createRequestFromDNI(t))}))("goBack",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoIntro())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("flowName",e.flowName)("solicitud",e.solicitud)("packId",e.packId)("userId",e.userId)}}function ft(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-form-step",27,28),m.ɵɵlistener("goIntro",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.goIntro())}))("goToTerms",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.gotoTermsAndConditions())}))("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.gotoTerms(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("requestIDFromURL",e.requestIDFromURL)("lang",e.currentLang)("userId",e.userId)("flowName",e.flowName)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)("pinMode",e.pinMode)}}function gt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-form-step",29),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.sendNewData(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function _t(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-birthday-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setBirthDate(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function vt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-expiration-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setExpiration(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function yt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-support-number-step",30),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setSupportNumber(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function bt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-abandoned-step",31),m.ɵɵlistener("retry",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.retryRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function xt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-shared-otp-step",32,33),m.ɵɵlistener("resendOTP",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.requestOTP(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("otpType","otpSS")("labels",e.labels)("logoCustom",e.data[e.flowName].texts.otpSS.customImage)("flowType",e.flowName)("data",e.data)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)("minLength",6)}}function wt(e,t){if(1&e&&m.ɵɵelement(0,"belender-success-step",34),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("packId",e.packId)("flowName",e.flowName)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName].texts)}}function Ct(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-duplicated-request-step",35),m.ɵɵlistener("newRequest",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.newRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("currentRequest",e.currentRequest)}}function St(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-no-phone-step",29),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.sendDataToPin(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function Mt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-error-phone-step",36),m.ɵɵlistener("nextStep",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setPhone(t))}))("noPhone",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(3);return m.ɵɵresetView(t.setNoPhone())})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)}}function It(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-fail-step",37),m.ɵɵlistener("retry",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.newRequest(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("data",e.data)("labels",e.labels)("texts",e.data[e.flowName].texts)("solicitud",e.solicitud)}}function kt(e,t){if(1&e&&m.ɵɵelement(0,"belender-no-service-step",38),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function Et(e,t){if(1&e&&m.ɵɵelement(0,"belender-standby-step",38),2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("texts",e.data[e.flowName].texts)("data",e.data)("labels",e.labels)}}function Tt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-cancel-request",39),m.ɵɵlistener("updateStatusCode",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext(3);return m.ɵɵresetView(n.setCancel(t))})),m.ɵɵelementEnd()}if(2&e){const e=m.ɵɵnextContext(3);m.ɵɵproperty("flowType",e.flowName)("request_id",e.requestID)("user_id",e.userId)("labels",e.labels)("textColor",e.data.styles.colors.text)("customText",e.data.config.cancelRequestText)}}function Pt(e,t){if(1&e&&(m.ɵɵelement(0,"div",40),m.ɵɵpipe(1,"safeHtml")),2&e){const e=m.ɵɵnextContext(3);m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",m.ɵɵpipeBind1(1,3,(null==e.data[e.flowName].texts.form?null:e.data[e.flowName].texts.form.aditionalDescription)||""),m.ɵɵsanitizeHtml)}}function Ot(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtemplate(1,pt,1,2,"belender-intro-step",11),m.ɵɵtemplate(2,mt,1,5,"belender-manual-step",12),m.ɵɵtemplate(3,ft,2,9,"belender-form-step",13),m.ɵɵtemplate(4,gt,1,4,"belender-error-form-step",14),m.ɵɵtemplate(5,_t,1,3,"belender-error-birthday-step",15),m.ɵɵtemplate(6,vt,1,3,"belender-error-expiration-step",15),m.ɵɵtemplate(7,yt,1,3,"belender-error-support-number-step",15),m.ɵɵtemplate(8,bt,1,4,"belender-abandoned-step",16),m.ɵɵtemplate(9,xt,2,8,"belender-shared-otp-step",17),m.ɵɵtemplate(10,wt,1,7,"belender-success-step",18),m.ɵɵtemplate(11,Ct,1,3,"belender-duplicated-request-step",19),m.ɵɵtemplate(12,St,1,4,"belender-no-phone-step",14),m.ɵɵtemplate(13,Mt,1,3,"belender-error-phone-step",20),m.ɵɵtemplate(14,It,1,4,"belender-fail-step",21),m.ɵɵtemplate(15,kt,1,3,"belender-no-service-step",22),m.ɵɵtemplate(16,Et,1,3,"belender-standby-step",22),m.ɵɵtemplate(17,Tt,1,6,"belender-cancel-request",23),m.ɵɵtemplate(18,Pt,2,5,"div",24),m.ɵɵelementContainerEnd()),2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵproperty("ngIf","intro"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","manual"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.settingRequestFromBack),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-data"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-birth-date"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-expiration-date"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","error-support-number"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","abandoned"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","otp"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","success"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","duplicated"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","no-phone"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","bad-phone"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","failed"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","no-service"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","standby"==e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.showCancelRequest&&e.data.config.cancelRequest&&e.requestIDFromURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf","form"===e.requestStatus&&!e.loading&&e.data[e.flowName]&&(null==e.data[e.flowName]?null:e.data[e.flowName].showAditionalDescription)&&e.data[e.flowName].texts&&e.data[e.flowName].texts.form&&e.data[e.flowName].texts.form.aditionalDescription)}}function Dt(e,t){1&e&&m.ɵɵelement(0,"belender-disabled-url")}function Lt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div")(1,"div",41)(2,"div",42),m.ɵɵtext(3,"Error!"),m.ɵɵelementEnd(),m.ɵɵelement(4,"div",43),m.ɵɵelementEnd(),m.ɵɵelementStart(5,"div",44)(6,"button",45),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext(2);return m.ɵɵresetView(t.error=!1)})),m.ɵɵtext(7,"Ingresar manualmente"),m.ɵɵelementEnd()()()}if(2&e){const e=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵstyleProp("color",e.data.styles.colors.text),m.ɵɵproperty("innerHTML",e.error,m.ɵɵsanitizeHtml)}}function At(e,t){if(1&e&&(m.ɵɵelementStart(0,"div"),m.ɵɵtemplate(1,ut,3,2,"div",5),m.ɵɵtemplate(2,ht,2,1,"div",6),m.ɵɵtemplate(3,Ot,19,18,"ng-container",3),m.ɵɵtemplate(4,Dt,1,0,"belender-disabled-url",3),m.ɵɵtemplate(5,Lt,8,3,"div",3),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",null==e.data||null==e.data.styles?null:e.data.styles.typography,""),m.ɵɵstyleProp("background",null==e.data||null==e.data.styles||null==e.data.styles.colors?null:e.data.styles.colors.background),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.warningAlert&&"success"!=e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"===e.requestStatus),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.error&&!e.disableURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.error&&e.disableURL),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",!e.loading&&e.error&&"loading"!=e.requestStatus)}}function Nt(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",46),m.ɵɵelement(1,"mat-progress-spinner",47),m.ɵɵelementStart(2,"p",48),m.ɵɵtext(3),m.ɵɵelementEnd()()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),m.ɵɵadvance(2),m.ɵɵtextInterpolate(e.loading)}}function Rt(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵelementStart(1,"div",49),m.ɵɵtext(2),m.ɵɵelementEnd(),m.ɵɵelementContainerEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵtextInterpolate1("TestMode ",e.testMode?"ON":"OFF","")}}function jt(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"belender-tester-sms",50),m.ɵɵlistener("sendMessage",(function(t){m.ɵɵrestoreView(e);const n=m.ɵɵnextContext();return m.ɵɵresetView(n.setMessageFromTest(t))})),m.ɵɵelementEnd()}}let Ft=class{constructor(e,t,n,i,r,s,o,a,l,d,u,h){if(this.cd=e,this.Activatedroute=t,this.utils=n,this.solicitudesService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.flowsS=a,this.pinService=l,this.deviceInfoService=d,this.dialog=u,this.translationService=h,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.introEnabled=!1,this.manual=!1,this.pinMode=!1,this.requestIDFromURL=!1,this.warningAlert=null,this.stopPropagationOfSuccess=!1,this.paramsSetted=!1,this.requestStatus="loading",this.disableURL=!1,this.settingRequestFromBack=!1,this.showCancelRequest=!1,this.requestedFromDetail=!1,this.env=c.N,this.intervalToAskBack=null,this.loadingRequestData=!1,this.intervalCount=0,this.requestedToPin=!1,this.currentHeight=0,this.socketOpened=!0,this.isScaled=!1,this.termsOpened=!1,this.flowName="SMS",this.labels=p.S.es,this.currentLang="","OTPCredential"in window){const e=new AbortController;navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then((e=>{this.showAlert("otp",e)})).catch((e=>{console.log(e)}))}this.deviceInfoDetails$=this.deviceInfoService.deviceInfo$.subscribe((e=>{Object.keys(e).length>0&&(this.deviceInfoDetails=e)}))}ngOnInit(){this.getWindowsScreenOrientation(),this.setWarningPortals();const e=this;this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.initFunctions(),"pro"!=c.N.env&&(l(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),l(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)})))}initFunctions(){var e=this;return(0,i.Z)((function*(){var t;e.Activatedroute.queryParams.subscribe((t=(0,i.Z)((function*(t){t.lang?(e.currentLang=t.lang,e.loading=e.translationService.getFirstLoading(e.currentLang),e.setTranslation()):e.loading=e.labels.loadings.gettingData,e.userId?e.setInitialData(e.userId):e.loading=null})),function(e){return t.apply(this,arguments)}))}))()}testNoti(e){this.showAlert("Titleeee","messsaggeee",e)}setTranslation(){let e=this.translationService.getLabelsTranslated(this.currentLang);e&&(this.labels=e)}testAlert(e){this.showAlert("Error de prueba","Esta es una prueba de un error",e)}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewChecked(){this.getWidgetCardHeight()}getWindowsScreenOrientation(){window.screen&&window.screen.orientation&&(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler))}getWidgetCardHeight(){let e=l("#widget-wrapper").height()||0;this.isScaled$=this.deviceInfoService.isScaled$.subscribe((t=>{this.isScaled=t,this.isScaled&&(e*=1.5)})),this.sendMessageToParent({type:"widgetHeight",data:e})}setWarningPortals(){this.flowsS.getFlows().then((e=>{e&&e.data&&e.data.length&&"OCCASIONAL_FAIL"==e.data.find((e=>e.name==this.flowName)).status&&!this.warningAlert&&(this.warningAlert=this.labels.warnings.ocassionalError)})).catch((e=>{console.error(e)}))}sendMessageToParent(e){if(e&&e.type&&"widgetHeight"===e.type){if(e.data===this.currentHeight)return;this.currentHeight=e.data}window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,i.Z)((function*(){const n=yield t.getFlow(e),i=t.customizationStoreService.FUNDER_CONFIG;if(t.funderStyles=t.customizationStoreService.FUNDER_STYLES,console.warn(t.funderStyles),t.data={config:i,styles:t.funderStyles,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.showAlert(t.labels.warnings.error,t.labels.warnings.noCustomization,"error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.introEnabled=t.data.config.introEnabled,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName,t.currentLang).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}getConfig(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderConfig(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.loading=!1}))}))}))()}getStyle(e){var t=this;return(0,i.Z)((function*(){return new Promise((n=>{t.customizationService.getFunderStyles(e).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{console.error(e),t.loading=!1}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&(this.setParamsToRequest(e),this.loading=!1),e&&e.acceptTerms&&(this.paramsSetted=!0,this.autoAcceptTerms=!0),e.success&&(this.stopPropagationOfSuccess=!0,this.paramsSetted=!0),e&&e.request_id?(this.requestID=e.request_id,this.disableURL=!1,this.setFormFromVcCode(e.request_id,e),this.requestIDFromURL=!0,this.paramsSetted=!0):this.loading=!1}),(e=>{this.loading=!1}))}setParamsToRequest(e){this.solicitud||this.setRequestStatus("form"),(e.document_number||e.document)&&!this.solicitud.person_document_number&&(this.solicitud.person_document_number=e.document_number||e.document,this.requestIDFromURL=!0,this.paramsSetted=!0),(e.birth_date||e.birthday)&&!this.solicitud.person_birth_date&&(this.solicitud.person_birth_date=e.birth_date||e.birthday,this.requestIDFromURL=!0,this.paramsSetted=!0),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone,this.requestIDFromURL=!0,this.paramsSetted=!0),e.email&&!this.solicitud.email&&(this.solicitud.email=e.email,this.requestIDFromURL=!0,this.paramsSetted=!0)}setFormFromVcCode(e,t){var n=this;return(0,i.Z)((function*(){n.loading=n.labels.loadings.gettingData,n.settingRequestFromBack=!0,n.solicitudesService.getSolicitudByCode(e).then((e=>{e&&e.data?(n.solicitud=e.data,n.setStatus(),n.setSubscriptionOfRequest(),n.loading=!1,n.skipCreationOfRequest=n.solicitud&&n.solicitud.status_code&&"prerequest"!=n.solicitud.status_code,n.autoAcceptTerms?n.acceptTerms():n.setParamsToRequest(t)):n.loading=null,n.settingRequestFromBack=!1})).catch((e=>{n.loading=null,n.settingRequestFromBack=!1}))}))()}setMessageFromTest(e){this.handlePusherNotification(e)}handlePusherNotification(e){this.dataFromFirebase=e,e&&e.widget_url&&(this.widgetUrl=e.widget_url),e&&e.widget_url_boxed&&(this.widgetUrlBoxed=e.widget_url_boxed),this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&("consent_process_completed"===this.dataFromFirebase.status_code&&this.disconnectWebsocket(),this.setRequestStatus(JSON.parse(JSON.stringify(this.dataFromFirebase.status_code))),"terms_and_conditions"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code&&setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingOtp,this.setSubscriptionOfRequest(),this.solicitudesService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setStatus()),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}gotoTerms(e){this.loading=this.labels.loadings.sendingData,e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("waiting_otp_seguridad_social"),this.loading=!1}),4e3):this.skipCreationOfRequest?(this.acceptTerms(),this.setSubscriptionOfRequest()):this.checkSmsService(e)}checkSmsService(e){this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.solicitudesService.checkService(e).then((t=>{t&&t.message&&t.status&&"error"==t.status?t.message.birth_date?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&" fecha de nacimiento incorrecta"==t.message.toLowerCase()?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):"string"==typeof t.message&&"does not have sms service"==t.message.toLowerCase()?(this.loading=this.labels.loadings.creatingRequest,e.user_id=this.userId,e.package_id=this.packId,this.requestID&&(e.request_id=this.requestID),this.solicitudesService.addSolicitud(e).then((e=>{e.data&&(this.requestID=e.data.request_id),this.solicitudesService.setNoService({request_id:this.requestID}).then((()=>{this.loading=null})),this.setRequestStatus("no_service"),this.setStatus()}))):"string"==typeof t.message&&"birthdate incorrect"==t.message.toLowerCase()?(this.loading=null,this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc),this.formComponent.forceEnableDisableInputs({value:!0},{value:!1},{value:!1},{value:!1})):(this.setRequestStatus("form"),this.setStatus(),this.loading=null):t&&t.status&&"success"==t.status?this.addSolicitudSMS(e):(this.loading=null,this.setRequestStatus("form"),this.setStatus(),this.notis.showAlert("Error:",t.message||t))})).catch((e=>{console.error(e),this.loading=null,e.message&&"birthdate incorrect"==e.message.toLowerCase()&&(this.setRequestStatus("form"),this.notis.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc))}))}addSolicitudPIN(e){this.data[this.flowName]&&this.data[this.flowName].packID&&(e.package_id=this.data[this.flowName].packID),this.formComponent.forceEnableDisableInputs({value:!0},{value:!0},{value:!0},{value:!0}),this.pinService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?t.message&&(this.solicitud=e,400==t.code&&"Does not have Pin service"==t.message?(this.setRequestStatus("no_service"),this.loading=!1):400==t.code&&"Incorrect support number"==t.message?(this.notis.showAlert(this.labels.warnings.error,this.labels.warnings.wrongSupport),this.setRequestStatus("form")):400==t.code&&"Incorrect date"==t.message?(this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate),this.setRequestStatus("form")):(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,t.message)),this.setStatus()):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,location.pathname.indexOf("widget-boxed")>-1?location.assign(t.data.widget_url_boxed+"&acceptTerms=true"):location.assign(t.data.widget_url+"&acceptTerms=true")):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.errorMessage&&this.showAlert("Error!",e.errorMessage)}))}addSolicitudSMS(e){this.solicitudesService.addSolicitud(e,this.packId,this.userId).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==t.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.setRequestStatus("no_service"),this.loading=!1):(this.setRequestStatus("form"),this.showAlert("Error!",t.message)),this.setStatus())):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.setStatus(),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:t.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}validateHaveSmsMode(e){this.solicitudesService.checkService(e).then((t=>{t&&t.message&&"does not have sms service"==t.message.toLowerCase()?(this.solicitud=e,this.setRequestStatus("form"),this.pinMode=!0,this.loading=null,this.showAlert(this.labels.warnings.noSms,this.labels.warnings.noSmsDesc)):this.addSolicitudSMS(e)})).catch((e=>{console.error(e)}))}createRequestFromDNI(e){let t={document_number:e,user_id:this.userId,package_id:this.packId,check_legal:!0};this.solicitudesService.addSolicitud(t,this.packId,this.userId).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.wrongDate,this.labels.warnings.wrongDateDesc)):"Incorrect date"==e.message?(this.setRequestStatus("form"),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongDate)):(this.setRequestStatus("no_service"),this.loading=!1):(this.setRequestStatus("form"),this.showAlert("Error!",e.message))),this.setStatus()):e&&e.status&&"success"==e.status?(this.requestID=e.data.request_id,this.solicitud=e.data,this.setStatus(),this.setSubscriptionOfRequest(),this.sendMessageToParent({type:"response",data:e.data}),this.acceptTerms()):this.showAlert(this.labels.warnings.error,this.labels.warnings.unknownError+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}setSubscriptionOfRequest(){if(this.socket)return;const e=this;let t="wss://notifications.dev.belender.net";"qa"==c.N.env&&(t="wss://notifications.qa.belender.net"),"pro"==c.N.env&&(t="wss://notifications.belender.net"),c.N.notificationsBaseUrl&&(t=c.N.notificationsBaseUrl),this.socket=new WebSocket(`${t}?requests_id=${this.requestID}&user_id=${this.userId}`),this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(t){let n=JSON.parse(t.data);console.warn("message from wss: ",n),e.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e),console.error(e)},this.socket.onclose=function(e){console.log("Conexión cerrada"),this.socketOpened=!1}}sendNewData(e){this.loading=this.labels.loadings.sendingData,this.solicitudesService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e.message,"error"),this.loading=!1):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=this.labels.loadings.validatingData,this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}showAlert(e,t,n){this.loading=!1;let i=this.getFunderIconType(n);this.notis.showAlert(e,t,i)}getFunderIconType(e){if(!e||!this.funderStyles)return"error";switch(e){case"error":return this.funderStyles.errorIcon||e;case"success":return this.funderStyles.successIcon||e;case"warning":return this.funderStyles.warningIcon||e;case"info":return this.funderStyles.infoIcon||e;default:return e}}setBirthDate(e){}setExpiration(e){}setSupportNumber(e){}acceptTerms(e=!0){let t={request_id:this.requestID,user_id:this.userId,terms_and_conditions:!0,opening:this.termsOpened?1:0};Object.keys(this.deviceInfoDetails).length>0&&(t={...t,ip:this.deviceInfoDetails.ip,device:this.deviceInfoDetails.device,os:`${this.deviceInfoDetails.os} ${this.deviceInfoDetails.os_version}`,resolution:this.deviceInfoDetails.screen}),e&&(this.loading=this.labels.loadings.validatingAndLoginSS),this.solicitudesService.acceptTerms(t).then((e=>{e.status&&"error"==e.status?(e.message&&"You have a request in progress"==e.message?location.pathname.indexOf("widget-boxed")>-1?location.assign(e.response.widget_url_boxed):location.assign(e.response.widget_url):e.message?"Invalid request status: stand_by"==e.message?this.setRequestStatus("stand_by"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.loading=!1):e&&"success"==e.status?(this.sendMessageToParent({type:"response",data:e.data||e}),this.solicitud=e.data,this.setStatus(),this.setSubscriptionOfRequest(),this.loading=null,this.cd.markForCheck()):this.loading=null})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}requestOTP(e){this.loading=this.labels.loadings.sendingData,this.testMode?setTimeout((()=>{this.solicitud=new a.l,this.setRequestStatus("all_documents_downloaded"),this.setStatus(),this.loading=!1}),2e3):this.solicitudesService.sendOTP({request_id:this.requestID,user_id:this.userId,code:e.code}).then((e=>{e.status&&"error"==e.status?(e.message&&"Invalid request status: waiting_login_seguridad_social"==e.message?this.showAlert(this.labels.warnings.error,this.labels.warnings.noOtp):this.showAlert("Error!",e.message?e.message:e),this.loading=!1):e&&"success"==e.status&&(this.handleRequestStatus(e.data||e),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=!1}))}askToBack(){this.solicitudesService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.setStatus(),this.loading=!1):this.loading=!1})).catch((e=>{this.loading=!1}))}gotoErrorPhone(){}setRequestStatus(e){if(this.solicitud)this.solicitud.status_code=e;else{let t=new a.l;t.status_code=e,this.solicitud=t}this.setStatus()}retryRequest(e){let t={request_id:(this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)||e,user_id:this.userId};this.loading=this.labels.loadings.resendingRequest,this.setSubscriptionOfRequest(),this.solicitudesService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data,this.setStatus()),this.loading=!1})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=!1}))}newRequest(e){this.setRequestStatus("created")}gotoManual(){this.manual=!0,this.cd.markForCheck()}gotoIntro(){this.manual=!1}goFlow(){this.introEnabled=!1}goIntro(){this.manual=!1,this.introEnabled=!0}disconnectWebsocket(){this.socket&&this.socket.close()}gotoPin(){this.requestedToPin=!0;let e={request_id:this.solicitud.request_id};this.loading=this.labels.loadings.smsToPin,this.solicitudesService.noPhone(e).then((e=>{this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoClavePinUrl(e){location.href.indexOf("widget-boxed")>-1?location.assign(e.widget_url_boxed):location.assign(e.widget_url)}setPhone(e){this.loading=this.labels.loadings.sendingNewPhone,this.solicitudesService.setPhone({phone:e},this.solicitud&&this.solicitud.request_id?this.solicitud.request_id:this.requestID)}setNoPhone(){this.loading=this.labels.loadings.validatingData,this.solicitudesService.noPhone({request_id:this.solicitud.request_id})}sendDataToPin(e){e.request_id=this.solicitud.request_id,this.loading=this.labels.loadings.sendingData,this.solicitudesService.smsToPin(e).then((e=>{e&&e.status&&"success"===e.status&&this.gotoClavePinUrl(e.data),e&&e.status&&"error"===e.status&&(e.message?"Does not have Pin service"==e.message?this.setRequestStatus("no-service"):this.showAlert("Error!",e.message):this.showAlert("Error!",e),this.loading=null)})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}requestStatusFromDetail(){this.requestedFromDetail=!0,this.loading=this.labels.loadings.validatingRequest,this.solicitudesService.getSolicitudByCode(this.solicitud.request_id).then((e=>{e&&e.consent_process_completed&&this.setRequestStatus("consent_process_completed"),this.loading=null})).catch((e=>{this.loading=null,this.setRequestStatus("failed")}))}handleRequestStatus(e){let t=new a.l;e.consent_process_completed?(this.requestedFromDetail=!0,this.sendMessageToParent({type:"response",data:{status_message:"El proceso de consentimiento ha finalizado",widget_url:this.widgetUrl||"",status_code:"consent_process_completed",user_id:this.solicitud?this.solicitud.user_id:this.userId||"",funder_id:this.solicitud?this.solicitud.funder_id:"",request_id:this.solicitud?this.solicitud.request_id:this.requestID||"",widget_url_boxed:this.widgetUrlBoxed||""}}),t.status_code="consent_process_completed",this.solicitud=t,setTimeout((()=>{this.disconnectWebsocket()}),3e3),this.setStatus(),this.data[this.flowName].showDocumentsOnSuccess&&!this.intervalToAskBack&&this.initIntervalToAskBack()):(this.otpComponent&&this.otpComponent.resetOtpNumber(),e.otp_status?"VALID"===e.otp_status?e.nex_step_detail&&"Seguridad Social"===e.nex_step_detail.portal&&(t.status_code="waiting_otp_seguridad_social",this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):"INVALID"===e.otp_status&&(t.status_code=e.status_code,this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)):(t.status_code="failed",this.solicitud=t,this.setStatus(),this.showAlert(this.labels.warnings.error,this.labels.warnings.wrongOtp)),this.sendMessageToParent({type:"response",data:e})),this.loading=null}initIntervalToAskBack(){!this.solicitud||!this.solicitud.request_id||(this.intervalToAskBack=setInterval((()=>{this.askDetailToBack(this.solicitud.request_id),this.intervalCount++,this.intervalCount>20&&this.stopInterval()}),5e3))}stopInterval(){this.intervalToAskBack&&clearInterval(this.intervalToAskBack)}askDetailToBack(e){if(!e&&!this.requestID)return void this.stopInterval();let t=JSON.parse(JSON.stringify(this.solicitud.status_code));this.pinService.getSolicitudByCode(e).then((e=>{e&&e.data&&t!=e.data.status_code&&(this.solicitud=e.data,this.setRequestStatus(this.solicitud.status_code))})).catch((e=>{this.loading=null,this.loadingRequestData=!1}))}handleBadPhone(){this.disconnectWebsocket(),this.loading=this.labels.loadings.validatingData,setTimeout((()=>{this.solicitud||(this.solicitud=new a.l),this.setRequestStatus("failed_without_retry"),this.setStatus(),this.loading=null}),3e3)}setCancel(e){this.setRequestStatus(e),this.setStatus()}setStatus(){if(this.showCancelRequest=!0,this.manual)this.requestStatus="manual";else if(this.introEnabled)this.requestStatus="intro";else if(this.solicitud){if(this.solicitud){let e=u[this.solicitud.status_code];if(e){if("success"===e&&this.data.config&&this.data.config.infiniteLoopInCompleted)return void(this.requestStatus="loading");if(("abandoned"===e||"failed"===e)&&(this.showCancelRequest=!1),"phone_not_exist_otp"===e)return void(this.data&&this.data.config&&this.data.config.tryPinWithoutSMS?(this.showCancelRequest=!1,this.gotoPin(),this.requestStatus="loading"):this.requestStatus=this.data.config.noRetryInBadPhone?"otp":"error-data");if("no-service"===e&&(this.requestStatus=e,this.data&&this.data.config&&this.data.config.tryPinWithoutSMS))return void(!this.requestedToPin&&this.gotoPin());if("bad-phone"===e&&this.data&&this.data.config&&this.data.config.tryPinWithoutSMS)return!this.requestedToPin&&this.gotoPin(),void(this.requestStatus="no-phone");this.requestStatus=e}}}else this.requestStatus="form"}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(h.L,{panelClass:"fullscreen-dialog",data:{flow:this.flowName,allData:this.data,lang:this.currentLang}}).afterClosed().subscribe((e=>{e&&(this.termsOpened=!0,this.formComponent.setTermsCheck(!0))}))}};Ft.ɵfac=function(e){return new(e||Ft)(m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(f.gz),m.ɵɵdirectiveInject(g.F),m.ɵɵdirectiveInject(_.M),m.ɵɵdirectiveInject(v.w),m.ɵɵdirectiveInject(y.r),m.ɵɵdirectiveInject(b.T),m.ɵɵdirectiveInject(x.s),m.ɵɵdirectiveInject(w.v),m.ɵɵdirectiveInject(C.H),m.ɵɵdirectiveInject(S.uw),m.ɵɵdirectiveInject(M.D))},Ft.ɵcmp=m.ɵɵdefineComponent({type:Ft,selectors:[["belender-widget-sms"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(ct,5),m.ɵɵviewQuery(dt,5),m.ɵɵviewQuery(ct,5)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.formComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.otpComponent=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.theDiv=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[m.ɵɵProvidersFeature([{provide:s.o2,useValue:{appearance:"standard"}}])],decls:5,vars:4,consts:[[1,"h-full","widget-belender"],[3,"class","background",4,"ngIf"],["class","loading-wrapper",4,"ngIf"],[4,"ngIf"],[3,"sendMessage",4,"ngIf"],["class","flex justify-start px-4 py-3 items-center font-bold gap-3 text-md bg-amber-500/20 rounded-sm border border-amber-500 text-amber-500",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],[1,"flex","justify-start","px-4","py-3","items-center","font-bold","gap-3","text-md","bg-amber-500/20","rounded-sm","border","border-amber-500","text-amber-500"],["svgIcon","mat:warning"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],["class","h-full ",3,"data","flowName","gotoFlow","gotoManual",4,"ngIf"],["class","h-full ",3,"data","flowName","solicitud","packId","userId","dniChange","goBack",4,"ngIf"],[3,"requestIDFromURL","lang","userId","flowName","data","labels","texts","solicitud","pinMode","goIntro","goToTerms","nextStep",4,"ngIf"],[3,"solicitud","data","labels","texts","nextStep",4,"ngIf"],[3,"data","labels","texts","nextStep",4,"ngIf"],[3,"solicitud","data","labels","texts","retry",4,"ngIf"],[3,"otpType","labels","logoCustom","flowType","data","texts","solicitud","minLength","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","labels","packId","flowName","userId","requestID","texts",4,"ngIf"],[3,"data","labels","currentRequest","newRequest",4,"ngIf"],[3,"data","labels","texts","nextStep","noPhone",4,"ngIf"],[3,"data","labels","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"texts","data","labels",4,"ngIf"],[3,"flowType","request_id","user_id","labels","textColor","customText","updateStatusCode",4,"ngIf"],["class","subheading-1 p-4 custom-html",3,"color","innerHTML",4,"ngIf"],[1,"h-full",3,"data","flowName","gotoFlow","gotoManual"],[1,"h-full",3,"data","flowName","solicitud","packId","userId","dniChange","goBack"],[3,"requestIDFromURL","lang","userId","flowName","data","labels","texts","solicitud","pinMode","goIntro","goToTerms","nextStep"],["formStep",""],[3,"solicitud","data","labels","texts","nextStep"],[3,"data","labels","texts","nextStep"],[3,"solicitud","data","labels","texts","retry"],[3,"otpType","labels","logoCustom","flowType","data","texts","solicitud","minLength","resendOTP","errorPhone","nextStep"],["otpStep",""],[3,"data","labels","packId","flowName","userId","requestID","texts"],[3,"data","labels","currentRequest","newRequest"],[3,"data","labels","texts","nextStep","noPhone"],[3,"data","labels","texts","solicitud","retry","newRequest"],[3,"texts","data","labels"],[3,"flowType","request_id","user_id","labels","textColor","customText","updateStatusCode"],[1,"subheading-1","p-4","custom-html",3,"innerHTML"],[1,"px-6","py-4","flex","flex-col"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"loading-wrapper"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"],[3,"sendMessage"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtemplate(1,At,6,10,"div",1),m.ɵɵtemplate(2,Nt,4,3,"div",2),m.ɵɵelementEnd(),m.ɵɵtemplate(3,Rt,3,1,"ng-container",3),m.ɵɵtemplate(4,jt,1,0,"belender-tester-sms",4)),2&e&&(m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.data&&t.data.styles&&t.data.styles.colors),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.loading&&!t.error),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.testMode),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.testMode))},dependencies:[I.O5,k.Hw,E.lW,T.Ou,P.R,O.u,D.q,L.y,A.i,U,K,ne,De,Le,Ne,je,Ye,He,Be,Ue,We,et,lt,q.z],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative;min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"],data:{animation:[d.$]}}),Ft=(0,r.gn)([(0,o.c)()],Ft)},3006:(e,t,n)=>{n.r(t),n.d(t,{SmsModule:()=>W});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(8364),L=n(4650);const A=[{path:":idUser",component:D.T},{path:":idUser/:packID",component:D.T}];let N=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=L.ɵɵdefineNgModule({type:e}),e.ɵinj=L.ɵɵdefineInjector({imports:[P.Bz.forChild(A),P.Bz,O.d8]}),e})();var R=n(6981),j=n(1129),F=n(9476),q=n(8962),Y=n(3468),V=n(3295),H=n(3300),z=n(7795),B=n(865),U=n(3033);let W=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=L.ɵɵdefineNgModule({type:e}),e.ɵinj=L.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,{provide:M.Ad,useValue:"es-ES"}],imports:[N,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,R.x,j.n,F.F,q.A,Y.f,V.g,H.C,z.QA,B.q,U.d]}),e})()},1724:(e,t,n)=>{n.r(t),n.d(t,{VideoIdModule:()=>Ct});var i=n(6895),r=n(6383),s=n(5592),o=n(8739),a=n(7155),l=n(6308),c=n(6709),d=n(7392),u=n(9101),h=n(1561),p=n(4006),m=n(266),f=n(4385),g=n(811),_=n(5601),v=n(3798),y=n(9391),b=n(1572),x=n(182),w=n(4144),C=n(7367),S=n(9602),M=n(3238),I=n(5895),k=n(6257),E=n(1948),T=n(4246),P=n(9299),O=n(6e3),D=n(5861),L=n(7582),A=n(9549),N=n(9933),R=n(5762),j=n(8259),F=n(2340),q=n(1363),Y=n(6830),V=n(4650),H=n(5089),z=n(529),B=n(6554);let U=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(F.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(F.N.baseUrl+"/requests/"+e)}setState(e,t){let n={request_id:e,status:t};return new Promise(((e,t)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/status",n).then((n=>{n?e(n):t(n)})).catch((e=>{console.error("addSolicitud",e),t(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendPassword(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/password",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,i)=>{this.localFetch.putFetchWhitoutToken(`${F.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(F.N.baseUrl+"/requests/videoid/otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,i)=>{this.localFetch.postFetch(`${F.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):i(e)})).catch((e=>{i(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵinject(H.F),V.ɵɵinject(z.eN),V.ɵɵinject(B.r))},e.ɵprov=V.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var W=n(8460),$=n(5412),G=n(833),Z=n(4302),K=n(3731);function Q(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código? Solicítalo de nuevo en ",e.secsCount," segundos")}}function X(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate2("¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? Solicítalo de nuevo en ",e.secsCount," segundos")}}function J(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1("¿No has recibido el código en tu teléfono? Solicítalo de nuevo en ",e.secsCount," segundos")}}const ee=function(e,t,n){return{color:e,border:t,background:n}};function te(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,Q,2,1,"span",5),V.ɵɵtemplate(3,X,2,2,"span",5),V.ɵɵtemplate(4,J,2,1,"span",5),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(4,ee,e.data.styles.colors.accentColor,"1px solid "+e.data.styles.colors.accentColor,e.data.styles.colors.accentBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&e.data.config.noRetryInBadPhone)}}function ne(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en tu teléfono? "),V.ɵɵelementEnd())}function ie(e,t){if(1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ¿No has recibido el código en el teléfono acabado en ",e.lastNumberPhone,"? ")}}function re(e,t){1&e&&(V.ɵɵelementStart(0,"span"),V.ɵɵtext(1," ¿No has recibido el código en el teléfono? "),V.ɵɵelementEnd())}const se=function(e,t){return{color:e,background:t}};function oe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"small",11),V.ɵɵtemplate(2,ne,2,0,"span",5),V.ɵɵtemplate(3,ie,2,1,"span",5),V.ɵɵtemplate(4,re,2,0,"span",5),V.ɵɵelementStart(5,"a",12),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.resendOTP())})),V.ɵɵtext(6,"Reenviar"),V.ɵɵelementEnd()(),V.ɵɵelementContainerEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction3(5,ee,e.data.styles.colors.dangerColor,"1px solid "+e.data.styles.colors.dangerColor,e.data.styles.colors.dangerBgColor)),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.lastNumberPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.lastNumberPhone&&!e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.noRetryInBadPhone),V.ɵɵadvance(1),V.ɵɵproperty("ngStyle",V.ɵɵpureFunction2(9,se,e.data.styles.colors.dangerTextButtonColor,e.data.styles.colors.dangerColor))}}let ae=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.solucitudesService=n,this.activeRoute=i,this.next=new V.EventEmitter(null),this.errPhone=new V.EventEmitter(null),this.resendO=new V.EventEmitter(null),this.secsCount=60,this.lastNumberPhone="XXX"}ngOnInit(){this.form=this.fb.group({code1:[null,[p.Validators.required,p.Validators.maxLength(6),p.Validators.minLength(6)]]}),this.initSecsInterval(),this.activeRoute.queryParams.subscribe((e=>{e&&e.request_id&&(this.requestID=e.request_id)}),(e=>{console.error(e)})),this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastNumberPhone=t}initSecsInterval(){this.interv=setInterval((()=>{this.secsCount--,this.secsCount<=0&&this.finishSecsInterval()}),1e3)}finishSecsInterval(){this.interv&&clearInterval(this.interv)}nextStep(){let e={code:this.getCode()};this.next.emit(e)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){return(0,D.Z)((function*(){}))()}errorStep(){this.errPhone.emit(!0)}setInputEvent(e){""!=e.target.value?j(e.target).next().focus():"Backspace"==e.code&&j(e.target).prev().focus()}resendOTP(){this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-otp-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},decls:16,vars:20,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","gap-2","items-center","justify-start","w-full","max-w-[200px]"],["appearance","outline",1,"w-full","flex-1"],["tabindex","1","maxlength","6","minlength","1","formControlName","code1","type","text","matInput","",3,"change","keyup"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"info-time","w-fit",3,"ngStyle"],[1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtemplate(6,te,5,8,"ng-container",5),V.ɵɵtemplate(7,oe,7,12,"ng-container",5),V.ɵɵelementEnd(),V.ɵɵelementStart(8,"div",6)(9,"mat-form-field",7)(10,"mat-label"),V.ɵɵtext(11," Código OTP "),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"input",8),V.ɵɵlistener("change",(function(e){return t.capturePasteEvent(e)}))("keyup",(function(e){return t.setInputEvent(e)})),V.ɵɵelementEnd()()()(),V.ɵɵelementStart(13,"div",9)(14,"button",10),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(15,"Siguiente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.otp.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,18,t.texts.otp.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),V.ɵɵadvance(7),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,i.PC,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function le(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",2),V.ɵɵelement(1,"div",3)(2,"div",4),V.ɵɵpipe(3,"safeHtml"),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",e.texts.success.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(3,8,e.texts.success.description||""),V.ɵɵsanitizeHtml)}}function ce(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.gotoRedirect())})),V.ɵɵtext(2),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px"),V.ɵɵadvance(1),V.ɵɵtextInterpolate1(" ",e.data[e.flowName].btnTextCallBack||"Haga click aquí para finalizar"," ")}}let de=(()=>{class e{constructor(e,t,n,i){this.fb=e,this.utils=t,this.videoS=n,this.route=i}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"success").then((e=>{console.log("Se ha seteado el status success correctamente")})).catch((e=>{console.error("No se ha seteado el status success. Error: ",e)})))}))}save(){}gotoRedirect(){this.data[this.flowName].enableUrlCallBack&&this.data[this.flowName].callBackUrl&&location.assign(this.data[this.flowName].callBackUrl)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-success-step"]],inputs:{data:"data",texts:"texts",packId:"packId",requestID:"requestID",userId:"userId",flowName:"flowName"},decls:2,vars:2,consts:[["class","pt-4 pb-8 flex flex-col animated fadeIn",4,"ngIf"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"pt-4","pb-8","flex","flex-col","animated","fadeIn"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,le,4,10,"div",0),V.ɵɵtemplate(1,ce,3,7,"div",1)),2&e&&(V.ɵɵproperty("ngIf",!t.data.config.infiniteLoopInCompleted),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data[t.flowName].enableUrlCallBack))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",6),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.retry())})),V.ɵɵtext(2,"Intentarlo nuevamente"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}function he(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",5)(1,"button",7),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.newRequest())})),V.ɵɵtext(2,"Crear nueva solicitud"),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("color",e.data.styles.colors.btnText)("background",e.data.styles.colors.btnBg)("border-radius",e.data.styles.btnRound+"px")}}let pe=(()=>{class e{constructor(e,t,n){this.utils=e,this.videoS=t,this.route=n,this.retryOp=new V.EventEmitter(null),this.newReq=new V.EventEmitter(null)}ngOnInit(){this.route.queryParams.subscribe((e=>{e.request_id&&(this.requestID=e.request_id,this.videoS.setState(this.requestID,"failed").then((e=>{console.log("Se ha seteado el status failed correctamente")})).catch((e=>{console.error("No se ha seteado el status failed. Error: ",e)})))}))}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}newRequest(){this.newReq.emit(this.solicitud.request_id)}getIfRetryIsAllowed(){return"failed_with_retry"==this.solicitud}getIfNewRequestIsAllowed(){return"failed_documents_downloaded"==this.solicitud}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-fail-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{retryOp:"retry",newReq:"newRequest"},decls:7,vars:8,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"text-red-500","title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],["class","flex items-center justify-end gap-2 p-4",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8",3,"click"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵtemplate(5,ue,3,6,"div",4),V.ɵɵtemplate(6,he,3,6,"div",4),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",t.texts.fail.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,6,t.texts.fail.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngIf",t.solicitud&&"failed_with_retry"==t.solicitud.status_code),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.solicitud&&"failed_documents_downloaded"==t.solicitud.status_code))},dependencies:[i.O5,u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();n(6866);var me=n(1763),fe=n(5696);const ge=["termsCheckbox"],_e=["termsCertCheckbox"],ve=["assignmentCheckbox"];function ye(e,t){if(1&e&&(V.ɵɵelementStart(0,"mat-form-field",5)(1,"mat-label"),V.ɵɵtext(2,"Razón social"),V.ɵɵelementEnd(),V.ɵɵelement(3,"input",28),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵclassMapInterpolate1("",e.disabledInputs.razon?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.razon?-1:1)}}function be(e,t){if(1&e&&(V.ɵɵelementStart(0,"mat-form-field",5)(1,"mat-label"),V.ɵɵtext(2,"CIF"),V.ɵɵelementEnd(),V.ɵɵelement(3,"input",29),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵclassMapInterpolate1("",e.disabledInputs.cif?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",e.disabledInputs.cif?-1:1)}}function xe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",30)(1,"belender-checkbox",22),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setPower(t))})),V.ɵɵtext(2," Consiento expresamente a la activación de un poder digital según las condiciones que pueden verse "),V.ɵɵelementStart(3,"a",24),V.ɵɵlistener("click",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.gotoPowerConditions(t))})),V.ɵɵelementStart(4,"u"),V.ɵɵtext(5,"aquí"),V.ɵɵelementEnd()()()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title)}}function we(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",21)(1,"belender-checkbox",22,31),V.ɵɵlistener("changeCheckbox",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext();return V.ɵɵresetView(n.setAssignment(t))})),V.ɵɵelement(3,"div",32),V.ɵɵelementEnd()()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("color",e.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("innerHTML",null==e.data?null:e.data.config.dataAssignmentText,V.ɵɵsanitizeHtml)}}const Ce=function(e){return{"dont-show-data":e}},Se={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let Me=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.cd=n,this.requestID=null,this.next=new V.EventEmitter(null),this.goTerms=new V.EventEmitter(null),this.goTermsCert=new V.EventEmitter(null),this.goPower=new V.EventEmitter(null),this.acceptTerms=!1,this.acceptTerms2=!1,this.step=0,this.assignment=!1,this.disabledInputs={dni:!1,name:!1,lastname:!1,secondlastname:!1,phone:!1,email:!1,razon:!1,cif:!1,type:!1},this.requestAux={phone:null,email:null,razon:null,cif:null,name:null,lastname:null,secondLastname:null,dni:null,type:"NATURAL"},this.noValidate=!1,this.powerActivate=!1}ngOnInit(){this.solicitud?(this.noValidate="terms_and_conditions"==this.solicitud.status_code,this.setForm(this.solicitud)):this.setForm(null)}tabChanged(e){this.requestAux.type=e.value,this.setForm(this.requestAux)}setForm(e){this.requestAux.phone=e?e.person_phone||e.phone:null,this.requestAux.email=e?e.person_email||e.email||e.email_copy:null,this.requestAux.razon=e&&e.razon_social?e.razon_social:null,this.requestAux.cif=e&&e.cif?e.cif:null,this.requestAux.name=e?e.person_name||e.name:null,this.requestAux.lastname=e?e.person_first_surname||e.first_surname:null,this.requestAux.secondLastname=e?e.person_second_surname||e.second_surname:null,this.requestAux.dni=e&&e.document_number?e.document_number:e&&e.person_document_number?e.person_document_number:null,this.requestAux.type=e&&e.person_type?e.person_type:this.requestAux.type,this.form=this.fb.group("NATURAL"==this.requestAux.type?{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.Validators.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.Validators.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.Validators.required,p.Validators.email]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9)]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.Validators.required]]}:{type:[this.requestAux.type],name:[this.requestAux.name||null,this.noValidate?[]:[p.Validators.required]],lastname:[this.requestAux.lastname||null,this.noValidate?[]:[p.Validators.required]],secondLastname:[this.requestAux.secondLastname||null],email:[this.requestAux.email||null,this.noValidate?[]:[p.Validators.required,p.Validators.email]],dni:[this.requestAux.dni||null,this.noValidate?[]:[p.Validators.required]],phone:[this.requestAux.phone||"",this.noValidate?[]:[p.Validators.required,p.Validators.maxLength(9),p.Validators.minLength(9)]],razon:[this.requestAux.razon||null,this.noValidate?[]:[p.Validators.required]],cif:[this.requestAux.cif||null,this.noValidate?[]:[p.Validators.required]]}),this.requestIDFromURL&&this.disableEnableInputs(this.requestAux.type,this.requestAux.name,this.requestAux.lastname,this.requestAux.secondLastname,this.requestAux.email,this.requestAux.phone,this.requestAux.dni,this.requestAux.razon,this.requestAux.cif),this.cd.markForCheck()}disableEnableInputs(e,t,n,i,r,s,o,a,l){this.disabledInputs={name:t||!1,lastname:n||!1,secondlastname:i||!1,email:r||!1,phone:s||!1,dni:o||!1,razon:a||!1,cif:l||!1,type:e||!1}}enableInput(e){this.disabledInputs[e]=!1,this.cd.markForCheck()}nextStep(){let e;e="NATURAL"==this.requestAux.type?{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,type:"Natural"}:{email_copy:this.form.get("email").value,phone:this.form.get("phone").value,name:this.form.get("name").value,first_surname:this.form.get("lastname").value,second_surname:this.form.get("secondLastname").value,document_number:this.form.get("dni").value,company_name:this.form.get("razon").value,cif:this.form.get("cif").value,type:"Legal",rmc_validation:this.userId},(this.data.config.activatePower||this.solicitud?.power_activate)&&(e.power_activate=1,e.terms_and_conditions_power=1),this.next.emit(e)}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(!0)}gotoTermsAndConditionsCertificate(e){e.preventDefault(),e.stopPropagation(),this.goTermsCert.emit(!0)}setAssignment(e){this.assignment=e}getAssignmentValidation(){return!this.data.config.dataAssignmentCheck||this.assignment}setTerms2(e){this.acceptTerms2=e}setTermsCheck(e){this.checkComponent.checked=e,this.acceptTerms=e}setTerms2Check(e){this.certCheckComponent.checked=e,this.acceptTerms2=e}setAssignmentCheck(e){this.assignmentCheckComponent.checked=e,this.assignment=e}setTerms(e){this.acceptTerms=e}getIfValid(){let e=this.form.invalid;return this.noValidate&&(e=!1),!((this.requestID?this.solicitud?.power_activate:this.data?.config.activatePower)&&!this.powerActivate)&&!e&&this.acceptTerms&&this.acceptTerms2&&this.getAssignmentValidation()}setPower(e){this.powerActivate=e}gotoPowerConditions(e){this.goPower.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(V.ChangeDetectorRef))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-form-step"]],viewQuery:function(e,t){if(1&e&&(V.ɵɵviewQuery(ge,5),V.ɵɵviewQuery(_e,5),V.ɵɵviewQuery(ve,5)),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.checkComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.certCheckComponent=e.first),V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.assignmentCheckComponent=e.first)}},inputs:{requestID:"requestID",flowName:"flowName",data:"data",texts:"texts",solicitud:"solicitud",userId:"userId",requestIDFromURL:"requestIDFromURL"},outputs:{next:"nextStep",goTerms:"goToTerms",goTermsCert:"goToTermsCertificate",goPower:"goToPower"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Se},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:57,vars:63,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4","custom-html",3,"innerHTML"],[1,"my-1","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between",3,"ngClass"],["appearance","outline"],["formControlName","type",3,"tabindex","selectionChange"],["value","NATURAL"],["value","LEGAL"],["formControlName","name","matInput","",3,"tabindex"],["formControlName","lastname","matInput","",3,"tabindex"],["formControlName","secondLastname","matInput","",3,"tabindex"],["formControlName","email","placeholder","Ej: mi_email@dominio.com","type","email","matInput","",3,"tabindex"],["formControlName","phone","placeholder","Ej: 123123123","maxlength","9","type","text","matInput","",3,"tabindex"],["formControlName","dni","maxlength","9","minlength","9","placeholder","Ej: 2222221R","type","text","matInput","",3,"tabindex"],["appearance","outline",3,"class",4,"ngIf"],[1,"mt-8","flex","justify-start","items-center","w-full","flex-100"],["id","termsCheckbox",3,"color","changeCheckbox"],["termsCheckbox",""],[3,"userId","showPolicyLink","firstSentence","secondSentence","thirdSentence","policyActionText","termsActionText","customTerms","goToTerms"],["class","flex justify-between items-center w-full flex-100",4,"ngIf"],[1,"flex","justify-start","items-center","w-full","flex-100"],[3,"color","changeCheckbox"],["termsCertCheckbox",""],["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],["class","flex justify-start items-center w-full flex-100",4,"ngIf"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],["formControlName","razon","placeholder","Ej: Mi Empresa","type","text","matInput","",3,"tabindex"],["formControlName","cif","placeholder","Ej: 123123123","type","text","matInput","",3,"tabindex"],[1,"flex","justify-between","items-center","w-full","flex-100"],["assignmentCheckbox",""],[1,"custom-html",3,"innerHTML"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Tipo de persona"),V.ɵɵelementEnd(),V.ɵɵelementStart(9,"mat-select",6),V.ɵɵlistener("selectionChange",(function(e){return t.tabChanged(e)})),V.ɵɵelementStart(10,"mat-option",7),V.ɵɵtext(11,"Natural"),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-option",8),V.ɵɵtext(13,"Legal"),V.ɵɵelementEnd()()(),V.ɵɵelementStart(14,"mat-form-field",5)(15,"mat-label"),V.ɵɵtext(16,"Nombre"),V.ɵɵelementEnd(),V.ɵɵelement(17,"input",9),V.ɵɵelementEnd(),V.ɵɵelementStart(18,"mat-form-field",5)(19,"mat-label"),V.ɵɵtext(20,"Primer apellido"),V.ɵɵelementEnd(),V.ɵɵelement(21,"input",10),V.ɵɵelementEnd(),V.ɵɵelementStart(22,"mat-form-field",5)(23,"mat-label"),V.ɵɵtext(24,"Segundo apellido"),V.ɵɵelementEnd(),V.ɵɵelement(25,"input",11),V.ɵɵelementEnd(),V.ɵɵelementStart(26,"mat-form-field",5)(27,"mat-label"),V.ɵɵtext(28,"Email"),V.ɵɵelementEnd(),V.ɵɵelement(29,"input",12),V.ɵɵelementEnd(),V.ɵɵelementStart(30,"mat-form-field",5)(31,"mat-label"),V.ɵɵtext(32,"Telefono"),V.ɵɵelementEnd(),V.ɵɵelement(33,"input",13),V.ɵɵelementEnd(),V.ɵɵelementStart(34,"mat-form-field",5)(35,"mat-label"),V.ɵɵtext(36,"DNI"),V.ɵɵelementEnd(),V.ɵɵelement(37,"input",14),V.ɵɵelementEnd(),V.ɵɵtemplate(38,ye,4,4,"mat-form-field",15),V.ɵɵtemplate(39,be,4,4,"mat-form-field",15),V.ɵɵelementEnd(),V.ɵɵelementStart(40,"div",16)(41,"belender-checkbox",17,18),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms2(e)})),V.ɵɵelementStart(43,"belender-terms-and-policy-links",19),V.ɵɵlistener("goToTerms",(function(e){return t.gotoTermsAndConditions(e)})),V.ɵɵelementEnd()()(),V.ɵɵtemplate(44,xe,6,1,"div",20),V.ɵɵelementStart(45,"div",21)(46,"belender-checkbox",22,23),V.ɵɵlistener("changeCheckbox",(function(e){return t.setTerms(e)})),V.ɵɵtext(48," He leído y acepto los "),V.ɵɵelementStart(49,"a",24),V.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditionsCertificate(e)})),V.ɵɵelementStart(50,"u"),V.ɵɵtext(51,"términos y condiciones"),V.ɵɵelementEnd()(),V.ɵɵtext(52," para la emisión del certificado "),V.ɵɵelementEnd()(),V.ɵɵtemplate(53,we,4,2,"div",25),V.ɵɵelementStart(54,"div",26)(55,"button",27),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(56," Continuar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.form.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,59,t.texts.form.description||""),V.ɵɵsanitizeHtml),V.ɵɵadvance(2),V.ɵɵproperty("ngClass",V.ɵɵpureFunction1(61,Ce,t.data.config.dontShowDataInTerms&&t.solicitud&&t.solicitud.status_code&&"terms_and_conditions"===t.solicitud.status_code)),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.type?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.type?-1:1),V.ɵɵadvance(5),V.ɵɵclassMapInterpolate1("",t.disabledInputs.name?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.name?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.lastname?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.lastname?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.secondlastname?"disabled-input":""," w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.secondlastname?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.email?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.email?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.phone?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.phone?-1:1),V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("",t.disabledInputs.dni?"disabled-input":""," mb-4 w-full flex-1 belender-form-field"),V.ɵɵadvance(3),V.ɵɵpropertyInterpolate("tabindex",t.disabledInputs.dni?-1:1),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","LEGAL"==t.requestAux.type),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","LEGAL"==t.requestAux.type),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(2),V.ɵɵproperty("userId",t.userId)("showPolicyLink",null==t.data?null:t.data.config.showPolicyLink)("firstSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.firstSentence)("secondSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.secondSentence)("thirdSentence",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.thirdSentence)("policyActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.policyActionText)("termsActionText",null==t.data[t.flowName]||null==t.data[t.flowName].texts||null==t.data[t.flowName].texts.form?null:t.data[t.flowName].texts.form.termsActionText)("customTerms",t.data[t.flowName].customTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.requestID?null==t.solicitud?null:t.solicitud.power_activate:null==t.data?null:t.data.config.activatePower),V.ɵɵadvance(2),V.ɵɵproperty("color",t.data.styles.colors.title),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",null==t.data?null:t.data.config.dataAssignmentCheck),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.getIfValid()?t.data.styles.colors.btnText:"")("background",t.getIfValid()?t.data.styles.colors.btnBg:"")("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",!t.getIfValid()))},dependencies:[i.mk,i.O5,u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.MaxLengthValidator,p.FormGroupDirective,p.FormControlName,f.gD,M.ey,me.b,fe.T,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.dont-show-data[_ngcontent-%COMP%]{opacity:0!important;padding:0!important;overflow:hidden!important;height:0px!important;margin:0!important}"]}),e})(),Ie=(()=>{class e{constructor(e,t,n){this.fb=e,this.utils=t,this.Activatedroute=n,this.next=new V.EventEmitter(null),this.accept=!1}ngOnInit(){this.Activatedroute.queryParams.subscribe((e=>{this.setForm(e)}))}nextStep(){let e={phone:this.form.get("phone").value};this.next.emit(e)}setForm(e){this.form=this.fb.group({phone:["",p.Validators.required]}),this.solicitud&&"bad_phone"==this.solicitud.status_code&&this.form.controls.phone.markAsTouched()}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(P.gz))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-error-form-step"]],inputs:{data:"data",flowName:"flowName",texts:"texts",mode:"mode",solicitud:"solicitud"},outputs:{next:"nextStep"},decls:14,vars:14,consts:[[1,"animated","fadeIn","fixed-content",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0"],[1,"subheading-1","pt-4"],[1,"mb-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","phone","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1)(2,"div",2),V.ɵɵtext(3," Error con el teléfono "),V.ɵɵelementEnd(),V.ɵɵelementStart(4,"div",3),V.ɵɵtext(5," El teléfono ingresado no coincide con registrado en la Seguridad Social, por favor ingrese otro "),V.ɵɵelementEnd()(),V.ɵɵelementStart(6,"div",4)(7,"mat-form-field",5)(8,"mat-label"),V.ɵɵtext(9,"Telefono"),V.ɵɵelementEnd(),V.ɵɵelement(10,"input",6),V.ɵɵelementEnd()(),V.ɵɵelementStart(11,"div",7)(12,"button",8),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(13," Continuar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵadvance(8),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[u.lW,A.KE,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.FormGroupDirective,p.FormControlName],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();var ke=n(5145);let Ee=(()=>{class e{constructor(e){this.utils=e,this.status="",this.label="Cargando datos.."}ngOnInit(){this.data.config&&this.data.config.infiniteLoopInCompleted?this.label="":ke.Z.forEach((e=>{e.text==this.status&&(this.label=e.label)}))}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-loading-step"]],inputs:{status:"status",data:"data"},decls:5,vars:1,consts:[[1,"fixed-content","h-full"],[1,"h-full","py-10","flex","flex-col","items-center"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"mat-progress-spinner"),V.ɵɵelementStart(3,"p"),V.ɵɵtext(4),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(4),V.ɵɵtextInterpolate(t.label))},dependencies:[b.Ou],styles:[".content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})(),Te=(()=>{class e{constructor(e,t,n,i,r){this.fb=e,this.utils=t,this.solicitudesService=n,this.attachmentsService=i,this.notifications=r,this.retryOp=new V.EventEmitter(null)}ngOnInit(){}save(){}retry(){this.retryOp.emit(this.solicitud.request_id)}getTextStatus(){switch(this.solicitud.status_code){case"abandoned_after_waiting_otp_seguridad_social":return"Abandonado después de esperar OTP de Seguridad Social";case"abandoned_after_invalid_otp_seguridad_social":return"Abandonado despues de OTP inválido en Seguridad Social";case"abandoned_after_invalid_otp_aeat":return"Abandonado despues de OTP inválido en AEAT";case"abandoned_after_waiting_otp_aeat":return"Abandonado después de esperar OTP de AEAT";default:return this.solicitud.status_message||this.solicitud.status_code}}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.UntypedFormBuilder),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(_.M),V.ɵɵdirectiveInject(y.o),V.ɵɵdirectiveInject(I.T))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-abandoned-step"]],inputs:{solicitud:"solicitud",data:"data",texts:"texts"},outputs:{retryOp:"retry"},decls:10,vars:17,consts:[[1,"animated","fadeIn","fixed-content"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"p-1","px-4","py-2","bg-orange-500/10","text-orange-500","border","border-orange-500","rounded-sm","mb-2","mt-6"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"click"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"div",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementStart(5,"div",4),V.ɵɵtext(6),V.ɵɵelementEnd()(),V.ɵɵelementStart(7,"div",5)(8,"button",6),V.ɵɵlistener("click",(function(){return t.retry()})),V.ɵɵtext(9,"Intentarlo nuevamente"),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.abandoned.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,15,t.texts.abandoned.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(3),V.ɵɵtextInterpolate1(" ",t.getTextStatus()," "),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.btnText)("background",t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"))},dependencies:[u.lW,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();function Pe(e,t){return n=>{const i=n.controls[t];i.errors&&!i.errors.confirmedValidator||i.setErrors(n.controls[e].value!==i.value?{confirmedValidator:!0}:null)}}function Oe(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña es requerida "),V.ɵɵelementEnd())}function De(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}function Le(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Es necesario repetir la contraseña "),V.ɵɵelementEnd())}function Ae(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," Las contraseñas deben coincidir "),V.ɵɵelementEnd())}function Ne(e,t){1&e&&(V.ɵɵelementStart(0,"mat-hint",12),V.ɵɵtext(1," La contraseña debe tener al menos 8 carácteres "),V.ɵɵelementEnd())}const Re={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let je=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.form=new p.FormGroup({}),this.next=new V.EventEmitter(null)}ngOnInit(){this.setForm()}get f(){return this.form.controls}submit(){this.nextStep()}setForm(){this.form=this.fb.group({password:["",[p.Validators.required]],confirm_password:["",[p.Validators.required]]},{validator:Pe("password","confirm_password")})}nextStep(){let e={password:this.form.get("password").value};this.next.emit(e)}}return e.ɵfac=function(t){return new(t||e)(V.ɵɵdirectiveInject(p.FormBuilder),V.ɵɵdirectiveInject(H.F))},e.ɵcmp=V.ɵɵdefineComponent({type:e,selectors:[["belender-password-step"]],inputs:{data:"data",texts:"texts",solicitud:"solicitud"},outputs:{next:"nextStep"},features:[V.ɵɵProvidersFeature([{provide:M.sG,useValue:Re},{provide:V.LOCALE_ID,useValue:"es-ES"}])],decls:22,vars:23,consts:[[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-4","flex","flex-col"],[1,"title","m-0",3,"innerHTML"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"my-3","flex","flex-col","md:flex-row","flex-wrap","gap-2","md:justify-between"],["appearance","outline",1,"w-full","flex-1","belender-form-field"],["formControlName","password","minlength","8","type","password","matInput",""],["class","text-red-500",4,"ngIf"],["appearance","outline",1,"mb-4","w-full","flex-1","belender-form-field"],["formControlName","confirm_password","minlength","8","type","password","matInput",""],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[1,"text-red-500"]],template:function(e,t){1&e&&(V.ɵɵelementStart(0,"form",0)(1,"div",1),V.ɵɵelement(2,"div",2)(3,"div",3),V.ɵɵpipe(4,"safeHtml"),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),V.ɵɵtext(8,"Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(9,"input",6),V.ɵɵtemplate(10,Oe,2,0,"mat-hint",7),V.ɵɵtemplate(11,De,2,0,"mat-hint",7),V.ɵɵelementEnd(),V.ɵɵelementStart(12,"mat-form-field",8)(13,"mat-label"),V.ɵɵtext(14,"Repite Contraseña"),V.ɵɵelementEnd(),V.ɵɵelement(15,"input",9),V.ɵɵtemplate(16,Le,2,0,"mat-hint",7),V.ɵɵtemplate(17,Ae,2,0,"mat-hint",7),V.ɵɵtemplate(18,Ne,2,0,"mat-hint",7),V.ɵɵelementEnd()(),V.ɵɵelementStart(19,"div",10)(20,"button",11),V.ɵɵlistener("click",(function(){return t.nextStep()})),V.ɵɵtext(21," Guardar "),V.ɵɵelementEnd()()()),2&e&&(V.ɵɵproperty("formGroup",t.form),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.data.styles.colors.title)("font-size",t.texts.form.titleSize+"px"),V.ɵɵproperty("innerHTML",t.texts.password.title,V.ɵɵsanitizeHtml),V.ɵɵadvance(1),V.ɵɵstyleProp("color",t.data.styles.colors.text),V.ɵɵproperty("innerHTML",V.ɵɵpipeBind1(4,21,t.texts.password.description),V.ɵɵsanitizeHtml),V.ɵɵadvance(7),V.ɵɵproperty("ngIf",t.f.password.touched&&t.f.password.invalid&&t.f.password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.password.invalid&&t.f.password.errors.minlength),V.ɵɵadvance(5),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.required),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.touched&&t.f.confirm_password.touched&&t.f.confirm_password.invalid&&t.f.confirm_password.errors.confirmedValidator),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.f.confirm_password.invalid&&t.f.confirm_password.errors.minlength),V.ɵɵadvance(2),V.ɵɵstyleProp("color",t.form.invalid?"":t.data.styles.colors.btnText)("background",t.form.invalid?"":t.data.styles.colors.btnBg)("border-radius",t.data.styles.btnRound+"px"),V.ɵɵproperty("disabled",t.form.invalid))},dependencies:[i.O5,u.lW,A.KE,A.bx,A.hX,w.Nt,p.ɵNgNoValidate,p.DefaultValueAccessor,p.NgControlStatus,p.NgControlStatusGroup,p.MinLengthValidator,p.FormGroupDirective,p.FormControlName,K.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}"]}),e})();const Fe=["formStep"];function qe(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"vex-power-cert",2),V.ɵɵlistener("accept",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext();return V.ɵɵresetView(t.acceptPowerCert())})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext();V.ɵɵproperty("hideButtons",!1)("flow","VideoID")("userId",e.userId)}}function Ye(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",9),V.ɵɵelement(1,"img",10),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function Ve(e,t){1&e&&(V.ɵɵelementStart(0,"div",11),V.ɵɵelement(1,"mat-progress-spinner",12),V.ɵɵelementEnd()),2&e&&(V.ɵɵadvance(1),V.ɵɵproperty("value",0))}function He(e,t){if(1&e&&V.ɵɵelement(0,"belender-loading-step",22),2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("status",null==e.solicitud?null:e.solicitud.status_code)}}function ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-form-step",23,24),V.ɵɵlistener("goToTerms",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoTermsAndConditions())}))("goToPower",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoPowerConditions())}))("goToTermsCertificate",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.gotoTermsAndConditionsCertificate())}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.gotoOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("flowName",e.flowName)("requestID",e.requestID)("requestIDFromURL",e.requestIDFromURL)("userId",e.userId)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Be(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-otp-step",25),V.ɵɵlistener("resendOTP",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.resendOTP(t))}))("errorPhone",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(4);return V.ɵɵresetView(t.setRequestStatus("failed_login_otp"))}))("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.requestOTP(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Ue(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-password-step",26),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.sendPassword(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function We(e,t){if(1&e&&V.ɵɵelement(0,"belender-success-step",27),2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("flowName",e.flowName)("packId",e.packId)("userId",e.userId)("requestID",e.requestID)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function $e(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-fail-step",28),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.retryRequest(t))}))("newRequest",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.newRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud)}}function Ge(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-error-form-step",29),V.ɵɵlistener("nextStep",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.sendNewData(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ze(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"belender-abandoned-step",30),V.ɵɵlistener("retry",(function(t){V.ɵɵrestoreView(e);const n=V.ɵɵnextContext(4);return V.ɵɵresetView(n.retryRequest(t))})),V.ɵɵelementEnd()}if(2&e){const e=V.ɵɵnextContext(4);V.ɵɵproperty("solicitud",e.solicitud)("data",e.data)("texts",e.data[e.flowName]?e.data[e.flowName].texts:null==e.data[e.flowName]?null:e.data[e.flowName].texts)}}function Ke(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",31)(1,"div",32)(2,"h1",33),V.ɵɵtext(3,"No existe la solicitud"),V.ɵɵelementEnd()(),V.ɵɵelementStart(4,"div",34),V.ɵɵtext(5," No existen solicitudes activas con el código requerido "),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(4);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text)}}function Qe(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵtemplate(1,He,1,2,"belender-loading-step",13),V.ɵɵtemplate(2,ze,2,7,"belender-form-step",14),V.ɵɵtemplate(3,Be,1,3,"belender-otp-step",15),V.ɵɵtemplate(4,Ue,1,3,"belender-password-step",16),V.ɵɵtemplate(5,We,1,6,"belender-success-step",17),V.ɵɵtemplate(6,$e,1,3,"belender-fail-step",18),V.ɵɵtemplate(7,Ge,1,3,"belender-error-form-step",19),V.ɵɵtemplate(8,Ze,1,3,"belender-abandoned-step",20),V.ɵɵtemplate(9,Ke,6,2,"div",21),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("ngIf","loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","form"==e.getStatus()&&!e.loading),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","otp"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","password"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","success"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","failed"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","error-data"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","abandoned"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf","no-exist"==e.getStatus())}}function Xe(e,t){1&e&&V.ɵɵelement(0,"belender-disabled-url")}function Je(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",35),V.ɵɵelement(1,"mat-progress-spinner",36),V.ɵɵelementStart(2,"p",37),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate1(" ",e.loading," ")}}function et(e,t){if(1&e){const e=V.ɵɵgetCurrentView();V.ɵɵelementStart(0,"div",38)(1,"div",31)(2,"div",39),V.ɵɵtext(3,"Error!"),V.ɵɵelementEnd(),V.ɵɵelement(4,"div",40),V.ɵɵelementEnd(),V.ɵɵelementStart(5,"div",41)(6,"button",42),V.ɵɵlistener("click",(function(){V.ɵɵrestoreView(e);const t=V.ɵɵnextContext(3);return V.ɵɵresetView(t.error=!1)})),V.ɵɵtext(7," Ingresar manualmente "),V.ɵɵelementEnd()()()}if(2&e){const e=V.ɵɵnextContext(3);V.ɵɵadvance(4),V.ɵɵstyleProp("color",e.data.styles.colors.text),V.ɵɵproperty("innerHTML",e.error,V.ɵɵsanitizeHtml)}}function tt(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",3)(1,"div"),V.ɵɵtemplate(2,Ye,2,1,"div",5),V.ɵɵtemplate(3,Ve,2,1,"div",6),V.ɵɵtemplate(4,Qe,10,9,"ng-container",4),V.ɵɵtemplate(5,Xe,1,0,"belender-disabled-url",4),V.ɵɵtemplate(6,Je,4,3,"div",7),V.ɵɵtemplate(7,et,8,3,"div",8),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵclassMapInterpolate1("h-full w-full flex-auto p-0 md:p-3 ",e.data.styles.typography,""),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo&&"loading"!=e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.config.infiniteLoopInCompleted&&"loading"==e.getStatus()),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&!e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.error&&e.disableURL),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",!e.loading&&e.error)}}function nt(e,t){if(1&e&&(V.ɵɵelementContainerStart(0),V.ɵɵelementStart(1,"div",43),V.ɵɵtext(2),V.ɵɵelementEnd(),V.ɵɵelementContainerEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(2),V.ɵɵtextInterpolate1(" TestMode ",e.testMode?"ON":"OFF"," ")}}function it(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",3),V.ɵɵtemplate(1,tt,8,11,"div",1),V.ɵɵtemplate(2,nt,3,1,"ng-container",4),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.testMode)}}let rt=class{constructor(e,t,n,i,r,s,o,a,l){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.customizationStoreService=s,this.notis=o,this.webhooksService=a,this.dialog=l,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1,this.requestIDFromURL=!1,this.requestCreated=!1,this.viewPowerTerms=!1,this.disableURL=!1,this.flowName="VideoID"}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.userId=this.customizationStoreService.USER_ID,this.packId=this.customizationStoreService.PACK_ID,this.userId?this.setInitialData(this.userId):this.loading=null,"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}sendMessageToParent(e){window.top.postMessage(e,"*")}setInitialData(e){var t=this;return(0,D.Z)((function*(){const n=yield t.getFlow(e);if(t.data={config:t.customizationStoreService.FUNDER_CONFIG,styles:t.customizationStoreService.FUNDER_STYLES,[t.flowName]:n},!t.data.config||!t.data.config.funder_id)return t.notis.showAlert("Error!","No se ha configurado la customización del widget para este usuario","error"),t.loading=null,void t.cd.markForCheck();t.financiadorID=t.data.config.funder_id||"",t.disableURL=t.data.config.disableUrlWidget,t.validateRequestIdInUrl(),t.cd.markForCheck()}))()}getFlow(e){var t=this;return(0,D.Z)((function*(){return new Promise((n=>{t.customizationService.getCustomizationByFlow(e,t.flowName).then((e=>{e&&e.data&&n(e.data),n(null)}),(e=>{n(null)}))}))}))()}validateRequestIdInUrl(){this.Activatedroute.queryParams.subscribe((e=>{e&&this.setParamsToRequest(e),e&&e.acceptTerms&&(this.autoAcceptTerms=!0),e&&e.request_id?(this.disableURL=!1,this.requestID=e.request_id,this.setFormFromVcCode(e.request_id)):this.loading=null}),(e=>{this.loading=null}))}setFormFromVcCode(e){var t=this;return(0,D.Z)((function*(){t.loading="Obteniendo datos de la solicitud...",t.videoIDService.getSolicitudByCode(e).then((e=>{e&&e.data?(t.solicitud=e.data,t.requestCreated=!0,t.requestIDFromURL=!0,t.setSubscriptionOfRequest(),t.loading=null,t.solicitud.status_code&&"waiting_video"===t.solicitud.status_code&&t.solicitud.url_video_id&&location.assign(t.solicitud.url_video_id),t.skipCreationOfRequest=t.solicitud&&t.solicitud.status_code&&"prerequest"!=t.solicitud.status_code,t.autoAcceptTerms&&t.gotoOTP()):t.loading=null})).catch((e=>{t.loading=null}))}))()}setParamsToRequest(e){this.requestIDFromURL=!0,this.solicitud||(this.solicitud={status_code:"form"}),e.document&&!this.solicitud.person_document_number&&(this.solicitud.document_number=e.document),e.birthday&&!this.solicitud.birth_date&&(this.solicitud.birth_date=e.birthday),e.expiration&&!this.solicitud.document_expiration_date&&(this.solicitud.document_expiration_date=e.expiration),e.type&&!this.solicitud.person_type&&(this.solicitud.person_type=e.type),e.phone&&!this.solicitud.person_phone&&(this.solicitud.person_phone=e.phone),e.email&&!this.solicitud.person_email&&(this.solicitud.person_email=e.email),e.cif&&!this.solicitud.cif&&(this.solicitud.cif=e.cif),e.razon&&!this.solicitud.razon_social&&(this.solicitud.razon_social=e.razon),e.name&&!this.solicitud.person_name&&(this.solicitud.person_name=e.name),e.lastname&&!this.solicitud.person_first_surname&&(this.solicitud.person_first_surname=e.lastname),e.second_lastname&&!this.solicitud.person_second_surname&&(this.solicitud.person_second_surname=e.second_lastname)}handlePusherNotification(e){this.dataFromFirebase=e,this.sendMessageToParent({type:"websocket",data:e}),this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}resendOTP(e){let t={request_id:this.requestID,user_id:this.userId};this.loading="Reenviando OTP...",this.setSubscriptionOfRequest(),this.videoIDService.resendOTP(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}gotoTerms(e){this.loading="Enviando datos..",e.package_id=this.packId,e.user_id=this.userId,this.requestID&&(e.request_id=this.requestID),this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.skipCreationOfRequest?(this.gotoOTP(),this.setSubscriptionOfRequest()):this.videoIDService.addSolicitud(e).then((t=>{t&&t.status&&"error"==t.status?(this.solicitud=e,t.message&&(400==t.code?"Birthdate incorrect"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==t.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",t.message)))):t&&t.status&&"success"==t.status?(this.requestID=t.data.request_id,this.solicitud=t.data,this.sendMessageToParent({type:"response",data:t.data||t}),this.gotoOTP()):this.showAlert("Error!","Error desconocido: "+t)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}sendNewData(e){this.loading="Enviando información..",this.videoIDService.fixData(this.requestID,e).then((e=>{e.status&&"error"==e.status?e.message&&(this.showAlert("Error!",e),this.loading=null):e&&"success"==e.status&&(this.sendMessageToParent({type:"response",data:e.data||e}),this.initWaitingForResponse("Validando nuevos datos, espere por favor.."),this.cd.markForCheck())})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}gotoOTP(e){let t=e;t.user_id=this.userId,t.package_id=this.packId,this.requestCreated?this.setTerms(e):(this.initWaitingForResponse("Iniciando el proceso de emisión de certificado.."),this.videoIDService.addSolicitud(t).then((n=>{n.status&&"error"==n.status?(console.error("error en el then",n),this.solicitud=t,this.solicitud.status_code="form",n.message?(this.showAlert("Error!",n.message),n.message&&" Teléfono incorrecto"===n.message&&setTimeout((()=>{this.formComponent.enableInput("phone")}),1e3)):this.showAlert("Error!",n)):n&&"success"==n.status&&(this.sendMessageToParent({type:"response",data:n.data||n}),this.solicitud=n.data,this.requestID=n.data.request_id,this.setSubscriptionOfRequest(),this.cd.markForCheck(),this.setTerms(e))})).catch((e=>{console.error("errooooooorrrrr",e),e&&e.error&&this.showAlert("Error!",e.error),this.loading=null})))}setTerms(e){this.loading="Enviando datos..";let t={request_id:this.solicitud.request_id,terms_and_conditions_service:!0,terms_and_conditions_certificate_emition:!0};(this.data.config.activatePower||this.solicitud?.power_activate)&&(t.power_activate=!0,t.terms_and_conditions_power=e.terms_and_conditions_power),this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="waiting_otp_seguridad_social",this.loading=null}),4e3):this.videoIDService.acceptTerms(t).then((e=>{e&&e.status&&"error"==e.status?(this.solicitud=t,e.message&&(400==e.code?"Birthdate incorrect"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha de nacimiento incorrecta")):"Incorrect date"==e.message?(this.solicitud.status_code="form",this.showAlert("Error!","Fecha incorrecta!")):(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="form",this.showAlert("Error!",e.message)))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_password",this.sendMessageToParent({type:"response",data:e.data||e}),this.loading=null):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}sendPassword(e){this.loading="Enviando password..",console.error("password: ",e),e.request_id=this.requestID,this.videoIDService.sendPassword(e).then((e=>{e&&e.status&&"error"==e.status?e.message&&(400==e.code?(this.solicitud.status_code="no_service",this.loading=null):(this.solicitud.status_code="waiting_password",this.showAlert("Error!",e.message))):e&&e.status&&"success"==e.status?(this.solicitud.status_code="waiting_otp",this.sendMessageToParent({type:"response",data:e.data||e})):this.showAlert("Error!","Error desconocido: "+e)})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}requestOTP(e){this.loading="Enviando OTP..",this.testMode?setTimeout((()=>{this.solicitud=new R.l,this.solicitud.status_code="all_documents_downloaded",this.loading=null}),2e3):this.videoIDService.sendOTP({request_id:this.requestID,otp:e.code}).then((e=>{e.status&&"error"==e.status?(this.showAlert("Error!",e.message?"invalid_otp"==e.message?"El código introducido no es correcto. Por favor, inténtelo de nuevo":e.message:e),this.loading=!1):e&&"success"==e.status&&(this.loading="Redirigiendo a Vintegris, aguarde por favor...",this.solicitud.status_code="loading",this.sendMessageToParent({type:"response",data:e.data||e}),this.cd.markForCheck(),location.assign(e.message))})).catch((e=>{e&&e.error&&this.showAlert("Error!",e.error),this.loading=null}))}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}gotoErrorPhone(){}setRequestStatus(e){this.solicitud.status_code=e}retryRequest(e){let t={request_id:e,user_id:this.userId};this.loading="Reintentando enviar la solicitud...",this.setSubscriptionOfRequest(),this.videoIDService.retryRequest(t).then((e=>{e&&e.data&&(this.solicitud=e.data),this.loading=null})).catch((e=>{console.error(e),this.showAlert("Error!",e.message||e),this.loading=null}))}newRequest(e){this.solicitud.status_code="created"}getStatus(){return!this.solicitud||this.solicitud&&("created"==this.solicitud.status_code||"terms_and_conditions"==this.solicitud.status_code||"form"==this.solicitud.status_code)?"form":!this.solicitud||"waiting_login_seguridad_social"!=this.solicitud.status_code&&"loading"!=this.solicitud.status_code&&"saved_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_otp"!=this.solicitud.status_code&&"invalid_otp"!=this.solicitud.status_code?!this.solicitud||"waiting_password"!=this.solicitud.status_code&&"approved_terms_digital_power"!=this.solicitud.status_code&&"declined_terms_digital_power"!=this.solicitud.status_code?!this.solicitud||"abandoned_after_bad_phone"!=this.solicitud.status_code&&"abandoned_after_invalid_otp_seguridad_social"!=this.solicitud.status_code&&"abandoned_after_terms_and_conditions"!=this.solicitud.status_code&&"abandoned_after_waiting_otp_seguridad_social"!=this.solicitud.status_code?!this.solicitud||"certificate_created"!=this.solicitud.status_code&&"waiting_certificate"!=this.solicitud.status_code&&"all_documents_downloaded"!=this.solicitud.status_code&&"partial_documents_downloaded"!=this.solicitud.status_code&&"waiting_video"!=this.solicitud.status_code&&"consent_process_completed"!=this.solicitud.status_code&&"waiting_documents"!=this.solicitud.status_code?!this.solicitud||"bad_phone"!=this.solicitud.status_code&&"phone_not_exist_otp"!=this.solicitud.status_code?!this.solicitud||"failed_with_retry"!=this.solicitud.status_code&&"failed_without_retry"!=this.solicitud.status_code&&"rejected_identity"!=this.solicitud.status_code&&"failed_documents_downloaded"!=this.solicitud.status_code?this.solicitud&&"no_service"==this.solicitud.status_code?"no-service":"no-exist":"failed":this.data.config.noRetryInBadPhone?"otp":"error-data":this.data.infiniteLoopInCompleted||"waiting_video"==this.solicitud.status_code?(this.loading="Aguardando validación por Video ID","loading"):"success":"abandoned":"password":"otp":(this.loading="Estamos procesando su solicitud. Espere un momento por favor","loading")}sendRetry(){}gotoTermsAndConditions(){this.dialog.open(Y.L,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTermsCheck(!0)}))}gotoTermsAndConditionsCertificate(){this.dialog.open(q.v,{panelClass:"fullscreen-dialog",data:{flow:"videoid"}}).afterClosed().subscribe((e=>{e&&this.formComponent.setTerms2Check(!0)}))}gotoPowerConditions(){this.viewPowerTerms=!0}acceptPowerCert(){this.viewPowerTerms=!1}};function st(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",6),V.ɵɵelement(1,"img",7),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function ot(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"mat-progress-spinner",9),V.ɵɵelementStart(2,"p",10),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function at(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1)(1,"div",2),V.ɵɵtemplate(2,st,2,1,"div",3),V.ɵɵelement(3,"belender-success-step",4),V.ɵɵtemplate(4,ot,4,3,"div",5),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo),V.ɵɵadvance(1),V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error)}}rt.ɵfac=function(e){return new(e||rt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(W.r),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t),V.ɵɵdirectiveInject($.uw))},rt.ɵcmp=V.ɵɵdefineComponent({type:rt,selectors:[["belender-widget-videoid"]],viewQuery:function(e,t){if(1&e&&V.ɵɵviewQuery(Fe,5),2&e){let e;V.ɵɵqueryRefresh(e=V.ɵɵloadQuery())&&(t.formComponent=e.first)}},inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:2,vars:2,consts:[[3,"hideButtons","flow","userId","accept",4,"ngIf"],["class","h-full widget-belender",4,"ngIf"],[3,"hideButtons","flow","userId","accept"],[1,"h-full","widget-belender"],[4,"ngIf"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],["class","flex justify-center h-full min-h-[300px] items-center",4,"ngIf"],["class","loading-wrapper animated fadeIn",4,"ngIf"],["class","animated fadeInRight",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"flex","justify-center","h-full","min-h-[300px]","items-center"],["color","accent","diameter","40","mode","indeterminate",1,"spinner",3,"value"],[3,"data","status",4,"ngIf"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep",4,"ngIf"],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep",4,"ngIf"],[3,"data","texts","solicitud","nextStep",4,"ngIf"],[3,"data","flowName","packId","userId","requestID","texts",4,"ngIf"],[3,"data","texts","solicitud","retry","newRequest",4,"ngIf"],[3,"solicitud","data","texts","nextStep",4,"ngIf"],[3,"solicitud","data","texts","retry",4,"ngIf"],["class","px-6 py-4 flex flex-col",4,"ngIf"],[3,"data","status"],[3,"data","flowName","requestID","requestIDFromURL","userId","texts","solicitud","goToTerms","goToPower","goToTermsCertificate","nextStep"],["formStep",""],[3,"data","texts","solicitud","resendOTP","errorPhone","nextStep"],[3,"data","texts","solicitud","nextStep"],[3,"data","flowName","packId","userId","requestID","texts"],[3,"data","texts","solicitud","retry","newRequest"],[3,"solicitud","data","texts","nextStep"],[3,"solicitud","data","texts","retry"],[1,"px-6","py-4","flex","flex-col"],[1,"title","m-0"],[1,"text-red-500"],[1,"subheading-1","pt-4"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"],[1,"animated","fadeInRight"],[1,"text-red-500","title","m-0"],[1,"subheading-1","pt-4",3,"innerHTML"],[1,"flex","items-center","justify-end","gap-2","p-4"],["mat-flat-button","","type","button",1,"text-blue-500","bg-blue-50","px-8",3,"click"],[1,"test-mode","px-10","py-2","bg-blue-500/10","text-blue-500","border-blue-500","border","rounded-md"]],template:function(e,t){1&e&&(V.ɵɵtemplate(0,qe,1,3,"vex-power-cert",0),V.ɵɵtemplate(1,it,3,2,"div",1)),2&e&&(V.ɵɵproperty("ngIf",t.viewPowerTerms),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",t.data))},dependencies:[i.O5,u.lW,b.Ou,G.L,Z.q,ae,de,pe,Me,Ie,Ee,Te,je],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),rt=(0,L.gn)([(0,N.c)()],rt);let lt=class{constructor(e,t,n,i,r,s,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.notis=s,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};function ct(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",6),V.ɵɵelement(1,"img",7),V.ɵɵelementEnd()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("src",e.data.styles.logoUrl,V.ɵɵsanitizeUrl)}}function dt(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",8),V.ɵɵelement(1,"mat-progress-spinner",9),V.ɵɵelementStart(2,"p",10),V.ɵɵtext(3),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext(2);V.ɵɵadvance(1),V.ɵɵproperty("value",e.spinnerValue)("mode",e.spinnerMode),V.ɵɵadvance(2),V.ɵɵtextInterpolate(e.loading)}}function ut(e,t){if(1&e&&(V.ɵɵelementStart(0,"div",1)(1,"div",2),V.ɵɵtemplate(2,ct,2,1,"div",3),V.ɵɵelement(3,"belender-fail-step",4),V.ɵɵtemplate(4,dt,4,3,"div",5),V.ɵɵelementEnd()()),2&e){const e=V.ɵɵnextContext();V.ɵɵadvance(1),V.ɵɵstyleProp("background",e.data.styles.colors.background),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.data.styles.withLogo),V.ɵɵadvance(1),V.ɵɵproperty("data",e.data)("texts",null==e.data[e.flowName]?null:e.data[e.flowName].texts)("solicitud",e.solicitud),V.ɵɵadvance(1),V.ɵɵproperty("ngIf",e.loading&&!e.error)}}lt.ɵfac=function(e){return new(e||lt)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t))},lt.ɵcmp=V.ɵɵdefineComponent({type:lt,selectors:[["belender-widget-videoid-success"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,at,5,6,"div",0),2&e&&V.ɵɵproperty("ngIf",t.data)},dependencies:[i.O5,b.Ou,de],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),lt=(0,L.gn)([(0,N.c)()],lt);let ht=class{constructor(e,t,n,i,r,s,o){this.cd=e,this.Activatedroute=t,this.utils=n,this.videoIDService=i,this.customizationService=r,this.notis=s,this.webhooksService=o,this.data=null,this.disableActions=!1,this.step="created",this.waitingTime=15,this.loading=null,this.error=!1,this.spinnerMode="indeterminate",this.spinnerValue=0,this.subscribed=!1,this.testMode=!1,this.cntrlIsPressed=!1,this.shiftlIsPressed=!1,this.skipCreationOfRequest=!1,this.autoAcceptTerms=!1}ngOnInit(){const e=this;this.loading="Obteniendo información de la solicitud",this.Activatedroute.params.subscribe((e=>{e&&e.idUser?(this.userId=e.idUser,this.setInitialData(this.userId)):this.loading=null,e&&e.packID&&(this.packId=e.packID)}),(e=>{this.loading=null})),"pro"!=F.N.env&&(j(document).keydown((function(t){16==t.which&&(this.shiftlIsPressed=!0),17==t.which&&(this.cntrlIsPressed=!0),84==t.which&&this.cntrlIsPressed&&this.shiftlIsPressed&&(e.testMode=!e.testMode,e.cd.markForCheck())})),j(document).keyup((function(e){16==e.which&&(this.shiftlIsPressed=!1),16==e.which&&(this.cntrlIsPressed=!1)}))),this.utils.setLoading(!1)}ngOnDestroy(){}setInitialData(e){this.customizationService.getCustomization(e).then((e=>{e&&(this.data=e,this.financiadorID=e.funder_id||"",this.cd.markForCheck()),this.loading=null}),(e=>{console.error(e),this.loading=null}))}handlePusherNotification(e){this.dataFromFirebase=e,this.dataFromFirebase&&this.dataFromFirebase.status_code&&(this.solicitud.status_code=this.dataFromFirebase.status_code,"invalid_otp_seguridad_social"==this.solicitud.status_code&&this.showAlert("Error!","Código inválido. Por favor, introduzca el código recibido por SMS"),setTimeout((()=>{this.loading=null,this.cd.markForCheck()}),500))}setSubscriptionOfRequest(){if(this.socket)return;let e="wss://notifications.dev.belender.net";"qa"==F.N.env&&(e="wss://notifications.qa.belender.net"),"pro"==F.N.env&&(e="wss://notifications.belender.net"),F.N.notificationsBaseUrl&&(e=F.N.notificationsBaseUrl),this.socket=new WebSocket(`${e}?requests_id=${this.requestID}&user_id=${this.userId}`);var t=this;this.socket.onopen=function(e){console.log("Conexión establecida")},this.socket.onmessage=function(e){let n=JSON.parse(e.data);console.warn(n),t.handlePusherNotification(n)},this.socket.onerror=function(e){console.log("WebSocket Error: "+e)},this.socket.onclose=function(e){console.log("Conexión cerrada")}}setSubscriptionOfRequestOld(){!this.financiadorID||!this.userId||!this.requestID||this.subscribed||(this.subscribed=!0,this.webhooksService.bindRequestChanges(this.financiadorID,this.userId,this.requestID),this.webhooksService.subscribeRequestChanges().subscribe((e=>{e&&this.handlePusherNotification(e)}),(e=>{this.loading=null})))}showAlert(e,t){this.loading=null,this.notis.showAlert(e,t)}initWaitingForResponse(e){this.loading=e||"Validando información, espere por favor..",setTimeout((()=>{this.loading&&this.askToBack()}),1e4)}askToBack(){this.videoIDService.getSolicitudByCode(this.requestID).then((e=>{e&&e.data?(this.solicitud=e.data,this.loading=null):this.loading=null})).catch((e=>{this.loading=null}))}setRequestStatus(e){this.solicitud.status_code=e}};ht.ɵfac=function(e){return new(e||ht)(V.ɵɵdirectiveInject(V.ChangeDetectorRef),V.ɵɵdirectiveInject(P.gz),V.ɵɵdirectiveInject(H.F),V.ɵɵdirectiveInject(U),V.ɵɵdirectiveInject(C.w),V.ɵɵdirectiveInject(I.T),V.ɵɵdirectiveInject(x.t))},ht.ɵcmp=V.ɵɵdefineComponent({type:ht,selectors:[["belender-widget-videoid-fail"]],inputs:{data:"data",disableActions:"disableActions",step:"step",financiadorID:"financiadorID",solicitud:"solicitud",flowName:"flowName"},features:[V.ɵɵProvidersFeature([{provide:A.o2,useValue:{appearance:"standard"}}])],decls:1,vars:1,consts:[["class","h-full widget-belender",4,"ngIf"],[1,"h-full","widget-belender"],[1,"h-full","w-full","flex-auto","p-0","md:p-3"],["class","img-wrapper p-6 flex justify-center items-center",4,"ngIf"],[3,"data","texts","solicitud"],["class","loading-wrapper animated fadeIn",4,"ngIf"],[1,"img-wrapper","p-6","flex","justify-center","items-center"],["alt","",1,"img-card",3,"src"],[1,"loading-wrapper","animated","fadeIn"],["color","accent","diameter","40",1,"spinner",3,"value","mode"],[1,"mt-6","text-center","text-black",2,"color","black !important"]],template:function(e,t){1&e&&V.ɵɵtemplate(0,ut,5,7,"div",0),2&e&&V.ɵɵproperty("ngIf",t.data)},dependencies:[i.O5,b.Ou,pe],styles:[".widget-belender[_ngcontent-%COMP%]{position:relative}.widget-belender[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-height:360px}.widget-belender[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;left:0;background:#fff}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.test-mode[_ngcontent-%COMP%]{position:fixed;top:10px;left:10px}"]}),ht=(0,L.gn)([(0,N.c)()],ht);const pt=[{path:":idUser",component:rt},{path:":idUser/:packID",component:rt},{path:":idUser/:packID/success",component:lt},{path:":idUser/:packID/fail",component:ht}];let mt=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({imports:[P.Bz.forChild(pt),P.Bz,O.d8]}),e})();var ft=n(6981),gt=n(3848),_t=n(1129),vt=n(1258),yt=n(3295),bt=n(2266),xt=n(3300),wt=n(865);let Ct=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=V.ɵɵdefineNgModule({type:e}),e.ɵinj=V.ɵɵdefineInjector({providers:[_.M,y.o,C.w,x.t,I.T,T.t,{provide:M.Ad,useValue:"es-ES"}],imports:[mt,i.ez,r.G,s.J,o.TU,a.p0,l.JX,c.p9,d.Ps,u.ot,h.Tx,w.c,p.FormsModule,m.AV,p.ReactiveFormsModule,f.LD,g.vV,v.a,b.Cq,S.FA,M.XK,k.T5,E.Fk,ft.x,gt.Nh,_t.n,vt.H,yt.g,bt.L,xt.C,wt.q]}),e})()},5469:(e,t,n)=>{n.d(t,{B:()=>v});var i=n(7582),r=n(9933),s=n(8259),o=n(4650),a=n(5089),l=n(7367),c=n(8460),d=n(9299),u=n(9045),h=n(6895),p=n(2237),m=n(9199);const f=["widgetCard"];function g(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵelement(1,"router-outlet"),o.ɵɵelementContainerEnd())}const _=function(e){return{"margin-top":e}};let v=class{constructor(e,t,n,i,r){this.utils=e,this.customizationService=t,this.customizationStoreService=n,this.router=i,this.deviceInfoService=r,this.type="",this.widgetHeight=0,this.warningsSpace=0,this.isScaled=!1,this.funderConfigLoaded=!1,this.funderStylesLoaded=!1}ngOnInit(){this.getWindowsScreenOrientation(),this.utils.getWarningsSpaces().subscribe((e=>{this.warningsSpace=e}));let e=this.router.url.split("/");this.userId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-3]?e[e.length-3]:"":e&&e.length&&e[e.length-2]?e[e.length-2]:"",this.packId=e.length&&e.some((e=>"smspin"===e))?e&&e.length&&e[e.length-2]?e[e.length-2]:"":e&&e.length&&e[e.length-1]?e[e.length-1]:"";let t=this.packId.split("?");t&&t.length&&(this.packId=t[0]),console.error("packId",this.packId),this.userId&&(this.customizationStoreService.setUserID(this.userId),this.setCustomization()),this.packId&&this.customizationStoreService.setPackID(this.packId)}ngDoCheck(){this.getWidgetCardHeight()}ngOnDestroy(){window.screen&&window.screen.orientation&&this.orientationChangeHandler&&window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}ngAfterViewInit(){s("body").css("background","transparent"),s("body").css("background-color","transparent")}getWindowsScreenOrientation(){window.addEventListener("resize",(()=>{this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight})})),window.screen&&window.screen.orientation?(this.orientationChangeHandler=()=>{this.getWidgetCardHeight()},window.screen.orientation.addEventListener("change",this.orientationChangeHandler)):console.warn("Screen Orientation API not supported.")}getWidgetCardHeight(){this.widgetCard&&this.widgetHeight!=this.widgetCard.nativeElement.offsetHeight&&(this.widgetHeight=this.widgetCard.nativeElement.offsetHeight,this.isScaled$=this.deviceInfoService.isScaled$.subscribe((e=>{this.isScaled=e,this.isScaled&&(this.widgetHeight=1.5*this.widgetHeight)})),this.sendMessageToParent({type:"widgetHeight",data:this.widgetHeight}))}sendMessageToParent(e){window.top.postMessage(e,"*")}setCustomization(){this.customizationService.getFunderConfig(this.userId).then((e=>{this.customizationStoreService.setFunderConfig(e.data),this.funderConfigLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)})),this.customizationService.getFunderStyles(this.userId).then((e=>{this.customizationStoreService.setFunderStyles(e.data),this.funderStylesLoaded=!0})).catch((e=>{console.log("🚀 ~ WidgetComponent ~ this.customizationService.getCustomization ~ e:",e)}))}};v.ɵfac=function(e){return new(e||v)(o.ɵɵdirectiveInject(a.F),o.ɵɵdirectiveInject(l.w),o.ɵɵdirectiveInject(c.r),o.ɵɵdirectiveInject(d.F0),o.ɵɵdirectiveInject(u.H))},v.ɵcmp=o.ɵɵdefineComponent({type:v,selectors:[["belender-widget"]],viewQuery:function(e,t){if(1&e&&o.ɵɵviewQuery(f,5),2&e){let e;o.ɵɵqueryRefresh(e=o.ɵɵloadQuery())&&(t.widgetCard=e.first)}},inputs:{type:"type"},decls:4,vars:4,consts:[[1,"belender-page-layout","h-auto","p-0","md:p-4","overflow-y-visible",3,"ngStyle"],[1,"h-auto","overflow-y-visible","content-layout","overflow-x-hidden","content-widget","p-0","md:p-3"],["widgetCard",""],[4,"ngIf"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"vex-page-layout",0)(1,"vex-page-layout-content",1,2),o.ɵɵtemplate(3,g,2,0,"ng-container",3),o.ɵɵelementEnd()()),2&e&&(o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(2,_,t.warningsSpace+"px")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.funderConfigLoaded&&t.funderStylesLoaded))},dependencies:[h.O5,h.PC,d.lC,p.w,m.d],styles:[".badge-table[_ngcontent-%COMP%]{max-width:140px!important;border-radius:5px!important;-webkit-border-radius:5px!important;-moz-border-radius:5px!important;-ms-border-radius:5px!important;-o-border-radius:5px!important}.btn-refresh[_ngcontent-%COMP%]{transform:translateY(2px)}.request-data-info[_ngcontent-%COMP%]{transition:all .5s ease!important}.card[_ngcontent-%COMP%]{margin:0 auto;max-width:440px}.img-card[_ngcontent-%COMP%]{max-width:240px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.loading-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}.mat-flat-button.mat-primary.mat-button-disabled[_ngcontent-%COMP%]{background:red!important}button.mat-flat-button.text-green-500.bg-green-light.mat-button-disabled[_ngcontent-%COMP%]{background:orange!important}.content-layout[_ngcontent-%COMP%]{max-height:none;max-height:initial;overflow-y:auto;padding:0!important}.belender-page-layout[_ngcontent-%COMP%]{padding:0!important}"]}),v=(0,i.gn)([(0,r.c)()],v)},2932:(e,t,n)=>{function i(e={}){return t=>{const n=t.value;if(!n)return null;const i=n.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(e.checkFormat&&!i)return{invalidFormat:!0};if(!i)return null;const r=parseInt(i[1],10),s=parseInt(i[2],10)-1,o=parseInt(i[3],10),a=new Date(o,s,r);if(e.checkDate&&(a.getFullYear()!==o||a.getMonth()!==s||a.getDate()!==r))return{invalidDate:!0};if(e.checkAge){const e=new Date;let t=e.getFullYear()-o;const n=e.getMonth()-s;if((n<0||0===n&&e.getDate()<r)&&t--,t<18)return{underAge:!0}}return null}}n.d(t,{s:()=>i})},3842:(e,t,n)=>{n.d(t,{VU:()=>i});const i={status:"success",data:{request_id:"a29879d5-1f42-400a-bcb5-caa69ab31402",user_id:"f2216861-9119-4f74-94ff-677a8926b77c",user_name:"Roger BackOffice",person_id:"fc02a51d-7782-4cb3-882d-cad847e5d9b5",person_name:"Roger",person_phone:"666666666",person_document_number:"44011547N",person_document_expiration_date:"2032-10-24",person_document_support:"",person_birth_date:"1981-08-12",person_email:"test@gmail.com",flow_id:"d73a6c00-3ab9-46c4-9a85-471c14ec361d",flow_name:"ClavePin",funder_id:"5468ba73-7d05-4c9c-a81f-748fe7dafaba",funder_name:"Belender",status_code:"terms_and_conditions",status_message:"La solicitud se encuentra en estado de espera de terminos y condiciones",package_id:"2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7",widget_url:"https://widget.dev.belender.net/widget/clavepin/f2216861-9119-4f74-94ff-677a8926b77c/2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7?request_id=a29879d5-1f42-400a-bcb5-caa69ab31402",widget_url_boxed:"https://widget.dev.belender.net/widget-boxed/clavepin/f2216861-9119-4f74-94ff-677a8926b77c/2e0cc952-1b98-41fe-9b86-a3e4a8dcafa7?request_id=a29879d5-1f42-400a-bcb5-caa69ab31402",has_documents:!1,created_at:"2025-01-07T20:31:55.000000Z",updated_at:"2025-01-07T20:31:55.000000Z"}}},9382:(e,t,n)=>{n.d(t,{i:()=>d});var i=n(4650),r=n(5601),s=n(5895),o=n(6895),a=n(3731);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",2),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return i.ɵɵresetView(t.goToCancelRequest())})),i.ɵɵpipe(1,"safeHtml"),i.ɵɵelementEnd()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵstyleProp("color",e.textColor),i.ɵɵproperty("innerHTML",i.ɵɵpipeBind1(1,3,e.customText),i.ɵɵsanitizeHtml)}}function c(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",3),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",e.labels.loadings.cancelingRequest,"\n")}}let d=(()=>{class e{constructor(e,t){this.solicitudesService=e,this.notis=t,this.customText="",this.textColor="",this.flowType="SMS",this.updateStatusCode=new i.EventEmitter,this.requestType="sms",this.loading=!1}goToCancelRequest(){this.loading=!0;const e={request_id:this.request_id,user_id:this.user_id};this.requestType="ClavePin"===this.flowType?"clave-pin":"sms",this.solicitudesService.cancelRequest(e,this.requestType).then((e=>{e&&e.data&&this.updateStatusCode.emit("consent_process_canceled"),e.message&&this.showAlert(e.status?this.capitalizeFirstLetter(e.status)+"!":"Aviso!",e.message),setTimeout((()=>{this.loading=!1}),1e3)})).catch((e=>{this.loading=!1,this.showAlert("Error!",e.message||e)}))}capitalizeFirstLetter(e){return"string"!=typeof e||0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}showAlert(e,t){this.notis.showAlert(e,t)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.M),i.ɵɵdirectiveInject(s.T))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-cancel-request"]],inputs:{data:"data",customText:"customText",textColor:"textColor",flowType:"flowType",request_id:"request_id",user_id:"user_id",labels:"labels"},outputs:{updateStatusCode:"updateStatusCode"},decls:2,vars:2,consts:[["class","subheading-1 px-6 text-right underline cursor-pointer custom-html",3,"color","innerHTML","click",4,"ngIf"],["class","subheading-1 px-6 text-right text-orange-500 custom-html",4,"ngIf"],[1,"subheading-1","px-6","text-right","underline","cursor-pointer","custom-html",3,"innerHTML","click"],[1,"subheading-1","px-6","text-right","text-orange-500","custom-html"]],template:function(e,t){1&e&&(i.ɵɵtemplate(0,l,2,5,"div",0),i.ɵɵtemplate(1,c,2,1,"div",1)),2&e&&(i.ɵɵproperty("ngIf",!t.loading),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.loading))},dependencies:[o.O5,a.z]}),e})()},9112:(e,t,n)=>{n.d(t,{y:()=>T});var i=n(5861),r=n(4650),s=n(4006),o=n(8259),a=n(2340),l=n(5089),c=n(6895),d=n(9101),u=n(2440),h=n(3046),p=n(3731);function m(e,t){if(1&e&&r.ɵɵelement(0,"belender-widget-logo",12),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("firstOption",e.logoCustom)("logoUrl",null==e.data.styles?null:e.data.styles.logoUrl)}}function f(e,t){if(1&e&&r.ɵɵelement(0,"div",13),2&e){const e=r.ɵɵnextContext();r.ɵɵstyleProp("color",null==e.data.styles?null:e.data.styles.colors.title)("font-size",e.texts.form.titleSize+"px"),r.ɵɵproperty("innerHTML",e.texts[e.otpType].title,r.ɵɵsanitizeHtml)}}function g(e,t){if(1&e&&(r.ɵɵelement(0,"div",14),r.ɵɵpipe(1,"safeHtml")),2&e){const e=r.ɵɵnextContext();r.ɵɵstyleProp("color",null==e.data.styles?null:e.data.styles.colors.text),r.ɵɵproperty("innerHTML",r.ɵɵpipeBind1(1,3,null==e.texts[e.otpType]?null:e.texts[e.otpType].description),r.ɵɵsanitizeHtml)}}function _(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.requestingOtp:"Estamos solicitando el código. Por favor, espere un momento."," ")}}function v(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate2(" ",e.labels?e.labels.otp.otpSentToNumber:"El código ha sido enviado al teléfono acabado en"," ",e.lastThreeNumbersPhone,". ")}}function y(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.requestingCode:"Estamos solicitando el código. Por favor, espere un momento."," ")}}const b=function(e,t,n){return{color:e,border:t,background:n}};function x(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵelementStart(1,"small",15),r.ɵɵtemplate(2,_,2,1,"ng-container",6),r.ɵɵtemplate(3,v,2,2,"ng-container",6),r.ɵɵtemplate(4,y,2,1,"ng-container",6),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction3(4,b,null==e.data.styles?null:e.data.styles.colors.accentColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.accentColor),null==e.data.styles?null:e.data.styles.colors.accentBgColor)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.lastThreeNumbersPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&(null==e.data.config?null:e.data.config.noRetryInBadPhone))}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}function C(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate2("",e.labels?e.labels.otp.noReceivedCode2:"¿No has recibido el código en el teléfono acabado en"," ",e.lastThreeNumbersPhone,"? ")}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.otp.noReceivedCode:"¿No has recibido el código en tu teléfono?"," ")}}const M=function(e,t){return{color:e,background:t}};function I(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext(2);return r.ɵɵresetView(t.resendOTP())})),r.ɵɵtext(1),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngStyle",r.ɵɵpureFunction2(2,M,null==e.data.styles?null:e.data.styles.colors.dangerTextButtonColor,null==e.data.styles?null:e.data.styles.colors.dangerColor)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.labels?e.labels.actions.resend:"Reenviar"," ")}}function k(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵelementStart(1,"small",16),r.ɵɵtemplate(2,w,2,1,"span",6),r.ɵɵtemplate(3,C,2,2,"span",6),r.ɵɵtemplate(4,S,2,1,"span",6),r.ɵɵtemplate(5,I,2,5,"a",17),r.ɵɵelementEnd(),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction3(5,b,null==e.data.styles?null:e.data.styles.colors.dangerColor,"1px solid "+(null==e.data.styles?null:e.data.styles.colors.dangerColor),null==e.data.styles?null:e.data.styles.colors.dangerBgColor)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.lastThreeNumbersPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",e.lastThreeNumbersPhone&&!(null!=e.data.config&&e.data.config.noRetryInBadPhone)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",null==e.data.config?null:e.data.config.noRetryInBadPhone),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!e.secondTry)}}const E=function(e,t){return{length:e,allowNumbersOnly:t}};let T=(()=>{class e{constructor(e,t){this.fb=e,this.utils=t,this.minLength=3,this.logoCustom="",this.next=new r.EventEmitter(null),this.errPhone=new r.EventEmitter(null),this.resendO=new r.EventEmitter(null),this.secsCount=60,this.secondTry=!1,this.timerIsRunning=!1,this.env=a.N.env}ngOnInit(){this.form=this.fb.group({code1:[null,[s.Validators.required,s.Validators.maxLength(6),s.Validators.minLength(this.minLength)]]}),"SMS"==this.flowType&&this.solicitud&&this.solicitud.person_phone&&this.setPhone(this.solicitud.person_phone)}resetOtpNumber(){this.form.get("code1").setValue("")}ngOnChanges(e){e.otpType&&!e.otpType.previousValue&&(this.secsCount="otpAEAT"==e.otpType?.currentValue||"otpIRS"==e.otpType?.currentValue?300:60,this.initSecsInterval())}setPhone(e){let t="XXX";e&&(t=(""+e).slice(-3)),this.lastThreeNumbersPhone=t}initSecsInterval(){this.timerIsRunning||(this.interv=setInterval((()=>{this.timerIsRunning=!0,this.secsCount=this.secsCount-1,this.secsRemaining=this.getRemaining(),this.secsCount<=0&&this.finishSecsInterval()}),1e3))}getRemaining(){let e=Math.floor(this.secsCount/60),t=this.secsCount%60;return this.addZero(e)+":"+this.addZero(t)}addZero(e){return e>=10?e:"0"+e}finishSecsInterval(){this.timerIsRunning=!1,this.interv&&clearInterval(this.interv)}getCode(){return this.form.get("code1").value}capturePasteEvent(e){var t=this;return(0,i.Z)((function*(){console.log(e),t.form.get("code1").setValue(e)}))()}setInputEvent(e){""!=e.target.value?o(e.target).next().focus():"Backspace"==e.code&&o(e.target).prev().focus()}nextStep(){let e={code:this.getCode()};this.next.emit(e)}resendOTP(){this.secondTry=!0,this.initSecsInterval(),this.resendO.emit(!0)}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(s.UntypedFormBuilder),r.ɵɵdirectiveInject(l.F))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["belender-shared-otp-step"]],inputs:{data:"data",texts:"texts",lastThreeNumbersPhone:"lastThreeNumbersPhone",solicitud:"solicitud",otpType:"otpType",minLength:"minLength",flowType:"flowType",logoCustom:"logoCustom",labels:"labels"},outputs:{next:"nextStep",errPhone:"errorPhone",resendO:"resendOTP"},features:[r.ɵɵNgOnChangesFeature],decls:15,vars:21,consts:[[3,"firstOption","logoUrl",4,"ngIf"],[1,"animated","fadeIn","fixed-content","px-2",3,"formGroup"],[1,"py-1","flex","flex-col"],["id","otpTitle","class","title m-0",3,"color","font-size","innerHTML",4,"ngIf"],["id","otpDescription","class","subheading-1 pt-4",3,"color","innerHTML",4,"ngIf"],[1,"title","py-2"],[4,"ngIf"],[1,"flex","w-full","flex-col","gap-2","py-2"],[1,"subheading-1","py-1","custom-html"],[3,"config","onInputChange"],[1,"flex","items-center","justify-end","gap-2","p-4"],["id","next-button","mat-flat-button","","type","button",1,"px-8","w-full","max-w-none","md:max-w-[220px]",3,"disabled","click"],[3,"firstOption","logoUrl"],["id","otpTitle",1,"title","m-0",3,"innerHTML"],["id","otpDescription",1,"subheading-1","pt-4",3,"innerHTML"],["id","secsCountContainer",1,"info-time","w-fit",3,"ngStyle"],[1,"info-time","w-fit",3,"ngStyle"],["id","resendOTPButton","class","ml-4",3,"ngStyle","click",4,"ngIf"],["id","resendOTPButton",1,"ml-4",3,"ngStyle","click"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,m,1,2,"belender-widget-logo",0),r.ɵɵelementStart(1,"form",1)(2,"div",2),r.ɵɵtemplate(3,f,1,5,"div",3),r.ɵɵtemplate(4,g,2,5,"div",4),r.ɵɵelementStart(5,"div",5),r.ɵɵtemplate(6,x,5,8,"ng-container",6),r.ɵɵtemplate(7,k,6,9,"ng-container",6),r.ɵɵelementEnd(),r.ɵɵelementStart(8,"div",7)(9,"p",8),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵelementStart(11,"ng-otp-input",9),r.ɵɵlistener("onInputChange",(function(e){return t.capturePasteEvent(e)})),r.ɵɵelementEnd()()(),r.ɵɵelementStart(12,"div",10)(13,"button",11),r.ɵɵlistener("click",(function(){return t.nextStep()})),r.ɵɵtext(14),r.ɵɵelementEnd()()()),2&e&&(r.ɵɵproperty("ngIf",null==t.data.styles?null:t.data.styles.withLogo),r.ɵɵadvance(1),r.ɵɵproperty("formGroup",t.form),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].title)),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",t.texts&&(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)&&""!=(null==t.texts[t.otpType]?null:t.texts[t.otpType].description)),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.secsCount&&t.secsCount>0),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",!t.secsCount||t.secsCount<=0),r.ɵɵadvance(2),r.ɵɵstyleProp("color",t.data.styles.colors.text),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",t.labels?t.labels.otp.otpCode:"Código OTP (recibido por SMS)"," "),r.ɵɵadvance(1),r.ɵɵproperty("config",r.ɵɵpureFunction2(18,E,t.minLength,"qa"!=t.env&&"dev"!=t.env)),r.ɵɵadvance(2),r.ɵɵstyleProp("color",null==t.data.styles?null:t.data.styles.colors.btnText)("background",t.form.invalid?"":null==t.data.styles?null:t.data.styles.colors.btnBg)("border-radius",(null==t.data.styles?null:t.data.styles.btnRound)+"px"),r.ɵɵproperty("disabled",t.form.invalid),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",t.labels?t.labels.actions.next:"Siguiente"," "))},dependencies:[c.O5,c.PC,d.lW,s.ɵNgNoValidate,s.NgControlStatusGroup,s.FormGroupDirective,u.df,h.X,p.z],styles:[".members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{border:2px solid var(--background-foreground);box-sizing:border-box;height:36px;margin-right:-8px;margin-top:var(--padding-4);width:36px}.members[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]:last-child{margin-right:0}.type-badge[_ngcontent-%COMP%]{border-radius:5px;min-width:64px}.labels[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:var(--border-radius);font:var(--font-caption);height:32px;line-height:32px;margin-top:var(--padding-4);min-width:100px;padding-left:var(--padding-8);padding-right:var(--padding-8);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center}.content[_ngcontent-%COMP%]{max-height:40vh}.status-section-wrapper[_ngcontent-%COMP%]{box-shadow:none;transition:all .3s ease;overflow:hidden;height:0;display:flex;align-items:center;padding:0}.status-section-wrapper.showing-status[_ngcontent-%COMP%]{padding:1.7rem .5rem 1.7rem 1.5rem;margin-top:0;height:40px;box-shadow:0 4px 6px #0000001a}@media (min-width: 600px){.content[_ngcontent-%COMP%]{max-height:50vh}}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}.scrum-content[_ngcontent-%COMP%]{height:auto;max-height:1000px;transition:all .3s ease;overflow:hidden!important}.scrum-content.hide-content[_ngcontent-%COMP%]{max-height:0px;transition:all .3s ease}.label-status[_ngcontent-%COMP%]{border-radius:7px}.title[_ngcontent-%COMP%]{font-size:16px}.subheading-1[_ngcontent-%COMP%]{font-size:12px}.code-wrapper[_ngcontent-%COMP%]{padding:5px;height:50px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:40px;min-width:136px;border-radius:6px;border:1px solid rgba(0,0,0,.1);text-transform:uppercase;text-align:left;font-weight:700;transition:all .3s ease;outline:1px solid transparent;letter-spacing:12px;padding:0 18px}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:hover{background:#fcfcfc;border:1px solid rgba(0,0,0,.2);transition:all .3s ease}.code-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:1px solid #4e98d0;border:1px solid #4e98d0}.info-time[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;min-height:40px;font-size:14px;line-height:14px;border-radius:5px;border-width:1px;border-style:solid;margin:10px 0;width:-moz-fit-content;width:fit-content}.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:14px;line-height:24px;padding:0 10px;border-radius:5px;cursor:pointer;transition:all .2s ease}@media (max-width: 576px){.info-time[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:0 20px}}"]}),e})()},5696:(e,t,n)=>{n.d(t,{T:()=>c});var i=n(4650),r=n(7403),s=n(5412),o=n(7308),a=n(6895);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"span"),i.ɵɵtext(1),i.ɵɵelementStart(2,"a",0),i.ɵɵlistener("click",(function(t){i.ɵɵrestoreView(e);const n=i.ɵɵnextContext();return i.ɵɵresetView(n.gotoLegalDocument(t))})),i.ɵɵelementStart(3,"u"),i.ɵɵtext(4),i.ɵɵelementEnd()()()}if(2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",e.parts.p3," "),i.ɵɵadvance(3),i.ɵɵtextInterpolate(e.parts.a2)}}let c=(()=>{class e{constructor(e,t){this.dialog=e,this.translationService=t,this.goTerms=new i.EventEmitter(null),this.customTerms=!1,this.lang="",this.parts={p1:"He leído y acepto los",p2:"del servicio",p3:"y la",a1:"términos y condiciones",a2:"política de privacidad"},this.translatedParts={ca:{p1:"He llegit i accepto els",p2:"del servei",p3:"i la",a1:"termes i condicions",a2:"política de privacitat"},en:{p1:"I have read and accept the",p2:"of the service",p3:"and the",a1:"terms and conditions",a2:"privacy policy"},fr:{p1:"J'ai lu et j'accepte les",p2:"du service",p3:"et la",a1:"conditions générales",a2:"politique de confidentialité"},it:{p1:"Ho letto e accetto i",p2:"del servizio",p3:"e la",a1:"termini e condizioni",a2:"informativa sulla privacy"},pt:{p1:"Li e aceito os",p2:"do serviço",p3:"e a",a1:"termos e condições",a2:"política de privacidade"},de:{p1:"Ich habe die",p2:"des Dienstes gelesen und akzeptiere sie",p3:"sowie die",a1:"Nutzungsbedingungen",a2:"Datenschutzrichtlinie"}}}ngOnInit(){this.parts={p1:this.getPart(this.firstSentence,"p1"),p2:this.getPart(this.secondSentence,"p2"),p3:this.getPart(this.thirdSentence,"p3"),a1:this.getPart(this.termsActionText,"a1"),a2:this.getPart(this.policyActionText,"a2")}}getPart(e,t){return e||(this.data&&this.lang&&this.translatedParts[this.lang]?this.translatedParts[this.lang][t]||this.parts[t]||"":this.parts[t]||"")}gotoTermsAndConditions(e){e.preventDefault(),e.stopPropagation(),this.goTerms.emit(e)}gotoLegalDocument(e){e.preventDefault(),e.stopPropagation(),this.dialog.open(r.N,{panelClass:"fullscreen-dialog",data:{lang:this.lang,allData:this.data,flow:this.flowName}})}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(s.uw),i.ɵɵdirectiveInject(o.D))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-terms-and-policy-links"]],inputs:{userId:"userId",showPolicyLink:"showPolicyLink",firstSentence:"firstSentence",secondSentence:"secondSentence",thirdSentence:"thirdSentence",policyActionText:"policyActionText",termsActionText:"termsActionText",customTerms:"customTerms",lang:"lang",data:"data",flowName:"flowName"},outputs:{goTerms:"goToTerms"},decls:6,vars:4,consts:[["target","_blank",1,"text-sm","hover:text-blue-500",3,"click"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵtext(0),i.ɵɵelementStart(1,"a",0),i.ɵɵlistener("click",(function(e){return t.gotoTermsAndConditions(e)})),i.ɵɵelementStart(2,"u"),i.ɵɵtext(3),i.ɵɵelementEnd()(),i.ɵɵtext(4),i.ɵɵtemplate(5,l,5,2,"span",1)),2&e&&(i.ɵɵtextInterpolate1(" ",t.parts.p1," "),i.ɵɵadvance(3),i.ɵɵtextInterpolate(t.parts.a1),i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",t.parts.p2," "),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",t.showPolicyLink))},dependencies:[a.O5]}),e})()},3046:(e,t,n)=>{n.d(t,{X:()=>a});var i=n(4650),r=n(6895);function s(e,t){1&e&&i.ɵɵelement(0,"div",4)}const o=function(e){return{display:e}};let a=(()=>{class e{constructor(){this.logoUrl="",this.firstOption=this.logoUrl,this.logoUrlIsLoaded=!1}ngOnInit(){}}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["belender-widget-logo"]],inputs:{logoUrl:"logoUrl",firstOption:"firstOption"},decls:4,vars:5,consts:[[1,"img-wrapper","p-6","flex","justify-center","items-center"],["class","animated-bg h-full w-full",4,"ngIf"],[1,"img-card",3,"src","ngStyle","load"],["img",""],[1,"animated-bg","h-full","w-full"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtemplate(1,s,1,0,"div",1),i.ɵɵelementStart(2,"img",2,3),i.ɵɵlistener("load",(function(){return t.logoUrlIsLoaded=!0})),i.ɵɵelementEnd()()),2&e&&(i.ɵɵadvance(1),i.ɵɵproperty("ngIf",!t.logoUrlIsLoaded),i.ɵɵadvance(1),i.ɵɵproperty("src",t.firstOption||t.logoUrl,i.ɵɵsanitizeUrl)("ngStyle",i.ɵɵpureFunction1(3,o,t.logoUrlIsLoaded?"block":"none")))},dependencies:[r.O5,r.PC],styles:[".img-wrapper[_ngcontent-%COMP%]{height:240px}.img-wrapper[_ngcontent-%COMP%] .img-card[_ngcontent-%COMP%], .img-wrapper[_ngcontent-%COMP%] .animated-bg[_ngcontent-%COMP%]{max-width:240px;max-height:240px}"]}),e})()},5762:(e,t,n)=>{n.d(t,{l:()=>i});class i{constructor(){}}},3731:(e,t,n)=>{n.d(t,{z:()=>s});var i=n(4650),r=n(1481);let s=(()=>{class e{constructor(e){this.sanitized=e}transform(e){return this.sanitized.bypassSecurityTrustHtml(e)}}return e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(r.DomSanitizer,16))},e.ɵpipe=i.ɵɵdefinePipe({name:"safeHtml",type:e,pure:!0}),e})()},9391:(e,t,n)=>{n.d(t,{o:()=>l});var i=n(7396),r=n(9331),s=n(2340),o=n(4650),a=n(6554);let l=(()=>{class e{constructor(e){this.localFetch=e}getAttachmentsOld(e){return new Promise(((t,n)=>{const s=(0,i.IO)((0,i.hJ)(r.db,"solicitudes"),(0,i.ar)("id","==",e),(0,i.b9)(1));(0,i.cf)(s,(e=>{let n;e.forEach((e=>{n=e.data().attachments})),t(n)}),(e=>{n(e)}))}))}getAttachments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${s.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}uploadFile(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(`${s.N.baseUrl}/documents/upload-files`,e).then((e=>{e?t(e):n("No se pudieron subir los documentos..")})).catch((e=>{n(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.r))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},7489:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}noMatchPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/cancel",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/no-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/clave-pin/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendOTP(e){let t="/requests/clave-pin/otp";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/otp"),new Promise(((n,r)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendSecondTask(e){let t="/requests/clave-pin/secondTask";return i.N.scraperMock&&(t="/mockscrapper/requests/clave-pin/secondTask"),new Promise(((n,r)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+t,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5206:(e,t,n)=>{n.d(t,{s:()=>l});var i=n(6197),r=n(2340),s=n(4650),o=n(5089),a=n(6554);let l=(()=>{class e{constructor(e,t){this.utils=e,this.localFetch=t,this.db=(0,i.N8)()}getFlows(){return new Promise(((e,t)=>{this.localFetch.getFetch(r.N.baseUrl+"/flows").then((n=>{n?e(n):t(!1)}),(e=>{t(!1)}))}))}getFlowsByUserID(e){return new Promise(((t,n)=>{const r=(0,i.iH)((0,i.N8)());(0,i.U2)((0,i.iU)(r,`documents/flows/${e}`)).then((e=>{e.exists()?t(e.val()):n("No data!")})).catch((e=>{console.error(e),n("Error!: "+e)}))}))}}return e.ɵfac=function(t){return new(t||e)(s.ɵɵinject(o.F),s.ɵɵinject(a.r))},e.ɵprov=s.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},9617:(e,t,n)=>{n.d(t,{U:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getPackagesByUserID(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/users/"+e+"/pack-documents").then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getPacksByPackId(e){return new Promise(((t,n)=>{this.localFetch.getFetchWhitoutToken(i.N.baseUrl+"/pack-documents/"+e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}getFlowPackagesByUserID(e,t){}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5601:(e,t,n)=>{n.d(t,{M:()=>l});var i=n(2340),r=n(4650),s=n(5089),o=n(529),a=n(6554);let l=(()=>{class e{constructor(e,t,n){this.utils=e,this.http=t,this.localFetch=n}getSolicitudes(){return this.localFetch.getFetch(i.N.baseUrl+"/requests")}getSolicitudByCode(e){return this.localFetch.freeGetFetch(i.N.baseUrl+"/requests/"+e)}setPhone(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${t}/person`,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}noPhone(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-phone",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}smsToPin(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms-clave",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}addSolicitud(e,t,n){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms",e).then((e=>{e?t(e):n(e)})).catch((e=>{console.error("addSolicitud",e),n(e)}))}))}setNoService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/no-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}acceptTerms(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/terms",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}getNewIdOfRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/"+e+"/get-new-id",{}).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}checkService(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/check-service",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}retryRequest(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/retry",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}resendOTP(e){return new Promise(((t,n)=>{this.localFetch.postFetchWhitoutToken(i.N.baseUrl+"/requests/sms/resend-otp",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}fixData(e,t){return new Promise(((n,r)=>{this.localFetch.putFetchWhitoutToken(`${i.N.baseUrl}/requests/${e}/person`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}sendOTP(e){return new Promise(((t,n)=>{let r="/requests/sms/otp";i.N.scraperMock&&(r="/mockscrapper/requests/sms/otp"),this.localFetch.postFetchWhitoutToken(i.N.baseUrl+r,e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}uploadFileFromWidget(e){return new Promise(((t,n)=>{this.localFetch.postFileFetchWhitoutToken(i.N.baseUrl+"/documents/upload-files-from-widget",e).then((e=>{e?t(e):n(e)})).catch((e=>{n(e)}))}))}sendLinkBySms(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(`${i.N.baseUrl}/requests/${e}/send-link-sms`,t).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}getDocuments(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}getDocumentsIds(e){return new Promise(((t,n)=>{this.localFetch.getFetch(`${i.N.baseUrl}/requests/${e}/documents-ids-widget`).then((e=>{e?t(e):n("No hay archivos asignados a esta solicitud..")})).catch((e=>{n(e)}))}))}cancelRequest(e,t){return new Promise(((n,r)=>{this.localFetch.postFetch(i.N.baseUrl+`/requests/${t}/cancel`,e).then((e=>{e?n(e):r(e)})).catch((e=>{r(e)}))}))}}return e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(s.F),r.ɵɵinject(o.eN),r.ɵɵinject(a.r))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e})()},5145:(e,t,n)=>{n.d(t,{Z:()=>i});const i=[{id:0,text:"error_clave_pin",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Error con la clave PIN"},{id:1,text:"failed_without_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo sin reintento"},{id:111,text:"failed_with_retry",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo con reintento"},{id:2,text:"bad_phone",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Teléfono erróneo"},{id:3,text:"failed_documents_downloaded",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"Fallo al descargar Documentos"},{id:4,text:"invalid_otp_aeat",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de AEAT inválido"},{id:5,text:"invalid_otp_seguridad_social",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"cancel",label:"OTP de Seg. Social inválido"},{id:6,text:"max_entries_otp",textClass:"text-red",bgClass:"bg-red-light",previewClass:"bg-red",icon:"not_interested",label:"Max intentos OTP"},{id:7,text:"abandoned_after_bad_phone",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"phonelink_erase",label:"Abandonado (bad phone)"},{id:8,text:"abandoned_after_terms",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (términos y condiciones)"},{id:9,text:"abandoned_after_invalid_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP SS)"},{id:10,text:"abandoned_after_invalid_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (invalid OTP AEAT)"},{id:11,text:"abandoned_after_waiting_otp_aeat",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP AEAT)"},{id:12,text:"abandoned_after_waiting_otp_seguridad_social",textClass:"text-orange",bgClass:"bg-orange-light",previewClass:"bg-orange",icon:"warning",label:"Abandonado (waiting OTP SS)"},{id:13,text:"waiting_login_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login SS"},{id:14,text:"waiting_login_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando login AEAT"},{id:15,text:"waiting_otp_aeat",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP AEAT"},{id:16,text:"waiting_otp_seguridad_social",textClass:"text-yellow-500",bgClass:"bg-yellow-500/10",previewClass:"bg-yellow-500",icon:"timelapse",label:"Esperando OTP SS"},{id:17,text:"saved_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP guardado"},{id:171,text:"picked_up_otp",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"OTP recogido"},{id:18,text:"terms_and_conditions",textClass:"text-purple",bgClass:"bg-purple-light",previewClass:"bg-purple",icon:"timelapse",label:"Términos y condiciones"},{id:19,text:"waiting_documents",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"hourglass_empty",label:"Esperando documentos"},{id:20,text:"created",textClass:"text-cyan",bgClass:"bg-cyan-light",previewClass:"bg-cyan",icon:"fiber_new",label:"Solicitud creada"},{id:21,text:"all_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Todo los documentos descargados"},{id:22,text:"partial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:23,text:"parcial_documents_downloaded",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"check_circle",label:"Algunos Documentos descargados"},{id:24,text:"all_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Todos descargados y eliminados"},{id:25,text:"partial_documents_downloaded_and_deleted",textClass:"text-green",bgClass:"bg-green-light",previewClass:"bg-green",icon:"delete",label:"Algunos descargados y eliminados"},{id:26,text:"updated_data",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"check",label:"Datos del cliente actualizados"},{id:27,text:"resend_otp",textClass:"text-blue-500",bgClass:"bg-blue-500/10",previewClass:"bg-blue-500",icon:"refresh",label:"OTP reenviado"}]},8259:function(e,t){var n,i,r;
60
60
  /*!
61
61
  * jQuery JavaScript Library v3.7.1
62
62
  * https://jquery.com/