{"version":3,"file":"64.js","sources":["webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/objectDestructuringEmpty.js","webpack:///src/components/report/pdf/PopupPdf.vue","webpack:///src/views/apps/financial/account/account-list/AccountList.vue","webpack:///src/views/apps/financial/account/account-list/cell-renderer/CellRendererAccount.vue","webpack:///src/views/apps/financial/account/account-list/cell-renderer/CellRendererActions.vue","webpack:///src/views/apps/financial/account/account-list/cell-renderer/CellRendererType.vue","webpack:///./src/components/report/pdf/PopupPdf.vue","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererAccount.vue","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererActions.vue","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererType.vue","webpack:///./src/components/report/pdf/PopupPdf.vue?520d","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?9264","webpack:///./node_modules/printd/index.js","webpack:///./src/components/report/pdf/PopupPdf.vue?cdc5","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?570a","webpack:///./src/assets/agGridTranslate/locale.pt_Br.js","webpack:///./src/components/report/pdf/PopupPdf.vue?c7a6","webpack:///./src/components/report/pdf/PopupPdf.vue?e037","webpack:///./src/components/report/pdf/PopupPdf.vue?abef","webpack:///./src/components/report/pdf/PopupPdf.vue?0b34","webpack:///./src/store/bank/moduleBank.js","webpack:///./src/store/bank/moduleBankActions.js","webpack:///./src/store/bank/moduleBankGetters.js","webpack:///./src/store/bank/moduleBankMutations.js","webpack:///./src/store/bank/moduleBankState.js","webpack:///./src/store/my-cashier/moduleMyCashier.js","webpack:///./src/store/my-cashier/moduleMyCashierActions.js","webpack:///./src/store/my-cashier/moduleMyCashierGetters.js","webpack:///./src/store/my-cashier/moduleMyCashierMutations.js","webpack:///./src/store/my-cashier/moduleMyCashierState.js","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?6b5f","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?7c97","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?9983","webpack:///./src/views/apps/financial/account/account-list/AccountList.vue?d07b","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererAccount.vue?12f3","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererAccount.vue?a8b1","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererAccount.vue?8196","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererActions.vue?011e","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererActions.vue?b681","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererActions.vue?29cc","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererType.vue?9dd3","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererType.vue?2577","webpack:///./src/views/apps/financial/account/account-list/cell-renderer/CellRendererType.vue?ba53"],"sourcesContent":["export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n","\n\n\n","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\n \"vs-popup\",\n {\n attrs: { fullscreen: \"\", title: _vm.title, active: _vm.active },\n on: {\n \"update:active\": function ($event) {\n _vm.active = $event\n },\n },\n },\n [\n _c(\"div\", { staticClass: \"vs-con-loading__container\" }, [\n _c(\"embed\", {\n attrs: {\n src: _vm.url,\n alt: \"Documento PDF\",\n width: \"100%\",\n height: \"600\",\n type: \"application/pdf\",\n pluginspage:\n \"https://www.adobe.com/products/acrobat/readstep2.html\",\n },\n }),\n ]),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\n \"div\",\n { attrs: { id: \"page-user-list\" } },\n [\n _c(\"popup-pdf\", {\n ref: \"popupPdf\",\n attrs: { title: \"Saldo de caixas e contas\" },\n }),\n _c(\"add-account-modal\", {\n attrs: { show: _vm.popupAddAccount },\n on: {\n saved: _vm.refreshGrid,\n cancel: function ($event) {\n _vm.popupAddAccount = false\n },\n },\n }),\n _c(\"edit-account-modal\", {\n attrs: { show: _vm.popupEditAccount, account: _vm.account },\n on: {\n saved: _vm.refreshGrid,\n cancel: function ($event) {\n _vm.popupEditAccount = false\n },\n },\n }),\n _c(\n \"vs-popup\",\n {\n staticClass: \"popup40\",\n attrs: {\n fullscreen: false,\n title: \"Transferênca\",\n active: _vm.popupTransfer,\n },\n on: {\n \"update:active\": function ($event) {\n _vm.popupTransfer = $event\n },\n },\n },\n [\n _c(\"div\", { staticClass: \"vx-row\" }, [\n _c(\n \"div\",\n { staticClass: \"vx-col w-full\" },\n [\n _c(\"label\", { staticClass: \"vs-input--label\" }, [_vm._v(\"De\")]),\n _c(\"v-select\", {\n directives: [\n {\n name: \"validate\",\n rawName: \"v-validate.initial\",\n value: \"required\",\n expression: \"'required'\",\n modifiers: { initial: true },\n },\n ],\n staticClass: \"w-full\",\n attrs: {\n reduce: (option) => option.value,\n clearable: false,\n \"data-vv-as\": \"De\",\n \"data-vv-scope\": \"transfer\",\n name: \"account_from\",\n options: _vm.accounts,\n placeholder: \"Selecione\",\n dir: _vm.$vs.rtl ? \"rtl\" : \"ltr\",\n },\n scopedSlots: _vm._u([\n {\n key: \"no-options\",\n fn: function ({}) {\n return [\n _vm._v(\n \"\\n Nenhum resultado encontrado.\\n \"\n ),\n ]\n },\n },\n ]),\n model: {\n value: _vm.transfer.account_from,\n callback: function ($$v) {\n _vm.$set(_vm.transfer, \"account_from\", $$v)\n },\n expression: \"transfer.account_from\",\n },\n }),\n ],\n 1\n ),\n ]),\n _c(\"div\", { staticClass: \"vx-row\" }, [\n _c(\n \"div\",\n { staticClass: \"vx-col w-full\" },\n [\n _c(\"label\", { staticClass: \"vs-input--label\" }, [\n _vm._v(\"Para\"),\n ]),\n _c(\"v-select\", {\n directives: [\n {\n name: \"validate\",\n rawName: \"v-validate.initial\",\n value: \"required\",\n expression: \"'required'\",\n modifiers: { initial: true },\n },\n ],\n staticClass: \"w-full\",\n attrs: {\n reduce: (option) => option.value,\n clearable: false,\n \"data-vv-as\": \"Para\",\n \"data-vv-scope\": \"transfer\",\n name: \"account_to\",\n options: _vm.accounts,\n placeholder: \"Selecione\",\n dir: _vm.$vs.rtl ? \"rtl\" : \"ltr\",\n },\n scopedSlots: _vm._u([\n {\n key: \"no-options\",\n fn: function ({}) {\n return [\n _vm._v(\n \"\\n Nenhum resultado encontrado.\\n \"\n ),\n ]\n },\n },\n ]),\n model: {\n value: _vm.transfer.account_to,\n callback: function ($$v) {\n _vm.$set(_vm.transfer, \"account_to\", $$v)\n },\n expression: \"transfer.account_to\",\n },\n }),\n ],\n 1\n ),\n ]),\n _c(\"div\", { staticClass: \"vx-row\" }, [\n _c(\n \"div\",\n { staticClass: \"vx-col w-full\" },\n [\n _c(\"label\", { staticClass: \"vs-input--label\" }, [\n _vm._v(\"Valor\"),\n ]),\n _c(\"currency-input\", {\n staticClass:\n \"w-full vs-inputx vs-input--input normal hasValue\",\n attrs: {\n currency: { prefix: \"R$ \" },\n valueAsInteger: false,\n distractionFree: false,\n precision: 2,\n autoDecimalMode: true,\n valueRange: { min: 0 },\n allowNegative: false,\n },\n model: {\n value: _vm.transfer.value,\n callback: function ($$v) {\n _vm.$set(_vm.transfer, \"value\", $$v)\n },\n expression: \"transfer.value\",\n },\n }),\n ],\n 1\n ),\n ]),\n _c(\"vs-divider\"),\n _c(\"div\", { staticClass: \"vx-row\" }, [\n _c(\"div\", { staticClass: \"vx-col w-full\" }, [\n _c(\n \"div\",\n { staticClass: \"mt-4 flex flex-wrap items-center justify-end\" },\n [\n _c(\n \"vs-button\",\n {\n staticClass: \"ml-auto\",\n attrs: { color: \"secondary\" },\n on: {\n click: function ($event) {\n _vm.popupTransfer = false\n },\n },\n },\n [_vm._v(\"Cancelar\")]\n ),\n _c(\n \"vs-button\",\n {\n staticClass: \"ml-4\",\n attrs: { color: \"danger\" },\n on: { click: _vm.transferDo },\n },\n [_vm._v(\"Transferir\")]\n ),\n ],\n 1\n ),\n ]),\n ]),\n ],\n 1\n ),\n !_vm.showAccounts\n ? _c(\n \"vx-card\",\n { staticClass: \"general-cash-filters mb-4\" },\n [\n _c(\n \"vs-alert\",\n {\n staticClass: \"mt-2\",\n attrs: {\n color: \"primary\",\n title: \"Orientações:\",\n active: !_vm.showAccounts,\n \"icon-pack\": \"feather\",\n },\n },\n [\n _c(\"p\", [\n _vm._v(\"Você não tem permissão para acessar as Contas.\"),\n ]),\n _c(\"p\", [\n _vm._v(\n \"Peça para seu administrador alterar as configurações e liberar seu acesso caso necessário.\"\n ),\n ]),\n ]\n ),\n ],\n 1\n )\n : _c(\n \"div\",\n { staticClass: \"vx-card p-6\" },\n [\n _vm.user.company.configuration &&\n _vm.user.company.configuration.financial &&\n _vm.user.company.configuration.financial.cashier\n ? _c(\n \"div\",\n { staticClass: \"my-cashier-filters mb-4\" },\n [\n _c(\"h5\", [\n _vm._v(\"Posição atual dos Caixas Individuais\"),\n ]),\n _c(\n \"vs-table\",\n {\n staticStyle: { overflow: \"-webkit-paged-y\" },\n attrs: {\n noDataText:\n \"Nenhum Caixa Individual foi utilizado até este momento.\",\n data: _vm.cashiers,\n hoverFlat: \"\",\n stripe: \"\",\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function ({ data }) {\n return _vm._l(data, function (cashier, i) {\n return _c(\n \"vs-tr\",\n {\n key: i,\n staticStyle: {\n opacity: \"1 !important\",\n },\n },\n [\n _c(\"vs-td\", [\n _c(\"span\", [\n _vm._v(_vm._s(cashier.name)),\n ]),\n ]),\n _c(\"vs-td\", [\n _c(\"span\", [\n _vm._v(\n \" \" +\n _vm._s(\n cashier.last_cashier\n .status === \"OPEN\"\n ? \"ABERTO\"\n : \"FECHADO\"\n ) +\n \" \"\n ),\n ]),\n ]),\n _c(\"vs-td\", [\n _c(\"span\", [\n _vm._v(\n \" \" +\n _vm._s(\n _vm._f(\"dateTime\")(\n cashier.last_cashier\n .opening_date,\n \"dateTime\"\n )\n ) +\n \" \"\n ),\n ]),\n ]),\n _c(\"vs-td\", [\n _vm._v(\n _vm._s(\n (\n cashier.last_cashier\n .opening_balance || 0\n ).toLocaleString(\"pt-BR\", {\n style: \"currency\",\n currency: \"BRL\",\n })\n )\n ),\n ]),\n _c(\"vs-td\", [\n _vm._v(\n _vm._s(\n _vm._f(\"dateTime\")(\n cashier.last_cashier\n .closed_date,\n \"dateTime\"\n )\n )\n ),\n ]),\n _c(\"vs-td\", [\n _vm._v(\n _vm._s(\n (\n cashier.last_cashier\n .final_balance || 0\n ).toLocaleString(\"pt-BR\", {\n style: \"currency\",\n currency: \"BRL\",\n })\n )\n ),\n ]),\n ],\n 1\n )\n })\n },\n },\n ],\n null,\n false,\n 4132363015\n ),\n },\n [\n _c(\n \"template\",\n { slot: \"thead\" },\n [\n _c(\"vs-th\", [_vm._v(\"Responsável\")]),\n _c(\"vs-th\", [_vm._v(\"Status\")]),\n _c(\"vs-th\", [_vm._v(\"Abertura\")]),\n _c(\"vs-th\", [_vm._v(\"Saldo Inicial\")]),\n _c(\"vs-th\", [_vm._v(\"Fechamento\")]),\n _c(\"vs-th\", [_vm._v(\"Saldo Atual\")]),\n ],\n 1\n ),\n ],\n 2\n ),\n _c(\"vs-divider\"),\n ],\n 1\n )\n : _vm._e(),\n _c(\n \"div\",\n { staticClass: \"flex flex-wrap items-center\" },\n [\n _c(\"div\", { staticClass: \"flex-grow\" }),\n _c(\n \"vs-button\",\n {\n staticClass:\n \"m-icon sm:mr-4 mr-0 sm:w-auto w-full sm:order-normal order-3 sm:mt-0 mt-4\",\n attrs: {\n type: \"line\",\n color: \"primary\",\n icon: \"compare_arrows\",\n },\n on: { click: _vm.handleTransfer },\n },\n [_vm._v(\"Transferência\")]\n ),\n _c(\n \"vs-button\",\n {\n staticClass:\n \"shadow-drop sm:mr-4 mr-0 sm:w-auto w-full sm:order-normal order-3 sm:mt-0 mt-4\",\n attrs: {\n \"icon-pack\": \"feather\",\n icon: \"icon-plus-circle\",\n },\n on: { click: _vm.addAccount },\n },\n [_vm._v(\"Nova Conta\")]\n ),\n _c(\"vs-button\", {\n staticClass:\n \"m-icon sm:mr-4 mr-0 sm:w-auto w-full sm:order-normal order-3 sm:mt-0 mt-4\",\n attrs: {\n \"icon-pack\": \"feather\",\n color: \"primary\",\n type: \"line\",\n icon: \"icon-printer\",\n },\n on: { click: _vm.printPage },\n }),\n ],\n 1\n ),\n _c(\"vs-divider\"),\n _c(\"h5\", [_vm._v(\"CONTAS EXTERNAS\")]),\n _c(\"small\", { staticClass: \"mb-2\" }, [\n _c(\"strong\", [_vm._v(\"Alteram\")]),\n _vm._v(\" saldo no cx geral.\"),\n ]),\n _c(\n \"vs-table\",\n {\n staticStyle: { overflow: \"-webkit-paged-y\" },\n attrs: {\n noDataText: \"Nenhuma Conta Externa Cadastrada.\",\n data: _vm.externalAccountsData.data,\n hoverFlat: \"\",\n stripe: \"\",\n },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function ({ data }) {\n return _vm._l(data, function (externalAccount, i) {\n return _c(\n \"vs-tr\",\n {\n key: i,\n staticStyle: { opacity: \"1 !important\" },\n },\n [\n _c(\"vs-td\", [\n _c(\"span\", [\n _vm._v(_vm._s(externalAccount.account)),\n ]),\n ]),\n _c(\"vs-td\", [\n _c(\n \"span\",\n [\n _c(\"feather-icon\", {\n staticClass: \"mt-4\",\n attrs: {\n icon: \"CircleIcon\",\n svgClasses: [\n \"fill-current h-4 w-4\",\n externalAccount.bank_account &&\n !externalAccount.config_boleto\n ? \"text-primary\"\n : externalAccount.config_boleto\n ? \"text-warning\"\n : \"text-success\",\n ],\n },\n }),\n ],\n 1\n ),\n ]),\n _c(\"vs-td\", [\n _vm._v(\n _vm._s(\n (\n externalAccount.balance || 0\n ).toLocaleString(\"pt-BR\", {\n style: \"currency\",\n currency: \"BRL\",\n })\n )\n ),\n ]),\n _c(\"vs-td\", [\n _c(\n \"div\",\n {\n style: {\n direction: _vm.$vs.rtl ? \"rtl\" : \"ltr\",\n },\n },\n [\n _c(\"feather-icon\", {\n attrs: {\n icon: \"Edit3Icon\",\n svgClasses:\n \"h-5 w-5 mr-4 hover:text-primary cursor-pointer\",\n },\n on: {\n click: function ($event) {\n return _vm.editAccount(\n externalAccount\n )\n },\n },\n }),\n _c(\"feather-icon\", {\n attrs: {\n icon: \"Trash2Icon\",\n svgClasses:\n \"h-5 w-5 hover:text-danger cursor-pointer\",\n },\n on: {\n click: function ($event) {\n return _vm.confirmDeleteRecord(\n externalAccount\n )\n },\n },\n }),\n ],\n 1\n ),\n ]),\n ],\n 1\n )\n })\n },\n },\n ]),\n },\n [\n _c(\n \"template\",\n { slot: \"thead\" },\n [\n _c(\"vs-th\", [_vm._v(\"Conta\")]),\n _c(\"vs-th\", [_vm._v(\"Tipo\")]),\n _c(\"vs-th\", [_vm._v(\"Saldo\")]),\n _c(\"vs-th\", [_vm._v(\"Ações\")]),\n ],\n 1\n ),\n ],\n 2\n ),\n _c(\"vs-divider\"),\n _c(\"h5\", [_vm._v(\"CONTAS INTERNAS\")]),\n _c(\"small\", [\n _c(\"strong\", [_vm._v(\"Não Alteram\")]),\n _vm._v(\" saldo no cx geral.\"),\n ]),\n _c(\"ag-grid-vue\", {\n ref: \"agGridTable\",\n staticClass: \"ag-theme-material w-100 my-4 ag-grid-table\",\n attrs: {\n components: _vm.components,\n gridOptions: _vm.gridOptions,\n columnDefs: _vm.columnDefs,\n defaultColDef: _vm.defaultColDef,\n overlayLoadingTemplate: _vm.overlayLoadingTemplate,\n overlayNoRowsTemplate: _vm.noRowsTemplate,\n localeText: _vm.localeText,\n rowSelection: \"multiple\",\n colResizeDefault: \"shift\",\n animateRows: true,\n pagination: true,\n paginationPageSize: _vm.paginationPageSize,\n cacheBlockSize: 20,\n suppressPaginationPanel: true,\n enableRtl: _vm.$vs.rtl,\n },\n on: { \"grid-ready\": _vm.onGridReady },\n }),\n _c(\"vs-pagination\", {\n attrs: { total: _vm.totalPages, max: 10 },\n model: {\n value: _vm.currentPage,\n callback: function ($$v) {\n _vm.currentPage = $$v\n },\n expression: \"currentPage\",\n },\n }),\n ],\n 1\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _vm.params.data\n ? _c(\"div\", { staticClass: \"flex items-center\" }, [\n _vm._v(\"\\n \" + _vm._s(_vm.params.value) + \"\\n\"),\n ])\n : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _c(\n \"div\",\n { style: { direction: _vm.$vs.rtl ? \"rtl\" : \"ltr\" } },\n [\n _c(\"feather-icon\", {\n attrs: {\n icon: \"Edit3Icon\",\n svgClasses: \"h-5 w-5 mr-4 hover:text-primary cursor-pointer\",\n },\n on: { click: _vm.editRecord },\n }),\n _c(\"feather-icon\", {\n attrs: {\n icon: \"Trash2Icon\",\n svgClasses: \"h-5 w-5 hover:text-danger cursor-pointer\",\n },\n on: { click: _vm.confirmDeleteRecord },\n }),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function render() {\n var _vm = this,\n _c = _vm._self._c\n return _vm.params.data\n ? _c(\n \"div\",\n { staticClass: \"flex items-center\" },\n [\n _c(\"feather-icon\", {\n staticClass: \"mt-4\",\n attrs: {\n icon: \"CircleIcon\",\n svgClasses: [\"fill-current h-4 w-4\", _vm.color],\n },\n }),\n ],\n 1\n )\n : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".popup50 .vs-popup {\\n width: 50% !important;\\n}\\n.popup80 .vs-popup {\\n width: 80% !important;\\n}\\n.popup90 .vs-popup {\\n width: 90% !important;\\n}\\n.noOverflow .vs-popup--content {\\n overflow: hidden;\\n}\\n.vue_select_drop_size_180 .vs__dropdown-menu {\\n max-height: 180px;\\n}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"#page-user-list .user-list-filters .vs__actions {\\n position: absolute;\\n top: 50%;\\n -webkit-transform: translateY(-58%);\\n}[dir] #page-user-list .user-list-filters .vs__actions {\\n transform: translateY(-58%);\\n}[dir=ltr] #page-user-list .user-list-filters .vs__actions {\\n right: 0;\\n}[dir=rtl] #page-user-list .user-list-filters .vs__actions {\\n left: 0;\\n}\\n.m-icon .material-icons {\\n font-size: 19px !important;\\n}\\n.popup40 .vs-popup {\\n width: 40% !important;\\n}\", \"\"]);\n\n// exports\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Printd = exports.createIFrame = exports.createLinkStyle = exports.createStyle = void 0;\nvar URL_LONG = /^(((http[s]?)|file):)?(\\/\\/)+([0-9a-zA-Z-_.=?&].+)$/;\nvar URL_SHORT = /^((\\.|\\.\\.)?\\/)([0-9a-zA-Z-_.=?&]+\\/)*([0-9a-zA-Z-_.=?&]+)$/;\nvar isValidURL = function (str) { return URL_LONG.test(str) || URL_SHORT.test(str); };\nfunction createStyle(doc, cssText) {\n var style = doc.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n return style;\n}\nexports.createStyle = createStyle;\nfunction createLinkStyle(doc, url) {\n var style = doc.createElement(\"link\");\n style.type = \"text/css\";\n style.rel = \"stylesheet\";\n style.href = url;\n return style;\n}\nexports.createLinkStyle = createLinkStyle;\nfunction createIFrame(parent) {\n var el = window.document.createElement(\"iframe\");\n el.setAttribute(\"src\", \"about:blank\");\n el.setAttribute(\"style\", \"visibility:hidden;width:0;height:0;position:absolute;z-index:-9999;bottom:0;\");\n el.setAttribute(\"width\", \"0\");\n el.setAttribute(\"height\", \"0\");\n el.setAttribute(\"wmode\", \"opaque\");\n parent.appendChild(el);\n return el;\n}\nexports.createIFrame = createIFrame;\nvar DEFAULT_OPTIONS = {\n parent: window.document.body,\n headElements: [],\n bodyElements: []\n};\n/** Printd class that prints HTML elements in a blank document */\nvar Printd = /** @class */ (function () {\n function Printd(options) {\n this.isLoading = false;\n this.hasEvents = false;\n // IE 11+ \"Object.assign\" polyfill\n this.opts = [DEFAULT_OPTIONS, options || {}].reduce(function (a, b) {\n Object.keys(b).forEach(function (k) { return (a[k] = b[k]); });\n return a;\n }, {});\n this.iframe = createIFrame(this.opts.parent);\n }\n /** Gets current Iframe reference */\n Printd.prototype.getIFrame = function () {\n return this.iframe;\n };\n /**\n * Print an HTMLElement\n *\n * @param el HTMLElement\n * @param styles Optional styles (css texts or urls) that will add to iframe document.head\n * @param scripts Optional scripts (script texts or urls) that will add to iframe document.body\n * @param callback Optional callback that will be triggered when content is ready to print\n */\n Printd.prototype.print = function (el, styles, scripts, callback) {\n if (this.isLoading)\n return;\n var _a = this.iframe, contentDocument = _a.contentDocument, contentWindow = _a.contentWindow;\n if (!contentDocument || !contentWindow)\n return;\n this.iframe.src = \"about:blank\";\n this.elCopy = el.cloneNode(true);\n if (!this.elCopy)\n return;\n this.isLoading = true;\n this.callback = callback;\n var doc = contentWindow.document;\n doc.open();\n doc.write('');\n this.addEvents();\n // 1. append custom elements\n var _b = this.opts, headElements = _b.headElements, bodyElements = _b.bodyElements;\n // 1.1 append custom head elements\n if (Array.isArray(headElements)) {\n headElements.forEach(function (el) { return doc.head.appendChild(el); });\n }\n // 1.1 append custom body elements\n if (Array.isArray(bodyElements)) {\n bodyElements.forEach(function (el) { return doc.body.appendChild(el); });\n }\n // 2. append custom styles\n if (Array.isArray(styles)) {\n styles.forEach(function (value) {\n if (value) {\n doc.head.appendChild(isValidURL(value) ? createLinkStyle(doc, value) : createStyle(doc, value));\n }\n });\n }\n // 3. append element copy\n doc.body.appendChild(this.elCopy);\n // 4. append custom scripts\n if (Array.isArray(scripts)) {\n scripts.forEach(function (value) {\n if (value) {\n var script = doc.createElement(\"script\");\n if (isValidURL(value)) {\n script.src = value;\n }\n else {\n script.innerText = value;\n }\n doc.body.appendChild(script);\n }\n });\n }\n doc.close();\n };\n /**\n * Print an URL\n *\n * @param url URL to print\n * @param callback Optional callback that will be triggered when content is ready to print\n */\n Printd.prototype.printURL = function (url, callback) {\n if (this.isLoading)\n return;\n this.addEvents();\n this.isLoading = true;\n this.callback = callback;\n this.iframe.src = url;\n };\n /**\n * Add a browser `beforeprint` print event listener providing a custom callback.\n *\n * Note that it only works when printing custom HTML elements.\n *\n */\n Printd.prototype.onBeforePrint = function (callback) {\n this.onbeforeprint = callback;\n };\n /**\n * Add a browser `afterprint` print event listener providing a custom callback.\n *\n * Note that it only works when printing custom HTML elements.\n *\n */\n Printd.prototype.onAfterPrint = function (callback) {\n this.onafterprint = callback;\n };\n Printd.prototype.launchPrint = function (contentWindow) {\n if (!this.isLoading) {\n contentWindow.print();\n }\n };\n Printd.prototype.addEvents = function () {\n var _this = this;\n if (!this.hasEvents) {\n this.hasEvents = true;\n this.iframe.addEventListener(\"load\", function () { return _this.onLoad(); }, false);\n var contentWindow = this.iframe.contentWindow;\n if (contentWindow) {\n if (this.onbeforeprint) {\n contentWindow.addEventListener(\"beforeprint\", this.onbeforeprint);\n }\n if (this.onafterprint) {\n contentWindow.addEventListener(\"afterprint\", this.onafterprint);\n }\n }\n }\n };\n Printd.prototype.onLoad = function () {\n var _this = this;\n if (this.iframe) {\n this.isLoading = false;\n var _a = this.iframe, contentDocument = _a.contentDocument, contentWindow_1 = _a.contentWindow;\n if (!contentDocument || !contentWindow_1)\n return;\n if (typeof this.callback === \"function\") {\n this.callback({\n iframe: this.iframe,\n element: this.elCopy,\n launchPrint: function () { return _this.launchPrint(contentWindow_1); }\n });\n }\n else {\n this.launchPrint(contentWindow_1);\n }\n }\n };\n return Printd;\n}());\nexports.Printd = Printd;\nexports.default = Printd;\n","// style-loader: Adds some css to the DOM by adding a