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AU,uCAAuC,YAAYQ,OAAM,IAAO,MAAK,EAAM,aAAa,CAAC1B,EAAIgB,GAAG,SAAShB,EAAIiB,GAAGjB,EAAIkB,EAAE,SAAU,gBAAgB,YAAYb,EAAG,MAAM,CAACsB,YAAY,kBAAkB,CAACtB,EAAG,cAAc,CAACuB,IAAI,cAActB,MAAM,CAAC,MAAQN,EAAI6B,YAAY,mBAAmB,WAAc,OAAO7B,EAAI8B,WAAWC,OAAS,eAAe,WAAc,OAAO/B,EAAI8B,WAAWE,SAAW,IAAI,KACv4B,IUWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/services/DavRequest.js","webpack:///photos/src/views/Tags.vue?vue&type=style&index=0&id=580f514c&lang=scss&scoped=true&","webpack:///photos/src/views/Tags.vue?vue&type=template&id=580f514c&scoped=true&","webpack:///photos/src/services/SystemTags.js","webpack:///photos/src/services/TaggedImages.js","webpack:///photos/src/components/Tag.vue","webpack:///photos/src/components/Tag.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Tag.vue?3237","webpack:///photos/src/components/Tag.vue?vue&type=template&id=d199bed4&","webpack:///photos/src/views/Tags.vue","webpack:///photos/src/views/Tags.vue?vue&type=script&lang=js&","webpack://photos/./src/views/Tags.vue?6520","webpack://photos/./src/views/Tags.vue?dcb7"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 <http://www.gnu.org/licenses/>.\n *\n */\nconst props = `\n\t<oc:fileid />\n\t<d:getlastmodified />\n\t<d:getetag />\n\t<d:getcontenttype />\n\t<d:getcontentlength />\n\t<nc:has-preview />\n\t<nc:file-metadata-size />\n\t<oc:favorite />\n\t<d:resourcetype />`\n\nexport { props }\nexport default `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.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, \"@media(min-width: 0px)and (max-width: 400px){.grid-container[data-v-580f514c]{padding:0px 8px 256px 8px}}@media(min-width: 400px)and (max-width: 700px){.grid-container[data-v-580f514c]{padding:0px 8px 256px 8px}}@media(min-width: 700px)and (max-width: 1024px){.grid-container[data-v-580f514c]{padding:0px 44px 256px 44px}}@media(min-width: 1024px)and (max-width: 1280px){.grid-container[data-v-580f514c]{padding:0px 44px 256px 44px}}@media(min-width: 1280px)and (max-width: 1440px){.grid-container[data-v-580f514c]{padding:0px 66px 256px 66px}}@media(min-width: 1440px)and (max-width: 1600px){.grid-container[data-v-580f514c]{padding:0px 66px 256px 66px}}@media(min-width: 1600px)and (max-width: 2048px){.grid-container[data-v-580f514c]{padding:0px 66px 256px 66px}}@media(min-width: 2048px)and (max-width: 2560px){.grid-container[data-v-580f514c]{padding:0px 88px 256px 88px}}@media(min-width: 2560px)and (max-width: 3440px){.grid-container[data-v-580f514c]{padding:0px 88px 256px 88px}}@media(min-width: 3440px){.grid-container[data-v-580f514c]{padding:0px 88px 256px 88px}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/mixins/GridSizes.scss\",\"webpack://./src/views/Tags.vue\"],\"names\":[],\"mappings\":\"AAoCG,6CCsPH,iCAEE,yBAAA,CAAA,CDxPC,+CCsPH,iCAEE,yBAAA,CAAA,CDxPC,gDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CDxPC,iDCsPH,iCAEE,2BAAA,CAAA,CD5PC,0BC0PH,iCAEE,2BAAA,CAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @author John Molakvoæ <skjnldsv@protonmail.com>\\n *\\n * @license AGPL-3.0-or-later\\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 <http://www.gnu.org/licenses/>.\\n *\\n */\\n@use 'sass:map';\\n\\n@mixin grid-sizes() {\\n\\t$previous: 0;\\n\\n\\t@each $size, $config in $sizes {\\n\\t\\t$count: map.get($config, 'count');\\n\\t\\t$marginTop: map.get($config, 'marginTop');\\n\\t\\t$marginW: map.get($config, 'marginW');\\n\\n\\t\\t@if $size == 'max' {\\n\\t\\t\\t@media (min-width: #{$previous}px) {\\n\\t\\t\\t\\t@content($marginTop, $marginW);\\n\\t\\t\\t}\\n\\t\\t} @else {\\n\\t\\t\\t@media (min-width: #{$previous}px) and (max-width: #{$size}px) {\\n\\t\\t\\t\\t@content($marginTop, $marginW);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$previous: $size;\\n\\t}\\n}\\n\",\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n@import '../mixins/GridSizes';\\n\\n.grid-container {\\n\\t@include grid-sizes using ($marginTop, $marginW) {\\n\\t\\tpadding: 0px #{$marginW}px 256px #{$marginW}px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('EmptyContent',[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'An error occurred'))+\"\\n\")]):(!_vm.loading)?_c('div',[_c('Navigation',{key:\"navigation\",attrs:{\"basename\":_vm.path,\"filename\":'/' + _vm.path,\"root-title\":_vm.rootTitle}}),_vm._v(\" \"),(_vm.isEmpty)?_c('EmptyContent',{key:\"emptycontent\",attrs:{\"illustration-name\":\"empty\"},scopedSlots:_vm._u([{key:\"desc\",fn:function(){return [_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Photos with tags will show up here'))+\"\\n\\t\\t\")]},proxy:true}],null,false,4132175345)},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'No tags yet'))+\"\\n\\t\\t\")]):_c('div',{staticClass:\"grid-container\"},[_c('VirtualGrid',{ref:\"virtualgrid\",attrs:{\"items\":_vm.contentList,\"get-column-count\":function () { return _vm.gridConfig.count; },\"get-grid-gap\":function () { return _vm.gridConfig.gap; }}})],1)],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 <http://www.gnu.org/licenses/>.\n *\n */\n\nimport client from './DavClient'\nimport { genFileInfo } from '../utils/fileUtils'\n\n/**\n * List system tags\n *\n * @param {string} path the path relative to the user root\n * @param {object} [options] optional options for axios\n * @return {Array} the file list\n */\nexport default async function(path, options = {}) {\n\tconst response = await client.getDirectoryContents('/systemtags/', Object.assign({}, {\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:id />\n\t\t\t\t\t<oc:display-name />\n\t\t\t\t\t<oc:user-visible />\n\t\t\t\t\t<oc:user-assignable />\n\t\t\t\t\t<oc:can-assign />\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`,\n\t\tdetails: true,\n\t}, options))\n\n\treturn response.data.map(data => genFileInfo(data))\n}\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { genFileInfo } from '../utils/fileUtils'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { props } from './DavRequest'\nimport allowedMimes from './AllowedMimes'\nimport client from './DavClient'\n\n/**\n * Get tagged files based on provided tag id\n *\n * @param {number} id the tag id to filter\n * @param {object} [options] optional options for axios\n * @return {Array} the file list\n */\nexport default async function(id, options = {}) {\n\n\toptions = Object.assign({\n\t\tmethod: 'REPORT',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-files\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t${props}\n\t\t\t\t</d:prop>\n\t\t\t\t<oc:filter-rules>\n\t\t\t\t\t<oc:systemtag>${id}</oc:systemtag>\n\t\t\t\t</oc:filter-rules>\n\t\t\t</oc:filter-files>`,\n\t\tdetails: true,\n\t}, options)\n\n\tconst prefixPath = `/files/${getCurrentUser().uid}`\n\tconst response = await client.getDirectoryContents(prefixPath, options)\n\n\treturn response.data\n\t\t.map(data => genFileInfo(data))\n\t\t// filter out unwanted mime because server REPORT service only support\n\t\t// hardcoded props and mime is not one of them\n\t\t// https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php#L274\n\t\t.filter(file => file.mime && allowedMimes.indexOf(file.mime) !== -1)\n\t\t// remove prefix path from full file path\n\t\t.map(data => Object.assign({}, data, { filename: data.filename.replace(prefixPath, '') }))\n}\n","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Corentin Mors <medias@pixelswap.fr>\n -\n - @license AGPL-3.0-or-later\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 <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<FolderTagPreview :id=\"item.injected.id\"\n\t\ticon=\"icon-tag\"\n\t\t:name=\"item.injected.displayName\"\n\t\t:path=\"item.injected.displayName\"\n\t\t:file-list=\"fileList\" />\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\n\nimport getTaggedImages from '../services/TaggedImages'\nimport cancelableRequest from '../utils/CancelableRequest'\nimport FolderTagPreview from './FolderTagPreview'\n\nexport default {\n\tname: 'Tag',\n\n\tcomponents: {\n\t\tFolderTagPreview,\n\t},\n\tinheritAttrs: false,\n\n\tprops: {\n\t\titem: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t]),\n\n\t\t// files list of the current folder\n\t\tfolderContent() {\n\t\t\treturn this.tags[this.item.injected.id].files\n\t\t},\n\t\tfileList() {\n\t\t\treturn this.folderContent\n\t\t\t\t? this.folderContent\n\t\t\t\t\t.map(id => this.files[id])\n\t\t\t\t\t.filter(file => !!file)\n\t\t\t\t\t.slice(0, 4) // only get the 4 first images\n\t\t\t\t: []\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync created() {\n\t\t// init cancellable request\n\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\tthis.cancelRequest = cancel\n\n\t\ttry {\n\t\t\t// get data\n\t\t\tconst files = await request(this.item.injected.id)\n\t\t\tthis.$store.dispatch('updateTag', { id: this.item.injected.id, files })\n\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t} catch (error) {\n\t\t\tif (error.response && error.response.status) {\n\t\t\t\tconsole.error('Failed to get folder content', this.item.injected.id, error.response)\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.cancelRequest = null\n\t\t}\n\t},\n\n}\n</script>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tag.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!./Tag.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=d199bed4&\"\nimport script from \"./Tag.vue?vue&type=script&lang=js&\"\nexport * from \"./Tag.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FolderTagPreview',{attrs:{\"id\":_vm.item.injected.id,\"icon\":\"icon-tag\",\"name\":_vm.item.injected.displayName,\"path\":_vm.item.injected.displayName,\"file-list\":_vm.fileList}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Corentin Mors <medias@pixelswap.fr>\n -\n - @license AGPL-3.0-or-later\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 <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<!-- Errors handlers-->\n\t<EmptyContent v-if=\"error\">\n\t\t{{ t('photos', 'An error occurred') }}\n\t</EmptyContent>\n\n\t<!-- Folder content -->\n\t<div v-else-if=\"!loading\">\n\t\t<Navigation key=\"navigation\"\n\t\t\t:basename=\"path\"\n\t\t\t:filename=\"'/' + path\"\n\t\t\t:root-title=\"rootTitle\" />\n\t\t<EmptyContent v-if=\"isEmpty\" key=\"emptycontent\" illustration-name=\"empty\">\n\t\t\t{{ t('photos', 'No tags yet') }}\n\t\t\t<template #desc>\n\t\t\t\t{{ t('photos', 'Photos with tags will show up here') }}\n\t\t\t</template>\n\t\t</EmptyContent>\n\n\t\t<div v-else class=\"grid-container\">\n\t\t\t<VirtualGrid ref=\"virtualgrid\"\n\t\t\t\t:items=\"contentList\"\n\t\t\t\t:get-column-count=\"() => gridConfig.count\"\n\t\t\t\t:get-grid-gap=\"() => gridConfig.gap\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mapGetters } from 'vuex'\nimport VirtualGrid from 'vue-virtual-grid'\n\nimport getSystemTags from '../services/SystemTags'\nimport getTaggedImages from '../services/TaggedImages'\n\nimport EmptyContent from '../components/EmptyContent'\nimport Tag from '../components/Tag'\nimport File from '../components/File'\nimport Navigation from '../components/Navigation'\n\nimport GridConfigMixin from '../mixins/GridConfig'\n\nimport cancelableRequest from '../utils/CancelableRequest'\n\nexport default {\n\tname: 'Tags',\n\tcomponents: {\n\t\tVirtualGrid,\n\t\tEmptyContent,\n\t\tNavigation,\n\t},\n\tmixins: [GridConfigMixin],\n\tprops: {\n\t\trootTitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tisRoot: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\terror: null,\n\t\t\tcancelRequest: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// global lists\n\t\t...mapGetters([\n\t\t\t'files',\n\t\t\t'tags',\n\t\t\t'tagsNames',\n\t\t]),\n\n\t\t// current tag id from current path\n\t\ttagId() {\n\t\t\treturn this.$store.getters.tagId(this.path)\n\t\t},\n\n\t\t// current tag\n\t\ttag() {\n\t\t\treturn this.tags[this.tagId]\n\t\t},\n\n\t\ttagsList() {\n\t\t\treturn Object.values(this.tagsNames).map((tagsId) => this.tags[tagsId])\n\t\t},\n\n\t\t// files list of the current tag\n\t\tfileList() {\n\t\t\treturn this.tag && this.tag.files\n\t\t\t\t.map(id => this.files[id])\n\t\t\t\t.filter(file => !!file)\n\t\t},\n\n\t\tcontentList() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn this.tagsList.flatMap((tag) => {\n\t\t\t\t\treturn tag.id === ''\n\t\t\t\t\t\t? []\n\t\t\t\t\t\t: [{\n\t\t\t\t\t\t\tid: `tag-${tag.id}`,\n\t\t\t\t\t\t\tinjected: {\n\t\t\t\t\t\t\t\t...tag,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\twidth: 256,\n\t\t\t\t\t\t\theight: 256,\n\t\t\t\t\t\t\tcolumnSpan: 1,\n\t\t\t\t\t\t\trenderComponent: Tag,\n\t\t\t\t\t\t}]\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn this.fileList.map((file) => {\n\t\t\t\treturn {\n\t\t\t\t\tid: `file-${file.fileid}`,\n\t\t\t\t\tinjected: {\n\t\t\t\t\t\t...file,\n\t\t\t\t\t\tlist: this.fileList,\n\t\t\t\t\t},\n\t\t\t\t\twidth: 256,\n\t\t\t\t\theight: 256,\n\t\t\t\t\tcolumnSpan: 1,\n\t\t\t\t\trenderComponent: File,\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tisEmpty() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn Object.keys(this.tagsNames).length === 0\n\t\t\t}\n\t\t\treturn this.fileList.length === 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tasync path() {\n\t\t\t// if we don't have the tag in the store yet,\n\t\t\t// we need to fetch the list first\n\t\t\tif (!this.tagId) {\n\t\t\t\tawait this.fetchRootContent()\n\t\t\t}\n\n\t\t\t// if we're not in the root, we fetch the data\n\t\t\tif (!this.isRoot) {\n\t\t\t\tthis.fetchContent()\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\t// cancel any pending requests\n\t\tif (this.cancelRequest) {\n\t\t\tthis.cancelRequest('Navigated away')\n\t\t}\n\t},\n\n\tasync beforeMount() {\n\t\t// if we don't have the tag in the store yet,\n\t\t// we need to fetch the list first\n\t\tif (!this.tagId) {\n\t\t\tawait this.fetchRootContent()\n\t\t}\n\n\t\t// if we're not in the root, we fetch the data\n\t\tif (!this.isRoot) {\n\t\t\tthis.fetchContent()\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync fetchRootContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest('Changed folder')\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getSystemTags)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// fetch content\n\t\t\t\tconst tags = await request()\n\t\t\t\tthis.$store.dispatch('updateTags', tags)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\n\t\t},\n\n\t\tasync fetchContent() {\n\t\t\t// cancel any pending requests\n\t\t\tif (this.cancelRequest) {\n\t\t\t\tthis.cancelRequest()\n\t\t\t}\n\n\t\t\t// close any potential opened viewer\n\t\t\tOCA.Viewer.close()\n\n\t\t\t// if we don't already have some cached data let's show a loader\n\t\t\tif (!this.tags[this.tagId]) {\n\t\t\t\tthis.$emit('update:loading', true)\n\t\t\t}\n\t\t\tthis.error = null\n\n\t\t\t// init cancellable request\n\t\t\tconst { request, cancel } = cancelableRequest(getTaggedImages)\n\t\t\tthis.cancelRequest = cancel\n\n\t\t\ttry {\n\t\t\t\t// get data\n\t\t\t\tconst files = await request(this.tagId)\n\t\t\t\tthis.$store.dispatch('updateTag', { id: this.tagId, files })\n\t\t\t\tthis.$store.dispatch('appendFiles', files)\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.error = true\n\t\t\t} finally {\n\t\t\t\t// done loading\n\t\t\t\tthis.$emit('update:loading', false)\n\t\t\t\tthis.cancelRequest = null\n\t\t\t}\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../mixins/GridSizes';\n\n.grid-container {\n\t@include grid-sizes using ($marginTop, $marginW) {\n\t\tpadding: 0px #{$marginW}px 256px #{$marginW}px;\n\t}\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.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!./Tags.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=style&index=0&id=580f514c&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tags.vue?vue&type=style&index=0&id=580f514c&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Tags.vue?vue&type=template&id=580f514c&scoped=true&\"\nimport script from \"./Tags.vue?vue&type=script&lang=js&\"\nexport * from \"./Tags.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Tags.vue?vue&type=style&index=0&id=580f514c&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 \"580f514c\",\n null\n \n)\n\nexport default component.exports"],"names":["props","___CSS_LOADER_EXPORT___","push","module","id","path","options","client","Object","assign","data","details","response","map","genFileInfo","method","prefixPath","getCurrentUser","uid","filter","file","mime","allowedMimes","filename","replace","_vm","this","_h","$createElement","_self","_c","attrs","item","injected","displayName","fileList","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_v","_s","t","loading","_e","key","rootTitle","scopedSlots","_u","fn","proxy","staticClass","ref","contentList","gridConfig","count","gap"],"sourceRoot":""}