{"version":3,"sources":["webpack:///./node_modules/core-js/internals/string-pad.js","webpack:///./node_modules/core-js/modules/es.string.pad-start.js","webpack:///./src/utils/utils.ts","webpack:///./node_modules/core-js/internals/string-pad-webkit-bug.js","webpack:///./src/features/documento/documento-visualizar.vue?1d72","webpack:///./src/features/documento/documento-visualizar.vue?2cea","webpack:///./src/features/documento/documento-visualizar.vue?36b5","webpack:///./src/features/documento/documento-visualizar.vue?0c46","webpack:///./src/features/documento/documento-visualizar.vue","webpack:///./src/features/documento/documento-service.ts"],"names":["toLength","repeat","requireObjectCoercible","ceil","Math","createMethod","IS_END","$this","maxLength","fillString","fillLen","stringFiller","S","String","stringLength","length","fillStr","undefined","intMaxLength","call","slice","module","exports","start","end","$","$padStart","WEBKIT_BUG","target","proto","forced","padStart","this","arguments","obterDiaMesAnoFormatado","data","date","Date","dia","obterNumeroFormatado","getDate","mes","obterMesNumero","getMonth","ano","getFullYear","obterDiaMesAnoPadraoBR","obterDataFormatada","obterMes","hora","getHours","minuto","getMinutes","meses","numero","toString","isMobile","window","innerWidth","obterArquivosValidos","files","extensoesAceitas","resultado","file","arquivoValido","validarArquivo","push","extensao","name","split","pop","toLowerCase","extensaoExistente","find","e","debounce","func","timeout","timer","args","next","clearTimeout","setTimeout","obterSituacaoDescricao","situacao","Common","Domain","ChamadoSituacaoEnum","Aberto","Fechado","EmAndamento","obterSituacaoSistemaDescricao","SituacaoSistemaEnum","Ativo","EmAnalise","Inativo","formatDateIso","toISOString","parts","day","month","year","result","configureIugu","iugu","Iugu","setAccountID","accountId","testMode","setTestMode","setup","userAgent","test","render","_vm","_h","$createElement","_c","_self","attrs","model","value","callback","$$v","modalAberto","expression","modal","staticClass","on","$event","fecharModal","_v","conteudo","indexOf","_s","titulo","linkDownloadArquivo","imprimirDocumento","incrementarZoom","ref","_e","staticRenderFns","TipoArquivo","App","Server","Documentos","ObterCaminhoArquivo","escalaAtualImagem","empresaId","areaAtual","obterEmpresaAtualId","event","documentoId","preventDefault","stopPropagation","stopImmediatePropagation","id","obterArquivo","pagina","open","tipoArquivo","Pdf","document","write","encodeURI","arquivo","substr","print","documentoTitulo","obterConteudo","exibeArquivo","Outro","env","apiUrl","Imagem","Svg","incremento","imagem","$refs","imagemModal","style","transform","obterEmpresaId","obterAreaPadrao","carregarDados","component","VBtn","VDialog","VIcon","VProgressCircular","DocumentoService","query","configure","getAxios","get","params","then"],"mappings":"qGACA,IAAIA,EAAW,EAAQ,QACnBC,EAAS,EAAQ,QACjBC,EAAyB,EAAQ,QAEjCC,EAAOC,KAAKD,KAGZE,EAAe,SAAUC,GAC3B,OAAO,SAAUC,EAAOC,EAAWC,GACjC,IAIIC,EAASC,EAJTC,EAAIC,OAAOX,EAAuBK,IAClCO,EAAeF,EAAEG,OACjBC,OAAyBC,IAAfR,EAA2B,IAAMI,OAAOJ,GAClDS,EAAelB,EAASQ,GAE5B,OAAIU,GAAgBJ,GAA2B,IAAXE,EAAsBJ,GAC1DF,EAAUQ,EAAeJ,EACzBH,EAAeV,EAAOkB,KAAKH,EAASb,EAAKO,EAAUM,EAAQD,SACvDJ,EAAaI,OAASL,IAASC,EAAeA,EAAaS,MAAM,EAAGV,IACjEJ,EAASM,EAAID,EAAeA,EAAeC,KAItDS,EAAOC,QAAU,CAGfC,MAAOlB,GAAa,GAGpBmB,IAAKnB,GAAa,K,oCC5BpB,IAAIoB,EAAI,EAAQ,QACZC,EAAY,EAAQ,QAA2BH,MAC/CI,EAAa,EAAQ,QAIzBF,EAAE,CAAEG,OAAQ,SAAUC,OAAO,EAAMC,OAAQH,GAAc,CACvDI,SAAU,SAAkBvB,GAC1B,OAAOkB,EAAUM,KAAMxB,EAAWyB,UAAUlB,OAAS,EAAIkB,UAAU,QAAKhB,O,mfCNtE,SAAUiB,EAAwBC,GACpC,GAAIA,EAAM,CACN,IAAIC,EAAO,IAAIC,KAAKF,GAEhBG,EAAMC,EAAqBH,EAAKI,WAChCC,EAAMC,EAAeN,EAAKO,YAC1BC,EAAMR,EAAKS,c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nBzB,EAAME,iBACNF,EAAMG,kBACNH,EAAMI,2BAEN3H,KAAKmH,kBAAoBnH,KAAKmH,kBAAoB6B,EAE9ChJ,KAAKmH,mBAAqB,IAC1BnH,KAAKmH,kBAAoB,IAE7B,IAAI8B,EAASjJ,KAAKkJ,MAAMC,YAExBF,EAAOG,MAAMC,UAAb,gBAAkCrJ,KAAKmH,kBAAvC,OAtHR,oFAyHI,8GACUnH,KAAKsJ,iBADf,gDAzHJ,uIA6HI,8GAC2B,OAAYC,kBADvC,OACIvJ,KAAKqH,UADT,OAEIrH,KAAKwJ,gBAFT,gDA7HJ,8DAAiD,QAA5B,EAAmB,QADvC,QACoB,WC9D0c,I,6FCQ3dC,EAAY,eACd,EACAxE,EACA4B,GACA,EACA,KACA,KACA,MAIa,aAAA4C,EAAiB,QAQhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,UAAA,KAAQC,QAAA,KAAMC,oBAAA,Q,kGCxB3CC,E,+JACF,WAAuBC,GAAvB,iGACU,OAAmBC,YAD7B,gCAGW,OAAmBC,WAAWC,IAAI,mCAAoC,CAAEC,OAAQJ,IAASK,MAAK,SAAA1H,GAAC,OAAIA,EAAEvC,SAHhH,2C,6IAMA,WAAmB4J,GAAnB,iGACU,OAAmBC,YAD7B,gCAGW,OAAmBC,WAAWC,IAAI,+BAAgC,CAAEC,OAAQJ,IAASK,MAAK,SAAA1H,GAAC,OAAIA,EAAEvC,SAH5G,2C,iEAOW,WAAI2J","file":"js/chunk-5f510c9f.4669147f.js","sourcesContent":["// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = String(requireObjectCoercible($this));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","import Api from '@/base/api.typings';\nimport env from '@/env/env';\n\nexport function obterDiaMesAnoFormatado(data: string) {\n if (data) {\n let date = new Date(data);\n\n let dia = obterNumeroFormatado(date.getDate());\n let mes = obterMesNumero(date.getMonth());\n let ano = date.getFullYear();\n\n return `${ano}-${mes}-${dia}`;\n }\n return null\n}\n\nexport function obterDiaMesAnoPadraoBR(data: string) {\n if (data) {\n let date = new Date(data);\n\n let dia = obterNumeroFormatado(date.getDate());\n let mes = obterMesNumero(date.getMonth());\n let ano = date.getFullYear();\n\n return `${dia}/${mes}/${ano}`;\n }\n return null\n}\n\nexport function obterDataFormatada(data: string) {\n let date = new Date(data);\n\n let dia = obterNumeroFormatado(date.getDate());\n let mes = obterMes(date.getMonth());\n let ano = date.getFullYear();\n let hora = obterNumeroFormatado(date.getHours());\n let minuto = obterNumeroFormatado(date.getMinutes());\n\n return `${dia} de ${mes} de ${ano} às ${hora}h${minuto}`;\n}\n\nfunction obterMesNumero(mes: number) {\n let meses = [\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"10\",\"11\",\"12\"];\n return meses[mes];\n}\n\nfunction obterMes(mes: number) {\n let meses = [\n \"Janeiro\",\n \"Fevereiro\",\n \"Março\",\n \"Abril\",\n \"Maio\",\n \"Junho\",\n \"Julho\",\n \"Agosto\",\n \"Setembro\",\n \"Outubro\",\n \"Novembro\",\n \"Dezembro\"\n ];\n\n return meses[mes];\n}\n\nfunction obterNumeroFormatado(numero: number) {\n if (numero < 10) return `0${numero}`;\n\n return numero.toString();\n}\n\nexport function isMobile() {\n return window.innerWidth <= 768;\n}\n\nexport function obterArquivosValidos(files: File[], extensoesAceitas: string[]) {\n let resultado: File[] = [];\n\n for (let file of files) {\n let arquivoValido = validarArquivo(file, extensoesAceitas);\n\n if (arquivoValido)\n resultado.push(file);\n }\n\n return resultado;\n}\n\nfunction validarArquivo(file: File, extensoesAceitas: string[]) {\n let extensao = '.' + file.name.split('.').pop().toLowerCase();\n\n let extensaoExistente = extensoesAceitas.find(e => e == extensao);\n\n if (extensaoExistente)\n return true;\n\n return false;\n}\n\nexport function debounce(func: Function, timeout?: number) {\n let timer: number | undefined;\n\n return (...args: any[]) => {\n const next = () => func(...args);\n\n if (timer) \n clearTimeout(timer);\n\n timer = setTimeout(next, timeout > 0 ? timeout : 300);\n };\n}\n\nexport function obterSituacaoDescricao(situacao: Api.Common.Domain.ChamadoSituacaoEnum) {\n switch (situacao) {\n case Api.Common.Domain.ChamadoSituacaoEnum.Aberto:\n return \"Aberto\";\n case Api.Common.Domain.ChamadoSituacaoEnum.Fechado:\n return \"Fechado\";\n case Api.Common.Domain.ChamadoSituacaoEnum.EmAndamento:\n return \"Em andamento\";\n default:\n break;\n }\n}\n\nexport function obterSituacaoSistemaDescricao(situacao: Api.Common.Domain.SituacaoSistemaEnum) {\n switch (situacao) {\n case Api.Common.Domain.SituacaoSistemaEnum.Ativo:\n return \"Ativo\";\n case Api.Common.Domain.SituacaoSistemaEnum.EmAnalise:\n return \"Em Análise\";\n case Api.Common.Domain.SituacaoSistemaEnum.Inativo:\n return \"Inativo\";\n default:\n break;\n }\n}\n\nexport function formatDateIso(date) {\n if (!date)\n return null;\n if (typeof date === 'number')\n date = new Date(date);\n if (date.toISOString)\n date = date.toISOString();\n const parts = date.split(/[-|\\s|T]/)\n let day = parts[2].padStart(2, '0');\n let month = parts[1].padStart(2, '0');\n let year = parts[0].toString().padStart(2, '0');\n let result = `${year}-${month}-${day}`;\n return result;\n}\n\nexport function configureIugu() {\n const iugu = (window as any).Iugu;\n \n iugu.setAccountID(env.iugu.accountId);\n \n if (env.iugu.testMode)\n iugu.setTestMode(true);\n \n iugu.setup();\n}\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line unicorn/no-unsafe-regex\nmodule.exports = /Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/vuetify-loader/lib/loader.js??ref--19-0!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./documento-visualizar.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"fullscreen\":\"\"},model:{value:(_vm.modalAberto),callback:function ($$v) {_vm.modalAberto=$$v},expression:\"modalAberto\"}},[(_vm.modal == null)?_c('div',[_c('div',{staticClass:\"text-center mt-8\"},[_c('v-progress-circular',{attrs:{\"indeterminate\":\"\",\"color\":\"primary\"}})],1)]):_c('div',{staticClass:\"t-modal-header\"},[_c('div',{staticClass:\"t-modal-header-titulo-div\"},[_c('v-btn',{attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.fecharModal()}}},[_c('v-icon',{staticClass:\"t-icone-voltar\"},[_vm._v(\"mdi-arrow-left\")])],1),(_vm.modal.conteudo && _vm.modal.conteudo.indexOf('application/pdf') > 1)?_c('v-icon',{staticClass:\"t-icone-tipo-doc\"},[_vm._v(\"mdi-pdf-box\")]):(_vm.modal.conteudo && _vm.modal.conteudo.indexOf('image') > 1)?_c('v-icon',{staticClass:\"t-icone-tipo-doc\"},[_vm._v(\"mdi-image\")]):_c('v-icon',{staticClass:\"t-icone-voltar\"},[_vm._v(\"mdi-package-down\")]),_c('span',{staticClass:\"t-modal-header-titutlo\"},[_vm._v(_vm._s(_vm.modal.titulo))])],1),_c('div',{staticClass:\"t-modal-btns\"},[_c('a',{staticClass:\"t-remove-decoration\",attrs:{\"target\":\"_blank\",\"href\":_vm.linkDownloadArquivo,\"download\":_vm.modal.titulo}},[_c('v-icon',{staticClass:\"t-icone-voltar t-icone-download\"},[_vm._v(\"mdi-download\")])],1),_c('v-btn',{staticClass:\"t-imprimir-doc\",attrs:{\"icon\":\"\"},on:{\"click\":function($event){return _vm.imprimirDocumento($event)}}},[_c('v-icon',{staticClass:\"t-icone-voltar t-icone-download\"},[_vm._v(\"mdi-printer\")])],1)],1)]),(_vm.modal != null)?_c('div',{staticClass:\"t-modal-content\"},[(_vm.modal.conteudo && _vm.modal.conteudo.indexOf('image') > 1)?_c('div',{staticClass:\"t-div-full t-modal-content\",on:{\"click\":function($event){return _vm.fecharModal()}}},[_c('div',{staticClass:\"t-div-btns-resize\"},[_c('v-btn',{staticClass:\"mx-2\",attrs:{\"fab\":\"\",\"dark\":\"\",\"color\":\"primary\"},on:{\"click\":function($event){return _vm.incrementarZoom($event, +0.1)}}},[_c('v-icon',{attrs:{\"dark\":\"\"}},[_vm._v(\"mdi-plus\")])],1),_c('v-btn',{staticClass:\"mx-2\",attrs:{\"fab\":\"\",\"dark\":\"\",\"color\":\"primary\"},on:{\"click\":function($event){return _vm.incrementarZoom($event, -0.1)}}},[_c('v-icon',{attrs:{\"dark\":\"\"}},[_vm._v(\"mdi-minus\")])],1)],1),_c('img',{ref:\"imagemModal\",staticClass:\"t-img-conteudo-modal\",attrs:{\"src\":_vm.modal.conteudo}})]):(!_vm.isMobile && _vm.modal && _vm.modal.conteudo && _vm.modal.conteudo.indexOf('application/pdf') > 1)?_c('div',{staticClass:\"t-div-full t-modal-content\"},[_c('iframe',{attrs:{\"width\":\"100%\",\"type\":\"application/pdf\",\"id\":\"t-frame\",\"height\":\"100%\",\"src\":_vm.modal.conteudo}})]):_c('div',{staticClass:\"t-div-full t-modal-content\"},[_c('a',{staticClass:\"t-remove-decoration t-download-arquivo\",attrs:{\"href\":_vm.linkDownloadArquivo,\"download\":_vm.modal.titulo}},[_c('v-icon',{staticClass:\"t-icone-download-arquivo\"},[_vm._v(\"mdi-download\")]),_vm._v(\"Download \")],1),_c('div',{staticClass:\"t-div-full\",on:{\"click\":function($event){return _vm.fecharModal()}}})])]):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from \"vue\";\nimport Api from \"../../base/api.typings\";\nimport Component from \"vue-class-component\";\nimport documentoService from \"./documento-service\";\nimport { obterDataFormatada, isMobile } from \"../../utils/utils\";\nimport env from '../../env/env';\nimport empresaAtualService from '../empresa-atual/empresa-atual-service';\nimport areaService from '../area-atual/area-service';\n\n@Component\nexport default class DocumentoVisualizar extends Vue {\n\n modalAberto = false;\n\n TipoArquivo = Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo;\n\n linkDownloadArquivo: string = null;\n\n escalaAtualImagem = 1;\n\n isMobile = isMobile();\n\n empresaId: any = null\n\n areaAtual: string = null;\n\n async obterEmpresaId() {\n this.empresaId = await empresaAtualService.obterEmpresaAtualId();\n }\n\n modal: {\n id: string,\n titulo: string,\n conteudo: string,\n exibeArquivo: boolean\n } = null;\n\n async imprimirDocumento(event, documentoId: string) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n if (!documentoId && this.modal)\n documentoId = this.modal.id;\n\n let resultado = await documentoService.obterArquivo({\n id: documentoId,\n empresaId: this.empresaId,\n });\n\n let pagina = window.open(\"\");\n\n if (resultado.tipoArquivo == Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo.Pdf) {\n pagina.document.write(``);\n }\n else {\n if (resultado.extensao.toLowerCase() == '.svg')\n pagina.document.write(`
`);\n else {\n let extensao = resultado.extensao.toLowerCase().substr(1);\n\n pagina.document.write(`
`);\n }\n }\n\n setTimeout(() => pagina.print(), 1000);\n }\n\n fecharModal() {\n this.modalAberto = false;\n\n this.modal = null;\n\n this.escalaAtualImagem = 1;\n }\n\n async exibirDocumento(event, documentoId: string, documentoTitulo: string) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n this.modalAberto = true;\n\n let resultado = await documentoService.obterArquivo({\n id: documentoId,\n empresaId: this.empresaId,\n });\n\n this.modal = {\n id: documentoId,\n titulo: documentoTitulo,\n conteudo: this.obterConteudo(resultado),\n exibeArquivo: resultado.tipoArquivo != Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo.Outro\n }\n\n this.linkDownloadArquivo = `${env.apiUrl}/api/Documentos/BaixarArquivo?id=${documentoId}&empresaId=${this.empresaId}`;\n }\n\n obterConteudo(resultado: { arquivo: string, tipoArquivo: Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo, extensao: string }) {\n if (resultado.tipoArquivo == Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo.Imagem) {\n\n let extensao = resultado.extensao.toLowerCase().substr(1);\n\n return `data:image/${extensao};base64, ${resultado.arquivo}`;\n }\n\n if (resultado.tipoArquivo == Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo.Svg)\n return `data:image/svg+xml;base64, ${resultado.arquivo}`;\n\n if (resultado.tipoArquivo == Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo.Pdf)\n return `data:application/pdf;base64, ${resultado.arquivo}`;\n\n return null;\n }\n\n incrementarZoom(event, incremento: number) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n this.escalaAtualImagem = this.escalaAtualImagem + incremento;\n\n if (this.escalaAtualImagem <= 0)\n this.escalaAtualImagem = 0.1;\n\n let imagem = this.$refs.imagemModal as HTMLImageElement;\n\n imagem.style.transform = `scale(${this.escalaAtualImagem})`;\n }\n\n async carregarDados() {\n await this.obterEmpresaId();\n }\n\n async created() {\n this.areaAtual = await areaService.obterAreaPadrao();\n this.carregarDados();\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/ts-loader/index.js??ref--13-3!../../../node_modules/vuetify-loader/lib/loader.js??ref--19-0!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./documento-visualizar.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/vuetify-loader/lib/loader.js??ref--19-0!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./documento-visualizar.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./documento-visualizar.vue?vue&type=template&id=1f7c78c4&\"\nimport script from \"./documento-visualizar.vue?vue&type=script&lang=ts&\"\nexport * from \"./documento-visualizar.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./documento-visualizar.vue?vue&type=style&index=0&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 null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\ninstallComponents(component, {VBtn,VDialog,VIcon,VProgressCircular})\n","import Api from '../../base/api.typings';\nimport axiosConfiguration from '@/base/axios-configuration';\n\nclass DocumentoService {\n async listarDocumentos(query: Api.App.Server.Documentos.ListarDocumentos.Query): Promise {\n await axiosConfiguration.configure();\n\n return axiosConfiguration.getAxios().get('/api/Documentos/ListarDocumentos', { params: query }).then(e => e.data);\n }\n\n async obterArquivo(query: { id: string , empresaId: any}): Promise<{ arquivo: string, tipoArquivo: Api.App.Server.Documentos.ObterCaminhoArquivo.TipoArquivo, extensao: string }> {\n await axiosConfiguration.configure();\n\n return axiosConfiguration.getAxios().get('/api/Documentos/ObterArquivo', { params: query }).then(e => e.data);\n }\n}\n\nexport default new DocumentoService();"],"sourceRoot":""}