{"version":3,"sources":["webpack:///./src/views/management/AdminReportEditor.vue","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js","webpack:///./src/views/management/AdminReportEditor.vue?f208","webpack:///./src/views/management/AdminReportEditor.vue?5eb5","webpack:///./node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js"],"names":["class","report","report_content","init","type","id","ref","submitChange","validEvents","isValidKey","key","map","event","toLowerCase","indexOf","bindHandlers","initEvent","listeners","editor","Object","keys","filter","forEach","handler","on","substring","e","bindModelHandlers","props","ctx","modelValue","modelEvents","normalizedEvents","Array","isArray","join","val","prevVal","getContent","format","outputFormat","setContent","emit","initEditor","content","attrs","unique","uuid","prefix","time","Date","now","random","Math","floor","String","isTextarea","element","tagName","normalizePluginArray","plugins","split","mergePlugins","initPlugins","inputPlugins","concat","isNullOrUndefined","value","undefined","createState","scriptId","scriptLoaded","CreateScriptLoader","state","injectScriptTag","doc","url","callback","scriptTag","createElement","referrerPolicy","src","removeEventListener","addEventListener","head","appendChild","load","push","getElementById","fn","reinitialize","ScriptLoader","editorProps","apiKey","cloudChannel","initialValue","inline","Boolean","toolbar","disabled","tinymceScriptSrc","validator","prop","__assign","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","renderInline","ce","elementRef","renderIframe","visibility","Editor","setup","_a","vueEditor","elementId","inlineEditor","modelBind","mounting","cache","isMounting","initWrapper","finalInit","readonly","selector","style","disable","setMode","ownerDocument","channel","scriptSrc","remove","name","components","route","params","getReport","ApiService","setHeader","get","then","data","catch","response","console","log","errors","update","fire","text","icon","buttonsStyling","confirmButtonText","customClass","confirmButton","router","render","getGlobal","window","global","getTinymce","tinymce"],"mappings":"gJACSA,MAAM,sB,GAsBNA,MAAM,oD,4JAtBX,gCAqBM,MArBN,EAqBM,CApBF,yBAmBS,G,WAlBE,EAAAC,OAAOC,e,qCAAP,EAAAD,OAAqB,kBAC7BE,KAAM,C,gfAmBb,gCAgBM,MAhBN,EAgBM,CAfJ,gCAcS,UAbPC,KAAK,SACLC,GAAG,sBACHC,IAAI,eACJN,MAAM,kBACL,QAAK,eAAE,EAAAO,iB,aAER,gCAAmD,QAA7CP,MAAM,mBAAkB,kBAAc,GAC5C,gCAKO,QALDA,MAAM,sBAAoB,C,6BAAC,oBAE/B,gCAEQ,QADNA,MAAM,yD,iCC3BdQ,EAAc,CACd,aACA,YACA,kBACA,sBACA,qBACA,mBACA,qBACA,gBACA,SACA,WACA,eACA,UACA,gBACA,SACA,QACA,aACA,eACA,UACA,SACA,aACA,YACA,gBACA,aACA,SACA,gBACA,UACA,YACA,aACA,eACA,SACA,SACA,YACA,aACA,UACA,gBACA,cACA,eACA,eACA,cACA,aACA,cACA,YACA,eACA,sBACA,kBACA,mBACA,UACA,gBACA,eACA,eACA,kBACA,SACA,WACA,UACA,gBACA,oBACA,cACA,eACA,SACA,WACA,SACA,eAEAC,EAAa,SAAUC,GACvB,OAAyG,IAAlGF,EAAYG,KAAI,SAAUC,GAAS,OAAOA,EAAMC,iBAAkBC,QAAQJ,EAAIG,gBAErFE,EAAe,SAAUC,EAAWC,EAAWC,GAC/CC,OAAOC,KAAKH,GACPI,OAAOZ,GACPa,SAAQ,SAAUZ,GACnB,IAAIa,EAAUN,EAAUP,GACD,oBAAZa,IACK,WAARb,EACAa,EAAQP,EAAWE,GAGnBA,EAAOM,GAAGd,EAAIe,UAAU,IAAI,SAAUC,GAAK,OAAOH,EAAQG,EAAGR,WAKzES,EAAoB,SAAUC,EAAOC,EAAKX,EAAQY,GAClD,IAAIC,EAAcH,EAAMG,YAAcH,EAAMG,YAAc,KACtDC,EAA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IAAKQ,KAAK,CACRC,KAAM,yCACNC,KAAM,UACNC,gBAAgB,EAChBC,kBAAmB,cACnBC,YAAa,CACXC,cAAe,qBAElBd,KAAK,KACK,GAANlJ,EACCiK,EAAA,KAAO/E,KAAK,CAAEwD,KAAM,YAGpBuB,EAAA,KAAO/E,KAAK,CAAEwD,KAAM,qBAI7BU,MAAM,EAAGC,eACRC,QAAQC,IAAI,yBAAyBF,EAASF,KAAKK,WAYvD,OARA,2BAAc,KACZV,MAGF,uBAAU,KACR,eAA0B,cAAe,CAAC,mBAGrC,CACLlJ,SACAM,mBC9Dd,EAAOgK,OAASA,EAED,gB,mCCLf,8CAOA,IAAIC,EAAY,WAAc,MAA0B,qBAAXC,OAAyBA,OAASC,GAC3EC,EAAa,WACb,IAAID,EAASF,IACb,OAAOE,GAAUA,EAAOE,QAAUF,EAAOE,QAAU,Q","file":"js/chunk-ffbc6d02.00d83d25.js","sourcesContent":["\r\n\r\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { watch } from 'vue';\nvar validEvents = [\n 'onActivate',\n 'onAddUndo',\n 'onBeforeAddUndo',\n 'onBeforeExecCommand',\n 'onBeforeGetContent',\n 'onBeforeRenderUI',\n 'onBeforeSetContent',\n 'onBeforePaste',\n 'onBlur',\n 'onChange',\n 'onClearUndos',\n 'onClick',\n 'onContextMenu',\n 'onCopy',\n 'onCut',\n 'onDblclick',\n 'onDeactivate',\n 'onDirty',\n 'onDrag',\n 'onDragDrop',\n 'onDragEnd',\n 'onDragGesture',\n 'onDragOver',\n 'onDrop',\n 'onExecCommand',\n 'onFocus',\n 'onFocusIn',\n 'onFocusOut',\n 'onGetContent',\n 'onHide',\n 'onInit',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onLoadContent',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onNodeChange',\n 'onObjectResizeStart',\n 'onObjectResized',\n 'onObjectSelected',\n 'onPaste',\n 'onPostProcess',\n 'onPostRender',\n 'onPreProcess',\n 'onProgressState',\n 'onRedo',\n 'onRemove',\n 'onReset',\n 'onSaveContent',\n 'onSelectionChange',\n 'onSetAttrib',\n 'onSetContent',\n 'onShow',\n 'onSubmit',\n 'onUndo',\n 'onVisualAid'\n];\nvar isValidKey = function (key) {\n return validEvents.map(function (event) { return event.toLowerCase(); }).indexOf(key.toLowerCase()) !== -1;\n};\nvar bindHandlers = function (initEvent, listeners, editor) {\n Object.keys(listeners)\n .filter(isValidKey)\n .forEach(function (key) {\n var handler = listeners[key];\n if (typeof handler === 'function') {\n if (key === 'onInit') {\n handler(initEvent, editor);\n }\n else {\n editor.on(key.substring(2), function (e) { return handler(e, editor); });\n }\n }\n });\n};\nvar bindModelHandlers = function (props, ctx, editor, modelValue) {\n var modelEvents = props.modelEvents ? props.modelEvents : null;\n var normalizedEvents = Array.isArray(modelEvents) ? modelEvents.join(' ') : modelEvents;\n watch(modelValue, function (val, prevVal) {\n if (editor && typeof val === 'string' && val !== prevVal && val !== editor.getContent({ format: props.outputFormat })) {\n editor.setContent(val);\n }\n });\n editor.on(normalizedEvents ? normalizedEvents : 'change input undo redo', function () {\n ctx.emit('update:modelValue', editor.getContent({ format: props.outputFormat }));\n });\n};\nvar initEditor = function (initEvent, props, ctx, editor, modelValue, content) {\n editor.setContent(content());\n if (ctx.attrs['onUpdate:modelValue']) {\n bindModelHandlers(props, ctx, editor, modelValue);\n }\n bindHandlers(initEvent, ctx.attrs, editor);\n};\nvar unique = 0;\nvar uuid = function (prefix) {\n var time = Date.now();\n var random = Math.floor(Math.random() * 1000000000);\n unique++;\n return prefix + '_' + random + unique + String(time);\n};\nvar isTextarea = function (element) {\n return element !== null && element.tagName.toLowerCase() === 'textarea';\n};\nvar normalizePluginArray = function (plugins) {\n if (typeof plugins === 'undefined' || plugins === '') {\n return [];\n }\n return Array.isArray(plugins) ? plugins : plugins.split(' ');\n};\nvar mergePlugins = function (initPlugins, inputPlugins) {\n return normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));\n};\nvar isNullOrUndefined = function (value) {\n return value === null || value === undefined;\n};\nexport { bindHandlers, bindModelHandlers, initEditor, isValidKey, uuid, isTextarea, mergePlugins, isNullOrUndefined };\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { uuid } from './Utils';\nvar createState = function () { return ({\n listeners: [],\n scriptId: uuid('tiny-script'),\n scriptLoaded: false\n}); };\nvar CreateScriptLoader = function () {\n var state = createState();\n var injectScriptTag = function (scriptId, doc, url, callback) {\n var scriptTag = doc.createElement('script');\n scriptTag.referrerPolicy = 'origin';\n scriptTag.type = 'application/javascript';\n scriptTag.id = scriptId;\n scriptTag.src = url;\n var handler = function () {\n scriptTag.removeEventListener('load', handler);\n callback();\n };\n scriptTag.addEventListener('load', handler);\n if (doc.head) {\n doc.head.appendChild(scriptTag);\n }\n };\n var load = function (doc, url, callback) {\n if (state.scriptLoaded) {\n callback();\n }\n else {\n state.listeners.push(callback);\n if (!doc.getElementById(state.scriptId)) {\n injectScriptTag(state.scriptId, doc, url, function () {\n state.listeners.forEach(function (fn) { return fn(); });\n state.scriptLoaded = true;\n });\n }\n }\n };\n // Only to be used by tests.\n var reinitialize = function () {\n state = createState();\n };\n return {\n load: load,\n reinitialize: reinitialize\n };\n};\nvar ScriptLoader = CreateScriptLoader();\nexport { ScriptLoader };\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nexport var editorProps = {\n apiKey: String,\n cloudChannel: String,\n id: String,\n init: Object,\n initialValue: String,\n inline: Boolean,\n modelEvents: [String, Array],\n plugins: [String, Array],\n tagName: String,\n toolbar: [String, Array],\n modelValue: String,\n disabled: Boolean,\n tinymceScriptSrc: String,\n outputFormat: {\n type: String,\n validator: function (prop) { return prop === 'html' || prop === 'text'; }\n },\n};\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { ScriptLoader } from '../ScriptLoader';\nimport { getTinymce } from '../TinyMCE';\nimport { isTextarea, mergePlugins, uuid, isNullOrUndefined, initEditor } from '../Utils';\nimport { editorProps } from './EditorPropTypes';\nimport { h, defineComponent, onMounted, ref, toRefs, watch, onBeforeUnmount, onActivated, onDeactivated } from 'vue';\nvar renderInline = function (ce, id, elementRef, tagName) {\n return ce(tagName ? tagName : 'div', {\n id: id,\n ref: elementRef\n });\n};\nvar renderIframe = function (ce, id, elementRef) {\n return ce('textarea', {\n id: id,\n visibility: 'hidden',\n ref: elementRef\n });\n};\nexport var Editor = defineComponent({\n props: editorProps,\n setup: function (props, ctx) {\n var _a = toRefs(props), disabled = _a.disabled, modelValue = _a.modelValue;\n var element = ref(null);\n var vueEditor = null;\n var elementId = props.id || uuid('tiny-vue');\n var inlineEditor = (props.init && props.init.inline) || props.inline;\n var modelBind = !!ctx.attrs['onUpdate:modelValue'];\n var mounting = true;\n var initialValue = props.initialValue ? props.initialValue : '';\n var cache = '';\n var getContent = function (isMounting) { return modelBind ?\n function () { return ((modelValue === null || modelValue === void 0 ? void 0 : modelValue.value) ? modelValue.value : ''); } :\n function () { return isMounting ? initialValue : cache; }; };\n var initWrapper = function () {\n var content = getContent(mounting);\n var finalInit = __assign(__assign({}, props.init), { readonly: props.disabled, selector: \"#\" + elementId, plugins: mergePlugins(props.init && props.init.plugins, props.plugins), toolbar: props.toolbar || (props.init && props.init.toolbar), inline: inlineEditor, setup: function (editor) {\n vueEditor = editor;\n editor.on('init', function (e) { return initEditor(e, props, ctx, editor, modelValue, content); });\n if (props.init && typeof props.init.setup === 'function') {\n props.init.setup(editor);\n }\n } });\n if (isTextarea(element.value)) {\n element.value.style.visibility = '';\n }\n getTinymce().init(finalInit);\n mounting = false;\n };\n watch(disabled, function (disable) {\n if (vueEditor !== null) {\n vueEditor.setMode(disable ? 'readonly' : 'design');\n }\n });\n onMounted(function () {\n if (getTinymce() !== null) {\n initWrapper();\n }\n else if (element.value && element.value.ownerDocument) {\n var channel = props.cloudChannel ? props.cloudChannel : '5';\n var apiKey = props.apiKey ? props.apiKey : 'no-api-key';\n var scriptSrc = isNullOrUndefined(props.tinymceScriptSrc) ?\n \"https://cdn.tiny.cloud/1/\" + apiKey + \"/tinymce/\" + channel + \"/tinymce.min.js\" :\n props.tinymceScriptSrc;\n ScriptLoader.load(element.value.ownerDocument, scriptSrc, initWrapper);\n }\n });\n onBeforeUnmount(function () {\n if (getTinymce() !== null) {\n getTinymce().remove(vueEditor);\n }\n });\n if (!inlineEditor) {\n onActivated(function () {\n if (!mounting) {\n initWrapper();\n }\n });\n onDeactivated(function () {\n var _a;\n if (!modelBind) {\n cache = vueEditor.getContent();\n }\n (_a = getTinymce()) === null || _a === void 0 ? void 0 : _a.remove(vueEditor);\n });\n }\n return function () { return inlineEditor ?\n renderInline(h, elementId, element, props.tagName) :\n renderIframe(h, elementId, element); };\n }\n});\n","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport { Editor } from './components/Editor';\nexport default Editor;\n","\r\n import { defineComponent, onMounted, ref, onBeforeMount } from \"vue\";\r\n import Editor from \"@tinymce/tinymce-vue\";\r\n import ApiService from \"@/core/services/ApiService\";\r\n import { useRoute } from \"vue-router\";\r\n import { setCurrentPageBreadcrumbs } from \"@/core/helpers/breadcrumb\";\r\n import Swal from \"sweetalert2\";\r\n import router from \"@/router\";\r\n\r\n export default defineComponent({\r\n name: \"admin-report-editor\",\r\n components: {\r\n Editor\r\n },\r\n setup() {\r\n const route = useRoute();\r\n const id : number = +route.params.id; \r\n const report = ref({} as any); \r\n const getReport = async() =>{\r\n ApiService.setHeader();\r\n await ApiService.get(\"report/\"+id)\r\n .then(({ data }) => {\r\n report.value = data.data;\r\n })\r\n .catch(({ response }) => {\r\n console.log('getReport error => '+response.data.errors);\r\n });\r\n }\r\n\r\n const submitChange = () =>{\r\n ApiService.setHeader();\r\n ApiService.update(\"report\",report.value.id, report.value)\r\n .then(() =>{\r\n Swal.fire({\r\n text: \"Template has been updated successfully\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn btn-primary\",\r\n },\r\n }).then(() => {\r\n if(id == 1){\r\n router.push({ name: \"invoice\" });\r\n }\r\n else{\r\n router.push({ name: \"admin-report\" });\r\n }\r\n });\r\n })\r\n .catch(({ response }) => {\r\n console.log('submitChange error => '+response.data.errors);\r\n });\r\n }\r\n\r\n onBeforeMount(()=>{\r\n getReport();\r\n })\r\n\r\n onMounted(() => {\r\n setCurrentPageBreadcrumbs(\"Edit Report\", [\"Admin Report\"]);\r\n });\r\n\r\n return {\r\n report,\r\n submitChange\r\n };\r\n },\r\n });\r\n","import { render } from \"./AdminReportEditor.vue?vue&type=template&id=0a915a04\"\nimport script from \"./AdminReportEditor.vue?vue&type=script&lang=ts\"\nexport * from \"./AdminReportEditor.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/**\n * Copyright (c) 2018-present, Ephox, Inc.\n *\n * This source code is licensed under the Apache 2 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };\nvar getTinymce = function () {\n var global = getGlobal();\n return global && global.tinymce ? global.tinymce : null;\n};\nexport { getTinymce };\n"],"sourceRoot":""}