photos/js/photos-src_mixins_FetchAlbu...

1 line
44 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchAlbumsMixin_js-src_components_AlbumForm_vue.js?v=c891259ea2d3cfdd3c09","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;ACvCA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack:///photos/src/components/AlbumForm.vue?vue&type=script&lang=js&","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=script&lang=js&","webpack:///photos/src/mixins/FetchAlbumsMixin.js","webpack:///photos/src/components/AlbumForm.vue?vue&type=style&index=0&id=59290653&lang=scss&scoped=true&","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=414c8cf3&lang=scss&scoped=true&","webpack://photos/./src/components/AlbumForm.vue?b08f","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?26fd","webpack:///photos/src/components/AlbumForm.vue","webpack:///photos/src/components/CollaboratorsSelectionForm.vue","webpack://photos/./src/components/AlbumForm.vue?18f8","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?67ff","webpack://photos/./src/components/AlbumForm.vue?1645","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?4b0d","webpack:///photos/src/components/AlbumForm.vue?vue&type=template&id=59290653&scoped=true&","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=template&id=414c8cf3&scoped=true&","webpack://photos/./src/components/AlbumForm.vue?91ad","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?f7b1"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapActions } from 'vuex';\nimport MapMarker from 'vue-material-design-icons/MapMarker'; // import AccountMultiplePlus from 'vue-material-design-icons/AccountMultiplePlus'\n\nimport Send from 'vue-material-design-icons/Send';\nimport { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue';\nimport moment from '@nextcloud/moment';\nimport CollaboratorsSelectionForm from './CollaboratorsSelectionForm.vue';\nexport default {\n name: 'AlbumForm',\n components: {\n NcButton: NcButton,\n MapMarker: MapMarker,\n // AccountMultiplePlus,\n Send: Send,\n NcLoadingIcon: NcLoadingIcon,\n NcTextField: NcTextField,\n CollaboratorsSelectionForm: CollaboratorsSelectionForm\n },\n props: {\n album: {\n type: Object,\n default: null\n },\n displayBackButton: {\n type: Boolean,\n default: false\n }\n },\n data: function data() {\n return {\n showCollaboratorView: false,\n albumName: '',\n albumLocation: '',\n loading: false\n };\n },\n computed: {\n editMode: function editMode() {\n return this.album !== null;\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n if (this.editMode) {\n this.albumName = this.album.basename;\n this.albumLocation = this.album.location;\n }\n\n this.$nextTick(function () {\n _this.$refs.nameInput.$el.getElementsByTagName('input')[0].focus();\n });\n },\n methods: _objectSpread(_objectSpread({}, mapActions(['createAlbum', 'renameAlbum', 'updateAlbumLocation'])), {}, {\n submit: function submit() {\n var collaborators = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (this.albumName === '' || this.loading) {\n return;\n }\n\n if (this.editMode) {\n this.handleUpdateAlbum(collaborators);\n } else {\n this.handleCreateAlbum(collaborators);\n }\n },\n handleCreateAlbum: function handleCreateAlbum() {\n var _arguments = arguments,\n _this2 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var collaborators, album;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n collaborators = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : [];\n _context.prev = 1;\n _this2.loading = true;\n _context.next = 5;\n return _this2.createAlbum({\n album: {\n basename: _this2.albumName,\n nbItems: 0,\n location: _this2.albumLocation,\n lastPhoto: '',\n date: moment().format('MMMM YYYY'),\n collaborators: collaborators\n }\n });\n\n case 5:\n album = _context.sent;\n\n _this2.$emit('done', {\n album: album\n });\n\n case 7:\n _context.prev = 7;\n _this2.loading = false;\n return _context.finish(7);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[1,, 7, 10]]);\n }))();\n },\n handleUpdateAlbum: function handleUpdateAlbum() {\n var _arguments2 = arguments,\n _this3 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var collaborators, album;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n collaborators = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : [];\n _context2.prev = 1;\n _this3.loading = true;\n album = _objectSpread({}, _this3.album);\n\n if (!(_this3.album.basename !== _this3.albumName)) {\n _context2.next = 8;\n break;\n }\n\n _context2.next = 7;\n return _this3.renameAlbum({\n currentAlbumName: _this3.album.basename,\n newAlbumName: _this3.albumName\n });\n\n case 7:\n album = _context2.sent;\n\n case 8:\n if (!(_this3.album.location !== _this3.albumLocation)) {\n _context2.next = 12;\n break;\n }\n\n _context2.next = 11;\n return _this3.updateAlbumLocation({\n albumName: _this3.albumName,\n newLocation: _this3.albumLocation\n });\n\n case 11:\n album.location = _context2.sent;\n\n case 12:\n _this3.$emit('done', {\n album: album\n });\n\n case 13:\n _context2.prev = 13;\n _this3.loading = false;\n return _context2.finish(13);\n\n case 16:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[1,, 13, 16]]);\n }))();\n },\n back: function back() {\n this.$emit('back');\n }\n })\n};","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport Magnify from 'vue-material-design-icons/Magnify';\nexport default {\n name: 'CollaboratorsSelectionForm',\n components: {\n Magnify: Magnify\n },\n data: function data() {\n return {\n loading: false\n };\n }\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\n/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\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 */\nimport { mapGetters } from 'vuex';\nimport moment from '@nextcloud/moment';\nimport { showError } from '@nextcloud/dialogs';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport client from '../services/DavClient.js';\nimport logger from '../services/logger.js';\nimport { genFileInfo } from '../utils/fileUtils.js';\nimport AbortControllerMixin from './AbortControllerMixin';\nexport default {\n name: 'FetchAlbumsMixin',\n data: function data() {\n return {\n errorFetchingAlbums: null,\n loadingAlbums: false\n };\n },\n mixins: [AbortControllerMixin],\n beforeMount: function beforeMount() {\n var _this = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this.fetchAlbums();\n\n case 1:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }))();\n },\n beforeDestroy: function beforeDestroy() {\n this.cancelAlbumsRequest('Changed view');\n },\n computed: _objectSpread({}, mapGetters(['albums'])),\n methods: {\n fetchAlbums: function fetchAlbums() {\n var _this2 = this;\n\n return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var _getCurrentUser, response, albums, _error$response;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!_this2.loadingAlbums) {\n _context2.next = 2;\n break;\n }\n\n return _context2.abrupt(\"return\");\n\n case 2:\n _context2.prev = 2;\n _this2.loadingAlbums = true;\n _this2.errorFetchingAlbums = null;\n _context2.next = 7;\n return client.getDirectoryContents(\"/photos/\".concat((_getCurrentUser = getCurrentUser()) === null || _getCurrentUser === void 0 ? void 0 : _getCurrentUser.uid, \"/albums\"), {\n data: \"<?xml version=\\\"1.0\\\"?>\\n\\t\\t\\t\\t\\t\\t\\t<d:propfind xmlns:d=\\\"DAV:\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\txmlns:oc=\\\"http://owncloud.org/ns\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\txmlns:nc=\\\"http://nextcloud.org/ns\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\txmlns:ocs=\\\"http://open-collaboration-services.org/ns\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t<d:prop>\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t<nc:last-photo />\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t<nc:nbItems />\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t<nc:location />\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t<nc:dateRange />\\n\\t\\t\\t\\t\\t\\t\\t\\t</d:prop>\\n\\t\\t\\t\\t\\t\\t\\t</d:propfind>\",\n details: true,\n signal: _this2.abortController.signal\n });\n\n case 7:\n response = _context2.sent;\n albums = response.data.filter(function (album) {\n return album.filename !== '/photos/admin/albums';\n }).map(function (album) {\n return genFileInfo(album);\n }).map(function (album) {\n var _album$dateRange$repl, _album$dateRange;\n\n var dateRange = JSON.parse((_album$dateRange$repl = (_album$dateRange = album.dateRange) === null || _album$dateRange === void 0 ? void 0 : _album$dateRange.replace(/&quot;/g, '\"')) !== null && _album$dateRange$repl !== void 0 ? _album$dateRange$repl : '{}');\n\n if (dateRange.start === null) {\n dateRange.start = moment().unix();\n dateRange.end = moment().unix();\n }\n\n var dateRangeFormated = {\n startDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n endDate: moment.unix(dateRange.end).format('MMMM YYYY')\n };\n\n if (dateRangeFormated.startDate === dateRangeFormated.endDate) {\n return _objectSpread(_objectSpread({}, album), {}, {\n date: dateRangeFormated\n });\n } else {\n return _objectSpread(_objectSpread({}, album), {}, {\n date: _this2.t('photos', '{startDate} to {endDate}', dateRangeFormated)\n });\n }\n });\n\n _this2.$store.dispatch('addAlbums', {\n albums: albums\n });\n\n logger.debug(\"[FetchAlbumsMixin] Fetched \".concat(albums.length, \" new files: \"), albums);\n _context2.next = 26;\n break;\n\n case 13:\n _context2.prev = 13;\n _context2.t0 = _context2[\"catch\"](2);\n\n if (!(((_error$response = _context2.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 404)) {\n _context2.next = 19;\n break;\n }\n\n _this2.errorFetchingAlbums = 404;\n _context2.next = 24;\n break;\n\n case 19:\n if (!(_context2.t0.code === 'ERR_CANCELED')) {\n _context2.next = 23;\n break;\n }\n\n return _context2.abrupt(\"return\");\n\n case 23:\n _this2.errorFetchingAlbums = _context2.t0;\n\n case 24:\n logger.error(t('photos', 'Failed to fetch albums list.'), _context2.t0);\n showError(t('photos', 'Failed to fetch albums list.'));\n\n case 26:\n _context2.prev = 26;\n _this2.loadingAlbums = false;\n return _context2.finish(26);\n\n case 29:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[2, 13, 26, 29]]);\n }))();\n }\n }\n};","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".album-form[data-v-59290653] {\\n display: flex;\\n flex-direction: column;\\n height: 350px;\\n padding: 16px;\\n}\\n.album-form .form-title[data-v-59290653] {\\n font-weight: bold;\\n}\\n.album-form .form-subtitle[data-v-59290653] {\\n color: var(--color-text-lighter);\\n}\\n.album-form .form-inputs[data-v-59290653] {\\n flex-grow: 1;\\n justify-items: flex-end;\\n}\\n.album-form .form-inputs input[data-v-59290653] {\\n width: 100%;\\n}\\n.album-form .form-inputs label[data-v-59290653] {\\n display: flex;\\n margin-top: 16px;\\n}\\n.album-form .form-inputs label[data-v-59290653] svg {\\n margin-right: 12px;\\n}\\n.album-form .form-buttons[data-v-59290653] {\\n display: flex;\\n justify-content: space-between;\\n}\\n.album-form .form-buttons .left-buttons[data-v-59290653], .album-form .form-buttons .right-buttons[data-v-59290653] {\\n display: flex;\\n}\\n.album-form .form-buttons .right-buttons[data-v-59290653] {\\n justify-content: flex-end;\\n}\\n.album-form .form-buttons button[data-v-59290653] {\\n margin-right: 16px;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".add-collaborators-form[data-v-414c8cf3] {\\n display: flex;\\n flex-direction: column;\\n height: 500px;\\n padding: 16px;\\n}\\n.add-collaborators-form .form-title[data-v-414c8cf3] {\\n font-weight: bold;\\n}\\n.add-collaborators-form .form-subtitle[data-v-414c8cf3] {\\n color: var(--color-text-lighter);\\n}\\n.add-collaborators-form .form-inputs[data-v-414c8cf3] {\\n flex-grow: 1;\\n justify-items: flex-end;\\n}\\n.add-collaborators-form .form-inputs input[data-v-414c8cf3] {\\n width: 100%;\\n}\\n.add-collaborators-form .form-inputs label[data-v-414c8cf3] {\\n display: flex;\\n margin-top: 16px;\\n}\\n.add-collaborators-form .form-inputs label[data-v-414c8cf3] svg {\\n margin-right: 12px;\\n}\\n.add-collaborators-form .form-buttons[data-v-414c8cf3] {\\n display: flex;\\n justify-content: space-between;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\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!./AlbumForm.vue?vue&type=style&index=0&id=59290653&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!./AlbumForm.vue?vue&type=style&index=0&id=59290653&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","\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!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=414c8cf3&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!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=414c8cf3&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AlbumForm.vue?vue&type=template&id=59290653&scoped=true&\"\nimport script from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nexport * from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AlbumForm.vue?vue&type=style&index=0&id=59290653&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 \"59290653\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/admin/Docker/apps2/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('59290653')) {\n api.createRecord('59290653', component.options)\n } else {\n api.reload('59290653', component.options)\n }\n module.hot.accept(\"./AlbumForm.vue?vue&type=template&id=59290653&scoped=true&\", function () {\n api.rerender('59290653', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/AlbumForm.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./CollaboratorsSelectionForm.vue?vue&type=template&id=414c8cf3&scoped=true&\"\nimport script from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=414c8cf3&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 \"414c8cf3\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/admin/Docker/apps2/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('414c8cf3')) {\n api.createRecord('414c8cf3', component.options)\n } else {\n api.reload('414c8cf3', component.options)\n }\n module.hot.accept(\"./CollaboratorsSelectionForm.vue?vue&type=template&id=414c8cf3&scoped=true&\", function () {\n api.rerender('414c8cf3', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/CollaboratorsSelectionForm.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.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!./AlbumForm.vue?vue&type=script&lang=js&\"","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.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!./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"","export * from \"-!../../node_modules/style-loader/dist/cjs.js!../../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!./AlbumForm.vue?vue&type=style&index=0&id=59290653&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/style-loader/dist/cjs.js!../../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!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=414c8cf3&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.vue?vue&type=template&id=59290653&scoped=true&\"","export * from \"-!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.vue?vue&type=template&id=414c8cf3&scoped=true&\"","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return !_vm.showCollaboratorView\n ? _c(\n \"form\",\n {\n staticClass: \"album-form\",\n on: {\n submit: function ($event) {\n $event.preventDefault()\n return _vm.submit.apply(null, arguments)\n },\n },\n },\n [\n _c(\n \"div\",\n { staticClass: \"form-inputs\" },\n [\n _c(\"NcTextField\", {\n ref: \"nameInput\",\n attrs: {\n value: _vm.albumName,\n type: \"text\",\n name: \"name\",\n required: true,\n autofocus: \"true\",\n placeholder: _vm.t(\"photos\", \"Name of the album\"),\n },\n on: {\n \"update:value\": function ($event) {\n _vm.albumName = $event\n },\n },\n }),\n _vm._v(\" \"),\n _c(\n \"label\",\n [\n _c(\"MapMarker\"),\n _c(\"NcTextField\", {\n attrs: {\n value: _vm.albumLocation,\n name: \"location\",\n type: \"text\",\n placeholder: _vm.t(\"photos\", \"Location of the album\"),\n },\n on: {\n \"update:value\": function ($event) {\n _vm.albumLocation = $event\n },\n },\n }),\n ],\n 1\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"form-buttons\" }, [\n _c(\n \"span\",\n { staticClass: \"left-buttons\" },\n [\n _vm.displayBackButton\n ? _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.t(\n \"photos\",\n \"Go back to the previous view.\"\n ),\n type: \"tertiary\",\n },\n on: { click: _vm.back },\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Back\")) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n )\n : _vm._e(),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"span\",\n { staticClass: \"right-buttons\" },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.editMode\n ? _vm.t(\"photos\", \"Save.\")\n : _vm.t(\"photos\", \"Create the album.\"),\n type: \"primary\",\n disabled: _vm.albumName === \"\" || _vm.loading,\n },\n on: {\n click: function ($event) {\n return _vm.submit()\n },\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [\n _vm.loading ? _c(\"NcLoadingIcon\") : _c(\"Send\"),\n ]\n },\n proxy: true,\n },\n ],\n null,\n false,\n 3914512768\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(\n _vm.editMode\n ? _vm.t(\"photos\", \"Save\")\n : _vm.t(\"photos\", \"Create album\")\n ) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n ]),\n ]\n )\n : _c(\"CollaboratorsSelectionForm\", {\n staticClass: \"add-collaborators-form\",\n on: {\n cancel: function ($event) {\n _vm.showCollaboratorView = true\n },\n },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (ref) {\n var collaborators = ref.collaborators\n return [\n _c(\n \"span\",\n { staticClass: \"left-buttons\" },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.t(\n \"photos\",\n \"Back to the new album form.\"\n ),\n type: \"tertiary\",\n },\n on: {\n click: function ($event) {\n _vm.showCollaboratorView = false\n },\n },\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Back\")) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"span\",\n { staticClass: \"right-buttons\" },\n [\n _c(\n \"NcButton\",\n {\n attrs: {\n \"aria-label\": _vm.editMode\n ? _vm.t(\"photos\", \"Save.\")\n : _vm.t(\"photos\", \"Create the album.\"),\n type: \"primary\",\n disabled: _vm.albumName.trim() === \"\" || _vm.loading,\n },\n on: {\n click: function ($event) {\n return _vm.submit(collaborators)\n },\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [\n _vm.loading\n ? _c(\"NcLoadingIcon\")\n : _c(\"Send\"),\n ]\n },\n proxy: true,\n },\n ],\n null,\n true\n ),\n },\n [\n _vm._v(\n \"\\n\\t\\t\\t\\t\" +\n _vm._s(\n _vm.editMode\n ? _vm.t(\"photos\", \"Save\")\n : _vm.t(\"photos\", \"Create album\")\n ) +\n \"\\n\\t\\t\\t\"\n ),\n ]\n ),\n ],\n 1\n ),\n ]\n },\n },\n ]),\n })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"form\",\n {\n staticClass: \"add-collaborators-form\",\n on: {\n submit: function ($event) {\n $event.preventDefault()\n },\n },\n },\n [\n _c(\"h2\", { staticClass: \"form-title\" }, [\n _vm._v(\n \"\\n\\t\\t\" + _vm._s(_vm.t(\"photos\", \"Add collaborators\")) + \"\\n\\t\"\n ),\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"form-subtitle\" }, [\n _vm._v(\n \"\\n\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Add users who can edit your album\")) +\n \"\\n\\t\"\n ),\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"form-subtitle\" }, [\n _vm._v(\n \"\\n\\t\\t\" +\n _vm._s(_vm.t(\"photos\", \"Share this album via link\")) +\n \"\\n\\t\"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"form-inputs\" },\n [\n _c(\"Magnify\"),\n _c(\"NcTextField\", {\n attrs: {\n type: \"text\",\n name: \"search\",\n placeholder: _vm.t(\n \"photos\",\n \"Search users, email or Federated Cloud ID\"\n ),\n },\n }),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"form-buttons\" },\n [_vm._t(\"default\", null, { collaborators: \"collaborators\" })],\n 2\n ),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"],"names":[],"sourceRoot":""}