form-aurora-stefanini 0.1.23 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function d(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function u(t,e,n,a){var o,i=arguments.length,r=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],a=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var a,o,i=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return r}var p={default:{exp:"^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_\\s]*$",message:"Formato inválido, no use caracteres especiales"},word:{exp:"^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_]*$",message:"Formato inválido, no use caracteres especiales ni espacios"},name:{exp:"^[a-zA-ZñÑáéíóúüÁÉÍÓÚÜ\\s]*$",message:"Formato inválido, no use caracteres especiales ni números"},alphanumberWord:{exp:"^[a-zA-Z0-9]*$",message:"Formato alfanúmerico inválido"},charWord:{exp:"^[a-zA-Z]*$",message:"Formato de caracteres inválido"},anyWord:{exp:"^\\S*$",message:"Formato inválido"},percent:{exp:"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\\.[0-9]{1,2}$",message:"Formato de porcentaje inválido, use el punto decimal (.)"},email:{exp:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Formato de e-mail inválido"},number:{exp:"^[0-9]*$",message:"Formato de número inválido"},time24:{exp:"^([01]?[0-9]|2[0-3]):[0-5][0-9]$",message:"Formato de hora militar inválido, use 23:45"},date:{exp:"^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$",message:"Formato de fecha inválido",internal:"dd/mm/yyyy"},password:{exp:"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$",message:"La contraseña debe incluir una longitud mínima de 8 caracteres, una letra mayúscula, una letra minúscula, un número, un carácter especial (@#$%^&+=/.) y no debe tener espacios."}},h=function(){function t(){this.dataMap=new Map,this.dataMap.set("A","2,"),this.dataMap.set("J","29,"),this.dataMap.set("S","67,"),this.dataMap.set("B","3,"),this.dataMap.set("K","31,"),this.dataMap.set("T","71,"),this.dataMap.set("C","5,"),this.dataMap.set("L","37,"),this.dataMap.set("U","73,"),this.dataMap.set("D","7,"),this.dataMap.set("M","41,"),this.dataMap.set("V","79,"),this.dataMap.set("E","11,"),this.dataMap.set("N","43,"),this.dataMap.set("W","83,"),this.dataMap.set("F","13,"),this.dataMap.set("O","47,"),this.dataMap.set("X","89,"),this.dataMap.set("G","17,"),this.dataMap.set("P","53,"),this.dataMap.set("Y","97,"),this.dataMap.set("H","19,"),this.dataMap.set("Q","59,"),this.dataMap.set("Z","101,"),this.dataMap.set("I","23,"),this.dataMap.set("R","61,"),this.dataMap.set("a","103,"),this.dataMap.set("j","151,"),this.dataMap.set("s","157,"),this.dataMap.set("b","107,"),this.dataMap.set("k","163,"),this.dataMap.set("t","167,"),this.dataMap.set("c","109,"),this.dataMap.set("l","173,"),this.dataMap.set("u","179,"),this.dataMap.set("d","113,"),this.dataMap.set("m","181,"),this.dataMap.set("v","191,"),this.dataMap.set("e","127,"),this.dataMap.set("n","193,"),this.dataMap.set("w","227,"),this.dataMap.set("f","132,"),this.dataMap.set("o","197,"),this.dataMap.set("x","229,"),this.dataMap.set("g","137,"),this.dataMap.set("p","199,"),this.dataMap.set("y","233,"),this.dataMap.set("h","139,"),this.dataMap.set("q","211,"),this.dataMap.set("z","239,"),this.dataMap.set("i","149,"),this.dataMap.set("r","223,"),this.dataMap.set("0","Z,"),this.dataMap.set("1","Y,"),this.dataMap.set("2","X,"),this.dataMap.set("3","W,"),this.dataMap.set("4","V,"),this.dataMap.set("5","U,"),this.dataMap.set("6","T,"),this.dataMap.set("7","S,"),this.dataMap.set("8","R,"),this.dataMap.set("9","Q,"),this.dataMap.set(",","&"),this.dataMap.set("{","1000,"),this.dataMap.set("}","0000,")}return t.prototype.ofusquedData=function(t){for(var e="",n=t.toString().split(""),a=0;a<n.length;a++){var o=n[a].toString();this.dataMap.has(o)?e+=this.dataMap.get(o).toString():e+=o+","}return e},t.prototype.decodeOfusquedData=function(t){for(var e="",n=t.split(","),a=0;a<n.length;a++)e+=this.readValueInMap(n[a]);return e.replaceAll("&",",")},t.prototype.readValueInMap=function(t){var e="",n=!0;return this.dataMap.forEach((function(a,o){t+","===a&&(e=o,n=!1)})),n&&(e=t),e},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}(),f=function(){function t(){}var n;return n=t,t.prototype.getData=function(){var t,e=new h;if(null!=localStorage.getItem("data")){if(localStorage.getItem("data").length<10)t=new Map(JSON.parse(localStorage.getItem("data")));else{var n=localStorage.getItem("data");n=e.decodeOfusquedData(n),console.log("#####SALIDA#####"),console.log(n)}return t}},t.prototype.setData=function(t){if(localStorage.setItem("data",JSON.stringify(Array.from(t.entries()))),localStorage.getItem("data").length>20){var e=new h,n=localStorage.getItem("data").toString();console.log("LLEGO"),console.log(n),localStorage.setItem("data",e.ofusquedData(n))}},t.prototype.initData=function(){this.setData(new Map)},t.prototype.putValue=function(t,e){var n=this.getData();n=n.set(t,e),this.setData(n)},t.prototype.addValue=function(t,e,n){var a=this.getValue(t),o=this.getData();a[e]=n,o=o.set(t,a),this.setData(o)},t.prototype.getValue=function(t){return this.getData()&&this.getData().has(t)?this.getData().get(t):void 0},t.prototype.hasValue=function(t){return null!=this.getData()?this.getData().has(t):null},t.prototype.clearMap=function(){if(this.hasValue(n.COMPANY_KEY)){var t=this.getValue(n.COMPANY_KEY);this.initData(),this.putValue(n.COMPANY_KEY,t)}else this.initData()},t.COMPANY_KEY="company",t.DOC_NUMBER_KEY="docNumber",t.DOC_TYPE_KEY="docType",t.PHONE_KEY="phone",t.TYPE_ATTENTION_KEY="typeAttention",t.OFFICE_KEY="office",t.TYPE_TURN_KEY="typeTurn",t.SERVICE_KEY="service",t.TURN_KEY="turn",t.PROGRAMED_TURN_KEY="programedTurn",t.REQUEST_CALL="requestCall",t.FORM_DATA="formdata",t.TEMPLATE="template",t.TURN_RESCHEDULE="turnReschedule",t.USER_GENDER="genderUser",t.AUTO_REDIRECT="autoRedirect",t.SCHEDULE_GENERAL="scheduleGeneral",t.AGENDAMIENTO_TTP="potencialCustomer",t.SINGLE_PAGE_ONE="singlePageOne",t.AVAILABLE_SCHEDULE_GRAL="availableScheduleGral",t.PROFILE="profile",t.PAGE_NEXT="pageNext",t.STEPS="steps",t.TYPE_TURN_ID="typeTurnId",t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=n=u([e.Injectable({providedIn:"root"})],t)}(),g=i,y=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.DELIMITER="/",e}return d(n,t),n.prototype.fromModel=function(t){if(t){var e=t.split(this.DELIMITER);return{day:parseInt(e[0],10),month:parseInt(e[1],10),year:parseInt(e[2],10)}}return null},n.prototype.toModel=function(t){return t?(t.day<10?0+t.day:t.day)+this.DELIMITER+(t.month<10?0+t.month:t.month)+this.DELIMITER+t.year:""},n=u([e.Injectable()],n)}(o.NgbDateAdapter),v=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.DELIMITER="/",e}return d(n,t),n.prototype.parse=function(t){if(t){var e=t.split(this.DELIMITER);return{day:parseInt(e[0],10),month:parseInt(e[1],10),year:parseInt(e[2],10)}}return null},n.prototype.format=function(t){return t?(t.day<10?"0"+t.day:t.day)+this.DELIMITER+(t.month<10?"0"+t.month:t.month)+this.DELIMITER+t.year:""},n=u([e.Injectable()],n)}(o.NgbDateParserFormatter),x={es:{weekdays:["Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],weekLabel:"sem"}},b=function(){function t(){this.language="es"}return t=u([e.Injectable()],t)}(),q=function(t){function n(e){var n=t.call(this)||this;return n._i18n=e,n}return d(n,t),n.prototype.getWeekdayLabel=function(t){return x[this._i18n.language].weekdays[t-1]},n.prototype.getWeekLabel=function(){return x[this._i18n.language].weekLabel},n.prototype.getMonthShortName=function(t){return x[this._i18n.language].months[t-1]},n.prototype.getMonthFullName=function(t){return this.getMonthShortName(t)},n.prototype.getDayAriaLabel=function(t){return t.day+"-"+t.month+"-"+t.year},n.prototype.getWeekdayShortName=function(t){return x[this._i18n.language].weekdays[t-1]},n.ctorParameters=function(){return[{type:b}]},n=u([e.Injectable()],n)}(o.NgbDatepickerI18n),F=function(){function t(t,a){this.data=t,this.http=a,this.response=new e.EventEmitter,this.summit=new e.EventEmitter,this.viewAuthData=new e.EventEmitter,this.tipodocNumDoc=!1,this.countSubmit=0,this.watchValid=!1,this.watchRequired=!1,this.captchaValid=!1,this.today=g(new Date),this.maxYear=this.today.year(),this.minYear=this.today.year()-82,this.minDate=this.minYear.toString()+"-"+this.today.month().toString().padStart(2,"0")+"-"+this.today.date().toString().padStart(2,"0"),this.maxDate=this.maxYear.toString()+"-"+(this.today.month()+1).toString().padStart(2,"0")+"-"+this.today.date().toString().padStart(2,"0"),this.recharge=!1,this.indicativo="57",this.defaultDocType="Cédula de ciudadanía",this.patternNotValidDcto=!1,this.patternNotValidCel=!1,this.range=new n.FormGroup({start:new n.FormControl,end:new n.FormControl})}return t.prototype.ngOnInit=function(){var t=this;this.minDate=new Date(this.minDate).toISOString().split("T")[0],setTimeout((function(){t.startComponent()}),2e3)},t.prototype.startComponent=function(){var t,e,n=this;if(null!=this.dataForm&&null!=this.dataForm.formQuestions){this.tipodocNumDoc=!(!this.dataForm.formQuestions.some((function(t){return"tipoDoc"===t.question.value}))||!this.dataForm.formQuestions.some((function(t){return"numeroDoc"===t.question.value}))),this.dataForm.formQuestions=this.dataForm.formQuestions.sort((function(t,e){return t.order-e.order})),0==this.dataForm.formQuestions.filter((function(t){return 6==t.question.questionType.id})).length&&(this.captchaValid=!0);var a=function(t){null!=t.question.maxlength&&null!=t.question.maxlength&&0!=t.question.maxlength||(t.question.maxlength=524288),null!=t.question.minLength&&null!=t.question.minLength||(t.question.minLength=0),o.dataReloadForm.forEach((function(e){n.filldata=e,2!==t.question.questionType.id&&1!==t.question.questionType.id&&3!==t.question.questionType.id||null===n.filldata.data||void 0===n.filldata.data||t.question.id!==n.filldata.id||(t.question.registred=n.filldata.data)})),null!=t.question.registred&&null!=t.question.minLength||(t.question.registred="")},o=this;try{for(var i=m(this.dataForm.formQuestions),r=i.next();!r.done;r=i.next()){a(r.value)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}},t.prototype.resolvedCaptcha=function(t){this.captchaValid=!0,this.formDynamic.form.value.captcha||(this.formDynamic.controls.captcha.setValue(t),this.formDynamic.form.value.captcha=t,document.getElementById("btnIng").style.opacity=this.formDynamic.valid?"1":"0.65")},t.prototype.trackByIndex=function(t,e){return t},t.prototype.onChangeValidPatter=function(t,e){var n=this;if(null!=e.pattern){var a=!0;try{if(![8,32,37,38,39,40,46,9].includes(t.keyCode))a=new RegExp(e.pattern).test(t.key)}catch(t){}return a}void 0!==e.questionType&&"Number"===e.questionType.description&&("numeroDoc"===e.value?this.validateNumeroDocumento(this.formDynamic.controls.numeroDoc.value.toString()):"celular"===e.value&&this.validateCelular(this.formDynamic.controls.celular.value.toString())),document.getElementById("char"+e.value).setAttribute("hidden","true"),11!=e.questionType.id&&7!=e.questionType.id&&(this.validMinLength(this.formDynamic,e)?(document.getElementById(e.value).style.borderColor="#FF0000",document.getElementById("ml"+e.value).removeAttribute("hidden")):(document.getElementById(e.value).style.borderColor="#E4E4E4",document.getElementById("ml"+e.value).setAttribute("hidden","true")),this.validMaxLength(this.formDynamic,e)?(document.getElementById(e.value).style.borderColor="#FF0000",document.getElementById("mxl"+e.value).removeAttribute("hidden")):(document.getElementById(e.value).style.borderColor="#E4E4E4",document.getElementById("mxl"+e.value).setAttribute("hidden","true"))),this.dataForm.formQuestions.forEach((function(t){switch(t.question.questionType.id){case 7:7==e.questionType.id&&n.calendarRulesValidate(t);break;case 11:11==e.questionType.id&&n.emailRulesValidate(t)}})),document.getElementById("btnIng").style.opacity=this.formDynamic.valid?"1":"0.65"},t.prototype.validOnlyText=function(t){return 32==t.charCode||/^[a-zA-Z\u00C0-\u017F]+$/g.test(t.key)},t.prototype.validDate=function(t){var e=!0;return null===String(t.key).match(p.date.exp)&&(e=!1),e},t.prototype.onChangeValidDate=function(t){return new RegExp(/[0-9]|\//).test(t.key)},t.prototype.rediretoutside=function(t,e){try{t.preventDefault(),window.open(e.value,"_blank")}catch(t){}},t.prototype.ngOnChanges=function(t){this.countSubmit++},t.prototype.onSubmit=function(){var t=this,e=this.formDynamic;if(this.watchValid=!0,this.watchRequired=!0,e.valid&&!this.validRulesFields(e.controls.numeroDoc.value.toString(),e.controls.celular.value.toString(),e.controls.email.value))return!1;this.validMinlenghtAllQuestions(e.value)&&this.validMaxLengthAllQuestions(e.value)&&e.valid&&(""!=this.dataForm.urlSend&&this.captchaValid?this.http.post(this.dataForm.urlSend,e.value).subscribe((function(e){return t.response.emit(e)})):e.valid&&this.captchaValid&&this.summit.emit(e.value))},t.prototype.findParamBoolean=function(t,e){var n=t.find((function(t){return t.id==e}));return null!=n&&"true"==n.value},t.prototype.validRulesFields=function(t,e,n){var a=this,o=document.getElementById("charcelular"),i=document.getElementById("charnumeroDoc"),r=!0;if("+57"==this.indicativo||"57"==this.indicativo){var s=this.orderString(t);"CLARO"!==this.nameCompany.toUpperCase()&&t==s&&(i.style.borderColor="#FF0000",i.removeAttribute("hidden"),i.textContent="El numero documento No debe contener caracteres consecutivos",r=!1),"3"!=e.substring(0,1)&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El primer carácter del celular debe ser 3",r=!1);for(var l=t.substring(0,1),d=1;d<t.length;d++)l+=t.substring(0,1);if(t==l&&(i.style.borderColor="#FF0000",i.removeAttribute("hidden"),i.textContent="Caracteres numéricos no se pueden repetirse de manera continua ",r=!1),!this.validateNumeroDocumento(t))return!1;if(!this.validateCelular(e))return!1;var u=Array.from(String(e),Number);1==function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}(new Set(u)).length&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El número que ingresa no es valido",r=!1)}else"+593"!=this.indicativo&&"593"!=this.indicativo||"9"!=e.substring(0,1)&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El primer carácter del celular debe ser 9",r=!1);return this.dataForm.formQuestions.forEach((function(t){switch(t.question.questionType.id){case 11:r=a.emailRulesValidate(t)}})),r},t.prototype.orderString=function(t){for(var e=[],n=0;n<t.length;n++)e.push(parseInt(t.substring(n,n+1)));e.sort((function(t,e){return t-e}));var a="";a=e[0];for(n=1;n<e.length;n++)a+=(e[0]+n).toString();return a},t.prototype.validMinlenghtAllQuestions=function(t){var e,n;try{for(var a=m(this.dataForm.formQuestions),o=a.next();!o.done;o=a.next()){var i=o.value;if(1==i.question.questionType.id||2==i.question.questionType.id){var r=parseInt(i.question.minLength),s=parseInt(t[i.question.value].toString().length);if(r>0&&s!=r&&s<r)return!1}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return!0},t.prototype.validMaxLengthAllQuestions=function(t){var e,n;try{for(var a=m(this.dataForm.formQuestions),o=a.next();!o.done;o=a.next()){var i=o.value;if(1==i.question.questionType.id||2==i.question.questionType.id){var r=parseInt(i.question.maxLength),s=parseInt(t[i.question.value].toString().length);if(r>0&&s!=r&&s>r)return!1}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return!0},t.prototype.validRequired=function(t,e){try{if(null!=e&&null!=e.value&&null!=t.controls[e.value]&&null!=t.controls[e.value].errors&&t.controls[e.value].errors.required)return!0}catch(t){}return!1},t.prototype.validMinLength=function(t,e){try{if(null!=e&&null!=e.value&&e.minLength>t.controls[e.value].value.toLocaleString().length&&e.minLength>0)return!0}catch(t){}return!1},t.prototype.validMaxLength=function(t,e){try{if(null!=e&&null!=e.value&&e.maxLength>0&&e.maxLength+1<=t.controls[e.value].value.toString().replace(/\./g,"").length)return this.formDynamic.controls[e.value].hasError("errorMaxLength")||this.formDynamic.controls[e.value].setErrors({errorMaxLength:!0}),!0}catch(t){}return!1},t.prototype.tycSelection=function(t){this.viewAuthData.emit(t)},t.prototype.openLabelUrl=function(t,e){t.preventDefault(),document.getElementById("check"+e.id).style.color="#A3AD32",window.open(e.urllabel,"_blank")},t.prototype.cancellKeypress=function(){return!1},t.prototype.emailRulesValidate=function(t){var e=!0;try{var n=!1;document.getElementById(t.question.id).setAttribute("hidden","true");var a=document.getElementById(t.question.id),o=t.question.registred;if(n||!t.question.required||""!=o&&null!=o&&null!=o||(a.style.borderColor="#FF0000",a.textContent="El correco eléctronico es requerido",a.removeAttribute("hidden"),e=!1,n=!0),n||this.validMinLength(void 0,t.question)&&(a.style.borderColor="#FF0000",a.textContent="Debe ser mínimo de "+t.question.minLength+" caracteres",document.getElementById(t.question.id).removeAttribute("hidden"),e=!1,n=!0),n||this.validMaxLength(void 0,t.question)&&(a.style.borderColor="#FF0000",a.textContent="Debe ser maximo de "+t.question.maxLength+" caracteres",document.getElementById(t.question.id).removeAttribute("hidden"),e=!1,n=!0),!n)null==String(o).match(p.email.exp)&&(a.style.borderColor="#FF0000",a.textContent="Tu email es invalido",a.removeAttribute("hidden"),e=!1,n=!0)}catch(t){}return e},t.prototype.calendarRulesValidate=function(t){try{document.getElementById(t.question.id).setAttribute("hidden","true");var e=document.getElementById(t.question.id),n=t.question.registred;!t.question.required||""!=n&&null!=n&&null!=n||(e.style.borderColor="#FF0000",e.textContent="La fecha es requerida",e.removeAttribute("hidden"))}catch(t){}},t.prototype.validateNotSpace=function(t){return 32!=t.charCode},t.prototype.validateNumeroDocumento=function(t){return t.match("^[0-9]*$")?(this.patternNotValidDcto=!1,!0):(this.formDynamic.controls.numeroDoc.setValidators([n.Validators.pattern("^[0-9]*$")]),this.formDynamic.controls.numeroDoc.markAsDirty(),this.formDynamic.controls.numeroDoc.updateValueAndValidity(),this.formDynamic.controls.numeroDoc.markAsTouched(),this.patternNotValidDcto=!0,!1)},t.prototype.validateCelular=function(t){return t.match("^[0-9]*$")?(this.patternNotValidCel=!1,!0):(this.formDynamic.controls.celular.setValidators([n.Validators.pattern("^[0-9]*$")]),this.formDynamic.controls.celular.markAsDirty(),this.formDynamic.controls.celular.updateValueAndValidity(),this.formDynamic.controls.celular.markAsTouched(),this.patternNotValidCel=!0,!1)},t.prototype.onkeypress=function(t){return 0==t.charCode?null:t.charCode>=48&&t.charCode<=57},t.prototype.onChangeStep=function(t,e,n){e&&1!=e.stepOrder&&(this.resetField(t),e.viewData=[],e.viewData=e.stepData.filter((function(t){return t.relationalIds.includes(Number(n))})))},t.prototype.resetField=function(t){this.steps.forEach((function(e){e.stepOrder>t.stepOrder&&(e.viewData=void 0,e.value=void 0)}))},t.ctorParameters=function(){return[{type:f},{type:a.HttpClient}]},u([e.Input()],t.prototype,"dataClassCss",void 0),u([e.Input()],t.prototype,"dataForm",void 0),u([e.Input()],t.prototype,"clickSubmit",void 0),u([e.Input()],t.prototype,"dataReloadForm",void 0),u([e.Input()],t.prototype,"welcomeTitle",void 0),u([e.Input()],t.prototype,"welcomeDescription",void 0),u([e.Input()],t.prototype,"urlPdf",void 0),u([e.Input()],t.prototype,"nameCompany",void 0),u([e.Input()],t.prototype,"schedule",void 0),u([e.Input()],t.prototype,"isSimpleFlow",void 0),u([e.Input()],t.prototype,"steps",void 0),u([e.ViewChild("formDynamic",{static:!0})],t.prototype,"formDynamic",void 0),u([e.Output()],t.prototype,"response",void 0),u([e.Output()],t.prototype,"summit",void 0),u([e.Output()],t.prototype,"viewAuthData",void 0),t=u([e.Component({selector:"lib-FormAurora",template:'<div class="card">\n <span class="text-center mt-2 d-none d-sm-block" *ngIf="!isSimpleFlow">\n <img style="width: 115px; height:96px;" [class]="dataClassCss.logo" id="logo">\n </span>\n <div class="text-center mt-2 d-none d-sm-block" *ngIf="isSimpleFlow" style="margin-top: 4%!important;">\n </div>\n <div class="card-body pt-0">\n <ng-container *ngIf="schedule">\n <h4 class="card-title text-center mb-0" [class]="dataClassCss.bienvenida2" style="color: #EE7E0E;">\n Horarios de atención\n </h4>\n <small class="text-center d-block">{{schedule}}</small>\n </ng-container>\n <form #formDynamic="ngForm">\n <div *ngFor="let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex">\n <div\n *ngIf="(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp">\n <div class="row"\n *ngIf="(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))">\n <div class="col-lg-6 col-xs-12">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index - 1].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span class="h6 small bg-white text-muted">{{dataForm.formQuestions[index -\n 1].question.label}}</span>\n </label>\n <div class="selectContainer">\n <select [name]="dataForm.formQuestions[index - 1].question.value"\n [required]="dataForm.formQuestions[index - 1].question.required"\n [class]="dataClassCss.formcontrol"\n id="{{dataForm.formQuestions[index - 1].question.value}}"\n style="margin-top: -1rem !important;"\n [(ngModel)]="defaultDocType !== \'\' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor="let item of dataForm.formQuestions[index - 1].question.questionAnswers">\n <option *ngIf="item.answer.state.id == 1" [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index-1].question.value"\n hidden></span>\n </div>\n </div>\n <div class="col-lg-6 col-xs-12">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}"\n class="col-sm-12 p-sm-0 px-sm-1" style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" pattern="\\d*" inputmode="numeric"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [name]="dataForm.formQuestions[index].question.value" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keyup)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n onkeypress="onkeypress($event)" onkeyup="(this.value=(value.replace(/[.]*/g,\'\')))"\n maxlength="dataForm.formQuestions[index].question.maxLength"\n [minLength]="dataForm.formQuestions[index].question.minLength"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol" />\n\n </div>\n\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'rq\'+dataForm.formQuestions[index].question.value"\n *ngIf="validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid">\n Este campo es obligatorio</span>\n <span class="error" [id]="\'ml\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser mínimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class="error" [id]="\'mxl\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index].question.value"\n hidden></span>\n <span *ngIf="patternNotValidDcto === true" class="error">Formato no valido</span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #switchTemp>\n <div [ngSwitch]="dataForm.formQuestions[index].question.questionType.id">\n <div *ngSwitchCase="1">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchCase="2">\n\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" pattern="\\d*" inputmode="numeric"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [name]="dataForm.formQuestions[index].question.value" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n onkeypress="onkeypress($event)" onkeyup="(this.value=(value.replace(/[.]*/g,\'\')))"\n maxlength="dataForm.formQuestions[index].question.maxLength"\n [minLength]="dataForm.formQuestions[index].question.minLength"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol" />\n <span *ngIf="patternNotValidCel === true" class="error">Formato no valido</span>\n </div>\n\n </div>\n <div *ngSwitchCase="3">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <select [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [class]="dataClassCss.formcontrol"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [(ngModel)]="defaultDocType !== \'\' ? defaultDocType : dataForm.formQuestions[index].question.registred">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor="let item of dataForm.formQuestions[index].question.questionAnswers">\n <option *ngIf="item.answer.state.id == 1" [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div *ngSwitchCase="4">\n <select class="{{ dataClassCss.formcontrol }} select-checkbox"\n style="overflow: hidden; border-style: hidden;"\n [style.height.px]="dataForm.formQuestions[index].question.questionAnswers.length * 24"\n [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required" ngModel multiple>\n <option (mousemove)="$event.preventDefault()"\n *ngFor="let item of dataForm.formQuestions[index].question.questionAnswers"\n [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </select>\n </div>\n <div *ngSwitchCase="5">\n <a (click)="rediretoutside($event,dataForm.formQuestions[index].question)" href="">\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\n </a>\n </div>\n <div *ngSwitchCase="6">\n <div [class]="dataClassCss.cl12" [id]="\'reCaptcha\'">\n <div class="cnt-captcha">\n <re-captcha (resolved)="resolvedCaptcha($event)"\n siteKey="6Lf9DcQfAAAAAI6HCNB5OyKUpOPpfl5ocoBJcigZ"></re-captcha>\n <input hidden type="text" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred">\n </div>\n <span class="error" *ngIf="watchValid && !captchaValid" style="margin-top: 0;">\n Debe resolver la captcha para continuar\n </span>\n </div>\n </div>\n <div *ngSwitchCase="7">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; margin-bottom: 0 ;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input placeholder="dd/mm/aaaa" style="margin-top: -0.4rem !important;"\n [required]="dataForm.formQuestions[index].question.required"\n [name]="dataForm.formQuestions[index].question.value" type="date" min="{{minDate}}"\n max="{{maxDate}}" [maxlength]="10" (paste)="false"\n id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.txtCalendar"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n (keydown)="cancellKeypress()"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)">\n\n <button class="btn" id="{{dataForm.formQuestions[index].question.value}}" type="button"\n style="width: 46px;\n top: 12px;\n color: white;\n right: 15px;\n position: absolute;\n background: #D25D42;\n pointer-events: none;">\n <i class="fa fa-calendar"></i>\n </button>\n\n </div>\n </div>\n <div *ngSwitchCase="8">\n <div [class]="dataClassCss.cl12" style="text-align: left; margin-bottom: 10px;">\n <input\n style="width: 4% !important; height: auto !important; display: inline !important;"\n type="checkbox" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol">\n <a target="_blank" style="text-decoration: underline;color:blue;cursor: pointer;"\n id="txtPoliticas" (click)="tycSelection($event)">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase="9">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keypress)="validOnlyText($event)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchCase="10">\n <div [class]="dataClassCss.cl12" style="text-align: left; margin-bottom: 10px;">\n <input\n style="width: 4% !important; height: auto !important; display: inline !important;"\n type="checkbox" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred">\n <a target="_blank" style="text-decoration: underline;color:blue;cursor: pointer;"\n id="check{{dataForm.formQuestions[index].question.id}}"\n (click)="openLabelUrl($event,dataForm.formQuestions[index].question)">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase="11">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keypress)="validateNotSpace($event)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchDefault>Tipo de control no detectado</div>\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'rq\'+dataForm.formQuestions[index].question.value"\n *ngIf="validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid">\n Este campo es obligatorio</span>\n <span class="error" [id]="\'ml\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser mínimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class="error" [id]="\'mxl\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index].question.value"\n hidden></span>\n <span class="error" [id]="dataForm.formQuestions[index].question.id" hidden></span>\n </div>\n </div>\n </ng-template>\n </div>\n <section *ngIf="isSimpleFlow">\n <div *ngFor="let step of steps let index = index;">\n <div [class]="dataClassCss.cl12" *ngIf="step.viewData">\n <label for="{{step.id}}" class="col-sm-12" style="display: block; text-align: left;">\n <span class="h6 small bg-white text-muted">{{step.step}}</span>\n </label>\n <select [name]="step.step" [required]="true" [class]="dataClassCss.formcontrol"\n id="{{step.step}}" style="margin-top: -1rem !important;" [(ngModel)]="step.value"\n (ngModelChange)="onChangeStep(step,steps[index+1],$event)">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container *ngFor="let subitem of step.viewData">\n <option [value]="subitem.id">\n {{ subitem.description }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n </section>\n <div class="mt-3 text-center">\n <button type="button" [class]="dataClassCss.btn" (click)="onSubmit()" [disabled]="!formDynamic.valid"\n id="btnIng">Ingresar</button>\n </div>\n </form>\n </div>\n</div>',providers:[{provide:o.NgbDateAdapter,useClass:y},{provide:o.NgbDateParserFormatter,useClass:v},{provide:o.NgbDatepickerI18n,useClass:q},b],styles:['form{font-size:12px;overflow-y:scroll;overflow-x:hidden}form input,form select{border:1px solid #e4e4e4;height:40px;margin-bottom:5px}.selectContainer select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectContainer::after{content:"\\025be";display:table-cell;text-align:center;padding-top:7px;width:30px;height:30px;position:absolute;top:14px;right:20px;pointer-events:none}form .error{color:red;font-size:12px;text-align:left;margin:-15px 0 15px;padding:0;width:90%}.error:after{content:" ";display:block}.card{width:90%;margin:2% auto;border-radius:12px}@media (max-width:412px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:575.98px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:880.98px){.cnt-captcha{transform:scale(.82)}}input[type=date]::-webkit-calendar-picker-indicator{background:0 0;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f5f5f5}::-webkit-scrollbar-thumb{background:#e0e0e0}::-webkit-scrollbar-thumb:hover{background:#bdbdbd}']})],t)}(),C=function(){function t(t){this.http=t}return t.prototype.getTemplate=function(t,e){return this.http.get(e+"/template/findByCompany/"+t)},t.prototype.reloadStylePage=function(t,e){for(var n,a,o=t.getElementsByClassName("template"),i=0;i<o.length;i++){var r=o[i],s="object"==typeof r.className?r.className.baseVal:r.className,l=s.indexOf("template"),d=s.substring(l,s.length).split(" ").filter((function(t){return-1!==t.indexOf("tmp_")}));try{for(var u=(n=void 0,m(d)),c=u.next();!c.done;c=u.next()){var p=c.value;null!=e[p]&&(p.includes("tmp_type_text_")&&(p.includes("tmp_type_text_6")?r.style.setProperty("--"+p,e[p].color):(r.style.color=e[p].color,s.includes("ratting-faces-v2")&&(r.style.backgroundColor=e[p].color,r.style.borderColor=e[p].color,r.style.color="white"))),p.includes("title1")&&(r.style.color="#EE7E0E"),p.includes("tmp_type_svg_")&&(r.style.fill=e[p].fill),p.includes("tmp_type_img_")&&("IMG"==r.nodeName?r.src=e[p].src:(r.style.background=e[p].background,r.style.backgroundSize=e[p].backgroundSize)),p.includes("tmp_type_head_")&&r.style.setProperty("--"+p,e[p].color),p.includes("tmp_type_footer_")&&r.style.setProperty("--"+p,e[p].color),s.includes("tmp_type_cnt_")&&(l=s.indexOf("tmp_type_cnt_"),e[p=s.substring(l,s.length).split(" ")[0]]&&(r.style.backgroundColor=e[p].backgroundColor)),p.includes("tmp_type_font_")&&r.style.setProperty("font-family",e[p]["font-family"],"important"))}}catch(t){n={error:t}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}},t.ctorParameters=function(){return[{type:a.HttpClient}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(a.HttpClient))},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}(),Q=function(){},D=function(){function t(){}return t=u([e.NgModule({declarations:[F],imports:[r.CommonModule,n.FormsModule,s.RecaptchaModule,s.RecaptchaFormsModule],exports:[F]})],t)}();t.CommonDataService=f,t.CommonTemplateService=C,t.CustomAdapter=y,t.CustomDateParserFormatter=v,t.CustomDatepickerI18n=q,t.Fill=Q,t.FormAuroraComponent=F,t.FormAuroraModule=D,t.I18n=b,t.regexType=p,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function d(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function u(t,e,n,a){var o,i=arguments.length,r=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,a);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(i<3?o(r):i>3?o(e,n,r):o(e,n))||r);return i>3&&r&&Object.defineProperty(e,n,r),r}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],a=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var a,o,i=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return r}var p={default:{exp:"^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_\\s]*$",message:"Formato inválido, no use caracteres especiales"},word:{exp:"^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_]*$",message:"Formato inválido, no use caracteres especiales ni espacios"},name:{exp:"^[a-zA-ZñÑáéíóúüÁÉÍÓÚÜ\\s]*$",message:"Formato inválido, no use caracteres especiales ni números"},alphanumberWord:{exp:"^[a-zA-Z0-9]*$",message:"Formato alfanúmerico inválido"},charWord:{exp:"^[a-zA-Z]*$",message:"Formato de caracteres inválido"},anyWord:{exp:"^\\S*$",message:"Formato inválido"},percent:{exp:"^100$|^[0-9]{1,2}$|^[0-9]{1,2}\\.[0-9]{1,2}$",message:"Formato de porcentaje inválido, use el punto decimal (.)"},email:{exp:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Formato de e-mail inválido"},number:{exp:"^[0-9]*$",message:"Formato de número inválido"},time24:{exp:"^([01]?[0-9]|2[0-3]):[0-5][0-9]$",message:"Formato de hora militar inválido, use 23:45"},date:{exp:"^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$",message:"Formato de fecha inválido",internal:"dd/mm/yyyy"},password:{exp:"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$",message:"La contraseña debe incluir una longitud mínima de 8 caracteres, una letra mayúscula, una letra minúscula, un número, un carácter especial (@#$%^&+=/.) y no debe tener espacios."}},h=function(){function t(){this.dataMap=new Map,this.dataMap.set("A","2,"),this.dataMap.set("J","29,"),this.dataMap.set("S","67,"),this.dataMap.set("B","3,"),this.dataMap.set("K","31,"),this.dataMap.set("T","71,"),this.dataMap.set("C","5,"),this.dataMap.set("L","37,"),this.dataMap.set("U","73,"),this.dataMap.set("D","7,"),this.dataMap.set("M","41,"),this.dataMap.set("V","79,"),this.dataMap.set("E","11,"),this.dataMap.set("N","43,"),this.dataMap.set("W","83,"),this.dataMap.set("F","13,"),this.dataMap.set("O","47,"),this.dataMap.set("X","89,"),this.dataMap.set("G","17,"),this.dataMap.set("P","53,"),this.dataMap.set("Y","97,"),this.dataMap.set("H","19,"),this.dataMap.set("Q","59,"),this.dataMap.set("Z","101,"),this.dataMap.set("I","23,"),this.dataMap.set("R","61,"),this.dataMap.set("a","103,"),this.dataMap.set("j","151,"),this.dataMap.set("s","157,"),this.dataMap.set("b","107,"),this.dataMap.set("k","163,"),this.dataMap.set("t","167,"),this.dataMap.set("c","109,"),this.dataMap.set("l","173,"),this.dataMap.set("u","179,"),this.dataMap.set("d","113,"),this.dataMap.set("m","181,"),this.dataMap.set("v","191,"),this.dataMap.set("e","127,"),this.dataMap.set("n","193,"),this.dataMap.set("w","227,"),this.dataMap.set("f","132,"),this.dataMap.set("o","197,"),this.dataMap.set("x","229,"),this.dataMap.set("g","137,"),this.dataMap.set("p","199,"),this.dataMap.set("y","233,"),this.dataMap.set("h","139,"),this.dataMap.set("q","211,"),this.dataMap.set("z","239,"),this.dataMap.set("i","149,"),this.dataMap.set("r","223,"),this.dataMap.set("0","Z,"),this.dataMap.set("1","Y,"),this.dataMap.set("2","X,"),this.dataMap.set("3","W,"),this.dataMap.set("4","V,"),this.dataMap.set("5","U,"),this.dataMap.set("6","T,"),this.dataMap.set("7","S,"),this.dataMap.set("8","R,"),this.dataMap.set("9","Q,"),this.dataMap.set(",","&"),this.dataMap.set("{","1000,"),this.dataMap.set("}","0000,")}return t.prototype.ofusquedData=function(t){for(var e="",n=t.toString().split(""),a=0;a<n.length;a++){var o=n[a].toString();this.dataMap.has(o)?e+=this.dataMap.get(o).toString():e+=o+","}return e},t.prototype.decodeOfusquedData=function(t){for(var e="",n=t.split(","),a=0;a<n.length;a++)e+=this.readValueInMap(n[a]);return e.replaceAll("&",",").replaceAll(",1000","{")},t.prototype.readValueInMap=function(t){var e="",n=!0;return this.dataMap.forEach((function(a,o){t+","===a&&(e=o,n=!1)})),n&&(e=t),e},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}(),f=function(){function t(){}var n;return n=t,t.prototype.getData=function(){var t,e=new h;if(null!=localStorage.getItem("data")){if(localStorage.getItem("data").length<10)t=new Map(JSON.parse(localStorage.getItem("data")));else{var n=localStorage.getItem("data");n=e.decodeOfusquedData(n),console.log(JSON.stringify(n)),t=new Map(JSON.parse(n))}return t}},t.prototype.setData=function(t){if(localStorage.setItem("data",JSON.stringify(Array.from(t.entries()))),localStorage.getItem("data").length>20){var e=new h,n=localStorage.getItem("data").toString();localStorage.setItem("data",e.ofusquedData(n))}},t.prototype.initData=function(){this.setData(new Map)},t.prototype.putValue=function(t,e){var n=this.getData();n=n.set(t,e),this.setData(n)},t.prototype.addValue=function(t,e,n){var a=this.getValue(t),o=this.getData();a[e]=n,o=o.set(t,a),this.setData(o)},t.prototype.getValue=function(t){return this.getData()&&this.getData().has(t)?this.getData().get(t):void 0},t.prototype.hasValue=function(t){return null!=this.getData()?this.getData().has(t):null},t.prototype.clearMap=function(){if(this.hasValue(n.COMPANY_KEY)){var t=this.getValue(n.COMPANY_KEY);this.initData(),this.putValue(n.COMPANY_KEY,t)}else this.initData()},t.COMPANY_KEY="company",t.DOC_NUMBER_KEY="docNumber",t.DOC_TYPE_KEY="docType",t.PHONE_KEY="phone",t.TYPE_ATTENTION_KEY="typeAttention",t.OFFICE_KEY="office",t.TYPE_TURN_KEY="typeTurn",t.SERVICE_KEY="service",t.TURN_KEY="turn",t.PROGRAMED_TURN_KEY="programedTurn",t.REQUEST_CALL="requestCall",t.FORM_DATA="formdata",t.TEMPLATE="template",t.TURN_RESCHEDULE="turnReschedule",t.USER_GENDER="genderUser",t.AUTO_REDIRECT="autoRedirect",t.SCHEDULE_GENERAL="scheduleGeneral",t.AGENDAMIENTO_TTP="potencialCustomer",t.SINGLE_PAGE_ONE="singlePageOne",t.AVAILABLE_SCHEDULE_GRAL="availableScheduleGral",t.PROFILE="profile",t.PAGE_NEXT="pageNext",t.STEPS="steps",t.TYPE_TURN_ID="typeTurnId",t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=n=u([e.Injectable({providedIn:"root"})],t)}(),g=i,y=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.DELIMITER="/",e}return d(n,t),n.prototype.fromModel=function(t){if(t){var e=t.split(this.DELIMITER);return{day:parseInt(e[0],10),month:parseInt(e[1],10),year:parseInt(e[2],10)}}return null},n.prototype.toModel=function(t){return t?(t.day<10?0+t.day:t.day)+this.DELIMITER+(t.month<10?0+t.month:t.month)+this.DELIMITER+t.year:""},n=u([e.Injectable()],n)}(o.NgbDateAdapter),v=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.DELIMITER="/",e}return d(n,t),n.prototype.parse=function(t){if(t){var e=t.split(this.DELIMITER);return{day:parseInt(e[0],10),month:parseInt(e[1],10),year:parseInt(e[2],10)}}return null},n.prototype.format=function(t){return t?(t.day<10?"0"+t.day:t.day)+this.DELIMITER+(t.month<10?"0"+t.month:t.month)+this.DELIMITER+t.year:""},n=u([e.Injectable()],n)}(o.NgbDateParserFormatter),x={es:{weekdays:["Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],weekLabel:"sem"}},b=function(){function t(){this.language="es"}return t=u([e.Injectable()],t)}(),q=function(t){function n(e){var n=t.call(this)||this;return n._i18n=e,n}return d(n,t),n.prototype.getWeekdayLabel=function(t){return x[this._i18n.language].weekdays[t-1]},n.prototype.getWeekLabel=function(){return x[this._i18n.language].weekLabel},n.prototype.getMonthShortName=function(t){return x[this._i18n.language].months[t-1]},n.prototype.getMonthFullName=function(t){return this.getMonthShortName(t)},n.prototype.getDayAriaLabel=function(t){return t.day+"-"+t.month+"-"+t.year},n.prototype.getWeekdayShortName=function(t){return x[this._i18n.language].weekdays[t-1]},n.ctorParameters=function(){return[{type:b}]},n=u([e.Injectable()],n)}(o.NgbDatepickerI18n),F=function(){function t(t,a){this.data=t,this.http=a,this.response=new e.EventEmitter,this.summit=new e.EventEmitter,this.viewAuthData=new e.EventEmitter,this.tipodocNumDoc=!1,this.countSubmit=0,this.watchValid=!1,this.watchRequired=!1,this.captchaValid=!1,this.today=g(new Date),this.maxYear=this.today.year(),this.minYear=this.today.year()-82,this.minDate=this.minYear.toString()+"-"+this.today.month().toString().padStart(2,"0")+"-"+this.today.date().toString().padStart(2,"0"),this.maxDate=this.maxYear.toString()+"-"+(this.today.month()+1).toString().padStart(2,"0")+"-"+this.today.date().toString().padStart(2,"0"),this.recharge=!1,this.indicativo="57",this.defaultDocType="Cédula de ciudadanía",this.patternNotValidDcto=!1,this.patternNotValidCel=!1,this.range=new n.FormGroup({start:new n.FormControl,end:new n.FormControl})}return t.prototype.ngOnInit=function(){var t=this;this.minDate=new Date(this.minDate).toISOString().split("T")[0],setTimeout((function(){t.startComponent()}),2e3)},t.prototype.startComponent=function(){var t,e,n=this;if(null!=this.dataForm&&null!=this.dataForm.formQuestions){this.tipodocNumDoc=!(!this.dataForm.formQuestions.some((function(t){return"tipoDoc"===t.question.value}))||!this.dataForm.formQuestions.some((function(t){return"numeroDoc"===t.question.value}))),this.dataForm.formQuestions=this.dataForm.formQuestions.sort((function(t,e){return t.order-e.order})),0==this.dataForm.formQuestions.filter((function(t){return 6==t.question.questionType.id})).length&&(this.captchaValid=!0);var a=function(t){null!=t.question.maxlength&&null!=t.question.maxlength&&0!=t.question.maxlength||(t.question.maxlength=524288),null!=t.question.minLength&&null!=t.question.minLength||(t.question.minLength=0),o.dataReloadForm.forEach((function(e){n.filldata=e,2!==t.question.questionType.id&&1!==t.question.questionType.id&&3!==t.question.questionType.id||null===n.filldata.data||void 0===n.filldata.data||t.question.id!==n.filldata.id||(t.question.registred=n.filldata.data)})),null!=t.question.registred&&null!=t.question.minLength||(t.question.registred="")},o=this;try{for(var i=m(this.dataForm.formQuestions),r=i.next();!r.done;r=i.next()){a(r.value)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}},t.prototype.resolvedCaptcha=function(t){this.captchaValid=!0,this.formDynamic.form.value.captcha||(this.formDynamic.controls.captcha.setValue(t),this.formDynamic.form.value.captcha=t,document.getElementById("btnIng").style.opacity=this.formDynamic.valid?"1":"0.65")},t.prototype.trackByIndex=function(t,e){return t},t.prototype.onChangeValidPatter=function(t,e){var n=this;if(null!=e.pattern){var a=!0;try{if(![8,32,37,38,39,40,46,9].includes(t.keyCode))a=new RegExp(e.pattern).test(t.key)}catch(t){}return a}void 0!==e.questionType&&"Number"===e.questionType.description&&("numeroDoc"===e.value?this.validateNumeroDocumento(this.formDynamic.controls.numeroDoc.value.toString()):"celular"===e.value&&this.validateCelular(this.formDynamic.controls.celular.value.toString())),document.getElementById("char"+e.value).setAttribute("hidden","true"),11!=e.questionType.id&&7!=e.questionType.id&&(this.validMinLength(this.formDynamic,e)?(document.getElementById(e.value).style.borderColor="#FF0000",document.getElementById("ml"+e.value).removeAttribute("hidden")):(document.getElementById(e.value).style.borderColor="#E4E4E4",document.getElementById("ml"+e.value).setAttribute("hidden","true")),this.validMaxLength(this.formDynamic,e)?(document.getElementById(e.value).style.borderColor="#FF0000",document.getElementById("mxl"+e.value).removeAttribute("hidden")):(document.getElementById(e.value).style.borderColor="#E4E4E4",document.getElementById("mxl"+e.value).setAttribute("hidden","true"))),this.dataForm.formQuestions.forEach((function(t){switch(t.question.questionType.id){case 7:7==e.questionType.id&&n.calendarRulesValidate(t);break;case 11:11==e.questionType.id&&n.emailRulesValidate(t)}})),document.getElementById("btnIng").style.opacity=this.formDynamic.valid?"1":"0.65"},t.prototype.validOnlyText=function(t){return 32==t.charCode||/^[a-zA-Z\u00C0-\u017F]+$/g.test(t.key)},t.prototype.validDate=function(t){var e=!0;return null===String(t.key).match(p.date.exp)&&(e=!1),e},t.prototype.onChangeValidDate=function(t){return new RegExp(/[0-9]|\//).test(t.key)},t.prototype.rediretoutside=function(t,e){try{t.preventDefault(),window.open(e.value,"_blank")}catch(t){}},t.prototype.ngOnChanges=function(t){this.countSubmit++},t.prototype.onSubmit=function(){var t=this,e=this.formDynamic;if(this.watchValid=!0,this.watchRequired=!0,e.valid&&!this.validRulesFields(e.controls.numeroDoc.value.toString(),e.controls.celular.value.toString(),e.controls.email.value))return!1;this.validMinlenghtAllQuestions(e.value)&&this.validMaxLengthAllQuestions(e.value)&&e.valid&&(""!=this.dataForm.urlSend&&this.captchaValid?this.http.post(this.dataForm.urlSend,e.value).subscribe((function(e){return t.response.emit(e)})):e.valid&&this.captchaValid&&this.summit.emit(e.value))},t.prototype.findParamBoolean=function(t,e){var n=t.find((function(t){return t.id==e}));return null!=n&&"true"==n.value},t.prototype.validRulesFields=function(t,e,n){var a=this,o=document.getElementById("charcelular"),i=document.getElementById("charnumeroDoc"),r=!0;if("+57"==this.indicativo||"57"==this.indicativo){var s=this.orderString(t);"CLARO"!==this.nameCompany.toUpperCase()&&t==s&&(i.style.borderColor="#FF0000",i.removeAttribute("hidden"),i.textContent="El numero documento No debe contener caracteres consecutivos",r=!1),"3"!=e.substring(0,1)&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El primer carácter del celular debe ser 3",r=!1);for(var l=t.substring(0,1),d=1;d<t.length;d++)l+=t.substring(0,1);if(t==l&&(i.style.borderColor="#FF0000",i.removeAttribute("hidden"),i.textContent="Caracteres numéricos no se pueden repetirse de manera continua ",r=!1),!this.validateNumeroDocumento(t))return!1;if(!this.validateCelular(e))return!1;var u=Array.from(String(e),Number);1==function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}(new Set(u)).length&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El número que ingresa no es valido",r=!1)}else"+593"!=this.indicativo&&"593"!=this.indicativo||"9"!=e.substring(0,1)&&(o.style.borderColor="#FF0000",o.removeAttribute("hidden"),o.textContent="El primer carácter del celular debe ser 9",r=!1);return this.dataForm.formQuestions.forEach((function(t){switch(t.question.questionType.id){case 11:r=a.emailRulesValidate(t)}})),r},t.prototype.orderString=function(t){for(var e=[],n=0;n<t.length;n++)e.push(parseInt(t.substring(n,n+1)));e.sort((function(t,e){return t-e}));var a="";a=e[0];for(n=1;n<e.length;n++)a+=(e[0]+n).toString();return a},t.prototype.validMinlenghtAllQuestions=function(t){var e,n;try{for(var a=m(this.dataForm.formQuestions),o=a.next();!o.done;o=a.next()){var i=o.value;if(1==i.question.questionType.id||2==i.question.questionType.id){var r=parseInt(i.question.minLength),s=parseInt(t[i.question.value].toString().length);if(r>0&&s!=r&&s<r)return!1}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return!0},t.prototype.validMaxLengthAllQuestions=function(t){var e,n;try{for(var a=m(this.dataForm.formQuestions),o=a.next();!o.done;o=a.next()){var i=o.value;if(1==i.question.questionType.id||2==i.question.questionType.id){var r=parseInt(i.question.maxLength),s=parseInt(t[i.question.value].toString().length);if(r>0&&s!=r&&s>r)return!1}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return!0},t.prototype.validRequired=function(t,e){try{if(null!=e&&null!=e.value&&null!=t.controls[e.value]&&null!=t.controls[e.value].errors&&t.controls[e.value].errors.required)return!0}catch(t){}return!1},t.prototype.validMinLength=function(t,e){try{if(null!=e&&null!=e.value&&e.minLength>t.controls[e.value].value.toLocaleString().length&&e.minLength>0)return!0}catch(t){}return!1},t.prototype.validMaxLength=function(t,e){try{if(null!=e&&null!=e.value&&e.maxLength>0&&e.maxLength+1<=t.controls[e.value].value.toString().replace(/\./g,"").length)return this.formDynamic.controls[e.value].hasError("errorMaxLength")||this.formDynamic.controls[e.value].setErrors({errorMaxLength:!0}),!0}catch(t){}return!1},t.prototype.tycSelection=function(t){this.viewAuthData.emit(t)},t.prototype.openLabelUrl=function(t,e){t.preventDefault(),document.getElementById("check"+e.id).style.color="#A3AD32",window.open(e.urllabel,"_blank")},t.prototype.cancellKeypress=function(){return!1},t.prototype.emailRulesValidate=function(t){var e=!0;try{var n=!1;document.getElementById(t.question.id).setAttribute("hidden","true");var a=document.getElementById(t.question.id),o=t.question.registred;if(n||!t.question.required||""!=o&&null!=o&&null!=o||(a.style.borderColor="#FF0000",a.textContent="El correco eléctronico es requerido",a.removeAttribute("hidden"),e=!1,n=!0),n||this.validMinLength(void 0,t.question)&&(a.style.borderColor="#FF0000",a.textContent="Debe ser mínimo de "+t.question.minLength+" caracteres",document.getElementById(t.question.id).removeAttribute("hidden"),e=!1,n=!0),n||this.validMaxLength(void 0,t.question)&&(a.style.borderColor="#FF0000",a.textContent="Debe ser maximo de "+t.question.maxLength+" caracteres",document.getElementById(t.question.id).removeAttribute("hidden"),e=!1,n=!0),!n)null==String(o).match(p.email.exp)&&(a.style.borderColor="#FF0000",a.textContent="Tu email es invalido",a.removeAttribute("hidden"),e=!1,n=!0)}catch(t){}return e},t.prototype.calendarRulesValidate=function(t){try{document.getElementById(t.question.id).setAttribute("hidden","true");var e=document.getElementById(t.question.id),n=t.question.registred;!t.question.required||""!=n&&null!=n&&null!=n||(e.style.borderColor="#FF0000",e.textContent="La fecha es requerida",e.removeAttribute("hidden"))}catch(t){}},t.prototype.validateNotSpace=function(t){return 32!=t.charCode},t.prototype.validateNumeroDocumento=function(t){return t.match("^[0-9]*$")?(this.patternNotValidDcto=!1,!0):(this.formDynamic.controls.numeroDoc.setValidators([n.Validators.pattern("^[0-9]*$")]),this.formDynamic.controls.numeroDoc.markAsDirty(),this.formDynamic.controls.numeroDoc.updateValueAndValidity(),this.formDynamic.controls.numeroDoc.markAsTouched(),this.patternNotValidDcto=!0,!1)},t.prototype.validateCelular=function(t){return t.match("^[0-9]*$")?(this.patternNotValidCel=!1,!0):(this.formDynamic.controls.celular.setValidators([n.Validators.pattern("^[0-9]*$")]),this.formDynamic.controls.celular.markAsDirty(),this.formDynamic.controls.celular.updateValueAndValidity(),this.formDynamic.controls.celular.markAsTouched(),this.patternNotValidCel=!0,!1)},t.prototype.onkeypress=function(t){return 0==t.charCode?null:t.charCode>=48&&t.charCode<=57},t.prototype.onChangeStep=function(t,e,n){e&&1!=e.stepOrder&&(this.resetField(t),e.viewData=[],e.viewData=e.stepData.filter((function(t){return t.relationalIds.includes(Number(n))})))},t.prototype.resetField=function(t){this.steps.forEach((function(e){e.stepOrder>t.stepOrder&&(e.viewData=void 0,e.value=void 0)}))},t.ctorParameters=function(){return[{type:f},{type:a.HttpClient}]},u([e.Input()],t.prototype,"dataClassCss",void 0),u([e.Input()],t.prototype,"dataForm",void 0),u([e.Input()],t.prototype,"clickSubmit",void 0),u([e.Input()],t.prototype,"dataReloadForm",void 0),u([e.Input()],t.prototype,"welcomeTitle",void 0),u([e.Input()],t.prototype,"welcomeDescription",void 0),u([e.Input()],t.prototype,"urlPdf",void 0),u([e.Input()],t.prototype,"nameCompany",void 0),u([e.Input()],t.prototype,"schedule",void 0),u([e.Input()],t.prototype,"isSimpleFlow",void 0),u([e.Input()],t.prototype,"steps",void 0),u([e.ViewChild("formDynamic",{static:!0})],t.prototype,"formDynamic",void 0),u([e.Output()],t.prototype,"response",void 0),u([e.Output()],t.prototype,"summit",void 0),u([e.Output()],t.prototype,"viewAuthData",void 0),t=u([e.Component({selector:"lib-FormAurora",template:'<div class="card">\n <span class="text-center mt-2 d-none d-sm-block" *ngIf="!isSimpleFlow">\n <img style="width: 115px; height:96px;" [class]="dataClassCss.logo" id="logo">\n </span>\n <div class="text-center mt-2 d-none d-sm-block" *ngIf="isSimpleFlow" style="margin-top: 4%!important;">\n </div>\n <div class="card-body pt-0">\n <ng-container *ngIf="schedule">\n <h4 class="card-title text-center mb-0" [class]="dataClassCss.bienvenida2" style="color: #EE7E0E;">\n Horarios de atención\n </h4>\n <small class="text-center d-block">{{schedule}}</small>\n </ng-container>\n <form #formDynamic="ngForm">\n <div *ngFor="let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex">\n <div\n *ngIf="(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp">\n <div class="row"\n *ngIf="(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))">\n <div class="col-lg-6 col-xs-12">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index - 1].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span class="h6 small bg-white text-muted">{{dataForm.formQuestions[index -\n 1].question.label}}</span>\n </label>\n <div class="selectContainer">\n <select [name]="dataForm.formQuestions[index - 1].question.value"\n [required]="dataForm.formQuestions[index - 1].question.required"\n [class]="dataClassCss.formcontrol"\n id="{{dataForm.formQuestions[index - 1].question.value}}"\n style="margin-top: -1rem !important;"\n [(ngModel)]="defaultDocType !== \'\' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor="let item of dataForm.formQuestions[index - 1].question.questionAnswers">\n <option *ngIf="item.answer.state.id == 1" [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index-1].question.value"\n hidden></span>\n </div>\n </div>\n <div class="col-lg-6 col-xs-12">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}"\n class="col-sm-12 p-sm-0 px-sm-1" style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" pattern="\\d*" inputmode="numeric"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [name]="dataForm.formQuestions[index].question.value" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keyup)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n onkeypress="onkeypress($event)" onkeyup="(this.value=(value.replace(/[.]*/g,\'\')))"\n maxlength="dataForm.formQuestions[index].question.maxLength"\n [minLength]="dataForm.formQuestions[index].question.minLength"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol" />\n\n </div>\n\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'rq\'+dataForm.formQuestions[index].question.value"\n *ngIf="validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid">\n Este campo es obligatorio</span>\n <span class="error" [id]="\'ml\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser mínimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class="error" [id]="\'mxl\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index].question.value"\n hidden></span>\n <span *ngIf="patternNotValidDcto === true" class="error">Formato no valido</span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #switchTemp>\n <div [ngSwitch]="dataForm.formQuestions[index].question.questionType.id">\n <div *ngSwitchCase="1">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchCase="2">\n\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" pattern="\\d*" inputmode="numeric"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [name]="dataForm.formQuestions[index].question.value" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n onkeypress="onkeypress($event)" onkeyup="(this.value=(value.replace(/[.]*/g,\'\')))"\n maxlength="dataForm.formQuestions[index].question.maxLength"\n [minLength]="dataForm.formQuestions[index].question.minLength"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol" />\n <span *ngIf="patternNotValidCel === true" class="error">Formato no valido</span>\n </div>\n\n </div>\n <div *ngSwitchCase="3">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left;">\n <span\n class="h6 small bg-white text-muted">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <select [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [class]="dataClassCss.formcontrol"\n id="{{dataForm.formQuestions[index].question.value}}"\n style="margin-top: -1rem !important;"\n [(ngModel)]="defaultDocType !== \'\' ? defaultDocType : dataForm.formQuestions[index].question.registred">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor="let item of dataForm.formQuestions[index].question.questionAnswers">\n <option *ngIf="item.answer.state.id == 1" [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div *ngSwitchCase="4">\n <select class="{{ dataClassCss.formcontrol }} select-checkbox"\n style="overflow: hidden; border-style: hidden;"\n [style.height.px]="dataForm.formQuestions[index].question.questionAnswers.length * 24"\n [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required" ngModel multiple>\n <option (mousemove)="$event.preventDefault()"\n *ngFor="let item of dataForm.formQuestions[index].question.questionAnswers"\n [value]="item.answer.value">\n {{ item.answer.field }}\n </option>\n </select>\n </div>\n <div *ngSwitchCase="5">\n <a (click)="rediretoutside($event,dataForm.formQuestions[index].question)" href="">\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\n </a>\n </div>\n <div *ngSwitchCase="6">\n <div [class]="dataClassCss.cl12" [id]="\'reCaptcha\'">\n <div class="cnt-captcha">\n <re-captcha (resolved)="resolvedCaptcha($event)"\n siteKey="6Lf9DcQfAAAAAI6HCNB5OyKUpOPpfl5ocoBJcigZ"></re-captcha>\n <input hidden type="text" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred">\n </div>\n <span class="error" *ngIf="watchValid && !captchaValid" style="margin-top: 0;">\n Debe resolver la captcha para continuar\n </span>\n </div>\n </div>\n <div *ngSwitchCase="7">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; margin-bottom: 0 ;">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input placeholder="dd/mm/aaaa" style="margin-top: -0.4rem !important;"\n [required]="dataForm.formQuestions[index].question.required"\n [name]="dataForm.formQuestions[index].question.value" type="date" min="{{minDate}}"\n max="{{maxDate}}" [maxlength]="10" (paste)="false"\n id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.txtCalendar"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n (keydown)="cancellKeypress()"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)">\n\n <button class="btn" id="{{dataForm.formQuestions[index].question.value}}" type="button"\n style="width: 46px;\n top: 12px;\n color: white;\n right: 15px;\n position: absolute;\n background: #D25D42;\n pointer-events: none;">\n <i class="fa fa-calendar"></i>\n </button>\n\n </div>\n </div>\n <div *ngSwitchCase="8">\n <div [class]="dataClassCss.cl12" style="text-align: left; margin-bottom: 10px;">\n <input\n style="width: 4% !important; height: auto !important; display: inline !important;"\n type="checkbox" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n [class]="dataClassCss.formcontrol">\n <a target="_blank" style="text-decoration: underline;color:blue;cursor: pointer;"\n id="txtPoliticas" (click)="tycSelection($event)">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase="9">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keypress)="validOnlyText($event)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchCase="10">\n <div [class]="dataClassCss.cl12" style="text-align: left; margin-bottom: 10px;">\n <input\n style="width: 4% !important; height: auto !important; display: inline !important;"\n type="checkbox" [name]="dataForm.formQuestions[index].question.value"\n [required]="dataForm.formQuestions[index].question.required"\n [(ngModel)]="dataForm.formQuestions[index].question.registred">\n <a target="_blank" style="text-decoration: underline;color:blue;cursor: pointer;"\n id="check{{dataForm.formQuestions[index].question.id}}"\n (click)="openLabelUrl($event,dataForm.formQuestions[index].question)">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase="11">\n <div [class]="dataClassCss.cl12">\n <label for="{{dataForm.formQuestions[index].question.value}}" class="col-sm-12"\n style="display: block; text-align: left; ">\n <span\n class="h6 small bg-white text-muted pt-1 pl-2 pr-2">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type="text" id="{{dataForm.formQuestions[index].question.value}}"\n [class]="dataClassCss.formcontrol" placeholder="Escribe"\n [required]="dataForm.formQuestions[index].question.required"\n [maxlength]="dataForm.formQuestions[index].question.maxLength"\n [name]="dataForm.formQuestions[index].question.value"\n (keydown)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (change)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (blur)="onChangeValidPatter($event, dataForm.formQuestions[index].question)"\n (keypress)="validateNotSpace($event)"\n [(ngModel)]="dataForm.formQuestions[index].question.registred"\n style="margin-top: -1rem !important;" />\n </div>\n </div>\n <div *ngSwitchDefault>Tipo de control no detectado</div>\n <div style="margin-left: 15px;"\n *ngIf="dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6">\n <span class="error" [id]="\'rq\'+dataForm.formQuestions[index].question.value"\n *ngIf="validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid">\n Este campo es obligatorio</span>\n <span class="error" [id]="\'ml\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser mínimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class="error" [id]="\'mxl\'+dataForm.formQuestions[index].question.value" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class="error" [id]="\'char\'+dataForm.formQuestions[index].question.value"\n hidden></span>\n <span class="error" [id]="dataForm.formQuestions[index].question.id" hidden></span>\n </div>\n </div>\n </ng-template>\n </div>\n <section *ngIf="isSimpleFlow">\n <div *ngFor="let step of steps let index = index;">\n <div [class]="dataClassCss.cl12" *ngIf="step.viewData">\n <label for="{{step.id}}" class="col-sm-12" style="display: block; text-align: left;">\n <span class="h6 small bg-white text-muted">{{step.step}}</span>\n </label>\n <select [name]="step.step" [required]="true" [class]="dataClassCss.formcontrol"\n id="{{step.step}}" style="margin-top: -1rem !important;" [(ngModel)]="step.value"\n (ngModelChange)="onChangeStep(step,steps[index+1],$event)">\n <option value="" selected disabled hidden>Selecciona</option>\n <ng-container *ngFor="let subitem of step.viewData">\n <option [value]="subitem.id">\n {{ subitem.description }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n </section>\n <div class="mt-3 text-center">\n <button type="button" [class]="dataClassCss.btn" (click)="onSubmit()" [disabled]="!formDynamic.valid"\n id="btnIng">Ingresar</button>\n </div>\n </form>\n </div>\n</div>',providers:[{provide:o.NgbDateAdapter,useClass:y},{provide:o.NgbDateParserFormatter,useClass:v},{provide:o.NgbDatepickerI18n,useClass:q},b],styles:['form{font-size:12px;overflow-y:scroll;overflow-x:hidden}form input,form select{border:1px solid #e4e4e4;height:40px;margin-bottom:5px}.selectContainer select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectContainer::after{content:"\\025be";display:table-cell;text-align:center;padding-top:7px;width:30px;height:30px;position:absolute;top:14px;right:20px;pointer-events:none}form .error{color:red;font-size:12px;text-align:left;margin:-15px 0 15px;padding:0;width:90%}.error:after{content:" ";display:block}.card{width:90%;margin:2% auto;border-radius:12px}@media (max-width:412px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:575.98px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:880.98px){.cnt-captcha{transform:scale(.82)}}input[type=date]::-webkit-calendar-picker-indicator{background:0 0;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f5f5f5}::-webkit-scrollbar-thumb{background:#e0e0e0}::-webkit-scrollbar-thumb:hover{background:#bdbdbd}']})],t)}(),C=function(){function t(t){this.http=t}return t.prototype.getTemplate=function(t,e){return this.http.get(e+"/template/findByCompany/"+t)},t.prototype.reloadStylePage=function(t,e){for(var n,a,o=t.getElementsByClassName("template"),i=0;i<o.length;i++){var r=o[i],s="object"==typeof r.className?r.className.baseVal:r.className,l=s.indexOf("template"),d=s.substring(l,s.length).split(" ").filter((function(t){return-1!==t.indexOf("tmp_")}));try{for(var u=(n=void 0,m(d)),c=u.next();!c.done;c=u.next()){var p=c.value;null!=e[p]&&(p.includes("tmp_type_text_")&&(p.includes("tmp_type_text_6")?r.style.setProperty("--"+p,e[p].color):(r.style.color=e[p].color,s.includes("ratting-faces-v2")&&(r.style.backgroundColor=e[p].color,r.style.borderColor=e[p].color,r.style.color="white"))),p.includes("title1")&&(r.style.color="#EE7E0E"),p.includes("tmp_type_svg_")&&(r.style.fill=e[p].fill),p.includes("tmp_type_img_")&&("IMG"==r.nodeName?r.src=e[p].src:(r.style.background=e[p].background,r.style.backgroundSize=e[p].backgroundSize)),p.includes("tmp_type_head_")&&r.style.setProperty("--"+p,e[p].color),p.includes("tmp_type_footer_")&&r.style.setProperty("--"+p,e[p].color),s.includes("tmp_type_cnt_")&&(l=s.indexOf("tmp_type_cnt_"),e[p=s.substring(l,s.length).split(" ")[0]]&&(r.style.backgroundColor=e[p].backgroundColor)),p.includes("tmp_type_font_")&&r.style.setProperty("font-family",e[p]["font-family"],"important"))}}catch(t){n={error:t}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}},t.ctorParameters=function(){return[{type:a.HttpClient}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(a.HttpClient))},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}(),Q=function(){},D=function(){function t(){}return t=u([e.NgModule({declarations:[F],imports:[r.CommonModule,n.FormsModule,s.RecaptchaModule,s.RecaptchaFormsModule],exports:[F]})],t)}();t.CommonDataService=f,t.CommonTemplateService=C,t.CustomAdapter=y,t.CustomDateParserFormatter=v,t.CustomDatepickerI18n=q,t.Fill=Q,t.FormAuroraComponent=F,t.FormAuroraModule=D,t.I18n=b,t.regexType=p,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=form-aurora-stefanini.umd.min.js.map