PageSourceSearch

https://www.cdcaldeiro.es/4732.875a2d947bea6a45.js

js cdcaldeiro.es collected 2026-10-08 10:02:23 UTC 16,910 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4732],{90520:(T,g,r)=>{r.d(g,{n:()=>te});var c=r(10467),t=r(73664),l=r(89417),h=r(33384),E=r(60152),m=r(45312),y=r(25615),v=r(60177),_=r(2615),D=r(34587),P=r(89128),I=r(65248),M=r(1460),f=r(8724),b=r(69915),p=r(84412),A=r(54843),C=r(44437),O=r(6961),U=r(66770),B=r(24794),R=r(17705),S=r(94474),w=r(72200),L=r(23620),x=r(82966),V=r(19735),K=r(80954),W=r(89902),G=r(89792),N=r(71660);const k=(o,d,e)=>({required:o,placeholder:"module.user.account_owner",inputType:"text",error:d,errorText:e}),j=(o,d,e)=>({required:o,placeholder:"global.placeholder.identification_document",inputType:"text",error:d,errorText:e}),$=(o,d,e)=>({required:o,placeholder:"IBAN",inputType:"text",error:d,errorText:e});function Y(o,d){1&o&&(t.j41(0,"div",3),t.nrm(1,"app-skeleton-block"),t.k0s())}function X(o,d){if(1&o&&t.nrm(0,"app-clupik-state-bar",9),2&o){const e=t.XpG(2);t.Y8G("state",e.errorState)("mainTitle",e.errorLabel)("subtitle",e.errorSub)}}function F(o,d){if(1&o){const e=t.RV6();t.j41(0,"form",10)(1,"app-form-row",11),t.nrm(2,"app-input",12),t.k0s(),t.j41(3,"app-form-row",11),t.nrm(4,"app-input",13),t.k0s(),t.j41(5,"app-form-row",11),t.nrm(6,"app-input",14),t.k0s(),t.j41(7,"app-clupik-state-bar",15),t.bIt("buttonAction",function(){_.eBV(e);const i=t.XpG(2);return _.Njj(i.example())}),t.k0s(),t.j41(8,"app-clupik-upload-document",16),t.bIt("downloacAction",function(i){_.eBV(e);const n=t.XpG(2);return _.Njj(n.sepaDown(i))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.Y8G("formGroup",e.paymentEdit),t.R7$(),t.Y8G("items",1),t.R7$(),t.Y8G("inputSize","default")("input",t.sMw(13,k,e.paymentEdit.get("owner").hasValidator(e.isRequired),e.ownerError.error,e.ownerError.text)),t.R7$(),t.Y8G("items",1),t.R7$(),t.Y8G("inputSize","default")("input",t.sMw(17,j,e.paymentEdit.get("ownerIdentificationDocument").hasValidator(e.isRequired),e.docError.error,e.docError.text)),t.R7$(),t.Y8G("items",1),t.R7$(),t.Y8G("inputSize","default")("input",t.sMw(21,$,e.paymentEdit.get("IBAN").hasValidator(e.isRequired),e.ibanError.error,e.ibanError.text)),t.R7$(2),t.Y8G("documents",e.documents)("admitMultiple",!0)("hasActions",e.hasActions)}}function z(o,d){1&o&&t.nrm(0,"div",19)}function H(o,d){if(1&o&&(t.j41(0,"div")(1,"mat-error",20)(2,"span"),t.EFF(3),t.k0s()()()),2&o){const e=t.XpG(3);t.R7$(3),t.JRh(e.cardError.message)}}function Q(o,d){if(1&o&&(t.j41(0,"form",17),t.DNE(1,z,1,0,"div",18)(2,H,4,1,"div",2),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",!e.hasStripeAccountError),t.R7$(),t.Y8G("ngIf",e.cardError)}}function J(o,d){if(1&o){const e=t.RV6();t.j41(0,"form",21),t.nrm(1,"input",22)(2,"input",23)(3,"input",24),t.j41(4,"app-clupik-state-bar",25),t.bIt("buttonAction",function(){_.eBV(e);const i=t.XpG(2);return _.Njj(i.forceSubmit())}),t.k0s()()}if(2&o){const e=t.XpG(2);t.Y8G("action",e.redsysUrl,t.B4B),t.R7$(2),t.Y8G("value",e.redsysForm.Ds_MerchantParameters),t.R7$(),t.Y8G("value",e.redsysForm.Ds_Signature),t.R7$(),t.Y8G("state","info")("mainTitle","module.store.link_credit_redsys_form")("subtitle","module.accounting.link_credit_redsys_submit_form_new")("buttonText","module.accounting.link_credit_redsys_submit_form_show_form")}}function Z(o,d){if(1&o){const e=t.RV6();t.j41(0,"app-registration-payment-mercadopago",28),t.bIt("onChange",function(i){_.eBV(e);const n=t.XpG(3);return _.Njj(n.onMercadoPagoChange(i))}),t.k0s()}if(2&o){const e=t.XpG(3);t.Y8G("mercadoPagoConfig",e.mercadopagoConfig)}}function q(o,d){if(1&o&&(t.j41(0,"div",26),t.DNE(1,Z,1,1,"app-registration-payment-mercadopago",27),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Y8G("ngIf",!e.loading)}}function ee(o,d){if(1&o&&(t.qex(0),t.DNE(1,X,1,3,"app-clupik-state-bar",4)(2,F,9,25,"form",5)(3,Q,3,2,"form",6)(4,J,5,7,"form",7)(5,q,2,1,"div",8),t.bVm()),2&o){const e=t.XpG();t.R7$(),t.Y8G("ngIf",e.isError),t.R7$(),t.Y8G("ngIf",e.isDom),t.R7$(),t.Y8G("ngIf",e.isStr),t.R7$(),t.Y8G("ngIf",e.isRds),t.R7$(),t.Y8G("ngIf",e.isMcp)}}let te=(()=>{class o{fb;appService;apiUsersService;apiClubsService;clubsService;cd;stripeService;apiPaymentService;platformId;globalVars;_translationService;_modalService;_apiPay;document;data;isDOMModificable=!1;paymentEdit;clubId;ownerId;notValid;stripeVerifyError="";isSubmitted=!1;card;cardHandler=this.onChange.bind(this);cardError=null;submit=!1;loading=!0;hasStripeAccountError=!1;stripeError="";redsysForm;redsysUrl=m.c.redsys.url;stripeIntent;mercadopagoConfig;isRequired=l.k0.required;mercadoForm;maxLength;documents=new p.t([]);newSepas=[];get sepas(){return this.documents.value}set sepas(e){this.documents.next(e)}get isError(){return this.notValid||""!=this.stripeVerifyError||this.hasStripeAccountError}get errorState(){return this.notValid||""!=this.stripeVerifyError?"danger":this.hasStripeAccountError?"warning":void 0}get errorLabel(){return this.notValid?"module.user.incorrect_data":""!=this.stripeVerifyError?this.stripeVerifyError:this.hasStripeAccountError?"module.accounting.stripe_use_error":void 0}get errorSub(){return this.hasStripeAccountError?this.stripeError:""}get isDom(){return"iban"==this.data.type||"DOM"==this.data.type}get isStr(){return"stripe"==this.data.type||"STR"==this.data.type}get isRds(){return"redsys"==this.data.type||"RDS"==this.data.type}get isMcp(){return"mercadopago"==this.data.type||"MCP"==this.data.type}docDropDownOptions=[{title:"",condition:e=>e.hasOwnProperty("id"),opts:[{label:"global.common.download",icon:"fa-light fa-arrow-down-to-line",action:e=>this.sepaDown(e),condition:e=>!0,disabled:e=>!1}]},{title:"",condition:e=>!0,opts:[{label:"global.button.remove",icon:"fa-regular fa-trash",action:e=>this.removeSepa(e),condition:e=>!e.deleted,disabled:e=>!1},{label:"global.common.untrash",icon:"fa-regular fa-trash-slash",action:e=>this.untrashSepa(e),condition:e=>e.deleted,disabled:e=>!1}]}];get hasActions(){return this.appService.getIsAdmin()||!this.appService.getIsAdmin()&&0==this.sepas?.length||!this.appService.getIsAdmin()&&this.isDOMModificable}constructor(e,a,i,n,s,u,ae,re,ie,oe,ne,se,le,de){this.fb=e,this.appService=a,this.apiUsersService=i,this.apiClubsService=n,this.clubsService=s,this.cd=u,this.stripeService=ae,this.apiPaymentService=re,this.platformId=ie,this.globalVars=oe,this._translationService=ne,this._modalService=se,this._apiPay=le,this.document=de}getTranslations(){var e=this;return(0,c.A)(function*(){e.maxLength=yield e._translationService.getTranslation("global.validator.max_length",{length:500})})()}ngOnInit(){var e=this;return(0,c.A)(function*(){if(e.notValid=!1,e.clubId=e.clubsService.getClubId(),e.ownerId=e.data.ownerId,e.isDom&&(e.sepas=e.data.sepas||[],e.sepas?.length))for(let a of e.sepas)a.deleted=!1,a.new=!1;if(e.isDom)e.paymentEdit=e.fb.group({owner:[null==e.data.owner?"":e.data.owner,[l.k0.required,l.k0.minLength(3),l.k0.maxLength(30)]],IBAN:[null==e.data.IBAN?"":e.data.IBAN,[l.k0.required,h.P.IBAN]],ownerIdentificationDocument:[null==e.data.ownerIdentificationDocument?"":e.data.ownerIdentificationDocument,[h.P.documentValidator]]}),e.loading=!1;else if(e.isStr)e.stripeIntent=yield(0,A._)(e.apiPaymentService.generateSetupIntent(e.data.ownerId)),e.loading=!1,setTimeout(function(){var a=(0,c.A)(function*(i){e.card=yield e.stripeService.createCardFormWithElements("#stripe-form",{base:"full-width-form"}),e.card.error?(e.hasStripeAccountError=!0,e.stripeError=e.card.code):e.card.cardElement.addEventListener("change",e.cardHandler)});return function(i){return a.apply(this,arguments)}}(),10);else if(e.isRds)e.paymentEdit=e.fb.group({card:["",[l.k0.required]],cvv:["",[l.k0.required]]}),e.redsysForm=yield(0,A._)(e.apiPaymentService.generateRedsysFormById(e.ownerId)),e.loading=!1,e.cd.detectChanges(),setTimeout(()=>{(0,v.UE)(e.platformId)&&document.querySelector("#redsys-form").submit()});else if(e.isMcp){const a=yield(0,A._)(e.apiPaymentService.getPaymentConfigAsMap());e.mercadopagoConfig=a.get("MCP"),e.loading=!1}})()}onChange(e){this.cardError=e.error,this.cd.detectChanges()}ngOnDestroy(){this.card&&(this.card.cardElement.removeEventListener("change",this.cardHandler),this.card.cardElement.destroy())}submitDate(){if(this.isDom)if(this.paymentEdit.markAllAsTouched(),this.paymentEdit.updateValueAndValidity(),this.paymentEdit.value.IBAN=this.paymentEdit.value.IBAN.trim(),this.paymentEdit.value.IBAN=this.paymentEdit.value.IBAN.replace(/[\s\-\.]/g,""),this.paymentEdit.value.IBAN=this.paymentEdit.value.IBAN.toUpperCase(),"VALID"==this.paymentEdit.status){let e={owner:this.paymentEdit.value.owner,iban:this.paymentEdit.value.IBAN,ownerIdentificationDocument:this.paymentEdit.value.ownerIdentificationDocument};this.notValid=!1,this.loading=!0;let a=[this.apiUsersService.setIBAN(this.ownerId,this.clubId,e)];if(this.sepas?.length){let i=this.sepas.filter(s=>s.deleted);if(i.length)for(let s of i)a.push(this._apiPay.deleteSepa(s.id));let n=this.sepas.filter(s=>
1s.new);if(n.length)for(let s of n)a.push(this._apiPay.uploadSepa({file:s.file,filename:s.filename,name:s.title},this.ownerId))}(0,C.y)(a).subscribe({next:i=>{let n=i[0];if(i.length>1){let s=i.slice(1).filter(u=>!u.hasOwnProperty("deleted"));this.sepas=[...this.sepas,...s]}this.globalVars.closeModal({owner:n.owner,IBAN:n.IBAN,ownerIdentificationDocument:n.ownerIdentificationDocument,sepas:this.sepas?.filter(s=>!s.new&&!s.deleted)||[]})},error:i=>{console.error("Error Updating IBAN",i),this.loading=!1}})}else for(let e in this.paymentEdit.controls)this.paymentEdit.controls[e].markAsTouched();else if(this.isStr)this.stripeVerifyError="",this.card?(this.submit=!0,this.stripeService.createPaymentMethodWithElements(this.card.element,this.stripeIntent.setupIntent.clientSecret).then(e=>{this.notValid=!1,this.apiPaymentService.saveUserPaymentMethod({data:{paymentMethod:e.payment_method,customerId:this.stripeIntent.customerId}},this.data.ownerId).subscribe(a=>{this.globalVars.closeModal(a.error?{error:!0,code:a.code}:{paymentMethod:a.paymentMethod})},a=>{this.globalVars.closeModal({error:!0,code:a})})}).catch(e=>{console.error(e),this.submit=!1,this.stripeVerifyError=e.message})):this.card.emit("change",{error:{code:"incomplete_number",message:"Debe rellenar todos los campos",type:"validation_error"}});else if(this.isRds){if(this.paymentEdit.markAllAsTouched(),this.paymentEdit.updateValueAndValidity(),"VALID"==this.paymentEdit.status)if(m.c.REDSYSDEVELOP){let e=`${this.paymentEdit.get("card").value}_${this.paymentEdit.get("cvv").value}`;this.apiPaymentService.saveRedsysCard(this.data.ownerId,e).subscribe(a=>{this.globalVars.closeModal(a.error?{error:!0,code:a.code}:a.paymentMethod)})}else{let e=this.globalVars.encrypData(`${this.paymentEdit.get("card").value}_${this.paymentEdit.get("cvv").value}`,m.c.crypto.redsysKey);this.apiPaymentService.saveRedsysCard(this.data.ownerId,e).subscribe(a=>{this.globalVars.closeModal(a.error?{error:!0,code:a.code}:a.paymentMethod)})}}else this.isMcp&&this.mercadoForm.submit(!1)}forceSubmit(){const e=document.querySelector("#redsys-form");e&&e.submit()}onMercadoPagoChange(e){"submit"===e.type&&this.apiPaymentService.saveUserMercadoPago(this.data.ownerId,e.data).subscribe({next:a=>{this.mercadoForm.unmountForm(),this.globalVars.closeModal(a)},error:a=>{}})}close(){this.isMcp&&this.mercadoForm.unmountForm(),this.globalVars.closeModal()}get ownerError(){return this.paymentEdit?.get("owner").touched&&this.paymentEdit?.get("owner").hasError("required")?{error:!0,text:"global.validator.required"}:this.paymentEdit?.get("owner").touched&&this.paymentEdit.get("owner").hasError("maxlength")?{error:!0,text:this.maxLength}:{error:!1,text:""}}get docError(){return this.paymentEdit?.get("ownerIdentificationDocument").touched&&this.paymentEdit?.get("ownerIdentificationDocument").hasError("required")?{error:!0,text:"global.validator.required"}:this.paymentEdit?.get("ownerIdentificationDocument").touched&&this.paymentEdit.get("ownerIdentificationDocument").hasError("document")?{error:!0,text:"global.validator.identification_document"}:{error:!1,text:""}}get ibanError(){return this.paymentEdit?.get("IBAN").touched&&this.paymentEdit?.get("IBAN").hasError("required")?{error:!0,text:"global.validator.required"}:this.paymentEdit?.get("IBAN").touched&&this.paymentEdit.get("IBAN").hasError("invalidIBAN")?{error:!0,text:"global.validator.iban"}:{error:!1,text:""}}uploadSepa(){var e=this;return(0,c.A)(function*(){let a=yield e._modalService.openModal({component:U.y,modalSize:"sm",data:{data:{fileTypes:["jpg","png","jpeg","xls","xlsx","pdf","csv","doc","docx"],maxSize:5242880,title:"module.shared.files_import.select_image_or_document"}},options:{}});if(a.data){let i=a.data;e.sepas.push({file:i.base64,filename:i.name,name:i.name,title:i.name.split("."+i.extension)[0],new:!0,virtualId:e.globalVars.generateHash(4)})}})()}example(){window.open(m.c.buckets.assets+"downloads/documento-sepa.pdf")}removeSepa(e){e.new?this.sepas=this.sepas.filter(a=>a.hasOwnProperty("id")||a.virtualId!==e.virtualId):e.deleted=!0}untrashSepa(e){e.deleted=!1}sepaDown(e){this._apiPay.geSepa(e.id,this.ownerId).subscribe({next:a=>{let i=a;".pdf"===e.extension&&(i=new Blob([a],{type:"application/pdf"}));const n=this.document.createElement("a");this.document.body.appendChild(n),n.style.display="none";const s=window.URL.createObjectURL(i);n.href=s,n.download=`${e.name}${e.extension}`,n.click(),window.URL.revokeObjectURL(s),n.remove()},error:a=>this.appService.broadcast("showAlert",{state:"danger",mainTitle:"",autoHide:!0})})}static \u0275fac=function(a){return new(a||o)(t.rXU(l.ok),t.rXU(b.d),t.rXU(M.K),t.rXU(P.P),t.rXU(E.X),t.rXU(R.gRc),t.rXU(D.d),t.rXU(I.m),t.rXU(t.Agw),t.rXU(y.Y),t.rXU(O.T),t.rXU(S.M),t.rXU(B.q),t.rXU(_.qQL))};static \u0275cmp=t.VBU({type:o,selectors:[["app-user-edit-payment-dialog"]],viewQuery:function(a,i){if(1&a&&t.GBs(f.h,5),2&a){let n;t.mGM(n=t.lsd())&&(i.mercadoForm=n.first)}},inputs:{data:"data",isDOMModificable:"isDOMModificable"},standalone:!1,decls:3,vars:11,consts:[["secondaryButtonValue","global.common.cancel",3,"mainAction","secondaryAction","modalTitle","hasTopbar","hasButtons","hasMainButton","mainButtonValue","mainButtonDisabled","hasSecondaryButton","secondaryButtonDisabled","closeDisabled"],["class","loading-block",4,"ngIf"],[4,"ngIf"],[1,"loading-block"],[3,"state","mainTitle","subtitle",4,"ngIf"],[3,"formGroup",4,"ngIf"],["class","stripe",4,"ngIf"],["class","full-width-form","id","redsys-form","ngNoForm","","target","_new","method","POST",3,"action",4,"ngIf"],["class","mercadopago",4,"ngIf"],[3,"state","mainTitle","subtitle"],[3,"formGroup"],[3,"items"],["type","normal","formControlName","owner",3,"inputSize","input"],["type","normal","formControlName","ownerIdentificationDocument",3,"inputSize","input"],["type","normal","formControlName","IBAN",3,"inputSize","input"],["state","info","direction","column","mainTitle","module.user.payment_block.sepa_auth","subtitle","module.user.payment_block.sepa_auth_desc","buttonText","module.import_users.download_btn","buttonType","button","buttonConfig","outlined","buttonIcon","fa-solid fa-arrow-down-to-line",3,"buttonAction"],[3,"downloacAction","documents","admitMultiple","hasActions"],[1,"stripe"],["id","stripe-form",4,"ngIf"],["id","stripe-form"],["align","start"],["id","redsys-form","ngNoForm","","target","_new","method","POST",1,"full-width-form",3,"action"],["hidden","true","name","Ds_SignatureVersion","value","HMAC_SHA256_V1"],["hidden","true","name","Ds_MerchantParameters",3,"value"],["hidden","true","name","Ds_Signature",3,"value"],["direction","column","buttonType","link","buttonConfig","outlined",3,"buttonAction","state","mainTitle","subtitle","buttonText"],[1,"mercadopago"],["outSave","true",3,"mercadoPagoConfig","onChange",4,"ngIf"],["outSave","true",3,"onChange","mercadoPagoConfig"]],template:function(a,i){1&a&&(t.j41(0,"app-clupik-modal",0),t.bIt("mainAction",function(){return i.isRds?i.globalVars.closeModal(null):i.submitDate()})("secondaryAction",function(){return null}),t.DNE(1,Y,2,0,"div",1)(2,ee,6,5,"ng-container",2),t.k0s()),2&a&&(t.Y8G("modalTitle",i.isDom?"module.accounting.direct_debit":"global.title.payment_data")("hasTopbar",!0)("hasButtons",!0)("hasMainButton",!0)("mainButtonValue",i.isRds?"global.common.close":"global.common.save")("mainButtonDisabled",i.submit||i.loading||i.hasStripeAccountError)("hasSecondaryButton",!1)("secondaryButtonDisabled",!1)("closeDisabled",!1),t.R7$(),t.Y8G("ngIf",i.loading),t.R7$(),t.Y8G("ngIf",!i.loading))},dependencies:[w.bT,L.b,l.qT,l.BC,l.cb,l.cV,l.j4,l.JD,x.K,V.$,K.Y,W.S,f.h,G.a,N.s],encapsulation:2})}return o}
1)()},91511:(T,g,r)=>{r.d(g,{k:()=>b});var c=r(72200),t=r(49189),l=r(62470),h=r(48749),E=r(19348),m=r(32147),y=r(35375),v=r(7030),_=r(32777),D=r(66124),P=r(21867),I=r(54107),M=r(73664),f=r(2615);let b=(()=>{class p{static \u0275fac=function(O){return new(O||p)};static \u0275mod=M.$C({type:p});static \u0275inj=f.G2t({imports:[c.MD,t.G,l.k,h.P,E.x,m.A,y.J,v.g,_.h,D.M,P.v,I.D]})}return p})()}}]);

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