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AAAtB,OACA,EACAI,gBAAA,eAAAmB,EACA,eAAAA,EAAA,KAAAJ,gBAAA,IAAAI,OAAA,EAAAA,EAAA5D,KAAA6D,SAAA,UACA,EACAnB,UAAA,eAAAoB,EACA,eAAAA,EAAA,KAAAf,oBAAA,IAAAe,OAAA,EAAAA,EAAAC,QAAA,CACA,IC7E6L,I,+BCA2B,EAAe,ICOnOC,GAAY,OACd,EACA,EACA,GACA,EACA,KACA,KACA,MAMoB,oBAAX,GAAuB,EAAOA,GAEzC,MAAeA,E,QCyBf,GACAhE,KAAA,eAEAiD,WAAA,CACAgB,QAAAA,EAAAA,GACAC,cAAAA,EAAAA,EACAC,eAAAA,EAAAA,GACAjB,QAAAA,EAAAA,GAEAkB,gBAAAA,EAAAA,EACAC,wBAAAA,EAAAA,EAEAC,kBAAAA,GAGAjB,MAAA,CACAhD,KAAAkE,OAGAb,SAAA,CACAnE,QAAA,WACA,YAAAE,cAAAsE,OAAA,CACA,EACAtE,cAAA,WACA,WAAA+E,EACA,KAAAnE,KACA,IAAAoE,EAAAA,EACA,KAAApE,KACAmE,EAAAE,cAAA,KAAArE,QAEAsE,KACA,IC9EiL,I,oBCA2B,EAAe,ICQvN,GAAY,OACd,EACA/F,EACAsB,GACA,EACA,KACA,WACA,MAMoB,oBAAX,GAAuB,EAAO,GAEzC,MAAe,E,2BCvBf7B,EAAOC,QAAU,SAAUC,GACzBA,EAAUC,QAAQC,OAASF,EAAUC,QAAQC,QAAU,GACvDF,EAAUC,QAAQC,OAAOC,KAAK,6ZACvBH,EAAUC,QAAQG,KAC3B,C","sources":["webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?c108","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/refusal-codes.manager.js","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue","webpack://company-webapp/src/views/Home/RefusalCodes/RefuseCodeTooltip.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?919e","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?8c58","webpack://company-webapp/./src/views/Home/RefusalCodes/RefuseCodeTooltip.vue?b340","webpack://company-webapp/src/views/Home/RefusalCodes/index.vue","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?e721","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?1b09","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?0b54","webpack://company-webapp/./src/views/Home/RefusalCodes/index.vue?df1c"],"sourcesContent":["module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"pt-BR\":{\"tooltip\":{\"title\":\"Códigos de motivos de recusa\"}},\"en-US\":{\"tooltip\":{\"title\":\"Refusal reason codes\"}}}')\n delete Component.options._Ctor\n}\n","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\n \"emd-card\",\n [\n _c(\n \"emd-card-header\",\n [\n _c(\"emd-text\", { attrs: { size: \"section\" } }, [\n _vm._v(\" \" + _vm._s(_vm.$t(\"refusalCodesTitle\")) + \" \"),\n ]),\n ],\n 1\n ),\n _c(\n \"emd-card-content\",\n { staticClass: \"card-content__refuse-codes\" },\n [\n _c(\n \"dash-card-content-fallback\",\n { attrs: { hasData: _vm.hasData } },\n _vm._l(_vm.refuseReasons, function (item) {\n return _c(\n \"dash-progress-bar\",\n {\n key: item.key,\n attrs: { value: item.percentage, color: item.color },\n },\n [\n _c(\"refusal-codes-icons\", {\n attrs: {\n \"data-icon\": item.leftIcon,\n \"tooltip-id\": \"acquirer_info-tippy-left\" + item.key,\n },\n }),\n _c(\"emd-text\", [_vm._v(_vm._s(_vm.$t(item.name)))]),\n _c(\"refusal-codes-icons\", {\n attrs: {\n \"data-icon\": item.rightIcon,\n \"tooltip-id\": \"acquirer_info-tippy-right\" + item.key,\n },\n }),\n ],\n 1\n )\n }),\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import MathManager from '../../../utils/math.manager'\n\nimport ACQUIRER_LABELS from '../Acquirer/acquirer.labels'\n\nclass RefusalCodes {\n dashProgressManager\n data\n\n constructor (data, dashProgressManager) {\n this.data = data\n this.dashProgressManager = dashProgressManager\n }\n\n defaultStructure = Object.keys(ACQUIRER_LABELS)\n\n /**\n * parseLabel takes in a single parameter label and returns a string value by matching the label parameter\n * with the key of an object validationLabel.\n * @param {String} label the label to convert\n * @returns String\n */\n parseLabel (label) {\n const validationLabel = {\n ...ACQUIRER_LABELS\n }\n return validationLabel[label]\n }\n\n static totalQuantity (list) {\n return MathManager.sumByKeys(list).quantity\n }\n\n adapter (defaultStructure, totalAcquirer) {\n const newList = this.data.map((acquirer, index) => {\n const item = { ...defaultStructure[acquirer.name], ...acquirer }\n\n const totalCodes = MathManager.sumByKeys(\n acquirer.buckets.return_code\n ).quantity\n\n const others = this.dashProgressManager.adapterTooltipRemaining(\n acquirer.buckets.return_code,\n totalCodes\n )\n\n return {\n ...item,\n name: this.parseLabel(item.name) ?? item.name,\n color: this.dashProgressManager.getColor(index),\n value: this.dashProgressManager.getCurrency(item.tpv),\n\n // We do this to make sure that we are doing the percentage based on each accquirer\n percentage: MathManager.percentageCalculator(\n item.quantity,\n totalAcquirer\n ),\n rightIcon: {\n name: 'tooltip',\n tooltip: others\n }\n }\n })\n\n return newList\n }\n\n /**\n * Executes all the methods\n * @returns Array\n */\n get () {\n const defaultStructure = this.dashProgressManager.createStructure(\n this.defaultStructure\n )\n\n const totalAcquirer = MathManager.sumByKeys(this.data).quantity\n\n return this.adapter(defaultStructure, totalAcquirer)\n }\n}\n\nexport default RefusalCodes\n","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _vm.showRefusalIcon\n ? _c(\n \"div\",\n { staticClass: \"eu-ml_1\" },\n [\n _vm.showTippy\n ? _c(\n \"emd-tippy\",\n {\n attrs: {\n position: \"top\",\n \"aria-expanded\": \"true\",\n type: \"html\",\n \"data-testid\": \"emd-tippy-dash-info-icon\",\n id: _vm.tooltipId,\n \"data-template\": _vm.tooltipId,\n },\n },\n [\n _c(\"em\", {\n staticClass: \"emd-text _color_success uil uil-info-circle\",\n }),\n _c(\n \"emd-tippy-template-HTML\",\n { attrs: { id: _vm.tooltipId } },\n [\n _c(\"emd-text\", { attrs: { size: \"tiny\" } }, [\n _vm._v(_vm._s(_vm.$t(\"tooltip.title\")) + \":\"),\n ]),\n _vm._l(_vm.tooltipItems, function (item) {\n return _c(\n \"emd-text\",\n {\n key: item.name,\n attrs: {\n size: \"tiny\",\n \"data-testid\": \"emd-text-dash-info-icon\",\n },\n },\n [\n _vm._v(\" \" + _vm._s(_vm.$t(item.name)) + \" \"),\n item.percentage\n ? _c(\"b\", { staticClass: \"_type_bold\" }, [\n _vm._v(\" - \" + _vm._s(item.percentage) + \"%\"),\n ])\n : _vm._e(),\n _c(\"br\"),\n ]\n )\n }),\n ],\n 2\n ),\n ],\n 1\n )\n : _vm._e(),\n ],\n 1\n )\n : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n \n \n \n \n {{ $t('tooltip.title') }}:\n \n {{ $t(item.name) }}\n \n - {{ item.percentage }}%\n \n \n \n \n \n\n\n\n\n\n {\n \"pt-BR\": {\n \"tooltip\": {\n \"title\": \"Códigos de motivos de recusa\"\n }\n },\n \"en-US\": {\n \"tooltip\": {\n \"title\": \"Refusal reason codes\"\n }\n }\n }\n\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=script&lang=js\"","import mod from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"; export default mod; export * from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"","import { render, staticRenderFns } from \"./RefuseCodeTooltip.vue?vue&type=template&id=6344c26f\"\nimport script from \"./RefuseCodeTooltip.vue?vue&type=script&lang=js\"\nexport * from \"./RefuseCodeTooltip.vue?vue&type=script&lang=js\"\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 null,\n null\n \n)\n\n/* custom blocks */\nimport block0 from \"./RefuseCodeTooltip.vue?vue&type=custom&index=0&blockType=i18n\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","\n \n \n {{ $t('refusalCodesTitle') }} \n \n\n \n \n \n \n\n {{ $t(item.name) }}\n\n \n \n \n \n \n\n\n\n\n\n\n\n {\n \"pt-BR\": {\n \"refusalCodesTitle\": \"Motivos de recusa por adquirente\",\n \"refusalCodesDescription\": \"5 principais códigos retornados pelas adquirentes em cobranças não autorizadas.\",\n \"refusalCodes\": {\n \"simulator\": \"Simulator\"\n }\n },\n \"en-US\": {\n \"refusalCodesTitle\": \"Major refusal codes by acquirer\",\n \"refusalCodesDescription\": \"5 main acquirers return code on unauthorized charges.\",\n \"refusalCodes\": {\n \"simulator\": \"Simulator\"\n }\n }\n }\n \n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import mod from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"; export default mod; export * from \"-!../../../../node_modules/@intlify/vue-i18n-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=custom&index=0&blockType=i18n\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=9318ab1c&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=9318ab1c&prod&scoped=true&lang=css\"\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 \"9318ab1c\",\n null\n \n)\n\n/* custom blocks */\nimport block0 from \"./index.vue?vue&type=custom&index=0&blockType=i18n\"\nif (typeof block0 === 'function') block0(component)\n\nexport default component.exports","module.exports = function (Component) {\n Component.options.__i18n = Component.options.__i18n || []\n Component.options.__i18n.push('{\"pt-BR\":{\"refusalCodesTitle\":\"Motivos de recusa por adquirente\",\"refusalCodesDescription\":\"5 principais códigos retornados pelas adquirentes em cobranças não autorizadas.\",\"refusalCodes\":{\"simulator\":\"Simulator\"}},\"en-US\":{\"refusalCodesTitle\":\"Major refusal codes by acquirer\",\"refusalCodesDescription\":\"5 main acquirers return code on unauthorized charges.\",\"refusalCodes\":{\"simulator\":\"Simulator\"}}}')\n delete Component.options._Ctor\n}\n"],"names":["module","exports","Component","options","__i18n","push","_Ctor","render","_vm","this","_c","_self","attrs","size","_v","_s","$t","staticClass","hasData","_l","refuseReasons","item","key","value","percentage","color","leftIcon","name","rightIcon","staticRenderFns","_withStripped","RefusalCodes","data","dashProgressManager","_classCallCheck","_defineProperty","Object","keys","ACQUIRER_LABELS","_createClass","label","validationLabel","_objectSpread","defaultStructure","totalAcquirer","_this","newList","map","acquirer","index","_this$parseLabel","totalCodes","MathManager","sumByKeys","buckets","return_code","quantity","others","adapterTooltipRemaining","parseLabel","getColor","getCurrency","tpv","percentageCalculator","tooltip","createStructure","adapter","list","showRefusalIcon","showTippy","position","type","id","tooltipId","tooltipItems","_e","components","EmdText","EmdTippy","EmdTippyTemplateHTML","props","String","default","dataIcon","required","computed","_this$dataIcon","_this$dataIcon2","includes","_this$tooltipItems","length","component","EmdCard","EmdCardHeader","EmdCardContent","DashProgressBar","DashCardContentFallback","RefusalCodesIcons","Array","RefusalCodesManager","DashProgressManager","totalQuantity","get"],"sourceRoot":""}