/*! For license information please see photos-src_patchedRequest_js-node_modules_moment_locale_sync_recursive_-src_views_Timeline_vue.js.LICENSE.txt */ (self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_patchedRequest_js-node_modules_moment_locale_sync_recursive_-src_views_Timeline_vue"],{82223:(n,t,e)=>{const i=e(14601),s=i.prepareRequestOptions;i.prepareRequestOptions=function(n,t){t.cancelToken&&"object"==typeof t.cancelToken&&(n.cancelToken=t.cancelToken),s(n,t),t.method&&"string"==typeof t.method&&(n.method=t.method)},n.exports=i},81067:(n,t,e)=>{"use strict";e.d(t,{Z:()=>m});var i=e(48796),s=e.n(i),o=e(4820),r=e(84564),a=e.n(r),d=e(79753);s().getPatcher().patch("request",o.default);const c=(0,d.generateRemoteUrl)("dav"),l=s().createClient(c),m=(a()(c).pathname,l)},2161:(n,t,e)=>{"use strict";e.d(t,{N:()=>i});const i="\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t"},78504:(n,t,e)=>{"use strict";e.d(t,{Z:()=>a});var i=e(87537),s=e.n(i),o=e(23645),r=e.n(o)()(s());r.push([n.id,".loader{display:grid;height:60px}","",{version:3,sources:["webpack://./src/components/Loader.vue"],names:[],mappings:"AAsCA,QACC,YAAA,CACA,WAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.loader {\n\tdisplay: grid;\n\theight: 60px;\n}\n'],sourceRoot:""}]);const a=r},79132:(n,t,e)=>{"use strict";e.d(t,{Z:()=>a});var i=e(87537),s=e.n(i),o=e(23645),r=e.n(o)()(s());r.push([n.id,".photos-header[data-v-480e67f5]{margin:16px 0;display:flex}.photos-header>*[data-v-480e67f5]{margin:0 16px}","",{version:3,sources:["webpack://./src/components/PhotosHeader.vue"],names:[],mappings:"AAmGA,gCACC,aAAA,CACA,YAAA,CAEA,kCACC,aAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.photos-header {\n\tmargin: 16px 0;\n\tdisplay: flex;\n\n\t& > * {\n\t\tmargin: 0 16px;\n\t}\n}\n'],sourceRoot:""}]);const a=r},50017:(n,t,e)=>{"use strict";e.d(t,{Z:()=>a});var i=e(87537),s=e.n(i),o=e(23645),r=e.n(o)()(s());r.push([n.id,".items-row{display:flex;justify-content:space-around;width:fit-content}.items-row .section-header{margin:16px 0}","",{version:3,sources:["webpack://./src/components/TiledLayout.vue"],names:[],mappings:"AAoHA,WACC,YAAA,CACA,4BAAA,CACA,iBAAA,CAGA,2BACC,aAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.items-row {\n\tdisplay: flex;\n\tjustify-content: space-around;\n\twidth: fit-content; // Prevent solitary image to be rendered in the middle because of the flex layout.\n\n\t// Month and year.\n\t.section-header {\n\t\tmargin: 16px 0;\n\t}\n}\n\n'],sourceRoot:""}]);const a=r},80334:(n,t,e)=>{"use strict";e.d(t,{Z:()=>a});var i=e(87537),s=e.n(i),o=e(23645),r=e.n(o)()(s());r.push([n.id,"@media(min-width: 0px)and (max-width: 400px){.grid-container[data-v-7f201254]{padding:0px 8px 256px 8px}}@media(min-width: 400px)and (max-width: 700px){.grid-container[data-v-7f201254]{padding:0px 8px 256px 8px}}@media(min-width: 700px)and (max-width: 1024px){.grid-container[data-v-7f201254]{padding:0px 44px 256px 44px}}@media(min-width: 1024px)and (max-width: 1280px){.grid-container[data-v-7f201254]{padding:0px 44px 256px 44px}}@media(min-width: 1280px)and (max-width: 1440px){.grid-container[data-v-7f201254]{padding:0px 66px 256px 66px}}@media(min-width: 1440px)and (max-width: 1600px){.grid-container[data-v-7f201254]{padding:0px 66px 256px 66px}}@media(min-width: 1600px)and (max-width: 2048px){.grid-container[data-v-7f201254]{padding:0px 66px 256px 66px}}@media(min-width: 2048px)and (max-width: 2560px){.grid-container[data-v-7f201254]{padding:0px 88px 256px 88px}}@media(min-width: 2560px)and (max-width: 3440px){.grid-container[data-v-7f201254]{padding:0px 88px 256px 88px}}@media(min-width: 3440px){.grid-container[data-v-7f201254]{padding:0px 88px 256px 88px}}","",{version:3,sources:["webpack://./src/mixins/GridSizes.scss","webpack://./src/views/Timeline.vue"],names:[],mappings:"AAoCG,6CCuRH,iCAEE,yBAAA,CAAA,CDzRC,+CCuRH,iCAEE,yBAAA,CAAA,CDzRC,gDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CDzRC,iDCuRH,iCAEE,2BAAA,CAAA,CD7RC,0BC2RH,iCAEE,2BAAA,CAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \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 .\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\n\n\n\n\n\n\n\n\n\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:""}]);const a=r},46700:(n,t,e)=>{var i={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":2819,"./hi.js":2819,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function s(n){var t=o(n);return e(t)}function o(n){if(!e.o(i,n)){var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}return i[n]}s.keys=function(){return Object.keys(i)},s.resolve=o,n.exports=s,s.id=46700},13680:(n,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>sn});var i=e(80351),s=e.n(i),o=e(20629),r=e(99588),a=e(22200),d=e(3301),c=e(81067),l=e(2161),m=e(16897);async function p(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object.assign({},{page:0,perPage:10*m.sizes.max.count,mimesType:d.Oj,onThisDay:!1},t);const e=`/files/${(0,a.getCurrentUser)().uid}`,i=t.mimesType.reduce(((n,t)=>`${n}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t${t}\n\t\t\n\t`),""),o=n?"\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t1\n\t\t\t":"",p=t.onThisDay?`${Array(20).fill(1).map(((n,t)=>{const e=s()(Date.now()).startOf("day").subtract(3,"d").subtract(t+1,"y"),i=s()(Date.now()).endOf("day").add(3,"d").subtract(t+1,"y");return`\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${e.format(s().defaultFormatUtc)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${i.format(s().defaultFormatUtc)}\n\t\t\t\t\n\t\t\t`})).join("\n")}`:"";t=Object.assign({method:"SEARCH",headers:{"content-Type":"text/xml"},data:`\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${l.N}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${e}\n\t\t\t\t\t\t\tinfinity\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t${i}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${o}\n\t\t\t\t\t\t\t${p}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t${t.perPage}\n\t\t\t\t\t\t${t.page*t.perPage}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t`,deep:!0,details:!0},t);const u=await c.Z.getDirectoryContents("",t);return u.data.map((n=>(0,r.AX)(n))).map((n=>Object.assign({},n,{filename:n.filename.replace(e,"")})))}var u=e(66533),h=e(98203),g=e(82390);const A={name:"Loader"};var f=e(93379),j=e.n(f),v=e(7795),x=e.n(v),y=e(90569),C=e.n(y),T=e(3565),w=e.n(T),b=e(19216),k=e.n(b),$=e(44589),W=e.n($),z=e(78504),R={};R.styleTagTransform=W(),R.setAttributes=w(),R.insert=C().bind(null,"head"),R.domAPI=x(),R.insertStyleElement=k();j()(z.Z,R);z.Z&&z.Z.locals&&z.Z.locals;var E=e(51900);const _=(0,E.Z)(A,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"loader"},[n._t("icon",(function(){return[e("span",{staticClass:"icon-loading"})]}))],2)}),[],!1,null,null,null).exports;var Z=e(4615),D=e(85324),P=e(31209),q=e(57013),B=e(90274),S=e(51041),L=e(33476);const O={name:"PhotosHeader",components:{Actions:L.Actions,ActionButton:L.ActionButton,Plus:P.Z,TrashCan:q.Z,FileUpload:S.Z,PlusBoxMultiple:B.Z},props:{selection:{type:Array,default:()=>[]}},methods:{openUploader(){},createNewAlbum(){},openAlbumPicker(){},moveSelectionToAlbum(){},deleteSelection(){}}};var U=e(79132),H={};H.styleTagTransform=W(),H.setAttributes=w(),H.insert=C().bind(null,"head"),H.domAPI=x(),H.insertStyleElement=k();j()(U.Z,H);U.Z&&U.Z.locals&&U.Z.locals;const M=(0,E.Z)(O,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"photos-header"},[0===n.selection.length?e("Actions",{attrs:{"menu-title":n.t("photos","Add"),primary:!0}},[e("Plus",{attrs:{slot:"icon"},slot:"icon"}),n._v(" "),e("ActionButton",{attrs:{title:n.t("photos","Upload media")},on:{click:n.openUploader}},[e("FileUpload",{attrs:{slot:"icon"},slot:"icon"})],1),n._v(" "),e("ActionButton",{attrs:{title:n.t("photos","Create new album")},on:{click:n.createNewAlbum}},[e("PlusBoxMultiple",{attrs:{slot:"icon"},slot:"icon"})],1)],1):[e("Actions",{attrs:{"force-title":!0,primary:!0}},[e("ActionButton",{attrs:{title:n.t("photos","Add to album")},on:{click:n.openAlbumPicker}},[e("Plus",{attrs:{slot:"icon"},slot:"icon"})],1)],1),n._v(" "),e("Actions",{attrs:{"force-menu":!0}},[e("ActionButton",{attrs:{title:n.t("photos","Delete")},on:{click:n.deleteSelection}},[e("TrashCan",{attrs:{slot:"icon"},slot:"icon"})],1)],1)]],2)}),[],!1,null,"480e67f5",null).exports;function F(n,t){const e=function(n){return n.reduce(((n,t)=>{const e=`${I(t.injected.lastmod,"YYYY")}-${I(t.injected.lastmod,"MMMM")}`;return{...n,[e]:[...n[e]??[],t]}}),{})}(n);return Object.keys(e).reduce(((n,i)=>({...n,[i]:N(e[i],t)})),{})}function I(n,t){return s()(n).format(t)}function N(n,t){if(0===t)return[];const e=[];let i=0;for(;n.length>0;){const s=[];do{s.push(n.shift())}while(n.length>0&&G([...s,n[n.length-1]])<=t);e[i++]={items:s,height:Y(s,t,0===n.length)}}return e}function G(n){return n.map((n=>n.width/n.height*200)).reduce(((n,t)=>n+t))}function Y(n,t,e){let i=t/n.map((n=>n.width/n.height)).reduce(((n,t)=>n+t));return 1===n.length&&n[0].width>t&&(i=t/(n[0].width/n[0].height)),e&&(i=Math.min(200,i)),i}const J={name:"TiledLayout",components:{PhotosHeader:M},props:{items:{type:Array,required:!0},updateFunction:{type:Function,required:!0},loader:{type:Object,required:!0}},data:()=>({containerWidth:0,checkedItems:{}}),computed:{selection(){return Object.keys(this.checkedItems).filter((n=>this.checkedItems[n]))},layoutByMonth(){return F(this.items,this.containerWidth)}},mounted(){this.updateFunction(),this.containerWidth=this.$refs.container.clientWidth??0,window.addEventListener("resize",this.updateContainerWidth)},beforeUnmount(){window.removeEventListener("resize",this.updateContainerWidth)},methods:{updateContainerWidth(){this.containerWidth=this.$refs.container.clientWidth??0},onItemSelectToggle(n){let{fileid:t,value:e}=n;this.$set(this.checkedItems,t,e)}}};var V=e(50017),Q={};Q.styleTagTransform=W(),Q.setAttributes=w(),Q.insert=C().bind(null,"head"),Q.domAPI=x(),Q.insertStyleElement=k();j()(V.Z,Q);V.Z&&V.Z.locals&&V.Z.locals;const X=(0,E.Z)(J,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",[e("PhotosHeader",{attrs:{selection:n.selection}}),n._v(" "),e("div",{ref:"container",staticClass:"items-container"},n._l(n.layoutByMonth,(function(t,i){return e("div",{key:i},[e("h3",{staticClass:"section-header"},[e("b",[n._v(n._s(i.split("-")[1]))]),n._v(" "+n._s(i.split("-")[0])+"\n\t\t\t")]),n._v(" "),n._l(t,(function(t,i){return e("div",{key:i,staticClass:"items-row",style:{height:t.height+"px"}},n._l(t.items,(function(i){return e(i.renderComponent,{key:i.fileid,tag:"component",style:{width:t.height*i.width/i.height+"px",height:t.height+"px"},attrs:{item:i,selected:!0===n.checkedItems[i.injected.fileid]},on:{"select-toggled":n.onItemSelectToggle}})})),1)}))],2)})),0)],1)}),[],!1,null,null,null).exports;var K=e(25108);const nn={name:"Timeline",components:{EmptyContent:u.Z,Navigation:g.Z,TiledLayout:X},mixins:[D.Z],props:{loading:{type:Boolean,required:!0},onlyFavorites:{type:Boolean,default:!1},mimesType:{type:Array,default:()=>d.Oj},rootTitle:{type:String,required:!0},path:{type:String,default:""},onThisDay:{type:Boolean,default:!1}},data:()=>({cancelRequest:null,done:!1,error:null,page:0,loaderComponent:_}),computed:{...(0,o.Se)(["files","timeline"]),fileList(){return this.timeline.map((n=>this.files[n])).filter((n=>!!n))},contentList(){return this.fileList.flatMap(((n,t)=>{const e=[];return e.push({id:`img-${n.fileid}`,injected:{...n,list:this.fileList,loadMore:this.getContent,canLoop:!1},width:n.fileMetadataSize.width,height:n.fileMetadataSize.height,renderComponent:h.Z}),e}))},isEmpty(){return 0===this.fileList.length}},watch:{$route(n,t){this.cancelRequest&&this.cancelRequest("Changed view"),this.resetState()},async onThisDay(){this.resetState(),this.getContent()}},beforeRouteLeave(n,t,e){this.cancelRequest&&this.cancelRequest("Changed view"),this.resetState(),e()},beforeDestroy(){this.cancelRequest&&this.cancelRequest("Changed view")},methods:{async getContent(n){if(this.done)return Promise.resolve(!0);this.cancelRequest&&this.cancelRequest("Changed view"),0===this.timeline.length&&this.$emit("update:loading",!0);const{request:t,cancel:e}=(0,Z.Z)(p);this.cancelRequest=e;const i=5*this.gridConfig.count;try{const e=await t(this.onlyFavorites,{page:this.page,perPage:i,mimesType:this.mimesType,onThisDay:this.onThisDay});return e.length!==i&&(this.done=!0),this.$store.dispatch("updateTimeline",e),this.$store.dispatch("appendFiles",e),this.page+=1,n?Promise.resolve(e):Promise.resolve(!1)}catch(n){return n.response&&n.response.status&&(404===n.response.status?(this.error=404,setTimeout((()=>{this.$router.push({name:this.$route.name})}),3e3)):this.error=n),K.error("Error fetching timeline",n),Promise.resolve(!0)}finally{this.$emit("update:loading",!1),this.cancelRequest=null}},resetState(){this.$store.dispatch("resetTimeline"),this.done=!1,this.error=null,this.page=0,this.lastSection="",this.$emit("update:loading",!0),this.$refs.virtualgrid&&this.$refs.virtualgrid.resetGrid()},getFormatedDate:(n,t)=>s()(n).format(t)}};var tn=e(80334),en={};en.styleTagTransform=W(),en.setAttributes=w(),en.insert=C().bind(null,"head"),en.domAPI=x(),en.insertStyleElement=k();j()(tn.Z,en);tn.Z&&tn.Z.locals&&tn.Z.locals;const sn=(0,E.Z)(nn,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return 404===n.error?e("EmptyContent",{attrs:{"illustration-name":"folder"}},[n._v("\n\t"+n._s(n.t("photos","This folder does not exist"))+"\n")]):n.error?e("EmptyContent",[n._v("\n\t"+n._s(n.t("photos","An error occurred"))+"\n")]):e("div",[n.isEmpty?e("Navigation",{key:"navigation",attrs:{basename:n.path,filename:"/","root-title":n.rootTitle}}):n._e(),n._v(" "),n.isEmpty?e("EmptyContent",{attrs:{"illustration-name":"empty"}},[n._v("\n\t\t"+n._s(n.t("photos","No photos in here"))+"\n\t")]):n._e(),n._v(" "),e("div",{staticClass:"grid-container"},[e("TiledLayout",{ref:"virtualgrid",attrs:{items:n.contentList,"update-function":n.getContent,loader:n.loaderComponent}})],1)],1)}),[],!1,null,"7f201254",null).exports},80950:()=>{},46601:()=>{},89214:()=>{},96419:()=>{},56353:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},69386:()=>{},31616:()=>{},56619:()=>{},77108:()=>{},69862:()=>{},40964:()=>{}}]); //# sourceMappingURL=photos-src_patchedRequest_js-node_modules_moment_locale_sync_recursive_-src_views_Timeline_vue.js.map?v=7e7cfd3153be8bb76487