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||ne;varn=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}functiono(e){vart=!!e&&"length"ine&&e.length,n=be.type(e);return"function"!==n&&!be.isWindow(e)&&("array"===n||0===t||"number"==typeoft&&t>0&&t-1ine)}functioni(e,t){returne.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}functiona(e,t,n){returnbe.isFunction(t)?be.grep(e,function(e,o){return!!t.call(e,o,e)!==n}):t.nodeType?be.grep(e,function(e){returne===t!==n}):"string"!=typeoft?be.grep(e,function(e){returnle.call(t,e)>-1!==n}):je.test(t)?be.filter(t,e,n):(t=be.filter(t,e),be.grep(e,function(e){returnle.call(t,e)>-1!==n&&1===e.nodeType}))}functionr(e,t){for(;(e=e[t])&&1!==e.nodeType;);returne}functionl(e){vart={};returnbe.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}functions(e){returne}functionc(e){throwe}functionu(e,t,n,o){vari;try{e&&be.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&be.isFunction(i=e.then)?i.call(e,t,n):t.apply(void0,[e].slice(o))}catch(e){n.apply(void0,[e])}}functiond(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),be.ready()}functionp(){this.expando=be.expando+p.uid++}functionh(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Pe.test(e)?JSON.parse(e):e)}functionf(e,t,n){varo;if(void0===n&&1===e.nodeType)if(o="data-"+t.replace(Ie,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n=h(n)}catch(e){}Le.set(e,t,n)}elsen=void0;returnn}functionb(e,t,n,o){vari,a=1,r=20,l=o?function(){returno.cur()}:function(){returnbe.css(e,t,"")},s=l(),c=n&&n[3]||(be.cssNumber[t]?"":"px"),u=(be.cssNumber[t]||"px"!==c&&+s)&&Ne.exec(be.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+s||1;do{a=a||".5",u/=a,be.style(e,t,u+c)}while(a!==(a=l()/s)&&1!==a&&--r)}returnn&&(u=+u||+s||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],o&&(o.unit=c,o.start=u,o.end=i)),i}functionm(e){vart,n=e.ownerDocument,o=e.nodeName,i=He[o];returni?i:(t=n.body.appendChild(n.createElement(o)),i=be.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),He[o]=i,i)}functiong(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]=Se.get(o,"display")||null,i[a]||(o.style.display="")),""===o.style.display&&Fe(o)&&(i[a]=m(o))):"none"!==n&&(i[a]="none",Se.set(o,"display",n)));for(a=0;a<r;a++)null!=i[a]&&(e[a].style.display=i[a]);returne}functionv(e,t){varn;returnn=void0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void0===t||t&&i(e,t)?be.merge([e],n):n}functiony(e,t){for(varn=0,o=e.length;n<o;n++)Se.set(e[n],"globalEval",!t||Se.get(t[n],"globalEval"))}functionw(e,t,n,o,i){for(vara,r,l,s,c,u,d=t.createDocumentFragment(),p=[],h=0,f=e.length;h<f;h++)if((a=e[h])||0===a)if("object"===be.type(a))be.merge(p,a.nodeType?[a]:a);elseif(ze.test(a)){for(r=r||d.appendChild(t.createElement("div")),l=(Be.exec(a)||["",""])[1].toLowerCase(),s=Xe[l]||Xe._default,r.innerHTML=s[1]+be.htmlPrefilter(a)+s[2],u=s[0];u--;)r=r.lastChild;be.merge(p,r.childNodes),r=d.firstChild,r.textContent=""}elsep.push(t.createTextNode(a));for(d.textContent="",h=0;a=p[h++];)if(o&&be.inArray(a,o)>-1)i&&i.push(a);elseif(c=be.contains(a.ownerDocument,a),r=v(d.appendChild(a),"script"),c&&y(r),n)for(u=0;a=r[u++];)We.test(a.type||"")&&n.push(a);returnd}functionx(){return!0}functionj(){return!1}function_(){try{returnne.activeElement}catch(e){}}functionT(e,t,n,o,i,a){varr,l;if("object"==typeoft)
;visible.photo()&&(photo.json.title=""===n?"Untitled":n,view.photo.title()),e.forEach(function(e,t,o){album.json.content[e].title=n,view.album.content.title(e)});varo={photoIDs:e.join(),title:n};api.post("Photo::setTitle",o,function(e){e!==!0&&lychee.error(null,o,e)})},i=lychee.html(_templateObject3,t);n=1===e.length?lychee.html(_templateObject29,i):lychee.html(_templateObject30,e.length,i),basicModal.show({body:n,buttons:{action:{title:"Set title",fn:o},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setAlbum=function(e,t){varn=null,o=null;if(!e)return!1;einstanceofArray==!1&&(e=[e]),e.forEach(function(e,t,i){""===album.json.content[e].nextPhoto&&""===album.json.content[e].previousPhoto||(n=album.json.content[e].nextPhoto,o=album.json.content[e].previousPhoto,album.json.content[o].nextPhoto=n,album.json.content[n].previousPhoto=o),deletealbum.json.content[e],view.album.content.delete(e)}),albums.refresh(),visible.photo()&&null!=n&&n!==photo.getID()?lychee.goto(album.getID()+"/"+n):visible.albums()||lychee.goto(album.getID());vari={photoIDs:e.join(),albumID:t};api.post("Photo::setAlbum",i,function(e){e!==!0&&lychee.error(null,i,e)})},photo.setStar=function(e){if(!e)return!1;visible.photo()&&(photo.json.star="0"===photo.json.star?"1":"0",view.photo.star()),e.forEach(function(e,t,n){album.json.content[e].star="0"===album.json.content[e].star?"1":"0",view.album.content.star(e)}),albums.refresh();vart={photoIDs:e.join()};api.post("Photo::setStar",t,function(e){e!==!0&&lychee.error(null,t,e)})},photo.setPublic=function(e,t){if("2"===photo.json.public){varn=function(){basicModal.close(),lychee.goto(photo.json.original_album)};returnbasicModal.show({body:"<p>This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.</p>",buttons:{action:{title:"Show Album",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}}),!1}visible.photo()&&(photo.json.public="0"===photo.json.public?"1":"0",view.photo.public(),"1"===photo.json.public&&contextMenu.sharePhoto(e,t)),album.json.content[e].public="0"===album.json.content[e].public?"1":"0",view.album.content.public(e),albums.refresh(),api.post("Photo::setPublic",{photoID:e},function(e){e!==!0&&lychee.error(null,params,e)})},photo.setDescription=function(e){vart=photo.json.description,n=function(t){basicModal.close();varn=t.description;visible.photo()&&(photo.json.description=n,view.photo.description());varo={photoID:e,description:n};api.post("Photo::setDescription",o,function(e){e!==!0&&lychee.error(null,o,e)})};basicModal.show({body:lychee.html(_templateObject31,t),buttons:{action:{title:"Set Description",fn:n},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.editTags=function(e){vart="",n="";if(!e)return!1;if(einstanceofArray==!1&&(e=[e]),visible.photo())t=photo.json.tags;elseif(visible.album()&&1===e.length)t=album.json.content[e].tags;elseif(visible.search()&&1===e.length)t=album.json.content[e].tags;elseif(visible.album()&&e.length>1){varo=!0;e.forEach(function(t,n,i){o=album.json.content[t].tags===album.json.content[e[0]].tags&&o===!0}),o===!0&&(t=album.json.content[e[0]].tags)}t=t.replace(/,/g,", ");vari=function(t){basicModal.close(),photo.setTags(e,t.tags)},a=lychee.html(_templateObject32,t);n=1===e.length?lychee.html(_templateObject33,a):lychee.html(_templateObject34,e.length,a),basicModal.show({body:n,buttons:{action:{title:"Set Tags",fn:i},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setTags=function(e,t){if(!e)return!1;einstanceofArray==!1&&(e=[e]),t=t.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g,","),t=t.replace(/,$|^,|(\ ){0,}$/g,""),visible.photo()&&(photo.json.tags=t,view.photo.tags()),e.forEach(function(e,n,o){album.json.content[e].tags=t});varn={photoIDs:e.join(),tags:t};api.post("Photo::setTags",n,function(e){e!==!0&&lychee.error(null,n,e)})},photo.deleteTag=function(e,t){varn=void0;n=photo.json.tags.split(","),n.splice(t,1),photo.json.tags=n.toString(),photo.setTags([e],photo.json.tags)},photo.share=function(e,t){varn=photo.getViewLink(e);switch(t){case"twit