photos/js/photos-src_views_Folders_vu...

3 lines
48 KiB
JavaScript

/*! For license information please see photos-src_views_Folders_vue.js.LICENSE.txt */
(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_Folders_vue"],{16897:t=>{t.exports={sizes:{400:{marginTop:66,marginW:8,count:3,gap:8},700:{marginTop:66,marginW:8,count:4,gap:8},1024:{marginTop:66,marginW:44,count:5,gap:8},1280:{marginTop:66,marginW:44,count:4,gap:8},1440:{marginTop:88,marginW:66,count:5,gap:8},1600:{marginTop:88,marginW:66,count:6,gap:8},2048:{marginTop:88,marginW:66,count:7,gap:8},2560:{marginTop:88,marginW:88,count:8,gap:8},3440:{marginTop:88,marginW:88,count:9,gap:8},max:{marginTop:88,marginW:88,count:10,gap:8}}}},69363:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i={name:"AbortControllerMixin",data:()=>({abortController:new AbortController}),beforeDestroy(){this.abortController.abort()},beforeRouteLeave(t,e,n){this.abortController.abort(),this.abortController=new AbortController,n()}}},81090:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(69183),a=n(79753),o=n(43554),r=n(28304);const s="photos:user-config-changed",d={data(){const t=localStorage.getItem("photos:croppedLayout");return{croppedLayout:null!==t?"true"===t:"true"===(0,o.j)("photos","croppedLayout","false"),photosLocation:(0,o.j)("photos","photosLocation","")}},created(){(0,i.Ld)(s,this.updateLocalSetting)},beforeDestroy(){(0,i.r1)(s,this.updateLocalSetting)},methods:{updateLocalSetting(t){let{setting:e,value:n}=t;this[e]=n},updateSetting(t){const e=this[t];r.Z.put((0,a.nu)("apps/photos/api/v1/config/"+t),{value:e.toString()}),localStorage.setItem("photos:"+t,e),(0,i.j8)(s,{setting:t,value:e})}}}},46262:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,".file[data-v-7f7a68cc],.folder[data-v-7f7a68cc]{position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border-radius:var(--border-radius);overflow:hidden}.file .cover[data-v-7f7a68cc],.folder .cover[data-v-7f7a68cc]{z-index:2;width:100%;padding-bottom:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:0;background-color:var(--color-main-text)}.file.active .cover[data-v-7f7a68cc],.file:active .cover[data-v-7f7a68cc],.file:hover .cover[data-v-7f7a68cc],.file:focus .cover[data-v-7f7a68cc],.folder.active .cover[data-v-7f7a68cc],.folder:active .cover[data-v-7f7a68cc],.folder:hover .cover[data-v-7f7a68cc],.folder:focus .cover[data-v-7f7a68cc]{opacity:.3}.file--clear.active .cover[data-v-7f7a68cc],.file--clear:active .cover[data-v-7f7a68cc],.file--clear:hover .cover[data-v-7f7a68cc],.file--clear:focus .cover[data-v-7f7a68cc],.folder--clear.active .cover[data-v-7f7a68cc],.folder--clear:active .cover[data-v-7f7a68cc],.folder--clear:hover .cover[data-v-7f7a68cc],.folder--clear:focus .cover[data-v-7f7a68cc]{opacity:.1}.fade-enter-active[data-v-7f7a68cc],.fade-leave-active[data-v-7f7a68cc]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-7f7a68cc],.fade-leave-to[data-v-7f7a68cc]{opacity:0}.transition-group[data-v-7f7a68cc]{display:contents}.icon-video-white[data-v-7f7a68cc]{position:absolute;top:10px;right:10px;z-index:20}img[data-v-7f7a68cc]{position:absolute;width:100%;height:100%;z-index:10;color:rgba(0,0,0,0);object-fit:contain}.file--cropped img[data-v-7f7a68cc]{object-fit:cover}svg[data-v-7f7a68cc]{position:absolute;width:70%;height:70%}","",{version:3,sources:["webpack://./src/mixins/FileFolder.scss","webpack://./src/components/FileLegacy.vue"],names:[],mappings:"AAsBA,gDAEC,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,wBAAA,CAAA,gBAAA,CACA,kCAAA,CACA,eAAA,CAEA,8DACC,SAAA,CAMA,UAAA,CACA,mBAAA,CACA,qDAAA,CACA,SAAA,CACA,uCAAA,CAOA,4SACC,UAAA,CAQD,oWACC,UAAA,CAKH,wEACC,qDAAA,CAGD,6DACC,SAAA,CClED,mCACC,gBAAA,CAGD,mCACC,iBAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,qBACC,iBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CAEA,mBAAA,CAEA,kBAAA,CAEA,oCACC,gBAAA,CAIF,qBACC,iBAAA,CACA,SAAA,CACA,UAAA",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\n.file,\n.folder {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tuser-select: none;\n\tborder-radius: var(--border-radius);\n\toverflow: hidden;\n\n\t.cover {\n\t\tz-index: 2;\n\t\t// We want nice squares despite anything that is in it.\n\t\t// The .cover is what makes the exact square size of the grid.\n\t\t// We use padding-bottom because padding with percentage\n\t\t// always refers to the width. And we only want to fit\n\t\t// the css grid's width.\n\t\twidth: 100%;\n\t\tpadding-bottom: 100%;\n\t\ttransition: opacity var(--animation-quick) ease-in-out;\n\t\topacity: 0;\n\t\tbackground-color: var(--color-main-text);\n\t}\n\n\t&.active,\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&--clear.active,\n\t&--clear:active,\n\t&--clear:hover,\n\t&--clear:focus {\n\t\t.cover {\n\t\t\topacity: .1;\n\t\t}\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity var(--animation-quick) ease-in-out;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\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@import \'../mixins/FileFolder\';\n\n.transition-group {\n\tdisplay: contents;\n}\n\n.icon-video-white {\n\tposition: absolute;\n\ttop: 10px;\n\tright: 10px;\n\tz-index: 20;\n}\n\nimg {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 10;\n\n\tcolor: transparent; // should be diplayed on error\n\n\tobject-fit: contain;\n\n\t.file--cropped & {\n\t\tobject-fit: cover;\n\t}\n}\n\nsvg {\n\tposition: absolute;\n\twidth: 70%;\n\theight: 70%;\n}\n'],sourceRoot:""}]);const s=r},18274:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,".file[data-v-eae08446],.folder[data-v-eae08446]{position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border-radius:var(--border-radius);overflow:hidden}.file .cover[data-v-eae08446],.folder .cover[data-v-eae08446]{z-index:2;width:100%;padding-bottom:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:0;background-color:var(--color-main-text)}.file.active .cover[data-v-eae08446],.file:active .cover[data-v-eae08446],.file:hover .cover[data-v-eae08446],.file:focus .cover[data-v-eae08446],.folder.active .cover[data-v-eae08446],.folder:active .cover[data-v-eae08446],.folder:hover .cover[data-v-eae08446],.folder:focus .cover[data-v-eae08446]{opacity:.3}.file--clear.active .cover[data-v-eae08446],.file--clear:active .cover[data-v-eae08446],.file--clear:hover .cover[data-v-eae08446],.file--clear:focus .cover[data-v-eae08446],.folder--clear.active .cover[data-v-eae08446],.folder--clear:active .cover[data-v-eae08446],.folder--clear:hover .cover[data-v-eae08446],.folder--clear:focus .cover[data-v-eae08446]{opacity:.1}.fade-enter-active[data-v-eae08446],.fade-leave-active[data-v-eae08446]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-eae08446],.fade-leave-to[data-v-eae08446]{opacity:0}.folder-content[data-v-eae08446]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-eae08446]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-eae08446]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-eae08446]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-eae08446]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-eae08446]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-eae08446]{width:100%;height:100%;object-fit:cover}.folder-name[data-v-eae08446]{position:absolute;z-index:3;display:flex;overflow:hidden;flex-direction:column;width:100%;height:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:1}.folder-name__icon[data-v-eae08446]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-eae08446]{overflow:hidden;height:1rem;padding:0 10px;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:var(--color-main-background);text-shadow:0 0 8px var(--color-main-text);font-size:1rem;line-height:1rem}.folder--clear .folder-name__icon[data-v-eae08446]{opacity:.3}.folder--clear .folder-name__name[data-v-eae08446]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-eae08446]{opacity:.3}.folder:not(.folder--clear).active .folder-name[data-v-eae08446],.folder:not(.folder--clear).active .cover[data-v-eae08446],.folder:not(.folder--clear):active .folder-name[data-v-eae08446],.folder:not(.folder--clear):active .cover[data-v-eae08446],.folder:not(.folder--clear):hover .folder-name[data-v-eae08446],.folder:not(.folder--clear):hover .cover[data-v-eae08446],.folder:not(.folder--clear):focus .folder-name[data-v-eae08446],.folder:not(.folder--clear):focus .cover[data-v-eae08446]{opacity:0}","",{version:3,sources:["webpack://./src/mixins/FileFolder.scss","webpack://./src/components/Folder.vue"],names:[],mappings:"AAsBA,gDAEC,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,wBAAA,CAAA,gBAAA,CACA,kCAAA,CACA,eAAA,CAEA,8DACC,SAAA,CAMA,UAAA,CACA,mBAAA,CACA,qDAAA,CACA,SAAA,CACA,uCAAA,CAOA,4SACC,UAAA,CAQD,oWACC,UAAA,CAKH,wEACC,qDAAA,CAGD,6DACC,SAAA,CClED,iCACC,iBAAA,CACA,YAAA,CACA,UAAA,CACA,WAAA,CAEA,yCACC,yBAAA,CACA,sBAAA,CAED,yCACC,yBAAA,CACA,0BAAA,CAED,yCACC,6BAAA,CACA,0BAAA,CACA,yDACC,kBAAA,CAGF,yCACC,6BAAA,CACA,0BAAA,CAED,qCACC,UAAA,CACA,WAAA,CAEA,gBAAA,CAMF,8BACC,iBAAA,CACA,SAAA,CACA,YAAA,CACA,eAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,qDAAA,CACA,SAAA,CACA,oCACC,UAAA,CACA,+BAAA,CACA,mBAAA,CAED,oCACC,eAAA,CACA,WAnBY,CAoBZ,cAAA,CACA,iBAAA,CACA,kBAAA,CACA,sBAAA,CACA,kCAAA,CACA,0CAAA,CACA,cA1BY,CA2BZ,gBA3BY,CAmCZ,mDACC,UAAA,CAED,mDACC,4BAAA,CACA,gDAAA,CAQD,oDACC,UAAA,CASA,4eAEC,SAAA",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\n.file,\n.folder {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tuser-select: none;\n\tborder-radius: var(--border-radius);\n\toverflow: hidden;\n\n\t.cover {\n\t\tz-index: 2;\n\t\t// We want nice squares despite anything that is in it.\n\t\t// The .cover is what makes the exact square size of the grid.\n\t\t// We use padding-bottom because padding with percentage\n\t\t// always refers to the width. And we only want to fit\n\t\t// the css grid's width.\n\t\twidth: 100%;\n\t\tpadding-bottom: 100%;\n\t\ttransition: opacity var(--animation-quick) ease-in-out;\n\t\topacity: 0;\n\t\tbackground-color: var(--color-main-text);\n\t}\n\n\t&.active,\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&--clear.active,\n\t&--clear:active,\n\t&--clear:hover,\n\t&--clear:focus {\n\t\t.cover {\n\t\t\topacity: .1;\n\t\t}\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity var(--animation-quick) ease-in-out;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\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@import \'../mixins/FileFolder\';\n\n.folder-content {\n\tposition: absolute;\n\tdisplay: grid;\n\twidth: 100%;\n\theight: 100%;\n\t// folder layout if less than 4 pictures\n\t&--grid-1 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr;\n\t}\n\t&--grid-2 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\t&--grid-3 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t\timg:first-child {\n\t\t\tgrid-column: span 2;\n\t\t}\n\t}\n\t&--grid-4 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tobject-fit: cover;\n\t}\n}\n\n$name-height: 1rem;\n\n.folder-name {\n\tposition: absolute;\n\tz-index: 3;\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: opacity var(--animation-quick) ease-in-out;\n\topacity: 1;\n\t&__icon {\n\t\theight: 40%;\n\t\tmargin-top: calc(30% - #{$name-height} / 2); // center name+icon\n\t\tbackground-size: 40%;\n\t}\n\t&__name {\n\t\toverflow: hidden;\n\t\theight: $name-height;\n\t\tpadding: 0 10px;\n\t\ttext-align: center;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-background);\n\t\ttext-shadow: 0 0 8px var(--color-main-text);\n\t\tfont-size: $name-height;\n\t\tline-height: $name-height;\n\t}\n}\n\n// Cover management empty/full\n.folder {\n\t// if no img, let\'s display the folder icon as default black\n\t&--clear {\n\t\t.folder-name__icon {\n\t\t\topacity: .3;\n\t\t}\n\t\t.folder-name__name {\n\t\t\tcolor: var(--color-main-text);\n\t\t\ttext-shadow: 0 0 8px var(--color-main-background);\n\t\t}\n\t}\n\n\t// show the cover as background\n\t// if there are pictures in it\n\t// so we can sho the folder+name above it\n\t&:not(.folder--clear) {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\n\t\t// hide everything but pictures\n\t\t// on hover/active/focus\n\t\t&.active,\n\t\t&:active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\t.folder-name,\n\t\t\t.cover {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const s=r},51124:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,".file[data-v-e38275f4],.folder[data-v-e38275f4]{position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border-radius:var(--border-radius);overflow:hidden}.file .cover[data-v-e38275f4],.folder .cover[data-v-e38275f4]{z-index:2;width:100%;padding-bottom:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:0;background-color:var(--color-main-text)}.file.active .cover[data-v-e38275f4],.file:active .cover[data-v-e38275f4],.file:hover .cover[data-v-e38275f4],.file:focus .cover[data-v-e38275f4],.folder.active .cover[data-v-e38275f4],.folder:active .cover[data-v-e38275f4],.folder:hover .cover[data-v-e38275f4],.folder:focus .cover[data-v-e38275f4]{opacity:.3}.file--clear.active .cover[data-v-e38275f4],.file--clear:active .cover[data-v-e38275f4],.file--clear:hover .cover[data-v-e38275f4],.file--clear:focus .cover[data-v-e38275f4],.folder--clear.active .cover[data-v-e38275f4],.folder--clear:active .cover[data-v-e38275f4],.folder--clear:hover .cover[data-v-e38275f4],.folder--clear:focus .cover[data-v-e38275f4]{opacity:.1}.fade-enter-active[data-v-e38275f4],.fade-leave-active[data-v-e38275f4]{transition:opacity var(--animation-quick) ease-in-out}.fade-enter[data-v-e38275f4],.fade-leave-to[data-v-e38275f4]{opacity:0}.folder-content[data-v-e38275f4]{position:absolute;display:grid;width:100%;height:100%}.folder-content--grid-1[data-v-e38275f4]{grid-template-columns:1fr;grid-template-rows:1fr}.folder-content--grid-2[data-v-e38275f4]{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3[data-v-e38275f4]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content--grid-3 img[data-v-e38275f4]:first-child{grid-column:span 2}.folder-content--grid-4[data-v-e38275f4]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.folder-content img[data-v-e38275f4]{width:100%;height:100%;object-fit:cover}.folder-name[data-v-e38275f4]{position:absolute;z-index:3;display:flex;overflow:hidden;flex-direction:column;width:100%;height:100%;transition:opacity var(--animation-quick) ease-in-out;opacity:1}.folder-name__icon[data-v-e38275f4]{height:40%;margin-top:calc(30% - 1rem / 2);background-size:40%}.folder-name__name[data-v-e38275f4]{overflow:hidden;height:1rem;padding:0 10px;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:var(--color-main-background);text-shadow:0 0 8px var(--color-main-text);font-size:1rem;line-height:1rem}.folder[data-v-e38275f4]{border-radius:var(--border-radius-large)}.folder--clear .folder-name__icon[data-v-e38275f4]{opacity:.3}.folder--clear .folder-name__name[data-v-e38275f4]{color:var(--color-main-text);text-shadow:0 0 8px var(--color-main-background)}.folder:not(.folder--clear) .cover[data-v-e38275f4]{opacity:.3}.folder:not(.folder--clear):active .folder-name[data-v-e38275f4],.folder:not(.folder--clear):active .cover[data-v-e38275f4],.folder:not(.folder--clear):hover .folder-name[data-v-e38275f4],.folder:not(.folder--clear):hover .cover[data-v-e38275f4],.folder:not(.folder--clear):focus .folder-name[data-v-e38275f4],.folder:not(.folder--clear):focus .cover[data-v-e38275f4]{opacity:0}","",{version:3,sources:["webpack://./src/mixins/FileFolder.scss","webpack://./src/components/FolderTagPreview.vue"],names:[],mappings:"AAsBA,gDAEC,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,wBAAA,CAAA,gBAAA,CACA,kCAAA,CACA,eAAA,CAEA,8DACC,SAAA,CAMA,UAAA,CACA,mBAAA,CACA,qDAAA,CACA,SAAA,CACA,uCAAA,CAOA,4SACC,UAAA,CAQD,oWACC,UAAA,CAKH,wEACC,qDAAA,CAGD,6DACC,SAAA,CClED,iCACC,iBAAA,CACA,YAAA,CACA,UAAA,CACA,WAAA,CAEA,yCACC,yBAAA,CACA,sBAAA,CAED,yCACC,yBAAA,CACA,0BAAA,CAED,yCACC,6BAAA,CACA,0BAAA,CACA,yDACC,kBAAA,CAGF,yCACC,6BAAA,CACA,0BAAA,CAED,qCACC,UAAA,CACA,WAAA,CAEA,gBAAA,CAMF,8BACC,iBAAA,CACA,SAAA,CACA,YAAA,CACA,eAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,qDAAA,CACA,SAAA,CACA,oCACC,UAAA,CACA,+BAAA,CACA,mBAAA,CAED,oCACC,eAAA,CACA,WAnBY,CAoBZ,cAAA,CACA,iBAAA,CACA,kBAAA,CACA,sBAAA,CACA,kCAAA,CACA,0CAAA,CACA,cA1BY,CA2BZ,gBA3BY,CAgCd,yBACC,wCAAA,CAGC,mDACC,UAAA,CAED,mDACC,4BAAA,CACA,gDAAA,CAQD,oDACC,UAAA,CAQA,gXAEC,SAAA",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\n.file,\n.folder {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tuser-select: none;\n\tborder-radius: var(--border-radius);\n\toverflow: hidden;\n\n\t.cover {\n\t\tz-index: 2;\n\t\t// We want nice squares despite anything that is in it.\n\t\t// The .cover is what makes the exact square size of the grid.\n\t\t// We use padding-bottom because padding with percentage\n\t\t// always refers to the width. And we only want to fit\n\t\t// the css grid's width.\n\t\twidth: 100%;\n\t\tpadding-bottom: 100%;\n\t\ttransition: opacity var(--animation-quick) ease-in-out;\n\t\topacity: 0;\n\t\tbackground-color: var(--color-main-text);\n\t}\n\n\t&.active,\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&--clear.active,\n\t&--clear:active,\n\t&--clear:hover,\n\t&--clear:focus {\n\t\t.cover {\n\t\t\topacity: .1;\n\t\t}\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity var(--animation-quick) ease-in-out;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\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@import \'../mixins/FileFolder\';\n\n.folder-content {\n\tposition: absolute;\n\tdisplay: grid;\n\twidth: 100%;\n\theight: 100%;\n\t// folder layout if less than 4 pictures\n\t&--grid-1 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr;\n\t}\n\t&--grid-2 {\n\t\tgrid-template-columns: 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\t&--grid-3 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t\timg:first-child {\n\t\t\tgrid-column: span 2;\n\t\t}\n\t}\n\t&--grid-4 {\n\t\tgrid-template-columns: 1fr 1fr;\n\t\tgrid-template-rows: 1fr 1fr;\n\t}\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tobject-fit: cover;\n\t}\n}\n\n$name-height: 1rem;\n\n.folder-name {\n\tposition: absolute;\n\tz-index: 3;\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: opacity var(--animation-quick) ease-in-out;\n\topacity: 1;\n\t&__icon {\n\t\theight: 40%;\n\t\tmargin-top: calc(30% - #{$name-height} / 2); // center name+icon\n\t\tbackground-size: 40%;\n\t}\n\t&__name {\n\t\toverflow: hidden;\n\t\theight: $name-height;\n\t\tpadding: 0 10px;\n\t\ttext-align: center;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-main-background);\n\t\ttext-shadow: 0 0 8px var(--color-main-text);\n\t\tfont-size: $name-height;\n\t\tline-height: $name-height;\n\t}\n}\n\n// Cover management empty/full\n.folder {\n\tborder-radius: var(--border-radius-large);\n\t// if no img, let\'s display the folder icon as default black\n\t&--clear {\n\t\t.folder-name__icon {\n\t\t\topacity: .3;\n\t\t}\n\t\t.folder-name__name {\n\t\t\tcolor: var(--color-main-text);\n\t\t\ttext-shadow: 0 0 8px var(--color-main-background);\n\t\t}\n\t}\n\n\t// show the cover as background\n\t// if there are pictures in it\n\t// so we can sho the folder+name above it\n\t&:not(.folder--clear) {\n\t\t.cover {\n\t\t\topacity: .3;\n\t\t}\n\n\t\t// hide everything but pictures\n\t\t// on hover/active/focus\n\t\t&:active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\t.folder-name,\n\t\t\t.cover {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const s=r},13879:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,":root{--photos-navigation-height: 64px;--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2)}button.app-navigation-toggle{top:0 !important;right:calc(var(--photos-navigation-height)*-1) !important;margin:var(--photos-navigation-spacing) !important}","",{version:3,sources:["webpack://./src/components/HeaderNavigation.vue"],names:[],mappings:"AAEA,MACC,gCAAA,CAEA,+EAAA,CAID,6BAEC,gBAAA,CACA,yDAAA,CACA,kDAAA",sourcesContent:['$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:root {\n\t--photos-navigation-height: 64px;\n\t// header height - button size\n\t--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2);\n}\n\n// Properly position the navigation toggle button\nbutton.app-navigation-toggle {\n\t// App-navigation have a 4px margin top\n\ttop: 0 !important;\n\tright: calc(var(--photos-navigation-height) * -1) !important;\n\tmargin: var(--photos-navigation-spacing) !important;\n}\n\n'],sourceRoot:""}]);const s=r},66132:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,".photos-navigation[data-v-4e5ab988]{position:-webkit-sticky;position:sticky;z-index:20;top:0;display:flex;align-items:center;width:100%;min-height:var(--photos-navigation-height);padding:0 var(--photos-navigation-height);background:var(--color-main-background)}.photos-navigation__back[data-v-4e5ab988]{position:absolute !important;left:0;margin:var(--photos-navigation-spacing) !important}.photos-navigation__title[data-v-4e5ab988]{max-width:45%;margin-right:calc(2*var(--photos-navigation-spacing));display:flex;flex-direction:column}.photos-navigation__title__main[data-v-4e5ab988]{margin:0;cursor:pointer}.photos-navigation__title__main[data-v-4e5ab988],.photos-navigation__title__sub[data-v-4e5ab988]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.photos-navigation__content[data-v-4e5ab988]{max-width:50%}.photos-navigation__loader[data-v-4e5ab988]{margin-left:32px}.photos-navigation__content-right[data-v-4e5ab988]{display:flex;align-items:center;justify-content:center;margin-left:auto}","",{version:3,sources:["webpack://./src/components/HeaderNavigation.vue"],names:[],mappings:"AAEA,oCACC,uBAAA,CAAA,eAAA,CACA,UAAA,CACA,KAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,0CAAA,CACA,yCAAA,CACA,uCAAA,CAEA,0CAEC,4BAAA,CACA,MAAA,CACA,kDAAA,CAGD,2CACC,aAAA,CACA,qDAAA,CACA,YAAA,CACA,qBAAA,CAEA,iDACC,QAAA,CACA,cAAA,CAGD,iGACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,6CACC,aAAA,CAGD,4CACC,gBAAA,CAGD,mDACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,gBAAA",sourcesContent:['$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.photos-navigation {\n\tposition: sticky;\n\tz-index: 20;\n\ttop: 0;\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\tmin-height: var(--photos-navigation-height);\n\tpadding: 0 var(--photos-navigation-height);\n\tbackground: var(--color-main-background);\n\n\t&__back {\n\t\t// Above the navigation menu\n\t\tposition: absolute !important;\n\t\tleft: 0;\n\t\tmargin: var(--photos-navigation-spacing) !important;\n\t}\n\n\t&__title {\n\t\tmax-width: 45%;\n\t\tmargin-right: calc(2 * var(--photos-navigation-spacing));\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&__main {\n\t\t\tmargin: 0;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&__main, &__sub {\n\t\t\toverflow: hidden;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t}\n\n\t&__content {\n\t\tmax-width: 50%;\n\t}\n\n\t&__loader {\n\t\tmargin-left: 32px;\n\t}\n\n\t&__content-right {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tmargin-left: auto;\n\t}\n}\n\n'],sourceRoot:""}]);const s=r},77486:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(87537),a=n.n(i),o=n(23645),r=n.n(o)()(a());r.push([t.id,"@media(min-width: 0px)and (max-width: 400px){.grid-container[data-v-0510aa84]{padding:0px 8px 256px 8px}}@media(min-width: 400px)and (max-width: 700px){.grid-container[data-v-0510aa84]{padding:0px 8px 256px 8px}}@media(min-width: 700px)and (max-width: 1024px){.grid-container[data-v-0510aa84]{padding:0px 44px 256px 44px}}@media(min-width: 1024px)and (max-width: 1280px){.grid-container[data-v-0510aa84]{padding:0px 44px 256px 44px}}@media(min-width: 1280px)and (max-width: 1440px){.grid-container[data-v-0510aa84]{padding:0px 66px 256px 66px}}@media(min-width: 1440px)and (max-width: 1600px){.grid-container[data-v-0510aa84]{padding:0px 66px 256px 66px}}@media(min-width: 1600px)and (max-width: 2048px){.grid-container[data-v-0510aa84]{padding:0px 66px 256px 66px}}@media(min-width: 2048px)and (max-width: 2560px){.grid-container[data-v-0510aa84]{padding:0px 88px 256px 88px}}@media(min-width: 2560px)and (max-width: 3440px){.grid-container[data-v-0510aa84]{padding:0px 88px 256px 88px}}@media(min-width: 3440px){.grid-container[data-v-0510aa84]{padding:0px 88px 256px 88px}}.photos-navigation[data-v-0510aa84]{position:relative}.photos-navigation--uploading[data-v-0510aa84]{margin-bottom:30px}[data-v-0510aa84] .upload-picker .upload-picker__progress{position:absolute;bottom:-30px;left:64px;margin:0}[data-v-0510aa84] .upload-picker .upload-picker__cancel{position:absolute;bottom:-24px;right:50px}","",{version:3,sources:["webpack://./src/mixins/GridSizes.scss","webpack://./src/views/Folders.vue"],names:[],mappings:"AAoCG,6CChCH,iCAEE,yBAAA,CAAA,CD8BC,+CChCH,iCAEE,yBAAA,CAAA,CD8BC,gDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD8BC,iDChCH,iCAEE,2BAAA,CAAA,CD0BC,0BC5BH,iCAEE,2BAAA,CAAA,CAIF,oCACC,iBAAA,CAGA,+CACC,kBAAA,CAKD,0DACC,iBAAA,CACA,YAAA,CACA,SAAA,CACA,QAAA,CAGD,wDACC,iBAAA,CACA,YAAA,CACA,UAAA",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@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\n.photos-navigation {\n\tposition: relative;\n\n\t// Add space at the bottom for the progress bar.\n\t&--uploading {\n\t\tmargin-bottom: 30px;\n\t}\n}\n\n:deep(.upload-picker) {\n\t.upload-picker__progress {\n\t\tposition: absolute;\n\t\tbottom: -30px;\n\t\tleft: 64px;\n\t\tmargin: 0;\n\t}\n\n\t.upload-picker__cancel {\n\t\tposition: absolute;\n\t\tbottom: -24px;\n\t\tright: 50px;\n\t}\n}\n\n'],sourceRoot:""}]);const s=r},32338:(e,n,i)=>{"use strict";i.d(n,{Z:()=>x});var a=i(69254),o=i(12806);const r={name:"HeaderNavigation",components:{ArrowLeft:a.Z,NcButton:o.P2,NcLoadingIcon:o.lb},inheritAttrs:!1,props:{loading:{type:Boolean,default:!1},path:{type:String,default:"/"},title:{type:String,required:!0},rootTitle:{type:String,default:t("photos","Photos")},params:{type:Object,default:null}},computed:{isRoot(){const t="/"===this.path;return this.toggleNavigationButton(!t),t},name(){return this.isRoot?this.rootTitle:this.title},parentPath(){const t=this.path.split("/");t.pop();const e=t.join("/");return this.isRoot||""===e.trim()?"/":t.join("/")},parentName(){return this.parentPath&&this.parentPath.split("/").pop()},backToText(){return"/"===this.parentPath?t("photos","Back to {folder}",{folder:this.rootTitle}):t("photos","Back to {folder}",{folder:this.parentName})},to(){const t=/^\/?(.*)/i.exec(this.parentPath)[1],{name:e,params:n}=Object.assign({},this.$route,{params:this.params||{path:t}});return""===t?{name:e}:decodeURIComponent(this.$router.resolve({name:e,params:n}).resolved.path)}},methods:{folderUp(){this.$router.push(this.to)},refresh(){this.$emit("refresh")},toggleNavigationButton(t){const e=document.querySelector("button.app-navigation-toggle");null!==e&&(e.style.display=t?"none":null)}}};var s=i(93379),d=i.n(s),c=i(7795),l=i.n(c),A=i(90569),p=i.n(A),h=i(3565),f=i.n(h),m=i(19216),g=i.n(m),v=i(44589),u=i.n(v),C=i(13879),w={};w.styleTagTransform=u(),w.setAttributes=f(),w.insert=p().bind(null,"head"),w.domAPI=l(),w.insertStyleElement=g();d()(C.Z,w);C.Z&&C.Z.locals&&C.Z.locals;var y=i(66132),b={};b.styleTagTransform=u(),b.setAttributes=f(),b.insert=p().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=g();d()(y.Z,b);y.Z&&y.Z.locals&&y.Z.locals;const x=(0,i(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"photos-navigation",class:{"photos-navigation--root":t.isRoot},attrs:{role:"toolbar"}},[t.isRoot?t._e():e("NcButton",{staticClass:"photos-navigation__back",attrs:{type:"tertiary"},on:{click:t.folderUp},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ArrowLeft",{attrs:{size:20}})]},proxy:!0}],null,!1,1821202730)}),t._v(" "),e("div",{staticClass:"photos-navigation__title"},[e("h2",{staticClass:"photos-navigation__title__main",on:{click:t.refresh}},[t._v("\n\t\t\t"+t._s(t.name)+"\n\t\t")]),t._v(" "),e("div",{staticClass:"photos-navigation__title__sub"}),t._v(" "),t._t("subtitle")],2),t._v(" "),t.$slots.default?e("div",{staticClass:"photos-navigation__content"},[t._t("default")],2):t._e(),t._v(" "),e("NcLoadingIcon",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"photos-navigation__loader"}),t._v(" "),e("div",{staticClass:"photos-navigation__content-right"},[t._t("right")],2)],1)}),[],!1,null,"4e5ab988",null).exports},6817:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>J});var a=i(20629),o=i(52587),r=i(12806),s=i(29837),d=i(79753);const c={name:"FileLegacy",mixins:[i(81090).Z],inheritAttrs:!1,props:{item:{type:Object,required:!0}},data:()=>({loaded:!1,error:!1}),computed:{ariaUuid(){return"image-".concat(this.item.injected.fileid)},ariaLabel(){return t("photos",'Open the full size "{name}" image',{name:this.item.injected.basename})},isImage(){return this.item.injected.mime.startsWith("image")},decodedEtag(){return this.item.injected.etag.replace("&quot;","").replace("&quot;","")},src(){return(0,d.nu)("/core/preview?fileId=".concat(this.item.injected.fileid,"&c=").concat(this.decodedEtag,"&x=",250,"&y=",250,"&forceIcon=0&a=").concat(this.croppedLayout?"0":"1"))}},beforeDestroy(){this.$refs.src=""},methods:{openViewer(){OCA.Viewer.open({fileInfo:this.item.injected,list:this.item.injected.list,loadMore:this.item.injected.loadMore?async()=>await this.item.injected.loadMore(!0):()=>[],canLoop:this.item.injected.canLoop})},onLoad(){this.loaded=!0},onError(){this.error=!0}}};var l=i(93379),A=i.n(l),p=i(7795),h=i.n(p),f=i(90569),m=i.n(f),g=i(3565),v=i.n(g),u=i(19216),C=i.n(u),w=i(44589),y=i.n(w),b=i(46262),x={};x.styleTagTransform=y(),x.setAttributes=v(),x.insert=m().bind(null,"head"),x.domAPI=h(),x.insertStyleElement=C();A()(b.Z,x);b.Z&&b.Z.locals&&b.Z.locals;var _=i(51900);const T=(0,_.Z)(c,(function(){var t=this,e=t._self._c;return e("a",{staticClass:"file",class:{"file--cropped":t.croppedLayout},attrs:{href:t.item.injected.source,"aria-label":t.ariaLabel},on:{click:function(e){return e.preventDefault(),t.openViewer.apply(null,arguments)}}},[t.item.injected.mime.includes("video")&&t.item.injected.hasPreview?e("div",{staticClass:"icon-video-white"}):t._e(),t._v(" "),e("transition-group",{staticClass:"transition-group",attrs:{name:"fade"}},[t.error?t._e():e("img",{key:"".concat(t.item.injected.basename,"-img"),ref:"img",attrs:{src:t.src,alt:t.item.injected.basename,"aria-describedby":t.ariaUuid},on:{load:t.onLoad,error:t.onError}}),t._v(" "),!t.loaded||t.error?e("svg",{key:"".concat(t.item.injected.basename,"-svg"),attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"url(#placeholder__gradient)"}},[t.isImage?e("use",{attrs:{href:"#placeholder--img"}}):e("use",{attrs:{href:"#placeholder--video"}})]):t._e()]),t._v(" "),e("p",{staticClass:"hidden-visually",attrs:{id:t.ariaUuid}},[t._v(t._s(t.item.injected.basename))]),t._v(" "),e("div",{staticClass:"cover",attrs:{role:"none"}})],1)}),[],!1,null,"7f7a68cc",null).exports;var B=i(77958);const k={name:"FolderTagPreview",props:{icon:{type:String,default:"icon-folder"},id:{type:[Number,String],required:!0},name:{type:String,required:!0},path:{type:String,default:""},fileList:{type:Array,default:()=>[]},to:{type:Object,default:null}},data:()=>({loaded:!1,failed:[]}),computed:{isEmpty(){return 0===this.previewList.length},ariaUuid(){return"folder-".concat(this.id)},ariaLabel(){return t("photos",'Open the "{name}" sub-directory',{name:this.name})},previewList(){return this.fileList.filter((t=>-1===this.failed.indexOf(t.fileid)))},toLink(){var t;if(this.to)return this.to;const e="/files/".concat(null===(t=(0,B.ts)())||void 0===t?void 0:t.uid);let n=this.path.replace(new RegExp("^".concat(e)),"");return n=/^\/?(.+)/i.exec(n)[1],Object.assign({},this.$route,{params:{path:n.split("/")}})}},methods:{generateImgSrc(t){let{fileid:e,etag:n}=t;return(0,d.nu)("/core/preview?fileId=".concat(e,"&c=").concat(n,"&x=",250,"&y=",250,"&forceIcon=0&a=0"))},onPreviewFail(t){let{fileid:e}=t;this.failed.push(e)}}};var W=i(51124),E={};E.styleTagTransform=y(),E.setAttributes=v(),E.insert=m().bind(null,"head"),E.domAPI=h(),E.insertStyleElement=C();A()(W.Z,E);W.Z&&W.Z.locals&&W.Z.locals;const D=(0,_.Z)(k,(function(){var t=this,e=t._self._c;return e("router-link",{staticClass:"folder",class:{"folder--clear":t.isEmpty},attrs:{to:t.toLink,"aria-label":t.ariaLabel}},[e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loaded,expression:"loaded"}],staticClass:"folder-content",class:"folder-content--grid-".concat(t.previewList.length),attrs:{role:"none"}},t._l(t.previewList,(function(n){return e("img",{key:n.fileid,attrs:{src:t.generateImgSrc(n),alt:""},on:{load:function(e){t.loaded=!0},error:function(e){return t.onPreviewFail(n)}}})})),0)]),t._v(" "),e("div",{staticClass:"folder-name"},[e("span",{staticClass:"folder-name__icon",class:[t.isEmpty?"icon-dark":"icon-white",t.icon],attrs:{role:"img"}}),t._v(" "),e("p",{staticClass:"folder-name__name",attrs:{id:t.ariaUuid}},[t._v("\n\t\t\t"+t._s(t.name)+"\n\t\t")])]),t._v(" "),e("div",{staticClass:"cover",attrs:{role:"none"}})],1)}),[],!1,null,"e38275f4",null).exports;var F=i(28304),S=i(94236),L=i(3301);async function U(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=(0,d.nu)("/apps/photos/api/v1/".concat(n.shared?"shared":"albums")),a="/files/".concat(null===(t=(0,B.ts)())||void 0===t?void 0:t.uid),o=(await F.Z.get(i+(0,S.Px)(e),n)).data.map((t=>({...t,filename:"".concat(a).concat(t.filename)}))).map((t=>(0,S.AX)(t)));let r={};const s=[],c=[];for(const t of o)t.filename==="".concat(a).concat(e)?r=t:"file"!==t.type?s.push(t):L.ZP.indexOf(t.mime)>-1&&c.push(t);return{folder:r,folders:s,files:c}}var j=i(69363);const z={name:"Folder",components:{FolderTagPreview:D},mixins:[j.Z],inheritAttrs:!1,props:{item:{type:Object,required:!0}},data(){return{previewFolder:this.item.injected.fileid}},computed:{...(0,a.Se)(["files","folders"]),folderContent(){return this.folders[this.item.injected.fileid]},previewFiles(){const t=this.folders[this.previewFolder],e=t?t.map((t=>this.files[t])).slice(0,4):[];if(0===e.length&&this.files[this.previewFolder].folders&&this.previewFolder===this.item.injected.fileid){const t=this.files[this.previewFolder].folders[0];this.updatePreviewFolder(t),this.folders[this.previewFolder]||this.getFolderData(this.files[this.previewFolder].filename)}return e}},async created(){this.folderContent||await this.getFolderData(this.item.injected.filename)},methods:{async getFolderData(t){try{var e;const n="/files/".concat(null===(e=(0,B.ts)())||void 0===e?void 0:e.uid),i=t.replace(new RegExp("^".concat(n)),""),{folder:a,folders:o,files:r}=await U(i,{shared:this.item.injected.showShared,signal:this.abortController.signal});this.$store.dispatch("updateFolders",{fileid:a.fileid,files:r,folders:o}),this.$store.dispatch("updateFiles",{folder:a,files:r,folders:o})}catch(e){e.response&&e.response.status&&console.error("Failed to get folder content",t,e.response)}},updatePreviewFolder(t){this.previewFolder=t}}};var $=i(18274),I={};I.styleTagTransform=y(),I.setAttributes=v(),I.insert=m().bind(null,"head"),I.domAPI=h(),I.insertStyleElement=C();A()($.Z,I);$.Z&&$.Z.locals&&$.Z.locals;const P=(0,_.Z)(z,(function(){var t=this;return(0,t._self._c)("FolderTagPreview",{attrs:{id:t.item.injected.fileid,name:t.item.injected.basename.toString(),path:t.item.injected.filename,"file-list":t.previewFiles}})}),[],!1,null,"eae08446",null).exports;var Z=i(32338),N=i(81067),G=i(20144),R=i(16897);const q=new G.ZP({data:()=>({gridConfig:R.sizes.max}),watch:{gridConfig(t){this.$emit("changed",t)}},created(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize)},methods:{handleWindowResize(){const t=Object.keys(R.sizes).find((t=>t>document.documentElement.clientWidth));this.gridConfig=R.sizes[t]||R.sizes.max}}}),Y={data:()=>({gridConfig:{}}),created(){q.$on("changed",(t=>{this.gridConfig=t})),console.debug("[".concat("photos","]"),"Grid config",Object.assign({},q.gridConfig)),this.gridConfig=q.gridConfig},beforeDestroy(){q.$off("changed",this.gridConfig)}};var O=i(2161);const M={name:"Folders",components:{VirtualGrid:s.Z,HeaderNavigation:Z.Z,NcEmptyContent:r.SL,UploadPicker:o.e},mixins:[j.Z,Y],props:{rootTitle:{type:String,required:!0},path:{type:String,default:"/"},showShared:{type:Boolean,default:!1}},data:()=>({error:null,allowedMimes:L.ZP,initializing:!0,loading:!1,appContent:document.getElementById("app-content-vue"),uploader:(0,o.oM)()}),computed:{...(0,a.Se)(["files","folders"]),folderId(){return this.$store.getters.folderId(this.path)},folder(){return this.files[this.folderId]},folderContent(){return this.folders[this.folderId]},fileList(){return this.folderContent&&this.folderContent.map((t=>this.files[t])).filter((t=>!!t))},subFolders(){return this.folderId&&this.files[this.folderId]&&this.files[this.folderId].folders},folderList(){return this.subFolders&&this.subFolders.map((t=>this.files[t])).filter((t=>!!t))},contentList(){var t,e;return[...(null===(t=this.folderList)||void 0===t?void 0:t.map((t=>({id:"folder-".concat(t.fileid),injected:{...t,showShared:this.showShared},width:256,height:256,columnSpan:1,renderComponent:P}))))||[],...(null===(e=this.fileList)||void 0===e?void 0:e.map((t=>({id:"file-".concat(t.fileid),injected:{...t,list:this.fileList},width:256,height:256,columnSpan:1,renderComponent:T}))))||[]]},isEmpty(){return!this.haveFiles&&!this.haveFolders},haveFiles(){return!!this.fileList&&0!==this.fileList.length},haveFolders(){return!!this.folderList&&0!==this.folderList.length}},watch:{path(){this.fetchFolderContent()},showShared(){this.fetchFolderContent()}},beforeMount(){this.fetchFolderContent()},methods:{onRefresh(){this.fetchFolderContent()},async fetchFolderContent(){var t,e,n,i,a,o,r;this.error=null,this.loading=!0,null===(t=OCA)||void 0===t||null===(e=t.Viewer)||void 0===e||null===(n=e.close)||void 0===n||n.call(e),null===(i=OCA)||void 0===i||null===(a=i.Files)||void 0===a||null===(o=a.Sidebar)||void 0===o||null===(r=o.close)||void 0===r||r.call(o),this.files[this.folderId]&&this.folders[this.folderId]||(this.initializing=!0);try{const{folder:t,folders:e,files:n}=await U(this.path,{shared:this.showShared,signal:this.abortController.signal});this.$store.dispatch("addPath",{path:this.path,fileid:t.fileid}),this.$store.dispatch("updateFolders",{fileid:t.fileid,files:n,folders:e}),this.$store.dispatch("updateFiles",{folder:t,files:n,folders:e})}catch(t){t.response&&t.response.status&&(404===t.response.status?(this.error=404,setTimeout((()=>{this.$router.push({name:this.$route.name})}),3e3)):this.error=t),console.error("Error fetching album data",t)}finally{this.loading=!1,this.initializing=!1}},onUpload(t){t.forEach((async t=>{const e=t.path.split(N.oO).pop(),n=await async function(t){const e="/"===t?"":t,n=await N.ZP.stat(N.oO+e,{data:O.Z,details:!0});return(0,S.AX)(n.data)}(e);this.$store.dispatch("appendFiles",[n]),this.$store.dispatch("addFilesToFolder",{fileid:this.folderId,files:[n]})}))}}};var H=i(77486),Q={};Q.styleTagTransform=y(),Q.setAttributes=v(),Q.insert=m().bind(null,"head"),Q.domAPI=h(),Q.insertStyleElement=C();A()(H.Z,Q);H.Z&&H.Z.locals&&H.Z.locals;const J=(0,_.Z)(M,(function(){var t,e=this,n=e._self._c;return 404===e.error?n("NcEmptyContent",{attrs:{"illustration-name":"folder"}},[e._v("\n\t"+e._s(e.t("photos","This folder does not exist"))+"\n")]):e.error?n("NcEmptyContent",[e._v("\n\t"+e._s(e.t("photos","An error occurred"))+"\n")]):e.initializing?n("NcEmptyContent",{attrs:{icon:"icon-loading"}},[e._v("\n\t"+e._s(e.t("photos","Loading folders …"))+"\n")]):e.initializing?e._e():n("div",[n("HeaderNavigation",{key:"navigation",class:{"photos-navigation--uploading":(null===(t=e.uploader.queue)||void 0===t?void 0:t.length)>0},attrs:{loading:e.loading,path:e.path,title:e.folder.basename.toString(),"root-title":e.rootTitle},on:{refresh:e.onRefresh}},[n("UploadPicker",{attrs:{accept:e.allowedMimes,destination:e.path,multiple:!0},on:{uploaded:e.onUpload}})],1),e._v(" "),e.isEmpty?n("NcEmptyContent",{key:"emptycontent",attrs:{"illustration-name":"empty"}},[e._v("\n\t\t"+e._s(e.t("photos","No photos in here"))+"\n\t")]):n("div",{staticClass:"grid-container"},[n("VirtualGrid",{ref:"virtualgrid",attrs:{items:e.contentList,"scroll-element":e.appContent,"get-column-count":()=>e.gridConfig.count,"get-grid-gap":()=>e.gridConfig.gap}})],1)],1)}),[],!1,null,"0510aa84",null).exports},80950:()=>{},46601:()=>{},89214:()=>{},96419:()=>{},56353:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},69386:()=>{},31616:()=>{},56619:()=>{},77108:()=>{},71408:()=>{},23646:()=>{}}]);
//# sourceMappingURL=photos-src_views_Folders_vue.js.map?v=ce28d28622739a981d5f