{"version":3,"sources":["webpack:///./src/lib/components/Input/DfInput.vue","webpack:///src/lib/components/Input/DfInput.vue","webpack:///./src/lib/components/Input/DfInput.vue?fb1d","webpack:///./src/lib/components/Input/DfInput.vue?fafb","webpack:///./src/lib/components/Input/DfInput.vue?e4d5","webpack:///./src/utils/formValidations.js"],"names":["_c","_self","staticClass","label","attrs","counter","disabled","_vm","loading","maxLength","rules","suffix","modifiedType","validate","scopedSlots","_u","fn","key","model","callback","currentValue","expression","$listeners","staticRenderFns","name","props","backgroundColor","default","colors","colorBackgroundLight","type","String","Number","Boolean","icon","leftIcon","placeholder","Array","validator","value","includes","data","errorMessage","hasRequiredRule","showPassword","created","_this","some","rule","required","computed","appendIcon","computedBackgroundColor","color","colorBackgroundDisabled","get","set","newValue","isAlphabet","$emit","methods","eraseTabValue","zeroValue","dotValue","currValue","keyCode","$t","component","i18n","t","equalPasswords","comparisonValue","_value","length","minLength","_value2","mandatoryPasswordCharacters","upperCaseLowerCaseAndNumbersRegex","test","text","validCardNumber","cleanedCardNumber","replace","sum","shouldDouble","i","digit","parseInt","charAt","validCardExpirationDate","expiry","month","substring","year","currentYear","Date","getFullYear","getMonth","validCPF","cleanedCPF","remainder","validEmail"],"mappings":"kIAA4CA,EAAOC,WAAS,MAAU,KAAOC,UAAY,GAAiC,OAAO,EAACC,MAAOH,CAAgII,YAAM,mC,CAAC,QAAU,UAAY,yF,MAAC,CAAW,UAAS,aAAC,SAAuB,QAAc,oBAAS,GAAC,YAA6B,QAA+C,cAAcC,aAAQ,mBAAeC,EAAQ,wBAAC,kBAAkC,SAAUC,EAAIC,SAAQ,iBAAgBC,eAAU,UAAcF,QAAgB,UAAYG,YAAM,YAAaC,cAAO,MAAOJ,EAAIK,MAAa,gBAAG,KAAC,gB,GAAiCL,CAAoC,eAAC,YAAC,gBAAcM,gBAAUC,QAAYP,EAAIQ,U,YAAqB,EAADC,GAAW,E,IAAC,S,GAA2Cd,W,MAAsC,GAAC,4B,YAAW,qBAAK,OAAG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bA,IAAiBA,EAAY,GAChDA,GAAab,SAASY,EAAWP,UAAU,EAAG,KAChD,OAAOxB,OAAKC,EAAE,uCAChBc,EAAM,EACN,IAAK,IAAIE,EAAI,EAAGA,GAAK,GAAIA,IACvBF,GAAYI,SAASY,EAAWP,UAAUP,EAAI,EAAGA,KAAO,GAAKA,GAG/D,OAFAe,EAAmB,GAANjB,EAAY,GACR,IAAbiB,GAAgC,IAAbA,IAAiBA,EAAY,GAChDA,GAAab,SAASY,EAAWP,UAAU,GAAI,MAC1CxB,OAAKC,EAAE,uCAIX,SAASgC,EAAW9D,GACzB,MAAO,YAAYuC,KAAKvC,IAAU6B,OAAKC,EAAE","file":"js/chunk-7329ef9a.a671b1f2.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"df-flex-sm df-flex-col df-input\"},[(_vm.label)?_c('h3',[_vm._v(_vm._s(_vm.label)),(_vm.hasRequiredRule)?_c('span',[_vm._v(\"*\")]):_vm._e()]):_vm._e(),_c('v-text-field',_vm._g({attrs:{\"data-cy\":\"text-field\",\"dense\":\"\",\"flat\":\"\",\"hide-spin-buttons\":\"\",\"outlined\":\"\",\"solo\":\"\",\"append-icon\":_vm.appendIcon,\"background-color\":_vm.computedBackgroundColor,\"counter\":_vm.counter,\"disabled\":_vm.disabled,\"error-messages\":_vm.errorMessage,\"loading\":_vm.loading,\"maxlength\":_vm.maxLength,\"placeholder\":_vm.placeholder,\"rules\":_vm.rules,\"suffix\":_vm.suffix,\"type\":_vm.modifiedType},on:{\"click:append\":function($event){_vm.showPassword = !_vm.showPassword},\"keydown\":_vm.validate},scopedSlots:_vm._u([{key:\"append\",fn:function(){return [(_vm.icon)?_c('font-awesome-icon',{staticClass:\"append-inner__icon\",attrs:{\"icon\":_vm.icon}}):_vm._e()]},proxy:true},{key:\"prepend-inner\",fn:function(){return [(_vm.leftIcon)?_c('font-awesome-icon',{staticClass:\"prepend-inner__icon\",attrs:{\"icon\":_vm.leftIcon}}):_vm._e()]},proxy:true}]),model:{value:(_vm.currentValue),callback:function ($$v) {_vm.currentValue=$$v},expression:\"currentValue\"}},_vm.$listeners))],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./DfInput.vue?vue&type=template&id=b292c2e6&scoped=true\"\nimport script from \"./DfInput.vue?vue&type=script&lang=js\"\nexport * from \"./DfInput.vue?vue&type=script&lang=js\"\nimport style0 from \"./DfInput.vue?vue&type=style&index=0&id=b292c2e6&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b292c2e6\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=style&index=0&id=b292c2e6&prod&lang=scss&scoped=true\"","import i18n from '@/language'\n\nexport function required(value) {\n return !!value || value === false || i18n.t('campo_obrigatorio')\n}\n\nexport function equalPasswords(value, comparisonValue) {\n return value === comparisonValue\n ? true\n : i18n.t('validations.different_passwords')\n}\n\nexport function maxLength(value, maxLength) {\n if (typeof value === 'number') value = String(value)\n if (value?.length > maxLength)\n return i18n.t('validations.max_length', [maxLength])\n return true\n}\n\nexport function minLength(value, minLength) {\n if (typeof value === 'number') value = String(value)\n if (value?.length < minLength)\n return i18n.t('validations.min_length', [minLength])\n return true\n}\n\nexport function mandatoryPasswordCharacters(value) {\n const upperCaseLowerCaseAndNumbersRegex = /^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d).+$/\n\n return (\n upperCaseLowerCaseAndNumbersRegex.test(value) ||\n i18n.t('validations.wrong_password_characters')\n )\n}\n\nexport function text(value) {\n if (/^[a-zA-Zà-úÀ-ÚçÇ\\s]+$/.test(value)) return true\n return i18n.t('validations.text_only')\n}\n\nexport function validCardNumber(value) {\n const cleanedCardNumber = value.replace(/\\D/g, '')\n if (cleanedCardNumber.length < 14)\n return i18n.t('validations.card_number_length')\n let sum = 0\n let shouldDouble = false\n for (let i = cleanedCardNumber.length - 1; i >= 0; i--) {\n let digit = parseInt(cleanedCardNumber.charAt(i), 10)\n\n if (shouldDouble) {\n if ((digit *= 2) > 9) digit -= 9\n }\n\n sum += digit\n shouldDouble = !shouldDouble\n }\n\n if (sum % 10 === 0) return true\n return i18n.t('validations.invalid_card_number')\n}\n\nexport function validCardExpirationDate(value) {\n const expiry = value.replace(/\\D/g, '')\n let month = parseInt(expiry.substring(0, 2), 10)\n let year = parseInt(expiry.substring(2, 7), 10)\n\n if (month < 1 || month > 12) {\n return i18n.t('validations.invalid_month')\n }\n\n let currentYear = new Date().getFullYear()\n if (year < currentYear) {\n return i18n.t('validations.invalid_year')\n }\n if (year === currentYear && month < new Date().getMonth() + 1) {\n return i18n.t('validations.month_previous_than_current')\n }\n\n return true\n}\n\nexport function validCPF(value) {\n const cleanedCPF = value.replace(/\\D/g, '')\n if (cleanedCPF.length !== 11)\n return i18n.t('validations.document_number_length')\n let sum = 0\n let remainder\n if (\n cleanedCPF == '00000000000' ||\n cleanedCPF == '11111111111' ||\n cleanedCPF == '22222222222' ||\n cleanedCPF == '33333333333' ||\n cleanedCPF == '44444444444' ||\n cleanedCPF == '55555555555' ||\n cleanedCPF == '66666666666' ||\n cleanedCPF == '77777777777' ||\n cleanedCPF == '88888888888' ||\n cleanedCPF == '99999999999'\n ) {\n return i18n.t('validations.invalid_document_number')\n }\n for (let i = 1; i <= 9; i++)\n sum = sum + parseInt(cleanedCPF.substring(i - 1, i)) * (11 - i)\n remainder = (sum * 10) % 11\n if (remainder == 10 || remainder == 11) remainder = 0\n if (remainder != parseInt(cleanedCPF.substring(9, 10)))\n return i18n.t('validations.invalid_document_number')\n sum = 0\n for (let i = 1; i <= 10; i++)\n sum = sum + parseInt(cleanedCPF.substring(i - 1, i)) * (12 - i)\n remainder = (sum * 10) % 11\n if (remainder == 10 || remainder == 11) remainder = 0\n if (remainder != parseInt(cleanedCPF.substring(10, 11)))\n return i18n.t('validations.invalid_document_number')\n return true\n}\n\nexport function validEmail(value) {\n return /.+@.+\\..+/.test(value) || i18n.t('validations.invalid_email')\n}\n"],"sourceRoot":""}