function_taggedTemplateLiteral(e,t){returnObject.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}functiongup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");vart="[\\?&]"+e+"=([^&#]*)",n=newRegExp(t),o=n.exec(window.location.href);returnnull===o?"":o[1]}!function(e,t){"use strict";"object"==typeofmodule&&"object"==typeofmodule.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)thrownewError("jQuery requires a window with a document");returnt(e)}:t(e)}("undefined"!=typeofwindow?window:this,function(e,t){"use strict";functionn(e,t){t=t||te;varn=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}functiono(e){vart=!!e&&"length"ine&&e.length,n=fe.type(e);return"function"!==n&&!fe.isWindow(e)&&("array"===n||0===t||"number"==typeoft&&t>0&&t-1ine)}functioni(e,t,n){returnfe.isFunction(t)?fe.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?fe.grep(e,function(e){returne===t!==n}):"string"!=typeoft?fe.grep(e,function(e){returnre.call(t,e)>-1!==n}):Te.test(t)?fe.filter(t,e,n):(t=fe.filter(t,e),fe.grep(e,function(e){returnre.call(t,e)>-1!==n&&1===e.nodeType}))}functiona(e,t){for(;(e=e[t])&&1!==e.nodeType;);returne}functionr(e){vart={};returnfe.each(e.match(Ae)||[],function(e,n){t[n]=!0}),t}functionl(e){returne}functions(e){throwe}functionu(e,t,n){varo;try{e&&fe.isFunction(o=e.promise)?o.call(e).done(t).fail(n):e&&fe.isFunction(o=e.then)?o.call(e,t,n):t.call(void0,e)}catch(e){n.call(void0,e)}}functionc(){te.removeEventListener("DOMContentLoaded",c),e.removeEventListener("load",c),fe.ready()}functiond(){this.expando=fe.expando+d.uid++}functionp(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Oe.test(e)?JSON.parse(e):e)}functionh(e,t,n){varo;if(void0===n&&1===e.nodeType)if(o="data-"+t.replace(qe,"-$&").toLowerCase(),n=e.getAttribute(o),"string"==typeofn){try{n=p(n)}catch(e){}Ne.set(e,t,n)}elsen=void0;returnn}functionf(e,t,n,o){vari,a=1,r=20,l=o?function(){returno.cur()}:function(){returnfe.css(e,t,"")},s=l(),u=n&&n[3]||(fe.cssNumber[t]?"":"px"),c=(fe.cssNumber[t]||"px"!==u&&+s)&&Re.exec(fe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+s||1;doa=a||".5",c/=a,fe.style(e,t,c+u);while(a!==(a=l()/s)&&1!==a&&--r)}returnn&&(c=+c||+s||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=u,o.start=c,o.end=i)),i}functionm(e){vart,n=e.ownerDocument,o=e.nodeName,i=We[o];returni?i:(t=n.body.appendChild(n.createElement(o)),i=fe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),We[o]=i,i)}functionb(e,t){for(varn,o,i=[],a=0,r=e.length;a<r;a++)o=e[a],o.style&&(n=o.style.display,t?("none"===n&&(i[a]=Le.get(o,"display")||null,i[a]||(o.style.display="")),""===o.style.display&&Ue(o)&&(i[a]=m(o))):"none"!==n&&(i[a]="none",Le.set(o,"display",n)));for(a=0;a<r;a++)null!=i[a]&&(e[a].style.display=i[a]);returne}functiong(e,t){varn;returnn="undefined"!=typeofe.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeofe.querySelectorAll?e.querySelectorAll(t||"*"):[],void0===t||t&&fe.nodeName(e,t)?fe.merge([e],n):n}functionv(e,t){for(varn=0,o=e.length;n<o;n++)Le.set(e[n],"globalEval",!t||Le.get(t[n],"globalEval"))}functiony(e,t,n,o,i){for(vara,r,l,s,u,c,d=t.createDocumentFragment(),p=[],h=0,f=e.length;h<f;h++)if(a=e[h],a||0===a)if("object"===fe.type(a))fe.merge(p,a.nodeType?[a]:a);elseif(Ve.test(a)){for(r=r||d.appendChild(t.createElement("div")),l=(ze.exec(a)||["",""])[1].toLowerCase(),s=Ye[l]||Ye._default,r.innerHTML=s[1]+fe.htmlPrefilter(a)+s[2],c=s[0];c--;)r=r.lastChild;fe.merge(p,r.childNodes),r=d.firstChild,r.textContent=""}elsep.push(t.createTextNode(a));for(d.textContent="",h=0;a=p[h++];)if(o&&fe.inArray(a,o)>-1)i&&i.push(a);elseif(u=fe.contains(a.ownerDocument,a),r=g(d.appendChild(a),"script"),u&&v(r),n)for(c=0;a=r[c++];)Ke.test(a.type||"")&&n.push(a);returnd}functionw(){return!0}functionx(){return!1}functionj(){try{returnte.activeElement}catch(e){}}function_(e,t,n,o,i,a){varr,l;if("object"==typeoft){"string"!=typeofn&&(o=o||n,n=void0);for(lint)_(e,l,n,o,t[
e.thumbs[1]="src/images/password.svg",e.thumbs[2]="src/images/password.svg"):(e.thumbs[0]||(e.thumbs[0]="src/images/no_images.svg"),e.thumbs[1]||(e.thumbs[1]="src/images/no_images.svg"),e.thumbs[2]||(e.thumbs[2]="src/images/no_images.svg"))},albums._createSmartAlbums=function(e){e.unsorted={id:0,title:"Unsorted",sysdate:e.unsorted.num+" photos",unsorted:"1",thumbs:e.unsorted.thumbs},e.starred={id:"f",title:"Starred",sysdate:e.starred.num+" photos",star:"1",thumbs:e.starred.thumbs},e.public={id:"s",title:"Public",sysdate:e.public.num+" photos",public:"1",thumbs:e.public.thumbs},e.recent={id:"r",title:"Recent",sysdate:e.recent.num+" photos",recent:"1",thumbs:e.recent.thumbs}},albums.getByID=function(e){if(null!=e){einstanceofArray&&(e=e[0]);vart=void0,n=function(){this.id==e&&(t=this)};returnalbums.json&&albums.json.albums?$.each(albums.json.albums,n):album.subjson&&album.subjson.albums&&$.each(album.subjson.albums,n),t}},albums.deleteByID=function(e){if(null==e)return!1;if(!albums.json)return!1;if(!albums.json.albums)return!1;vart=!1;return$.each(albums.json.albums,function(n){if(albums.json.albums[n].id==e)returnalbums.json.albums.splice(n,1),t=!0,!1}),t},albums.refresh=function(){albums.json=null},api={path:"php/index.php",onError:null},api.post=function(e,t,n){loadingBar.show(),t=$.extend({function:e},t);varo=function(e){returnsetTimeout(loadingBar.hide,100),"string"==typeofe&&"Error: "===e.substring(0,7)?(api.onError(e.substring(7,e.length),t,e),!1):voidn(e)},i=function(e,n,o){api.onError("Server error or API not found.",t,o)};$.ajax({type:"POST",url:api.path,data:t,dataType:"json",success:o,error:i})},build={},build.iconic=function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:"",n="";returnn+=lychee.html(_templateObject9,t,e)},build.divider=function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:"",n="";returnn+=lychee.html(_templateObject10,t,e)},build.editIcon=function(e){vart="";returnt+=lychee.html(_templateObject11,e,build.iconic("pencil"))},build.multiselect=function(e,t){returnlychee.html(_templateObject12,e,t)},build.album=function(e){vart="",n=lychee.retinize(e.thumbs[0]),o=n.path,i=n.isPhoto;returnt+=lychee.html(_templateObject13,e.id,e.thumbs[2],e.thumbs[1],e.thumbs[0],o,i,e.title,e.title,e.sysdate),lychee.publicMode===!1&&(t+=lychee.html(_templateObject14,"1"===e.star?"badge--visible":"",build.iconic("star"),"1"===e.public?"badge--visible":"",build.iconic("eye"),"1"===e.unsorted?"badge--visible":"",build.iconic("list"),"1"===e.recent?"badge--visible":"",build.iconic("clock"),"1"===e.password?"badge--visible":"",build.iconic("lock-locked"))),t+="</div>"},build.photo=function(e){vart="",n=lychee.retinize(e.thumbUrl),o=n.path;returnt+=lychee.html(_templateObject15,e.album,e.id,e.thumbUrl,o,e.title,e.title),t+="1"===e.cameraDate?lychee.html(_templateObject16,build.iconic("camera-slr"),e.sysdate):lychee.html(_templateObject17,e.sysdate),t+="</div>",lychee.publicMode===!1&&(t+=lychee.html(_templateObject18,"1"===e.star?"badge--visible":"",build.iconic("star"),"1"===e.public&&"1"!==album.json.public?"badge--visible":"",build.iconic("eye"))),t+="</div>"},build.imageview=function(e,t){varn="",o=""!==e.medium;returnn+=o===!1?lychee.html(_templateObject19,t===!0?"":"full",e.url):lychee.html(_templateObject20,t===!0?"":"full",e.url,e.medium,e.url,e.width),n+="\n\t <div class='arrow_wrapper arrow_wrapper--previous'><a id='previous'>"+build.iconic("caret-left")+"</a></div>\n\t <div class='arrow_wrapper arrow_wrapper--next'><a id='next'>"+build.iconic("caret-right")+"</a></div>\n\t "},build.no_content=function(e){vart="";switch(t+="\n\t <div class='no_content fadeIn'>\n\t "+build.iconic(e)+"\n\t ",e){case"magnifying-glass":t+="<p>No results</p>";break;case"eye":t+="<p>No public albums</p>";break;case"cog":t+="<p>No configuration</p>";break;case"question-mark":t+="<p>Photo not found</p>"}returnt+="</div>"},build.uploadModal=function(e,t){varn="";n+=lychee.html(_templateObject21,e);for(varo=0;o<t.length;){vari=t[
},multiselect.hide=function(){sidebar.setSelectable(!0),multiselect.stopResize(),multiselect.position.top=null,multiselect.position.right=null,multiselect.position.bottom=null,multiselect.position.left=null,lychee.animate("#multiselect","fadeOut"),setTimeout(function(){return$("#multiselect").remove()},300)},multiselect.close=function(){multiselect.clearSelection(),multiselect.hide()},password={value:""},password.get=function(e,t){lychee.publicMode===!1?t():album.json&&"0"===album.json.password?t():albums.json&&"0"===albums.getByID(e).password?t():albums.json||album.json?password.getDialog(e,t):(album.json={password:!0},t(""))},password.getDialog=function(e,t){varn=function(n){varo=n.password,i={albumID:e,password:o};api.post("Album::getPublic",i,function(e){e===!0?(basicModal.close(),password.value=o,t()):basicModal.error("password")})},o=function(){basicModal.close(),visible.albums()||lychee.goto()},i="\n\t <p>\n\t This album is protected by a password. Enter the password below to view the photos of this album:\n\t <input name='password' class='text' type='password' placeholder='password' value=''>\n\t </p>\n\t ";basicModal.show({body:i,buttons:{action:{title:"Enter",fn:n},cancel:{title:"Cancel",fn:o}}})},photo={json:null,cache:null},photo.getID=function(){vare=null;returne=photo.json?photo.json.id:$(".photo:hover, .photo.active").attr("data-id"),$.isNumeric(e)===!0&&e},photo.load=function(e,t){varn=functionn(){null!=album.json?photo.load(e,t):setTimeout(n,100)},o=functionn(){""!==password.value?photo.load(e,t):setTimeout(n,200)};if(null==album.json)returnn(),!1;vari={photoID:e,albumID:t,password:password.value};api.post("Photo::get",i,function(t){return"Warning: Photo private!"===t?(lychee.content.show(),lychee.goto(),!1):"Warning: Wrong password!"===t?(o(),!1):(photo.json=t,visible.photo()||view.photo.show(),view.photo.init(),lychee.imageview.show(),voidsetTimeout(function(){lychee.content.show(),photo.preloadNext(e)},300))})},photo.preloadNext=function(e){if(album.json&&album.json.content&&album.json.content[e]&&""!=album.json.content[e].nextPhoto){vart=album.json.content[e].nextPhoto,n=album.json.content[t].url,o=album.json.content[t].medium,i=null!=o&&""!==o?o:n;$("head [data-prefetch]").remove(),$("head").append('<link data-prefetch rel="prefetch" href="'+i+'">')}},photo.parse=function(){photo.json.title||(photo.json.title="Untitled")},photo.previous=function(e){if(photo.getID()!==!1&&album.json&&album.json.content[photo.getID()]&&""!==album.json.content[photo.getID()].previousPhoto){vart=0;e===!0&&(t=200,$("#imageview #image").css({WebkitTransform:"translateX(100%)",MozTransform:"translateX(100%)",transform:"translateX(100%)",opacity:0})),setTimeout(function(){returnphoto.getID()!==!1&&voidlychee.goto(album.getID()+"/"+album.json.content[photo.getID()].previousPhoto)},t)}},photo.next=function(e){if(photo.getID()!==!1&&album.json&&album.json.content[photo.getID()]&&""!==album.json.content[photo.getID()].nextPhoto){vart=0;e===!0&&(t=200,$("#imageview #image").css({WebkitTransform:"translateX(-100%)",MozTransform:"translateX(-100%)",transform:"translateX(-100%)",opacity:0})),setTimeout(function(){returnphoto.getID()!==!1&&voidlychee.goto(album.getID()+"/"+album.json.content[photo.getID()].nextPhoto)},t)}},photo.duplicate=function(e){if(!e)return!1;einstanceofArray==!1&&(e=[e]),albums.refresh();vart={photoIDs:e.join()};api.post("Photo::duplicate",t,function(e){e!==!0?lychee.error(null,t,e):album.load(album.getID())})},photo.delete=function(e){vart={},n={},o="",i="";return!!e&&(einstanceofArray==!1&&(e=[e]),1===e.length&&(i=visible.photo()?photo.json.title:album.json.content[e].title,""===i&&(i="Untitled")),t.fn=function(){vart=null,n=null;basicModal.close(),e.forEach(function(e,o,i){""===album.json.content[e].nextPhoto&&""===album.json.content[e].previousPhoto||(t=album.json.content[e].nextPhoto,n=album.json.content[e].previousPhoto,album.json.content[n].nextPhoto=t,album.json.content[t].previousPhoto=n),deletealbum.json.content[e],view.