diff --git a/demo/dist/Larapass.js b/demo/dist/Larapass.js deleted file mode 100644 index 7459055b..00000000 --- a/demo/dist/Larapass.js +++ /dev/null @@ -1,295 +0,0 @@ -/** - * MIT License - * - * Copyright (c) Italo Israel Baeza Cabrera - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -class Larapass -{ - /** - * Headers to use in ALL requests done. - * - * @type {{Accept: string, "X-Requested-With": string, "Content-Type": string}} - */ - headers = { - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'X-Requested-With': 'XMLHttpRequest' - }; - - /** - * Routes for WebAuthn assertion (login) and attestation (register). - * - * @type {{registerOptions: string, loginOptions: string, login: string, register: string}} - */ - routes = { - loginOptions: 'webauthn/login/options', - login: 'webauthn/login', - registerOptions: 'webauthn/register/options', - register: 'webauthn/register', - } - - /** - * Create a new Larapass instance. - * - * @param routes {{registerOptions: string, loginOptions: string, login: string, register: string}} - * @param headers {{string}} - */ - constructor(routes = {}, headers = {}) - { - this.routes = {...this.routes, ...routes}; - - this.headers = { - ...this.headers, - ...headers - } - - // If the developer didn't issue an XSRF token, we will find it ourselves. - if (headers['X-XSRF-TOKEN'] === undefined) { - this.headers['X-XSRF-TOKEN'] = Larapass.#getXsrfToken() - } - } - - /** - * Returns the XSRF token if it exists. - * - * @returns string|undefined - * @throws TypeError - */ - static #getXsrfToken() - { - let tokenContainer; - - // First, let's get the token if it exists as a cookie, since most apps use it by default. - tokenContainer = document.cookie.split('; ').find(row => row.startsWith('XSRF-TOKEN')) - if (tokenContainer !== undefined) { - return decodeURIComponent(tokenContainer.split('=')[1]); - } - - // If it doesn't exists, we will try to get it from the head meta tags as last resort. - tokenContainer = document.getElementsByName('csrf-token')[0]; - if (tokenContainer !== undefined) { - return tokenContainer.content; - } - - throw new TypeError('There is no cookie with "X-XSRF-TOKEN" or meta tag with "csrf-token".') - } - - /** - * Returns a fetch promise to resolve later. - * - * @param data {{string}} - * @param route {string} - * @param headers {{string}} - * @returns {Promise} - */ - #fetch(data, route, headers = {}) - { - return fetch(route, { - method: 'POST', - credentials: 'same-origin', - redirect: 'error', - headers: {...this.headers, ...headers}, - body: JSON.stringify(data) - }) - } - - /** - * Decodes a BASE64 URL string into a normal string. - * - * @param input {string} - * @returns {string|Iterable} - */ - static #base64UrlDecode(input) - { - input = input.replace(/-/g, '+').replace(/_/g, '/'); - - const pad = input.length % 4; - if (pad) { - if (pad === 1) { - throw new Error('InvalidLengthError: Input base64url string is the wrong length to determine padding'); - } - input += new Array(5-pad).join('='); - } - - return window.atob(input); - } - - /** - * Transform an string into Uint8Array instance. - * - * @param input {string} - * @param atob {boolean} - * @returns {Uint8Array} - */ - static #uint8Array(input, atob = false) - { - return Uint8Array.from( - atob ? window.atob(input) : Larapass.#base64UrlDecode(input), - c => c.charCodeAt(0) - ) - } - - /** - * Encodes an array of bytes to a BASE64 URL string - * - * @param arrayBuffer {ArrayBuffer|Uint8Array} - * @returns {string} - */ - static #arrayToBase64String(arrayBuffer) - { - return btoa(String.fromCharCode(...new Uint8Array(arrayBuffer))); - } - - /** - * Parses the Public Key Options received from the Server for the browser. - * - * @param publicKey {Object} - * @returns {Object} - */ - #parseIncomingServerOptions(publicKey) - { - publicKey.challenge = Larapass.#uint8Array(publicKey.challenge) - - if (publicKey.user !== undefined) { - publicKey.user = { - ...publicKey.user, - id: Larapass.#uint8Array(publicKey.user.id, true), - }; - } - - ['excludeCredentials', 'allowCredentials'] - .filter(key => publicKey[key] !== undefined) - .forEach(key => { - publicKey[key] = publicKey[key].map( - data => { - return { - ...data, - id: Larapass.#uint8Array(data.id), - }; - } - ) - }) - - return publicKey; - } - - /** - * Parses the outgoing credentials from the browser to the server. - * - * @param credentials {Credential|PublicKeyCredential} - * @return {{response: {string}, rawId: string, id: string, type: string}} - */ - #parseOutgoingCredentials(credentials) - { - let parseCredentials = { - id: credentials.id, - type: credentials.type, - rawId: Larapass.#arrayToBase64String(credentials.rawId), - response: {}, - }; - - ['clientDataJSON', 'attestationObject', 'authenticatorData', 'signature', 'userHandle'] - .filter(key => credentials.response[key] !== undefined) - .forEach(key => { - parseCredentials.response[key] = Larapass.#arrayToBase64String(credentials.response[key]); - }) - - return parseCredentials; - } - - /** - * Checks if the browser supports WebAuthn. - * - * @returns {boolean} - */ - static supportsWebAuthn() - { - return typeof(PublicKeyCredential) != 'undefined'; - } - - /** - * Handles the response from the Server. - * - * Throws the entire response if is not OK (HTTP 2XX). - * - * @param response {Response} - * @returns Promise - * @throws Response - */ - static #handleResponse(response) - { - if (! response.ok) { - throw response; - } - - // Here we will do a small trick. Since most of the responses from the server - // are JSON, we will automatically parse the JSON body from the response. If - // it's not JSON, we will push the body verbatim and let the dev handle it. - return new Promise(resolve => { - response.json() - .then(json => resolve(json)) - .catch(() => resolve(response.body)) - }) - } - - /** - * Log in an user with his credentials. - * - * If no credentials are given, Larapass can return a blank assertion for typeless login. - * - * @param data {{string}} - * @param headers {{string}} - * @returns Promise - */ - async login(data = {}, headers = {}) - { - const optionsResponse = await this.#fetch(data, this.routes.loginOptions) - const json = await optionsResponse.json() - const publicKey = this.#parseIncomingServerOptions(json) - const credentials = await navigator.credentials.get({publicKey}) - const publicKeyCredential = this.#parseOutgoingCredentials(credentials) - - return await this.#fetch(publicKeyCredential, this.routes.login, headers) - .then(Larapass.#handleResponse); - } - - /** - * Register the user credentials from the browser/device. - * - * You can add data if you are planning to register an user with WebAuthn from scratch. - * - * @param data {{string}} - * @param headers {{string}} - * @returns Promise - */ - async register(data = {}, headers = {}) - { - const optionsResponse = await this.#fetch(data, this.routes.registerOptions) - const json = await optionsResponse.json() - const publicKey = this.#parseIncomingServerOptions(json) - const credentials = await navigator.credentials.create({publicKey}) - const publicKeyCredential = this.#parseOutgoingCredentials(credentials) - - return await this.#fetch(publicKeyCredential, this.routes.register, headers) - .then(Larapass.#handleResponse); - } -} \ No newline at end of file diff --git a/demo/dist/TV.css b/demo/dist/TV.css deleted file mode 100644 index fe7513bd..00000000 --- a/demo/dist/TV.css +++ /dev/null @@ -1,43 +0,0 @@ -.basicModal__button:focus { - background: #2293ec; - color: #ffffff; - cursor: pointer; - outline-style: none; -} - -.basicModal__button#basicModal__action:focus { - color: #ffffff; -} - -.content .photo:focus { - outline-style: solid; - outline-color: #ffffff; - outline-width: 10px; -} - -.content .album:focus { - outline-width: 0; -} - -.header .button:focus { - outline-width: 0; - background-color: #ffffff; -} - -.header__title:focus { - outline-width: 0; - background-color: #ffffff; - color: #000000; -} - -.header .button:focus .iconic { - fill: #000000; -} - -#imageview { - background-color: #000000; -} -#imageview #image, -#imageview #livephoto { - outline-width: 0; -} diff --git a/demo/dist/cat.jpg b/demo/dist/cat.jpg deleted file mode 100644 index e1e9fe7d..00000000 Binary files a/demo/dist/cat.jpg and /dev/null differ diff --git a/demo/dist/fonts/socials.eot b/demo/dist/fonts/socials.eot deleted file mode 100644 index 87c4e318..00000000 Binary files a/demo/dist/fonts/socials.eot and /dev/null differ diff --git a/demo/dist/fonts/socials.svg b/demo/dist/fonts/socials.svg deleted file mode 100644 index 44c3c7d6..00000000 --- a/demo/dist/fonts/socials.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - \ No newline at end of file diff --git a/demo/dist/fonts/socials.ttf b/demo/dist/fonts/socials.ttf deleted file mode 100644 index f5ca33af..00000000 Binary files a/demo/dist/fonts/socials.ttf and /dev/null differ diff --git a/demo/dist/fonts/socials.woff b/demo/dist/fonts/socials.woff deleted file mode 100644 index ce4da62f..00000000 Binary files a/demo/dist/fonts/socials.woff and /dev/null differ diff --git a/demo/dist/frame.css b/demo/dist/frame.css deleted file mode 100644 index 90fa891b..00000000 --- a/demo/dist/frame.css +++ /dev/null @@ -1 +0,0 @@ -body{padding:0;margin:0;background-color:#000;opacity:0;-webkit-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}body.loaded{opacity:1}#background_canvas{width:100%;height:100%;position:absolute;z-index:-1}#background{width:100%;height:100%;position:absolute;display:none}#noise{position:absolute;top:0;left:0;width:100%;height:100%;background-image:url(../img/noise.png);background-repeat:repeat;background-position:44px 44px;z-index:-1}.image_container{margin:auto;width:95vw;height:95vh;text-align:center;line-height:100vh}.image_container img{vertical-align:middle;height:100%;width:100%;-o-object-fit:contain;object-fit:contain;-webkit-filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3)) drop-shadow(0 0 10px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3)) drop-shadow(0 0 10px rgba(0, 0, 0, .3));display:none} \ No newline at end of file diff --git a/demo/dist/frame.js b/demo/dist/frame.js deleted file mode 100644 index 4e1c2cd8..00000000 --- a/demo/dist/frame.js +++ /dev/null @@ -1,1241 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 049?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&pi.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n> K), - 0 !== j - ? ((j = 255 / j), (T[b] = ((y * J) >> K) * j), (T[b + 1] = ((p * J) >> K) * j), (T[b + 2] = ((m * J) >> K) * j)) - : (T[b] = T[b + 1] = T[b + 2] = 0), - (y -= v), - (p -= w), - (m -= B), - (h -= C), - (v -= z.r), - (w -= z.g), - (B -= z.b), - (C -= z.a), - (s = (d + ((s = g + f + 1) < _ ? s : _)) << 2), - (y += E += z.r = T[s]), - (p += I += z.g = T[s + 1]), - (m += S += z.b = T[s + 2]), - (h += N += z.a = T[s + 3]), - (z = z.next), - (v += R = F.r), - (w += D = F.g), - (B += G = F.b), - (C += j = F.a), - (E -= R), - (I -= D), - (S -= G), - (N -= j), - (F = F.next), - (b += 4); - d += a; - } - for (g = 0; g < a; g++) { - for ( - I = S = N = E = p = m = h = y = 0, - v = M * (R = T[(b = g << 2)]), - w = M * (D = T[b + 1]), - B = M * (G = T[b + 2]), - C = M * (j = T[b + 3]), - y += O * R, - p += O * D, - m += O * G, - h += O * j, - q = P, - l = 0; - l < M; - l++ - ) - (q.r = R), (q.g = D), (q.b = G), (q.a = j), (q = q.next); - for (x = a, l = 1; l <= f; l++) - (b = (x + g) << 2), - (y += (q.r = R = T[b]) * (A = M - l)), - (p += (q.g = D = T[b + 1]) * A), - (m += (q.b = G = T[b + 2]) * A), - (h += (q.a = j = T[b + 3]) * A), - (E += R), - (I += D), - (S += G), - (N += j), - (q = q.next), - l < H && (x += a); - for (b = g, z = P, F = k, c = 0; c < i; c++) - (T[(s = b << 2) + 3] = j = (h * J) >> K), - j > 0 - ? ((j = 255 / j), (T[s] = ((y * J) >> K) * j), (T[s + 1] = ((p * J) >> K) * j), (T[s + 2] = ((m * J) >> K) * j)) - : (T[s] = T[s + 1] = T[s + 2] = 0), - (y -= v), - (p -= w), - (m -= B), - (h -= C), - (v -= z.r), - (w -= z.g), - (B -= z.b), - (C -= z.a), - (s = (g + ((s = c + M) < H ? s : H) * a) << 2), - (y += E += z.r = T[s]), - (p += I += z.g = T[s + 1]), - (m += S += z.b = T[s + 2]), - (h += N += z.a = T[s + 3]), - (z = z.next), - (v += R = F.r), - (w += D = F.g), - (B += G = F.b), - (C += j = F.a), - (E -= R), - (I -= D), - (S -= G), - (N -= j), - (F = F.next), - (b += a); - } - return t; - } - function f(t, e, n, r, a, i) { - if (!(isNaN(i) || i < 1)) { - i |= 0; - var f = o(t, e, n, r, a); - (f = g(f, e, n, r, a, i)), t.getContext("2d").putImageData(f, e, n); - } - } - function g(t, e, o, a, i, f) { - var g, - c, - l, - s, - x, - b, - d, - y, - p, - m, - h, - v, - w, - B, - C, - E, - I, - S, - N, - R, - D, - G = t.data, - j = 2 * f + 1, - A = a - 1, - k = i - 1, - T = f + 1, - W = (T * (T + 1)) / 2, - _ = new u(), - H = _; - for (l = 1; l < j; l++) (H = H.next = new u()), l === T && (D = H); - H.next = _; - var M = null, - O = null; - d = b = 0; - var P = n[f], - q = r[f]; - for (c = 0; c < i; c++) { - for ( - B = C = E = y = p = m = 0, - h = T * (I = G[b]), - v = T * (S = G[b + 1]), - w = T * (N = G[b + 2]), - y += W * I, - p += W * S, - m += W * N, - H = _, - l = 0; - l < T; - l++ - ) - (H.r = I), (H.g = S), (H.b = N), (H = H.next); - for (l = 1; l < T; l++) - (s = b + ((A < l ? A : l) << 2)), - (y += (H.r = I = G[s]) * (R = T - l)), - (p += (H.g = S = G[s + 1]) * R), - (m += (H.b = N = G[s + 2]) * R), - (B += I), - (C += S), - (E += N), - (H = H.next); - for (M = _, O = D, g = 0; g < a; g++) - (G[b] = (y * P) >> q), - (G[b + 1] = (p * P) >> q), - (G[b + 2] = (m * P) >> q), - (y -= h), - (p -= v), - (m -= w), - (h -= M.r), - (v -= M.g), - (w -= M.b), - (s = (d + ((s = g + f + 1) < A ? s : A)) << 2), - (y += B += M.r = G[s]), - (p += C += M.g = G[s + 1]), - (m += E += M.b = G[s + 2]), - (M = M.next), - (h += I = O.r), - (v += S = O.g), - (w += N = O.b), - (B -= I), - (C -= S), - (E -= N), - (O = O.next), - (b += 4); - d += a; - } - for (g = 0; g < a; g++) { - for ( - C = E = B = p = m = y = 0, - h = T * (I = G[(b = g << 2)]), - v = T * (S = G[b + 1]), - w = T * (N = G[b + 2]), - y += W * I, - p += W * S, - m += W * N, - H = _, - l = 0; - l < T; - l++ - ) - (H.r = I), (H.g = S), (H.b = N), (H = H.next); - for (x = a, l = 1; l <= f; l++) - (b = (x + g) << 2), - (y += (H.r = I = G[b]) * (R = T - l)), - (p += (H.g = S = G[b + 1]) * R), - (m += (H.b = N = G[b + 2]) * R), - (B += I), - (C += S), - (E += N), - (H = H.next), - l < k && (x += a); - for (b = g, M = _, O = D, c = 0; c < i; c++) - (G[(s = b << 2)] = (y * P) >> q), - (G[s + 1] = (p * P) >> q), - (G[s + 2] = (m * P) >> q), - (y -= h), - (p -= v), - (m -= w), - (h -= M.r), - (v -= M.g), - (w -= M.b), - (s = (g + ((s = c + T) < k ? s : k) * a) << 2), - (y += B += M.r = G[s]), - (p += C += M.g = G[s + 1]), - (m += E += M.b = G[s + 2]), - (M = M.next), - (h += I = O.r), - (v += S = O.g), - (w += N = O.b), - (B -= I), - (C -= S), - (E -= N), - (O = O.next), - (b += a); - } - return t; - } - var u = function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); - })(this, t), - (this.r = 0), - (this.g = 0), - (this.b = 0), - (this.a = 0), - (this.next = null); - }; - (t.BlurStack = u), - (t.image = function (t, e, n, r) { - if (("string" == typeof t && (t = document.getElementById(t)), t && "naturalWidth" in t)) { - var o = t.naturalWidth, - i = t.naturalHeight; - if (("string" == typeof e && (e = document.getElementById(e)), e && "getContext" in e)) { - (e.style.width = o + "px"), (e.style.height = i + "px"), (e.width = o), (e.height = i); - var g = e.getContext("2d"); - g.clearRect(0, 0, o, i), g.drawImage(t, 0, 0), isNaN(n) || n < 1 || (r ? a(e, 0, 0, o, i, n) : f(e, 0, 0, o, i, n)); - } - } - }), - (t.canvasRGBA = a), - (t.canvasRGB = f), - (t.imageDataRGBA = i), - (t.imageDataRGB = g), - Object.defineProperty(t, "__esModule", { value: !0 }); -}); -//# sourceMappingURL=stackblur.min.js.map - -"use strict"; - -function gup(b) { - b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); - - var a = "[\\?&]" + b + "=([^&#]*)"; - var d = new RegExp(a); - var c = d.exec(window.location.href); - - if (c === null) return "";else return c[1]; -} - -/** - * @description This module communicates with Lychee's API - */ - -var api = { - path: "php/index.php", - onError: null -}; - -api.get_url = function (fn) { - var api_url = ""; - - if (lychee.api_V2) { - // because the api is defined directly by the function called in the route.php - api_url = "api/" + fn; - } else { - api_url = api.path; - } - - return api_url; -}; - -api.isTimeout = function (errorThrown, jqXHR) { - if (errorThrown && errorThrown === "Bad Request" && jqXHR && jqXHR.responseJSON && jqXHR.responseJSON.error && jqXHR.responseJSON.error === "Session timed out") { - return true; - } - - return false; -}; - -api.post = function (fn, params, callback) { - var responseProgressCB = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - - loadingBar.show(); - - params = $.extend({ function: fn }, params); - - var api_url = api.get_url(fn); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", params, errorThrown); - }; - - var ajaxParams = { - type: "POST", - url: api_url, - data: params, - dataType: "json", - success: success, - error: error - }; - - if (responseProgressCB !== null) { - ajaxParams.xhrFields = { - onprogress: responseProgressCB - }; - } - - $.ajax(ajaxParams); -}; - -api.get = function (url, callback) { - loadingBar.show(); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", {}, errorThrown); - }; - - $.ajax({ - type: "GET", - url: url, - data: {}, - dataType: "text", - success: success, - error: error - }); -}; - -api.post_raw = function (fn, params, callback) { - loadingBar.show(); - - params = $.extend({ function: fn }, params); - - var api_url = api.get_url(fn); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", params, errorThrown); - }; - - $.ajax({ - type: "POST", - url: api_url, - data: params, - dataType: "text", - success: success, - error: error - }); -}; - -var csrf = {}; - -csrf.addLaravelCSRF = function (event, jqxhr, settings) { - if (settings.url !== lychee.updatePath) { - jqxhr.setRequestHeader("X-XSRF-TOKEN", csrf.getCookie("XSRF-TOKEN")); - } -}; - -csrf.escape = function (s) { - return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, "\\$1"); -}; - -csrf.getCookie = function (name) { - // we stop the selection at = (default json) but also at % to prevent any %3D at the end of the string - var match = document.cookie.match(RegExp("(?:^|;\\s*)" + csrf.escape(name) + "=([^;^%]*)")); - return match ? match[1] : null; -}; - -csrf.bind = function () { - $(document).on("ajaxSend", csrf.addLaravelCSRF); -}; - -// Sub-implementation of lychee -------------------------------------------------------------- // - -var lychee = { - api_V2: true -}; - -lychee.content = $(".content"); - -lychee.escapeHTML = function () { - var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - // Ensure that html is a string - html += ""; - - // Escape all critical characters - html = html.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/`/g, "`"); - - return html; -}; - -lychee.html = function (literalSections) { - // Use raw literal sections: we don’t want - // backslashes (\n etc.) to be interpreted - var raw = literalSections.raw; - var result = ""; - - for (var _len = arguments.length, substs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - substs[_key - 1] = arguments[_key]; - } - - substs.forEach(function (subst, i) { - // Retrieve the literal section preceding - // the current substitution - var lit = raw[i]; - - // If the substitution is preceded by a dollar sign, - // we escape special characters in it - if (lit.slice(-1) === "$") { - subst = lychee.escapeHTML(subst); - lit = lit.slice(0, -1); - } - - result += lit; - result += subst; - }); - - // Take care of last literal section - // (Never fails, because an empty template string - // produces one literal section, an empty string) - result += raw[raw.length - 1]; - - return result; -}; - -lychee.getEventName = function () { - var touchendSupport = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent || navigator.vendor || window.opera) && "ontouchend" in document.documentElement; - return touchendSupport === true ? "touchend" : "click"; -}; - -// Sub-implementation of lychee -------------------------------------------------------------- // - -var frame = { - refresh: 30000 -}; - -frame.start_blur = function () { - var img = document.getElementById("background"); - var canvas = document.getElementById("background_canvas"); - StackBlur.image(img, canvas, 20); - canvas.style.width = "100%"; - canvas.style.height = "100%"; -}; - -frame.next = function () { - $("body").removeClass("loaded"); - setTimeout(function () { - frame.refreshPicture(); - }, 1000); -}; - -frame.refreshPicture = function () { - api.post("Photo::getRandom", {}, function (data) { - if (!data.url && !data.medium) { - console.log("URL not found"); - } - if (!data.thumbUrl) console.log("Thumb not found"); - - $("#background").attr("src", data.thumbUrl); - - var srcset = ""; - var src = ""; - this.frame.photo = null; - if (data.medium !== "") { - src = data.medium; - - if (data.medium2x && data.medium2x !== "") { - srcset = data.medium + " " + parseInt(data.medium_dim, 10) + "w, " + data.medium2x + " " + parseInt(data.medium2x_dim, 10) + "w"; - // We use it in the resize callback. - this.frame.photo = data; - } - } else { - src = data.url; - } - - $("#picture").attr("srcset", srcset); - frame.resize(); - $("#picture").attr("src", src).css("display", "inline"); - - setTimeout(function () { - frame.next(); - }, frame.refresh); - }); -}; - -frame.set = function (data) { - // console.log(data.refresh); - frame.refresh = data.refresh ? parseInt(data.refresh, 10) + 1000 : 31000; // 30 sec + 1 sec of blackout - // console.log(frame.refresh); - frame.refreshPicture(); -}; - -frame.resize = function () { - if (this.photo) { - var ratio = this.photo.height > 0 ? this.photo.width / this.photo.height : 1; - var winWidth = $(window).width(); - var winHeight = $(window).height(); - - // Our math assumes that the image occupies the whole frame. That's - // not quite the case (the default css sets it to 95%) but it's close - // enough. - var width = winWidth / ratio > winHeight ? winHeight * ratio : winWidth; - - $("#picture").attr("sizes", width + "px"); - } -}; - -frame.error = function (errorThrown) { - var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - - loadingBar.show("error", errorThrown); - - console.error({ - description: errorThrown, - params: params, - response: data - }); - alert(errorThrown); -}; - -// Main -------------------------------------------------------------- // - -var loadingBar = { - show: function show() {}, - hide: function hide() {} -}; - -var imageview = $("#imageview"); - -$(function () { - // set CSRF protection (Laravel) - csrf.bind(); - - // Set API error handler - api.onError = frame.error; - - $(window).on("resize", function () { - frame.resize(); - }); - - $("#background").on("load", function () { - frame.start_blur(); - }); - - $("#picture").on("load", function () { - $("body").addClass("loaded"); - }); - - api.post("Frame::getSettings", {}, function (data) { - frame.set(data); - }); -}); \ No newline at end of file diff --git a/demo/dist/landing.css b/demo/dist/landing.css deleted file mode 100644 index 91c8c1fa..00000000 --- a/demo/dist/landing.css +++ /dev/null @@ -1,2982 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,700,900"); -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font: inherit; - font-size: 100%; - vertical-align: baseline; } - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { - display: block; } - -body { - line-height: 1; } - -ol, -ul { - list-style: none; } - -blockquote, -q { - quotes: none; } - -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ""; - content: none; } - -table { - border-collapse: collapse; - border-spacing: 0; } - -em, -i { - font-style: italic; } - -strong, -b { - font-weight: bold; } - -* { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-transition: color 0.3s, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - -o-transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; } - -html, -body { - font-family: "Roboto", sans-serif; - background: #000000; - overflow: hidden; } - -ol, -ul { - list-style: none; } - -a { - text-decoration: none; } - -@font-face { - font-family: "socials"; - src: url("fonts/socials.eot?egvu10"); - src: url("fonts/socials.eot?egvu10#iefix") format("embedded-opentype"), url("fonts/socials.ttf?egvu10") format("truetype"), url("fonts/socials.woff?egvu10") format("woff"), url("fonts/socials.svg?egvu10#socials") format("svg"); - font-weight: normal; - font-style: normal; } - -[class^="icon-"], -[class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: "socials" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - -.icon-facebook2:before { - content: "\ea91"; } - -.icon-instagram:before { - content: "\ea92"; } - -.icon-twitter:before { - content: "\ea96"; } - -.icon-youtube:before { - content: "\ea9d"; } - -.icon-flickr2:before { - content: "\eaa4"; } - -@font-face { - font-family: "icomoon"; - src: url("fonts/icomoon.eot?mqsjq9"); - src: url("fonts/icomoon.eot?mqsjq9#iefix") format("embedded-opentype"), url("fonts/icomoon.ttf?mqsjq9") format("truetype"), url("fonts/icomoon.woff?mqsjq9") format("woff"), url("fonts/icomoon.svg?mqsjq9#icomoon") format("svg"); - font-weight: normal; - font-style: normal; } - -[class^="icon-"], -[class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: "icomoon" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - -.icon-3d_rotation:before { - content: "\e84d"; } - -.icon-ac_unit:before { - content: "\eb3b"; } - -.icon-alarm:before { - content: "\e855"; } - -.icon-access_alarms:before { - content: "\e191"; } - -.icon-schedule:before { - content: "\e8b5"; } - -.icon-accessibility:before { - content: "\e84e"; } - -.icon-accessible:before { - content: "\e914"; } - -.icon-account_balance:before { - content: "\e84f"; } - -.icon-account_balance_wallet:before { - content: "\e850"; } - -.icon-account_box:before { - content: "\e851"; } - -.icon-account_circle:before { - content: "\e853"; } - -.icon-adb:before { - content: "\e60e"; } - -.icon-add:before { - content: "\e145"; } - -.icon-add_a_photo:before { - content: "\e439"; } - -.icon-alarm_add:before { - content: "\e856"; } - -.icon-add_alert:before { - content: "\e003"; } - -.icon-add_box:before { - content: "\e146"; } - -.icon-add_circle:before { - content: "\e147"; } - -.icon-control_point:before { - content: "\e3ba"; } - -.icon-add_location:before { - content: "\e567"; } - -.icon-add_shopping_cart:before { - content: "\e854"; } - -.icon-queue:before { - content: "\e03c"; } - -.icon-add_to_queue:before { - content: "\e05c"; } - -.icon-adjust:before { - content: "\e39e"; } - -.icon-airline_seat_flat:before { - content: "\e630"; } - -.icon-airline_seat_flat_angled:before { - content: "\e631"; } - -.icon-airline_seat_individual_suite:before { - content: "\e632"; } - -.icon-airline_seat_legroom_extra:before { - content: "\e633"; } - -.icon-airline_seat_legroom_normal:before { - content: "\e634"; } - -.icon-airline_seat_legroom_reduced:before { - content: "\e635"; } - -.icon-airline_seat_recline_extra:before { - content: "\e636"; } - -.icon-airline_seat_recline_normal:before { - content: "\e637"; } - -.icon-flight:before { - content: "\e539"; } - -.icon-airplanemode_inactive:before { - content: "\e194"; } - -.icon-airplay:before { - content: "\e055"; } - -.icon-airport_shuttle:before { - content: "\eb3c"; } - -.icon-alarm_off:before { - content: "\e857"; } - -.icon-alarm_on:before { - content: "\e858"; } - -.icon-album:before { - content: "\e019"; } - -.icon-all_inclusive:before { - content: "\eb3d"; } - -.icon-all_out:before { - content: "\e90b"; } - -.icon-android:before { - content: "\e859"; } - -.icon-announcement:before { - content: "\e85a"; } - -.icon-apps:before { - content: "\e5c3"; } - -.icon-archive:before { - content: "\e149"; } - -.icon-arrow_back:before { - content: "\e5c4"; } - -.icon-arrow_downward:before { - content: "\e5db"; } - -.icon-arrow_drop_down:before { - content: "\e5c5"; } - -.icon-arrow_drop_down_circle:before { - content: "\e5c6"; } - -.icon-arrow_drop_up:before { - content: "\e5c7"; } - -.icon-arrow_forward:before { - content: "\e5c8"; } - -.icon-arrow_upward:before { - content: "\e5d8"; } - -.icon-art_track:before { - content: "\e060"; } - -.icon-aspect_ratio:before { - content: "\e85b"; } - -.icon-poll:before { - content: "\e801"; } - -.icon-assignment:before { - content: "\e85d"; } - -.icon-assignment_ind:before { - content: "\e85e"; } - -.icon-assignment_late:before { - content: "\e85f"; } - -.icon-assignment_return:before { - content: "\e860"; } - -.icon-assignment_returned:before { - content: "\e861"; } - -.icon-assignment_turned_in:before { - content: "\e862"; } - -.icon-assistant:before { - content: "\e39f"; } - -.icon-flag:before { - content: "\e153"; } - -.icon-attach_file:before { - content: "\e226"; } - -.icon-attach_money:before { - content: "\e227"; } - -.icon-attachment:before { - content: "\e2bc"; } - -.icon-audiotrack:before { - content: "\e3a1"; } - -.icon-autorenew:before { - content: "\e863"; } - -.icon-av_timer:before { - content: "\e01b"; } - -.icon-backspace:before { - content: "\e14a"; } - -.icon-cloud_upload:before { - content: "\e2c3"; } - -.icon-battery_alert:before { - content: "\e19c"; } - -.icon-battery_charging_full:before { - content: "\e1a3"; } - -.icon-battery_std:before { - content: "\e1a5"; } - -.icon-battery_unknown:before { - content: "\e1a6"; } - -.icon-beach_access:before { - content: "\eb3e"; } - -.icon-beenhere:before { - content: "\e52d"; } - -.icon-block:before { - content: "\e14b"; } - -.icon-bluetooth:before { - content: "\e1a7"; } - -.icon-bluetooth_searching:before { - content: "\e1aa"; } - -.icon-bluetooth_connected:before { - content: "\e1a8"; } - -.icon-bluetooth_disabled:before { - content: "\e1a9"; } - -.icon-blur_circular:before { - content: "\e3a2"; } - -.icon-blur_linear:before { - content: "\e3a3"; } - -.icon-blur_off:before { - content: "\e3a4"; } - -.icon-blur_on:before { - content: "\e3a5"; } - -.icon-class:before { - content: "\e86e"; } - -.icon-turned_in:before { - content: "\e8e6"; } - -.icon-turned_in_not:before { - content: "\e8e7"; } - -.icon-border_all:before { - content: "\e228"; } - -.icon-border_bottom:before { - content: "\e229"; } - -.icon-border_clear:before { - content: "\e22a"; } - -.icon-border_color:before { - content: "\e22b"; } - -.icon-border_horizontal:before { - content: "\e22c"; } - -.icon-border_inner:before { - content: "\e22d"; } - -.icon-border_left:before { - content: "\e22e"; } - -.icon-border_outer:before { - content: "\e22f"; } - -.icon-border_right:before { - content: "\e230"; } - -.icon-border_style:before { - content: "\e231"; } - -.icon-border_top:before { - content: "\e232"; } - -.icon-border_vertical:before { - content: "\e233"; } - -.icon-branding_watermark:before { - content: "\e06b"; } - -.icon-brightness_1:before { - content: "\e3a6"; } - -.icon-brightness_2:before { - content: "\e3a7"; } - -.icon-brightness_3:before { - content: "\e3a8"; } - -.icon-brightness_4:before { - content: "\e3a9"; } - -.icon-brightness_low:before { - content: "\e1ad"; } - -.icon-brightness_medium:before { - content: "\e1ae"; } - -.icon-brightness_high:before { - content: "\e1ac"; } - -.icon-brightness_auto:before { - content: "\e1ab"; } - -.icon-broken_image:before { - content: "\e3ad"; } - -.icon-brush:before { - content: "\e3ae"; } - -.icon-bubble_chart:before { - content: "\e6dd"; } - -.icon-bug_report:before { - content: "\e868"; } - -.icon-build:before { - content: "\e869"; } - -.icon-burst_mode:before { - content: "\e43c"; } - -.icon-domain:before { - content: "\e7ee"; } - -.icon-business_center:before { - content: "\eb3f"; } - -.icon-cached:before { - content: "\e86a"; } - -.icon-cake:before { - content: "\e7e9"; } - -.icon-phone:before { - content: "\e0cd"; } - -.icon-call_end:before { - content: "\e0b1"; } - -.icon-call_made:before { - content: "\e0b2"; } - -.icon-merge_type:before { - content: "\e252"; } - -.icon-call_missed:before { - content: "\e0b4"; } - -.icon-call_missed_outgoing:before { - content: "\e0e4"; } - -.icon-call_received:before { - content: "\e0b5"; } - -.icon-call_split:before { - content: "\e0b6"; } - -.icon-call_to_action:before { - content: "\e06c"; } - -.icon-camera:before { - content: "\e3af"; } - -.icon-photo_camera:before { - content: "\e412"; } - -.icon-camera_enhance:before { - content: "\e8fc"; } - -.icon-camera_front:before { - content: "\e3b1"; } - -.icon-camera_rear:before { - content: "\e3b2"; } - -.icon-camera_roll:before { - content: "\e3b3"; } - -.icon-cancel:before { - content: "\e5c9"; } - -.icon-redeem:before { - content: "\e8b1"; } - -.icon-card_membership:before { - content: "\e8f7"; } - -.icon-card_travel:before { - content: "\e8f8"; } - -.icon-casino:before { - content: "\eb40"; } - -.icon-cast:before { - content: "\e307"; } - -.icon-cast_connected:before { - content: "\e308"; } - -.icon-center_focus_strong:before { - content: "\e3b4"; } - -.icon-center_focus_weak:before { - content: "\e3b5"; } - -.icon-change_history:before { - content: "\e86b"; } - -.icon-chat:before { - content: "\e0b7"; } - -.icon-chat_bubble:before { - content: "\e0ca"; } - -.icon-chat_bubble_outline:before { - content: "\e0cb"; } - -.icon-check:before { - content: "\e5ca"; } - -.icon-check_box:before { - content: "\e834"; } - -.icon-check_box_outline_blank:before { - content: "\e835"; } - -.icon-check_circle:before { - content: "\e86c"; } - -.icon-navigate_before:before { - content: "\e408"; } - -.icon-navigate_next:before { - content: "\e409"; } - -.icon-child_care:before { - content: "\eb41"; } - -.icon-child_friendly:before { - content: "\eb42"; } - -.icon-chrome_reader_mode:before { - content: "\e86d"; } - -.icon-close:before { - content: "\e5cd"; } - -.icon-clear_all:before { - content: "\e0b8"; } - -.icon-closed_caption:before { - content: "\e01c"; } - -.icon-wb_cloudy:before { - content: "\e42d"; } - -.icon-cloud_circle:before { - content: "\e2be"; } - -.icon-cloud_done:before { - content: "\e2bf"; } - -.icon-cloud_download:before { - content: "\e2c0"; } - -.icon-cloud_off:before { - content: "\e2c1"; } - -.icon-cloud_queue:before { - content: "\e2c2"; } - -.icon-code:before { - content: "\e86f"; } - -.icon-photo_library:before { - content: "\e413"; } - -.icon-collections_bookmark:before { - content: "\e431"; } - -.icon-palette:before { - content: "\e40a"; } - -.icon-colorize:before { - content: "\e3b8"; } - -.icon-comment:before { - content: "\e0b9"; } - -.icon-compare:before { - content: "\e3b9"; } - -.icon-compare_arrows:before { - content: "\e915"; } - -.icon-laptop:before { - content: "\e31e"; } - -.icon-confirmation_number:before { - content: "\e638"; } - -.icon-contact_mail:before { - content: "\e0d0"; } - -.icon-contact_phone:before { - content: "\e0cf"; } - -.icon-contacts:before { - content: "\e0ba"; } - -.icon-content_copy:before { - content: "\e14d"; } - -.icon-content_cut:before { - content: "\e14e"; } - -.icon-content_paste:before { - content: "\e14f"; } - -.icon-control_point_duplicate:before { - content: "\e3bb"; } - -.icon-copyright:before { - content: "\e90c"; } - -.icon-mode_edit:before { - content: "\e254"; } - -.icon-create_new_folder:before { - content: "\e2cc"; } - -.icon-payment:before { - content: "\e8a1"; } - -.icon-crop:before { - content: "\e3be"; } - -.icon-crop_16_9:before { - content: "\e3bc"; } - -.icon-crop_3_2:before { - content: "\e3bd"; } - -.icon-crop_landscape:before { - content: "\e3c3"; } - -.icon-crop_7_5:before { - content: "\e3c0"; } - -.icon-crop_din:before { - content: "\e3c1"; } - -.icon-crop_free:before { - content: "\e3c2"; } - -.icon-crop_original:before { - content: "\e3c4"; } - -.icon-crop_portrait:before { - content: "\e3c5"; } - -.icon-crop_rotate:before { - content: "\e437"; } - -.icon-crop_square:before { - content: "\e3c6"; } - -.icon-dashboard:before { - content: "\e871"; } - -.icon-data_usage:before { - content: "\e1af"; } - -.icon-date_range:before { - content: "\e916"; } - -.icon-dehaze:before { - content: "\e3c7"; } - -.icon-delete:before { - content: "\e872"; } - -.icon-delete_forever:before { - content: "\e92b"; } - -.icon-delete_sweep:before { - content: "\e16c"; } - -.icon-description:before { - content: "\e873"; } - -.icon-desktop_mac:before { - content: "\e30b"; } - -.icon-desktop_windows:before { - content: "\e30c"; } - -.icon-details:before { - content: "\e3c8"; } - -.icon-developer_board:before { - content: "\e30d"; } - -.icon-developer_mode:before { - content: "\e1b0"; } - -.icon-device_hub:before { - content: "\e335"; } - -.icon-phonelink:before { - content: "\e326"; } - -.icon-devices_other:before { - content: "\e337"; } - -.icon-dialer_sip:before { - content: "\e0bb"; } - -.icon-dialpad:before { - content: "\e0bc"; } - -.icon-directions:before { - content: "\e52e"; } - -.icon-directions_bike:before { - content: "\e52f"; } - -.icon-directions_boat:before { - content: "\e532"; } - -.icon-directions_bus:before { - content: "\e530"; } - -.icon-directions_car:before { - content: "\e531"; } - -.icon-directions_railway:before { - content: "\e534"; } - -.icon-directions_run:before { - content: "\e566"; } - -.icon-directions_transit:before { - content: "\e535"; } - -.icon-directions_walk:before { - content: "\e536"; } - -.icon-disc_full:before { - content: "\e610"; } - -.icon-dns:before { - content: "\e875"; } - -.icon-not_interested:before { - content: "\e033"; } - -.icon-do_not_disturb_alt:before { - content: "\e611"; } - -.icon-do_not_disturb_off:before { - content: "\e643"; } - -.icon-remove_circle:before { - content: "\e15c"; } - -.icon-dock:before { - content: "\e30e"; } - -.icon-done:before { - content: "\e876"; } - -.icon-done_all:before { - content: "\e877"; } - -.icon-donut_large:before { - content: "\e917"; } - -.icon-donut_small:before { - content: "\e918"; } - -.icon-drafts:before { - content: "\e151"; } - -.icon-drag_handle:before { - content: "\e25d"; } - -.icon-time_to_leave:before { - content: "\e62c"; } - -.icon-dvr:before { - content: "\e1b2"; } - -.icon-edit_location:before { - content: "\e568"; } - -.icon-eject:before { - content: "\e8fb"; } - -.icon-markunread:before { - content: "\e159"; } - -.icon-enhanced_encryption:before { - content: "\e63f"; } - -.icon-equalizer:before { - content: "\e01d"; } - -.icon-error:before { - content: "\e000"; } - -.icon-error_outline:before { - content: "\e001"; } - -.icon-euro_symbol:before { - content: "\e926"; } - -.icon-ev_station:before { - content: "\e56d"; } - -.icon-insert_invitation:before { - content: "\e24f"; } - -.icon-event_available:before { - content: "\e614"; } - -.icon-event_busy:before { - content: "\e615"; } - -.icon-event_note:before { - content: "\e616"; } - -.icon-event_seat:before { - content: "\e903"; } - -.icon-exit_to_app:before { - content: "\e879"; } - -.icon-expand_less:before { - content: "\e5ce"; } - -.icon-expand_more:before { - content: "\e5cf"; } - -.icon-explicit:before { - content: "\e01e"; } - -.icon-explore:before { - content: "\e87a"; } - -.icon-exposure:before { - content: "\e3ca"; } - -.icon-exposure_neg_1:before { - content: "\e3cb"; } - -.icon-exposure_neg_2:before { - content: "\e3cc"; } - -.icon-exposure_plus_1:before { - content: "\e3cd"; } - -.icon-exposure_plus_2:before { - content: "\e3ce"; } - -.icon-exposure_zero:before { - content: "\e3cf"; } - -.icon-extension:before { - content: "\e87b"; } - -.icon-face:before { - content: "\e87c"; } - -.icon-fast_forward:before { - content: "\e01f"; } - -.icon-fast_rewind:before { - content: "\e020"; } - -.icon-favorite:before { - content: "\e87d"; } - -.icon-favorite_border:before { - content: "\e87e"; } - -.icon-featured_play_list:before { - content: "\e06d"; } - -.icon-featured_video:before { - content: "\e06e"; } - -.icon-sms_failed:before { - content: "\e626"; } - -.icon-fiber_dvr:before { - content: "\e05d"; } - -.icon-fiber_manual_record:before { - content: "\e061"; } - -.icon-fiber_new:before { - content: "\e05e"; } - -.icon-fiber_pin:before { - content: "\e06a"; } - -.icon-fiber_smart_record:before { - content: "\e062"; } - -.icon-get_app:before { - content: "\e884"; } - -.icon-file_upload:before { - content: "\e2c6"; } - -.icon-filter:before { - content: "\e3d3"; } - -.icon-filter_1:before { - content: "\e3d0"; } - -.icon-filter_2:before { - content: "\e3d1"; } - -.icon-filter_3:before { - content: "\e3d2"; } - -.icon-filter_4:before { - content: "\e3d4"; } - -.icon-filter_5:before { - content: "\e3d5"; } - -.icon-filter_6:before { - content: "\e3d6"; } - -.icon-filter_7:before { - content: "\e3d7"; } - -.icon-filter_8:before { - content: "\e3d8"; } - -.icon-filter_9:before { - content: "\e3d9"; } - -.icon-filter_9_plus:before { - content: "\e3da"; } - -.icon-filter_b_and_w:before { - content: "\e3db"; } - -.icon-filter_center_focus:before { - content: "\e3dc"; } - -.icon-filter_drama:before { - content: "\e3dd"; } - -.icon-filter_frames:before { - content: "\e3de"; } - -.icon-terrain:before { - content: "\e564"; } - -.icon-filter_list:before { - content: "\e152"; } - -.icon-filter_none:before { - content: "\e3e0"; } - -.icon-filter_tilt_shift:before { - content: "\e3e2"; } - -.icon-filter_vintage:before { - content: "\e3e3"; } - -.icon-find_in_page:before { - content: "\e880"; } - -.icon-find_replace:before { - content: "\e881"; } - -.icon-fingerprint:before { - content: "\e90d"; } - -.icon-first_page:before { - content: "\e5dc"; } - -.icon-fitness_center:before { - content: "\eb43"; } - -.icon-flare:before { - content: "\e3e4"; } - -.icon-flash_auto:before { - content: "\e3e5"; } - -.icon-flash_off:before { - content: "\e3e6"; } - -.icon-flash_on:before { - content: "\e3e7"; } - -.icon-flight_land:before { - content: "\e904"; } - -.icon-flight_takeoff:before { - content: "\e905"; } - -.icon-flip:before { - content: "\e3e8"; } - -.icon-flip_to_back:before { - content: "\e882"; } - -.icon-flip_to_front:before { - content: "\e883"; } - -.icon-folder:before { - content: "\e2c7"; } - -.icon-folder_open:before { - content: "\e2c8"; } - -.icon-folder_shared:before { - content: "\e2c9"; } - -.icon-folder_special:before { - content: "\e617"; } - -.icon-font_download:before { - content: "\e167"; } - -.icon-format_align_center:before { - content: "\e234"; } - -.icon-format_align_justify:before { - content: "\e235"; } - -.icon-format_align_left:before { - content: "\e236"; } - -.icon-format_align_right:before { - content: "\e237"; } - -.icon-format_bold:before { - content: "\e238"; } - -.icon-format_clear:before { - content: "\e239"; } - -.icon-format_color_fill:before { - content: "\e23a"; } - -.icon-format_color_reset:before { - content: "\e23b"; } - -.icon-format_color_text:before { - content: "\e23c"; } - -.icon-format_indent_decrease:before { - content: "\e23d"; } - -.icon-format_indent_increase:before { - content: "\e23e"; } - -.icon-format_italic:before { - content: "\e23f"; } - -.icon-format_line_spacing:before { - content: "\e240"; } - -.icon-format_list_bulleted:before { - content: "\e241"; } - -.icon-format_list_numbered:before { - content: "\e242"; } - -.icon-format_paint:before { - content: "\e243"; } - -.icon-format_quote:before { - content: "\e244"; } - -.icon-format_shapes:before { - content: "\e25e"; } - -.icon-format_size:before { - content: "\e245"; } - -.icon-format_strikethrough:before { - content: "\e246"; } - -.icon-format_textdirection_l_to_r:before { - content: "\e247"; } - -.icon-format_textdirection_r_to_l:before { - content: "\e248"; } - -.icon-format_underlined:before { - content: "\e249"; } - -.icon-question_answer:before { - content: "\e8af"; } - -.icon-forward:before { - content: "\e154"; } - -.icon-forward_10:before { - content: "\e056"; } - -.icon-forward_30:before { - content: "\e057"; } - -.icon-forward_5:before { - content: "\e058"; } - -.icon-free_breakfast:before { - content: "\eb44"; } - -.icon-fullscreen:before { - content: "\e5d0"; } - -.icon-fullscreen_exit:before { - content: "\e5d1"; } - -.icon-functions:before { - content: "\e24a"; } - -.icon-g_translate:before { - content: "\e927"; } - -.icon-games:before { - content: "\e021"; } - -.icon-gavel:before { - content: "\e90e"; } - -.icon-gesture:before { - content: "\e155"; } - -.icon-gif:before { - content: "\e908"; } - -.icon-goat:before { - content: "\e900"; } - -.icon-golf_course:before { - content: "\eb45"; } - -.icon-my_location:before { - content: "\e55c"; } - -.icon-location_searching:before { - content: "\e1b7"; } - -.icon-location_disabled:before { - content: "\e1b6"; } - -.icon-star:before { - content: "\e838"; } - -.icon-gradient:before { - content: "\e3e9"; } - -.icon-grain:before { - content: "\e3ea"; } - -.icon-graphic_eq:before { - content: "\e1b8"; } - -.icon-grid_off:before { - content: "\e3eb"; } - -.icon-grid_on:before { - content: "\e3ec"; } - -.icon-people:before { - content: "\e7fb"; } - -.icon-group_add:before { - content: "\e7f0"; } - -.icon-group_work:before { - content: "\e886"; } - -.icon-hd:before { - content: "\e052"; } - -.icon-hdr_off:before { - content: "\e3ed"; } - -.icon-hdr_on:before { - content: "\e3ee"; } - -.icon-hdr_strong:before { - content: "\e3f1"; } - -.icon-hdr_weak:before { - content: "\e3f2"; } - -.icon-headset:before { - content: "\e310"; } - -.icon-headset_mic:before { - content: "\e311"; } - -.icon-healing:before { - content: "\e3f3"; } - -.icon-hearing:before { - content: "\e023"; } - -.icon-help:before { - content: "\e887"; } - -.icon-help_outline:before { - content: "\e8fd"; } - -.icon-high_quality:before { - content: "\e024"; } - -.icon-highlight:before { - content: "\e25f"; } - -.icon-highlight_off:before { - content: "\e888"; } - -.icon-restore:before { - content: "\e8b3"; } - -.icon-home:before { - content: "\e88a"; } - -.icon-hot_tub:before { - content: "\eb46"; } - -.icon-local_hotel:before { - content: "\e549"; } - -.icon-hourglass_empty:before { - content: "\e88b"; } - -.icon-hourglass_full:before { - content: "\e88c"; } - -.icon-http:before { - content: "\e902"; } - -.icon-lock:before { - content: "\e897"; } - -.icon-photo:before { - content: "\e410"; } - -.icon-image_aspect_ratio:before { - content: "\e3f5"; } - -.icon-import_contacts:before { - content: "\e0e0"; } - -.icon-import_export:before { - content: "\e0c3"; } - -.icon-important_devices:before { - content: "\e912"; } - -.icon-inbox:before { - content: "\e156"; } - -.icon-indeterminate_check_box:before { - content: "\e909"; } - -.icon-info:before { - content: "\e88e"; } - -.icon-info_outline:before { - content: "\e88f"; } - -.icon-input:before { - content: "\e890"; } - -.icon-insert_comment:before { - content: "\e24c"; } - -.icon-insert_drive_file:before { - content: "\e24d"; } - -.icon-tag_faces:before { - content: "\e420"; } - -.icon-link:before { - content: "\e157"; } - -.icon-invert_colors:before { - content: "\e891"; } - -.icon-invert_colors_off:before { - content: "\e0c4"; } - -.icon-iso:before { - content: "\e3f6"; } - -.icon-keyboard:before { - content: "\e312"; } - -.icon-keyboard_arrow_down:before { - content: "\e313"; } - -.icon-keyboard_arrow_left:before { - content: "\e314"; } - -.icon-keyboard_arrow_right:before { - content: "\e315"; } - -.icon-keyboard_arrow_up:before { - content: "\e316"; } - -.icon-keyboard_backspace:before { - content: "\e317"; } - -.icon-keyboard_capslock:before { - content: "\e318"; } - -.icon-keyboard_hide:before { - content: "\e31a"; } - -.icon-keyboard_return:before { - content: "\e31b"; } - -.icon-keyboard_tab:before { - content: "\e31c"; } - -.icon-keyboard_voice:before { - content: "\e31d"; } - -.icon-kitchen:before { - content: "\eb47"; } - -.icon-label:before { - content: "\e892"; } - -.icon-label_outline:before { - content: "\e893"; } - -.icon-language:before { - content: "\e894"; } - -.icon-laptop_chromebook:before { - content: "\e31f"; } - -.icon-laptop_mac:before { - content: "\e320"; } - -.icon-laptop_windows:before { - content: "\e321"; } - -.icon-last_page:before { - content: "\e5dd"; } - -.icon-open_in_new:before { - content: "\e89e"; } - -.icon-layers:before { - content: "\e53b"; } - -.icon-layers_clear:before { - content: "\e53c"; } - -.icon-leak_add:before { - content: "\e3f8"; } - -.icon-leak_remove:before { - content: "\e3f9"; } - -.icon-lens:before { - content: "\e3fa"; } - -.icon-library_books:before { - content: "\e02f"; } - -.icon-library_music:before { - content: "\e030"; } - -.icon-lightbulb_outline:before { - content: "\e90f"; } - -.icon-line_style:before { - content: "\e919"; } - -.icon-line_weight:before { - content: "\e91a"; } - -.icon-linear_scale:before { - content: "\e260"; } - -.icon-linked_camera:before { - content: "\e438"; } - -.icon-list:before { - content: "\e896"; } - -.icon-live_help:before { - content: "\e0c6"; } - -.icon-live_tv:before { - content: "\e639"; } - -.icon-local_play:before { - content: "\e553"; } - -.icon-local_airport:before { - content: "\e53d"; } - -.icon-local_atm:before { - content: "\e53e"; } - -.icon-local_bar:before { - content: "\e540"; } - -.icon-local_cafe:before { - content: "\e541"; } - -.icon-local_car_wash:before { - content: "\e542"; } - -.icon-local_convenience_store:before { - content: "\e543"; } - -.icon-restaurant_menu:before { - content: "\e561"; } - -.icon-local_drink:before { - content: "\e544"; } - -.icon-local_florist:before { - content: "\e545"; } - -.icon-local_gas_station:before { - content: "\e546"; } - -.icon-shopping_cart:before { - content: "\e8cc"; } - -.icon-local_hospital:before { - content: "\e548"; } - -.icon-local_laundry_service:before { - content: "\e54a"; } - -.icon-local_library:before { - content: "\e54b"; } - -.icon-local_mall:before { - content: "\e54c"; } - -.icon-theaters:before { - content: "\e8da"; } - -.icon-local_offer:before { - content: "\e54e"; } - -.icon-local_parking:before { - content: "\e54f"; } - -.icon-local_pharmacy:before { - content: "\e550"; } - -.icon-local_pizza:before { - content: "\e552"; } - -.icon-print:before { - content: "\e8ad"; } - -.icon-local_shipping:before { - content: "\e558"; } - -.icon-local_taxi:before { - content: "\e559"; } - -.icon-location_city:before { - content: "\e7f1"; } - -.icon-location_off:before { - content: "\e0c7"; } - -.icon-room:before { - content: "\e8b4"; } - -.icon-lock_open:before { - content: "\e898"; } - -.icon-lock_outline:before { - content: "\e899"; } - -.icon-looks:before { - content: "\e3fc"; } - -.icon-looks_3:before { - content: "\e3fb"; } - -.icon-looks_4:before { - content: "\e3fd"; } - -.icon-looks_5:before { - content: "\e3fe"; } - -.icon-looks_6:before { - content: "\e3ff"; } - -.icon-looks_one:before { - content: "\e400"; } - -.icon-looks_two:before { - content: "\e401"; } - -.icon-sync:before { - content: "\e627"; } - -.icon-loupe:before { - content: "\e402"; } - -.icon-low_priority:before { - content: "\e16d"; } - -.icon-loyalty:before { - content: "\e89a"; } - -.icon-mail_outline:before { - content: "\e0e1"; } - -.icon-map:before { - content: "\e55b"; } - -.icon-markunread_mailbox:before { - content: "\e89b"; } - -.icon-memory:before { - content: "\e322"; } - -.icon-menu:before { - content: "\e5d2"; } - -.icon-message:before { - content: "\e0c9"; } - -.icon-mic:before { - content: "\e029"; } - -.icon-mic_none:before { - content: "\e02a"; } - -.icon-mic_off:before { - content: "\e02b"; } - -.icon-mms:before { - content: "\e618"; } - -.icon-mode_comment:before { - content: "\e253"; } - -.icon-monetization_on:before { - content: "\e263"; } - -.icon-money_off:before { - content: "\e25c"; } - -.icon-monochrome_photos:before { - content: "\e403"; } - -.icon-mood_bad:before { - content: "\e7f3"; } - -.icon-more:before { - content: "\e619"; } - -.icon-more_horiz:before { - content: "\e5d3"; } - -.icon-more_vert:before { - content: "\e5d4"; } - -.icon-motorcycle:before { - content: "\e91b"; } - -.icon-mouse:before { - content: "\e323"; } - -.icon-move_to_inbox:before { - content: "\e168"; } - -.icon-movie_creation:before { - content: "\e404"; } - -.icon-movie_filter:before { - content: "\e43a"; } - -.icon-multiline_chart:before { - content: "\e6df"; } - -.icon-music_note:before { - content: "\e405"; } - -.icon-music_video:before { - content: "\e063"; } - -.icon-nature:before { - content: "\e406"; } - -.icon-nature_people:before { - content: "\e407"; } - -.icon-navigation:before { - content: "\e55d"; } - -.icon-near_me:before { - content: "\e569"; } - -.icon-network_cell:before { - content: "\e1b9"; } - -.icon-network_check:before { - content: "\e640"; } - -.icon-network_locked:before { - content: "\e61a"; } - -.icon-network_wifi:before { - content: "\e1ba"; } - -.icon-new_releases:before { - content: "\e031"; } - -.icon-next_week:before { - content: "\e16a"; } - -.icon-nfc:before { - content: "\e1bb"; } - -.icon-no_encryption:before { - content: "\e641"; } - -.icon-signal_cellular_no_sim:before { - content: "\e1ce"; } - -.icon-note:before { - content: "\e06f"; } - -.icon-note_add:before { - content: "\e89c"; } - -.icon-notifications:before { - content: "\e7f4"; } - -.icon-notifications_active:before { - content: "\e7f7"; } - -.icon-notifications_none:before { - content: "\e7f5"; } - -.icon-notifications_off:before { - content: "\e7f6"; } - -.icon-notifications_paused:before { - content: "\e7f8"; } - -.icon-offline_pin:before { - content: "\e90a"; } - -.icon-ondemand_video:before { - content: "\e63a"; } - -.icon-opacity:before { - content: "\e91c"; } - -.icon-open_in_browser:before { - content: "\e89d"; } - -.icon-open_with:before { - content: "\e89f"; } - -.icon-pages:before { - content: "\e7f9"; } - -.icon-pageview:before { - content: "\e8a0"; } - -.icon-pan_tool:before { - content: "\e925"; } - -.icon-panorama:before { - content: "\e40b"; } - -.icon-radio_button_unchecked:before { - content: "\e836"; } - -.icon-panorama_horizontal:before { - content: "\e40d"; } - -.icon-panorama_vertical:before { - content: "\e40e"; } - -.icon-panorama_wide_angle:before { - content: "\e40f"; } - -.icon-party_mode:before { - content: "\e7fa"; } - -.icon-pause:before { - content: "\e034"; } - -.icon-pause_circle_filled:before { - content: "\e035"; } - -.icon-pause_circle_outline:before { - content: "\e036"; } - -.icon-people_outline:before { - content: "\e7fc"; } - -.icon-perm_camera_mic:before { - content: "\e8a2"; } - -.icon-perm_contact_calendar:before { - content: "\e8a3"; } - -.icon-perm_data_setting:before { - content: "\e8a4"; } - -.icon-perm_device_information:before { - content: "\e8a5"; } - -.icon-person_outline:before { - content: "\e7ff"; } - -.icon-perm_media:before { - content: "\e8a7"; } - -.icon-perm_phone_msg:before { - content: "\e8a8"; } - -.icon-perm_scan_wifi:before { - content: "\e8a9"; } - -.icon-person:before { - content: "\e7fd"; } - -.icon-person_add:before { - content: "\e7fe"; } - -.icon-person_pin:before { - content: "\e55a"; } - -.icon-person_pin_circle:before { - content: "\e56a"; } - -.icon-personal_video:before { - content: "\e63b"; } - -.icon-pets:before { - content: "\e91d"; } - -.icon-phone_android:before { - content: "\e324"; } - -.icon-phone_bluetooth_speaker:before { - content: "\e61b"; } - -.icon-phone_forwarded:before { - content: "\e61c"; } - -.icon-phone_in_talk:before { - content: "\e61d"; } - -.icon-phone_iphone:before { - content: "\e325"; } - -.icon-phone_locked:before { - content: "\e61e"; } - -.icon-phone_missed:before { - content: "\e61f"; } - -.icon-phone_paused:before { - content: "\e620"; } - -.icon-phonelink_erase:before { - content: "\e0db"; } - -.icon-phonelink_lock:before { - content: "\e0dc"; } - -.icon-phonelink_off:before { - content: "\e327"; } - -.icon-phonelink_ring:before { - content: "\e0dd"; } - -.icon-phonelink_setup:before { - content: "\e0de"; } - -.icon-photo_album:before { - content: "\e411"; } - -.icon-photo_filter:before { - content: "\e43b"; } - -.icon-photo_size_select_actual:before { - content: "\e432"; } - -.icon-photo_size_select_large:before { - content: "\e433"; } - -.icon-photo_size_select_small:before { - content: "\e434"; } - -.icon-picture_as_pdf:before { - content: "\e415"; } - -.icon-picture_in_picture:before { - content: "\e8aa"; } - -.icon-picture_in_picture_alt:before { - content: "\e911"; } - -.icon-pie_chart:before { - content: "\e6c4"; } - -.icon-pie_chart_outlined:before { - content: "\e6c5"; } - -.icon-pin_drop:before { - content: "\e55e"; } - -.icon-play_arrow:before { - content: "\e037"; } - -.icon-play_circle_filled:before { - content: "\e038"; } - -.icon-play_circle_outline:before { - content: "\e039"; } - -.icon-play_for_work:before { - content: "\e906"; } - -.icon-playlist_add:before { - content: "\e03b"; } - -.icon-playlist_add_check:before { - content: "\e065"; } - -.icon-playlist_play:before { - content: "\e05f"; } - -.icon-plus_one:before { - content: "\e800"; } - -.icon-polymer:before { - content: "\e8ab"; } - -.icon-pool:before { - content: "\eb48"; } - -.icon-portable_wifi_off:before { - content: "\e0ce"; } - -.icon-portrait:before { - content: "\e416"; } - -.icon-power:before { - content: "\e63c"; } - -.icon-power_input:before { - content: "\e336"; } - -.icon-power_settings_new:before { - content: "\e8ac"; } - -.icon-pregnant_woman:before { - content: "\e91e"; } - -.icon-present_to_all:before { - content: "\e0df"; } - -.icon-priority_high:before { - content: "\e645"; } - -.icon-public:before { - content: "\e80b"; } - -.icon-publish:before { - content: "\e255"; } - -.icon-queue_music:before { - content: "\e03d"; } - -.icon-queue_play_next:before { - content: "\e066"; } - -.icon-radio:before { - content: "\e03e"; } - -.icon-radio_button_checked:before { - content: "\e837"; } - -.icon-rate_review:before { - content: "\e560"; } - -.icon-receipt:before { - content: "\e8b0"; } - -.icon-recent_actors:before { - content: "\e03f"; } - -.icon-record_voice_over:before { - content: "\e91f"; } - -.icon-redo:before { - content: "\e15a"; } - -.icon-refresh:before { - content: "\e5d5"; } - -.icon-remove:before { - content: "\e15b"; } - -.icon-remove_circle_outline:before { - content: "\e15d"; } - -.icon-remove_from_queue:before { - content: "\e067"; } - -.icon-visibility:before { - content: "\e8f4"; } - -.icon-remove_shopping_cart:before { - content: "\e928"; } - -.icon-reorder:before { - content: "\e8fe"; } - -.icon-repeat:before { - content: "\e040"; } - -.icon-repeat_one:before { - content: "\e041"; } - -.icon-replay:before { - content: "\e042"; } - -.icon-replay_10:before { - content: "\e059"; } - -.icon-replay_30:before { - content: "\e05a"; } - -.icon-replay_5:before { - content: "\e05b"; } - -.icon-reply:before { - content: "\e15e"; } - -.icon-reply_all:before { - content: "\e15f"; } - -.icon-report:before { - content: "\e160"; } - -.icon-warning:before { - content: "\e002"; } - -.icon-restaurant:before { - content: "\e56c"; } - -.icon-restore_page:before { - content: "\e929"; } - -.icon-ring_volume:before { - content: "\e0d1"; } - -.icon-room_service:before { - content: "\eb49"; } - -.icon-rotate_90_degrees_ccw:before { - content: "\e418"; } - -.icon-rotate_left:before { - content: "\e419"; } - -.icon-rotate_right:before { - content: "\e41a"; } - -.icon-rounded_corner:before { - content: "\e920"; } - -.icon-router:before { - content: "\e328"; } - -.icon-rowing:before { - content: "\e921"; } - -.icon-rss_feed:before { - content: "\e0e5"; } - -.icon-rv_hookup:before { - content: "\e642"; } - -.icon-satellite:before { - content: "\e562"; } - -.icon-save:before { - content: "\e161"; } - -.icon-scanner:before { - content: "\e329"; } - -.icon-school:before { - content: "\e80c"; } - -.icon-screen_lock_landscape:before { - content: "\e1be"; } - -.icon-screen_lock_portrait:before { - content: "\e1bf"; } - -.icon-screen_lock_rotation:before { - content: "\e1c0"; } - -.icon-screen_rotation:before { - content: "\e1c1"; } - -.icon-screen_share:before { - content: "\e0e2"; } - -.icon-sd_storage:before { - content: "\e1c2"; } - -.icon-search:before { - content: "\e8b6"; } - -.icon-security:before { - content: "\e32a"; } - -.icon-select_all:before { - content: "\e162"; } - -.icon-send:before { - content: "\e163"; } - -.icon-sentiment_dissatisfied:before { - content: "\e811"; } - -.icon-sentiment_neutral:before { - content: "\e812"; } - -.icon-sentiment_satisfied:before { - content: "\e813"; } - -.icon-sentiment_very_dissatisfied:before { - content: "\e814"; } - -.icon-sentiment_very_satisfied:before { - content: "\e815"; } - -.icon-settings:before { - content: "\e8b8"; } - -.icon-settings_applications:before { - content: "\e8b9"; } - -.icon-settings_backup_restore:before { - content: "\e8ba"; } - -.icon-settings_bluetooth:before { - content: "\e8bb"; } - -.icon-settings_brightness:before { - content: "\e8bd"; } - -.icon-settings_cell:before { - content: "\e8bc"; } - -.icon-settings_ethernet:before { - content: "\e8be"; } - -.icon-settings_input_antenna:before { - content: "\e8bf"; } - -.icon-settings_input_composite:before { - content: "\e8c1"; } - -.icon-settings_input_hdmi:before { - content: "\e8c2"; } - -.icon-settings_input_svideo:before { - content: "\e8c3"; } - -.icon-settings_overscan:before { - content: "\e8c4"; } - -.icon-settings_phone:before { - content: "\e8c5"; } - -.icon-settings_power:before { - content: "\e8c6"; } - -.icon-settings_remote:before { - content: "\e8c7"; } - -.icon-settings_system_daydream:before { - content: "\e1c3"; } - -.icon-settings_voice:before { - content: "\e8c8"; } - -.icon-share:before { - content: "\e80d"; } - -.icon-shop:before { - content: "\e8c9"; } - -.icon-shop_two:before { - content: "\e8ca"; } - -.icon-shopping_basket:before { - content: "\e8cb"; } - -.icon-short_text:before { - content: "\e261"; } - -.icon-show_chart:before { - content: "\e6e1"; } - -.icon-shuffle:before { - content: "\e043"; } - -.icon-signal_cellular_4_bar:before { - content: "\e1c8"; } - -.icon-signal_cellular_connected_no_internet_4_bar:before { - content: "\e1cd"; } - -.icon-signal_cellular_null:before { - content: "\e1cf"; } - -.icon-signal_cellular_off:before { - content: "\e1d0"; } - -.icon-signal_wifi_4_bar:before { - content: "\e1d8"; } - -.icon-signal_wifi_4_bar_lock:before { - content: "\e1d9"; } - -.icon-signal_wifi_off:before { - content: "\e1da"; } - -.icon-sim_card:before { - content: "\e32b"; } - -.icon-sim_card_alert:before { - content: "\e624"; } - -.icon-skip_next:before { - content: "\e044"; } - -.icon-skip_previous:before { - content: "\e045"; } - -.icon-slideshow:before { - content: "\e41b"; } - -.icon-slow_motion_video:before { - content: "\e068"; } - -.icon-stay_primary_portrait:before { - content: "\e0d6"; } - -.icon-smoke_free:before { - content: "\eb4a"; } - -.icon-smoking_rooms:before { - content: "\eb4b"; } - -.icon-textsms:before { - content: "\e0d8"; } - -.icon-snooze:before { - content: "\e046"; } - -.icon-sort:before { - content: "\e164"; } - -.icon-sort_by_alpha:before { - content: "\e053"; } - -.icon-spa:before { - content: "\eb4c"; } - -.icon-space_bar:before { - content: "\e256"; } - -.icon-speaker:before { - content: "\e32d"; } - -.icon-speaker_group:before { - content: "\e32e"; } - -.icon-speaker_notes:before { - content: "\e8cd"; } - -.icon-speaker_notes_off:before { - content: "\e92a"; } - -.icon-speaker_phone:before { - content: "\e0d2"; } - -.icon-spellcheck:before { - content: "\e8ce"; } - -.icon-star_border:before { - content: "\e83a"; } - -.icon-star_half:before { - content: "\e839"; } - -.icon-stars:before { - content: "\e8d0"; } - -.icon-stay_primary_landscape:before { - content: "\e0d5"; } - -.icon-stop:before { - content: "\e047"; } - -.icon-stop_screen_share:before { - content: "\e0e3"; } - -.icon-storage:before { - content: "\e1db"; } - -.icon-store_mall_directory:before { - content: "\e563"; } - -.icon-straighten:before { - content: "\e41c"; } - -.icon-streetview:before { - content: "\e56e"; } - -.icon-strikethrough_s:before { - content: "\e257"; } - -.icon-style:before { - content: "\e41d"; } - -.icon-subdirectory_arrow_left:before { - content: "\e5d9"; } - -.icon-subdirectory_arrow_right:before { - content: "\e5da"; } - -.icon-subject:before { - content: "\e8d2"; } - -.icon-subscriptions:before { - content: "\e064"; } - -.icon-subtitles:before { - content: "\e048"; } - -.icon-subway:before { - content: "\e56f"; } - -.icon-supervisor_account:before { - content: "\e8d3"; } - -.icon-surround_sound:before { - content: "\e049"; } - -.icon-swap_calls:before { - content: "\e0d7"; } - -.icon-swap_horiz:before { - content: "\e8d4"; } - -.icon-swap_vert:before { - content: "\e8d5"; } - -.icon-swap_vertical_circle:before { - content: "\e8d6"; } - -.icon-switch_camera:before { - content: "\e41e"; } - -.icon-switch_video:before { - content: "\e41f"; } - -.icon-sync_disabled:before { - content: "\e628"; } - -.icon-sync_problem:before { - content: "\e629"; } - -.icon-system_update:before { - content: "\e62a"; } - -.icon-system_update_alt:before { - content: "\e8d7"; } - -.icon-tab:before { - content: "\e8d8"; } - -.icon-tab_unselected:before { - content: "\e8d9"; } - -.icon-tablet:before { - content: "\e32f"; } - -.icon-tablet_android:before { - content: "\e330"; } - -.icon-tablet_mac:before { - content: "\e331"; } - -.icon-tap_and_play:before { - content: "\e62b"; } - -.icon-text_fields:before { - content: "\e262"; } - -.icon-text_format:before { - content: "\e165"; } - -.icon-texture:before { - content: "\e421"; } - -.icon-thumb_down:before { - content: "\e8db"; } - -.icon-thumb_up:before { - content: "\e8dc"; } - -.icon-thumbs_up_down:before { - content: "\e8dd"; } - -.icon-timelapse:before { - content: "\e422"; } - -.icon-timeline:before { - content: "\e922"; } - -.icon-timer:before { - content: "\e425"; } - -.icon-timer_10:before { - content: "\e423"; } - -.icon-timer_3:before { - content: "\e424"; } - -.icon-timer_off:before { - content: "\e426"; } - -.icon-title:before { - content: "\e264"; } - -.icon-toc:before { - content: "\e8de"; } - -.icon-today:before { - content: "\e8df"; } - -.icon-toll:before { - content: "\e8e0"; } - -.icon-tonality:before { - content: "\e427"; } - -.icon-touch_app:before { - content: "\e913"; } - -.icon-toys:before { - content: "\e332"; } - -.icon-track_changes:before { - content: "\e8e1"; } - -.icon-traffic:before { - content: "\e565"; } - -.icon-train:before { - content: "\e570"; } - -.icon-tram:before { - content: "\e571"; } - -.icon-transfer_within_a_station:before { - content: "\e572"; } - -.icon-transform:before { - content: "\e428"; } - -.icon-translate:before { - content: "\e8e2"; } - -.icon-trending_down:before { - content: "\e8e3"; } - -.icon-trending_flat:before { - content: "\e8e4"; } - -.icon-trending_up:before { - content: "\e8e5"; } - -.icon-tune:before { - content: "\e429"; } - -.icon-tv:before { - content: "\e333"; } - -.icon-unarchive:before { - content: "\e169"; } - -.icon-undo:before { - content: "\e166"; } - -.icon-unfold_less:before { - content: "\e5d6"; } - -.icon-unfold_more:before { - content: "\e5d7"; } - -.icon-update:before { - content: "\e923"; } - -.icon-usb:before { - content: "\e1e0"; } - -.icon-verified_user:before { - content: "\e8e8"; } - -.icon-vertical_align_bottom:before { - content: "\e258"; } - -.icon-vertical_align_center:before { - content: "\e259"; } - -.icon-vertical_align_top:before { - content: "\e25a"; } - -.icon-vibration:before { - content: "\e62d"; } - -.icon-video_call:before { - content: "\e070"; } - -.icon-video_label:before { - content: "\e071"; } - -.icon-video_library:before { - content: "\e04a"; } - -.icon-videocam:before { - content: "\e04b"; } - -.icon-videocam_off:before { - content: "\e04c"; } - -.icon-videogame_asset:before { - content: "\e338"; } - -.icon-view_agenda:before { - content: "\e8e9"; } - -.icon-view_array:before { - content: "\e8ea"; } - -.icon-view_carousel:before { - content: "\e8eb"; } - -.icon-view_column:before { - content: "\e8ec"; } - -.icon-view_comfy:before { - content: "\e42a"; } - -.icon-view_compact:before { - content: "\e42b"; } - -.icon-view_day:before { - content: "\e8ed"; } - -.icon-view_headline:before { - content: "\e8ee"; } - -.icon-view_list:before { - content: "\e8ef"; } - -.icon-view_module:before { - content: "\e8f0"; } - -.icon-view_quilt:before { - content: "\e8f1"; } - -.icon-view_stream:before { - content: "\e8f2"; } - -.icon-view_week:before { - content: "\e8f3"; } - -.icon-vignette:before { - content: "\e435"; } - -.icon-visibility_off:before { - content: "\e8f5"; } - -.icon-voice_chat:before { - content: "\e62e"; } - -.icon-voicemail:before { - content: "\e0d9"; } - -.icon-volume_down:before { - content: "\e04d"; } - -.icon-volume_mute:before { - content: "\e04e"; } - -.icon-volume_off:before { - content: "\e04f"; } - -.icon-volume_up:before { - content: "\e050"; } - -.icon-vpn_key:before { - content: "\e0da"; } - -.icon-vpn_lock:before { - content: "\e62f"; } - -.icon-wallpaper:before { - content: "\e1bc"; } - -.icon-watch:before { - content: "\e334"; } - -.icon-watch_later:before { - content: "\e924"; } - -.icon-wb_auto:before { - content: "\e42c"; } - -.icon-wb_incandescent:before { - content: "\e42e"; } - -.icon-wb_iridescent:before { - content: "\e436"; } - -.icon-wb_sunny:before { - content: "\e430"; } - -.icon-wc:before { - content: "\e63d"; } - -.icon-web:before { - content: "\e051"; } - -.icon-web_asset:before { - content: "\e069"; } - -.icon-weekend:before { - content: "\e16b"; } - -.icon-whatshot:before { - content: "\e80e"; } - -.icon-widgets:before { - content: "\e1bd"; } - -.icon-wifi:before { - content: "\e63e"; } - -.icon-wifi_lock:before { - content: "\e1e1"; } - -.icon-wifi_tethering:before { - content: "\e1e2"; } - -.icon-work:before { - content: "\e8f9"; } - -.icon-wrap_text:before { - content: "\e25b"; } - -.icon-youtube_searched_for:before { - content: "\e8fa"; } - -.icon-zoom_in:before { - content: "\e8ff"; } - -.icon-zoom_out:before { - content: "\e901"; } - -.icon-zoom_out_map:before { - content: "\e56b"; } - -.pop-in.toggled, -.pop-out.toggled, -.pop-in-last.toggled { - opacity: 1; - -ms-transform: scale(1); - transform: scale(1); - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); } - -.pop-in, -.pop-in-last { - opacity: 0; - -ms-transform: scale(1.1); - transform: scale(1.1); - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); } - -.animate_slower { - transition: all 2s ease-in-out !important; - -webkit-transition: all 2s ease-in-out !important; - -moz-transition: all 2s ease-in-out !important; - -o-transition: all 2s ease-in-out !important; } - -.animate-up.toggled, -.animate-down.toggled { - opacity: 1; - -ms-transform: translateY(0px); - transform: translateY(0px); - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -o-transform: translateY(0px); } - -.animate-down { - opacity: 0; - -ms-transform: translateY(-300px); - transform: translateY(-300px); - -webkit-transform: translateY(-300px); - -moz-transform: translateY(-300px); - -o-transform: translateY(-300px); } - -.animate-up { - opacity: 0; - -ms-transform: translateY(300px); - transform: translateY(300px); - -webkit-transform: translateY(300px); - -moz-transform: translateY(300px); - -o-transform: translateY(300px); } - -.animate { - transition: all 1s ease-in-out; - -webkit-transition: all 1s ease-in-out; - -moz-transition: all 1s ease-in-out; - -o-transition: all 1s ease-in-out; } - -#home_socials { - position: fixed; - bottom: 30px; - left: 0; - right: 0; - text-align: center; - z-index: 2; } - #home_socials .socialicons { - display: inline-block; - font-size: 1.4em; - margin: 15px 20px 15px 20px; } - -#socials { - position: fixed; - left: 0; - top: 37%; - background: rgba(0, 0, 0, 0.8); - z-index: 2; } - -.socialicons { - display: block; - font-size: 23px; - font-family: "socials" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - color: #ffffff; - text-decoration: none; - margin: 15px; - transition: all 0.3s; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; } - .socialicons:hover { - color: #b5b5b5; - -ms-transform: scale(1.3); - transform: scale(1.3); - -webkit-transform: scale(1.3); } - -#twitter:before { - content: "\ea96"; } - -#instagram:before { - content: "\ea92"; } - -#youtube:before { - content: "\ea9d"; } - -#flickr:before { - content: "\eaa4"; } - -#facebook:before { - content: "\ea91"; } - -#footer { - z-index: 3; - left: 0; - right: 0; - bottom: 0; - text-align: center; - padding: 5px 0 5px 0; - -webkit-transition: color 0.3s, opacity 0.3s ease-out, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - -o-transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; } - #footer p { - color: #cccccc; - font-size: 0.5em; - font-weight: 400; } - #footer p a { - color: #ccc; } - #footer p a:visited { - color: #ccc; } - #footer p.hosted_by, - #footer p.home_copyright { - text-transform: uppercase; } - -#menu { - width: 100%; } - #menu li { - position: relative; - display: block; - float: right; - padding: 22px 1.5% 20px 1.5%; } - #menu a { - display: block; - font-size: 0.8em; - color: #ffffff; - text-transform: uppercase; - font-weight: 400; - transition: all 0.3s; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; } - #menu a:hover { - color: #b5b5b5 !important; } - #menu .current-menu-item a { - color: #b5b5b5 !important; } - -#menu_wrap { - position: fixed; - right: 0; - top: 0; - z-index: 98; - width: 80%; } - -#header { - position: fixed; - left: 0; - top: 0; - right: 0; - z-index: 98; } - -#logo { - float: left; - padding: 15px; } - #logo h1 { - color: #ffffff; - font-size: 1em; - text-transform: uppercase; - font-weight: 700; - text-align: center; } - #logo h1 span { - font-family: "Roboto", sans-serif; - font-size: 0.6em; - display: block; - font-weight: 300; - letter-spacing: 1px; - padding: 0 0 0 0; } - -#intro { - position: fixed; - left: 0; - top: 0; - bottom: 0; - right: 0; - z-index: 1000; - background: #000000; } - #intro h1 { - text-align: center; - font-size: 1.5em; - color: #ffffff; - text-transform: uppercase; - font-weight: 200; } - #intro h2 { - text-align: center; - font-size: 1em; - color: #ececec; - text-transform: uppercase; - font-weight: 200; } - -#slides { - position: absolute; - left: 0; - top: 0; - width: 100vw; - height: 98vh; } - #slides .slides-container, - #slides li, - #slides img { - height: 100%; - width: 100%; } - #slides img { - top: 0; - left: 0; - position: absolute; - -o-object-fit: cover; - object-fit: cover; } - -#footer { - position: absolute; - background: #000000; } - #footer p.home_copyright { - color: #ffffff; } diff --git a/demo/dist/landing.js b/demo/dist/landing.js deleted file mode 100644 index 137dff74..00000000 --- a/demo/dist/landing.js +++ /dev/null @@ -1,276 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 049?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&pi.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n 0) { - $("#loader_wrap").fadeOut(1000); - } - - if ($(".animate-down").length > 0) { - $(".animate-down").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - - if ($(".animate-up").length > 0) { - $(".animate-up").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - - if ($(".pop-in").length > 0) { - $(".pop-in").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - - if ($(".pop-out").length > 0) { - $(".pop-out").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } -}; - -landing.runInitAnimationsHome = function () { - if ($(".pop-in").length > 0) { - $(".pop-in").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - - setTimeout(function () { - $("#intro").fadeOut(1000, function () { - if ($(".pop-in-last").length > 0) { - $(".pop-in-last").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - if ($(".animate-down").length > 0) { - $(".animate-down").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - - if ($(".animate-up").length > 0) { - $(".animate-up").each(function (index) { - var $this = $(this); - setTimeout(function () { - $this.addClass("toggled"); - }, 100 * index); - }); - } - }); - }, 2500); -}; - -$(document).ready(function () { - // Prevent users from saving images - - /* - $("body").on("contextmenu",function(){ - return false; - }); - */ - - // Toggle menu and menu setup - - $("#intro_content").css({ - paddingTop: ($(window).height() - 50) / 2 + "px" - }); - - $(".sub-menu").hide(); - - // $('#menu a').each(function() { - - // var $this = $(this); - // var href = $(this).attr("href"); - // var text = $(this).html(); - - // // if ( $this.html() == "Store" || $this.closest("ul").hasClass("sub-menu") ) { - // // - // // } else { - // // $("#mobile_menu_wrap").prepend('' + text + ''); - // // } - - // }); - - // $('.sub-menu a').each(function() { - // - // var $this = $(this); - // var href = $(this).attr("href"); - // var text = $(this).html(); - // - // $("#mobile_menu_wrap").append('' + text + ''); - // - // }); - - $("#menu li").hover(function () { - if ($(this).find(".sub-menu").length > 0) { - $(this).find(".sub-menu").show(); - } - }, function () { - if ($(this).find(".sub-menu").length > 0) { - $(this).find(".sub-menu").hide(); - } - }); - - // $('.hamburger').on("click", function() { - // - // $(this).toggleClass("is-active"); - // - // if ( $(this).hasClass("is-active") == true ) { - // $("#mobile_menu_wrap").fadeIn(800); - // - // $("#mobile_menu_wrap a").each(function(index) { - // var $this = $(this); - // setTimeout(function() { - // $this.addClass("popped"); - // }, 100 * index); - // }); - // - // } else { - // $("#mobile_menu_wrap").fadeOut(800); - // $("#mobile_menu_wrap a").removeClass("popped"); - // } - // - // return false; - // }); - - // var homeslider = $('#slides'); - // - // if( homeslider ) { - // - // var homeslider_slides = homeslider.find("li").length; - // var playSpeed = 0; - // - // if ( homeslider_slides > 1 ) { - // playSpeed = 5000; - // } - // - // homeslider.superslides({ - // play : playSpeed, - // pagination : true, - // animation : "fade", - // animation_speed : 1500 - // }); - // } - - // Gallery page - - // $('#gallery_nav a').on("click", function() { - // - // var targets = $(this).data("category"); - // - // $(this).addClass("active").parent().siblings("li").find('a').removeClass("active"); - // - // if ( targets == "all" ) { - // - // $('.grid-item').show(); - // - // } else { - // - // $('.grid-item').each(function() { - // - // var $this = $(this); - // var thisCat = $(this).data("category"); - // - // if ( thisCat.indexOf(targets) >= 0 ) { - // $this.show(); - // } else { - // $this.hide(); - // } - // - // }); - // - // } - // - // galleryGrid.masonry(); - // - // console.log(targets); - // - // return false; - // }); - - if ($("#intro").length > 0) { - landing.runInitAnimationsHome(); - } else { - landing.runInitAnimations(); - } -}); - -// $(window).load(function() { -// -// if ( $('#intro').length > 0 ) { -// landing.runInitAnimationsHome(); -// } else { -// landing.runInitAnimations(); -// } -// -// // if ( $('.gallery_grid').length > 0 ) { -// // -// // galleryGrid = $('.gallery_grid').masonry({ -// // columnWidth: '.grid-sizer', -// // itemSelector: '.grid-item', -// // percentPosition: true -// // }); -// // -// // } -// -// // $('#single_product_image').zoom({ -// // url: $('#single_product_image').find('img').attr('src'), -// // magnify : 0.7 -// // }); -// -// // Run animations -// -// }); \ No newline at end of file diff --git a/demo/dist/leaflet.markercluster.js.map b/demo/dist/leaflet.markercluster.js.map deleted file mode 100644 index a4b459c1..00000000 --- a/demo/dist/leaflet.markercluster.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/MarkerClusterGroup.js","../src/MarkerCluster.js","../src/MarkerOpacity.js","../src/DistanceGrid.js","../src/MarkerCluster.QuickHull.js","../src/MarkerCluster.Spiderfier.js","../src/MarkerClusterGroup.Refresh.js"],"names":[],"mappings":"0PAIO,IAAI,GAAqB,EAAE,mBAAqB,EAAE,aAAa,QAErE,SACC,iBAAkB,GAClB,mBAAoB,KACpB,YAAa,EAAE,OAAO,UAAU,QAAQ,KAExC,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAElB,wBAAyB,KAIzB,4BAA4B,EAK5B,SAAS,EAIT,sBAAsB,EAGtB,2BAA4B,EAG5B,0BAA4B,OAAQ,IAAK,MAAO,OAAQ,QAAS,IAGjE,gBAAgB,EAChB,cAAe,IACf,WAAY,GACZ,cAAe,KAGf,mBAGD,WAAY,SAAU,GACrB,EAAE,KAAK,WAAW,KAAM,GACnB,KAAK,QAAQ,qBACjB,KAAK,QAAQ,mBAAqB,KAAK,4BAGxC,KAAK,cAAgB,EAAE,eACvB,KAAK,cAAc,eAAe,MAElC,KAAK,eAAiB,EAAE,eACxB,KAAK,eAAe,eAAe,MAEnC,KAAK,iBAAmB,EACxB,KAAK,oBACL,KAAK,kBAEL,KAAK,oBAAsB,KAE3B,KAAK,UAEL,KAAK,2BACJ,UAAa,KAAK,sBAClB,KAAQ,KAAK,kBACb,QAAW,KAAK,oBAIjB,IAAI,GAAU,EAAE,QAAQ,YAAc,KAAK,QAAQ,OACnD,GAAE,OAAO,KAAM,EAAU,KAAK,eAAiB,KAAK,cAEpD,KAAK,eAAiB,EAAU,EAAE,cAAgB,EAAE,0BAGrD,SAAU,SAAU,GAEnB,GAAI,YAAiB,GAAE,WACtB,MAAO,MAAK,WAAW,GAIxB,KAAK,EAAM,UAGV,MAFA,MAAK,eAAe,SAAS,GAC7B,KAAK,KAAK,YAAc,MAAO,IACxB,IAGR,KAAK,KAAK,KAGT,MAFA,MAAK,iBAAiB,KAAK,GAC3B,KAAK,KAAK,YAAc,MAAO,IACxB,IAGR,IAAI,KAAK,SAAS,GACjB,MAAO,KAMJ,MAAK,aACR,KAAK,cAGN,KAAK,UAAU,EAAO,KAAK,UAC3B,KAAK,KAAK,YAAc,MAAO,IAG/B,KAAK,iBAAiB,qBAEtB,KAAK,uBAGL,IAAI,GAAe,EACf,EAAc,KAAK,KACvB,IAAI,EAAM,SACT,KAAO,EAAa,SAAS,OAAS,GACrC,EAAe,EAAa,QAW9B,OAPI,MAAK,oBAAoB,SAAS,EAAa,eAC9C,KAAK,QAAQ,qBAChB,KAAK,mBAAmB,EAAO,GAE/B,KAAK,8BAA8B,EAAO,IAGrC,MAGR,YAAa,SAAU,GAEtB,MAAI,aAAiB,GAAE,WACf,KAAK,cAAc,IAItB,EAAM,UAMN,KAAK,KAQL,EAAM,UAIP,KAAK,cACR,KAAK,cACL,KAAK,iBAAiB,IAIvB,KAAK,aAAa,GAAO,GACzB,KAAK,KAAK,eAAiB,MAAO,IAGlC,KAAK,iBAAiB,qBAEtB,KAAK,wBAEL,EAAM,IAAI,KAAK,0BAA2B,MAEtC,KAAK,cAAc,SAAS,KAC/B,KAAK,cAAc,YAAY,GAC3B,EAAM,aACT,EAAM,eAID,MA1BC,OARF,KAAK,aAAa,KAAK,iBAAkB,IAAU,KAAK,SAAS,IACrE,KAAK,eAAe,MAAO,MAAO,EAAO,OAAQ,EAAM,UAExD,KAAK,KAAK,eAAiB,MAAO,IAC3B,OAVP,KAAK,eAAe,YAAY,GAChC,KAAK,KAAK,eAAiB,MAAO,IAC3B,OA0CT,UAAW,SAAU,EAAa,GACjC,IAAK,EAAE,KAAK,QAAQ,GACnB,MAAO,MAAK,SAAS,EAGtB,IAQI,GARA,EAAK,KAAK,cACV,EAAM,KAAK,eACX,EAAU,KAAK,QAAQ,eACvB,EAAgB,KAAK,QAAQ,cAC7B,EAAgB,KAAK,QAAQ,cAC7B,EAAI,EAAY,OAChB,EAAS,EACT,GAAgB,CAGpB,IAAI,KAAK,KAAM,CACd,GAAI,IAAU,GAAK,OAAQ,UACvB,EAAU,EAAE,KAAK,WAEpB,IADA,GAAI,IAAQ,GAAK,OAAQ,UACT,EAAT,EAAY,IAAU,CAC5B,GAAI,GAA4B,IAAjB,EAAS,IAAW,CAElC,GAAI,IAAU,GAAK,OAAQ,UAAY,CACvC,IAAI,EAAU,EACb,MAYF,GARA,EAAI,EAAY,GAQZ,YAAa,GAAE,WACd,IACH,EAAc,EAAY,QAC1B,GAAgB,GAEjB,KAAK,uBAAuB,EAAG,GAC/B,EAAI,EAAY,WAKjB,IAAK,EAAE,WAQP,IAAI,KAAK,SAAS,KAIlB,KAAK,UAAU,EAAG,KAAK,UAClB,GACJ,KAAK,KAAK,YAAc,MAAO,IAI5B,EAAE,UAC8B,IAA/B,EAAE,SAAS,iBAAuB,CACrC,GAAI,GAAU,EAAE,SAAS,qBACrB,EAAc,EAAQ,KAAO,EAAI,EAAQ,GAAK,EAAQ,EAC1D,GAAG,YAAY,QArBhB,GAAI,SAAS,GACR,GACJ,KAAK,KAAK,YAAc,MAAO,IAwB9B,GAEH,EAAc,EAAQ,GAAG,GAAK,OAAQ,UAAY,GAI/C,IAAW,GAGd,KAAK,iBAAiB,qBAEtB,KAAK,wBAEL,KAAK,iBAAiB,6BAA6B,KAAM,KAAK,MAAO,KAAK,sBAE1E,WAAW,EAAS,KAAK,QAAQ,aAEhC,KAEH,SAIA,KAFA,GAAI,GAAkB,KAAK,iBAEX,EAAT,EAAY,IAClB,EAAI,EAAY,GAGZ,YAAa,GAAE,YACd,IACH,EAAc,EAAY,QAC1B,GAAgB,GAEjB,KAAK,uBAAuB,EAAG,GAC/B,EAAI,EAAY,QAKZ,EAAE,UAKH,KAAK,SAAS,IAIlB,EAAgB,KAAK,GARpB,EAAI,SAAS,EAWhB,OAAO,OAIR,aAAc,SAAU,GACvB,GAAI,GAAG,EACH,EAAI,EAAY,OAChB,EAAK,KAAK,cACV,EAAM,KAAK,eACX,GAAgB,CAEpB,KAAK,KAAK,KAAM,CACf,IAAK,EAAI,EAAO,EAAJ,EAAO,IAClB,EAAI,EAAY,GAGZ,YAAa,GAAE,YACd,IACH,EAAc,EAAY,QAC1B,GAAgB,GAEjB,KAAK,uBAAuB,EAAG,GAC/B,EAAI,EAAY,SAIjB,KAAK,aAAa,KAAK,iBAAkB,GACzC,EAAI,YAAY,GACZ,KAAK,SAAS,IACjB,KAAK,eAAe,MAAO,MAAO,EAAG,OAAQ,EAAE,UAEhD,KAAK,KAAK,eAAiB,MAAO,IAEnC,OAAO,MAGR,GAAI,KAAK,YAAa,CACrB,KAAK,aAGL,IAAI,GAAe,EAAY,QAC3B,EAAK,CACT,KAAK,EAAI,EAAO,EAAJ,EAAQ,IACnB,EAAI,EAAa,GAGb,YAAa,GAAE,YAClB,KAAK,uBAAuB,EAAG,GAC/B,EAAK,EAAa,QAInB,KAAK,iBAAiB,GAIxB,IAAK,EAAI,EAAO,EAAJ,EAAO,IAClB,EAAI,EAAY,GAGZ,YAAa,GAAE,YACd,IACH,EAAc,EAAY,QAC1B,GAAgB,GAEjB,KAAK,uBAAuB,EAAG,GAC/B,EAAI,EAAY,QAIZ,EAAE,UAMP,KAAK,aAAa,GAAG,GAAM,GAC3B,KAAK,KAAK,eAAiB,MAAO,IAE9B,EAAG,SAAS,KACf,EAAG,YAAY,GACX,EAAE,aACL,EAAE,iBAXH,EAAI,YAAY,GAChB,KAAK,KAAK,eAAiB,MAAO,IAuBpC,OAPA,MAAK,iBAAiB,qBAEtB,KAAK,wBAGL,KAAK,iBAAiB,6BAA6B,KAAM,KAAK,MAAO,KAAK,qBAEnE,MAIR,YAAa,WA6BZ,MAzBK,MAAK,OACT,KAAK,oBACL,KAAK,wBACE,MAAK,oBACL,MAAK,kBAGT,KAAK,wBACR,KAAK,yBAIN,KAAK,cAAc,cACnB,KAAK,eAAe,cAEpB,KAAK,UAAU,SAAU,GACxB,EAAO,IAAI,KAAK,0BAA2B,YACpC,GAAO,UACZ,MAEC,KAAK,MAER,KAAK,2BAGC,MAIR,UAAW,WACV,GAAI,GAAS,GAAI,GAAE,YAEf,MAAK,kBACR,EAAO,OAAO,KAAK,iBAAiB,QAGrC,KAAK,GAAI,GAAI,KAAK,iBAAiB,OAAS,EAAG,GAAK,EAAG,IACtD,EAAO,OAAO,KAAK,iBAAiB,GAAG,YAKxC,OAFA,GAAO,OAAO,KAAK,eAAe,aAE3B,GAIR,UAAW,SAAU,EAAQ,GAC5B,GAEC,GAAmB,EAAG,EAFnB,EAAU,KAAK,iBAAiB,QACnC,EAAgB,KAAK,cAOtB,KAJI,KAAK,kBACR,KAAK,iBAAiB,mBAAmB,GAGrC,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IAAK,CAGzC,IAFA,GAAoB,EAEf,EAAI,EAAc,OAAS,EAAG,GAAK,EAAG,IAC1C,GAAI,EAAc,GAAG,QAAU,EAAQ,GAAI,CAC1C,GAAoB,CACpB,OAIE,GACH,EAAO,KAAK,EAAS,EAAQ,IAI/B,KAAK,eAAe,UAAU,EAAQ,IAIvC,UAAW,WACV,GAAI,KAIJ,OAHA,MAAK,UAAU,SAAU,GACxB,EAAO,KAAK,KAEN,GAIR,SAAU,SAAU,GACnB,GAAI,GAAS,IAUb,OARA,GAAK,SAAS,EAAI,IAElB,KAAK,UAAU,SAAU,GACpB,EAAE,MAAM,KAAO,IAClB,EAAS,KAIJ,GAIR,SAAU,SAAU,GACnB,IAAK,EACJ,OAAO,CAGR,IAAI,GAAG,EAAU,KAAK,gBAEtB,KAAK,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACpC,GAAI,EAAQ,KAAO,EAClB,OAAO,CAKT,KADA,EAAU,KAAK,eACV,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACpC,GAAI,EAAQ,GAAG,QAAU,EACxB,OAAO,CAIT,UAAU,EAAM,UAAY,EAAM,SAAS,SAAW,OAAS,KAAK,eAAe,SAAS,IAI7F,gBAAiB,SAAU,EAAO,GAET,kBAAb,KACV,EAAW,aAGZ,IAAI,GAAa,YACX,EAAM,QAAS,EAAM,SAAS,OAAW,KAAK,mBAClD,KAAK,KAAK,IAAI,UAAW,EAAY,MACrC,KAAK,IAAI,eAAgB,EAAY,MAEjC,EAAM,MACT,IACU,EAAM,SAAS,QACzB,KAAK,KAAK,aAAc,EAAU,MAClC,EAAM,SAAS,aAKd,GAAM,OAAS,KAAK,KAAK,YAAY,SAAS,EAAM,aAEvD,IACU,EAAM,SAAS,MAAQ,KAAK,MAAM,KAAK,KAAK,QAEtD,KAAK,KAAK,GAAG,UAAW,EAAY,MACpC,KAAK,KAAK,MAAM,EAAM,eAEtB,KAAK,KAAK,GAAG,UAAW,EAAY,MACpC,KAAK,GAAG,eAAgB,EAAY,MACpC,EAAM,SAAS,iBAKjB,MAAO,SAAU,GAChB,KAAK,KAAO,CACZ,IAAI,GAAG,EAAG,CAEV,KAAK,SAAS,KAAK,KAAK,cACvB,KAAM,8BAaP,KAVA,KAAK,cAAc,MAAM,GACzB,KAAK,eAAe,MAAM,GAErB,KAAK,eACT,KAAK,2BAGN,KAAK,QAAU,EAAI,QAAQ,IAAI,WAAW,aAGrC,EAAI,EAAG,EAAI,KAAK,eAAe,OAAY,EAAJ,EAAO,IAClD,EAAQ,KAAK,eAAe,GAC5B,EAAM,UAAY,EAAM,MAAM,QAC9B,EAAM,MAAM,QAAU,EAAM,MAG7B,KAAK,EAAI,EAAG,EAAI,KAAK,eAAe,OAAY,EAAJ,EAAO,IAClD,EAAQ,KAAK,eAAe,GAC5B,KAAK,aAAa,EAAM,OAAO,GAC/B,EAAM,MAAM,QAAU,EAAM,SAE7B,MAAK,kBAGL,KAAK,MAAQ,KAAK,MAAM,KAAK,KAAK,OAClC,KAAK,oBAAsB,KAAK,4BAEhC,KAAK,KAAK,GAAG,UAAW,KAAK,SAAU,MACvC,KAAK,KAAK,GAAG,UAAW,KAAK,SAAU,MAEnC,KAAK,kBACR,KAAK,mBAGN,KAAK,cAGL,EAAI,KAAK,iBACT,KAAK,oBACL,KAAK,UAAU,GAAG,IAInB,SAAU,SAAU,GACnB,EAAI,IAAI,UAAW,KAAK,SAAU,MAClC,EAAI,IAAI,UAAW,KAAK,SAAU,MAElC,KAAK,gBAGL,KAAK,KAAK,SAAS,UAAY,KAAK,KAAK,SAAS,UAAU,QAAQ,wBAAyB,IAEzF,KAAK,qBACR,KAAK,4BAGC,MAAK,QAGZ,KAAK,gBACL,KAAK,cAAc,SACnB,KAAK,eAAe,SAEpB,KAAK,cAAc,cAEnB,KAAK,KAAO,MAGb,iBAAkB,SAAU,GAE3B,IADA,GAAI,GAAU,EACP,IAAY,EAAQ,OAC1B,EAAU,EAAQ,QAEnB,OAAO,IAAW,MAInB,aAAc,SAAU,EAAS,GAChC,IAAK,GAAI,GAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACxC,GAAI,EAAQ,KAAO,EAElB,MADA,GAAQ,OAAO,EAAG,IACX,GAWV,2BAA4B,SAAU,EAAQ,GAK7C,IAJA,GAAI,GAAM,KAAK,KACX,EAAkB,KAAK,iBAC1B,EAAU,KAAK,MAAM,KAAK,KAAK,cAEzB,GAAK,GACN,EAAgB,GAAG,aAAa,EAAQ,EAAI,QAAQ,EAAO,YAAa,IADzD,OAOtB,sBAAuB,SAAU,GAChC,EAAE,OAAO,YAAc,EAAE,OAAO,SAGjC,kBAAmB,SAAU,GAC5B,IAAK,KAAK,cAAgB,EAAE,OAAO,YAAa,CAC/C,GAAI,GAAc,EAAE,OAAO,QAAU,EAAE,OAAO,OAAO,QAErD,MAAK,WAAW,EAAE,OAAQ,EAAE,UAAW,EAAE,QAErC,GACH,EAAE,OAAO,cAKZ,WAAY,SAAU,EAAO,EAAM,GAClC,EAAM,QAAU,EAChB,KAAK,YAAY,GAEjB,EAAM,QAAU,EAChB,KAAK,SAAS,IAGf,oBAAqB,SAAU,GAC9B,GAAI,GAAY,EAAE,OAAO,kBAClB,GAAE,OAAO,YACZ,GACH,KAAK,WAAW,EAAE,OAAQ,EAAW,EAAE,OAAO,UAOhD,aAAc,SAAU,EAAQ,EAAwB,GACvD,GAAI,GAAe,KAAK,cACvB,EAAkB,KAAK,iBACvB,EAAK,KAAK,cACV,EAAM,KAAK,KACX,EAAU,KAAK,MAAM,KAAK,KAAK,aAG5B,IACH,KAAK,2BAA2B,EAAQ,KAAK,SAI9C,IAEC,GAFG,EAAU,EAAO,SACpB,EAAU,EAAQ,QAMnB,KAFA,KAAK,aAAa,EAAS,GAEpB,IACN,EAAQ,cACR,EAAQ,mBAAoB,IAExB,EAAQ,MAAQ,KAGT,GAA0B,EAAQ,aAAe,GAE3D,EAAc,EAAQ,SAAS,KAAO,EAAS,EAAQ,SAAS,GAAK,EAAQ,SAAS,GAGtF,EAAa,EAAQ,OAAO,aAAa,EAAS,EAAI,QAAQ,EAAQ,SAAU,EAAQ,QACxF,EAAgB,EAAQ,OAAO,UAAU,EAAa,EAAI,QAAQ,EAAY,YAAa,EAAQ,QAGnG,KAAK,aAAa,EAAQ,SAAS,eAAgB,GACnD,EAAQ,SAAS,SAAS,KAAK,GAC/B,EAAY,SAAW,EAAQ,SAE3B,EAAQ,QAEX,EAAG,YAAY,GACV,GACJ,EAAG,SAAS,KAId,EAAQ,kBAAmB,EAG5B,EAAU,EAAQ,eAGZ,GAAO,UAGf,cAAe,SAAU,EAAI,GAC5B,KAAO,GAAK,CACX,GAAI,IAAO,EACV,OAAO,CAER,GAAM,EAAI,WAEX,OAAO,GAIR,KAAM,SAAU,EAAM,EAAM,GAC3B,GAAI,GAAQ,EAAK,gBAAiB,GAAE,cAAe,CAElD,GAAI,EAAK,eAAiB,KAAK,cAAc,EAAK,MAAM,MAAO,EAAK,cAAc,eACjF,MAED,GAAO,UAAY,EAGpB,EAAE,aAAa,UAAU,KAAK,KAAK,KAAM,EAAM,EAAM,IAItD,QAAS,SAAU,EAAM,GACxB,MAAO,GAAE,aAAa,UAAU,QAAQ,KAAK,KAAM,EAAM,IAAc,EAAE,aAAa,UAAU,QAAQ,KAAK,KAAM,UAAY,EAAM,IAItI,2BAA4B,SAAU,GACrC,GAAI,GAAa,EAAQ,gBAErB,EAAI,kBASR,OAPC,IADgB,GAAb,EACE,QACkB,IAAb,EACL,SAEA,QAGC,GAAI,GAAE,SAAU,KAAM,cAAgB,EAAa,gBAAiB,UAAW,iBAAmB,EAAG,SAAU,GAAI,GAAE,MAAM,GAAI,OAGvI,YAAa,WACZ,GAAI,GAAM,KAAK,KACX,EAAoB,KAAK,QAAQ,kBACjC,EAAsB,KAAK,QAAQ,oBACnC,EAAsB,KAAK,QAAQ,qBAGnC,GAAqB,IACxB,KAAK,GAAG,eAAgB,KAAK,gBAAiB,MAI3C,IACH,KAAK,GAAG,mBAAoB,KAAK,cAAe,MAChD,KAAK,GAAG,kBAAmB,KAAK,cAAe,MAC/C,EAAI,GAAG,UAAW,KAAK,cAAe,QAIxC,gBAAiB,SAAU,GAI1B,IAHA,GAAI,GAAU,EAAE,MACZ,EAAgB,EAE2B,IAAxC,EAAc,eAAe,QACnC,EAAgB,EAAc,eAAe,EAG1C,GAAc,QAAU,KAAK,UAChC,EAAc,cAAgB,EAAQ,aACtC,KAAK,QAAQ,kBAGb,EAAQ,WACE,KAAK,QAAQ,qBACvB,EAAQ,eAIL,EAAE,eAA6C,KAA5B,EAAE,cAAc,SACtC,KAAK,KAAK,WAAW,SAIvB,cAAe,SAAU,GACxB,GAAI,GAAM,KAAK,IACX,MAAK,mBAGL,KAAK,eACR,EAAI,YAAY,KAAK,eAElB,EAAE,MAAM,gBAAkB,GAAK,EAAE,QAAU,KAAK,cACnD,KAAK,cAAgB,GAAI,GAAE,QAAQ,EAAE,MAAM,gBAAiB,KAAK,QAAQ,gBACzE,EAAI,SAAS,KAAK,kBAIpB,cAAe,WACV,KAAK,gBACR,KAAK,KAAK,YAAY,KAAK,eAC3B,KAAK,cAAgB,OAIvB,cAAe,WACd,GAAI,GAAoB,KAAK,QAAQ,kBACpC,EAAsB,KAAK,QAAQ,oBACnC,EAAsB,KAAK,QAAQ,oBACnC,EAAM,KAAK,MAER,GAAqB,IACxB,KAAK,IAAI,eAAgB,KAAK,gBAAiB,MAE5C,IACH,KAAK,IAAI,mBAAoB,KAAK,cAAe,MACjD,KAAK,IAAI,kBAAmB,KAAK,cAAe,MAChD,EAAI,IAAI,UAAW,KAAK,cAAe,QAIzC,SAAU,WACJ,KAAK,OAGV,KAAK,sBAEL,KAAK,MAAQ,KAAK,MAAM,KAAK,KAAK,OAClC,KAAK,oBAAsB,KAAK,8BAGjC,SAAU,WACT,IAAI,KAAK,iBAAT,CAIA,GAAI,GAAY,KAAK,2BAErB,MAAK,iBAAiB,kCAAkC,KAAK,oBAAqB,KAAK,MAAM,KAAK,KAAK,cAAe,KAAK,MAAO,GAClI,KAAK,iBAAiB,6BAA6B,KAAM,KAAK,MAAM,KAAK,KAAK,OAAQ,GAEtF,KAAK,oBAAsB,IAI5B,yBAA0B,WACzB,GAAI,GAAU,KAAK,KAAK,KAAK,KAAK,cACjC,EAAU,KAAK,MAAM,KAAK,KAAK,cAC/B,EAAS,KAAK,QAAQ,iBACtB,EAAW,CAKU,mBAAX,KACV,EAAW,WAAc,MAAO,KAGY,OAAzC,KAAK,QAAQ,0BAChB,EAAU,KAAK,QAAQ,wBAA0B,GAElD,KAAK,SAAW,EAChB,KAAK,iBACL,KAAK,mBAGL,KAAK,GAAI,GAAO,EAAS,GAAQ,EAAS,IACzC,KAAK,cAAc,GAAQ,GAAI,GAAE,aAAa,EAAS,IACvD,KAAK,iBAAiB,GAAQ,GAAI,GAAE,aAAa,EAAS,GAI3D,MAAK,iBAAmB,GAAI,MAAK,eAAe,KAAM,EAAU,IAIjE,UAAW,SAAU,EAAO,GAC3B,GAGI,GAAa,EAHb,EAAe,KAAK,cACpB,EAAkB,KAAK,iBAC1B,EAAU,KAAK,MAAM,KAAK,KAAK,aAUhC,KAPI,KAAK,QAAQ,kBAChB,KAAK,oBAAoB,GAG1B,EAAM,GAAG,KAAK,0BAA2B,MAGlC,GAAQ,EAAS,IAAQ,CAC/B,EAAc,KAAK,KAAK,QAAQ,EAAM,YAAa,EAGnD,IAAI,GAAU,EAAa,GAAM,cAAc,EAC/C,IAAI,EAGH,MAFA,GAAQ,UAAU,GAClB,EAAM,SAAW,EACjB,MAKD,IADA,EAAU,EAAgB,GAAM,cAAc,GACjC,CACZ,GAAI,GAAS,EAAQ,QACjB,IACH,KAAK,aAAa,GAAS,EAK5B,IAAI,GAAa,GAAI,MAAK,eAAe,KAAM,EAAM,EAAS,EAC9D,GAAa,GAAM,UAAU,EAAY,KAAK,KAAK,QAAQ,EAAW,SAAU,IAChF,EAAQ,SAAW,EACnB,EAAM,SAAW,CAGjB,IAAI,GAAa,CACjB,KAAK,EAAI,EAAO,EAAG,EAAI,EAAO,MAAO,IACpC,EAAa,GAAI,MAAK,eAAe,KAAM,EAAG,GAC9C,EAAa,GAAG,UAAU,EAAY,KAAK,KAAK,QAAQ,EAAQ,YAAa,GAO9E,OALA,GAAO,UAAU,GAGjB,KAAK,2BAA2B,EAAS,GAEzC,OAID,EAAgB,GAAM,UAAU,EAAO,GAIxC,KAAK,iBAAiB,UAAU,GAChC,EAAM,SAAW,KAAK,kBASvB,sBAAuB,WACtB,KAAK,cAAc,UAAU,SAAU,GAClC,YAAa,GAAE,eAAiB,EAAE,kBACrC,EAAE,iBAML,SAAU,SAAU,GACnB,KAAK,OAAO,KAAK,GACZ,KAAK,gBACT,KAAK,cAAgB,WAAW,EAAE,KAAK,KAAK,cAAe,MAAO,OAGpE,cAAe,WACd,IAAK,GAAI,GAAI,EAAG,EAAI,KAAK,OAAO,OAAQ,IACvC,KAAK,OAAO,GAAG,KAAK,KAErB,MAAK,OAAO,OAAS,EACrB,aAAa,KAAK,eAClB,KAAK,cAAgB,MAItB,oBAAqB,WACpB,GAAI,GAAU,KAAK,MAAM,KAAK,KAAK,MAGnC,MAAK,gBAED,KAAK,MAAQ,GAAW,KAAK,oBAAoB,WAAW,KAAK,8BACpE,KAAK,kBAEL,KAAK,iBAAiB,kCAAkC,KAAK,oBAAqB,KAAK,MAAM,KAAK,KAAK,cAAe,KAAK,MAAO,KAAK,6BAEvI,KAAK,iBAAiB,KAAK,MAAO,IAExB,KAAK,MAAQ,GACvB,KAAK,kBAEL,KAAK,kBAAkB,KAAK,MAAO,IAEnC,KAAK,YAKP,0BAA2B,WAC1B,MAAK,MAAK,QAAQ,2BAEP,EAAE,QAAQ,OACb,KAAK,mBAAmB,KAAK,KAAK,aAGnC,KAAK,mBAAmB,KAAK,KAAK,YAAY,IAAI,IALjD,KAAK,oBAkBd,mBAAoB,SAAU,GAC7B,GAAI,GAAS,KAAK,OAWlB,OATe,UAAX,IACC,EAAO,YAAc,IACxB,EAAO,WAAW,IAAM,KAErB,EAAO,aAAe,IACzB,EAAO,WAAW,KAAO,MAIpB,GAIR,8BAA+B,SAAU,EAAO,GAC/C,GAAI,IAAe,EAClB,KAAK,cAAc,SAAS,OACtB,IAA+B,IAA3B,EAAW,YAAmB,CACxC,EAAW,WAEX,IAAI,GAAU,EAAW,oBACzB,MAAK,cAAc,YAAY,EAAQ,IACvC,KAAK,cAAc,YAAY,EAAQ,QAEvC,GAAW,eAWb,uBAAwB,SAAU,EAAO,GACxC,GAEI,GAFA,EAAS,EAAM,YACf,EAAI,CAKR,KAFA,EAAS,MAEF,EAAI,EAAO,OAAQ,IACzB,EAAQ,EAAO,GAEX,YAAiB,GAAE,WACtB,KAAK,uBAAuB,EAAO,GAIpC,EAAO,KAAK,EAGb,OAAO,IASR,oBAAqB,SAAU,GAC9B,GAAI,GAAO,EAAM,QAAQ,KAAO,KAAK,QAAQ,oBAC5C,cAAe,WACd,MAAO,IAER,mBAAoB,WACnB,OAAQ,KAIV,OAAO,KAKT,GAAE,mBAAmB,SACpB,mBAAoB,GAAI,GAAE,aAAa,GAAI,GAAE,QAAQ,KAAW,KAAW,GAAI,GAAE,OAAO,IAAU,QAGnG,EAAE,mBAAmB,SACpB,cAEC,gBAAiB,aAGjB,iBAAkB,SAAU,EAAmB,GAC9C,KAAK,iBAAiB,kCAAkC,KAAK,oBAAqB,KAAK,MAAM,KAAK,KAAK,cAAe,GACtH,KAAK,iBAAiB,6BAA6B,KAAM,EAAc,KAAK,6BAG5E,KAAK,KAAK,iBAEX,kBAAmB,SAAU,EAAmB,GAC/C,KAAK,iBAAiB,kCAAkC,KAAK,oBAAqB,KAAK,MAAM,KAAK,KAAK,cAAe,GACtH,KAAK,iBAAiB,6BAA6B,KAAM,EAAc,KAAK,6BAG5E,KAAK,KAAK,iBAEX,mBAAoB,SAAU,EAAO,GACpC,KAAK,8BAA8B,EAAO,KAI5C,gBAEC,gBAAiB,WAChB,KAAK,KAAK,SAAS,WAAa,wBAChC,KAAK,oBAGN,iBAAkB,SAAU,EAAmB,GAC9C,GAGI,GAHA,EAAS,KAAK,4BACd,EAAK,KAAK,cACb,EAAU,KAAK,MAAM,KAAK,KAAK,aAGhC,MAAK,aAAc,EAGnB,KAAK,iBAAiB,aAAa,EAAQ,EAAmB,EAAS,SAAU,GAChF,GAEI,GAFA,EAAW,EAAE,QACb,EAAW,EAAE,QAkBjB,KAfK,EAAO,SAAS,KACpB,EAAW,MAGR,EAAE,mBAAqB,EAAoB,IAAM,GACpD,EAAG,YAAY,GACf,EAAE,6BAA6B,KAAM,EAAc,KAGnD,EAAE,cACF,EAAE,6BAA6B,EAAU,EAAc,IAKnD,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACpC,EAAI,EAAQ,GACP,EAAO,SAAS,EAAE,UACtB,EAAG,YAAY,KAMlB,KAAK,eAGL,KAAK,iBAAiB,0BAA0B,EAAQ,GAExD,EAAG,UAAU,SAAU,GAChB,YAAa,GAAE,gBAAkB,EAAE,OACxC,EAAE,gBAKJ,KAAK,iBAAiB,aAAa,EAAQ,EAAmB,EAAc,SAAU,GACrF,EAAE,kCAAkC,KAGrC,KAAK,aAAc,EAGnB,KAAK,SAAS,WAEb,KAAK,iBAAiB,aAAa,EAAQ,EAAmB,EAAS,SAAU,GAChF,EAAG,YAAY,GACf,EAAE,gBAGH,KAAK,mBAIP,kBAAmB,SAAU,EAAmB,GAC/C,KAAK,wBAAwB,KAAK,iBAAkB,EAAoB,EAAG,GAG3E,KAAK,iBAAiB,6BAA6B,KAAM,EAAc,KAAK,6BAE5E,KAAK,iBAAiB,kCAAkC,KAAK,oBAAqB,KAAK,MAAM,KAAK,KAAK,cAAe,EAAmB,KAAK,8BAG/I,mBAAoB,SAAU,EAAO,GACpC,GAAI,GAAK,KACL,EAAK,KAAK,aAEd,GAAG,SAAS,GACR,IAAe,IACd,EAAW,YAAc,GAE5B,EAAW,cACX,KAAK,eACL,KAAK,kBAEL,EAAM,QAAQ,KAAK,KAAK,mBAAmB,EAAW,cACtD,EAAM,cAEN,KAAK,SAAS,WACb,EAAG,YAAY,GACf,EAAM,cAEN,EAAG,oBAIJ,KAAK,eAEL,EAAG,kBACH,EAAG,wBAAwB,EAAY,KAAK,KAAK,aAAc,KAAK,WAOxE,wBAAyB,SAAU,EAAS,EAAmB,GAC9D,GAAI,GAAS,KAAK,4BACjB,EAAU,KAAK,MAAM,KAAK,KAAK,aAGhC,GAAQ,6CAA6C,EAAQ,EAAS,EAAoB,EAAG,EAE7F,IAAI,GAAK,IAGT,MAAK,eACL,EAAQ,0BAA0B,EAAQ,GAI1C,KAAK,SAAS,WAGb,GAA4B,IAAxB,EAAQ,YAAmB,CAC9B,GAAI,GAAI,EAAQ,SAAS,EAEzB,MAAK,aAAc,EACnB,EAAE,UAAU,EAAE,aACd,KAAK,aAAc,EACf,EAAE,aACL,EAAE,kBAGH,GAAQ,aAAa,EAAQ,EAAc,EAAS,SAAU,GAC7D,EAAE,kCAAkC,EAAQ,EAAS,EAAoB,IAG3E,GAAG,mBAIL,cAAe,WACV,KAAK,OACR,KAAK,KAAK,SAAS,UAAY,KAAK,KAAK,SAAS,UAAU,QAAQ,wBAAyB,KAE9F,KAAK,mBACL,KAAK,KAAK,iBAKX,aAAc,WAIb,EAAE,KAAK,QAAQ,SAAS,KAAK,gBAI/B,EAAE,mBAAqB,SAAU,GAChC,MAAO,IAAI,GAAE,mBAAmB,GC51C1B,IAAI,GAAgB,EAAE,cAAgB,EAAE,OAAO,QACrD,QAAS,EAAE,KAAK,UAAU,QAE1B,WAAY,SAAU,EAAO,EAAM,EAAG,GAErC,EAAE,OAAO,UAAU,WAAW,KAAK,KAAM,EAAK,EAAE,UAAY,EAAE,YAAe,GAAI,GAAE,OAAO,EAAG,IACjF,KAAM,KAAM,KAAM,EAAM,QAAQ,cAE5C,KAAK,OAAS,EACd,KAAK,MAAQ,EAEb,KAAK,YACL,KAAK,kBACL,KAAK,YAAc,EACnB,KAAK,kBAAmB,EACxB,KAAK,mBAAoB,EAEzB,KAAK,QAAU,GAAI,GAAE,aAEjB,GACH,KAAK,UAAU,GAEZ,GACH,KAAK,UAAU,IAKjB,mBAAoB,SAAU,EAAc,GAC3C,EAAe,KAEf,KAAK,GAAI,GAAI,KAAK,eAAe,OAAS,EAAG,GAAK,EAAG,IACpD,KAAK,eAAe,GAAG,mBAAmB,EAG3C,KAAK,GAAI,GAAI,KAAK,SAAS,OAAS,EAAG,GAAK,EAAG,IAC1C,GAAuB,KAAK,SAAS,GAAG,aAG5C,EAAa,KAAK,KAAK,SAAS,GAGjC,OAAO,IAIR,cAAe,WACd,MAAO,MAAK,aAIb,aAAc,SAAU,GASvB,IARA,GAKC,GALG,EAAgB,KAAK,eAAe,QACvC,EAAM,KAAK,OAAO,KAClB,EAAa,EAAI,cAAc,KAAK,SACpC,EAAO,KAAK,MAAQ,EACpB,EAAU,EAAI,UAIR,EAAc,OAAS,GAAK,EAAa,GAAM,CACrD,GACA,IAAI,KACJ,KAAK,EAAI,EAAG,EAAI,EAAc,OAAQ,IACrC,EAAc,EAAY,OAAO,EAAc,GAAG,eAEnD,GAAgB,EAGb,EAAa,EAChB,KAAK,OAAO,KAAK,QAAQ,KAAK,QAAS,GACf,GAAd,EACV,KAAK,OAAO,KAAK,QAAQ,KAAK,QAAS,EAAU,GAEjD,KAAK,OAAO,KAAK,UAAU,KAAK,QAAS,IAI3C,UAAW,WACV,GAAI,GAAS,GAAI,GAAE,YAEnB,OADA,GAAO,OAAO,KAAK,SACZ,GAGR,YAAa,WACZ,KAAK,kBAAmB,EACpB,KAAK,OACR,KAAK,QAAQ,OAKf,WAAY,WAKX,MAJI,MAAK,mBACR,KAAK,SAAW,KAAK,OAAO,QAAQ,mBAAmB,MACvD,KAAK,kBAAmB,GAElB,KAAK,SAAS,cAEtB,aAAc,WACb,MAAO,MAAK,SAAS,gBAItB,UAAW,SAAU,EAAM,GAE1B,KAAK,kBAAmB,EAExB,KAAK,mBAAoB,EACzB,KAAK,kBAAkB,GAEnB,YAAgB,GAAE,eAChB,IACJ,KAAK,eAAe,KAAK,GACzB,EAAK,SAAW,MAEjB,KAAK,aAAe,EAAK,cAEpB,GACJ,KAAK,SAAS,KAAK,GAEpB,KAAK,eAGF,KAAK,UACR,KAAK,SAAS,UAAU,GAAM,IAShC,kBAAmB,SAAU,GACvB,KAAK,WAET,KAAK,SAAW,EAAM,UAAY,EAAM,UAU1C,aAAc,WACb,GAAI,GAAS,KAAK,OAEd,GAAO,aACV,EAAO,WAAW,IAAM,IACxB,EAAO,WAAW,IAAM,KAErB,EAAO,aACV,EAAO,WAAW,KAAO,IACzB,EAAO,WAAW,KAAO,MAI3B,mBAAoB,WACnB,GAKI,GAAG,EAAO,EAAa,EALvB,EAAU,KAAK,SACf,EAAgB,KAAK,eACrB,EAAS,EACT,EAAS,EACT,EAAa,KAAK,WAItB,IAAmB,IAAf,EAAJ,CAQA,IAHA,KAAK,eAGA,EAAI,EAAG,EAAI,EAAQ,OAAQ,IAC/B,EAAc,EAAQ,GAAG,QAEzB,KAAK,QAAQ,OAAO,GAEpB,GAAU,EAAY,IACtB,GAAU,EAAY,GAIvB,KAAK,EAAI,EAAG,EAAI,EAAc,OAAQ,IACrC,EAAQ,EAAc,GAGlB,EAAM,mBACT,EAAM,qBAGP,KAAK,QAAQ,OAAO,EAAM,SAE1B,EAAc,EAAM,SACpB,EAAa,EAAM,YAEnB,GAAU,EAAY,IAAM,EAC5B,GAAU,EAAY,IAAM,CAG7B,MAAK,QAAU,KAAK,SAAW,GAAI,GAAE,OAAO,EAAS,EAAY,EAAS,GAG1E,KAAK,mBAAoB,IAI1B,UAAW,SAAU,GAChB,IACH,KAAK,cAAgB,KAAK,QAC1B,KAAK,UAAU,IAEhB,KAAK,OAAO,cAAc,SAAS,OAGpC,8BAA+B,SAAU,EAAQ,EAAQ,GACxD,KAAK,aAAa,EAAQ,KAAK,OAAO,KAAK,aAAc,EAAU,EAClE,SAAU,GACT,GACC,GAAG,EADA,EAAU,EAAE,QAEhB,KAAK,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACpC,EAAI,EAAQ,GAGR,EAAE,QACL,EAAE,QAAQ,GACV,EAAE,gBAIL,SAAU,GACT,GACC,GAAG,EADA,EAAgB,EAAE,cAEtB,KAAK,EAAI,EAAc,OAAS,EAAG,GAAK,EAAG,IAC1C,EAAK,EAAc,GACf,EAAG,QACN,EAAG,QAAQ,GACX,EAAG,kBAOR,6CAA8C,SAAU,EAAQ,EAAY,EAAmB,GAC9F,KAAK,aAAa,EAAQ,EAAc,EACvC,SAAU,GACT,EAAE,8BAA8B,EAAQ,EAAE,OAAO,KAAK,mBAAmB,EAAE,aAAa,QAAS,GAI7F,EAAE,mBAAqB,EAAoB,IAAM,GACpD,EAAE,cACF,EAAE,kCAAkC,EAAQ,EAAY,IAExD,EAAE,cAGH,EAAE,eAKL,0BAA2B,SAAU,EAAQ,GAC5C,KAAK,aAAa,EAAQ,KAAK,OAAO,KAAK,aAAc,EAAW,KAAM,SAAU,GACnF,EAAE,iBAIJ,6BAA8B,SAAU,EAAU,EAAW,GAC5D,KAAK,aAAa,EAAQ,KAAK,OAAO,KAAK,aAAe,EAAG,EAC5D,SAAU,GACT,GAAI,IAAc,EAAE,MAKpB,IAAK,GAAI,GAAI,EAAE,SAAS,OAAS,EAAG,GAAK,EAAG,IAAK,CAChD,GAAI,GAAK,EAAE,SAAS,EAEf,GAAO,SAAS,EAAG,WAIpB,IACH,EAAG,cAAgB,EAAG,YAEtB,EAAG,UAAU,GACT,EAAG,aACN,EAAG,eAIL,EAAE,OAAO,cAAc,SAAS,MAGlC,SAAU,GACT,EAAE,UAAU,MAKf,kCAAmC,SAAU,GAE5C,IAAK,GAAI,GAAI,KAAK,SAAS,OAAS,EAAG,GAAK,EAAG,IAAK,CACnD,GAAI,GAAK,KAAK,SAAS,EACnB,GAAG,gBACN,EAAG,UAAU,EAAG,qBACT,GAAG,eAIZ,GAAI,EAAY,IAAM,KAAK,MAE1B,IAAK,GAAI,GAAI,KAAK,eAAe,OAAS,EAAG,GAAK,EAAG,IACpD,KAAK,eAAe,GAAG,uBAGxB,KAAK,GAAI,GAAI,KAAK,eAAe,OAAS,EAAG,GAAK,EAAG,IACpD,KAAK,eAAe,GAAG,kCAAkC,IAK5D,iBAAkB,WACb,KAAK,gBACR,KAAK,UAAU,KAAK,qBACb,MAAK,gBAKd,kCAAmC,SAAU,EAAgB,EAAY,EAAW,GACnF,GAAI,GAAG,CACP,MAAK,aAAa,EAAgB,EAAa,EAAG,EAAY,EAC7D,SAAU,GAET,IAAK,EAAI,EAAE,SAAS,OAAS,EAAG,GAAK,EAAG,IACvC,EAAI,EAAE,SAAS,GACV,GAAiB,EAAa,SAAS,EAAE,WAC7C,EAAE,OAAO,cAAc,YAAY,GAC/B,EAAE,aACL,EAAE,gBAKN,SAAU,GAET,IAAK,EAAI,EAAE,eAAe,OAAS,EAAG,GAAK,EAAG,IAC7C,EAAI,EAAE,eAAe,GAChB,GAAiB,EAAa,SAAS,EAAE,WAC7C,EAAE,OAAO,cAAc,YAAY,GAC/B,EAAE,aACL,EAAE,kBAcR,aAAc,SAAU,EAAiB,EAAkB,EAAiB,EAAiB,GAC5F,GAEI,GAAG,EAFH,EAAgB,KAAK,eACrB,EAAO,KAAK,KAYhB,IATwB,GAApB,IACC,GACH,EAAgB,MAEb,GAAoB,IAAS,GAChC,EAAiB,OAIR,EAAP,GAAkC,EAAP,EAC9B,IAAK,EAAI,EAAc,OAAS,EAAG,GAAK,EAAG,IAC1C,EAAI,EAAc,GACd,EAAE,mBACL,EAAE,qBAEC,EAAgB,WAAW,EAAE,UAChC,EAAE,aAAa,EAAiB,EAAkB,EAAiB,EAAiB,IAOxF,gBAAiB,WAEhB,MAAO,MAAK,eAAe,OAAS,GAAK,KAAK,eAAe,GAAG,cAAgB,KAAK,cC1YvF,GAAE,OAAO,SACR,YAAa,WACZ,GAAI,GAAS,KAAK,QAAQ,OAG1B,OAFA,MAAK,WAAW,GAChB,KAAK,QAAQ,QAAU,EAChB,MAGR,YAAa,WACZ,MAAO,MAAK,WAAW,KAAK,QAAQ,YChBtC,EAAE,aAAe,SAAU,GAC1B,KAAK,UAAY,EACjB,KAAK,YAAc,EAAW,EAC9B,KAAK,SACL,KAAK,iBAGN,EAAE,aAAa,WAEd,UAAW,SAAU,EAAK,GACzB,GAAI,GAAI,KAAK,UAAU,EAAM,GACzB,EAAI,KAAK,UAAU,EAAM,GACzB,EAAO,KAAK,MACZ,EAAM,EAAK,GAAK,EAAK,OACrB,EAAO,EAAI,GAAK,EAAI,OACpB,EAAQ,EAAE,KAAK,MAAM,EAEzB,MAAK,aAAa,GAAS,EAE3B,EAAK,KAAK,IAGX,aAAc,SAAU,EAAK,GAC5B,KAAK,aAAa,GAClB,KAAK,UAAU,EAAK,IAIrB,aAAc,SAAU,EAAK,GAC5B,GAKI,GAAG,EALH,EAAI,KAAK,UAAU,EAAM,GACzB,EAAI,KAAK,UAAU,EAAM,GACzB,EAAO,KAAK,MACZ,EAAM,EAAK,GAAK,EAAK,OACrB,EAAO,EAAI,GAAK,EAAI,MAKxB,WAFO,MAAK,aAAa,EAAE,KAAK,MAAM,IAEjC,EAAI,EAAG,EAAM,EAAK,OAAY,EAAJ,EAAS,IACvC,GAAI,EAAK,KAAO,EAQf,MANA,GAAK,OAAO,EAAG,GAEH,IAAR,SACI,GAAI,IAGL,GAMV,WAAY,SAAU,EAAI,GACzB,GAAI,GAAG,EAAG,EAAG,EAAK,EAAK,EAAM,EACzB,EAAO,KAAK,KAEhB,KAAK,IAAK,GAAM,CACf,EAAM,EAAK,EAEX,KAAK,IAAK,GAGT,IAFA,EAAO,EAAI,GAEN,EAAI,EAAG,EAAM,EAAK,OAAY,EAAJ,EAAS,IACvC,EAAU,EAAG,KAAK,EAAS,EAAK,IAC5B,IACH,IACA,OAOL,cAAe,SAAU,GACxB,GAEI,GAAG,EAAG,EAAG,EAAK,EAAM,EAAK,EAAK,EAF9B,EAAI,KAAK,UAAU,EAAM,GACzB,EAAI,KAAK,UAAU,EAAM,GAEzB,EAAc,KAAK,aACnB,EAAgB,KAAK,YACrB,EAAU,IAEd,KAAK,EAAI,EAAI,EAAQ,EAAI,GAAT,EAAY,IAE3B,GADA,EAAM,KAAK,MAAM,GAGhB,IAAK,EAAI,EAAI,EAAQ,EAAI,GAAT,EAAY,IAE3B,GADA,EAAO,EAAI,GAGV,IAAK,EAAI,EAAG,EAAM,EAAK,OAAY,EAAJ,EAAS,IACvC,EAAM,EAAK,GACX,EAAO,KAAK,QAAQ,EAAY,EAAE,KAAK,MAAM,IAAO,IACzC,EAAP,GACK,GAAR,GAAqC,OAAZ,KACzB,EAAgB,EAChB,EAAU,EAOhB,OAAO,IAGR,UAAW,SAAU,GACpB,GAAI,GAAQ,KAAK,MAAM,EAAI,KAAK,UAChC,OAAO,UAAS,GAAS,EAAQ,GAGlC,QAAS,SAAU,EAAG,GACrB,GAAI,GAAK,EAAG,EAAI,EAAE,EACd,EAAK,EAAG,EAAI,EAAE,CAClB,OAAO,GAAK,EAAK,EAAK,ICzFvB,WACA,EAAE,WAQD,WAAY,SAAU,EAAK,GAC1B,GAAI,GAAK,EAAG,GAAG,IAAM,EAAG,GAAG,IAC1B,EAAK,EAAG,GAAG,IAAM,EAAG,GAAG,GACxB,OAAQ,IAAM,EAAI,IAAM,EAAG,GAAG,KAAO,GAAM,EAAI,IAAM,EAAG,GAAG,MAU5D,iCAAkC,SAAU,EAAU,GACrD,GAGC,GAAG,EAAI,EAHJ,EAAO,EACV,EAAQ,KACR,IAGD,KAAK,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IACpC,EAAK,EAAQ,GACb,EAAI,KAAK,WAAW,EAAI,GAEpB,EAAI,IACP,EAAU,KAAK,GAKZ,EAAI,IACP,EAAO,EACP,EAAQ,GAIV,QAAS,SAAU,EAAO,UAAW,IAWtC,gBAAiB,SAAU,EAAU,GACpC,GAAI,MACH,EAAI,KAAK,iCAAiC,EAAU,EAErD,OAAI,GAAE,UACL,EACC,EAAoB,OACnB,KAAK,iBAAiB,EAAS,GAAI,EAAE,UAAW,EAAE,YAEpD,EACC,EAAoB,OACnB,KAAK,iBAAiB,EAAE,SAAU,EAAS,IAAK,EAAE,cAI5C,EAAS,KAWnB,cAAe,SAAU,GAExB,GAKC,GALG,GAAS,EAAO,GAAS,EAC5B,GAAS,EAAO,GAAS,EACzB,EAAW,KAAM,EAAW,KAC5B,EAAW,KAAM,EAAW,KAC5B,EAAQ,KAAM,EAAQ,IAGvB,KAAK,EAAI,EAAQ,OAAS,EAAG,GAAK,EAAG,IAAK,CACzC,GAAI,GAAK,EAAQ,IACb,KAAW,GAAS,EAAG,IAAM,KAChC,EAAW,EACX,EAAS,EAAG,MAET,KAAW,GAAS,EAAG,IAAM,KAChC,EAAW,EACX,EAAS,EAAG,MAET,KAAW,GAAS,EAAG,IAAM,KAChC,EAAW,EACX,EAAS,EAAG,MAET,KAAW,GAAS,EAAG,IAAM,KAChC,EAAW,EACX,EAAS,EAAG,KAIV,IAAW,GACd,EAAQ,EACR,EAAQ,IAER,EAAQ,EACR,EAAQ,EAGT,IAAI,MAAQ,OAAO,KAAK,iBAAiB,EAAO,GAAQ,GACnD,KAAK,iBAAiB,EAAO,GAAQ,GAC1C,OAAO,QAKV,EAAE,cAAc,SACf,cAAe,WACd,GAEC,GAAG,EAFA,EAAe,KAAK,qBACvB,IAGD,KAAK,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAI,EAAa,GAAG,YACpB,EAAO,KAAK,EAGb,OAAO,GAAE,UAAU,cAAc,MC/JnC,EAAE,cAAc,SAEf,KAAgB,EAAV,KAAK,GACX,sBAAuB,GACvB,kBAAmB,EAEnB,sBAAwB,GACxB,mBAAoB,GACpB,oBAAqB,EAErB,wBAAyB,EAGzB,SAAU,WACT,GAAI,KAAK,OAAO,cAAgB,OAAQ,KAAK,OAAO,iBAApD,CAIA,GAIC,GAJG,EAAe,KAAK,mBAAmB,MAAM,GAChD,EAAQ,KAAK,OACb,EAAM,EAAM,KACZ,EAAS,EAAI,mBAAmB,KAAK,QAGtC,MAAK,OAAO,cACZ,KAAK,OAAO,YAAc,KAItB,EAAa,QAAU,KAAK,wBAC/B,EAAY,KAAK,sBAAsB,EAAa,OAAQ,IAE5D,EAAO,GAAK,GACZ,EAAY,KAAK,sBAAsB,EAAa,OAAQ,IAG7D,KAAK,mBAAmB,EAAc,KAGvC,WAAY,SAAU,GAEjB,KAAK,OAAO,mBAGhB,KAAK,qBAAqB,GAE1B,KAAK,OAAO,YAAc,OAG3B,sBAAuB,SAAU,EAAO,GACvC,GAIC,GAAG,EAJA,EAAgB,KAAK,OAAO,QAAQ,2BAA6B,KAAK,uBAAyB,EAAI,GACtG,EAAY,EAAgB,KAAK,KACjC,EAAY,KAAK,KAAO,EACxB,IAOD,KAJA,EAAY,KAAK,IAAI,EAAW,IAEhC,EAAI,OAAS,EAER,EAAI,EAAO,EAAJ,EAAW,IACtB,EAAQ,KAAK,kBAAoB,EAAI,EACrC,EAAI,GAAK,GAAI,GAAE,MAAM,EAAS,EAAI,EAAY,KAAK,IAAI,GAAQ,EAAS,EAAI,EAAY,KAAK,IAAI,IAAQ,QAG1G,OAAO,IAGR,sBAAuB,SAAU,EAAO,GACvC,GAMC,GANG,EAA6B,KAAK,OAAO,QAAQ,2BACpD,EAAY,EAA6B,KAAK,mBAC9C,EAAa,EAA6B,KAAK,sBAC/C,EAAe,EAA6B,KAAK,oBAAsB,KAAK,KAC5E,EAAQ,EACR,IAMD,KAHA,EAAI,OAAS,EAGR,EAAI,EAAO,GAAK,EAAG,IAGf,EAAJ,IACH,EAAI,GAAK,GAAI,GAAE,MAAM,EAAS,EAAI,EAAY,KAAK,IAAI,GAAQ,EAAS,EAAI,EAAY,KAAK,IAAI,IAAQ,UAE1G,GAAS,EAAa,EAAgB,KAAJ,EAClC,GAAa,EAAe,CAE7B,OAAO,IAGR,uBAAwB,WACvB,GAIC,GAAG,EAJA,EAAQ,KAAK,OAChB,EAAM,EAAM,KACZ,EAAK,EAAM,cACX,EAAe,KAAK,mBAAmB,MAAM,EAM9C,KAHA,EAAM,aAAc,EAEpB,KAAK,WAAW,GACX,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAI,EAAa,GAEjB,EAAG,YAAY,GAEX,EAAE,qBACL,EAAE,UAAU,EAAE,0BACP,GAAE,oBAEN,EAAE,iBACL,EAAE,gBAAgB,GAGf,EAAE,aACL,EAAI,YAAY,EAAE,kBACX,GAAE,WAIX,GAAM,KAAK,gBACV,QAAS,KACT,QAAS,IAEV,EAAM,aAAc,EACpB,EAAM,YAAc,QAKtB,EAAE,yBAA2B,EAAE,cAAc,QAC5C,mBAAoB,SAAU,EAAc,GAC3C,GAIC,GAAG,EAAG,EAAK,EAJR,EAAQ,KAAK,OAChB,EAAM,EAAM,KACZ,EAAK,EAAM,cACX,EAAa,KAAK,OAAO,QAAQ,wBAOlC,KAJA,EAAM,aAAc,EAIf,EAAI,EAAG,EAAI,EAAa,OAAQ,IACpC,EAAS,EAAI,mBAAmB,EAAU,IAC1C,EAAI,EAAa,GAGjB,EAAM,GAAI,GAAE,UAAU,KAAK,QAAS,GAAS,GAC7C,EAAI,SAAS,GACb,EAAE,WAAa,EAGf,EAAE,mBAAqB,EAAE,QACzB,EAAE,UAAU,GACR,EAAE,iBACL,EAAE,gBAAgB,KAGnB,EAAG,SAAS,EAEb,MAAK,WAAW,IAEhB,EAAM,aAAc,EACpB,EAAM,KAAK,cACV,QAAS,KACT,QAAS,KAIX,qBAAsB,WACrB,KAAK,4BAKP,EAAE,cAAc,SAEf,mBAAoB,SAAU,EAAc,GAC3C,GASC,GAAG,EAAG,EAAK,EAAS,EAAW,EAT5B,EAAK,KACR,EAAQ,KAAK,OACb,EAAM,EAAM,KACZ,EAAK,EAAM,cACX,EAAkB,KAAK,QACvB,EAAe,EAAI,mBAAmB,GACtC,EAAM,EAAE,KAAK,IACb,EAAa,EAAE,UAAW,KAAK,OAAO,QAAQ,0BAC9C,EAAkB,EAAW,OAuB9B,KApBwB,SAApB,IACH,EAAkB,EAAE,mBAAmB,UAAU,QAAQ,yBAAyB,SAG/E,GAEH,EAAW,QAAU,EAGrB,EAAW,WAAa,EAAW,WAAa,IAAM,+BAGtD,EAAW,QAAU,EAGtB,EAAM,aAAc,EAKf,EAAI,EAAG,EAAI,EAAa,OAAQ,IACpC,EAAI,EAAa,GAEjB,EAAS,EAAI,mBAAmB,EAAU,IAG1C,EAAM,GAAI,GAAE,UAAU,EAAiB,GAAS,GAChD,EAAI,SAAS,GACb,EAAE,WAAa,EAIX,IACH,EAAU,EAAI,MACd,EAAY,EAAQ,iBAAmB,GACvC,EAAQ,MAAM,gBAAkB,EAChC,EAAQ,MAAM,iBAAmB,GAI9B,EAAE,iBACL,EAAE,gBAAgB,KAEf,EAAE,aACL,EAAE,cAIH,EAAG,SAAS,GAER,EAAE,SACL,EAAE,QAAQ,EAQZ,KAJA,EAAM,eACN,EAAM,kBAGD,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAS,EAAI,mBAAmB,EAAU,IAC1C,EAAI,EAAa,GAGjB,EAAE,mBAAqB,EAAE,QACzB,EAAE,UAAU,GAER,EAAE,aACL,EAAE,cAIC,IACH,EAAM,EAAE,WACR,EAAU,EAAI,MACd,EAAQ,MAAM,iBAAmB,EAEjC,EAAI,UAAU,QAAS,IAGzB,MAAK,WAAW,IAEhB,EAAM,aAAc,EAEpB,WAAW,WACV,EAAM,gBACN,EAAM,KAAK,cACV,QAAS,EACT,QAAS,KAER,MAGJ,qBAAsB,SAAU,GAC/B,GAOC,GAAG,EAAG,EAAK,EAAS,EAAW,EAP5B,EAAK,KACR,EAAQ,KAAK,OACb,EAAM,EAAM,KACZ,EAAK,EAAM,cACX,EAAe,EAAc,EAAI,uBAAuB,KAAK,QAAS,EAAY,KAAM,EAAY,QAAU,EAAI,mBAAmB,KAAK,SAC1I,EAAe,KAAK,mBAAmB,MAAM,GAC7C,EAAM,EAAE,KAAK,GAQd,KALA,EAAM,aAAc,EACpB,EAAM,kBAGN,KAAK,WAAW,GACX,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAI,EAAa,GAGZ,EAAE,qBAKP,EAAE,aAGF,EAAE,UAAU,EAAE,0BACP,GAAE,mBAGT,GAAgB,EACZ,EAAE,UACL,EAAE,QAAQ,GACV,GAAgB,GAEb,EAAE,cACL,EAAE,cACF,GAAgB,GAEb,GACH,EAAG,YAAY,GAIZ,IACH,EAAM,EAAE,WACR,EAAU,EAAI,MACd,EAAY,EAAQ,iBAAmB,GACvC,EAAQ,MAAM,iBAAmB,EACjC,EAAI,UAAU,QAAS,KAIzB,GAAM,aAAc,EAEpB,WAAW,WAEV,GAAI,GAAuB,CAC3B,KAAK,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAI,EAAa,GACb,EAAE,YACL,GAKF,KAAK,EAAI,EAAa,OAAS,EAAG,GAAK,EAAG,IACzC,EAAI,EAAa,GAEZ,EAAE,aAIH,EAAE,aACL,EAAE,cAEC,EAAE,iBACL,EAAE,gBAAgB,GAGf,EAAuB,GAC1B,EAAG,YAAY,GAGhB,EAAI,YAAY,EAAE,kBACX,GAAE,WAEV,GAAM,gBACN,EAAM,KAAK,gBACV,QAAS,EACT,QAAS,KAER,QAKL,EAAE,mBAAmB,SAEpB,YAAa,KAEb,WAAY,WACX,KAAK,YAAY,MAAM,KAAM,YAG9B,iBAAkB,WACjB,KAAK,KAAK,GAAG,QAAS,KAAK,mBAAoB,MAE3C,KAAK,KAAK,QAAQ,eACrB,KAAK,KAAK,GAAG,YAAa,KAAK,qBAAsB,MAGtD,KAAK,KAAK,GAAG,UAAW,KAAK,uBAAwB,MAEhD,EAAE,QAAQ,OACd,KAAK,KAAK,YAAY,OAOxB,oBAAqB,WACpB,KAAK,KAAK,IAAI,QAAS,KAAK,mBAAoB,MAChD,KAAK,KAAK,IAAI,YAAa,KAAK,qBAAsB,MACtD,KAAK,KAAK,IAAI,WAAY,KAAK,oBAAqB,MACpD,KAAK,KAAK,IAAI,UAAW,KAAK,uBAAwB,MAItD,KAAK;EAKN,qBAAsB,WAChB,KAAK,MAIV,KAAK,KAAK,GAAG,WAAY,KAAK,oBAAqB,OAGpD,oBAAqB,SAAU,GAE1B,EAAE,QAAQ,SAAS,KAAK,KAAK,SAAU,sBAI3C,KAAK,KAAK,IAAI,WAAY,KAAK,oBAAqB,MACpD,KAAK,YAAY,KAGlB,mBAAoB,WAEnB,KAAK,eAGN,YAAa,SAAU,GAClB,KAAK,aACR,KAAK,YAAY,WAAW,IAI9B,uBAAwB,WACnB,KAAK,aACR,KAAK,YAAY,0BAKnB,iBAAkB,SAAU,GACvB,EAAM,aACT,KAAK,cAAc,YAAY,GAE3B,EAAM,aACT,EAAM,cAGH,EAAM,iBACT,EAAM,gBAAgB,GAGvB,KAAK,KAAK,YAAY,EAAM,kBACrB,GAAM,eC/chB,EAAE,mBAAmB,SASpB,gBAAiB,SAAU,GAoB1B,MAnBK,GAEM,YAAkB,GAAE,mBAC9B,EAAS,EAAO,iBAAiB,qBACvB,YAAkB,GAAE,WAC9B,EAAS,EAAO,QACN,YAAkB,GAAE,cAC9B,EAAS,EAAO,qBACN,YAAkB,GAAE,SAC9B,GAAU,IARV,EAAS,KAAK,iBAAiB,qBAUhC,KAAK,4BAA4B,GACjC,KAAK,wBAGD,KAAK,QAAQ,kBAChB,KAAK,gCAAgC,GAG/B,MAQR,4BAA6B,SAAU,GACtC,GAAI,GAAI,CAGR,KAAK,IAAM,GAOV,IADA,EAAS,EAAO,GAAI,SACb,GACN,EAAO,kBAAmB,EAC1B,EAAS,EAAO,UAWnB,gCAAiC,SAAU,GAC1C,GAAI,GAAI,CAER,KAAK,IAAM,GACV,EAAQ,EAAO,GAGX,KAAK,SAAS,IAEjB,EAAM,QAAQ,KAAK,oBAAoB,OAM3C,EAAE,OAAO,SAQR,mBAAoB,SAAU,EAAS,GACtC,GAAI,GAAO,KAAK,QAAQ,IAcxB,OAZA,GAAE,WAAW,EAAM,GAEnB,KAAK,QAAQ,GAMT,GAA2B,KAAK,UACnC,KAAK,SAAS,OAAO,gBAAgB,MAG/B","file":"dist/leaflet.markercluster.js"} \ No newline at end of file diff --git a/demo/dist/main.css b/demo/dist/main.css deleted file mode 100755 index f400ef1d..00000000 --- a/demo/dist/main.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";@-webkit-keyframes basicModal__fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes basicModal__fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes basicModal__fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes basicModal__fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes basicModal__moveUpFade{0%{-webkit-transform:translateY(80px);transform:translateY(80px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes basicModal__moveUpFade{0%{-webkit-transform:translateY(80px);transform:translateY(80px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes basicModal__shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}20%,60%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes basicModal__shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}20%,60%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}.basicModalContainer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;width:100%;height:100%;top:0;left:0;z-index:1000;-webkit-box-sizing:border-box;box-sizing:border-box}.basicModalContainer *,.basicModalContainer :after,.basicModalContainer :before{-webkit-box-sizing:border-box;box-sizing:border-box}.basicModalContainer--fadeIn{-webkit-animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__fadeIn;animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__fadeIn}.basicModalContainer--fadeOut{-webkit-animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__fadeOut;animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__fadeOut}.basicModalContainer--fadeIn .basicModal--fadeIn{-webkit-animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__moveUpFade;animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__moveUpFade}.basicModalContainer--fadeIn .basicModal--shake{-webkit-animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__shake;animation:.3s cubic-bezier(.51,.92,.24,1.15) basicModal__shake}.basicModal{position:relative;width:500px;background-color:#fff;font-size:14px;border-radius:5px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.basicModal__content{max-height:70vh;overflow:auto;-webkit-overflow-scrolling:touch}.basicModal__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-shadow:0 -1px 0 rgba(0,0,0,.1);box-shadow:0 -1px 0 rgba(0,0,0,.1)}.basicModal__button{display:inline-block;width:100%;font-weight:700;text-align:center;-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.basicModal__button#basicModal__cancel{-ms-flex-negative:2;flex-shrink:2}.basicModal__button#basicModal__action{-ms-flex-negative:1;flex-shrink:1;-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.1);box-shadow:inset 1px 0 0 rgba(0,0,0,.1)}.basicModal__button#basicModal__action:first-child{-webkit-box-shadow:none;box-shadow:none}.basicModal__button:first-child{border-radius:0 0 0 5px}.basicModal__button:last-child{border-radius:0 0 5px}.basicModal__text{width:100%;margin:0;padding:14px 10px;background-color:rgba(0,0,0,0);color:#333;border:none;-webkit-box-shadow:0 1px 0 #c8c8c8;box-shadow:0 1px 0 #c8c8c8;border-radius:0;outline:0;-webkit-transition:background-color .2s,-webkit-box-shadow .2s;transition:background-color .2s,box-shadow .2s,-webkit-box-shadow .2s;-o-transition:background-color .2s,box-shadow .2s}.basicModal__text:hover{background-color:rgba(0,0,0,.02);-webkit-box-shadow:0 1px 0 #b4b4b4;box-shadow:0 1px 0 #b4b4b4}.basicModal__text:focus{background-color:rgba(40,117,237,.05);-webkit-box-shadow:0 1px 0 #2875ed;box-shadow:0 1px 0 #2875ed}.basicModal__text.error{background-color:rgba(255,36,16,.05);-webkit-box-shadow:0 1px 0 #ff2410;box-shadow:0 1px 0 #ff2410}.basicModal p{margin:0 0 5%;width:100%}.basicModal p:last-child{margin:0}.basicModal__small{max-width:340px;text-align:center}.basicModal__small .basicModal__content{padding:10% 5%}.basicModal__xclose#basicModal__cancel{position:absolute;top:-8px;right:-8px;margin:0;padding:0;width:40px;height:40px;background-color:#fff;border-radius:100%;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.basicModal__xclose#basicModal__cancel:after{content:'';position:absolute;left:-3px;top:8px;width:35px;height:34px;background:#fff}.basicModal__xclose#basicModal__cancel svg{position:relative;width:20px;height:39px;fill:#888;z-index:1;-webkit-transition:fill .2s;-o-transition:fill .2s;transition:fill .2s}.basicModal__xclose#basicModal__cancel:after:hover svg,.basicModal__xclose#basicModal__cancel:hover svg{fill:#2875ed}.basicModal__xclose#basicModal__cancel:active svg,.basicModal__xclose#basicModal__cancel:after:active svg{fill:#1364e3}.basicContextContainer{position:fixed;width:100%;height:100%;top:0;left:0;z-index:1000;-webkit-tap-highlight-color:transparent}.basicContext{position:absolute;opacity:0;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:.3s cubic-bezier(.51,.92,.24,1.2) basicContext__popIn;animation:.3s cubic-bezier(.51,.92,.24,1.2) basicContext__popIn}.basicContext *{-webkit-box-sizing:border-box;box-sizing:border-box}.basicContext__item{cursor:pointer;margin-bottom:2px;font-size:14px}.basicContext__item--separator{float:left;width:100%;cursor:default}.basicContext__item--disabled{cursor:default;opacity:.5}.basicContext__data{min-width:140px;text-align:left;white-space:nowrap}.basicContext__icon{display:inline-block}.basicContext--scrollable{height:100%;-webkit-overflow-scrolling:touch;overflow-y:auto}.basicContext--scrollable .basicContext__data{min-width:160px}@-webkit-keyframes basicContext__popIn{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes basicContext__popIn{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1;background-color:#1d1d1d;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}em,i{font-style:italic}b,strong{font-weight:700}*{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:color .3s,opacity .3s ease-out,-webkit-transform .3s ease-out,-webkit-box-shadow .3s;transition:color .3s,opacity .3s ease-out,transform .3s ease-out,box-shadow .3s,-webkit-transform .3s ease-out,-webkit-box-shadow .3s;-o-transition:color .3s,opacity .3s ease-out,transform .3s ease-out,box-shadow .3s}body,html{min-height:100vh;position:relative}body.view{background-color:#0f0f0f}div#container{position:relative}input{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.svgsprite{display:none}.iconic{width:100%;height:100%}#upload{display:none}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(.51,.92,.24,1);animation-timing-function:cubic-bezier(.51,.92,.24,1)}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(.51,.92,.24,1);animation-timing-function:cubic-bezier(.51,.92,.24,1)}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes moveBackground{0%{background-position-x:0}100%{background-position-x:-100px}}@keyframes moveBackground{0%{background-position-x:0}100%{background-position-x:-100px}}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes zoomOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}}@keyframes zoomOut{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:0;-webkit-transform:scale(.8);transform:scale(.8)}}@-webkit-keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}.content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:start;align-content:flex-start;padding:50px 30px 33px 0;width:calc(100% - 30px);-webkit-transition:margin-left .5s;-o-transition:margin-left .5s;transition:margin-left .5s;-webkit-overflow-scrolling:touch;max-width:calc(100vw - 10px)}.content::before{content:"";position:absolute;left:0;width:100%;height:1px;background:rgba(255,255,255,.02)}.content--sidebar{width:calc(100% - 380px)}.content.contentZoomIn .album,.content.contentZoomIn .photo{-webkit-animation-name:zoomIn;animation-name:zoomIn}.content.contentZoomIn .divider{-webkit-animation-name:fadeIn;animation-name:fadeIn}.content.contentZoomOut .album,.content.contentZoomOut .photo{-webkit-animation-name:zoomOut;animation-name:zoomOut}.content.contentZoomOut .divider{-webkit-animation-name:fadeOut;animation-name:fadeOut}.content .album,.content .photo{position:relative;width:202px;height:202px;margin:30px 0 0 30px;cursor:default;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(.51,.92,.24,1);animation-timing-function:cubic-bezier(.51,.92,.24,1)}.content .album .thumbimg,.content .photo .thumbimg{position:absolute;width:200px;height:200px;background:#222;color:#222;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.5);box-shadow:0 2px 5px rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.5);-webkit-transition:opacity .3s ease-out,border-color .3s ease-out,-webkit-transform .3s ease-out;transition:opacity .3s ease-out,transform .3s ease-out,border-color .3s ease-out,-webkit-transform .3s ease-out;-o-transition:opacity .3s ease-out,transform .3s ease-out,border-color .3s ease-out}.content .album .thumbimg>img,.content .photo .thumbimg>img{width:100%;height:100%}.content .album.active .thumbimg,.content .album:focus .thumbimg,.content .album:hover .thumbimg,.content .photo.active .thumbimg,.content .photo:focus .thumbimg,.content .photo:hover .thumbimg{border-color:#2293ec}.content .album:active .thumbimg,.content .photo:active .thumbimg{-webkit-transition:none;-o-transition:none;transition:none;border-color:#0f6ab2}.content .album.selected img,.content .photo.selected img{outline:#2293ec solid 1px}.content .album .video::before,.content .photo .video::before{content:"";position:absolute;display:block;height:100%;width:100%;background:url(../img/play-icon.png) 46% 50% no-repeat;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;will-change:opacity,height}.content .album .video:focus::before,.content .album .video:hover::before,.content .photo .video:focus::before,.content .photo .video:hover::before{opacity:.75}.content .album .livephoto::before,.content .photo .livephoto::before{content:"";position:absolute;display:block;height:100%;width:100%;background:url(../img/live-photo-icon.png) 2% 2% no-repeat;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;will-change:opacity,height}.content .album .livephoto:focus::before,.content .album .livephoto:hover::before,.content .photo .livephoto:focus::before,.content .photo .livephoto:hover::before{opacity:.75}.content .album .thumbimg:first-child,.content .album .thumbimg:nth-child(2){-webkit-transform:rotate(0) translateY(0) translateX(0);-ms-transform:rotate(0) translateY(0) translateX(0);transform:rotate(0) translateY(0) translateX(0);opacity:0}.content .album:focus .thumbimg:nth-child(1),.content .album:focus .thumbimg:nth-child(2),.content .album:hover .thumbimg:nth-child(1),.content .album:hover .thumbimg:nth-child(2){opacity:1;will-change:transform}.content .album:focus .thumbimg:nth-child(1),.content .album:hover .thumbimg:nth-child(1){-webkit-transform:rotate(-2deg) translateY(10px) translateX(-12px);-ms-transform:rotate(-2deg) translateY(10px) translateX(-12px);transform:rotate(-2deg) translateY(10px) translateX(-12px)}.content .album:focus .thumbimg:nth-child(2),.content .album:hover .thumbimg:nth-child(2){-webkit-transform:rotate(5deg) translateY(-8px) translateX(12px);-ms-transform:rotate(5deg) translateY(-8px) translateX(12px);transform:rotate(5deg) translateY(-8px) translateX(12px)}.content .blurred span{overflow:hidden}.content .blurred img{-webkit-filter:blur(5px);filter:blur(5px)}.content .album .overlay,.content .photo .overlay{position:absolute;margin:0 1px;width:200px;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.6)));background:-o-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.6));background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.6));bottom:1px}.content .album .thumbimg[data-overlay=false]+.overlay{background:0 0}.content .photo .overlay{opacity:0}.content .photo.active .overlay,.content .photo:focus .overlay,.content .photo:hover .overlay{opacity:1}.content .album .overlay h1,.content .photo .overlay h1{min-height:19px;width:180px;margin:12px 0 5px 15px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.4);font-size:16px;font-weight:700;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.content .album .overlay a,.content .photo .overlay a{display:block;margin:0 0 12px 15px;font-size:11px;color:#ccc;text-shadow:0 1px 3px rgba(0,0,0,.4)}.content .photo .overlay a .iconic{fill:#ccc;margin:0 5px 0 0;width:8px;height:8px}.content .album .thumbimg[data-overlay=false]+.overlay a,.content .album .thumbimg[data-overlay=false]+.overlay h1{text-shadow:none}.content .album .badges,.content .photo .badges{position:relative;margin:-1px 0 0 6px}.content .album .subalbum_badge{position:absolute;right:0;top:0}.content .album .badge,.content .photo .badge{display:none;margin:0 0 0 6px;padding:12px 8px 6px;width:18px;background:#d92c34;-webkit-box-shadow:0 0 2px rgba(0,0,0,.6);box-shadow:0 0 2px rgba(0,0,0,.6);border-radius:0 0 5px 5px;border:1px solid #fff;border-top:none;color:#fff;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.4);opacity:.9}.content .album .badge--visible,.content .photo .badge--visible{display:inline-block}.content .album .badge--not--hidden,.content .photo .badge--not--hidden{background:#0a0}.content .album .badge--hidden,.content .photo .badge--hidden{background:#f90}.content .album .badge--star,.content .photo .badge--star{display:inline-block;background:#fc0}.content .album .badge--nsfw,.content .photo .badge--nsfw{display:inline-block;background:#ff82ee}.content .album .badge--list,.content .photo .badge--list{background:#2293ec}.content .album .badge--tag,.content .photo .badge--tag{display:inline-block;background:#0a0}.content .album .badge .iconic,.content .photo .badge .iconic{fill:#fff;width:16px;height:16px}.content .album .badge--folder,.content .photo .badge--folder{display:inline-block;-webkit-box-shadow:none;box-shadow:none;background:0 0;border:none}.content .album .badge--folder .iconic,.content .photo .badge--folder .iconic{width:12px;height:12px}.content .divider{margin:50px 0 0;padding:10px 0 0;width:100%;opacity:0;border-top:1px solid rgba(255,255,255,.02);-webkit-box-shadow:0 -1px 0 rgba(0,0,0,.2);box-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(.51,.92,.24,1);animation-timing-function:cubic-bezier(.51,.92,.24,1)}.content .divider:first-child{margin-top:10px;border-top:0;-webkit-box-shadow:none;box-shadow:none}.content .divider h1{margin:0 0 0 30px;color:rgba(255,255,255,.6);font-size:14px;font-weight:700}.no_content{position:absolute;top:50%;left:50%;padding-top:20px;color:rgba(255,255,255,.35);text-align:center;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.no_content .iconic{fill:rgba(255,255,255,.3);margin:0 0 10px;width:50px;height:50px}.no_content p{font-size:16px;font-weight:700}.leftMenu__open{margin-left:250px;width:calc(100% - 280px)}.leftMenu{height:100vh;width:0;position:fixed;z-index:4;top:0;left:0;background-color:#111;overflow-x:hidden;padding-top:60px;-webkit-transition:.5s;-o-transition:.5s;transition:.5s}.leftMenu a{padding:8px 8px 8px 32px;text-decoration:none;font-size:18px;color:#818181;display:block;-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.leftMenu a.linkMenu{white-space:nowrap}.leftMenu a:hover{color:#f1f1f1}.leftMenu .closebtn{position:absolute;top:0;right:25px;font-size:36px;margin-left:50px}.leftMenu .closetxt{position:absolute;top:0;left:0;font-size:24px;height:28px;padding-top:16px;color:#111;display:inline-block;width:210px}.leftMenu .closetxt:hover{color:#818181}.leftMenu .iconic{display:inline-block;margin:0 10px 0 1px;width:15px;height:14px;fill:#818181}.leftMenu .iconic.ionicons{margin:0 8px -2px 0;width:18px;height:18px}.leftMenu__visible{width:250px}@media screen and (max-height:450px){.leftMenu{padding-top:15px}.leftMenu a{font-size:18px}}.basicContext{padding:5px 0 6px;background:-webkit-gradient(linear,left top,left bottom,from(#333),to(#252525));background:-o-linear-gradient(top,#333,#252525);background:linear-gradient(to bottom,#333,#252525);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 4px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.05);border-radius:5px;border:1px solid rgba(0,0,0,.7);border-bottom:1px solid rgba(0,0,0,.8);-webkit-transition:none;-o-transition:none;transition:none}.basicContext__item--separator{margin:4px 0;height:2px;background:rgba(0,0,0,.2);border-bottom:1px solid rgba(255,255,255,.06)}.basicContext__item:last-child{margin-bottom:0}.basicContext__data{min-width:auto;padding:6px 25px 7px 12px;color:#fff;-webkit-transition:none;-o-transition:none;transition:none;cursor:default}.basicContext__item:not(.basicContext__item--disabled):hover .basicContext__data{background:-webkit-gradient(linear,left top,left bottom,from(#2293ec),to(#1386e1));background:-o-linear-gradient(top,#2293ec,#1386e1);background:linear-gradient(to bottom,#2293ec,#1386e1)}.basicContext__item:not(.basicContext__item--disabled):active .basicContext__data{background:-webkit-gradient(linear,left top,left bottom,from(#1178ca),to(#0f6ab2));background:-o-linear-gradient(top,#1178ca,#0f6ab2);background:linear-gradient(to bottom,#1178ca,#0f6ab2)}.basicContext__icon{margin-right:10px;width:12px;text-align:center}.basicContext__data .cover{position:absolute;background-color:#222;border-radius:2px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.5);box-shadow:0 0 0 1px rgba(0,0,0,.5)}.basicContext__data .title{display:inline-block;margin:0 0 3px 26px}.basicContext__data .iconic{display:inline-block;margin:0 10px 0 1px;width:11px;height:10px;fill:#fff}.basicContext__data .iconic.ionicons{margin:0 8px -2px 0;width:14px;height:14px}.basicContext__data input#link{margin:-2px 0;padding:5px 7px 6px;width:100%;background:#333;color:#fff;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);border:1px solid rgba(0,0,0,.4);border-radius:3px;outline:0}.basicContext__item--noHover .basicContext__data{padding-right:12px}.basicContext__item--noHover:hover .basicContext__data{background:0 0!important}.basicModal .switch:last-child{padding-bottom:42px}.basicModal .hr{padding:0 30px 15px;width:100%}.basicModal .hr hr{border:none;border-top:1px solid rgba(0,0,0,.2)}.header{position:fixed;height:49px;width:100%;background:-webkit-gradient(linear,left top,left bottom,from(#222),to(#1a1a1a));background:-o-linear-gradient(top,#222,#1a1a1a);background:linear-gradient(to bottom,#222,#1a1a1a);border-bottom:1px solid #0f0f0f;z-index:1;-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-o-transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out}.header--hidden{-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px);transform:translateY(-60px)}.header--loading{-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}.header--error{-webkit-transform:translateY(40px);-ms-transform:translateY(40px);transform:translateY(40px)}.header--view{background:0 0;border-bottom:none}.header--view.header--error{background-color:rgba(10,10,10,.99)}.header__toolbar{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;padding:0 10px}.header__toolbar--visible{display:-webkit-box;display:-ms-flexbox;display:flex}.header__title{width:100%;padding:16px 0;color:#fff;font-size:16px;font-weight:700;text-align:center;cursor:default;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis;-webkit-transition:margin-left .5s;-o-transition:margin-left .5s;transition:margin-left .5s}.header__title .iconic{display:none;margin:0 0 0 5px;width:10px;height:10px;fill:rgba(255,255,255,.5);-webkit-transition:fill .2s ease-out;-o-transition:fill .2s ease-out;transition:fill .2s ease-out}.header__title:hover .iconic{fill:#fff}.header__title:active .iconic{-webkit-transition:none;-o-transition:none;transition:none;fill:rgba(255,255,255,.8)}.header__title--editable .iconic{display:inline-block}.header .button{-ms-flex-negative:0;flex-shrink:0;padding:16px 8px;height:15px}.header .button .iconic{width:15px;height:15px;fill:rgba(255,255,255,.5);-webkit-transition:fill .2s ease-out;-o-transition:fill .2s ease-out;transition:fill .2s ease-out}.header .button:hover .iconic{fill:#fff}.header .button:active .iconic{-webkit-transition:none;-o-transition:none;transition:none;fill:rgba(255,255,255,.8)}.header .button--star.active .iconic{fill:#f0ef77}.header .button--eye.active .iconic{fill:#d92c34}.header .button--eye.active--not-hidden .iconic{fill:#0a0}.header .button--eye.active--hidden .iconic{fill:#f90}.header .button--share .iconic.ionicons{margin:-2px 0;width:18px;height:18px}.header .button--nsfw.active .iconic{fill:#ff82ee}.header .button--info.active .iconic{fill:#2293ec}.header #button_settings,.header #button_signin{padding:16px 48px 16px 8px}.header__divider{-ms-flex-negative:0;flex-shrink:0;width:14px}.header__search{-ms-flex-negative:0;flex-shrink:0;width:80px;margin:0;padding:5px 12px 6px;background-color:#1d1d1d;color:#fff;border:1px solid rgba(0,0,0,.9);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.04);box-shadow:0 1px 0 rgba(255,255,255,.04);outline:0;border-radius:50px;opacity:.6;-webkit-transition:opacity .3s ease-out,width .2s ease-out,-webkit-box-shadow .3s ease-out;transition:opacity .3s ease-out,box-shadow .3s ease-out,width .2s ease-out,-webkit-box-shadow .3s ease-out;-o-transition:opacity .3s ease-out,box-shadow .3s ease-out,width .2s ease-out}.header__search:focus{width:140px;border-color:#2293ec;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0);box-shadow:0 1px 0 rgba(255,255,255,0);opacity:1}.header__search:focus~.header__clear{opacity:1}.header__search::-ms-clear{display:none}.header__clear{position:absolute;right:90px;padding:0;color:rgba(255,255,255,.5);font-size:30px;opacity:0;-webkit-transition:color .2s ease-out;-o-transition:color .2s ease-out;transition:color .2s ease-out;cursor:default}.header__clear:hover{color:#fff}.header__clear_nomap{right:60px}.header__clear_public{right:17px}.header__hostedwith{-ms-flex-negative:0;flex-shrink:0;padding:5px 10px;margin:11px 0;color:#888;font-size:13px;border-radius:100px;cursor:default}.header__hostedwith:hover{background-color:rgba(0,0,0,.3)}.header .leftMenu__open{margin-left:250px}#imageview{position:fixed;display:none;top:0;left:0;width:100%;height:100%;background-color:rgba(10,10,10,.98);-webkit-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}#imageview.view{background-color:inherit}#imageview.full{background-color:#000;cursor:none}#imageview #image,#imageview #livephoto{position:absolute;top:60px;right:30px;bottom:30px;left:30px;margin:auto;max-width:calc(100% - 60px);max-height:calc(100% - 90px);width:auto;height:auto;-webkit-transition:top .3s,right .3s,bottom .3s,left .3s,max-width .3s,max-height .3s;-o-transition:top .3s,right .3s,bottom .3s,left .3s,max-width .3s,max-height .3s;transition:top .3s,right .3s,bottom .3s,left .3s,max-width .3s,max-height .3s;-webkit-animation-name:zoomIn;animation-name:zoomIn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(.51,.92,.24,1.15);animation-timing-function:cubic-bezier(.51,.92,.24,1.15);background-size:contain;background-position:center;background-repeat:no-repeat}#imageview.full #image,#imageview.full #livephoto{top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%}#imageview.image--sidebar #image{right:380px;max-width:calc(100% - 410px)}@media (max-width:640px){#imageview #image,#imageview #livephoto{top:60px;right:20px;bottom:20px;left:20px;max-width:calc(100% - 40px);max-height:calc(100% - 80px)}#imageview.image--sidebar #image{right:370px;max-width:calc(100% - 390px)}}#imageview.image--sidebar #livephoto{right:380px;max-width:calc(100% - 410px)}#imageview #image_overlay{position:absolute;bottom:30px;left:30px;color:#fff;text-shadow:1px 1px 2px #000;z-index:3}#imageview #image_overlay h1{visibility:hidden;opacity:0;font-size:28px;font-weight:500;-webkit-transition:visibility .3s linear,opacity .3s linear;-o-transition:visibility .3s linear,opacity .3s linear;transition:visibility .3s linear,opacity .3s linear}#imageview #image_overlay p{margin-top:5px;font-size:20px;line-height:24px}#imageview.full #image_overlay h1{visibility:visible;opacity:1}#imageview .arrow_wrapper{position:fixed;width:15%;height:calc(100% - 60px);top:60px}#imageview .arrow_wrapper--previous{left:0}#imageview .arrow_wrapper--next{right:0}@media (max-width:640px){#imageview.image--sidebar #livephoto{right:370px;max-width:calc(100% - 390px)}#imageview .arrow_wrapper{display:none}}#imageview .arrow_wrapper a{position:fixed;top:50%;margin:-19px 0 0;padding:8px 12px;width:16px;height:22px;background-size:100% 100%;border:1px solid rgba(255,255,255,.8);opacity:.6;z-index:2;-webkit-transition:opacity .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,opacity .2s ease-out,-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out,opacity .2s ease-out;will-change:transform}#imageview .arrow_wrapper a#previous{left:-1px;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#imageview .arrow_wrapper a#next{right:-1px;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#imageview .arrow_wrapper:hover a#next,#imageview .arrow_wrapper:hover a#previous{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}#imageview .arrow_wrapper a:hover{opacity:1}#imageview .arrow_wrapper .iconic{fill:rgba(255,255,255,.8)}#imageview.image--sidebar .arrow_wrapper--next{right:350px}#imageview.image--sidebar .arrow_wrapper a#next{right:349px}#imageview video{z-index:1}#mapview{position:fixed;display:none;top:0;left:0;width:100%;height:100%;background-color:rgba(100,10,10,.98);-webkit-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}#mapview.view{background-color:inherit}#mapview.full{background-color:#000;cursor:none}#mapview #leaflet_map_full{top:50px;height:100%;width:100%;float:left}.leaflet-marker-photo img{width:100%;height:100%}.image-leaflet-popup{width:100%}.leaflet-popup-content div{pointer-events:none;position:absolute;bottom:19px;left:22px;right:22px;padding-bottom:10px;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.6)));background:-o-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.6));background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.6))}.leaflet-popup-content h1{top:0;position:relative;margin:12px 0 5px 15px;font-size:16px;font-weight:700;text-shadow:0 1px 3px rgba(255,255,255,.4);color:#fff;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.leaflet-popup-content span{margin-left:12px}.leaflet-popup-content svg{fill:#fff;vertical-align:middle}.leaflet-popup-content p{display:inline;font-size:11px;color:#fff}.leaflet-popup-content .iconic{width:20px;height:15px}.sidebar{position:fixed;top:50px;right:-360px;width:350px;height:calc(100% - 50px);background-color:rgba(25,25,25,.98);border-left:1px solid rgba(0,0,0,.2);-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform .3s cubic-bezier(.51,.92,.24,1);transition:transform .3s cubic-bezier(.51,.92,.24,1);-o-transition:transform .3s cubic-bezier(.51,.92,.24,1);transition:transform .3s cubic-bezier(.51,.92,.24,1),-webkit-transform .3s cubic-bezier(.51,.92,.24,1);z-index:4}.sidebar.active{-webkit-transform:translateX(-360px);-ms-transform:translateX(-360px);transform:translateX(-360px)}.sidebar__header{float:left;height:49px;width:100%;background:-webkit-gradient(linear,left top,left bottom,from(rgba(255,255,255,.02)),to(rgba(0,0,0,0)));background:-o-linear-gradient(top,rgba(255,255,255,.02),rgba(0,0,0,0));background:linear-gradient(to bottom,rgba(255,255,255,.02),rgba(0,0,0,0));border-top:1px solid #2293ec}.sidebar__header h1{position:absolute;margin:15px 0;width:100%;color:#fff;font-size:16px;font-weight:700;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar__wrapper{float:left;height:calc(100% - 49px);width:350px;overflow:auto;-webkit-overflow-scrolling:touch}.sidebar__divider{float:left;padding:12px 0 8px;width:100%;border-top:1px solid rgba(255,255,255,.02);-webkit-box-shadow:0 -1px 0 rgba(0,0,0,.2);box-shadow:0 -1px 0 rgba(0,0,0,.2)}.sidebar__divider:first-child{border-top:0;-webkit-box-shadow:none;box-shadow:none}.sidebar__divider h1{margin:0 0 0 20px;color:rgba(255,255,255,.6);font-size:14px;font-weight:700;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar .edit{display:inline-block;margin-left:3px;width:10px}.sidebar .edit .iconic{width:10px;height:10px;fill:rgba(255,255,255,.5);-webkit-transition:fill .2s ease-out;-o-transition:fill .2s ease-out;transition:fill .2s ease-out}.sidebar .edit:hover .iconic{fill:#fff}.sidebar .edit:active .iconic{-webkit-transition:none;-o-transition:none;transition:none;fill:rgba(255,255,255,.8)}.sidebar table{float:left;margin:10px 0 15px 20px;width:calc(100% - 20px)}.sidebar table tr td{padding:5px 0;color:#fff;font-size:14px;line-height:19px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar table tr td:first-child{width:110px}.sidebar table tr td:last-child{padding-right:10px}.sidebar table tr td span{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar #tags{width:calc(100% - 40px);margin:16px 20px 12px;color:#fff;display:inline-block}.sidebar #tags>div{display:inline-block}.sidebar #tags .empty{font-size:14px;margin:0 2px 8px 0;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar #tags .edit{margin-top:6px}.sidebar #tags .empty .edit{margin-top:0}.sidebar #tags .tag{cursor:default;display:inline-block;padding:6px 10px;margin:0 6px 8px 0;background-color:rgba(0,0,0,.5);border-radius:100px;font-size:12px;-webkit-transition:background-color .2s;-o-transition:background-color .2s;transition:background-color .2s;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.sidebar #tags .tag:hover{background-color:rgba(0,0,0,.3)}.sidebar #tags .tag:hover.search{cursor:pointer}.sidebar #tags .tag span{float:right;padding:0;margin:0 0 -2px;width:0;overflow:hidden;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:width .2s,margin .2s,fill .2s ease-out,-webkit-transform .2s;transition:width .2s,margin .2s,transform .2s,fill .2s ease-out,-webkit-transform .2s;-o-transition:width .2s,margin .2s,transform .2s,fill .2s ease-out}.sidebar #tags .tag span .iconic{fill:#d92c34;width:8px;height:8px}.sidebar #tags .tag span:hover .iconic{fill:#e1575e}.sidebar #tags .tag span:active .iconic{-webkit-transition:none;-o-transition:none;transition:none;fill:#b22027}.sidebar #tags .tag:hover span{width:9px;margin:0 0 -2px 5px;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.sidebar #leaflet_map_single_photo{margin:10px 0 0 20px;height:180px;width:calc(100% - 40px);float:left}.sidebar .attr_location.search{cursor:pointer}#loading{display:none;position:fixed;width:100%;height:3px;background-size:100px 3px;background-repeat:repeat-x;border-bottom:1px solid rgba(0,0,0,.3);-webkit-animation-name:moveBackground;animation-name:moveBackground;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#loading.loading{height:3px;background-image:-webkit-gradient(linear,left top,right top,from(#153674),color-stop(47%,#153674),color-stop(53%,#2651ae),to(#2651ae));background-image:-o-linear-gradient(left,#153674 0,#153674 47%,#2651ae 53%,#2651ae 100%);background-image:linear-gradient(to right,#153674 0,#153674 47%,#2651ae 53%,#2651ae 100%);z-index:2}#loading.error{height:40px;background-color:#2f0d0e;background-image:-webkit-gradient(linear,left top,right top,from(#451317),color-stop(47%,#451317),color-stop(53%,#aa3039),to(#aa3039));background-image:-o-linear-gradient(left,#451317 0,#451317 47%,#aa3039 53%,#aa3039 100%);background-image:linear-gradient(to right,#451317 0,#451317 47%,#aa3039 53%,#aa3039 100%);z-index:1}#loading.success{height:40px;background-color:#070;background-image:-webkit-gradient(linear,left top,right top,from(#070),color-stop(47%,#090),color-stop(53%,#0a0),to(#0c0));background-image:-o-linear-gradient(left,#070 0,#090 47%,#0a0 53%,#0c0 100%);background-image:linear-gradient(to right,#070 0,#090 47%,#0a0 53%,#0c0 100%);z-index:1}#loading .leftMenu__open{padding-left:250px}#loading h1{margin:13px 13px 0;color:#ddd;font-size:14px;font-weight:700;text-shadow:0 1px 0 #000;text-transform:capitalize}#loading h1 span{margin-left:10px;font-weight:400;text-transform:none}.basicModalContainer{background-color:rgba(0,0,0,.85)}.basicModalContainer--error{-webkit-transform:translateY(40px);-ms-transform:translateY(40px);transform:translateY(40px)}.basicModal{background:-webkit-gradient(linear,left top,left bottom,from(#444),to(#333));background:-o-linear-gradient(top,#444,#333);background:linear-gradient(to bottom,#444,#333);-webkit-box-shadow:0 1px 4px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 4px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.05)}.basicModal--error{-webkit-transform:translateY(-40px);-ms-transform:translateY(-40px);transform:translateY(-40px)}.basicModal__content{padding:0}.basicModal__content p{margin:0}.basicModal__buttons{-webkit-box-shadow:none;box-shadow:none}.basicModal p{padding:10px 30px;color:rgba(255,255,255,.9);font-size:14px;text-align:left;line-height:20px}.basicModal p b{font-weight:700;color:#fff}.basicModal p a{color:rgba(255,255,255,.9);text-decoration:none;border-bottom:1px dashed #888}.basicModal p:first-of-type{padding-top:42px}.basicModal p:last-of-type{padding-bottom:40px}.basicModal p.signIn:first-of-type{padding-top:30px}.basicModal p.less,.basicModal p.signIn:last-of-type{padding-bottom:30px}.basicModal p.photoPublic{padding:0 30px;margin:30px 0}.basicModal p.importServer:last-of-type{padding-bottom:0}.basicModal__button{padding:13px 0 15px;background:rgba(0,0,0,.02);color:rgba(255,255,255,.5);border-top:1px solid rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02);box-shadow:inset 0 1px 0 rgba(255,255,255,.02);cursor:default}.basicModal__button:hover{background:rgba(255,255,255,.02)}.basicModal__button--active,.basicModal__button:active{-webkit-transition:none;-o-transition:none;transition:none;background:rgba(0,0,0,.1)}.basicModal__button#basicModal__action{color:#2293ec;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2)}.basicModal__button#basicModal__action.red{color:#d92c34}.basicModal__button.hidden{display:none}.basicModal input.text{padding:9px 2px;width:100%;background-color:transparent;color:#fff;border:none;border-bottom:1px solid #222;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);outline:0}.basicModal input.text:focus{border-bottom-color:#2293ec}.basicModal input.text.error{border-bottom-color:#d92c34}.basicModal input.text:first-child{margin-top:10px}.basicModal input.text:last-child{margin-bottom:10px}.basicModal .choice{padding:0 30px 15px;width:100%;color:#fff}.basicModal .choice:last-child{padding-bottom:40px}.basicModal .choice label{float:left;color:#fff;font-size:14px;font-weight:700}.basicModal .choice label input{position:absolute;margin:0;opacity:0}.basicModal .choice label .checkbox{float:left;display:block;width:16px;height:16px;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.basicModal .choice label .checkbox .iconic{-webkit-box-sizing:border-box;box-sizing:border-box;fill:#2293ec;padding:2px;opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:opacity .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);-o-transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1)}.basicModal .choice label input:checked~.checkbox{background:rgba(0,0,0,.5)}.basicModal .choice label input:checked~.checkbox .iconic{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.basicModal .choice label input:active~.checkbox{background:rgba(0,0,0,.3)}.basicModal .choice label input:active~.checkbox .iconic{opacity:.8}.basicModal .choice label input:disabled~.checkbox{background:rgba(0,0,0,.2);cursor:not-allowed}.basicModal .choice label input:disabled~.checkbox .iconic{opacity:.3}.basicModal .choice label input:disabled~.label{color:rgba(255,255,255,.6)}.basicModal .choice label .label{margin:0 0 0 18px}.basicModal .choice p{clear:both;padding:2px 0 0 35px;margin:0;width:100%;color:rgba(255,255,255,.6);font-size:13px}.basicModal .choice input.text{display:none;margin-top:5px;margin-left:35px;width:calc(100% - 35px)}.basicModal .choice input.text:disabled{cursor:not-allowed}.basicModal .select{display:inline-block;position:relative;margin:5px 7px;padding:0;width:210px;background:rgba(0,0,0,.3);color:#fff;border-radius:3px;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);font-size:11px;line-height:16px;overflow:hidden;outline:0;vertical-align:middle}.basicModal .select::after{position:absolute;content:"≡";right:8px;top:4px;color:#2293ec;font-size:16px;line-height:16px;font-weight:700;pointer-events:none}.basicModal .select select{margin:0;padding:4px 8px;width:120%;color:#fff;font-size:11px;line-height:16px;border:0;outline:0;-webkit-box-shadow:none;box-shadow:none;border-radius:0;background-color:transparent;background-image:none;-moz-appearance:none;-webkit-appearance:none;appearance:none}.basicModal .select select:focus{outline:0}.basicModal .select select option{background:#333!important;color:#fff!important;margin:0;padding:0;-webkit-transition:none;-o-transition:none;transition:none}.basicModal .version{margin:-5px 0 0;padding:0 30px 30px!important;color:rgba(255,255,255,.3);font-size:12px;text-align:right}.basicModal .version span{display:none}.basicModal .version span a{color:rgba(255,255,255,.3)}.basicModal div.version{position:absolute;top:20px;right:0}.basicModal h1{float:left;width:100%;padding:12px 0;color:#fff;font-size:16px;font-weight:700;text-align:center}.basicModal .rows{margin:0 8px 8px;width:calc(100% - 16px);height:300px;background-color:rgba(0,0,0,.4);overflow:hidden;overflow-y:auto;border-radius:3px;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.4);box-shadow:inset 0 0 3px rgba(0,0,0,.4)}.basicModal .rows .row{float:left;padding:8px 0;width:100%;background-color:rgba(255,255,255,.02)}.basicModal .rows .row:nth-child(2n){background-color:rgba(255,255,255,0)}.basicModal .rows .row a.name{float:left;padding:5px 10px;width:70%;color:#fff;font-size:14px;white-space:nowrap;overflow:hidden}.basicModal .rows .row a.status{float:left;padding:5px 10px;width:30%;color:rgba(255,255,255,.5);font-size:14px;text-align:right;-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.basicModal .rows .row a.status.error,.basicModal .rows .row a.status.success,.basicModal .rows .row a.status.warning{-webkit-animation:none;animation:none}.basicModal .rows .row a.status.error{color:#e92a00}.basicModal .rows .row a.status.warning{color:#e4e900}.basicModal .rows .row a.status.success{color:#7ee900}.basicModal .rows .row p.notice{display:none;float:left;padding:2px 10px 5px;width:100%;color:rgba(255,255,255,.5);font-size:12px;overflow:hidden;line-height:16px}.basicModal .switch{padding:0 30px;margin-bottom:15px;width:100%;color:#fff}.basicModal .switch:first-child{padding-top:42px}.basicModal .switch input{opacity:0;width:0;height:0;margin:0}.basicModal .switch label{float:left;color:#fff;font-size:14px;font-weight:700}.basicModal .switch .slider{display:inline-block;width:42px;height:22px;left:-9px;bottom:-6px;position:relative;cursor:pointer;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);background:rgba(0,0,0,.3);-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.basicModal .switch .slider:before{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#2293ec;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.basicModal .switch input:checked+.slider{background-color:#2293ec}.basicModal .switch input:checked+.slider:before{-ms-transform:translateX(20px);-webkit-transform:translateX(20px);transform:translateX(20px);background-color:#fff}.basicModal .switch .slider.round{border-radius:20px}.basicModal .switch .slider.round:before{border-radius:50%}.basicModal .switch label input:disabled~.slider{background:rgba(0,0,0,.2);cursor:not-allowed}.basicModal .switch label input:disabled~.slider .iconic{opacity:.3}.basicModal .switch .label--disabled{color:rgba(255,255,255,.6)}.basicModal .switch p{clear:both;padding:2px 0 0;margin:0;width:100%;color:rgba(255,255,255,.6);font-size:13px}#sensitive_warning{background:rgba(100,0,0,.95);width:100vw;height:100vh;position:fixed;top:0;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff}#sensitive_warning h1{font-size:36px;font-weight:700;border-bottom:2px solid #fff;margin-bottom:15px}#sensitive_warning p{font-size:20px;max-width:40%;margin-top:15px}.settings_view{width:80%;max-width:600px;margin-left:auto;margin-right:auto}.setCSS,.setDefaultLicense,.setDropBox,.setLang,.setLayout,.setLocationDecoding,.setLocationDecodingCachingType,.setLocationShow,.setLocationShowPublic,.setLogin,.setMapDisplay,.setMapDisplayPublic,.setMapIncludeSubalbums,.setMapProvider,.setNSFWVisible,.setOverlay,.setOverlayType,.setPublicSearch,.setSorting{font-size:14px;width:100%;padding:5%}.setCSS p,.setDefaultLicense p,.setDropBox p,.setLang p,.setLayout p,.setLocationDecoding p,.setLocationDecodingCachingType p,.setLocationShow p,.setLocationShowPublic p,.setLogin p,.setMapDisplay p,.setMapDisplayPublic p,.setMapIncludeSubalbums p,.setMapProvider p,.setNSFWVisible p,.setOverlay p,.setOverlayType p,.setPublicSearch p,.setSorting p{margin:0 0 5%;width:100%;color:#ccc;line-height:16px}.setCSS p a,.setDefaultLicense p a,.setDropBox p a,.setLang p a,.setLayout p a,.setLocationDecoding p a,.setLocationDecodingCachingType p a,.setLocationShow p a,.setLocationShowPublic p a,.setLogin p a,.setMapDisplay p a,.setMapDisplayPublic p a,.setMapIncludeSubalbums p a,.setMapProvider p a,.setNSFWVisible p a,.setOverlay p a,.setOverlayType p a,.setPublicSearch p a,.setSorting p a{color:rgba(255,255,255,.9);text-decoration:none;border-bottom:1px dashed #888}.setCSS p:last-of-type,.setDefaultLicense p:last-of-type,.setDropBox p:last-of-type,.setLang p:last-of-type,.setLayout p:last-of-type,.setLocationDecoding p:last-of-type,.setLocationDecodingCachingType p:last-of-type,.setLocationShow p:last-of-type,.setLocationShowPublic p:last-of-type,.setLogin p:last-of-type,.setMapDisplay p:last-of-type,.setMapDisplayPublic p:last-of-type,.setMapIncludeSubalbums p:last-of-type,.setMapProvider p:last-of-type,.setNSFWVisible p:last-of-type,.setOverlay p:last-of-type,.setOverlayType p:last-of-type,.setPublicSearch p:last-of-type,.setSorting p:last-of-type{margin:0}.setCSS input.text,.setDefaultLicense input.text,.setDropBox input.text,.setLang input.text,.setLayout input.text,.setLocationDecoding input.text,.setLocationDecodingCachingType input.text,.setLocationShow input.text,.setLocationShowPublic input.text,.setLogin input.text,.setMapDisplay input.text,.setMapDisplayPublic input.text,.setMapIncludeSubalbums input.text,.setMapProvider input.text,.setNSFWVisible input.text,.setOverlay input.text,.setOverlayType input.text,.setPublicSearch input.text,.setSorting input.text{padding:9px 2px;width:100%;background-color:transparent;color:#fff;border:none;border-bottom:1px solid #222;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);outline:0}.setCSS input.text:focus,.setDefaultLicense input.text:focus,.setDropBox input.text:focus,.setLang input.text:focus,.setLayout input.text:focus,.setLocationDecoding input.text:focus,.setLocationDecodingCachingType input.text:focus,.setLocationShow input.text:focus,.setLocationShowPublic input.text:focus,.setLogin input.text:focus,.setMapDisplay input.text:focus,.setMapDisplayPublic input.text:focus,.setMapIncludeSubalbums input.text:focus,.setMapProvider input.text:focus,.setNSFWVisible input.text:focus,.setOverlay input.text:focus,.setOverlayType input.text:focus,.setPublicSearch input.text:focus,.setSorting input.text:focus{border-bottom-color:#2293ec}.setCSS input.text.error,.setDefaultLicense input.text.error,.setDropBox input.text.error,.setLang input.text.error,.setLayout input.text.error,.setLocationDecoding input.text.error,.setLocationDecodingCachingType input.text.error,.setLocationShow input.text.error,.setLocationShowPublic input.text.error,.setLogin input.text.error,.setMapDisplay input.text.error,.setMapDisplayPublic input.text.error,.setMapIncludeSubalbums input.text.error,.setMapProvider input.text.error,.setNSFWVisible input.text.error,.setOverlay input.text.error,.setOverlayType input.text.error,.setPublicSearch input.text.error,.setSorting input.text.error{border-bottom-color:#d92c34}.setCSS input.text:first-child,.setDefaultLicense input.text:first-child,.setDropBox input.text:first-child,.setLang input.text:first-child,.setLayout input.text:first-child,.setLocationDecoding input.text:first-child,.setLocationDecodingCachingType input.text:first-child,.setLocationShow input.text:first-child,.setLocationShowPublic input.text:first-child,.setLogin input.text:first-child,.setMapDisplay input.text:first-child,.setMapDisplayPublic input.text:first-child,.setMapIncludeSubalbums input.text:first-child,.setMapProvider input.text:first-child,.setNSFWVisible input.text:first-child,.setOverlay input.text:first-child,.setOverlayType input.text:first-child,.setPublicSearch input.text:first-child,.setSorting input.text:first-child{margin-top:10px}.setCSS input.text:last-child,.setDefaultLicense input.text:last-child,.setDropBox input.text:last-child,.setLang input.text:last-child,.setLayout input.text:last-child,.setLocationDecoding input.text:last-child,.setLocationDecodingCachingType input.text:last-child,.setLocationShow input.text:last-child,.setLocationShowPublic input.text:last-child,.setLogin input.text:last-child,.setMapDisplay input.text:last-child,.setMapDisplayPublic input.text:last-child,.setMapIncludeSubalbums input.text:last-child,.setMapProvider input.text:last-child,.setNSFWVisible input.text:last-child,.setOverlay input.text:last-child,.setOverlayType input.text:last-child,.setPublicSearch input.text:last-child,.setSorting input.text:last-child{margin-bottom:10px}.setCSS textarea,.setDefaultLicense textarea,.setDropBox textarea,.setLang textarea,.setLayout textarea,.setLocationDecoding textarea,.setLocationDecodingCachingType textarea,.setLocationShow textarea,.setLocationShowPublic textarea,.setLogin textarea,.setMapDisplay textarea,.setMapDisplayPublic textarea,.setMapIncludeSubalbums textarea,.setMapProvider textarea,.setNSFWVisible textarea,.setOverlay textarea,.setOverlayType textarea,.setPublicSearch textarea,.setSorting textarea{padding:9px;width:calc(100% - 18px);height:100px;background-color:transparent;color:#fff;border:1px solid #666;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);outline:0;resize:vertical}.setCSS textarea:focus,.setDefaultLicense textarea:focus,.setDropBox textarea:focus,.setLang textarea:focus,.setLayout textarea:focus,.setLocationDecoding textarea:focus,.setLocationDecodingCachingType textarea:focus,.setLocationShow textarea:focus,.setLocationShowPublic textarea:focus,.setLogin textarea:focus,.setMapDisplay textarea:focus,.setMapDisplayPublic textarea:focus,.setMapIncludeSubalbums textarea:focus,.setMapProvider textarea:focus,.setNSFWVisible textarea:focus,.setOverlay textarea:focus,.setOverlayType textarea:focus,.setPublicSearch textarea:focus,.setSorting textarea:focus{border-color:#2293ec}.setCSS .choice,.setDefaultLicense .choice,.setDropBox .choice,.setLang .choice,.setLayout .choice,.setLocationDecoding .choice,.setLocationDecodingCachingType .choice,.setLocationShow .choice,.setLocationShowPublic .choice,.setLogin .choice,.setMapDisplay .choice,.setMapDisplayPublic .choice,.setMapIncludeSubalbums .choice,.setMapProvider .choice,.setNSFWVisible .choice,.setOverlay .choice,.setOverlayType .choice,.setPublicSearch .choice,.setSorting .choice{padding:0 30px 15px;width:100%;color:#fff}.setCSS .choice:last-child,.setDefaultLicense .choice:last-child,.setDropBox .choice:last-child,.setLang .choice:last-child,.setLayout .choice:last-child,.setLocationDecoding .choice:last-child,.setLocationDecodingCachingType .choice:last-child,.setLocationShow .choice:last-child,.setLocationShowPublic .choice:last-child,.setLogin .choice:last-child,.setMapDisplay .choice:last-child,.setMapDisplayPublic .choice:last-child,.setMapIncludeSubalbums .choice:last-child,.setMapProvider .choice:last-child,.setNSFWVisible .choice:last-child,.setOverlay .choice:last-child,.setOverlayType .choice:last-child,.setPublicSearch .choice:last-child,.setSorting .choice:last-child{padding-bottom:40px}.setCSS .choice label,.setDefaultLicense .choice label,.setDropBox .choice label,.setLang .choice label,.setLayout .choice label,.setLocationDecoding .choice label,.setLocationDecodingCachingType .choice label,.setLocationShow .choice label,.setLocationShowPublic .choice label,.setLogin .choice label,.setMapDisplay .choice label,.setMapDisplayPublic .choice label,.setMapIncludeSubalbums .choice label,.setMapProvider .choice label,.setNSFWVisible .choice label,.setOverlay .choice label,.setOverlayType .choice label,.setPublicSearch .choice label,.setSorting .choice label{float:left;color:#fff;font-size:14px;font-weight:700}.setCSS .choice label input,.setDefaultLicense .choice label input,.setDropBox .choice label input,.setLang .choice label input,.setLayout .choice label input,.setLocationDecoding .choice label input,.setLocationDecodingCachingType .choice label input,.setLocationShow .choice label input,.setLocationShowPublic .choice label input,.setLogin .choice label input,.setMapDisplay .choice label input,.setMapDisplayPublic .choice label input,.setMapIncludeSubalbums .choice label input,.setMapProvider .choice label input,.setNSFWVisible .choice label input,.setOverlay .choice label input,.setOverlayType .choice label input,.setPublicSearch .choice label input,.setSorting .choice label input{position:absolute;margin:0;opacity:0}.setCSS .choice label .checkbox,.setDefaultLicense .choice label .checkbox,.setDropBox .choice label .checkbox,.setLang .choice label .checkbox,.setLayout .choice label .checkbox,.setLocationDecoding .choice label .checkbox,.setLocationDecodingCachingType .choice label .checkbox,.setLocationShow .choice label .checkbox,.setLocationShowPublic .choice label .checkbox,.setLogin .choice label .checkbox,.setMapDisplay .choice label .checkbox,.setMapDisplayPublic .choice label .checkbox,.setMapIncludeSubalbums .choice label .checkbox,.setMapProvider .choice label .checkbox,.setNSFWVisible .choice label .checkbox,.setOverlay .choice label .checkbox,.setOverlayType .choice label .checkbox,.setPublicSearch .choice label .checkbox,.setSorting .choice label .checkbox{float:left;display:block;width:16px;height:16px;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.setCSS .choice label .checkbox .iconic,.setDefaultLicense .choice label .checkbox .iconic,.setDropBox .choice label .checkbox .iconic,.setLang .choice label .checkbox .iconic,.setLayout .choice label .checkbox .iconic,.setLocationDecoding .choice label .checkbox .iconic,.setLocationDecodingCachingType .choice label .checkbox .iconic,.setLocationShow .choice label .checkbox .iconic,.setLocationShowPublic .choice label .checkbox .iconic,.setLogin .choice label .checkbox .iconic,.setMapDisplay .choice label .checkbox .iconic,.setMapDisplayPublic .choice label .checkbox .iconic,.setMapIncludeSubalbums .choice label .checkbox .iconic,.setMapProvider .choice label .checkbox .iconic,.setNSFWVisible .choice label .checkbox .iconic,.setOverlay .choice label .checkbox .iconic,.setOverlayType .choice label .checkbox .iconic,.setPublicSearch .choice label .checkbox .iconic,.setSorting .choice label .checkbox .iconic{-webkit-box-sizing:border-box;box-sizing:border-box;fill:#2293ec;padding:2px;opacity:0;-ms-transform:scale(0);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);-o-transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1)}.setCSS .basicModal__button,.setDefaultLicense .basicModal__button,.setDropBox .basicModal__button,.setLang .basicModal__button,.setLayout .basicModal__button,.setLocationDecoding .basicModal__button,.setLocationDecodingCachingType .basicModal__button,.setLocationShow .basicModal__button,.setLocationShowPublic .basicModal__button,.setLogin .basicModal__button,.setMapDisplay .basicModal__button,.setMapDisplayPublic .basicModal__button,.setMapIncludeSubalbums .basicModal__button,.setMapProvider .basicModal__button,.setNSFWVisible .basicModal__button,.setOverlay .basicModal__button,.setOverlayType .basicModal__button,.setPublicSearch .basicModal__button,.setSorting .basicModal__button{color:#2293ec;display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);border-radius:5px}.setCSS .basicModal__button:hover,.setDefaultLicense .basicModal__button:hover,.setDropBox .basicModal__button:hover,.setLang .basicModal__button:hover,.setLayout .basicModal__button:hover,.setLocationDecoding .basicModal__button:hover,.setLocationDecodingCachingType .basicModal__button:hover,.setLocationShow .basicModal__button:hover,.setLocationShowPublic .basicModal__button:hover,.setLogin .basicModal__button:hover,.setMapDisplay .basicModal__button:hover,.setMapDisplayPublic .basicModal__button:hover,.setMapIncludeSubalbums .basicModal__button:hover,.setMapProvider .basicModal__button:hover,.setNSFWVisible .basicModal__button:hover,.setOverlay .basicModal__button:hover,.setOverlayType .basicModal__button:hover,.setPublicSearch .basicModal__button:hover,.setSorting .basicModal__button:hover{background:#2293ec;color:#fff;cursor:pointer}.setCSS .basicModal__button_MORE,.setDefaultLicense .basicModal__button_MORE,.setDropBox .basicModal__button_MORE,.setLang .basicModal__button_MORE,.setLayout .basicModal__button_MORE,.setLocationDecoding .basicModal__button_MORE,.setLocationDecodingCachingType .basicModal__button_MORE,.setLocationShow .basicModal__button_MORE,.setLocationShowPublic .basicModal__button_MORE,.setLogin .basicModal__button_MORE,.setMapDisplay .basicModal__button_MORE,.setMapDisplayPublic .basicModal__button_MORE,.setMapIncludeSubalbums .basicModal__button_MORE,.setMapProvider .basicModal__button_MORE,.setNSFWVisible .basicModal__button_MORE,.setOverlay .basicModal__button_MORE,.setOverlayType .basicModal__button_MORE,.setPublicSearch .basicModal__button_MORE,.setSorting .basicModal__button_MORE{color:#b22027;border-radius:5px}.setCSS .basicModal__button_MORE:hover,.setDefaultLicense .basicModal__button_MORE:hover,.setDropBox .basicModal__button_MORE:hover,.setLang .basicModal__button_MORE:hover,.setLayout .basicModal__button_MORE:hover,.setLocationDecoding .basicModal__button_MORE:hover,.setLocationDecodingCachingType .basicModal__button_MORE:hover,.setLocationShow .basicModal__button_MORE:hover,.setLocationShowPublic .basicModal__button_MORE:hover,.setLogin .basicModal__button_MORE:hover,.setMapDisplay .basicModal__button_MORE:hover,.setMapDisplayPublic .basicModal__button_MORE:hover,.setMapIncludeSubalbums .basicModal__button_MORE:hover,.setMapProvider .basicModal__button_MORE:hover,.setNSFWVisible .basicModal__button_MORE:hover,.setOverlay .basicModal__button_MORE:hover,.setOverlayType .basicModal__button_MORE:hover,.setPublicSearch .basicModal__button_MORE:hover,.setSorting .basicModal__button_MORE:hover{background:#b22027;color:#fff}.setCSS input:hover,.setDefaultLicense input:hover,.setDropBox input:hover,.setLang input:hover,.setLayout input:hover,.setLocationDecoding input:hover,.setLocationDecodingCachingType input:hover,.setLocationShow input:hover,.setLocationShowPublic input:hover,.setLogin input:hover,.setMapDisplay input:hover,.setMapDisplayPublic input:hover,.setMapIncludeSubalbums input:hover,.setMapProvider input:hover,.setNSFWVisible input:hover,.setOverlay input:hover,.setOverlayType input:hover,.setPublicSearch input:hover,.setSorting input:hover{border-bottom:1px solid #2293ec}.setCSS .select,.setDefaultLicense .select,.setDropBox .select,.setLang .select,.setLayout .select,.setLocationDecoding .select,.setLocationDecodingCachingType .select,.setLocationShow .select,.setLocationShowPublic .select,.setLogin .select,.setMapDisplay .select,.setMapDisplayPublic .select,.setMapIncludeSubalbums .select,.setMapProvider .select,.setNSFWVisible .select,.setOverlay .select,.setOverlayType .select,.setPublicSearch .select,.setSorting .select{position:relative;margin:1px 5px;padding:0;width:110px;color:#fff;border-radius:3px;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);font-size:11px;line-height:16px;overflow:hidden;outline:0;vertical-align:middle;background:rgba(0,0,0,.3);display:inline-block}.setCSS .select select,.setDefaultLicense .select select,.setDropBox .select select,.setLang .select select,.setLayout .select select,.setLocationDecoding .select select,.setLocationDecodingCachingType .select select,.setLocationShow .select select,.setLocationShowPublic .select select,.setLogin .select select,.setMapDisplay .select select,.setMapDisplayPublic .select select,.setMapIncludeSubalbums .select select,.setMapProvider .select select,.setNSFWVisible .select select,.setOverlay .select select,.setOverlayType .select select,.setPublicSearch .select select,.setSorting .select select{margin:0;padding:4px 8px;width:120%;color:#fff;font-size:11px;line-height:16px;border:0;outline:0;-webkit-box-shadow:none;box-shadow:none;border-radius:0;background-color:transparent;background-image:none;-moz-appearance:none;-webkit-appearance:none;appearance:none}.setCSS .select select option,.setDefaultLicense .select select option,.setDropBox .select select option,.setLang .select select option,.setLayout .select select option,.setLocationDecoding .select select option,.setLocationDecodingCachingType .select select option,.setLocationShow .select select option,.setLocationShowPublic .select select option,.setLogin .select select option,.setMapDisplay .select select option,.setMapDisplayPublic .select select option,.setMapIncludeSubalbums .select select option,.setMapProvider .select select option,.setNSFWVisible .select select option,.setOverlay .select select option,.setOverlayType .select select option,.setPublicSearch .select select option,.setSorting .select select option{margin:0;padding:0;background:#fff;color:#333;-webkit-transition:none;-o-transition:none;transition:none}.setCSS .select select:disabled,.setDefaultLicense .select select:disabled,.setDropBox .select select:disabled,.setLang .select select:disabled,.setLayout .select select:disabled,.setLocationDecoding .select select:disabled,.setLocationDecodingCachingType .select select:disabled,.setLocationShow .select select:disabled,.setLocationShowPublic .select select:disabled,.setLogin .select select:disabled,.setMapDisplay .select select:disabled,.setMapDisplayPublic .select select:disabled,.setMapIncludeSubalbums .select select:disabled,.setMapProvider .select select:disabled,.setNSFWVisible .select select:disabled,.setOverlay .select select:disabled,.setOverlayType .select select:disabled,.setPublicSearch .select select:disabled,.setSorting .select select:disabled{color:#000;cursor:not-allowed}.setCSS .select::after,.setDefaultLicense .select::after,.setDropBox .select::after,.setLang .select::after,.setLayout .select::after,.setLocationDecoding .select::after,.setLocationDecodingCachingType .select::after,.setLocationShow .select::after,.setLocationShowPublic .select::after,.setLogin .select::after,.setMapDisplay .select::after,.setMapDisplayPublic .select::after,.setMapIncludeSubalbums .select::after,.setMapProvider .select::after,.setNSFWVisible .select::after,.setOverlay .select::after,.setOverlayType .select::after,.setPublicSearch .select::after,.setSorting .select::after{position:absolute;content:"≡";right:8px;top:4px;color:#2293ec;font-size:16px;line-height:16px;font-weight:700;pointer-events:none}.setCSS .switch,.setDefaultLicense .switch,.setDropBox .switch,.setLang .switch,.setLayout .switch,.setLocationDecoding .switch,.setLocationDecodingCachingType .switch,.setLocationShow .switch,.setLocationShowPublic .switch,.setLogin .switch,.setMapDisplay .switch,.setMapDisplayPublic .switch,.setMapIncludeSubalbums .switch,.setMapProvider .switch,.setNSFWVisible .switch,.setOverlay .switch,.setOverlayType .switch,.setPublicSearch .switch,.setSorting .switch{position:relative;display:inline-block;width:42px;height:22px;bottom:4px}.setCSS .switch input,.setDefaultLicense .switch input,.setDropBox .switch input,.setLang .switch input,.setLayout .switch input,.setLocationDecoding .switch input,.setLocationDecodingCachingType .switch input,.setLocationShow .switch input,.setLocationShowPublic .switch input,.setLogin .switch input,.setMapDisplay .switch input,.setMapDisplayPublic .switch input,.setMapIncludeSubalbums .switch input,.setMapProvider .switch input,.setNSFWVisible .switch input,.setOverlay .switch input,.setOverlayType .switch input,.setPublicSearch .switch input,.setSorting .switch input{opacity:0;width:0;height:0}.setCSS .slider,.setDefaultLicense .slider,.setDropBox .slider,.setLang .slider,.setLayout .slider,.setLocationDecoding .slider,.setLocationDecodingCachingType .slider,.setLocationShow .slider,.setLocationShowPublic .slider,.setLogin .slider,.setMapDisplay .slider,.setMapDisplayPublic .slider,.setMapIncludeSubalbums .slider,.setMapProvider .slider,.setNSFWVisible .slider,.setOverlay .slider,.setOverlayType .slider,.setPublicSearch .slider,.setSorting .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);background:rgba(0,0,0,.3);-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.setCSS .slider:before,.setDefaultLicense .slider:before,.setDropBox .slider:before,.setLang .slider:before,.setLayout .slider:before,.setLocationDecoding .slider:before,.setLocationDecodingCachingType .slider:before,.setLocationShow .slider:before,.setLocationShowPublic .slider:before,.setLogin .slider:before,.setMapDisplay .slider:before,.setMapDisplayPublic .slider:before,.setMapIncludeSubalbums .slider:before,.setMapProvider .slider:before,.setNSFWVisible .slider:before,.setOverlay .slider:before,.setOverlayType .slider:before,.setPublicSearch .slider:before,.setSorting .slider:before{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#2293ec;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}.setCSS input:checked+.slider,.setDefaultLicense input:checked+.slider,.setDropBox input:checked+.slider,.setLang input:checked+.slider,.setLayout input:checked+.slider,.setLocationDecoding input:checked+.slider,.setLocationDecodingCachingType input:checked+.slider,.setLocationShow input:checked+.slider,.setLocationShowPublic input:checked+.slider,.setLogin input:checked+.slider,.setMapDisplay input:checked+.slider,.setMapDisplayPublic input:checked+.slider,.setMapIncludeSubalbums input:checked+.slider,.setMapProvider input:checked+.slider,.setNSFWVisible input:checked+.slider,.setOverlay input:checked+.slider,.setOverlayType input:checked+.slider,.setPublicSearch input:checked+.slider,.setSorting input:checked+.slider{background-color:#2293ec}.setCSS input:checked+.slider:before,.setDefaultLicense input:checked+.slider:before,.setDropBox input:checked+.slider:before,.setLang input:checked+.slider:before,.setLayout input:checked+.slider:before,.setLocationDecoding input:checked+.slider:before,.setLocationDecodingCachingType input:checked+.slider:before,.setLocationShow input:checked+.slider:before,.setLocationShowPublic input:checked+.slider:before,.setLogin input:checked+.slider:before,.setMapDisplay input:checked+.slider:before,.setMapDisplayPublic input:checked+.slider:before,.setMapIncludeSubalbums input:checked+.slider:before,.setMapProvider input:checked+.slider:before,.setNSFWVisible input:checked+.slider:before,.setOverlay input:checked+.slider:before,.setOverlayType input:checked+.slider:before,.setPublicSearch input:checked+.slider:before,.setSorting input:checked+.slider:before{-ms-transform:translateX(20px);-webkit-transform:translateX(20px);transform:translateX(20px);background-color:#fff}.setCSS .slider.round,.setDefaultLicense .slider.round,.setDropBox .slider.round,.setLang .slider.round,.setLayout .slider.round,.setLocationDecoding .slider.round,.setLocationDecodingCachingType .slider.round,.setLocationShow .slider.round,.setLocationShowPublic .slider.round,.setLogin .slider.round,.setMapDisplay .slider.round,.setMapDisplayPublic .slider.round,.setMapIncludeSubalbums .slider.round,.setMapProvider .slider.round,.setNSFWVisible .slider.round,.setOverlay .slider.round,.setOverlayType .slider.round,.setPublicSearch .slider.round,.setSorting .slider.round{border-radius:20px}.setCSS .slider.round:before,.setDefaultLicense .slider.round:before,.setDropBox .slider.round:before,.setLang .slider.round:before,.setLayout .slider.round:before,.setLocationDecoding .slider.round:before,.setLocationDecodingCachingType .slider.round:before,.setLocationShow .slider.round:before,.setLocationShowPublic .slider.round:before,.setLogin .slider.round:before,.setMapDisplay .slider.round:before,.setMapDisplayPublic .slider.round:before,.setMapIncludeSubalbums .slider.round:before,.setMapProvider .slider.round:before,.setNSFWVisible .slider.round:before,.setOverlay .slider.round:before,.setOverlayType .slider.round:before,.setPublicSearch .slider.round:before,.setSorting .slider.round:before{border-radius:50%}#fullSettings{width:100%;max-width:700px;margin-left:auto;margin-right:auto}#fullSettings .setting_category{font-size:20px;width:100%;padding-top:10px;padding-left:4px;border-bottom:1px dotted #222;margin-top:20px;color:#fff;font-weight:700;text-transform:capitalize}#fullSettings .setting_line{font-size:14px;width:100%}#fullSettings .setting_line:first-child,#fullSettings .setting_line:last-child{padding-top:50px}#fullSettings .setting_line p{min-width:550px;margin:0;color:#ccc;display:inline-block;width:100%}#fullSettings .setting_line p a{color:rgba(255,255,255,.9);text-decoration:none;border-bottom:1px dashed #888}#fullSettings .setting_line p:last-of-type{margin:0}#fullSettings .setting_line p.warning{margin-bottom:30px;color:#d92c34;font-weight:700;font-size:18px;text-align:justify;line-height:22px}#fullSettings .setting_line span.text{display:inline-block;padding:9px 4px;width:calc(50% - 12px);background-color:transparent;color:#fff;border:none}#fullSettings .setting_line span.text_icon{width:5%}#fullSettings .setting_line span.text_icon .iconic{width:15px;height:14px;margin:0 10px 0 1px;fill:#fff}#fullSettings .setting_line input.text{padding:9px 2px;width:calc(50% - 4px);background-color:transparent;color:#fff;border:none;border-bottom:1px solid #222;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);outline:0}#fullSettings .setting_line input.text:focus{border-bottom-color:#2293ec}#fullSettings .setting_line input:hover{border-bottom:1px solid #2293ec}#fullSettings .basicModal__button{display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);width:100%;min-width:50px;border-radius:5px}#fullSettings .basicModal__button:hover{cursor:pointer}#fullSettings .basicModal__button_SAVE{color:#b22027}#fullSettings .basicModal__button_SAVE:hover{background:#b22027;color:#fff}.users_view{width:80%;max-width:700px;margin-left:auto;margin-right:auto}.users_view_line{font-size:14px;width:100%}.users_view_line:first-child,.users_view_line:last-child{padding-top:50px}.users_view_line p{width:550px;margin:0 0 5%;color:#ccc;display:inline-block}.users_view_line p a{color:rgba(255,255,255,.9);text-decoration:none;border-bottom:1px dashed #888}.users_view_line p.line,.users_view_line p:last-of-type{margin:0}.users_view_line span.text{display:inline-block;padding:9px 4px;width:40%;background-color:transparent;color:#fff;border:none}.users_view_line span.text_icon{width:5%}.users_view_line span.text_icon .iconic{width:15px;height:14px;margin:0 15px 0 1px;fill:#fff}.users_view_line input.text{padding:9px 2px;width:40%;background-color:transparent;color:#fff;border:none;border-bottom:1px solid #222;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,.05);box-shadow:0 1px 0 rgba(255,255,255,.05);outline:0;margin-bottom:10px}.users_view_line input.text:focus{border-bottom-color:#2293ec}.users_view_line input.text.error{border-bottom-color:#d92c34}.users_view_line .choice label input:checked~.checkbox .iconic{opacity:1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}.users_view_line .choice{display:inline-block;width:5%;color:#fff}.users_view_line .choice input{position:absolute;margin:0;opacity:0}.users_view_line .choice .checkbox{display:inline-block;width:16px;height:16px;margin-top:10px;margin-left:2px;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.users_view_line .choice .checkbox .iconic{-webkit-box-sizing:border-box;box-sizing:border-box;fill:#2293ec;padding:2px;opacity:0;-ms-transform:scale(0);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);-o-transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1)}.users_view_line .basicModal__button{display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);width:10%;min-width:50px;border-radius:0}.users_view_line .basicModal__button:hover{cursor:pointer}.users_view_line .basicModal__button_OK{color:#2293ec;border-radius:5px 0 0 5px}.users_view_line .basicModal__button_OK:hover{background:#2293ec;color:#fff}.users_view_line .basicModal__button_DEL{color:#b22027;border-radius:0 5px 5px 0}.users_view_line .basicModal__button_DEL:hover{background:#b22027;color:#fff}.users_view_line .basicModal__button_CREATE{width:20%;color:#090;border-radius:5px}.users_view_line .basicModal__button_CREATE:hover{background:#090;color:#fff}.users_view_line input:hover{border-bottom:1px solid #2293ec}.users_view_line .select{position:relative;margin:1px 5px;padding:0;width:110px;color:#fff;border-radius:3px;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);font-size:11px;line-height:16px;overflow:hidden;outline:0;vertical-align:middle;background:rgba(0,0,0,.3);display:inline-block}.users_view_line .select select{margin:0;padding:4px 8px;width:120%;color:#fff;font-size:11px;line-height:16px;border:0;outline:0;-webkit-box-shadow:none;box-shadow:none;border-radius:0;background:0 0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.users_view_line .select select option{margin:0;padding:0;background:#fff;color:#333;-webkit-transition:none;-o-transition:none;transition:none}.users_view_line .select::after{position:absolute;content:"≡";right:8px;top:4px;color:#2293ec;font-size:16px;line-height:16px;font-weight:700;pointer-events:none}.u2f_view{width:80%;max-width:700px;margin-left:auto;margin-right:auto}.u2f_view_line{font-size:14px;width:100%}.u2f_view_line:first-child,.u2f_view_line:last-child{padding-top:50px}.u2f_view_line p{width:550px;margin:0 0 5%;color:#ccc;display:inline-block}.u2f_view_line p a{color:rgba(255,255,255,.9);text-decoration:none;border-bottom:1px dashed #888}.u2f_view_line p.line,.u2f_view_line p:last-of-type{margin:0}.u2f_view_line p.single{text-align:center}.u2f_view_line span.text{display:inline-block;padding:9px 4px;width:80%;background-color:transparent;color:#fff;border:none}.u2f_view_line span.text_icon{width:5%}.u2f_view_line span.text_icon .iconic{width:15px;height:14px;margin:0 15px 0 1px;fill:#fff}.u2f_view_line .choice label input:checked~.checkbox .iconic{opacity:1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}.u2f_view_line .choice{display:inline-block;width:5%;color:#fff}.u2f_view_line .choice input{position:absolute;margin:0;opacity:0}.u2f_view_line .choice .checkbox{display:inline-block;width:16px;height:16px;margin-top:10px;margin-left:2px;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.u2f_view_line .choice .checkbox .iconic{-webkit-box-sizing:border-box;box-sizing:border-box;fill:#2293ec;padding:2px;opacity:0;-ms-transform:scale(0);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);-o-transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1)}.u2f_view_line .basicModal__button{display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);width:20%;min-width:50px;border-radius:0}.u2f_view_line .basicModal__button:hover{cursor:pointer}.u2f_view_line .basicModal__button_OK{color:#2293ec;border-radius:5px 0 0 5px}.u2f_view_line .basicModal__button_OK:hover{background:#2293ec;color:#fff}.u2f_view_line .basicModal__button_DEL{color:#b22027;border-radius:0 5px 5px 0}.u2f_view_line .basicModal__button_DEL:hover{background:#b22027;color:#fff}.u2f_view_line .basicModal__button_CREATE{width:100%;color:#090;border-radius:5px}.u2f_view_line .basicModal__button_CREATE:hover{background:#090;color:#fff}.u2f_view_line input:hover{border-bottom:1px solid #2293ec}.u2f_view_line .select{position:relative;margin:1px 5px;padding:0;width:110px;color:#fff;border-radius:3px;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);font-size:11px;line-height:16px;overflow:hidden;outline:0;vertical-align:middle;background:rgba(0,0,0,.3);display:inline-block}.u2f_view_line .select select{margin:0;padding:4px 8px;width:120%;color:#fff;font-size:11px;line-height:16px;border:0;outline:0;-webkit-box-shadow:none;box-shadow:none;border-radius:0;background:0 0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.u2f_view_line .select select option{margin:0;padding:0;background:#fff;color:#333;-webkit-transition:none;-o-transition:none;transition:none}.u2f_view_line .select::after{position:absolute;content:"≡";right:8px;top:4px;color:#2293ec;font-size:16px;line-height:16px;font-weight:700;pointer-events:none}.signInKeyLess{display:block;padding:10px;position:absolute;cursor:pointer}.signInKeyLess .iconic{display:inline-block;margin:0;width:20px;height:20px;fill:#818181}.signInKeyLess .iconic.ionicons{margin:0 8px -2px 0;width:18px;height:18px}.signInKeyLess:hover .iconic{fill:#fff}.logs_diagnostics_view{width:1200px;margin-left:auto;margin-right:auto;color:#ccc;font-size:12px;line-height:14px}.logs_diagnostics_view pre{font-family:monospace;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.clear_logs_update{width:1200px;padding-left:30px;margin:20px auto}.clear_logs_update .basicModal__button,.logs_diagnostics_view .basicModal__button{color:#2293ec;display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);border-radius:5px}.clear_logs_update .iconic,.logs_diagnostics_view .iconic{display:inline-block;margin:0 10px 0 1px;width:13px;height:12px;fill:#2293ec}.clear_logs_update .button_left,.logs_diagnostics_view .button_left{margin-left:24px;width:400px}.sharing_view{width:600px;margin-left:auto;margin-right:auto;margin-top:20px}.sharing_view .sharing_view_line{width:100%;display:block;clear:left}.sharing_view .col-xs-1,.sharing_view .col-xs-10,.sharing_view .col-xs-11,.sharing_view .col-xs-12,.sharing_view .col-xs-2,.sharing_view .col-xs-3,.sharing_view .col-xs-4,.sharing_view .col-xs-5,.sharing_view .col-xs-6,.sharing_view .col-xs-7,.sharing_view .col-xs-8,.sharing_view .col-xs-9{float:left;position:relative;min-height:1px}.sharing_view .col-xs-2{width:10%;padding-right:3%;padding-left:3%}.sharing_view .col-xs-5{width:42%}.sharing_view .btn-block+.btn-block{margin-top:5px}.sharing_view .btn-block{display:block;width:100%}.sharing_view .btn-default{color:#2293ec;border-color:#2293ec;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.sharing_view .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.sharing_view select[multiple],.sharing_view select[size]{height:150px}.sharing_view .form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.sharing_view .iconic{display:inline-block;width:15px;height:14px;fill:#2293ec}.sharing_view .iconic .iconic.ionicons{margin:0 8px -2px 0;width:18px;height:18px}.sharing_view .blue .iconic{fill:#2293ec}.sharing_view .grey .iconic{fill:#b4b4b4}.sharing_view p{width:100%;color:#ccc;text-align:center;font-size:14px;display:block}.sharing_view p.with{padding:15px 0}.sharing_view span.text{display:inline-block;padding:0 2px;width:40%;background-color:transparent;color:#fff;border:none}.sharing_view span.text:last-of-type{width:5%}.sharing_view span.text .iconic{width:15px;height:14px;margin:0 10px 0 1px;fill:#fff}.sharing_view .basicModal__button{margin-top:10px;color:#2293ec;display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);border-radius:5px}.sharing_view .basicModal__button:hover{background:#2293ec;color:#fff;cursor:pointer}.sharing_view input:hover{border-bottom:1px solid #2293ec}.sharing_view .choice label input:checked~.checkbox .iconic{opacity:1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}.sharing_view .choice{display:inline-block;width:5%;margin:0 10px;color:#fff}.sharing_view .choice input{position:absolute;margin:0;opacity:0}.sharing_view .choice .checkbox{display:inline-block;width:16px;height:16px;margin-top:10px;margin-left:2px;background:rgba(0,0,0,.5);border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.7);box-shadow:0 0 0 1px rgba(0,0,0,.7)}.sharing_view .choice .checkbox .iconic{-webkit-box-sizing:border-box;box-sizing:border-box;fill:#2293ec;padding:2px;opacity:0;-ms-transform:scale(0);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1),-webkit-transform .2s cubic-bezier(.51,.92,.24,1);-o-transition:opacity .2s cubic-bezier(.51,.92,.24,1),transform .2s cubic-bezier(.51,.92,.24,1)}.sharing_view .select{position:relative;padding:0;color:#fff;border-radius:3px;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.02);box-shadow:0 1px 0 rgba(255,255,255,.02);font-size:14px;line-height:16px;outline:0;vertical-align:middle;background:rgba(0,0,0,.3);display:inline-block}.sharing_view .borderBlue{border:1px solid #2293ec}#multiselect{position:absolute;background-color:rgba(0,94,204,.3);border:1px solid #005ecc;border-radius:3px;z-index:5}.justified-layout{margin:30px 0 0 30px;width:100%;position:relative}.unjustified-layout{margin:25px -5px -5px 25px;width:100%;position:relative;overflow:hidden}.justified-layout>.photo{position:absolute;--lychee-default-height:320px;margin:0}.unjustified-layout>.photo{float:left;max-height:240px;margin:5px}.justified-layout>.photo>.thumbimg,.justified-layout>.photo>.thumbimg>img,.unjustified-layout>.photo>.thumbimg,.unjustified-layout>.photo>.thumbimg>img{width:100%;height:100%;border:none;-o-object-fit:cover;object-fit:cover}.justified-layout>.photo>.overlay,.unjustified-layout>.photo>.overlay{width:100%;bottom:0;margin:0}.justified-layout>.photo>.overlay>h1,.unjustified-layout>.photo>.overlay>h1{width:auto;margin-right:15px}#footer{z-index:3;left:0;right:0;bottom:0;-webkit-transition:color .3s,opacity .3s ease-out,margin-left .5s,-webkit-transform .3s ease-out,-webkit-box-shadow .3s;transition:color .3s,opacity .3s ease-out,transform .3s ease-out,box-shadow .3s,margin-left .5s,-webkit-transform .3s ease-out,-webkit-box-shadow .3s;-o-transition:color .3s,opacity .3s ease-out,transform .3s ease-out,box-shadow .3s,margin-left .5s;padding:5px 0;text-align:center;position:absolute;background:#1d1d1d}#footer p{color:#ccc;font-weight:400;font-size:.75em;line-height:26px}#footer p a,#footer p a:visited{color:#ccc}#footer p.home_copyright,#footer p.hosted_by{text-transform:uppercase}.hide_footer{display:none}@font-face{font-family:socials;src:url(fonts/socials.eot?egvu10);src:url(fonts/socials.eot?egvu10#iefix) format("embedded-opentype"),url(fonts/socials.ttf?egvu10) format("truetype"),url(fonts/socials.woff?egvu10) format("woff"),url(fonts/socials.svg?egvu10#socials) format("svg");font-weight:400;font-style:normal}#socials_footer{padding:0;text-align:center;left:0;right:0}.socialicons{display:inline-block;font-size:18px;font-family:socials!important;speak:none;color:#ccc;text-decoration:none;margin:15px 15px 5px;transition:.3s;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}.socialicons:hover{color:#b5b5b5;-ms-transform:scale(1.3);transform:scale(1.3);-webkit-transform:scale(1.3)}#twitter:before{content:"\ea96"}#instagram:before{content:"\ea92"}#youtube:before{content:"\ea9d"}#flickr:before{content:"\eaa4"}#facebook:before{content:"\ea91"}.directLinks input.text{width:calc(100% - 30px);color:rgba(255,255,255,.6);padding:2px}.directLinks .basicModal__button{display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);width:25px;height:25px;border-radius:5px;border-bottom:0;padding:3px 0 0;margin-top:-5px;float:right}.directLinks .basicModal__button .iconic{fill:#2293ec;width:16px;height:16px}.directLinks .basicModal__button:hover{background:#2293ec;cursor:pointer}.directLinks .basicModal__button:hover .iconic{fill:#fff}.directLinks .imageLinks{margin-top:-30px;padding-bottom:40px}.directLinks .imageLinks p{padding:10px 30px 0;font-size:12px;line-height:15px}.directLinks .imageLinks .basicModal__button{margin-top:-8px}.downloads{padding:30px}.downloads .basicModal__button{color:#2293ec;display:inline-block;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.02),inset 1px 0 0 rgba(0,0,0,.2);border-radius:5px;border-bottom:0;margin:5px 0}.downloads .basicModal__button .iconic{fill:#2293ec;margin:0 10px 0 1px;width:11px;height:10px}.downloads .basicModal__button:hover{color:#fff;background:#2293ec;cursor:pointer}.downloads .basicModal__button:hover .iconic{fill:#fff}.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-webkit-tap-highlight-color:transparent;background:#ddd;outline:0;font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:0 0}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-width:none!important;max-height:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4);color:#0078a8}.leaflet-tile{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto;float:left;clear:both}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-right .leaflet-control{float:right;margin-right:10px}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{will-change:transform;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);-o-transition:transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1),-webkit-transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-o-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container a.leaflet-active{outline:orange solid 2px}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-bar{-webkit-box-shadow:0 1px 5px rgba(0,0,0,.65);box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{-webkit-box-shadow:0 1px 5px rgba(0,0,0,.4);box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{-webkit-box-shadow:none;box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;-webkit-box-shadow:0 3px 14px rgba(0,0,0,.4);box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;border:none;text-align:center;width:18px;height:14px;font:700 16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.4);box-shadow:0 1px 3px rgba(0,0,0,.4)}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{position:absolute;pointer-events:none;border:6px solid transparent;background:0 0;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:opacity .3s ease-in,-webkit-transform .3s ease-out;-o-transition:transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in,-webkit-transform .3s ease-out}.leaflet-cluster-spider-leg{-webkit-transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in;-o-transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.leaflet-marker-photo{border:2px solid #fff;-webkit-box-shadow:3px 3px 10px #888;box-shadow:3px 3px 10px #888}.leaflet-marker-photo div{width:100%;height:100%;background-size:cover;background-position:center center;background-repeat:no-repeat}.leaflet-marker-photo b{position:absolute;top:-7px;right:-11px;color:#555;background-color:#fff;border-radius:8px;height:12px;min-width:12px;line-height:12px;text-align:center;padding:3px;-webkit-box-shadow:0 3px 14px rgba(0,0,0,.4);box-shadow:0 3px 14px rgba(0,0,0,.4)} \ No newline at end of file diff --git a/demo/dist/main.js b/demo/dist/main.js deleted file mode 100644 index 08d9a6a8..00000000 --- a/demo/dist/main.js +++ /dev/null @@ -1,10991 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 049?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&pi.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;nc||n.hasOwnProperty(c)&&(p[n[c]]=c)}g=p[e]?"keydown":"keypress"}"keypress"==g&&d.length&&(g="keydown");return{key:m,modifiers:d,action:g}}function D(a,b){return null===a||a===u?!1:a===b?!0:D(a.parentNode,b)}function d(a){function b(a){a= -a||{};var b=!1,l;for(l in p)a[l]?b=!0:p[l]=0;b||(x=!1)}function g(a,b,t,f,g,d){var l,E=[],h=t.type;if(!k._callbacks[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(l=0;l":".","?":"/","|":"\\"},B={option:"alt",command:"meta","return":"enter", -escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p;for(c=1;20>c;++c)n[111+c]="f"+c;for(c=0;9>=c;++c)n[c+96]=c.toString();d.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};d.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};d.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};d.prototype.reset=function(){this._callbacks={}; -this._directMap={};return this};d.prototype.stopCallback=function(a,b){if(-1<(" "+b.className+" ").indexOf(" mousetrap ")||D(b,this.target))return!1;if("composedPath"in a&&"function"===typeof a.composedPath){var c=a.composedPath()[0];c!==a.target&&(b=c)}return"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};d.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};d.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(n[b]=a[b]);p=null}; -d.init=function(){var a=d(u),b;for(b in a)"_"!==b.charAt(0)&&(d[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};d.init();q.Mousetrap=d;"undefined"!==typeof module&&module.exports&&(module.exports=d);"function"===typeof define&&define.amd&&define(function(){return d})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null); - -(function(a){var c={},d=a.prototype.stopCallback;a.prototype.stopCallback=function(e,b,a,f){return this.paused?!0:c[a]||c[f]?!1:d.call(this,e,b,a)};a.prototype.bindGlobal=function(a,b,d){this.bind(a,b,d);if(a instanceof Array)for(b=0;b0&&void 0!==arguments[0]?arguments[0]:"";return!0===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?document.querySelectorAll(".basicModal "+t):document.querySelector(".basicModal "+t)}),a=function(t,n){return null!=t&&(t.constructor===Object?Array.prototype.forEach.call(Object.keys(t),function(e){return n(t[e],e,t)}):Array.prototype.forEach.call(t,function(e,l){return n(e,l,t)}))},c=function(t){return null==t||0===Object.keys(t).length?(console.error("Missing or empty modal configuration object"),!1):(null==t.body&&(t.body=""),null==t.class&&(t.class=""),!1!==t.closable&&(t.closable=!0),null==t.buttons?(console.error("basicModal requires at least one button"),!1):null!=t.buttons.action&&(null==t.buttons.action.class&&(t.buttons.action.class=""),null==t.buttons.action.title&&(t.buttons.action.title="OK"),null==t.buttons.action.fn)?(console.error("Missing fn for action-button"),!1):null==t.buttons.cancel||(null==t.buttons.cancel.class&&(t.buttons.cancel.class=""),null==t.buttons.cancel.title&&(t.buttons.cancel.title="Cancel"),null!=t.buttons.cancel.fn)||(console.error("Missing fn for cancel-button"),!1))},s=function(t){var n="";if(n+="\n\t
\n\t
\n\t
\n\t "+t.body+"\n\t
\n\t
\n\t ",null!=t.buttons.cancel){var e="";null!=t.buttons.cancel.attributes&&t.buttons.cancel.attributes.forEach(function(t,n){e+=t[0]+"='"+t[1]+"' "}),-1===t.buttons.cancel.class.indexOf("basicModal__xclose")?n+=""+t.buttons.cancel.title+"":n+="
'}if(null!=t.buttons.action){var l="";null!=t.buttons.action.attributes&&t.buttons.action.attributes.forEach(function(t,n){l+=t[0]+"='"+t[1]+"' "}),n+=""+t.buttons.action.title+""}return n+="\n\t
\n\t
\n\t
\n\t "},i=e.getValues=function(){var t={},n=o("input[name]",!0),e=o("select[name]",!0);return a(n,function(n){var e=n.getAttribute("name"),l=n.value;t[e]=l}),a(e,function(n){var e=n.getAttribute("name"),l=n.options[n.selectedIndex].value;t[e]=l}),0===Object.keys(t).length?null:t},u=function(t){return null!=t.buttons.cancel&&(o("#basicModal__cancel").onclick=function(){if(!0===this.classList.contains("basicModal__button--active"))return!1;this.classList.add("basicModal__button--active"),t.buttons.cancel.fn()}),null!=t.buttons.action&&(o("#basicModal__action").onclick=function(){if(!0===this.classList.contains("basicModal__button--active"))return!1;this.classList.add("basicModal__button--active"),t.buttons.action.fn(i())}),a(o("input",!0),function(t){t.oninput=t.onblur=function(){this.classList.remove("error")}}),a(o("select",!0),function(t){t.onchange=t.onblur=function(){this.classList.remove("error")}}),!0},r=(e.show=function t(n){if(!1===c(n))return!1;if(null!=o())return d(!0),setTimeout(function(){return t(n)},301),!1;l=document.activeElement;var e=s(n);document.body.insertAdjacentHTML("beforeend",e),u(n);var a=o("input");null!=a&&a.select();var i=o("select");null==a&&null!=i&&i.focus();var r=o("#basicModal__action");null==a&&null==i&&null!=r&&r.focus();var b=o("#basicModal__cancel");return null==a&&null==i&&null==r&&null!=b&&b.focus(),null!=n.callback&&n.callback(n),!0},e.error=function(t){b();var n=o("input[name='"+t+"']")||o("select[name='"+t+"']");if(null==n)return!1;n.classList.add("error"),"function"==typeof n.select?n.select():n.focus(),o().classList.remove("basicModal--fadeIn","basicModal--shake"),setTimeout(function(){return o().classList.add("basicModal--shake")},1)},e.visible=function(){return null!=o()}),b=(e.action=function(){var t=o("#basicModal__action");return null!=t&&(t.click(),!0)},e.cancel=function(){var t=o("#basicModal__cancel");return null!=t&&(t.click(),!0)},e.reset=function(){var t=o(".basicModal__button",!0);a(t,function(t){return t.classList.remove("basicModal__button--active")});var n=o("input",!0);a(n,function(t){return t.classList.remove("error")});var e=o("select",!0);return a(e,function(t){return t.classList.remove("error")}),!0}),d=e.close=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!1===r())return!1;var n=o().parentElement;return("false"!==n.getAttribute("data-closable")||!1!==t)&&(n.classList.remove("basicModalContainer--fadeIn"),n.classList.add("basicModalContainer--fadeOut"),setTimeout(function(){return null!=n&&(null!=n.parentElement&&void n.parentElement.removeChild(n))},300),null!=l&&(l.focus(),l=null),!0)}},{}]},{},[1])(1)}); -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.scrollLock=t():e.scrollLock=t()}(this,function(){return function(l){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return l[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=l,o.c=r,o.d=function(e,t,l){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(l,r,function(e){return t[e]}.bind(null,r));return l},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,l){"use strict";l.r(t);var r=function(e){return Array.isArray(e)?e:[e]},a=function(e){return e instanceof Node},o=function(e,t){if(e&&t){e=e instanceof NodeList?e:[e];for(var l=0;ls(e).data("position")?1:-1},right:function(t,e){return s(t).data("position")>s(e).data("position")?1:-1}}),o.$left.attachIndex(),o.$right.each(function(t,e){s(e).attachIndex()})),"function"==typeof o.callbacks.startUp&&o.callbacks.startUp(o.$left,o.$right),o.skipInitSort||("function"==typeof o.callbacks.sort.left&&o.$left.mSort(o.callbacks.sort.left),"function"==typeof o.callbacks.sort.right&&o.$right.each(function(t,e){s(e).mSort(o.callbacks.sort.right)})),o.options.search&&o.options.search.left&&(o.options.search.$left=s(o.options.search.left),o.$left.before(o.options.search.$left)),o.options.search&&o.options.search.right&&(o.options.search.$right=s(o.options.search.right),o.$right.before(s(o.options.search.$right))),o.events(),"function"==typeof o.callbacks.afterInit&&o.callbacks.afterInit()},events:function(){var o=this;o.options.search&&o.options.search.$left&&o.options.search.$left.on("keyup",function(t){o.callbacks.fireSearch(this.value)?(o.$left.find('option:search("'+this.value+'")').mShow(),o.$left.find('option:not(:search("'+this.value+'"))').mHide(),o.$left.find("option").closest("optgroup").mHide(),o.$left.find("option:not(.hidden)").parent("optgroup").mShow()):o.$left.find("option, optgroup").mShow()}),o.options.search&&o.options.search.$right&&o.options.search.$right.on("keyup",function(t){o.callbacks.fireSearch(this.value)?(o.$right.find('option:search("'+this.value+'")').mShow(),o.$right.find('option:not(:search("'+this.value+'"))').mHide(),o.$right.find("option").closest("optgroup").mHide(),o.$right.find("option:not(.hidden)").parent("optgroup").mShow()):o.$right.find("option, optgroup").mShow()}),o.$right.closest("form").on("submit",function(t){o.options.search&&(o.options.search.$left&&o.options.search.$left.val("").trigger("keyup"),o.options.search.$right&&o.options.search.$right.val("").trigger("keyup")),o.$left.find("option").prop("selected",o.options.submitAllLeft),o.$right.find("option").prop("selected",o.options.submitAllRight)}),o.$left.on("dblclick","option",function(t){t.preventDefault();var e=o.$left.find("option:selected:not(.hidden)");e.length&&o.moveToRight(e,t)}),o.$left.on("click","optgroup",function(t){"OPTGROUP"==s(t.target).prop("tagName")&&s(this).children().prop("selected",!0)}),o.$left.on("keypress",function(t){var e;13===t.keyCode&&(t.preventDefault(),(e=o.$left.find("option:selected:not(.hidden)")).length&&o.moveToRight(e,t))}),o.$right.on("dblclick","option",function(t){t.preventDefault();var e=o.$right.find("option:selected:not(.hidden)");e.length&&o.moveToLeft(e,t)}),o.$right.on("click","optgroup",function(t){"OPTGROUP"==s(t.target).prop("tagName")&&s(this).children().prop("selected",!0)}),o.$right.on("keydown",function(t){var e;8!==t.keyCode&&46!==t.keyCode||(t.preventDefault(),(e=o.$right.find("option:selected:not(.hidden)")).length&&o.moveToLeft(e,t))}),(navigator.userAgent.match(/MSIE/i)||0e.innerHTML?1:-1},fireSearch:function(t){return 1").hide()}),l&&this.prop("disabled",!0),this},i.fn.mSort=function(o){return this.children().sort(o).appendTo(this),this.find("optgroup").each(function(t,e){i(e).children().sort(o).appendTo(e)}),this},i.fn.attachIndex=function(){this.children().each(function(t,e){var o=i(e);o.is("optgroup")&&o.children().each(function(t,e){i(e).data("position",t)}),o.data("position",t)})},i.expr[":"].search=function(t,e,o){var n=new RegExp(o[3].replace(/([^a-zA-Z0-9])/g,"\\$1"),"i");return i(t).text().match(n)}}); -require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=1){this.items.push(itemData);this.completeLayout(rowWidthWithoutSpacing/itemData.aspectRatio,"justify");return true}}}if(newAspectRatiothis.maxAspectRatio){if(this.items.length===0){this.items.push(merge(itemData));this.completeLayout(rowWidthWithoutSpacing/newAspectRatio,"justify");return true}previousRowWidthWithoutSpacing=this.width-(this.items.length-1)*this.spacing;previousAspectRatio=this.items.reduce(function(sum,item){return sum+item.aspectRatio},0);previousTargetAspectRatio=previousRowWidthWithoutSpacing/this.targetRowHeight;if(Math.abs(newAspectRatio-targetAspectRatio)>Math.abs(previousAspectRatio-previousTargetAspectRatio)){this.completeLayout(previousRowWidthWithoutSpacing/previousAspectRatio,"justify");return false}else{this.items.push(merge(itemData));this.completeLayout(rowWidthWithoutSpacing/newAspectRatio,"justify");return true}}else{this.items.push(merge(itemData));this.completeLayout(rowWidthWithoutSpacing/newAspectRatio,"justify");return true}},isLayoutComplete:function(){return this.height>0},completeLayout:function(newHeight,widowLayoutStyle){var itemWidthSum=this.left,rowWidthWithoutSpacing=this.width-(this.items.length-1)*this.spacing,clampedToNativeRatio,clampedHeight,errorWidthPerItem,roundedCumulativeErrors,singleItemGeometry,centerOffset;if(typeof widowLayoutStyle==="undefined"||["justify","center","left"].indexOf(widowLayoutStyle)<0){widowLayoutStyle="left"}clampedHeight=Math.max(this.edgeCaseMinRowHeight,Math.min(newHeight,this.edgeCaseMaxRowHeight));if(newHeight!==clampedHeight){this.height=clampedHeight;clampedToNativeRatio=rowWidthWithoutSpacing/clampedHeight/(rowWidthWithoutSpacing/newHeight)}else{this.height=newHeight;clampedToNativeRatio=1}this.items.forEach(function(item){item.top=this.top;item.width=item.aspectRatio*this.height*clampedToNativeRatio;item.height=this.height;item.left=itemWidthSum;itemWidthSum+=item.width+this.spacing},this);if(widowLayoutStyle==="justify"){itemWidthSum-=this.spacing+this.left;errorWidthPerItem=(itemWidthSum-this.width)/this.items.length;roundedCumulativeErrors=this.items.map(function(item,i){return Math.round((i+1)*errorWidthPerItem)});if(this.items.length===1){singleItemGeometry=this.items[0];singleItemGeometry.width-=Math.round(errorWidthPerItem)}else{this.items.forEach(function(item,i){if(i>0){item.left-=roundedCumulativeErrors[i-1];item.width-=roundedCumulativeErrors[i]-roundedCumulativeErrors[i-1]}else{item.width-=roundedCumulativeErrors[i]}})}}else if(widowLayoutStyle==="center"){centerOffset=(this.width-itemWidthSum)/2;this.items.forEach(function(item){item.left+=centerOffset+this.spacing},this)}},forceComplete:function(fitToWidth,rowHeight){if(typeof rowHeight==="number"){this.completeLayout(rowHeight,this.widowLayoutStyle)}else{this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)}},getItems:function(){return this.items}}},{merge:2}],2:[function(require,module,exports){(function(isNode){var Public=function(clone){return merge(clone===true,false,arguments)},publicName="merge";Public.recursive=function(clone){return merge(clone===true,true,arguments)};Public.clone=function(input){var output=input,type=typeOf(input),index,size;if(type==="array"){output=[];size=input.length;for(index=0;index=layoutConfig.maxNumRows){currentRow=null;return true}currentRow=createNewRow(layoutConfig,layoutData);if(!itemAdded){itemAdded=currentRow.addItem(itemData);if(currentRow.isLayoutComplete()){laidOutItems=laidOutItems.concat(addRow(layoutConfig,layoutData,currentRow));if(layoutData._rows.length>=layoutConfig.maxNumRows){currentRow=null;return true}currentRow=createNewRow(layoutConfig,layoutData)}}}});if(currentRow&¤tRow.getItems().length&&layoutConfig.showWidows){if(layoutData._rows.length){if(layoutData._rows[layoutData._rows.length-1].isBreakoutRow){nextToLastRowHeight=layoutData._rows[layoutData._rows.length-1].targetRowHeight}else{nextToLastRowHeight=layoutData._rows[layoutData._rows.length-1].height}currentRow.forceComplete(false,nextToLastRowHeight)}else{currentRow.forceComplete(false)}laidOutItems=laidOutItems.concat(addRow(layoutConfig,layoutData,currentRow));layoutConfig._widowCount=currentRow.getItems().length}layoutData._containerHeight=layoutData._containerHeight-layoutConfig.boxSpacing.vertical;layoutData._containerHeight=layoutData._containerHeight+layoutConfig.containerPadding.bottom;return{containerHeight:layoutData._containerHeight,widowCount:layoutConfig._widowCount,boxes:layoutData._layoutItems}}module.exports=function(input,config){var layoutConfig={};var layoutData={};var defaults={containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:Number.POSITIVE_INFINITY,forceAspectRatio:false,showWidows:true,fullWidthBreakoutRowCadence:false,widowLayoutStyle:"left"};var containerPadding={};var boxSpacing={};config=config||{};layoutConfig=merge(defaults,config);containerPadding.top=!isNaN(parseFloat(layoutConfig.containerPadding.top))?layoutConfig.containerPadding.top:layoutConfig.containerPadding;containerPadding.right=!isNaN(parseFloat(layoutConfig.containerPadding.right))?layoutConfig.containerPadding.right:layoutConfig.containerPadding;containerPadding.bottom=!isNaN(parseFloat(layoutConfig.containerPadding.bottom))?layoutConfig.containerPadding.bottom:layoutConfig.containerPadding;containerPadding.left=!isNaN(parseFloat(layoutConfig.containerPadding.left))?layoutConfig.containerPadding.left:layoutConfig.containerPadding;boxSpacing.horizontal=!isNaN(parseFloat(layoutConfig.boxSpacing.horizontal))?layoutConfig.boxSpacing.horizontal:layoutConfig.boxSpacing;boxSpacing.vertical=!isNaN(parseFloat(layoutConfig.boxSpacing.vertical))?layoutConfig.boxSpacing.vertical:layoutConfig.boxSpacing;layoutConfig.containerPadding=containerPadding;layoutConfig.boxSpacing=boxSpacing;layoutData._layoutItems=[];layoutData._awakeItems=[];layoutData._inViewportItems=[];layoutData._leadingOrphans=[];layoutData._trailingOrphans=[];layoutData._containerHeight=layoutConfig.containerPadding.top;layoutData._rows=[];layoutData._orphans=[];layoutConfig._widowCount=0;return computeLayout(layoutConfig,layoutData,input.map(function(item){if(item.width&&item.height){return{aspectRatio:item.width/item.height}}else{return{aspectRatio:item}}}))}},{"./row":1,merge:2}]},{},[]); -/* @preserve - * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com - * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.xc.max.x)&&(n.x=a.x-e.x,0c.max.y)&&(n.y=a.y-e.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;athis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1i&&(e.push(t[n]),o=n);oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;iu.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)i.getMaxZoom()&&1b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var i,n=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,a=this.options.chunkProgress,h=e.length,l=0,u=!0;if(this._map){var _=(new Date).getTime(),d=L.bind(function(){for(var c=(new Date).getTime();h>l;l++){if(s&&0===l%200){var p=(new Date).getTime()-c;if(p>o)break}if(i=e[l],i instanceof L.LayerGroup)u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),t||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var f=i.__parent.getAllChildMarkers(),m=f[0]===i?f[1]:f[0];n.removeLayer(m)}}else r.addLayer(i),t||this.fire("layeradd",{layer:i})}a&&a(l,h,(new Date).getTime()-_),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else for(var c=this._needsClustering;h>l;l++)i=e[l],i instanceof L.LayerGroup?(u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length):i.getLatLng?this.hasLayer(i)||c.push(i):r.addLayer(i);return this},removeLayers:function(e){var t,i,n=e.length,r=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=n;for(t=0;h>t;t++)i=a[t],i instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,n,r,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;n>=0;n--){for(i=!0,r=o.length-1;r>=0;r--)if(o[r].layer===s[n]){i=!1;break}i&&e.call(t,s[n])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(i){L.stamp(i)===e&&(t=i)}),t},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;t>=0;t--)if(i[t]===e)return!0;for(i=this._needsRemoving,t=i.length-1;t>=0;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var i=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoomt;t++)n=this._needsRemoving[t],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;i>=0;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());t>=r&&n[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoomt?"small":100>t?"medium":"large",new L.DivIcon({html:"
"+t+"
",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,i=t;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(e||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;r>=t;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,n,r=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=o;t--){i=this._map.project(e.getLatLng(),t);var a=r[t].getNearObject(i);if(a)return a._addChild(e),e.__parent=a,void 0;if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);r[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,e.__parent=l;var u=l;for(n=t-1;n>h._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));return h._addChild(u),this._removeFromGridUnclustered(a,t),void 0}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;ee?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,n=e.getLayers(),r=0;for(t=t||[];r=0;i--)o=h[i],n.contains(o._latlng)||r.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,s,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,n=this._featureGroup;n.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){n.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,t+1,i);var s=this;this._forceLayout(),e._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===e._childCount){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(n,i,r,function(e){e._recursivelyRemoveChildrenFromMap(n,r,t+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)t&&this._markers[n].__dragStart||e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),s=this._zoom+1,o=n.getZoom();i.length>0&&r>s;){s++;var a=[];for(t=0;ts?this._group._map.setView(this._latlng,s):o>=r?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,n,r=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())},function(e){var i,n,r=e._childClusters;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,i,n){this._recursively(e,n,t,function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(e,t,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,i){this._recursively(i,this._group._map.getMinZoom()-1,t,function(n){if(t!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var s=n._markers[r];i.contains(s._latlng)&&(e&&(s._backupLatlng=s.getLatLng(),s.setLatLng(e),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,n){var r,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;s>=0;s--)r=e._markers[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(e){for(s=e._childClusters.length-1;s>=0;s--)r=e._childClusters[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(e,t,i,n,r){var s,o,a=this._childClusters,h=this._zoom;if(h>=t&&(n&&n(this),r&&h===i&&r(this)),t>h||i>h)for(s=a.length-1;s>=0;s--)o=a[s],o._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),n=this._getCoord(t.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,n,r=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,n=h.length;n>i;i++)if(h[i]===e)return h.splice(i,1),1===n&&delete a[r],!0},eachObject:function(e,t){var i,n,r,s,o,a,h,l=this._grid;for(i in l){o=l[i];for(n in o)for(a=o[n],r=0,s=a.length;s>r;r++)h=e.call(t,a[r]),h&&(r--,s--)}},getNearObject:function(e){var t,i,n,r,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,c=null;for(t=u-1;u+1>=t;t++)if(r=this._grid[t])for(i=l-1;l+1>=i;i++)if(s=r[i])for(n=0,o=s.length;o>n;n++)a=s[n],h=this._sqDist(_[L.Util.stamp(a)],e),(d>h||d>=h&&null===c)&&(d=h,c=a);return c},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat,n=t[0].lng-t[1].lng;return n*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,n,r,s=0,o=null,a=[];for(i=t.length-1;i>=0;i--)n=t[i],r=this.getDistant(n,e),r>0&&(a.push(n),r>s&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],n=this.findMostDistantPointFromBaseLine(e,t);return n.maxPoint?(i=i.concat(this.buildConvexHull([e[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,e[1]],n.newPoints))):[e[0]]},getConvexHull:function(e){var t,i=!1,n=!1,r=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;t>=0;t--){var d=e[t];(i===!1||d.lat>i)&&(o=d,i=d.lat),(n===!1||d.latr)&&(h=d,r=d.lng),(s===!1||d.lng=0;t--)e=i[t].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,r=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,r):(r.y+=10,e=this._generatePointsCircle(t.length,r)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e),s=r/this._2PI,o=this._2PI/e,a=[];for(s=Math.max(s,35),a.length=e,i=0;e>i;i++)n=this._circleStartAngle+i*o,a[i]=new L.Point(t.x+s*Math.cos(n),t.y+s*Math.sin(n))._round();return a},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=e,i=e;i>=0;i--)e>i&&(h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round()),a+=s/r+5e-4*i,r+=o/a;return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;t>=0;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i=0;i--)a=u.layerPointToLatLng(t[i]),n=e[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&(r=n._spiderLeg,s=r._path,s.style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,n,r,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)t=d[i],t._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),c&&(n=t._spiderLeg,r=n._path,s=r.getTotalLength()+.1,r.style.strokeDashoffset=s,n.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&e++;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),e>1&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy() -},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i}); -//# sourceMappingURL=leaflet.markercluster.js.map -/*! - * Copyright (c) 2017 Apple Inc. All rights reserved. - * - * # LivePhotosKit JS License - * - * **IMPORTANT:** This Apple LivePhotosKit software is supplied to you by Apple - * Inc. ("Apple") in consideration of your agreement to the following terms, and - * your use, reproduction, or installation of this Apple software constitutes - * acceptance of these terms. If you do not agree with these terms, please do not - * use, reproduce or install this Apple software. - * - * This Apple LivePhotosKit software is supplied to you by Apple Inc. ("Apple") in - * consideration of your agreement to the following terms, and your use, - * reproduction, or installation of this Apple software constitutes acceptance of - * these terms. If you do not agree with these terms, please do not use, reproduce - * or install this Apple software. - * - * This software is licensed to you only for use with LivePhotos that you are - * authorized or legally permitted to embed or display on your website. - * - * The LivePhotosKit Software is only licensed and intended for the purposes set - * forth above and may not be used for other purposes or in other contexts without - * Apple's prior written permission. For the sake of clarity, you may not and - * agree not to or enable others to, modify or create derivative works of the - * LivePhotosKit Software. - * - * Neither the name, trademarks, service marks or logos of Apple Inc. may be used - * to endorse or promote products, services without specific prior written - * permission from Apple. Except as expressly stated in this notice, no other - * rights or licenses, express or implied, are granted by Apple herein. - * - * The LivePhotosKit Software is provided by Apple on an "AS IS" basis. APPLE - * MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE - * IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE, REGARDING THE LIVEPHOTOSKIT SOFTWARE OR ITS USE AND - * OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS, SYSTEMS, OR SERVICES. - * APPLE DOES NOT WARRANT THAT THE LIVEPHOTOSKIT SOFTWARE WILL MEET YOUR - * REQUIREMENTS, THAT THE OPERATION OF THE LIVEPHOTOSKIT SOFTWARE WILL BE - * UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS IN THE LIVEPHOTOSKIT SOFTWARE WILL BE - * CORRECTED, OR THAT THE LIVEPHOTOSKIT SOFTWARE WILL BE COMPATIBLE WITH FUTURE - * APPLE PRODUCTS, SOFTWARE OR SERVICES. NO ORAL OR WRITTEN INFORMATION OR ADVICE - * GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE WILL CREATE A WARRANTY. - * - * IN NO EVENT SHALL APPLE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL - * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) RELATING TO OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - * OR INSTALLATION, OF THE LIVEPHOTOSKIT SOFTWARE BY YOU OR OTHERS, HOWEVER CAUSED - * AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT - * LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY FOR - * PERSONAL INJURY, OR OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION - * MAY NOT APPLY TO YOU. In no event shall Apple's total liability to you for all - * damages (other than as may be required by applicable law in cases involving - * personal injury) exceed the amount of fifty dollars ($50.00). The foregoing - * limitations will apply even if the above stated remedy fails of its essential - * purpose. - * - * - * **ACKNOWLEDGEMENTS:** - * https://cdn.apple-livephotoskit.com/lpk/1/acknowledgements.txt - * - * v1.5.6 - */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LivePhotosKit=t():e.LivePhotosKit=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=25)}([function(e,t,r){"use strict";function i(e){if(e){var t=e.staticMembers;t&&n.call(this,t),n.call(this.prototype,e)}}function n(e){for(var t in e)if(e.hasOwnProperty(t)&&"staticMembers"!==t){var r=Object.getOwnPropertyDescriptor(e,t);r.get||r.set?Object.defineProperty(this,t,r):a.call(this,t,e[t])}}function a(e,t){var r=this[e];return r instanceof Function&&t instanceof Function?o.call(this,e,t,r):F.instanceOrKindOf(t,F.Metadata)?s.call(this,e,t):void(this[e]=t)}function o(e,t,r){this[e]=function(){var e=this._super;this._super=r;var i=t.apply(this,arguments);return this._super=e,i}}function s(e,t){this.hasOwnProperty("_metadatas")||(this._metadatas=Object.create(this._metadatas)),(t.isLPKClass?t.sharedInstance:t).registerOnDefinition(this,e)}function u(e){var t=this["_callbacksFor_"+e];if(t){var r=void 0;if(arguments.length>1){r=F.arrayPool.get();for(var i=1,n=arguments.length;i1)for(var i=0;i1?t-1:0),i=1;i1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),i=1;i1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};d.a&&!e.videoSrc&&e.photoSrc?s.a.warn("Changing a `photoSrc` independent of its `videoSrc` can result in unexpected behavior"):d.a&&e.videoSrc&&!e.photoSrc&&s.a.warn("Changing a `videoSrc` independent of its `photoSrc` can result in unexpected behavior");var t=F?{photoSrc:F.photo,videoSrc:F.videoSrc,effectType:F.effectType,autoplay:F.autoplay,proactivelyLoadsVideo:F.proactivelyLoadsVideo}:{},r=c({},t,e),i=(r.photoSrc,r.videoSrc,r.effectType),n=r.autoplay,f=r.proactivelyLoadsVideo;C=o.a.objectPool.get(),r.preloadedEffectType=i,r.autoplay=!1!==n;var v=i||l.a.default;l.a.toPlaybackStyle(v)===u.a.LOOP&&r.autoplay&&(d.a&&!f&&s.a.warn("When using a looping asset you should set `proactivelyLoadsVideo` to `true` unless `autoplay` is also set to `false`"),r.proactivelyLoadsVideo=!0);for(var y in r)Object.prototype.hasOwnProperty.call(r,y)&&(p[y]===h?C[y]=r[y]:s.a.warn("LivePhotosKit.Player: Initial configuration for `"+y+"` was ignored, because the property is not a writable property."));if(F)for(var m in C){var g=C[m];F[m]=g}else F=a.a.create(R,C);o.a.objectPool.ret(C),C=null};R.setProperties=L,R.setProperties(t);for(var E,A,I=0;(E=f[I])&&(A=m[I]);I++)!function(e,t,r){"method"===r?(g.value=F[t].bind(F),Object.defineProperty(R,t,g)):(b.set=r===h?function(e){F[t]=e}:function(){},b.get=function(){return F[t]},Object.defineProperty(R,t,b))}(0,E,A);g.value=function(){var e=arguments.length,t=arguments[e-1];if(e<1||!(t instanceof Function))throw new Error("Invalid arguments passed to `observe`. Form: key, [key, …], callback.");for(var r=o.a.arrayPool.get(),i=0,n=e;i=3||"string"==typeof arguments[0]&&"string"==typeof arguments[1])throw new Error("LivePhotosKit.Player: Creating a new Player using arguments of the form 'photoSrc, videoSrc, [targetElement, [options]]' is no longer supported. Instead, use the new signature, '[targetElement, [options]]");return s.a.warn("The `LivePhotosKit.Player` method will be deprecated in an upcoming release. Please use the `LivePhotosKit.augementElementAsPlayer` or `LivePhotosKit.createPlayer` methods, instead."),e?_(e,t):P(t)},T=function e(t,r){i(this,e),this.fire=function(){r[t.keyOnObject]()},this.disconnect=function(){t.unregisterFromDefinition(r)},this.connect=function(){t.registerOnDefinition(r)}}},function(e,t,r){"use strict";var i=/_lpk_debug=true/i;t.a=i.test(window.location.search)||i.test(window.location.hash)},function(e,t,r){"use strict";var i={setUpForRender:function(){this.attachInto(this.renderer)},tearDownFromRender:function(){this.detach(),this._super()},renderStyles:function(e){for(var t,r=this.element,i=r.style,n=0;t=e[n];n++){var a=t,o=a.styleKey,s=a.value;i[o]!==s&&(i[o]=s)}}};t.a=i},function(e,t,r){"use strict";var i=r(55),n=r(56),a=r(57);t.a={APP_NAME:"LivePhotosKit",BUILD_NUMBER:i.a,MASTERING_NUMBER:n.a,FEEDBACK_URL_PREFIX:"https://feedbackws.icloud.com",LIVEPHOTOSKIT_LOADED:"livephotoskitloaded",URL_PREFIX:"https://cdn.apple-livephotoskit.com",VERSION:a.a}},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=r(3),a=r(50),o=r(18),s=r(10),u=r(1);r.d(t,"a",function(){return c});var l=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this._setInstanceProps(r),this._createCanvas(),this.redraw(),this._addEventListeners(),s.a.observe("locale",function(){return t.updateBadgeText()})}return l(e,[{key:"attachPlayerInstance",value:function(e){e.attachBadgeView(this),this.updateBadgeText(e.effectType)}},{key:"redraw",value:function(){var e=this.progress;e>0&&this.shouldAnimateProgressRing?this._animateProgressRing():this._redraw(e)}},{key:"reset",value:function(){var e=this._requestedFrame;e&&cancelAnimationFrame(e),this._progress=0,this._previousProgress=0,this.redraw()}},{key:"appendTo",value:function(e){e.appendChild(this.element)}},{key:"updateAriaLabel",value:function(){var e=n.a.toLocalizedString(this.effectType),t=s.a.getString("VideoEffects.Badge");this.element.setAttribute("aria-label",t+": "+e)}},{key:"updateBadgeText",value:function(e){e?this.effectType=e:e=this.effectType,this.label=e?n.a.toBadgeText(e):"",this.playbackStyle=n.a.toPlaybackStyle(e),this.updateAriaLabel(),this._redraw()}},{key:"_createCanvas",value:function(){var e=this.element;if(e){if("canvas"!==e.tagName.toLowerCase())throw new Error("Backing element for LivePhotoBadge needs to be an HTMLCanvasElement.")}else e=this.element=document.createElement("canvas");e.setAttribute("role","button"),this.updateAriaLabel(),e.classList.add("lpk-badge"),this._context=e.getContext("2d")}},{key:"_setCanvasSize",value:function(){var e=this.element,t=o.a(),r=this.height,i=this.width;e.height=r*t,e.width=i*t,e.style.height=r+"px",e.style.width=i+"px"}},{key:"_setInstanceProps",value:function(e){var t={};for(var r in d)t.hasOwnProperty.call(d,r)&&(this[r]=e.hasOwnProperty(r)?e[r]:d[r]);this.defaultProps=d}},{key:"_redraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(this.element,this.label),r=t.toLowerCase()||n.a.default;this._setCanvasSize(),this._context.clearRect(0,0,this.width,this.height),this._drawBackground(),this._drawLabel(),this.shouldShowError||(this._drawInnerCircle(),n.a.toPlaybackStyle(r)!==u.a.LOOP?this._drawPlayArrow():this._drawLoopCircle()),this.shouldShowError?(this._drawProgressRing(1),this._drawErrorSlash()):this.progress>0?this._drawProgressRing(e):this._drawDottedCircle()}},{key:"_drawBackground",value:function(){var e=o.a(),t=this._context,r=this.borderRadius*e,i=this.width*e,n=this.height*e;t.beginPath(),t.moveTo(r,0),t.lineTo(i-r,0),t.quadraticCurveTo(i,0,i,r),t.lineTo(i,n-r),t.quadraticCurveTo(i,n,i-r,n),t.lineTo(r,n),t.quadraticCurveTo(0,n,0,n-r),t.lineTo(0,r),t.quadraticCurveTo(0,0,r,0),t.closePath(),t.fillStyle=this.backgroundColor,t.fill()}},{key:"_drawDottedCircle",value:function(){for(var t=e.numberOfDots,r=this.dottedRadius*o.a(),i=0;i0?s.width:0;return this._width=(u>2?a:-2)+2*t+2*n+Math.ceil(u/o.a())}},{key:"fontStyle",get:function(){return this.fontSize*o.a()+'pt/1 system, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica'}},{key:"x0",get:function(){return(this.dottedRadius+this.leftPadding)*o.a()}},{key:"y0",get:function(){return this.height/2*o.a()}},{key:"progress",set:function(e){"number"==typeof e&&(this._previousProgress=this._progress,this._progress=e,this.redraw())},get:function(){return this._progress}},{key:"shouldShowError",set:function(e){this._shouldShowError=!!e,this._redraw(this.progress)},get:function(){return this._shouldShowError}}],[{key:"numberOfDots",get:function(){return 1===o.a()?17:26}}]),e}()},function(e,t,r){"use strict";var i=r(30),n=r(0),a=r(6),o=i.a.extend({mimeType:n.a.observableProperty({dependencies:["_mimeTypeFromXHR"],get:function(e){return this._mimeTypeFromXHR||e||null}}),_mimeTypeFromXHR:n.a.observableProperty(),requiresMimeTypeForRawArrayBufferSrc:!0,exposedMimeTypeKeyForErrorStrings:"mimeType",exposedSrcKeyForErrorStrings:"src",abortCurrentLoad:function(){this.__xhr&&(this._detachXHR(),this._xhr.abort()),this._mimeTypeFromXHR=null,this.abortCurrentSecondaryLoad()},loadSrc:function(e){if("string"==typeof e){this._mimeTypeFromXHR=null,this._attachXHR();var t=this._xhr;t.open("GET",e),t.responseType="arraybuffer",t.send(null)}else if(e instanceof ArrayBuffer){if(!this.mimeType&&this.requiresMimeTypeForRawArrayBufferSrc)throw new Error("MIME Type must be assigned to `"+this.exposedMimeTypeKeyForErrorStrings+"` prior to assigning a raw ArrayBuffer to `"+this.exposedSrcKeyForErrorStrings+"`.");this.beginSecondaryLoad(e,this.mimeType)}},get _xhr(){var e=this.__xhr;return e||(e=this.__xhr=new XMLHttpRequest),e},_detachXHR:function(){var e=this._xhr;e.removeEventListener("progress",this._xhrProgress),e.removeEventListener("readystatechange",this._xhrReadyStateChanged)},_attachXHR:function(){var e=this._xhr;e.addEventListener("progress",this._xhrProgress),e.addEventListener("readystatechange",this._xhrReadyStateChanged)},_xhrReadyStateChanged:function(){if("loading"===this.state){if(this._xhr.readyState>=2&&200!==this._xhr.status){var e=new Error("Failed to download resource from URL assigned to '"+this.exposedSrcKeyForErrorStrings+"'.");return e.errCode=a.a.FAILED_TO_DOWNLOAD_RESOURCE,this.loadDidFail(e)}return 4===this._xhr.readyState&&200===this._xhr.status?this._xhrLoadDidFinish():void 0}},_xhrProgress:function(e){if(e&&e.total){var t=(+e.loaded||0)/e.total;+t===t&&(this.progress=Math.max(0,Math.min(1,t)))}},_xhrLoadDidFinish:function(){this._mimeTypeFromXHR=this._xhr.getResponseHeader("Content-Type"),this.beginSecondaryLoad(this._xhr.response,this.mimeType)},beginSecondaryLoad:function(e,t){this._defaultSecondaryLoadTimeout=setTimeout(this.loadDidSucceed.bind(this,e),0)},abortCurrentSecondaryLoad:function(){this._defaultSecondaryLoadTimeout&&(clearTimeout(this._defaultSecondaryLoadTimeout),this._defaultSecondaryLoadTimeout=null)},init:function(){this._xhrReadyStateChanged=this._xhrReadyStateChanged.bind(this),this._xhrProgress=this._xhrProgress.bind(this),this._super()}});t.a=o},function(e,t,r){"use strict";var i=r(2);t.a=i.a.isEdge||i.a.isIE},function(e,t,r){"use strict";function i(){u.forEach(function(e){return e()})}function n(e){u.push(e)}function a(){return window.devicePixelRatio}function o(){return Math.ceil(a())}t.b=n,t.a=o;var s=void 0,u=[];!function(){window.matchMedia&&(s=window.matchMedia("only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (-o-min-device-pixel-ratio:13/10),only screen and (min-resolution:120dpi)"),s.addListener(i))}()},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(){function e(e,t){for(var r=0;r0&&(this._k.length=0,this._v.length=0)}}]),e}();t.a=a},function(e,t,r){"use strict";function i(e){if(null===e)return"_null";if(void 0===e)return"_undefined";if(e.hasOwnProperty("_LPKGUID"))return e._LPKGUID;var t=void 0===e?"undefined":n(e);switch(t){case"number":Object.is(e,-0)&&(e="-0");case"string":case"boolean":return t+e;case"object":case"function":o++;var r=t+o;return a.value=r,Object.defineProperty(e,"_LPKGUID",a),r;default:throw"unrecognized object type"}}t.a=i;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a={value:"",enumerable:!1,writable:!1,configurable:!1},o=0},function(e,t,r){function i(e){return r(n(e))}function n(e){var t=a[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var a={"./en-us.lproj/strings.json":22};i.keys=function(){return Object.keys(a)},i.resolve=n,e.exports=i,i.id=21},function(e,t){e.exports={"VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge.Title.Bounce":"Bounce","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t,r){"use strict";var i=r(28),n=r(32),a=r(34),o=r(37),s=r(35),u=r(4),l=r(0),d=r(8),c=r(5),h=r(1);a.a.register(),o.a.register(),s.a.register();var p=d.a.extend({approach:"",autoplay:!0,caption:"",_hasInitialized:!1,_lastRecipe:null,recipe:l.a.observableProperty({get:function(){var e=u.a.getRecipeFromPlaybackStyle(this.playbackStyle);return this._setRecipe(e),e},set:function(e){this._setRecipe(e)}}),_setRecipe:function(e){e&&e!==this._lastRecipe&&(this._lastRecipe=e,this.setUpRenderLayers())},requestMoreCompatibleRecipe:function(){this.recipe=this.recipe.requestMoreCompatibleRecipe()},duration:l.a.observableProperty({dependencies:["recipe","provider.videoDuration","provider.photoTime"],get:function(e){var t=this.recipe,r=this.provider,i=r.photoTime,n=r.videoDuration;return t?t.calculateAnimationDuration(e,n,i):0}}),displayWidth:0,displayHeight:0,get backingWidth(){return Math.round(this.displayWidth*devicePixelRatio)},get backingHeight(){return Math.round(this.displayHeight*devicePixelRatio)},get renderLayerWidth(){return this.displayWidth},get renderLayerHeight(){return this.displayHeight},get videoWidth(){return this.videoDecoder.videoWidth},get videoHeight(){return this.videoDecoder.videoHeight},photoWidth:l.a.proxyProperty("photo.width"),photoHeight:l.a.proxyProperty("photo.height"),photo:l.a.proxyProperty("provider.photo"),video:l.a.proxyProperty("provider.video"),photoTime:l.a.proxyProperty("provider.photoTime"),frameTimes:l.a.proxyProperty("provider.frameTimes"),effectType:l.a.proxyProperty("provider.effectType"),preloadedEffectType:l.a.proxyProperty("provider.preloadedEffectType"),playbackStyle:l.a.proxyProperty("provider.playbackStyle"),currentTime:l.a.observableProperty({defaultValue:0,dependencies:["duration"],get:function(e){return Math.min(this.duration||0,Math.max(0,e||0))},didChange:function(e){this.prepareToRenderAtTime(e)}}),canRenderCurrentTime:l.a.observableProperty({readOnly:!0,dependencies:["currentTime"],get:function(){return this.canRenderAtTime(this.currentTime)}}),_currentTimeRenderObserver:l.a.observer("currentTime","canRenderCurrentTime",function(e,t){t&&(this.renderedTime=e)}),renderedTime:l.a.observableProperty({defaultValue:0,didChange:function(e){this.renderAtTime(e),this.currentTime=e}}),areAllRenderLayersPrepared:l.a.observableProperty({defaultValue:!1}),isFullyPreparedForPlayback:l.a.observableProperty({readOnly:!0,dependencies:["video","areAllRenderLayersPrepared","photoTime","frameTimes","playbackStyle"],get:function(){return Boolean(this.video&&this.areAllRenderLayersPrepared&&(this.photoTime||this.playbackStyle!==h.a.HINT)&&Array.isArray(this.frameTimes))}}),cannotRenderDueToMissingPhotoTimeOrFrameTimes:l.a.observableProperty({readOnly:!0,dependencies:["video","areAllRenderLayersPrepared","photoTime","frameTimes","playbackStyle"],get:function(){return Boolean(this.video&&this.areAllRenderLayersPrepared&&(!this.photoTime&&this.playbackStyle===h.a.HINT||!Array.isArray(this.frameTimes)))}}),renderLayers:l.a.property(function(){return[]}),videoDecoder:l.a.observableProperty(function(){return this._videoDecoderClass.create({owner:this})}),_videoDecoderClass:i.a.extend({owner:l.a.observableProperty(),provider:l.a.proxyProperty("owner.provider")}),provider:l.a.observableProperty(function(){return n.a.create()}),init:function(){this._super(),this.element.className=((this.element.className||"")+" lpk-live-photo-renderer").trim(),this.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.textAlign="left"},updateSize:function(e,t){if(!arguments.length)return void(this.displayWidth&&this.displayHeight&&this.updateSize(this.displayWidth,this.displayHeight));this.displayWidth=e=Math.round(e),this.displayHeight=t=Math.round(t),this.element.style.width=e+"px",this.element.style.height=t+"px";for(var r,i=0;r=this.renderLayers[i];i++)r.updateSize(this.renderLayerWidth,this.renderLayerHeight)},_imageOrVideoDidEnterOrLeave:l.a.observer("videoDecoder.canProvideFrames","photo",function(){this.prepareToRenderAtTime(this.currentTime)}),prepareToRenderAtTime:l.a.boundFunction(function(e){this.propertyChanged("canRenderCurrentTime");for(var t,r=!0,i=0;t=this.renderLayers[i];i++)r=t.prepareToRenderAtTime(e)&&r;this.areAllRenderLayersPrepared=r}),canRenderAtTime:function(e){if(0===e)return!0;if(!this.duration&&e)return!1;for(var t,r=!0,i="",n=0;t=this.renderLayers[n];n++)t.canRenderAtTime(e)||(r=!1,i+=(i?", ":"Cannot render; waiting for ")+t.layerName);return i&&c.a.log(i+"."),r},renderAtTime:function(e){if(this.duration)for(var t,r=0;t=this.renderLayers[r];r++)t.renderAtTime(e)},getNewRenderLayers:function(){return this.recipe.getRenderLayers(this)},setUpRenderLayers:function(){var e=this.renderLayers;e&&this._cleanUpRenderLayers(e),this.renderLayers=this.getNewRenderLayers(),this.updateSize(),this.currentTime=0,this.prepareToRenderAtTime(0)},_cleanUpRenderLayers:function(e){for(var t,r=0;t=e[r];r++)t.dispose(),t.tearDownFromRender()},reduceMemoryFootprint:function(){for(var e,t=0;e=this.renderLayers[t];t++)e.reduceMemoryFootprint()},_clearRetainedFramesWhenNecessary:l.a.observer("provider.videoRotation","provider.frameTimes",function(){this.reduceMemoryFootprint(),this.prepareToRenderAtTime(this.currentTime)})});t.a=p},function(e,t,r){"use strict";var i=r(23),n=i.a.extend({approach:"dom"});t.a=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(14),n=r(9),a=r(10),o=r(11);r.d(t,"augmentElementAsPlayer",function(){return o.a}),r.d(t,"createPlayer",function(){return o.b}),r.d(t,"Player",function(){return o.c});var s=r(6);r.d(t,"Errors",function(){return s.a});var u=r(15);r.d(t,"LivePhotoBadge",function(){return u.a});var l=r(1);r.d(t,"PlaybackStyle",function(){return l.a}),r.d(t,"Localization",function(){return d}),r.d(t,"BUILD_NUMBER",function(){return c}),r.d(t,"MASTERING_NUMBER",function(){return h}),r.d(t,"VERSION",function(){return p}),r.d(t,"LIVEPHOTOSKIT_LOADED",function(){return f});var d={get locale(){return a.a.locale},set locale(e){a.a.locale=e}},c=i.a.BUILD_NUMBER,h=i.a.MASTERING_NUMBER,p=i.a.VERSION,f=i.a.LIVEPHOTOSKIT_LOADED,v="undefined"!=typeof window&&"undefined"!=typeof document;if(v){var y=window.document;setTimeout(function(){return y.dispatchEvent(r.i(n.a)())});if(y.styleSheets&&document.head){for(var m=null,g=null,b=0;b0)}),init:function(){this._super.apply(this,arguments),e.attachBadgeView(this.badgeView)}}).create()):null},didChange:function(e){this._nativeControls_previousValue&&this._nativeControls_previousValue.detach(),this._nativeControls_previousValue=e,e&&e.attachInto(this)}}),init:function(e,t){var i=this;if(e&&!n(e))throw"Any pre-existing element provided for use as a LivePhotosKit.Player must be able to append child DOM nodes.";e&&e.childNodes.length&&(e.innerHTML="");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(this[a]=t[a]);this._super(e);switch(this.element.className.indexOf("lpk-live-photo-player")<0&&(this.element.className=this.element.className+" lpk-live-photo-player"),this.element.setAttribute("role","image"),r.i(c.a)(this.element,"position")||this.element.style.position){case"absolute":case"fixed":case"relative":break;default:this.element.style.position="relative"}switch(r.i(c.a)(this.element,"display")||this.element.style.display){case"block":case"inline-block":case"table":case"table-caption":case"table-column-group":case"table-header-group":case"table-footer-group":case"table-row-group":case"table-cell":case"table-column":case"table-row":break;default:this.element.style.display="inline-block"}this.renderer.attachInto(this),this.renderer.eventDispatchingElement=this.element,window.addEventListener("resize",this.updateSize),"ontouchstart"in document.documentElement&&(this.addEventListener("touchstart",function(){return i.play()},!1),this.addEventListener("touchend",function(){return i.beginFinishingPlaybackEarly()},!1))},play:function(){if(!this.isPlaying){var e=this.provider;e.video||(e.needsLoadedVideoForPlayback=!0),this.wantsToPlay=!0,this.canPlay&&(this.isPlaying=!0,this._lastFrameNow=Date.now(),this._nextFrame())}return this.isPlaying},pause:function(){this.isPlaying=!1,this.wantsToPlay=!1,this._cancelNextFrame()},stop:function(){this.pause(),this.currentTime=0,this.renderer.duration=NaN},toggle:function(){this.wantsToPlay?this.pause():this.play()},beginFinishingPlaybackEarly:function(){this.recipe.beginFinishingPlaybackEarly(this)},_stopWhenAnotherPlayerStarts:l.a.observer("_constructor.activeInstance",function(e){e&&e!==this&&(this.stop(),this.renderer.reduceMemoryFootprint())}),_constructor:l.a.observableProperty(function(){return p}),_stopPlaybackWhenItemsLoadOrUnload:l.a.observer("video","photo",function(){!this.isPlaying||this.playbackStyle===h.a.LOOP&&this.autoplay||this.stop()}),addEventListener:function(e,t,r){var i=this.element;i.addEventListener.call(i,e,t,r)},removeEventListener:function(e,t,r){var i=this.element;i.removeEventListener.call(i,e,t,r)},_nextFrame:function(){var e=Date.now(),t=(e-this._lastFrameNow)*this.playbackRate;this._lastFrameNow=e,this.currentTime===this.renderedTime&&(this.currentTime+=t/1e3),this.recipe&&this.recipe.continuePlayback(this)},_cancelNextFrame:function(){cancelAnimationFrame(this._rafID)},updateSize:l.a.boundFunction(function(e,t){if(this.photoWidth&&this.photoHeight){var i=!0===e?void 0:e,n=!0===e?e:void 0;if(isNaN(i)||isNaN(t)?(i=this.element.offsetWidth,t=this.element.offsetHeight):(i=Math.round(i),t=Math.round(t),this.element.style.width=i+"px",this.element.style.height=t+"px"),i&&t){if(!(this._lastUpdateChangeToken!==(this._lastUpdateChangeToken=i+":"+t))&&!n)return!1;var a=r.i(u.a)(this.photoWidth,this.photoHeight,i,t),o=Math.ceil(a.height),s=Math.ceil(a.width),l=Math.floor(i/2-s/2),d=Math.round(t/2-o/2),c=this.renderer;c.element.style.top=d+"px",c.element.style.left=l+"px",c.updateSize(s,o),this.displayWidth=i,this.displayHeight=t,this.nativeControls&&this.nativeControls.updateToRendererLayout(l,d,s,o)}}}),_dispatchPhotoLoadEventOnNewPhoto:l.a.observer("photo",function(e){e&&this.dispatchEvent(r.i(d.c)())}),_dispatchVideoLoadEventOnNewVideo:l.a.observer("video",function(e){e&&this.dispatchEvent(r.i(d.d)())}),throwError:function(e){this.dispatchEvent(r.i(d.e)({error:e,errorCode:e.errCode}))}}),f=document.createElement("div");t.a=p},function(e,t,r){"use strict";function i(){f=!1}function n(){}function a(e,t){return-(e.importance-t.importance)||e.number-t.number}function o(e,t){for(var r=0,i=e.length,n=0;n=this.frameTimes.length)return this.duration;var t=0|e,r=Math.ceil(e);if(t===r)return this.frameTimes[t];var i=this.frameTimes[t],n=r=u&&l.numberr&&c.number<=r+2&&f;if(h||(p=!1),p){if(!this._isPlaying){this._isPlaying=!0;try{var v=this.video.play();v&&v.then instanceof Function&&v.then(n,i)}catch(e){f=!1}}this._expectedNextSeenFrameNumber=c.number,this._scheduleArtificialSeek()}else this._isPlaying&&(this._isPlaying=!1,this.video.pause()),this._expectedNextSeenFrameNumber=NaN,this.video.currentTime=c.time+1e-4,this._isSeeking=!0}}),_frameWillDispose:function(e){this._removePendingFrame(e)},_removePendingFrame:function(e){o(this._pendingFrames,e),this._pendingFrames.length||this._unscheduleArtificialSeek()}});t.a=v},function(e,t,r){"use strict";function i(e){e.container=document.createElement("div"),e.container.frame=e,e.container.innerHTML='
',e.textBox=e.container.lastChild,e.container.insertBefore(e.image,e.textBox),e.image.style.position="absolute",e.container.style.cssText="position:relative; display:inline-block; border: 1px solid black;";var t=e._debug_aspect||(e._debug_aspect=e.videoDecoder&&(e.videoDecoder.videoWidth>e.videoDecoder.videoHeight?"landscape":"portrait"));e.container.style.width=e.image.style.width="landscape"===t?"40px":"30px",e.container.style.height=e.image.style.height="landscape"===t?"30px":"40px",document.body.appendChild(e.container)}var n=r(12),a=r(48),o=r(5),s=r(0),u=r(46),l=r(2);r.d(t,"a",function(){return d});var d=s.a.Object.extend(u.a,a.a,{staticMembers:{getPoolingCacheKey:function(e,t){return"f"+t+"_in_"+e.id}},container:null,image:null,_context:null,number:-1,time:-1,importance:0,videoDecoder:null,readyState:0,_poolingCacheKey:null,_debugShowInDOM:n.a,lacksOwnPixelData:!1,_postDispose:function(){this.image.width=this.image.height=0},get backingFrame(){return this.lacksOwnPixelData?this.videoDecoder.getNearestDecodedFrame(this.number)||this:this},init:function(){this._postDispose=this._postDispose.bind(this);var e=this.image=document.createElement("canvas");this._context=this.image.getContext("2d"),this._super(),this._debugShowInDOM?i(this):h&&(h.appendChild(e),e.style.cssText="position: absolute; top: 0px; width:1px; height: 1px; display: inline-block;",e.style.left=c+++"px")},initFromPool:function(e,t){clearTimeout(this._postDisposalTimeout),this.videoDecoder=e,this.number=t,this.time=e.frameTimes[t],this._debugShowInDOM&&(this.textBox.innerHTML=this.number)},dispose:function(){this.resetReadiness(),this.videoDecoder._frameWillDispose(this),this.number=this.time=-1,this.importance=0,this.videoDecoder=null,this.readyState=0,this.lacksOwnPixelData=!1,this._postDisposalTimeout=setTimeout(this._postDispose,3e3),this.constructor._disposeInstance(this),this._debugShowInDOM&&(this.textBox.innerHTML="x",this.textBox.style.color="#FF0000",this._context.clearRect(0,0,this.image.width,this.image.height))},didPend:function(){this.readyState=1,this._debugShowInDOM&&(this.textBox.style.color="#FF8800")},didDecode:function(){this.obtainPixelData(),this.readyState=2,this.resolveReadiness(this),this._debugShowInDOM&&(this.textBox.style.color="#00FF00")},obtainPixelData:function(){var e=this.image,t=this._context,r=this.videoDecoder,i=r.videoRotation,n=r.videoWidth,a=r.videoHeight,o=i%180==0?n:a,s=i%180==0?a:n;e.width===n&&e.height===a||(e.width=n,e.height=a),l.a.isFirefox&&t.getImageData(0,0,1,1);for(var u=0;u=2,a=0,o=e.length;a>r)*(0!=(i&1<0)switch(t.metaData.values.items[m]){case 1:g=h.a.LOOP;break;case 2:g=h.a.BOUNCE;break;case 3:g=h.a.EXPOSURE}this.effectType=g}}),y=[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],m=[[1,0,0,0,1,0,0,0,1],[0,1,0,-1,0,0,0,0,1],[-1,0,0,0,-1,0,0,0,1],[0,-1,0,1,0,0,0,0,1]];t.a=v},function(e,t,r){"use strict";var i=r(4),n=r(1),a=r(2),o=a.a.isSafari,s=i.a.create({correspondingPlaybackStyle:n.a.FULL,get minimumShortenedDuration(){return this.enterDuration+this.exitDuration+.01},get spontaneousFinishDuration(){return this.exitDuration},enterDuration:1/3,exitDuration:.5,videoBeginTime:.15,zoomScaleFactor:1.075,blurRadius:5,blurRadiusStep:.2,requiresInterpolation:!0,quantizeRadius:function(e){return this.blurRadiusStep?Math.round(e/this.blurRadiusStep)*this.blurRadiusStep:e},easeInOut:function(e){return e<0?0:e>1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,r){var i=t?t+this.videoBeginTime+this.exitDuration:0;return Math.max(0,Math.min(e||1/0,i))},getEntranceExitParameter:function(e,t){return Math.min(Math.max(0,Math.min(1,1-this.easeInOut((e-(t-this.exitDuration))/this.exitDuration))),1-Math.max(0,Math.min(1,1-this.easeInOut(e/this.enterDuration))))||0},getTransform:function(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=1+(this.zoomScaleFactor-1)*this.getEntranceExitParameter(e,t),u=-(s-1)/2*r,l=-(s-1)/2*i,d=Math.round(u*devicePixelRatio)/devicePixelRatio,c=Math.round(l*devicePixelRatio)/devicePixelRatio;return Math.abs(s-n)<1e-5?"translate3d("+d+"px, "+c+"px, 0) scale3d("+a+", "+o+", 1)":u||l||s?"translate3d("+u+"px, "+l+"px, 0) scale3d("+s+", "+s+", 1)":"translate3d(0, 0, 0)"},photo:i.a.PhotoIngredient.create({opacity:i.a.computedStyle(function(e){if(ethis.recipe.enterDuration&&e1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,r){var i=t?t-r+this.exitBlurDuration:0;return Math.max(0,Math.min(e||1/0,i))},photo:i.a.PhotoIngredient.create({hideDuration:.06,get returnDuration(){return this.recipe.exitBlurDuration},opacity:i.a.computedStyle(function(e){if(ethis.hideDuration&&e0?"none":""})}),video:i.a.InterpolatedVideoIngredient.create({lookaheadTime:.01+7/15,videoTimeAtTime:function(e){return e%this.renderer.duration},prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e,e+this.lookaheadTime)},display:i.a.computedStyle(function(e){return""})}),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,r=e.duration;t>=r&&(e.currentTime=t%r),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))}}));t.a=a},function(e,t,r){"use strict";var i=r(4),n=r(36),a=r(1);n.a.register();var o=i.a.create({correspondingPlaybackStyle:a.a.LOOP,photo:i.a.PhotoIngredient.create({display:i.a.computedStyle(function(e){return this.isPlaying||e>0?"none":""})}),video:i.a.VideoIngredient.create({display:i.a.computedStyle(function(e){return""})}),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,r=e.duration;t>=r&&(e.currentTime=t%r),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))},requestMoreCompatibleRecipe:function(e){return i.a.registerRecipeWithPlaybackStyle(n.a,this.correspondingPlaybackStyle),n.a}});t.a=o},function(e,t,r){"use strict";var i=r(0),n=r(41),a=r(1),o=r(13),s=n.a.extend(o.a,{_loCanvas:null,_hiCanvas:null,backingScaleFactor:1,setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),r=t.autoplay,n=t.parentView,o=t.playbackStyle,s=t.video;if(!this._loCanvas||!this._hiCanvas){e.innerHTML&&(e.innerHTML="");var u=this._loCanvas=i.a.canvasPool.get(),l=this._hiCanvas=i.a.canvasPool.get();u._context=u.getContext("2d"),l._context=l.getContext("2d"),u.style.cssText=l.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: translateZ(0);",e.appendChild(u),e.appendChild(l),this._swapCanvases()}e.className="lpk-render-layer lpk-video",e.style.position="absolute",e.style.transformOrigin="0 0",e.style.zIndex=1,this._super(),o===a.a.LOOP&&(this.shouldLoop=!0),this.shouldLoop&&requestAnimationFrame(function(){s.currentTime=-1,r&&n.play()}),window.test=this},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var r=Math.ceil(e*this.backingScaleFactor),i=Math.ceil(t*this.backingScaleFactor);this.backingScaleX=r/e,this.backingScaleY=i/t,this.element.style.width=r+"px",this.element.style.height=i+"px",this._loCanvas&&this._hiCanvas&&(this._loCanvas.width=this._hiCanvas.width=r*devicePixelRatio,this._loCanvas.height=this._hiCanvas.height=i*devicePixelRatio,this._loCanvas._drawnFrameNumber=this._hiCanvas._drawnFrameNumber=-1,this.renderAtTime())},renderAtTime:function(e){if(!arguments.length)return this._super();this._super(e);var t=this.backingScaleX,r=this.backingScaleY;1===t&&1===r||(this.element.style.transform+=" scale3d("+1/t+", "+1/r+", 1)")},renderFramePair:function(e,t,r){(e&&this._hiCanvas._drawnFrameNumber===e.number||t&&this._loCanvas._drawnFrameNumber===t.number)&&this._swapCanvases(),this._putFrameInCanvasIfNeeded(e,this._loCanvas),this._putFrameInCanvasIfNeeded(t,this._hiCanvas),t&&(this._hiCanvas.style.opacity=r)},_swapCanvases:function(){var e=this._hiCanvas;this._hiCanvas=this._loCanvas,this._loCanvas=e,this._loCanvas.style.opacity="",this._loCanvas.style.zIndex=1,this._hiCanvas.style.zIndex=2},_putFrameInCanvasIfNeeded:function(e,t){t._drawnFrameNumber!==(t._drawnFrameNumber=e?e.number:-1)&&(t.setAttribute("data-frame-number",t._drawnFrameNumber.toString()),e?t._context.drawImage(e.image,0,0,t.width,t.height):t._context.clearRect(0,0,t.width,t.height))},dispose:function(){this._super(),this._loCanvas&&i.a.canvasPool.ret(this._loCanvas),this._hiCanvas&&i.a.canvasPool.ret(this._hiCanvas)},tearDownFromRender:function(){var e=this.renderer,t=e.parentView;this.shouldLoop=!1,t&&t.stop(),this._clearAllRetainedFrames(),this._super()}});t.a=s},function(e,t,r){"use strict";var i=r(42),n=r(13),a=r(49),o=i.a.extend(n.a,{tagName:"canvas",get _canvas(){return this.element},get _context(){return this.__context||(this.__context=this._canvas.getContext("2d"))},init:function(){this._super.apply(this,arguments),this.element.className="lpk-render-layer lpk-photo",this.element.style.position="absolute",this.element.style.width=this.element.style.height="100%",this.element.style.transformOrigin="0 0",this.element.style.zIndex=2},tearDownFromRender:function(){this._super(),this._canvas.width=this._canvas.height=0},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var i=Math.ceil(e*devicePixelRatio),n=Math.ceil(t*devicePixelRatio),o=this.photo,s=this._canvas;this._lastPhoto===(this._lastPhoto=o)&&s.width===i&&s.height===n||(s.width=i,s.height=n,o&&r.i(a.a)(this._context,o,0,0,i,n))}});t.a=o},function(e,t,r){"use strict";var i=r(0),n=r(2),a=r(13),o=r(43),s=o.a.extend(a.a,{_isPlayingChanged:i.a.observer("isPlaying",function(e){this._video&&(e?(this.duration=1/0,this.play()):this.pause())}),_isVisible:!1,applyStyles:function(){var e=this.element,t=this.video,r=this.videoRotation,i=t.videoHeight,n=t.videoWidth,a=1;[90,270].indexOf(r)>=0&&(a=n/i);var o="\n height: 100%;\n position: absolute;\n width: 100%;\n -moz-transform: scale("+a+") rotate("+r+"deg);\n -webkit-transform: scale("+a+") rotate("+r+"deg);\n -o-transform: scale("+a+") rotate("+r+"deg);\n -ms-transform: scale("+a+") rotate("+r+"deg);\n transform: scale("+a+") rotate("+r+"deg);\n z-index: 1;\n ";e.setAttribute("style",o),e.className="lpk-render-layer lpk-video",t.style.height="100%",t.style.width="100%"},cleanupElement:function(){var e=this.element,t=this.renderer,r=this._video,i=t.parentView;e.innerHtml&&(e.innerHtml=""),r&&(r.loop=!1,r.muted=!1,r.removeEventListener("pause",this.playIfPlaying)),i&&i.stop(),delete this._video},pause:function(){var e=this._isVisible,t=this._video;e&&t.pause()},play:function(){if(this._isVisible){var e=this._video,t=e.play();t?t.catch(this._handlePlayFailure):n.a.isIE||n.a.isEdge||(e.pause(),setTimeout(this._handlePlayFailure))}},_handlePlayFailure:i.a.boundFunction(function(){this.renderer.requestMoreCompatibleRecipe()}),playIfPlaying:i.a.boundFunction(function(){var e=this.isPlaying,t=this._video;if(e&&t.paused){var r=t.play();r&&r.catch(function(){})}}),setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),r=t.autoplay,i=t.parentView,n=t.video;this.cleanupElement(),e.appendChild(n),this.applyStyles(),n.loop=!0,n.muted=!0,this._video=n,this._isVisible=!0,this._super(),r&&(n.addEventListener("pause",this.playIfPlaying),i.play())},tearDownFromRender:function(){this.cleanupElement(),this._isVisible=!1,this._super()}});t.a=s},function(e,t,r){"use strict";function i(e){e.retain()}function n(e){e.release()}var a=r(0),o=r(7),s=r(17),u=o.a.extend({videoDecoder:a.a.proxyProperty("renderer.videoDecoder"),videoDuration:a.a.proxyProperty("videoDecoder.duration"),canRender:a.a.proxyProperty({readOnly:!0,proxyPath:"videoDecoder.canProvideFrames"}),init:function(){this._super.apply(this,arguments);var e=this.layerName,t=this.recipe;this._framePrepIDKey=t.name+"_"+e+"_framePrepID"},videoTimeAtTime:function(e){return e},_videoTimeAtTime:function(e){return isNaN(e)?e:this.videoTimeAtTime(e)},prepareToRenderAtTime:function(e){var t=this._currentPrepID=++l;if(!this.canRender)return!1;this.prepareVideoFramesFromTime(e);for(var r,i=this._retainedFrames,n=0,a=0;r=i[a];a++)2!==r.readyState&&(r[this._framePrepIDKey]=t,r.onReadyOrFail(this._frameDidPrepare),n++);return this._preppingFrameCount=n,!n},reduceMemoryFootprint:function(){this._super(),this._clearAllRetainedFrames()},_clearAllRetainedFrames:function(){this._clearExtraRetainedFrames(),this._clearRetainedInstantaneousFrames()},_clearExtraRetainedFrames:function(){var e=this._retainedFrames;e&&(e.forEach(n),e.length=0)},_clearRetainedInstantaneousFrames:function(){this._retainedLoFrame&&this._retainedLoFrame.release(),this._retainedHiFrame&&this._retainedHiFrame.release(),this._retainedLoFrame=this._retainedHiFrame=null},_frameDidPrepare:a.a.boundFunction(function(e){e[this._framePrepIDKey]===this._currentPrepID&&(e[this._framePrepIDKey]=void 0,--this._preppingFrameCount||this.renderer.prepareToRenderAtTime(this.renderer.currentTime))}),prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e)},canRenderAtTime:function(e){if("none"===this.display(e))return!0;if(!this.canRender)return!1;for(var t,r=!0,i=this.requiredFramesForTime(e),n=0;t=i[n];n++)r=r&&2===t.readyState,t.retain().release();return r},renderAtTime:function(e){if(!arguments.length)return this._super();if("none"===this.display(e))return this._clearRetainedInstantaneousFrames(),this._super(e);var t=this._videoTimeAtTime(e),r=this.requiredFramesForVideoTime(t),i=r[0]||null,n=r[1]||null;if(i&&i.retain(),n&&n.retain(),this._clearRetainedInstantaneousFrames(),this._retainedLoFrame=i,this._retainedHiFrame=n,i&&(i=i.backingFrame),n&&(n=n.backingFrame),i&&n&&i.number>n.number){var a=i;n=i,i=a}i===n&&(n=null);var o=!i||n?this.videoDecoder.fractionalIndexForTime(t):i.frameNumber,s=o-(0|o);this.renderFramePair(i,n,s),this._super(e)},renderFramePair:function(){},requiredFramesForVideoTime:function(e,t,r){isNaN(t)&&(t=e);var i=this.videoDecoder,n=this.videoDuration,a=i.frameCount,o=d;if(o.length=0,t<0||e>n||isNaN(e)||isNaN(t))return o;var u=Math.max(0,Math.floor(i.fractionalIndexForTime(e))),l=Math.min(i.frameCount,Math.ceil(i.fractionalIndexForTime(t))),c=l=0;l--){var d=u[l],c=d.time;(!o||c>a/2)&&(n(d),u.splice(l,1))}u.push.apply(u,s)},retainFramesForTime:function(e,t,r){return this.retainFramesForVideoTime(this._videoTimeAtTime(e),this._videoTimeAtTime(t),r)},dispose:function(){this.retainFramesForVideoTime(NaN),this._super()}}),l=1,d=[];t.a=u},function(e,t,r){"use strict";var i=r(7),n=r(0),a=i.a.extend({isPlaying:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.parentView.isPlaying"}),photo:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.photo"}),canRender:n.a.proxyProperty("photo"),canRenderAtTime:function(e){var t=this.photo;return!("none"!==this.display(e)&&(!t||t instanceof Image&&!t.complete))}});t.a=a},function(e,t,r){"use strict";var i=r(7),n=r(0),a=i.a.extend({canRender:n.a.proxyProperty({readOnly:!0,proxyPath:"video"}),isPlaying:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.parentView.isPlaying"}),video:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.video"}),videoRotation:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.provider.videoRotation"})});t.a=a},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){var t=r.i(o.a)(e),i=l.get(t);if(i)return i;var n=e.map(function(e){if("i"===e[0]&&h(e[1]))return"I"+e.substring(1)});return e=e.concat(n.filter(function(e){return!!e})),i=new RegExp(e.join("|"),"g"),l.set(t,i),i}function a(e,t){var r=e.charCodeAt(0),i=t.charCodeAt(0),n=new Map;return function(e){var t=n.get(e);if(void 0!==t)return t;var a=e.charCodeAt(0);return t=a>=r&&a<=i,n.set(e,t),t}}var o=r(20),s=function(){function e(e,t){for(var r=0;r>>1,this.h>>>1)}},{key:"length",value:function(){return this.w*this.h}}])}(),function(){function e(t,r,n){i(this,e),this.bytes=new Uint8Array(t),this.start=r||0,this.pos=this.start,this.end=r+n||this.bytes.length}return s(e,[{key:"readU8Array",value:function(e){if(this.pos>this.end-e)return null;var t=this.bytes.subarray(this.pos,this.pos+e);return this.pos+=e,t}},{key:"readU32Array",value:function(e,t,r){if(t=t||1,this.pos>this.end-e*t*4)return null;if(1===t){for(var i=new Uint32Array(e),n=0;n>24}},{key:"readU8",value:function(){return this.pos>=this.end?null:this.bytes[this.pos++]}},{key:"read16",value:function(){return this.readU16()<<16>>16}},{key:"readU16",value:function(){if(this.pos>=this.end-1)return null;var e=this.bytes[this.pos+0]<<8|this.bytes[this.pos+1];return this.pos+=2,e}},{key:"read24",value:function(){return this.readU24()<<8>>8}},{key:"readU24",value:function(){var e=this.pos,t=this.bytes;if(e>this.end-3)return null;var r=t[e+0]<<16|t[e+1]<<8|t[e+2];return this.pos+=3,r}},{key:"peek32",value:function(e){var t=this.pos,r=this.bytes;if(t>this.end-4)return null;var i=r[t+0]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3];return e&&(this.pos+=4),i}},{key:"read32",value:function(){return this.peek32(!0)}},{key:"readU32",value:function(){return this.peek32(!0)>>>0}},{key:"read4CC",value:function(){var e=this.pos;if(e>this.end-4)return null;for(var t="",r=0;r<4;r++)t+=String.fromCharCode(this.bytes[e+r]);return this.pos+=4,t}},{key:"readFP16",value:function(){return this.read32()/65536}},{key:"readFP8",value:function(){return this.read16()/256}},{key:"readISO639",value:function(){for(var e=this.readU16(),t="",r=0;r<3;r++){var i=e>>>5*(2-r)&31;t+=String.fromCharCode(i+96)}return t}},{key:"readUTF8",value:function(e){for(var t="",r=0;rthis.end)&&a("Index out of bounds (bounds: [0, "+this.end+"], index: "+e+")."),this.pos=e}},{key:"subStream",value:function(t,r){return new e(this.bytes.buffer,t,r)}},{key:"uint",value:function(e){for(var t=this.position,r=t+e,i=0,n=t;n0&&(T.name=e.readUTF8(l));break;case"minf":o.name="Media Information Box",a();break;case"stbl":o.name="Sample Table Box",a();break;case"stsd":var x=o;x.name="Sample Description Box",t(),x.sd=[],e.readU32(),a();break;case"avc1":var S=o;e.reserved(6,0),S.dataReferenceIndex=e.readU16(),n(0==e.readU16()),n(0==e.readU16()),e.readU32(),e.readU32(),e.readU32(),S.width=e.readU16(),S.height=e.readU16(),S.horizontalResolution=e.readFP16(),S.verticalResolution=e.readFP16(),n(0==e.readU32()),S.frameCount=e.readU16(),S.compressorName=e.readPString(32),S.depth=e.readU16(),n(65535==e.readU16()),a();break;case"mp4a":var w=o;if(e.reserved(6,0),w.dataReferenceIndex=e.readU16(),w.version=e.readU16(),0!==w.version){i();break}e.skip(2),e.skip(4),w.channelCount=e.readU16(),w.sampleSize=e.readU16(),w.compressionId=e.readU16(),w.packetSize=e.readU16(),w.sampleRate=e.readU32()>>>16,a();break;case"esds":o.name="Elementary Stream Descriptor",t(),i();break;case"avcC":var O=o;O.name="AVC Configuration Box",O.configurationVersion=e.readU8(),O.avcProfileIndicaation=e.readU8(),O.profileCompatibility=e.readU8(),O.avcLevelIndication=e.readU8(),O.lengthSizeMinusOne=3&e.readU8(),n(3==O.lengthSizeMinusOne,"TODO"),u=31&e.readU8(),O.sps=[];for(var C=0;C=8,"Cannot parse large media data yet."),j.data=e.readU8Array(r());break;case"mebx":o.name="Mebx",a();break;case"meta":o.name="Metadata",a();break;case"keys":var U=o;U.name="Metadata Item Keys",t();var V=U.keyCount=e.read32(),N=U.offset-U.size;U.keyList=new Map;for(var B=1;B<=V;B++){var z=e.read32()-8;z<1||z>N||(e.skip(4),U.keyList.set(e.readUTF8(z),B))}this.metaData.keys=U;break;case"ilst":var H=o;H.name="Metadata Item List",H.items=[];for(var K=H.offset+H.size;e.position0){var s=t[a-1],u=o.firstChunk-s.firstChunk,l=s.samplesPerChunk*u;if(!(e>=l))return{index:i+Math.floor(e/s.samplesPerChunk),offset:e%s.samplesPerChunk};if(e-=l,a===t.length-1)return{index:i+u+Math.floor(e/o.samplesPerChunk),offset:e%o.samplesPerChunk};i+=u}}n(!1)}},{key:"chunkToOffset",value:function(e){return this.trak.mdia.minf.stbl.stco.table[e]}},{key:"sampleToOffset",value:function(e){var t=this.sampleToChunk(e);return this.chunkToOffset(t.index)+this.sampleToSize(e-t.offset,t.offset)}},{key:"timeToSample",value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,r=0,i=0;i=n))return r+Math.floor(e/t[i].delta);e-=n,r+=t[i].count}}},{key:"sampleToTime",value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,r=0,i=0,n=0;n0;){var a=new u(t.buffer,r).readU32();n.push(t.subarray(r+4,r+a+4)),r=r+a+4}return n}}]),e}()},function(e,t,r){"use strict";var i={staticMembers:{_pool:null,_cache:null,init:function(){this._pool=[],this._cache={},this._super()},getPoolingCacheKey:function(){throw"Must implement `getPoolingCacheKey` to use PoolCaching."},getCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments),t=this._cache[e];return t||(t=this._cache[e]=this._pool.pop()||this.create(),t._poolingCacheKey=e,t.initFromPool.apply(t,arguments)),t},peekCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments);return this._cache[e]||null},_disposeInstance:function(e){delete this._cache[e._poolingCacheKey],e._poolingCacheKey=void 0,e._poolingLifecycleCount=1+(0|e._poolingLifecycleCount),this._pool.push(e)}},dispose:function(){},_poolingCacheKey:null,initFromPool:function(){},_retainCount:0,retain:function(){return this._retainCount++,this},release:function(){return this._retainCount--,this._retainCount||this.dispose(),this}};t.a=i},function(e,t,r){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=r(19);r.d(t,"a",function(){return d}),r.d(t,"b",function(){return h}),r.d(t,"c",function(){return f}),r.d(t,"d",function(){return y});var s=function(){function e(e,t){for(var r=0;r2?r-2:0),p=2;p=1)return e.drawImage.apply(e,i.apply(h,arguments)),!0;var R=void 0;if(f){R="_cachedSmoothDownsample_from"+g+","+b+","+_+","+P+"@"+F+"x";var L=t[R];if(L)return e.drawImage(L,0,0,L.width,L.height,k,T,x,S),!0}if(v)return e.drawImage.apply(e,i.apply(h,arguments)),!1;var E=1,A=_,I=P,D=Math.max(Math.pow(2,Math.ceil(Math.log(A)/Math.log(2))),a.width),M=Math.max(Math.pow(2,Math.ceil(Math.log(I)/Math.log(2))),a.height);for(a.width===D&&a.height===M||(a.width=s.width=D,a.height=s.height=M),o.drawImage(t,g,b,_,P,0,0,_,P);E>F;){u.drawImage(a,0,0,A,I,0,0,A=Math.ceil(A/2),I=Math.ceil(I/2)),o.clearRect(0,0,A,I);var j=a;a=s,s=j;var U=o;o=u,u=U,E/=2}if(f){var V=document.createElement("canvas");V.width=A,V.height=I,V.getContext("2d").drawImage(a,0,0),t[R]=V}return e.drawImage(a,0,0,A,I,k,T,x,S),o.clearRect(0,0,_,P),u.clearRect(0,0,_,P),!0}};c.usingCache=function(){return l=!0,this},c.avoidingWorkIf=function(e){return d=e,this};var h=[];t.a=c},function(e,t,r){"use strict";function i(){var e="_callbacksForEventHandler"+ ++n;return function(t){var r=this[e]||(this[e]=[]);if("function"==typeof t)return r.push(t);if(r)for(var i=0,n=r.length;ig;return f=f||{},f.width=b?h:p*m,f.height=b?h/m:p,f}function n(e,t,r,n,a){return i(!1,e,t,r,n,a,arguments.length)}t.a=n},function(e,t,r){"use strict";t.a="current"},function(e,t,r){"use strict";t.a="Mcurrent"},function(e,t,r){"use strict";t.a="1.5.6"}])}); -//# sourceMappingURL=resources/livephotoskit.js.map -L.Photo = L.FeatureGroup.extend({ - options: { - icon: { - iconSize: [40, 40], - }, - }, - - initialize: function (photos, options) { - L.setOptions(this, options); - L.FeatureGroup.prototype.initialize.call(this, photos); - }, - - addLayers: function (photos) { - if (photos) { - for (var i = 0, len = photos.length; i < len; i++) { - this.addLayer(photos[i]); - } - } - return this; - }, - - addLayer: function (photo) { - L.FeatureGroup.prototype.addLayer.call(this, this.createMarker(photo)); - }, - - createMarker: function (photo) { - var marker = L.marker(photo, { - icon: L.divIcon( - L.extend( - { - html: - '​", - className: "leaflet-marker-photo", - }, - photo, - this.options.icon - ) - ), - title: photo.caption || "", - }); - marker.photo = photo; - return marker; - }, -}); - -L.photo = function (photos, options) { - return new L.Photo(photos, options); -}; - -if (L.MarkerClusterGroup) { - L.Photo.Cluster = L.MarkerClusterGroup.extend({ - options: { - featureGroup: L.photo, - maxClusterRadius: 100, - showCoverageOnHover: false, - iconCreateFunction: function (cluster) { - return new L.DivIcon( - L.extend( - { - className: "leaflet-marker-photo", - html: - '​" + - cluster.getChildCount() + - "", - }, - this.icon - ) - ); - }, - icon: { - iconSize: [40, 40], - }, - }, - - initialize: function (options) { - options = L.Util.setOptions(this, options); - L.MarkerClusterGroup.prototype.initialize.call(this); - this._photos = options.featureGroup(null, options); - }, - - add: function (photos) { - this.addLayer(this._photos.addLayers(photos)); - return this; - }, - - clear: function () { - this._photos.clearLayers(); - this.clearLayers(); - }, - }); - - L.photo.cluster = function (options) { - return new L.Photo.Cluster(options); - }; -} - -"use strict"; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _templateObject = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject2 = _taggedTemplateLiteral(["

", "\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\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

"]), - _templateObject3 = _taggedTemplateLiteral(["

", "\n\t\t\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

"]), - _templateObject4 = _taggedTemplateLiteral([""], [""]), - _templateObject5 = _taggedTemplateLiteral(["

", " ", "

"], ["

", " ", "

"]), - _templateObject6 = _taggedTemplateLiteral(["

", " $", " ", " ", "

"], ["

", " $", " ", " ", "

"]), - _templateObject7 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject8 = _taggedTemplateLiteral(["\n\t
\n\t\t

", "\n\t\t\n\t\t\t\n\t\t\n\t\t
\n\t\t", "\n\t\t

\n\t
"], ["\n\t
\n\t\t

", "\n\t\t\n\t\t\t\n\t\t\n\t\t
\n\t\t", "\n\t\t

\n\t
"]), - _templateObject9 = _taggedTemplateLiteral(["\n\t
\n\t\t

"], ["\n\t

\n\t\t

"]), - _templateObject10 = _taggedTemplateLiteral(["\n\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

", "

\n\t\t\t\t
\n\t\t\t
\n\t\t"]), - _templateObject11 = _taggedTemplateLiteral(["?albumIDs=", ""], ["?albumIDs=", ""]), - _templateObject12 = _taggedTemplateLiteral(["

", " '$", "' ", " '$", "'?

"], ["

", " '$", "' ", " '$", "'?

"]), - _templateObject13 = _taggedTemplateLiteral(["

", " '$", "'?

"], ["

", " '$", "'?

"]), - _templateObject14 = _taggedTemplateLiteral(["

", " '$", "' ", "

"], ["

", " '$", "' ", "

"]), - _templateObject15 = _taggedTemplateLiteral(["

", " $", " ", "

"], ["

", " $", " ", "

"]), - _templateObject16 = _taggedTemplateLiteral([""], [""]), - _templateObject17 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject18 = _taggedTemplateLiteral(["
", "
"], ["
", "
"]), - _templateObject19 = _taggedTemplateLiteral(["
"], ["
"]), - _templateObject20 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t\t\t$", "\n\t\t\t\t
\n\t\t\t"], ["\n\t\t\t
\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t\t\t$", "\n\t\t\t\t
\n\t\t\t"]), - _templateObject21 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject22 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t
"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t
"]), - _templateObject23 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t"], ["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t"]), - _templateObject24 = _taggedTemplateLiteral(["", "", ""], ["", "", ""]), - _templateObject25 = _taggedTemplateLiteral(["", ""], ["", ""]), - _templateObject26 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject27 = _taggedTemplateLiteral(["\n\t\t\t\t\t
\n\t\t\t\t\t\t

$", "

\n\t\t\t\t\t\t

$", "

\n\t\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\t

$", "

\n\t\t\t\t\t
\n\t\t\t\t"]), - _templateObject28 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t

$", "

\n\t\t\t\t

", "

\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t\t\t

$", "

\n\t\t\t\t

", "

\n\t\t\t
\n\t\t"]), - _templateObject29 = _taggedTemplateLiteral(["\n\t\t\t

$", "

\n\t\t\t

", " at ", ", ", " ", "
\n\t\t\t", " ", "

\n\t\t\t
\n\t\t"], ["\n\t\t\t

$", "

\n\t\t\t

", " at ", ", ", " ", "
\n\t\t\t", " ", "

\n\t\t\t
\n\t\t"]), - _templateObject30 = _taggedTemplateLiteral([""], [""]), - _templateObject31 = _taggedTemplateLiteral(["big"], ["big"]), - _templateObject32 = _taggedTemplateLiteral(["", ""], ["", ""]), - _templateObject33 = _taggedTemplateLiteral(["
", ""], ["
", ""]), - _templateObject34 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject35 = _taggedTemplateLiteral(["\n\t\t\t

$", "

\n\t\t\t
\n\t\t\t"], ["\n\t\t\t

$", "

\n\t\t\t
\n\t\t\t"]), - _templateObject36 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject37 = _taggedTemplateLiteral(["\n\t\t
\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t
\n\t\t"], ["\n\t\t
\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t
\n\t\t"]), - _templateObject38 = _taggedTemplateLiteral(["$", "", ""], ["$", "", ""]), - _templateObject39 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject40 = _taggedTemplateLiteral(["
", "
"], ["
", "
"]), - _templateObject41 = _taggedTemplateLiteral(["
\n\t\t\t

\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\tSave\n\t\t\tDelete\n\t\t
\n\t\t"], ["
\n\t\t\t

\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\tSave\n\t\t\tDelete\n\t\t
\n\t\t"]), - _templateObject42 = _taggedTemplateLiteral(["
\n\t\t\t

\n\t\t\t\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t\tDelete\n\t\t
\n\t\t"], ["
\n\t\t\t

\n\t\t\t\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t\tDelete\n\t\t
\n\t\t"]), - _templateObject43 = _taggedTemplateLiteral(["\n\t\t\t ", "\n\t\t\t \n\t\t\t
$", "
\n\t\t\t "], ["\n\t\t\t ", "\n\t\t\t \n\t\t\t
$", "
\n\t\t\t "]), - _templateObject44 = _taggedTemplateLiteral(["$", "", ""], ["$", "", ""]), - _templateObject45 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t×\n\t\t", ""], ["\n\t\t", "\n\t\t×\n\t\t", ""]), - _templateObject46 = _taggedTemplateLiteral(["\n\t\t", "", " \n\t\t", "", " \n\t\t", "", ""], ["\n\t\t", "", " \n\t\t", "", " \n\t\t", "", ""]), - _templateObject47 = _taggedTemplateLiteral(["\n\t\t", "", "\n\t\t", "", "\n\t\t", "", "\n\t\t", "", ""], ["\n\t\t", "", "\n\t\t", "", "\n\t\t", "", "\n\t\t", "", ""]), - _templateObject48 = _taggedTemplateLiteral(["\n\t\t", "", "\n\t\t"], ["\n\t\t", "", "\n\t\t"]), - _templateObject49 = _taggedTemplateLiteral(["\n\t\t\t\t

Lychee ", "

\n\t\t\t\t\n\t\t\t\t

", "

\n\t\t\t\t

Lychee ", "

\n\t\t\t "], ["\n\t\t\t\t

Lychee ", "

\n\t\t\t\t\n\t\t\t\t

", "

\n\t\t\t\t

Lychee ", "

\n\t\t\t "]), - _templateObject50 = _taggedTemplateLiteral(["\n\t\t\t", "\n\t\t\t
\n\t\t\t\t\n\t\t\t\t

Lychee ", "", "

\n\t\t\t
\n\t\t\t"], ["\n\t\t\t", "\n\t\t\t
\n\t\t\t\t\n\t\t\t\t

Lychee ", "", "

\n\t\t\t
\n\t\t\t"]), - _templateObject51 = _taggedTemplateLiteral([""], [""]), - _templateObject52 = _taggedTemplateLiteral(["

", " '", "' ", "

"], ["

", " '", "' ", "

"]), - _templateObject53 = _taggedTemplateLiteral(["

", " ", " ", "

"], ["

", " ", " ", "

"]), - _templateObject54 = _taggedTemplateLiteral([""], [""]), - _templateObject55 = _taggedTemplateLiteral(["

", " ", " ", " ", "

"], ["

", " ", " ", " ", "

"]), - _templateObject56 = _taggedTemplateLiteral(["\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t"], ["\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t"]), - _templateObject57 = _taggedTemplateLiteral(["\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t"], ["\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

", "

\n\t\t
\n\t"]), - _templateObject58 = _taggedTemplateLiteral(["\n\t\t\t

", "

\n\t\t\t", "\n\t\t\t", "\n\t\t"], ["\n\t\t\t

", "

\n\t\t\t", "\n\t\t\t", "\n\t\t"]), - _templateObject59 = _taggedTemplateLiteral(["\n\t\t\t", "\n\t\t\t

", "

\n\t\t\t", "\n\t\t"], ["\n\t\t\t", "\n\t\t\t

", "

\n\t\t\t", "\n\t\t"]), - _templateObject60 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject61 = _taggedTemplateLiteral([""], [""]), - _templateObject62 = _taggedTemplateLiteral(["\n\t\t\t\t\n\t\t\t\t\t", "", "\n\t\t\t\t\n\t\t\t"], ["\n\t\t\t\t\n\t\t\t\t\t", "", "\n\t\t\t\t\n\t\t\t"]), - _templateObject63 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t"]), - _templateObject64 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t"]), - _templateObject65 = _taggedTemplateLiteral(["?photoIDs=", "&kind=", ""], ["?photoIDs=", "&kind=", ""]), - _templateObject66 = _taggedTemplateLiteral(["\n\t\t\t

\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t", "\n\t\t\t\t\n\t\t\t

\n\t\t"], ["\n\t\t\t

\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t", "\n\t\t\t\t\n\t\t\t

\n\t\t"]), - _templateObject67 = _taggedTemplateLiteral(["\n\t\t\n\t"]), - _templateObject69 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject70 = _taggedTemplateLiteral([", "], [", "]), - _templateObject71 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject72 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject73 = _taggedTemplateLiteral(["\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\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\t "]), - _templateObject74 = _taggedTemplateLiteral(["\n\t\t\t\t \n\t\t\t\t
\n\t\t\t\t\t
", "
\n\t\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t "], ["\n\t\t\t\t \n\t\t\t\t
\n\t\t\t\t\t
", "
\n\t\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t "]), - _templateObject75 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject76 = _taggedTemplateLiteral(["

"], ["

"]), - _templateObject77 = _taggedTemplateLiteral(["\n\t\t\t

\n\t\t\t\t", "\n\t\t\t\t\n\t\t\t

\n\t\t"], ["\n\t\t\t

\n\t\t\t\t", "\n\t\t\t\t\n\t\t\t

\n\t\t"]), - _templateObject78 = _taggedTemplateLiteral(["\n\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

\n\t\t\t\t
\n\t\t\t"], ["\n\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

\n\t\t\t\t
\n\t\t\t"]), - _templateObject79 = _taggedTemplateLiteral(["url(\"", "\")"], ["url(\"", "\")"]), - _templateObject80 = _taggedTemplateLiteral(["linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)), url(\"", "\")"], ["linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)), url(\"", "\")"]), - _templateObject81 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t
\n\t\t\t"], ["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t
\n\t\t\t"]), - _templateObject82 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t

\n\t\t\t\t", "\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t

\n\t\t\t\t", "\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject83 = _taggedTemplateLiteral(["\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t$", "\n\t\t\t\t\t\t

\n\t\t\t\t\t\t
"], ["\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t$", "\n\t\t\t\t\t\t

\n\t\t\t\t\t\t
"]), - _templateObject84 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t$", "\n\t\t\t\t\n\t\t\t\t

\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t$", "\n\t\t\t\t\n\t\t\t\t

\n\t\t\t
\n\t\t"]), - _templateObject85 = _taggedTemplateLiteral(["\n\t\t\t", "\n\t\t
\n\t\t\t"], ["\n\t\t\t", "\n\t\t
\n\t\t\t"]), - _templateObject86 = _taggedTemplateLiteral([""], [""]), - _templateObject87 = _taggedTemplateLiteral(["", ""], ["", ""]); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -function gup(b) { - b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); - - var a = "[\\?&]" + b + "=([^&#]*)"; - var d = new RegExp(a); - var c = d.exec(window.location.href); - - if (c === null) return "";else return c[1]; -} - -/** - * @description This module communicates with Lychee's API - */ - -var api = { - path: "php/index.php", - onError: null -}; - -api.get_url = function (fn) { - var api_url = ""; - - if (lychee.api_V2) { - // because the api is defined directly by the function called in the route.php - api_url = "api/" + fn; - } else { - api_url = api.path; - } - - return api_url; -}; - -api.isTimeout = function (errorThrown, jqXHR) { - if (errorThrown && errorThrown === "Bad Request" && jqXHR && jqXHR.responseJSON && jqXHR.responseJSON.error && jqXHR.responseJSON.error === "Session timed out") { - return true; - } - - return false; -}; - -api.post = function (fn, params, callback) { - - let data = ''; - let ok = false; - console.log(fn); - if(fn == 'Session::init') - { - data = `{"api_V2":true,"sub_albums":true,"config":{"version":"040201","check_for_updates":"0","sorting_Albums_col":"max_takestamp","sorting_Albums_order":"ASC","lang":"en","layout":"1","image_overlay":"1","image_overlay_type":"desc","full_photo":"1","Mod_Frame":"1","Mod_Frame_refresh":"30","landing_page_enable":"0","site_title":"Lychee v4","public_search":"0","public_recent":"0","public_starred":"0","downloadable":"0","photos_wraparound":"1","map_display":"0","zip64":"1","map_display_public":"0","map_provider":"Wikimedia","force_32bit_ids":"0","map_include_subalbums":"0","share_button_visible":"0","location_decoding":"0","location_decoding_timeout":"30","location_show":"1","location_show_public":"0","rss_enable":"0","rss_recent_days":"7","rss_max_items":"100","swipe_tolerance_x":"150","swipe_tolerance_y":"250","nsfw_visible":"1","nsfw_blur":"1","nsfw_warning":"1","nsfw_warning_admin":"0","sorting_Albums":"ORDER BY max_takestamp ASC"},"status":1,"config_device":{"header_auto_hide":true,"active_focus_on_page_load":false,"enable_button_visibility":true,"enable_button_share":true,"enable_button_archive":true,"enable_button_move":true,"enable_button_trash":true,"enable_button_fullscreen":true,"enable_button_download":true,"enable_button_add":true,"enable_button_more":true,"enable_button_rotate":true,"enable_close_tab_on_esc":false,"enable_contextmenu_header":true,"hide_content_during_imgview":false,"enable_tabindex":false,"device_type":"desktop"},"locale":{"USERNAME":"username","PASSWORD":"password","ENTER":"Enter","CANCEL":"Cancel","SIGN_IN":"Sign In","CLOSE":"Close","SETTINGS":"Settings","SEARCH":"Search ...","MORE":"More","DEFAULT":"Default","USERS":"Users","U2F":"U2F","SHARING":"Sharing","CHANGE_LOGIN":"Change Login","CHANGE_SORTING":"Change Sorting","SET_DROPBOX":"Set Dropbox","ABOUT_LYCHEE":"About Lychee","DIAGNOSTICS":"Diagnostics","DIAGNOSTICS_GET_SIZE":"Request space usage","LOGS":"Show Logs","SIGN_OUT":"Sign Out","UPDATE_AVAILABLE":"Update available!","MIGRATION_AVAILABLE":"Migration available!","DEFAULT_LICENSE":"Default license for new uploads:","SET_LICENSE":"Set License","SET_OVERLAY_TYPE":"Set Overlay","SET_MAP_PROVIDER":"Set OpenStreetMap tiles provider","SMART_ALBUMS":"Smart albums","SHARED_ALBUMS":"Shared albums","ALBUMS":"Albums","PHOTOS":"Pictures","SEARCH_RESULTS":"Search results","RENAME":"Rename","RENAME_ALL":"Rename Selected","MERGE":"Merge","MERGE_ALL":"Merge Selected","MAKE_PUBLIC":"Make Public","SHARE_ALBUM":"Share Album","SHARE_PHOTO":"Share Photo","VISIBILITY_ALBUM":"Album Visibility","VISIBILITY_PHOTO":"Photo Visibility","DOWNLOAD_ALBUM":"Download Album","ABOUT_ALBUM":"About Album","DELETE_ALBUM":"Delete Album","MOVE_ALBUM":"Move Album","FULLSCREEN_ENTER":"Enter Fullscreen","FULLSCREEN_EXIT":"Exit Fullscreen","DELETE_ALBUM_QUESTION":"Delete Album and Photos","KEEP_ALBUM":"Keep Album","DELETE_ALBUM_CONFIRMATION_1":"Are you sure you want to delete the album","DELETE_ALBUM_CONFIRMATION_2":"and all of the photos it contains? This action can't be undone!","DELETE_ALBUMS_QUESTION":"Delete Albums and Photos","KEEP_ALBUMS":"Keep Albums","DELETE_ALBUMS_CONFIRMATION_1":"Are you sure you want to delete all","DELETE_ALBUMS_CONFIRMATION_2":"selected albums and all of the photos they contain? This action can't be undone!","DELETE_UNSORTED_CONFIRM":"Are you sure you want to delete all photos from 'Unsorted'?
This action can't be undone!","CLEAR_UNSORTED":"Clear Unsorted","KEEP_UNSORTED":"Keep Unsorted","EDIT_SHARING":"Edit Sharing","MAKE_PRIVATE":"Make Private","CLOSE_ALBUM":"Close Album","CLOSE_PHOTO":"Close Photo","CLOSE_MAP":"Close Map","ADD":"Add","MOVE":"Move","MOVE_ALL":"Move Selected","DUPLICATE":"Duplicate","DUPLICATE_ALL":"Duplicate Selected","COPY_TO":"Copy to...","COPY_ALL_TO":"Copy Selected to...","DELETE":"Delete","DELETE_ALL":"Delete Selected","DOWNLOAD":"Download","DOWNLOAD_ALL":"Download Selected","UPLOAD_PHOTO":"Upload Photo","IMPORT_LINK":"Import from Link","IMPORT_DROPBOX":"Import from Dropbox","IMPORT_SERVER":"Import from Server","NEW_ALBUM":"New Album","NEW_TAG_ALBUM":"New Tag Album","TITLE_NEW_ALBUM":"Enter a title for the new album:","UNTITLED":"Untilted","UNSORTED":"Unsorted","STARRED":"Starred","RECENT":"Recent","PUBLIC":"Public","NUM_PHOTOS":"Photos","CREATE_ALBUM":"Create Album","CREATE_TAG_ALBUM":"Create Tag Album","STAR_PHOTO":"Star Photo","STAR":"Star","STAR_ALL":"Star Selected","TAGS":"Tag","TAGS_ALL":"Tag Selected","UNSTAR_PHOTO":"Unstar Photo","FULL_PHOTO":"Open Original","ABOUT_PHOTO":"About Photo","DISPLAY_FULL_MAP":"Map","DIRECT_LINK":"Direct Link","DIRECT_LINKS":"Direct Links","ALBUM_ABOUT":"About","ALBUM_BASICS":"Basics","ALBUM_TITLE":"Title","ALBUM_NEW_TITLE":"Enter a new title for this album:","ALBUMS_NEW_TITLE_1":"Enter a title for all","ALBUMS_NEW_TITLE_2":"selected albums:","ALBUM_SET_TITLE":"Set Title","ALBUM_DESCRIPTION":"Description","ALBUM_SHOW_TAGS":"Tags to show","ALBUM_NEW_DESCRIPTION":"Enter a new description for this album:","ALBUM_SET_DESCRIPTION":"Set Description","ALBUM_NEW_SHOWTAGS":"Enter tags of photos that will be visible in this album:","ALBUM_SET_SHOWTAGS":"Set tags to show","ALBUM_ALBUM":"Album","ALBUM_CREATED":"Created","ALBUM_IMAGES":"Images","ALBUM_VIDEOS":"Videos","ALBUM_SUBALBUMS":"Subalbums","ALBUM_SHARING":"Share","ALBUM_SHR_YES":"YES","ALBUM_SHR_NO":"No","ALBUM_PUBLIC":"Public","ALBUM_PUBLIC_EXPL":"Album can be viewed by others, subject to the restrictions below.","ALBUM_FULL":"Original","ALBUM_FULL_EXPL":"Full-resolution pictures are available.","ALBUM_HIDDEN":"Hidden","ALBUM_HIDDEN_EXPL":"Only people with the direct link can view this album.","ALBUM_MARK_NSFW":"Mark album as sensitive","ALBUM_UNMARK_NSFW":"Unmark album as sensitive","ALBUM_NSFW":"Sensitive","ALBUM_NSFW_EXPL":"Album is marked to contain sensitive content.","ALBUM_DOWNLOADABLE":"Downloadable","ALBUM_DOWNLOADABLE_EXPL":"Visitors of your gallery can download this album.","ALBUM_SHARE_BUTTON_VISIBLE":"Share button is visible","ALBUM_SHARE_BUTTON_VISIBLE_EXPL":"Display social media sharing links.","ALBUM_PASSWORD":"Password","ALBUM_PASSWORD_PROT":"Password protected","ALBUM_PASSWORD_PROT_EXPL":"Album only accessible with a valid password.","ALBUM_PASSWORD_REQUIRED":"This album is protected by a password. Enter the password below to view the photos of this album:","ALBUM_MERGE_1":"Are you sure you want to merge the album","ALBUM_MERGE_2":"into the album","ALBUMS_MERGE":"Are you sure you want to merge all selected albums into the album","MERGE_ALBUM":"Merge Albums","DONT_MERGE":"Don't Merge","ALBUM_MOVE_1":"Are you sure you want to move the album","ALBUM_MOVE_2":"into the album","ALBUMS_MOVE":"Are you sure you want to move all selected albums into the album","MOVE_ALBUMS":"Move Albums","NOT_MOVE_ALBUMS":"Don't Move","ROOT":"Albums","ALBUM_REUSE":"Reuse","ALBUM_LICENSE":"License","ALBUM_SET_LICENSE":"Set License","ALBUM_LICENSE_HELP":"Need help choosing?","ALBUM_LICENSE_NONE":"None","ALBUM_RESERVED":"All Rights Reserved","ALBUM_SET_ORDER":"Set Order","ALBUM_ORDERING":"Order by","PHOTO_ABOUT":"About","PHOTO_BASICS":"Basics","PHOTO_TITLE":"Title","PHOTO_NEW_TITLE":"Enter a new title for this photo:","PHOTO_SET_TITLE":"Set Title","PHOTO_UPLOADED":"Uploaded","PHOTO_DESCRIPTION":"Description","PHOTO_NEW_DESCRIPTION":"Enter a new description for this photo:","PHOTO_SET_DESCRIPTION":"Set Description","PHOTO_NEW_LICENSE":"Add a License","PHOTO_SET_LICENSE":"Set License","PHOTO_LICENSE":"License","PHOTO_REUSE":"Reuse","PHOTO_LICENSE_NONE":"None","PHOTO_RESERVED":"All Rights Reserved","PHOTO_LATITUDE":"Latitude","PHOTO_LONGITUDE":"Longitude","PHOTO_ALTITUDE":"Altitude","PHOTO_IMGDIRECTION":"Direction","PHOTO_LOCATION":"Location","PHOTO_IMAGE":"Image","PHOTO_VIDEO":"Video","PHOTO_SIZE":"Size","PHOTO_FORMAT":"Format","PHOTO_RESOLUTION":"Resolution","PHOTO_DURATION":"Duration","PHOTO_FPS":"Frame rate","PHOTO_TAGS":"Tags","PHOTO_NOTAGS":"No Tags","PHOTO_NEW_TAGS":"Enter your tags for this photo. You can add multiple tags by separating them with a comma:","PHOTO_NEW_TAGS_1":"Enter your tags for all","PHOTO_NEW_TAGS_2":"selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma:","PHOTO_SET_TAGS":"Set Tags","PHOTO_CAMERA":"Camera","PHOTO_CAPTURED":"Captured","PHOTO_MAKE":"Make","PHOTO_TYPE":"Type\/Model","PHOTO_LENS":"Lens","PHOTO_SHUTTER":"Shutter Speed","PHOTO_APERTURE":"Aperture","PHOTO_FOCAL":"Focal Length","PHOTO_ISO":"ISO","PHOTO_SHARING":"Sharing","PHOTO_SHR_PLUBLIC":"Public","PHOTO_SHR_ALB":"Yes (Album)","PHOTO_SHR_PHT":"Yes (Photo)","PHOTO_SHR_NO":"No","PHOTO_DELETE":"Delete Photo","PHOTO_KEEP":"Keep Photo","PHOTO_DELETE_1":"Are you sure you want to delete the photo","PHOTO_DELETE_2":"? This action can't be undone!","PHOTO_DELETE_ALL_1":"Are you sure you want to delete all","PHOTO_DELETE_ALL_2":"selected photo? This action can't be undone!","PHOTOS_NEW_TITLE_1":"Enter a title for all","PHOTOS_NEW_TITLE_2":"selected photos:","PHOTO_MAKE_PRIVATE_ALBUM":"This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.","PHOTO_SHOW_ALBUM":"Show Album","PHOTO_PUBLIC":"Public","PHOTO_PUBLIC_EXPL":"Photo can be viewed by others, subject to the restrictions below.","PHOTO_FULL":"Original","PHOTO_FULL_EXPL":"Full-resolution picture is available.","PHOTO_HIDDEN":"Hidden","PHOTO_HIDDEN_EXPL":"Only people with the direct link can view this photo.","PHOTO_DOWNLOADABLE":"Downloadable","PHOTO_DOWNLOADABLE_EXPL":"Visitors of your gallery can download this photo.","PHOTO_SHARE_BUTTON_VISIBLE":"Share button is visible","PHOTO_SHARE_BUTTON_VISIBLE_EXPL":"Display social media sharing links.","PHOTO_PASSWORD_PROT":"Password protected","PHOTO_PASSWORD_PROT_EXPL":"Photo only accessible with a valid password.","PHOTO_EDIT_SHARING_TEXT":"The sharing properties of this photo will be changed to the following:","PHOTO_NO_EDIT_SHARING_TEXT":"Because this photo is located in a public album, it inherits that album's visibility settings. Its current visibility is shown below for informational purposes only.","PHOTO_EDIT_GLOBAL_SHARING_TEXT":"The visibility of this photo can be fine-tuned using global Lychee settings. Its current visibility is shown below for informational purposes only.","PHOTO_SHARING_CONFIRM":"Save","LOADING":"Loading","ERROR":"Error","ERROR_TEXT":"Whoops, it looks like something went wrong. Please reload the site and try again!","ERROR_DB_1":"Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.","ERROR_DB_2":"Unable to create the database. Double-check your host, username and password and ensure that the specified user has the rights to modify and add content to the database.","ERROR_CONFIG_FILE":"Unable to save this configuration. Permission denied in 'data\/'<\/b>. Please set the read, write and execute rights for others in 'data\/'<\/b> and 'uploads\/'<\/b>. Take a look at the readme for more information.","ERROR_UNKNOWN":"Something unexpected happened. Please try again and check your installation and server. Take a look at the readme for more information.","ERROR_LOGIN":"Unable to save login. Please try again with another username and password!","ERROR_MAP_DEACTIVATED":"Map functionality has been deactivated under settings.","ERROR_SEARCH_DEACTIVATED":"Search functionality has been deactivated under settings.","SUCCESS":"OK","RETRY":"Retry","SETTINGS_SUCCESS_LOGIN":"Login Info updated.","SETTINGS_SUCCESS_SORT":"Sorting order updated.","SETTINGS_SUCCESS_DROPBOX":"Dropbox Key updated.","SETTINGS_SUCCESS_LANG":"Language updated","SETTINGS_SUCCESS_LAYOUT":"Layout updated","SETTINGS_SUCCESS_IMAGE_OVERLAY":"EXIF Overlay setting updated","SETTINGS_SUCCESS_PUBLIC_SEARCH":"Public search updated","SETTINGS_SUCCESS_LICENSE":"Default license updated","SETTINGS_SUCCESS_MAP_DISPLAY":"Map display settings updated","SETTINGS_SUCCESS_MAP_DISPLAY_PUBLIC":"Map display settings for public albums updated","SETTINGS_SUCCESS_MAP_PROVIDER":"Map provider settings updated","U2F_NOT_SUPPORTED":"U2F not supported. Sorry.","U2F_NOT_SECURE":"Environment not secured. U2F not available.","U2F_REGISTER_KEY":"Register new device.","U2F_REGISTRATION_SUCCESS":"Registration successful!","U2F_AUTHENTIFICATION_SUCCESS":"Authentication successful!","U2F_CREDENTIALS":"Credentials","U2F_CREDENTIALS_DELETED":"Credentials deleted!","DB_INFO_TITLE":"Enter your database connection details below:","DB_INFO_HOST":"Database Host (optional)","DB_INFO_USER":"Database Username","DB_INFO_PASSWORD":"Database Password","DB_INFO_TEXT":"Lychee will create its own database. If required, you can enter the name of an existing database instead:","DB_NAME":"Database Name (optional)","DB_PREFIX":"Table prefix (optional)","DB_CONNECT":"Connect","LOGIN_TITLE":"Enter a username and password for your installation:","LOGIN_USERNAME":"New Username","LOGIN_PASSWORD":"New Password","LOGIN_PASSWORD_CONFIRM":"Confirm Password","LOGIN_CREATE":"Create Login","PASSWORD_TITLE":"Enter your current password:","USERNAME_CURRENT":"Current Username","PASSWORD_CURRENT":"Current Password","PASSWORD_TEXT":"Your username and password will be changed to the following:","PASSWORD_CHANGE":"Change Login","EDIT_SHARING_TITLE":"Edit Sharing","EDIT_SHARING_TEXT":"The sharing properties of this album will be changed to the following:","SHARE_ALBUM_TEXT":"This album will be shared with the following properties:","ALBUM_SHARING_CONFIRM":"Save","SORT_ALBUM_BY_1":"Sort albums by","SORT_ALBUM_BY_2":"in an","SORT_ALBUM_BY_3":"order.","SORT_ALBUM_SELECT_1":"Creation Time","SORT_ALBUM_SELECT_2":"Title","SORT_ALBUM_SELECT_3":"Description","SORT_ALBUM_SELECT_4":"Public","SORT_ALBUM_SELECT_5":"Latest Take Date","SORT_ALBUM_SELECT_6":"Oldest Take Date","SORT_PHOTO_BY_1":"Sort photos by","SORT_PHOTO_BY_2":"in an","SORT_PHOTO_BY_3":"order.","SORT_PHOTO_SELECT_1":"Upload Time","SORT_PHOTO_SELECT_2":"Take Date","SORT_PHOTO_SELECT_3":"Title","SORT_PHOTO_SELECT_4":"Description","SORT_PHOTO_SELECT_5":"Public","SORT_PHOTO_SELECT_6":"Star","SORT_PHOTO_SELECT_7":"Photo Format","SORT_ASCENDING":"Ascending","SORT_DESCENDING":"Descending","SORT_CHANGE":"Change Sorting","DROPBOX_TITLE":"Set Dropbox Key","DROPBOX_TEXT":"In order to import photos from your Dropbox, you need a valid drop-ins app key from their website<\/a>. Generate yourself a personal key and enter it below:","LANG_TEXT":"Change Lychee language for:","LANG_TITLE":"Change Language","PUBLIC_SEARCH_TEXT":"Public search allowed:","IMAGE_OVERLAY_TEXT":"Display data overlay by default:","OVERLAY_TYPE":"Data to use in image overlay:","OVERLAY_EXIF":"Photo EXIF data","OVERLAY_DESCRIPTION":"Photo description","OVERLAY_DATE":"Photo date taken","MAP_DISPLAY_TEXT":"Enable maps (provided by OpenStreetMap):","MAP_DISPLAY_PUBLIC_TEXT":"Enable maps for public albums (provided by OpenStreetMap):","LOCATION_DECODING":"Decode GPS data into location name","LOCATION_SHOW":"Show location name","LOCATION_SHOW_PUBLIC":"Show location name for public mode","MAP_PROVIDER":"Provider of OpenStreetMap tiles:","MAP_PROVIDER_WIKIMEDIA":"Wikimedia","MAP_PROVIDER_OSM_ORG":"OpenStreetMap.org (no HiDPI)","MAP_PROVIDER_OSM_DE":"OpenStreetMap.de (no HiDPI)","MAP_PROVIDER_OSM_FR":"OpenStreetMap.fr (no HiDPI)","MAP_PROVIDER_RRZE":"University of Erlangen, Germany (only HiDPI)","MAP_INCLUDE_SUBALBUMS_TEXT":"Include photos of subalbums on map:","LAYOUT_TYPE":"Layout of photos:","LAYOUT_SQUARES":"Square thumbnails","LAYOUT_JUSTIFIED":"With aspect, justified","LAYOUT_UNJUSTIFIED":"With aspect, unjustified","SET_LAYOUT":"Change layout","NSFW_VISIBLE_TEXT_1":"Make Sensitive albums visible by default.","NSFW_VISIBLE_TEXT_2":"If the album is public, it is still accessible, just hidden from the view and can be revealed by pressing H<\/hkb><\/b>.","SETTINGS_SUCCESS_NSFW_VISIBLE":"Default sensitive album visibility updated with success.","VIEW_NO_RESULT":"No results","VIEW_NO_PUBLIC_ALBUMS":"No public albums","VIEW_NO_CONFIGURATION":"No configuration","VIEW_PHOTO_NOT_FOUND":"Photo not found","NO_TAGS":"No Tags","UPLOAD_MANAGE_NEW_PHOTOS":"You can now manage your new photo(s).","UPLOAD_COMPLETE":"Upload complete","UPLOAD_COMPLETE_FAILED":"Failed to upload one or more photos.","UPLOAD_IMPORTING":"Importing","UPLOAD_IMPORTING_URL":"Importing URL","UPLOAD_UPLOADING":"Uploading","UPLOAD_FINISHED":"Finished","UPLOAD_PROCESSING":"Processing","UPLOAD_FAILED":"Failed","UPLOAD_FAILED_ERROR":"Upload failed. Server returned an error!","UPLOAD_FAILED_WARNING":"Upload failed. Server returned a warning!","UPLOAD_SKIPPED":"Skipped","UPLOAD_ERROR_CONSOLE":"Please take a look at the console of your browser for further details.","UPLOAD_UNKNOWN":"Server returned an unknown response. Please take a look at the console of your browser for further details.","UPLOAD_ERROR_UNKNOWN":"Upload failed. Server returned an unkown error!","UPLOAD_IN_PROGRESS":"Lychee is currently uploading!","UPLOAD_IMPORT_WARN_ERR":"The import has been finished, but returned warnings or errors. Please take a look at the log (Settings -> Show Log) for further details.","UPLOAD_IMPORT_COMPLETE":"Import complete","UPLOAD_IMPORT_INSTR":"Please enter the direct link to a photo to import it:","UPLOAD_IMPORT":"Import","UPLOAD_IMPORT_SERVER":"Importing from server","UPLOAD_IMPORT_SERVER_FOLD":"Folder empty or no readable files to process. Please take a look at the log (Settings -> Show Log) for further details.","UPLOAD_IMPORT_SERVER_INSTR":"This action will import all photos, folders and sub-folders which are located in the following directory.","UPLOAD_ABSOLUTE_PATH":"Absolute path to directory","UPLOAD_IMPORT_SERVER_EMPT":"Could not start import because the folder was empty!","UPLOAD_IMPORT_DELETE_ORIGINALS":"Delete originals","UPLOAD_IMPORT_DELETE_ORIGINALS_EXPL":"Original files will be deleted after the import when possible.","UPLOAD_IMPORT_LOW_MEMORY":"Low memory condition!","UPLOAD_IMPORT_LOW_MEMORY_EXPL":"The import process on the server is approaching the memory limit and may end up being terminated prematurely.","UPLOAD_WARNING":"Warning","UPLOAD_IMPORT_NOT_A_DIRECTORY":"The given path is not a readable directory!","UPLOAD_IMPORT_PATH_RESERVED":"The given path is a reserved path of Lychee!","UPLOAD_IMPORT_UNREADABLE":"Could not read the file!","UPLOAD_IMPORT_FAILED":"Could not import the file!","UPLOAD_IMPORT_UNSUPPORTED":"Unsupported file type!","UPLOAD_IMPORT_ALBUM_FAILED":"Could not create the album!","ABOUT_SUBTITLE":"Self-hosted photo-management done right","ABOUT_DESCRIPTION":"is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.","FOOTER_COPYRIGHT":"All images on this website are subject to Copyright by ","HOSTED_WITH_LYCHEE":"Hosted with Lychee","URL_COPY_TO_CLIPBOARD":"Copy to clipboard","URL_COPIED_TO_CLIPBOARD":"Copied URL to clipboard!","PHOTO_DIRECT_LINKS_TO_IMAGES":"Direct links to image files:","PHOTO_MEDIUM":"Medium","PHOTO_MEDIUM_HIDPI":"Medium HiDPI","PHOTO_SMALL":"Thumb","PHOTO_SMALL_HIDPI":"Thumb HiDPI","PHOTO_THUMB":"Square thumb","PHOTO_THUMB_HIDPI":"Square thumb HiDPI","PHOTO_LIVE_VIDEO":"Video part of live-photo","PHOTO_VIEW":"Lychee Photo View:","PHOTO_EDIT_ROTATECWISE":"Rotate clockwise","PHOTO_EDIT_ROTATECCWISE":"Rotate counter-clockwise"},"update_json":0,"update_available":false}` - ok = true; - } - if(fn == 'Albums::get') - { - data = `{"smartalbums":null,"albums":[{"id":"16102925631081","title":"Bridge","public":"1","full_photo":"1","visible":"1","nsfw":"0","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"","max_takestamp":"","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":["uploads\/thumb\/b208cf3d7f67810135cf53f7bedcc8de.jpeg","uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618.jpeg","uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg"],"thumbs2x":["","uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg","uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg"],"types":["image\/jpeg","image\/jpeg","image\/jpeg"],"has_albums":"0"},{"id":"16102925676566","title":"cat","public":"1","full_photo":"1","visible":"1","nsfw":"1","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"","max_takestamp":"","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":["uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e.jpeg"],"thumbs2x":["uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg"],"types":["image\/jpeg"],"has_albums":"0"},{"id":"16102925744307","title":"Mountain","public":"1","full_photo":"1","visible":"1","nsfw":"0","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"Apr 2008","max_takestamp":"Apr 2008","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":["uploads\/thumb\/86836774f3a632fe22e45411426204fc.jpeg","uploads\/thumb\/a55a5438f10b1ba866a76575512526e4.jpeg"],"thumbs2x":["uploads\/thumb\/86836774f3a632fe22e45411426204fc@2x.jpeg","uploads\/thumb\/a55a5438f10b1ba866a76575512526e4@2x.jpeg"],"types":["image\/jpeg","image\/jpeg"],"has_albums":"0"}],"shared_albums":[]}` - ok = true; - } - if(fn == 'Album::get') - { - ok = false; - if(params.albumID == '16102925631081') - { - data = `{"id":16102925631081,"title":"Bridge","public":"1","full_photo":"1","visible":"1","nsfw":"0","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"","max_takestamp":"","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":[],"thumbs2x":[],"types":[],"has_albums":"0","albums":[],"photos":[{"id":"16102927659976","title":"bridge1","description":"","tags":"","star":"0","public":"0","album":"16102925631081","width":"300","height":"168","type":"image\/jpeg","size":"5.6 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"","small_dim":"","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/b208cf3d7f67810135cf53f7bedcc8de.jpeg","thumb2x":"","url":"uploads\/big\/b208cf3d7f67810135cf53f7bedcc8de.jpeg","livePhotoUrl":null,"previousPhoto":"16102927662779","nextPhoto":"16102927660856"},{"id":"16102927660856","title":"bridge2","description":"","tags":"","star":"0","public":"0","album":"16102925631081","width":"3500","height":"1971","type":"image\/jpeg","size":"1.2 MB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"uploads\/medium\/d250ea3871f5eae83f66adf2c1b45618.jpg","medium_dim":"1918x1080","medium2x":"","medium2x_dim":"","small":"uploads\/small\/d250ea3871f5eae83f66adf2c1b45618.jpg","small_dim":"639x360","small2x":"uploads\/small\/d250ea3871f5eae83f66adf2c1b45618@2x.jpg","small2x_dim":"1279x720","thumbUrl":"uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618.jpeg","thumb2x":"uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg","url":"uploads\/big\/d250ea3871f5eae83f66adf2c1b45618.jpg","livePhotoUrl":null,"previousPhoto":"16102927659976","nextPhoto":"16102927662779"},{"id":"16102927662779","title":"bridge3","description":"","tags":"","star":"0","public":"0","album":"16102925631081","width":"2272","height":"1704","type":"image\/jpeg","size":"741.6 KB","iso":"100","aperture":"f\/7.6","make":"NIKON","model":"E4300","shutter":"1\/148 s","focal":"8 mm","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"uploads\/medium\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","medium_dim":"1440x1080","medium2x":"","medium2x_dim":"","small":"uploads\/small\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","small_dim":"480x360","small2x":"uploads\/small\/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpg","small2x_dim":"960x720","thumbUrl":"uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg","thumb2x":"uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg","url":"uploads\/big\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","livePhotoUrl":null,"previousPhoto":"16102927660856","nextPhoto":"16102927659976"}],"num":"3"}` - ok = true - } - if(params.albumID == '16102925676566') - { - data = `{"id":16102925676566,"title":"cat","public":"1","full_photo":"1","visible":"1","nsfw":"1","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"","max_takestamp":"","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":[],"thumbs2x":[],"types":[],"has_albums":"0","albums":[],"photos":[{"id":"16102927762041","title":"cat","description":"","tags":"","star":"0","public":"0","album":"16102925676566","width":"1000","height":"667","type":"image\/jpeg","size":"126.4 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"uploads\/small\/70df07ef17999bcfd576a1a4fc57455e.jpeg","small_dim":"540x360","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e.jpeg","thumb2x":"uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg","url":"uploads\/big\/70df07ef17999bcfd576a1a4fc57455e.jpeg","livePhotoUrl":null,"previousPhoto":"","nextPhoto":""}],"num":"1"}` - ok = true - } - if(params.albumID == '16102925744307') - { - data = `{"id":16102925744307,"title":"Mountain","public":"1","full_photo":"1","visible":"1","nsfw":"0","parent_id":"","description":"","downloadable":"1","share_button_visible":"1","sysdate":"January 2021","min_takestamp":"","max_takestamp":"","password":"0","license":"none","sorting_col":"","sorting_order":"DESC","thumbs":[],"thumbs2x":[],"types":[],"has_albums":"0","albums":[],"photos":[{"id":"16102927818284","title":"mountain2","description":"","tags":"","star":"0","public":"0","album":"16102925744307","width":"900","height":"509","type":"image\/jpeg","size":"81.4 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"uploads\/small\/86836774f3a632fe22e45411426204fc.jpg","small_dim":"637x360","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/86836774f3a632fe22e45411426204fc.jpeg","thumb2x":"uploads\/thumb\/86836774f3a632fe22e45411426204fc@2x.jpeg","url":"uploads\/big\/86836774f3a632fe22e45411426204fc.jpg","livePhotoUrl":null,"previousPhoto":"16102927819488","nextPhoto":"16102927819488"},{"id":"16102927819488","title":"mountain1","description":"","tags":"","star":"0","public":"0","album":"16102925744307","width":"3264","height":"2448","type":"image\/jpeg","size":"5.2 MB","iso":"64","aperture":"f\/8.5","make":"CASIO COMPUTER CO.,LTD.","model":"EX-Z9","shutter":"1\/250 s","focal":"13 mm","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"11 April 2008 at 17:42","license":"none","medium":"uploads\/medium\/a55a5438f10b1ba866a76575512526e4.jpeg","medium_dim":"1440x1080","medium2x":"uploads\/medium\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","medium2x_dim":"2880x2160","small":"uploads\/small\/a55a5438f10b1ba866a76575512526e4.jpeg","small_dim":"480x360","small2x":"uploads\/small\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","small2x_dim":"960x720","thumbUrl":"uploads\/thumb\/a55a5438f10b1ba866a76575512526e4.jpeg","thumb2x":"uploads\/thumb\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","url":"uploads\/big\/a55a5438f10b1ba866a76575512526e4.jpeg","livePhotoUrl":null,"previousPhoto":"16102927818284","nextPhoto":"16102927818284"}],"num":"2"}` - ok = true - } - if(!ok) { - alert('this is just a demo : albumID unknown'); - ok = true; // at least we found the function. :) - } - } - if(fn == 'Photo::get') - { - ok = false; - if(params.photoID == '16102927659976') - { - data = `{"id":"16102927659976","title":"bridge1","description":"","tags":"","star":"0","public":"0","album":16102925631081,"width":"300","height":"168","type":"image\/jpeg","size":"5.6 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"","small_dim":"","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/b208cf3d7f67810135cf53f7bedcc8de.jpeg","thumb2x":"","url":"uploads\/big\/b208cf3d7f67810135cf53f7bedcc8de.jpeg","livePhotoUrl":null,"original_album":"16102925631081"}` - ok = true - } - if(params.photoID == '16102927660856') - { - data = `{"id":"16102927660856","title":"bridge2","description":"","tags":"","star":"0","public":"0","album":16102925631081,"width":"3500","height":"1971","type":"image\/jpeg","size":"1.2 MB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"uploads\/medium\/d250ea3871f5eae83f66adf2c1b45618.jpg","medium_dim":"1918x1080","medium2x":"","medium2x_dim":"","small":"uploads\/small\/d250ea3871f5eae83f66adf2c1b45618.jpg","small_dim":"639x360","small2x":"uploads\/small\/d250ea3871f5eae83f66adf2c1b45618@2x.jpg","small2x_dim":"1279x720","thumbUrl":"uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618.jpeg","thumb2x":"uploads\/thumb\/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg","url":"uploads\/big\/d250ea3871f5eae83f66adf2c1b45618.jpg","livePhotoUrl":null,"original_album":"16102925631081"}` - ok = true - } - if(params.photoID == '16102927662779') - { - data = `{"id":"16102927662779","title":"bridge3","description":"","tags":"","star":"0","public":"0","album":16102925631081,"width":"2272","height":"1704","type":"image\/jpeg","size":"741.6 KB","iso":"100","aperture":"f\/7.6","make":"NIKON","model":"E4300","shutter":"1\/148 s","focal":"8 mm","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"uploads\/medium\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","medium_dim":"1440x1080","medium2x":"","medium2x_dim":"","small":"uploads\/small\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","small_dim":"480x360","small2x":"uploads\/small\/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpg","small2x_dim":"960x720","thumbUrl":"uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg","thumb2x":"uploads\/thumb\/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg","url":"uploads\/big\/b3de35f5a293946f267e3fcb4b1b1e3c.jpg","livePhotoUrl":null,"original_album":"16102925631081"}` - ok = true - } - if(params.photoID == '16102927762041') - { - data = `{"id":"16102927762041","title":"cat","description":"","tags":"","star":"0","public":"0","album":16102925676566,"width":"1000","height":"667","type":"image\/jpeg","size":"126.4 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"uploads\/small\/70df07ef17999bcfd576a1a4fc57455e.jpeg","small_dim":"540x360","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e.jpeg","thumb2x":"uploads\/thumb\/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg","url":"uploads\/big\/70df07ef17999bcfd576a1a4fc57455e.jpeg","livePhotoUrl":null,"original_album":"16102925676566"}` - ok = true - } - if(params.photoID == '16102927818284') - { - data = `{"id":"16102927818284","title":"mountain2","description":"","tags":"","star":"0","public":"0","album":16102925744307,"width":"900","height":"509","type":"image\/jpeg","size":"81.4 KB","iso":"","aperture":"","make":"","model":"","shutter":"","focal":"","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"","license":"none","medium":"","medium_dim":"","medium2x":"","medium2x_dim":"","small":"uploads\/small\/86836774f3a632fe22e45411426204fc.jpg","small_dim":"637x360","small2x":"","small2x_dim":"","thumbUrl":"uploads\/thumb\/86836774f3a632fe22e45411426204fc.jpeg","thumb2x":"uploads\/thumb\/86836774f3a632fe22e45411426204fc@2x.jpeg","url":"uploads\/big\/86836774f3a632fe22e45411426204fc.jpg","livePhotoUrl":null,"original_album":"16102925744307"}` - ok = true - } - if(params.photoID == '16102927819488') - { - data = `{"id":"16102927819488","title":"mountain1","description":"","tags":"","star":"0","public":"0","album":16102925744307,"width":"3264","height":"2448","type":"image\/jpeg","size":"5.2 MB","iso":"64","aperture":"f\/8.5","make":"CASIO COMPUTER CO.,LTD.","model":"EX-Z9","shutter":"1\/250 s","focal":"13 mm","lens":"","latitude":null,"longitude":null,"altitude":null,"imgDirection":null,"location":null,"livePhotoContentID":null,"sysdate":"10 January 2021","takedate":"11 April 2008 at 17:42","license":"none","medium":"uploads\/medium\/a55a5438f10b1ba866a76575512526e4.jpeg","medium_dim":"1440x1080","medium2x":"uploads\/medium\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","medium2x_dim":"2880x2160","small":"uploads\/small\/a55a5438f10b1ba866a76575512526e4.jpeg","small_dim":"480x360","small2x":"uploads\/small\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","small2x_dim":"960x720","thumbUrl":"uploads\/thumb\/a55a5438f10b1ba866a76575512526e4.jpeg","thumb2x":"uploads\/thumb\/a55a5438f10b1ba866a76575512526e4@2x.jpeg","url":"uploads\/big\/a55a5438f10b1ba866a76575512526e4.jpeg","livePhotoUrl":null,"original_album":"16102925744307"}` - ok = true - } - if(!ok) { - alert('this is just a demo : photoID unknown'); - ok = true; // at least we found the function. :) - } - } - - if(!ok) - { - alert('this is just a demo : function unknown'); - } - if(data != '') - { - console.log(data); - callback(JSON.parse(data)); - } -} - -api.get = function (url, callback) { - loadingBar.show(); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", {}, errorThrown); - }; - - $.ajax({ - type: "GET", - url: url, - data: {}, - dataType: "text", - success: success, - error: error - }); -}; - -api.post_raw = function (fn, params, callback) { - loadingBar.show(); - - params = $.extend({ function: fn }, params); - - var api_url = api.get_url(fn); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", params, errorThrown); - }; - - $.ajax({ - type: "POST", - url: api_url, - data: params, - dataType: "text", - success: success, - error: error - }); -}; - -var csrf = {}; - -csrf.addLaravelCSRF = function (event, jqxhr, settings) { - if (settings.url !== lychee.updatePath) { - jqxhr.setRequestHeader("X-XSRF-TOKEN", csrf.getCookie("XSRF-TOKEN")); - } -}; - -csrf.escape = function (s) { - return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, "\\$1"); -}; - -csrf.getCookie = function (name) { - // we stop the selection at = (default json) but also at % to prevent any %3D at the end of the string - var match = document.cookie.match(RegExp("(?:^|;\\s*)" + csrf.escape(name) + "=([^;^%]*)")); - return match ? match[1] : null; -}; - -csrf.bind = function () { - $(document).on("ajaxSend", csrf.addLaravelCSRF); -}; - -(function ($) { - var Swipe = function Swipe(el) { - var self = this; - - this.el = $(el); - this.pos = { start: { x: 0, y: 0 }, end: { x: 0, y: 0 } }; - this.startTime = null; - - el.on("touchstart", function (e) { - self.touchStart(e); - }); - el.on("touchmove", function (e) { - self.touchMove(e); - }); - el.on("touchend", function () { - self.swipeEnd(); - }); - el.on("mousedown", function (e) { - self.mouseDown(e); - }); - }; - - Swipe.prototype = { - touchStart: function touchStart(e) { - var touch = e.originalEvent.touches[0]; - - this.swipeStart(e, touch.pageX, touch.pageY); - }, - - touchMove: function touchMove(e) { - var touch = e.originalEvent.touches[0]; - - this.swipeMove(e, touch.pageX, touch.pageY); - }, - - mouseDown: function mouseDown(e) { - var self = this; - - this.swipeStart(e, e.pageX, e.pageY); - - this.el.on("mousemove", function (_e) { - self.mouseMove(_e); - }); - this.el.on("mouseup", function () { - self.mouseUp(); - }); - }, - - mouseMove: function mouseMove(e) { - this.swipeMove(e, e.pageX, e.pageY); - }, - - mouseUp: function mouseUp(e) { - this.swipeEnd(e); - - this.el.off("mousemove"); - this.el.off("mouseup"); - }, - - swipeStart: function swipeStart(e, x, y) { - this.pos.start.x = x; - this.pos.start.y = y; - this.pos.end.x = x; - this.pos.end.y = y; - - this.startTime = new Date().getTime(); - - this.trigger("swipeStart", e); - }, - - swipeMove: function swipeMove(e, x, y) { - this.pos.end.x = x; - this.pos.end.y = y; - - this.trigger("swipeMove", e); - }, - - swipeEnd: function swipeEnd(e) { - this.trigger("swipeEnd", e); - }, - - trigger: function trigger(e, originalEvent) { - var self = this; - - var event = $.Event(e), - x = self.pos.start.x - self.pos.end.x, - y = self.pos.end.y - self.pos.start.y, - radians = Math.atan2(y, x), - direction = "up", - distance = Math.round(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))), - angle = Math.round(radians * 180 / Math.PI), - speed = Math.round(distance / (new Date().getTime() - self.startTime) * 1000); - - if (angle < 0) { - angle = 360 - Math.abs(angle); - } - - if (angle <= 45 && angle >= 0 || angle <= 360 && angle >= 315) { - direction = "left"; - } else if (angle >= 135 && angle <= 225) { - direction = "right"; - } else if (angle > 45 && angle < 135) { - direction = "down"; - } - - event.originalEvent = originalEvent; - - event.swipe = { - x: x, - y: y, - direction: direction, - distance: distance, - angle: angle, - speed: speed - }; - - $(self.el).trigger(event); - } - }; - - $.fn.swipe = function () { - // let swipe = new Swipe(this); - new Swipe(this); - - return this; - }; -})(jQuery); - -/** - * @description Takes care of every action an album can handle and execute. - */ - -var album = { - json: null -}; - -album.isSmartID = function (id) { - return id === "unsorted" || id === "starred" || id === "public" || id === "recent"; -}; - -album.getParent = function () { - if (album.json == null || album.isSmartID(album.json.id) === true || !album.json.parent_id || album.json.parent_id === 0) { - return ""; - } - return album.json.parent_id; -}; - -album.getID = function () { - var id = null; - - // this is a Lambda - var isID = function isID(_id) { - if (album.isSmartID(_id)) { - return true; - } - return $.isNumeric(_id); - }; - - if (_photo.json) id = _photo.json.album;else if (album.json) id = album.json.id;else if (mapview.albumID) id = mapview.albumID; - - // Search - if (isID(id) === false) id = $(".album:hover, .album.active").attr("data-id"); - if (isID(id) === false) id = $(".photo:hover, .photo.active").attr("data-album-id"); - - if (isID(id) === true) return id;else return false; -}; - -album.isTagAlbum = function () { - return album.json && album.json.tag_album && album.json.tag_album === "1"; -}; - -album.getByID = function (photoID) { - // Function returns the JSON of a photo - - if (photoID == null || !album.json || !album.json.photos) { - lychee.error("Error: Album json not found !"); - return undefined; - } - - var i = 0; - while (i < album.json.photos.length) { - if (parseInt(album.json.photos[i].id) === parseInt(photoID)) { - return album.json.photos[i]; - } - i++; - } - - lychee.error("Error: photo " + photoID + " not found !"); - return undefined; -}; - -album.getSubByID = function (albumID) { - // Function returns the JSON of a subalbum - - if (albumID == null || !album.json || !album.json.albums) { - lychee.error("Error: Album json not found!"); - return undefined; - } - - var i = 0; - while (i < album.json.albums.length) { - if (parseInt(album.json.albums[i].id) === parseInt(albumID)) { - return album.json.albums[i]; - } - i++; - } - - lychee.error("Error: album " + albumID + " not found!"); - return undefined; -}; - -// noinspection DuplicatedCode -album.deleteByID = function (photoID) { - if (photoID == null || !album.json || !album.json.photos) { - lychee.error("Error: Album json not found !"); - return false; - } - - var deleted = false; - - $.each(album.json.photos, function (i) { - if (parseInt(album.json.photos[i].id) === parseInt(photoID)) { - album.json.photos.splice(i, 1); - deleted = true; - return false; - } - }); - - return deleted; -}; - -// noinspection DuplicatedCode -album.deleteSubByID = function (albumID) { - if (albumID == null || !album.json || !album.json.albums) { - lychee.error("Error: Album json not found !"); - return false; - } - - var deleted = false; - - $.each(album.json.albums, function (i) { - if (parseInt(album.json.albums[i].id) === parseInt(albumID)) { - album.json.albums.splice(i, 1); - deleted = true; - return false; - } - }); - - return deleted; -}; - -album.load = function (albumID) { - var refresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var params = { - albumID: albumID, - password: "" - }; - - var processData = function processData(data) { - if (data === "Warning: Wrong password!") { - // User hit Cancel at the password prompt - return false; - } - - if (data === "Warning: Album private!") { - if (document.location.hash.replace("#", "").split("/")[1] !== undefined) { - // Display photo only - lychee.setMode("view"); - lychee.footer_hide(); - } else { - // Album not public - lychee.content.show(); - lychee.footer_show(); - if (!visible.albums() && !visible.album()) lychee.goto(); - } - return false; - } - - album.json = data; - - if (refresh === false) { - lychee.animate(".content", "contentZoomOut"); - } - var waitTime = 300; - - // Skip delay when refresh is true - // Skip delay when opening a blank Lychee - if (refresh === true) waitTime = 0; - if (!visible.albums() && !visible.photo() && !visible.album()) waitTime = 0; - - setTimeout(function () { - view.album.init(); - - if (refresh === false) { - lychee.animate(lychee.content, "contentZoomIn"); - header.setMode("album"); - } - - tabindex.makeFocusable(lychee.content); - if (lychee.active_focus_on_page_load) { - // Put focus on first element - either album or photo - var _first_album = $(".album:first"); - if (_first_album.length !== 0) { - _first_album.focus(); - } else { - first_photo = $(".photo:first"); - if (first_photo.length !== 0) { - first_photo.focus(); - } - } - } - }, waitTime); - }; - - api.post("Album::get", params, function (data) { - if (data === "Warning: Wrong password!") { - password.getDialog(albumID, function () { - params.password = password.value; - - api.post("Album::get", params, function (_data) { - albums.refresh(); - processData(_data); - }); - }); - } else { - processData(data); - // save scroll position for this URL - if (data && data.albums && data.albums.length > 0) { - setTimeout(function () { - var urls = JSON.parse(localStorage.getItem("scroll")); - var urlWindow = window.location.href; - - if (urls != null && urls[urlWindow]) { - $(window).scrollTop(urls[urlWindow]); - } - }, 500); - } - - tabindex.makeFocusable(lychee.content); - - if (lychee.active_focus_on_page_load) { - // Put focus on first element - either album or photo - first_album = $(".album:first"); - if (first_album.length !== 0) { - first_album.focus(); - } else { - first_photo = $(".photo:first"); - if (first_photo.length !== 0) { - first_photo.focus(); - } - } - } - } - }); -}; - -album.parse = function () { - if (!album.json.title) album.json.title = lychee.locale["UNTITLED"]; -}; - -album.add = function () { - var IDs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - var action = function action(data) { - // let title = data.title; - - var isNumber = function isNumber(n) { - return !isNaN(parseInt(n, 10)) && isFinite(n); - }; - - basicModal.close(); - - var params = { - title: data.title, - parent_id: 0 - }; - - if (visible.albums() || album.isSmartID(album.json.id)) { - params.parent_id = 0; - } else if (visible.album()) { - params.parent_id = album.json.id; - } else if (visible.photo()) { - params.parent_id = _photo.json.album; - } - - api.post("Album::add", params, function (_data) { - if (_data !== false && isNumber(_data)) { - if (IDs != null && callback != null) { - callback(IDs, _data, false); // we do not confirm - } else { - albums.refresh(); - lychee.goto(_data); - } - } else { - lychee.error(null, params, _data); - } - }); - }; - - basicModal.show({ - body: lychee.html(_templateObject, lychee.locale["TITLE_NEW_ALBUM"]), - buttons: { - action: { - title: lychee.locale["CREATE_ALBUM"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.addByTags = function () { - var action = function action(data) { - basicModal.close(); - - var params = { - title: data.title, - tags: data.tags - }; - - api.post("Album::addByTags", params, function (_data) { - var isNumber = function isNumber(n) { - return !isNaN(parseInt(n, 10)) && isFinite(n); - }; - if (_data !== false && isNumber(_data)) { - albums.refresh(); - lychee.goto(_data); - } else { - lychee.error(null, params, _data); - } - }); - }; - - basicModal.show({ - body: lychee.html(_templateObject2, lychee.locale["TITLE_NEW_ALBUM"]), - buttons: { - action: { - title: lychee.locale["CREATE_TAG_ALBUM"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setShowTags = function (albumID) { - var oldShowTags = album.json.show_tags; - - var action = function action(data) { - var show_tags = data.show_tags; - basicModal.close(); - - if (visible.album()) { - album.json.show_tags = show_tags; - view.album.show_tags(); - } - var params = { - albumID: albumID, - show_tags: show_tags - }; - - api.post("Album::setShowTags", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } else { - album.reload(); - } - }); - }; - - basicModal.show({ - body: lychee.html(_templateObject3, lychee.locale["ALBUM_NEW_SHOWTAGS"], oldShowTags), - buttons: { - action: { - title: lychee.locale["ALBUM_SET_SHOWTAGS"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setTitle = function (albumIDs) { - var oldTitle = ""; - var msg = ""; - - if (!albumIDs) return false; - if (!(albumIDs instanceof Array)) { - albumIDs = [albumIDs]; - } - - if (albumIDs.length === 1) { - // Get old title if only one album is selected - if (album.json) { - if (parseInt(album.getID()) === parseInt(albumIDs[0])) { - oldTitle = album.json.title; - } else oldTitle = album.getSubByID(albumIDs[0]).title; - } - if (!oldTitle && albums.json) oldTitle = albums.getByID(albumIDs[0]).title; - } - - var action = function action(data) { - basicModal.close(); - - var newTitle = data.title; - - if (visible.album()) { - if (albumIDs.length === 1 && parseInt(album.getID()) === parseInt(albumIDs[0])) { - // Rename only one album - - album.json.title = newTitle; - view.album.title(); - - if (albums.json) albums.getByID(albumIDs[0]).title = newTitle; - } else { - albumIDs.forEach(function (id) { - album.getSubByID(id).title = newTitle; - view.album.content.titleSub(id); - - if (albums.json) albums.getByID(id).title = newTitle; - }); - } - } else if (visible.albums()) { - // Rename all albums - - albumIDs.forEach(function (id) { - albums.getByID(id).title = newTitle; - view.albums.content.title(id); - }); - } - - var params = { - albumIDs: albumIDs.join(), - title: newTitle - }; - - api.post("Album::setTitle", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } - }); - }; - - var input = lychee.html(_templateObject4, lychee.locale["ALBUM_TITLE"], oldTitle); - - if (albumIDs.length === 1) msg = lychee.html(_templateObject5, lychee.locale["ALBUM_NEW_TITLE"], input);else msg = lychee.html(_templateObject6, lychee.locale["ALBUMS_NEW_TITLE_1"], albumIDs.length, lychee.locale["ALBUMS_NEW_TITLE_2"], input); - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["ALBUM_SET_TITLE"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setDescription = function (albumID) { - var oldDescription = album.json.description; - - var action = function action(data) { - var description = data.description; - - basicModal.close(); - - if (visible.album()) { - album.json.description = description; - view.album.description(); - } - - var params = { - albumID: albumID, - description: description - }; - - api.post("Album::setDescription", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } - }); - }; - - basicModal.show({ - body: lychee.html(_templateObject7, lychee.locale["ALBUM_NEW_DESCRIPTION"], lychee.locale["ALBUM_DESCRIPTION"], oldDescription), - buttons: { - action: { - title: lychee.locale["ALBUM_SET_DESCRIPTION"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setLicense = function (albumID) { - var callback = function callback() { - $("select#license").val(album.json.license === "" ? "none" : album.json.license); - return false; - }; - - var action = function action(data) { - var license = data.license; - - basicModal.close(); - - var params = { - albumID: albumID, - license: license - }; - - api.post("Album::setLicense", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } else { - if (visible.album()) { - album.json.license = params.license; - view.album.license(); - } - } - }); - }; - - var msg = lychee.html(_templateObject8, lychee.locale["ALBUM_LICENSE"], lychee.locale["ALBUM_LICENSE_NONE"], lychee.locale["ALBUM_RESERVED"], lychee.locale["ALBUM_LICENSE_HELP"]); - - basicModal.show({ - body: msg, - callback: callback, - buttons: { - action: { - title: lychee.locale["ALBUM_SET_LICENSE"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setSorting = function (albumID) { - var callback = function callback() { - $("select#sortingCol").val(album.json.sorting_col); - $("select#sortingOrder").val(album.json.sorting_order); - return false; - }; - - var action = function action(data) { - var typePhotos = data.sortingCol; - var orderPhotos = data.sortingOrder; - - basicModal.close(); - - var params = { - albumID: albumID, - typePhotos: typePhotos, - orderPhotos: orderPhotos - }; - - api.post("Album::setSorting", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } else { - if (visible.album()) { - album.reload(); - } - } - }); - }; - - var msg = lychee.html(_templateObject9) + lychee.locale["SORT_PHOTO_BY_1"] + "\n\t\t\n\t\t\t\n\t\t\n\t\t" + lychee.locale["SORT_PHOTO_BY_2"] + "\n\t\t\n\t\t\t\n\t\t\n\t\t" + lychee.locale["SORT_PHOTO_BY_3"] + "\n\t\t

\n\t
"; - - basicModal.show({ - body: msg, - callback: callback, - buttons: { - action: { - title: lychee.locale["ALBUM_SET_ORDER"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -album.setPublic = function (albumID, e) { - var password = ""; - - if (!basicModal.visible()) { - var msg = lychee.html(_templateObject10, lychee.locale["ALBUM_PUBLIC"], lychee.locale["ALBUM_PUBLIC_EXPL"], build.iconic("check"), lychee.locale["ALBUM_FULL"], lychee.locale["ALBUM_FULL_EXPL"], build.iconic("check"), lychee.locale["ALBUM_HIDDEN"], lychee.locale["ALBUM_HIDDEN_EXPL"], build.iconic("check"), lychee.locale["ALBUM_DOWNLOADABLE"], lychee.locale["ALBUM_DOWNLOADABLE_EXPL"], build.iconic("check"), lychee.locale["ALBUM_SHARE_BUTTON_VISIBLE"], lychee.locale["ALBUM_SHARE_BUTTON_VISIBLE_EXPL"], build.iconic("check"), lychee.locale["ALBUM_PASSWORD_PROT"], lychee.locale["ALBUM_PASSWORD_PROT_EXPL"], lychee.locale["PASSWORD"], lychee.locale["ALBUM_NSFW"], lychee.locale["ALBUM_NSFW_EXPL"]); - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["ALBUM_SHARING_CONFIRM"], - // Call setPublic function without showing the modal - fn: function fn() { - return album.setPublic(albumID, e); - } - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); - - $('.basicModal .switch input[name="public"]').on("click", function () { - if ($(this).prop("checked") === true) { - $(".basicModal .choice input").attr("disabled", false); - - if (album.json.public === "1") { - // Initialize options based on album settings. - if (album.json.full_photo !== null && album.json.full_photo === "1") $('.basicModal .choice input[name="full_photo"]').prop("checked", true); - if (album.json.visible === "0") $('.basicModal .choice input[name="hidden"]').prop("checked", true); - if (album.json.downloadable === "1") $('.basicModal .choice input[name="downloadable"]').prop("checked", true); - if (album.json.share_button_visible === "1") $('.basicModal .choice input[name="share_button_visible"]').prop("checked", true); - if (album.json.password === "1") { - $('.basicModal .choice input[name="password"]').prop("checked", true); - $('.basicModal .choice input[name="passwordtext"]').show(); - } - } else { - // Initialize options based on global settings. - if (lychee.full_photo) { - $('.basicModal .choice input[name="full_photo"]').prop("checked", true); - } - if (lychee.downloadable) { - $('.basicModal .choice input[name="downloadable"]').prop("checked", true); - } - if (lychee.share_button_visible) { - $('.basicModal .choice input[name="share_button_visible"]').prop("checked", true); - } - } - } else { - $(".basicModal .choice input").prop("checked", false).attr("disabled", true); - $('.basicModal .choice input[name="passwordtext"]').hide(); - } - }); - - if (album.json.nsfw === "1") { - $('.basicModal .switch input[name="nsfw"]').prop("checked", true); - } else { - $('.basicModal .switch input[name="nsfw"]').prop("checked", false); - } - - if (album.json.public === "1") { - $('.basicModal .switch input[name="public"]').click(); - } else { - $(".basicModal .choice input").attr("disabled", true); - } - - $('.basicModal .choice input[name="password"]').on("change", function () { - if ($(this).prop("checked") === true) $('.basicModal .choice input[name="passwordtext"]').show().focus();else $('.basicModal .choice input[name="passwordtext"]').hide(); - }); - - return true; - } - - albums.refresh(); - - // Set public - if ($('.basicModal .switch input[name="nsfw"]:checked').length === 1) { - album.json.nsfw = "1"; - } else { - album.json.nsfw = "0"; - } - - // Set public - if ($('.basicModal .switch input[name="public"]:checked').length === 1) { - album.json.public = "1"; - } else { - album.json.public = "0"; - } - - // Set full photo - if ($('.basicModal .choice input[name="full_photo"]:checked').length === 1) { - album.json.full_photo = "1"; - } else { - album.json.full_photo = "0"; - } - - // Set visible - if ($('.basicModal .choice input[name="hidden"]:checked').length === 1) { - album.json.visible = "0"; - } else { - album.json.visible = "1"; - } - - // Set downloadable - if ($('.basicModal .choice input[name="downloadable"]:checked').length === 1) { - album.json.downloadable = "1"; - } else { - album.json.downloadable = "0"; - } - - // Set share_button_visible - if ($('.basicModal .choice input[name="share_button_visible"]:checked').length === 1) { - album.json.share_button_visible = "1"; - } else { - album.json.share_button_visible = "0"; - } - - // Set password - var oldPassword = album.json.password; - if ($('.basicModal .choice input[name="password"]:checked').length === 1) { - password = $('.basicModal .choice input[name="passwordtext"]').val(); - album.json.password = "1"; - } else { - password = ""; - album.json.password = "0"; - } - - // Modal input has been processed, now it can be closed - basicModal.close(); - - // Set data and refresh view - if (visible.album()) { - view.album.nsfw(); - view.album.public(); - view.album.hidden(); - view.album.downloadable(); - view.album.shareButtonVisible(); - view.album.password(); - } - - var params = { - albumID: albumID, - full_photo: album.json.full_photo, - public: album.json.public, - nsfw: album.json.nsfw, - visible: album.json.visible, - downloadable: album.json.downloadable, - share_button_visible: album.json.share_button_visible - }; - if (oldPassword !== album.json.password || password.length > 0) { - // We send the password only if there's been a change; that way the - // server will keep the current password if it wasn't changed. - params.password = password; - } - - api.post("Album::setPublic", params, function (data) { - if (data !== true) lychee.error(null, params, data); - }); -}; - -album.setNSFW = function (albumID, e) { - album.json.nsfw = album.json.nsfw === "0" ? "1" : "0"; - - view.album.nsfw(); - - var params = { - albumID: albumID - }; - - api.post("Album::setNSFW", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - albums.refresh(); - } - }); -}; - -album.share = function (service) { - if (album.json.hasOwnProperty("share_button_visible") && album.json.share_button_visible !== "1") { - return; - } - - var url = location.href; - - switch (service) { - case "twitter": - window.open("https://twitter.com/share?url=" + encodeURI(url)); - break; - case "facebook": - window.open("https://www.facebook.com/sharer.php?u=" + encodeURI(url) + "&t=" + encodeURI(album.json.title)); - break; - case "mail": - location.href = "mailto:?subject=" + encodeURI(album.json.title) + "&body=" + encodeURI(url); - break; - } -}; - -album.getArchive = function (albumIDs) { - var link = ""; - - // double check with API_V2 this will not work... - if (lychee.api_V2) { - location.href = api.get_url("Album::getArchive") + lychee.html(_templateObject11, albumIDs.join()); - } else { - var url = api.path + "?function=Album::getArchive&albumID=" + albumIDs[0]; - - if (location.href.indexOf("index.html") > 0) link = location.href.replace(location.hash, "").replace("index.html", url);else link = location.href.replace(location.hash, "") + url; - - if (lychee.publicMode === true) link += "&password=" + encodeURIComponent(password.value); - - location.href = link; - } -}; - -album.buildMessage = function (albumIDs, albumID, op1, op2, ops) { - var title = ""; - var sTitle = ""; - var msg = ""; - - if (!albumIDs) return false; - if (albumIDs instanceof Array === false) albumIDs = [albumIDs]; - - // Get title of first album - if (parseInt(albumID, 10) === 0) { - title = lychee.locale["ROOT"]; - } else if (albums.json) { - album1 = albums.getByID(albumID); - if (album1) { - title = album1.title; - } - } - - // Fallback for first album without a title - if (title === "") title = lychee.locale["UNTITLED"]; - - if (albumIDs.length === 1) { - // Get title of second album - if (albums.json) { - album2 = albums.getByID(albumIDs[0]); - if (album2) { - sTitle = album2.title; - } - } - - // Fallback for second album without a title - if (sTitle === "") sTitle = lychee.locale["UNTITLED"]; - - msg = lychee.html(_templateObject12, lychee.locale[op1], sTitle, lychee.locale[op2], title); - } else { - msg = lychee.html(_templateObject13, lychee.locale[ops], title); - } - - return msg; -}; - -album.delete = function (albumIDs) { - var action = {}; - var cancel = {}; - var msg = ""; - - if (!albumIDs) return false; - if (albumIDs instanceof Array === false) albumIDs = [albumIDs]; - - action.fn = function () { - basicModal.close(); - - var params = { - albumIDs: albumIDs.join() - }; - - api.post("Album::delete", params, function (data) { - if (visible.albums()) { - albumIDs.forEach(function (id) { - view.albums.content.delete(id); - albums.deleteByID(id); - }); - } else if (visible.album()) { - albums.refresh(); - if (albumIDs.length === 1 && parseInt(album.getID()) === parseInt(albumIDs[0])) { - lychee.goto(album.getParent()); - } else { - albumIDs.forEach(function (id) { - album.deleteSubByID(id); - view.album.content.deleteSub(id); - }); - } - } - - if (data !== true) lychee.error(null, params, data); - }); - }; - - if (albumIDs.toString() === "0") { - action.title = lychee.locale["CLEAR_UNSORTED"]; - cancel.title = lychee.locale["KEEP_UNSORTED"]; - - msg = "

" + lychee.locale["DELETE_UNSORTED_CONFIRM"] + "

"; - } else if (albumIDs.length === 1) { - var albumTitle = ""; - - action.title = lychee.locale["DELETE_ALBUM_QUESTION"]; - cancel.title = lychee.locale["KEEP_ALBUM"]; - - // Get title - if (album.json) { - if (parseInt(album.getID()) === parseInt(albumIDs[0])) { - albumTitle = album.json.title; - } else albumTitle = album.getSubByID(albumIDs[0]).title; - } - if (!albumTitle && albums.json) albumTitle = albums.getByID(albumIDs).title; - - // Fallback for album without a title - if (albumTitle === "") albumTitle = lychee.locale["UNTITLED"]; - - msg = lychee.html(_templateObject14, lychee.locale["DELETE_ALBUM_CONFIRMATION_1"], albumTitle, lychee.locale["DELETE_ALBUM_CONFIRMATION_2"]); - } else { - action.title = lychee.locale["DELETE_ALBUMS_QUESTION"]; - cancel.title = lychee.locale["KEEP_ALBUMS"]; - - msg = lychee.html(_templateObject15, lychee.locale["DELETE_ALBUMS_CONFIRMATION_1"], albumIDs.length, lychee.locale["DELETE_ALBUMS_CONFIRMATION_2"]); - } - - basicModal.show({ - body: msg, - buttons: { - action: { - title: action.title, - fn: action.fn, - class: "red" - }, - cancel: { - title: cancel.title, - fn: basicModal.close - } - } - }); -}; - -album.merge = function (albumIDs, albumID) { - var confirm = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - - var action = function action() { - basicModal.close(); - albumIDs.unshift(albumID); - - var params = { - albumIDs: albumIDs.join() - }; - - api.post("Album::merge", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - album.reload(); - } - }); - }; - - if (confirm) { - basicModal.show({ - body: album.buildMessage(albumIDs, albumID, "ALBUM_MERGE_1", "ALBUM_MERGE_2", "ALBUMS_MERGE"), - buttons: { - action: { - title: lychee.locale["MERGE_ALBUM"], - fn: action, - class: "red" - }, - cancel: { - title: lychee.locale["DONT_MERGE"], - fn: basicModal.close - } - } - }); - } else { - action(); - } -}; - -album.setAlbum = function (albumIDs, albumID) { - var confirm = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - - var action = function action() { - basicModal.close(); - albumIDs.unshift(albumID); - - var params = { - albumIDs: albumIDs.join() - }; - - api.post("Album::move", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - album.reload(); - } - }); - }; - - if (confirm) { - basicModal.show({ - body: album.buildMessage(albumIDs, albumID, "ALBUM_MOVE_1", "ALBUM_MOVE_2", "ALBUMS_MOVE"), - buttons: { - action: { - title: lychee.locale["MOVE_ALBUMS"], - fn: action, - class: "red" - }, - cancel: { - title: lychee.locale["NOT_MOVE_ALBUMS"], - fn: basicModal.close - } - } - }); - } else { - action(); - } -}; - -album.apply_nsfw_filter = function () { - if (lychee.nsfw_visible) { - $('.album[data-nsfw="1"]').show(); - } else { - $('.album[data-nsfw="1"]').hide(); - } -}; - -album.toggle_nsfw_filter = function () { - lychee.nsfw_visible = !lychee.nsfw_visible; - album.apply_nsfw_filter(); - return false; -}; - -album.isUploadable = function () { - if (lychee.admin) { - return true; - } - if (lychee.publicMode || !lychee.upload) { - return false; - } - - // For special cases of no album / smart album / etc. we return true. - // It's only for regular non-matching albums that we return false. - if (album.json === null || !album.json.owner) { - return true; - } - - return album.json.owner === lychee.username; -}; - -album.reload = function () { - var albumID = album.getID(); - - album.refresh(); - albums.refresh(); - - if (visible.album()) lychee.goto(albumID);else lychee.goto(); -}; - -album.refresh = function () { - album.json = null; -}; - -/** - * @description Takes care of every action albums can handle and execute. - */ - -var albums = { - json: null -}; - -albums.load = function () { - var startTime = new Date().getTime(); - - lychee.animate(".content", "contentZoomOut"); - - if (albums.json === null) { - api.post("Albums::get", {}, function (data) { - var waitTime = void 0; - - // Smart Albums - if (data.smartalbums != null) albums._createSmartAlbums(data.smartalbums); - - albums.json = data; - - // Calculate delay - var durationTime = new Date().getTime() - startTime; - if (durationTime > 300) waitTime = 0;else waitTime = 300 - durationTime; - - // Skip delay when opening a blank Lychee - if (!visible.albums() && !visible.photo() && !visible.album()) waitTime = 0; - if (visible.album() && lychee.content.html() === "") waitTime = 0; - - setTimeout(function () { - header.setMode("albums"); - view.albums.init(); - lychee.animate(lychee.content, "contentZoomIn"); - - tabindex.makeFocusable(lychee.content); - - if (lychee.active_focus_on_page_load) { - // Put focus on first element - either album or photo - var _first_album2 = $(".album:first"); - if (_first_album2.length !== 0) { - _first_album2.focus(); - } else { - var _first_photo = $(".photo:first"); - if (_first_photo.length !== 0) { - _first_photo.focus(); - } - } - } - - setTimeout(function () { - lychee.footer_show(); - }, 300); - }, waitTime); - }); - } else { - setTimeout(function () { - header.setMode("albums"); - view.albums.init(); - lychee.animate(lychee.content, "contentZoomIn"); - - tabindex.makeFocusable(lychee.content); - - if (lychee.active_focus_on_page_load) { - // Put focus on first element - either album or photo - first_album = $(".album:first"); - if (first_album.length !== 0) { - first_album.focus(); - } else { - first_photo = $(".photo:first"); - if (first_photo.length !== 0) { - first_photo.focus(); - } - } - } - }, 300); - } -}; - -albums.parse = function (album) { - var i = void 0; - for (i = 0; i < 3; i++) { - if (!album.thumbs[i]) { - album.thumbs[i] = album.password === "1" ? "img/password.svg" : "img/no_images.svg"; - } - } -}; - -// TODO: REFACTOR THIS -albums._createSmartAlbums = function (data) { - if (data.unsorted) { - data.unsorted = { - id: "unsorted", - title: lychee.locale["UNSORTED"], - sysdate: data.unsorted.num + " " + lychee.locale["NUM_PHOTOS"], - unsorted: "1", - thumbs: data.unsorted.thumbs, - thumbs2x: data.unsorted.thumbs2x ? data.unsorted.thumbs2x : null, - types: data.unsorted.types - }; - } - - if (data.starred) { - data.starred = { - id: "starred", - title: lychee.locale["STARRED"], - sysdate: data.starred.num + " " + lychee.locale["NUM_PHOTOS"], - star: "1", - thumbs: data.starred.thumbs, - thumbs2x: data.starred.thumbs2x ? data.starred.thumbs2x : null, - types: data.starred.types - }; - } - - if (data.public) { - data.public = { - id: "public", - title: lychee.locale["PUBLIC"], - sysdate: data.public.num + " " + lychee.locale["NUM_PHOTOS"], - public: "1", - thumbs: data.public.thumbs, - thumbs2x: data.public.thumbs2x ? data.public.thumbs2x : null, - visible: "0", - types: data.public.types - }; - } - - if (data.recent) { - data.recent = { - id: "recent", - title: lychee.locale["RECENT"], - sysdate: data.recent.num + " " + lychee.locale["NUM_PHOTOS"], - recent: "1", - thumbs: data.recent.thumbs, - thumbs2x: data.recent.thumbs2x ? data.recent.thumbs2x : null, - types: data.recent.types - }; - } - - Object.entries(data).forEach(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - albumName = _ref2[0], - albumData = _ref2[1]; - - if (albumData["tag_album"] === "1") { - data[albumName] = { - id: albumData.id, - title: albumName, - sysdate: albumData.num + " " + lychee.locale["NUM_PHOTOS"], - tag_album: "1", - thumbs: albumData.thumbs, - thumbs2x: albumData.thumbs2x ? albumData.thumbs2x : null, - types: albumData.types - }; - } - }); -}; - -albums.isShared = function (albumID) { - if (albumID == null) return false; - if (!albums.json) return false; - if (!albums.json.albums) return false; - - var found = false; - - var func = function func() { - if (parseInt(this.id, 10) === parseInt(albumID, 10)) { - found = true; - return false; // stop the loop - } - if (this.albums) { - $.each(this.albums, func); - } - }; - - if (albums.json.shared_albums !== null) $.each(albums.json.shared_albums, func); - - return found; -}; - -albums.getByID = function (albumID) { - // Function returns the JSON of an album - - if (albumID == null) return undefined; - if (!albums.json) return undefined; - if (!albums.json.albums) return undefined; - - var json = undefined; - - var func = function func() { - if (parseInt(this.id, 10) === parseInt(albumID, 10)) { - json = this; - return false; // stop the loop - } - if (this.albums) { - $.each(this.albums, func); - } - }; - - $.each(albums.json.albums, func); - - if (json === undefined && albums.json.shared_albums !== null) $.each(albums.json.shared_albums, func); - - if (json === undefined && albums.json.smartalbums !== null) $.each(albums.json.smartalbums, func); - - return json; -}; - -albums.deleteByID = function (albumID) { - // Function returns the JSON of an album - // This function is only ever invoked for top-level albums so it - // doesn't need to descend down the albums tree. - - if (albumID == null) return false; - if (!albums.json) return false; - if (!albums.json.albums) return false; - - var deleted = false; - - $.each(albums.json.albums, function (i) { - if (parseInt(albums.json.albums[i].id) === parseInt(albumID)) { - albums.json.albums.splice(i, 1); - deleted = true; - return false; // stop the loop - } - }); - - if (deleted === false) { - if (!albums.json.shared_albums) return undefined; - $.each(albums.json.shared_albums, function (i) { - if (parseInt(albums.json.shared_albums[i].id) === parseInt(albumID)) { - albums.json.shared_albums.splice(i, 1); - deleted = true; - return false; // stop the loop - } - }); - } - - if (deleted === false) { - if (!albums.json.smartalbums) return undefined; - $.each(albums.json.smartalbums, function (i) { - if (parseInt(albums.json.smartalbums[i].id) === parseInt(albumID)) { - delete albums.json.smartalbums[i]; - deleted = true; - return false; // stop the loop - } - }); - } - - return deleted; -}; - -albums.refresh = function () { - albums.json = null; -}; - -/** - * @description This module is used to generate HTML-Code. - */ - -var build = {}; - -build.iconic = function (icon) { - var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - - var html = ""; - - html += lychee.html(_templateObject16, classes, icon); - - return html; -}; - -build.divider = function (title) { - var html = ""; - - html += lychee.html(_templateObject17, title); - - return html; -}; - -build.editIcon = function (id) { - var html = ""; - - html += lychee.html(_templateObject18, id, build.iconic("pencil")); - - return html; -}; - -build.multiselect = function (top, left) { - return lychee.html(_templateObject19, top, left); -}; - -build.getAlbumThumb = function (data, i) { - var isVideo = data.types[i] && data.types[i].indexOf("video") > -1; - var isRaw = data.types[i] && data.types[i].indexOf("raw") > -1; - var thumb = data.thumbs[i]; - var thumb2x = ""; - - if (thumb === "uploads/thumb/" && isVideo) { - return "Photo thumbnail"; - } - if (thumb === "uploads/thumb/" && isRaw) { - return "Photo thumbnail"; - } - - if (data.thumbs2x) { - if (data.thumbs2x[i]) { - thumb2x = data.thumbs2x[i]; - } - } else { - // Fallback code for Lychee v3 - var _lychee$retinize = lychee.retinize(data.thumbs[i]), - thumb2x = _lychee$retinize.path, - isPhoto = _lychee$retinize.isPhoto; - - if (!isPhoto) { - thumb2x = ""; - } - } - - return "Photo thumbnail"; -}; - -build.album = function (data) { - var disabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var html = ""; - var date_stamp = data.sysdate; - var sortingAlbums = []; - - // In the special case of take date sorting use the take stamps as title - if (lychee.sortingAlbums !== "" && data.min_takestamp && data.max_takestamp) { - sortingAlbums = lychee.sortingAlbums.replace("ORDER BY ", "").split(" "); - if (sortingAlbums[0] === "max_takestamp" || sortingAlbums[0] === "min_takestamp") { - if (data.min_takestamp !== "" && data.max_takestamp !== "") { - date_stamp = data.min_takestamp === data.max_takestamp ? data.max_takestamp : data.min_takestamp + " - " + data.max_takestamp; - } else if (data.min_takestamp !== "" && sortingAlbums[0] === "min_takestamp") { - date_stamp = data.min_takestamp; - } else if (data.max_takestamp !== "" && sortingAlbums[0] === "max_takestamp") { - date_stamp = data.max_takestamp; - } - } - } - - html += lychee.html(_templateObject20, disabled ? "disabled" : "", data.nsfw && data.nsfw === "1" && lychee.nsfw_blur ? "blurred" : "", data.id, data.nsfw && data.nsfw === "1" ? "1" : "0", tabindex.get_next_tab_index(), build.getAlbumThumb(data, 2), build.getAlbumThumb(data, 1), build.getAlbumThumb(data, 0), data.title, data.title, date_stamp); - - if (album.isUploadable() && !disabled) { - html += lychee.html(_templateObject21, data.nsfw === "1" ? "badge--nsfw" : "", build.iconic("warning"), data.star === "1" ? "badge--star" : "", build.iconic("star"), data.public === "1" ? "badge--visible" : "", data.visible === "1" ? "badge--not--hidden" : "badge--hidden", build.iconic("eye"), data.unsorted === "1" ? "badge--visible" : "", build.iconic("list"), data.recent === "1" ? "badge--visible badge--list" : "", build.iconic("clock"), data.password === "1" ? "badge--visible" : "", build.iconic("lock-locked"), data.tag_album === "1" ? "badge--tag" : "", build.iconic("tag")); - } - - if (data.albums && data.albums.length > 0 || data.hasOwnProperty("has_albums") && data.has_albums === "1") { - html += lychee.html(_templateObject22, build.iconic("layers")); - } - - html += "
"; - - return html; -}; - -build.photo = function (data) { - var disabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var html = ""; - var thumbnail = ""; - var thumb2x = ""; - - var isVideo = data.type && data.type.indexOf("video") > -1; - var isRaw = data.type && data.type.indexOf("raw") > -1; - var isLivePhoto = data.livePhotoUrl !== "" && data.livePhotoUrl !== null; - - if (data.thumbUrl === "uploads/thumb/" && isLivePhoto) { - thumbnail = "Photo thumbnail"; - } - if (data.thumbUrl === "uploads/thumb/" && isVideo) { - thumbnail = "Photo thumbnail"; - } else if (data.thumbUrl === "uploads/thumb/" && isRaw) { - thumbnail = "Photo thumbnail"; - } else if (lychee.layout === "0") { - if (data.hasOwnProperty("thumb2x")) { - // Lychee v4 - thumb2x = data.thumb2x; - } else { - // Lychee v3 - var _lychee$retinize2 = lychee.retinize(data.thumbUrl), - thumb2x = _lychee$retinize2.path; - } - - if (thumb2x !== "") { - thumb2x = "data-srcset='" + thumb2x + " 2x'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else { - if (data.small !== "") { - if (data.hasOwnProperty("small2x") && data.small2x !== "") { - thumb2x = "data-srcset='" + data.small + " " + parseInt(data.small_dim, 10) + "w, " + data.small2x + " " + parseInt(data.small2x_dim, 10) + "w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else if (data.medium !== "") { - if (data.hasOwnProperty("medium2x") && data.medium2x !== "") { - thumb2x = "data-srcset='" + data.medium + " " + parseInt(data.medium_dim, 10) + "w, " + data.medium2x + " " + parseInt(data.medium2x_dim, 10) + "w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else if (!isVideo) { - // Fallback for images with no small or medium. - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else { - // Fallback for videos with no small (the case of no thumb is - // handled at the top of this function). - - if (data.hasOwnProperty("thumb2x")) { - // Lychee v4 - thumb2x = data.thumb2x; - } else { - // Lychee v3 - var _lychee$retinize3 = lychee.retinize(data.thumbUrl), - thumb2x = _lychee$retinize3.path; - } - - if (thumb2x !== "") { - thumb2x = "data-srcset='" + data.thumbUrl + " 200w, " + thumb2x + " 400w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } - } - - html += lychee.html(_templateObject23, disabled ? "disabled" : "", data.album, data.id, tabindex.get_next_tab_index(), thumbnail, data.title, data.title); - - if (data.takedate !== "") html += lychee.html(_templateObject24, build.iconic("camera-slr"), data.takedate);else html += lychee.html(_templateObject25, data.sysdate); - - html += "
"; - - if (album.isUploadable()) { - html += lychee.html(_templateObject26, data.star === "1" ? "badge--star" : "", build.iconic("star"), data.public === "1" && album.json.public !== "1" ? "badge--visible badge--hidden" : "", build.iconic("eye")); - } - - html += "
"; - - return html; -}; - -build.overlay_image = function (data) { - var exifHash = data.make + data.model + data.shutter + data.aperture + data.focal + data.iso; - - // Get the stored setting for the overlay_image - var type = lychee.image_overlay_type; - var html = ""; - - if (type && type === "desc" && data.description !== "") { - html = lychee.html(_templateObject27, data.title, data.description); - } else if (type && type === "takedate" && data.takedate !== "") { - html = lychee.html(_templateObject28, data.title, data.takedate); - } - // fall back to exif data if there is no description - else if (exifHash !== "") { - html += lychee.html(_templateObject29, data.title, data.shutter.replace("s", "sec"), data.aperture.replace("f/", "ƒ / "), lychee.locale["PHOTO_ISO"], data.iso, data.focal, data.lens && data.lens !== "" ? "(" + data.lens + ")" : ""); - } - - return html; -}; - -build.imageview = function (data, visibleControls, autoplay) { - var html = ""; - var thumb = ""; - - if (data.type.indexOf("video") > -1) { - html += lychee.html(_templateObject30, visibleControls === true ? "" : "full", autoplay ? "autoplay" : "", tabindex.get_next_tab_index(), data.url); - } else if (data.type.indexOf("raw") > -1 && data.medium === "") { - html += lychee.html(_templateObject31, visibleControls === true ? "" : "full", tabindex.get_next_tab_index()); - } else { - var img = ""; - - if (data.livePhotoUrl === "" || data.livePhotoUrl === null) { - // It's normal photo - - // See if we have the thumbnail loaded... - $(".photo").each(function () { - if ($(this).attr("data-id") && $(this).attr("data-id") == data.id) { - var thumbimg = $(this).find("img"); - if (thumbimg.length > 0) { - thumb = thumbimg[0].currentSrc ? thumbimg[0].currentSrc : thumbimg[0].src; - return false; - } - } - }); - - if (data.medium !== "") { - var medium = ""; - - if (data.hasOwnProperty("medium2x") && data.medium2x !== "") { - medium = "srcset='" + data.medium + " " + parseInt(data.medium_dim, 10) + "w, " + data.medium2x + " " + parseInt(data.medium2x_dim, 10) + "w'"; - } - img = "medium"); - } else { - img = "big"; - } - } else { - if (data.medium !== "") { - var medium_dims = data.medium_dim.split("x"); - var medium_width = medium_dims[0]; - var medium_height = medium_dims[1]; - // It's a live photo - img = "
"; - } else { - // It's a live photo - img = "
"; - } - } - - html += lychee.html(_templateObject32, img); - - if (lychee.image_overlay) html += build.overlay_image(data); - } - - html += "\n\t\t\t
\n\t\t\t\n\t\t\t"; - - return { html: html, thumb: thumb }; -}; - -build.no_content = function (typ) { - var html = ""; - - html += lychee.html(_templateObject33, build.iconic(typ)); - - switch (typ) { - case "magnifying-glass": - html += lychee.html(_templateObject34, lychee.locale["VIEW_NO_RESULT"]); - break; - case "eye": - html += lychee.html(_templateObject34, lychee.locale["VIEW_NO_PUBLIC_ALBUMS"]); - break; - case "cog": - html += lychee.html(_templateObject34, lychee.locale["VIEW_NO_CONFIGURATION"]); - break; - case "question-mark": - html += lychee.html(_templateObject34, lychee.locale["VIEW_PHOTO_NOT_FOUND"]); - break; - } - - html += "
"; - - return html; -}; - -build.uploadModal = function (title, files) { - var html = ""; - - html += lychee.html(_templateObject35, title); - - var i = 0; - - while (i < files.length) { - var file = files[i]; - - if (file.name.length > 40) file.name = file.name.substr(0, 17) + "..." + file.name.substr(file.name.length - 20, 20); - - html += lychee.html(_templateObject36, file.name); - - i++; - } - - html += "
"; - - return html; -}; - -build.uploadNewFile = function (name) { - if (name.length > 40) { - name = name.substr(0, 17) + "..." + name.substr(name.length - 20, 20); - } - - return lychee.html(_templateObject37, name); -}; - -build.tags = function (tags) { - var html = ""; - var editable = typeof album !== "undefined" ? album.isUploadable() : false; - - // Search is enabled if logged in (not publicMode) or public seach is enabled - var searchable = lychee.publicMode === false || lychee.public_search === true; - - // build class_string for tag - var a_class = "tag"; - if (searchable) { - a_class = a_class + " search"; - } - - if (tags !== "") { - tags = tags.split(","); - - tags.forEach(function (tag, index) { - if (editable) { - html += lychee.html(_templateObject38, a_class, tag, index, build.iconic("x")); - } else { - html += lychee.html(_templateObject39, a_class, tag); - } - }); - } else { - html = lychee.html(_templateObject40, lychee.locale["NO_TAGS"]); - } - - return html; -}; - -build.user = function (user) { - var html = lychee.html(_templateObject41, user.id, user.id, user.username, user.id, user.id); - - return html; -}; - -build.u2f = function (credential) { - return lychee.html(_templateObject42, credential.id, credential.id, credential.id.slice(0, 30), credential.id); -}; - -/** - * @description This module is used for the context menu. - */ - -var contextMenu = {}; - -contextMenu.add = function (e) { - var items = [{ title: build.iconic("image") + lychee.locale["UPLOAD_PHOTO"], fn: function fn() { - return $("#upload_files").click(); - } }, {}, { title: build.iconic("link-intact") + lychee.locale["IMPORT_LINK"], fn: upload.start.url }, { title: build.iconic("dropbox", "ionicons") + lychee.locale["IMPORT_DROPBOX"], fn: upload.start.dropbox }, { title: build.iconic("terminal") + lychee.locale["IMPORT_SERVER"], fn: upload.start.server }, {}, { title: build.iconic("folder") + lychee.locale["NEW_ALBUM"], fn: album.add }]; - - if (visible.albums()) { - items.push({ title: build.iconic("tags") + lychee.locale["NEW_TAG_ALBUM"], fn: album.addByTags }); - } - - if (lychee.api_V2 && !lychee.admin) { - items.splice(3, 2); - } - - basicContext.show(items, e.originalEvent); - - upload.notify(); -}; - -contextMenu.album = function (albumID, e) { - // Notice for 'Merge': - // fn must call basicContext.close() first, - // in order to keep the selection - - if (album.isSmartID(albumID)) return false; - - // Show merge-item when there's more than one album - // Commented out because it doesn't consider subalbums or shared albums. - // let showMerge = (albums.json && albums.json.albums && Object.keys(albums.json.albums).length>1); - var showMerge = true; - - var items = [{ title: build.iconic("pencil") + lychee.locale["RENAME"], fn: function fn() { - return album.setTitle([albumID]); - } }, { - title: build.iconic("collapse-left") + lychee.locale["MERGE"], - visible: showMerge, - fn: function fn() { - basicContext.close(); - contextMenu.move([albumID], e, album.merge, "ROOT", false); - } - }, { - title: build.iconic("folder") + lychee.locale["MOVE"], - visible: lychee.sub_albums, - fn: function fn() { - basicContext.close(); - contextMenu.move([albumID], e, album.setAlbum, "ROOT"); - } - }, - // { title: build.iconic('cloud') + lychee.locale['SHARE_WITH'], visible: lychee.api_V2 && lychee.upload, fn: () => alert('ho')}, - { title: build.iconic("trash") + lychee.locale["DELETE"], fn: function fn() { - return album.delete([albumID]); - } }, { title: build.iconic("cloud-download") + lychee.locale["DOWNLOAD"], fn: function fn() { - return album.getArchive([albumID]); - } }]; - - $('.album[data-id="' + albumID + '"]').addClass("active"); - - basicContext.show(items, e.originalEvent, contextMenu.close); -}; - -contextMenu.albumMulti = function (albumIDs, e) { - multiselect.stopResize(); - - // Automatically merge selected albums when albumIDs contains more than one album - // Show list of albums otherwise - var autoMerge = albumIDs.length > 1; - - // Show merge-item when there's more than one album - // Commented out because it doesn't consider subalbums or shared albums. - // let showMerge = (albums.json && albums.json.albums && Object.keys(albums.json.albums).length>1); - var showMerge = true; - - var items = [{ title: build.iconic("pencil") + lychee.locale["RENAME_ALL"], fn: function fn() { - return album.setTitle(albumIDs); - } }, { - title: build.iconic("collapse-left") + lychee.locale["MERGE_ALL"], - visible: showMerge && autoMerge, - fn: function fn() { - var albumID = albumIDs.shift(); - album.merge(albumIDs, albumID); - } - }, { - title: build.iconic("collapse-left") + lychee.locale["MERGE"], - visible: showMerge && !autoMerge, - fn: function fn() { - basicContext.close(); - contextMenu.move(albumIDs, e, album.merge, "ROOT", false); - } - }, { - title: build.iconic("folder") + lychee.locale["MOVE_ALL"], - visible: lychee.sub_albums, - fn: function fn() { - basicContext.close(); - contextMenu.move(albumIDs, e, album.setAlbum, "ROOT"); - } - }, { title: build.iconic("trash") + lychee.locale["DELETE_ALL"], fn: function fn() { - return album.delete(albumIDs); - } }, { title: build.iconic("cloud-download") + lychee.locale["DOWNLOAD_ALL"], fn: function fn() { - return album.getArchive(albumIDs); - } }]; - - if (!lychee.api_V2) { - items.splice(-1); - } - - basicContext.show(items, e.originalEvent, contextMenu.close); -}; - -contextMenu.buildList = function (lists, exclude, action) { - var parent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var layer = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; - - var find = function find(excl, id) { - for (var _i = 0; _i < excl.length; _i++) { - if (parseInt(excl[_i], 10) === parseInt(id, 10)) return true; - } - return false; - }; - - var items = []; - - var i = 0; - while (i < lists.length) { - if (layer === 0 && !lists[i].parent_id || lists[i].parent_id === parent) { - (function () { - var item = lists[i]; - - var thumb = "img/no_cover.svg"; - if (item.thumbs && item.thumbs[0]) { - if (item.thumbs[0] === "uploads/thumb/" && item.types[0] && item.types[0].indexOf("video") > -1) { - thumb = "img/play-icon.png"; - } else { - thumb = item.thumbs[0]; - } - } else if (item.thumbUrl) { - if (item.thumbUrl === "uploads/thumb/" && item.type.indexOf("video") > -1) { - thumb = "img/play-icon.png"; - } else { - thumb = item.thumbUrl; - } - } - - if (item.title === "") item.title = lychee.locale["UNTITLED"]; - - var prefix = layer > 0 ? "  ".repeat(layer - 1) + "â”” " : ""; - - var html = lychee.html(_templateObject43, prefix, thumb, item.title); - - items.push({ - title: html, - disabled: find(exclude, item.id), - fn: function fn() { - return action(item); - } - }); - - if (item.albums && item.albums.length > 0) { - items = items.concat(contextMenu.buildList(item.albums, exclude, action, item.id, layer + 1)); - } else { - // Fallback for flat tree representation. Should not be - // needed anymore but shouldn't hurt either. - items = items.concat(contextMenu.buildList(lists, exclude, action, item.id, layer + 1)); - } - })(); - } - - i++; - } - - return items; -}; - -contextMenu.albumTitle = function (albumID, e) { - api.post("Albums::tree", {}, function (data) { - var items = []; - - items = items.concat({ title: lychee.locale["ROOT"], disabled: albumID === false, fn: function fn() { - return lychee.goto(); - } }); - - if (data.albums && data.albums.length > 0) { - items = items.concat({}); - items = items.concat(contextMenu.buildList(data.albums, albumID !== false ? [parseInt(albumID, 10)] : [], function (a) { - return lychee.goto(a.id); - })); - } - - if (data.shared_albums && data.shared_albums.length > 0) { - items = items.concat({}); - items = items.concat(contextMenu.buildList(data.shared_albums, albumID !== false ? [parseInt(albumID, 10)] : [], function (a) { - return lychee.goto(a.id); - })); - } - - if (albumID !== false && !album.isSmartID(albumID) && album.isUploadable()) { - if (items.length > 0) { - items.unshift({}); - } - - items.unshift({ title: build.iconic("pencil") + lychee.locale["RENAME"], fn: function fn() { - return album.setTitle([albumID]); - } }); - } - - basicContext.show(items, e.originalEvent, contextMenu.close); - }); -}; - -contextMenu.photo = function (photoID, e) { - // Notice for 'Move': - // fn must call basicContext.close() first, - // in order to keep the selection - - var items = [{ title: build.iconic("star") + lychee.locale["STAR"], fn: function fn() { - return _photo.setStar([photoID]); - } }, { title: build.iconic("tag") + lychee.locale["TAGS"], fn: function fn() { - return _photo.editTags([photoID]); - } }, {}, { title: build.iconic("pencil") + lychee.locale["RENAME"], fn: function fn() { - return _photo.setTitle([photoID]); - } }, { - title: build.iconic("layers") + lychee.locale["COPY_TO"], - fn: function fn() { - basicContext.close(); - contextMenu.move([photoID], e, _photo.copyTo, "UNSORTED"); - } - }, { - title: build.iconic("folder") + lychee.locale["MOVE"], - fn: function fn() { - basicContext.close(); - contextMenu.move([photoID], e, _photo.setAlbum, "UNSORTED"); - } - }, { title: build.iconic("trash") + lychee.locale["DELETE"], fn: function fn() { - return _photo.delete([photoID]); - } }, { title: build.iconic("cloud-download") + lychee.locale["DOWNLOAD"], fn: function fn() { - return _photo.getArchive([photoID]); - } }]; - - $('.photo[data-id="' + photoID + '"]').addClass("active"); - - basicContext.show(items, e.originalEvent, contextMenu.close); -}; - -contextMenu.countSubAlbums = function (photoIDs) { - var count = 0; - - var i = void 0, - j = void 0; - - if (album.albums) { - for (i = 0; i < photoIDs.length; i++) { - for (j = 0; j < album.albums.length; j++) { - if (album.albums[j].id === photoIDs[i]) { - count++; - break; - } - } - } - } - - return count; -}; - -contextMenu.photoMulti = function (photoIDs, e) { - // Notice for 'Move All': - // fn must call basicContext.close() first, - // in order to keep the selection and multiselect - var subcount = contextMenu.countSubAlbums(photoIDs); - var photocount = photoIDs.length - subcount; - - if (subcount && photocount) { - multiselect.deselect(".photo.active, .album.active"); - multiselect.close(); - lychee.error("Please select either albums or photos!"); - return; - } - if (subcount) { - contextMenu.albumMulti(photoIDs, e); - return; - } - - multiselect.stopResize(); - - var items = [{ title: build.iconic("star") + lychee.locale["STAR_ALL"], fn: function fn() { - return _photo.setStar(photoIDs); - } }, { title: build.iconic("tag") + lychee.locale["TAGS_ALL"], fn: function fn() { - return _photo.editTags(photoIDs); - } }, {}, { title: build.iconic("pencil") + lychee.locale["RENAME_ALL"], fn: function fn() { - return _photo.setTitle(photoIDs); - } }, { - title: build.iconic("layers") + lychee.locale["COPY_ALL_TO"], - fn: function fn() { - basicContext.close(); - contextMenu.move(photoIDs, e, _photo.copyTo, "UNSORTED"); - } - }, { - title: build.iconic("folder") + lychee.locale["MOVE_ALL"], - fn: function fn() { - basicContext.close(); - contextMenu.move(photoIDs, e, _photo.setAlbum, "UNSORTED"); - } - }, { title: build.iconic("trash") + lychee.locale["DELETE_ALL"], fn: function fn() { - return _photo.delete(photoIDs); - } }, { title: build.iconic("cloud-download") + lychee.locale["DOWNLOAD_ALL"], fn: function fn() { - return _photo.getArchive(photoIDs, "FULL"); - } }]; - - if (!lychee.api_V2) { - items.splice(-1); - } - - basicContext.show(items, e.originalEvent, contextMenu.close); -}; - -contextMenu.photoTitle = function (albumID, photoID, e) { - var items = [{ title: build.iconic("pencil") + lychee.locale["RENAME"], fn: function fn() { - return _photo.setTitle([photoID]); - } }]; - - var data = album.json; - - if (data.photos !== false && data.photos.length > 0) { - items.push({}); - - items = items.concat(contextMenu.buildList(data.photos, [photoID], function (a) { - return lychee.goto(albumID + "/" + a.id); - })); - } - - if (!album.isUploadable()) { - // Remove Rename and the spacer. - items.splice(0, 2); - } - - basicContext.show(items, e.originalEvent, contextMenu.close); -}; - -contextMenu.photoMore = function (photoID, e) { - // Show download-item when - // a) We are allowed to upload to the album - // b) the photo is explicitly marked as downloadable (v4-only) - // c) or, the album is explicitly marked as downloadable - var showDownload = album.isUploadable() || (_photo.json.hasOwnProperty("downloadable") ? _photo.json.downloadable === "1" : album.json && album.json.downloadable && album.json.downloadable === "1"); - var showFull = _photo.json.url && _photo.json.url !== ""; - - var items = [{ title: build.iconic("fullscreen-enter") + lychee.locale["FULL_PHOTO"], visible: !!showFull, fn: function fn() { - return window.open(_photo.getDirectLink()); - } }, { title: build.iconic("cloud-download") + lychee.locale["DOWNLOAD"], visible: !!showDownload, fn: function fn() { - return _photo.getArchive([photoID]); - } }]; - - basicContext.show(items, e.originalEvent); -}; - -contextMenu.getSubIDs = function (albums, albumID) { - var ids = [parseInt(albumID, 10)]; - var a = void 0; - - for (a = 0; a < albums.length; a++) { - if (parseInt(albums[a].parent_id, 10) === parseInt(albumID, 10)) { - ids = ids.concat(contextMenu.getSubIDs(albums, albums[a].id)); - } - - if (albums[a].albums && albums[a].albums.length > 0) { - ids = ids.concat(contextMenu.getSubIDs(albums[a].albums, albumID)); - } - } - - return ids; -}; - -contextMenu.move = function (IDs, e, callback) { - var kind = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "UNSORTED"; - var display_root = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - - var items = []; - - api.post("Albums::tree", {}, function (data) { - var addItems = function addItems(albums) { - // Disable all children - // It's not possible to move us into them - var i = void 0, - s = void 0; - var exclude = []; - for (i = 0; i < IDs.length; i++) { - var sub = contextMenu.getSubIDs(albums, IDs[i]); - for (s = 0; s < sub.length; s++) { - exclude.push(sub[s]); - } - } - if (visible.album()) { - // For merging, don't exclude the parent. - // For photo copy, don't exclude the current album. - if (callback !== album.merge && callback !== _photo.copyTo) { - exclude.push(album.getID().toString()); - } - if (IDs.length === 1 && IDs[0] === album.getID() && album.getParent() && callback === album.setAlbum) { - // If moving the current album, exclude its parent. - exclude.push(album.getParent().toString()); - } - } else if (visible.photo()) { - exclude.push(_photo.json.album.toString()); - } - items = items.concat(contextMenu.buildList(albums, exclude.concat(IDs), function (a) { - return callback(IDs, a.id); - })); - }; - - if (data.albums && data.albums.length > 0) { - // items = items.concat(contextMenu.buildList(data.albums, [ album.getID() ], (a) => callback(IDs, a.id))); //photo.setAlbum - - addItems(data.albums); - } - - if (data.shared_albums && data.shared_albums.length > 0 && lychee.admin) { - items = items.concat({}); - addItems(data.shared_albums); - } - - // Show Unsorted when unsorted is not the current album - if (display_root && album.getID() !== "0" && !visible.albums()) { - items.unshift({}); - items.unshift({ title: lychee.locale[kind], fn: function fn() { - return callback(IDs, 0); - } }); - } - - // Don't allow to move the current album to a newly created subalbum - // (creating a cycle). - if (IDs.length !== 1 || IDs[0] !== (album.json ? album.json.id : null) || callback !== album.setAlbum) { - items.unshift({}); - items.unshift({ title: lychee.locale["NEW_ALBUM"], fn: function fn() { - return album.add(IDs, callback); - } }); - } - - basicContext.show(items, e.originalEvent, contextMenu.close); - }); -}; - -contextMenu.sharePhoto = function (photoID, e) { - // v4+ only - if (_photo.json.hasOwnProperty("share_button_visible") && _photo.json.share_button_visible !== "1") { - return; - } - - var iconClass = "ionicons"; - - var items = [{ title: build.iconic("twitter", iconClass) + "Twitter", fn: function fn() { - return _photo.share(photoID, "twitter"); - } }, { title: build.iconic("facebook", iconClass) + "Facebook", fn: function fn() { - return _photo.share(photoID, "facebook"); - } }, { title: build.iconic("envelope-closed") + "Mail", fn: function fn() { - return _photo.share(photoID, "mail"); - } }, { title: build.iconic("dropbox", iconClass) + "Dropbox", visible: lychee.admin === true, fn: function fn() { - return _photo.share(photoID, "dropbox"); - } }, { title: build.iconic("link-intact") + lychee.locale["DIRECT_LINKS"], fn: function fn() { - return _photo.showDirectLinks(photoID); - } }]; - - basicContext.show(items, e.originalEvent); -}; - -contextMenu.shareAlbum = function (albumID, e) { - // v4+ only - if (album.json.hasOwnProperty("share_button_visible") && album.json.share_button_visible !== "1") { - return; - } - - var iconClass = "ionicons"; - - var items = [{ title: build.iconic("twitter", iconClass) + "Twitter", fn: function fn() { - return album.share("twitter"); - } }, { title: build.iconic("facebook", iconClass) + "Facebook", fn: function fn() { - return album.share("facebook"); - } }, { title: build.iconic("envelope-closed") + "Mail", fn: function fn() { - return album.share("mail"); - } }, { - title: build.iconic("link-intact") + lychee.locale["DIRECT_LINK"], - fn: function fn() { - var url = lychee.getBaseUrl() + "r/" + albumID; - if (album.json.password === "1") { - // Copy the url with prefilled password param - url += "?password="; - } - if (lychee.clipboardCopy(url)) { - loadingBar.show("success", lychee.locale["URL_COPIED_TO_CLIPBOARD"]); - } - } - }]; - - basicContext.show(items, e.originalEvent); -}; - -contextMenu.close = function () { - if (!visible.contextMenu()) return false; - - basicContext.close(); - - multiselect.clearSelection(); - if (visible.multiselect()) { - multiselect.close(); - } -}; - -/** - * @description This module takes care of the header. - */ - -var header = { - _dom: $(".header") -}; - -header.dom = function (selector) { - if (selector == null || selector === "") return header._dom; - return header._dom.find(selector); -}; - -header.bind = function () { - // Event Name - var eventName = lychee.getEventName(); - - header.dom(".header__title").on(eventName, function (e) { - if ($(this).hasClass("header__title--editable") === false) return false; - - if (lychee.enable_contextmenu_header === false) return false; - - if (visible.photo()) contextMenu.photoTitle(album.getID(), _photo.getID(), e);else contextMenu.albumTitle(album.getID(), e); - }); - - header.dom("#button_visibility").on(eventName, function (e) { - _photo.setPublic(_photo.getID(), e); - }); - header.dom("#button_share").on(eventName, function (e) { - contextMenu.sharePhoto(_photo.getID(), e); - }); - - header.dom("#button_visibility_album").on(eventName, function (e) { - album.setPublic(album.getID(), e); - }); - header.dom("#button_share_album").on(eventName, function (e) { - contextMenu.shareAlbum(album.getID(), e); - }); - - header.dom("#button_signin").on(eventName, lychee.loginDialog); - header.dom("#button_settings").on(eventName, leftMenu.open); - header.dom("#button_info_album").on(eventName, _sidebar.toggle); - header.dom("#button_info").on(eventName, _sidebar.toggle); - header.dom(".button--map-albums").on(eventName, function () { - lychee.gotoMap(); - }); - header.dom("#button_map_album").on(eventName, function () { - lychee.gotoMap(album.getID()); - }); - header.dom("#button_map").on(eventName, function () { - lychee.gotoMap(album.getID()); - }); - header.dom(".button_add").on(eventName, contextMenu.add); - header.dom("#button_more").on(eventName, function (e) { - contextMenu.photoMore(_photo.getID(), e); - }); - header.dom("#button_move_album").on(eventName, function (e) { - contextMenu.move([album.getID()], e, album.setAlbum, "ROOT", album.getParent() != ""); - }); - header.dom("#button_nsfw_album").on(eventName, function (e) { - album.setNSFW(album.getID()); - }); - header.dom("#button_move").on(eventName, function (e) { - contextMenu.move([_photo.getID()], e, _photo.setAlbum); - }); - header.dom(".header__hostedwith").on(eventName, function () { - window.open(lychee.website); - }); - header.dom("#button_trash_album").on(eventName, function () { - album.delete([album.getID()]); - }); - header.dom("#button_trash").on(eventName, function () { - _photo.delete([_photo.getID()]); - }); - header.dom("#button_archive").on(eventName, function () { - album.getArchive([album.getID()]); - }); - header.dom("#button_star").on(eventName, function () { - _photo.setStar([_photo.getID()]); - }); - header.dom("#button_rotate_ccwise").on(eventName, function () { - photoeditor.rotate(_photo.getID(), -1); - }); - header.dom("#button_rotate_cwise").on(eventName, function () { - photoeditor.rotate(_photo.getID(), 1); - }); - header.dom("#button_back_home").on(eventName, function () { - if (!album.json.parent_id) { - lychee.goto(); - } else { - lychee.goto(album.getParent()); - } - }); - header.dom("#button_back").on(eventName, function () { - lychee.goto(album.getID()); - }); - header.dom("#button_back_map").on(eventName, function () { - lychee.goto(album.getID()); - }); - header.dom("#button_fs_album_enter,#button_fs_enter").on(eventName, lychee.fullscreenEnter); - header.dom("#button_fs_album_exit,#button_fs_exit").on(eventName, lychee.fullscreenExit).hide(); - - header.dom(".header__search").on("keyup click", function () { - if ($(this).val().length > 0) { - lychee.goto("search/" + encodeURIComponent($(this).val())); - } else if (search.hash !== null) { - search.reset(); - } - }); - header.dom(".header__clear").on(eventName, function () { - header.dom(".header__search").focus(); - search.reset(); - }); - - header.bind_back(); - - return true; -}; - -header.bind_back = function () { - // Event Name - var eventName = lychee.getEventName(); - - header.dom(".header__title").on(eventName, function () { - if (lychee.landing_page_enable && visible.albums()) { - window.location.href = "."; - } else { - return false; - } - }); -}; - -header.show = function () { - lychee.imageview.removeClass("full"); - header.dom().removeClass("header--hidden"); - - tabindex.restoreSettings(header.dom()); - - _photo.updateSizeLivePhotoDuringAnimation(); - - return true; -}; - -header.hideIfLivePhotoNotPlaying = function () { - // Hides the header, if current live photo is not playing - if (_photo.isLivePhotoPlaying() == true) return false; - return header.hide(); -}; - -header.hide = function () { - if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && basicModal.visible() === false) { - tabindex.saveSettings(header.dom()); - tabindex.makeUnfocusable(header.dom()); - - lychee.imageview.addClass("full"); - header.dom().addClass("header--hidden"); - - _photo.updateSizeLivePhotoDuringAnimation(); - - return true; - } - - return false; -}; - -header.setTitle = function () { - var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Untitled"; - - var $title = header.dom(".header__title"); - var html = lychee.html(_templateObject44, title, build.iconic("caret-bottom")); - - $title.html(html); - - return true; -}; - -header.setMode = function (mode) { - if (mode === "albums" && lychee.publicMode === true) mode = "public"; - - switch (mode) { - case "public": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--albums, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--public").addClass("header__toolbar--visible"); - tabindex.makeFocusable(header.dom(".header__toolbar--public")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--albums, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map")); - - if (lychee.public_search) { - var e = $(".header__search, .header__clear", ".header__toolbar--public"); - e.show(); - tabindex.makeFocusable(e); - } else { - var _e2 = $(".header__search, .header__clear", ".header__toolbar--public"); - _e2.hide(); - tabindex.makeUnfocusable(_e2); - } - - // Set icon in Public mode - if (lychee.map_display_public) { - var _e3 = $(".button--map-albums", ".header__toolbar--public"); - _e3.show(); - tabindex.makeFocusable(_e3); - } else { - var _e4 = $(".button--map-albums", ".header__toolbar--public"); - _e4.hide(); - tabindex.makeUnfocusable(_e4); - } - - // Set focus on login button - if (lychee.active_focus_on_page_load) { - $("#button_signin").focus(); - } - return true; - - case "albums": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--albums").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--albums")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map")); - - // If map is disabled, we should hide the icon - if (lychee.map_display) { - var _e5 = $(".button--map-albums", ".header__toolbar--albums"); - _e5.show(); - tabindex.makeFocusable(_e5); - } else { - var _e6 = $(".button--map-albums", ".header__toolbar--albums"); - _e6.hide(); - tabindex.makeUnfocusable(_e6); - } - - if (lychee.enable_button_add) { - var _e7 = $(".button_add", ".header__toolbar--albums"); - _e7.show(); - tabindex.makeFocusable(_e7); - } else { - var _e8 = $(".button_add", ".header__toolbar--albums"); - _e8.remove(); - } - - return true; - - case "album": - var albumID = album.getID(); - - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--album").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--album")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--photo, .header__toolbar--map")); - - // Hide download button when album empty or we are not allowed to - // upload to it and it's not explicitly marked as downloadable. - if (!album.json || album.json.photos === false && album.json.albums && album.json.albums.length === 0 || !album.isUploadable() && album.json.downloadable === "0") { - var _e9 = $("#button_archive"); - _e9.hide(); - tabindex.makeUnfocusable(_e9); - } else { - var _e10 = $("#button_archive"); - _e10.show(); - tabindex.makeFocusable(_e10); - } - - if (album.json && album.json.hasOwnProperty("share_button_visible") && album.json.share_button_visible !== "1") { - var _e11 = $("#button_share_album"); - _e11.hide(); - tabindex.makeUnfocusable(_e11); - } else { - var _e12 = $("#button_share_album"); - _e12.show(); - tabindex.makeFocusable(_e12); - } - - // If map is disabled, we should hide the icon - if (lychee.publicMode === true ? lychee.map_display_public : lychee.map_display) { - var _e13 = $("#button_map_album"); - _e13.show(); - tabindex.makeFocusable(_e13); - } else { - var _e14 = $("#button_map_album"); - _e14.hide(); - tabindex.makeUnfocusable(_e14); - } - - if (albumID === "starred" || albumID === "public" || albumID === "recent") { - $("#button_info_album, #button_trash_album, #button_visibility_album, #button_move_album").hide(); - $(".button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($(".button_add, .header__divider", ".header__toolbar--album")); - tabindex.makeUnfocusable($("#button_info_album, #button_trash_album, #button_visibility_album, #button_move_album")); - } else if (albumID === "unsorted") { - $("#button_info_album, #button_visibility_album, #button_move_album").hide(); - $("#button_trash_album, .button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($("#button_trash_album, .button_add, .header__divider", ".header__toolbar--album")); - tabindex.makeUnfocusable($("#button_info_album, #button_visibility_album, #button_move_album")); - } else if (album.isTagAlbum()) { - $("#button_info_album").show(); - $("#button_move_album").hide(); - $(".button_add, .header__divider", ".header__toolbar--album").hide(); - tabindex.makeFocusable($("#button_info_album")); - tabindex.makeUnfocusable($("#button_move_album")); - tabindex.makeUnfocusable($(".button_add, .header__divider", ".header__toolbar--album")); - if (album.isUploadable()) { - $("#button_visibility_album, #button_trash_album").show(); - tabindex.makeFocusable($("#button_visibility_album, #button_trash_album")); - } else { - $("#button_visibility_album, #button_trash_album").hide(); - tabindex.makeUnfocusable($("#button_visibility_album, #button_trash_album")); - } - } else { - $("#button_info_album").show(); - tabindex.makeFocusable($("#button_info_album")); - if (album.isUploadable()) { - $("#button_nsfw_album, #button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($("#button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album")); - } else { - $("#button_nsfw_album, #button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album").hide(); - tabindex.makeUnfocusable($("#button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album")); - } - } - - // Remove buttons if needed - if (!lychee.enable_button_visibility) { - var _e15 = $("#button_visibility_album", ".header__toolbar--album"); - _e15.remove(); - } - if (!lychee.enable_button_share) { - var _e16 = $("#button_share_album", ".header__toolbar--album"); - _e16.remove(); - } - if (!lychee.enable_button_archive) { - var _e17 = $("#button_archive", ".header__toolbar--album"); - _e17.remove(); - } - if (!lychee.enable_button_move) { - var _e18 = $("#button_move_album", ".header__toolbar--album"); - _e18.remove(); - } - if (!lychee.enable_button_trash) { - var _e19 = $("#button_trash_album", ".header__toolbar--album"); - _e19.remove(); - } - if (!lychee.enable_button_fullscreen) { - var _e20 = $("#button_fs_album_enter", ".header__toolbar--album"); - _e20.remove(); - } - if (!lychee.enable_button_add) { - var _e21 = $(".button_add", ".header__toolbar--album"); - _e21.remove(); - } - - return true; - - case "photo": - header.dom().addClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--album, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--photo").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--photo")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--album, .header__toolbar--map")); - // If map is disabled, we should hide the icon - if (lychee.publicMode === true ? lychee.map_display_public : lychee.map_display) { - var _e22 = $("#button_map"); - _e22.show(); - tabindex.makeFocusable(_e22); - } else { - var _e23 = $("#button_map"); - _e23.hide(); - tabindex.makeUnfocusable(_e23); - } - - if (album.isUploadable()) { - var _e24 = $("#button_trash, #button_move, #button_visibility, #button_star"); - _e24.show(); - tabindex.makeFocusable(_e24); - } else { - var _e25 = $("#button_trash, #button_move, #button_visibility, #button_star"); - _e25.hide(); - tabindex.makeUnfocusable(_e25); - } - - if (_photo.json && _photo.json.hasOwnProperty("share_button_visible") && _photo.json.share_button_visible !== "1") { - var _e26 = $("#button_share"); - _e26.hide(); - tabindex.makeUnfocusable(_e26); - } else { - var _e27 = $("#button_share"); - _e27.show(); - tabindex.makeFocusable(_e27); - } - - // Hide More menu if empty (see contextMenu.photoMore) - $("#button_more").show(); - tabindex.makeFocusable($("#button_more")); - if (!(album.isUploadable() || (_photo.json.hasOwnProperty("downloadable") ? _photo.json.downloadable === "1" : album.json && album.json.downloadable && album.json.downloadable === "1")) && !(_photo.json.url && _photo.json.url !== "")) { - var _e28 = $("#button_more"); - _e28.hide(); - tabindex.makeUnfocusable(_e28); - } - - // Remove buttons if needed - if (!lychee.enable_button_visibility) { - var _e29 = $("#button_visibility", ".header__toolbar--photo"); - _e29.remove(); - } - if (!lychee.enable_button_share) { - var _e30 = $("#button_share", ".header__toolbar--photo"); - _e30.remove(); - } - if (!lychee.enable_button_move) { - var _e31 = $("#button_move", ".header__toolbar--photo"); - _e31.remove(); - } - if (!lychee.enable_button_trash) { - var _e32 = $("#button_trash", ".header__toolbar--photo"); - _e32.remove(); - } - if (!lychee.enable_button_fullscreen) { - var _e33 = $("#button_fs_enter", ".header__toolbar--photo"); - _e33.remove(); - } - if (!lychee.enable_button_more) { - var _e34 = $("#button_more", ".header__toolbar--photo"); - _e34.remove(); - } - if (!lychee.enable_button_rotate) { - var _e35 = $("#button_rotate_cwise", ".header__toolbar--photo"); - _e35.remove(); - - _e35 = $("#button_rotate_ccwise", ".header__toolbar--photo"); - _e35.remove(); - } - return true; - case "map": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--albums, .header__toolbar--photo").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--map").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--map")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--albums, .header__toolbar--photo")); - return true; - } - - return false; -}; - -// Note that the pull-down menu is now enabled not only for editable -// items but for all of public/albums/album/photo views, so 'editable' is a -// bit of a misnomer at this point... -header.setEditable = function (editable) { - var $title = header.dom(".header__title"); - - if (editable) $title.addClass("header__title--editable");else $title.removeClass("header__title--editable"); - - return true; -}; - -header.applyTranslations = function () { - var selector_locale = { - "#button_signin": "SIGN_IN", - "#button_settings": "SETTINGS", - "#button_info_album": "ABOUT_ALBUM", - "#button_info": "ABOUT_PHOTO", - ".button_add": "ADD", - "#button_move_album": "MOVE_ALBUM", - "#button_move": "MOVE", - "#button_trash_album": "DELETE_ALBUM", - "#button_trash": "DELETE", - "#button_archive": "DOWNLOAD_ALBUM", - "#button_star": "STAR_PHOTO", - "#button_back_home": "CLOSE_ALBUM", - "#button_fs_album_enter": "FULLSCREEN_ENTER", - "#button_fs_enter": "FULLSCREEN_ENTER", - "#button_share": "SHARE_PHOTO", - "#button_share_album": "SHARE_ALBUM" - }; - - for (var selector in selector_locale) { - header.dom(selector).prop("title", lychee.locale[selector_locale[selector]]); - } -}; - -/** - * @description This module is used for bindings. - */ - -$(document).ready(function () { - $("#sensitive_warning").hide(); - - // Event Name - var eventName = lychee.getEventName(); - - // set CSRF protection (Laravel) - csrf.bind(); - - // Set API error handler - api.onError = lychee.error; - - $("html").css("visibility", "visible"); - - // Multiselect - multiselect.bind(); - - // Header - header.bind(); - - // Image View - lychee.imageview.on(eventName, ".arrow_wrapper--previous", _photo.previous).on(eventName, ".arrow_wrapper--next", _photo.next).on(eventName, "img, #livephoto", _photo.update_display_overlay); - - // Keyboard - - Mousetrap.addKeycodes({ - 18: "ContextMenu", - 179: "play_pause", - 227: "rewind", - 228: "forward" - }); - - Mousetrap.bind(["l"], function () { - lychee.loginDialog(); - return false; - }).bind(["k"], function () { - u2f.login(); - return false; - }).bind(["left"], function () { - if (visible.photo() && (!visible.header() || $("img#image").is(":focus") || $("img#livephoto").is(":focus") || $(":focus").length === 0)) { - $("#imageview a#previous").click(); - return false; - } - return true; - }).bind(["right"], function () { - if (visible.photo() && (!visible.header() || $("img#image").is(":focus") || $("img#livephoto").is(":focus") || $(":focus").length === 0)) { - $("#imageview a#next").click(); - return false; - } - return true; - }).bind(["u"], function () { - if (!visible.photo() && album.isUploadable()) { - $("#upload_files").click(); - return false; - } - }).bind(["n"], function () { - if (!visible.photo() && album.isUploadable()) { - album.add(); - return false; - } - }).bind(["s"], function () { - if (visible.photo() && album.isUploadable()) { - header.dom("#button_star").click(); - return false; - } else if (visible.albums()) { - header.dom(".header__search").focus(); - return false; - } - }).bind(["r"], function () { - if (album.isUploadable()) { - if (visible.album()) { - album.setTitle(album.getID()); - return false; - } else if (visible.photo()) { - _photo.setTitle([_photo.getID()]); - return false; - } - } - }).bind(["h"], album.toggle_nsfw_filter).bind(["d"], function () { - if (album.isUploadable()) { - if (visible.photo()) { - _photo.setDescription(_photo.getID()); - return false; - } else if (visible.album()) { - album.setDescription(album.getID()); - return false; - } - } - }).bind(["t"], function () { - if (visible.photo() && album.isUploadable()) { - _photo.editTags([_photo.getID()]); - return false; - } - }).bind(["i", "ContextMenu"], function () { - if (!visible.multiselect()) { - _sidebar.toggle(); - return false; - } - }).bind(["command+backspace", "ctrl+backspace"], function () { - if (album.isUploadable()) { - if (visible.photo() && basicModal.visible() === false) { - _photo.delete([_photo.getID()]); - return false; - } else if (visible.album() && basicModal.visible() === false) { - album.delete([album.getID()]); - return false; - } - } - }).bind(["command+a", "ctrl+a"], function () { - if (visible.album() && basicModal.visible() === false) { - multiselect.selectAll(); - return false; - } else if (visible.albums() && basicModal.visible() === false) { - multiselect.selectAll(); - return false; - } - }).bind(["o"], function () { - if (visible.photo()) { - _photo.update_overlay_type(); - return false; - } - }).bind(["f"], function () { - if (visible.album() || visible.photo()) { - lychee.fullscreenToggle(); - return false; - } - }); - - Mousetrap.bind(["play_pause"], function () { - // If it's a video, we toggle play/pause - var video = $("video"); - - if (video.length !== 0) { - if (video[0].paused) { - video[0].play(); - } else { - video[0].pause(); - } - } - }); - - Mousetrap.bindGlobal("enter", function () { - if (basicModal.visible() === true) { - // check if any of the input fields is focussed - // apply action, other do nothing - if ($(".basicModal__content input").is(":focus")) { - basicModal.action(); - return false; - } - } else if (visible.photo() && !lychee.header_auto_hide && ($("img#image").is(":focus") || $("img#livephoto").is(":focus") || $(":focus").length === 0)) { - if (visible.header()) { - header.hide(); - } else { - header.show(); - } - return false; - } - var clicked = false; - $(":focus").each(function () { - if (!$(this).is("input")) { - $(this).click(); - clicked = true; - } - }); - if (clicked) { - return false; - } - }); - - // Prevent 'esc keyup' event to trigger 'go back in history' - // and 'alt keyup' to show a webapp context menu for Fire TV - Mousetrap.bindGlobal(["esc", "ContextMenu"], function () { - return false; - }, "keyup"); - - Mousetrap.bindGlobal(["esc", "command+up"], function () { - if (basicModal.visible() === true) basicModal.cancel();else if (visible.leftMenu()) leftMenu.close();else if (visible.contextMenu()) contextMenu.close();else if (visible.photo()) lychee.goto(album.getID());else if (visible.album() && !album.json.parent_id) lychee.goto();else if (visible.album()) lychee.goto(album.getParent());else if (visible.albums() && search.hash !== null) search.reset();else if (visible.mapview()) mapview.close();else if (visible.albums() && lychee.enable_close_tab_on_esc) { - window.open("", "_self").close(); - } - return false; - }); - - $(document) - // Fullscreen on mobile - .on("touchend", "#imageview #image", function (e) { - // prevent triggering event 'mousemove' - e.preventDefault(); - - if (typeof swipe.obj === "undefined" || Math.abs(swipe.offsetX) <= 5 && Math.abs(swipe.offsetY) <= 5) { - // Toggle header only if we're not moving to next/previous photo; - // In this case, swipe.preventNextHeaderToggle is set to true - if (typeof swipe.preventNextHeaderToggle === "undefined" || !swipe.preventNextHeaderToggle) { - if (visible.header()) { - header.hide(e); - } else { - header.show(); - } - } - - // For next 'touchend', behave again as normal and toggle header - swipe.preventNextHeaderToggle = false; - } - }); - $("#imageview") - // Swipe on mobile - .swipe().on("swipeStart", function () { - if (visible.photo()) swipe.start($("#imageview #image, #imageview #livephoto")); - }).swipe().on("swipeMove", function (e) { - if (visible.photo()) swipe.move(e.swipe); - }).swipe().on("swipeEnd", function (e) { - if (visible.photo()) swipe.stop(e.swipe, _photo.previous, _photo.next); - }); - - // Document - $(document) - // Navigation - .on("click", ".album", function (e) { - multiselect.albumClick(e, $(this)); - }).on("click", ".photo", function (e) { - multiselect.photoClick(e, $(this)); - }) - // Context Menu - .on("contextmenu", ".photo", function (e) { - multiselect.photoContextMenu(e, $(this)); - }).on("contextmenu", ".album", function (e) { - multiselect.albumContextMenu(e, $(this)); - }) - // Upload - .on("change", "#upload_files", function () { - basicModal.close(); - upload.start.local(this.files); - }) - // Drag and Drop upload - .on("dragover", function () { - return false; - }, false).on("drop", function (e) { - if (!album.isUploadable() || visible.contextMenu() || basicModal.visible() || visible.leftMenu() || !(visible.album() || visible.albums())) { - return false; - } - - // Detect if dropped item is a file or a link - if (e.originalEvent.dataTransfer.files.length > 0) upload.start.local(e.originalEvent.dataTransfer.files);else if (e.originalEvent.dataTransfer.getData("Text").length > 3) upload.start.url(e.originalEvent.dataTransfer.getData("Text")); - - return false; - }) - // click on thumbnail on map - .on("click", ".image-leaflet-popup", function (e) { - mapview.goto($(this)); - }) - // Paste upload - .on("paste", function (e) { - if (e.originalEvent.clipboardData.items) { - var items = e.originalEvent.clipboardData.items; - var filesToUpload = []; - - // Search clipboard items for an image - for (var i = 0; i < items.length; i++) { - if (items[i].type.indexOf("image") !== -1 || items[i].type.indexOf("video") !== -1) { - filesToUpload.push(items[i].getAsFile()); - } - } - - if (filesToUpload.length > 0) { - // We perform the check so deep because we don't want to - // prevent the paste from working in text input fields, etc. - if (album.isUploadable() && !visible.contextMenu() && !basicModal.visible() && !visible.leftMenu() && (visible.album() || visible.albums())) { - upload.start.local(filesToUpload); - } - - return false; - } - } - }) - // Fullscreen - .on("fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange", lychee.fullscreenUpdate); - - $("#sensitive_warning").on("click", view.album.nsfw_warning.next); - - var rememberScrollPage = function rememberScrollPage(scrollPos) { - // only for albums with subalbums - if (album && album.json && album.json.albums && album.json.albums.length > 0) { - var urls = JSON.parse(localStorage.getItem("scroll")); - if (urls == null || urls.length < 1) { - urls = {}; - } - - var urlWindow = window.location.href; - var urlScroll = scrollPos; - - urls[urlWindow] = urlScroll; - - if (urlScroll < 1) { - delete urls[urlWindow]; - } - - localStorage.setItem("scroll", JSON.stringify(urls)); - } - }; - - $(window) - // resize - .on("resize", function () { - if (visible.album() || visible.search()) view.album.content.justify(); - if (visible.photo()) view.photo.onresize(); - }) - // remember scroll positions - .on("scroll", function () { - var topScroll = $(window).scrollTop(); - rememberScrollPage(topScroll); - }); - - // Init - lychee.init(); -}); - -/** - * @description This module is used for the context menu. - */ - -var leftMenu = { - _dom: $(".leftMenu") -}; - -leftMenu.dom = function (selector) { - if (selector == null || selector === "") return leftMenu._dom; - return leftMenu._dom.find(selector); -}; - -leftMenu.build = function () { - var html = lychee.html(_templateObject45, lychee.locale["CLOSE"], lychee.locale["SETTINGS"]); - if (lychee.api_V2) { - html += lychee.html(_templateObject46, build.iconic("person"), lychee.locale["USERS"], build.iconic("key"), lychee.locale["U2F"], build.iconic("cloud"), lychee.locale["SHARING"]); - } - html += lychee.html(_templateObject47, build.iconic("align-left"), lychee.locale["LOGS"], build.iconic("wrench"), lychee.locale["DIAGNOSTICS"], build.iconic("info"), lychee.locale["ABOUT_LYCHEE"], build.iconic("account-logout"), lychee.locale["SIGN_OUT"]); - if (lychee.api_V2 && lychee.update_available) { - html += lychee.html(_templateObject48, build.iconic("timer"), lychee.locale["UPDATE_AVAILABLE"]); - } - leftMenu._dom.html(html); -}; - -/* Set the width of the side navigation to 250px and the left margin of the page content to 250px */ -leftMenu.open = function () { - leftMenu._dom.addClass("leftMenu__visible"); - lychee.content.addClass("leftMenu__open"); - lychee.footer.addClass("leftMenu__open"); - header.dom(".header__title").addClass("leftMenu__open"); - loadingBar.dom().addClass("leftMenu__open"); - - // Make background unfocusable - tabindex.makeUnfocusable(header.dom()); - tabindex.makeUnfocusable(lychee.content); - tabindex.makeFocusable(leftMenu._dom); - $("#button_signout").focus(); - - multiselect.unbind(); -}; - -/* Set the width of the side navigation to 0 and the left margin of the page content to 0 */ -leftMenu.close = function () { - leftMenu._dom.removeClass("leftMenu__visible"); - lychee.content.removeClass("leftMenu__open"); - lychee.footer.removeClass("leftMenu__open"); - $(".content").removeClass("leftMenu__open"); - header.dom(".header__title").removeClass("leftMenu__open"); - loadingBar.dom().removeClass("leftMenu__open"); - - tabindex.makeFocusable(header.dom()); - tabindex.makeFocusable(lychee.content); - tabindex.makeUnfocusable(leftMenu._dom); - - multiselect.bind(); - lychee.load(); -}; - -leftMenu.bind = function () { - // Event Name - var eventName = lychee.getEventName(); - - leftMenu.dom("#button_settings_close").on(eventName, leftMenu.close); - leftMenu.dom("#text_settings_close").on(eventName, leftMenu.close); - leftMenu.dom("#button_settings_open").on(eventName, settings.open); - leftMenu.dom("#button_signout").on(eventName, lychee.logout); - leftMenu.dom("#button_logs").on(eventName, leftMenu.Logs); - leftMenu.dom("#button_diagnostics").on(eventName, leftMenu.Diagnostics); - leftMenu.dom("#button_about").on(eventName, lychee.aboutDialog); - - if (lychee.api_V2) { - leftMenu.dom("#button_users").on(eventName, leftMenu.Users); - leftMenu.dom("#button_u2f").on(eventName, leftMenu.u2f); - leftMenu.dom("#button_sharing").on(eventName, leftMenu.Sharing); - leftMenu.dom("#button_update").on(eventName, leftMenu.Update); - } - - return true; -}; - -leftMenu.Logs = function () { - if (lychee.api_V2) { - view.logs.init(); - } else { - window.open(lychee.logs()); - } -}; - -leftMenu.Diagnostics = function () { - if (lychee.api_V2) { - view.diagnostics.init(); - } else { - window.open(lychee.diagnostics()); - } -}; - -leftMenu.Update = function () { - view.update.init(); -}; - -leftMenu.Users = function () { - users.list(); -}; - -leftMenu.u2f = function () { - u2f.list(); -}; - -leftMenu.Sharing = function () { - sharing.list(); -}; - -/** - * @description This module is used to show and hide the loading bar. - */ - -var loadingBar = { - status: null, - _dom: $("#loading") -}; - -loadingBar.dom = function (selector) { - if (selector == null || selector === "") return loadingBar._dom; - return loadingBar._dom.find(selector); -}; - -loadingBar.show = function (status, errorText) { - if (status === "error") { - // Set status - loadingBar.status = "error"; - - // Parse text - if (errorText) errorText = errorText.replace("
", ""); - if (!errorText) errorText = lychee.locale["ERROR_TEXT"]; - - // Move header down - if (visible.header()) header.dom().addClass("header--error"); - - // Also move down the dark background - if (basicModal.visible()) { - $(".basicModalContainer").addClass("basicModalContainer--error"); - $(".basicModal").addClass("basicModal--error"); - } - - // Modify loading - loadingBar.dom().removeClass("loading uploading error success").html("

" + lychee.locale["ERROR"] + (": " + errorText + "

")).addClass(status).show(); - - // Set timeout - clearTimeout(loadingBar._timeout); - loadingBar._timeout = setTimeout(function () { - return loadingBar.hide(true); - }, 3000); - - return true; - } - - if (status === "success") { - // Set status - loadingBar.status = "success"; - - // Parse text - if (errorText) errorText = errorText.replace("
", ""); - if (!errorText) errorText = lychee.locale["ERROR_TEXT"]; - - // Move header down - if (visible.header()) header.dom().addClass("header--error"); - - // Also move down the dark background - if (basicModal.visible()) { - $(".basicModalContainer").addClass("basicModalContainer--error"); - $(".basicModal").addClass("basicModal--error"); - } - - // Modify loading - loadingBar.dom().removeClass("loading uploading error success").html("

" + lychee.locale["SUCCESS"] + (": " + errorText + "

")).addClass(status).show(); - - // Set timeout - clearTimeout(loadingBar._timeout); - loadingBar._timeout = setTimeout(function () { - return loadingBar.hide(true); - }, 2000); - - return true; - } - - if (loadingBar.status === null) { - // Set status - loadingBar.status = lychee.locale["LOADING"]; - - // Set timeout - clearTimeout(loadingBar._timeout); - loadingBar._timeout = setTimeout(function () { - // Move header down - if (visible.header()) header.dom().addClass("header--loading"); - - // Modify loading - loadingBar.dom().removeClass("loading uploading error").html("").addClass("loading").show(); - }, 1000); - - return true; - } -}; - -loadingBar.hide = function (force) { - if (loadingBar.status !== "error" && loadingBar.status !== "success" && loadingBar.status != null || force) { - // Remove status - loadingBar.status = null; - - // Move header up - header.dom().removeClass("header--error header--loading"); - // Also move up the dark background - $(".basicModalContainer").removeClass("basicModalContainer--error"); - $(".basicModal").removeClass("basicModal--error"); - - // Set timeout - clearTimeout(loadingBar._timeout); - setTimeout(function () { - return loadingBar.dom().hide(); - }, 300); - } -}; - -/** - * @description This module provides the basic functions of Lychee. - */ - -var lychee = { - title: document.title, - version: "", - versionCode: "", // not really needed anymore - - updatePath: "https://LycheeOrg.github.io/update.json", - updateURL: "https://github.com/LycheeOrg/Lychee/releases", - website: "https://LycheeOrg.github.io", - - publicMode: false, - viewMode: false, - full_photo: true, - downloadable: false, - share_button_visible: false, // enable only v4+ - api_V2: false, // enable api_V2 - sub_albums: false, // enable sub_albums features - admin: false, // enable admin mode (multi-user) - upload: false, // enable possibility to upload (multi-user) - lock: false, // locked user (multi-user) - username: null, - layout: "1", // 0: Use default, "square" layout. 1: Use Flickr-like "justified" layout. 2: Use Google-like "unjustified" layout - public_search: false, // display Search in publicMode - image_overlay: false, // display Overlay like in Lightroom - image_overlay_default: false, // display Overlay like in Lightroom by default - image_overlay_type: "exif", // current Overlay display type - image_overlay_type_default: "exif", // image overlay type default type - map_display: false, // display photo coordinates on map - map_display_public: false, // display photos of public album on map (user not logged in) - map_provider: "Wikimedia", // Provider of OSM Tiles - map_include_subalbums: false, // include photos of subalbums on map - location_decoding: false, // retrieve location name from GPS data - location_decoding_caching_type: "Harddisk", // caching mode for GPS data decoding - location_show: false, // show location name - location_show_public: false, // show location name for public albums - swipe_tolerance_x: 150, // tolerance for navigating when swiping images to the left and right on mobile - swipe_tolerance_y: 250, // tolerance for navigating when swiping images up and down - - landing_page_enabled: false, // is landing page enabled ? - delete_imported: false, - - nsfw_visible: true, - nsfw_visible_saved: true, - nsfw_blur: false, - nsfw_warning: false, - - // this is device specific config, in this case default is Desktop. - header_auto_hide: true, - active_focus_on_page_load: false, - enable_button_visibility: true, - enable_button_share: true, - enable_button_archive: true, - enable_button_move: true, - enable_button_trash: true, - enable_button_fullscreen: true, - enable_button_download: true, - enable_button_add: true, - enable_button_more: true, - enable_button_rotate: true, - enable_close_tab_on_esc: false, - enable_tabindex: false, - enable_contextmenu_header: true, - hide_content_during_imageview: false, - device_type: "desktop", - - checkForUpdates: "1", - update_json: 0, - update_available: false, - sortingPhotos: "", - sortingAlbums: "", - location: "", - - lang: "", - lang_available: {}, - - dropbox: false, - dropboxKey: "", - - content: $(".content"), - imageview: $("#imageview"), - footer: $("#footer"), - - locale: {}, - - nsfw_unlocked_albums: [] -}; - -lychee.diagnostics = function () { - if (lychee.api_V2) { - return "/Diagnostics"; - } else { - return "plugins/Diagnostics/"; - } -}; - -lychee.logs = function () { - if (lychee.api_V2) { - return "/Logs"; - } else { - return "plugins/Log/"; - } -}; - -lychee.aboutDialog = function () { - var msg = lychee.html(_templateObject49, lychee.version, lychee.updateURL, lychee.locale["UPDATE_AVAILABLE"], lychee.locale["ABOUT_SUBTITLE"], lychee.website, lychee.locale["ABOUT_DESCRIPTION"]); - - basicModal.show({ - body: msg, - buttons: { - cancel: { - title: lychee.locale["CLOSE"], - fn: basicModal.close - } - } - }); - - if (lychee.checkForUpdates === "1") lychee.getUpdate(); -}; - -lychee.init = function () { - lychee.adjustContentHeight(); - - api.post("Session::init", {}, function (data) { - lychee.api_V2 = data.api_V2 || false; - - if (data.status === 0) { - // No configuration - - lychee.setMode("public"); - - header.dom().hide(); - lychee.content.hide(); - $("body").append(build.no_content("cog")); - settings.createConfig(); - - return true; - } - - lychee.sub_albums = data.sub_albums || false; - lychee.update_json = data.update_json; - lychee.update_available = data.update_available; - lychee.landing_page_enable = data.config.landing_page_enable && data.config.landing_page_enable === "1" || false; - - if (lychee.api_V2) { - lychee.versionCode = data.config.version; - } else { - lychee.versionCode = data.config.version.slice(7, data.config.version.length); - } - if (lychee.versionCode !== "") { - var digits = lychee.versionCode.match(/.{1,2}/g); - lychee.version = parseInt(digits[0]).toString() + "." + parseInt(digits[1]).toString() + "." + parseInt(digits[2]).toString(); - } - - // we copy the locale that exists only. - // This ensure forward and backward compatibility. - // e.g. if the front localization is unfished in a language - // or if we need to change some locale string - for (var key in data.locale) { - lychee.locale[key] = data.locale[key]; - } - - if (!lychee.api_V2) { - // Apply translations to the header - header.applyTranslations(); - } - - var validatedSwipeToleranceX = data.config.swipe_tolerance_x && !isNaN(parseInt(data.config.swipe_tolerance_x)) && parseInt(data.config.swipe_tolerance_x) || 150; - var validatedSwipeToleranceY = data.config.swipe_tolerance_y && !isNaN(parseInt(data.config.swipe_tolerance_y)) && parseInt(data.config.swipe_tolerance_y) || 250; - - // Check status - // 0 = No configuration - // 1 = Logged out - // 2 = Logged in - if (data.status === 2) { - // Logged in - - lychee.sortingPhotos = data.config.sorting_Photos || data.config.sortingPhotos || ""; - lychee.sortingAlbums = data.config.sorting_Albums || data.config.sortingAlbums || ""; - lychee.dropboxKey = data.config.dropbox_key || data.config.dropboxKey || ""; - lychee.location = data.config.location || ""; - lychee.checkForUpdates = data.config.check_for_updates || data.config.checkForUpdates || "1"; - lychee.lang = data.config.lang || ""; - lychee.lang_available = data.config.lang_available || {}; - lychee.layout = data.config.layout || "1"; - lychee.public_search = data.config.public_search && data.config.public_search === "1" || false; - lychee.image_overlay_default = data.config.image_overlay && data.config.image_overlay === "1" || false; - lychee.image_overlay = lychee.image_overlay_default; - lychee.image_overlay_type = !data.config.image_overlay_type ? "exif" : data.config.image_overlay_type; - lychee.image_overlay_type_default = lychee.image_overlay_type; - lychee.map_display = data.config.map_display && data.config.map_display === "1" || false; - lychee.map_display_public = data.config.map_display_public && data.config.map_display_public === "1" || false; - lychee.map_provider = !data.config.map_provider ? "Wikimedia" : data.config.map_provider; - lychee.map_include_subalbums = data.config.map_include_subalbums && data.config.map_include_subalbums === "1" || false; - lychee.location_decoding = data.config.location_decoding && data.config.location_decoding === "1" || false; - lychee.location_decoding_caching_type = !data.config.location_decoding_caching_type ? "Harddisk" : data.config.location_decoding_caching_type; - lychee.location_show = data.config.location_show && data.config.location_show === "1" || false; - lychee.location_show_public = data.config.location_show_public && data.config.location_show_public === "1" || false; - lychee.swipe_tolerance_x = validatedSwipeToleranceX; - lychee.swipe_tolerance_y = validatedSwipeToleranceY; - - lychee.default_license = data.config.default_license || "none"; - lychee.css = data.config.css || ""; - lychee.full_photo = data.config.full_photo == null || data.config.full_photo === "1"; - lychee.downloadable = data.config.downloadable && data.config.downloadable === "1" || false; - lychee.share_button_visible = data.config.share_button_visible && data.config.share_button_visible === "1" || false; - lychee.delete_imported = data.config.delete_imported && data.config.delete_imported === "1"; - - lychee.nsfw_visible = data.config.nsfw_visible && data.config.nsfw_visible === "1" || false; - lychee.nsfw_blur = data.config.nsfw_blur && data.config.nsfw_blur === "1" || false; - lychee.nsfw_warning = data.config.nsfw_warning_admin && data.config.nsfw_warning_admin === "1" || false; - - lychee.header_auto_hide = data.config_device.header_auto_hide; - lychee.active_focus_on_page_load = data.config_device.active_focus_on_page_load; - lychee.enable_button_visibility = data.config_device.enable_button_visibility; - lychee.enable_button_share = data.config_device.enable_button_share; - lychee.enable_button_archive = data.config_device.enable_button_archive; - lychee.enable_button_move = data.config_device.enable_button_move; - lychee.enable_button_trash = data.config_device.enable_button_trash; - lychee.enable_button_fullscreen = data.config_device.enable_button_fullscreen; - lychee.enable_button_download = data.config_device.enable_button_download; - lychee.enable_button_add = data.config_device.enable_button_add; - lychee.enable_button_more = data.config_device.enable_button_more; - lychee.enable_button_rotate = data.config_device.enable_button_rotate; - lychee.enable_close_tab_on_esc = data.config_device.enable_close_tab_on_esc; - lychee.enable_tabindex = data.config_device.enable_tabindex; - lychee.enable_contextmenu_header = data.config_device.enable_contextmenu_header; - lychee.hide_content_during_imgview = data.config_device.hide_content_during_imgview; - lychee.device_type = data.config_device.device_type || "desktop"; // we set default as Desktop - - lychee.editor_enabled = data.config.editor_enabled && data.config.editor_enabled === "1" || false; - - lychee.upload = !lychee.api_V2; - lychee.admin = !lychee.api_V2; - lychee.nsfw_visible_saved = lychee.nsfw_visible; - - // leftMenu - leftMenu.build(); - leftMenu.bind(); - - if (lychee.api_V2) { - lychee.upload = data.admin || data.upload; - lychee.admin = data.admin; - lychee.lock = data.lock; - lychee.username = data.username; - } - lychee.setMode("logged_in"); - - // Show dialog when there is no username and password - if (data.config.login === false) settings.createLogin(); - } else if (data.status === 1) { - // Logged out - - // TODO remove sortingPhoto once the v4 is out - lychee.sortingPhotos = data.config.sorting_Photos || data.config.sortingPhotos || ""; - lychee.sortingAlbums = data.config.sorting_Albums || data.config.sortingAlbums || ""; - lychee.checkForUpdates = data.config.check_for_updates || data.config.checkForUpdates || "1"; - lychee.layout = data.config.layout || "1"; - lychee.public_search = data.config.public_search && data.config.public_search === "1" || false; - lychee.image_overlay = data.config.image_overlay && data.config.image_overlay === "1" || false; - lychee.image_overlay_type = !data.config.image_overlay_type ? "exif" : data.config.image_overlay_type; - lychee.image_overlay_type_default = lychee.image_overlay_type; - lychee.map_display = data.config.map_display && data.config.map_display === "1" || false; - lychee.map_display_public = data.config.map_display_public && data.config.map_display_public === "1" || false; - lychee.map_provider = !data.config.map_provider ? "Wikimedia" : data.config.map_provider; - lychee.map_include_subalbums = data.config.map_include_subalbums && data.config.map_include_subalbums === "1" || false; - lychee.location_show = data.config.location_show && data.config.location_show === "1" || false; - lychee.location_show_public = data.config.location_show_public && data.config.location_show_public === "1" || false; - lychee.swipe_tolerance_x = validatedSwipeToleranceX; - lychee.swipe_tolerance_y = validatedSwipeToleranceY; - - lychee.nsfw_visible = data.config.nsfw_visible && data.config.nsfw_visible === "1" || false; - lychee.nsfw_blur = data.config.nsfw_blur && data.config.nsfw_blur === "1" || false; - lychee.nsfw_warning = data.config.nsfw_warning && data.config.nsfw_warning === "1" || false; - - lychee.header_auto_hide = data.config_device.header_auto_hide; - lychee.active_focus_on_page_load = data.config_device.active_focus_on_page_load; - lychee.enable_button_visibility = data.config_device.enable_button_visibility; - lychee.enable_button_share = data.config_device.enable_button_share; - lychee.enable_button_archive = data.config_device.enable_button_archive; - lychee.enable_button_move = data.config_device.enable_button_move; - lychee.enable_button_trash = data.config_device.enable_button_trash; - lychee.enable_button_fullscreen = data.config_device.enable_button_fullscreen; - lychee.enable_button_download = data.config_device.enable_button_download; - lychee.enable_button_add = data.config_device.enable_button_add; - lychee.enable_button_more = data.config_device.enable_button_more; - lychee.enable_button_rotate = data.config_device.enable_button_rotate; - lychee.enable_close_tab_on_esc = data.config_device.enable_close_tab_on_esc; - lychee.enable_tabindex = data.config_device.enable_tabindex; - lychee.enable_contextmenu_header = data.config_device.enable_contextmenu_header; - lychee.hide_content_during_imgview = data.config_device.hide_content_during_imgview; - lychee.device_type = data.config_device.device_type || "desktop"; // we set default as Desktop - lychee.nsfw_visible_saved = lychee.nsfw_visible; - - // console.log(lychee.full_photo); - lychee.setMode("public"); - } else { - // should not happen. - } - - $(window).bind("popstate", lychee.load); - lychee.load(); - }); -}; - -lychee.login = function (data) { - var username = data.username; - var password = data.password; - - var params = { - username: username, - password: password - }; - - api.post("Session::login", params, function (_data) { - if (_data === true) { - window.location.reload(); - } else { - // Show error and reactive button - basicModal.error("password"); - } - }); -}; - -lychee.loginDialog = function () { - // Make background make unfocusable - tabindex.makeUnfocusable(header.dom()); - tabindex.makeUnfocusable(lychee.content); - tabindex.makeUnfocusable(lychee.imageview); - - var msg = lychee.html(_templateObject50, build.iconic("key"), lychee.locale["USERNAME"], tabindex.get_next_tab_index(), lychee.locale["PASSWORD"], tabindex.get_next_tab_index(), lychee.version, lychee.updateURL, lychee.locale["UPDATE_AVAILABLE"]); - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["SIGN_IN"], - fn: lychee.login, - attributes: [["data-tabindex", tabindex.get_next_tab_index()]] - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close, - attributes: [["data-tabindex", tabindex.get_next_tab_index()]] - } - } - }); - $("#signInKeyLess").on("click", u2f.login); - - if (lychee.checkForUpdates === "1") lychee.getUpdate(); - - tabindex.makeFocusable(basicModal.dom()); -}; - -lychee.logout = function () { - api.post("Session::logout", {}, function () { - window.location.reload(); - }); -}; - -lychee.goto = function () { - var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - var autoplay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - url = "#" + url; - - history.pushState(null, null, url); - lychee.load(autoplay); -}; - -lychee.gotoMap = function () { - var albumID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - var autoplay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - // If map functionality is disabled -> go to album - if (!lychee.map_display) { - loadingBar.show("error", lychee.locale["ERROR_MAP_DEACTIVATED"]); - return; - } - lychee.goto("map/" + albumID, autoplay); -}; - -lychee.load = function () { - var autoplay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - - var albumID = ""; - var photoID = ""; - var hash = document.location.hash.replace("#", "").split("/"); - - contextMenu.close(); - multiselect.close(); - tabindex.reset(); - - if (hash[0] != null) albumID = hash[0]; - if (hash[1] != null) photoID = hash[1]; - - if (albumID && photoID) { - if (albumID == "map") { - // If map functionality is disabled -> do nothing - if (!lychee.map_display) { - loadingBar.show("error", lychee.locale["ERROR_MAP_DEACTIVATED"]); - return; - } - $(".no_content").remove(); - // show map - // albumID has been stored in photoID due to URL format #map/albumID - albumID = photoID; - - // Trash data - _photo.json = null; - - // Show Album -> it's below the map - if (visible.photo()) view.photo.hide(); - if (visible.sidebar()) _sidebar.toggle(); - if (album.json && albumID === album.json.id) { - view.album.title(); - } - mapview.open(albumID); - lychee.footer_hide(); - } else if (albumID == "search") { - // Search has been triggered - var search_string = decodeURIComponent(photoID); - - if (search_string.trim() === "") { - // do nothing on "only space" search strings - return; - } - // If public search is diabled -> do nothing - if (lychee.publicMode === true && !lychee.public_search) { - loadingBar.show("error", lychee.locale["ERROR_SEARCH_DEACTIVATED"]); - return; - } - - header.dom(".header__search").val(search_string); - search.find(search_string); - - lychee.footer_show(); - } else { - $(".no_content").remove(); - // Show photo - - // Trash data - _photo.json = null; - - // Show Photo - if (lychee.content.html() === "" || album.json == null || header.dom(".header__search").length && header.dom(".header__search").val().length !== 0) { - lychee.content.hide(); - album.load(albumID, true); - } - _photo.load(photoID, albumID, autoplay); - - // Make imageview focussable - tabindex.makeFocusable(lychee.imageview); - - // Make thumbnails unfocusable and store which element had focus - tabindex.makeUnfocusable(lychee.content, true); - - // hide contentview if requested - if (lychee.hide_content_during_imgview) lychee.content.hide(); - - lychee.footer_hide(); - } - } else if (albumID) { - if (albumID == "map") { - $(".no_content").remove(); - // Show map of all albums - // If map functionality is disabled -> do nothing - if (!lychee.map_display) { - loadingBar.show("error", lychee.locale["ERROR_MAP_DEACTIVATED"]); - return; - } - - // Trash data - _photo.json = null; - - // Show Album -> it's below the map - if (visible.photo()) view.photo.hide(); - if (visible.sidebar()) _sidebar.toggle(); - mapview.open(); - lychee.footer_hide(); - } else if (albumID == "search") { - // search string is empty -> do nothing - } else { - $(".no_content").remove(); - // Trash data - _photo.json = null; - - // Show Album - if (visible.photo()) { - view.photo.hide(); - tabindex.makeUnfocusable(lychee.imageview); - } - if (visible.mapview()) mapview.close(); - if (visible.sidebar() && album.isSmartID(albumID)) _sidebar.toggle(); - $("#sensitive_warning").hide(); - if (album.json && albumID === album.json.id) { - view.album.title(); - lychee.content.show(); - tabindex.makeFocusable(lychee.content, true); - } else { - album.load(albumID); - } - lychee.footer_show(); - } - } else { - $(".no_content").remove(); - // Trash albums.json when filled with search results - if (search.hash != null) { - albums.json = null; - search.hash = null; - } - - // Trash data - album.json = null; - _photo.json = null; - - // Hide sidebar - if (visible.sidebar()) _sidebar.toggle(); - - // Show Albums - if (visible.photo()) { - view.photo.hide(); - tabindex.makeUnfocusable(lychee.imageview); - } - if (visible.mapview()) mapview.close(); - $("#sensitive_warning").hide(); - lychee.content.show(); - lychee.footer_show(); - albums.load(); - } -}; - -lychee.getUpdate = function () { - // console.log(lychee.update_available); - // console.log(lychee.update_json); - - if (lychee.update_json !== 0) { - if (lychee.update_available) { - $(".version span").show(); - } - } else { - var success = function success(data) { - if (data.lychee.version > parseInt(lychee.versionCode)) $(".version span").show(); - }; - - $.ajax({ - url: lychee.updatePath, - success: success - }); - } -}; - -lychee.setTitle = function (title, editable) { - if (lychee.title === title) { - document.title = lychee.title + " - " + lychee.locale["ALBUMS"]; - } else { - document.title = lychee.title + " - " + title; - } - - header.setEditable(editable); - header.setTitle(title); -}; - -lychee.setMode = function (mode) { - if (lychee.lock) { - $("#button_settings_open").remove(); - } - if (!lychee.upload) { - $("#button_sharing").remove(); - - $(document).off("click", ".header__title--editable").off("touchend", ".header__title--editable").off("contextmenu", ".photo").off("contextmenu", ".album").off("drop"); - - Mousetrap.unbind(["u"]).unbind(["s"]).unbind(["n"]).unbind(["r"]).unbind(["d"]).unbind(["t"]).unbind(["command+backspace", "ctrl+backspace"]).unbind(["command+a", "ctrl+a"]); - } - if (!lychee.admin) { - $("#button_users, #button_logs, #button_diagnostics").remove(); - } - - if (mode === "logged_in") { - // we are logged in, we do not need that short cut anymore. :) - Mousetrap.unbind(["l"]).unbind(["k"]); - - // The code searches by class, so remove the other instance. - $(".header__search, .header__clear", ".header__toolbar--public").remove(); - - if (!lychee.editor_enabled) { - $("#button_rotate_cwise").remove(); - $("#button_rotate_ccwise").remove(); - } - return; - } else { - $(".header__search, .header__clear", ".header__toolbar--albums").remove(); - $("#button_rotate_cwise").remove(); - $("#button_rotate_ccwise").remove(); - } - - $("#button_settings, .header__divider, .leftMenu").remove(); - - if (mode === "public") { - lychee.publicMode = true; - } else if (mode === "view") { - Mousetrap.unbind(["esc", "command+up"]); - - $("#button_back, a#next, a#previous").remove(); - $(".no_content").remove(); - - lychee.publicMode = true; - lychee.viewMode = true; - } - - // just mak - header.bind_back(); -}; - -lychee.animate = function (obj, animation) { - var animations = [["fadeIn", "fadeOut"], ["contentZoomIn", "contentZoomOut"]]; - - if (!obj.jQuery) obj = $(obj); - - for (var i = 0; i < animations.length; i++) { - for (var x = 0; x < animations[i].length; x++) { - if (animations[i][x] == animation) { - obj.removeClass(animations[i][0] + " " + animations[i][1]).addClass(animation); - return true; - } - } - } - - return false; -}; - -lychee.retinize = function () { - var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - var extention = path.split(".").pop(); - var isPhoto = extention !== "svg"; - - if (isPhoto === true) { - path = path.replace(/\.[^/.]+$/, ""); - path = path + "@2x" + "." + extention; - } - - return { - path: path, - isPhoto: isPhoto - }; -}; - -lychee.loadDropbox = function (callback) { - if (lychee.dropbox === false && lychee.dropboxKey != null && lychee.dropboxKey !== "") { - loadingBar.show(); - - var g = document.createElement("script"); - var s = document.getElementsByTagName("script")[0]; - - g.src = "https://www.dropbox.com/static/api/1/dropins.js"; - g.id = "dropboxjs"; - g.type = "text/javascript"; - g.async = "true"; - g.setAttribute("data-app-key", lychee.dropboxKey); - g.onload = g.onreadystatechange = function () { - var rs = this.readyState; - if (rs && rs !== "complete" && rs !== "loaded") return; - lychee.dropbox = true; - loadingBar.hide(); - callback(); - }; - s.parentNode.insertBefore(g, s); - } else if (lychee.dropbox === true && lychee.dropboxKey != null && lychee.dropboxKey !== "") { - callback(); - } else { - settings.setDropboxKey(callback); - } -}; - -lychee.getEventName = function () { - if (lychee.device_type === "mobile") { - return "touchend"; - } - return "click"; -}; - -lychee.escapeHTML = function () { - var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - // Ensure that html is a string - html += ""; - - // Escape all critical characters - html = html.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/`/g, "`"); - - return html; -}; - -lychee.html = function (literalSections) { - // Use raw literal sections: we don’t want - // backslashes (\n etc.) to be interpreted - var raw = literalSections.raw; - var result = ""; - - for (var _len = arguments.length, substs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - substs[_key - 1] = arguments[_key]; - } - - substs.forEach(function (subst, i) { - // Retrieve the literal section preceding - // the current substitution - var lit = raw[i]; - - // If the substitution is preceded by a dollar sign, - // we escape special characters in it - if (lit.slice(-1) === "$") { - subst = lychee.escapeHTML(subst); - lit = lit.slice(0, -1); - } - - result += lit; - result += subst; - }); - - // Take care of last literal section - // (Never fails, because an empty template string - // produces one literal section, an empty string) - result += raw[raw.length - 1]; - - return result; -}; - -lychee.error = function (errorThrown) { - var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - - loadingBar.show("error", errorThrown); - - if (errorThrown === "Session timed out.") { - setTimeout(function () { - lychee.goto(); - window.location.reload(); - }, 3000); - } else { - console.error({ - description: errorThrown, - params: params, - response: data - }); - } -}; - -lychee.fullscreenEnter = function () { - var elem = document.documentElement; - if (elem.requestFullscreen) { - elem.requestFullscreen(); - } else if (elem.mozRequestFullScreen) { - /* Firefox */ - elem.mozRequestFullScreen(); - } else if (elem.webkitRequestFullscreen) { - /* Chrome, Safari and Opera */ - elem.webkitRequestFullscreen(); - } else if (elem.msRequestFullscreen) { - /* IE/Edge */ - elem.msRequestFullscreen(); - } -}; - -lychee.fullscreenExit = function () { - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.mozCancelFullScreen) { - /* Firefox */ - document.mozCancelFullScreen(); - } else if (document.webkitExitFullscreen) { - /* Chrome, Safari and Opera */ - document.webkitExitFullscreen(); - } else if (document.msExitFullscreen) { - /* IE/Edge */ - document.msExitFullscreen(); - } -}; - -lychee.fullscreenToggle = function () { - if (lychee.fullscreenStatus()) { - lychee.fullscreenExit(); - } else { - lychee.fullscreenEnter(); - } -}; - -lychee.fullscreenStatus = function () { - var elem = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; - return elem ? true : false; -}; - -lychee.fullscreenUpdate = function () { - if (lychee.fullscreenStatus()) { - $("#button_fs_album_enter,#button_fs_enter").hide(); - $("#button_fs_album_exit,#button_fs_exit").show(); - } else { - $("#button_fs_album_enter,#button_fs_enter").show(); - $("#button_fs_album_exit,#button_fs_exit").hide(); - } -}; - -lychee.footer_show = function () { - setTimeout(function () { - lychee.footer.removeClass("hide_footer"); - }, 200); -}; - -lychee.footer_hide = function () { - lychee.footer.addClass("hide_footer"); -}; - -// Because the height of the footer can vary, we need to set some -// dimensions dynamically, at startup. -lychee.adjustContentHeight = function () { - if (lychee.footer.length > 0) { - lychee.content.css("min-height", "calc(100vh - " + lychee.content.css("padding-top") + " - " + lychee.content.css("padding-bottom") + " - " + lychee.footer.outerHeight() + "px)"); - $("#container").css("padding-bottom", lychee.footer.outerHeight()); - } else { - lychee.content.css("min-height", "calc(100vh - " + lychee.content.css("padding-top") + " - " + lychee.content.css("padding-bottom") + ")"); - } -}; - -lychee.getBaseUrl = function () { - if (location.href.includes("index.html")) { - return location.href.replace("index.html" + location.hash, ""); - } else if (location.href.includes("gallery#")) { - return location.href.replace("gallery" + location.hash, ""); - } else { - return location.href.replace(location.hash, ""); - } -}; - -// Copied from https://github.com/feross/clipboard-copy/blob/9eba597c774feed48301fef689099599d612387c/index.js -lychee.clipboardCopy = function (text) { - // Use the Async Clipboard API when available. Requires a secure browsing - // context (i.e. HTTPS) - if (navigator.clipboard) { - return navigator.clipboard.writeText(text).catch(function (err) { - throw err !== undefined ? err : new DOMException("The request is not allowed", "NotAllowedError"); - }); - } - - // ...Otherwise, use document.execCommand() fallback - - // Put the text to copy into a - var span = document.createElement("span"); - span.textContent = text; - - // Preserve consecutive spaces and newlines - span.style.whiteSpace = "pre"; - - // Add the to the page - document.body.appendChild(span); - - // Make a selection object representing the range of text selected by the user - var selection = window.getSelection(); - var range = window.document.createRange(); - selection.removeAllRanges(); - range.selectNode(span); - selection.addRange(range); - - // Copy text to the clipboard - var success = false; - - try { - success = window.document.execCommand("copy"); - } catch (err) { - console.log("error", err); - } - - // Cleanup - selection.removeAllRanges(); - window.document.body.removeChild(span); - - return success; - // ? Promise.resolve() - // : Promise.reject(new DOMException('The request is not allowed', 'NotAllowedError')) -}; - -lychee.locale = { - USERNAME: "username", - PASSWORD: "password", - ENTER: "Enter", - CANCEL: "Cancel", - SIGN_IN: "Sign In", - CLOSE: "Close", - - SETTINGS: "Settings", - USERS: "Users", - U2F: "U2F", - SHARING: "Sharing", - CHANGE_LOGIN: "Change Login", - CHANGE_SORTING: "Change Sorting", - SET_DROPBOX: "Set Dropbox", - ABOUT_LYCHEE: "About Lychee", - DIAGNOSTICS: "Diagnostics", - DIAGNOSTICS_GET_SIZE: "Request space usage", - LOGS: "Show Logs", - CLEAN_LOGS: "Clean Noise", - SIGN_OUT: "Sign Out", - UPDATE_AVAILABLE: "Update available!", - MIGRATION_AVAILABLE: "Migration available!", - CHECK_FOR_UPDATE: "Check for updates", - DEFAULT_LICENSE: "Default License for new uploads:", - SET_LICENSE: "Set License", - SET_OVERLAY_TYPE: "Set Overlay", - SET_MAP_PROVIDER: "Set OpenStreetMap tiles provider", - SAVE_RISK: "Save my modifications, I accept the Risk!", - MORE: "More", - DEFAULT: "Default", - - SMART_ALBUMS: "Smart albums", - SHARED_ALBUMS: "Shared albums", - ALBUMS: "Albums", - PHOTOS: "Pictures", - SEARCH_RESULTS: "Search results", - - RENAME: "Rename", - RENAME_ALL: "Rename All", - MERGE: "Merge", - MERGE_ALL: "Merge All", - MAKE_PUBLIC: "Make Public", - SHARE_ALBUM: "Share Album", - SHARE_PHOTO: "Share Photo", - SHARE_WITH: "Share with...", - DOWNLOAD_ALBUM: "Download Album", - ABOUT_ALBUM: "About Album", - DELETE_ALBUM: "Delete Album", - FULLSCREEN_ENTER: "Enter Fullscreen", - FULLSCREEN_EXIT: "Exit Fullscreen", - - DELETE_ALBUM_QUESTION: "Delete Album and Photos", - KEEP_ALBUM: "Keep Album", - DELETE_ALBUM_CONFIRMATION_1: "Are you sure you want to delete the album", - DELETE_ALBUM_CONFIRMATION_2: "and all of the photos it contains? This action can't be undone!", - - DELETE_ALBUMS_QUESTION: "Delete Albums and Photos", - KEEP_ALBUMS: "Keep Albums", - DELETE_ALBUMS_CONFIRMATION_1: "Are you sure you want to delete all", - DELETE_ALBUMS_CONFIRMATION_2: "selected albums and all of the photos they contain? This action can't be undone!", - - DELETE_UNSORTED_CONFIRM: "Are you sure you want to delete all photos from 'Unsorted'?
This action can't be undone!", - CLEAR_UNSORTED: "Clear Unsorted", - KEEP_UNSORTED: "Keep Unsorted", - - EDIT_SHARING: "Edit Sharing", - MAKE_PRIVATE: "Make Private", - - CLOSE_ALBUM: "Close Album", - CLOSE_PHOTO: "Close Photo", - CLOSE_MAP: "Close Map", - - ADD: "Add", - MOVE: "Move", - MOVE_ALL: "Move All", - DUPLICATE: "Duplicate", - DUPLICATE_ALL: "Duplicate All", - COPY_TO: "Copy to...", - COPY_ALL_TO: "Copy All to...", - DELETE: "Delete", - DELETE_ALL: "Delete All", - DOWNLOAD: "Download", - DOWNLOAD_MEDIUM: "Download medium size", - DOWNLOAD_SMALL: "Download small size", - UPLOAD_PHOTO: "Upload Photo", - IMPORT_LINK: "Import from Link", - IMPORT_DROPBOX: "Import from Dropbox", - IMPORT_SERVER: "Import from Server", - NEW_ALBUM: "New Album", - NEW_TAG_ALBUM: "New Tag Album", - - TITLE_NEW_ALBUM: "Enter a title for the new album:", - UNTITLED: "Untilted", - UNSORTED: "Unsorted", - STARRED: "Starred", - RECENT: "Recent", - PUBLIC: "Public", - NUM_PHOTOS: "Photos", - - CREATE_ALBUM: "Create Album", - CREATE_TAG_ALBUM: "Create Tag Album", - - STAR_PHOTO: "Star Photo", - STAR: "Star", - STAR_ALL: "Star All", - TAGS: "Tags", - TAGS_ALL: "Tags All", - UNSTAR_PHOTO: "Unstar Photo", - - FULL_PHOTO: "Full Photo", - ABOUT_PHOTO: "About Photo", - DISPLAY_FULL_MAP: "Map", - DIRECT_LINK: "Direct Link", - DIRECT_LINKS: "Direct Links", - - ALBUM_ABOUT: "About", - ALBUM_BASICS: "Basics", - ALBUM_TITLE: "Title", - ALBUM_NEW_TITLE: "Enter a new title for this album:", - ALBUMS_NEW_TITLE_1: "Enter a title for all", - ALBUMS_NEW_TITLE_2: "selected albums:", - ALBUM_SET_TITLE: "Set Title", - ALBUM_DESCRIPTION: "Description", - ALBUM_SHOW_TAGS: "Tags to show", - ALBUM_NEW_DESCRIPTION: "Enter a new description for this album:", - ALBUM_SET_DESCRIPTION: "Set Description", - ALBUM_NEW_SHOWTAGS: "Enter tags of photos that will be visible in this album:", - ALBUM_SET_SHOWTAGS: "Set tags to show", - ALBUM_ALBUM: "Album", - ALBUM_CREATED: "Created", - ALBUM_IMAGES: "Images", - ALBUM_VIDEOS: "Videos", - ALBUM_SHARING: "Share", - ALBUM_OWNER: "Owner", - ALBUM_SHR_YES: "YES", - ALBUM_SHR_NO: "No", - ALBUM_PUBLIC: "Public", - ALBUM_PUBLIC_EXPL: "Album can be viewed by others, subject to the restrictions below.", - ALBUM_FULL: "Full size (v4 only)", - ALBUM_FULL_EXPL: "Full size pictures are available", - ALBUM_HIDDEN: "Hidden", - ALBUM_HIDDEN_EXPL: "Only people with the direct link can view this album.", - ALBUM_MARK_NSFW: "Mark album as sensitive", - ALBUM_UNMARK_NSFW: "Unmark album as sensitive", - ALBUM_NSFW: "Sensitive", - ALBUM_NSFW_EXPL: "Album contains sensitive content.", - ALBUM_DOWNLOADABLE: "Downloadable", - ALBUM_DOWNLOADABLE_EXPL: "Visitors of your Lychee can download this album.", - ALBUM_SHARE_BUTTON_VISIBLE: "Share button is visible", - ALBUM_SHARE_BUTTON_VISIBLE_EXPL: "Display social media sharing links.", - ALBUM_PASSWORD: "Password", - ALBUM_PASSWORD_PROT: "Password protected", - ALBUM_PASSWORD_PROT_EXPL: "Album only accessible with a valid password.", - ALBUM_PASSWORD_REQUIRED: "This album is protected by a password. Enter the password below to view the photos of this album:", - ALBUM_MERGE_1: "Are you sure you want to merge the album", - ALBUM_MERGE_2: "into the album", - ALBUMS_MERGE: "Are you sure you want to merge all selected albums into the album", - MERGE_ALBUM: "Merge Albums", - DONT_MERGE: "Don't Merge", - ALBUM_MOVE_1: "Are you sure you want to move the album", - ALBUM_MOVE_2: "into the album", - ALBUMS_MOVE: "Are you sure you want to move all selected albums into the album", - MOVE_ALBUMS: "Move Albums", - NOT_MOVE_ALBUMS: "Don't Move", - ROOT: "Root", - ALBUM_REUSE: "Reuse", - ALBUM_LICENSE: "License", - ALBUM_SET_LICENSE: "Set License", - ALBUM_LICENSE_HELP: "Need help choosing?", - ALBUM_LICENSE_NONE: "None", - ALBUM_RESERVED: "All Rights Reserved", - ALBUM_SET_ORDER: "Set Order", - ALBUM_ORDERING: "Order by", - - PHOTO_ABOUT: "About", - PHOTO_BASICS: "Basics", - PHOTO_TITLE: "Title", - PHOTO_NEW_TITLE: "Enter a new title for this photo:", - PHOTO_SET_TITLE: "Set Title", - PHOTO_UPLOADED: "Uploaded", - PHOTO_DESCRIPTION: "Description", - PHOTO_NEW_DESCRIPTION: "Enter a new description for this photo:", - PHOTO_SET_DESCRIPTION: "Set Description", - PHOTO_NEW_LICENSE: "Add a License", - PHOTO_SET_LICENSE: "Set License", - PHOTO_REUSE: "Reuse", - PHOTO_LICENSE: "License", - PHOTO_LICENSE_HELP: "Need help choosing?", - PHOTO_LICENSE_NONE: "None", - PHOTO_RESERVED: "All Rights Reserved", - PHOTO_IMAGE: "Image", - PHOTO_VIDEO: "Video", - PHOTO_SIZE: "Size", - PHOTO_FORMAT: "Format", - PHOTO_RESOLUTION: "Resolution", - PHOTO_DURATION: "Duration", - PHOTO_FPS: "Frame rate", - PHOTO_TAGS: "Tags", - PHOTO_NOTAGS: "No Tags", - PHOTO_NEW_TAGS: "Enter your tags for this photo. You can add multiple tags by separating them with a comma:", - PHOTO_NEW_TAGS_1: "Enter your tags for all", - PHOTO_NEW_TAGS_2: "selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma:", - PHOTO_SET_TAGS: "Set Tags", - PHOTO_CAMERA: "Camera", - PHOTO_CAPTURED: "Captured", - PHOTO_MAKE: "Make", - PHOTO_TYPE: "Type/Model", - PHOTO_LENS: "Lens", - PHOTO_SHUTTER: "Shutter Speed", - PHOTO_APERTURE: "Aperture", - PHOTO_FOCAL: "Focal Length", - PHOTO_ISO: "ISO", - PHOTO_SHARING: "Sharing", - PHOTO_SHR_PLUBLIC: "Public", - PHOTO_SHR_ALB: "Yes (Album)", - PHOTO_SHR_PHT: "Yes (Photo)", - PHOTO_SHR_NO: "No", - PHOTO_DELETE: "Delete Photo", - PHOTO_KEEP: "Keep Photo", - PHOTO_DELETE_1: "Are you sure you want to delete the photo", - PHOTO_DELETE_2: "? This action can't be undone!", - PHOTO_DELETE_ALL_1: "Are you sure you want to delete all", - PHOTO_DELETE_ALL_2: "selected photo? This action can't be undone!", - PHOTOS_NEW_TITLE_1: "Enter a title for all", - PHOTOS_NEW_TITLE_2: "selected photos:", - PHOTO_MAKE_PRIVATE_ALBUM: "This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.", - PHOTO_SHOW_ALBUM: "Show Album", - PHOTO_PUBLIC: "Public", - PHOTO_PUBLIC_EXPL: "Photo can be viewed by others, subject to the restrictions below.", - PHOTO_FULL: "Original", - PHOTO_FULL_EXPL: "Full-resolution picture is available.", - PHOTO_HIDDEN: "Hidden", - PHOTO_HIDDEN_EXPL: "Only people with the direct link can view this photo.", - PHOTO_DOWNLOADABLE: "Downloadable", - PHOTO_DOWNLOADABLE_EXPL: "Visitors of your gallery can download this photo.", - PHOTO_SHARE_BUTTON_VISIBLE: "Share button is visible", - PHOTO_SHARE_BUTTON_VISIBLE_EXPL: "Display social media sharing links.", - PHOTO_PASSWORD_PROT: "Password protected", - PHOTO_PASSWORD_PROT_EXPL: "Photo only accessible with a valid password.", - PHOTO_EDIT_SHARING_TEXT: "The sharing properties of this photo will be changed to the following:", - PHOTO_NO_EDIT_SHARING_TEXT: "Because this photo is located in a public album, it inherits that album's visibility settings. Its current visibility is shown below for informational purposes only.", - PHOTO_EDIT_GLOBAL_SHARING_TEXT: "The visibility of this photo can be fine-tuned using global Lychee settings. Its current visibility is shown below for informational purposes only.", - PHOTO_SHARING_CONFIRM: "Save", - PHOTO_LOCATION: "Location", - PHOTO_LATITUDE: "Latitude", - PHOTO_LONGITUDE: "Longitude", - PHOTO_ALTITUDE: "Altitude", - PHOTO_IMGDIRECTION: "Direction", - - LOADING: "Loading", - ERROR: "Error", - ERROR_TEXT: "Whoops, it looks like something went wrong. Please reload the site and try again!", - ERROR_DB_1: "Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.", - ERROR_DB_2: "Unable to create the database. Double-check your host, username and password and ensure that the specified user has the rights to modify and add content to the database.", - ERROR_CONFIG_FILE: "Unable to save this configuration. Permission denied in 'data/'. Please set the read, write and execute rights for others in 'data/' and 'uploads/'. Take a look at the readme for more information.", - ERROR_UNKNOWN: "Something unexpected happened. Please try again and check your installation and server. Take a look at the readme for more information.", - ERROR_LOGIN: "Unable to save login. Please try again with another username and password!", - ERROR_MAP_DEACTIVATED: "Map functionality has been deactivated under settings.", - ERROR_SEARCH_DEACTIVATED: "Search functionality has been deactivated under settings.", - SUCCESS: "OK", - RETRY: "Retry", - - SETTINGS_WARNING: "Changing these advanced settings can be harmful to the stability, security and performance of this application. You should only modify them if you are sure of what you are doing.", - SETTINGS_SUCCESS_LOGIN: "Login Info updated.", - SETTINGS_SUCCESS_SORT: "Sorting order updated.", - SETTINGS_SUCCESS_DROPBOX: "Dropbox Key updated.", - SETTINGS_SUCCESS_LANG: "Language updated", - SETTINGS_SUCCESS_LAYOUT: "Layout updated", - SETTINGS_SUCCESS_IMAGE_OVERLAY: "EXIF Overlay setting updated", - SETTINGS_SUCCESS_PUBLIC_SEARCH: "Public search updated", - SETTINGS_SUCCESS_LICENSE: "Default license updated", - SETTINGS_SUCCESS_MAP_DISPLAY: "Map display settings updated", - SETTINGS_SUCCESS_MAP_DISPLAY_PUBLIC: "Map display settings for public albums updated", - SETTINGS_SUCCESS_MAP_PROVIDER: "Map provider settings updated", - - U2F_NOT_SUPPORTED: "U2F not supported. Sorry.", - U2F_NOT_SECURE: "Environment not secured. U2F not available.", - U2F_REGISTER_KEY: "Register new device.", - U2F_REGISTRATION_SUCCESS: "Registration successful!", - U2F_AUTHENTIFICATION_SUCCESS: "Authentication successful!", - U2F_CREDENTIALS: "Credentials", - U2F_CREDENTIALS_DELETED: "Credentials deleted!", - - SETTINGS_SUCCESS_CSS: "CSS updated", - SETTINGS_SUCCESS_UPDATE: "Settings updated with success", - - DB_INFO_TITLE: "Enter your database connection details below:", - DB_INFO_HOST: "Database Host (optional)", - DB_INFO_USER: "Database Username", - DB_INFO_PASSWORD: "Database Password", - DB_INFO_TEXT: "Lychee will create its own database. If required, you can enter the name of an existing database instead:", - DB_NAME: "Database Name (optional)", - DB_PREFIX: "Table prefix (optional)", - DB_CONNECT: "Connect", - - LOGIN_TITLE: "Enter a username and password for your installation:", - LOGIN_USERNAME: "New Username", - LOGIN_PASSWORD: "New Password", - LOGIN_PASSWORD_CONFIRM: "Confirm Password", - LOGIN_CREATE: "Create Login", - - PASSWORD_TITLE: "Enter your current username and password:", - USERNAME_CURRENT: "Current Username", - PASSWORD_CURRENT: "Current Password", - PASSWORD_TEXT: "Your username and password will be changed to the following:", - PASSWORD_CHANGE: "Change Login", - - EDIT_SHARING_TITLE: "Edit Sharing", - EDIT_SHARING_TEXT: "The sharing-properties of this album will be changed to the following:", - SHARE_ALBUM_TEXT: "This album will be shared with the following properties:", - ALBUM_SHARING_CONFIRM: "Save", - - SORT_ALBUM_BY_1: "Sort albums by", - SORT_ALBUM_BY_2: "in an", - SORT_ALBUM_BY_3: "order.", - - SORT_ALBUM_SELECT_1: "Creation Time", - SORT_ALBUM_SELECT_2: "Title", - SORT_ALBUM_SELECT_3: "Description", - SORT_ALBUM_SELECT_4: "Public", - SORT_ALBUM_SELECT_5: "Latest Take Date", - SORT_ALBUM_SELECT_6: "Oldest Take Date", - - SORT_PHOTO_BY_1: "Sort photos by", - SORT_PHOTO_BY_2: "in an", - SORT_PHOTO_BY_3: "order.", - - SORT_PHOTO_SELECT_1: "Upload Time", - SORT_PHOTO_SELECT_2: "Take Date", - SORT_PHOTO_SELECT_3: "Title", - SORT_PHOTO_SELECT_4: "Description", - SORT_PHOTO_SELECT_5: "Public", - SORT_PHOTO_SELECT_6: "Star", - SORT_PHOTO_SELECT_7: "Photo Format", - - SORT_ASCENDING: "Ascending", - SORT_DESCENDING: "Descending", - SORT_CHANGE: "Change Sorting", - - DROPBOX_TITLE: "Set Dropbox Key", - DROPBOX_TEXT: "In order to import photos from your Dropbox, you need a valid drop-ins app key from their website. Generate yourself a personal key and enter it below:", - - LANG_TEXT: "Change Lychee language for:", - LANG_TITLE: "Change Language", - - CSS_TEXT: "Personalize your CSS:", - CSS_TITLE: "Change CSS", - - LAYOUT_TYPE: "Layout of photos:", - LAYOUT_SQUARES: "Square thumbnails", - LAYOUT_JUSTIFIED: "With aspect, justified", - LAYOUT_UNJUSTIFIED: "With aspect, unjustified", - SET_LAYOUT: "Change layout", - PUBLIC_SEARCH_TEXT: "Public search allowed:", - - IMAGE_OVERLAY_TEXT: "Display image overlay by default:", - - OVERLAY_TYPE: "Data to use in image overlay:", - OVERLAY_EXIF: "Photo EXIF data", - OVERLAY_DESCRIPTION: "Photo description", - OVERLAY_DATE: "Photo date taken", - - MAP_PROVIDER: "Provider of OpenStreetMap tiles:", - MAP_PROVIDER_WIKIMEDIA: "Wikimedia", - MAP_PROVIDER_OSM_ORG: "OpenStreetMap.org (no retina)", - MAP_PROVIDER_OSM_DE: "OpenStreetMap.de (no retina)", - MAP_PROVIDER_OSM_FR: "OpenStreetMap.fr (no retina)", - MAP_PROVIDER_RRZE: "University of Erlangen, Germany (only retina)", - - MAP_DISPLAY_TEXT: "Enable maps (provided by OpenStreetMap):", - MAP_DISPLAY_PUBLIC_TEXT: "Enable maps for public albums (provided by OpenStreetMap):", - MAP_INCLUDE_SUBALBUMS_TEXT: "Include photos of subalbums on map:", - LOCATION_DECODING: "Decode GPS data into location name", - LOCATION_SHOW: "Show location name", - LOCATION_SHOW_PUBLIC: "Show location name for public mode", - - NSFW_VISIBLE_TEXT_1: "Make Sensitive albums visible by default.", - NSFW_VISIBLE_TEXT_2: "If the album is public, it is still accessible, just hidden from the view and can be revealed by pressing H.", - SETTINGS_SUCCESS_NSFW_VISIBLE: "Default sensitive album visibility updated with success.", - - VIEW_NO_RESULT: "No results", - VIEW_NO_PUBLIC_ALBUMS: "No public albums", - VIEW_NO_CONFIGURATION: "No configuration", - VIEW_PHOTO_NOT_FOUND: "Photo not found", - - NO_TAGS: "No Tags", - - UPLOAD_MANAGE_NEW_PHOTOS: "You can now manage your new photo(s).", - UPLOAD_COMPLETE: "Upload complete", - UPLOAD_COMPLETE_FAILED: "Failed to upload one or more photos.", - UPLOAD_IMPORTING: "Importing", - UPLOAD_IMPORTING_URL: "Importing URL", - UPLOAD_UPLOADING: "Uploading", - UPLOAD_FINISHED: "Finished", - UPLOAD_PROCESSING: "Processing", - UPLOAD_FAILED: "Failed", - UPLOAD_FAILED_ERROR: "Upload failed. Server returned an error!", - UPLOAD_FAILED_WARNING: "Upload failed. Server returned a warning!", - UPLOAD_SKIPPED: "Skipped", - UPLOAD_ERROR_CONSOLE: "Please take a look at the console of your browser for further details.", - UPLOAD_UNKNOWN: "Server returned an unknown response. Please take a look at the console of your browser for further details.", - UPLOAD_ERROR_UNKNOWN: "Upload failed. Server returned an unkown error!", - UPLOAD_IN_PROGRESS: "Lychee is currently uploading!", - UPLOAD_IMPORT_WARN_ERR: "The import has been finished, but returned warnings or errors. Please take a look at the log (Settings -> Show Log) for further details.", - UPLOAD_IMPORT_COMPLETE: "Import complete", - UPLOAD_IMPORT_INSTR: "Please enter the direct link to a photo to import it:", - UPLOAD_IMPORT: "Import", - UPLOAD_IMPORT_SERVER: "Importing from server", - UPLOAD_IMPORT_SERVER_FOLD: "Folder empty or no readable files to process. Please take a look at the log (Settings -> Show Log) for further details.", - UPLOAD_IMPORT_SERVER_INSTR: "This action will import all photos, folders and sub-folders which are located in the following directory. The original files will be deleted after the import when possible.", - UPLOAD_ABSOLUTE_PATH: "Absolute path to directory", - UPLOAD_IMPORT_SERVER_EMPT: "Could not start import because the folder was empty!", - - ABOUT_SUBTITLE: "Self-hosted photo-management done right", - ABOUT_DESCRIPTION: "is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.", - - URL_COPY_TO_CLIPBOARD: "Copy to clipboard", - URL_COPIED_TO_CLIPBOARD: "Copied URL to clipboard!", - PHOTO_DIRECT_LINKS_TO_IMAGES: "Direct links to image files:", - PHOTO_MEDIUM: "Medium", - PHOTO_MEDIUM_HIDPI: "Medium HiDPI", - PHOTO_SMALL: "Thumb", - PHOTO_SMALL_HIDPI: "Thumb HiDPI", - PHOTO_THUMB: "Square thumb", - PHOTO_THUMB_HIDPI: "Square thumb HiDPI", - PHOTO_LIVE_VIDEO: "Video part of live-photo", - PHOTO_VIEW: "Lychee Photo View:" -}; - -/** - * @description This module takes care of the map view of a full album and its sub-albums. - */ - -var map_provider_layer_attribution = { - Wikimedia: { - layer: "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png", - attribution: 'Wikimedia' - }, - "OpenStreetMap.org": { - layer: "https://{s}.tile.osm.org/{z}/{x}/{y}.png", - attribution: '© OpenStreetMap contributors' - }, - "OpenStreetMap.de": { - layer: "https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png ", - attribution: '© OpenStreetMap contributors' - }, - "OpenStreetMap.fr": { - layer: "https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png ", - attribution: '© OpenStreetMap contributors' - }, - RRZE: { - layer: "https://{s}.osm.rrze.fau.de/osmhd/{z}/{x}/{y}.png", - attribution: '© OpenStreetMap contributors' - } -}; - -var mapview = { - map: null, - photoLayer: null, - min_lat: null, - min_lng: null, - max_lat: null, - max_lng: null, - albumID: null, - map_provider: null -}; - -mapview.isInitialized = function () { - if (mapview.map === null || mapview.photoLayer === null) { - return false; - } - return true; -}; - -mapview.title = function (_albumID, _albumTitle) { - switch (_albumID) { - case "f": - lychee.setTitle(lychee.locale["STARRED"], false); - break; - case "s": - lychee.setTitle(lychee.locale["PUBLIC"], false); - break; - case "r": - lychee.setTitle(lychee.locale["RECENT"], false); - break; - case "0": - lychee.setTitle(lychee.locale["UNSORTED"], false); - break; - case null: - lychee.setTitle(lychee.locale["ALBUMS"], false); - break; - default: - lychee.setTitle(_albumTitle, false); - break; - } -}; - -// Open the map view -mapview.open = function () { - var albumID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - - // If map functionality is disabled -> do nothing - if (!lychee.map_display || lychee.publicMode === true && !lychee.map_display_public) { - loadingBar.show("error", lychee.locale["ERROR_MAP_DEACTIVATED"]); - return; - } - - lychee.animate($("#mapview"), "fadeIn"); - $("#mapview").show(); - header.setMode("map"); - - mapview.albumID = albumID; - - // initialize container only once - if (mapview.isInitialized() == false) { - // Leaflet seaches for icon in same directoy as js file -> paths needs - // to be overwritten - delete L.Icon.Default.prototype._getIconUrl; - L.Icon.Default.mergeOptions({ - iconRetinaUrl: "img/marker-icon-2x.png", - iconUrl: "img/marker-icon.png", - shadowUrl: "img/marker-shadow.png" - }); - - // Set initial view to (0,0) - mapview.map = L.map("leaflet_map_full").setView([0.0, 0.0], 13); - - L.tileLayer(map_provider_layer_attribution[lychee.map_provider].layer, { - attribution: map_provider_layer_attribution[lychee.map_provider].attribution - }).addTo(mapview.map); - - mapview.map_provider = lychee.map_provider; - } else { - if (mapview.map_provider !== lychee.map_provider) { - // removew all layers - mapview.map.eachLayer(function (layer) { - mapview.map.removeLayer(layer); - }); - - L.tileLayer(map_provider_layer_attribution[lychee.map_provider].layer, { - attribution: map_provider_layer_attribution[lychee.map_provider].attribution - }).addTo(mapview.map); - - mapview.map_provider = lychee.map_provider; - } else { - // Mapview has already shown data -> remove only photoLayer showing photos - mapview.photoLayer.clear(); - } - - // Reset min/max lat/lgn Values - mapview.min_lat = null; - mapview.max_lat = null; - mapview.min_lng = null; - mapview.max_lng = null; - } - - // Define how the photos on the map should look like - mapview.photoLayer = L.photo.cluster().on("click", function (e) { - var photo = e.layer.photo; - var template = ""; - - // Retina version if available - if (photo.url2x !== "") { - template = template.concat('

{name}

', build.iconic("camera-slr"), "

{takedate}

"); - } else { - template = template.concat('

{name}

', build.iconic("camera-slr"), "

{takedate}

"); - } - - e.layer.bindPopup(L.Util.template(template, photo), { - minWidth: 400 - }).openPopup(); - }); - - // Adjusts zoom and position of map to show all images - var updateZoom = function updateZoom() { - if (mapview.min_lat && mapview.min_lng && mapview.max_lat && mapview.max_lng) { - var dist_lat = mapview.max_lat - mapview.min_lat; - var dist_lng = mapview.max_lng - mapview.min_lng; - mapview.map.fitBounds([[mapview.min_lat - 0.1 * dist_lat, mapview.min_lng - 0.1 * dist_lng], [mapview.max_lat + 0.1 * dist_lat, mapview.max_lng + 0.1 * dist_lng]]); - } else { - mapview.map.fitWorld(); - } - }; - - // Adds photos to the map - var addPhotosToMap = function addPhotosToMap(album) { - // check if empty - if (!album.photos) return; - - var photos = []; - - album.photos.forEach(function (element, index) { - if (element.latitude || element.longitude) { - photos.push({ - lat: parseFloat(element.latitude), - lng: parseFloat(element.longitude), - thumbnail: element.thumbUrl !== "uploads/thumb/" ? element.thumbUrl : "img/placeholder.png", - thumbnail2x: element.thumb2x, - url: element.small !== "" ? element.small : element.url, - url2x: element.small2x, - name: element.title, - takedate: element.takedate, - albumID: element.album, - photoID: element.id - }); - - // Update min/max lat/lng - if (mapview.min_lat === null || mapview.min_lat > element.latitude) { - mapview.min_lat = parseFloat(element.latitude); - } - if (mapview.min_lng === null || mapview.min_lng > element.longitude) { - mapview.min_lng = parseFloat(element.longitude); - } - if (mapview.max_lat === null || mapview.max_lat < element.latitude) { - mapview.max_lat = parseFloat(element.latitude); - } - if (mapview.max_lng === null || mapview.max_lng < element.longitude) { - mapview.max_lng = parseFloat(element.longitude); - } - } - }); - - // Add Photos to map - mapview.photoLayer.add(photos).addTo(mapview.map); - - // Update Zoom and Position - updateZoom(); - }; - - // Call backend, retrieve information of photos and display them - // This function is called recursively to retrieve data for sub-albums - // Possible enhancement could be to only have a single ajax call - var getAlbumData = function getAlbumData(_albumID) { - var _includeSubAlbums = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (_albumID !== "" && _albumID !== null) { - // _ablumID has been to a specific album - var _params = { - albumID: _albumID, - includeSubAlbums: _includeSubAlbums, - password: "" - }; - - api.post("Album::getPositionData", _params, function (data) { - if (data === "Warning: Wrong password!") { - password.getDialog(_albumID, function () { - _params.password = password.value; - - api.post("Album::getPositionData", _params, function (_data) { - addPhotosToMap(_data); - mapview.title(_albumID, _data.title); - }); - }); - } else { - addPhotosToMap(data); - mapview.title(_albumID, data.title); - } - }); - } else { - // AlbumID is empty -> fetch all photos of all albums - // _ablumID has been to a specific album - var _params2 = { - includeSubAlbums: _includeSubAlbums, - password: "" - }; - - api.post("Albums::getPositionData", _params2, function (data) { - if (data === "Warning: Wrong password!") { - password.getDialog(_albumID, function () { - _params2.password = password.value; - - api.post("Albums::getPositionData", _params2, function (_data) { - addPhotosToMap(_data); - mapview.title(_albumID, _data.title); - }); - }); - } else { - addPhotosToMap(data); - mapview.title(_albumID, data.title); - } - }); - } - }; - - // If subalbums not being included and album.json already has all data - // -> we can reuse it - if (lychee.map_include_subalbums === false && album.json !== null && album.json.photos !== null) { - addPhotosToMap(album.json); - } else { - // Not all needed data has been preloaded - we need to load everything - getAlbumData(albumID, lychee.map_include_subalbums); - } - - // Update Zoom and Position once more (for empty map) - updateZoom(); -}; - -mapview.close = function () { - // If map functionality is disabled -> do nothing - if (!lychee.map_display) return; - - lychee.animate($("#mapview"), "fadeOut"); - $("#mapview").hide(); - header.setMode("album"); - - // Make album focussable - tabindex.makeFocusable(lychee.content); -}; - -mapview.goto = function (elem) { - // If map functionality is disabled -> do nothing - if (!lychee.map_display) return; - - var photoID = elem.attr("data-id"); - var albumID = elem.attr("data-album-id"); - - if (albumID == "null") albumID = 0; - - if (album.json == null || albumID !== album.json.id) { - album.refresh(); - } - - lychee.goto(albumID + "/" + photoID); -}; - -/** - * @description Select multiple albums or photos. - */ - -var isSelectKeyPressed = function isSelectKeyPressed(e) { - return e.metaKey || e.ctrlKey; -}; - -var multiselect = { - ids: [], - albumsSelected: 0, - photosSelected: 0, - lastClicked: null -}; - -multiselect.position = { - top: null, - right: null, - bottom: null, - left: null -}; - -multiselect.bind = function () { - $(".content").on("mousedown", function (e) { - if (e.which === 1) multiselect.show(e); - }); - - return true; -}; - -multiselect.unbind = function () { - $(".content").off("mousedown"); -}; - -multiselect.isSelected = function (id) { - var pos = $.inArray(id, multiselect.ids); - - return { - selected: pos !== -1, - position: pos - }; -}; - -multiselect.toggleItem = function (object, id) { - if (album.isSmartID(id)) return; - - var selected = multiselect.isSelected(id).selected; - - if (selected === false) multiselect.addItem(object, id);else multiselect.removeItem(object, id); -}; - -multiselect.addItem = function (object, id) { - if (album.isSmartID(id)) return; - if (!lychee.admin && albums.isShared(id)) return; - if (multiselect.isSelected(id).selected === true) return; - - var isAlbum = object.hasClass("album"); - - if (isAlbum && multiselect.photosSelected > 0 || !isAlbum && multiselect.albumsSelected > 0) { - lychee.error("Please select either albums or photos!"); - return; - } - - multiselect.ids.push(id); - multiselect.select(object); - - if (isAlbum) { - multiselect.albumsSelected++; - } else { - multiselect.photosSelected++; - } - - multiselect.lastClicked = object; -}; - -multiselect.removeItem = function (object, id) { - var _multiselect$isSelect = multiselect.isSelected(id), - selected = _multiselect$isSelect.selected, - position = _multiselect$isSelect.position; - - if (selected === false) return; - - multiselect.ids.splice(position, 1); - multiselect.deselect(object); - - var isAlbum = object.hasClass("album"); - - if (isAlbum) { - multiselect.albumsSelected--; - } else { - multiselect.photosSelected--; - } - - multiselect.lastClicked = object; -}; - -multiselect.albumClick = function (e, albumObj) { - var id = albumObj.attr("data-id"); - - if ((isSelectKeyPressed(e) || e.shiftKey) && album.isUploadable()) { - if (albumObj.hasClass("disabled")) return; - - if (isSelectKeyPressed(e)) { - multiselect.toggleItem(albumObj, id); - } else { - if (multiselect.albumsSelected > 0) { - // Click with Shift. Select all elements between the current - // element and the last clicked-on one. - - if (albumObj.prevAll(".album").toArray().includes(multiselect.lastClicked[0])) { - albumObj.prevUntil(multiselect.lastClicked, ".album").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - } else if (albumObj.nextAll(".album").toArray().includes(multiselect.lastClicked[0])) { - albumObj.nextUntil(multiselect.lastClicked, ".album").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - } - } - - multiselect.addItem(albumObj, id); - } - } else { - lychee.goto(id); - } -}; - -multiselect.photoClick = function (e, photoObj) { - var id = photoObj.attr("data-id"); - - if ((isSelectKeyPressed(e) || e.shiftKey) && album.isUploadable()) { - if (photoObj.hasClass("disabled")) return; - - if (isSelectKeyPressed(e)) { - multiselect.toggleItem(photoObj, id); - } else { - if (multiselect.photosSelected > 0) { - // Click with Shift. Select all elements between the current - // element and the last clicked-on one. - - if (photoObj.prevAll(".photo").toArray().includes(multiselect.lastClicked[0])) { - photoObj.prevUntil(multiselect.lastClicked, ".photo").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - } else if (photoObj.nextAll(".photo").toArray().includes(multiselect.lastClicked[0])) { - photoObj.nextUntil(multiselect.lastClicked, ".photo").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - } - } - - multiselect.addItem(photoObj, id); - } - } else { - lychee.goto(album.getID() + "/" + id); - } -}; - -multiselect.albumContextMenu = function (e, albumObj) { - var id = albumObj.attr("data-id"); - var selected = multiselect.isSelected(id).selected; - - if (albumObj.hasClass("disabled")) return; - - if (selected !== false && multiselect.ids.length > 1) { - contextMenu.albumMulti(multiselect.ids, e); - } else { - contextMenu.album(id, e); - } -}; - -multiselect.photoContextMenu = function (e, photoObj) { - var id = photoObj.attr("data-id"); - var selected = multiselect.isSelected(id).selected; - - if (photoObj.hasClass("disabled")) return; - - if (selected !== false && multiselect.ids.length > 1) { - contextMenu.photoMulti(multiselect.ids, e); - } else if (visible.album() || visible.search()) { - contextMenu.photo(id, e); - } else if (visible.photo()) { - // should not happen... but you never know... - contextMenu.photo(_photo.getID(), e); - } else { - lychee.error("Could not find what you want."); - } -}; - -multiselect.clearSelection = function () { - multiselect.deselect(".photo.active, .album.active"); - multiselect.ids = []; - multiselect.albumsSelected = 0; - multiselect.photosSelected = 0; - multiselect.lastClicked = null; -}; - -multiselect.show = function (e) { - if (!album.isUploadable()) return false; - if (!visible.albums() && !visible.album()) return false; - if ($(".album:hover, .photo:hover").length !== 0) return false; - if (visible.search()) return false; - if (visible.multiselect()) $("#multiselect").remove(); - - _sidebar.setSelectable(false); - - if (!isSelectKeyPressed(e) && !e.shiftKey) { - multiselect.clearSelection(); - } - - multiselect.position.top = e.pageY; - multiselect.position.right = $(document).width() - e.pageX; - multiselect.position.bottom = $(document).height() - e.pageY; - multiselect.position.left = e.pageX; - - $("body").append(build.multiselect(multiselect.position.top, multiselect.position.left)); - - $(document).on("mousemove", multiselect.resize).on("mouseup", function (_e) { - if (_e.which === 1) { - multiselect.getSelection(_e); - } - }); -}; - -multiselect.resize = function (e) { - if (multiselect.position.top === null || multiselect.position.right === null || multiselect.position.bottom === null || multiselect.position.left === null) return false; - - // Default CSS - var newCSS = { - top: null, - bottom: null, - height: null, - left: null, - right: null, - width: null - }; - - if (e.pageY >= multiselect.position.top) { - newCSS.top = multiselect.position.top; - newCSS.bottom = "inherit"; - newCSS.height = Math.min(e.pageY, $(document).height() - 3) - multiselect.position.top; - } else { - newCSS.top = "inherit"; - newCSS.bottom = multiselect.position.bottom; - newCSS.height = multiselect.position.top - Math.max(e.pageY, 2); - } - - if (e.pageX >= multiselect.position.left) { - newCSS.right = "inherit"; - newCSS.left = multiselect.position.left; - newCSS.width = Math.min(e.pageX, $(document).width() - 3) - multiselect.position.left; - } else { - newCSS.right = multiselect.position.right; - newCSS.left = "inherit"; - newCSS.width = multiselect.position.left - Math.max(e.pageX, 2); - } - - // Updated all CSS properties at once - $("#multiselect").css(newCSS); -}; - -multiselect.stopResize = function () { - if (multiselect.position.top !== null) $(document).off("mousemove mouseup"); -}; - -multiselect.getSize = function () { - if (!visible.multiselect()) return false; - - var $elem = $("#multiselect"); - var offset = $elem.offset(); - - return { - top: offset.top, - left: offset.left, - width: parseFloat($elem.css("width"), 10), - height: parseFloat($elem.css("height"), 10) - }; -}; - -multiselect.getSelection = function (e) { - var size = multiselect.getSize(); - - if (visible.contextMenu()) return false; - if (!visible.multiselect()) return false; - - $(".photo, .album").each(function () { - // We select if there's even a slightest overlap. Overlap between - // an object and the selection occurs if the left edge of the - // object is to the left of the right edge of the selection *and* - // the right edge of the object is to the right of the left edge of - // the selection; analogous for top/bottom. - if ($(this).offset().left < size.left + size.width && $(this).offset().left + $(this).width() > size.left && $(this).offset().top < size.top + size.height && $(this).offset().top + $(this).height() > size.top) { - var id = $(this).attr("data-id"); - - if (isSelectKeyPressed(e)) { - multiselect.toggleItem($(this), id); - } else { - multiselect.addItem($(this), id); - } - } - }); - - multiselect.hide(); -}; - -multiselect.select = function (id) { - var el = $(id); - - el.addClass("selected"); - el.addClass("active"); -}; - -multiselect.deselect = function (id) { - var el = $(id); - - el.removeClass("selected"); - el.removeClass("active"); -}; - -multiselect.hide = function () { - _sidebar.setSelectable(true); - - 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 () { - _sidebar.setSelectable(true); - - 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.selectAll = function () { - if (!album.isUploadable()) return false; - if (visible.search()) return false; - if (!visible.albums() && !visible.album) return false; - if (visible.multiselect()) $("#multiselect").remove(); - - _sidebar.setSelectable(false); - - multiselect.clearSelection(); - - $(".photo").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - - if (multiselect.photosSelected === 0) { - // There are no pictures. Try albums then. - $(".album").each(function () { - multiselect.addItem($(this), $(this).attr("data-id")); - }); - } -}; - -/** - * @description Controls the access to password-protected albums and photos. - */ - -var password = { - value: "" -}; - -password.getDialog = function (albumID, callback) { - var action = function action(data) { - var passwd = data.password; - - var params = { - albumID: albumID, - password: passwd - }; - - api.post("Album::getPublic", params, function (_data) { - if (_data === true) { - basicModal.close(); - password.value = passwd; - callback(); - } else { - basicModal.error("password"); - } - }); - }; - - var cancel = function cancel() { - basicModal.close(); - if (!visible.albums() && !visible.album()) lychee.goto(); - }; - - var msg = "\n\t\t\t

\n\t\t\t\t " + lychee.locale["ALBUM_PASSWORD_REQUIRED"] + "\n\t\t\t\t \n\t\t\t

\n\t\t\t "; - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["ENTER"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: cancel - } - } - }); -}; - -/** - * @description Takes care of every action a photo can handle and execute. - */ - -var _photo = { - json: null, - cache: null, - supportsPrefetch: null, - LivePhotosObject: null -}; - -_photo.getID = function () { - var id = null; - - if (_photo.json) id = _photo.json.id;else id = $(".photo:hover, .photo.active").attr("data-id"); - - if ($.isNumeric(id) === true) return id;else return false; -}; - -_photo.load = function (photoID, albumID, autoplay) { - var checkContent = function checkContent() { - if (album.json != null && album.json.photos) _photo.load(photoID, albumID, autoplay);else setTimeout(checkContent, 100); - }; - - var checkPasswd = function checkPasswd() { - if (password.value !== "") _photo.load(photoID, albumID, autoplay);else setTimeout(checkPasswd, 200); - }; - - // we need to check the album.json.photos because otherwise the script is too fast and this raise an error. - if (album.json == null || album.json.photos == null) { - checkContent(); - return false; - } - - var params = { - photoID: photoID, - password: password.value - }; - - api.post("Photo::get", params, function (data) { - if (data === "Warning: Photo private!") { - lychee.content.show(); - lychee.goto(); - return false; - } - - if (data === "Warning: Wrong password!") { - checkPasswd(); - return false; - } - - _photo.json = data; - _photo.json.original_album = _photo.json.album; - _photo.json.album = albumID; - - if (!visible.photo()) view.photo.show(); - view.photo.init(autoplay); - lychee.imageview.show(); - - if (!lychee.hide_content_during_imgview) { - setTimeout(function () { - lychee.content.show(); - tabindex.makeUnfocusable(lychee.content); - }, 300); - } - }); -}; - -_photo.hasExif = function () { - var exifHash = _photo.json.make + _photo.json.model + _photo.json.shutter + _photo.json.aperture + _photo.json.focal + _photo.json.iso; - - return exifHash !== ""; -}; - -_photo.hasTakedate = function () { - return _photo.json.takedate && _photo.json.takedate !== ""; -}; - -_photo.hasDesc = function () { - return _photo.json.description && _photo.json.description !== ""; -}; - -_photo.isLivePhoto = function () { - if (!_photo.json) return false; // In case it's called, but not initialized - return _photo.json.livePhotoUrl && _photo.json.livePhotoUrl !== ""; -}; - -_photo.isLivePhotoInitizalized = function () { - return _photo.LivePhotosObject !== null; -}; - -_photo.isLivePhotoPlaying = function () { - if (_photo.isLivePhotoInitizalized() === false) return false; - return _photo.LivePhotosObject.isPlaying; -}; - -_photo.update_overlay_type = function () { - // Only run if the overlay is showing - if (!lychee.image_overlay) { - return false; - } else { - // console.log('Current ' + lychee.image_overlay_type); - var types = ["exif", "desc", "takedate"]; - - var i = types.indexOf(lychee.image_overlay_type); - var j = (i + 1) % types.length; - var cont = true; - while (i !== j && cont) { - if (types[j] === "desc" && _photo.hasDesc()) cont = false;else if (types[j] === "takedate" && _photo.hasTakedate()) cont = false;else if (types[j] === "exif" && _photo.hasExif()) cont = false;else j = (j + 1) % types.length; - } - - if (i !== j) { - lychee.image_overlay_type = types[j]; - $("#image_overlay").remove(); - lychee.imageview.append(build.overlay_image(_photo.json)); - } else { - // console.log('no other data found, displaying ' + types[j]); - } - } -}; - -_photo.update_display_overlay = function () { - lychee.image_overlay = !lychee.image_overlay; - if (!lychee.image_overlay) { - $("#image_overlay").remove(); - } else { - lychee.imageview.append(build.overlay_image(_photo.json)); - } -}; - -// Preload the next and previous photos for better response time -_photo.preloadNextPrev = function (photoID) { - if (album.json && album.json.photos && album.getByID(photoID)) { - var previousPhotoID = album.getByID(photoID).previousPhoto; - var nextPhotoID = album.getByID(photoID).nextPhoto; - var current2x = null; - - $("head [data-prefetch]").remove(); - - var preload = function preload(preloadID) { - var preloadPhoto = album.getByID(preloadID); - var href = ""; - - if (preloadPhoto.medium != null && preloadPhoto.medium !== "") { - href = preloadPhoto.medium; - - if (preloadPhoto.medium2x && preloadPhoto.medium2x !== "") { - if (current2x === null) { - var imgs = $("img#image"); - current2x = imgs.length > 0 && imgs[0].currentSrc !== null && imgs[0].currentSrc.includes("@2x."); - } - if (current2x) { - // If the currently displayed image uses the 2x variant, - // chances are that so will the next one. - href = preloadPhoto.medium2x; - } - } - } else if (preloadPhoto.type && preloadPhoto.type.indexOf("video") === -1) { - // Preload the original size, but only if it's not a video - href = preloadPhoto.url; - } - - if (href !== "") { - if (_photo.supportsPrefetch === null) { - // Copied from https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/ - var DOMTokenListSupports = function DOMTokenListSupports(tokenList, token) { - if (!tokenList || !tokenList.supports) { - return null; - } - try { - return tokenList.supports(token); - } catch (e) { - if (e instanceof TypeError) { - console.log("The DOMTokenList doesn't have a supported tokens list"); - } else { - console.error("That shouldn't have happened"); - } - } - }; - _photo.supportsPrefetch = DOMTokenListSupports(document.createElement("link").relList, "prefetch"); - } - - if (_photo.supportsPrefetch) { - $("head").append(lychee.html(_templateObject51, href)); - } else { - // According to https://caniuse.com/#feat=link-rel-prefetch, - // as of mid-2019 it's mainly Safari (both on desktop and mobile) - new Image().src = href; - } - } - }; - - if (nextPhotoID && nextPhotoID !== "") { - preload(nextPhotoID); - } - if (previousPhotoID && previousPhotoID !== "") { - preload(previousPhotoID); - } - } -}; - -_photo.parse = function () { - if (!_photo.json.title) _photo.json.title = lychee.locale["UNTITLED"]; -}; - -_photo.updateSizeLivePhotoDuringAnimation = function () { - var animationDuraction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300; - var pauseBetweenUpdated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; - - // For the LivePhotoKit, we need to call the updateSize manually - // during CSS animations - // - var interval = setInterval(function () { - if (_photo.isLivePhotoInitizalized()) { - _photo.LivePhotosObject.updateSize(); - } - }, pauseBetweenUpdated); - - setTimeout(function () { - clearInterval(interval); - }, animationDuraction); -}; - -_photo.previous = function (animate) { - if (_photo.getID() !== false && album.json && album.getByID(_photo.getID()) && album.getByID(_photo.getID()).previousPhoto !== "") { - var delay = 0; - - if (animate === true) { - delay = 200; - - $("#imageview #image").css({ - WebkitTransform: "translateX(100%)", - MozTransform: "translateX(100%)", - transform: "translateX(100%)", - opacity: 0 - }); - } - - setTimeout(function () { - if (_photo.getID() === false) return false; - _photo.LivePhotosObject = null; - lychee.goto(album.getID() + "/" + album.getByID(_photo.getID()).previousPhoto, false); - }, delay); - } -}; - -_photo.next = function (animate) { - if (_photo.getID() !== false && album.json && album.getByID(_photo.getID()) && album.getByID(_photo.getID()).nextPhoto !== "") { - var delay = 0; - - if (animate === true) { - delay = 200; - - $("#imageview #image").css({ - WebkitTransform: "translateX(-100%)", - MozTransform: "translateX(-100%)", - transform: "translateX(-100%)", - opacity: 0 - }); - } - - setTimeout(function () { - if (_photo.getID() === false) return false; - _photo.LivePhotosObject = null; - lychee.goto(album.getID() + "/" + album.getByID(_photo.getID()).nextPhoto, false); - }, delay); - } -}; - -_photo.delete = function (photoIDs) { - var action = {}; - var cancel = {}; - var msg = ""; - var photoTitle = ""; - - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - if (photoIDs.length === 1) { - // Get title if only one photo is selected - if (visible.photo()) photoTitle = _photo.json.title;else photoTitle = album.getByID(photoIDs).title; - - // Fallback for photos without a title - if (photoTitle === "") photoTitle = lychee.locale["UNTITLED"]; - } - - action.fn = function () { - var nextPhoto = ""; - var previousPhoto = ""; - - basicModal.close(); - - photoIDs.forEach(function (id, index) { - // Change reference for the next and previous photo - if (album.getByID(id).nextPhoto !== "" || album.getByID(id).previousPhoto !== "") { - nextPhoto = album.getByID(id).nextPhoto; - previousPhoto = album.getByID(id).previousPhoto; - - if (previousPhoto !== "") { - album.getByID(previousPhoto).nextPhoto = nextPhoto; - } - if (nextPhoto !== "") { - album.getByID(nextPhoto).previousPhoto = previousPhoto; - } - } - - album.deleteByID(id); - view.album.content.delete(id, index === photoIDs.length - 1); - }); - - albums.refresh(); - - // Go to next photo if there is a next photo and - // next photo is not the current one. Also try the previous one. - // Show album otherwise. - if (visible.photo()) { - if (nextPhoto !== "" && nextPhoto !== _photo.getID()) { - lychee.goto(album.getID() + "/" + nextPhoto); - } else if (previousPhoto !== "" && previousPhoto !== _photo.getID()) { - lychee.goto(album.getID() + "/" + previousPhoto); - } else { - lychee.goto(album.getID()); - } - } else if (!visible.albums()) { - lychee.goto(album.getID()); - } - - var params = { - photoIDs: photoIDs.join() - }; - - api.post("Photo::delete", params, function (data) { - if (data !== true) lychee.error(null, params, data); - }); - }; - - if (photoIDs.length === 1) { - action.title = lychee.locale["PHOTO_DELETE"]; - cancel.title = lychee.locale["PHOTO_KEEP"]; - - msg = lychee.html(_templateObject52, lychee.locale["PHOTO_DELETE_1"], photoTitle, lychee.locale["PHOTO_DELETE_2"]); - } else { - action.title = lychee.locale["PHOTO_DELETE"]; - cancel.title = lychee.locale["PHOTO_KEEP"]; - - msg = lychee.html(_templateObject53, lychee.locale["PHOTO_DELETE_ALL_1"], photoIDs.length, lychee.locale["PHOTO_DELETE_ALL_2"]); - } - - basicModal.show({ - body: msg, - buttons: { - action: { - title: action.title, - fn: action.fn, - class: "red" - }, - cancel: { - title: cancel.title, - fn: basicModal.close - } - } - }); -}; - -_photo.setTitle = function (photoIDs) { - var oldTitle = ""; - var msg = ""; - - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - if (photoIDs.length === 1) { - // Get old title if only one photo is selected - if (_photo.json) oldTitle = _photo.json.title;else if (album.json) oldTitle = album.getByID(photoIDs).title; - } - - var action = function action(data) { - basicModal.close(); - - var newTitle = data.title; - - if (visible.photo()) { - _photo.json.title = newTitle === "" ? "Untitled" : newTitle; - view.photo.title(); - } - - photoIDs.forEach(function (id) { - album.getByID(id).title = newTitle; - view.album.content.title(id); - }); - - var params = { - photoIDs: photoIDs.join(), - title: newTitle - }; - - api.post("Photo::setTitle", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } - }); - }; - - var input = lychee.html(_templateObject54, oldTitle); - - if (photoIDs.length === 1) msg = lychee.html(_templateObject5, lychee.locale["PHOTO_NEW_TITLE"], input);else msg = lychee.html(_templateObject55, lychee.locale["PHOTOS_NEW_TITLE_1"], photoIDs.length, lychee.locale["PHOTOS_NEW_TITLE_2"], input); - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["PHOTO_SET_TITLE"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -_photo.copyTo = function (photoIDs, albumID) { - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - var params = { - photoIDs: photoIDs.join(), - albumID: albumID - }; - - api.post("Photo::duplicate", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - if (lychee.api_V2 || albumID === album.getID()) { - album.reload(); - } else { - // Lychee v3 does not support the albumID argument to - // Photo::duplicate so we need to do it manually, which is - // imperfect, as it moves the source photos, not the duplicates. - _photo.setAlbum(photoIDs, albumID); - } - } - }); -}; - -_photo.setAlbum = function (photoIDs, albumID) { - var nextPhoto = ""; - var previousPhoto = ""; - - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - photoIDs.forEach(function (id, index) { - // Change reference for the next and previous photo - if (album.getByID(id).nextPhoto !== "" || album.getByID(id).previousPhoto !== "") { - nextPhoto = album.getByID(id).nextPhoto; - previousPhoto = album.getByID(id).previousPhoto; - - if (previousPhoto !== "") { - album.getByID(previousPhoto).nextPhoto = nextPhoto; - } - if (nextPhoto !== "") { - album.getByID(nextPhoto).previousPhoto = previousPhoto; - } - } - - album.deleteByID(id); - view.album.content.delete(id, index === photoIDs.length - 1); - }); - - albums.refresh(); - - // Go to next photo if there is a next photo and - // next photo is not the current one. Also try the previous one. - // Show album otherwise. - if (visible.photo()) { - if (nextPhoto !== "" && nextPhoto !== _photo.getID()) { - lychee.goto(album.getID() + "/" + nextPhoto); - } else if (previousPhoto !== "" && previousPhoto !== _photo.getID()) { - lychee.goto(album.getID() + "/" + previousPhoto); - } else { - lychee.goto(album.getID()); - } - } - - var params = { - photoIDs: photoIDs.join(), - albumID: albumID - }; - - api.post("Photo::setAlbum", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - // We only really need to do anything here if the destination - // is a (possibly nested) subalbum of the current album; but - // since we have no way of figuring it out (albums.json is - // null), we need to reload. - if (visible.album()) { - album.reload(); - } - } - }); -}; - -_photo.setStar = function (photoIDs) { - if (!photoIDs) return false; - - if (visible.photo()) { - _photo.json.star = _photo.json.star === "0" ? "1" : "0"; - view.photo.star(); - } - - photoIDs.forEach(function (id) { - album.getByID(id).star = album.getByID(id).star === "0" ? "1" : "0"; - view.album.content.star(id); - }); - - albums.refresh(); - - var params = { - photoIDs: photoIDs.join() - }; - - api.post("Photo::setStar", params, function (data) { - if (data !== true) lychee.error(null, params, data); - }); -}; - -_photo.setPublic = function (photoID, e) { - var msg_switch = lychee.html(_templateObject56, lychee.locale["PHOTO_PUBLIC"], lychee.locale["PHOTO_PUBLIC_EXPL"]); - - var msg_choices = lychee.html(_templateObject57, build.iconic("check"), lychee.locale["PHOTO_FULL"], lychee.locale["PHOTO_FULL_EXPL"], build.iconic("check"), lychee.locale["PHOTO_HIDDEN"], lychee.locale["PHOTO_HIDDEN_EXPL"], build.iconic("check"), lychee.locale["PHOTO_DOWNLOADABLE"], lychee.locale["PHOTO_DOWNLOADABLE_EXPL"], build.iconic("check"), lychee.locale["PHOTO_SHARE_BUTTON_VISIBLE"], lychee.locale["PHOTO_SHARE_BUTTON_VISIBLE_EXPL"], build.iconic("check"), lychee.locale["PHOTO_PASSWORD_PROT"], lychee.locale["PHOTO_PASSWORD_PROT_EXPL"]); - - if (_photo.json.public === "2") { - // Public album. We can't actually change anything but we will - // display the current settings. - - var msg = lychee.html(_templateObject58, lychee.locale["PHOTO_NO_EDIT_SHARING_TEXT"], msg_switch, msg_choices); - - basicModal.show({ - body: msg, - buttons: { - cancel: { - title: lychee.locale["CLOSE"], - fn: basicModal.close - } - } - }); - - $('.basicModal .switch input[name="public"]').prop("checked", true); - if (album.json) { - if (album.json.full_photo !== null && album.json.full_photo === "1") { - $('.basicModal .choice input[name="full_photo"]').prop("checked", true); - } - // Photos in public albums are never hidden as such. It's the - // album that's hidden. Or is that distinction irrelevant to end - // users? - if (album.json.downloadable === "1") { - $('.basicModal .choice input[name="downloadable"]').prop("checked", true); - } - if (album.json.password === "1") { - $('.basicModal .choice input[name="password"]').prop("checked", true); - } - } - - $(".basicModal .switch input").attr("disabled", true); - $(".basicModal .switch .label").addClass("label--disabled"); - } else { - // Private album -- each photo can be shared individually. - - var _msg = lychee.html(_templateObject59, msg_switch, lychee.locale["PHOTO_EDIT_GLOBAL_SHARING_TEXT"], msg_choices); - - var action = function action() { - var newPublic = $('.basicModal .switch input[name="public"]:checked').length === 1 ? "1" : "0"; - - if (newPublic !== _photo.json.public) { - if (visible.photo()) { - _photo.json.public = newPublic; - view.photo.public(); - } - - album.getByID(photoID).public = newPublic; - view.album.content.public(photoID); - - albums.refresh(); - - // Photo::setPublic simply flips the current state. - // Ugly API but effective... - api.post("Photo::setPublic", { photoID: photoID }, function (data) { - if (data !== true) lychee.error(null, params, data); - }); - } - - basicModal.close(); - }; - - basicModal.show({ - body: _msg, - buttons: { - action: { - title: lychee.locale["PHOTO_SHARING_CONFIRM"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); - - $('.basicModal .switch input[name="public"]').on("click", function () { - if ($(this).prop("checked") === true) { - if (lychee.full_photo) { - $('.basicModal .choice input[name="full_photo"]').prop("checked", true); - } - // Photos shared individually are always hidden. - $('.basicModal .choice input[name="hidden"]').prop("checked", true); - if (lychee.downloadable) { - $('.basicModal .choice input[name="downloadable"]').prop("checked", true); - } - // Photos shared individually are always hidden. - $('.basicModal .choice input[name="hidden"]').prop("checked", true); - if (lychee.share_button_visible) { - $('.basicModal .choice input[name="share_button_visible"]').prop("checked", true); - } - // Photos shared individually can't be password-protected. - } else { - $(".basicModal .choice input").prop("checked", false); - } - }); - - if (_photo.json.public === "1") { - $('.basicModal .switch input[name="public"]').click(); - } - } - - return true; -}; - -_photo.setDescription = function (photoID) { - var oldDescription = _photo.json.description; - - var action = function action(data) { - basicModal.close(); - - var description = data.description; - - if (visible.photo()) { - _photo.json.description = description; - view.photo.description(); - } - - var params = { - photoID: photoID, - description: description - }; - - api.post("Photo::setDescription", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } - }); - }; - - basicModal.show({ - body: lychee.html(_templateObject60, lychee.locale["PHOTO_NEW_DESCRIPTION"], lychee.locale["PHOTO_DESCRIPTION"], oldDescription), - buttons: { - action: { - title: lychee.locale["PHOTO_SET_DESCRIPTION"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -_photo.editTags = function (photoIDs) { - var oldTags = ""; - var msg = ""; - - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - // Get tags - if (visible.photo()) oldTags = _photo.json.tags;else if (visible.album() && photoIDs.length === 1) oldTags = album.getByID(photoIDs).tags;else if (visible.search() && photoIDs.length === 1) oldTags = album.getByID(photoIDs).tags;else if (visible.album() && photoIDs.length > 1) { - var same = true; - photoIDs.forEach(function (id) { - same = album.getByID(id).tags === album.getByID(photoIDs[0]).tags && same === true; - }); - if (same === true) oldTags = album.getByID(photoIDs[0]).tags; - } - - // Improve tags - oldTags = oldTags.replace(/,/g, ", "); - - var action = function action(data) { - basicModal.close(); - _photo.setTags(photoIDs, data.tags); - }; - - var input = lychee.html(_templateObject61, oldTags); - - if (photoIDs.length === 1) msg = lychee.html(_templateObject5, lychee.locale["PHOTO_NEW_TAGS"], input);else msg = lychee.html(_templateObject55, lychee.locale["PHOTO_NEW_TAGS_1"], photoIDs.length, lychee.locale["PHOTO_NEW_TAGS_2"], input); - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["PHOTO_SET_TAGS"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -_photo.setTags = function (photoIDs, tags) { - if (!photoIDs) return false; - if (photoIDs instanceof Array === false) photoIDs = [photoIDs]; - - // Parse tags - tags = tags.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g, ","); - tags = tags.replace(/,$|^,|(\ ){0,}$/g, ""); - - if (visible.photo()) { - _photo.json.tags = tags; - view.photo.tags(); - } - - photoIDs.forEach(function (id, index, array) { - album.getByID(id).tags = tags; - }); - - var params = { - photoIDs: photoIDs.join(), - tags: tags - }; - - api.post("Photo::setTags", params, function (data) { - if (data !== true) lychee.error(null, params, data); - }); -}; - -_photo.deleteTag = function (photoID, index) { - var tags = void 0; - - // Remove - tags = _photo.json.tags.split(","); - tags.splice(index, 1); - - // Save - _photo.json.tags = tags.toString(); - _photo.setTags([photoID], _photo.json.tags); -}; - -_photo.share = function (photoID, service) { - if (_photo.json.hasOwnProperty("share_button_visible") && _photo.json.share_button_visible !== "1") { - return; - } - - var url = _photo.getViewLink(photoID); - - switch (service) { - case "twitter": - window.open("https://twitter.com/share?url=" + encodeURI(url)); - break; - case "facebook": - window.open("https://www.facebook.com/sharer.php?u=" + encodeURI(url) + "&t=" + encodeURI(_photo.json.title)); - break; - case "mail": - location.href = "mailto:?subject=" + encodeURI(_photo.json.title) + "&body=" + encodeURI(url); - break; - case "dropbox": - lychee.loadDropbox(function () { - var filename = _photo.json.title + "." + _photo.getDirectLink().split(".").pop(); - Dropbox.save(_photo.getDirectLink(), filename); - }); - break; - } -}; - -_photo.setLicense = function (photoID) { - var callback = function callback() { - $("select#license").val(_photo.json.license === "" ? "none" : _photo.json.license); - return false; - }; - - var action = function action(data) { - basicModal.close(); - var license = data.license; - - var params = { - photoID: photoID, - license: license - }; - - api.post("Photo::setLicense", params, function (_data) { - if (_data !== true) { - lychee.error(null, params, _data); - } else { - // update the photo JSON and reload the license in the sidebar - _photo.json.license = params.license; - view.photo.license(); - } - }); - }; - - var msg = lychee.html(_templateObject8, lychee.locale["PHOTO_LICENSE"], lychee.locale["PHOTO_LICENSE_NONE"], lychee.locale["PHOTO_RESERVED"], lychee.locale["PHOTO_LICENSE_HELP"]); - - basicModal.show({ - body: msg, - callback: callback, - buttons: { - action: { - title: lychee.locale["PHOTO_SET_LICENSE"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); -}; - -_photo.getArchive = function (photoIDs) { - var kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - if (photoIDs.length === 1 && kind === null) { - // For a single photo, allow to pick the kind via a dialog box. - - var myPhoto = void 0; - - if (_photo.json && _photo.json.id === photoIDs[0]) { - myPhoto = _photo.json; - } else { - myPhoto = album.getByID(photoIDs[0]); - } - - var buildButton = function buildButton(id, label) { - return lychee.html(_templateObject62, id, lychee.locale["DOWNLOAD"], build.iconic("cloud-download"), label); - }; - - var msg = lychee.html(_templateObject63); - - if (myPhoto.url) { - msg += buildButton("FULL", lychee.locale["PHOTO_FULL"] + " (" + myPhoto.width + "x" + myPhoto.height + ", " + myPhoto.size + ")"); - } - if (myPhoto.livePhotoUrl !== null) { - msg += buildButton("LIVEPHOTOVIDEO", "" + lychee.locale["PHOTO_LIVE_VIDEO"]); - } - if (myPhoto.hasOwnProperty("medium2x") && myPhoto.medium2x !== "") { - msg += buildButton("MEDIUM2X", lychee.locale["PHOTO_MEDIUM_HIDPI"] + " (" + myPhoto.medium2x_dim + ")"); - } - if (myPhoto.medium !== "") { - msg += buildButton("MEDIUM", lychee.locale["PHOTO_MEDIUM"] + " " + (myPhoto.hasOwnProperty("medium_dim") ? "(" + myPhoto.medium_dim + ")" : "")); - } - if (myPhoto.hasOwnProperty("small2x") && myPhoto.small2x !== "") { - msg += buildButton("SMALL2X", lychee.locale["PHOTO_SMALL_HIDPI"] + " (" + myPhoto.small2x_dim + ")"); - } - if (myPhoto.small !== "") { - msg += buildButton("SMALL", lychee.locale["PHOTO_SMALL"] + " " + (myPhoto.hasOwnProperty("small_dim") ? "(" + myPhoto.small_dim + ")" : "")); - } - if (lychee.api_V2) { - if (myPhoto.hasOwnProperty("thumb2x") && myPhoto.thumb2x !== "") { - msg += buildButton("THUMB2X", lychee.locale["PHOTO_THUMB_HIDPI"] + " (400x400)"); - } - if (myPhoto.thumbUrl !== "") { - msg += buildButton("THUMB", lychee.locale["PHOTO_THUMB"] + " (200x200)"); - } - } - - msg += lychee.html(_templateObject64); - - basicModal.show({ - body: msg, - buttons: { - cancel: { - title: lychee.locale["CLOSE"], - fn: basicModal.close - } - } - }); - - $(".downloads .basicModal__button").on(lychee.getEventName(), function () { - kind = this.id; - basicModal.close(); - _photo.getArchive(photoIDs, kind); - }); - - return true; - } - - var link = void 0; - - if (lychee.api_V2) { - location.href = api.get_url("Photo::getArchive") + lychee.html(_templateObject65, photoIDs.join(), kind); - } else { - var url = api.path + "?function=Photo::getArchive&photoID=" + photoIDs[0] + "&kind=" + kind; - - link = lychee.getBaseUrl() + url; - - if (lychee.publicMode === true) link += "&password=" + encodeURIComponent(password.value); - - location.href = link; - } -}; - -_photo.getDirectLink = function () { - var url = ""; - - if (_photo.json && _photo.json.url && _photo.json.url !== "") url = _photo.json.url; - - return url; -}; - -_photo.getViewLink = function (photoID) { - var url = "view.php?p=" + photoID; - if (lychee.api_V2) { - url = "view?p=" + photoID; - } - - return lychee.getBaseUrl() + url; -}; - -_photo.showDirectLinks = function (photoID) { - if (!_photo.json || _photo.json.id != photoID) { - return; - } - - var buildLine = function buildLine(label, url) { - return lychee.html(_templateObject66, label, url, lychee.locale["URL_COPY_TO_CLIPBOARD"], build.iconic("copy", "ionicons")); - }; - - var msg = lychee.html(_templateObject67, buildLine(lychee.locale["PHOTO_VIEW"], _photo.getViewLink(photoID)), lychee.locale["PHOTO_DIRECT_LINKS_TO_IMAGES"]); - - if (_photo.json.url) { - msg += buildLine(lychee.locale["PHOTO_FULL"] + " (" + _photo.json.width + "x" + _photo.json.height + ")", lychee.getBaseUrl() + _photo.json.url); - } - if (_photo.json.hasOwnProperty("medium2x") && _photo.json.medium2x !== "") { - msg += buildLine(lychee.locale["PHOTO_MEDIUM_HIDPI"] + " (" + _photo.json.medium2x_dim + ")", lychee.getBaseUrl() + _photo.json.medium2x); - } - if (_photo.json.medium !== "") { - msg += buildLine(lychee.locale["PHOTO_MEDIUM"] + " " + (_photo.json.hasOwnProperty("medium_dim") ? "(" + _photo.json.medium_dim + ")" : ""), lychee.getBaseUrl() + _photo.json.medium); - } - if (_photo.json.hasOwnProperty("small2x") && _photo.json.small2x !== "") { - msg += buildLine(lychee.locale["PHOTO_SMALL_HIDPI"] + " (" + _photo.json.small2x_dim + ")", lychee.getBaseUrl() + _photo.json.small2x); - } - if (_photo.json.small !== "") { - msg += buildLine(lychee.locale["PHOTO_SMALL"] + " " + (_photo.json.hasOwnProperty("small_dim") ? "(" + _photo.json.small_dim + ")" : ""), lychee.getBaseUrl() + _photo.json.small); - } - if (_photo.json.hasOwnProperty("thumb2x") && _photo.json.thumb2x !== "") { - msg += buildLine(lychee.locale["PHOTO_THUMB_HIDPI"] + " (400x400)", lychee.getBaseUrl() + _photo.json.thumb2x); - } else if (!lychee.api_V2) { - var _lychee$retinize4 = lychee.retinize(_photo.json.thumbUrl), - thumb2x = _lychee$retinize4.path; - - msg += buildLine(lychee.locale["PHOTO_THUMB_HIDPI"] + " (400x400)", lychee.getBaseUrl() + thumb2x); - } - if (_photo.json.thumbUrl !== "") { - msg += buildLine(" " + lychee.locale["PHOTO_THUMB"] + " (200x200)", lychee.getBaseUrl() + _photo.json.thumbUrl); - } - if (_photo.json.livePhotoUrl !== "") { - msg += buildLine(" " + lychee.locale["PHOTO_LIVE_VIDEO"] + " ", lychee.getBaseUrl() + _photo.json.livePhotoUrl); - } - - msg += lychee.html(_templateObject68); - - basicModal.show({ - body: msg, - buttons: { - cancel: { - title: lychee.locale["CLOSE"], - fn: basicModal.close - } - } - }); - - // Ensure that no input line is selected on opening. - $(".basicModal input:focus").blur(); - - $(".directLinks .basicModal__button").on(lychee.getEventName(), function () { - if (lychee.clipboardCopy($(this).prev().val())) { - loadingBar.show("success", lychee.locale["URL_COPIED_TO_CLIPBOARD"]); - } - }); -}; - -/** - * @description Takes care of every action a photoeditor can handle and execute. - */ - -photoeditor = {}; - -photoeditor.rotate = function (photoID, direction) { - var swapDims = function swapDims(d) { - var p = d.indexOf("x"); - if (p !== -1) { - return d.substr(0, p) + "x" + d.substr(p + 1); - } - return d; - }; - - if (!photoID) return false; - if (!direction) return false; - - var params = { - photoID: photoID, - direction: direction - }; - - api.post("PhotoEditor::rotate", params, function (data) { - if (data !== true) { - lychee.error(null, params, data); - } else { - var mr = "?" + Math.random(); - var sel_big = "img#image"; - var sel_thumb = "div[data-id=" + photoID + "] > span > img"; - var sel_div = "div[data-id=" + photoID + "]"; - $(sel_big).prop("src", $(sel_big).attr("src") + mr); - $(sel_big).prop("srcset", $(sel_big).attr("src")); - $(sel_thumb).prop("src", $(sel_thumb).attr("src") + mr); - $(sel_thumb).prop("srcset", $(sel_thumb).attr("src")); - var arrayLength = album.json.photos.length; - for (var i = 0; i < arrayLength; i++) { - if (album.json.photos[i].id === photoID) { - var w = album.json.photos[i].width; - var h = album.json.photos[i].height; - album.json.photos[i].height = w; - album.json.photos[i].width = h; - album.json.photos[i].small += mr; - album.json.photos[i].small_dim = swapDims(album.json.photos[i].small_dim); - album.json.photos[i].small2x += mr; - album.json.photos[i].small2x_dim = swapDims(album.json.photos[i].small2x_dim); - album.json.photos[i].medium += mr; - album.json.photos[i].medium_dim = swapDims(album.json.photos[i].medium_dim); - album.json.photos[i].medium2x += mr; - album.json.photos[i].medium2x_dim = swapDims(album.json.photos[i].medium2x_dim); - album.json.photos[i].thumb2x += mr; - album.json.photos[i].thumbUrl += mr; - album.json.photos[i].url += mr; - view.album.content.justify(); - break; - } - } - } - }); -}; - -/** - * @description Searches through your photos and albums. - */ - -var search = { - hash: null -}; - -search.find = function (term) { - if (term.trim() === "") return false; - - clearTimeout($(window).data("timeout")); - - $(window).data("timeout", setTimeout(function () { - if (header.dom(".header__search").val().length !== 0) { - api.post("search", { term: term }, function (data) { - var html = ""; - var albumsData = ""; - var photosData = ""; - - // Build albums - if (data && data.albums) { - albums.json = { albums: data.albums }; - $.each(albums.json.albums, function () { - albums.parse(this); - albumsData += build.album(this); - }); - } - - // Build photos - if (data && data.photos) { - album.json = { photos: data.photos }; - $.each(album.json.photos, function () { - photosData += build.photo(this); - }); - } - - var albums_divider = lychee.locale["ALBUMS"]; - var photos_divider = lychee.locale["PHOTOS"]; - - if (albumsData !== "") albums_divider += " (" + data.albums.length + ")"; - if (photosData !== "") { - photos_divider += " (" + data.photos.length + ")"; - if (lychee.layout === "1") { - photosData = '
' + photosData + "
"; - } else if (lychee.layout === "2") { - photosData = '
' + photosData + "
"; - } - } - - // 1. No albums and photos - // 2. Only photos - // 3. Only albums - // 4. Albums and photos - if (albumsData === "" && photosData === "") html = "error";else if (albumsData === "") html = build.divider(photos_divider) + photosData;else if (photosData === "") html = build.divider(albums_divider) + albumsData;else html = build.divider(albums_divider) + albumsData + build.divider(photos_divider) + photosData; - - // Only refresh view when search results are different - if (search.hash !== data.hash) { - $(".no_content").remove(); - - lychee.animate(".content", "contentZoomOut"); - - search.hash = data.hash; - - setTimeout(function () { - if (visible.photo()) view.photo.hide(); - if (visible.sidebar()) _sidebar.toggle(); - if (visible.mapview()) mapview.close(); - - header.setMode("albums"); - - if (html === "error") { - lychee.content.html(""); - $("body").append(build.no_content("magnifying-glass")); - } else { - lychee.content.html(html); - view.album.content.justify(); - lychee.animate(lychee.content, "contentZoomIn"); - } - lychee.setTitle(lychee.locale["SEARCH_RESULTS"], false); - }, 300); - } - }); - } else search.reset(); - }, 250)); -}; - -search.reset = function () { - header.dom(".header__search").val(""); - $(".no_content").remove(); - - if (search.hash != null) { - // Trash data - albums.json = null; - album.json = null; - _photo.json = null; - search.hash = null; - - lychee.animate(".divider", "fadeOut"); - lychee.goto(); - } -}; - -/** - * @description Lets you change settings. - */ - -var settings = {}; - -settings.open = function () { - view.settings.init(); -}; - -settings.createConfig = function () { - var action = function action(data) { - var dbName = data.dbName || ""; - var dbUser = data.dbUser || ""; - var dbPassword = data.dbPassword || ""; - var dbHost = data.dbHost || ""; - var dbTablePrefix = data.dbTablePrefix || ""; - - if (dbUser.length < 1) { - basicModal.error("dbUser"); - return false; - } - - if (dbHost.length < 1) dbHost = "localhost"; - if (dbName.length < 1) dbName = "lychee"; - - var params = { - dbName: dbName, - dbUser: dbUser, - dbPassword: dbPassword, - dbHost: dbHost, - dbTablePrefix: dbTablePrefix - }; - - api.post("Config::create", params, function (_data) { - if (_data !== true) { - // Connection failed - if (_data === "Warning: Connection failed!") { - basicModal.show({ - body: "

" + lychee.locale["ERROR_DB_1"] + "

", - buttons: { - action: { - title: lychee.locale["RETRY"], - fn: settings.createConfig - } - } - }); - - return false; - } - - // Creation failed - if (_data === "Warning: Creation failed!") { - basicModal.show({ - body: "

" + lychee.locale["ERROR_DB_2"] + "

", - buttons: { - action: { - title: lychee.locale["RETRY"], - fn: settings.createConfig - } - } - }); - - return false; - } - - // Could not create file - if (_data === "Warning: Could not create file!") { - basicModal.show({ - body: "

" + lychee.locale["ERROR_CONFIG_FILE"] + "

", - buttons: { - action: { - title: lychee.locale["RETRY"], - fn: settings.createConfig - } - } - }); - - return false; - } - - // Something went wrong - basicModal.show({ - body: "

" + lychee.locale["ERROR_UNKNOWN"] + "

", - buttons: { - action: { - title: lychee.locale["RETRY"], - fn: settings.createConfig - } - } - }); - - return false; - } else { - // Configuration successful - window.location.reload(); - - return false; - } - }); - }; - - var msg = "\n\t\t\t

\n\t\t\t\t " + lychee.locale["DB_INFO_TITLE"] + "\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t\t\t

\n\t\t\t

\n\t\t\t\t " + lychee.locale["DB_INFO_TEXT"] + "\n\t\t\t\t \n\t\t\t\t \n\t\t\t

\n\t\t\t "; - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["DB_CONNECT"], - fn: action - } - } - }); -}; - -settings.createLogin = function () { - var action = function action(data) { - var username = data.username; - var password = data.password; - var confirm = data.confirm; - - if (username.length < 1) { - basicModal.error("username"); - return false; - } - - if (password.length < 1) { - basicModal.error("password"); - return false; - } - - if (password !== confirm) { - basicModal.error("confirm"); - return false; - } - - basicModal.close(); - - var params = { - username: username, - password: password - }; - - api.post("Settings::setLogin", params, function (_data) { - if (_data !== true) { - basicModal.show({ - body: "

" + lychee.locale["ERROR_LOGIN"] + "

", - buttons: { - action: { - title: lychee.locale["RETRY"], - fn: settings.createLogin - } - } - }); - } - // else - // { - // window.location.reload() - // } - }); - }; - - var msg = "\n\t\t\t

\n\t\t\t\t " + lychee.locale["LOGIN_TITLE"] + "\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t\t\t

\n\t\t\t "; - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["LOGIN_CREATE"], - fn: action - } - } - }); -}; - -// from https://github.com/electerious/basicModal/blob/master/src/scripts/main.js -settings.getValues = function (form_name) { - var values = {}; - var inputs_select = $(form_name + " input[name], " + form_name + " select[name]"); - - // Get value from all inputs - $(inputs_select).each(function () { - var name = $(this).attr("name"); - // Store name and value of input - values[name] = $(this).val(); - }); - return Object.keys(values).length === 0 ? null : values; -}; - -// from https://github.com/electerious/basicModal/blob/master/src/scripts/main.js -settings.bind = function (item, name, fn) { - // if ($(item).length) - // { - // console.log('found'); - // } - // else - // { - // console.log('not found: ' + item); - // } - // Action-button - $(item).on("click", function () { - fn(settings.getValues(name)); - }); -}; - -settings.changeLogin = function (params) { - if (params.username.length < 1) { - loadingBar.show("error", "new username cannot be empty."); - $("input[name=username]").addClass("error"); - return false; - } else { - $("input[name=username]").removeClass("error"); - } - - if (params.password.length < 1) { - loadingBar.show("error", "new password cannot be empty."); - $("input[name=password]").addClass("error"); - return false; - } else { - $("input[name=password]").removeClass("error"); - } - - if (params.password !== params.confirm) { - loadingBar.show("error", "new password does not match."); - $("input[name=confirm]").addClass("error"); - return false; - } else { - $("input[name=confirm]").removeClass("error"); - } - - api.post("Settings::setLogin", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, datas, data); - } else { - $("input[name]").removeClass("error"); - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_LOGIN"]); - view.settings.content.clearLogin(); - } - }); -}; - -settings.changeSorting = function (params) { - api.post("Settings::setSorting", params, function (data) { - if (data === true) { - lychee.sortingAlbums = "ORDER BY " + params["typeAlbums"] + " " + params["orderAlbums"]; - lychee.sortingPhotos = "ORDER BY " + params["typePhotos"] + " " + params["orderPhotos"]; - albums.refresh(); - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_SORT"]); - } else lychee.error(null, params, data); - }); -}; - -settings.changeDropboxKey = function (params) { - // let key = params.key; - - if (params.key.length < 1) { - loadingBar.show("error", "key cannot be empty."); - return false; - } - - api.post("Settings::setDropboxKey", params, function (data) { - if (data === true) { - lychee.dropboxKey = params.key; - // if (callback) lychee.loadDropbox(callback) - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_DROPBOX"]); - } else lychee.error(null, params, data); - }); -}; - -settings.changeLang = function (params) { - api.post("Settings::setLang", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_LANG"]); - lychee.init(); - } else lychee.error(null, params, data); - }); -}; - -settings.setDefaultLicense = function (params) { - api.post("Settings::setDefaultLicense", params, function (data) { - if (data === true) { - lychee.default_license = params.license; - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_LICENSE"]); - } else lychee.error(null, params, data); - }); -}; - -settings.setLayout = function (params) { - api.post("Settings::setLayout", params, function (data) { - if (data === true) { - lychee.layout = params.layout; - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_LAYOUT"]); - } else lychee.error(null, params, data); - }); -}; - -settings.changePublicSearch = function () { - var params = {}; - if ($("#PublicSearch:checked").length === 1) { - params.public_search = "1"; - } else { - params.public_search = "0"; - } - api.post("Settings::setPublicSearch", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_PUBLIC_SEARCH"]); - lychee.public_search = params.public_search === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.changeImageOverlay = function () { - var params = {}; - if ($("#ImageOverlay:checked").length === 1) { - params.image_overlay = "1"; - - // enable image_overlay_type - $("select#ImgOverlayType").attr("disabled", false); - } else { - params.image_overlay = "0"; - - // disable image_overlay_type - $("select#ImgOverlayType").attr("disabled", true); - } - api.post("Settings::setImageOverlay", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_IMAGE_OVERLAY"]); - lychee.image_overlay_default = params.image_overlay === "1"; - lychee.image_overlay = lychee.image_overlay_default; - } else lychee.error(null, params, data); - }); -}; - -settings.setOverlayType = function () { - // validate the input - var params = {}; - if ($("#ImageOverlay:checked") && $("#ImgOverlayType").val() === "exif") { - params.image_overlay_type = "exif"; - } else if ($("#ImageOverlay:checked") && $("#ImgOverlayType").val() === "desc") { - params.image_overlay_type = "desc"; - } else if ($("#ImageOverlay:checked") && $("#ImgOverlayType").val() === "takedate") { - params.image_overlay_type = "takedate"; - } else { - params.image_overlay_type = "exif"; - console.log("Error - default used"); - } - - api.post("Settings::setOverlayType", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_IMAGE_OVERLAY"]); - lychee.image_overlay_type = params.image_overlay_type; - lychee.image_overlay_type_default = params.image_overlay_type; - } else lychee.error(null, params, data); - }); -}; - -settings.changeMapDisplay = function () { - var params = {}; - if ($("#MapDisplay:checked").length === 1) { - params.map_display = "1"; - } else { - params.map_display = "0"; - } - api.post("Settings::setMapDisplay", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY"]); - lychee.map_display = params.map_display === "1"; - } else lychee.error(null, params, data); - }); - // Map functionality is disabled - // -> map for public albums also needs to be disabled - if (lychee.map_display_public === true) { - $("#MapDisplayPublic").click(); - } -}; - -settings.changeMapDisplayPublic = function () { - var params = {}; - if ($("#MapDisplayPublic:checked").length === 1) { - params.map_display_public = "1"; - - // If public map functionality is enabled, but map in general is disabled - // General map functionality needs to be enabled - if (lychee.map_display === false) { - $("#MapDisplay").click(); - } - } else { - params.map_display_public = "0"; - } - api.post("Settings::setMapDisplayPublic", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY_PUBLIC"]); - lychee.map_display_public = params.map_display_public === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.setMapProvider = function () { - // validate the input - var params = {}; - params.map_provider = $("#MapProvider").val(); - - api.post("Settings::setMapProvider", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_PROVIDER"]); - lychee.map_provider = params.map_provider; - } else lychee.error(null, params, data); - }); -}; - -settings.changeMapIncludeSubalbums = function () { - var params = {}; - if ($("#MapIncludeSubalbums:checked").length === 1) { - params.map_include_subalbums = "1"; - } else { - params.map_include_subalbums = "0"; - } - api.post("Settings::setMapIncludeSubalbums", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY"]); - lychee.map_include_subalbums = params.map_include_subalbums === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.changeLocationDecoding = function () { - var params = {}; - if ($("#LocationDecoding:checked").length === 1) { - params.location_decoding = "1"; - } else { - params.location_decoding = "0"; - } - api.post("Settings::setLocationDecoding", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY"]); - lychee.location_decoding = params.location_decoding === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.changeNSFWVisible = function () { - var params = {}; - if ($("#NSFWVisible:checked").length === 1) { - params.nsfw_visible = "1"; - } else { - params.nsfw_visible = "0"; - } - api.post("Settings::setNSFWVisible", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_NSFW_VISIBLE"]); - lychee.nsfw_visible = params.nsfw_visible === "1"; - lychee.nsfw_visible_saved = lychee.nsfw_visible; - } else { - lychee.error(null, params, data); - } - }); -}; - -//TODO : later -// lychee.nsfw_blur = (data.config.nsfw_blur && data.config.nsfw_blur === '1') || false; -// lychee.nsfw_warning = (data.config.nsfw_warning && data.config.nsfw_warning === '1') || false; -// lychee.nsfw_warning_text = data.config.nsfw_warning_text || 'Sensitive content

This album contains sensitive content which some people may find offensive or disturbing.

'; - -settings.changeLocationShow = function () { - var params = {}; - if ($("#LocationShow:checked").length === 1) { - params.location_show = "1"; - } else { - params.location_show = "0"; - // Don't show location - // -> location for public albums also needs to be disabled - if (lychee.location_show_public === true) { - $("#LocationShowPublic").click(); - } - } - api.post("Settings::setLocationShow", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY"]); - lychee.location_show = params.location_show === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.changeLocationShowPublic = function () { - var params = {}; - if ($("#LocationShowPublic:checked").length === 1) { - params.location_show_public = "1"; - // If public map functionality is enabled, but map in general is disabled - // General map functionality needs to be enabled - if (lychee.location_show === false) { - $("#LocationShow").click(); - } - } else { - params.location_show_public = "0"; - } - api.post("Settings::setLocationShowPublic", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_MAP_DISPLAY"]); - lychee.location_show_public = params.location_show_public === "1"; - } else lychee.error(null, params, data); - }); -}; - -settings.changeCSS = function () { - var params = {}; - params.css = $("#css").val(); - - api.post("Settings::setCSS", params, function (data) { - if (data === true) { - lychee.css = params.css; - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_CSS"]); - } else lychee.error(null, params, data); - }); -}; - -settings.save = function (params) { - api.post("Settings::saveAll", params, function (data) { - if (data === true) { - loadingBar.show("success", lychee.locale["SETTINGS_SUCCESS_UPDATE"]); - view.full_settings.init(); - // lychee.init(); - } else lychee.error("Check the Logs", params, data); - }); -}; - -settings.save_enter = function (e) { - if (e.which === 13) { - // show confirmation box - $(":focus").blur(); - - var action = {}; - var cancel = {}; - - action.title = lychee.locale["ENTER"]; - action.msg = lychee.html(_templateObject69, lychee.locale["SAVE_RISK"]); - - cancel.title = lychee.locale["CANCEL"]; - - action.fn = function () { - settings.save(settings.getValues("#fullSettings")); - basicModal.close(); - }; - - basicModal.show({ - body: action.msg, - buttons: { - action: { - title: action.title, - fn: action.fn, - class: "red" - }, - cancel: { - title: cancel.title, - fn: basicModal.close - } - } - }); - } -}; - -var sharing = { - json: null -}; - -sharing.add = function () { - var params = { - albumIDs: "", - UserIDs: "" - }; - - $("#albums_list_to option").each(function () { - if (params.albumIDs !== "") params.albumIDs += ","; - params.albumIDs += this.value; - }); - - $("#user_list_to option").each(function () { - if (params.UserIDs !== "") params.UserIDs += ","; - params.UserIDs += this.value; - }); - - if (params.albumIDs === "") { - loadingBar.show("error", "Select an album to share!"); - return false; - } - if (params.UserIDs === "") { - loadingBar.show("error", "Select a user to share with!"); - return false; - } - - api.post("Sharing::Add", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", "Sharing updated!"); - sharing.list(); // reload user list - } - }); -}; - -sharing.delete = function () { - var params = { - ShareIDs: "" - }; - - $('input[name="remove_id"]:checked').each(function () { - if (params.ShareIDs !== "") params.ShareIDs += ","; - params.ShareIDs += this.value; - }); - - if (params.ShareIDs === "") { - loadingBar.show("error", "Select a sharing to remove!"); - return false; - } - api.post("Sharing::Delete", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", "Sharing removed!"); - sharing.list(); // reload user list - } - }); -}; - -sharing.list = function () { - api.post("Sharing::List", {}, function (data) { - sharing.json = data; - view.sharing.init(); - }); -}; - -/** - * @description This module takes care of the sidebar. - */ - -var _sidebar = { - _dom: $(".sidebar"), - types: { - DEFAULT: 0, - TAGS: 1 - }, - createStructure: {} -}; - -_sidebar.dom = function (selector) { - if (selector == null || selector === "") return _sidebar._dom; - - return _sidebar._dom.find(selector); -}; - -_sidebar.bind = function () { - // This function should be called after building and appending - // the sidebars content to the DOM. - // This function can be called multiple times, therefore - // event handlers should be removed before binding a new one. - - // Event Name - var eventName = lychee.getEventName(); - - _sidebar.dom("#edit_title").off(eventName).on(eventName, function () { - if (visible.photo()) _photo.setTitle([_photo.getID()]);else if (visible.album()) album.setTitle([album.getID()]); - }); - - _sidebar.dom("#edit_description").off(eventName).on(eventName, function () { - if (visible.photo()) _photo.setDescription(_photo.getID());else if (visible.album()) album.setDescription(album.getID()); - }); - - _sidebar.dom("#edit_showtags").off(eventName).on(eventName, function () { - album.setShowTags(album.getID()); - }); - - _sidebar.dom("#edit_tags").off(eventName).on(eventName, function () { - _photo.editTags([_photo.getID()]); - }); - - _sidebar.dom("#tags .tag").off(eventName).on(eventName, function () { - _sidebar.triggerSearch($(this).text()); - }); - - _sidebar.dom("#tags .tag span").off(eventName).on(eventName, function () { - _photo.deleteTag(_photo.getID(), $(this).data("index")); - }); - - _sidebar.dom("#edit_license").off(eventName).on(eventName, function () { - if (visible.photo()) _photo.setLicense(_photo.getID());else if (visible.album()) album.setLicense(album.getID()); - }); - - _sidebar.dom("#edit_sorting").off(eventName).on(eventName, function () { - album.setSorting(album.getID()); - }); - - _sidebar.dom(".attr_location").off(eventName).on(eventName, function () { - _sidebar.triggerSearch($(this).text()); - }); - - return true; -}; - -_sidebar.triggerSearch = function (search_string) { - // If public search is diabled -> do nothing - if (lychee.publicMode === true && !lychee.public_search) { - // Do not display an error -> just do nothing to not confuse the user - return; - } - - search.hash = null; - // We're either logged in or public search is allowed - lychee.goto("search/" + encodeURIComponent(search_string)); -}; - -_sidebar.toggle = function () { - if (visible.sidebar() || visible.sidebarbutton()) { - header.dom(".button--info").toggleClass("active"); - lychee.content.toggleClass("content--sidebar"); - lychee.imageview.toggleClass("image--sidebar"); - if (typeof view !== "undefined") view.album.content.justify(); - _sidebar.dom().toggleClass("active"); - _photo.updateSizeLivePhotoDuringAnimation(); - - return true; - } - - return false; -}; - -_sidebar.setSelectable = function () { - var selectable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - - // Attributes/Values inside the sidebar are selectable by default. - // Selection needs to be deactivated to prevent an unwanted selection - // while using multiselect. - - if (selectable === true) _sidebar.dom().removeClass("notSelectable");else _sidebar.dom().addClass("notSelectable"); -}; - -_sidebar.changeAttr = function (attr) { - var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "-"; - var dangerouslySetInnerHTML = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - if (attr == null || attr === "") return false; - - // Set a default for the value - if (value == null || value === "") value = "-"; - - // Escape value - if (dangerouslySetInnerHTML === false) value = lychee.escapeHTML(value); - - // Set new value - _sidebar.dom(".attr_" + attr).html(value); - - return true; -}; - -_sidebar.hideAttr = function (attr) { - _sidebar.dom(".attr_" + attr).closest("tr").hide(); -}; - -_sidebar.secondsToHMS = function (d) { - d = Number(d); - var h = Math.floor(d / 3600); - var m = Math.floor(d % 3600 / 60); - var s = Math.floor(d % 60); - - return (h > 0 ? h.toString() + "h" : "") + (m > 0 ? m.toString() + "m" : "") + (s > 0 || h == 0 && m == 0 ? s.toString() + "s" : ""); -}; - -_sidebar.createStructure.photo = function (data) { - if (data == null || data === "") return false; - - var editable = typeof album !== "undefined" ? album.isUploadable() : false; - var exifHash = data.takedate + data.make + data.model + data.shutter + data.aperture + data.focal + data.iso; - var locationHash = data.longitude + data.latitude + data.altitude; - var structure = {}; - var _public = ""; - var isVideo = data.type && data.type.indexOf("video") > -1; - var license = void 0; - - // Set the license string for a photo - switch (data.license) { - // if the photo doesn't have a license - case "none": - license = ""; - break; - // Localize All Rights Reserved - case "reserved": - license = lychee.locale["PHOTO_RESERVED"]; - break; - // Display anything else that's set - default: - license = data.license; - break; - } - - // Set value for public - switch (data.public) { - case "0": - _public = lychee.locale["PHOTO_SHR_NO"]; - break; - case "1": - _public = lychee.locale["PHOTO_SHR_PHT"]; - break; - case "2": - _public = lychee.locale["PHOTO_SHR_ALB"]; - break; - default: - _public = "-"; - break; - } - - structure.basics = { - title: lychee.locale["PHOTO_BASICS"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_TITLE"], kind: "title", value: data.title, editable: editable }, { title: lychee.locale["PHOTO_UPLOADED"], kind: "uploaded", value: data.sysdate }, { title: lychee.locale["PHOTO_DESCRIPTION"], kind: "description", value: data.description, editable: editable }] - }; - - structure.image = { - title: lychee.locale[isVideo ? "PHOTO_VIDEO" : "PHOTO_IMAGE"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_SIZE"], kind: "size", value: data.size }, { title: lychee.locale["PHOTO_FORMAT"], kind: "type", value: data.type }, { title: lychee.locale["PHOTO_RESOLUTION"], kind: "resolution", value: data.width + " x " + data.height }] - }; - - if (isVideo) { - if (data.width === 0 || data.height === 0) { - // Remove the "Resolution" line if we don't have the data. - structure.image.rows.splice(-1, 1); - } - - // We overload the database, storing duration (in full seconds) in - // "aperture" and frame rate (floating point with three digits after - // the decimal point) in "focal". - if (data.aperture != "") { - structure.image.rows.push({ title: lychee.locale["PHOTO_DURATION"], kind: "duration", value: _sidebar.secondsToHMS(data.aperture) }); - } - if (data.focal != "") { - structure.image.rows.push({ title: lychee.locale["PHOTO_FPS"], kind: "fps", value: data.focal + " fps" }); - } - } - - // Always create tags section - behaviour for editing - //tags handled when contructing the html code for tags - - structure.tags = { - title: lychee.locale["PHOTO_TAGS"], - type: _sidebar.types.TAGS, - value: build.tags(data.tags), - editable: editable - }; - - // Only create EXIF section when EXIF data available - if (exifHash !== "") { - structure.exif = { - title: lychee.locale["PHOTO_CAMERA"], - type: _sidebar.types.DEFAULT, - rows: isVideo ? [{ title: lychee.locale["PHOTO_CAPTURED"], kind: "takedate", value: data.takedate }, { title: lychee.locale["PHOTO_MAKE"], kind: "make", value: data.make }, { title: lychee.locale["PHOTO_TYPE"], kind: "model", value: data.model }] : [{ title: lychee.locale["PHOTO_CAPTURED"], kind: "takedate", value: data.takedate }, { title: lychee.locale["PHOTO_MAKE"], kind: "make", value: data.make }, { title: lychee.locale["PHOTO_TYPE"], kind: "model", value: data.model }, { title: lychee.locale["PHOTO_LENS"], kind: "lens", value: data.lens }, { title: lychee.locale["PHOTO_SHUTTER"], kind: "shutter", value: data.shutter }, { title: lychee.locale["PHOTO_APERTURE"], kind: "aperture", value: data.aperture }, { title: lychee.locale["PHOTO_FOCAL"], kind: "focal", value: data.focal }, { title: lychee.locale["PHOTO_ISO"], kind: "iso", value: data.iso }] - }; - } else { - structure.exif = {}; - } - - structure.sharing = { - title: lychee.locale["PHOTO_SHARING"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_SHR_PLUBLIC"], kind: "public", value: _public }] - }; - - structure.license = { - title: lychee.locale["PHOTO_REUSE"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_LICENSE"], kind: "license", value: license, editable: editable }] - }; - - if (locationHash !== "" && locationHash !== 0) { - structure.location = { - title: lychee.locale["PHOTO_LOCATION"], - type: _sidebar.types.DEFAULT, - rows: [{ - title: lychee.locale["PHOTO_LATITUDE"], - kind: "latitude", - value: data.latitude ? DecimalToDegreeMinutesSeconds(data.latitude, true) : "" - }, { - title: lychee.locale["PHOTO_LONGITUDE"], - kind: "longitude", - value: data.longitude ? DecimalToDegreeMinutesSeconds(data.longitude, false) : "" - }, - // No point in displaying sub-mm precision; 10cm is more than enough. - { - title: lychee.locale["PHOTO_ALTITUDE"], - kind: "altitude", - value: data.altitude ? (Math.round(parseFloat(data.altitude) * 10) / 10).toString() + "m" : "" - }, { title: lychee.locale["PHOTO_LOCATION"], kind: "location", value: data.location ? data.location : "" }] - }; - if (data.imgDirection) { - // No point in display sub-degree precision. - structure.location.rows.push({ - title: lychee.locale["PHOTO_IMGDIRECTION"], - kind: "imgDirection", - value: Math.round(data.imgDirection).toString() + "°" - }); - } - } else { - structure.location = {}; - } - - // Construct all parts of the structure - var structure_ret = [structure.basics, structure.image, structure.tags, structure.exif, structure.location, structure.license]; - - if (!lychee.publicMode) { - structure_ret.push(structure.sharing); - } - - return structure_ret; -}; - -_sidebar.createStructure.album = function (album) { - var data = album.json; - - if (data == null || data === "") return false; - - var editable = album.isUploadable(); - var structure = {}; - var _public = ""; - var hidden = ""; - var downloadable = ""; - var share_button_visible = ""; - var password = ""; - var license = ""; - var sorting = ""; - - // Set value for public - switch (data.public) { - case "0": - _public = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - _public = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - _public = "-"; - break; - } - - // Set value for hidden - switch (data.visible) { - case "0": - hidden = lychee.locale["ALBUM_SHR_YES"]; - break; - case "1": - hidden = lychee.locale["ALBUM_SHR_NO"]; - break; - default: - hidden = "-"; - break; - } - - // Set value for downloadable - switch (data.downloadable) { - case "0": - downloadable = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - downloadable = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - downloadable = "-"; - break; - } - - // Set value for share_button_visible - switch (data.share_button_visible) { - case "0": - share_button_visible = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - share_button_visible = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - share_button_visible = "-"; - break; - } - - // Set value for password - switch (data.password) { - case "0": - password = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - password = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - password = "-"; - break; - } - - // Set license string - switch (data.license) { - case "none": - license = ""; // consistency - break; - case "reserved": - license = lychee.locale["ALBUM_RESERVED"]; - break; - default: - license = data.license; - break; - } - - if (data.sorting_col === "") { - sorting = lychee.locale["DEFAULT"]; - } else { - sorting = data.sorting_col + " " + data.sorting_order; - } - - structure.basics = { - title: lychee.locale["ALBUM_BASICS"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_TITLE"], kind: "title", value: data.title, editable: editable }, { title: lychee.locale["ALBUM_DESCRIPTION"], kind: "description", value: data.description, editable: editable }] - }; - - if (album.isTagAlbum()) { - structure.basics.rows.push({ title: lychee.locale["ALBUM_SHOW_TAGS"], kind: "showtags", value: data.show_tags, editable: editable }); - } - - var videoCount = 0; - $.each(data.photos, function () { - if (this.type && this.type.indexOf("video") > -1) { - videoCount++; - } - }); - structure.album = { - title: lychee.locale["ALBUM_ALBUM"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_CREATED"], kind: "created", value: data.sysdate }] - }; - if (data.albums && data.albums.length > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_SUBALBUMS"], kind: "subalbums", value: data.albums.length }); - } - if (data.photos) { - if (data.photos.length - videoCount > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_IMAGES"], kind: "images", value: data.photos.length - videoCount }); - } - } - if (videoCount > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_VIDEOS"], kind: "videos", value: videoCount }); - } - - if (data.photos) { - structure.album.rows.push({ title: lychee.locale["ALBUM_ORDERING"], kind: "sorting", value: sorting, editable: editable }); - } - - structure.share = { - title: lychee.locale["ALBUM_SHARING"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_PUBLIC"], kind: "public", value: _public }, { title: lychee.locale["ALBUM_HIDDEN"], kind: "hidden", value: hidden }, { title: lychee.locale["ALBUM_DOWNLOADABLE"], kind: "downloadable", value: downloadable }, { title: lychee.locale["ALBUM_SHARE_BUTTON_VISIBLE"], kind: "share_button_visible", value: share_button_visible }, { title: lychee.locale["ALBUM_PASSWORD"], kind: "password", value: password }] - }; - - if (data.owner != null) { - structure.share.rows.push({ title: lychee.locale["ALBUM_OWNER"], kind: "owner", value: data.owner }); - } - - structure.license = { - title: lychee.locale["ALBUM_REUSE"], - type: _sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_LICENSE"], kind: "license", value: license, editable: editable }] - }; - - // Construct all parts of the structure - var structure_ret = [structure.basics, structure.album, structure.license]; - if (!lychee.publicMode) { - structure_ret.push(structure.share); - } - - return structure_ret; -}; - -_sidebar.has_location = function (structure) { - if (structure == null || structure === "" || structure === false) return false; - - var _has_location = false; - - structure.forEach(function (section) { - if (section.title == lychee.locale["PHOTO_LOCATION"]) { - _has_location = true; - } - }); - - return _has_location; -}; - -_sidebar.render = function (structure) { - if (structure == null || structure === "" || structure === false) return false; - - var html = ""; - - var renderDefault = function renderDefault(section) { - var _html = ""; - - _html += "\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t "; - - if (section.title == lychee.locale["PHOTO_LOCATION"]) { - var _has_latitude = false; - var _has_longitude = false; - - section.rows.forEach(function (row, index, object) { - if (row.kind == "latitude" && row.value !== "") { - _has_latitude = true; - } - - if (row.kind == "longitude" && row.value !== "") { - _has_longitude = true; - } - - // Do not show location is not enabled - if (row.kind == "location" && (lychee.publicMode === true && !lychee.location_show_public || !lychee.location_show)) { - object.splice(index, 1); - } else { - // Explode location string into an array to keep street, city etc separate - if (!(row.value === "" || row.value == null)) { - section.rows[index].value = row.value.split(",").map(function (item) { - return item.trim(); - }); - } - } - }); - - if (_has_latitude && _has_longitude && lychee.map_display) { - _html += "\n\t\t\t\t\t\t
\n\t\t\t\t\t\t "; - } - } - - section.rows.forEach(function (row) { - var value = row.value; - - // show only Exif rows which have a value or if its editable - if (!(value === "" || value == null) || row.editable === true) { - // Wrap span-element around value for easier selecting on change - if (Array.isArray(row.value)) { - value = ""; - row.value.forEach(function (v) { - if (v === "" || v == null) { - return; - } - // Add separator if needed - if (value !== "") { - value += lychee.html(_templateObject70, row.kind); - } - value += lychee.html(_templateObject71, row.kind, v); - }); - } else { - value = lychee.html(_templateObject72, row.kind, value); - } - - // Add edit-icon to the value when editable - if (row.editable === true) value += " " + build.editIcon("edit_" + row.kind); - - _html += lychee.html(_templateObject73, row.title, value); - } - }); - - _html += "\n\t\t\t\t
\n\t\t\t\t "; - - return _html; - }; - - var renderTags = function renderTags(section) { - var _html = ""; - var editable = ""; - - // Add edit-icon to the value when editable - if (section.editable === true) editable = build.editIcon("edit_tags"); - - _html += lychee.html(_templateObject74, section.title, section.title.toLowerCase(), section.value, editable); - - return _html; - }; - - structure.forEach(function (section) { - if (section.type === _sidebar.types.DEFAULT) html += renderDefault(section);else if (section.type === _sidebar.types.TAGS) html += renderTags(section); - }); - - return html; -}; - -function DecimalToDegreeMinutesSeconds(decimal, type) { - var degrees = 0; - var minutes = 0; - var seconds = 0; - var direction = void 0; - - //decimal must be integer or float no larger than 180; - //type must be Boolean - if (Math.abs(decimal) > 180 || typeof type !== "boolean") { - return false; - } - - //inputs OK, proceed - //type is latitude when true, longitude when false - - //set direction; north assumed - if (type && decimal < 0) { - direction = "S"; - } else if (!type && decimal < 0) { - direction = "W"; - } else if (!type) { - direction = "E"; - } else { - direction = "N"; - } - - //get absolute value of decimal - var d = Math.abs(decimal); - - //get degrees - degrees = Math.floor(d); - - //get seconds - seconds = (d - degrees) * 3600; - - //get minutes - minutes = Math.floor(seconds / 60); - - //reset seconds - seconds = Math.floor(seconds - minutes * 60); - - return degrees + "° " + minutes + "' " + seconds + '" ' + direction; -} - -/** - * @description Swipes and moves an object. - */ - -var swipe = { - obj: null, - offsetX: 0, - offsetY: 0, - preventNextHeaderToggle: false -}; - -swipe.start = function (obj) { - if (obj) swipe.obj = obj; - return true; -}; - -swipe.move = function (e) { - if (swipe.obj === null) { - return false; - } - - if (Math.abs(e.x) > Math.abs(e.y)) { - swipe.offsetX = -1 * e.x; - swipe.offsetY = 0.0; - } else { - swipe.offsetX = 0.0; - swipe.offsetY = +1 * e.y; - } - - var value = "translate(" + swipe.offsetX + "px, " + swipe.offsetY + "px)"; - swipe.obj.css({ - WebkitTransform: value, - MozTransform: value, - transform: value - }); - return; -}; - -swipe.stop = function (e, left, right) { - // Only execute once - if (swipe.obj == null) { - return false; - } - - if (e.y <= -lychee.swipe_tolerance_y) { - lychee.goto(album.getID()); - } else if (e.y >= lychee.swipe_tolerance_y) { - lychee.goto(album.getID()); - } else if (e.x <= -lychee.swipe_tolerance_x) { - left(true); - - // 'touchend' will be called after 'swipeEnd' - // in case of moving to next image, we want to skip - // the toggling of the header - swipe.preventNextHeaderToggle = true; - } else if (e.x >= lychee.swipe_tolerance_x) { - right(true); - - // 'touchend' will be called after 'swipeEnd' - // in case of moving to next image, we want to skip - // the toggling of the header - swipe.preventNextHeaderToggle = true; - } else { - var value = "translate(0px, 0px)"; - swipe.obj.css({ - WebkitTransform: value, - MozTransform: value, - transform: value - }); - } - - swipe.obj = null; - swipe.offsetX = 0; - swipe.offsetY = 0; - - return; -}; - -/** - * @description Helper class to manage tabindex - */ - -var tabindex = { - offset_for_header: 100, - next_tab_index: 100 -}; - -tabindex.saveSettings = function (elem) { - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter notation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - // TODO: shorter notation - a = $(e).attr("tabindex"); - $(this).data("tabindex-saved", a); - }); -}; - -tabindex.restoreSettings = function (elem) { - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - // TODO: shorter notation - a = $(e).data("tabindex-saved"); - $(e).attr("tabindex", a); - }); -}; - -tabindex.makeUnfocusable = function (elem) { - var saveFocusElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to -1 (i.e. make is not focussable) - tmp.each(function (i, e) { - $(e).attr("tabindex", "-1"); - // Save which element had focus before we make it unfocusable - if (saveFocusElement && $(e).is(":focus")) { - $(e).data("tabindex-focus", true); - // Remove focus - $(e).blur(); - } - }); - - // Disable input fields - $(elem).find("input").attr("disabled", "disabled"); -}; - -tabindex.makeFocusable = function (elem) { - var restoreFocusElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[data-tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - $(e).attr("tabindex", $(e).data("tabindex")); - // restore focus elemente if wanted - if (restoreFocusElement) { - if ($(e).data("tabindex-focus") && lychee.active_focus_on_page_load) { - $(e).focus(); - $(e).removeData("tabindex-focus"); - } - } - }); - - // Enable input fields - $(elem).find("input").removeAttr("disabled"); -}; - -tabindex.get_next_tab_index = function () { - tabindex.next_tab_index = tabindex.next_tab_index + 1; - - return tabindex.next_tab_index - 1; -}; - -tabindex.reset = function () { - tabindex.next_tab_index = tabindex.offset_for_header; -}; - -var u2f = { - json: null -}; - -u2f.is_available = function () { - if (!window.isSecureContext && window.location.hostname !== "localhost" && window.location.hostname !== "127.0.0.1") { - var msg = lychee.html(_templateObject75, lychee.locale["U2F_NOT_SECURE"]); - - basicModal.show({ - body: msg, - buttons: { - cancel: { - title: lychee.locale["CLOSE"], - fn: basicModal.close - } - } - }); - - return false; - } - return true; -}; - -u2f.login = function () { - if (!u2f.is_available()) { - return; - } - - new Larapass({ - login: "/api/webauthn::login", - loginOptions: "/api/webauthn::login/gen" - }).login({ - user_id: 0 // for now it is only available to Admin user via a secret key shortcut. - }).then(function (data) { - loadingBar.show("success", lychee.locale["U2F_AUTHENTIFICATION_SUCCESS"]); - window.location.reload(); - }).catch(function (error) { - return loadingBar.show("error", "Something went wrong!"); - }); -}; - -u2f.register = function () { - if (!u2f.is_available()) { - return; - } - - var larapass = new Larapass({ - register: "/api/webauthn::register", - registerOptions: "/api/webauthn::register/gen" - }); - if (Larapass.supportsWebAuthn()) { - larapass.register().then(function (response) { - loadingBar.show("success", lychee.locale["U2F_REGISTRATION_SUCCESS"]); - u2f.list(); // reload credential list - }).catch(function (response) { - return loadingBar.show("error", "Something went wrong!"); - }); - } else { - loadingBar.show("error", lychee.locale["U2F_NOT_SUPPORTED"]); - } -}; - -u2f.delete = function (params) { - api.post("webauthn::delete", params, function (data) { - console.log(data); - if (!data) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", lychee.locale["U2F_CREDENTIALS_DELETED"]); - u2f.list(); // reload credential list - } - }); -}; - -u2f.list = function () { - api.post("webauthn::list", {}, function (data) { - u2f.json = data; - view.u2f.init(); - }); -}; - -/** - * @description Takes care of every action an album can handle and execute. - */ - -var upload = {}; - -upload.show = function (title, files, callback) { - basicModal.show({ - body: build.uploadModal(title, files), - buttons: { - action: { - title: lychee.locale["CLOSE"], - class: "hidden", - fn: basicModal.close - } - }, - callback: callback - }); -}; - -upload.notify = function (title, text) { - if (text == null || text === "") text = lychee.locale["UPLOAD_MANAGE_NEW_PHOTOS"]; - - if (!window.webkitNotifications) return false; - - if (window.webkitNotifications.checkPermission() !== 0) window.webkitNotifications.requestPermission(); - - if (window.webkitNotifications.checkPermission() === 0 && title) { - var popup = window.webkitNotifications.createNotification("", title, text); - popup.show(); - } -}; - -upload.start = { - local: function local(files) { - var albumID = album.getID(); - var error = false; - var warning = false; - - var process = function process(_files, file) { - var formData = new FormData(); - var xhr = new XMLHttpRequest(); - var pre_progress = 0; - var progress = 0; - var next_file_started = false; - - var finish = function finish() { - window.onbeforeunload = null; - - $("#upload_files").val(""); - - if (error === false && warning === false) { - // Success - basicModal.close(); - upload.notify(lychee.locale["UPLOAD_COMPLETE"]); - } else if (error === false && warning === true) { - // Warning - $(".basicModal #basicModal__action.hidden").show(); - upload.notify(lychee.locale["UPLOAD_COMPLETE"]); - } else { - // Error - $(".basicModal #basicModal__action.hidden").show(); - upload.notify(lychee.locale["UPLOAD_COMPLETE"], lychee.locale["UPLOAD_COMPLETE_FAILED"]); - } - - albums.refresh(); - - if (album.getID() === false) lychee.goto("unsorted");else album.load(albumID); - }; - - formData.append("function", "Photo::add"); - formData.append("albumID", albumID); - formData.append(0, file); - - var api_url = api.get_url("Photo::add"); - - xhr.open("POST", api_url); - - xhr.onload = function () { - var data = null; - var wait = false; - var errorText = ""; - - var isNumber = function isNumber(n) { - return !isNaN(parseFloat(n)) && isFinite(n); - }; - - data = xhr.responseText; - - if (typeof data === "string" && data.search("phpdebugbar") !== -1) { - // get rid of phpdebugbar thingy - var debug_bar_n = data.search(" 0) { - data = data.slice(0, debug_bar_n); - } - } - - try { - data = JSON.parse(data); - } catch (e) { - data = ""; - } - - file.ready = true; - - // Set status - if (xhr.status === 200 && isNumber(data)) { - // Success - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(lychee.locale["UPLOAD_FINISHED"]).addClass("success"); - } else { - if (data.substr(0, 6) === "Error:") { - errorText = data.substr(6) + " " + lychee.locale["UPLOAD_ERROR_CONSOLE"]; - error = true; - - // Error Status - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(lychee.locale["UPLOAD_FAILED"]).addClass("error"); - - // Throw error - if (error === true) lychee.error(lychee.locale["UPLOAD_FAILED_ERROR"], xhr, data); - } else if (data.substr(0, 8) === "Warning:") { - errorText = data.substr(8); - warning = true; - - // Warning Status - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(lychee.locale["UPLOAD_SKIPPED"]).addClass("warning"); - - // Throw error - if (error === true) lychee.error(lychee.locale["UPLOAD_FAILED_WARNING"], xhr, data); - } else { - errorText = lychee.locale["UPLOAD_UNKNOWN"]; - error = true; - - // Error Status - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(lychee.locale["UPLOAD_FAILED"]).addClass("error"); - - // Throw error - if (error === true) lychee.error(lychee.locale["UPLOAD_ERROR_UNKNOWN"], xhr, data); - } - - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") p.notice").html(errorText).show(); - } - - // Check if there are file which are not finished - for (var i = 0; i < _files.length; i++) { - if (_files[i].ready === false) { - wait = true; - break; - } - } - - // Finish upload when all files are finished - if (wait === false) finish(); - }; - - xhr.upload.onprogress = function (e) { - if (e.lengthComputable !== true) return false; - - // Calculate progress - progress = e.loaded / e.total * 100 | 0; - - // Set progress when progress has changed - if (progress > pre_progress) { - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(progress + "%"); - pre_progress = progress; - } - - if (progress >= 100 && next_file_started === false) { - // Scroll to the uploading file - var scrollPos = 0; - if (file.num + 1 > 4) scrollPos = (file.num + 1 - 4) * 40; - $(".basicModal .rows").scrollTop(scrollPos); - - // Set status to processing - $(".basicModal .rows .row:nth-child(" + (file.num + 1) + ") .status").html(lychee.locale["UPLOAD_PROCESSING"]); - - // Upload next file - if (file.next != null) { - process(files, file.next); - next_file_started = true; - } - } - }; - - xhr.setRequestHeader("X-XSRF-TOKEN", csrf.getCookie("XSRF-TOKEN")); - xhr.send(formData); - }; - - if (files.length <= 0) return false; - if (albumID === false || visible.albums() === true) albumID = 0; - - for (var i = 0; i < files.length; i++) { - files[i].num = i; - files[i].ready = false; - - if (i < files.length - 1) files[i].next = files[i + 1];else files[i].next = null; - } - - window.onbeforeunload = function () { - return lychee.locale["UPLOAD_IN_PROGRESS"]; - }; - - upload.show(lychee.locale["UPLOAD_UPLOADING"], files, function () { - // Upload first file - process(files, files[0]); - }); - }, - - url: function url() { - var _url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - var albumID = album.getID(); - - _url = typeof _url === "string" ? _url : ""; - - if (albumID === false) albumID = 0; - - var action = function action(data) { - var files = []; - - if (data.link && data.link.length > 3) { - basicModal.close(); - - files[0] = { - name: data.link - }; - - upload.show(lychee.locale["UPLOAD_IMPORTING_URL"], files, function () { - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_IMPORTING"]); - - var params = { - url: data.link, - albumID: albumID - }; - - api.post("Import::url", params, function (_data) { - // Same code as in import.dropbox() - - if (_data !== true) { - $(".basicModal .rows .row p.notice").html(lychee.locale["UPLOAD_IMPORT_WARN_ERR"]).show(); - - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_FINISHED"]).addClass("warning"); - - // Show close button - $(".basicModal #basicModal__action.hidden").show(); - - // Log error - lychee.error(null, params, _data); - } else { - basicModal.close(); - } - - upload.notify(lychee.locale["UPLOAD_IMPORT_COMPLETE"]); - - albums.refresh(); - - if (album.getID() === false) lychee.goto("0");else album.load(albumID); - }); - }); - } else basicModal.error("link"); - }; - - basicModal.show({ - body: lychee.html(_templateObject76) + lychee.locale["UPLOAD_IMPORT_INSTR"] + ("

"), - buttons: { - action: { - title: lychee.locale["UPLOAD_IMPORT"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); - }, - - server: function server() { - var albumID = album.getID(); - if (albumID === false) albumID = 0; - - var action = function action(data) { - var files = []; - - files[0] = { - name: data.path - }; - - var delete_imported = $('.basicModal .choice input[name="delete"]').prop("checked") ? "1" : "0"; - - upload.show(lychee.locale["UPLOAD_IMPORT_SERVER"], files, function () { - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_IMPORTING"]); - - var params = { - albumID: albumID, - path: data.path, - delete_imported: delete_imported - }; - - if (lychee.api_V2 === false) { - api.post("Import::server", params, function (_data) { - albums.refresh(); - upload.notify(lychee.locale["UPLOAD_IMPORT_COMPLETE"]); - - if (_data === "Notice: Import only contained albums!") { - // No error, but the folder only contained albums - - // Go back to the album overview to show the imported albums - if (visible.albums()) lychee.load();else album.reload(); - - basicModal.close(); - - return true; - } else if (_data === "Warning: Folder empty or no readable files to process!") { - // Error because the import could not start - - $(".basicModal .rows .row p.notice").html(lychee.locale["UPLOAD_IMPORT_SERVER_FOLD"]).show(); - - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_FAILED"]).addClass("error"); - - // Log error - lychee.error(lychee.locale["UPLOAD_IMPORT_SERVER_EMPT"], params, _data); - } else { - if (_data !== true) { - // Maybe an error, maybe just some skipped photos - - $(".basicModal .rows .row p.notice").html(lychee.locale["UPLOAD_IMPORT_WARN_ERR"]).show(); - - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_FINISHED"]).addClass("warning"); - - // Log error - lychee.error(null, params, _data); - } else { - // No error, everything worked fine - - basicModal.close(); - } - - if (album.getID() === false) lychee.goto("0");else album.load(albumID); - } - - // Show close button - $(".basicModal #basicModal__action.hidden").show(); - - return; - }); - } else { - // Variables holding state across the invocations of - // processIncremental(). - var lastReadIdx = 0; - var currentDir = data.path; - var encounteredProblems = false; - var rowCount = 1; - - // Worker function invoked from both the response progress - // callback and the completion callback. - var processIncremental = function processIncremental(jsonResponse) { - // Skip the part that we've already processed during - // the previous invocation(s). - var newResponse = jsonResponse.substring(lastReadIdx); - // Because of all the potential buffering along the way, - // we can't be sure if the last line is complete. For - // that reason, our custom protocol terminates every - // line with the newline character, including the last - // line. - var lastNewline = newResponse.lastIndexOf("\n"); - if (lastNewline === -1) { - // No valid input data to process. - return; - } - if (lastNewline !== newResponse.length - 1) { - // Last line is not newline-terminated, so it - // must be incomplete. Strip it; it will be - // handled during the next invocation. - newResponse = newResponse.substring(0, lastNewline + 1); - } - // Advance the counter past the last valid character. - lastReadIdx += newResponse.length; - - newResponse.split("\n").forEach(function (resp) { - var matches = resp.match(/^Status: (.*): (\d+)$/); - if (matches !== null) { - if (matches[2] !== "100") { - if (currentDir !== matches[1]) { - // New directory. Add a new line to - // the dialog box. - currentDir = matches[1]; - $(".basicModal .rows").append(build.uploadNewFile(currentDir)); - rowCount++; - } - $(".basicModal .rows .row:last-child .status").html(matches[2] + "%"); - } else { - // Final status report for this directory. - $(".basicModal .rows .row:last-child .status").html(lychee.locale["UPLOAD_FINISHED"]).addClass("success"); - } - } else if ((matches = resp.match(/^Problem: (.*): ([^:]*)$/)) !== null) { - var rowSelector = void 0; - if (currentDir !== matches[1]) { - $(".basicModal .rows .row:last-child").before(build.uploadNewFile(matches[1])); - rowCount++; - rowSelector = ".basicModal .rows .row:nth-last-child(2)"; - } else { - // The problem is with the directory - // itself, so alter its existing line. - rowSelector = ".basicModal .rows .row:last-child"; - } - if (matches[2] === "Given path is not a directory" || matches[2] === "Given path is reserved") { - $(rowSelector + " .status").html(lychee.locale["UPLOAD_FAILED"]).addClass("error"); - } else { - $(rowSelector + " .status").html(lychee.locale["UPLOAD_SKIPPED"]).addClass("warning"); - } - $(rowSelector + " .notice").html(matches[2] === "Given path is not a directory" ? lychee.locale["UPLOAD_IMPORT_NOT_A_DIRECTORY"] : matches[2] === "Given path is reserved" ? lychee.locale["UPLOAD_IMPORT_PATH_RESERVED"] : matches[2] === "Could not read file" ? lychee.locale["UPLOAD_IMPORT_UNREADABLE"] : matches[2] === "Could not import file" ? lychee.locale["UPLOAD_IMPORT_FAILED"] : matches[2] === "Unsupported file type" ? lychee.locale["UPLOAD_IMPORT_UNSUPPORTED"] : matches[2] === "Could not create album" ? lychee.locale["UPLOAD_IMPORT_ALBUM_FAILED"] : matches[2]).show(); - encounteredProblems = true; - } else if (resp === "Warning: Approaching memory limit") { - $(".basicModal .rows .row:last-child").before(build.uploadNewFile(lychee.locale["UPLOAD_IMPORT_LOW_MEMORY"])); - rowCount++; - $(".basicModal .rows .row:nth-last-child(2) .status").html(lychee.locale["UPLOAD_WARNING"]).addClass("warning"); - $(".basicModal .rows .row:nth-last-child(2) .notice").html(lychee.locale["UPLOAD_IMPORT_LOW_MEMORY_EXPL"]).show(); - } - $(".basicModal .rows").scrollTop((rowCount - 1) * 40); - }); // forEach (resp) - }; // processIncremental - - api.post("Import::server", params, function (_data) { - // _data is already JSON-parsed. - processIncremental(_data); - - albums.refresh(); - - upload.notify(lychee.locale["UPLOAD_IMPORT_COMPLETE"], encounteredProblems ? lychee.locale["UPLOAD_COMPLETE_FAILED"] : null); - - if (album.getID() === false) lychee.goto("0");else album.load(albumID); - - if (encounteredProblems) { - // Show close button - $(".basicModal #basicModal__action.hidden").show(); - } else { - basicModal.close(); - } - }, function (event) { - // We received a possibly partial response. - // We need to begin by terminating the data with a - // '"' so that it can be JSON-parsed. - var response = this.response; - if (response.length > 0) { - if (response.substring(this.response.length - 1) === '"') { - // This might be either a terminating '"' - // or it may come from, say, a filename, in - // which case it would be escaped. - if (response.length > 1) { - if (response.substring(this.response.length - 2) === '"') { - response += '"'; - } - // else it's a complete response, - // requiring no termination from us. - } else { - // The response is just '"'. - response += '"'; - } - } else { - // This should be the most common case for - // partial responses. - response += '"'; - } - } - // Parse the response as JSON. This will remove - // the surrounding '"' characters, unescape any '"' - // from the middle, and translate '\n' sequences into - // newlines. - var jsonResponse = void 0; - try { - jsonResponse = JSON.parse(response); - } catch (e) { - // Most likely a SyntaxError due to something - // that went wrong on the server side. - $(".basicModal .rows .row:last-child .status").html(lychee.locale["UPLOAD_FAILED"]).addClass("error"); - - albums.refresh(); - upload.notify(lychee.locale["UPLOAD_COMPLETE"], lychee.locale["UPLOAD_COMPLETE_FAILED"]); - - if (album.getID() === false) lychee.goto("0");else album.load(albumID); - - // Show close button - $(".basicModal #basicModal__action.hidden").show(); - - return; - } - // The rest of the work is the same as for the full - // response. - processIncremental(jsonResponse); - }); // api.post - } // lychee.api_V2 - }); // upload.show - }; // action - - var msg = lychee.html(_templateObject77, lychee.locale["UPLOAD_IMPORT_SERVER_INSTR"], lychee.locale["UPLOAD_ABSOLUTE_PATH"], lychee.location); - if (lychee.api_V2) { - msg += lychee.html(_templateObject78, build.iconic("check"), lychee.locale["UPLOAD_IMPORT_DELETE_ORIGINALS"], lychee.locale["UPLOAD_IMPORT_DELETE_ORIGINALS_EXPL"]); - } - - basicModal.show({ - body: msg, - buttons: { - action: { - title: lychee.locale["UPLOAD_IMPORT"], - fn: action - }, - cancel: { - title: lychee.locale["CANCEL"], - fn: basicModal.close - } - } - }); - - if (lychee.delete_imported) { - $('.basicModal .choice input[name="delete"]').prop("checked", true); - } - }, - - dropbox: function dropbox() { - var albumID = album.getID(); - if (albumID === false) albumID = 0; - - var success = function success(files) { - var links = ""; - - for (var i = 0; i < files.length; i++) { - links += files[i].link + ","; - - files[i] = { - name: files[i].link - }; - } - - // Remove last comma - links = links.substr(0, links.length - 1); - - upload.show("Importing from Dropbox", files, function () { - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_IMPORTING"]); - - var params = { - url: links, - albumID: albumID - }; - - api.post("Import::url", params, function (data) { - // Same code as in import.url() - - if (data !== true) { - $(".basicModal .rows .row p.notice").html(lychee.locale["UPLOAD_IMPORT_WARN_ERR"]).show(); - - $(".basicModal .rows .row .status").html(lychee.locale["UPLOAD_FINISHED"]).addClass("warning"); - - // Show close button - $(".basicModal #basicModal__action.hidden").show(); - - // Log error - lychee.error(null, params, data); - } else { - basicModal.close(); - } - - upload.notify(lychee.locale["UPLOAD_IMPORT_COMPLETE"]); - - albums.refresh(); - - if (album.getID() === false) lychee.goto("0");else album.load(albumID); - }); - }); - }; - - lychee.loadDropbox(function () { - Dropbox.choose({ - linkType: "direct", - multiselect: true, - success: success - }); - }); - } -}; - -var users = { - json: null -}; - -users.update = function (params) { - if (params.username.length < 1) { - loadingBar.show("error", "new username cannot be empty."); - return false; - } - - if ($("#UserData" + params.id + ' .choice input[name="upload"]:checked').length === 1) { - params.upload = "1"; - } else { - params.upload = "0"; - } - if ($("#UserData" + params.id + ' .choice input[name="lock"]:checked').length === 1) { - params.lock = "1"; - } else { - params.lock = "0"; - } - - api.post("User::Save", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", "User updated!"); - users.list(); // reload user list - } - }); -}; - -users.create = function (params) { - if (params.username.length < 1) { - loadingBar.show("error", "new username cannot be empty."); - return false; - } - if (params.password.length < 1) { - loadingBar.show("error", "new password cannot be empty."); - return false; - } - - if ($('#UserCreate .choice input[name="upload"]:checked').length === 1) { - params.upload = "1"; - } else { - params.upload = "0"; - } - if ($('#UserCreate .choice input[name="lock"]:checked').length === 1) { - params.lock = "1"; - } else { - params.lock = "0"; - } - - api.post("User::Create", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", "User created!"); - users.list(); // reload user list - } - }); -}; - -users.delete = function (params) { - api.post("User::Delete", params, function (data) { - if (data !== true) { - loadingBar.show("error", data.description); - lychee.error(null, params, data); - } else { - loadingBar.show("success", "User deleted!"); - users.list(); // reload user list - } - }); -}; - -users.list = function () { - api.post("User::List", {}, function (data) { - users.json = data; - view.users.init(); - }); -}; - -/** - * @description Responsible to reflect data changes to the UI. - */ - -var view = {}; - -view.albums = { - init: function init() { - multiselect.clearSelection(); - - view.albums.title(); - view.albums.content.init(); - }, - - title: function title() { - if (lychee.landing_page_enable) { - if (lychee.title !== "Lychee v4") { - lychee.setTitle(lychee.title, false); - } else { - lychee.setTitle(lychee.locale["ALBUMS"], false); - } - } else { - lychee.setTitle(lychee.locale["ALBUMS"], false); - } - }, - - content: { - scrollPosition: 0, - - init: function init() { - var smartData = ""; - var albumsData = ""; - var sharedData = ""; - - // Smart Albums - if (albums.json.smartalbums != null) { - if (lychee.publicMode === false) { - smartData = build.divider(lychee.locale["SMART_ALBUMS"]); - } - if (albums.json.smartalbums.unsorted) { - albums.parse(albums.json.smartalbums.unsorted); - smartData += build.album(albums.json.smartalbums.unsorted); - } - if (albums.json.smartalbums.public) { - albums.parse(albums.json.smartalbums.public); - smartData += build.album(albums.json.smartalbums.public); - } - if (albums.json.smartalbums.starred) { - albums.parse(albums.json.smartalbums.starred); - smartData += build.album(albums.json.smartalbums.starred); - } - if (albums.json.smartalbums.recent) { - albums.parse(albums.json.smartalbums.recent); - smartData += build.album(albums.json.smartalbums.recent); - } - - Object.entries(albums.json.smartalbums).forEach(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - albumName = _ref4[0], - albumData = _ref4[1]; - - if (albumData["tag_album"] === "1") { - albums.parse(albumData); - smartData += build.album(albumData); - } - }); - } - - // Albums - if (albums.json.albums && albums.json.albums.length !== 0) { - $.each(albums.json.albums, function () { - if (!this.parent_id || this.parent_id === 0) { - albums.parse(this); - albumsData += build.album(this); - } - }); - - // Add divider - if (lychee.publicMode === false) albumsData = build.divider(lychee.locale["ALBUMS"]) + albumsData; - } - - if (lychee.api_V2) { - var current_owner = ""; - var i = void 0; - // Shared - if (albums.json.shared_albums && albums.json.shared_albums.length !== 0) { - for (i = 0; i < albums.json.shared_albums.length; ++i) { - var alb = albums.json.shared_albums[i]; - if (!alb.parent_id || alb.parent_id === 0) { - albums.parse(alb); - if (current_owner !== alb.owner && lychee.publicMode === false) { - sharedData += build.divider(alb.owner); - current_owner = alb.owner; - } - sharedData += build.album(alb, !lychee.admin); - } - } - } - } - - if (smartData === "" && albumsData === "" && sharedData === "") { - lychee.content.html(""); - $("body").append(build.no_content("eye")); - } else { - lychee.content.html(smartData + albumsData + sharedData); - } - - album.apply_nsfw_filter(); - // Restore scroll position - if (view.albums.content.scrollPosition != null && view.albums.content.scrollPosition !== 0) { - $(document).scrollTop(view.albums.content.scrollPosition); - } - }, - - title: function title(albumID) { - var title = albums.getByID(albumID).title; - - title = lychee.escapeHTML(title); - - $('.album[data-id="' + albumID + '"] .overlay h1').html(title).attr("title", title); - }, - - delete: function _delete(albumID) { - $('.album[data-id="' + albumID + '"]').css("opacity", 0).animate({ - width: 0, - marginLeft: 0 - }, 300, function () { - $(this).remove(); - if (albums.json.albums.length <= 0) lychee.content.find(".divider:last-child").remove(); - }); - } - } -}; - -view.album = { - init: function init() { - multiselect.clearSelection(); - - album.parse(); - - view.album.sidebar(); - view.album.title(); - view.album.public(); - view.album.nsfw(); - view.album.nsfw_warning.init(); - view.album.content.init(); - - album.json.init = 1; - }, - - title: function title() { - if ((visible.album() || !album.json.init) && !visible.photo()) { - switch (album.getID()) { - case "starred": - lychee.setTitle(lychee.locale["STARRED"], true); - break; - case "public": - lychee.setTitle(lychee.locale["PUBLIC"], true); - break; - case "recent": - lychee.setTitle(lychee.locale["RECENT"], true); - break; - case "unsorted": - lychee.setTitle(lychee.locale["UNSORTED"], true); - break; - default: - if (album.json.init) _sidebar.changeAttr("title", album.json.title); - lychee.setTitle(album.json.title, true); - break; - } - } - }, - - nsfw_warning: { - init: function init() { - if (!lychee.nsfw_warning) { - $("#sensitive_warning").hide(); - return; - } - - if (album.json.nsfw && album.json.nsfw === "1" && !lychee.nsfw_unlocked_albums.includes(album.json.id)) { - $("#sensitive_warning").show(); - } else { - $("#sensitive_warning").hide(); - } - }, - - next: function next() { - lychee.nsfw_unlocked_albums.push(album.json.id); - $("#sensitive_warning").hide(); - } - }, - - content: { - init: function init() { - var photosData = ""; - var albumsData = ""; - var html = ""; - - if (album.json.albums && album.json.albums !== false) { - $.each(album.json.albums, function () { - albums.parse(this); - albumsData += build.album(this, !album.isUploadable()); - }); - } - if (album.json.photos && album.json.photos !== false) { - // Build photos - $.each(album.json.photos, function () { - photosData += build.photo(this, !album.isUploadable()); - }); - } - - if (photosData !== "") { - if (lychee.layout === "1") { - photosData = '
' + photosData + "
"; - } else if (lychee.layout === "2") { - photosData = '
' + photosData + "
"; - } - } - - if (albumsData !== "" && photosData !== "") { - html = build.divider(lychee.locale["ALBUMS"]); - } - html += albumsData; - if (albumsData !== "" && photosData !== "") { - html += build.divider(lychee.locale["PHOTOS"]); - } - html += photosData; - - // Save and reset scroll position - view.albums.content.scrollPosition = $(document).scrollTop(); - requestAnimationFrame(function () { - return $(document).scrollTop(0); - }); - - // Add photos to view - lychee.content.html(html); - album.apply_nsfw_filter(); - - view.album.content.justify(); - }, - - title: function title(photoID) { - var title = album.getByID(photoID).title; - - title = lychee.escapeHTML(title); - - $('.photo[data-id="' + photoID + '"] .overlay h1').html(title).attr("title", title); - }, - - titleSub: function titleSub(albumID) { - var title = album.getSubByID(albumID).title; - - title = lychee.escapeHTML(title); - - $('.album[data-id="' + albumID + '"] .overlay h1').html(title).attr("title", title); - }, - - star: function star(photoID) { - var $badge = $('.photo[data-id="' + photoID + '"] .icn-star'); - - if (album.getByID(photoID).star === "1") $badge.addClass("badge--star");else $badge.removeClass("badge--star"); - }, - - public: function _public(photoID) { - var $badge = $('.photo[data-id="' + photoID + '"] .icn-share'); - - if (album.getByID(photoID).public === "1") $badge.addClass("badge--visible badge--hidden");else $badge.removeClass("badge--visible badge--hidden"); - }, - - delete: function _delete(photoID) { - var justify = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - $('.photo[data-id="' + photoID + '"]').css("opacity", 0).animate({ - width: 0, - marginLeft: 0 - }, 300, function () { - $(this).remove(); - // Only when search is not active - if (album.json) { - if (visible.sidebar()) { - var videoCount = 0; - $.each(album.json.photos, function () { - if (this.type && this.type.indexOf("video") > -1) { - videoCount++; - } - }); - if (album.json.photos.length - videoCount > 0) { - _sidebar.changeAttr("images", album.json.photos.length - videoCount); - } else { - _sidebar.hideAttr("images"); - } - if (videoCount > 0) { - _sidebar.changeAttr("videos", videoCount); - } else { - _sidebar.hideAttr("videos"); - } - } - if (album.json.photos.length <= 0) { - lychee.content.find(".divider").remove(); - } - if (justify) { - view.album.content.justify(); - } - } - }); - }, - - deleteSub: function deleteSub(albumID) { - $('.album[data-id="' + albumID + '"]').css("opacity", 0).animate({ - width: 0, - marginLeft: 0 - }, 300, function () { - $(this).remove(); - if (album.json) { - if (album.json.albums.length <= 0) { - lychee.content.find(".divider").remove(); - } - if (visible.sidebar()) { - if (album.json.albums.length > 0) { - _sidebar.changeAttr("subalbums", album.json.albums.length); - } else { - _sidebar.hideAttr("subalbums"); - } - } - } - }); - }, - - justify: function justify() { - if (!album.json || !album.json.photos || album.json.photos === false) return; - if (lychee.layout === "1") { - var containerWidth = parseFloat($(".justified-layout").width(), 10); - if (containerWidth == 0) { - // Triggered on Reload in photo view. - containerWidth = $(window).width() - parseFloat($(".justified-layout").css("margin-left"), 10) - parseFloat($(".justified-layout").css("margin-right"), 10) - parseFloat($(".content").css("padding-right"), 10); - } - var ratio = []; - $.each(album.json.photos, function (i) { - ratio[i] = this.height > 0 ? this.width / this.height : 1; - if (this.type && this.type.indexOf("video") > -1) { - // Video. If there's no small and medium, we have - // to fall back to the square thumb. - if (this.small === "" && this.medium === "") { - ratio[i] = 1; - } - } - }); - var layoutGeometry = require("justified-layout")(ratio, { - containerWidth: containerWidth, - containerPadding: 0, - // boxSpacing: { - // horizontal: 42, - // vertical: 150 - // }, - targetRowHeight: parseFloat($(".photo").css("--lychee-default-height"), 10) - }); - // if (lychee.admin) console.log(layoutGeometry); - $(".justified-layout").css("height", layoutGeometry.containerHeight + "px"); - $(".justified-layout > div").each(function (i) { - if (!layoutGeometry.boxes[i]) { - // Race condition in search.find -- window content - // and album.json can get out of sync as search - // query is being modified. - return false; - } - $(this).css("top", layoutGeometry.boxes[i].top); - $(this).css("width", layoutGeometry.boxes[i].width); - $(this).css("height", layoutGeometry.boxes[i].height); - $(this).css("left", layoutGeometry.boxes[i].left); - - var imgs = $(this).find(".thumbimg > img"); - if (imgs.length > 0 && imgs[0].getAttribute("data-srcset")) { - imgs[0].setAttribute("sizes", layoutGeometry.boxes[i].width + "px"); - } - }); - } else if (lychee.layout === "2") { - var _containerWidth = parseFloat($(".unjustified-layout").width(), 10); - if (_containerWidth == 0) { - // Triggered on Reload in photo view. - _containerWidth = $(window).width() - parseFloat($(".unjustified-layout").css("margin-left"), 10) - parseFloat($(".unjustified-layout").css("margin-right"), 10) - parseFloat($(".content").css("padding-right"), 10); - } - // For whatever reason, the calculation of margin is - // super-slow in Firefox (tested with 68), so we make sure to - // do it just once, outside the loop. Height doesn't seem to - // be affected, but we do it the same way for consistency. - var margin = parseFloat($(".photo").css("margin-right"), 10); - var origHeight = parseFloat($(".photo").css("max-height"), 10); - $(".unjustified-layout > div").each(function (i) { - if (!album.json.photos[i]) { - // Race condition in search.find -- window content - // and album.json can get out of sync as search - // query is being modified. - return false; - } - var ratio = album.json.photos[i].height > 0 ? album.json.photos[i].width / album.json.photos[i].height : 1; - if (album.json.photos[i].type && album.json.photos[i].type.indexOf("video") > -1) { - // Video. If there's no small and medium, we have - // to fall back to the square thumb. - if (album.json.photos[i].small === "" && album.json.photos[i].medium === "") { - ratio = 1; - } - } - - var height = origHeight; - var width = height * ratio; - var imgs = $(this).find(".thumbimg > img"); - - if (width > _containerWidth - margin) { - width = _containerWidth - margin; - height = width / ratio; - } - - $(this).css("width", width + "px"); - $(this).css("height", height + "px"); - if (imgs.length > 0 && imgs[0].getAttribute("data-srcset")) { - imgs[0].setAttribute("sizes", width + "px"); - } - }); - } - } - }, - - description: function description() { - _sidebar.changeAttr("description", album.json.description); - }, - - show_tags: function show_tags() { - _sidebar.changeAttr("show_tags", album.json.show_tags); - }, - - license: function license() { - var license = void 0; - switch (album.json.license) { - case "none": - license = ""; // none is displayed as - thus is empty. - break; - case "reserved": - license = lychee.locale["ALBUM_RESERVED"]; - break; - default: - license = album.json.license; - // console.log('default'); - break; - } - - _sidebar.changeAttr("license", license); - }, - - public: function _public() { - $("#button_visibility_album").removeClass("active--not-hidden active--hidden"); - - if (album.json.public === "1") { - if (album.json.visible === "0") { - $("#button_visibility_album").addClass("active--hidden"); - } else { - $("#button_visibility_album").addClass("active--not-hidden"); - } - - $(".photo .iconic-share").remove(); - - if (album.json.init) _sidebar.changeAttr("public", lychee.locale["ALBUM_SHR_YES"]); - } else { - if (album.json.init) _sidebar.changeAttr("public", lychee.locale["ALBUM_SHR_NO"]); - } - }, - - hidden: function hidden() { - if (album.json.visible === "1") _sidebar.changeAttr("hidden", lychee.locale["ALBUM_SHR_NO"]);else _sidebar.changeAttr("hidden", lychee.locale["ALBUM_SHR_YES"]); - }, - - nsfw: function nsfw() { - if (album.json.nsfw === "1") { - // Sensitive - $("#button_nsfw_album").addClass("active").attr("title", lychee.locale["ALBUM_UNMARK_NSFW"]); - } else { - // Not Sensitive - $("#button_nsfw_album").removeClass("active").attr("title", lychee.locale["ALBUM_MARK_NSFW"]); - } - }, - - downloadable: function downloadable() { - if (album.json.downloadable === "1") _sidebar.changeAttr("downloadable", lychee.locale["ALBUM_SHR_YES"]);else _sidebar.changeAttr("downloadable", lychee.locale["ALBUM_SHR_NO"]); - }, - - shareButtonVisible: function shareButtonVisible() { - if (album.json.share_button_visible === "1") _sidebar.changeAttr("share_button_visible", lychee.locale["ALBUM_SHR_YES"]);else _sidebar.changeAttr("share_button_visible", lychee.locale["ALBUM_SHR_NO"]); - }, - - password: function password() { - if (album.json.password === "1") _sidebar.changeAttr("password", lychee.locale["ALBUM_SHR_YES"]);else _sidebar.changeAttr("password", lychee.locale["ALBUM_SHR_NO"]); - }, - - sidebar: function sidebar() { - if ((visible.album() || !album.json.init) && !visible.photo()) { - var structure = _sidebar.createStructure.album(album); - var html = _sidebar.render(structure); - - _sidebar.dom(".sidebar__wrapper").html(html); - _sidebar.bind(); - } - } -}; - -view.photo = { - init: function init(autoplay) { - multiselect.clearSelection(); - - _photo.parse(); - - view.photo.sidebar(); - view.photo.title(); - view.photo.star(); - view.photo.public(); - view.photo.photo(autoplay); - - _photo.json.init = 1; - }, - - show: function show() { - // Change header - lychee.content.addClass("view"); - header.setMode("photo"); - - // Make body not scrollable - // use bodyScrollLock package to enable locking on iOS - // Simple overflow: hidden not working on iOS Safari - // Only the info pane needs scrolling - // Touch event for swiping of photo still work - - scrollLock.disablePageScroll($(".sidebar__wrapper").get()); - - // Fullscreen - var timeout = null; - $(document).bind("mousemove", function () { - clearTimeout(timeout); - // For live Photos: header animtion only if LivePhoto is not playing - if (!_photo.isLivePhotoPlaying() && lychee.header_auto_hide) { - header.show(); - timeout = setTimeout(header.hideIfLivePhotoNotPlaying, 2500); - } - }); - - // we also put this timeout to enable it by default when you directly click on a picture. - if (lychee.header_auto_hide) { - setTimeout(header.hideIfLivePhotoNotPlaying, 2500); - } - - lychee.animate(lychee.imageview, "fadeIn"); - }, - - hide: function hide() { - header.show(); - - lychee.content.removeClass("view"); - header.setMode("album"); - - // Make body scrollable - scrollLock.enablePageScroll($(".sidebar__wrapper").get()); - - // Disable Fullscreen - $(document).unbind("mousemove"); - if ($("video").length) { - $("video")[$("video").length - 1].pause(); - } - - // Hide Photo - lychee.animate(lychee.imageview, "fadeOut"); - setTimeout(function () { - lychee.imageview.hide(); - view.album.sidebar(); - }, 300); - }, - - title: function title() { - if (_photo.json.init) _sidebar.changeAttr("title", _photo.json.title); - lychee.setTitle(_photo.json.title, true); - }, - - description: function description() { - if (_photo.json.init) _sidebar.changeAttr("description", _photo.json.description); - }, - - license: function license() { - var license = void 0; - - // Process key to display correct string - switch (_photo.json.license) { - case "none": - license = ""; // none is displayed as - thus is empty (uniformity of the display). - break; - case "reserved": - license = lychee.locale["PHOTO_RESERVED"]; - break; - default: - license = _photo.json.license; - break; - } - - // Update the sidebar if the photo is visible - if (_photo.json.init) _sidebar.changeAttr("license", license); - }, - - star: function star() { - if (_photo.json.star === "1") { - // Starred - $("#button_star").addClass("active").attr("title", lychee.locale["UNSTAR_PHOTO"]); - } else { - // Unstarred - $("#button_star").removeClass("active").attr("title", lychee.locale["STAR_PHOTO"]); - } - }, - - public: function _public() { - $("#button_visibility").removeClass("active--hidden active--not-hidden"); - - if (_photo.json.public === "1" || _photo.json.public === "2") { - // Photo public - if (_photo.json.public === "1") { - $("#button_visibility").addClass("active--hidden"); - } else { - $("#button_visibility").addClass("active--not-hidden"); - } - - if (_photo.json.init) _sidebar.changeAttr("public", lychee.locale["PHOTO_SHR_YES"]); - } else { - // Photo private - if (_photo.json.init) _sidebar.changeAttr("public", "No"); - } - }, - - tags: function tags() { - _sidebar.changeAttr("tags", build.tags(_photo.json.tags), true); - _sidebar.bind(); - }, - - photo: function photo(autoplay) { - var ret = build.imageview(_photo.json, visible.header(), autoplay); - lychee.imageview.html(ret.html); - tabindex.makeFocusable(lychee.imageview); - - // Init Live Photo if needed - if (_photo.isLivePhoto()) { - // Package gives warning that function will be remove and - // shoud be replaced by LivePhotosKit.augementElementAsPlayer - // But, LivePhotosKit.augementElementAsPlayer is not yet available - _photo.LivePhotosObject = LivePhotosKit.Player(document.getElementById("livephoto")); - } - - view.photo.onresize(); - - var $nextArrow = lychee.imageview.find("a#next"); - var $previousArrow = lychee.imageview.find("a#previous"); - var photoID = _photo.getID(); - var hasNext = album.json && album.json.photos && album.getByID(photoID) && album.getByID(photoID).nextPhoto != null && album.getByID(photoID).nextPhoto !== ""; - var hasPrevious = album.json && album.json.photos && album.getByID(photoID) && album.getByID(photoID).previousPhoto != null && album.getByID(photoID).previousPhoto !== ""; - - var img = $("img#image"); - if (img.length > 0) { - if (!img[0].complete || img[0].currentSrc !== null && img[0].currentSrc === "") { - // Image is still loading. Display the thumb version in the - // background. - if (ret.thumb !== "") { - img.css("background-image", lychee.html(_templateObject79, ret.thumb)); - } - - // Don't preload next/prev until the requested image is - // fully loaded. - img.on("load", function () { - _photo.preloadNextPrev(_photo.getID()); - }); - } else { - _photo.preloadNextPrev(_photo.getID()); - } - } - - if (hasNext === false || lychee.viewMode === true) { - $nextArrow.hide(); - } else { - var nextPhotoID = album.getByID(photoID).nextPhoto; - var nextPhoto = album.getByID(nextPhotoID); - - // Check if thumbUrl exists (for videos w/o ffmpeg, we add a play-icon) - var thumbUrl = nextPhoto.thumbUrl; - - if (thumbUrl === "uploads/thumb/" && nextPhoto.type.indexOf("video") > -1) { - thumbUrl = "img/play-icon.png"; - } - $nextArrow.css("background-image", lychee.html(_templateObject80, thumbUrl)); - } - - if (hasPrevious === false || lychee.viewMode === true) { - $previousArrow.hide(); - } else { - var previousPhotoID = album.getByID(photoID).previousPhoto; - var previousPhoto = album.getByID(previousPhotoID); - - // Check if thumbUrl exists (for videos w/o ffmpeg, we add a play-icon) - var _thumbUrl = previousPhoto.thumbUrl; - - if (_thumbUrl === "uploads/thumb/" && previousPhoto.type.indexOf("video") > -1) { - _thumbUrl = "img/play-icon.png"; - } - $previousArrow.css("background-image", lychee.html(_templateObject80, _thumbUrl)); - } - }, - - sidebar: function sidebar() { - var structure = _sidebar.createStructure.photo(_photo.json); - var html = _sidebar.render(structure); - var has_location = _photo.json.latitude && _photo.json.longitude ? true : false; - - _sidebar.dom(".sidebar__wrapper").html(html); - _sidebar.bind(); - - if (has_location && lychee.map_display) { - // Leaflet seaches for icon in same directoy as js file -> paths needs - // to be overwritten - delete L.Icon.Default.prototype._getIconUrl; - L.Icon.Default.mergeOptions({ - iconRetinaUrl: "img/marker-icon-2x.png", - iconUrl: "img/marker-icon.png", - shadowUrl: "img/marker-shadow.png" - }); - - var mymap = L.map("leaflet_map_single_photo").setView([_photo.json.latitude, _photo.json.longitude], 13); - - L.tileLayer(map_provider_layer_attribution[lychee.map_provider].layer, { - attribution: map_provider_layer_attribution[lychee.map_provider].attribution - }).addTo(mymap); - - if (!_photo.json.imgDirection || _photo.json.imgDirection === "") { - // Add Marker to map, direction is not set - L.marker([_photo.json.latitude, _photo.json.longitude]).addTo(mymap); - } else { - // Add Marker, direction has been set - var viewDirectionIcon = L.icon({ - iconUrl: "img/view-angle-icon.png", - iconRetinaUrl: "img/view-angle-icon-2x.png", - iconSize: [100, 58], // size of the icon - iconAnchor: [50, 49] // point of the icon which will correspond to marker's location - }); - var marker = L.marker([_photo.json.latitude, _photo.json.longitude], { icon: viewDirectionIcon }).addTo(mymap); - marker.setRotationAngle(_photo.json.imgDirection); - } - } - }, - - onresize: function onresize() { - if (!_photo.json || _photo.json.medium === "" || !_photo.json.medium2x || _photo.json.medium2x === "") return; - - // Calculate the width of the image in the current window without - // borders and set 'sizes' to it. - var imgWidth = parseInt(_photo.json.medium_dim); - var imgHeight = _photo.json.medium_dim.substr(_photo.json.medium_dim.lastIndexOf("x") + 1); - var containerWidth = $(window).outerWidth(); - var containerHeight = $(window).outerHeight(); - - // Image can be no larger than its natural size, but it can be - // smaller depending on the size of the window. - var width = imgWidth < containerWidth ? imgWidth : containerWidth; - var height = width * imgHeight / imgWidth; - if (height > containerHeight) { - width = containerHeight * imgWidth / imgHeight; - } - - $("img#image").attr("sizes", width + "px"); - } -}; - -view.settings = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.settings.title(); - view.settings.content.init(); - }, - - title: function title() { - lychee.setTitle(lychee.locale["SETTINGS"], false); - }, - - clearContent: function clearContent() { - lychee.content.html('
'); - }, - - content: { - init: function init() { - view.settings.clearContent(); - view.settings.content.setLogin(); - if (lychee.admin) { - view.settings.content.setSorting(); - view.settings.content.setDropboxKey(); - view.settings.content.setLang(); - view.settings.content.setDefaultLicense(); - view.settings.content.setLayout(); - view.settings.content.setPublicSearch(); - view.settings.content.setOverlay(); - view.settings.content.setOverlayType(); - view.settings.content.setMapDisplay(); - view.settings.content.setNSFWVisible(); - view.settings.content.setCSS(); - view.settings.content.moreButton(); - } - }, - - setLogin: function setLogin() { - var msg = "\n\t\t\t
\n\t\t\t

\n\t\t\t\t " + lychee.locale["PASSWORD_TITLE"] + "\n\t\t\t\t \n\t\t\t\t \n\t\t\t

\n\t\t\t

\n\t\t\t\t " + lychee.locale["PASSWORD_TEXT"] + "\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t\t\t

\n\t\t\t
\n\t\t\t\t\n\t\t\t\t" + lychee.locale["PASSWORD_CHANGE"] + "\n\t\t\t
\n\t\t\t
"; - - $(".settings_view").append(msg); - - settings.bind("#basicModal__action_password_change", ".setLogin", settings.changeLogin); - }, - - clearLogin: function clearLogin() { - $("input[name=oldUsername], input[name=oldPassword], input[name=username], input[name=password], input[name=confirm]").val(""); - }, - - setSorting: function setSorting() { - var sortingPhotos = []; - var sortingAlbums = []; - - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["SORT_ALBUM_BY_1"] + "\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t " + lychee.locale["SORT_ALBUM_BY_2"] + "\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t " + lychee.locale["SORT_ALBUM_BY_3"] + "\n\t\t\t

\n\t\t\t

" + lychee.locale["SORT_PHOTO_BY_1"] + "\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t " + lychee.locale["SORT_PHOTO_BY_2"] + "\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t " + lychee.locale["SORT_PHOTO_BY_3"] + "\n\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t" + lychee.locale["SORT_CHANGE"] + "\n\t\t\t\t
\n\t\t\t
\n\t\t\t "; - - $(".settings_view").append(msg); - - if (lychee.sortingAlbums !== "") { - sortingAlbums = lychee.sortingAlbums.replace("ORDER BY ", "").split(" "); - - $(".setSorting select#settings_albums_type").val(sortingAlbums[0]); - $(".setSorting select#settings_albums_order").val(sortingAlbums[1]); - } - - if (lychee.sortingPhotos !== "") { - sortingPhotos = lychee.sortingPhotos.replace("ORDER BY ", "").split(" "); - - $(".setSorting select#settings_photos_type").val(sortingPhotos[0]); - $(".setSorting select#settings_photos_order").val(sortingPhotos[1]); - } - - settings.bind("#basicModal__action_sorting_change", ".setSorting", settings.changeSorting); - }, - - setDropboxKey: function setDropboxKey() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["DROPBOX_TEXT"] + "\n\t\t\t \n\t\t\t

\n\t\t\t\t\n\t\t\t
\n\t\t\t "; - - $(".settings_view").append(msg); - settings.bind("#basicModal__action_dropbox_change", ".setDropBox", settings.changeDropboxKey); - }, - - setLang: function setLang() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["LANG_TEXT"] + "\n\t\t\t \n\t\t\t\t \n\t\t\t \n\t\t\t

\n\t\t\t\n\t\t\t
"; - - $(".settings_view").append(msg); - settings.bind("#basicModal__action_set_lang", ".setLang", settings.changeLang); - }, - - setDefaultLicense: function setDefaultLicense() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["DEFAULT_LICENSE"] + "\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t" + lychee.locale["PHOTO_LICENSE_HELP"] + "\n\t\t\t

\n\t\t\t\n\t\t\t
\n\t\t\t"; - $(".settings_view").append(msg); - $("select#license").val(lychee.default_license === "" ? "none" : lychee.default_license); - settings.bind("#basicModal__action_set_license", ".setDefaultLicense", settings.setDefaultLicense); - }, - - setLayout: function setLayout() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["LAYOUT_TYPE"] + "\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\t\n\t\t\t
\n\t\t\t"; - $(".settings_view").append(msg); - $("select#layout").val(lychee.layout); - settings.bind("#basicModal__action_set_layout", ".setLayout", settings.setLayout); - }, - - setPublicSearch: function setPublicSearch() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["PUBLIC_SEARCH_TEXT"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.public_search) $("#PublicSearch").click(); - - settings.bind("#PublicSearch", ".setPublicSearch", settings.changePublicSearch); - }, - - setNSFWVisible: function setNSFWVisible() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["NSFW_VISIBLE_TEXT_1"] + "\n\t\t\t

\n\t\t\t

" + lychee.locale["NSFW_VISIBLE_TEXT_2"] + "\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.nsfw_visible_saved) { - $("#NSFWVisible").click(); - } - - settings.bind("#NSFWVisible", ".setNSFWVisible", settings.changeNSFWVisible); - }, - // TODO: extend to the other settings. - - setOverlay: function setOverlay() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["IMAGE_OVERLAY_TEXT"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.image_overlay_default) $("#ImageOverlay").click(); - - settings.bind("#ImageOverlay", ".setOverlay", settings.changeImageOverlay); - }, - - setOverlayType: function setOverlayType() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["OVERLAY_TYPE"] + "\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - - // Enable based on image_overlay setting - if (!lychee.image_overlay) $("select#ImgOverlayType").attr("disabled", true); - - $("select#ImgOverlayType").val(!lychee.image_overlay_type_default ? "exif" : lychee.image_overlay_type_default); - settings.bind("#basicModal__action_set_overlay_type", ".setOverlayType", settings.setOverlayType); - }, - - setMapDisplay: function setMapDisplay() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["MAP_DISPLAY_TEXT"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.map_display) $("#MapDisplay").click(); - - settings.bind("#MapDisplay", ".setMapDisplay", settings.changeMapDisplay); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["MAP_DISPLAY_PUBLIC_TEXT"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.map_display_public) $("#MapDisplayPublic").click(); - - settings.bind("#MapDisplayPublic", ".setMapDisplayPublic", settings.changeMapDisplayPublic); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["MAP_PROVIDER"] + "\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - - $("select#MapProvider").val(!lychee.map_provider ? "Wikimedia" : lychee.map_provider); - settings.bind("#basicModal__action_set_map_provider", ".setMapProvider", settings.setMapProvider); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["MAP_INCLUDE_SUBALBUMS_TEXT"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.map_include_subalbums) $("#MapIncludeSubalbums").click(); - - settings.bind("#MapIncludeSubalbums", ".setMapIncludeSubalbums", settings.changeMapIncludeSubalbums); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["LOCATION_DECODING"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.location_decoding) $("#LocationDecoding").click(); - - settings.bind("#LocationDecoding", ".setLocationDecoding", settings.changeLocationDecoding); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["LOCATION_SHOW"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.location_show) $("#LocationShow").click(); - - settings.bind("#LocationShow", ".setLocationShow", settings.changeLocationShow); - - msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["LOCATION_SHOW_PUBLIC"] + "\n\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t"; - - $(".settings_view").append(msg); - if (lychee.location_show_public) $("#LocationShowPublic").click(); - - settings.bind("#LocationShowPublic", ".setLocationShowPublic", settings.changeLocationShowPublic); - }, - - setCSS: function setCSS() { - var msg = "\n\t\t\t
\n\t\t\t

" + lychee.locale["CSS_TEXT"] + "

\n\t\t\t\n\t\t\t\n\t\t\t
"; - - $(".settings_view").append(msg); - - var css_addr = $($("link")[1]).attr("href"); - - api.get(css_addr, function (data) { - $("#css").html(data); - }); - - settings.bind("#basicModal__action_set_css", ".setCSS", settings.changeCSS); - }, - - moreButton: function moreButton() { - var msg = lychee.html(_templateObject81, lychee.locale["MORE"]); - - $(".settings_view").append(msg); - - $("#basicModal__action_more").on("click", view.full_settings.init); - } - } -}; - -view.full_settings = { - init: function init() { - multiselect.clearSelection(); - - view.full_settings.title(); - view.full_settings.content.init(); - }, - - title: function title() { - lychee.setTitle("Full Settings", false); - }, - - clearContent: function clearContent() { - lychee.content.html('
'); - }, - - content: { - init: function init() { - view.full_settings.clearContent(); - - api.post("Settings::getAll", {}, function (data) { - var msg = lychee.html(_templateObject82, lychee.locale["SETTINGS_WARNING"]); - - var prev = ""; - $.each(data, function () { - if (this.cat && prev !== this.cat) { - msg += lychee.html(_templateObject83, this.cat); - prev = this.cat; - } - - msg += lychee.html(_templateObject84, this.key, this.key, this.value); - }); - - msg += lychee.html(_templateObject85, lychee.locale["SAVE_RISK"]); - $(".settings_view").append(msg); - - settings.bind("#FullSettingsSave_button", "#fullSettings", settings.save); - - $("#fullSettings").on("keypress", function (e) { - settings.save_enter(e); - }); - }); - } - } -}; - -view.users = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.users.title(); - view.users.content.init(); - }, - - title: function title() { - lychee.setTitle("Users", false); - }, - - clearContent: function clearContent() { - lychee.content.html('
'); - }, - - content: { - init: function init() { - view.users.clearContent(); - - if (users.json.length === 0) { - $(".users_view").append('

User list is empty!

'); - } - - var html = ""; - - html += '
' + "

" + 'username' + 'new password' + '' + build.iconic("data-transfer-upload") + "" + '' + build.iconic("lock-locked") + "" + "

" + "
"; - - $(".users_view").append(html); - - $.each(users.json, function () { - $(".users_view").append(build.user(this)); - settings.bind("#UserUpdate" + this.id, "#UserData" + this.id, users.update); - settings.bind("#UserDelete" + this.id, "#UserData" + this.id, users.delete); - if (this.upload === 1) { - $("#UserData" + this.id + ' .choice input[name="upload"]').click(); - } - if (this.lock === 1) { - $("#UserData" + this.id + ' .choice input[name="lock"]').click(); - } - }); - - html = '
' + ' ' + ' ' + '' + "" + " " + '' + "" + "" + "

" + 'Create' + "
"; - $(".users_view").append(html); - settings.bind("#UserCreate_button", "#UserCreate", users.create); - } - } -}; - -view.sharing = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.sharing.title(); - view.sharing.content.init(); - }, - - title: function title() { - lychee.setTitle("Sharing", false); - }, - - clearContent: function clearContent() { - lychee.content.html(''); - }, - - content: { - init: function init() { - view.sharing.clearContent(); - - if (sharing.json.shared.length === 0) { - $(".sharing_view").append(''); - } - - var html = ""; - - html += "\n\t\t\t

Share

\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
"; - - html += "\n\t\t\t

with

\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
"; - html += ""; - html += '"; - if (sharing.json.shared.length !== 0) { - html += ""; - } - - $(".sharing_view").append(html); - - $("#albums_list").multiselect(); - $("#user_list").multiselect(); - $("#Share_button").on("click", sharing.add).on("mouseenter", function () { - $("#albums_list_to, #user_list_to").addClass("borderBlue"); - }).on("mouseleave", function () { - $("#albums_list_to, #user_list_to").removeClass("borderBlue"); - }); - - $("#Remove_button").on("click", sharing.delete); - } - } -}; - -view.logs = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.logs.title(); - view.logs.content.init(); - }, - - title: function title() { - lychee.setTitle("Logs", false); - }, - - clearContent: function clearContent() { - var html = ""; - if (lychee.api_V2) { - html += lychee.html(_templateObject86, lychee.locale["CLEAN_LOGS"]); - } - html += '
';
-		lychee.content.html(html);
-
-		$("#Clean_Noise").on("click", function () {
-			api.post_raw("Logs::clearNoise", {}, function () {
-				view.logs.init();
-			});
-		});
-	},
-
-	content: {
-		init: function init() {
-			view.logs.clearContent();
-			api.post_raw("Logs", {}, function (data) {
-				$(".logs_diagnostics_view").html(data);
-			});
-		}
-	}
-};
-
-view.diagnostics = {
-	init: function init() {
-		multiselect.clearSelection();
-
-		view.photo.hide();
-		view.diagnostics.title("Diagnostics");
-		view.diagnostics.content.init();
-	},
-
-	title: function title() {
-		lychee.setTitle("Diagnostics", false);
-	},
-
-	clearContent: function clearContent(update) {
-		var html = "";
-
-		if (update === 2) {
-			html += view.diagnostics.button("", lychee.locale["UPDATE_AVAILABLE"]);
-		} else if (update === 3) {
-			html += view.diagnostics.button("", lychee.locale["MIGRATION_AVAILABLE"]);
-		} else if (update > 0) {
-			html += view.diagnostics.button("Check_", lychee.locale["CHECK_FOR_UPDATE"]);
-		}
-
-		html += '
';
-		lychee.content.html(html);
-	},
-
-	button: function button(type, locale) {
-		var html = "";
-		html += '
'; - html += lychee.html(_templateObject87, type, locale); - html += "
"; - - return html; - }, - - bind: function bind() { - $("#Update_Lychee").on("click", view.diagnostics.call_apply_update); - $("#Check_Update_Lychee").on("click", view.diagnostics.call_check_update); - }, - - content: { - init: function init() { - view.diagnostics.clearContent(false); - - if (lychee.api_V2) { - view.diagnostics.content.v_2(); - } else { - view.diagnostics.content.v_1(); - } - }, - - v_1: function v_1() { - api.post_raw("Diagnostics", {}, function (data) { - $(".logs_diagnostics_view").html(data); - }); - }, - - v_2: function v_2() { - api.post("Diagnostics", {}, function (data) { - view.diagnostics.clearContent(data.update); - var html = ""; - - html += view.diagnostics.content.block("error", "Diagnostics", data.errors); - html += view.diagnostics.content.block("sys", "System Information", data.infos); - html += ''; - html += ''; - html += lychee.html(_templateObject32, lychee.locale["DIAGNOSTICS_GET_SIZE"]); - html += ""; - html += view.diagnostics.content.block("conf", "Config Information", data.configs); - - $(".logs_diagnostics_view").html(html); - - view.diagnostics.bind(); - - $("#Get_Size_Lychee").on("click", view.diagnostics.call_get_size); - }); - }, - - print_array: function print_array(arr) { - var html = ""; - var i = void 0; - - for (i = 0; i < arr.length; i++) { - html += " " + arr[i] + "\n"; - } - return html; - }, - - block: function block(id, title, arr) { - var html = ""; - html += '
\n\n\n\n';
-			html += "    " + title + "\n";
-			html += "    ".padEnd(title.length, "-") + "\n";
-			html += view.diagnostics.content.print_array(arr);
-			html += "
\n"; - return html; - } - }, - - call_check_update: function call_check_update() { - api.post("Update::Check", [], function (data) { - loadingBar.show("success", data); - $("#Check_Update_Lychee").remove(); - }); - }, - - call_apply_update: function call_apply_update() { - api.post("Update::Apply", [], function (data) { - var html = view.preify(data, ""); - $("#Update_Lychee").remove(); - $(html).prependTo(".logs_diagnostics_view"); - }); - }, - - call_get_size: function call_get_size() { - api.post("Diagnostics::getSize", [], function (data) { - var html = view.preify(data, ""); - $("#Get_Size_Lychee").remove(); - $(html).appendTo("#content_diag_sys"); - }); - } -}; - -view.update = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.update.title(); - view.update.content.init(); - }, - - title: function title() { - lychee.setTitle("Update", false); - }, - - clearContent: function clearContent() { - var html = ""; - html += '
';
-		lychee.content.html(html);
-	},
-
-	content: {
-		init: function init() {
-			view.update.clearContent();
-
-			// code duplicate
-			api.post("Update::Apply", [], function (data) {
-				var html = view.preify(data, "logs_diagnostics_view");
-				lychee.content.html(html);
-			});
-		}
-	}
-};
-
-view.preify = function (data, css) {
-	var html = '
';
-	if (Array.isArray(data)) {
-		for (var i = 0; i < data.length; i++) {
-			html += "    " + data[i] + "\n";
-		}
-	} else {
-		html += "    " + data;
-	}
-	html += "
"; - - return html; -}; - -view.u2f = { - init: function init() { - multiselect.clearSelection(); - - view.photo.hide(); - view.u2f.title(); - view.u2f.content.init(); - }, - - title: function title() { - lychee.setTitle(lychee.locale["U2F"], false); - }, - - clearContent: function clearContent() { - lychee.content.html('
'); - }, - - content: { - init: function init() { - view.u2f.clearContent(); - - var html = ""; - - if (u2f.json.length === 0) { - $(".u2f_view").append('

Credentials list is empty!

'); - } else { - html += '
' + "

" + '' + lychee.locale["U2F_CREDENTIALS"] + "" + - // '' + build.iconic('data-transfer-upload') + '' + - // '' + build.iconic('lock-locked') + '' + - "

" + "
"; - - $(".u2f_view").append(html); - - $.each(u2f.json, function () { - $(".u2f_view").append(build.u2f(this)); - settings.bind("#CredentialDelete" + this.id, "#CredentialData" + this.id, u2f.delete); - // if (this.upload === 1) { - // $('#UserData' + this.id + ' .choice input[name="upload"]').click(); - // } - // if (this.lock === 1) { - // $('#UserData' + this.id + ' .choice input[name="lock"]').click(); - // } - }); - } - - html = '
' + lychee.locale["U2F_REGISTER_KEY"] + "" + "
"; - $(".u2f_view").append(html); - $("#RegisterU2FButton").on("click", u2f.register); - } - } -}; - -/** - * @description This module is used to check if elements are visible or not. - */ - -var visible = {}; - -visible.albums = function () { - if (header.dom(".header__toolbar--public").hasClass("header__toolbar--visible")) return true; - if (header.dom(".header__toolbar--albums").hasClass("header__toolbar--visible")) return true; - return false; -}; - -visible.album = function () { - if (header.dom(".header__toolbar--album").hasClass("header__toolbar--visible")) return true; - return false; -}; - -visible.photo = function () { - if ($("#imageview.fadeIn").length > 0) return true; - return false; -}; - -visible.mapview = function () { - if ($("#mapview.fadeIn").length > 0) return true; - return false; -}; - -visible.search = function () { - if (search.hash != null) return true; - return false; -}; - -visible.sidebar = function () { - if (_sidebar.dom().hasClass("active") === true) return true; - return false; -}; - -visible.sidebarbutton = function () { - if (visible.photo()) return true; - if (visible.album() && $("#button_info_album:visible").length > 0) return true; - return false; -}; - -visible.header = function () { - if (header.dom().hasClass("header--hidden") === true) return false; - return true; -}; - -visible.contextMenu = function () { - return basicContext.visible(); -}; - -visible.multiselect = function () { - if ($("#multiselect").length > 0) return true; - return false; -}; - -visible.leftMenu = function () { - if (leftMenu.dom().hasClass("leftMenu__visible")) return true; - return false; -}; - -(function (window, factory) { - var basicContext = factory(window, window.document); - window.basicContext = basicContext; - if ((typeof module === "undefined" ? "undefined" : _typeof(module)) == "object" && module.exports) { - module.exports = basicContext; - } -})(window, function l(window, document) { - var ITEM = "item", - SEPARATOR = "separator"; - - var dom = function dom() { - var elem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - return document.querySelector(".basicContext " + elem); - }; - - var valid = function valid() { - var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var emptyItem = Object.keys(item).length === 0 ? true : false; - - if (emptyItem === true) item.type = SEPARATOR; - if (item.type == null) item.type = ITEM; - if (item.class == null) item.class = ""; - if (item.visible !== false) item.visible = true; - if (item.icon == null) item.icon = null; - if (item.title == null) item.title = "Undefined"; - - // Add disabled class when item disabled - if (item.disabled !== true) item.disabled = false; - if (item.disabled === true) item.class += " basicContext__item--disabled"; - - // Item requires a function when - // it's not a separator and not disabled - if (item.fn == null && item.type !== SEPARATOR && item.disabled === false) { - console.warn("Missing fn for item '" + item.title + "'"); - return false; - } - - return true; - }; - - var buildItem = function buildItem(item, num) { - var html = "", - span = ""; - - // Parse and validate item - if (valid(item) === false) return ""; - - // Skip when invisible - if (item.visible === false) return ""; - - // Give item a unique number - item.num = num; - - // Generate span/icon-element - if (item.icon !== null) span = ""; - - // Generate item - if (item.type === ITEM) { - html = "\n\t\t \n\t\t " + span + item.title + "\n\t\t \n\t\t "; - } else if (item.type === SEPARATOR) { - html = "\n\t\t \n\t\t "; - } - - return html; - }; - - var build = function build(items) { - var html = ""; - - html += "\n\t
\n\t
\n\t \n\t \n\t "; - - items.forEach(function (item, i) { - return html += buildItem(item, i); - }); - - html += "\n\t \n\t
\n\t
\n\t
\n\t "; - - return html; - }; - - var getNormalizedEvent = function getNormalizedEvent() { - var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var pos = { - x: e.clientX, - y: e.clientY - }; - - if (e.type === "touchend" && (pos.x == null || pos.y == null)) { - // We need to capture clientX and clientY from original event - // when the event 'touchend' does not return the touch position - - var touches = e.changedTouches; - - if (touches != null && touches.length > 0) { - pos.x = touches[0].clientX; - pos.y = touches[0].clientY; - } - } - - // Position unknown - if (pos.x == null || pos.x < 0) pos.x = 0; - if (pos.y == null || pos.y < 0) pos.y = 0; - - return pos; - }; - - var getPosition = function getPosition(e, context) { - // Get the click position - var normalizedEvent = getNormalizedEvent(e); - - // Set the initial position - var x = normalizedEvent.x, - y = normalizedEvent.y; - - // Get size of browser - var browserSize = { - width: window.innerWidth, - height: window.innerHeight - }; - - // Get size of context - var contextSize = { - width: context.offsetWidth, - height: context.offsetHeight - }; - - // Fix position based on context and browser size - if (x + contextSize.width > browserSize.width) x = x - (x + contextSize.width - browserSize.width); - if (y + contextSize.height > browserSize.height) y = y - (y + contextSize.height - browserSize.height); - - // Make context scrollable and start at the top of the browser - // when context is higher than the browser - if (contextSize.height > browserSize.height) { - y = 0; - context.classList.add("basicContext--scrollable"); - } - - // Calculate the relative position of the mouse to the context - var rx = normalizedEvent.x - x, - ry = normalizedEvent.y - y; - - return { x: x, y: y, rx: rx, ry: ry }; - }; - - var bind = function bind() { - var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - if (item.fn == null) return false; - if (item.visible === false) return false; - if (item.disabled === true) return false; - - dom("td[data-num='" + item.num + "']").onclick = item.fn; - dom("td[data-num='" + item.num + "']").oncontextmenu = item.fn; - - return true; - }; - - var show = function show(items, e, fnClose, fnCallback) { - // Build context - var html = build(items); - - // Add context to the body - document.body.insertAdjacentHTML("beforeend", html); - - // Cache the context - var context = dom(); - - // Calculate position - var position = getPosition(e, context); - - // Set position - context.style.left = position.x + "px"; - context.style.top = position.y + "px"; - context.style.transformOrigin = position.rx + "px " + position.ry + "px"; - context.style.opacity = 1; - - // Close fn fallback - if (fnClose == null) fnClose = close; - - // Bind click on background - context.parentElement.onclick = fnClose; - context.parentElement.oncontextmenu = fnClose; - - // Bind click on items - items.forEach(bind); - - // Do not trigger default event or further propagation - if (typeof e.preventDefault === "function") e.preventDefault(); - if (typeof e.stopPropagation === "function") e.stopPropagation(); - - // Call callback when a function - if (typeof fnCallback === "function") fnCallback(); - - return true; - }; - - var visible = function visible() { - var elem = dom(); - - return !(elem == null || elem.length === 0); - }; - - var close = function close() { - if (visible() === false) return false; - - var container = document.querySelector(".basicContextContainer"); - - container.parentElement.removeChild(container); - - return true; - }; - - return { - ITEM: ITEM, - SEPARATOR: SEPARATOR, - show: show, - visible: visible, - close: close - }; -}); \ No newline at end of file diff --git a/demo/dist/page.css b/demo/dist/page.css deleted file mode 100644 index 720a8665..00000000 --- a/demo/dist/page.css +++ /dev/null @@ -1,3041 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,700,900"); -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font: inherit; - font-size: 100%; - vertical-align: baseline; } - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { - display: block; } - -body { - line-height: 1; } - -ol, -ul { - list-style: none; } - -blockquote, -q { - quotes: none; } - -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ""; - content: none; } - -table { - border-collapse: collapse; - border-spacing: 0; } - -em, -i { - font-style: italic; } - -strong, -b { - font-weight: bold; } - -* { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-transition: color 0.3s, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - -o-transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; } - -html, -body { - font-family: "Roboto", sans-serif; - background: #ffffff; } - -ol, -ul { - list-style: none; } - -a { - text-decoration: none; } - -@font-face { - font-family: "socials"; - src: url("fonts/socials.eot?egvu10"); - src: url("fonts/socials.eot?egvu10#iefix") format("embedded-opentype"), url("fonts/socials.ttf?egvu10") format("truetype"), url("fonts/socials.woff?egvu10") format("woff"), url("fonts/socials.svg?egvu10#socials") format("svg"); - font-weight: normal; - font-style: normal; } - -[class^="icon-"], -[class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: "socials" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - -.icon-facebook2:before { - content: "\ea91"; } - -.icon-instagram:before { - content: "\ea92"; } - -.icon-twitter:before { - content: "\ea96"; } - -.icon-youtube:before { - content: "\ea9d"; } - -.icon-flickr2:before { - content: "\eaa4"; } - -@font-face { - font-family: "icomoon"; - src: url("fonts/icomoon.eot?mqsjq9"); - src: url("fonts/icomoon.eot?mqsjq9#iefix") format("embedded-opentype"), url("fonts/icomoon.ttf?mqsjq9") format("truetype"), url("fonts/icomoon.woff?mqsjq9") format("woff"), url("fonts/icomoon.svg?mqsjq9#icomoon") format("svg"); - font-weight: normal; - font-style: normal; } - -[class^="icon-"], -[class*=" icon-"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: "icomoon" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - -.icon-3d_rotation:before { - content: "\e84d"; } - -.icon-ac_unit:before { - content: "\eb3b"; } - -.icon-alarm:before { - content: "\e855"; } - -.icon-access_alarms:before { - content: "\e191"; } - -.icon-schedule:before { - content: "\e8b5"; } - -.icon-accessibility:before { - content: "\e84e"; } - -.icon-accessible:before { - content: "\e914"; } - -.icon-account_balance:before { - content: "\e84f"; } - -.icon-account_balance_wallet:before { - content: "\e850"; } - -.icon-account_box:before { - content: "\e851"; } - -.icon-account_circle:before { - content: "\e853"; } - -.icon-adb:before { - content: "\e60e"; } - -.icon-add:before { - content: "\e145"; } - -.icon-add_a_photo:before { - content: "\e439"; } - -.icon-alarm_add:before { - content: "\e856"; } - -.icon-add_alert:before { - content: "\e003"; } - -.icon-add_box:before { - content: "\e146"; } - -.icon-add_circle:before { - content: "\e147"; } - -.icon-control_point:before { - content: "\e3ba"; } - -.icon-add_location:before { - content: "\e567"; } - -.icon-add_shopping_cart:before { - content: "\e854"; } - -.icon-queue:before { - content: "\e03c"; } - -.icon-add_to_queue:before { - content: "\e05c"; } - -.icon-adjust:before { - content: "\e39e"; } - -.icon-airline_seat_flat:before { - content: "\e630"; } - -.icon-airline_seat_flat_angled:before { - content: "\e631"; } - -.icon-airline_seat_individual_suite:before { - content: "\e632"; } - -.icon-airline_seat_legroom_extra:before { - content: "\e633"; } - -.icon-airline_seat_legroom_normal:before { - content: "\e634"; } - -.icon-airline_seat_legroom_reduced:before { - content: "\e635"; } - -.icon-airline_seat_recline_extra:before { - content: "\e636"; } - -.icon-airline_seat_recline_normal:before { - content: "\e637"; } - -.icon-flight:before { - content: "\e539"; } - -.icon-airplanemode_inactive:before { - content: "\e194"; } - -.icon-airplay:before { - content: "\e055"; } - -.icon-airport_shuttle:before { - content: "\eb3c"; } - -.icon-alarm_off:before { - content: "\e857"; } - -.icon-alarm_on:before { - content: "\e858"; } - -.icon-album:before { - content: "\e019"; } - -.icon-all_inclusive:before { - content: "\eb3d"; } - -.icon-all_out:before { - content: "\e90b"; } - -.icon-android:before { - content: "\e859"; } - -.icon-announcement:before { - content: "\e85a"; } - -.icon-apps:before { - content: "\e5c3"; } - -.icon-archive:before { - content: "\e149"; } - -.icon-arrow_back:before { - content: "\e5c4"; } - -.icon-arrow_downward:before { - content: "\e5db"; } - -.icon-arrow_drop_down:before { - content: "\e5c5"; } - -.icon-arrow_drop_down_circle:before { - content: "\e5c6"; } - -.icon-arrow_drop_up:before { - content: "\e5c7"; } - -.icon-arrow_forward:before { - content: "\e5c8"; } - -.icon-arrow_upward:before { - content: "\e5d8"; } - -.icon-art_track:before { - content: "\e060"; } - -.icon-aspect_ratio:before { - content: "\e85b"; } - -.icon-poll:before { - content: "\e801"; } - -.icon-assignment:before { - content: "\e85d"; } - -.icon-assignment_ind:before { - content: "\e85e"; } - -.icon-assignment_late:before { - content: "\e85f"; } - -.icon-assignment_return:before { - content: "\e860"; } - -.icon-assignment_returned:before { - content: "\e861"; } - -.icon-assignment_turned_in:before { - content: "\e862"; } - -.icon-assistant:before { - content: "\e39f"; } - -.icon-flag:before { - content: "\e153"; } - -.icon-attach_file:before { - content: "\e226"; } - -.icon-attach_money:before { - content: "\e227"; } - -.icon-attachment:before { - content: "\e2bc"; } - -.icon-audiotrack:before { - content: "\e3a1"; } - -.icon-autorenew:before { - content: "\e863"; } - -.icon-av_timer:before { - content: "\e01b"; } - -.icon-backspace:before { - content: "\e14a"; } - -.icon-cloud_upload:before { - content: "\e2c3"; } - -.icon-battery_alert:before { - content: "\e19c"; } - -.icon-battery_charging_full:before { - content: "\e1a3"; } - -.icon-battery_std:before { - content: "\e1a5"; } - -.icon-battery_unknown:before { - content: "\e1a6"; } - -.icon-beach_access:before { - content: "\eb3e"; } - -.icon-beenhere:before { - content: "\e52d"; } - -.icon-block:before { - content: "\e14b"; } - -.icon-bluetooth:before { - content: "\e1a7"; } - -.icon-bluetooth_searching:before { - content: "\e1aa"; } - -.icon-bluetooth_connected:before { - content: "\e1a8"; } - -.icon-bluetooth_disabled:before { - content: "\e1a9"; } - -.icon-blur_circular:before { - content: "\e3a2"; } - -.icon-blur_linear:before { - content: "\e3a3"; } - -.icon-blur_off:before { - content: "\e3a4"; } - -.icon-blur_on:before { - content: "\e3a5"; } - -.icon-class:before { - content: "\e86e"; } - -.icon-turned_in:before { - content: "\e8e6"; } - -.icon-turned_in_not:before { - content: "\e8e7"; } - -.icon-border_all:before { - content: "\e228"; } - -.icon-border_bottom:before { - content: "\e229"; } - -.icon-border_clear:before { - content: "\e22a"; } - -.icon-border_color:before { - content: "\e22b"; } - -.icon-border_horizontal:before { - content: "\e22c"; } - -.icon-border_inner:before { - content: "\e22d"; } - -.icon-border_left:before { - content: "\e22e"; } - -.icon-border_outer:before { - content: "\e22f"; } - -.icon-border_right:before { - content: "\e230"; } - -.icon-border_style:before { - content: "\e231"; } - -.icon-border_top:before { - content: "\e232"; } - -.icon-border_vertical:before { - content: "\e233"; } - -.icon-branding_watermark:before { - content: "\e06b"; } - -.icon-brightness_1:before { - content: "\e3a6"; } - -.icon-brightness_2:before { - content: "\e3a7"; } - -.icon-brightness_3:before { - content: "\e3a8"; } - -.icon-brightness_4:before { - content: "\e3a9"; } - -.icon-brightness_low:before { - content: "\e1ad"; } - -.icon-brightness_medium:before { - content: "\e1ae"; } - -.icon-brightness_high:before { - content: "\e1ac"; } - -.icon-brightness_auto:before { - content: "\e1ab"; } - -.icon-broken_image:before { - content: "\e3ad"; } - -.icon-brush:before { - content: "\e3ae"; } - -.icon-bubble_chart:before { - content: "\e6dd"; } - -.icon-bug_report:before { - content: "\e868"; } - -.icon-build:before { - content: "\e869"; } - -.icon-burst_mode:before { - content: "\e43c"; } - -.icon-domain:before { - content: "\e7ee"; } - -.icon-business_center:before { - content: "\eb3f"; } - -.icon-cached:before { - content: "\e86a"; } - -.icon-cake:before { - content: "\e7e9"; } - -.icon-phone:before { - content: "\e0cd"; } - -.icon-call_end:before { - content: "\e0b1"; } - -.icon-call_made:before { - content: "\e0b2"; } - -.icon-merge_type:before { - content: "\e252"; } - -.icon-call_missed:before { - content: "\e0b4"; } - -.icon-call_missed_outgoing:before { - content: "\e0e4"; } - -.icon-call_received:before { - content: "\e0b5"; } - -.icon-call_split:before { - content: "\e0b6"; } - -.icon-call_to_action:before { - content: "\e06c"; } - -.icon-camera:before { - content: "\e3af"; } - -.icon-photo_camera:before { - content: "\e412"; } - -.icon-camera_enhance:before { - content: "\e8fc"; } - -.icon-camera_front:before { - content: "\e3b1"; } - -.icon-camera_rear:before { - content: "\e3b2"; } - -.icon-camera_roll:before { - content: "\e3b3"; } - -.icon-cancel:before { - content: "\e5c9"; } - -.icon-redeem:before { - content: "\e8b1"; } - -.icon-card_membership:before { - content: "\e8f7"; } - -.icon-card_travel:before { - content: "\e8f8"; } - -.icon-casino:before { - content: "\eb40"; } - -.icon-cast:before { - content: "\e307"; } - -.icon-cast_connected:before { - content: "\e308"; } - -.icon-center_focus_strong:before { - content: "\e3b4"; } - -.icon-center_focus_weak:before { - content: "\e3b5"; } - -.icon-change_history:before { - content: "\e86b"; } - -.icon-chat:before { - content: "\e0b7"; } - -.icon-chat_bubble:before { - content: "\e0ca"; } - -.icon-chat_bubble_outline:before { - content: "\e0cb"; } - -.icon-check:before { - content: "\e5ca"; } - -.icon-check_box:before { - content: "\e834"; } - -.icon-check_box_outline_blank:before { - content: "\e835"; } - -.icon-check_circle:before { - content: "\e86c"; } - -.icon-navigate_before:before { - content: "\e408"; } - -.icon-navigate_next:before { - content: "\e409"; } - -.icon-child_care:before { - content: "\eb41"; } - -.icon-child_friendly:before { - content: "\eb42"; } - -.icon-chrome_reader_mode:before { - content: "\e86d"; } - -.icon-close:before { - content: "\e5cd"; } - -.icon-clear_all:before { - content: "\e0b8"; } - -.icon-closed_caption:before { - content: "\e01c"; } - -.icon-wb_cloudy:before { - content: "\e42d"; } - -.icon-cloud_circle:before { - content: "\e2be"; } - -.icon-cloud_done:before { - content: "\e2bf"; } - -.icon-cloud_download:before { - content: "\e2c0"; } - -.icon-cloud_off:before { - content: "\e2c1"; } - -.icon-cloud_queue:before { - content: "\e2c2"; } - -.icon-code:before { - content: "\e86f"; } - -.icon-photo_library:before { - content: "\e413"; } - -.icon-collections_bookmark:before { - content: "\e431"; } - -.icon-palette:before { - content: "\e40a"; } - -.icon-colorize:before { - content: "\e3b8"; } - -.icon-comment:before { - content: "\e0b9"; } - -.icon-compare:before { - content: "\e3b9"; } - -.icon-compare_arrows:before { - content: "\e915"; } - -.icon-laptop:before { - content: "\e31e"; } - -.icon-confirmation_number:before { - content: "\e638"; } - -.icon-contact_mail:before { - content: "\e0d0"; } - -.icon-contact_phone:before { - content: "\e0cf"; } - -.icon-contacts:before { - content: "\e0ba"; } - -.icon-content_copy:before { - content: "\e14d"; } - -.icon-content_cut:before { - content: "\e14e"; } - -.icon-content_paste:before { - content: "\e14f"; } - -.icon-control_point_duplicate:before { - content: "\e3bb"; } - -.icon-copyright:before { - content: "\e90c"; } - -.icon-mode_edit:before { - content: "\e254"; } - -.icon-create_new_folder:before { - content: "\e2cc"; } - -.icon-payment:before { - content: "\e8a1"; } - -.icon-crop:before { - content: "\e3be"; } - -.icon-crop_16_9:before { - content: "\e3bc"; } - -.icon-crop_3_2:before { - content: "\e3bd"; } - -.icon-crop_landscape:before { - content: "\e3c3"; } - -.icon-crop_7_5:before { - content: "\e3c0"; } - -.icon-crop_din:before { - content: "\e3c1"; } - -.icon-crop_free:before { - content: "\e3c2"; } - -.icon-crop_original:before { - content: "\e3c4"; } - -.icon-crop_portrait:before { - content: "\e3c5"; } - -.icon-crop_rotate:before { - content: "\e437"; } - -.icon-crop_square:before { - content: "\e3c6"; } - -.icon-dashboard:before { - content: "\e871"; } - -.icon-data_usage:before { - content: "\e1af"; } - -.icon-date_range:before { - content: "\e916"; } - -.icon-dehaze:before { - content: "\e3c7"; } - -.icon-delete:before { - content: "\e872"; } - -.icon-delete_forever:before { - content: "\e92b"; } - -.icon-delete_sweep:before { - content: "\e16c"; } - -.icon-description:before { - content: "\e873"; } - -.icon-desktop_mac:before { - content: "\e30b"; } - -.icon-desktop_windows:before { - content: "\e30c"; } - -.icon-details:before { - content: "\e3c8"; } - -.icon-developer_board:before { - content: "\e30d"; } - -.icon-developer_mode:before { - content: "\e1b0"; } - -.icon-device_hub:before { - content: "\e335"; } - -.icon-phonelink:before { - content: "\e326"; } - -.icon-devices_other:before { - content: "\e337"; } - -.icon-dialer_sip:before { - content: "\e0bb"; } - -.icon-dialpad:before { - content: "\e0bc"; } - -.icon-directions:before { - content: "\e52e"; } - -.icon-directions_bike:before { - content: "\e52f"; } - -.icon-directions_boat:before { - content: "\e532"; } - -.icon-directions_bus:before { - content: "\e530"; } - -.icon-directions_car:before { - content: "\e531"; } - -.icon-directions_railway:before { - content: "\e534"; } - -.icon-directions_run:before { - content: "\e566"; } - -.icon-directions_transit:before { - content: "\e535"; } - -.icon-directions_walk:before { - content: "\e536"; } - -.icon-disc_full:before { - content: "\e610"; } - -.icon-dns:before { - content: "\e875"; } - -.icon-not_interested:before { - content: "\e033"; } - -.icon-do_not_disturb_alt:before { - content: "\e611"; } - -.icon-do_not_disturb_off:before { - content: "\e643"; } - -.icon-remove_circle:before { - content: "\e15c"; } - -.icon-dock:before { - content: "\e30e"; } - -.icon-done:before { - content: "\e876"; } - -.icon-done_all:before { - content: "\e877"; } - -.icon-donut_large:before { - content: "\e917"; } - -.icon-donut_small:before { - content: "\e918"; } - -.icon-drafts:before { - content: "\e151"; } - -.icon-drag_handle:before { - content: "\e25d"; } - -.icon-time_to_leave:before { - content: "\e62c"; } - -.icon-dvr:before { - content: "\e1b2"; } - -.icon-edit_location:before { - content: "\e568"; } - -.icon-eject:before { - content: "\e8fb"; } - -.icon-markunread:before { - content: "\e159"; } - -.icon-enhanced_encryption:before { - content: "\e63f"; } - -.icon-equalizer:before { - content: "\e01d"; } - -.icon-error:before { - content: "\e000"; } - -.icon-error_outline:before { - content: "\e001"; } - -.icon-euro_symbol:before { - content: "\e926"; } - -.icon-ev_station:before { - content: "\e56d"; } - -.icon-insert_invitation:before { - content: "\e24f"; } - -.icon-event_available:before { - content: "\e614"; } - -.icon-event_busy:before { - content: "\e615"; } - -.icon-event_note:before { - content: "\e616"; } - -.icon-event_seat:before { - content: "\e903"; } - -.icon-exit_to_app:before { - content: "\e879"; } - -.icon-expand_less:before { - content: "\e5ce"; } - -.icon-expand_more:before { - content: "\e5cf"; } - -.icon-explicit:before { - content: "\e01e"; } - -.icon-explore:before { - content: "\e87a"; } - -.icon-exposure:before { - content: "\e3ca"; } - -.icon-exposure_neg_1:before { - content: "\e3cb"; } - -.icon-exposure_neg_2:before { - content: "\e3cc"; } - -.icon-exposure_plus_1:before { - content: "\e3cd"; } - -.icon-exposure_plus_2:before { - content: "\e3ce"; } - -.icon-exposure_zero:before { - content: "\e3cf"; } - -.icon-extension:before { - content: "\e87b"; } - -.icon-face:before { - content: "\e87c"; } - -.icon-fast_forward:before { - content: "\e01f"; } - -.icon-fast_rewind:before { - content: "\e020"; } - -.icon-favorite:before { - content: "\e87d"; } - -.icon-favorite_border:before { - content: "\e87e"; } - -.icon-featured_play_list:before { - content: "\e06d"; } - -.icon-featured_video:before { - content: "\e06e"; } - -.icon-sms_failed:before { - content: "\e626"; } - -.icon-fiber_dvr:before { - content: "\e05d"; } - -.icon-fiber_manual_record:before { - content: "\e061"; } - -.icon-fiber_new:before { - content: "\e05e"; } - -.icon-fiber_pin:before { - content: "\e06a"; } - -.icon-fiber_smart_record:before { - content: "\e062"; } - -.icon-get_app:before { - content: "\e884"; } - -.icon-file_upload:before { - content: "\e2c6"; } - -.icon-filter:before { - content: "\e3d3"; } - -.icon-filter_1:before { - content: "\e3d0"; } - -.icon-filter_2:before { - content: "\e3d1"; } - -.icon-filter_3:before { - content: "\e3d2"; } - -.icon-filter_4:before { - content: "\e3d4"; } - -.icon-filter_5:before { - content: "\e3d5"; } - -.icon-filter_6:before { - content: "\e3d6"; } - -.icon-filter_7:before { - content: "\e3d7"; } - -.icon-filter_8:before { - content: "\e3d8"; } - -.icon-filter_9:before { - content: "\e3d9"; } - -.icon-filter_9_plus:before { - content: "\e3da"; } - -.icon-filter_b_and_w:before { - content: "\e3db"; } - -.icon-filter_center_focus:before { - content: "\e3dc"; } - -.icon-filter_drama:before { - content: "\e3dd"; } - -.icon-filter_frames:before { - content: "\e3de"; } - -.icon-terrain:before { - content: "\e564"; } - -.icon-filter_list:before { - content: "\e152"; } - -.icon-filter_none:before { - content: "\e3e0"; } - -.icon-filter_tilt_shift:before { - content: "\e3e2"; } - -.icon-filter_vintage:before { - content: "\e3e3"; } - -.icon-find_in_page:before { - content: "\e880"; } - -.icon-find_replace:before { - content: "\e881"; } - -.icon-fingerprint:before { - content: "\e90d"; } - -.icon-first_page:before { - content: "\e5dc"; } - -.icon-fitness_center:before { - content: "\eb43"; } - -.icon-flare:before { - content: "\e3e4"; } - -.icon-flash_auto:before { - content: "\e3e5"; } - -.icon-flash_off:before { - content: "\e3e6"; } - -.icon-flash_on:before { - content: "\e3e7"; } - -.icon-flight_land:before { - content: "\e904"; } - -.icon-flight_takeoff:before { - content: "\e905"; } - -.icon-flip:before { - content: "\e3e8"; } - -.icon-flip_to_back:before { - content: "\e882"; } - -.icon-flip_to_front:before { - content: "\e883"; } - -.icon-folder:before { - content: "\e2c7"; } - -.icon-folder_open:before { - content: "\e2c8"; } - -.icon-folder_shared:before { - content: "\e2c9"; } - -.icon-folder_special:before { - content: "\e617"; } - -.icon-font_download:before { - content: "\e167"; } - -.icon-format_align_center:before { - content: "\e234"; } - -.icon-format_align_justify:before { - content: "\e235"; } - -.icon-format_align_left:before { - content: "\e236"; } - -.icon-format_align_right:before { - content: "\e237"; } - -.icon-format_bold:before { - content: "\e238"; } - -.icon-format_clear:before { - content: "\e239"; } - -.icon-format_color_fill:before { - content: "\e23a"; } - -.icon-format_color_reset:before { - content: "\e23b"; } - -.icon-format_color_text:before { - content: "\e23c"; } - -.icon-format_indent_decrease:before { - content: "\e23d"; } - -.icon-format_indent_increase:before { - content: "\e23e"; } - -.icon-format_italic:before { - content: "\e23f"; } - -.icon-format_line_spacing:before { - content: "\e240"; } - -.icon-format_list_bulleted:before { - content: "\e241"; } - -.icon-format_list_numbered:before { - content: "\e242"; } - -.icon-format_paint:before { - content: "\e243"; } - -.icon-format_quote:before { - content: "\e244"; } - -.icon-format_shapes:before { - content: "\e25e"; } - -.icon-format_size:before { - content: "\e245"; } - -.icon-format_strikethrough:before { - content: "\e246"; } - -.icon-format_textdirection_l_to_r:before { - content: "\e247"; } - -.icon-format_textdirection_r_to_l:before { - content: "\e248"; } - -.icon-format_underlined:before { - content: "\e249"; } - -.icon-question_answer:before { - content: "\e8af"; } - -.icon-forward:before { - content: "\e154"; } - -.icon-forward_10:before { - content: "\e056"; } - -.icon-forward_30:before { - content: "\e057"; } - -.icon-forward_5:before { - content: "\e058"; } - -.icon-free_breakfast:before { - content: "\eb44"; } - -.icon-fullscreen:before { - content: "\e5d0"; } - -.icon-fullscreen_exit:before { - content: "\e5d1"; } - -.icon-functions:before { - content: "\e24a"; } - -.icon-g_translate:before { - content: "\e927"; } - -.icon-games:before { - content: "\e021"; } - -.icon-gavel:before { - content: "\e90e"; } - -.icon-gesture:before { - content: "\e155"; } - -.icon-gif:before { - content: "\e908"; } - -.icon-goat:before { - content: "\e900"; } - -.icon-golf_course:before { - content: "\eb45"; } - -.icon-my_location:before { - content: "\e55c"; } - -.icon-location_searching:before { - content: "\e1b7"; } - -.icon-location_disabled:before { - content: "\e1b6"; } - -.icon-star:before { - content: "\e838"; } - -.icon-gradient:before { - content: "\e3e9"; } - -.icon-grain:before { - content: "\e3ea"; } - -.icon-graphic_eq:before { - content: "\e1b8"; } - -.icon-grid_off:before { - content: "\e3eb"; } - -.icon-grid_on:before { - content: "\e3ec"; } - -.icon-people:before { - content: "\e7fb"; } - -.icon-group_add:before { - content: "\e7f0"; } - -.icon-group_work:before { - content: "\e886"; } - -.icon-hd:before { - content: "\e052"; } - -.icon-hdr_off:before { - content: "\e3ed"; } - -.icon-hdr_on:before { - content: "\e3ee"; } - -.icon-hdr_strong:before { - content: "\e3f1"; } - -.icon-hdr_weak:before { - content: "\e3f2"; } - -.icon-headset:before { - content: "\e310"; } - -.icon-headset_mic:before { - content: "\e311"; } - -.icon-healing:before { - content: "\e3f3"; } - -.icon-hearing:before { - content: "\e023"; } - -.icon-help:before { - content: "\e887"; } - -.icon-help_outline:before { - content: "\e8fd"; } - -.icon-high_quality:before { - content: "\e024"; } - -.icon-highlight:before { - content: "\e25f"; } - -.icon-highlight_off:before { - content: "\e888"; } - -.icon-restore:before { - content: "\e8b3"; } - -.icon-home:before { - content: "\e88a"; } - -.icon-hot_tub:before { - content: "\eb46"; } - -.icon-local_hotel:before { - content: "\e549"; } - -.icon-hourglass_empty:before { - content: "\e88b"; } - -.icon-hourglass_full:before { - content: "\e88c"; } - -.icon-http:before { - content: "\e902"; } - -.icon-lock:before { - content: "\e897"; } - -.icon-photo:before { - content: "\e410"; } - -.icon-image_aspect_ratio:before { - content: "\e3f5"; } - -.icon-import_contacts:before { - content: "\e0e0"; } - -.icon-import_export:before { - content: "\e0c3"; } - -.icon-important_devices:before { - content: "\e912"; } - -.icon-inbox:before { - content: "\e156"; } - -.icon-indeterminate_check_box:before { - content: "\e909"; } - -.icon-info:before { - content: "\e88e"; } - -.icon-info_outline:before { - content: "\e88f"; } - -.icon-input:before { - content: "\e890"; } - -.icon-insert_comment:before { - content: "\e24c"; } - -.icon-insert_drive_file:before { - content: "\e24d"; } - -.icon-tag_faces:before { - content: "\e420"; } - -.icon-link:before { - content: "\e157"; } - -.icon-invert_colors:before { - content: "\e891"; } - -.icon-invert_colors_off:before { - content: "\e0c4"; } - -.icon-iso:before { - content: "\e3f6"; } - -.icon-keyboard:before { - content: "\e312"; } - -.icon-keyboard_arrow_down:before { - content: "\e313"; } - -.icon-keyboard_arrow_left:before { - content: "\e314"; } - -.icon-keyboard_arrow_right:before { - content: "\e315"; } - -.icon-keyboard_arrow_up:before { - content: "\e316"; } - -.icon-keyboard_backspace:before { - content: "\e317"; } - -.icon-keyboard_capslock:before { - content: "\e318"; } - -.icon-keyboard_hide:before { - content: "\e31a"; } - -.icon-keyboard_return:before { - content: "\e31b"; } - -.icon-keyboard_tab:before { - content: "\e31c"; } - -.icon-keyboard_voice:before { - content: "\e31d"; } - -.icon-kitchen:before { - content: "\eb47"; } - -.icon-label:before { - content: "\e892"; } - -.icon-label_outline:before { - content: "\e893"; } - -.icon-language:before { - content: "\e894"; } - -.icon-laptop_chromebook:before { - content: "\e31f"; } - -.icon-laptop_mac:before { - content: "\e320"; } - -.icon-laptop_windows:before { - content: "\e321"; } - -.icon-last_page:before { - content: "\e5dd"; } - -.icon-open_in_new:before { - content: "\e89e"; } - -.icon-layers:before { - content: "\e53b"; } - -.icon-layers_clear:before { - content: "\e53c"; } - -.icon-leak_add:before { - content: "\e3f8"; } - -.icon-leak_remove:before { - content: "\e3f9"; } - -.icon-lens:before { - content: "\e3fa"; } - -.icon-library_books:before { - content: "\e02f"; } - -.icon-library_music:before { - content: "\e030"; } - -.icon-lightbulb_outline:before { - content: "\e90f"; } - -.icon-line_style:before { - content: "\e919"; } - -.icon-line_weight:before { - content: "\e91a"; } - -.icon-linear_scale:before { - content: "\e260"; } - -.icon-linked_camera:before { - content: "\e438"; } - -.icon-list:before { - content: "\e896"; } - -.icon-live_help:before { - content: "\e0c6"; } - -.icon-live_tv:before { - content: "\e639"; } - -.icon-local_play:before { - content: "\e553"; } - -.icon-local_airport:before { - content: "\e53d"; } - -.icon-local_atm:before { - content: "\e53e"; } - -.icon-local_bar:before { - content: "\e540"; } - -.icon-local_cafe:before { - content: "\e541"; } - -.icon-local_car_wash:before { - content: "\e542"; } - -.icon-local_convenience_store:before { - content: "\e543"; } - -.icon-restaurant_menu:before { - content: "\e561"; } - -.icon-local_drink:before { - content: "\e544"; } - -.icon-local_florist:before { - content: "\e545"; } - -.icon-local_gas_station:before { - content: "\e546"; } - -.icon-shopping_cart:before { - content: "\e8cc"; } - -.icon-local_hospital:before { - content: "\e548"; } - -.icon-local_laundry_service:before { - content: "\e54a"; } - -.icon-local_library:before { - content: "\e54b"; } - -.icon-local_mall:before { - content: "\e54c"; } - -.icon-theaters:before { - content: "\e8da"; } - -.icon-local_offer:before { - content: "\e54e"; } - -.icon-local_parking:before { - content: "\e54f"; } - -.icon-local_pharmacy:before { - content: "\e550"; } - -.icon-local_pizza:before { - content: "\e552"; } - -.icon-print:before { - content: "\e8ad"; } - -.icon-local_shipping:before { - content: "\e558"; } - -.icon-local_taxi:before { - content: "\e559"; } - -.icon-location_city:before { - content: "\e7f1"; } - -.icon-location_off:before { - content: "\e0c7"; } - -.icon-room:before { - content: "\e8b4"; } - -.icon-lock_open:before { - content: "\e898"; } - -.icon-lock_outline:before { - content: "\e899"; } - -.icon-looks:before { - content: "\e3fc"; } - -.icon-looks_3:before { - content: "\e3fb"; } - -.icon-looks_4:before { - content: "\e3fd"; } - -.icon-looks_5:before { - content: "\e3fe"; } - -.icon-looks_6:before { - content: "\e3ff"; } - -.icon-looks_one:before { - content: "\e400"; } - -.icon-looks_two:before { - content: "\e401"; } - -.icon-sync:before { - content: "\e627"; } - -.icon-loupe:before { - content: "\e402"; } - -.icon-low_priority:before { - content: "\e16d"; } - -.icon-loyalty:before { - content: "\e89a"; } - -.icon-mail_outline:before { - content: "\e0e1"; } - -.icon-map:before { - content: "\e55b"; } - -.icon-markunread_mailbox:before { - content: "\e89b"; } - -.icon-memory:before { - content: "\e322"; } - -.icon-menu:before { - content: "\e5d2"; } - -.icon-message:before { - content: "\e0c9"; } - -.icon-mic:before { - content: "\e029"; } - -.icon-mic_none:before { - content: "\e02a"; } - -.icon-mic_off:before { - content: "\e02b"; } - -.icon-mms:before { - content: "\e618"; } - -.icon-mode_comment:before { - content: "\e253"; } - -.icon-monetization_on:before { - content: "\e263"; } - -.icon-money_off:before { - content: "\e25c"; } - -.icon-monochrome_photos:before { - content: "\e403"; } - -.icon-mood_bad:before { - content: "\e7f3"; } - -.icon-more:before { - content: "\e619"; } - -.icon-more_horiz:before { - content: "\e5d3"; } - -.icon-more_vert:before { - content: "\e5d4"; } - -.icon-motorcycle:before { - content: "\e91b"; } - -.icon-mouse:before { - content: "\e323"; } - -.icon-move_to_inbox:before { - content: "\e168"; } - -.icon-movie_creation:before { - content: "\e404"; } - -.icon-movie_filter:before { - content: "\e43a"; } - -.icon-multiline_chart:before { - content: "\e6df"; } - -.icon-music_note:before { - content: "\e405"; } - -.icon-music_video:before { - content: "\e063"; } - -.icon-nature:before { - content: "\e406"; } - -.icon-nature_people:before { - content: "\e407"; } - -.icon-navigation:before { - content: "\e55d"; } - -.icon-near_me:before { - content: "\e569"; } - -.icon-network_cell:before { - content: "\e1b9"; } - -.icon-network_check:before { - content: "\e640"; } - -.icon-network_locked:before { - content: "\e61a"; } - -.icon-network_wifi:before { - content: "\e1ba"; } - -.icon-new_releases:before { - content: "\e031"; } - -.icon-next_week:before { - content: "\e16a"; } - -.icon-nfc:before { - content: "\e1bb"; } - -.icon-no_encryption:before { - content: "\e641"; } - -.icon-signal_cellular_no_sim:before { - content: "\e1ce"; } - -.icon-note:before { - content: "\e06f"; } - -.icon-note_add:before { - content: "\e89c"; } - -.icon-notifications:before { - content: "\e7f4"; } - -.icon-notifications_active:before { - content: "\e7f7"; } - -.icon-notifications_none:before { - content: "\e7f5"; } - -.icon-notifications_off:before { - content: "\e7f6"; } - -.icon-notifications_paused:before { - content: "\e7f8"; } - -.icon-offline_pin:before { - content: "\e90a"; } - -.icon-ondemand_video:before { - content: "\e63a"; } - -.icon-opacity:before { - content: "\e91c"; } - -.icon-open_in_browser:before { - content: "\e89d"; } - -.icon-open_with:before { - content: "\e89f"; } - -.icon-pages:before { - content: "\e7f9"; } - -.icon-pageview:before { - content: "\e8a0"; } - -.icon-pan_tool:before { - content: "\e925"; } - -.icon-panorama:before { - content: "\e40b"; } - -.icon-radio_button_unchecked:before { - content: "\e836"; } - -.icon-panorama_horizontal:before { - content: "\e40d"; } - -.icon-panorama_vertical:before { - content: "\e40e"; } - -.icon-panorama_wide_angle:before { - content: "\e40f"; } - -.icon-party_mode:before { - content: "\e7fa"; } - -.icon-pause:before { - content: "\e034"; } - -.icon-pause_circle_filled:before { - content: "\e035"; } - -.icon-pause_circle_outline:before { - content: "\e036"; } - -.icon-people_outline:before { - content: "\e7fc"; } - -.icon-perm_camera_mic:before { - content: "\e8a2"; } - -.icon-perm_contact_calendar:before { - content: "\e8a3"; } - -.icon-perm_data_setting:before { - content: "\e8a4"; } - -.icon-perm_device_information:before { - content: "\e8a5"; } - -.icon-person_outline:before { - content: "\e7ff"; } - -.icon-perm_media:before { - content: "\e8a7"; } - -.icon-perm_phone_msg:before { - content: "\e8a8"; } - -.icon-perm_scan_wifi:before { - content: "\e8a9"; } - -.icon-person:before { - content: "\e7fd"; } - -.icon-person_add:before { - content: "\e7fe"; } - -.icon-person_pin:before { - content: "\e55a"; } - -.icon-person_pin_circle:before { - content: "\e56a"; } - -.icon-personal_video:before { - content: "\e63b"; } - -.icon-pets:before { - content: "\e91d"; } - -.icon-phone_android:before { - content: "\e324"; } - -.icon-phone_bluetooth_speaker:before { - content: "\e61b"; } - -.icon-phone_forwarded:before { - content: "\e61c"; } - -.icon-phone_in_talk:before { - content: "\e61d"; } - -.icon-phone_iphone:before { - content: "\e325"; } - -.icon-phone_locked:before { - content: "\e61e"; } - -.icon-phone_missed:before { - content: "\e61f"; } - -.icon-phone_paused:before { - content: "\e620"; } - -.icon-phonelink_erase:before { - content: "\e0db"; } - -.icon-phonelink_lock:before { - content: "\e0dc"; } - -.icon-phonelink_off:before { - content: "\e327"; } - -.icon-phonelink_ring:before { - content: "\e0dd"; } - -.icon-phonelink_setup:before { - content: "\e0de"; } - -.icon-photo_album:before { - content: "\e411"; } - -.icon-photo_filter:before { - content: "\e43b"; } - -.icon-photo_size_select_actual:before { - content: "\e432"; } - -.icon-photo_size_select_large:before { - content: "\e433"; } - -.icon-photo_size_select_small:before { - content: "\e434"; } - -.icon-picture_as_pdf:before { - content: "\e415"; } - -.icon-picture_in_picture:before { - content: "\e8aa"; } - -.icon-picture_in_picture_alt:before { - content: "\e911"; } - -.icon-pie_chart:before { - content: "\e6c4"; } - -.icon-pie_chart_outlined:before { - content: "\e6c5"; } - -.icon-pin_drop:before { - content: "\e55e"; } - -.icon-play_arrow:before { - content: "\e037"; } - -.icon-play_circle_filled:before { - content: "\e038"; } - -.icon-play_circle_outline:before { - content: "\e039"; } - -.icon-play_for_work:before { - content: "\e906"; } - -.icon-playlist_add:before { - content: "\e03b"; } - -.icon-playlist_add_check:before { - content: "\e065"; } - -.icon-playlist_play:before { - content: "\e05f"; } - -.icon-plus_one:before { - content: "\e800"; } - -.icon-polymer:before { - content: "\e8ab"; } - -.icon-pool:before { - content: "\eb48"; } - -.icon-portable_wifi_off:before { - content: "\e0ce"; } - -.icon-portrait:before { - content: "\e416"; } - -.icon-power:before { - content: "\e63c"; } - -.icon-power_input:before { - content: "\e336"; } - -.icon-power_settings_new:before { - content: "\e8ac"; } - -.icon-pregnant_woman:before { - content: "\e91e"; } - -.icon-present_to_all:before { - content: "\e0df"; } - -.icon-priority_high:before { - content: "\e645"; } - -.icon-public:before { - content: "\e80b"; } - -.icon-publish:before { - content: "\e255"; } - -.icon-queue_music:before { - content: "\e03d"; } - -.icon-queue_play_next:before { - content: "\e066"; } - -.icon-radio:before { - content: "\e03e"; } - -.icon-radio_button_checked:before { - content: "\e837"; } - -.icon-rate_review:before { - content: "\e560"; } - -.icon-receipt:before { - content: "\e8b0"; } - -.icon-recent_actors:before { - content: "\e03f"; } - -.icon-record_voice_over:before { - content: "\e91f"; } - -.icon-redo:before { - content: "\e15a"; } - -.icon-refresh:before { - content: "\e5d5"; } - -.icon-remove:before { - content: "\e15b"; } - -.icon-remove_circle_outline:before { - content: "\e15d"; } - -.icon-remove_from_queue:before { - content: "\e067"; } - -.icon-visibility:before { - content: "\e8f4"; } - -.icon-remove_shopping_cart:before { - content: "\e928"; } - -.icon-reorder:before { - content: "\e8fe"; } - -.icon-repeat:before { - content: "\e040"; } - -.icon-repeat_one:before { - content: "\e041"; } - -.icon-replay:before { - content: "\e042"; } - -.icon-replay_10:before { - content: "\e059"; } - -.icon-replay_30:before { - content: "\e05a"; } - -.icon-replay_5:before { - content: "\e05b"; } - -.icon-reply:before { - content: "\e15e"; } - -.icon-reply_all:before { - content: "\e15f"; } - -.icon-report:before { - content: "\e160"; } - -.icon-warning:before { - content: "\e002"; } - -.icon-restaurant:before { - content: "\e56c"; } - -.icon-restore_page:before { - content: "\e929"; } - -.icon-ring_volume:before { - content: "\e0d1"; } - -.icon-room_service:before { - content: "\eb49"; } - -.icon-rotate_90_degrees_ccw:before { - content: "\e418"; } - -.icon-rotate_left:before { - content: "\e419"; } - -.icon-rotate_right:before { - content: "\e41a"; } - -.icon-rounded_corner:before { - content: "\e920"; } - -.icon-router:before { - content: "\e328"; } - -.icon-rowing:before { - content: "\e921"; } - -.icon-rss_feed:before { - content: "\e0e5"; } - -.icon-rv_hookup:before { - content: "\e642"; } - -.icon-satellite:before { - content: "\e562"; } - -.icon-save:before { - content: "\e161"; } - -.icon-scanner:before { - content: "\e329"; } - -.icon-school:before { - content: "\e80c"; } - -.icon-screen_lock_landscape:before { - content: "\e1be"; } - -.icon-screen_lock_portrait:before { - content: "\e1bf"; } - -.icon-screen_lock_rotation:before { - content: "\e1c0"; } - -.icon-screen_rotation:before { - content: "\e1c1"; } - -.icon-screen_share:before { - content: "\e0e2"; } - -.icon-sd_storage:before { - content: "\e1c2"; } - -.icon-search:before { - content: "\e8b6"; } - -.icon-security:before { - content: "\e32a"; } - -.icon-select_all:before { - content: "\e162"; } - -.icon-send:before { - content: "\e163"; } - -.icon-sentiment_dissatisfied:before { - content: "\e811"; } - -.icon-sentiment_neutral:before { - content: "\e812"; } - -.icon-sentiment_satisfied:before { - content: "\e813"; } - -.icon-sentiment_very_dissatisfied:before { - content: "\e814"; } - -.icon-sentiment_very_satisfied:before { - content: "\e815"; } - -.icon-settings:before { - content: "\e8b8"; } - -.icon-settings_applications:before { - content: "\e8b9"; } - -.icon-settings_backup_restore:before { - content: "\e8ba"; } - -.icon-settings_bluetooth:before { - content: "\e8bb"; } - -.icon-settings_brightness:before { - content: "\e8bd"; } - -.icon-settings_cell:before { - content: "\e8bc"; } - -.icon-settings_ethernet:before { - content: "\e8be"; } - -.icon-settings_input_antenna:before { - content: "\e8bf"; } - -.icon-settings_input_composite:before { - content: "\e8c1"; } - -.icon-settings_input_hdmi:before { - content: "\e8c2"; } - -.icon-settings_input_svideo:before { - content: "\e8c3"; } - -.icon-settings_overscan:before { - content: "\e8c4"; } - -.icon-settings_phone:before { - content: "\e8c5"; } - -.icon-settings_power:before { - content: "\e8c6"; } - -.icon-settings_remote:before { - content: "\e8c7"; } - -.icon-settings_system_daydream:before { - content: "\e1c3"; } - -.icon-settings_voice:before { - content: "\e8c8"; } - -.icon-share:before { - content: "\e80d"; } - -.icon-shop:before { - content: "\e8c9"; } - -.icon-shop_two:before { - content: "\e8ca"; } - -.icon-shopping_basket:before { - content: "\e8cb"; } - -.icon-short_text:before { - content: "\e261"; } - -.icon-show_chart:before { - content: "\e6e1"; } - -.icon-shuffle:before { - content: "\e043"; } - -.icon-signal_cellular_4_bar:before { - content: "\e1c8"; } - -.icon-signal_cellular_connected_no_internet_4_bar:before { - content: "\e1cd"; } - -.icon-signal_cellular_null:before { - content: "\e1cf"; } - -.icon-signal_cellular_off:before { - content: "\e1d0"; } - -.icon-signal_wifi_4_bar:before { - content: "\e1d8"; } - -.icon-signal_wifi_4_bar_lock:before { - content: "\e1d9"; } - -.icon-signal_wifi_off:before { - content: "\e1da"; } - -.icon-sim_card:before { - content: "\e32b"; } - -.icon-sim_card_alert:before { - content: "\e624"; } - -.icon-skip_next:before { - content: "\e044"; } - -.icon-skip_previous:before { - content: "\e045"; } - -.icon-slideshow:before { - content: "\e41b"; } - -.icon-slow_motion_video:before { - content: "\e068"; } - -.icon-stay_primary_portrait:before { - content: "\e0d6"; } - -.icon-smoke_free:before { - content: "\eb4a"; } - -.icon-smoking_rooms:before { - content: "\eb4b"; } - -.icon-textsms:before { - content: "\e0d8"; } - -.icon-snooze:before { - content: "\e046"; } - -.icon-sort:before { - content: "\e164"; } - -.icon-sort_by_alpha:before { - content: "\e053"; } - -.icon-spa:before { - content: "\eb4c"; } - -.icon-space_bar:before { - content: "\e256"; } - -.icon-speaker:before { - content: "\e32d"; } - -.icon-speaker_group:before { - content: "\e32e"; } - -.icon-speaker_notes:before { - content: "\e8cd"; } - -.icon-speaker_notes_off:before { - content: "\e92a"; } - -.icon-speaker_phone:before { - content: "\e0d2"; } - -.icon-spellcheck:before { - content: "\e8ce"; } - -.icon-star_border:before { - content: "\e83a"; } - -.icon-star_half:before { - content: "\e839"; } - -.icon-stars:before { - content: "\e8d0"; } - -.icon-stay_primary_landscape:before { - content: "\e0d5"; } - -.icon-stop:before { - content: "\e047"; } - -.icon-stop_screen_share:before { - content: "\e0e3"; } - -.icon-storage:before { - content: "\e1db"; } - -.icon-store_mall_directory:before { - content: "\e563"; } - -.icon-straighten:before { - content: "\e41c"; } - -.icon-streetview:before { - content: "\e56e"; } - -.icon-strikethrough_s:before { - content: "\e257"; } - -.icon-style:before { - content: "\e41d"; } - -.icon-subdirectory_arrow_left:before { - content: "\e5d9"; } - -.icon-subdirectory_arrow_right:before { - content: "\e5da"; } - -.icon-subject:before { - content: "\e8d2"; } - -.icon-subscriptions:before { - content: "\e064"; } - -.icon-subtitles:before { - content: "\e048"; } - -.icon-subway:before { - content: "\e56f"; } - -.icon-supervisor_account:before { - content: "\e8d3"; } - -.icon-surround_sound:before { - content: "\e049"; } - -.icon-swap_calls:before { - content: "\e0d7"; } - -.icon-swap_horiz:before { - content: "\e8d4"; } - -.icon-swap_vert:before { - content: "\e8d5"; } - -.icon-swap_vertical_circle:before { - content: "\e8d6"; } - -.icon-switch_camera:before { - content: "\e41e"; } - -.icon-switch_video:before { - content: "\e41f"; } - -.icon-sync_disabled:before { - content: "\e628"; } - -.icon-sync_problem:before { - content: "\e629"; } - -.icon-system_update:before { - content: "\e62a"; } - -.icon-system_update_alt:before { - content: "\e8d7"; } - -.icon-tab:before { - content: "\e8d8"; } - -.icon-tab_unselected:before { - content: "\e8d9"; } - -.icon-tablet:before { - content: "\e32f"; } - -.icon-tablet_android:before { - content: "\e330"; } - -.icon-tablet_mac:before { - content: "\e331"; } - -.icon-tap_and_play:before { - content: "\e62b"; } - -.icon-text_fields:before { - content: "\e262"; } - -.icon-text_format:before { - content: "\e165"; } - -.icon-texture:before { - content: "\e421"; } - -.icon-thumb_down:before { - content: "\e8db"; } - -.icon-thumb_up:before { - content: "\e8dc"; } - -.icon-thumbs_up_down:before { - content: "\e8dd"; } - -.icon-timelapse:before { - content: "\e422"; } - -.icon-timeline:before { - content: "\e922"; } - -.icon-timer:before { - content: "\e425"; } - -.icon-timer_10:before { - content: "\e423"; } - -.icon-timer_3:before { - content: "\e424"; } - -.icon-timer_off:before { - content: "\e426"; } - -.icon-title:before { - content: "\e264"; } - -.icon-toc:before { - content: "\e8de"; } - -.icon-today:before { - content: "\e8df"; } - -.icon-toll:before { - content: "\e8e0"; } - -.icon-tonality:before { - content: "\e427"; } - -.icon-touch_app:before { - content: "\e913"; } - -.icon-toys:before { - content: "\e332"; } - -.icon-track_changes:before { - content: "\e8e1"; } - -.icon-traffic:before { - content: "\e565"; } - -.icon-train:before { - content: "\e570"; } - -.icon-tram:before { - content: "\e571"; } - -.icon-transfer_within_a_station:before { - content: "\e572"; } - -.icon-transform:before { - content: "\e428"; } - -.icon-translate:before { - content: "\e8e2"; } - -.icon-trending_down:before { - content: "\e8e3"; } - -.icon-trending_flat:before { - content: "\e8e4"; } - -.icon-trending_up:before { - content: "\e8e5"; } - -.icon-tune:before { - content: "\e429"; } - -.icon-tv:before { - content: "\e333"; } - -.icon-unarchive:before { - content: "\e169"; } - -.icon-undo:before { - content: "\e166"; } - -.icon-unfold_less:before { - content: "\e5d6"; } - -.icon-unfold_more:before { - content: "\e5d7"; } - -.icon-update:before { - content: "\e923"; } - -.icon-usb:before { - content: "\e1e0"; } - -.icon-verified_user:before { - content: "\e8e8"; } - -.icon-vertical_align_bottom:before { - content: "\e258"; } - -.icon-vertical_align_center:before { - content: "\e259"; } - -.icon-vertical_align_top:before { - content: "\e25a"; } - -.icon-vibration:before { - content: "\e62d"; } - -.icon-video_call:before { - content: "\e070"; } - -.icon-video_label:before { - content: "\e071"; } - -.icon-video_library:before { - content: "\e04a"; } - -.icon-videocam:before { - content: "\e04b"; } - -.icon-videocam_off:before { - content: "\e04c"; } - -.icon-videogame_asset:before { - content: "\e338"; } - -.icon-view_agenda:before { - content: "\e8e9"; } - -.icon-view_array:before { - content: "\e8ea"; } - -.icon-view_carousel:before { - content: "\e8eb"; } - -.icon-view_column:before { - content: "\e8ec"; } - -.icon-view_comfy:before { - content: "\e42a"; } - -.icon-view_compact:before { - content: "\e42b"; } - -.icon-view_day:before { - content: "\e8ed"; } - -.icon-view_headline:before { - content: "\e8ee"; } - -.icon-view_list:before { - content: "\e8ef"; } - -.icon-view_module:before { - content: "\e8f0"; } - -.icon-view_quilt:before { - content: "\e8f1"; } - -.icon-view_stream:before { - content: "\e8f2"; } - -.icon-view_week:before { - content: "\e8f3"; } - -.icon-vignette:before { - content: "\e435"; } - -.icon-visibility_off:before { - content: "\e8f5"; } - -.icon-voice_chat:before { - content: "\e62e"; } - -.icon-voicemail:before { - content: "\e0d9"; } - -.icon-volume_down:before { - content: "\e04d"; } - -.icon-volume_mute:before { - content: "\e04e"; } - -.icon-volume_off:before { - content: "\e04f"; } - -.icon-volume_up:before { - content: "\e050"; } - -.icon-vpn_key:before { - content: "\e0da"; } - -.icon-vpn_lock:before { - content: "\e62f"; } - -.icon-wallpaper:before { - content: "\e1bc"; } - -.icon-watch:before { - content: "\e334"; } - -.icon-watch_later:before { - content: "\e924"; } - -.icon-wb_auto:before { - content: "\e42c"; } - -.icon-wb_incandescent:before { - content: "\e42e"; } - -.icon-wb_iridescent:before { - content: "\e436"; } - -.icon-wb_sunny:before { - content: "\e430"; } - -.icon-wc:before { - content: "\e63d"; } - -.icon-web:before { - content: "\e051"; } - -.icon-web_asset:before { - content: "\e069"; } - -.icon-weekend:before { - content: "\e16b"; } - -.icon-whatshot:before { - content: "\e80e"; } - -.icon-widgets:before { - content: "\e1bd"; } - -.icon-wifi:before { - content: "\e63e"; } - -.icon-wifi_lock:before { - content: "\e1e1"; } - -.icon-wifi_tethering:before { - content: "\e1e2"; } - -.icon-work:before { - content: "\e8f9"; } - -.icon-wrap_text:before { - content: "\e25b"; } - -.icon-youtube_searched_for:before { - content: "\e8fa"; } - -.icon-zoom_in:before { - content: "\e8ff"; } - -.icon-zoom_out:before { - content: "\e901"; } - -.icon-zoom_out_map:before { - content: "\e56b"; } - -.pop-in.toggled, -.pop-out.toggled, -.pop-in-last.toggled { - opacity: 1; - -ms-transform: scale(1); - transform: scale(1); - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); } - -.pop-in, -.pop-in-last { - opacity: 0; - -ms-transform: scale(1.1); - transform: scale(1.1); - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); } - -.animate_slower { - transition: all 2s ease-in-out !important; - -webkit-transition: all 2s ease-in-out !important; - -moz-transition: all 2s ease-in-out !important; - -o-transition: all 2s ease-in-out !important; } - -.animate-up.toggled, -.animate-down.toggled { - opacity: 1; - -ms-transform: translateY(0px); - transform: translateY(0px); - -webkit-transform: translateY(0px); - -moz-transform: translateY(0px); - -o-transform: translateY(0px); } - -.animate-down { - opacity: 0; - -ms-transform: translateY(-300px); - transform: translateY(-300px); - -webkit-transform: translateY(-300px); - -moz-transform: translateY(-300px); - -o-transform: translateY(-300px); } - -.animate-up { - opacity: 0; - -ms-transform: translateY(300px); - transform: translateY(300px); - -webkit-transform: translateY(300px); - -moz-transform: translateY(300px); - -o-transform: translateY(300px); } - -.animate { - transition: all 1s ease-in-out; - -webkit-transition: all 1s ease-in-out; - -moz-transition: all 1s ease-in-out; - -o-transition: all 1s ease-in-out; } - -#header { - position: fixed; - left: 0; - top: 0; - right: 0; - z-index: 98; - background: #f7f7f7; } - -#logo { - float: left; - padding: 15px; } - #logo h1 { - color: #000000; - font-size: 1em; - text-transform: uppercase; - font-weight: 700; - text-align: center; } - #logo h1 span { - font-family: "Roboto", sans-serif; - font-size: 0.6em; - display: block; - font-weight: 300; - letter-spacing: 1px; - padding: 0 0 0 0; } - -#menu { - width: 100%; } - #menu li { - position: relative; - display: block; - float: right; - padding: 22px 1.5% 20px 1.5%; } - #menu a { - display: block; - font-size: 0.8em; - color: #666666; - text-transform: uppercase; - font-weight: 400; - transition: all 0.3s; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; } - #menu a:hover { - color: #b5b5b5 !important; } - #menu .current-menu-item a { - color: #b5b5b5 !important; } - -#menu_wrap { - position: fixed; - right: 0; - top: 0; - z-index: 98; - width: 80%; } - -#home_socials { - position: fixed; - bottom: 30px; - left: 0; - right: 0; - text-align: center; - z-index: 2; } - #home_socials .socialicons { - display: inline-block; - font-size: 1.4em; - margin: 15px 20px 15px 20px; } - -#socials { - position: fixed; - left: 0; - top: 37%; - background: rgba(0, 0, 0, 0.8); - z-index: 2; } - -.socialicons { - display: block; - font-size: 23px; - font-family: "socials" !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - color: #ffffff; - text-decoration: none; - margin: 15px; - transition: all 0.3s; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; } - .socialicons:hover { - color: #b5b5b5; - -ms-transform: scale(1.3); - transform: scale(1.3); - -webkit-transform: scale(1.3); } - -#twitter:before { - content: "\ea96"; } - -#instagram:before { - content: "\ea92"; } - -#youtube:before { - content: "\ea9d"; } - -#flickr:before { - content: "\eaa4"; } - -#facebook:before { - content: "\ea91"; } - -#content { - margin-top: 70px; - max-width: 70%; - font-family: "Roboto", sans-serif; - margin-left: auto; - margin-right: auto; } - #content h1 { - display: block; - font-size: 2em; - margin-bottom: 0.67em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content h2 { - display: block; - font-size: 1.5em; - margin-bottom: 0.83em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content h3 { - display: block; - font-size: 1.17em; - margin-bottom: 1em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content h4 { - display: block; - font-size: 1em; - margin-bottom: 1.33em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content h5 { - display: block; - font-size: 0.83em; - margin-bottom: 1.67em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content h6 { - display: block; - font-size: 0.67em; - margin-bottom: 2.33em; - margin-left: 0; - margin-right: 0; - font-weight: bold; } - #content p { - color: #707070; - margin-bottom: 1.5em; - line-height: 1.2em; - text-align: justify; } - #content div.left_30 { - width: 30%; - padding-bottom: 50px; - margin-top: 3px; - float: left; } - #content div.left_50 { - width: 50%; - margin-top: 3px; - padding-bottom: 50px; - float: left; } - #content div.right_70 { - width: 70%; - padding-bottom: 50px; - float: right; } - #content div.right_50 { - width: 50%; - padding-bottom: 50px; - float: right; } - #content div.left_50 img { - width: 80%; - margin-left: auto; - margin-right: auto; - border: 2px solid #707070; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; } - #content .clearfix::after { - content: ""; - clear: both; - display: table; } - -@media screen and (max-width: 700px) { - div.left_30, - div.left_50, - div.right_50, - div.right_70 { - width: 100% !important; - float: none !important; - margin: 0 0 30px 0; } - div.left_50 img { - width: 100% !important; } } - -#footer { - z-index: 3; - left: 0; - right: 0; - bottom: 0; - text-align: center; - padding: 5px 0 5px 0; - -webkit-transition: color 0.3s, opacity 0.3s ease-out, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - transition: color 0.3s, opacity 0.3s ease-out, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; - -o-transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s; - transition: color 0.3s, opacity 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s, margin-left 0.5s, -webkit-transform 0.3s ease-out, -webkit-box-shadow 0.3s; } - #footer p { - color: #cccccc; - font-size: 0.5em; - font-weight: 400; } - #footer p a { - color: #ccc; } - #footer p a:visited { - color: #ccc; } - #footer p.hosted_by, - #footer p.home_copyright { - text-transform: uppercase; } - -#footer { - position: fixed; - background: #ffffff; - color: #707070; - padding: 20px 0 20px 0; } - #footer p { - color: #707070; - font-size: 0.75em; } diff --git a/demo/dist/socials.eot b/demo/dist/socials.eot deleted file mode 100644 index 87c4e318..00000000 Binary files a/demo/dist/socials.eot and /dev/null differ diff --git a/demo/dist/user.css b/demo/dist/user.css deleted file mode 100644 index e69de29b..00000000 diff --git a/demo/dist/view.js b/demo/dist/view.js deleted file mode 100644 index 28b19ce2..00000000 --- a/demo/dist/view.js +++ /dev/null @@ -1,3017 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 049?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&pi.top-1&&g500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n"], [""]), - _templateObject2 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject3 = _taggedTemplateLiteral(["
", "
"], ["
", "
"]), - _templateObject4 = _taggedTemplateLiteral(["
"], ["
"]), - _templateObject5 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t\t\t$", "\n\t\t\t\t
\n\t\t\t"], ["\n\t\t\t
\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t\t\t$", "\n\t\t\t\t
\n\t\t\t"]), - _templateObject6 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject7 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t
"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t
"]), - _templateObject8 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t"], ["\n\t\t\t
\n\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t\t

$", "

\n\t\t\t"]), - _templateObject9 = _taggedTemplateLiteral(["", "", ""], ["", "", ""]), - _templateObject10 = _taggedTemplateLiteral(["", ""], ["", ""]), - _templateObject11 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject12 = _taggedTemplateLiteral(["\n\t\t\t\t\t
\n\t\t\t\t\t\t

$", "

\n\t\t\t\t\t\t

$", "

\n\t\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\t

$", "

\n\t\t\t\t\t
\n\t\t\t\t"]), - _templateObject13 = _taggedTemplateLiteral(["\n\t\t\t
\n\t\t\t\t

$", "

\n\t\t\t\t

", "

\n\t\t\t
\n\t\t"], ["\n\t\t\t
\n\t\t\t\t

$", "

\n\t\t\t\t

", "

\n\t\t\t
\n\t\t"]), - _templateObject14 = _taggedTemplateLiteral(["\n\t\t\t

$", "

\n\t\t\t

", " at ", ", ", " ", "
\n\t\t\t", " ", "

\n\t\t\t
\n\t\t"], ["\n\t\t\t

$", "

\n\t\t\t

", " at ", ", ", " ", "
\n\t\t\t", " ", "

\n\t\t\t
\n\t\t"]), - _templateObject15 = _taggedTemplateLiteral([""], [""]), - _templateObject16 = _taggedTemplateLiteral(["big"], ["big"]), - _templateObject17 = _taggedTemplateLiteral(["", ""], ["", ""]), - _templateObject18 = _taggedTemplateLiteral(["
", ""], ["
", ""]), - _templateObject19 = _taggedTemplateLiteral(["

", "

"], ["

", "

"]), - _templateObject20 = _taggedTemplateLiteral(["\n\t\t\t

$", "

\n\t\t\t
\n\t\t\t"], ["\n\t\t\t

$", "

\n\t\t\t
\n\t\t\t"]), - _templateObject21 = _taggedTemplateLiteral(["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"], ["\n\t\t\t\t
\n\t\t\t\t\t", "\n\t\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t"]), - _templateObject22 = _taggedTemplateLiteral(["\n\t\t
\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t
\n\t\t"], ["\n\t\t
\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t
\n\t\t"]), - _templateObject23 = _taggedTemplateLiteral(["$", "", ""], ["$", "", ""]), - _templateObject24 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject25 = _taggedTemplateLiteral(["
", "
"], ["
", "
"]), - _templateObject26 = _taggedTemplateLiteral(["
\n\t\t\t

\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\tSave\n\t\t\tDelete\n\t\t
\n\t\t"], ["
\n\t\t\t

\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\tSave\n\t\t\tDelete\n\t\t
\n\t\t"]), - _templateObject27 = _taggedTemplateLiteral(["
\n\t\t\t

\n\t\t\t\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t\tDelete\n\t\t
\n\t\t"], ["
\n\t\t\t

\n\t\t\t\n\t\t\t", "\n\t\t\t\n\t\t\t

\n\t\t\tDelete\n\t\t
\n\t\t"]), - _templateObject28 = _taggedTemplateLiteral(["$", "", ""], ["$", "", ""]), - _templateObject29 = _taggedTemplateLiteral([", "], [", "]), - _templateObject30 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject31 = _taggedTemplateLiteral(["$", ""], ["$", ""]), - _templateObject32 = _taggedTemplateLiteral(["\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\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\t "]), - _templateObject33 = _taggedTemplateLiteral(["\n\t\t\t\t \n\t\t\t\t
\n\t\t\t\t\t
", "
\n\t\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t "], ["\n\t\t\t\t \n\t\t\t\t
\n\t\t\t\t\t
", "
\n\t\t\t\t\t ", "\n\t\t\t\t
\n\t\t\t\t "]); - -function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -function gup(b) { - b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); - - var a = "[\\?&]" + b + "=([^&#]*)"; - var d = new RegExp(a); - var c = d.exec(window.location.href); - - if (c === null) return "";else return c[1]; -} - -/** - * @description This module communicates with Lychee's API - */ - -var api = { - path: "php/index.php", - onError: null -}; - -api.get_url = function (fn) { - var api_url = ""; - - if (lychee.api_V2) { - // because the api is defined directly by the function called in the route.php - api_url = "api/" + fn; - } else { - api_url = api.path; - } - - return api_url; -}; - -api.isTimeout = function (errorThrown, jqXHR) { - if (errorThrown && errorThrown === "Bad Request" && jqXHR && jqXHR.responseJSON && jqXHR.responseJSON.error && jqXHR.responseJSON.error === "Session timed out") { - return true; - } - - return false; -}; - -api.post = function (fn, params, callback) { - var responseProgressCB = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - - loadingBar.show(); - - params = $.extend({ function: fn }, params); - - var api_url = api.get_url(fn); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", params, errorThrown); - }; - - var ajaxParams = { - type: "POST", - url: api_url, - data: params, - dataType: "json", - success: success, - error: error - }; - - if (responseProgressCB !== null) { - ajaxParams.xhrFields = { - onprogress: responseProgressCB - }; - } - - $.ajax(ajaxParams); -}; - -api.get = function (url, callback) { - loadingBar.show(); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", {}, errorThrown); - }; - - $.ajax({ - type: "GET", - url: url, - data: {}, - dataType: "text", - success: success, - error: error - }); -}; - -api.post_raw = function (fn, params, callback) { - loadingBar.show(); - - params = $.extend({ function: fn }, params); - - var api_url = api.get_url(fn); - - var success = function success(data) { - setTimeout(loadingBar.hide, 100); - - // Catch errors - if (typeof data === "string" && data.substring(0, 7) === "Error: ") { - api.onError(data.substring(7, data.length), params, data); - return false; - } - - callback(data); - }; - - var error = function error(jqXHR, textStatus, errorThrown) { - api.onError(api.isTimeout(errorThrown, jqXHR) ? "Session timed out." : "Server error or API not found.", params, errorThrown); - }; - - $.ajax({ - type: "POST", - url: api_url, - data: params, - dataType: "text", - success: success, - error: error - }); -}; - -var csrf = {}; - -csrf.addLaravelCSRF = function (event, jqxhr, settings) { - if (settings.url !== lychee.updatePath) { - jqxhr.setRequestHeader("X-XSRF-TOKEN", csrf.getCookie("XSRF-TOKEN")); - } -}; - -csrf.escape = function (s) { - return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, "\\$1"); -}; - -csrf.getCookie = function (name) { - // we stop the selection at = (default json) but also at % to prevent any %3D at the end of the string - var match = document.cookie.match(RegExp("(?:^|;\\s*)" + csrf.escape(name) + "=([^;^%]*)")); - return match ? match[1] : null; -}; - -csrf.bind = function () { - $(document).on("ajaxSend", csrf.addLaravelCSRF); -}; - -/** - * @description Used to view single photos with view.php - */ - -// Sub-implementation of lychee -------------------------------------------------------------- // - -var lychee = {}; - -lychee.content = $(".content"); -lychee.imageview = $("#imageview"); -lychee.mapview = $("#mapview"); - -lychee.escapeHTML = function () { - var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - // Ensure that html is a string - html += ""; - - // Escape all critical characters - html = html.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/`/g, "`"); - - return html; -}; - -lychee.html = function (literalSections) { - // Use raw literal sections: we don’t want - // backslashes (\n etc.) to be interpreted - var raw = literalSections.raw; - var result = ""; - - for (var _len = arguments.length, substs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - substs[_key - 1] = arguments[_key]; - } - - substs.forEach(function (subst, i) { - // Retrieve the literal section preceding - // the current substitution - var lit = raw[i]; - - // If the substitution is preceded by a dollar sign, - // we escape special characters in it - if (lit.slice(-1) === "$") { - subst = lychee.escapeHTML(subst); - lit = lit.slice(0, -1); - } - - result += lit; - result += subst; - }); - - // Take care of last literal section - // (Never fails, because an empty template string - // produces one literal section, an empty string) - result += raw[raw.length - 1]; - - return result; -}; - -lychee.getEventName = function () { - var touchendSupport = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent || navigator.vendor || window.opera) && "ontouchend" in document.documentElement; - return touchendSupport === true ? "touchend" : "click"; -}; - -// Sub-implementation of photo -------------------------------------------------------------- // - -var photo = { - json: null -}; - -photo.share = function (photoID, service) { - var url = location.toString(); - - switch (service) { - case "twitter": - window.open("https://twitter.com/share?url=" + encodeURI(url)); - break; - case "facebook": - window.open("https://www.facebook.com/sharer.php?u=" + encodeURI(url)); - break; - case "mail": - location.href = "mailto:?subject=&body=" + encodeURI(url); - break; - } -}; - -photo.getDirectLink = function () { - return $("#imageview img").attr("src").replace(/"/g, "").replace(/url\(|\)$/gi, ""); -}; - -photo.update_display_overlay = function () { - lychee.image_overlay = !lychee.image_overlay; - if (!lychee.image_overlay) { - $("#image_overlay").remove(); - } else { - $("#imageview").append(build.overlay_image(photo.json)); - } -}; - -photo.show = function () { - $("#imageview").removeClass("full"); - header.dom().removeClass("header--hidden"); - - return true; -}; - -photo.hide = function () { - if (visible.photo() && !visible.sidebar() && !visible.contextMenu()) { - $("#imageview").addClass("full"); - header.dom().addClass("header--hidden"); - - return true; - } - - return false; -}; - -photo.onresize = function () { - // Copy of view.photo.onresize - if (photo.json.medium === "" || !photo.json.medium2x || photo.json.medium2x === "") return; - - var imgWidth = parseInt(photo.json.medium_dim); - var imgHeight = photo.json.medium_dim.substr(photo.json.medium_dim.lastIndexOf("x") + 1); - var containerWidth = parseFloat($("#imageview").width(), 10); - var containerHeight = parseFloat($("#imageview").height(), 10); - - var width = imgWidth < containerWidth ? imgWidth : containerWidth; - var height = width * imgHeight / imgWidth; - if (height > containerHeight) { - width = containerHeight * imgWidth / imgHeight; - } - - $("img#image").attr("sizes", width + "px"); -}; - -// Sub-implementation of contextMenu -------------------------------------------------------------- // - -var contextMenu = {}; - -contextMenu.sharePhoto = function (photoID, e) { - var iconClass = "ionicons"; - - var items = [{ title: build.iconic("twitter", iconClass) + "Twitter", fn: function fn() { - return photo.share(photoID, "twitter"); - } }, { title: build.iconic("facebook", iconClass) + "Facebook", fn: function fn() { - return photo.share(photoID, "facebook"); - } }, { title: build.iconic("envelope-closed") + "Mail", fn: function fn() { - return photo.share(photoID, "mail"); - } }, { title: build.iconic("link-intact") + "Direct Link", fn: function fn() { - return window.open(photo.getDirectLink(), "_newtab"); - } }]; - - basicContext.show(items, e.originalEvent); -}; - -// Main -------------------------------------------------------------- // - -var loadingBar = { - show: function show() {}, - hide: function hide() {} -}; - -var imageview = $("#imageview"); - -$(document).ready(function () { - // set CSRF protection (Laravel) - csrf.bind(); - - // Image View - imageview.on("click", "img", photo.update_display_overlay); - - $(window).on("resize", photo.onresize); - - // Save ID of photo - var photoID = gup("p"); - - // Set API error handler - api.onError = error; - - // Share - header.dom("#button_share").on("click", function (e) { - contextMenu.sharePhoto(photoID, e); - }); - - // Infobox - header.dom("#button_info").on("click", sidebar.toggle); - - // Load photo - loadPhotoInfo(photoID); -}); - -var loadPhotoInfo = function loadPhotoInfo(photoID) { - var params = { - photoID: photoID, - password: "" - }; - - api.post("Photo::get", params, function (data) { - if (data === "Warning: Photo private!" || data === "Warning: Wrong password!") { - $("body").append(build.no_content("question-mark")).removeClass("view"); - header.dom().remove(); - return false; - } - - photo.json = data; - - // Set title - if (!data.title) data.title = "Untitled"; - document.title = "Lychee - " + data.title; - header.dom(".header__title").html(lychee.escapeHTML(data.title)); - - // Render HTML - imageview.html(build.imageview(data, true).html); - imageview.find(".arrow_wrapper").remove(); - imageview.addClass("fadeIn").show(); - photo.onresize(); - - // Render Sidebar - var structure = sidebar.createStructure.photo(data); - var html = sidebar.render(structure); - - // Fullscreen - var timeout = null; - - $(document).bind("mousemove", function () { - clearTimeout(timeout); - photo.show(); - timeout = setTimeout(photo.hide, 2500); - }); - timeout = setTimeout(photo.hide, 2500); - - sidebar.dom(".sidebar__wrapper").html(html); - sidebar.bind(); - }); -}; - -var error = function error(errorThrown, params, data) { - console.error({ - description: errorThrown, - params: params, - response: data - }); - - loadingBar.show("error", errorThrown); -}; - -/** - * @description This module is used to generate HTML-Code. - */ - -var build = {}; - -build.iconic = function (icon) { - var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - - var html = ""; - - html += lychee.html(_templateObject, classes, icon); - - return html; -}; - -build.divider = function (title) { - var html = ""; - - html += lychee.html(_templateObject2, title); - - return html; -}; - -build.editIcon = function (id) { - var html = ""; - - html += lychee.html(_templateObject3, id, build.iconic("pencil")); - - return html; -}; - -build.multiselect = function (top, left) { - return lychee.html(_templateObject4, top, left); -}; - -build.getAlbumThumb = function (data, i) { - var isVideo = data.types[i] && data.types[i].indexOf("video") > -1; - var isRaw = data.types[i] && data.types[i].indexOf("raw") > -1; - var thumb = data.thumbs[i]; - var thumb2x = ""; - - if (thumb === "uploads/thumb/" && isVideo) { - return "Photo thumbnail"; - } - if (thumb === "uploads/thumb/" && isRaw) { - return "Photo thumbnail"; - } - - if (data.thumbs2x) { - if (data.thumbs2x[i]) { - thumb2x = data.thumbs2x[i]; - } - } else { - // Fallback code for Lychee v3 - var _lychee$retinize = lychee.retinize(data.thumbs[i]), - thumb2x = _lychee$retinize.path, - isPhoto = _lychee$retinize.isPhoto; - - if (!isPhoto) { - thumb2x = ""; - } - } - - return "Photo thumbnail"; -}; - -build.album = function (data) { - var disabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var html = ""; - var date_stamp = data.sysdate; - var sortingAlbums = []; - - // In the special case of take date sorting use the take stamps as title - if (lychee.sortingAlbums !== "" && data.min_takestamp && data.max_takestamp) { - sortingAlbums = lychee.sortingAlbums.replace("ORDER BY ", "").split(" "); - if (sortingAlbums[0] === "max_takestamp" || sortingAlbums[0] === "min_takestamp") { - if (data.min_takestamp !== "" && data.max_takestamp !== "") { - date_stamp = data.min_takestamp === data.max_takestamp ? data.max_takestamp : data.min_takestamp + " - " + data.max_takestamp; - } else if (data.min_takestamp !== "" && sortingAlbums[0] === "min_takestamp") { - date_stamp = data.min_takestamp; - } else if (data.max_takestamp !== "" && sortingAlbums[0] === "max_takestamp") { - date_stamp = data.max_takestamp; - } - } - } - - html += lychee.html(_templateObject5, disabled ? "disabled" : "", data.nsfw && data.nsfw === "1" && lychee.nsfw_blur ? "blurred" : "", data.id, data.nsfw && data.nsfw === "1" ? "1" : "0", tabindex.get_next_tab_index(), build.getAlbumThumb(data, 2), build.getAlbumThumb(data, 1), build.getAlbumThumb(data, 0), data.title, data.title, date_stamp); - - if (album.isUploadable() && !disabled) { - html += lychee.html(_templateObject6, data.nsfw === "1" ? "badge--nsfw" : "", build.iconic("warning"), data.star === "1" ? "badge--star" : "", build.iconic("star"), data.public === "1" ? "badge--visible" : "", data.visible === "1" ? "badge--not--hidden" : "badge--hidden", build.iconic("eye"), data.unsorted === "1" ? "badge--visible" : "", build.iconic("list"), data.recent === "1" ? "badge--visible badge--list" : "", build.iconic("clock"), data.password === "1" ? "badge--visible" : "", build.iconic("lock-locked"), data.tag_album === "1" ? "badge--tag" : "", build.iconic("tag")); - } - - if (data.albums && data.albums.length > 0 || data.hasOwnProperty("has_albums") && data.has_albums === "1") { - html += lychee.html(_templateObject7, build.iconic("layers")); - } - - html += "
"; - - return html; -}; - -build.photo = function (data) { - var disabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var html = ""; - var thumbnail = ""; - var thumb2x = ""; - - var isVideo = data.type && data.type.indexOf("video") > -1; - var isRaw = data.type && data.type.indexOf("raw") > -1; - var isLivePhoto = data.livePhotoUrl !== "" && data.livePhotoUrl !== null; - - if (data.thumbUrl === "uploads/thumb/" && isLivePhoto) { - thumbnail = "Photo thumbnail"; - } - if (data.thumbUrl === "uploads/thumb/" && isVideo) { - thumbnail = "Photo thumbnail"; - } else if (data.thumbUrl === "uploads/thumb/" && isRaw) { - thumbnail = "Photo thumbnail"; - } else if (lychee.layout === "0") { - if (data.hasOwnProperty("thumb2x")) { - // Lychee v4 - thumb2x = data.thumb2x; - } else { - // Lychee v3 - var _lychee$retinize2 = lychee.retinize(data.thumbUrl), - thumb2x = _lychee$retinize2.path; - } - - if (thumb2x !== "") { - thumb2x = "data-srcset='" + thumb2x + " 2x'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else { - if (data.small !== "") { - if (data.hasOwnProperty("small2x") && data.small2x !== "") { - thumb2x = "data-srcset='" + data.small + " " + parseInt(data.small_dim, 10) + "w, " + data.small2x + " " + parseInt(data.small2x_dim, 10) + "w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else if (data.medium !== "") { - if (data.hasOwnProperty("medium2x") && data.medium2x !== "") { - thumb2x = "data-srcset='" + data.medium + " " + parseInt(data.medium_dim, 10) + "w, " + data.medium2x + " " + parseInt(data.medium2x_dim, 10) + "w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else if (!isVideo) { - // Fallback for images with no small or medium. - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } else { - // Fallback for videos with no small (the case of no thumb is - // handled at the top of this function). - - if (data.hasOwnProperty("thumb2x")) { - // Lychee v4 - thumb2x = data.thumb2x; - } else { - // Lychee v3 - var _lychee$retinize3 = lychee.retinize(data.thumbUrl), - thumb2x = _lychee$retinize3.path; - } - - if (thumb2x !== "") { - thumb2x = "data-srcset='" + data.thumbUrl + " 200w, " + thumb2x + " 400w'"; - } - - thumbnail = ""; - thumbnail += "Photo thumbnail"; - thumbnail += ""; - } - } - - html += lychee.html(_templateObject8, disabled ? "disabled" : "", data.album, data.id, tabindex.get_next_tab_index(), thumbnail, data.title, data.title); - - if (data.takedate !== "") html += lychee.html(_templateObject9, build.iconic("camera-slr"), data.takedate);else html += lychee.html(_templateObject10, data.sysdate); - - html += "
"; - - if (album.isUploadable()) { - html += lychee.html(_templateObject11, data.star === "1" ? "badge--star" : "", build.iconic("star"), data.public === "1" && album.json.public !== "1" ? "badge--visible badge--hidden" : "", build.iconic("eye")); - } - - html += "
"; - - return html; -}; - -build.overlay_image = function (data) { - var exifHash = data.make + data.model + data.shutter + data.aperture + data.focal + data.iso; - - // Get the stored setting for the overlay_image - var type = lychee.image_overlay_type; - var html = ""; - - if (type && type === "desc" && data.description !== "") { - html = lychee.html(_templateObject12, data.title, data.description); - } else if (type && type === "takedate" && data.takedate !== "") { - html = lychee.html(_templateObject13, data.title, data.takedate); - } - // fall back to exif data if there is no description - else if (exifHash !== "") { - html += lychee.html(_templateObject14, data.title, data.shutter.replace("s", "sec"), data.aperture.replace("f/", "ƒ / "), lychee.locale["PHOTO_ISO"], data.iso, data.focal, data.lens && data.lens !== "" ? "(" + data.lens + ")" : ""); - } - - return html; -}; - -build.imageview = function (data, visibleControls, autoplay) { - var html = ""; - var thumb = ""; - - if (data.type.indexOf("video") > -1) { - html += lychee.html(_templateObject15, visibleControls === true ? "" : "full", autoplay ? "autoplay" : "", tabindex.get_next_tab_index(), data.url); - } else if (data.type.indexOf("raw") > -1 && data.medium === "") { - html += lychee.html(_templateObject16, visibleControls === true ? "" : "full", tabindex.get_next_tab_index()); - } else { - var img = ""; - - if (data.livePhotoUrl === "" || data.livePhotoUrl === null) { - // It's normal photo - - // See if we have the thumbnail loaded... - $(".photo").each(function () { - if ($(this).attr("data-id") && $(this).attr("data-id") == data.id) { - var thumbimg = $(this).find("img"); - if (thumbimg.length > 0) { - thumb = thumbimg[0].currentSrc ? thumbimg[0].currentSrc : thumbimg[0].src; - return false; - } - } - }); - - if (data.medium !== "") { - var medium = ""; - - if (data.hasOwnProperty("medium2x") && data.medium2x !== "") { - medium = "srcset='" + data.medium + " " + parseInt(data.medium_dim, 10) + "w, " + data.medium2x + " " + parseInt(data.medium2x_dim, 10) + "w'"; - } - img = "medium"); - } else { - img = "big"; - } - } else { - if (data.medium !== "") { - var medium_dims = data.medium_dim.split("x"); - var medium_width = medium_dims[0]; - var medium_height = medium_dims[1]; - // It's a live photo - img = "
"; - } else { - // It's a live photo - img = "
"; - } - } - - html += lychee.html(_templateObject17, img); - - if (lychee.image_overlay) html += build.overlay_image(data); - } - - html += "\n\t\t\t\n\t\t\t\n\t\t\t"; - - return { html: html, thumb: thumb }; -}; - -build.no_content = function (typ) { - var html = ""; - - html += lychee.html(_templateObject18, build.iconic(typ)); - - switch (typ) { - case "magnifying-glass": - html += lychee.html(_templateObject19, lychee.locale["VIEW_NO_RESULT"]); - break; - case "eye": - html += lychee.html(_templateObject19, lychee.locale["VIEW_NO_PUBLIC_ALBUMS"]); - break; - case "cog": - html += lychee.html(_templateObject19, lychee.locale["VIEW_NO_CONFIGURATION"]); - break; - case "question-mark": - html += lychee.html(_templateObject19, lychee.locale["VIEW_PHOTO_NOT_FOUND"]); - break; - } - - html += "
"; - - return html; -}; - -build.uploadModal = function (title, files) { - var html = ""; - - html += lychee.html(_templateObject20, title); - - var i = 0; - - while (i < files.length) { - var file = files[i]; - - if (file.name.length > 40) file.name = file.name.substr(0, 17) + "..." + file.name.substr(file.name.length - 20, 20); - - html += lychee.html(_templateObject21, file.name); - - i++; - } - - html += "
"; - - return html; -}; - -build.uploadNewFile = function (name) { - if (name.length > 40) { - name = name.substr(0, 17) + "..." + name.substr(name.length - 20, 20); - } - - return lychee.html(_templateObject22, name); -}; - -build.tags = function (tags) { - var html = ""; - var editable = typeof album !== "undefined" ? album.isUploadable() : false; - - // Search is enabled if logged in (not publicMode) or public seach is enabled - var searchable = lychee.publicMode === false || lychee.public_search === true; - - // build class_string for tag - var a_class = "tag"; - if (searchable) { - a_class = a_class + " search"; - } - - if (tags !== "") { - tags = tags.split(","); - - tags.forEach(function (tag, index) { - if (editable) { - html += lychee.html(_templateObject23, a_class, tag, index, build.iconic("x")); - } else { - html += lychee.html(_templateObject24, a_class, tag); - } - }); - } else { - html = lychee.html(_templateObject25, lychee.locale["NO_TAGS"]); - } - - return html; -}; - -build.user = function (user) { - var html = lychee.html(_templateObject26, user.id, user.id, user.username, user.id, user.id); - - return html; -}; - -build.u2f = function (credential) { - return lychee.html(_templateObject27, credential.id, credential.id, credential.id.slice(0, 30), credential.id); -}; - -/** - * @description This module takes care of the header. - */ - -var header = { - _dom: $(".header") -}; - -header.dom = function (selector) { - if (selector == null || selector === "") return header._dom; - return header._dom.find(selector); -}; - -header.bind = function () { - // Event Name - var eventName = lychee.getEventName(); - - header.dom(".header__title").on(eventName, function (e) { - if ($(this).hasClass("header__title--editable") === false) return false; - - if (lychee.enable_contextmenu_header === false) return false; - - if (visible.photo()) contextMenu.photoTitle(album.getID(), photo.getID(), e);else contextMenu.albumTitle(album.getID(), e); - }); - - header.dom("#button_visibility").on(eventName, function (e) { - photo.setPublic(photo.getID(), e); - }); - header.dom("#button_share").on(eventName, function (e) { - contextMenu.sharePhoto(photo.getID(), e); - }); - - header.dom("#button_visibility_album").on(eventName, function (e) { - album.setPublic(album.getID(), e); - }); - header.dom("#button_share_album").on(eventName, function (e) { - contextMenu.shareAlbum(album.getID(), e); - }); - - header.dom("#button_signin").on(eventName, lychee.loginDialog); - header.dom("#button_settings").on(eventName, leftMenu.open); - header.dom("#button_info_album").on(eventName, sidebar.toggle); - header.dom("#button_info").on(eventName, sidebar.toggle); - header.dom(".button--map-albums").on(eventName, function () { - lychee.gotoMap(); - }); - header.dom("#button_map_album").on(eventName, function () { - lychee.gotoMap(album.getID()); - }); - header.dom("#button_map").on(eventName, function () { - lychee.gotoMap(album.getID()); - }); - header.dom(".button_add").on(eventName, contextMenu.add); - header.dom("#button_more").on(eventName, function (e) { - contextMenu.photoMore(photo.getID(), e); - }); - header.dom("#button_move_album").on(eventName, function (e) { - contextMenu.move([album.getID()], e, album.setAlbum, "ROOT", album.getParent() != ""); - }); - header.dom("#button_nsfw_album").on(eventName, function (e) { - album.setNSFW(album.getID()); - }); - header.dom("#button_move").on(eventName, function (e) { - contextMenu.move([photo.getID()], e, photo.setAlbum); - }); - header.dom(".header__hostedwith").on(eventName, function () { - window.open(lychee.website); - }); - header.dom("#button_trash_album").on(eventName, function () { - album.delete([album.getID()]); - }); - header.dom("#button_trash").on(eventName, function () { - photo.delete([photo.getID()]); - }); - header.dom("#button_archive").on(eventName, function () { - album.getArchive([album.getID()]); - }); - header.dom("#button_star").on(eventName, function () { - photo.setStar([photo.getID()]); - }); - header.dom("#button_rotate_ccwise").on(eventName, function () { - photoeditor.rotate(photo.getID(), -1); - }); - header.dom("#button_rotate_cwise").on(eventName, function () { - photoeditor.rotate(photo.getID(), 1); - }); - header.dom("#button_back_home").on(eventName, function () { - if (!album.json.parent_id) { - lychee.goto(); - } else { - lychee.goto(album.getParent()); - } - }); - header.dom("#button_back").on(eventName, function () { - lychee.goto(album.getID()); - }); - header.dom("#button_back_map").on(eventName, function () { - lychee.goto(album.getID()); - }); - header.dom("#button_fs_album_enter,#button_fs_enter").on(eventName, lychee.fullscreenEnter); - header.dom("#button_fs_album_exit,#button_fs_exit").on(eventName, lychee.fullscreenExit).hide(); - - header.dom(".header__search").on("keyup click", function () { - if ($(this).val().length > 0) { - lychee.goto("search/" + encodeURIComponent($(this).val())); - } else if (search.hash !== null) { - search.reset(); - } - }); - header.dom(".header__clear").on(eventName, function () { - header.dom(".header__search").focus(); - search.reset(); - }); - - header.bind_back(); - - return true; -}; - -header.bind_back = function () { - // Event Name - var eventName = lychee.getEventName(); - - header.dom(".header__title").on(eventName, function () { - if (lychee.landing_page_enable && visible.albums()) { - window.location.href = "."; - } else { - return false; - } - }); -}; - -header.show = function () { - lychee.imageview.removeClass("full"); - header.dom().removeClass("header--hidden"); - - tabindex.restoreSettings(header.dom()); - - photo.updateSizeLivePhotoDuringAnimation(); - - return true; -}; - -header.hideIfLivePhotoNotPlaying = function () { - // Hides the header, if current live photo is not playing - if (photo.isLivePhotoPlaying() == true) return false; - return header.hide(); -}; - -header.hide = function () { - if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && basicModal.visible() === false) { - tabindex.saveSettings(header.dom()); - tabindex.makeUnfocusable(header.dom()); - - lychee.imageview.addClass("full"); - header.dom().addClass("header--hidden"); - - photo.updateSizeLivePhotoDuringAnimation(); - - return true; - } - - return false; -}; - -header.setTitle = function () { - var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Untitled"; - - var $title = header.dom(".header__title"); - var html = lychee.html(_templateObject28, title, build.iconic("caret-bottom")); - - $title.html(html); - - return true; -}; - -header.setMode = function (mode) { - if (mode === "albums" && lychee.publicMode === true) mode = "public"; - - switch (mode) { - case "public": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--albums, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--public").addClass("header__toolbar--visible"); - tabindex.makeFocusable(header.dom(".header__toolbar--public")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--albums, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map")); - - if (lychee.public_search) { - var e = $(".header__search, .header__clear", ".header__toolbar--public"); - e.show(); - tabindex.makeFocusable(e); - } else { - var _e = $(".header__search, .header__clear", ".header__toolbar--public"); - _e.hide(); - tabindex.makeUnfocusable(_e); - } - - // Set icon in Public mode - if (lychee.map_display_public) { - var _e2 = $(".button--map-albums", ".header__toolbar--public"); - _e2.show(); - tabindex.makeFocusable(_e2); - } else { - var _e3 = $(".button--map-albums", ".header__toolbar--public"); - _e3.hide(); - tabindex.makeUnfocusable(_e3); - } - - // Set focus on login button - if (lychee.active_focus_on_page_load) { - $("#button_signin").focus(); - } - return true; - - case "albums": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--albums").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--albums")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--photo, .header__toolbar--map")); - - // If map is disabled, we should hide the icon - if (lychee.map_display) { - var _e4 = $(".button--map-albums", ".header__toolbar--albums"); - _e4.show(); - tabindex.makeFocusable(_e4); - } else { - var _e5 = $(".button--map-albums", ".header__toolbar--albums"); - _e5.hide(); - tabindex.makeUnfocusable(_e5); - } - - if (lychee.enable_button_add) { - var _e6 = $(".button_add", ".header__toolbar--albums"); - _e6.show(); - tabindex.makeFocusable(_e6); - } else { - var _e7 = $(".button_add", ".header__toolbar--albums"); - _e7.remove(); - } - - return true; - - case "album": - var albumID = album.getID(); - - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--photo, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--album").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--album")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--photo, .header__toolbar--map")); - - // Hide download button when album empty or we are not allowed to - // upload to it and it's not explicitly marked as downloadable. - if (!album.json || album.json.photos === false && album.json.albums && album.json.albums.length === 0 || !album.isUploadable() && album.json.downloadable === "0") { - var _e8 = $("#button_archive"); - _e8.hide(); - tabindex.makeUnfocusable(_e8); - } else { - var _e9 = $("#button_archive"); - _e9.show(); - tabindex.makeFocusable(_e9); - } - - if (album.json && album.json.hasOwnProperty("share_button_visible") && album.json.share_button_visible !== "1") { - var _e10 = $("#button_share_album"); - _e10.hide(); - tabindex.makeUnfocusable(_e10); - } else { - var _e11 = $("#button_share_album"); - _e11.show(); - tabindex.makeFocusable(_e11); - } - - // If map is disabled, we should hide the icon - if (lychee.publicMode === true ? lychee.map_display_public : lychee.map_display) { - var _e12 = $("#button_map_album"); - _e12.show(); - tabindex.makeFocusable(_e12); - } else { - var _e13 = $("#button_map_album"); - _e13.hide(); - tabindex.makeUnfocusable(_e13); - } - - if (albumID === "starred" || albumID === "public" || albumID === "recent") { - $("#button_info_album, #button_trash_album, #button_visibility_album, #button_move_album").hide(); - $(".button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($(".button_add, .header__divider", ".header__toolbar--album")); - tabindex.makeUnfocusable($("#button_info_album, #button_trash_album, #button_visibility_album, #button_move_album")); - } else if (albumID === "unsorted") { - $("#button_info_album, #button_visibility_album, #button_move_album").hide(); - $("#button_trash_album, .button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($("#button_trash_album, .button_add, .header__divider", ".header__toolbar--album")); - tabindex.makeUnfocusable($("#button_info_album, #button_visibility_album, #button_move_album")); - } else if (album.isTagAlbum()) { - $("#button_info_album").show(); - $("#button_move_album").hide(); - $(".button_add, .header__divider", ".header__toolbar--album").hide(); - tabindex.makeFocusable($("#button_info_album")); - tabindex.makeUnfocusable($("#button_move_album")); - tabindex.makeUnfocusable($(".button_add, .header__divider", ".header__toolbar--album")); - if (album.isUploadable()) { - $("#button_visibility_album, #button_trash_album").show(); - tabindex.makeFocusable($("#button_visibility_album, #button_trash_album")); - } else { - $("#button_visibility_album, #button_trash_album").hide(); - tabindex.makeUnfocusable($("#button_visibility_album, #button_trash_album")); - } - } else { - $("#button_info_album").show(); - tabindex.makeFocusable($("#button_info_album")); - if (album.isUploadable()) { - $("#button_nsfw_album, #button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album").show(); - tabindex.makeFocusable($("#button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album")); - } else { - $("#button_nsfw_album, #button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album").hide(); - tabindex.makeUnfocusable($("#button_trash_album, #button_move_album, #button_visibility_album, .button_add, .header__divider", ".header__toolbar--album")); - } - } - - // Remove buttons if needed - if (!lychee.enable_button_visibility) { - var _e14 = $("#button_visibility_album", ".header__toolbar--album"); - _e14.remove(); - } - if (!lychee.enable_button_share) { - var _e15 = $("#button_share_album", ".header__toolbar--album"); - _e15.remove(); - } - if (!lychee.enable_button_archive) { - var _e16 = $("#button_archive", ".header__toolbar--album"); - _e16.remove(); - } - if (!lychee.enable_button_move) { - var _e17 = $("#button_move_album", ".header__toolbar--album"); - _e17.remove(); - } - if (!lychee.enable_button_trash) { - var _e18 = $("#button_trash_album", ".header__toolbar--album"); - _e18.remove(); - } - if (!lychee.enable_button_fullscreen) { - var _e19 = $("#button_fs_album_enter", ".header__toolbar--album"); - _e19.remove(); - } - if (!lychee.enable_button_add) { - var _e20 = $(".button_add", ".header__toolbar--album"); - _e20.remove(); - } - - return true; - - case "photo": - header.dom().addClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--album, .header__toolbar--map").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--photo").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--photo")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--albums, .header__toolbar--album, .header__toolbar--map")); - // If map is disabled, we should hide the icon - if (lychee.publicMode === true ? lychee.map_display_public : lychee.map_display) { - var _e21 = $("#button_map"); - _e21.show(); - tabindex.makeFocusable(_e21); - } else { - var _e22 = $("#button_map"); - _e22.hide(); - tabindex.makeUnfocusable(_e22); - } - - if (album.isUploadable()) { - var _e23 = $("#button_trash, #button_move, #button_visibility, #button_star"); - _e23.show(); - tabindex.makeFocusable(_e23); - } else { - var _e24 = $("#button_trash, #button_move, #button_visibility, #button_star"); - _e24.hide(); - tabindex.makeUnfocusable(_e24); - } - - if (photo.json && photo.json.hasOwnProperty("share_button_visible") && photo.json.share_button_visible !== "1") { - var _e25 = $("#button_share"); - _e25.hide(); - tabindex.makeUnfocusable(_e25); - } else { - var _e26 = $("#button_share"); - _e26.show(); - tabindex.makeFocusable(_e26); - } - - // Hide More menu if empty (see contextMenu.photoMore) - $("#button_more").show(); - tabindex.makeFocusable($("#button_more")); - if (!(album.isUploadable() || (photo.json.hasOwnProperty("downloadable") ? photo.json.downloadable === "1" : album.json && album.json.downloadable && album.json.downloadable === "1")) && !(photo.json.url && photo.json.url !== "")) { - var _e27 = $("#button_more"); - _e27.hide(); - tabindex.makeUnfocusable(_e27); - } - - // Remove buttons if needed - if (!lychee.enable_button_visibility) { - var _e28 = $("#button_visibility", ".header__toolbar--photo"); - _e28.remove(); - } - if (!lychee.enable_button_share) { - var _e29 = $("#button_share", ".header__toolbar--photo"); - _e29.remove(); - } - if (!lychee.enable_button_move) { - var _e30 = $("#button_move", ".header__toolbar--photo"); - _e30.remove(); - } - if (!lychee.enable_button_trash) { - var _e31 = $("#button_trash", ".header__toolbar--photo"); - _e31.remove(); - } - if (!lychee.enable_button_fullscreen) { - var _e32 = $("#button_fs_enter", ".header__toolbar--photo"); - _e32.remove(); - } - if (!lychee.enable_button_more) { - var _e33 = $("#button_more", ".header__toolbar--photo"); - _e33.remove(); - } - if (!lychee.enable_button_rotate) { - var _e34 = $("#button_rotate_cwise", ".header__toolbar--photo"); - _e34.remove(); - - _e34 = $("#button_rotate_ccwise", ".header__toolbar--photo"); - _e34.remove(); - } - return true; - case "map": - header.dom().removeClass("header--view"); - header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--albums, .header__toolbar--photo").removeClass("header__toolbar--visible"); - header.dom(".header__toolbar--map").addClass("header__toolbar--visible"); - - tabindex.makeFocusable(header.dom(".header__toolbar--map")); - tabindex.makeUnfocusable(header.dom(".header__toolbar--public, .header__toolbar--album, .header__toolbar--albums, .header__toolbar--photo")); - return true; - } - - return false; -}; - -// Note that the pull-down menu is now enabled not only for editable -// items but for all of public/albums/album/photo views, so 'editable' is a -// bit of a misnomer at this point... -header.setEditable = function (editable) { - var $title = header.dom(".header__title"); - - if (editable) $title.addClass("header__title--editable");else $title.removeClass("header__title--editable"); - - return true; -}; - -header.applyTranslations = function () { - var selector_locale = { - "#button_signin": "SIGN_IN", - "#button_settings": "SETTINGS", - "#button_info_album": "ABOUT_ALBUM", - "#button_info": "ABOUT_PHOTO", - ".button_add": "ADD", - "#button_move_album": "MOVE_ALBUM", - "#button_move": "MOVE", - "#button_trash_album": "DELETE_ALBUM", - "#button_trash": "DELETE", - "#button_archive": "DOWNLOAD_ALBUM", - "#button_star": "STAR_PHOTO", - "#button_back_home": "CLOSE_ALBUM", - "#button_fs_album_enter": "FULLSCREEN_ENTER", - "#button_fs_enter": "FULLSCREEN_ENTER", - "#button_share": "SHARE_PHOTO", - "#button_share_album": "SHARE_ALBUM" - }; - - for (var selector in selector_locale) { - header.dom(selector).prop("title", lychee.locale[selector_locale[selector]]); - } -}; - -/** - * @description This module is used to check if elements are visible or not. - */ - -var visible = {}; - -visible.albums = function () { - if (header.dom(".header__toolbar--public").hasClass("header__toolbar--visible")) return true; - if (header.dom(".header__toolbar--albums").hasClass("header__toolbar--visible")) return true; - return false; -}; - -visible.album = function () { - if (header.dom(".header__toolbar--album").hasClass("header__toolbar--visible")) return true; - return false; -}; - -visible.photo = function () { - if ($("#imageview.fadeIn").length > 0) return true; - return false; -}; - -visible.mapview = function () { - if ($("#mapview.fadeIn").length > 0) return true; - return false; -}; - -visible.search = function () { - if (search.hash != null) return true; - return false; -}; - -visible.sidebar = function () { - if (sidebar.dom().hasClass("active") === true) return true; - return false; -}; - -visible.sidebarbutton = function () { - if (visible.photo()) return true; - if (visible.album() && $("#button_info_album:visible").length > 0) return true; - return false; -}; - -visible.header = function () { - if (header.dom().hasClass("header--hidden") === true) return false; - return true; -}; - -visible.contextMenu = function () { - return basicContext.visible(); -}; - -visible.multiselect = function () { - if ($("#multiselect").length > 0) return true; - return false; -}; - -visible.leftMenu = function () { - if (leftMenu.dom().hasClass("leftMenu__visible")) return true; - return false; -}; - -/** - * @description This module takes care of the sidebar. - */ - -var sidebar = { - _dom: $(".sidebar"), - types: { - DEFAULT: 0, - TAGS: 1 - }, - createStructure: {} -}; - -sidebar.dom = function (selector) { - if (selector == null || selector === "") return sidebar._dom; - - return sidebar._dom.find(selector); -}; - -sidebar.bind = function () { - // This function should be called after building and appending - // the sidebars content to the DOM. - // This function can be called multiple times, therefore - // event handlers should be removed before binding a new one. - - // Event Name - var eventName = lychee.getEventName(); - - sidebar.dom("#edit_title").off(eventName).on(eventName, function () { - if (visible.photo()) photo.setTitle([photo.getID()]);else if (visible.album()) album.setTitle([album.getID()]); - }); - - sidebar.dom("#edit_description").off(eventName).on(eventName, function () { - if (visible.photo()) photo.setDescription(photo.getID());else if (visible.album()) album.setDescription(album.getID()); - }); - - sidebar.dom("#edit_showtags").off(eventName).on(eventName, function () { - album.setShowTags(album.getID()); - }); - - sidebar.dom("#edit_tags").off(eventName).on(eventName, function () { - photo.editTags([photo.getID()]); - }); - - sidebar.dom("#tags .tag").off(eventName).on(eventName, function () { - sidebar.triggerSearch($(this).text()); - }); - - sidebar.dom("#tags .tag span").off(eventName).on(eventName, function () { - photo.deleteTag(photo.getID(), $(this).data("index")); - }); - - sidebar.dom("#edit_license").off(eventName).on(eventName, function () { - if (visible.photo()) photo.setLicense(photo.getID());else if (visible.album()) album.setLicense(album.getID()); - }); - - sidebar.dom("#edit_sorting").off(eventName).on(eventName, function () { - album.setSorting(album.getID()); - }); - - sidebar.dom(".attr_location").off(eventName).on(eventName, function () { - sidebar.triggerSearch($(this).text()); - }); - - return true; -}; - -sidebar.triggerSearch = function (search_string) { - // If public search is diabled -> do nothing - if (lychee.publicMode === true && !lychee.public_search) { - // Do not display an error -> just do nothing to not confuse the user - return; - } - - search.hash = null; - // We're either logged in or public search is allowed - lychee.goto("search/" + encodeURIComponent(search_string)); -}; - -sidebar.toggle = function () { - if (visible.sidebar() || visible.sidebarbutton()) { - header.dom(".button--info").toggleClass("active"); - lychee.content.toggleClass("content--sidebar"); - lychee.imageview.toggleClass("image--sidebar"); - if (typeof view !== "undefined") view.album.content.justify(); - sidebar.dom().toggleClass("active"); - photo.updateSizeLivePhotoDuringAnimation(); - - return true; - } - - return false; -}; - -sidebar.setSelectable = function () { - var selectable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - - // Attributes/Values inside the sidebar are selectable by default. - // Selection needs to be deactivated to prevent an unwanted selection - // while using multiselect. - - if (selectable === true) sidebar.dom().removeClass("notSelectable");else sidebar.dom().addClass("notSelectable"); -}; - -sidebar.changeAttr = function (attr) { - var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "-"; - var dangerouslySetInnerHTML = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - if (attr == null || attr === "") return false; - - // Set a default for the value - if (value == null || value === "") value = "-"; - - // Escape value - if (dangerouslySetInnerHTML === false) value = lychee.escapeHTML(value); - - // Set new value - sidebar.dom(".attr_" + attr).html(value); - - return true; -}; - -sidebar.hideAttr = function (attr) { - sidebar.dom(".attr_" + attr).closest("tr").hide(); -}; - -sidebar.secondsToHMS = function (d) { - d = Number(d); - var h = Math.floor(d / 3600); - var m = Math.floor(d % 3600 / 60); - var s = Math.floor(d % 60); - - return (h > 0 ? h.toString() + "h" : "") + (m > 0 ? m.toString() + "m" : "") + (s > 0 || h == 0 && m == 0 ? s.toString() + "s" : ""); -}; - -sidebar.createStructure.photo = function (data) { - if (data == null || data === "") return false; - - var editable = typeof album !== "undefined" ? album.isUploadable() : false; - var exifHash = data.takedate + data.make + data.model + data.shutter + data.aperture + data.focal + data.iso; - var locationHash = data.longitude + data.latitude + data.altitude; - var structure = {}; - var _public = ""; - var isVideo = data.type && data.type.indexOf("video") > -1; - var license = void 0; - - // Set the license string for a photo - switch (data.license) { - // if the photo doesn't have a license - case "none": - license = ""; - break; - // Localize All Rights Reserved - case "reserved": - license = lychee.locale["PHOTO_RESERVED"]; - break; - // Display anything else that's set - default: - license = data.license; - break; - } - - // Set value for public - switch (data.public) { - case "0": - _public = lychee.locale["PHOTO_SHR_NO"]; - break; - case "1": - _public = lychee.locale["PHOTO_SHR_PHT"]; - break; - case "2": - _public = lychee.locale["PHOTO_SHR_ALB"]; - break; - default: - _public = "-"; - break; - } - - structure.basics = { - title: lychee.locale["PHOTO_BASICS"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_TITLE"], kind: "title", value: data.title, editable: editable }, { title: lychee.locale["PHOTO_UPLOADED"], kind: "uploaded", value: data.sysdate }, { title: lychee.locale["PHOTO_DESCRIPTION"], kind: "description", value: data.description, editable: editable }] - }; - - structure.image = { - title: lychee.locale[isVideo ? "PHOTO_VIDEO" : "PHOTO_IMAGE"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_SIZE"], kind: "size", value: data.size }, { title: lychee.locale["PHOTO_FORMAT"], kind: "type", value: data.type }, { title: lychee.locale["PHOTO_RESOLUTION"], kind: "resolution", value: data.width + " x " + data.height }] - }; - - if (isVideo) { - if (data.width === 0 || data.height === 0) { - // Remove the "Resolution" line if we don't have the data. - structure.image.rows.splice(-1, 1); - } - - // We overload the database, storing duration (in full seconds) in - // "aperture" and frame rate (floating point with three digits after - // the decimal point) in "focal". - if (data.aperture != "") { - structure.image.rows.push({ title: lychee.locale["PHOTO_DURATION"], kind: "duration", value: sidebar.secondsToHMS(data.aperture) }); - } - if (data.focal != "") { - structure.image.rows.push({ title: lychee.locale["PHOTO_FPS"], kind: "fps", value: data.focal + " fps" }); - } - } - - // Always create tags section - behaviour for editing - //tags handled when contructing the html code for tags - - structure.tags = { - title: lychee.locale["PHOTO_TAGS"], - type: sidebar.types.TAGS, - value: build.tags(data.tags), - editable: editable - }; - - // Only create EXIF section when EXIF data available - if (exifHash !== "") { - structure.exif = { - title: lychee.locale["PHOTO_CAMERA"], - type: sidebar.types.DEFAULT, - rows: isVideo ? [{ title: lychee.locale["PHOTO_CAPTURED"], kind: "takedate", value: data.takedate }, { title: lychee.locale["PHOTO_MAKE"], kind: "make", value: data.make }, { title: lychee.locale["PHOTO_TYPE"], kind: "model", value: data.model }] : [{ title: lychee.locale["PHOTO_CAPTURED"], kind: "takedate", value: data.takedate }, { title: lychee.locale["PHOTO_MAKE"], kind: "make", value: data.make }, { title: lychee.locale["PHOTO_TYPE"], kind: "model", value: data.model }, { title: lychee.locale["PHOTO_LENS"], kind: "lens", value: data.lens }, { title: lychee.locale["PHOTO_SHUTTER"], kind: "shutter", value: data.shutter }, { title: lychee.locale["PHOTO_APERTURE"], kind: "aperture", value: data.aperture }, { title: lychee.locale["PHOTO_FOCAL"], kind: "focal", value: data.focal }, { title: lychee.locale["PHOTO_ISO"], kind: "iso", value: data.iso }] - }; - } else { - structure.exif = {}; - } - - structure.sharing = { - title: lychee.locale["PHOTO_SHARING"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_SHR_PLUBLIC"], kind: "public", value: _public }] - }; - - structure.license = { - title: lychee.locale["PHOTO_REUSE"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["PHOTO_LICENSE"], kind: "license", value: license, editable: editable }] - }; - - if (locationHash !== "" && locationHash !== 0) { - structure.location = { - title: lychee.locale["PHOTO_LOCATION"], - type: sidebar.types.DEFAULT, - rows: [{ - title: lychee.locale["PHOTO_LATITUDE"], - kind: "latitude", - value: data.latitude ? DecimalToDegreeMinutesSeconds(data.latitude, true) : "" - }, { - title: lychee.locale["PHOTO_LONGITUDE"], - kind: "longitude", - value: data.longitude ? DecimalToDegreeMinutesSeconds(data.longitude, false) : "" - }, - // No point in displaying sub-mm precision; 10cm is more than enough. - { - title: lychee.locale["PHOTO_ALTITUDE"], - kind: "altitude", - value: data.altitude ? (Math.round(parseFloat(data.altitude) * 10) / 10).toString() + "m" : "" - }, { title: lychee.locale["PHOTO_LOCATION"], kind: "location", value: data.location ? data.location : "" }] - }; - if (data.imgDirection) { - // No point in display sub-degree precision. - structure.location.rows.push({ - title: lychee.locale["PHOTO_IMGDIRECTION"], - kind: "imgDirection", - value: Math.round(data.imgDirection).toString() + "°" - }); - } - } else { - structure.location = {}; - } - - // Construct all parts of the structure - var structure_ret = [structure.basics, structure.image, structure.tags, structure.exif, structure.location, structure.license]; - - if (!lychee.publicMode) { - structure_ret.push(structure.sharing); - } - - return structure_ret; -}; - -sidebar.createStructure.album = function (album) { - var data = album.json; - - if (data == null || data === "") return false; - - var editable = album.isUploadable(); - var structure = {}; - var _public = ""; - var hidden = ""; - var downloadable = ""; - var share_button_visible = ""; - var password = ""; - var license = ""; - var sorting = ""; - - // Set value for public - switch (data.public) { - case "0": - _public = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - _public = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - _public = "-"; - break; - } - - // Set value for hidden - switch (data.visible) { - case "0": - hidden = lychee.locale["ALBUM_SHR_YES"]; - break; - case "1": - hidden = lychee.locale["ALBUM_SHR_NO"]; - break; - default: - hidden = "-"; - break; - } - - // Set value for downloadable - switch (data.downloadable) { - case "0": - downloadable = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - downloadable = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - downloadable = "-"; - break; - } - - // Set value for share_button_visible - switch (data.share_button_visible) { - case "0": - share_button_visible = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - share_button_visible = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - share_button_visible = "-"; - break; - } - - // Set value for password - switch (data.password) { - case "0": - password = lychee.locale["ALBUM_SHR_NO"]; - break; - case "1": - password = lychee.locale["ALBUM_SHR_YES"]; - break; - default: - password = "-"; - break; - } - - // Set license string - switch (data.license) { - case "none": - license = ""; // consistency - break; - case "reserved": - license = lychee.locale["ALBUM_RESERVED"]; - break; - default: - license = data.license; - break; - } - - if (data.sorting_col === "") { - sorting = lychee.locale["DEFAULT"]; - } else { - sorting = data.sorting_col + " " + data.sorting_order; - } - - structure.basics = { - title: lychee.locale["ALBUM_BASICS"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_TITLE"], kind: "title", value: data.title, editable: editable }, { title: lychee.locale["ALBUM_DESCRIPTION"], kind: "description", value: data.description, editable: editable }] - }; - - if (album.isTagAlbum()) { - structure.basics.rows.push({ title: lychee.locale["ALBUM_SHOW_TAGS"], kind: "showtags", value: data.show_tags, editable: editable }); - } - - var videoCount = 0; - $.each(data.photos, function () { - if (this.type && this.type.indexOf("video") > -1) { - videoCount++; - } - }); - structure.album = { - title: lychee.locale["ALBUM_ALBUM"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_CREATED"], kind: "created", value: data.sysdate }] - }; - if (data.albums && data.albums.length > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_SUBALBUMS"], kind: "subalbums", value: data.albums.length }); - } - if (data.photos) { - if (data.photos.length - videoCount > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_IMAGES"], kind: "images", value: data.photos.length - videoCount }); - } - } - if (videoCount > 0) { - structure.album.rows.push({ title: lychee.locale["ALBUM_VIDEOS"], kind: "videos", value: videoCount }); - } - - if (data.photos) { - structure.album.rows.push({ title: lychee.locale["ALBUM_ORDERING"], kind: "sorting", value: sorting, editable: editable }); - } - - structure.share = { - title: lychee.locale["ALBUM_SHARING"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_PUBLIC"], kind: "public", value: _public }, { title: lychee.locale["ALBUM_HIDDEN"], kind: "hidden", value: hidden }, { title: lychee.locale["ALBUM_DOWNLOADABLE"], kind: "downloadable", value: downloadable }, { title: lychee.locale["ALBUM_SHARE_BUTTON_VISIBLE"], kind: "share_button_visible", value: share_button_visible }, { title: lychee.locale["ALBUM_PASSWORD"], kind: "password", value: password }] - }; - - if (data.owner != null) { - structure.share.rows.push({ title: lychee.locale["ALBUM_OWNER"], kind: "owner", value: data.owner }); - } - - structure.license = { - title: lychee.locale["ALBUM_REUSE"], - type: sidebar.types.DEFAULT, - rows: [{ title: lychee.locale["ALBUM_LICENSE"], kind: "license", value: license, editable: editable }] - }; - - // Construct all parts of the structure - var structure_ret = [structure.basics, structure.album, structure.license]; - if (!lychee.publicMode) { - structure_ret.push(structure.share); - } - - return structure_ret; -}; - -sidebar.has_location = function (structure) { - if (structure == null || structure === "" || structure === false) return false; - - var _has_location = false; - - structure.forEach(function (section) { - if (section.title == lychee.locale["PHOTO_LOCATION"]) { - _has_location = true; - } - }); - - return _has_location; -}; - -sidebar.render = function (structure) { - if (structure == null || structure === "" || structure === false) return false; - - var html = ""; - - var renderDefault = function renderDefault(section) { - var _html = ""; - - _html += "\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t "; - - if (section.title == lychee.locale["PHOTO_LOCATION"]) { - var _has_latitude = false; - var _has_longitude = false; - - section.rows.forEach(function (row, index, object) { - if (row.kind == "latitude" && row.value !== "") { - _has_latitude = true; - } - - if (row.kind == "longitude" && row.value !== "") { - _has_longitude = true; - } - - // Do not show location is not enabled - if (row.kind == "location" && (lychee.publicMode === true && !lychee.location_show_public || !lychee.location_show)) { - object.splice(index, 1); - } else { - // Explode location string into an array to keep street, city etc separate - if (!(row.value === "" || row.value == null)) { - section.rows[index].value = row.value.split(",").map(function (item) { - return item.trim(); - }); - } - } - }); - - if (_has_latitude && _has_longitude && lychee.map_display) { - _html += "\n\t\t\t\t\t\t
\n\t\t\t\t\t\t "; - } - } - - section.rows.forEach(function (row) { - var value = row.value; - - // show only Exif rows which have a value or if its editable - if (!(value === "" || value == null) || row.editable === true) { - // Wrap span-element around value for easier selecting on change - if (Array.isArray(row.value)) { - value = ""; - row.value.forEach(function (v) { - if (v === "" || v == null) { - return; - } - // Add separator if needed - if (value !== "") { - value += lychee.html(_templateObject29, row.kind); - } - value += lychee.html(_templateObject30, row.kind, v); - }); - } else { - value = lychee.html(_templateObject31, row.kind, value); - } - - // Add edit-icon to the value when editable - if (row.editable === true) value += " " + build.editIcon("edit_" + row.kind); - - _html += lychee.html(_templateObject32, row.title, value); - } - }); - - _html += "\n\t\t\t\t
\n\t\t\t\t "; - - return _html; - }; - - var renderTags = function renderTags(section) { - var _html = ""; - var editable = ""; - - // Add edit-icon to the value when editable - if (section.editable === true) editable = build.editIcon("edit_tags"); - - _html += lychee.html(_templateObject33, section.title, section.title.toLowerCase(), section.value, editable); - - return _html; - }; - - structure.forEach(function (section) { - if (section.type === sidebar.types.DEFAULT) html += renderDefault(section);else if (section.type === sidebar.types.TAGS) html += renderTags(section); - }); - - return html; -}; - -function DecimalToDegreeMinutesSeconds(decimal, type) { - var degrees = 0; - var minutes = 0; - var seconds = 0; - var direction = void 0; - - //decimal must be integer or float no larger than 180; - //type must be Boolean - if (Math.abs(decimal) > 180 || typeof type !== "boolean") { - return false; - } - - //inputs OK, proceed - //type is latitude when true, longitude when false - - //set direction; north assumed - if (type && decimal < 0) { - direction = "S"; - } else if (!type && decimal < 0) { - direction = "W"; - } else if (!type) { - direction = "E"; - } else { - direction = "N"; - } - - //get absolute value of decimal - var d = Math.abs(decimal); - - //get degrees - degrees = Math.floor(d); - - //get seconds - seconds = (d - degrees) * 3600; - - //get minutes - minutes = Math.floor(seconds / 60); - - //reset seconds - seconds = Math.floor(seconds - minutes * 60); - - return degrees + "° " + minutes + "' " + seconds + '" ' + direction; -} - -/** - * @description This module takes care of the map view of a full album and its sub-albums. - */ - -var map_provider_layer_attribution = { - Wikimedia: { - layer: "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png", - attribution: 'Wikimedia' - }, - "OpenStreetMap.org": { - layer: "https://{s}.tile.osm.org/{z}/{x}/{y}.png", - attribution: '© OpenStreetMap contributors' - }, - "OpenStreetMap.de": { - layer: "https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png ", - attribution: '© OpenStreetMap contributors' - }, - "OpenStreetMap.fr": { - layer: "https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png ", - attribution: '© OpenStreetMap contributors' - }, - RRZE: { - layer: "https://{s}.osm.rrze.fau.de/osmhd/{z}/{x}/{y}.png", - attribution: '© OpenStreetMap contributors' - } -}; - -var mapview = { - map: null, - photoLayer: null, - min_lat: null, - min_lng: null, - max_lat: null, - max_lng: null, - albumID: null, - map_provider: null -}; - -mapview.isInitialized = function () { - if (mapview.map === null || mapview.photoLayer === null) { - return false; - } - return true; -}; - -mapview.title = function (_albumID, _albumTitle) { - switch (_albumID) { - case "f": - lychee.setTitle(lychee.locale["STARRED"], false); - break; - case "s": - lychee.setTitle(lychee.locale["PUBLIC"], false); - break; - case "r": - lychee.setTitle(lychee.locale["RECENT"], false); - break; - case "0": - lychee.setTitle(lychee.locale["UNSORTED"], false); - break; - case null: - lychee.setTitle(lychee.locale["ALBUMS"], false); - break; - default: - lychee.setTitle(_albumTitle, false); - break; - } -}; - -// Open the map view -mapview.open = function () { - var albumID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - - // If map functionality is disabled -> do nothing - if (!lychee.map_display || lychee.publicMode === true && !lychee.map_display_public) { - loadingBar.show("error", lychee.locale["ERROR_MAP_DEACTIVATED"]); - return; - } - - lychee.animate($("#mapview"), "fadeIn"); - $("#mapview").show(); - header.setMode("map"); - - mapview.albumID = albumID; - - // initialize container only once - if (mapview.isInitialized() == false) { - // Leaflet seaches for icon in same directoy as js file -> paths needs - // to be overwritten - delete L.Icon.Default.prototype._getIconUrl; - L.Icon.Default.mergeOptions({ - iconRetinaUrl: "img/marker-icon-2x.png", - iconUrl: "img/marker-icon.png", - shadowUrl: "img/marker-shadow.png" - }); - - // Set initial view to (0,0) - mapview.map = L.map("leaflet_map_full").setView([0.0, 0.0], 13); - - L.tileLayer(map_provider_layer_attribution[lychee.map_provider].layer, { - attribution: map_provider_layer_attribution[lychee.map_provider].attribution - }).addTo(mapview.map); - - mapview.map_provider = lychee.map_provider; - } else { - if (mapview.map_provider !== lychee.map_provider) { - // removew all layers - mapview.map.eachLayer(function (layer) { - mapview.map.removeLayer(layer); - }); - - L.tileLayer(map_provider_layer_attribution[lychee.map_provider].layer, { - attribution: map_provider_layer_attribution[lychee.map_provider].attribution - }).addTo(mapview.map); - - mapview.map_provider = lychee.map_provider; - } else { - // Mapview has already shown data -> remove only photoLayer showing photos - mapview.photoLayer.clear(); - } - - // Reset min/max lat/lgn Values - mapview.min_lat = null; - mapview.max_lat = null; - mapview.min_lng = null; - mapview.max_lng = null; - } - - // Define how the photos on the map should look like - mapview.photoLayer = L.photo.cluster().on("click", function (e) { - var photo = e.layer.photo; - var template = ""; - - // Retina version if available - if (photo.url2x !== "") { - template = template.concat('

{name}

', build.iconic("camera-slr"), "

{takedate}

"); - } else { - template = template.concat('

{name}

', build.iconic("camera-slr"), "

{takedate}

"); - } - - e.layer.bindPopup(L.Util.template(template, photo), { - minWidth: 400 - }).openPopup(); - }); - - // Adjusts zoom and position of map to show all images - var updateZoom = function updateZoom() { - if (mapview.min_lat && mapview.min_lng && mapview.max_lat && mapview.max_lng) { - var dist_lat = mapview.max_lat - mapview.min_lat; - var dist_lng = mapview.max_lng - mapview.min_lng; - mapview.map.fitBounds([[mapview.min_lat - 0.1 * dist_lat, mapview.min_lng - 0.1 * dist_lng], [mapview.max_lat + 0.1 * dist_lat, mapview.max_lng + 0.1 * dist_lng]]); - } else { - mapview.map.fitWorld(); - } - }; - - // Adds photos to the map - var addPhotosToMap = function addPhotosToMap(album) { - // check if empty - if (!album.photos) return; - - var photos = []; - - album.photos.forEach(function (element, index) { - if (element.latitude || element.longitude) { - photos.push({ - lat: parseFloat(element.latitude), - lng: parseFloat(element.longitude), - thumbnail: element.thumbUrl !== "uploads/thumb/" ? element.thumbUrl : "img/placeholder.png", - thumbnail2x: element.thumb2x, - url: element.small !== "" ? element.small : element.url, - url2x: element.small2x, - name: element.title, - takedate: element.takedate, - albumID: element.album, - photoID: element.id - }); - - // Update min/max lat/lng - if (mapview.min_lat === null || mapview.min_lat > element.latitude) { - mapview.min_lat = parseFloat(element.latitude); - } - if (mapview.min_lng === null || mapview.min_lng > element.longitude) { - mapview.min_lng = parseFloat(element.longitude); - } - if (mapview.max_lat === null || mapview.max_lat < element.latitude) { - mapview.max_lat = parseFloat(element.latitude); - } - if (mapview.max_lng === null || mapview.max_lng < element.longitude) { - mapview.max_lng = parseFloat(element.longitude); - } - } - }); - - // Add Photos to map - mapview.photoLayer.add(photos).addTo(mapview.map); - - // Update Zoom and Position - updateZoom(); - }; - - // Call backend, retrieve information of photos and display them - // This function is called recursively to retrieve data for sub-albums - // Possible enhancement could be to only have a single ajax call - var getAlbumData = function getAlbumData(_albumID) { - var _includeSubAlbums = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - - if (_albumID !== "" && _albumID !== null) { - // _ablumID has been to a specific album - var _params = { - albumID: _albumID, - includeSubAlbums: _includeSubAlbums, - password: "" - }; - - api.post("Album::getPositionData", _params, function (data) { - if (data === "Warning: Wrong password!") { - password.getDialog(_albumID, function () { - _params.password = password.value; - - api.post("Album::getPositionData", _params, function (_data) { - addPhotosToMap(_data); - mapview.title(_albumID, _data.title); - }); - }); - } else { - addPhotosToMap(data); - mapview.title(_albumID, data.title); - } - }); - } else { - // AlbumID is empty -> fetch all photos of all albums - // _ablumID has been to a specific album - var _params2 = { - includeSubAlbums: _includeSubAlbums, - password: "" - }; - - api.post("Albums::getPositionData", _params2, function (data) { - if (data === "Warning: Wrong password!") { - password.getDialog(_albumID, function () { - _params2.password = password.value; - - api.post("Albums::getPositionData", _params2, function (_data) { - addPhotosToMap(_data); - mapview.title(_albumID, _data.title); - }); - }); - } else { - addPhotosToMap(data); - mapview.title(_albumID, data.title); - } - }); - } - }; - - // If subalbums not being included and album.json already has all data - // -> we can reuse it - if (lychee.map_include_subalbums === false && album.json !== null && album.json.photos !== null) { - addPhotosToMap(album.json); - } else { - // Not all needed data has been preloaded - we need to load everything - getAlbumData(albumID, lychee.map_include_subalbums); - } - - // Update Zoom and Position once more (for empty map) - updateZoom(); -}; - -mapview.close = function () { - // If map functionality is disabled -> do nothing - if (!lychee.map_display) return; - - lychee.animate($("#mapview"), "fadeOut"); - $("#mapview").hide(); - header.setMode("album"); - - // Make album focussable - tabindex.makeFocusable(lychee.content); -}; - -mapview.goto = function (elem) { - // If map functionality is disabled -> do nothing - if (!lychee.map_display) return; - - var photoID = elem.attr("data-id"); - var albumID = elem.attr("data-album-id"); - - if (albumID == "null") albumID = 0; - - if (album.json == null || albumID !== album.json.id) { - album.refresh(); - } - - lychee.goto(albumID + "/" + photoID); -}; - -lychee.locale = { - USERNAME: "username", - PASSWORD: "password", - ENTER: "Enter", - CANCEL: "Cancel", - SIGN_IN: "Sign In", - CLOSE: "Close", - - SETTINGS: "Settings", - USERS: "Users", - U2F: "U2F", - SHARING: "Sharing", - CHANGE_LOGIN: "Change Login", - CHANGE_SORTING: "Change Sorting", - SET_DROPBOX: "Set Dropbox", - ABOUT_LYCHEE: "About Lychee", - DIAGNOSTICS: "Diagnostics", - DIAGNOSTICS_GET_SIZE: "Request space usage", - LOGS: "Show Logs", - CLEAN_LOGS: "Clean Noise", - SIGN_OUT: "Sign Out", - UPDATE_AVAILABLE: "Update available!", - MIGRATION_AVAILABLE: "Migration available!", - CHECK_FOR_UPDATE: "Check for updates", - DEFAULT_LICENSE: "Default License for new uploads:", - SET_LICENSE: "Set License", - SET_OVERLAY_TYPE: "Set Overlay", - SET_MAP_PROVIDER: "Set OpenStreetMap tiles provider", - SAVE_RISK: "Save my modifications, I accept the Risk!", - MORE: "More", - DEFAULT: "Default", - - SMART_ALBUMS: "Smart albums", - SHARED_ALBUMS: "Shared albums", - ALBUMS: "Albums", - PHOTOS: "Pictures", - SEARCH_RESULTS: "Search results", - - RENAME: "Rename", - RENAME_ALL: "Rename All", - MERGE: "Merge", - MERGE_ALL: "Merge All", - MAKE_PUBLIC: "Make Public", - SHARE_ALBUM: "Share Album", - SHARE_PHOTO: "Share Photo", - SHARE_WITH: "Share with...", - DOWNLOAD_ALBUM: "Download Album", - ABOUT_ALBUM: "About Album", - DELETE_ALBUM: "Delete Album", - FULLSCREEN_ENTER: "Enter Fullscreen", - FULLSCREEN_EXIT: "Exit Fullscreen", - - DELETE_ALBUM_QUESTION: "Delete Album and Photos", - KEEP_ALBUM: "Keep Album", - DELETE_ALBUM_CONFIRMATION_1: "Are you sure you want to delete the album", - DELETE_ALBUM_CONFIRMATION_2: "and all of the photos it contains? This action can't be undone!", - - DELETE_ALBUMS_QUESTION: "Delete Albums and Photos", - KEEP_ALBUMS: "Keep Albums", - DELETE_ALBUMS_CONFIRMATION_1: "Are you sure you want to delete all", - DELETE_ALBUMS_CONFIRMATION_2: "selected albums and all of the photos they contain? This action can't be undone!", - - DELETE_UNSORTED_CONFIRM: "Are you sure you want to delete all photos from 'Unsorted'?
This action can't be undone!", - CLEAR_UNSORTED: "Clear Unsorted", - KEEP_UNSORTED: "Keep Unsorted", - - EDIT_SHARING: "Edit Sharing", - MAKE_PRIVATE: "Make Private", - - CLOSE_ALBUM: "Close Album", - CLOSE_PHOTO: "Close Photo", - CLOSE_MAP: "Close Map", - - ADD: "Add", - MOVE: "Move", - MOVE_ALL: "Move All", - DUPLICATE: "Duplicate", - DUPLICATE_ALL: "Duplicate All", - COPY_TO: "Copy to...", - COPY_ALL_TO: "Copy All to...", - DELETE: "Delete", - DELETE_ALL: "Delete All", - DOWNLOAD: "Download", - DOWNLOAD_MEDIUM: "Download medium size", - DOWNLOAD_SMALL: "Download small size", - UPLOAD_PHOTO: "Upload Photo", - IMPORT_LINK: "Import from Link", - IMPORT_DROPBOX: "Import from Dropbox", - IMPORT_SERVER: "Import from Server", - NEW_ALBUM: "New Album", - NEW_TAG_ALBUM: "New Tag Album", - - TITLE_NEW_ALBUM: "Enter a title for the new album:", - UNTITLED: "Untilted", - UNSORTED: "Unsorted", - STARRED: "Starred", - RECENT: "Recent", - PUBLIC: "Public", - NUM_PHOTOS: "Photos", - - CREATE_ALBUM: "Create Album", - CREATE_TAG_ALBUM: "Create Tag Album", - - STAR_PHOTO: "Star Photo", - STAR: "Star", - STAR_ALL: "Star All", - TAGS: "Tags", - TAGS_ALL: "Tags All", - UNSTAR_PHOTO: "Unstar Photo", - - FULL_PHOTO: "Full Photo", - ABOUT_PHOTO: "About Photo", - DISPLAY_FULL_MAP: "Map", - DIRECT_LINK: "Direct Link", - DIRECT_LINKS: "Direct Links", - - ALBUM_ABOUT: "About", - ALBUM_BASICS: "Basics", - ALBUM_TITLE: "Title", - ALBUM_NEW_TITLE: "Enter a new title for this album:", - ALBUMS_NEW_TITLE_1: "Enter a title for all", - ALBUMS_NEW_TITLE_2: "selected albums:", - ALBUM_SET_TITLE: "Set Title", - ALBUM_DESCRIPTION: "Description", - ALBUM_SHOW_TAGS: "Tags to show", - ALBUM_NEW_DESCRIPTION: "Enter a new description for this album:", - ALBUM_SET_DESCRIPTION: "Set Description", - ALBUM_NEW_SHOWTAGS: "Enter tags of photos that will be visible in this album:", - ALBUM_SET_SHOWTAGS: "Set tags to show", - ALBUM_ALBUM: "Album", - ALBUM_CREATED: "Created", - ALBUM_IMAGES: "Images", - ALBUM_VIDEOS: "Videos", - ALBUM_SHARING: "Share", - ALBUM_OWNER: "Owner", - ALBUM_SHR_YES: "YES", - ALBUM_SHR_NO: "No", - ALBUM_PUBLIC: "Public", - ALBUM_PUBLIC_EXPL: "Album can be viewed by others, subject to the restrictions below.", - ALBUM_FULL: "Full size (v4 only)", - ALBUM_FULL_EXPL: "Full size pictures are available", - ALBUM_HIDDEN: "Hidden", - ALBUM_HIDDEN_EXPL: "Only people with the direct link can view this album.", - ALBUM_MARK_NSFW: "Mark album as sensitive", - ALBUM_UNMARK_NSFW: "Unmark album as sensitive", - ALBUM_NSFW: "Sensitive", - ALBUM_NSFW_EXPL: "Album contains sensitive content.", - ALBUM_DOWNLOADABLE: "Downloadable", - ALBUM_DOWNLOADABLE_EXPL: "Visitors of your Lychee can download this album.", - ALBUM_SHARE_BUTTON_VISIBLE: "Share button is visible", - ALBUM_SHARE_BUTTON_VISIBLE_EXPL: "Display social media sharing links.", - ALBUM_PASSWORD: "Password", - ALBUM_PASSWORD_PROT: "Password protected", - ALBUM_PASSWORD_PROT_EXPL: "Album only accessible with a valid password.", - ALBUM_PASSWORD_REQUIRED: "This album is protected by a password. Enter the password below to view the photos of this album:", - ALBUM_MERGE_1: "Are you sure you want to merge the album", - ALBUM_MERGE_2: "into the album", - ALBUMS_MERGE: "Are you sure you want to merge all selected albums into the album", - MERGE_ALBUM: "Merge Albums", - DONT_MERGE: "Don't Merge", - ALBUM_MOVE_1: "Are you sure you want to move the album", - ALBUM_MOVE_2: "into the album", - ALBUMS_MOVE: "Are you sure you want to move all selected albums into the album", - MOVE_ALBUMS: "Move Albums", - NOT_MOVE_ALBUMS: "Don't Move", - ROOT: "Root", - ALBUM_REUSE: "Reuse", - ALBUM_LICENSE: "License", - ALBUM_SET_LICENSE: "Set License", - ALBUM_LICENSE_HELP: "Need help choosing?", - ALBUM_LICENSE_NONE: "None", - ALBUM_RESERVED: "All Rights Reserved", - ALBUM_SET_ORDER: "Set Order", - ALBUM_ORDERING: "Order by", - - PHOTO_ABOUT: "About", - PHOTO_BASICS: "Basics", - PHOTO_TITLE: "Title", - PHOTO_NEW_TITLE: "Enter a new title for this photo:", - PHOTO_SET_TITLE: "Set Title", - PHOTO_UPLOADED: "Uploaded", - PHOTO_DESCRIPTION: "Description", - PHOTO_NEW_DESCRIPTION: "Enter a new description for this photo:", - PHOTO_SET_DESCRIPTION: "Set Description", - PHOTO_NEW_LICENSE: "Add a License", - PHOTO_SET_LICENSE: "Set License", - PHOTO_REUSE: "Reuse", - PHOTO_LICENSE: "License", - PHOTO_LICENSE_HELP: "Need help choosing?", - PHOTO_LICENSE_NONE: "None", - PHOTO_RESERVED: "All Rights Reserved", - PHOTO_IMAGE: "Image", - PHOTO_VIDEO: "Video", - PHOTO_SIZE: "Size", - PHOTO_FORMAT: "Format", - PHOTO_RESOLUTION: "Resolution", - PHOTO_DURATION: "Duration", - PHOTO_FPS: "Frame rate", - PHOTO_TAGS: "Tags", - PHOTO_NOTAGS: "No Tags", - PHOTO_NEW_TAGS: "Enter your tags for this photo. You can add multiple tags by separating them with a comma:", - PHOTO_NEW_TAGS_1: "Enter your tags for all", - PHOTO_NEW_TAGS_2: "selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma:", - PHOTO_SET_TAGS: "Set Tags", - PHOTO_CAMERA: "Camera", - PHOTO_CAPTURED: "Captured", - PHOTO_MAKE: "Make", - PHOTO_TYPE: "Type/Model", - PHOTO_LENS: "Lens", - PHOTO_SHUTTER: "Shutter Speed", - PHOTO_APERTURE: "Aperture", - PHOTO_FOCAL: "Focal Length", - PHOTO_ISO: "ISO", - PHOTO_SHARING: "Sharing", - PHOTO_SHR_PLUBLIC: "Public", - PHOTO_SHR_ALB: "Yes (Album)", - PHOTO_SHR_PHT: "Yes (Photo)", - PHOTO_SHR_NO: "No", - PHOTO_DELETE: "Delete Photo", - PHOTO_KEEP: "Keep Photo", - PHOTO_DELETE_1: "Are you sure you want to delete the photo", - PHOTO_DELETE_2: "? This action can't be undone!", - PHOTO_DELETE_ALL_1: "Are you sure you want to delete all", - PHOTO_DELETE_ALL_2: "selected photo? This action can't be undone!", - PHOTOS_NEW_TITLE_1: "Enter a title for all", - PHOTOS_NEW_TITLE_2: "selected photos:", - PHOTO_MAKE_PRIVATE_ALBUM: "This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.", - PHOTO_SHOW_ALBUM: "Show Album", - PHOTO_PUBLIC: "Public", - PHOTO_PUBLIC_EXPL: "Photo can be viewed by others, subject to the restrictions below.", - PHOTO_FULL: "Original", - PHOTO_FULL_EXPL: "Full-resolution picture is available.", - PHOTO_HIDDEN: "Hidden", - PHOTO_HIDDEN_EXPL: "Only people with the direct link can view this photo.", - PHOTO_DOWNLOADABLE: "Downloadable", - PHOTO_DOWNLOADABLE_EXPL: "Visitors of your gallery can download this photo.", - PHOTO_SHARE_BUTTON_VISIBLE: "Share button is visible", - PHOTO_SHARE_BUTTON_VISIBLE_EXPL: "Display social media sharing links.", - PHOTO_PASSWORD_PROT: "Password protected", - PHOTO_PASSWORD_PROT_EXPL: "Photo only accessible with a valid password.", - PHOTO_EDIT_SHARING_TEXT: "The sharing properties of this photo will be changed to the following:", - PHOTO_NO_EDIT_SHARING_TEXT: "Because this photo is located in a public album, it inherits that album's visibility settings. Its current visibility is shown below for informational purposes only.", - PHOTO_EDIT_GLOBAL_SHARING_TEXT: "The visibility of this photo can be fine-tuned using global Lychee settings. Its current visibility is shown below for informational purposes only.", - PHOTO_SHARING_CONFIRM: "Save", - PHOTO_LOCATION: "Location", - PHOTO_LATITUDE: "Latitude", - PHOTO_LONGITUDE: "Longitude", - PHOTO_ALTITUDE: "Altitude", - PHOTO_IMGDIRECTION: "Direction", - - LOADING: "Loading", - ERROR: "Error", - ERROR_TEXT: "Whoops, it looks like something went wrong. Please reload the site and try again!", - ERROR_DB_1: "Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.", - ERROR_DB_2: "Unable to create the database. Double-check your host, username and password and ensure that the specified user has the rights to modify and add content to the database.", - ERROR_CONFIG_FILE: "Unable to save this configuration. Permission denied in 'data/'. Please set the read, write and execute rights for others in 'data/' and 'uploads/'. Take a look at the readme for more information.", - ERROR_UNKNOWN: "Something unexpected happened. Please try again and check your installation and server. Take a look at the readme for more information.", - ERROR_LOGIN: "Unable to save login. Please try again with another username and password!", - ERROR_MAP_DEACTIVATED: "Map functionality has been deactivated under settings.", - ERROR_SEARCH_DEACTIVATED: "Search functionality has been deactivated under settings.", - SUCCESS: "OK", - RETRY: "Retry", - - SETTINGS_WARNING: "Changing these advanced settings can be harmful to the stability, security and performance of this application. You should only modify them if you are sure of what you are doing.", - SETTINGS_SUCCESS_LOGIN: "Login Info updated.", - SETTINGS_SUCCESS_SORT: "Sorting order updated.", - SETTINGS_SUCCESS_DROPBOX: "Dropbox Key updated.", - SETTINGS_SUCCESS_LANG: "Language updated", - SETTINGS_SUCCESS_LAYOUT: "Layout updated", - SETTINGS_SUCCESS_IMAGE_OVERLAY: "EXIF Overlay setting updated", - SETTINGS_SUCCESS_PUBLIC_SEARCH: "Public search updated", - SETTINGS_SUCCESS_LICENSE: "Default license updated", - SETTINGS_SUCCESS_MAP_DISPLAY: "Map display settings updated", - SETTINGS_SUCCESS_MAP_DISPLAY_PUBLIC: "Map display settings for public albums updated", - SETTINGS_SUCCESS_MAP_PROVIDER: "Map provider settings updated", - - U2F_NOT_SUPPORTED: "U2F not supported. Sorry.", - U2F_NOT_SECURE: "Environment not secured. U2F not available.", - U2F_REGISTER_KEY: "Register new device.", - U2F_REGISTRATION_SUCCESS: "Registration successful!", - U2F_AUTHENTIFICATION_SUCCESS: "Authentication successful!", - U2F_CREDENTIALS: "Credentials", - U2F_CREDENTIALS_DELETED: "Credentials deleted!", - - SETTINGS_SUCCESS_CSS: "CSS updated", - SETTINGS_SUCCESS_UPDATE: "Settings updated with success", - - DB_INFO_TITLE: "Enter your database connection details below:", - DB_INFO_HOST: "Database Host (optional)", - DB_INFO_USER: "Database Username", - DB_INFO_PASSWORD: "Database Password", - DB_INFO_TEXT: "Lychee will create its own database. If required, you can enter the name of an existing database instead:", - DB_NAME: "Database Name (optional)", - DB_PREFIX: "Table prefix (optional)", - DB_CONNECT: "Connect", - - LOGIN_TITLE: "Enter a username and password for your installation:", - LOGIN_USERNAME: "New Username", - LOGIN_PASSWORD: "New Password", - LOGIN_PASSWORD_CONFIRM: "Confirm Password", - LOGIN_CREATE: "Create Login", - - PASSWORD_TITLE: "Enter your current username and password:", - USERNAME_CURRENT: "Current Username", - PASSWORD_CURRENT: "Current Password", - PASSWORD_TEXT: "Your username and password will be changed to the following:", - PASSWORD_CHANGE: "Change Login", - - EDIT_SHARING_TITLE: "Edit Sharing", - EDIT_SHARING_TEXT: "The sharing-properties of this album will be changed to the following:", - SHARE_ALBUM_TEXT: "This album will be shared with the following properties:", - ALBUM_SHARING_CONFIRM: "Save", - - SORT_ALBUM_BY_1: "Sort albums by", - SORT_ALBUM_BY_2: "in an", - SORT_ALBUM_BY_3: "order.", - - SORT_ALBUM_SELECT_1: "Creation Time", - SORT_ALBUM_SELECT_2: "Title", - SORT_ALBUM_SELECT_3: "Description", - SORT_ALBUM_SELECT_4: "Public", - SORT_ALBUM_SELECT_5: "Latest Take Date", - SORT_ALBUM_SELECT_6: "Oldest Take Date", - - SORT_PHOTO_BY_1: "Sort photos by", - SORT_PHOTO_BY_2: "in an", - SORT_PHOTO_BY_3: "order.", - - SORT_PHOTO_SELECT_1: "Upload Time", - SORT_PHOTO_SELECT_2: "Take Date", - SORT_PHOTO_SELECT_3: "Title", - SORT_PHOTO_SELECT_4: "Description", - SORT_PHOTO_SELECT_5: "Public", - SORT_PHOTO_SELECT_6: "Star", - SORT_PHOTO_SELECT_7: "Photo Format", - - SORT_ASCENDING: "Ascending", - SORT_DESCENDING: "Descending", - SORT_CHANGE: "Change Sorting", - - DROPBOX_TITLE: "Set Dropbox Key", - DROPBOX_TEXT: "In order to import photos from your Dropbox, you need a valid drop-ins app key from their website. Generate yourself a personal key and enter it below:", - - LANG_TEXT: "Change Lychee language for:", - LANG_TITLE: "Change Language", - - CSS_TEXT: "Personalize your CSS:", - CSS_TITLE: "Change CSS", - - LAYOUT_TYPE: "Layout of photos:", - LAYOUT_SQUARES: "Square thumbnails", - LAYOUT_JUSTIFIED: "With aspect, justified", - LAYOUT_UNJUSTIFIED: "With aspect, unjustified", - SET_LAYOUT: "Change layout", - PUBLIC_SEARCH_TEXT: "Public search allowed:", - - IMAGE_OVERLAY_TEXT: "Display image overlay by default:", - - OVERLAY_TYPE: "Data to use in image overlay:", - OVERLAY_EXIF: "Photo EXIF data", - OVERLAY_DESCRIPTION: "Photo description", - OVERLAY_DATE: "Photo date taken", - - MAP_PROVIDER: "Provider of OpenStreetMap tiles:", - MAP_PROVIDER_WIKIMEDIA: "Wikimedia", - MAP_PROVIDER_OSM_ORG: "OpenStreetMap.org (no retina)", - MAP_PROVIDER_OSM_DE: "OpenStreetMap.de (no retina)", - MAP_PROVIDER_OSM_FR: "OpenStreetMap.fr (no retina)", - MAP_PROVIDER_RRZE: "University of Erlangen, Germany (only retina)", - - MAP_DISPLAY_TEXT: "Enable maps (provided by OpenStreetMap):", - MAP_DISPLAY_PUBLIC_TEXT: "Enable maps for public albums (provided by OpenStreetMap):", - MAP_INCLUDE_SUBALBUMS_TEXT: "Include photos of subalbums on map:", - LOCATION_DECODING: "Decode GPS data into location name", - LOCATION_SHOW: "Show location name", - LOCATION_SHOW_PUBLIC: "Show location name for public mode", - - NSFW_VISIBLE_TEXT_1: "Make Sensitive albums visible by default.", - NSFW_VISIBLE_TEXT_2: "If the album is public, it is still accessible, just hidden from the view and can be revealed by pressing H.", - SETTINGS_SUCCESS_NSFW_VISIBLE: "Default sensitive album visibility updated with success.", - - VIEW_NO_RESULT: "No results", - VIEW_NO_PUBLIC_ALBUMS: "No public albums", - VIEW_NO_CONFIGURATION: "No configuration", - VIEW_PHOTO_NOT_FOUND: "Photo not found", - - NO_TAGS: "No Tags", - - UPLOAD_MANAGE_NEW_PHOTOS: "You can now manage your new photo(s).", - UPLOAD_COMPLETE: "Upload complete", - UPLOAD_COMPLETE_FAILED: "Failed to upload one or more photos.", - UPLOAD_IMPORTING: "Importing", - UPLOAD_IMPORTING_URL: "Importing URL", - UPLOAD_UPLOADING: "Uploading", - UPLOAD_FINISHED: "Finished", - UPLOAD_PROCESSING: "Processing", - UPLOAD_FAILED: "Failed", - UPLOAD_FAILED_ERROR: "Upload failed. Server returned an error!", - UPLOAD_FAILED_WARNING: "Upload failed. Server returned a warning!", - UPLOAD_SKIPPED: "Skipped", - UPLOAD_ERROR_CONSOLE: "Please take a look at the console of your browser for further details.", - UPLOAD_UNKNOWN: "Server returned an unknown response. Please take a look at the console of your browser for further details.", - UPLOAD_ERROR_UNKNOWN: "Upload failed. Server returned an unkown error!", - UPLOAD_IN_PROGRESS: "Lychee is currently uploading!", - UPLOAD_IMPORT_WARN_ERR: "The import has been finished, but returned warnings or errors. Please take a look at the log (Settings -> Show Log) for further details.", - UPLOAD_IMPORT_COMPLETE: "Import complete", - UPLOAD_IMPORT_INSTR: "Please enter the direct link to a photo to import it:", - UPLOAD_IMPORT: "Import", - UPLOAD_IMPORT_SERVER: "Importing from server", - UPLOAD_IMPORT_SERVER_FOLD: "Folder empty or no readable files to process. Please take a look at the log (Settings -> Show Log) for further details.", - UPLOAD_IMPORT_SERVER_INSTR: "This action will import all photos, folders and sub-folders which are located in the following directory. The original files will be deleted after the import when possible.", - UPLOAD_ABSOLUTE_PATH: "Absolute path to directory", - UPLOAD_IMPORT_SERVER_EMPT: "Could not start import because the folder was empty!", - - ABOUT_SUBTITLE: "Self-hosted photo-management done right", - ABOUT_DESCRIPTION: "is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.", - - URL_COPY_TO_CLIPBOARD: "Copy to clipboard", - URL_COPIED_TO_CLIPBOARD: "Copied URL to clipboard!", - PHOTO_DIRECT_LINKS_TO_IMAGES: "Direct links to image files:", - PHOTO_MEDIUM: "Medium", - PHOTO_MEDIUM_HIDPI: "Medium HiDPI", - PHOTO_SMALL: "Thumb", - PHOTO_SMALL_HIDPI: "Thumb HiDPI", - PHOTO_THUMB: "Square thumb", - PHOTO_THUMB_HIDPI: "Square thumb HiDPI", - PHOTO_LIVE_VIDEO: "Video part of live-photo", - PHOTO_VIEW: "Lychee Photo View:" -}; - -/** - * @description Helper class to manage tabindex - */ - -var tabindex = { - offset_for_header: 100, - next_tab_index: 100 -}; - -tabindex.saveSettings = function (elem) { - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter notation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - // TODO: shorter notation - a = $(e).attr("tabindex"); - $(this).data("tabindex-saved", a); - }); -}; - -tabindex.restoreSettings = function (elem) { - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - // TODO: shorter notation - a = $(e).data("tabindex-saved"); - $(e).attr("tabindex", a); - }); -}; - -tabindex.makeUnfocusable = function (elem) { - var saveFocusElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[tabindex]"); - - // iterate over all elements and set tabindex to -1 (i.e. make is not focussable) - tmp.each(function (i, e) { - $(e).attr("tabindex", "-1"); - // Save which element had focus before we make it unfocusable - if (saveFocusElement && $(e).is(":focus")) { - $(e).data("tabindex-focus", true); - // Remove focus - $(e).blur(); - } - }); - - // Disable input fields - $(elem).find("input").attr("disabled", "disabled"); -}; - -tabindex.makeFocusable = function (elem) { - var restoreFocusElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!lychee.enable_tabindex) return; - - // Todo: Make shorter noation - // Get all elements which have a tabindex - var tmp = $(elem).find("[data-tabindex]"); - - // iterate over all elements and set tabindex to stored value (i.e. make is not focussable) - tmp.each(function (i, e) { - $(e).attr("tabindex", $(e).data("tabindex")); - // restore focus elemente if wanted - if (restoreFocusElement) { - if ($(e).data("tabindex-focus") && lychee.active_focus_on_page_load) { - $(e).focus(); - $(e).removeData("tabindex-focus"); - } - } - }); - - // Enable input fields - $(elem).find("input").removeAttr("disabled"); -}; - -tabindex.get_next_tab_index = function () { - tabindex.next_tab_index = tabindex.next_tab_index + 1; - - return tabindex.next_tab_index - 1; -}; - -tabindex.reset = function () { - tabindex.next_tab_index = tabindex.offset_for_header; -}; - -(function (window, factory) { - var basicContext = factory(window, window.document); - window.basicContext = basicContext; - if ((typeof module === "undefined" ? "undefined" : _typeof(module)) == "object" && module.exports) { - module.exports = basicContext; - } -})(window, function l(window, document) { - var ITEM = "item", - SEPARATOR = "separator"; - - var dom = function dom() { - var elem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - return document.querySelector(".basicContext " + elem); - }; - - var valid = function valid() { - var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var emptyItem = Object.keys(item).length === 0 ? true : false; - - if (emptyItem === true) item.type = SEPARATOR; - if (item.type == null) item.type = ITEM; - if (item.class == null) item.class = ""; - if (item.visible !== false) item.visible = true; - if (item.icon == null) item.icon = null; - if (item.title == null) item.title = "Undefined"; - - // Add disabled class when item disabled - if (item.disabled !== true) item.disabled = false; - if (item.disabled === true) item.class += " basicContext__item--disabled"; - - // Item requires a function when - // it's not a separator and not disabled - if (item.fn == null && item.type !== SEPARATOR && item.disabled === false) { - console.warn("Missing fn for item '" + item.title + "'"); - return false; - } - - return true; - }; - - var buildItem = function buildItem(item, num) { - var html = "", - span = ""; - - // Parse and validate item - if (valid(item) === false) return ""; - - // Skip when invisible - if (item.visible === false) return ""; - - // Give item a unique number - item.num = num; - - // Generate span/icon-element - if (item.icon !== null) span = ""; - - // Generate item - if (item.type === ITEM) { - html = "\n\t\t \n\t\t " + span + item.title + "\n\t\t \n\t\t "; - } else if (item.type === SEPARATOR) { - html = "\n\t\t \n\t\t "; - } - - return html; - }; - - var build = function build(items) { - var html = ""; - - html += "\n\t
\n\t
\n\t \n\t \n\t "; - - items.forEach(function (item, i) { - return html += buildItem(item, i); - }); - - html += "\n\t \n\t
\n\t
\n\t
\n\t "; - - return html; - }; - - var getNormalizedEvent = function getNormalizedEvent() { - var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var pos = { - x: e.clientX, - y: e.clientY - }; - - if (e.type === "touchend" && (pos.x == null || pos.y == null)) { - // We need to capture clientX and clientY from original event - // when the event 'touchend' does not return the touch position - - var touches = e.changedTouches; - - if (touches != null && touches.length > 0) { - pos.x = touches[0].clientX; - pos.y = touches[0].clientY; - } - } - - // Position unknown - if (pos.x == null || pos.x < 0) pos.x = 0; - if (pos.y == null || pos.y < 0) pos.y = 0; - - return pos; - }; - - var getPosition = function getPosition(e, context) { - // Get the click position - var normalizedEvent = getNormalizedEvent(e); - - // Set the initial position - var x = normalizedEvent.x, - y = normalizedEvent.y; - - // Get size of browser - var browserSize = { - width: window.innerWidth, - height: window.innerHeight - }; - - // Get size of context - var contextSize = { - width: context.offsetWidth, - height: context.offsetHeight - }; - - // Fix position based on context and browser size - if (x + contextSize.width > browserSize.width) x = x - (x + contextSize.width - browserSize.width); - if (y + contextSize.height > browserSize.height) y = y - (y + contextSize.height - browserSize.height); - - // Make context scrollable and start at the top of the browser - // when context is higher than the browser - if (contextSize.height > browserSize.height) { - y = 0; - context.classList.add("basicContext--scrollable"); - } - - // Calculate the relative position of the mouse to the context - var rx = normalizedEvent.x - x, - ry = normalizedEvent.y - y; - - return { x: x, y: y, rx: rx, ry: ry }; - }; - - var bind = function bind() { - var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - if (item.fn == null) return false; - if (item.visible === false) return false; - if (item.disabled === true) return false; - - dom("td[data-num='" + item.num + "']").onclick = item.fn; - dom("td[data-num='" + item.num + "']").oncontextmenu = item.fn; - - return true; - }; - - var show = function show(items, e, fnClose, fnCallback) { - // Build context - var html = build(items); - - // Add context to the body - document.body.insertAdjacentHTML("beforeend", html); - - // Cache the context - var context = dom(); - - // Calculate position - var position = getPosition(e, context); - - // Set position - context.style.left = position.x + "px"; - context.style.top = position.y + "px"; - context.style.transformOrigin = position.rx + "px " + position.ry + "px"; - context.style.opacity = 1; - - // Close fn fallback - if (fnClose == null) fnClose = close; - - // Bind click on background - context.parentElement.onclick = fnClose; - context.parentElement.oncontextmenu = fnClose; - - // Bind click on items - items.forEach(bind); - - // Do not trigger default event or further propagation - if (typeof e.preventDefault === "function") e.preventDefault(); - if (typeof e.stopPropagation === "function") e.stopPropagation(); - - // Call callback when a function - if (typeof fnCallback === "function") fnCallback(); - - return true; - }; - - var visible = function visible() { - var elem = dom(); - - return !(elem == null || elem.length === 0); - }; - - var close = function close() { - if (visible() === false) return false; - - var container = document.querySelector(".basicContextContainer"); - - container.parentElement.removeChild(container); - - return true; - }; - - return { - ITEM: ITEM, - SEPARATOR: SEPARATOR, - show: show, - visible: visible, - close: close - }; -}); \ No newline at end of file diff --git a/demo/favicon.ico b/demo/favicon.ico deleted file mode 100644 index d793c5b8..00000000 Binary files a/demo/favicon.ico and /dev/null differ diff --git a/demo/img/apple-touch-icon-ipad.png b/demo/img/apple-touch-icon-ipad.png deleted file mode 100644 index 06f788af..00000000 Binary files a/demo/img/apple-touch-icon-ipad.png and /dev/null differ diff --git a/demo/img/apple-touch-icon-iphone-plus.png b/demo/img/apple-touch-icon-iphone-plus.png deleted file mode 100644 index 1e19d9a8..00000000 Binary files a/demo/img/apple-touch-icon-iphone-plus.png and /dev/null differ diff --git a/demo/img/apple-touch-icon-iphone.png b/demo/img/apple-touch-icon-iphone.png deleted file mode 100644 index d7f6bf33..00000000 Binary files a/demo/img/apple-touch-icon-iphone.png and /dev/null differ diff --git a/demo/img/layers-2x.png b/demo/img/layers-2x.png deleted file mode 100644 index 200c333d..00000000 Binary files a/demo/img/layers-2x.png and /dev/null differ diff --git a/demo/img/layers.png b/demo/img/layers.png deleted file mode 100644 index 1a72e578..00000000 Binary files a/demo/img/layers.png and /dev/null differ diff --git a/demo/img/live-photo-icon.png b/demo/img/live-photo-icon.png deleted file mode 100644 index 494ac66c..00000000 Binary files a/demo/img/live-photo-icon.png and /dev/null differ diff --git a/demo/img/marker-icon-2x.png b/demo/img/marker-icon-2x.png deleted file mode 100644 index 88f9e501..00000000 Binary files a/demo/img/marker-icon-2x.png and /dev/null differ diff --git a/demo/img/marker-icon.png b/demo/img/marker-icon.png deleted file mode 100644 index 950edf24..00000000 Binary files a/demo/img/marker-icon.png and /dev/null differ diff --git a/demo/img/marker-shadow.png b/demo/img/marker-shadow.png deleted file mode 100644 index 9fd29795..00000000 Binary files a/demo/img/marker-shadow.png and /dev/null differ diff --git a/demo/img/no_cover.svg b/demo/img/no_cover.svg deleted file mode 100644 index 03660620..00000000 --- a/demo/img/no_cover.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/demo/img/no_images.svg b/demo/img/no_images.svg deleted file mode 100644 index b7b259aa..00000000 --- a/demo/img/no_images.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/demo/img/noise.png b/demo/img/noise.png deleted file mode 100644 index 26d43172..00000000 Binary files a/demo/img/noise.png and /dev/null differ diff --git a/demo/img/password.svg b/demo/img/password.svg deleted file mode 100644 index 2934d8fd..00000000 --- a/demo/img/password.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/demo/img/placeholder.png b/demo/img/placeholder.png deleted file mode 100644 index 6f21ceeb..00000000 Binary files a/demo/img/placeholder.png and /dev/null differ diff --git a/demo/img/play-icon.png b/demo/img/play-icon.png deleted file mode 100644 index 1ae0f1d5..00000000 Binary files a/demo/img/play-icon.png and /dev/null differ diff --git a/demo/img/view-angle-icon-2x.png b/demo/img/view-angle-icon-2x.png deleted file mode 100644 index f7fb3d53..00000000 Binary files a/demo/img/view-angle-icon-2x.png and /dev/null differ diff --git a/demo/img/view-angle-icon.png b/demo/img/view-angle-icon.png deleted file mode 100644 index 0c0f1285..00000000 Binary files a/demo/img/view-angle-icon.png and /dev/null differ diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index d0e41bfd..00000000 --- a/demo/index.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - -Lychee v4 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
- - -
-
- - - - - - - - - × - - - - - -
-
- - - - - - - - - × - - - - - - - - -
- - - -
- - - - - - - -
- - -
- - -
- - -
- - -
-
-
- - -
- - -
-

Sensitive content

This album contains sensitive content which some people may find offensive or disturbing.

Tap to consent.

-
- - - - - -
- -
- - - -
- - - - \ No newline at end of file diff --git a/demo/uploads/big/70df07ef17999bcfd576a1a4fc57455e.jpeg b/demo/uploads/big/70df07ef17999bcfd576a1a4fc57455e.jpeg deleted file mode 100644 index 4724c3ee..00000000 Binary files a/demo/uploads/big/70df07ef17999bcfd576a1a4fc57455e.jpeg and /dev/null differ diff --git a/demo/uploads/big/86836774f3a632fe22e45411426204fc.jpg b/demo/uploads/big/86836774f3a632fe22e45411426204fc.jpg deleted file mode 100644 index 44da699d..00000000 Binary files a/demo/uploads/big/86836774f3a632fe22e45411426204fc.jpg and /dev/null differ diff --git a/demo/uploads/big/a55a5438f10b1ba866a76575512526e4.jpeg b/demo/uploads/big/a55a5438f10b1ba866a76575512526e4.jpeg deleted file mode 100644 index 2f55e8bd..00000000 Binary files a/demo/uploads/big/a55a5438f10b1ba866a76575512526e4.jpeg and /dev/null differ diff --git a/demo/uploads/big/b208cf3d7f67810135cf53f7bedcc8de.jpeg b/demo/uploads/big/b208cf3d7f67810135cf53f7bedcc8de.jpeg deleted file mode 100644 index fb3eb3f7..00000000 Binary files a/demo/uploads/big/b208cf3d7f67810135cf53f7bedcc8de.jpeg and /dev/null differ diff --git a/demo/uploads/big/b3de35f5a293946f267e3fcb4b1b1e3c.jpg b/demo/uploads/big/b3de35f5a293946f267e3fcb4b1b1e3c.jpg deleted file mode 100644 index 390c0448..00000000 Binary files a/demo/uploads/big/b3de35f5a293946f267e3fcb4b1b1e3c.jpg and /dev/null differ diff --git a/demo/uploads/big/d250ea3871f5eae83f66adf2c1b45618.jpg b/demo/uploads/big/d250ea3871f5eae83f66adf2c1b45618.jpg deleted file mode 100644 index c324a540..00000000 Binary files a/demo/uploads/big/d250ea3871f5eae83f66adf2c1b45618.jpg and /dev/null differ diff --git a/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4.jpeg b/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4.jpeg deleted file mode 100644 index c35019ff..00000000 Binary files a/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4.jpeg and /dev/null differ diff --git a/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4@2x.jpeg b/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4@2x.jpeg deleted file mode 100644 index dbab527b..00000000 Binary files a/demo/uploads/medium/a55a5438f10b1ba866a76575512526e4@2x.jpeg and /dev/null differ diff --git a/demo/uploads/medium/b3de35f5a293946f267e3fcb4b1b1e3c.jpg b/demo/uploads/medium/b3de35f5a293946f267e3fcb4b1b1e3c.jpg deleted file mode 100644 index 874a8e7b..00000000 Binary files a/demo/uploads/medium/b3de35f5a293946f267e3fcb4b1b1e3c.jpg and /dev/null differ diff --git a/demo/uploads/medium/d250ea3871f5eae83f66adf2c1b45618.jpg b/demo/uploads/medium/d250ea3871f5eae83f66adf2c1b45618.jpg deleted file mode 100644 index df43c531..00000000 Binary files a/demo/uploads/medium/d250ea3871f5eae83f66adf2c1b45618.jpg and /dev/null differ diff --git a/demo/uploads/small/70df07ef17999bcfd576a1a4fc57455e.jpeg b/demo/uploads/small/70df07ef17999bcfd576a1a4fc57455e.jpeg deleted file mode 100644 index 311cc419..00000000 Binary files a/demo/uploads/small/70df07ef17999bcfd576a1a4fc57455e.jpeg and /dev/null differ diff --git a/demo/uploads/small/86836774f3a632fe22e45411426204fc.jpg b/demo/uploads/small/86836774f3a632fe22e45411426204fc.jpg deleted file mode 100644 index 4f9d4010..00000000 Binary files a/demo/uploads/small/86836774f3a632fe22e45411426204fc.jpg and /dev/null differ diff --git a/demo/uploads/small/a55a5438f10b1ba866a76575512526e4.jpeg b/demo/uploads/small/a55a5438f10b1ba866a76575512526e4.jpeg deleted file mode 100644 index 49fca659..00000000 Binary files a/demo/uploads/small/a55a5438f10b1ba866a76575512526e4.jpeg and /dev/null differ diff --git a/demo/uploads/small/a55a5438f10b1ba866a76575512526e4@2x.jpeg b/demo/uploads/small/a55a5438f10b1ba866a76575512526e4@2x.jpeg deleted file mode 100644 index 33e52fb0..00000000 Binary files a/demo/uploads/small/a55a5438f10b1ba866a76575512526e4@2x.jpeg and /dev/null differ diff --git a/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c.jpg b/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c.jpg deleted file mode 100644 index 4106d938..00000000 Binary files a/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c.jpg and /dev/null differ diff --git a/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpg b/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpg deleted file mode 100644 index d78f2eb2..00000000 Binary files a/demo/uploads/small/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpg and /dev/null differ diff --git a/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618.jpg b/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618.jpg deleted file mode 100644 index e1c5da8f..00000000 Binary files a/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618.jpg and /dev/null differ diff --git a/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618@2x.jpg b/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618@2x.jpg deleted file mode 100644 index a573b3fe..00000000 Binary files a/demo/uploads/small/d250ea3871f5eae83f66adf2c1b45618@2x.jpg and /dev/null differ diff --git a/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e.jpeg b/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e.jpeg deleted file mode 100644 index 0de52322..00000000 Binary files a/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg b/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg deleted file mode 100644 index 09cf4189..00000000 Binary files a/demo/uploads/thumb/70df07ef17999bcfd576a1a4fc57455e@2x.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/86836774f3a632fe22e45411426204fc.jpeg b/demo/uploads/thumb/86836774f3a632fe22e45411426204fc.jpeg deleted file mode 100644 index 049e52d8..00000000 Binary files a/demo/uploads/thumb/86836774f3a632fe22e45411426204fc.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/86836774f3a632fe22e45411426204fc@2x.jpeg b/demo/uploads/thumb/86836774f3a632fe22e45411426204fc@2x.jpeg deleted file mode 100644 index 9c96d2e7..00000000 Binary files a/demo/uploads/thumb/86836774f3a632fe22e45411426204fc@2x.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4.jpeg b/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4.jpeg deleted file mode 100644 index d79ac01d..00000000 Binary files a/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4@2x.jpeg b/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4@2x.jpeg deleted file mode 100644 index d2dc91c8..00000000 Binary files a/demo/uploads/thumb/a55a5438f10b1ba866a76575512526e4@2x.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/b208cf3d7f67810135cf53f7bedcc8de.jpeg b/demo/uploads/thumb/b208cf3d7f67810135cf53f7bedcc8de.jpeg deleted file mode 100644 index cbaf3eeb..00000000 Binary files a/demo/uploads/thumb/b208cf3d7f67810135cf53f7bedcc8de.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg b/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg deleted file mode 100644 index e052980f..00000000 Binary files a/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg b/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg deleted file mode 100644 index ad1eb39a..00000000 Binary files a/demo/uploads/thumb/b3de35f5a293946f267e3fcb4b1b1e3c@2x.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618.jpeg b/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618.jpeg deleted file mode 100644 index c6110006..00000000 Binary files a/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618.jpeg and /dev/null differ diff --git a/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg b/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg deleted file mode 100644 index 7675ca37..00000000 Binary files a/demo/uploads/thumb/d250ea3871f5eae83f66adf2c1b45618@2x.jpeg and /dev/null differ diff --git a/docs/contributions.md b/docs/contributions.md index 38a88ca6..9c578a84 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -59,18 +59,6 @@ git push -u You can then open a [pull request][4]. -### Back-end and Front-end -As you may have noticed already, we have two repositories to manage separately: the front-end and the back-end. -This was necessary at times to ensure the parallel development of Lychee version 4 and Lychee version 3. -As a result, the process of submitting a PR that modifies both sides (Lychee-front and Lychee) goes as follows: - -1. we take the 2 PR. -2. we review them both. -3. we merge on Lychee-front. -4. switch Lychee-front to master, rebuild & commit on the Lychee PR. -5. merge to Lychee master -6. Enjoy! - ### Our Coding Style In order to ease the review of pull requests, we use a uniform code style. Our Continuous Integration suite will fail if the latter is not respected. @@ -92,7 +80,7 @@ In order to make this less constraining, you can copy the `pre-commit` file in t Our current configuration can be found [here](https://github.com/LycheeOrg/Lychee/blob/master/.php_cs). For details about the options, you can have a look at the [php-cs-fixer-configurator](https://mlocati.github.io/php-cs-fixer-configurator) -#### Javascript +#### Javascript/TypeScript Similarly to what was described above, you can format the code automatically with: diff --git a/docs/frontend.md b/docs/frontend.md index 9bba84aa..54c175f5 100644 --- a/docs/frontend.md +++ b/docs/frontend.md @@ -1,23 +1,10 @@ -The current Front-end of Lychee is 100% JS generated. In order to modify it you will need to recompile it. - -### Git Submodule - -At the moment, the current strategy of Lychee is to separate the front-end from the back-end. -This allowed us to easily develop the version 4 while having the version 3 still live. -It also kept the consistency of the GUI between the two major versions. - -As a result you will find the front-end files in the `public/Lychee-front` directory after you initialized it as follows: - -```bash -git submodule init -git submodule update -``` +The current Front-end of Lychee is using [Tailwindcss][1], [AlpineJS][2], [TypeScript][3] and [Blade templates][4]. In order to modify it you will need to recompile it. ### Dependencies In order to compile the front-end, you have to install the following dependencies: -- `node` [Node.js](http://nodejs.org) v10.0.0 or later +- `node` [Node.js](http://nodejs.org) v20.0.0 or later - `npm` [Node Packaged Modules](https://www.npmjs.org) After installing [Node.js](http://nodejs.org) you can use the included `npm` package manager to download all dependencies: @@ -28,11 +15,29 @@ npm install ### Build -The Gulpfile is located in `public/Lychee-front/` and can be executed using the `npm run compile` command. -This will take care of concatenating and minimizing the files. +In order to generate the front-end visual you will need to run the following: + +```bash +npm run dev +``` +This will create the files required to run Lychee. + +When running in production, you should use instead: +```bash +npm run build +``` +This will create a `public/build` folder with the associated files. + +### Points of attention -Do not forget to clear your cache in order to see the change done. +To ease your development, some pain points are to be considered: -### Creating Pull Requests +- names of variables (attributes) in blade templates must use camelCase. +- try to keep the alpine components code in the `.ts` files. +- TailwindCSS is doing tree-shaking, this means that any unused css class will not be provided in the production build. + When using classes programatically (e.g. in php), make sure to add them to `tailwind.config.js` -Please be sure to submit any front end pull requests to [LycheeOrg/Lychee-front](https://github.com/LycheeOrg/Lychee-front). \ No newline at end of file +[1]: https://tailwindcss.com/docs/utility-first +[2]: https://alpinejs.dev +[3]: https://www.typescriptlang.org/ +[4]: https://laravel.com/docs/blade \ No newline at end of file diff --git a/docs/settings.md b/docs/settings.md index 5a4200f8..6f164dc2 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -68,7 +68,7 @@ Determines if an overlay with metadata is displayed at the bottom of the screen * _Photo description_ * _Photo date taken_ -Note that these settings determine the defaults but the person viewing the gallery is free to override them. The overlay can be toggled on/off by clicking on the image in the photo view, and the data displayed can be changed using the `o` [keyboard shortcut](Keyboard-Shortcuts). +Note that these settings determine the defaults but the person viewing the gallery is free to override them. The overlay can be toggled on/off by clicking on the image in the photo view, and the data displayed can be changed using the `o` [keyboard shortcut](keyboard.html). ### Maps @@ -78,7 +78,7 @@ Note that enabling the maps adds a viewing-time dependency of your gallery on an ## CSS Personalization -Much of the appearance of the Lychee web interface is determined by the CSS. The bottom of the basic settings screen features a text input field where custom CSS can be entered to tweak the Lychee user interface. Effective use of this feature requires the knowledge of CSS and the internals of the Lychee front end (see the [source code](https://github.com/LycheeOrg/Lychee-front)), which go beyond the scope of this document, but check the [FAQ](faq.html) for a few examples. +Much of the appearance of the Lychee web interface is determined by the CSS. The bottom of the basic settings screen features a text input field where custom CSS can be entered to tweak the Lychee user interface. Effective use of this feature requires the knowledge of CSS and the internals of the [Lychee front end](frontend.html) which go beyond the scope of this document, but check the [FAQ](faq.html) for a few examples. Unlike the rest of the config, this field is stored in the text file `public/dist/user.css` and can be modified directly there using your favorite editor. @@ -126,12 +126,6 @@ Makes it possible to bypass the default Lychee CSRF token validation by providin **FIXME** refer to installation or update wiki. -#### `gen_demo_js` - -(boolean; default value: `0`) - -This feature is of importance for Lychee developers only. It is used when creating the [live demo](https://lycheeorg.github.io/demo/). - ### Config #### `site_title` diff --git a/makefile b/makefile index f98d1e7a..96bf899a 100644 --- a/makefile +++ b/makefile @@ -7,7 +7,6 @@ all: assets assets: mkdir -p build cp -r assets build/ - cp -r demo build/ mkdir -p build/docs cp -r docs/css build/docs/ cp -r docs/fonts build/docs/