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K6B,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BjI,KACvD,IAKI6E,EAAUkD,EALVrC,EAAW1F,EAAK,GAChBkI,EAAclI,EAAK,GACnBmI,EAAUnI,EAAK,GAGI+F,EAAI,EAC3B,GAAGL,EAAS0C,MAAMpJ,GAAgC,IAAxB8I,EAAgB9I,KAAa,CACtD,IAAI6F,KAAYqD,EACZtD,EAAoBiC,EAAEqB,EAAarD,KACrCD,EAAoBQ,EAAEP,GAAYqD,EAAYrD,IAGhD,GAAGsD,EAAS,IAAI1C,EAAS0C,EAAQvD,GAGlC,IADGqD,GAA4BA,EAA2BjI,GACrD+F,EAAIL,EAASM,OAAQD,IACzBgC,EAAUrC,EAASK,GAChBnB,EAAoBiC,EAAEiB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBpC,EAASK,IAAM,EAEhC,OAAOnB,EAAoBY,EAAEC,IAG1B4C,EAAqBC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FD,EAAmBjK,QAAQ4J,EAAqBO,KAAK,KAAM,IAC3DF,EAAmB5D,KAAOuD,EAAqBO,KAAK,KAAMF,EAAmB5D,KAAK8D,KAAKF,QC/CvF,IAAIG,EAAsB5D,EAAoBY,OAAET,EAAW,CAAC,MAAM,IAAOH,EAAoB,SAC7F4D,EAAsB5D,EAAoBY,EAAEgD","sources":["webpack://nextcloud/webpack/runtime/chunk loaded","webpack://nextcloud/./apps/files/src/utils/davUtils.js","webpack://nextcloud/./apps/files/src/utils/fileUtils.js","webpack://nextcloud/apps/files/src/components/TemplatePreview.vue","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?f2ee","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?ab98","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?132c","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?9f42","webpack://nextcloud/apps/files/src/views/TemplatePicker.vue","webpack://nextcloud/./apps/files/src/services/Templates.js","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?1259","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?c137","webpack://nextcloud/./apps/files/src/templates.js","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?8865","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?75fa","webpack://nextcloud/webpack/bootstrap","webpack://nextcloud/webpack/runtime/amd define","webpack://nextcloud/webpack/runtime/amd options","webpack://nextcloud/webpack/runtime/compat get default export","webpack://nextcloud/webpack/runtime/define property getters","webpack://nextcloud/webpack/runtime/global","webpack://nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack://nextcloud/webpack/runtime/make namespace object","webpack://nextcloud/webpack/runtime/node module decorator","webpack://nextcloud/webpack/runtime/runtimeId","webpack://nextcloud/webpack/runtime/jsonp chunk loading","webpack://nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n\n/**\n * Return the current directory, fallback to root\n *\n * @return {string}\n */\nexport const getCurrentDirectory = function() {\n\tconst currentDirInfo = OCA?.Files?.App?.currentFileList?.dirInfo\n\t\t|| { path: '/', name: '' }\n\n\t// Make sure we don't have double slashes\n\treturn `${currentDirInfo.path}/${currentDirInfo.name}`.replace(/\\/\\//gi, '/')\n}\n","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nconst encodeFilePath = function(path) {\n\tconst pathSections = (path.startsWith('/') ? path : `/${path}`).split('/')\n\tlet relativePath = ''\n\tpathSections.forEach((section) => {\n\t\tif (section !== '') {\n\t\t\trelativePath += '/' + encodeURIComponent(section)\n\t\t}\n\t})\n\treturn relativePath\n}\n\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nconst extractFilePaths = function(path) {\n\tconst pathSections = path.split('/')\n\tconst fileName = pathSections[pathSections.length - 1]\n\tconst dirPath = pathSections.slice(0, pathSections.length - 1).join('/')\n\treturn [dirPath, fileName]\n}\n\nexport { encodeFilePath, extractFilePaths }\n","\n\n\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!./TemplatePreview.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!./TemplatePreview.vue?vue&type=script&lang=js&\"","import api from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&lang=scss&scoped=true&\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=440aea22&scoped=true&\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&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 \"440aea22\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.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!./TemplatePicker.vue?vue&type=script&lang=js&\"","\n\n\n\n\n\n\n","/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","import api from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=447a36e2&lang=scss&scoped=true&\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=447a36e2&scoped=true&\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=447a36e2&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 \"447a36e2\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.opened)?_c('Modal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"large\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('button',{on:{\"click\":_vm.close}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Cancel'))+\"\\n\\t\\t\\t\")]),_vm._v(\" \"),_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('EmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2020 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getCurrentDirectory } from './utils/davUtils'\nimport axios from '@nextcloud/axios'\nimport Vue from 'vue'\n\nimport TemplatePickerView from './views/TemplatePicker'\nimport { showError } from '@nextcloud/dialogs'\n\n// Set up logger\nconst logger = getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n\n// Add translates functions\nVue.mixin({\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\n// Create document root\nconst TemplatePickerRoot = document.createElement('div')\nTemplatePickerRoot.id = 'template-picker'\ndocument.body.appendChild(TemplatePickerRoot)\n\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', [])\nlet templatesPath = loadState('files', 'templates_path', false)\nlogger.debug('Templates providers', templates)\nlogger.debug('Templates folder', { templatesPath })\n\n// Init vue app\nconst View = Vue.extend(TemplatePickerView)\nconst TemplatePicker = new View({\n\tname: 'TemplatePicker',\n\tpropsData: {\n\t\tlogger,\n\t},\n})\nTemplatePicker.$mount('#template-picker')\n\n// Init template engine after load to make sure it's the last injected entry\nwindow.addEventListener('DOMContentLoaded', function() {\n\tif (!templatesPath) {\n\t\tlogger.debug('Templates folder not initialized')\n\t\tconst initTemplatesPlugin = {\n\t\t\tattach(menu) {\n\t\t\t\t// register the new menu entry\n\t\t\t\tmenu.addMenuEntry({\n\t\t\t\t\tid: 'template-init',\n\t\t\t\t\tdisplayName: t('files', 'Set up templates folder'),\n\t\t\t\t\ttemplateName: t('files', 'Templates'),\n\t\t\t\t\ticonClass: 'icon-template-add',\n\t\t\t\t\tfileType: 'file',\n\t\t\t\t\tactionHandler(name) {\n\t\t\t\t\t\tinitTemplatesFolder(name)\n\t\t\t\t\t\tmenu.removeMenuEntry('template-init')\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\t\t}\n\t\tOC.Plugins.register('OCA.Files.NewFileMenu', initTemplatesPlugin)\n\t}\n})\n\n// Init template files menu\ntemplates.forEach((provider, index) => {\n\tconst newTemplatePlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: `template-new-${provider.app}-${index}`,\n\t\t\t\tdisplayName: provider.label,\n\t\t\t\ttemplateName: provider.label + provider.extension,\n\t\t\t\ticonClass: provider.iconClass || 'icon-file',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tTemplatePicker.open(name, provider)\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newTemplatePlugin)\n})\n\n/**\n * Init the template directory\n *\n * @param {string} name the templates folder name\n */\nconst initTemplatesFolder = async function(name) {\n\tconst templatePath = (getCurrentDirectory() + `/${name}`).replace('//', '/')\n\ttry {\n\t\tlogger.debug('Initializing the templates directory', { templatePath })\n\t\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n\t\t\ttemplatePath,\n\t\t\tcopySystemTemplates: true,\n\t\t})\n\n\t\t// Go to template directory\n\t\tOCA.Files.App.currentFileList.changeDirectory(templatePath, true, true)\n\n\t\ttemplates = response.data.ocs.data.templates\n\t\ttemplatesPath = response.data.ocs.data.template_path\n\t} catch (error) {\n\t\tlogger.error('Unable to initialize the templates directory')\n\t\tshowError(t('files', 'Unable to initialize the templates directory'))\n\t}\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:transparent !important;object-fit:initial}.template-picker__title[data-v-440aea22]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/components/TemplatePreview.vue\"],\"names\":[],\"mappings\":\"AAsJC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,iCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,uCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA\",\"sourcesContent\":[\"\\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\\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\\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.template-picker {\\n\\t&__item {\\n\\t\\tdisplay: flex;\\n\\t}\\n\\n\\t&__label {\\n\\t\\tdisplay: flex;\\n\\t\\t// Align in the middle of the grid\\n\\t\\talign-items: center;\\n\\t\\tflex: 1 1;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&, * {\\n\\t\\t\\tcursor: pointer;\\n\\t\\t\\tuser-select: none;\\n\\t\\t}\\n\\n\\t\\t&::before {\\n\\t\\t\\tdisplay: none !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__preview {\\n\\t\\tdisplay: block;\\n\\t\\toverflow: hidden;\\n\\t\\t// Stretch so all entries are the same width\\n\\t\\tflex: 1 1;\\n\\t\\twidth: var(--width);\\n\\t\\tmin-height: var(--height);\\n\\t\\tmax-height: var(--height);\\n\\t\\tpadding: 0;\\n\\t\\tborder: var(--border) solid var(--color-border);\\n\\t\\tborder-radius: var(--border-radius-large);\\n\\n\\t\\tinput:checked + label > & {\\n\\t\\t\\tborder-color: var(--color-primary);\\n\\t\\t}\\n\\n\\t\\t&--failed {\\n\\t\\t\\t// Make sure to properly center fallback icon\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\t}\\n\\n\\t&__image {\\n\\t\\tmax-width: 100%;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\n\\t\\tobject-fit: cover;\\n\\t}\\n\\n\\t// Failed preview, fallback to mime icon\\n\\t&__preview--failed &__image {\\n\\t\\twidth: calc(var(--margin) * 8);\\n\\t\\t// Center mime icon\\n\\t\\tmargin: auto;\\n\\t\\tbackground-color: transparent !important;\\n\\n\\t\\tobject-fit: initial;\\n\\t}\\n\\n\\t&__title {\\n\\t\\toverflow: hidden;\\n\\t\\t// also count preview border\\n\\t\\tmax-width: calc(var(--width) + 2*2px);\\n\\t\\tpadding: var(--margin);\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".templates-picker__form[data-v-447a36e2]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-447a36e2]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-447a36e2]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-447a36e2]{display:flex;justify-content:space-between;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-447a36e2],.templates-picker__buttons input[type=submit][data-v-447a36e2]{height:44px}.templates-picker[data-v-447a36e2] .modal-container{position:relative;overflow-y:auto !important}.templates-picker__loading[data-v-447a36e2]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/TemplatePicker.vue\"],\"names\":[],\"mappings\":\"AAsPC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,6BAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,qDACC,iBAAA,CACA,0BAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA\",\"sourcesContent\":[\"\\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\\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\\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\\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\\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.templates-picker {\\n\\t&__form {\\n\\t\\tpadding: calc(var(--margin) * 2);\\n\\t\\t// Will be handled by the buttons\\n\\t\\tpadding-bottom: 0;\\n\\n\\t\\th2 {\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t\\tmargin: var(--margin) 0 calc(var(--margin) * 2);\\n\\t\\t}\\n\\t}\\n\\n\\t&__list {\\n\\t\\tdisplay: grid;\\n\\t\\tgrid-gap: calc(var(--margin) * 2);\\n\\t\\tgrid-auto-columns: 1fr;\\n\\t\\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\\n\\t\\tmax-width: calc(var(--fullwidth) * 6);\\n\\t\\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\\n\\t\\t// Make sure all rows are the same height\\n\\t\\tgrid-auto-rows: 1fr;\\n\\t\\t// Center the columns set\\n\\t\\tjustify-content: center;\\n\\t}\\n\\n\\t&__buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: space-between;\\n\\t\\tpadding: calc(var(--margin) * 2) var(--margin);\\n\\t\\tposition: sticky;\\n\\t\\tbottom: 0;\\n\\t\\tbackground-image: linear-gradient(0, var(--gradient-main-background));\\n\\n\\t\\tbutton, input[type='submit'] {\\n\\t\\t\\theight: 44px;\\n\\t\\t}\\n\\t}\\n\\n\\t// Make sure we're relative for the loading emptycontent on top\\n\\t::v-deep .modal-container {\\n\\t\\tposition: relative;\\n\\t\\toverflow-y: auto !important;\\n\\t}\\n\\n\\t&__loading {\\n\\t\\tposition: absolute;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tjustify-content: center;\\n\\t\\twidth: 100%;\\n\\t\\theight: 100%;\\n\\t\\tmargin: 0;\\n\\t\\tbackground-color: var(--color-main-background-translucent);\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 831;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t831: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [820], () => (__webpack_require__(91297)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getCurrentDirectory","currentDirInfo","OCA","Files","App","currentFileList","dirInfo","path","name","replace","previewWidth","getCurrentUser","document","getElementById","value","pathSections","startsWith","split","relativePath","forEach","section","encodeURIComponent","options","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","id","domProps","checked","on","onCheck","_v","class","failedPreview","realPreviewUrl","onFailure","_s","nameWithoutExt","margin","async","axios","generateOcsUrl","data","ocs","filePath","templatePath","templateType","close","style","$event","preventDefault","stopPropagation","onSubmit","apply","arguments","t","_b","emptyTemplate","fileid","_l","provider","template","key","ratio","_e","logger","getLoggerBuilder","setApp","detectUser","build","Vue","methods","n","TemplatePickerRoot","createElement","body","appendChild","templates","loadState","templatesPath","debug","TemplatePicker","TemplatePickerView","propsData","$mount","window","addEventListener","initTemplatesPlugin","attach","menu","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","initTemplatesFolder","removeMenuEntry","OC","Plugins","register","index","newTemplatePlugin","fileList","app","label","extension","open","response","copySystemTemplates","changeDirectory","template_path","error","showError","___CSS_LOADER_EXPORT___","push","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","call","m","amdD","Error","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}