HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/4041.66d1851388d6bae8.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4041],{56261:(M,D,u)=>{u.d(D,{I:()=>C});var o=u(2978),_=u(22882),T=u(56610),l=u(77897),g=u(37222);function P(E,f){if(1&E&&(o.j41(0,"ion-select-option",7),o.EFF(1),o.k0s()),2&E){const p=f.$implicit;o.Y8G("value",p),o.R7$(1),o.JRh(p)}}function e(E,f){if(1&E&&(o.j41(0,"ion-select-option",7),o.EFF(1),o.k0s()),2&E){const p=f.$implicit,h=o.XpG();o.Y8G("value",h.allMonths.indexOf(p)),o.R7$(1),o.JRh(p)}}function N(E,f){if(1&E&&(o.j41(0,"ion-select-option",7),o.EFF(1),o.k0s()),2&E){const p=f.$implicit;o.Y8G("value",p),o.R7$(1),o.JRh(p)}}let C=(()=>{class E{constructor(p){this.translateService=p,this.defaultDate=[],this.date=new o.bkB,this.days=[],this.allMonths=[],this.months=[],this.years=[],this.currentYear=(new Date).getFullYear(),this.yearRange=100}ngOnInit(){this.setDays(),this.setMonths(),this.setYears()}ngOnChanges(p){if(p.defaultDate&&p.defaultDate.currentValue){let h=this.defaultDate.split(this.defaultDate.includes("-")?"-":"/");this.year=Number(h[0]),this.month=Number(h[1])-1,this.day=Number(h[2])}p.minDate&&p.minDate.currentValue&&(this.yearRange=this.currentYear-this.minDate.getFullYear()),this.setDays(),this.setMonths(),this.setYears()}setDays(p=1){this.days=this.buildNumberArray(p,31)}setMonths(p=0){this.allMonths=Array.from({length:12},(h,d)=>new Date(0,d).toLocaleString(window.navigator.language,{month:"long"})),this.months=this.allMonths.slice(p,12)}setYears(){const p=this.minDate?this.minDate.getFullYear():this.currentYear-this.yearRange,h=this.maxDate?this.maxDate.getFullYear():this.currentYear;this.years=this.buildNumberArray(p,h).reverse()}buildNumberArray(p,h){return[...Array(h-p+1).keys()].map(d=>d+p)}changeDate(){this.day&&null!=this.month&&this.year&&this.date.emit(new Date(this.year+"/"+(this.month+1)+"/"+this.day).toJSON().slice(0,10).replace(/-/g,"/"))}changeYear(){this.minDate&&this.minDate.getFullYear()==this.year&&this.setMonths(this.minDate.getMonth()),this.changeDate()}changeMonth(){this.minDate&&this.minDate.getMonth()==this.month&&this.setDays(this.minDate.getDate()),this.changeDate()}static#e=this.\u0275fac=function(h){return new(h||E)(o.rXU(_.c$))};static#t=this.\u0275cmp=o.VBU({type:E,selectors:[["app-date-picker"]],inputs:{defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate"},outputs:{date:"date"},features:[o.OA$],decls:23,vars:33,consts:[[1,"ion-no-padding","ion-no-margin"],["lines","none",1,"ion-no-padding","ion-no-margin"],["interface","popover","name","year","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],[3,"value",4,"ngFor","ngForOf"],["interface","popover","name","month","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],["lines","none",1,"ion-no-padding","ion-no-margin","no-inner-padding"],["interface","popover","name","day","required","",1,"ion-text-center","placeholder-select",3,"placeholder","okText","cancelText","ngModel","ngModelChange","ionChange"],[3,"value"]],template:function(h,d){1&h&&(o.j41(0,"ion-grid",0)(1,"ion-row",0)(2,"ion-col",0)(3,"ion-item",1)(4,"ion-select",2),o.bIt("ngModelChange",function(R){return d.year=R})("ionChange",function(){return d.changeYear()}),o.nI1(5,"translate"),o.nI1(6,"translate"),o.nI1(7,"translate"),o.DNE(8,P,2,2,"ion-select-option",3),o.k0s()()(),o.j41(9,"ion-col",0)(10,"ion-item",1)(11,"ion-select",4),o.bIt("ngModelChange",function(R){return d.month=R})("ionChange",function(){return d.changeMonth()}),o.nI1(12,"translate"),o.nI1(13,"translate"),o.nI1(14,"translate"),o.DNE(15,e,2,2,"ion-select-option",3),o.k0s()()(),o.j41(16,"ion-col",0)(17,"ion-item",5)(18,"ion-select",6),o.bIt("ngModelChange",function(R){return d.day=R})("ionChange",function(){return d.changeDate()}),o.nI1(19,"translate"),o.nI1(20,"translate"),o.nI1(21,"translate"),o.DNE(22,N,2,2,"ion-select-option",3),o.k0s()()()()()),2&h&&(o.R7$(4),o.FS9("placeholder",o.bMT(5,15,"YEAR")),o.FS9("okText",o.bMT(6,17,"TEXT_OK_SELECT")),o.FS9("cancelText",o.bMT(7,19,"TEXT_CANCEL_SELECT")),o.Y8G("ngModel",d.year),o.R7$(4),o.Y8G("ngForOf",d.years),o.R7$(3),o.FS9("placeholder",o.bMT(12,21,"MONTH")),o.FS9("okText",o.bMT(13,23,"TEXT_OK_SELECT")),o.FS9("cancelText",o.bMT(14,25,"TEXT_CANCEL_SELECT")),o.Y8G("ngModel",d.month),o.R7$(4),o.Y8G("ngForOf",d.months),o.R7$(3),o.FS9("placeholder",o.bMT(19,27,"DAY")),o.FS9("okText",o.bMT(20,29,"TEXT_OK_SELECT")),o.FS9("cancelText",o.bMT(21,31,"TEXT_CANCEL_SELECT")),o.Y8G("ngModel",d.day),o.R7$(4),o.Y8G("ngForOf",d.days))},dependencies:[T.Sq,l.hU,l.lO,l.uz,l.ln,l.Nm,l.Ip,l.Je,g.BC,g.YS,g.vS,_.D9],styles:[".placeholder-select[_ngcontent-%COMP%]{border:1px solid #dedede;border-radius:5px;width:-webkit-fill-available;font-size:14px!important;text-align:justify!important;--padding-start: 15px;--placeholder-opacity: .5}.no-inner-padding[_ngcontent-%COMP%]{--inner-padding-end: 0px}"]})}return E})()},94041:(M,D,u)=>{u.r(D),u.d(D,{ExperienceEnrollPageModule:()=>W});var o=u(56610),_=u(37222),T=u(22882),l=u(77897),g=u(36075),P=u(73308),e=u(2978),N=u(73793),C=u(54171),E=u(7125),f=u(46898),p=u(1519),h=u(29885),d=u(57291),I=u(69942),R=u(56261);let O=(()=>{class r{constructor(t){this.utilsService=t,this.file=new e.bkB}ngOnInit(){}openDocument(t){this.utilsService.openLink(t)}presentActionSheet(t){t.click();var i=this;t.onchange=function(){var n=t.files[0];if(n){var a=new FileReader;a.readAsDataURL(n),a.onload=function(){i.file.emit(a.result)},a.onerror=function(s){console.log("Error: ",s)}}}}static#e=this.\u0275fac=function(i){return new(i||r)(e.rXU(C.T))};static#t=this.\u0275cmp=e.VBU({type:r,selectors:[["app-upload-temp-file"]],inputs:{documentName:"documentName"},outputs:{file:"file"},decls:6,vars:1,consts:[["type","file","id","fileLoader","name","files","title","Load File","hidden",""],["fileLoader",""],["lines","none",1,"ion-no-padding","ion-no-margin","upload-item",3,"click"],["slot","start","name","add-outline","color","primary"],["color","primary"]],template:function(i,n){if(1&i){const a=e.RV6();e.nrm(0,"input",0,1),e.j41(2,"ion-item",2),e.bIt("click",function(){e.eBV(a);const c=e.sdS(1);return e.Njj(n.presentActionSheet(c))}),e.nrm(3,"ion-icon",3),e.j41(4,"ion-label",4),e.EFF(5),e.k0s()()}2&i&&(e.R7$(5),e.JRh(n.documentName))},dependencies:[l.iq,l.uz,l.he],styles:["ion-item[_ngcontent-%COMP%]{font-size:14px;font-weight:700;line-height:20px;text-align:left}ion-icon[_ngcontent-%COMP%]{margin-inline-end:5px}.upload-item[_ngcontent-%COMP%]{align-items:stretch}"]})}return r})();var v=u(60822);const x=["name"],y=["document_type"],F=["document"],L=["guardianName"],S=["guardianDocument"],A=["guardianEmail"],b=["guardianPhone"];function j(r,m){if(1&r&&(e.j41(0,"ion-item",35),e.nrm(1,"ion-radio",36),e.j41(2,"ion-label"),e.EFF(3),e.k0s()()),2&r){const t=m.$implicit;e.R7$(1),e.Y8G("value",t),e.R7$(2),e.Lme("",t.name," ",0!=t.document?"("+t.document_type+" "+t.document+")":"","")}}function G(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-card-content")(1,"ion-accordion-group",28)(2,"ion-accordion",28)(3,"ion-item",29)(4,"ion-card-title"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",30)(8,"ion-card-content",31)(9,"ion-accordion-group",32)(10,"ion-radio-group",33),e.bIt("ionChange",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.handleChange(n))}),e.DNE(11,j,4,3,"ion-item",34),e.k0s()()()()()()()}if(2&r){const t=e.XpG();e.R7$(5),e.JRh(e.bMT(6,4,"EXPERIENCE.ENROLL.REGISTERED_STUDENTS")),e.R7$(5),e.Y8G("allowEmptySelection",!0)("formControl",t.radioControl),e.R7$(1),e.Y8G("ngForOf",t.students)}}function k(r,m){if(1&r&&(e.j41(0,"ion-select-option",37),e.EFF(1),e.k0s()),2&r){const t=m.$implicit;e.Y8G("value",t.id),e.R7$(1),e.JRh(t.name)}}function X(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-item",38),e.nrm(1,"img",39),e.j41(2,"ion-icon",40),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.deleteFileIdentificationDocument())}),e.k0s()()}if(2&r){const t=e.XpG();e.R7$(1),e.Y8G("src",t.fileIdentificationDocument,e.B4B)}}function U(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-item",38),e.nrm(1,"img",39),e.j41(2,"ion-icon",40),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.deleteFileInsuranceDocument())}),e.k0s()()}if(2&r){const t=e.XpG();e.R7$(1),e.Y8G("src",t.fileInsuranceDocument,e.B4B)}}function $(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-item",25)(1,"app-upload-temp-file",41),e.bIt("file",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.setFileIdentificationDocument(n))}),e.k0s()()}if(2&r){const t=e.XpG();e.R7$(1),e.Y8G("documentName",t.identificationDocument)}}function Y(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-item",25)(1,"app-upload-temp-file",42),e.bIt("file",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.setFileInsuranceDocument(n))}),e.k0s()()}if(2&r){const t=e.XpG();e.R7$(1),e.Y8G("documentName",t.insuranceDocument)}}function B(r,m){if(1&r){const t=e.RV6();e.j41(0,"ion-list"),e.nrm(1,"p",6)(2,"br"),e.j41(3,"p",9),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"ion-label",10),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"ion-item",11)(10,"ion-input",43,44),e.bIt("change",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.clearSpecialChars(n.target))})("input",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("keypress",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("paste",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.onPaste(n))})("ionInput",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.onInputChange(n))}),e.nI1(12,"translate"),e.k0s()(),e.j41(13,"ion-label",10),e.EFF(14),e.nI1(15,"translate"),e.k0s(),e.j41(16,"ion-item",11)(17,"ion-input",45,46),e.bIt("change",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.clearSpecialChars(n.target))})("input",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("keypress",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("paste",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.onPaste(n))}),e.nI1(19,"translate"),e.k0s()(),e.j41(20,"ion-label",10),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"ion-item",11)(24,"ion-input",47,48),e.bIt("change",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.clearSpecialChars(n.target))})("input",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("keypress",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("paste",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.onPaste(n))}),e.nI1(26,"translate"),e.k0s()(),e.j41(27,"ion-label",10),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"ion-item",11)(31,"ion-input",49,50),e.bIt("change",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.clearSpecialChars(n.target))})("input",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("keypress",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.avoidSpecialChars(n))})("paste",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.onPaste(n))}),e.nI1(33,"translate"),e.k0s()()()}if(2&r){const t=e.XpG();e.HbH(t.showForm?"show":"hide"),e.R7$(4),e.JRh(e.bMT(5,11,"EXPERIENCE.ENROLL.GUARDIAN.GUARDIAN_INFORMATION")),e.R7$(3),e.JRh(e.bMT(8,13,"EXPERIENCE.ENROLL.GUARDIAN.NAME")),e.R7$(3),e.FS9("placeholder",e.bMT(12,15,"EXPERIENCE.ENROLL.GUARDIAN.PLACEHOLDER_NAME")),e.R7$(4),e.JRh(e.bMT(15,17,"EXPERIENCE.ENROLL.GUARDIAN.DOCUMENT")),e.R7$(3),e.FS9("placeholder",e.bMT(19,19,"EXPERIENCE.ENROLL.GUARDIAN.PLACEHOLDER_DOCUMENT")),e.R7$(4),e.JRh(e.bMT(22,21,"EXPERIENCE.ENROLL.GUARDIAN.EMAIL")),e.R7$(3),e.FS9("placeholder",e.bMT(26,23,"EXPERIENCE.ENROLL.GUARDIAN.PLACEHOLDER_EMAIL")),e.R7$(4),e.JRh(e.bMT(29,25,"EXPERIENCE.ENROLL.GUARDIAN.PHONE")),e.R7$(3),e.FS9("placeholder",e.bMT(33,27,"EXPERIENCE.ENROLL.GUARDIAN.PLACEHOLDER_PHONE"))}}const V=[{path:"",component:(()=>{class r{constructor(t,i,n,a,s,c,z,Q,K,Z,q,ee){this.translateService=t,this.utilsService=i,this.navCtrl=n,this.cityProvider=a,this.modalCtrl=s,this.experienceService=c,this.alertController=z,this.commsService=Q,this.route=K,this.userProvider=Z,this.storage=q,this.corporateIdentityService=ee,this.closeModal=new e.bkB,this.type="children",this.planType="experience",this.plan={},this.documentTypes=[],this.showForm=!1,this.students=[],this.selectedStudent=!1,this.enableGuardian=!1,this.dob=null,this.identificationDocument="A\xf1adir foto de documento de identidad",this.fileIdentificationDocument=null,this.insuranceDocument="A\xf1adir foto de comprobante del seguro o EPS",this.fileInsuranceDocument=null,this.otherValidData=!1,this.radioControl=new _.MJ,this.currency=this.corporateIdentityService.getCurrency()}ngOnInit(){this.type=this.route.snapshot.paramMap.get("type")??"children",this.planType=this.route.snapshot.paramMap.get("planType")??"experience",this.plan=this.experienceService.plan,this.loadInit(0,!0),this.filteredResults$=this.radioControl.valueChanges.pipe((0,N.F)()),this.radioControl.valueChanges.pipe((0,N.F)((t,i)=>t===i)).subscribe(t=>{this.radioControl.setValue(t)})}loadInit(t=0,i=!1){(!this.utilsService.loadingPage||i)&&(this.utilsService.loadingPage=!0,setTimeout(()=>new Promise((n,a)=>{this.utilsService.presentLoading(this.translateService.instant("all.loading")).then(()=>{Promise.all([this.storage.get("token").then(s=>{this.userProvider.getDocumentType(s.access_token).then(c=>{this.documentTypes=c.documents_types}),this.experienceService.students({type:this.type,planType:this.planType}).then(c=>{this.students=c,this.students.length?this.showForm=!1:(this.showForm=!0,this.selectedStudent={document:0})})})]).then(()=>{this.utilsService.closeAllAlerts(),this.utilsService.loadingPage=!1,n(!1)}).catch(s=>{this.utilsService.closeAllAlerts(),this.utilsService.loadingPage=!1,console.log("Error loadInit ExperienceEnrollPage",s),a(s)})})}),t))}doRefresh(t){setTimeout(()=>{this.loadInit(100,!0),t.target.complete()},500)}handleChange(t){if(t.detail.value){if(this.selectedStudent=t.detail.value,0==t.detail.value.document)return this.documentInput.value="",void(this.showForm=!0);this.showForm=!1,this.documentInput.value=t.detail.value.document}else this.showForm=!1,this.selectedStudent=!1,this.documentInput.value=""}enroll(t){var i=this;return(0,P.A)(function*(){i.validateFormData(t)&&(i.setOtherDataToForm(t),yield(yield i.alertController.create({header:i.translateService.instant("EXPERIENCE.ENROLL.PAY_TITLE"),message:i.translateService.instant("EXPERIENCE.ENROLL.PAY_MESSAGE"),backdropDismiss:!1,buttons:[{text:"Cancelar",handler:()=>{}},{text:"Aceptar",handler:()=>{i.utilsService.presentLoading(i.translateService.instant("all.loading")).then(()=>{i.experienceService.enroll(t.value).then(a=>{if(i.utilsService.dismissLoading(),a.r)return i.experienceService.goToPaymentGateway(a.d.id);i.utilsService.presentToast(4e3,"warning","top",a.m)}).catch(a=>{i.utilsService.dismissLoading(),i.utilsService.presentToast(4e3,"warning","top",a.m??a.message)})})}}]})).present())})()}validateFormData(t){if(this.selectedStudent){if(0!=this.selectedStudent.document)return t.form.value.document=this.selectedStudent.document,t.form.value.planType=this.planType,!0;if(!t.controls.name.valid||!t.value.name)return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.NAME_REQUIRED"),void this.nameInput.setFocus();if(this.dob)if(t.controls.document_type.valid&&t.value.document_type){if(!t.controls.document.valid||!t.value.document)return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.DOCUMENT_REQUIRED"),void this.documentInput.setFocus();if(this.fileIdentificationDocument){if(this.fileInsuranceDocument){if(this.enableGuardian){if(!t.controls.guardianName.valid||!t.value.guardianName)return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.GUARDIAN_NAME_REQUIRED"),void this.guardianName.setFocus();if(!t.controls.guardianDocument.valid||!t.value.guardianDocument)return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.GUARDIAN_DOCUMENT_REQUIRED"),void this.guardianDocument.setFocus();if(!t.controls.guardianEmail.valid||!t.value.guardianEmail||!this.utilsService.validateEmail(t.value.guardianEmail))return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.GUARDIAN_EMAIL_REQUIRED"),void this.guardianEmail.setFocus();if(!t.controls.guardianPhone.valid||!t.value.guardianPhone)return this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.GUARDIAN_PHONE_REQUIRED"),void this.guardianPhone.setFocus()}return!0}this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.INSURANCE_DOCUMENT_REQUIRED")}else this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.IDENTIFICATION_DOCUMENT_REQUIRED")}else this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.DOCUMENT_TYPE_REQUIRED");else this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.DATE_OF_BIRTH_REQUIRED")}else this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.STUDENT_REQUIRED")}showWarning(t){this.utilsService.presentToast(4e3,"warning","top",this.translateService.instant(t))}setDate(t){this.dob=t;let i=this.calculateAge(this.dob);this.enableGuardian=i<18,this.validateOtherData(),this.validateDocumentTypes()}calculateAge(t){const i=new Date,n=new Date(t);let a=i.getFullYear()-n.getFullYear();const s=i.getMonth()-n.getMonth();return(s<0||0===s&&i.getDate()<n.getDate())&&a--,a}setFileIdentificationDocument(t){t&&t.includes("data:image")?(this.fileIdentificationDocument=t,this.validateOtherData()):this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.IDENTIFICATION_DOCUMENT_REQUIRED")}deleteFileIdentificationDocument(){this.fileIdentificationDocument=null,this.validateOtherData()}setFileInsuranceDocument(t){t&&t.includes("data:image")?(this.fileInsuranceDocument=t,this.validateOtherData()):this.showWarning("EXPERIENCE.ENROLL.FORM_VALIDATION.INSURANCE_DOCUMENT_REQUIRED")}deleteFileInsuranceDocument(){this.fileInsuranceDocument=null,this.validateOtherData()}setOtherDataToForm(t){this.plan&&(t.form.value.plan=this.plan),this.dob&&(t.form.value.dob=this.dob),this.fileIdentificationDocument&&(t.form.value.fileIdentificationDocument=this.fileIdentificationDocument),this.fileInsuranceDocument&&(t.form.value.fileInsuranceDocument=this.fileInsuranceDocument)}validateOtherData(){this.otherValidData=!!(this.dob&&this.fileIdentificationDocument&&this.fileInsuranceDocument)}validateDocumentTypes(){const t=[4,5];this.documentTypes=this.userProvider._documentType.filter(this.enableGuardian?i=>t.includes(i.id):i=>!t.includes(i.id))}validateEnrollButton(t,i){return!(t&&i)}clearSpecialChars(t){let i=!1;switch(t.type){case"text":i=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+$/i.test(t.value),i||(t.value=t.value.replace(/[^0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+/g,"").trim());break;case"email":i=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+$/i.test(t.value),i&&(t.value=t.value.replace(/[^0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+/g,"").trim());break;case"number":i=/^[0-9]+$/i.test(t.value),i&&(t.value=t.value.replace(/[^0-9]+/g,"").trim())}}avoidSpecialChars(t){if("input"==t.type&&"confirmEmail"==t.currentTarget.name&&!("data"in t))return t.currentTarget.value="",t.preventDefault(),!1;let i=!1,n=String.fromCharCode(t.charCode?t.charCode:t.which);switch(t.target.type){case"text":if(i=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc ]+$/i.test(n),i)return!0;break;case"email":if(i=/^[0-9a-zA-Z\xf1\xe1\xe9\xed\xf3\xfa\xfc@.!#$%&'*/=?^_+-`{|}~]+$/i.test(n),i)return!0;break;case"number":if(i=/^[0-9]+$/i.test(n),i)return!0}return t.preventDefault(),!1}onPaste(t){return t.preventDefault(),!1}onInputChange(t){t.target.value=t.target.value.toUpperCase()}static#e=this.\u0275fac=function(i){return new(i||r)(e.rXU(T.c$),e.rXU(C.T),e.rXU(l.q9),e.rXU(E.h),e.rXU(l.W3),e.rXU(f.y),e.rXU(l.hG),e.rXU(p.p),e.rXU(g.nX),e.rXU(h.D),e.rXU(d.n),e.rXU(I.r))};static#t=this.\u0275cmp=e.VBU({type:r,selectors:[["app-experience-enroll"]],viewQuery:function(i,n){if(1&i&&(e.GBs(l.Ax,5),e.GBs(x,5),e.GBs(y,5),e.GBs(F,5),e.GBs(L,5),e.GBs(S,5),e.GBs(A,5),e.GBs(b,5)),2&i){let a;e.mGM(a=e.lsd())&&(n.infiniteScroll=a.first),e.mGM(a=e.lsd())&&(n.nameInput=a.first),e.mGM(a=e.lsd())&&(n.documentTypeSelect=a.first),e.mGM(a=e.lsd())&&(n.documentInput=a.first),e.mGM(a=e.lsd())&&(n.guardianName=a.first),e.mGM(a=e.lsd())&&(n.guardianDocument=a.first),e.mGM(a=e.lsd())&&(n.guardianEmail=a.first),e.mGM(a=e.lsd())&&(n.guardianPhone=a.first)}},outputs:{closeModal:"closeModal"},decls:70,vars:65,consts:[[1,"ion-no-border"],["slot","start",3,"defaultHref"],[1,"ion-text-center"],["name","star-outline",1,"icon-title"],[1,"plan-title"],[4,"ngIf"],[1,"line"],[3,"ngSubmit"],["formEnroll","ngForm"],[1,"section-title"],["position","stacked"],["lines","none",1,"inputBorderRadius","ion-margin-bottom"],["type","text","ngModel","","name","name","required","","minlength","3","maxlength","191",1,"ion-text-center",3,"placeholder","change","input","keypress","paste","ionInput"],["name",""],["lines","none",1,"inputBorderRadius"],[2,"width","100%",3,"date"],["lines","none",1,"inputBorderRadius","ion-margin-bottom",3,"disabled"],["interface","popover","ngModel","","name","document_type","required","",1,"ion-text-center",3,"placeholder","okText","cancelText"],["class","ion-text-center",3,"value",4,"ngFor","ngForOf"],["type","number","ngModel","","name","document","required","","maxlength","15","pattern","[0-9]{7,15}",1,"ion-text-center",3,"placeholder","change","input","keypress","paste"],["document",""],[1,"flex"],["lines","none","class","no-margin image-document",4,"ngIf"],["lines","none","class","no-margin",4,"ngIf"],[3,"class",4,"ngIf"],["lines","none",1,"no-margin"],["slot","end",1,"no-margin"],["type","submit","fill","solid","color","primary",1,"enroll"],["value","first"],["slot","header","color","light","lines","none",1,"no-margin"],["slot","content"],[1,"ion-no-padding"],[1,"accordion"],[3,"allowEmptySelection","formControl","ionChange"],["class","student","slot","header","color","light","lines","none",4,"ngFor","ngForOf"],["slot","header","color","light","lines","none",1,"student"],["slot","start","mode","md",1,"radio",3,"value"],[1,"ion-text-center",3,"value"],["lines","none",1,"no-margin","image-document"],["alt","Base64 Image",1,"image-file",3,"src"],["fill","solid","name","close-circle",1,"icon-remove",3,"click"],["name","identificationDocument",3,"documentName","file"],["name","insuranceDocument",3,"documentName","file"],["type","text","ngModel","","name","guardianName","required","","minlength","3","maxlength","191",1,"ion-text-center",3,"placeholder","change","input","keypress","paste","ionInput"],["guardianName",""],["type","number","ngModel","","name","guardianDocument","required","","maxlength","15","pattern","[0-9]{7,15}",1,"ion-text-center",3,"placeholder","change","input","keypress","paste"],["guardianDocument",""],["type","email","ngModel","","name","guardianEmail","required","","maxlength","191",1,"ion-text-center",3,"placeholder","change","input","keypress","paste"],["guardianEmail",""],["type","number","ngModel","","name","guardianPhone","required","","maxlength","10","pattern","[0-9]{7,10}",1,"ion-text-center",3,"placeholder","change","input","keypress","paste"],["guardianPhone",""]],template:function(i,n){if(1&i){const a=e.RV6();e.j41(0,"ion-header",0)(1,"ion-toolbar"),e.nrm(2,"ion-back-button",1),e.j41(3,"ion-title",2),e.EFF(4),e.nI1(5,"translate"),e.k0s()()(),e.j41(6,"ion-content")(7,"ion-card")(8,"ion-card-header")(9,"ion-card-title"),e.nrm(10,"ion-icon",3),e.j41(11,"p",4),e.EFF(12),e.nI1(13,"translate"),e.j41(14,"b"),e.EFF(15),e.nI1(16,"translate"),e.nI1(17,"formatCurrency"),e.k0s()()(),e.DNE(18,G,12,6,"ion-card-content",5),e.k0s(),e.j41(19,"ion-card-content"),e.nrm(20,"p",6),e.j41(21,"form",7,8),e.bIt("ngSubmit",function(){e.eBV(a);const c=e.sdS(22);return e.Njj(n.enroll(c))}),e.j41(23,"ion-list")(24,"p",9),e.EFF(25),e.nI1(26,"translate"),e.k0s(),e.j41(27,"ion-label",10),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"ion-item",11)(31,"ion-input",12,13),e.bIt("change",function(c){return n.clearSpecialChars(c.target)})("input",function(c){return n.avoidSpecialChars(c)})("keypress",function(c){return n.avoidSpecialChars(c)})("paste",function(c){return n.onPaste(c)})("ionInput",function(c){return n.onInputChange(c)}),e.nI1(33,"translate"),e.k0s()(),e.j41(34,"ion-label",10),e.EFF(35),e.nI1(36,"translate"),e.k0s(),e.j41(37,"ion-item",14)(38,"app-date-picker",15),e.bIt("date",function(c){return n.setDate(c)}),e.k0s()(),e.j41(39,"ion-label",10),e.EFF(40),e.nI1(41,"translate"),e.k0s(),e.j41(42,"ion-item",16)(43,"ion-select",17),e.nI1(44,"translate"),e.nI1(45,"translate"),e.nI1(46,"translate"),e.DNE(47,k,2,2,"ion-select-option",18),e.k0s()(),e.j41(48,"ion-label",10),e.EFF(49),e.nI1(50,"translate"),e.k0s(),e.j41(51,"ion-item",16)(52,"ion-input",19,20),e.bIt("change",function(c){return n.clearSpecialChars(c.target)})("input",function(c){return n.avoidSpecialChars(c)})("keypress",function(c){return n.avoidSpecialChars(c)})("paste",function(c){return n.onPaste(c)}),e.nI1(54,"translate"),e.k0s()()(),e.j41(55,"ion-list")(56,"p",9),e.EFF(57),e.nI1(58,"translate"),e.k0s(),e.j41(59,"ion-list",21),e.DNE(60,X,3,1,"ion-item",22),e.DNE(61,U,3,1,"ion-item",22),e.k0s(),e.DNE(62,$,2,1,"ion-item",23),e.DNE(63,Y,2,1,"ion-item",23),e.k0s(),e.DNE(64,B,34,29,"ion-list",24),e.j41(65,"ion-item",25)(66,"p",26)(67,"ion-button",27),e.EFF(68),e.nI1(69,"translate"),e.k0s()()()()()()()}if(2&i){const a=e.sdS(22);let s;e.R7$(2),e.FCK("defaultHref","/experience/",n.type,"/detail/",n.plan.experienceId,""),e.R7$(2),e.JRh(e.bMT(5,32,"EXPERIENCE.ENROLL.TITLE")),e.R7$(8),e.SpI(" ",e.bMT(13,34,"EXPERIENCE.ENROLL.WRITING_TO"),""),e.R7$(3),e.E5c("\xa0",null!==(s=n.plan.name)&&void 0!==s?s:"Plan xxx"," ",e.bMT(16,36,"EXPERIENCE.PARAMS.FOR")," ",e.i5U(17,38,null!==(s=n.plan.price)&&void 0!==s?s:"0.00",n.currency),""),e.R7$(3),e.Y8G("ngIf",n.students&&n.students.length),e.R7$(5),e.HbH(n.showForm?"show":"hide"),e.R7$(2),e.JRh(e.bMT(26,41,"EXPERIENCE.ENROLL.STUDENT.STUDENT_INFORMATION")),e.R7$(3),e.JRh(e.bMT(29,43,"EXPERIENCE.ENROLL.STUDENT.NAME")),e.R7$(3),e.FS9("placeholder",e.bMT(33,45,"EXPERIENCE.ENROLL.STUDENT.PLACEHOLDER_NAME")),e.R7$(4),e.JRh(e.bMT(36,47,"EXPERIENCE.ENROLL.STUDENT.BIRTHDATE")),e.R7$(5),e.JRh(e.bMT(41,49,"EXPERIENCE.ENROLL.STUDENT.DOCUMENT_TYPE")),e.R7$(2),e.Y8G("disabled",!n.dob),e.R7$(1),e.FS9("placeholder",e.bMT(44,51,"EXPERIENCE.ENROLL.STUDENT.PLACEHOLDER_DOCUMENT_TYPE")),e.FS9("okText",e.bMT(45,53,"TEXT_OK_SELECT")),e.FS9("cancelText",e.bMT(46,55,"TEXT_CANCEL_SELECT")),e.R7$(4),e.Y8G("ngForOf",n.documentTypes),e.R7$(2),e.JRh(e.bMT(50,57,"EXPERIENCE.ENROLL.STUDENT.DOCUMENT")),e.R7$(2),e.Y8G("disabled",!a.value.document_type),e.R7$(1),e.FS9("placeholder",e.bMT(54,59,"EXPERIENCE.ENROLL.STUDENT.PLACEHOLDER_DOCUMENT")),e.R7$(3),e.HbH(n.showForm?"show":"hide"),e.R7$(2),e.JRh(e.bMT(58,61,"EXPERIENCE.ENROLL.STUDENT.STUDENT_DOCUMENTS")),e.R7$(3),e.Y8G("ngIf",n.fileIdentificationDocument),e.R7$(1),e.Y8G("ngIf",n.fileInsuranceDocument),e.R7$(1),e.Y8G("ngIf",!n.fileIdentificationDocument),e.R7$(1),e.Y8G("ngIf",!n.fileInsuranceDocument),e.R7$(1),e.Y8G("ngIf",n.enableGuardian),e.R7$(4),e.SpI(" ",e.bMT(69,63,"EXPERIENCE.ENROLL.PAY"),"")}},dependencies:[o.Sq,o.bT,_.qT,_.BC,_.cb,_.YS,_.xh,_.tU,_.R_,_.vS,_.cV,l.xk,l.YH,l.el,l.Jm,l.b_,l.I9,l.ME,l.tN,l.W9,l.eU,l.iq,l.$w,l.uz,l.he,l.nf,l.KO,l.f0,l.Nm,l.Ip,l.BC,l.ai,l.su,l.uR,l.Je,l.Gw,l.tY,_.l_,R.I,O,T.D9,v.P],styles:['@charset "UTF-8";ion-title[_ngcontent-%COMP%]{text-transform:uppercase}ion-content[_ngcontent-%COMP%]{--background: #f9f9f9 !important}ion-card[_ngcontent-%COMP%]{box-shadow:0 1px 6px gray;margin-top:15px;margin-bottom:15px;border-radius:10px}ion-card-title[_ngcontent-%COMP%]{display:flex;color:#565656;font-weight:500;font-size:16px;text-align:left}ion-card-content[_ngcontent-%COMP%]{padding-bottom:5px;color:#565656}ion-segment-button[_ngcontent-%COMP%]{--ripple-color: transparent !important;--ripple-duration: 0ms !important}ion-item[_ngcontent-%COMP%]{--padding-start: 0px;--padding-end: 0px;margin-bottom:10px;--inner-padding-end: 0px}ion-label[_ngcontent-%COMP%]{font-size:12px!important}ion-input[_ngcontent-%COMP%]{font-size:14px!important;text-align:justify!important}ion-select[_ngcontent-%COMP%]{width:100%;border:lightgray 1px solid;border-radius:5px;font-size:14px!important;text-align:justify!important;--padding-start: 15px;--placeholder-opacity: .5}.line[_ngcontent-%COMP%]{height:1px;background-color:#ddd;margin:10px 0}.icon-title[_ngcontent-%COMP%]{width:24px;margin-right:10px}.plan-title[_ngcontent-%COMP%]{margin:0}.section-title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;line-height:20px}.enroll[_ngcontent-%COMP%]{margin-top:15px;text-transform:uppercase}.no-margin[_ngcontent-%COMP%]{margin:0}.another-student[_ngcontent-%COMP%]{color:gray;font-weight:700}.icon-title-another-student[_ngcontent-%COMP%]{width:16px;margin-right:10px;margin-left:10px;color:gray}.flex[_ngcontent-%COMP%]{display:flex}.image-document[_ngcontent-%COMP%]{width:50%}.image-file[_ngcontent-%COMP%]{width:150px;height:100px}.icon-remove[_ngcontent-%COMP%]{position:absolute;top:-2px;right:-2px;background-color:#ffffffb3;border-radius:50%;padding:0;cursor:pointer;z-index:10}.student[_ngcontent-%COMP%]{margin:0;padding:0;height:40px}.hide[_ngcontent-%COMP%]{display:none}.show[_ngcontent-%COMP%]{display:block}']})}return r})()}];let w=(()=>{class r{static#e=this.\u0275fac=function(i){return new(i||r)};static#t=this.\u0275mod=e.$C({type:r});static#n=this.\u0275inj=e.G2t({imports:[g.iI.forChild(V),g.iI]})}return r})();var J=u(55553),H=u(41683);let W=(()=>{class r{static#e=this.\u0275fac=function(i){return new(i||r)};static#t=this.\u0275mod=e.$C({type:r});static#n=this.\u0275inj=e.G2t({imports:[o.MD,_.YN,l.bv,w,T.h,_.X1,J.h,H.Y]})}return r})()}}]);