mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
book-keeping and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b38712e574
commit
111bd361f5
111
Viewer/doc/DEPENDENCIES
Normal file
111
Viewer/doc/DEPENDENCIES
Normal file
@ -0,0 +1,111 @@
|
||||
|
||||
|
||||
Future tasks
|
||||
============
|
||||
|
||||
- Remove/merge legacy modules
|
||||
- move generic stuff to separate libs (npm)
|
||||
- lib/keyboard.js
|
||||
- lib/toggler.js
|
||||
|
||||
|
||||
|
||||
npm modules
|
||||
===========
|
||||
|
||||
All contexts (internal):
|
||||
- object-run - adds Object.prototype.run(..) to run function in
|
||||
in the context of an object.
|
||||
- ig-object - js object model wrapper
|
||||
a closer to JS alternative to "classes"
|
||||
- ig-actions - actions object model extension
|
||||
provides a different way to cooperatively extend
|
||||
methods
|
||||
- ig-types - JS type extensions and utilities
|
||||
- ig-argv - CLI argv parser
|
||||
- ig-features - organizes and manages sets of actions and data
|
||||
- guarantee-events - simple event cache
|
||||
- generic-walk - legacy???
|
||||
|
||||
|
||||
All contexts (external):
|
||||
- requirejs
|
||||
- requirejs-plugins - import text/json
|
||||
|
||||
|
||||
Electron / node app:
|
||||
- electron - GUI app wrapper
|
||||
- sharp - image processing (previews / basic fast metadata)
|
||||
- exif-reader - metadata parser
|
||||
- exiftool - metadata reader (full metadata reader)
|
||||
- app-module-path - add to node's require search path
|
||||
- v8-compile-cache - v8 require optimization
|
||||
- cli-progress - CLI progress bar
|
||||
- colors - CLI text colors
|
||||
- fs-extra - extend node's fs module (revise)
|
||||
- fs-walk
|
||||
- glob - glob implementation
|
||||
- wildglob - glob implementation (is this used?)
|
||||
|
||||
- pouchdb - standalone in-browser CouchDB (not used yet)
|
||||
- async-json
|
||||
- json5 - extended json (comments, ...) for config read
|
||||
|
||||
|
||||
|
||||
Other / static
|
||||
==============
|
||||
|
||||
Internal (lib):
|
||||
- keyboard.js - keyboard handler library
|
||||
- jli.js - general dom utilities (index.html/global)
|
||||
- util.js - misc utilities
|
||||
- util-dom.js - dom/jquery utils, mostly editor related
|
||||
- dialogs.js -
|
||||
- panels.js
|
||||
- scroller.js
|
||||
- toggler.js
|
||||
- transform.js
|
||||
- editor.js - image "editor" (legacy)
|
||||
|
||||
- _module.js - js module template
|
||||
- _template.js - bare js template
|
||||
|
||||
components/ - web components
|
||||
canvas-waveform.html
|
||||
ig-image-graph-worker.js
|
||||
ig-image-graph.js
|
||||
|
||||
widget/ - widgets
|
||||
browse-walk.js
|
||||
browse.html
|
||||
browse.js
|
||||
browse2.html
|
||||
browse2.js
|
||||
drawer.html
|
||||
drawer.js
|
||||
overlay.html
|
||||
overlay.js
|
||||
widget.js
|
||||
|
||||
|
||||
External (ext-lib):
|
||||
- sha1.js - sha1 implementation, used for GID generation
|
||||
(imagegrid/data.js)
|
||||
- jquery.js
|
||||
- jquery-ui.js
|
||||
- jquery.ui.touch-punch.min.js
|
||||
- hammer.min.js - touch/mouse guestures
|
||||
- jquery.hammer.js
|
||||
- velocity.min.js - animation engine (used??)
|
||||
|
||||
- pouchdb.min.js - standalone in-browser CouchDB (not used yet)
|
||||
|
||||
- less.js - legacy??
|
||||
- less-1.3.3.min.js - legacy??
|
||||
- jstorage.js - legacy?
|
||||
- virtual-dom.js - legacy???
|
||||
|
||||
|
||||
|
||||
|
||||
4
Viewer/ext-lib/jquery-1.7.2.min.js
vendored
4
Viewer/ext-lib/jquery-1.7.2.min.js
vendored
File diff suppressed because one or more lines are too long
9597
Viewer/ext-lib/jquery-1.9.1.js
vendored
9597
Viewer/ext-lib/jquery-1.9.1.js
vendored
File diff suppressed because it is too large
Load Diff
4
Viewer/ext-lib/jquery-3.0.0.min.js
vendored
4
Viewer/ext-lib/jquery-3.0.0.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,770 +0,0 @@
|
||||
/*
|
||||
* ----------------------------- JSTORAGE -------------------------------------
|
||||
* Simple local storage wrapper to save data on the browser side, supporting
|
||||
* all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+
|
||||
*
|
||||
* Copyright (c) 2010 - 2012 Andris Reinman, andris.reinman@gmail.com
|
||||
* Project homepage: www.jstorage.info
|
||||
*
|
||||
* Licensed under MIT-style license:
|
||||
*
|
||||
* 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 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.
|
||||
*/
|
||||
|
||||
(function(){
|
||||
var
|
||||
/* jStorage version */
|
||||
JSTORAGE_VERSION = "0.2.3",
|
||||
|
||||
/* detect a dollar object or create one if not found */
|
||||
$ = window.jQuery || window.$ || (window.$ = {}),
|
||||
|
||||
/* check for a JSON handling support */
|
||||
JSON = {
|
||||
parse:
|
||||
window.JSON && (window.JSON.parse || window.JSON.decode) ||
|
||||
String.prototype.evalJSON && function(str){return String(str).evalJSON();} ||
|
||||
$.parseJSON ||
|
||||
$.evalJSON,
|
||||
stringify:
|
||||
window.JSON && (window.JSON.stringify || window.JSON.encode) ||
|
||||
Object.toJSON ||
|
||||
$.toJSON
|
||||
};
|
||||
|
||||
// Break if no JSON support was found
|
||||
if(!JSON.parse || !JSON.stringify){
|
||||
throw new Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");
|
||||
}
|
||||
|
||||
var
|
||||
/* This is the object, that holds the cached values */
|
||||
_storage = {},
|
||||
|
||||
/* Actual browser storage (localStorage or globalStorage['domain']) */
|
||||
_storage_service = {jStorage:"{}"},
|
||||
|
||||
/* DOM element for older IE versions, holds userData behavior */
|
||||
_storage_elm = null,
|
||||
|
||||
/* How much space does the storage take */
|
||||
_storage_size = 0,
|
||||
|
||||
/* which backend is currently used */
|
||||
_backend = false,
|
||||
|
||||
/* onchange observers */
|
||||
_observers = {},
|
||||
|
||||
/* timeout to wait after onchange event */
|
||||
_observerTimeout = false,
|
||||
|
||||
/* last update time */
|
||||
_observerUpdate = 0,
|
||||
|
||||
/* Next check for TTL */
|
||||
_ttl_timeout,
|
||||
|
||||
/* crc32 table */
|
||||
_crc32Table = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 "+
|
||||
"0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 "+
|
||||
"6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 "+
|
||||
"FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 "+
|
||||
"A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 "+
|
||||
"32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 "+
|
||||
"56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 "+
|
||||
"C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 "+
|
||||
"E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 "+
|
||||
"6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 "+
|
||||
"12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE "+
|
||||
"A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 "+
|
||||
"DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 "+
|
||||
"5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 "+
|
||||
"2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF "+
|
||||
"04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 "+
|
||||
"7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 "+
|
||||
"FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 "+
|
||||
"A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C "+
|
||||
"36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 "+
|
||||
"5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 "+
|
||||
"C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 "+
|
||||
"EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D "+
|
||||
"7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 "+
|
||||
"18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 "+
|
||||
"A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A "+
|
||||
"D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A "+
|
||||
"53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 "+
|
||||
"2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D",
|
||||
|
||||
/**
|
||||
* XML encoding and decoding as XML nodes can't be JSON'ized
|
||||
* XML nodes are encoded and decoded if the node is the value to be saved
|
||||
* but not if it's as a property of another object
|
||||
* Eg. -
|
||||
* $.jStorage.set("key", xmlNode); // IS OK
|
||||
* $.jStorage.set("key", {xml: xmlNode}); // NOT OK
|
||||
*/
|
||||
_XMLService = {
|
||||
|
||||
/**
|
||||
* Validates a XML node to be XML
|
||||
* based on jQuery.isXML function
|
||||
*/
|
||||
isXML: function(elm){
|
||||
var documentElement = (elm ? elm.ownerDocument || elm : 0).documentElement;
|
||||
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Encodes a XML node to string
|
||||
* based on http://www.mercurytide.co.uk/news/article/issues-when-working-ajax/
|
||||
*/
|
||||
encode: function(xmlNode) {
|
||||
if(!this.isXML(xmlNode)){
|
||||
return false;
|
||||
}
|
||||
try{ // Mozilla, Webkit, Opera
|
||||
return new XMLSerializer().serializeToString(xmlNode);
|
||||
}catch(E1) {
|
||||
try { // IE
|
||||
return xmlNode.xml;
|
||||
}catch(E2){}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Decodes a XML node from string
|
||||
* loosely based on http://outwestmedia.com/jquery-plugins/xmldom/
|
||||
*/
|
||||
decode: function(xmlString){
|
||||
var dom_parser = ("DOMParser" in window && (new DOMParser()).parseFromString) ||
|
||||
(window.ActiveXObject && function(_xmlString) {
|
||||
var xml_doc = new ActiveXObject('Microsoft.XMLDOM');
|
||||
xml_doc.async = 'false';
|
||||
xml_doc.loadXML(_xmlString);
|
||||
return xml_doc;
|
||||
}),
|
||||
resultXML;
|
||||
if(!dom_parser){
|
||||
return false;
|
||||
}
|
||||
resultXML = dom_parser.call("DOMParser" in window && (new DOMParser()) || window, xmlString, 'text/xml');
|
||||
return this.isXML(resultXML)?resultXML:false;
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////// PRIVATE METHODS ////////////////////////
|
||||
|
||||
/**
|
||||
* Initialization function. Detects if the browser supports DOM Storage
|
||||
* or userData behavior and behaves accordingly.
|
||||
*/
|
||||
function _init(){
|
||||
/* Check if browser supports localStorage */
|
||||
var localStorageReallyWorks = false;
|
||||
if("localStorage" in window){
|
||||
try {
|
||||
window.localStorage.setItem('_tmptest', 'tmpval');
|
||||
localStorageReallyWorks = true;
|
||||
window.localStorage.removeItem('_tmptest');
|
||||
} catch(BogusQuotaExceededErrorOnIos5) {
|
||||
// Thanks be to iOS5 Private Browsing mode which throws
|
||||
// QUOTA_EXCEEDED_ERRROR DOM Exception 22.
|
||||
}
|
||||
}
|
||||
if(localStorageReallyWorks){
|
||||
try {
|
||||
if(window.localStorage) {
|
||||
_storage_service = window.localStorage;
|
||||
_backend = "localStorage";
|
||||
_observerUpdate = _storage_service.jStorage_update;
|
||||
}
|
||||
} catch(E3) {/* Firefox fails when touching localStorage and cookies are disabled */}
|
||||
}
|
||||
/* Check if browser supports globalStorage */
|
||||
else if("globalStorage" in window){
|
||||
try {
|
||||
if(window.globalStorage) {
|
||||
_storage_service = window.globalStorage[window.location.hostname];
|
||||
_backend = "globalStorage";
|
||||
_observerUpdate = _storage_service.jStorage_update;
|
||||
}
|
||||
} catch(E4) {/* Firefox fails when touching localStorage and cookies are disabled */}
|
||||
}
|
||||
/* Check if browser supports userData behavior */
|
||||
else {
|
||||
_storage_elm = document.createElement('link');
|
||||
if(_storage_elm.addBehavior){
|
||||
|
||||
/* Use a DOM element to act as userData storage */
|
||||
_storage_elm.style.behavior = 'url(#default#userData)';
|
||||
|
||||
/* userData element needs to be inserted into the DOM! */
|
||||
document.getElementsByTagName('head')[0].appendChild(_storage_elm);
|
||||
|
||||
_storage_elm.load("jStorage");
|
||||
|
||||
var data = "{}";
|
||||
try{
|
||||
data = _storage_elm.getAttribute("jStorage");
|
||||
}catch(E5){}
|
||||
|
||||
try{
|
||||
_observerUpdate = _storage_elm.getAttribute("jStorage_update");
|
||||
}catch(E6){}
|
||||
|
||||
_storage_service.jStorage = data;
|
||||
_backend = "userDataBehavior";
|
||||
}else{
|
||||
_storage_elm = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_load_storage();
|
||||
|
||||
// remove dead keys
|
||||
_handleTTL();
|
||||
|
||||
// start listening for changes
|
||||
_setupObserver();
|
||||
}
|
||||
|
||||
function _reloadData(){
|
||||
var data = "{}";
|
||||
|
||||
if(_backend == "userDataBehavior"){
|
||||
_storage_elm.load("jStorage");
|
||||
|
||||
try{
|
||||
data = _storage_elm.getAttribute("jStorage");
|
||||
}catch(E5){}
|
||||
|
||||
try{
|
||||
_observerUpdate = _storage_elm.getAttribute("jStorage_update");
|
||||
}catch(E6){}
|
||||
|
||||
_storage_service.jStorage = data;
|
||||
}
|
||||
|
||||
_load_storage();
|
||||
|
||||
// remove dead keys
|
||||
_handleTTL();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up a storage change observer
|
||||
*/
|
||||
function _setupObserver(){
|
||||
if(_backend == "localStorage" || _backend == "globalStorage"){
|
||||
if("addEventListener" in window){
|
||||
window.addEventListener("storage", _storageObserver, false);
|
||||
}else{
|
||||
document.attachEvent("onstorage", _storageObserver);
|
||||
}
|
||||
}else if(_backend == "userDataBehavior"){
|
||||
setInterval(_storageObserver, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired on any kind of data change, needs to check if anything has
|
||||
* really been changed
|
||||
*/
|
||||
function _storageObserver(){
|
||||
var updateTime;
|
||||
// cumulate change notifications with timeout
|
||||
clearTimeout(_observerTimeout);
|
||||
_observerTimeout = setTimeout(function(){
|
||||
|
||||
if(_backend == "localStorage" || _backend == "globalStorage"){
|
||||
updateTime = _storage_service.jStorage_update;
|
||||
}else if(_backend == "userDataBehavior"){
|
||||
_storage_elm.load("jStorage");
|
||||
try{
|
||||
updateTime = _storage_elm.getAttribute("jStorage_update");
|
||||
}catch(E5){}
|
||||
}
|
||||
|
||||
if(updateTime && updateTime != _observerUpdate){
|
||||
_observerUpdate = updateTime;
|
||||
_checkUpdatedKeys();
|
||||
}
|
||||
|
||||
}, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the data and checks if any keys are changed
|
||||
*/
|
||||
function _checkUpdatedKeys(){
|
||||
var oldCrc32List = JSON.parse(JSON.stringify(_storage.__jstorage_meta.CRC32)),
|
||||
newCrc32List;
|
||||
|
||||
_reloadData();
|
||||
newCrc32List = JSON.parse(JSON.stringify(_storage.__jstorage_meta.CRC32));
|
||||
|
||||
var key,
|
||||
updated = [],
|
||||
removed = [];
|
||||
|
||||
for(key in oldCrc32List){
|
||||
if(oldCrc32List.hasOwnProperty(key)){
|
||||
if(!newCrc32List[key]){
|
||||
removed.push(key);
|
||||
continue;
|
||||
}
|
||||
if(oldCrc32List[key] != newCrc32List[key]){
|
||||
updated.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(key in newCrc32List){
|
||||
if(newCrc32List.hasOwnProperty(key)){
|
||||
if(!oldCrc32List[key]){
|
||||
updated.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_fireObservers(updated, "updated");
|
||||
_fireObservers(removed, "deleted");
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires observers for updated keys
|
||||
*
|
||||
* @param {Array|String} keys Array of key names or a key
|
||||
* @param {String} action What happened with the value (updated, deleted, flushed)
|
||||
*/
|
||||
function _fireObservers(keys, action){
|
||||
keys = [].concat(keys || []);
|
||||
if(action == "flushed"){
|
||||
keys = [];
|
||||
for(var key in _observers){
|
||||
if(_observers.hasOwnProperty(key)){
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
action = "deleted";
|
||||
}
|
||||
for(var i=0, len = keys.length; i<len; i++){
|
||||
if(_observers[keys[i]]){
|
||||
for(var j=0, jlen = _observers[keys[i]].length; j<jlen; j++){
|
||||
_observers[keys[i]][j](keys[i], action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes key change to listeners
|
||||
*/
|
||||
function _publishChange(){
|
||||
var updateTime = (+new Date()).toString();
|
||||
|
||||
if(_backend == "localStorage" || _backend == "globalStorage"){
|
||||
_storage_service.jStorage_update = updateTime;
|
||||
}else if(_backend == "userDataBehavior"){
|
||||
_storage_elm.setAttribute("jStorage_update", updateTime);
|
||||
_storage_elm.save("jStorage");
|
||||
}
|
||||
|
||||
_storageObserver();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the data from the storage based on the supported mechanism
|
||||
*/
|
||||
function _load_storage(){
|
||||
/* if jStorage string is retrieved, then decode it */
|
||||
if(_storage_service.jStorage){
|
||||
try{
|
||||
_storage = JSON.parse(String(_storage_service.jStorage));
|
||||
}catch(E6){_storage_service.jStorage = "{}";}
|
||||
}else{
|
||||
_storage_service.jStorage = "{}";
|
||||
}
|
||||
_storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0;
|
||||
|
||||
if(!_storage.__jstorage_meta){
|
||||
_storage.__jstorage_meta = {};
|
||||
}
|
||||
if(!_storage.__jstorage_meta.CRC32){
|
||||
_storage.__jstorage_meta.CRC32 = {};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This functions provides the "save" mechanism to store the jStorage object
|
||||
*/
|
||||
function _save(){
|
||||
try{
|
||||
_storage_service.jStorage = JSON.stringify(_storage);
|
||||
// If userData is used as the storage engine, additional
|
||||
if(_storage_elm) {
|
||||
_storage_elm.setAttribute("jStorage",_storage_service.jStorage);
|
||||
_storage_elm.save("jStorage");
|
||||
}
|
||||
_storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0;
|
||||
}catch(E7){/* probably cache is full, nothing is saved this way*/}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function checks if a key is set and is string or numberic
|
||||
*
|
||||
* @param {String} key Key name
|
||||
*/
|
||||
function _checkKey(key){
|
||||
if(!key || (typeof key != "string" && typeof key != "number")){
|
||||
throw new TypeError('Key name must be string or numeric');
|
||||
}
|
||||
if(key == "__jstorage_meta"){
|
||||
throw new TypeError('Reserved key name');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes expired keys
|
||||
*/
|
||||
function _handleTTL(){
|
||||
var curtime, i, TTL, CRC32, nextExpire = Infinity, changed = false, deleted = [];
|
||||
|
||||
clearTimeout(_ttl_timeout);
|
||||
|
||||
if(!_storage.__jstorage_meta || typeof _storage.__jstorage_meta.TTL != "object"){
|
||||
// nothing to do here
|
||||
return;
|
||||
}
|
||||
|
||||
curtime = +new Date();
|
||||
TTL = _storage.__jstorage_meta.TTL;
|
||||
|
||||
CRC32 = _storage.__jstorage_meta.CRC32;
|
||||
for(i in TTL){
|
||||
if(TTL.hasOwnProperty(i)){
|
||||
if(TTL[i] <= curtime){
|
||||
delete TTL[i];
|
||||
delete CRC32[i];
|
||||
delete _storage[i];
|
||||
changed = true;
|
||||
deleted.push(i);
|
||||
}else if(TTL[i] < nextExpire){
|
||||
nextExpire = TTL[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set next check
|
||||
if(nextExpire != Infinity){
|
||||
_ttl_timeout = setTimeout(_handleTTL, nextExpire - curtime);
|
||||
}
|
||||
|
||||
// save changes
|
||||
if(changed){
|
||||
_save();
|
||||
_publishChange();
|
||||
_fireObservers(deleted, "deleted");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* CRC32 calculation based on http://noteslog.com/post/crc32-for-javascript/
|
||||
*
|
||||
* @param {String} str String to be hashed
|
||||
* @param {Number} [crc] Last crc value in case of streams
|
||||
*/
|
||||
function _crc32(str, crc){
|
||||
crc = crc || 0;
|
||||
|
||||
var n = 0, //a number between 0 and 255
|
||||
x = 0; //an hex number
|
||||
|
||||
crc = crc ^ (-1);
|
||||
for(var i = 0, len = str.length; i < len; i++){
|
||||
n = (crc ^ str.charCodeAt(i)) & 0xFF;
|
||||
x = "0x" + _crc32Table.substr(n * 9, 8);
|
||||
crc = (crc >>> 8)^x;
|
||||
}
|
||||
return crc^(-1);
|
||||
}
|
||||
|
||||
////////////////////////// PUBLIC INTERFACE /////////////////////////
|
||||
|
||||
$.jStorage = {
|
||||
/* Version number */
|
||||
version: JSTORAGE_VERSION,
|
||||
|
||||
/**
|
||||
* Sets a key's value.
|
||||
*
|
||||
* @param {String} key Key to set. If this value is not set or not
|
||||
* a string an exception is raised.
|
||||
* @param {Mixed} value Value to set. This can be any value that is JSON
|
||||
* compatible (Numbers, Strings, Objects etc.).
|
||||
* @param {Object} [options] - possible options to use
|
||||
* @param {Number} [options.TTL] - optional TTL value
|
||||
* @return {Mixed} the used value
|
||||
*/
|
||||
set: function(key, value, options){
|
||||
_checkKey(key);
|
||||
|
||||
options = options || {};
|
||||
|
||||
// undefined values are deleted automatically
|
||||
if(typeof value == "undefined"){
|
||||
this.deleteKey(key);
|
||||
return value;
|
||||
}
|
||||
|
||||
if(_XMLService.isXML(value)){
|
||||
value = {_is_xml:true,xml:_XMLService.encode(value)};
|
||||
}else if(typeof value == "function"){
|
||||
return undefined; // functions can't be saved!
|
||||
}else if(value && typeof value == "object"){
|
||||
// clone the object before saving to _storage tree
|
||||
value = JSON.parse(JSON.stringify(value));
|
||||
}
|
||||
_storage[key] = value;
|
||||
|
||||
_storage.__jstorage_meta.CRC32[key] = _crc32(JSON.stringify(value));
|
||||
|
||||
this.setTTL(key, options.TTL || 0); // also handles saving and _publishChange
|
||||
|
||||
_fireObservers(key, "updated");
|
||||
return value;
|
||||
},
|
||||
|
||||
/**
|
||||
* Looks up a key in cache
|
||||
*
|
||||
* @param {String} key - Key to look up.
|
||||
* @param {mixed} def - Default value to return, if key didn't exist.
|
||||
* @return {Mixed} the key value, default value or null
|
||||
*/
|
||||
get: function(key, def){
|
||||
_checkKey(key);
|
||||
if(key in _storage){
|
||||
if(_storage[key] && typeof _storage[key] == "object" &&
|
||||
_storage[key]._is_xml &&
|
||||
_storage[key]._is_xml){
|
||||
return _XMLService.decode(_storage[key].xml);
|
||||
}else{
|
||||
return _storage[key];
|
||||
}
|
||||
}
|
||||
return typeof(def) == 'undefined' ? null : def;
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes a key from cache.
|
||||
*
|
||||
* @param {String} key - Key to delete.
|
||||
* @return {Boolean} true if key existed or false if it didn't
|
||||
*/
|
||||
deleteKey: function(key){
|
||||
_checkKey(key);
|
||||
if(key in _storage){
|
||||
delete _storage[key];
|
||||
// remove from TTL list
|
||||
if(typeof _storage.__jstorage_meta.TTL == "object" &&
|
||||
key in _storage.__jstorage_meta.TTL){
|
||||
delete _storage.__jstorage_meta.TTL[key];
|
||||
}
|
||||
|
||||
delete _storage.__jstorage_meta.CRC32[key];
|
||||
|
||||
_save();
|
||||
_publishChange();
|
||||
_fireObservers(key, "deleted");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets a TTL for a key, or remove it if ttl value is 0 or below
|
||||
*
|
||||
* @param {String} key - key to set the TTL for
|
||||
* @param {Number} ttl - TTL timeout in milliseconds
|
||||
* @return {Boolean} true if key existed or false if it didn't
|
||||
*/
|
||||
setTTL: function(key, ttl){
|
||||
var curtime = +new Date();
|
||||
_checkKey(key);
|
||||
ttl = Number(ttl) || 0;
|
||||
if(key in _storage){
|
||||
|
||||
if(!_storage.__jstorage_meta.TTL){
|
||||
_storage.__jstorage_meta.TTL = {};
|
||||
}
|
||||
|
||||
// Set TTL value for the key
|
||||
if(ttl>0){
|
||||
_storage.__jstorage_meta.TTL[key] = curtime + ttl;
|
||||
}else{
|
||||
delete _storage.__jstorage_meta.TTL[key];
|
||||
}
|
||||
|
||||
_save();
|
||||
|
||||
_handleTTL();
|
||||
|
||||
_publishChange();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets remaining TTL (in milliseconds) for a key or 0 when no TTL has been set
|
||||
*
|
||||
* @param {String} key Key to check
|
||||
* @return {Number} Remaining TTL in milliseconds
|
||||
*/
|
||||
getTTL: function(key){
|
||||
var curtime = +new Date(), ttl;
|
||||
_checkKey(key);
|
||||
if(key in _storage && _storage.__jstorage_meta.TTL && _storage.__jstorage_meta.TTL[key]){
|
||||
ttl = _storage.__jstorage_meta.TTL[key] - curtime;
|
||||
return ttl || 0;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Deletes everything in cache.
|
||||
*
|
||||
* @return {Boolean} Always true
|
||||
*/
|
||||
flush: function(){
|
||||
_storage = {__jstorage_meta:{CRC32:{}}};
|
||||
_save();
|
||||
_publishChange();
|
||||
_fireObservers(null, "flushed");
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a read-only copy of _storage
|
||||
*
|
||||
* @return {Object} Read-only copy of _storage
|
||||
*/
|
||||
storageObj: function(){
|
||||
function F() {}
|
||||
F.prototype = _storage;
|
||||
return new F();
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an index of all used keys as an array
|
||||
* ['key1', 'key2',..'keyN']
|
||||
*
|
||||
* @return {Array} Used keys
|
||||
*/
|
||||
index: function(){
|
||||
var index = [], i;
|
||||
for(i in _storage){
|
||||
if(_storage.hasOwnProperty(i) && i != "__jstorage_meta"){
|
||||
index.push(i);
|
||||
}
|
||||
}
|
||||
return index;
|
||||
},
|
||||
|
||||
/**
|
||||
* How much space in bytes does the storage take?
|
||||
*
|
||||
* @return {Number} Storage size in chars (not the same as in bytes,
|
||||
* since some chars may take several bytes)
|
||||
*/
|
||||
storageSize: function(){
|
||||
return _storage_size;
|
||||
},
|
||||
|
||||
/**
|
||||
* Which backend is currently in use?
|
||||
*
|
||||
* @return {String} Backend name
|
||||
*/
|
||||
currentBackend: function(){
|
||||
return _backend;
|
||||
},
|
||||
|
||||
/**
|
||||
* Test if storage is available
|
||||
*
|
||||
* @return {Boolean} True if storage can be used
|
||||
*/
|
||||
storageAvailable: function(){
|
||||
return !!_backend;
|
||||
},
|
||||
|
||||
/**
|
||||
* Register change listeners
|
||||
*
|
||||
* @param {String} key Key name
|
||||
* @param {Function} callback Function to run when the key changes
|
||||
*/
|
||||
listenKeyChange: function(key, callback){
|
||||
_checkKey(key);
|
||||
if(!_observers[key]){
|
||||
_observers[key] = [];
|
||||
}
|
||||
_observers[key].push(callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove change listeners
|
||||
*
|
||||
* @param {String} key Key name to unregister listeners against
|
||||
* @param {Function} [callback] If set, unregister the callback, if not - unregister all
|
||||
*/
|
||||
stopListening: function(key, callback){
|
||||
_checkKey(key);
|
||||
|
||||
if(!_observers[key]){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!callback){
|
||||
delete _observers[key];
|
||||
return;
|
||||
}
|
||||
|
||||
for(var i = _observers[key].length - 1; i>=0; i--){
|
||||
if(_observers[key][i] == callback){
|
||||
_observers[key].splice(i,1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Reloads the data from browser storage
|
||||
*/
|
||||
reInit: function(){
|
||||
_reloadData();
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize jStorage
|
||||
_init();
|
||||
|
||||
})();
|
||||
9
Viewer/ext-lib/less-1.3.3.min.js
vendored
9
Viewer/ext-lib/less-1.3.3.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
36
Viewer/ext-lib/require.min.js
vendored
36
Viewer/ext-lib/require.min.js
vendored
@ -1,36 +0,0 @@
|
||||
/*
|
||||
RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
|
||||
Available via the MIT or new BSD license.
|
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
var requirejs,require,define;
|
||||
(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function B(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&B(c,function(c,g){if(d||!t(b,g))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
|
||||
RegExp)?(b[g]||(b[g]={}),U(b[g],c,d,e)):b[g]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,k,b){var f,l,c,d,e,g,i,p,k=k&&k.split("/"),h=j.map,n=h&&h["*"];if(a){a=a.split("/");l=a.length-1;j.nodeIdCompat&&
|
||||
Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&k&&(l=k.slice(0,k.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1==c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&h&&(k||n)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){e=l.slice(0,c).join("/");if(k)for(d=k.length;0<d;d-=1)if(b=m(h,k.slice(0,d).join("/")))if(b=m(b,e)){f=b;g=c;break a}!i&&(n&&m(n,e))&&(i=m(n,e),p=c)}!f&&i&&(f=i,g=p);f&&(l.splice(0,
|
||||
g,f),a=l.join("/"))}return(f=m(j.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(k){if(k.getAttribute("data-requiremodule")===a&&k.getAttribute("data-requirecontext")===i.contextName)return k.parentNode.removeChild(k),!0})}function e(a){var k=m(j.paths,a);if(k&&H(k)&&1<k.length)return k.shift(),i.require.undef(a),i.makeRequire(null,{skipMap:!0})([a]),!0}function n(a){var k,c=a?a.indexOf("!"):-1;-1<c&&(k=a.substring(0,c),a=a.substring(c+1,a.length));return[k,a]}function p(a,
|
||||
k,b,f){var l,d,e=null,g=k?k.name:null,j=a,p=!0,h="";a||(p=!1,a="_@r"+(K+=1));a=n(a);e=a[0];a=a[1];e&&(e=c(e,g,f),d=m(r,e));a&&(e?h=d&&d.normalize?d.normalize(a,function(a){return c(a,g,f)}):-1===a.indexOf("!")?c(a,g,f):a:(h=c(a,g,f),a=n(h),e=a[0],h=a[1],b=!0,l=i.nameToUrl(h)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:h,parentMap:k,unnormalized:!!b,url:l,originalName:j,isDefine:p,id:(e?e+"!"+h:h)+b}}function s(a){var k=a.id,b=m(h,k);b||(b=h[k]=new i.Module(a));return b}function q(a,
|
||||
k,b){var f=a.id,c=m(h,f);if(t(r,f)&&(!c||c.defineEmitComplete))"defined"===k&&b(r[f]);else if(c=s(a),c.error&&"error"===k)b(c.error);else c.on(k,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=m(h,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)g.onError(a)}function x(){R.length&&(ha.apply(A,[A.length,0].concat(R)),R=[])}function y(a){delete h[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",a.error):(b[f]=!0,v(a.depMaps,function(f,
|
||||
d){var e=f.id,g=m(h,e);g&&(!a.depMatched[d]&&!c[e])&&(m(b,e)?(a.defineDep(d,r[e]),a.check()):F(g,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*j.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],l=[],g=!1,h=!0;if(!W){W=!0;B(V,function(a){var i=a.map,j=i.id;if(a.enabled&&(i.isDefine||l.push(a),!a.error))if(!a.inited&&c)e(j)?g=b=!0:(f.push(j),d(j));else if(!a.inited&&(a.fetched&&i.isDefine)&&(g=!0,!i.prefix))return h=!1});if(c&&f.length)return a=C("timeout","Load timeout for modules: "+f,null,
|
||||
f),a.contextName=i.contextName,w(a);h&&v(l,function(a){F(a,{},{})});if((!c||b)&&g)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(r,a[0])||s(p(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function J(){var a;
|
||||
for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var W,Z,i,L,X,j={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},h={},V={},$={},A=[],r={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?
|
||||
a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m(j.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=m($,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
|
||||
c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
|
||||
this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
|
||||
(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
|
||||
this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
|
||||
if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
|
||||
"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b,
|
||||
a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,
|
||||
nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,
|
||||
a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=
|
||||
!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==
|
||||
e&&(!("."===k||".."===k)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,p(b,a,!1,!0).id)},specified:function(b){b=p(b,a,!1,!0).id;return t(r,b)||t(h,b)}});a||(j.undef=function(b){x();var c=p(b,a,!0),e=m(h,b);d(b);delete r[b];delete S[c.url];delete $[b];T(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&($[b]=e.events),y(b))});return j},enable:function(a){m(h,a.id)&&s(a).enable()},completeLoad:function(a){var b,
|
||||
c,d=m(j.shim,a)||{},g=d.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(h,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!g||!da(g)))return e(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,e,h;(d=m(j.pkgs,a))&&(a=d);if(d=m(aa,a))return i.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=j.paths;a=a.split("/");for(e=a.length;0<e;e-=1)if(h=a.slice(0,
|
||||
e).join("/"),h=m(d,h)){H(h)&&(h=h[0]);a.splice(0,e,h);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+d}return j.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+j.urlArgs):d},load:function(a,b){g.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ja.test((a.currentTarget||a.srcElement).readyState))N=null,a=I(a),i.completeLoad(a.id)},onScriptError:function(a){var b=I(a);if(!e(b.id))return w(C("scripterror",
|
||||
"Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==typeof importScripts,ja=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,
|
||||
Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(q=require,require=void 0);g=requirejs=function(b,c,d,e){var n,p="_";!H(b)&&"string"!==typeof b&&(n=b,H(c)?(b=c,c=d,d=e):b=[]);n&&n.context&&(p=n.context);(e=m(F,p))||(e=F[p]=g.s.newContext(p));n&&e.configure(n);return e.require(b,c,d)};g.config=function(b){return g(b)};
|
||||
g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.1.14";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=z;x=g.s={contexts:F,newContext:ga};g({});v(["toUrl","undef","defined","specified"],function(b){g[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;g.onError=ca;g.createNode=function(b){var c=
|
||||
b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var e=b&&b.config||{};if(z)return e=g.createNode(e,c,d),e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",c),e.attachEvent&&!(e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):
|
||||
(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=
|
||||
O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b||
|
||||
(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);
|
||||
File diff suppressed because it is too large
Load Diff
@ -57,13 +57,9 @@ var ExperimentActions = actions.Actions({
|
||||
var opts = {}
|
||||
if(that.changes[key] instanceof Array){
|
||||
opts.attrs = {
|
||||
count: that.changes[key].length
|
||||
}
|
||||
}
|
||||
|
||||
count: that.changes[key].length } }
|
||||
// XXX show human-readable info... (???)
|
||||
make(key, opts)
|
||||
})
|
||||
make(key, opts) })
|
||||
|
||||
// save comment...
|
||||
if(that.getSaveComment){
|
||||
@ -83,15 +79,12 @@ var ExperimentActions = actions.Actions({
|
||||
$(this)
|
||||
.find('.text')
|
||||
.last()
|
||||
.text())
|
||||
})
|
||||
.text()) })
|
||||
.on('edit-abort', function(){
|
||||
$(this)
|
||||
.find('.text')
|
||||
.last()
|
||||
.text(comment)
|
||||
})
|
||||
}
|
||||
.text(comment) }) }
|
||||
|
||||
make('---')
|
||||
make('Save', {
|
||||
@ -99,24 +92,17 @@ var ExperimentActions = actions.Actions({
|
||||
that.setSaveComment
|
||||
&& that.setSaveComment(comment)
|
||||
that.saveIndexHere
|
||||
&& that.saveIndexHere()
|
||||
},
|
||||
&& that.saveIndexHere() },
|
||||
close: function(){
|
||||
that.off('markChanged', 'changes-dialog-updater')
|
||||
}
|
||||
that.off('markChanged', 'changes-dialog-updater') },
|
||||
})
|
||||
|
||||
if(!handlers_setup){
|
||||
// XXX need to clean this up in a better way...
|
||||
// XXX this should also track .changes...
|
||||
that.on('markChanged', 'changes-dialog-updater', function(){
|
||||
make.dialog.update()
|
||||
})
|
||||
handlers_setup = true
|
||||
}
|
||||
}
|
||||
})
|
||||
})],
|
||||
make.dialog.update() })
|
||||
handlers_setup = true } } }) })],
|
||||
|
||||
unsavedChanges: ['- Experimental/',
|
||||
function(){
|
||||
|
||||
@ -2220,8 +2220,6 @@ module.PreviewFilters = core.ImageGridFeatures.Feature({
|
||||
config: {
|
||||
'preview-filters': {
|
||||
// exposure aids...
|
||||
//'Show shadows': 'image-show-shadows',
|
||||
//'Show highlights': 'image-show-highlights',
|
||||
'Show clipping': 'image-shadows-and-highlights',
|
||||
'Show shadows': 'image-gamma-shadows',
|
||||
|
||||
@ -2229,7 +2227,6 @@ module.PreviewFilters = core.ImageGridFeatures.Feature({
|
||||
'Black and white': 'image-bw',
|
||||
'Edge detect': 'image-edge-detect',
|
||||
|
||||
|
||||
'No filters': 'none',
|
||||
},
|
||||
},
|
||||
|
||||
@ -82,7 +82,7 @@ if(typeof(process) != 'undefined'){
|
||||
require('./cfg/requirejs')
|
||||
requirejs('ui') }
|
||||
</script>
|
||||
<script src="ext-lib/require.js"></script>
|
||||
<script src="node_modules/requirejs/require.js"></script>
|
||||
<script>
|
||||
// Browser...
|
||||
if(typeof(process) == 'undefined'){
|
||||
|
||||
@ -22,8 +22,7 @@ module.Filters = {
|
||||
var c = document.createElement('canvas')
|
||||
c.width = w
|
||||
c.height = h
|
||||
return c
|
||||
},
|
||||
return c },
|
||||
|
||||
// as input takes an HTML Image object...
|
||||
getPixels: function(img, w, h){
|
||||
@ -36,16 +35,13 @@ module.Filters = {
|
||||
context.fillStyle = "black"
|
||||
context.fill()
|
||||
} else {
|
||||
context.drawImage(img, 0, 0, w, h)
|
||||
}
|
||||
return context.getImageData(0, 0, c.width, c.height)
|
||||
},
|
||||
context.drawImage(img, 0, 0, w, h) }
|
||||
return context.getImageData(0, 0, c.width, c.height) },
|
||||
setPixels: function(c, data, w, h){
|
||||
w = c.width = w || data.width
|
||||
h = c.height = h || data.height
|
||||
var context = c.getContext('2d')
|
||||
context.putImageData(data, 0, 0)
|
||||
},
|
||||
context.putImageData(data, 0, 0) },
|
||||
|
||||
// get image pixels normalized to a square of size s, rotated and flipped...
|
||||
//
|
||||
@ -77,19 +73,15 @@ module.Filters = {
|
||||
if(img){
|
||||
context.setTransform(h*1, 0, 0, v*1, s/2, s/2)
|
||||
context.rotate(rotate * Math.PI/180)
|
||||
context.drawImage(img, -s/2, -s/2, s, s)
|
||||
}
|
||||
context.drawImage(img, -s/2, -s/2, s, s) }
|
||||
|
||||
return context.getImageData(0, 0, s, s)
|
||||
},
|
||||
return context.getImageData(0, 0, s, s) },
|
||||
|
||||
filterImage: function(filter, image, var_args){
|
||||
var args = [this.getPixels(image)]
|
||||
for(var i=2; i<arguments.length; i++){
|
||||
args.push(arguments[i])
|
||||
}
|
||||
return filter.apply(null, args)
|
||||
},
|
||||
args.push(arguments[i]) }
|
||||
return filter.apply(null, args) },
|
||||
|
||||
grayscale: function(pixels, args){
|
||||
var d = pixels.data
|
||||
@ -100,10 +92,8 @@ module.Filters = {
|
||||
// CIE luminance for the RGB
|
||||
// The human eye is bad at seeing red and blue, so we de-emphasize them.
|
||||
var v = 0.2126*r + 0.7152*g + 0.0722*b
|
||||
d[i] = d[i+1] = d[i+2] = v
|
||||
}
|
||||
return pixels
|
||||
},
|
||||
d[i] = d[i+1] = d[i+2] = v }
|
||||
return pixels },
|
||||
// XXX need to resize this...
|
||||
histogram: function(pixels, mode, color){
|
||||
color = color || 'fill'
|
||||
@ -138,8 +128,7 @@ module.Filters = {
|
||||
if(mode == 'color' || mode == 'G'){
|
||||
count[g*4+1] = (count[g*4+1] || 0) + 1 }
|
||||
if(mode == 'color' || mode == 'B'){
|
||||
count[b*4+2] = (count[b*4+2] || 0) + 1 } }
|
||||
}
|
||||
count[b*4+2] = (count[b*4+2] || 0) + 1 } } }
|
||||
|
||||
var m = size / Math.max(...count.filter(function(){ return true }))
|
||||
|
||||
@ -163,8 +152,7 @@ module.Filters = {
|
||||
&& (od[j-1] = od[j-2] = 180)
|
||||
break } } })
|
||||
|
||||
return out
|
||||
},
|
||||
return out },
|
||||
waveform: function(pixels, mode, color){
|
||||
mode = mode || 'luminance'
|
||||
color = color || 'normalized'
|
||||
@ -221,8 +209,7 @@ module.Filters = {
|
||||
y = 2
|
||||
j = pos(i, r)
|
||||
c = count[j] = (count[j] || 0) + m
|
||||
od[j] = c * gain
|
||||
}
|
||||
od[j] = c * gain }
|
||||
|
||||
if(mode == 'color' || mode == 'G'){
|
||||
f = 0.7152
|
||||
@ -230,8 +217,7 @@ module.Filters = {
|
||||
y = 1
|
||||
j = pos(i, g) + 1
|
||||
c = count[j] = (count[j] || 0) + m
|
||||
od[j] = c * gain
|
||||
}
|
||||
od[j] = c * gain }
|
||||
|
||||
if(mode == 'color' || mode == 'B'){
|
||||
f = 0.0722
|
||||
@ -239,8 +225,7 @@ module.Filters = {
|
||||
y = -1
|
||||
j = pos(i, b) + 2
|
||||
c = count[j] = (count[j] || 0) + m
|
||||
od[j] = c * gain
|
||||
}
|
||||
od[j] = c * gain }
|
||||
|
||||
// normalize...
|
||||
mode != 'color'
|
||||
@ -248,12 +233,8 @@ module.Filters = {
|
||||
(od[j+x] = od[j+y] = c * gain)
|
||||
: color == 'normalized' ?
|
||||
(od[j+x] = od[j+y] = c * gain/2 * (1-f))
|
||||
: null)
|
||||
}
|
||||
}
|
||||
|
||||
return out
|
||||
},
|
||||
: null) } }
|
||||
return out },
|
||||
}
|
||||
|
||||
|
||||
@ -269,8 +250,7 @@ module.waveform =
|
||||
function(img, canvas, mode, color, rotate, flip){
|
||||
var d = Filters.getNormalizedPixels(img, WAVEFORM_SIZE, rotate, flip)
|
||||
var w = Filters.waveform(d, mode, color)
|
||||
Filters.setPixels(canvas, w)
|
||||
}
|
||||
Filters.setPixels(canvas, w) }
|
||||
|
||||
|
||||
var HISTOGRAM_SIZE =
|
||||
@ -479,8 +459,7 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
'histogram'
|
||||
: 'waveform'
|
||||
var b = button.parentElement.querySelector('#orientation-button') || {}
|
||||
b.disabled = that.graph != 'waveform'
|
||||
}
|
||||
b.disabled = that.graph != 'waveform' }
|
||||
return button }(),
|
||||
// orientation...
|
||||
//
|
||||
@ -527,8 +506,7 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
that.__rotated = o == null ?
|
||||
c
|
||||
: null
|
||||
_update()
|
||||
}
|
||||
_update() }
|
||||
return button }(),
|
||||
// modes...
|
||||
// ...generate mode toggles...
|
||||
@ -570,8 +548,7 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
// current button state...
|
||||
var button = controls.querySelector('button.'+this.mode)
|
||||
button
|
||||
&& button.classList.add('current')
|
||||
}
|
||||
&& button.classList.add('current') }
|
||||
|
||||
// XXX configurable...
|
||||
var type = this.graph
|
||||
@ -592,8 +569,7 @@ object.Constructor('igImageGraph', HTMLElement, {
|
||||
this.flipped)
|
||||
|
||||
} else if(this.src){
|
||||
this.src = this.src
|
||||
}
|
||||
this.src = this.src }
|
||||
|
||||
return this },
|
||||
})
|
||||
|
||||
@ -19,8 +19,7 @@ function(elem){
|
||||
range.selectNodeContents(elem)
|
||||
var sel = window.getSelection()
|
||||
sel.removeAllRanges()
|
||||
sel.addRange(range)
|
||||
}
|
||||
sel.addRange(range) }
|
||||
|
||||
|
||||
// XXX make this global...
|
||||
@ -29,14 +28,12 @@ module.getCaretOffset =
|
||||
function(elem){
|
||||
var s = window.getSelection()
|
||||
if(s.rangeCount == 0){
|
||||
return -1
|
||||
}
|
||||
return -1 }
|
||||
var r = s.getRangeAt(0)
|
||||
var pre = r.cloneRange()
|
||||
pre.selectNodeContents(elem)
|
||||
pre.setEnd(r.endContainer, r.endOffset)
|
||||
return pre.toString().length || 0
|
||||
}
|
||||
return pre.toString().length || 0 }
|
||||
|
||||
|
||||
var selectionCollapsed =
|
||||
@ -44,10 +41,8 @@ module.selectionCollapsed =
|
||||
function(elem){
|
||||
var s = window.getSelection()
|
||||
if(s.rangeCount == 0){
|
||||
return false
|
||||
}
|
||||
return s.getRangeAt(0).cloneRange().collapsed
|
||||
}
|
||||
return false }
|
||||
return s.getRangeAt(0).cloneRange().collapsed }
|
||||
|
||||
|
||||
|
||||
@ -65,12 +60,10 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
px = evt.clientX
|
||||
px = evt.clientY
|
||||
|
||||
s = elem.rscale()
|
||||
})
|
||||
s = elem.rscale() })
|
||||
.on('mousemove touchmove', function(evt){
|
||||
if(!dragging){
|
||||
return
|
||||
}
|
||||
return }
|
||||
|
||||
var x = evt.clientX
|
||||
var dx = px - x
|
||||
@ -85,21 +78,17 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
.velocity({
|
||||
translateX: '-=' + (dx / s),
|
||||
translateY: '-=' + (dy / s),
|
||||
}, 0)
|
||||
})
|
||||
}, 0) })
|
||||
.on('mouseup touchend', function(evt){
|
||||
dragging = false
|
||||
elem.velocity('stop')
|
||||
})
|
||||
}
|
||||
elem.velocity('stop') }) }
|
||||
|
||||
|
||||
jQuery.fn.selectText = function(mode){
|
||||
var range = document.createRange()
|
||||
|
||||
this.each(function(){
|
||||
range.selectNodeContents(this)
|
||||
})
|
||||
range.selectNodeContents(this) })
|
||||
|
||||
var sel = window.getSelection()
|
||||
sel.removeAllRanges()
|
||||
@ -107,11 +96,17 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
mode === null
|
||||
|| sel.addRange(range)
|
||||
|
||||
return this
|
||||
}
|
||||
jQuery.fn.deselectText = function(){ this.selectText(null) }
|
||||
jQuery.fn.caretOffset = function(){ return getCaretOffset(this) }
|
||||
jQuery.fn.selectionCollapsed = function(){ return selectionCollapsed(this) }
|
||||
return this }
|
||||
jQuery.fn.deselectText =
|
||||
function(){
|
||||
this.selectText(null)
|
||||
return this }
|
||||
jQuery.fn.caretOffset =
|
||||
function(){
|
||||
return getCaretOffset(this) }
|
||||
jQuery.fn.selectionCollapsed =
|
||||
function(){
|
||||
return selectionCollapsed(this) }
|
||||
|
||||
|
||||
var keyboard = require('lib/keyboard')
|
||||
@ -207,12 +202,10 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
|
||||
var events = this.data('editable-field-events')
|
||||
for(var e in events){
|
||||
this.off(e, events[e])
|
||||
}
|
||||
this.off(e, events[e]) }
|
||||
this.removeData('editable-field-events')
|
||||
|
||||
return this
|
||||
}
|
||||
return this }
|
||||
|
||||
options = Object.assign({
|
||||
// defaults...
|
||||
@ -240,8 +233,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
var resetOriginal = function(){
|
||||
//that.text(original_text)
|
||||
that[0].innerHTML = ''
|
||||
that[0].appendChild(original_dom.cloneNode(true))
|
||||
}
|
||||
that[0].appendChild(original_dom.cloneNode(true)) }
|
||||
|
||||
this.prop('contenteditable', true)
|
||||
|
||||
@ -264,8 +256,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
.keydown(events.keydown = function(in_evt){
|
||||
var evt = window.event || in_evt
|
||||
if(!that.prop('contenteditable')){
|
||||
return
|
||||
}
|
||||
return }
|
||||
|
||||
evt.stopPropagation()
|
||||
|
||||
@ -326,19 +317,16 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
} else if(options.propagate_unhandled_keys){
|
||||
// NOTE: jQuery can't reuse browser events, this
|
||||
// we need to pass a jq event/proxy here...
|
||||
$(this).parent().trigger(in_evt || evt)
|
||||
}
|
||||
$(this).parent().trigger(in_evt || evt) }
|
||||
})
|
||||
.blur(events.blur = function(){
|
||||
window.getSelection().removeAllRanges()
|
||||
})
|
||||
window.getSelection().removeAllRanges() })
|
||||
.on('focus click', events['focus click'] = function(evt){
|
||||
evt.stopPropagation()
|
||||
options.clear_on_edit
|
||||
&& $(this)
|
||||
.text('')
|
||||
.selectText()
|
||||
})
|
||||
.selectText() })
|
||||
// user triggerable events...
|
||||
.on('edit-abort', events['edit-abort'] = function(evt, text){
|
||||
that.trigger('edit-aborting', text)
|
||||
@ -357,8 +345,7 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
&& that.parents('[tabindex]').first().focus()
|
||||
|
||||
options.reset_on_done
|
||||
&& that.makeEditable(false)
|
||||
})
|
||||
&& that.makeEditable(false) })
|
||||
.on('edit-commit', events['edit-commit'] = function(evt, text){
|
||||
that.trigger('edit-committing', text)
|
||||
|
||||
@ -376,14 +363,11 @@ if(typeof(jQuery) != typeof(undefined)){
|
||||
&& that.parents('[tabindex]').first().focus()
|
||||
|
||||
options.reset_on_done
|
||||
&& that.makeEditable(false)
|
||||
})
|
||||
&& that.makeEditable(false) })
|
||||
|
||||
this.data('editable-field-events', events)
|
||||
}
|
||||
this.data('editable-field-events', events) }
|
||||
|
||||
return this
|
||||
}
|
||||
return this }
|
||||
|
||||
|
||||
|
||||
|
||||
332
Viewer/package-lock.json
generated
332
Viewer/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ImageGrid.Viewer.g4",
|
||||
"version": "4.0.0-a",
|
||||
"version": "4.0.0a",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -84,6 +84,26 @@
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"abstract-leveldown": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz",
|
||||
"integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==",
|
||||
"requires": {
|
||||
"buffer": "^5.5.0",
|
||||
"immediate": "^3.2.3",
|
||||
"level-concat-iterator": "~2.0.0",
|
||||
"level-supports": "~1.0.0",
|
||||
"xtend": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"ajv": {
|
||||
"version": "6.12.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
|
||||
@ -163,6 +183,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"argsarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz",
|
||||
"integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs="
|
||||
},
|
||||
"asar": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz",
|
||||
@ -469,6 +494,11 @@
|
||||
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||
"dev": true
|
||||
},
|
||||
"clone-buffer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
|
||||
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
|
||||
},
|
||||
"clone-response": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
|
||||
@ -632,6 +662,15 @@
|
||||
"resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
|
||||
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="
|
||||
},
|
||||
"deferred-leveldown": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz",
|
||||
"integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~6.2.1",
|
||||
"inherits": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"define-properties": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||
@ -663,6 +702,11 @@
|
||||
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
|
||||
"optional": true
|
||||
},
|
||||
"double-ended-queue": {
|
||||
"version": "2.1.0-0",
|
||||
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
|
||||
"integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
|
||||
},
|
||||
"duplexer3": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
|
||||
@ -746,6 +790,17 @@
|
||||
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
|
||||
"optional": true
|
||||
},
|
||||
"encoding-down": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz",
|
||||
"integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "^6.2.1",
|
||||
"inherits": "^2.0.3",
|
||||
"level-codec": "^9.0.0",
|
||||
"level-errors": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"end-of-stream": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||
@ -754,6 +809,14 @@
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"end-stream": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz",
|
||||
"integrity": "sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU=",
|
||||
"requires": {
|
||||
"write-stream": "~0.4.3"
|
||||
}
|
||||
},
|
||||
"env-paths": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz",
|
||||
@ -763,8 +826,6 @@
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
|
||||
"integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"prr": "~1.0.1"
|
||||
}
|
||||
@ -781,6 +842,11 @@
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"exif-reader": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/exif-reader/-/exif-reader-1.0.3.tgz",
|
||||
@ -854,6 +920,14 @@
|
||||
"pend": "~1.2.0"
|
||||
}
|
||||
},
|
||||
"fetch-cookie": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz",
|
||||
"integrity": "sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g==",
|
||||
"requires": {
|
||||
"tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"forever-agent": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
||||
@ -1168,6 +1242,11 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"immediate": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz",
|
||||
"integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
@ -1251,6 +1330,14 @@
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
||||
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
|
||||
"integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
@ -1295,6 +1382,125 @@
|
||||
"tslib": "^1.10.0"
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level/-/level-6.0.1.tgz",
|
||||
"integrity": "sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==",
|
||||
"requires": {
|
||||
"level-js": "^5.0.0",
|
||||
"level-packager": "^5.1.0",
|
||||
"leveldown": "^5.4.0"
|
||||
}
|
||||
},
|
||||
"level-codec": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz",
|
||||
"integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==",
|
||||
"requires": {
|
||||
"buffer": "^5.6.0"
|
||||
}
|
||||
},
|
||||
"level-concat-iterator": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz",
|
||||
"integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw=="
|
||||
},
|
||||
"level-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==",
|
||||
"requires": {
|
||||
"errno": "~0.1.1"
|
||||
}
|
||||
},
|
||||
"level-iterator-stream": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz",
|
||||
"integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.4.0",
|
||||
"xtend": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"level-js": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/level-js/-/level-js-5.0.2.tgz",
|
||||
"integrity": "sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~6.2.3",
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.3",
|
||||
"ltgt": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"level-packager": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz",
|
||||
"integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==",
|
||||
"requires": {
|
||||
"encoding-down": "^6.3.0",
|
||||
"levelup": "^4.3.2"
|
||||
}
|
||||
},
|
||||
"level-supports": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz",
|
||||
"integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==",
|
||||
"requires": {
|
||||
"xtend": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"level-write-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz",
|
||||
"integrity": "sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw=",
|
||||
"requires": {
|
||||
"end-stream": "~0.1.0"
|
||||
}
|
||||
},
|
||||
"leveldown": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz",
|
||||
"integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==",
|
||||
"requires": {
|
||||
"abstract-leveldown": "~6.2.1",
|
||||
"napi-macros": "~2.0.0",
|
||||
"node-gyp-build": "~4.1.0"
|
||||
}
|
||||
},
|
||||
"levelup": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz",
|
||||
"integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==",
|
||||
"requires": {
|
||||
"deferred-leveldown": "~5.3.0",
|
||||
"level-errors": "~2.0.0",
|
||||
"level-iterator-stream": "~4.0.0",
|
||||
"level-supports": "~1.0.0",
|
||||
"xtend": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
@ -1331,6 +1537,11 @@
|
||||
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
|
||||
"integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="
|
||||
},
|
||||
"ltgt": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz",
|
||||
"integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU="
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
|
||||
@ -1465,11 +1676,6 @@
|
||||
"resolved": "https://registry.npmjs.org/mm-brace-expand/-/mm-brace-expand-0.0.1.tgz",
|
||||
"integrity": "sha1-jrbgqZ+HrTT/8YJzMRBJadjFBP4="
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@ -1480,6 +1686,11 @@
|
||||
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
|
||||
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
||||
},
|
||||
"napi-macros": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
|
||||
"integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg=="
|
||||
},
|
||||
"native-request": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.0.7.tgz",
|
||||
@ -1500,6 +1711,11 @@
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.0.tgz",
|
||||
"integrity": "sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"node-gyp": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz",
|
||||
@ -1527,6 +1743,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node-gyp-build": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz",
|
||||
"integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ=="
|
||||
},
|
||||
"noop-logger": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz",
|
||||
@ -1738,6 +1959,51 @@
|
||||
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
|
||||
"optional": true
|
||||
},
|
||||
"pouchdb": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.2.2.tgz",
|
||||
"integrity": "sha512-5gf5nw5XH/2H/DJj8b0YkvG9fhA/4Jt6kL0Y8QjtztVjb1y4J19Rg4rG+fUbXu96gsUrlyIvZ3XfM0b4mogGmw==",
|
||||
"requires": {
|
||||
"abort-controller": "3.0.0",
|
||||
"argsarray": "0.0.1",
|
||||
"buffer-from": "1.1.1",
|
||||
"clone-buffer": "1.0.0",
|
||||
"double-ended-queue": "2.1.0-0",
|
||||
"fetch-cookie": "0.10.1",
|
||||
"immediate": "3.3.0",
|
||||
"inherits": "2.0.4",
|
||||
"level": "6.0.1",
|
||||
"level-codec": "9.0.2",
|
||||
"level-write-stream": "1.0.0",
|
||||
"leveldown": "5.6.0",
|
||||
"levelup": "4.4.0",
|
||||
"ltgt": "2.2.1",
|
||||
"node-fetch": "2.6.0",
|
||||
"readable-stream": "1.1.14",
|
||||
"spark-md5": "3.0.1",
|
||||
"through2": "3.0.2",
|
||||
"uuid": "8.1.0",
|
||||
"vuvuzela": "1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.1",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "~0.10.x"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz",
|
||||
"integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"prebuild-install": {
|
||||
"version": "5.3.5",
|
||||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.5.tgz",
|
||||
@ -1796,15 +2062,12 @@
|
||||
"prr": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
|
||||
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
|
||||
},
|
||||
"psl": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
@ -1818,8 +2081,7 @@
|
||||
"punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.5.2",
|
||||
@ -2142,6 +2404,11 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"spark-md5": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz",
|
||||
"integrity": "sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig=="
|
||||
},
|
||||
"spawn-rx": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-3.0.0.tgz",
|
||||
@ -2296,6 +2563,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"through2": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz",
|
||||
"integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "2 || 3"
|
||||
}
|
||||
},
|
||||
"to-readable-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
|
||||
@ -2305,7 +2581,6 @@
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
|
||||
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"psl": "^1.1.28",
|
||||
"punycode": "^2.1.1"
|
||||
@ -2410,6 +2685,11 @@
|
||||
"extsprintf": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"vuvuzela": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz",
|
||||
"integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws="
|
||||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
@ -2543,6 +2823,26 @@
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"write-stream": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz",
|
||||
"integrity": "sha1-g8yMA0fQr2BXqThitOOuAd5cgcE=",
|
||||
"requires": {
|
||||
"readable-stream": "~0.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz",
|
||||
"integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40="
|
||||
}
|
||||
}
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
|
||||
},
|
||||
"y18n": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
|
||||
|
||||
@ -35,18 +35,19 @@
|
||||
"ig-features": "^3.4.2",
|
||||
"ig-object": "^5.4.12",
|
||||
"ig-types": "^5.0.40",
|
||||
"moment": "^2.29.1",
|
||||
"json5": "^2.1.3",
|
||||
"object-run": "^1.0.1",
|
||||
"pouchdb": "^7.2.2",
|
||||
"requirejs": "^2.3.6",
|
||||
"requirejs-plugins": "^1.0.2",
|
||||
"sharp": "^0.25.4",
|
||||
"strip-json-comments": "^2.0.1",
|
||||
"v8-compile-cache": "^2.2.0",
|
||||
"wildglob": "^0.1.1"
|
||||
},
|
||||
"dependencies-disabled": {
|
||||
"openseadragon": "^2.4.1",
|
||||
"flickrapi": "^0.3.28"
|
||||
"flickrapi": "^0.3.28",
|
||||
"moment": "^2.29.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"pica": "^3.0.6"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user