diff --git a/.ncurc.yml b/.ncurc.yml
index d675bc11b2..0ae5c9de1d 100644
--- a/.ncurc.yml
+++ b/.ncurc.yml
@@ -4,3 +4,7 @@ reject:
- delay
# Now ESM and depends on top-level await.
- tempfile
+ # Version 7 had breaking changes not worth the effort.
+ - conventional-changelog
+ # Version 2.0.3 made a breaking change with whitespaces: https://github.com/slab/quill/issues/4509
+ - quill
\ No newline at end of file
diff --git a/bower.json b/bower.json
index b2f00f369a..94e02180f4 100644
--- a/bower.json
+++ b/bower.json
@@ -12,61 +12,40 @@
},
"license": "MIT",
"dependencies": {
- "ace": "ajaxorg/ace-builds#v1.4.6",
- "async": "2.1.4",
- "babel-standalone": "6.19.0",
- "bowser": "1.0.0",
+ "ace": "ajaxorg/ace-builds#v1.43.2",
"chroma-js": "1.1.1",
"ckeditor": "4.7.3",
"colors": "3.0.0",
"d3": "3.5.17",
"d3-plugins": "cheminfo/d3-plugins#ea652308c616f3accde0a418f7ccc6254a932985",
"eventEmitter": "^5.2.3",
- "fancytree": "2.20.0",
"farbtastic": "2.0.0-alpha.1",
- "fetch": "2.0.1",
"file-saver.js": "cheminfo-js/file-saver.js#6a90cb37e56fbb110f03c70c90ebceb9312650db",
"flag-icon-css": "2.8.0",
"jit": "2.0.2",
"jqgrid_edit": "git://github.com/NPellet/jqGrid#4.5.6",
- "jquery": "2.2.4",
- "jquery-cookie": "1.4.1",
- "jquery-mousewheel": "3.1.13",
+ "jquery-mousewheel": "3.2.2",
"jquery-qrcode": "cheminfo/jquery-qrcode#efece6cf4e32d1151436a146a2ac0e2197e0837b",
"jquery-tmpl": "BorisMoore/jquery-tmpl#vBeta1.0.0",
- "jquery-ui": "1.12.1",
"jquery.panzoom": "cheminfo/jquery.panzoom#626f65a0180211aafc9b5d57696ac56350be6bf1",
"jquery.threedubmedia": "git://github.com/threedubmedia/jquery.threedubmedia",
- "jsbarcode": "3.5.7",
"jsgraph": "2.2.36",
"jsme": "bcdc8f0d475eb72c2d75d20afae0b7ca4ebde273",
"jsmol": "v1.2.0",
- "json-chart": "1.1.0",
- "jsoneditor": "5.5.11",
"jszip": "3.1.3",
- "leaflet": "1.0.2",
- "leaflet-omnivore": "0.3.2",
"lodash": "4.17.5",
"loglevel": "1.4.1",
- "marked": "0.3.6",
"ml": "0.2.1",
- "modernizr": "2.8.3",
- "moment": "2.17.1",
- "moment-duration-format": "~1.3.0",
"nmr-simulation": "0.2.1",
"notifyjs": "0.4.2",
- "numeral": "2.0.6",
- "onde": "cheminfo/onde#126c1571a3b212abbefb5351ad9b192cef35e7a1",
- "papa-parse": "4.1.2",
- "pouchdb": "3.3.1",
- "requirejs": "2.3.6",
+ "onde": "cheminfo/onde#9ed3407d02ca323b8dce8d2456eb54b49a804344",
"select2": "4.0.3",
"setImmediate": "YuzuJS/setImmediate#1.0.5",
"slickgrid": "cheminfo/SlickGrid#6423d3d4c9e09180ad83a9166d149e3e4124320d",
- "spectrum": "1.8.0",
- "sprintf": "1.0.3",
+ "spectrum": "101b05c1d977fbc529ae4c3b6865b1f7ab70c6e0",
+ "sprintf": "1.1.3",
"threejs": "r71",
- "ui-contextmenu": "1.14.0",
+ "ui-contextmenu": "1.18.1",
"uri.js": "1.18.4",
"web-animations-js": "2.2.2",
"x2js": "1.2.0",
@@ -75,7 +54,6 @@
},
"resolutions": {
"jsgraph": "2.2.36",
- "jquery": "2.2.4",
"eventEmitter": "^5.1.0"
},
"private": true
diff --git a/gruntfile.js b/gruntfile.js
index 5274dac127..3695355a70 100644
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -191,22 +191,11 @@ module.exports = function (grunt) {
cwd: './src/components/',
src: [
'./d3/d3*',
- [
- './fancytree/dist/jquery.fancytree*.js',
- './fancytree/dist/skin-lion/*',
- ],
[
'./jqgrid_edit/js/*.js',
'./jqgrid_edit/js/i18n/grid.locale-en.js',
'./jqgrid_edit/css/*.css',
],
- './jquery/dist/*',
- [
- './jquery-ui/ui/*.js',
- './jquery-ui/ui/effects/*.js',
- './jquery-ui/ui/widgets/*.js',
- './jquery-ui/themes/base/**',
- ],
'./threejs/build/three.min.js',
'./ace/src/**',
[
@@ -222,63 +211,39 @@ module.exports = function (grunt) {
'./farbtastic/src/farbtastic.js',
'./jquery.threedubmedia/event.drag/jquery.event.drag.js',
'./sprintf/dist/**',
- './requirejs/require.js',
'./x2js/xml2json*',
- [
- './leaflet/dist/**',
- './leaflet-omnivore/leaflet-omnivore.min.js',
- ],
- './jsoneditor/dist/**',
'./jit/Jit/**/*',
'./ui-contextmenu/jquery.ui-contextmenu*',
- './papa-parse/papaparse*',
'./colors/css/colors.min.css',
- './pouchdb/dist/**',
'./uri.js/src/*.js',
'./onde/src/*',
['./spectrum/spectrum.js', './spectrum/spectrum.css'],
- './superagent/superagent.js',
- './modernizr/modernizr.js',
'./lodash/dist/**',
- './bowser/bowser*',
- './jquery-cookie/jquery.cookie.js',
'./chemcalc/lib.js',
'./jsgraph/dist/**',
'./jsme/**',
'./jsmol/**',
'./jcampconverter/*',
- './jsbarcode/dist/*.js',
'./slickgrid/**',
'./ml/dist/*',
'./jquery-tmpl/**',
'./setImmediate/setImmediate.js',
'./chroma-js/chroma*',
- './async/dist/**',
'./loglevel/dist/**',
- './marked/lib/marked.js',
'./highlight.js/build/highlight.pack.js',
'./jquery.panzoom/dist/*.js',
'./jquery-mousewheel/*.js',
'./select2/dist/**',
'./jszip/dist/**',
'./file-saver.js/*.js',
- './json-chart/dist/*',
'./d3-plugins/**',
- './mime-types/**',
'./notifyjs/dist/**',
'./web-animations-js/*.js',
'./web-animations-js/*.js.map',
- './moment/moment*',
- './moment-duration-format/lib/moment-duration-format.js',
- './numeral/numeral*',
'./flag-icon-css/css/flag-icon.min.css',
'./flag-icon-css/flags/**',
'./jquery-qrcode/jquery.qrcode.min.js',
- './mathjs/dist/**',
'./nmr-simulation/**',
- './katex/dist/**',
- './babel-standalone/**',
- './fetch/fetch.js',
'./js-yaml/dist/**',
'./canvg/dist/**',
'./eventEmitter/*.js',
@@ -289,18 +254,36 @@ module.exports = function (grunt) {
expand: true,
cwd: './node_modules',
src: [
- './katex/dist/**',
'./angularplasmid/dist/**',
- './mathjs/dist/math.min.js',
- './mathjs/dist/math.min.map',
+ './jquery/dist/*',
+ [
+ './jquery.fancytree/dist/modules/jquery.fancytree*.js',
+ './jquery.fancytree/dist/skin-lion/*',
+ ],
+ ['./jquery-ui/dist/*.js', './jquery-ui/themes/base/**'],
+ './jsbarcode/dist/*.js',
+ './jsoneditor/dist/**',
+ './jquery-migrate/dist/*',
+ './katex/dist/**',
+ [
+ './leaflet/dist/**',
+ './@mapbox/leaflet-omnivore/leaflet-omnivore.min.js',
+ ],
+ './marked/lib/marked.js',
+ './mathjs/lib/browser/**',
+ './moment/moment.js',
+ './moment-duration-format/lib/moment-duration-format.js',
+ './numeral/min/numeral.min.js',
'./openchemlib/dist/**',
+ './papaparse/papaparse*',
+ './pouchdb/dist/**',
[
'./quill/dist/*.js*',
'./quill/dist/*.css',
'./quill-resize-module/dist/resize.*',
'./quill-table-better/dist/quill-table-better.*',
],
- './d3-hierarchy/dist/d3-hierarchy.min.js',
+ './requirejs/require.js',
'./@fortawesome/fontawesome-free/css/all.min.css',
'./@fortawesome/fontawesome-free/webfonts/*',
],
diff --git a/package-lock.json b/package-lock.json
index 7a2a2ca09f..ad8cc36560 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,47 +1,63 @@
{
"name": "visualizer",
- "version": "2.173.0",
+ "version": "2.173.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "visualizer",
- "version": "2.173.0",
+ "version": "2.173.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
- "@babel/preset-env": "^7.28.0",
- "@fortawesome/fontawesome-free": "^6.7.2",
+ "@babel/preset-env": "^7.28.3",
+ "@fortawesome/fontawesome-free": "^7.0.1",
+ "@mapbox/leaflet-omnivore": "^0.3.4",
"angularplasmid": "^1.0.5",
"babel-preset-minify": "^0.5.2",
"country-data": "0.0.31",
- "d3-hierarchy": "^1.1.9",
"delay": "^4.4.1",
"eslint-plugin-import": "^2.32.0",
- "katex": "^0.10.0",
- "mathjs": "^5.10.3",
- "mf-parser": "^1.5.0",
- "mime-types": "^2.1.35",
+ "jquery": "^3.7.1",
+ "jquery-migrate": "^3.5.2",
+ "jquery-ui": "^1.14.1",
+ "jquery.fancytree": "^2.38.5",
+ "jsbarcode": "^3.12.1",
+ "json-chart": "^1.1.0",
+ "jsoneditor": "^10.4.1",
+ "katex": "^0.16.22",
+ "leaflet": "^1.9.4",
+ "marked": "^0.3.19",
+ "mathjs": "^14.7.0",
+ "mf-parser": "^3.6.0",
+ "mime-types": "^3.0.1",
+ "moment": "^2.30.1",
+ "moment-duration-format": "^2.3.2",
"node-jsgraph": "2.4.15",
- "openchemlib": "^9.6.0",
- "quill": "^2.0.2",
- "quill-resize-module": "^2.0.4",
- "quill-table-better": "^1.2.1",
+ "numeral": "^2.0.6",
+ "openchemlib": "^9.7.0",
+ "papaparse": "^5.5.3",
+ "pouchdb": "^3.6.0",
+ "quill": "2.0.2",
+ "quill-resize-module": "^2.0.6",
+ "quill-table-better": "^1.2.3",
+ "requirejs": "^2.3.7",
"rxn-renderer": "^1.0.2",
+ "semver": "^7.7.2",
"smart-array-filter": "^4.1.1",
- "superagent": "^3.8.3",
+ "superagent": "^10.2.3",
"twig": "^1.17.1"
},
"devDependencies": {
- "@babel/types": "^7.28.1",
+ "@babel/types": "^7.28.4",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"add-stream": "^1.0.0",
"bower": "^1.8.14",
"conventional-changelog": "^6.0.0",
- "eslint": "^9.31.0",
- "eslint-config-cheminfo": "^14.1.1",
+ "eslint": "^9.35.0",
+ "eslint-config-cheminfo": "^15.0.2",
"extend": "^3.0.2",
"globals": "^16.3.0",
"grunt": "^1.6.1",
@@ -54,27 +70,12 @@
"lodash": "^4.17.21",
"mkpath": "^1.0.0",
"prettier": "^3.6.2",
- "rollup": "^4.45.1",
+ "rollup": "^4.50.1",
"rollup-plugin-polyfill-node": "^0.13.0",
- "semver": "^5.7.2",
"tempfile": "^3.0.0",
"walk": "^2.3.15"
}
},
- "node_modules/@ampproject/remapping": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
- "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
- "license": "Apache-2.0",
- "peer": true,
- "dependencies": {
- "@jridgewell/gen-mapping": "^0.3.5",
- "@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/@babel/code-frame": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
@@ -90,31 +91,31 @@
}
},
"node_modules/@babel/compat-data": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz",
- "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz",
+ "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
- "version": "7.26.10",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz",
- "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz",
+ "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"license": "MIT",
"peer": true,
"dependencies": {
- "@ampproject/remapping": "^2.2.0",
- "@babel/code-frame": "^7.26.2",
- "@babel/generator": "^7.26.10",
- "@babel/helper-compilation-targets": "^7.26.5",
- "@babel/helper-module-transforms": "^7.26.0",
- "@babel/helpers": "^7.26.10",
- "@babel/parser": "^7.26.10",
- "@babel/template": "^7.26.9",
- "@babel/traverse": "^7.26.10",
- "@babel/types": "^7.26.10",
+ "@babel/code-frame": "^7.27.1",
+ "@babel/generator": "^7.28.3",
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-module-transforms": "^7.28.3",
+ "@babel/helpers": "^7.28.4",
+ "@babel/parser": "^7.28.4",
+ "@babel/template": "^7.27.2",
+ "@babel/traverse": "^7.28.4",
+ "@babel/types": "^7.28.4",
+ "@jridgewell/remapping": "^2.3.5",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
@@ -140,13 +141,13 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz",
- "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz",
+ "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==",
"license": "MIT",
"dependencies": {
- "@babel/parser": "^7.28.0",
- "@babel/types": "^7.28.0",
+ "@babel/parser": "^7.28.3",
+ "@babel/types": "^7.28.2",
"@jridgewell/gen-mapping": "^0.3.12",
"@jridgewell/trace-mapping": "^0.3.28",
"jsesc": "^3.0.2"
@@ -193,17 +194,17 @@
}
},
"node_modules/@babel/helper-create-class-features-plugin": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz",
- "integrity": "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.3.tgz",
+ "integrity": "sha512-V9f6ZFIYSLNEbuGA/92uOvYsGCJNsuA8ESZ4ldc09bWk/j8H8TKiPw8Mk1eG6olpnO0ALHJmYfZvF4MEE4gajg==",
"license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-annotate-as-pure": "^7.27.3",
"@babel/helper-member-expression-to-functions": "^7.27.1",
"@babel/helper-optimise-call-expression": "^7.27.1",
"@babel/helper-replace-supers": "^7.27.1",
"@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
- "@babel/traverse": "^7.27.1",
+ "@babel/traverse": "^7.28.3",
"semver": "^6.3.1"
},
"engines": {
@@ -300,14 +301,14 @@
}
},
"node_modules/@babel/helper-module-transforms": {
- "version": "7.27.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz",
- "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz",
+ "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==",
"license": "MIT",
"dependencies": {
"@babel/helper-module-imports": "^7.27.1",
"@babel/helper-validator-identifier": "^7.27.1",
- "@babel/traverse": "^7.27.3"
+ "@babel/traverse": "^7.28.3"
},
"engines": {
"node": ">=6.9.0"
@@ -412,40 +413,40 @@
}
},
"node_modules/@babel/helper-wrap-function": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz",
- "integrity": "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz",
+ "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==",
"license": "MIT",
"dependencies": {
- "@babel/template": "^7.27.1",
- "@babel/traverse": "^7.27.1",
- "@babel/types": "^7.27.1"
+ "@babel/template": "^7.27.2",
+ "@babel/traverse": "^7.28.3",
+ "@babel/types": "^7.28.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helpers": {
- "version": "7.27.0",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz",
- "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz",
+ "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==",
"license": "MIT",
"peer": true,
"dependencies": {
- "@babel/template": "^7.27.0",
- "@babel/types": "^7.27.0"
+ "@babel/template": "^7.27.2",
+ "@babel/types": "^7.28.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/parser": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz",
- "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz",
+ "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==",
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.28.0"
+ "@babel/types": "^7.28.4"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -518,13 +519,13 @@
}
},
"node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.27.1.tgz",
- "integrity": "sha512-6BpaYGDavZqkI6yT+KSPdpZFfpnd68UKXbcjI9pJ13pvHhPrCKWOOLp+ysvMeA+DxnhuPpgIaRpxRxo5A9t5jw==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.3.tgz",
+ "integrity": "sha512-b6YTX108evsvE4YgWyQ921ZAFFQm3Bn+CA3+ZXlNVnPhx+UfsVURoPjfGAPCjBgrqo30yX/C2nZGX96DxvR9Iw==",
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1",
- "@babel/traverse": "^7.27.1"
+ "@babel/traverse": "^7.28.3"
},
"engines": {
"node": ">=6.9.0"
@@ -656,9 +657,9 @@
}
},
"node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.0.tgz",
- "integrity": "sha512-gKKnwjpdx5sER/wl0WN0efUBFzF/56YZO0RJrSYP4CljXnP31ByY7fol89AzomdlLNzI36AvOTmYHsnZTCkq8Q==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.4.tgz",
+ "integrity": "sha512-1yxmvN0MJHOhPVmAsmoW5liWwoILobu/d/ShymZmj867bAdxGbehIrew1DuLpw2Ukv+qDSSPQdYW1dLNE7t11A==",
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1"
@@ -687,12 +688,12 @@
}
},
"node_modules/@babel/plugin-transform-class-static-block": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz",
- "integrity": "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz",
+ "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==",
"license": "MIT",
"dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-create-class-features-plugin": "^7.28.3",
"@babel/helper-plugin-utils": "^7.27.1"
},
"engines": {
@@ -703,9 +704,9 @@
}
},
"node_modules/@babel/plugin-transform-classes": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.0.tgz",
- "integrity": "sha512-IjM1IoJNw72AZFlj33Cu8X0q2XK/6AaVC3jQu+cgQ5lThWD5ajnuUAml80dqRmOhmPkTH8uAwnpMu9Rvj0LTRA==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz",
+ "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==",
"license": "MIT",
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.27.3",
@@ -713,7 +714,7 @@
"@babel/helper-globals": "^7.28.0",
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/helper-replace-supers": "^7.27.1",
- "@babel/traverse": "^7.28.0"
+ "@babel/traverse": "^7.28.4"
},
"engines": {
"node": ">=6.9.0"
@@ -1083,16 +1084,16 @@
}
},
"node_modules/@babel/plugin-transform-object-rest-spread": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.0.tgz",
- "integrity": "sha512-9VNGikXxzu5eCiQjdE4IZn8sb9q7Xsk5EXLDBKUYg1e/Tve8/05+KJEtcxGxAgCY5t/BpKQM+JEL/yT4tvgiUA==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz",
+ "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==",
"license": "MIT",
"dependencies": {
"@babel/helper-compilation-targets": "^7.27.2",
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/plugin-transform-destructuring": "^7.28.0",
"@babel/plugin-transform-parameters": "^7.27.7",
- "@babel/traverse": "^7.28.0"
+ "@babel/traverse": "^7.28.4"
},
"engines": {
"node": ">=6.9.0"
@@ -1212,9 +1213,9 @@
}
},
"node_modules/@babel/plugin-transform-regenerator": {
- "version": "7.28.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.1.tgz",
- "integrity": "sha512-P0QiV/taaa3kXpLY+sXla5zec4E+4t4Aqc9ggHlfZ7a2cp8/x/Gv08jfwEtn9gnnYIMvHx6aoOZ8XJL8eU71Dg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz",
+ "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==",
"license": "MIT",
"dependencies": {
"@babel/helper-plugin-utils": "^7.27.1"
@@ -1397,9 +1398,9 @@
}
},
"node_modules/@babel/preset-env": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.0.tgz",
- "integrity": "sha512-VmaxeGOwuDqzLl5JUkIRM1X2Qu2uKGxHEQWh+cvvbl7JuJRgKGJSfsEF/bUaxFhJl/XAyxBe7q7qSuTbKFuCyg==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.3.tgz",
+ "integrity": "sha512-ROiDcM+GbYVPYBOeCR6uBXKkQpBExLl8k9HO1ygXEyds39j+vCCsjmj7S8GOniZQlEs81QlkdJZe76IpLSiqpg==",
"license": "MIT",
"dependencies": {
"@babel/compat-data": "^7.28.0",
@@ -1410,7 +1411,7 @@
"@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1",
- "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.27.1",
+ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3",
"@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
"@babel/plugin-syntax-import-assertions": "^7.27.1",
"@babel/plugin-syntax-import-attributes": "^7.27.1",
@@ -1421,8 +1422,8 @@
"@babel/plugin-transform-block-scoped-functions": "^7.27.1",
"@babel/plugin-transform-block-scoping": "^7.28.0",
"@babel/plugin-transform-class-properties": "^7.27.1",
- "@babel/plugin-transform-class-static-block": "^7.27.1",
- "@babel/plugin-transform-classes": "^7.28.0",
+ "@babel/plugin-transform-class-static-block": "^7.28.3",
+ "@babel/plugin-transform-classes": "^7.28.3",
"@babel/plugin-transform-computed-properties": "^7.27.1",
"@babel/plugin-transform-destructuring": "^7.28.0",
"@babel/plugin-transform-dotall-regex": "^7.27.1",
@@ -1454,7 +1455,7 @@
"@babel/plugin-transform-private-methods": "^7.27.1",
"@babel/plugin-transform-private-property-in-object": "^7.27.1",
"@babel/plugin-transform-property-literals": "^7.27.1",
- "@babel/plugin-transform-regenerator": "^7.28.0",
+ "@babel/plugin-transform-regenerator": "^7.28.3",
"@babel/plugin-transform-regexp-modifiers": "^7.27.1",
"@babel/plugin-transform-reserved-words": "^7.27.1",
"@babel/plugin-transform-shorthand-properties": "^7.27.1",
@@ -1504,13 +1505,10 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.27.0",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz",
- "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"license": "MIT",
- "dependencies": {
- "regenerator-runtime": "^0.14.0"
- },
"engines": {
"node": ">=6.9.0"
}
@@ -1530,17 +1528,17 @@
}
},
"node_modules/@babel/traverse": {
- "version": "7.28.0",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz",
- "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz",
+ "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==",
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.27.1",
- "@babel/generator": "^7.28.0",
+ "@babel/generator": "^7.28.3",
"@babel/helper-globals": "^7.28.0",
- "@babel/parser": "^7.28.0",
+ "@babel/parser": "^7.28.4",
"@babel/template": "^7.27.2",
- "@babel/types": "^7.28.0",
+ "@babel/types": "^7.28.4",
"debug": "^4.3.1"
},
"engines": {
@@ -1548,9 +1546,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.28.1",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz",
- "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz",
+ "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
@@ -1586,38 +1584,27 @@
}
}
},
- "node_modules/@conventional-changelog/git-client/node_modules/semver": {
- "version": "7.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/@es-joy/jsdoccomment": {
- "version": "0.49.0",
- "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz",
- "integrity": "sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==",
+ "version": "0.56.0",
+ "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.56.0.tgz",
+ "integrity": "sha512-c6EW+aA1w2rjqOMjbL93nZlwxp6c1Ln06vTYs5FjRRhmJXK8V/OrSXdT+pUr4aRYgjCgu8/OkiZr0tzeVrRSbw==",
"dev": true,
"license": "MIT",
"dependencies": {
+ "@types/estree": "^1.0.8",
+ "@typescript-eslint/types": "^8.42.0",
"comment-parser": "1.4.1",
"esquery": "^1.6.0",
- "jsdoc-type-pratt-parser": "~4.1.0"
+ "jsdoc-type-pratt-parser": "~5.1.0"
},
"engines": {
- "node": ">=16"
+ "node": ">=20.11.0"
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz",
- "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==",
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
+ "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==",
"license": "MIT",
"dependencies": {
"eslint-visitor-keys": "^3.4.3"
@@ -1668,18 +1655,18 @@
}
},
"node_modules/@eslint/config-helpers": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz",
- "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==",
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz",
+ "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==",
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/core": {
- "version": "0.15.1",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz",
- "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==",
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz",
+ "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==",
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
@@ -1724,9 +1711,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "9.31.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz",
- "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==",
+ "version": "9.35.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz",
+ "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==",
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1745,12 +1732,12 @@
}
},
"node_modules/@eslint/plugin-kit": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz",
- "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==",
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz",
+ "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==",
"license": "Apache-2.0",
"dependencies": {
- "@eslint/core": "^0.15.1",
+ "@eslint/core": "^0.15.2",
"levn": "^0.4.1"
},
"engines": {
@@ -1758,9 +1745,9 @@
}
},
"node_modules/@fortawesome/fontawesome-free": {
- "version": "6.7.2",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz",
- "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.0.1.tgz",
+ "integrity": "sha512-RLmb9U6H2rJDnGxEqXxzy7ANPrQz7WK2/eTjdZqyU9uRU5W+FkAec9uU5gTYzFBH7aoXIw2WTJSCJR4KPlReQw==",
"license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)",
"engines": {
"node": ">=6"
@@ -1776,31 +1763,18 @@
}
},
"node_modules/@humanfs/node": {
- "version": "0.16.6",
- "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz",
- "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==",
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
"license": "Apache-2.0",
"dependencies": {
"@humanfs/core": "^0.19.1",
- "@humanwhocodes/retry": "^0.3.0"
+ "@humanwhocodes/retry": "^0.4.0"
},
"engines": {
"node": ">=18.18.0"
}
},
- "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
- "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=18.18"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
"node_modules/@humanwhocodes/module-importer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
@@ -1815,9 +1789,9 @@
}
},
"node_modules/@humanwhocodes/retry": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz",
- "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==",
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"license": "Apache-2.0",
"engines": {
"node": ">=18.18"
@@ -1854,15 +1828,26 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.12",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz",
- "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==",
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0",
"@jridgewell/trace-mapping": "^0.3.24"
}
},
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
@@ -1873,21 +1858,95 @@
}
},
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
- "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.29",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz",
- "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==",
+ "version": "0.3.30",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz",
+ "integrity": "sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==",
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@mapbox/leaflet-omnivore": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/@mapbox/leaflet-omnivore/-/leaflet-omnivore-0.3.4.tgz",
+ "integrity": "sha512-KHdJXk7EBBygCuErNkI981y51Fd80odYlBmWzsHPtmdzqmvV0D+allIi8uMiTzfW1K3aasOnOw4p6OV0rOs4TQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "brfs": "1.4.3",
+ "corslite": "0.0.7",
+ "csv2geojson": "~5.0.0",
+ "polyline": "0.2.0",
+ "togeojson": "0.13.0",
+ "topojson": "1.6.26",
+ "wellknown": "0.4.2"
+ }
+ },
+ "node_modules/@noble/hashes": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@paralleldrive/cuid2": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz",
+ "integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.1.5"
+ }
+ },
"node_modules/@rollup/plugin-commonjs": {
"version": "28.0.6",
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.6.tgz",
@@ -1915,34 +1974,6 @@
}
}
},
- "node_modules/@rollup/plugin-commonjs/node_modules/fdir": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz",
- "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/@rollup/plugin-inject": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz",
@@ -2013,9 +2044,9 @@
}
},
"node_modules/@rollup/pluginutils": {
- "version": "5.1.4",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
- "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz",
+ "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2035,23 +2066,10 @@
}
}
},
- "node_modules/@rollup/pluginutils/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.45.1.tgz",
- "integrity": "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.1.tgz",
+ "integrity": "sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==",
"cpu": [
"arm"
],
@@ -2063,9 +2081,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.45.1.tgz",
- "integrity": "sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.1.tgz",
+ "integrity": "sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==",
"cpu": [
"arm64"
],
@@ -2077,9 +2095,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.45.1.tgz",
- "integrity": "sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.1.tgz",
+ "integrity": "sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==",
"cpu": [
"arm64"
],
@@ -2091,9 +2109,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.45.1.tgz",
- "integrity": "sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.1.tgz",
+ "integrity": "sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==",
"cpu": [
"x64"
],
@@ -2105,9 +2123,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.45.1.tgz",
- "integrity": "sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.1.tgz",
+ "integrity": "sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==",
"cpu": [
"arm64"
],
@@ -2119,9 +2137,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.45.1.tgz",
- "integrity": "sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.1.tgz",
+ "integrity": "sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==",
"cpu": [
"x64"
],
@@ -2133,9 +2151,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.45.1.tgz",
- "integrity": "sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.1.tgz",
+ "integrity": "sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==",
"cpu": [
"arm"
],
@@ -2147,9 +2165,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.45.1.tgz",
- "integrity": "sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.1.tgz",
+ "integrity": "sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==",
"cpu": [
"arm"
],
@@ -2161,9 +2179,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.45.1.tgz",
- "integrity": "sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.1.tgz",
+ "integrity": "sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==",
"cpu": [
"arm64"
],
@@ -2175,9 +2193,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.45.1.tgz",
- "integrity": "sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.1.tgz",
+ "integrity": "sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==",
"cpu": [
"arm64"
],
@@ -2189,9 +2207,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.45.1.tgz",
- "integrity": "sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.1.tgz",
+ "integrity": "sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==",
"cpu": [
"loong64"
],
@@ -2202,10 +2220,10 @@
"linux"
]
},
- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.45.1.tgz",
- "integrity": "sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==",
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.1.tgz",
+ "integrity": "sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==",
"cpu": [
"ppc64"
],
@@ -2217,9 +2235,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.45.1.tgz",
- "integrity": "sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.1.tgz",
+ "integrity": "sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==",
"cpu": [
"riscv64"
],
@@ -2231,9 +2249,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.45.1.tgz",
- "integrity": "sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.1.tgz",
+ "integrity": "sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==",
"cpu": [
"riscv64"
],
@@ -2245,9 +2263,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.45.1.tgz",
- "integrity": "sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.1.tgz",
+ "integrity": "sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==",
"cpu": [
"s390x"
],
@@ -2259,9 +2277,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.45.1.tgz",
- "integrity": "sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.1.tgz",
+ "integrity": "sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==",
"cpu": [
"x64"
],
@@ -2273,9 +2291,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.45.1.tgz",
- "integrity": "sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.1.tgz",
+ "integrity": "sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==",
"cpu": [
"x64"
],
@@ -2286,10 +2304,24 @@
"linux"
]
},
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.1.tgz",
+ "integrity": "sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.45.1.tgz",
- "integrity": "sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.1.tgz",
+ "integrity": "sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==",
"cpu": [
"arm64"
],
@@ -2301,9 +2333,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.45.1.tgz",
- "integrity": "sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.1.tgz",
+ "integrity": "sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==",
"cpu": [
"ia32"
],
@@ -2315,9 +2347,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.45.1.tgz",
- "integrity": "sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.1.tgz",
+ "integrity": "sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==",
"cpu": [
"x64"
],
@@ -2334,6 +2366,12 @@
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
"license": "MIT"
},
+ "node_modules/@sphinxxxx/color-conversion": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz",
+ "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==",
+ "license": "ISC"
+ },
"node_modules/@types/estree": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
@@ -2382,114 +2420,389 @@
"license": "MIT"
},
"node_modules/@types/semver": {
- "version": "7.7.0",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz",
- "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==",
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
"dev": true,
"license": "MIT"
},
- "node_modules/abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.42.0.tgz",
+ "integrity": "sha512-vfVpLHAhbPjilrabtOSNcUDmBboQNrJUiNAGoImkZKnMjs2TIcWG33s4Ds0wY3/50aZmTMqJa6PiwkwezaAklg==",
"dev": true,
- "license": "ISC"
- },
- "node_modules/acorn": {
- "version": "8.15.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
- "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
- "bin": {
- "acorn": "bin/acorn"
+ "dependencies": {
+ "@typescript-eslint/tsconfig-utils": "^8.42.0",
+ "@typescript-eslint/types": "^8.42.0",
+ "debug": "^4.3.4"
},
"engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "license": "MIT",
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
"peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/add-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz",
- "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==",
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.42.0.tgz",
+ "integrity": "sha512-51+x9o78NBAVgQzOPd17DkNTnIzJ8T/O2dmMBLoK9qbY0Gm52XJcdJcCl18ExBMiHo6jPMErUQWUv5RLE51zJw==",
"dev": true,
- "license": "MIT"
- },
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"license": "MIT",
"dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
+ "@typescript-eslint/types": "8.42.0",
+ "@typescript-eslint/visitor-keys": "8.42.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/angular": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz",
- "integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==",
- "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward.",
- "license": "MIT"
- },
- "node_modules/angularplasmid": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/angularplasmid/-/angularplasmid-1.0.5.tgz",
- "integrity": "sha512-hBMzVdoGsMIdDNc/114E2Q5YuwdvGLMA3462AGeQk/W9HQXhcJPvIKF9HYGjRuAtD9SyJtyV0Blz9CfkzKGp4A==",
- "license": "ISC",
- "dependencies": {
- "angular": "^1.3.12"
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.42.0.tgz",
+ "integrity": "sha512-kHeFUOdwAJfUmYKjR3CLgZSglGHjbNTi1H8sTYRYV2xX6eNz4RyJ2LIgsDLKf8Yi0/GL1WZAC/DgZBeBft8QAQ==",
+ "dev": true,
"license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
"engines": {
- "node": ">=8"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/are-docs-informative": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
- "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.42.0.tgz",
+ "integrity": "sha512-LdtAWMiFmbRLNP7JNeY0SqEtJvGMYSzfiWBSmx+VSZ1CH+1zyl8Mmw1TT39OrtsRvIYShjJWzTDMPWZJCpwBlw==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=14"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "license": "Python-2.0"
- },
- "node_modules/array-buffer-byte-length": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
- "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.42.0.tgz",
+ "integrity": "sha512-ku/uYtT4QXY8sl9EDJETD27o3Ewdi72hcXg1ah/kkUgBvAYHLwj2ofswFFNXS+FL5G+AGkxBtvGt8pFBHKlHsQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/project-service": "8.42.0",
+ "@typescript-eslint/tsconfig-utils": "8.42.0",
+ "@typescript-eslint/types": "8.42.0",
+ "@typescript-eslint/visitor-keys": "8.42.0",
+ "debug": "^4.3.4",
+ "fast-glob": "^3.3.2",
+ "is-glob": "^4.0.3",
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^2.1.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.42.0.tgz",
+ "integrity": "sha512-JnIzu7H3RH5BrKC4NoZqRfmjqCIS1u3hGZltDYJgkVdqAezl4L9d1ZLw+36huCujtSBSAirGINF/S4UxOcR+/g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@typescript-eslint/scope-manager": "8.42.0",
+ "@typescript-eslint/types": "8.42.0",
+ "@typescript-eslint/typescript-estree": "8.42.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.42.0.tgz",
+ "integrity": "sha512-3WbiuzoEowaEn8RSnhJBrxSwX8ULYE9CXaPepS2C2W3NSA5NNIvBaslpBSBElPq0UGr0xVJlXFWOAKIkyylydQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.42.0",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@vitest/eslint-plugin": {
+ "version": "1.3.9",
+ "resolved": "https://registry.npmjs.org/@vitest/eslint-plugin/-/eslint-plugin-1.3.9.tgz",
+ "integrity": "sha512-wsNe7xy44ovm/h9ISDkDNcv0aOnUsaOYDqan2y6qCFAUQ0odFr6df/+FdGKHZN+mCM+SvIDWoXuvm5T5V3Kh6w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "^8.41.0",
+ "@typescript-eslint/utils": "^8.24.1"
+ },
+ "peerDependencies": {
+ "eslint": ">= 8.57.0",
+ "typescript": ">= 5.0.0",
+ "vitest": "*"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ },
+ "vitest": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/abstract-leveldown": {
+ "version": "0.12.4",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz",
+ "integrity": "sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==",
+ "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "~3.0.0"
+ }
+ },
+ "node_modules/abstract-leveldown/node_modules/xtend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
+ "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/accepts/node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/accepts/node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ace-builds": {
+ "version": "1.43.3",
+ "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.43.3.tgz",
+ "integrity": "sha512-MCl9rALmXwIty/4Qboijo/yNysx1r6hBTzG+6n/TiOm5LFhZpEvEIcIITPFiEOEFDfgBOEmxu+a4f54LEFM6Sg==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/acorn": {
+ "version": "8.15.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/add-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz",
+ "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/amdefine": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+ "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==",
+ "license": "BSD-3-Clause OR MIT",
+ "engines": {
+ "node": ">=0.4.2"
+ }
+ },
+ "node_modules/angular": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/angular/-/angular-1.8.3.tgz",
+ "integrity": "sha512-5qjkWIQQVsHj4Sb5TcEs4WZWpFeVFHXwxEBHUhrny41D8UrBAd6T/6nPPAsLngJCReIOqi95W3mxdveveutpZw==",
+ "deprecated": "For the actively supported Angular, see https://www.npmjs.com/package/@angular/core. AngularJS support has officially ended. For extended AngularJS support options, see https://goo.gle/angularjs-path-forward.",
+ "license": "MIT"
+ },
+ "node_modules/angularplasmid": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/angularplasmid/-/angularplasmid-1.0.5.tgz",
+ "integrity": "sha512-hBMzVdoGsMIdDNc/114E2Q5YuwdvGLMA3462AGeQk/W9HQXhcJPvIKF9HYGjRuAtD9SyJtyV0Blz9CfkzKGp4A==",
+ "license": "ISC",
+ "dependencies": {
+ "angular": "^1.3.12"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/are-docs-informative": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
+ "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "license": "Python-2.0"
+ },
+ "node_modules/argsarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz",
+ "integrity": "sha512-u96dg2GcAKtpTrBdDoFIM7PjcBA+6rSP0OR94MOReNRyUECL6MtQt5XXmRr4qrftYaef9+l5hcpO5te7sML1Cg==",
+ "license": "WTFPL"
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
+ "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.3",
@@ -2512,6 +2825,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
"node_modules/array-ify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
@@ -2629,6 +2948,46 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/asap": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
+ "license": "MIT"
+ },
+ "node_modules/asn1": {
+ "version": "0.1.11",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
+ "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==",
+ "optional": true,
+ "engines": {
+ "node": ">=0.4.9"
+ }
+ },
+ "node_modules/assert-plus": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
+ "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==",
+ "optional": true,
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/ast-types": {
+ "version": "0.8.15",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz",
+ "integrity": "sha512-8WsusRFHT6D2CpPTCLLLeIp4dN4pMEgmVX/jaSBsbMFObktStNdGOE1ZW4x8V/RABr1VtqruQgpabZyvzrrrww==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/async": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/async-function": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
@@ -2645,9 +3004,9 @@
"license": "MIT"
},
"node_modules/atom-sorter": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/atom-sorter/-/atom-sorter-1.2.0.tgz",
- "integrity": "sha512-WaEaDUy0UCnOEWSCa7dm2Ij41CiZEXveRUrv4H0PIJ42v2etWih7kwiGqzsEerm8Lp6zc7VOVUm/x4qIReBGbw==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/atom-sorter/-/atom-sorter-2.2.1.tgz",
+ "integrity": "sha512-+Lyyb6iXLHEb/ZYkpuvdEUgZ62+oA96p3rJG5lsttwl9vig1UqD8sAUnGQjrDFcVNUywFBhiW57Nns65M7TXEA==",
"license": "MIT"
},
"node_modules/available-typed-arrays": {
@@ -2665,6 +3024,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/aws-sign2": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
+ "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==",
+ "optional": true,
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/babel-helper-evaluate-path": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.5.0.tgz",
@@ -2979,6 +3347,119 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"license": "MIT"
},
+ "node_modules/base62": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz",
+ "integrity": "sha512-QtExujIOq/F672OkHmDi3CdkphOA1kSQ38gv03Ro3cplYQk831dq9GM3Q1oXAxpR5HNJjGjjjT2pHtBGAJu1jw==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/bindings": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
+ "integrity": "sha512-u4cBQNepWxYA55FunZSM7wMi55yQaN0otnhhilNoWHq0MfOfJeQx0v0mRRpolGOExPjZcl6FtB0BB8Xkb88F0g==",
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/bl": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-0.8.2.tgz",
+ "integrity": "sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "~1.0.26"
+ }
+ },
+ "node_modules/bl/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/bluebird": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-1.2.4.tgz",
+ "integrity": "sha512-nI6OoUVWcq6gV6kmgdaXpOMfBJhL9iq/pns0ORINhX3f51L9P87F5uvh9luqZuswURSQaN3082OfpwSDwA1KBw==",
+ "license": "MIT"
+ },
+ "node_modules/bn.js": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-0.15.2.tgz",
+ "integrity": "sha512-g05t79j9ht1gkhNEUhu9MmL+7AE9T5ltA58zelDs6ji4bmir00Vu6QogMiuz9HOAc8mqWWWCXehIJrawzdglRg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.3",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.13.0",
+ "raw-body": "2.5.2",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/body-parser/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/body-parser/node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/body-parser/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/boom": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz",
+ "integrity": "sha512-OvfN8y1oAxxphzkl2SnCS+ztV/uVKTATtgLjWYg/7KwcNyf3rzpHxNQJZCKtsZd4+MteKczhWbSjtEX4bGgU9g==",
+ "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
+ "optional": true,
+ "dependencies": {
+ "hoek": "0.9.x"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
"node_modules/bower": {
"version": "1.8.14",
"resolved": "https://registry.npmjs.org/bower/-/bower-1.8.14.tgz",
@@ -3015,10 +3496,31 @@
"node": ">=8"
}
},
+ "node_modules/brfs": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.4.3.tgz",
+ "integrity": "sha512-fHHsBNkim3FJNT4j5GsfcCEEq5nZAZxKQl2L1haCkh41Q3+Ib0aX23PTCjWOGis/Ywx6IQ/OY/xj31z/k3j4qw==",
+ "license": "MIT",
+ "dependencies": {
+ "quote-stream": "^1.0.1",
+ "resolve": "^1.1.5",
+ "static-module": "^1.1.0",
+ "through2": "^2.0.0"
+ },
+ "bin": {
+ "brfs": "bin/cmd.js"
+ }
+ },
+ "node_modules/brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
+ "license": "MIT"
+ },
"node_modules/browserslist": {
- "version": "4.25.1",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
- "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
+ "version": "4.25.4",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.4.tgz",
+ "integrity": "sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==",
"funding": [
{
"type": "opencollective",
@@ -3035,8 +3537,8 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001726",
- "electron-to-chromium": "^1.5.173",
+ "caniuse-lite": "^1.0.30001737",
+ "electron-to-chromium": "^1.5.211",
"node-releases": "^2.0.19",
"update-browserslist-db": "^1.1.3"
},
@@ -3047,6 +3549,21 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
+ "node_modules/buffer-equal": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz",
+ "integrity": "sha512-RgSV6InVQ9ODPdLWJ5UAqBqJBOg370Nz6ZQtRzpt6nUjc8v0St97uJ4PYC6NztqIScrAXafKM3mZPMygSe1ggA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.2.tgz",
+ "integrity": "sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==",
+ "license": "MIT"
+ },
"node_modules/builtin-modules": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz",
@@ -3060,6 +3577,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/call-bind": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
@@ -3117,9 +3643,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001727",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz",
- "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==",
+ "version": "1.0.30001741",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz",
+ "integrity": "sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==",
"funding": [
{
"type": "opencollective",
@@ -3152,19 +3678,23 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
+ "node_modules/change-case": {
+ "version": "5.4.4",
+ "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz",
+ "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/chemical-elements": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/chemical-elements/-/chemical-elements-1.3.0.tgz",
- "integrity": "sha512-364wypF24rEbKviTfW5T+pCUK5zOQAY7CYfB1XWDI+eiS44oifdkR7i2RldDL8dDIV9BBQs3tLyv6Btu6hvBCg==",
- "license": "MIT",
- "dependencies": {
- "papaparse": "^5.3.2"
- }
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/chemical-elements/-/chemical-elements-2.2.1.tgz",
+ "integrity": "sha512-Khr3m8RhBbNwDb2MSo9Zb9O+dcUuFourUC0hK+YxNhAtEhOwJPVTMDQeDi1vUwH44tUeNRNKriUs2QQFNQvxgg==",
+ "license": "MIT"
},
"node_modules/chemical-groups": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/chemical-groups/-/chemical-groups-1.3.0.tgz",
- "integrity": "sha512-iptPGur5faUv+zvP05VHZ9ATMteSjjiQgefjX30pM1LlKM8jIFCyUYg79XSTJiFj4bHR+hF7R3UsNDPRpd43qA==",
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/chemical-groups/-/chemical-groups-2.2.3.tgz",
+ "integrity": "sha512-rIhA7dC2OJNbQeEFM6+3u81hItYWkaYbWh7awn3hy9RI1qCvhQgdTkrvt7zlLCmcp2nuMzJZUXSju6etBsf6lA==",
"license": "MIT"
},
"node_modules/ci-info": {
@@ -3206,6 +3736,15 @@
"node": ">=0.8.0"
}
},
+ "node_modules/clone": {
+ "version": "0.1.19",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz",
+ "integrity": "sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/clone-deep": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
@@ -3249,22 +3788,25 @@
}
},
"node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "license": "MIT",
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
+ "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==",
+ "optional": true,
"dependencies": {
- "delayed-stream": "~1.0.0"
+ "delayed-stream": "0.0.5"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
- "license": "MIT"
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
},
"node_modules/comment-parser": {
"version": "1.4.1",
@@ -3295,12 +3837,16 @@
}
},
"node_modules/complex.js": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.11.tgz",
- "integrity": "sha512-6IArJLApNtdg1P1dFtn3dnyzoZBEF0MwMnrfF1exSBRpZYoy4yieMkpZhQDC0uwctw48vii0CFVyHfpgZ/DfGw==",
- "license": "MIT OR GPL-2.0",
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.2.tgz",
+ "integrity": "sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g==",
+ "license": "MIT",
"engines": {
"node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
}
},
"node_modules/component-emitter": {
@@ -3318,6 +3864,41 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"license": "MIT"
},
+ "node_modules/concat-stream": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
+ "integrity": "sha512-H6xsIBfQ94aESBG8jGHXQ7i5AEpy5ZeVaLDOisDICiTCKpqEfr34/KmTrspKQNoLKNu9gTkovlpQcUi630AKiQ==",
+ "engines": [
+ "node >= 0.8"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "readable-stream": "~2.0.0",
+ "typedarray": "~0.0.5"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/conventional-changelog": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-6.0.0.tgz",
@@ -3473,35 +4054,22 @@
}
},
"node_modules/conventional-changelog-writer": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-8.0.1.tgz",
- "integrity": "sha512-hlqcy3xHred2gyYg/zXSMXraY2mjAYYo0msUCpK+BGyaVJMFCKWVXPIHiaacGO2GGp13kvHWXFhYmxT4QQqW3Q==",
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-8.2.0.tgz",
+ "integrity": "sha512-Y2aW4596l9AEvFJRwFGJGiQjt2sBYTjPD18DdvxX9Vpz0Z7HQ+g1Z+6iYDAm1vR3QOJrDBkRHixHK/+FhkR6Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "conventional-commits-filter": "^5.0.0",
- "handlebars": "^4.7.7",
- "meow": "^13.0.0",
- "semver": "^7.5.2"
- },
- "bin": {
- "conventional-changelog-writer": "dist/cli/index.js"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/conventional-changelog-writer/node_modules/semver": {
- "version": "7.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
- "dev": true,
- "license": "ISC",
+ "conventional-commits-filter": "^5.0.0",
+ "handlebars": "^4.7.7",
+ "meow": "^13.0.0",
+ "semver": "^7.5.2"
+ },
"bin": {
- "semver": "bin/semver.js"
+ "conventional-changelog-writer": "dist/cli/index.js"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
}
},
"node_modules/conventional-commits-filter": {
@@ -3515,9 +4083,9 @@
}
},
"node_modules/conventional-commits-parser": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.1.0.tgz",
- "integrity": "sha512-5nxDo7TwKB5InYBl4ZC//1g9GRwB/F3TXOGR9hgUjMGfvSP4Vu5NkpNro2+1+TIEy1vwxApl5ircECr2ri5JIw==",
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.2.0.tgz",
+ "integrity": "sha512-uLnoLeIW4XaoFtH37qEcg/SXMJmKF4vi7V0H2rnPueg+VEtFGA/asSCNTcq4M/GQ6QmlzchAEtOoDTtKqWeHag==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3537,6 +4105,21 @@
"license": "MIT",
"peer": true
},
+ "node_modules/cookie": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "license": "MIT"
+ },
"node_modules/cookiejar": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz",
@@ -3544,12 +4127,12 @@
"license": "MIT"
},
"node_modules/core-js-compat": {
- "version": "3.44.0",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.44.0.tgz",
- "integrity": "sha512-JepmAj2zfl6ogy34qfWtcE7nHKAJnKsQFRn++scjVS2bZFllwptzw61BZcZFYBPpUznLfAvh0LGhxKppk04ClA==",
+ "version": "3.45.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.45.1.tgz",
+ "integrity": "sha512-tqTt5T4PzsMIZ430XGviK4vzYSoeNJ6CXODi6c/voxOT6IZqBht5/EKaSNnYiEjjRYxjVz7DQIsOsY0XNi8PIA==",
"license": "MIT",
"dependencies": {
- "browserslist": "^4.25.1"
+ "browserslist": "^4.25.3"
},
"funding": {
"type": "opencollective",
@@ -3562,6 +4145,13 @@
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
+ "node_modules/corslite": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/corslite/-/corslite-0.0.7.tgz",
+ "integrity": "sha512-XJwov1fnFuhJBiBlAdu0eV8dVjif4TAbCPX3CzaG5dyfNvb/3GlyRk0t6yj31wiZOGqMReOTSVOgygaynSn0bg==",
+ "deprecated": "This module is now under the @mapbox namespace: install @mapbox/corslite instead",
+ "license": "BSD"
+ },
"node_modules/country-data": {
"version": "0.0.31",
"resolved": "https://registry.npmjs.org/country-data/-/country-data-0.0.31.tgz",
@@ -3586,18 +4176,90 @@
"node": ">= 8"
}
},
+ "node_modules/cryptiles": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz",
+ "integrity": "sha512-gvWSbgqP+569DdslUiCelxIv3IYK5Lgmq1UrRnk+s1WxQOQ16j3GPDcjdtgL5Au65DU/xQi6q3xPtf5Kta+3IQ==",
+ "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
+ "optional": true,
+ "dependencies": {
+ "boom": "0.4.x"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/csv2geojson": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/csv2geojson/-/csv2geojson-5.0.2.tgz",
+ "integrity": "sha512-hcO+NVF6CO0ZtjwEJ4D7c/dVdiaEqqWZOpQvmNY7PS5LzQbpSKghQ9TuQTgzPCqlzcmrpfzPsA9rVENb5LRNAw==",
+ "license": "MIT",
+ "dependencies": {
+ "concat-stream": "~1.5.1",
+ "d3-dsv": "1.0.1",
+ "optimist": "~0.6.1",
+ "sexagesimal": "0.5.0"
+ },
+ "bin": {
+ "csv2geojson": "csv2geojson"
+ }
+ },
+ "node_modules/ctype": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
+ "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/currency-symbol-map": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/currency-symbol-map/-/currency-symbol-map-2.2.0.tgz",
"integrity": "sha512-fPZJ3jqM68+AAgqQ7UaGbgHL/39rp6l7GyqS2k1HJPu/kpS8D07x/+Uup6a9tCUKIlOFcRrDCf1qxSt8jnI5BA==",
"license": "BSD-2-Clause"
},
- "node_modules/d3-hierarchy": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz",
- "integrity": "sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==",
+ "node_modules/d3": {
+ "version": "3.5.17",
+ "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz",
+ "integrity": "sha512-yFk/2idb8OHPKkbAL8QaOaqENNoMhIaSHZerk3oQsECwkObkCpJyjYwCe+OHiq6UEdhe1m8ZGARRRO3ljFjlKg==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/d3-dsv": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.0.1.tgz",
+ "integrity": "sha512-VjRi8bmInbdZsnNr5inlWEEd7GutNcQUb+gXgr4LUyt+8lZjAxU2PBPMNMBBLHCPwosiFcmdwBfnWFpN4/khsQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "rw": "1"
+ },
+ "bin": {
+ "csv2json": "bin/csv2json",
+ "csv2tsv": "bin/csv2tsv",
+ "tsv2csv": "bin/tsv2csv",
+ "tsv2json": "bin/tsv2json"
+ }
+ },
+ "node_modules/d3-geo-projection": {
+ "version": "0.2.16",
+ "resolved": "https://registry.npmjs.org/d3-geo-projection/-/d3-geo-projection-0.2.16.tgz",
+ "integrity": "sha512-NB4/NRMnfJnpodvRbNY/nOzuoU17P229ASYf2l1GwjZyfD7l5aIuMylDMbIBF4y42BGZZvGdUwFW8iFM/5UBzg==",
+ "dependencies": {
+ "brfs": "^1.3.0"
+ }
+ },
+ "node_modules/d3-queue": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/d3-queue/-/d3-queue-2.0.3.tgz",
+ "integrity": "sha512-ejbdHqZYEmk9ns/ljSbEcD6VRiuNwAkZMdFf6rsUb3vHROK5iMFd8xewDQnUVr6m/ba2BG63KmR/LySfsluxbg==",
"license": "BSD-3-Clause"
},
+ "node_modules/d64": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/d64/-/d64-1.0.0.tgz",
+ "integrity": "sha512-5eNy3WZziVYnrogqgXhcdEmqcDB2IHurTqLcrgssJsfkMVCUoUaZpK6cJjxxvLV2dUm5SuJMNcYfVGoin9UIRw==",
+ "license": "MIT"
+ },
"node_modules/data-view-buffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
@@ -3677,9 +4339,9 @@
}
},
"node_modules/decimal.js": {
- "version": "10.2.0",
- "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz",
- "integrity": "sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw==",
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
"license": "MIT"
},
"node_modules/deep-is": {
@@ -3698,6 +4360,16 @@
"node": ">=0.10.0"
}
},
+ "node_modules/deferred-leveldown": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz",
+ "integrity": "sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng==",
+ "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "abstract-leveldown": "~0.12.1"
+ }
+ },
"node_modules/define-data-property": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
@@ -3745,14 +4417,33 @@
}
},
"node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
- "license": "MIT",
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
+ "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==",
+ "optional": true,
"engines": {
"node": ">=0.4.0"
}
},
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
"node_modules/detect-file": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
@@ -3763,6 +4454,16 @@
"node": ">=0.10.0"
}
},
+ "node_modules/dezalgo": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz",
+ "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==",
+ "license": "ISC",
+ "dependencies": {
+ "asap": "^2.0.0",
+ "wrappy": "1"
+ }
+ },
"node_modules/doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
@@ -3879,6 +4580,12 @@
"node": ">=8"
}
},
+ "node_modules/double-ended-queue": {
+ "version": "2.0.0-0",
+ "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.0.0-0.tgz",
+ "integrity": "sha512-t5ouWOpItmHrm0J0+bX/cFrIjBFWnJkk5LbIJq6bbU/M4aLX2c3LrM4QYsBptwvlPe3WzdpQefQ0v1pe/A5wjg==",
+ "license": "MIT"
+ },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -3893,12 +4600,48 @@
"node": ">= 0.4"
}
},
+ "node_modules/duplexer2": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
+ "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==",
+ "license": "BSD",
+ "dependencies": {
+ "readable-stream": "~1.1.9"
+ }
+ },
+ "node_modules/duplexer2/node_modules/readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
"node_modules/electron-to-chromium": {
- "version": "1.5.185",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.185.tgz",
- "integrity": "sha512-dYOZfUk57hSMPePoIQ1fZWl1Fkj+OshhEVuPacNKWzC1efe56OsHY3l/jCfiAgIICOU3VgOIdoq7ahg7r7n6MQ==",
+ "version": "1.5.214",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz",
+ "integrity": "sha512-TpvUNdha+X3ybfU78NoQatKvQEm1oq3lf2QbnmCEdw+Bd9RuIAY+hJTvq1avzHM0f7EJfnH3vbCnbzKzisc/9Q==",
"license": "ISC"
},
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/entities": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
@@ -3909,6 +4652,24 @@
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
+ "node_modules/errno": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+ "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
+ "license": "MIT",
+ "dependencies": {
+ "prr": "~1.0.1"
+ },
+ "bin": {
+ "errno": "cli.js"
+ }
+ },
+ "node_modules/errno/node_modules/prr": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
+ "license": "MIT"
+ },
"node_modules/es-abstract": {
"version": "1.24.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz",
@@ -4051,6 +4812,17 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/es3ify": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz",
+ "integrity": "sha512-CzrDTeqaMBrtjfNhIoHtf2GcjhyozGyJ478x6C+WeLMm+WSQOZ3/qb0MO0TnHqmUTdVRAkGroPmx+cWqMhomKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "esprima-fb": "~3001.0001.0000-dev-harmony-fb",
+ "jstransform": "~3.0.0",
+ "through": "~2.3.4"
+ }
+ },
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
@@ -4060,6 +4832,12 @@
"node": ">=6"
}
},
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
"node_modules/escape-latex": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/escape-latex/-/escape-latex-1.2.0.tgz",
@@ -4078,20 +4856,68 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/escodegen": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.3.3.tgz",
+ "integrity": "sha512-z9FWgKc48wjMlpzF5ymKS1AF8OIgnKLp9VyN7KbdtyrP/9lndwUFqCtMm+TAJmJf7KJFFYc4cFJfVTTGkKEwsA==",
+ "dependencies": {
+ "esprima": "~1.1.1",
+ "estraverse": "~1.5.0",
+ "esutils": "~1.0.0"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.1.33"
+ }
+ },
+ "node_modules/escodegen/node_modules/estraverse": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz",
+ "integrity": "sha512-FpCjJDfmo3vsc/1zKSeqR5k42tcIhxFIlvq+h9j0fO2q/h2uLKyweq7rYJ+0CoVvrGQOxIS5wyBrW/+vF58BUQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/escodegen/node_modules/esutils": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz",
+ "integrity": "sha512-x/iYH53X3quDwfHRz4y8rn4XcEwwCJeWsul9pF1zldMbGtgOtMNBEOuYWwB1EQlK2LRa1fev3YAgym/RElp5Cg==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/escodegen/node_modules/source-map": {
+ "version": "0.1.43",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz",
+ "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==",
+ "optional": true,
+ "dependencies": {
+ "amdefine": ">=0.0.4"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
"node_modules/eslint": {
- "version": "9.31.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz",
- "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==",
+ "version": "9.35.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.35.0.tgz",
+ "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==",
"license": "MIT",
"dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.21.0",
- "@eslint/config-helpers": "^0.3.0",
- "@eslint/core": "^0.15.0",
+ "@eslint/config-helpers": "^0.3.1",
+ "@eslint/core": "^0.15.2",
"@eslint/eslintrc": "^3.3.1",
- "@eslint/js": "9.31.0",
- "@eslint/plugin-kit": "^0.3.1",
+ "@eslint/js": "9.35.0",
+ "@eslint/plugin-kit": "^0.3.5",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2",
@@ -4139,19 +4965,20 @@
}
},
"node_modules/eslint-config-cheminfo": {
- "version": "14.1.1",
- "resolved": "https://registry.npmjs.org/eslint-config-cheminfo/-/eslint-config-cheminfo-14.1.1.tgz",
- "integrity": "sha512-y0I6J5P+h+sU8ZycY0kH1qNHUcu18Rf97BwQBj33j5H28mu+ritgEBX15Gr+CPbQFSb23dgd7nWc+jfdhU9QLw==",
+ "version": "15.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-config-cheminfo/-/eslint-config-cheminfo-15.0.2.tgz",
+ "integrity": "sha512-us7nQ92wT4tOsr3voBdBKtw2dhwZOcVTKvSWGLOqwrKo+u+smu5HHHfE2KGAZi/X4dHOiDHwCQtbq7d2AV+MhA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "eslint-plugin-import": "^2.31.0",
- "eslint-plugin-jsdoc": "^50.6.11",
- "eslint-plugin-unicorn": "^59.0.1",
- "globals": "^16.1.0"
+ "@vitest/eslint-plugin": "^1.3.4",
+ "eslint-plugin-import": "^2.32.0",
+ "eslint-plugin-jsdoc": "^54.1.1",
+ "eslint-plugin-unicorn": "^60.0.0",
+ "globals": "^16.3.0"
},
"peerDependencies": {
- "eslint": "^9.22.0"
+ "eslint": "^9.30.1"
}
},
"node_modules/eslint-import-resolver-node": {
@@ -4252,116 +5079,64 @@
}
},
"node_modules/eslint-plugin-jsdoc": {
- "version": "50.6.11",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.11.tgz",
- "integrity": "sha512-k4+MnBCGR8cuIB5MZ++FGd4gbXxjob2rX1Nq0q3nWFF4xSGZENTgTLZSjb+u9B8SAnP6lpGV2FJrBjllV3pVSg==",
+ "version": "54.7.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-54.7.0.tgz",
+ "integrity": "sha512-u5Na4he2+6kY1rWqxzbQaAwJL3/tDCuT5ElDRc5UJ9stOeQeQ5L1JJ1kRRu7ldYMlOHMCJLsY8Mg/Tu3ExdZiQ==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
- "@es-joy/jsdoccomment": "~0.49.0",
+ "@es-joy/jsdoccomment": "~0.56.0",
"are-docs-informative": "^0.0.2",
"comment-parser": "1.4.1",
- "debug": "^4.3.6",
+ "debug": "^4.4.1",
"escape-string-regexp": "^4.0.0",
- "espree": "^10.1.0",
+ "espree": "^10.4.0",
"esquery": "^1.6.0",
"parse-imports-exports": "^0.2.4",
- "semver": "^7.6.3",
+ "semver": "^7.7.2",
"spdx-expression-parse": "^4.0.0"
},
"engines": {
- "node": ">=18"
+ "node": ">=20.11.0"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0 || ^9.0.0"
}
},
- "node_modules/eslint-plugin-jsdoc/node_modules/semver": {
- "version": "7.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/eslint-plugin-unicorn": {
- "version": "59.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-59.0.1.tgz",
- "integrity": "sha512-EtNXYuWPUmkgSU2E7Ttn57LbRREQesIP1BiLn7OZLKodopKfDXfBUkC/0j6mpw2JExwf43Uf3qLSvrSvppgy8Q==",
+ "version": "60.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-60.0.0.tgz",
+ "integrity": "sha512-QUzTefvP8stfSXsqKQ+vBQSEsXIlAiCduS/V1Em+FKgL9c21U/IIm20/e3MFy1jyCf14tHAhqC1sX8OTy6VUCg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/helper-validator-identifier": "^7.25.9",
- "@eslint-community/eslint-utils": "^4.5.1",
- "@eslint/plugin-kit": "^0.2.7",
- "ci-info": "^4.2.0",
+ "@babel/helper-validator-identifier": "^7.27.1",
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@eslint/plugin-kit": "^0.3.3",
+ "change-case": "^5.4.4",
+ "ci-info": "^4.3.0",
"clean-regexp": "^1.0.0",
- "core-js-compat": "^3.41.0",
+ "core-js-compat": "^3.44.0",
"esquery": "^1.6.0",
"find-up-simple": "^1.0.1",
- "globals": "^16.0.0",
+ "globals": "^16.3.0",
"indent-string": "^5.0.0",
"is-builtin-module": "^5.0.0",
"jsesc": "^3.1.0",
"pluralize": "^8.0.0",
"regexp-tree": "^0.1.27",
"regjsparser": "^0.12.0",
- "semver": "^7.7.1",
+ "semver": "^7.7.2",
"strip-indent": "^4.0.0"
},
"engines": {
- "node": "^18.20.0 || ^20.10.0 || >=21.0.0"
+ "node": "^20.10.0 || >=21.0.0"
},
"funding": {
"url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1"
},
"peerDependencies": {
- "eslint": ">=9.22.0"
- }
- },
- "node_modules/eslint-plugin-unicorn/node_modules/@eslint/core": {
- "version": "0.13.0",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz",
- "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@types/json-schema": "^7.0.15"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- }
- },
- "node_modules/eslint-plugin-unicorn/node_modules/@eslint/plugin-kit": {
- "version": "0.2.8",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz",
- "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@eslint/core": "^0.13.0",
- "levn": "^0.4.1"
- },
- "engines": {
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
- }
- },
- "node_modules/eslint-plugin-unicorn/node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
+ "eslint": ">=9.29.0"
}
},
"node_modules/eslint-scope": {
@@ -4392,6 +5167,12 @@
"url": "https://opencollective.com/eslint"
}
},
+ "node_modules/esmangle-evaluator": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz",
+ "integrity": "sha512-wG16Qv6u5Let+nMeQ+HDwlZYa2fAUD0uiWOy6719n2sMGHnCs+vzxwsLHOIUR3qU6Fxpex+WLNpnZukYJuZi5A==",
+ "license": "MIT"
+ },
"node_modules/espree": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
@@ -4410,17 +5191,27 @@
}
},
"node_modules/esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "dev": true,
- "license": "BSD-2-Clause",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.1.1.tgz",
+ "integrity": "sha512-qxxB994/7NtERxgXdFgLHIs9M6bhLXc6qtUmWZ3L8+gTQ9qaoyki2887P2IqAYsoENyr8SUbTutStDniOHSDHg==",
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/esprima-fb": {
+ "version": "3001.1.0-dev-harmony-fb",
+ "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz",
+ "integrity": "sha512-a3RFiCVBiy8KdO6q/C+8BQiP/sRk8XshBU3QHHDP8tNzjYwR3FKBOImu+PXfVhPoZL0JKtJLBAOWlDMCCFY8SQ==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=0.4.0"
}
},
"node_modules/esquery": {
@@ -4472,6 +5263,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/eventemitter2": {
"version": "0.4.14",
"resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
@@ -4504,15 +5304,104 @@
"homedir-polyfill": "^1.0.1"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.21.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
+ "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.3",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.7.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.3.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.12",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.13.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.19.0",
+ "serve-static": "1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/express/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/falafel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz",
+ "integrity": "sha512-oKyHugGk3tYQcZmj3+J+0PlcU59JYOZL60Lr3dYwsLDDYYR/+GYvAhW5WO3NTfh2FJOcGRoXJxxtGpda1qE5Sg==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^1.0.3",
+ "foreach": "^2.0.5",
+ "isarray": "0.0.1",
+ "object-keys": "^1.0.6"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/falafel/node_modules/acorn": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz",
+ "integrity": "sha512-FsqWmApWGMGLKKNpHt12PMc5AK7BaZee0WRh04fCysmTzHe+rrKOa2MKjORhnzfpe4r0JnfdqHn02iDA9Dqj2A==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
}
},
- "node_modules/extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
- "license": "MIT"
- },
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -4525,6 +5414,36 @@
"integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
"license": "Apache-2.0"
},
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -4537,6 +5456,40 @@
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"license": "MIT"
},
+ "node_modules/fast-safe-stringify": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
+ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
+ "license": "MIT"
+ },
+ "node_modules/fastq": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
+ "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
"node_modules/file-entry-cache": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
@@ -4569,6 +5522,39 @@
"node": ">=8"
}
},
+ "node_modules/finalhandler": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/finalhandler/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/finalhandler/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
"node_modules/find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
@@ -4707,46 +5693,93 @@
"node": ">=0.10.0"
}
},
+ "node_modules/foreach": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz",
+ "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==",
+ "license": "MIT"
+ },
"node_modules/foreachasync": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
"integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw==",
"license": "Apache2"
},
+ "node_modules/forever-agent": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
+ "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/form-data": {
- "version": "2.5.5",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz",
- "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==",
- "license": "MIT",
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
+ "integrity": "sha512-x8eE+nzFtAMA0YYlSxf/Qhq6vP1f8wSoZ7Aw1GuctBcmudCNuTUmmx45TfEplyb6cjsZO/jvh6+1VpZn24ez+w==",
+ "optional": true,
"dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.35",
- "safe-buffer": "^5.2.1"
+ "async": "~0.9.0",
+ "combined-stream": "~0.0.4",
+ "mime": "~1.2.11"
},
"engines": {
- "node": ">= 0.12"
+ "node": ">= 0.8"
}
},
+ "node_modules/form-data/node_modules/async": {
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+ "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==",
+ "license": "MIT",
+ "optional": true
+ },
"node_modules/formidable": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz",
- "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==",
- "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau",
+ "version": "3.5.4",
+ "resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.4.tgz",
+ "integrity": "sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==",
"license": "MIT",
+ "dependencies": {
+ "@paralleldrive/cuid2": "^2.2.2",
+ "dezalgo": "^1.0.4",
+ "once": "^1.4.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
"funding": {
"url": "https://ko-fi.com/tunnckoCore/commissions"
}
},
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/fraction.js": {
- "version": "4.0.12",
- "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.12.tgz",
- "integrity": "sha512-8Z1K0VTG4hzYY7kA/1sj4/r1/RWLBD3xwReT/RCrUCbzPszjNQCCsy3ktkU/eaEqX3MYa4pY37a52eiBlPMlhA==",
- "license": "MIT OR GPL-2.0",
+ "version": "5.3.4",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
+ "license": "MIT",
"engines": {
"node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
}
},
"node_modules/fs.realpath": {
@@ -4800,6 +5833,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/functional-red-black-tree": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
+ "license": "MIT"
+ },
"node_modules/functions-have-names": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
@@ -5131,13 +6170,6 @@
"grunt": ">=0.4.5"
}
},
- "node_modules/grunt-contrib-clean/node_modules/async": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
- "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/grunt-contrib-copy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz",
@@ -5271,13 +6303,6 @@
"node": ">=10"
}
},
- "node_modules/grunt-legacy-util/node_modules/async": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
- "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/grunt/node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -5288,6 +6313,20 @@
"sprintf-js": "~1.0.2"
}
},
+ "node_modules/grunt/node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/grunt/node_modules/grunt-cli": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz",
@@ -5391,14 +6430,13 @@
"uglify-js": "^3.1.4"
}
},
- "node_modules/handlebars/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "license": "BSD-3-Clause",
+ "node_modules/has": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",
+ "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 0.4.0"
}
},
"node_modules/has-ansi": {
@@ -5414,16 +6452,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/has-ansi/node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/has-bigints": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
@@ -5445,6 +6473,12 @@
"node": ">=8"
}
},
+ "node_modules/has-localstorage": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-localstorage/-/has-localstorage-1.0.1.tgz",
+ "integrity": "sha512-0M88QdpTOjOAkVqI7sMGt7hTaVnLppr0sjisFagm+Q9gI3Mmkeqpqu/+RZS4a1doIJ90lmL1WofDMbNB7f+F7Q==",
+ "license": "MIT"
+ },
"node_modules/has-property-descriptors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
@@ -5511,6 +6545,32 @@
"node": ">= 0.4"
}
},
+ "node_modules/hawk": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz",
+ "integrity": "sha512-Sg+VzrI7TjUomO0rjD6UXawsj50ykn5sB/xKNW/IenxzRVyw/wt9A2FLzYpGL/r0QG5hyXY8nLx/2m8UutoDcg==",
+ "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.",
+ "optional": true,
+ "dependencies": {
+ "boom": "0.4.x",
+ "cryptiles": "0.2.x",
+ "hoek": "0.9.x",
+ "sntp": "0.2.x"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/hoek": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",
+ "integrity": "sha512-ZZ6eGyzGjyMTmpSPYVECXy9uNfqBR7x5CavhUaLOeD6W0vWK1mp/b7O3f86XE0Mtfo9rZ6Bh3fnuw9Xr8MF9zA==",
+ "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
+ "optional": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
"node_modules/homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
@@ -5566,6 +6626,47 @@
"entities": "^2.0.0"
}
},
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/http-signature": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
+ "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "asn1": "0.1.11",
+ "assert-plus": "^0.1.5",
+ "ctype": "0.5.3"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/humble-localstorage": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/humble-localstorage/-/humble-localstorage-1.4.2.tgz",
+ "integrity": "sha512-INHaIq55BGlrVCSYw11FxRHQAAQVBO5i1t8kREy778DLMVrgaASCujBwZa2e2+n70sUczlBu5Tjie5iYp1JVeQ==",
+ "license": "MIT",
+ "dependencies": {
+ "has-localstorage": "^1.0.1",
+ "localstorage-memory": "^1.0.1"
+ }
+ },
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
@@ -5579,6 +6680,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/idb-wrapper": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.2.tgz",
+ "integrity": "sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==",
+ "license": "MIT"
+ },
"node_modules/ignore": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -5588,6 +6695,12 @@
"node": ">= 4"
}
},
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
+ "license": "MIT"
+ },
"node_modules/import-fresh": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
@@ -5639,6 +6752,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/indexof": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg=="
+ },
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -5675,6 +6793,47 @@
"sanitize-html": "^1.13.0"
}
},
+ "node_modules/inline-process-browser": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz",
+ "integrity": "sha512-DyFIA2uFCdhB57k1blue0nbd/syuws7NIlE0UkWSWbiM++mbo8W6Zl0QZ/7DwveucRC7YUi87OgJvJyERnwCbg==",
+ "license": "MIT",
+ "dependencies": {
+ "falafel": "^1.0.1",
+ "through2": "^0.6.5"
+ }
+ },
+ "node_modules/inline-process-browser/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/inline-process-browser/node_modules/through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": ">=1.0.33-1 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ }
+ },
+ "node_modules/inline-process-browser/node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
"node_modules/internal-slot": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
@@ -5696,6 +6855,23 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/is/-/is-0.2.7.tgz",
+ "integrity": "sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/is-absolute": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
@@ -5974,6 +7150,11 @@
"node": ">=8"
}
},
+ "node_modules/is-object": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/is-object/-/is-object-0.1.2.tgz",
+ "integrity": "sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ=="
+ },
"node_modules/is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -6169,9 +7350,15 @@
}
},
"node_modules/isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
+ "license": "MIT"
+ },
+ "node_modules/isbuffer": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz",
+ "integrity": "sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==",
"license": "MIT"
},
"node_modules/isexe": {
@@ -6195,6 +7382,48 @@
"integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==",
"license": "MIT"
},
+ "node_modules/jmespath": {
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz",
+ "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
+ "license": "MIT"
+ },
+ "node_modules/jquery-migrate": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.5.2.tgz",
+ "integrity": "sha512-GGvcVWK3aei2/98r7pA4UkOYvs4xVeCGvquNXADFUp9+Sr6VeOw0ktlQ9z4YlBbEFpsXBlRioAgpH/fLWinj4Q==",
+ "license": "MIT",
+ "peerDependencies": {
+ "jquery": ">=3 <4"
+ }
+ },
+ "node_modules/jquery-ui": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.14.1.tgz",
+ "integrity": "sha512-DhzsYH8VeIvOaxwi+B/2BCsFFT5EGjShdzOcm5DssWjtcpGWIMsn66rJciDA6jBruzNiLf1q0KvwMoX1uGNvnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "jquery": ">=1.12.0 <5.0.0"
+ }
+ },
+ "node_modules/jquery.fancytree": {
+ "version": "2.38.5",
+ "resolved": "https://registry.npmjs.org/jquery.fancytree/-/jquery.fancytree-2.38.5.tgz",
+ "integrity": "sha512-6ntTplhfYKWz74GLpeeE9B62VqhsF+bd80gLZRDD1gl7Vv9WTqqQrCsrGMMu0PB6JLhNOXhf17xIcYpARG+N3g==",
+ "license": "MIT",
+ "peerDependencies": {
+ "jquery": ">=1.9"
+ }
+ },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -6213,10 +7442,16 @@
"js-yaml": "bin/js-yaml.js"
}
},
+ "node_modules/jsbarcode": {
+ "version": "3.12.1",
+ "resolved": "https://registry.npmjs.org/jsbarcode/-/jsbarcode-3.12.1.tgz",
+ "integrity": "sha512-QZQSqIknC2Rr/YOUyOkCBqsoiBAOTYK+7yNN3JsqfoUtJtkazxNw1dmPpxuv7VVvqW13kA3/mKiLq+s/e3o9hQ==",
+ "license": "MIT"
+ },
"node_modules/jsdoc-type-pratt-parser": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz",
- "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-5.1.1.tgz",
+ "integrity": "sha512-DYYlVP1fe4QBMh2xTIs20/YeTz2GYVbWAEZweHSZD+qQ/Cx2d5RShuhhsdk64eTjNq0FeVnteP/qVOgaywSRbg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6241,18 +7476,36 @@
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
"license": "MIT"
},
+ "node_modules/json-chart": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/json-chart/-/json-chart-1.1.0.tgz",
+ "integrity": "sha512-unoMJpN8FlHj/RCRZaaqBnPh5gghM4RtkmvyxVlM0NaB/vE225sqO3rMqToQtS9XCpYbZBp8zOCt1qNRPkjSNQ==",
+ "license": "MIT"
+ },
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"license": "MIT"
},
+ "node_modules/json-source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz",
+ "integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==",
+ "license": "MIT"
+ },
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"license": "MIT"
},
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+ "license": "ISC"
+ },
"node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
@@ -6266,13 +7519,66 @@
"node": ">=6"
}
},
+ "node_modules/jsoneditor": {
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/jsoneditor/-/jsoneditor-10.4.1.tgz",
+ "integrity": "sha512-89ao8IOKq6yTY+LSNw7FHoqcNrkATZN9W1u476P9ofGLSN/V0l2Je0MWG8HrYKMYqriJEpXmlsGT1CZbr99GWg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "ace-builds": "^1.36.2",
+ "ajv": "^6.12.6",
+ "javascript-natural-sort": "^0.7.1",
+ "jmespath": "^0.16.0",
+ "json-source-map": "^0.6.1",
+ "jsonrepair": "^3.8.1",
+ "picomodal": "^3.0.0",
+ "vanilla-picker": "^2.12.3"
+ }
+ },
+ "node_modules/jsonrepair": {
+ "version": "3.13.0",
+ "resolved": "https://registry.npmjs.org/jsonrepair/-/jsonrepair-3.13.0.tgz",
+ "integrity": "sha512-5YRzlAQ7tuzV1nAJu3LvDlrKtBFIALHN2+a+I1MGJCt3ldRDBF/bZuvIPzae8Epot6KBXd0awRZZcuoeAsZ/mw==",
+ "license": "ISC",
+ "bin": {
+ "jsonrepair": "bin/cli.js"
+ }
+ },
+ "node_modules/jstransform": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz",
+ "integrity": "sha512-sMwqW0EdQk2A5NjddlcSSLp6t7pIknOrJtxPU3kMN82RJXPGbdC3fcM5VhIsApNKL1hpeH38iSQsJRbgprPQZg==",
+ "dependencies": {
+ "base62": "0.1.1",
+ "esprima-fb": "~3001.1.0-dev-harmony-fb",
+ "source-map": "0.1.31"
+ },
+ "engines": {
+ "node": ">=0.8.8"
+ }
+ },
+ "node_modules/jstransform/node_modules/source-map": {
+ "version": "0.1.31",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz",
+ "integrity": "sha512-qFALUiKHo35Duky0Ubmb5YKj9b3c6CcgGNGeI60sd6Nn3KaY7h9fclEOcCVk0hwszwYYP6+X2/jpS5hHqqVuig==",
+ "dependencies": {
+ "amdefine": ">=0.0.4"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
"node_modules/katex": {
- "version": "0.10.2",
- "resolved": "https://registry.npmjs.org/katex/-/katex-0.10.2.tgz",
- "integrity": "sha512-cQOmyIRoMloCoSIOZ1+gEwsksdJZ1EW4SWm3QzxSza/QsnZr6D4U1V9S4q+B/OLm2OQ8TCBecQ8MaIfnScI7cw==",
+ "version": "0.16.22",
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz",
+ "integrity": "sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==",
+ "funding": [
+ "https://opencollective.com/katex",
+ "https://github.com/sponsors/katex"
+ ],
"license": "MIT",
"dependencies": {
- "commander": "^2.19.0"
+ "commander": "^8.3.0"
},
"bin": {
"katex": "cli.js"
@@ -6296,6 +7602,138 @@
"node": ">=0.10.0"
}
},
+ "node_modules/leaflet": {
+ "version": "1.9.4",
+ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
+ "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/level-fix-range": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz",
+ "integrity": "sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA==",
+ "license": "MIT",
+ "dependencies": {
+ "clone": "~0.1.9"
+ }
+ },
+ "node_modules/level-hooks": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz",
+ "integrity": "sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA==",
+ "dependencies": {
+ "string-range": "~1.2"
+ }
+ },
+ "node_modules/level-js": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz",
+ "integrity": "sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ==",
+ "deprecated": "Superseded by browser-level (https://github.com/Level/community#faq)",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "abstract-leveldown": "~0.12.0",
+ "idb-wrapper": "^1.5.0",
+ "isbuffer": "~0.0.0",
+ "ltgt": "^2.1.2",
+ "typedarray-to-buffer": "~1.0.0",
+ "xtend": "~2.1.2"
+ }
+ },
+ "node_modules/level-sublevel": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz",
+ "integrity": "sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA==",
+ "license": "MIT",
+ "dependencies": {
+ "level-fix-range": "2.0",
+ "level-hooks": ">=4.4.0 <5",
+ "string-range": "~1.2.1",
+ "xtend": "~2.0.4"
+ }
+ },
+ "node_modules/level-sublevel/node_modules/object-keys": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz",
+ "integrity": "sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA==",
+ "deprecated": "Please update to the latest object-keys",
+ "license": "MIT",
+ "dependencies": {
+ "foreach": "~2.0.1",
+ "indexof": "~0.0.1",
+ "is": "~0.2.6"
+ }
+ },
+ "node_modules/level-sublevel/node_modules/xtend": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.0.6.tgz",
+ "integrity": "sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg==",
+ "dependencies": {
+ "is-object": "~0.1.2",
+ "object-keys": "~0.2.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/leveldown": {
+ "version": "0.10.6",
+ "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-0.10.6.tgz",
+ "integrity": "sha512-NP9PjVmE/IPtnPKRj83n4YdBP/xe41HKAFwrANlqrqb3gP8GU7mORRSMjp63z1dmcgNGCkKY9Is+tbs2gO9pAw==",
+ "deprecated": "Superseded by classic-level (https://github.com/Level/community#faq)",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "bindings": "~1.2.1",
+ "nan": "~2.1.0"
+ }
+ },
+ "node_modules/levelup": {
+ "version": "0.18.6",
+ "resolved": "https://registry.npmjs.org/levelup/-/levelup-0.18.6.tgz",
+ "integrity": "sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q==",
+ "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "bl": "~0.8.1",
+ "deferred-leveldown": "~0.2.0",
+ "errno": "~0.1.1",
+ "prr": "~0.0.0",
+ "readable-stream": "~1.0.26",
+ "semver": "~2.3.1",
+ "xtend": "~3.0.0"
+ }
+ },
+ "node_modules/levelup/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/levelup/node_modules/semver": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-2.3.2.tgz",
+ "integrity": "sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA==",
+ "license": "BSD",
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
+ "node_modules/levelup/node_modules/xtend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
+ "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
"node_modules/levn": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@@ -6309,6 +7747,17 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/lie": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-2.9.1.tgz",
+ "integrity": "sha512-xIIBOtr0RFxwJiVPIa0Nv1NomP8/ddnC3DlyXCuogu36R809WWHVvfZ6+FyXUM2ZXhoz8596QP92MG/TuWMiiw==",
+ "license": "MIT",
+ "dependencies": {
+ "immediate": "~3.0.0",
+ "inline-process-browser": "^1.0.0",
+ "unreachable-branch-transform": "^0.2.3"
+ }
+ },
"node_modules/liftup": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz",
@@ -6345,6 +7794,45 @@
"node": ">= 8"
}
},
+ "node_modules/localstorage-down": {
+ "version": "0.6.7",
+ "resolved": "https://registry.npmjs.org/localstorage-down/-/localstorage-down-0.6.7.tgz",
+ "integrity": "sha512-FICPps7r0bhe4J4723TVjxkkP/9SgIn95zWC8M6isvibErHHHyrm1gryMXpqyjSd/PaOcdKICvVaJPWW3OWcZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "abstract-leveldown": "0.12.3",
+ "argsarray": "0.0.1",
+ "buffer-from": "^0.1.1",
+ "d64": "^1.0.0",
+ "humble-localstorage": "^1.4.2",
+ "inherits": "^2.0.1",
+ "tiny-queue": "0.2.0"
+ }
+ },
+ "node_modules/localstorage-down/node_modules/abstract-leveldown": {
+ "version": "0.12.3",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.3.tgz",
+ "integrity": "sha512-2XjIA9DFg1Cj2mVm/SmeJ2NIEt/6PRThyHk13ZyVyiZBSYwbEbGMcyt8uEFDlQByYwtBonFOPC0VpxjKVUqJXQ==",
+ "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "~3.0.0"
+ }
+ },
+ "node_modules/localstorage-down/node_modules/xtend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
+ "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/localstorage-memory": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/localstorage-memory/-/localstorage-memory-1.0.3.tgz",
+ "integrity": "sha512-t9P8WB6DcVttbw/W4PIE8HOqum8Qlvx5SjR6oInwR9Uia0EEmyUeBh7S+weKByW+l/f45Bj4L/dgZikGFDM6ng==",
+ "license": "MIT"
+ },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@@ -6422,14 +7910,20 @@
"yallist": "^3.0.2"
}
},
+ "node_modules/ltgt": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz",
+ "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==",
+ "license": "MIT"
+ },
"node_modules/magic-string": {
- "version": "0.30.17",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
- "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+ "version": "0.30.19",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz",
+ "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.0"
+ "@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/make-iterator": {
@@ -6455,6 +7949,18 @@
"node": ">=0.10.0"
}
},
+ "node_modules/marked": {
+ "version": "0.3.19",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
+ "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==",
+ "license": "MIT",
+ "bin": {
+ "marked": "bin/marked"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -6465,25 +7971,81 @@
}
},
"node_modules/mathjs": {
- "version": "5.10.3",
- "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-5.10.3.tgz",
- "integrity": "sha512-ySjg30BC3dYjQm73ILZtwcWzFJde0VU6otkXW/57IjjuYRa3Qaf0Kb8pydEuBZYtqW2OxreAtsricrAmOj3jIw==",
+ "version": "14.7.0",
+ "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-14.7.0.tgz",
+ "integrity": "sha512-RaMhb+9MSESjDZNox/FzzuFpIUI+oxGLyOy1t3BMoW53pGWnTzZtlucJ5cvbit0dIMYlCq00gNbW1giZX4/1Rg==",
"license": "Apache-2.0",
"dependencies": {
- "complex.js": "2.0.11",
- "decimal.js": "10.2.0",
- "escape-latex": "1.2.0",
- "fraction.js": "4.0.12",
- "javascript-natural-sort": "0.7.1",
- "seed-random": "2.2.0",
- "tiny-emitter": "2.1.0",
- "typed-function": "1.1.0"
+ "@babel/runtime": "^7.26.10",
+ "complex.js": "^2.2.5",
+ "decimal.js": "^10.4.3",
+ "escape-latex": "^1.2.0",
+ "fraction.js": "^5.2.1",
+ "javascript-natural-sort": "^0.7.1",
+ "seedrandom": "^3.0.5",
+ "tiny-emitter": "^2.1.0",
+ "typed-function": "^4.2.1"
},
"bin": {
"mathjs": "bin/cli.js"
},
"engines": {
- "node": ">= 6"
+ "node": ">= 18"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/memdown": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz",
+ "integrity": "sha512-iVrGHZB8i4OQfM155xx8akvG9FIj+ht14DX5CQkCTG4EHzZ3d3sgckIf/Lm9ivZalEsFuEVnWv2B2WZvbrro2w==",
+ "deprecated": "Superseded by memory-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "abstract-leveldown": "~2.7.1",
+ "functional-red-black-tree": "^1.0.1",
+ "immediate": "^3.2.3",
+ "inherits": "~2.0.1",
+ "ltgt": "~2.2.0",
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "node_modules/memdown/node_modules/abstract-leveldown": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz",
+ "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==",
+ "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)",
+ "license": "MIT",
+ "dependencies": {
+ "xtend": "~4.0.0"
+ }
+ },
+ "node_modules/memdown/node_modules/immediate": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz",
+ "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==",
+ "license": "MIT"
+ },
+ "node_modules/memdown/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
+ "node_modules/memdown/node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
}
},
"node_modules/meow": {
@@ -6499,6 +8061,25 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@@ -6509,14 +8090,14 @@
}
},
"node_modules/mf-parser": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/mf-parser/-/mf-parser-1.5.0.tgz",
- "integrity": "sha512-GErJnRZX8Bkd7Jqx1Ua8jFS0LYgAb9MQvQGvsRAva2jh1RBzWoN+jvPX7NpAQhyfxzV/KG1Zn9R7ZlvMxx91mg==",
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/mf-parser/-/mf-parser-3.6.0.tgz",
+ "integrity": "sha512-vBE7hE8ZB2rtMPxJZHgfuMQIF98ebqXUDTtG/EzapRJ/CDurI/bEo8ZEyQI+ZKznGXr6HGcnBdoE2+U52v/JtA==",
"license": "MIT",
"dependencies": {
- "atom-sorter": "^1.2.0",
- "chemical-elements": "^1.3.0",
- "chemical-groups": "^1.3.0"
+ "atom-sorter": "^2.2.1",
+ "chemical-elements": "^2.2.1",
+ "chemical-groups": "^2.2.3"
}
},
"node_modules/micromatch": {
@@ -6533,34 +8114,52 @@
"node": ">=8.6"
}
},
- "node_modules/mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
"license": "MIT",
- "bin": {
- "mime": "cli.js"
- },
"engines": {
- "node": ">=4"
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/miller-rabin": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-1.1.1.tgz",
+ "integrity": "sha512-tc+bun6eAW/cvechXAYU0xlk5ABpEiuqHGoykbgk/lxOeJZzvvbtc1e6FsWq55vTsmdoH2GEw0DUTij2BhJ1Ng==",
+ "license": "MIT",
+ "dependencies": {
+ "brorand": "^1.0.1"
+ },
+ "peerDependencies": {
+ "bn.js": "^0.15.0"
}
},
+ "node_modules/mime": {
+ "version": "1.2.11",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
+ "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw=="
+ },
"node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",
+ "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",
"license": "MIT",
"dependencies": {
- "mime-db": "1.52.0"
+ "mime-db": "^1.54.0"
},
"engines": {
"node": ">= 0.6"
@@ -6608,24 +8207,45 @@
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
- "dev": true,
"license": "MIT",
"engines": {
"node": "*"
}
},
+ "node_modules/moment-duration-format": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/moment-duration-format/-/moment-duration-format-2.3.2.tgz",
+ "integrity": "sha512-cBMXjSW+fjOb4tyaVHuaVE/A5TqkukDWiOfxxAjY+PEqmmBQlLwn+8OzwPiG3brouXKY5Un4pBjAeB6UToXHaQ==",
+ "license": "MIT"
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
+ "node_modules/nan": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.1.0.tgz",
+ "integrity": "sha512-JeVtkKWF38ENQcoPKBtV1FO/Z2FcupFE2NZytXjjWaKYNyy2QXbzBouGAOlQ/vO+as7r4QM5w7ZJrkh3d6uaTg==",
+ "license": "MIT",
+ "optional": true
+ },
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"license": "MIT"
},
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
@@ -6643,11 +8263,20 @@
}
},
"node_modules/node-releases": {
- "version": "2.0.19",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
- "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.20.tgz",
+ "integrity": "sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==",
"license": "MIT"
},
+ "node_modules/node-uuid": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
+ "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==",
+ "deprecated": "Use uuid module instead",
+ "bin": {
+ "uuid": "bin/uuid"
+ }
+ },
"node_modules/nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@@ -6676,17 +8305,22 @@
"node": "^16.14.0 || >=18.0.0"
}
},
- "node_modules/normalize-package-data/node_modules/semver": {
- "version": "7.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
+ "node_modules/numeral": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz",
+ "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==",
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": "*"
+ }
+ },
+ "node_modules/oauth-sign": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz",
+ "integrity": "sha512-Tr31Sh5FnK9YKm7xTUPyDMsNOvMqkVDND0zvK/Wgj7/H9q8mpye0qG2nVzrnsvLhcsX5DtqXD0la0ks6rkPCGQ==",
+ "optional": true,
+ "engines": {
+ "node": "*"
}
},
"node_modules/object-inspect": {
@@ -6823,22 +8457,58 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/openchemlib": {
- "version": "9.6.0",
- "resolved": "https://registry.npmjs.org/openchemlib/-/openchemlib-9.6.0.tgz",
- "integrity": "sha512-SAMLSwOQTCDNpfNu/WTQpzLMYTRj/xwetMPRoAGHeR2J162RP/OI6vHpVcC7L4V7ThMW3ZhMf7GdH04yndmHtw==",
+ "version": "9.7.0",
+ "resolved": "https://registry.npmjs.org/openchemlib/-/openchemlib-9.7.0.tgz",
+ "integrity": "sha512-IMO5O+151rrfakuTkEpCsZvMXFqfCGWrXarlEBukiAqDYhxqSG0LtyzZdtTn0ETSY8Nz+oTLGs1iJ2tRRUK7lA==",
"license": "BSD-3-Clause"
},
+ "node_modules/optimist": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==",
+ "license": "MIT/X11",
+ "dependencies": {
+ "minimist": "~0.0.1",
+ "wordwrap": "~0.0.2"
+ }
+ },
+ "node_modules/optimist/node_modules/minimist": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==",
+ "license": "MIT"
+ },
+ "node_modules/optimist/node_modules/wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/optionator": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -6936,9 +8606,9 @@
}
},
"node_modules/papaparse": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.2.tgz",
- "integrity": "sha512-PZXg8UuAc4PcVwLosEEDYjPyfWnTEhOrUfdv+3Bx+NuAb+5NhDmXzg5fHWmdCh1mP5p7JAZfFr3IMQfcntNAdA==",
+ "version": "5.5.3",
+ "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.3.tgz",
+ "integrity": "sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==",
"license": "MIT"
},
"node_modules/parchment": {
@@ -6984,6 +8654,24 @@
"parse-statements": "1.0.11"
}
},
+ "node_modules/parse-json": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz",
+ "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.26.2",
+ "index-to-position": "^1.1.0",
+ "type-fest": "^4.39.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/parse-passwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
@@ -7008,6 +8696,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -7065,6 +8762,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/path-to-regexp": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
+ "license": "MIT"
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -7072,18 +8775,24 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=8.6"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
+ "node_modules/picomodal": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/picomodal/-/picomodal-3.0.0.tgz",
+ "integrity": "sha512-FoR3TDfuLlqUvcEeK5ifpKSVVns6B4BQvc8SDF6THVMuadya6LLtji0QgUDSStw0ZR2J7I6UGi5V2V23rnPWTw==",
+ "license": "MIT"
+ },
"node_modules/pluralize": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
@@ -7094,6 +8803,15 @@
"node": ">=4"
}
},
+ "node_modules/polyline": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/polyline/-/polyline-0.2.0.tgz",
+ "integrity": "sha512-rCJSkIHWZ/HOUoEWgjZ1DrRjLpTeTjgaktyJV0yhm8PugM5sKoavNjUHtI/amjsTn/Tq+Q3IIAuBD/dUSsWwxQ==",
+ "deprecated": "This module is now under the @mapbox namespace: install @mapbox/polyline instead",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/possible-typed-array-names": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
@@ -7128,20 +8846,124 @@
"dev": true,
"license": "ISC"
},
- "node_modules/postcss/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
+ "node_modules/pouchdb": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-3.6.0.tgz",
+ "integrity": "sha512-j4lx9L3QFd5QjDJOR+n8z45v44DJrttzh41RQwSP4XZAfmhWw5oVB1gUya0Clo2vMxVK7VOIrXp+5ZxUYwi4+Q==",
+ "dependencies": {
+ "argsarray": "0.0.1",
+ "bluebird": "^1.2.4",
+ "debug": "^2.1.2",
+ "double-ended-queue": "^2.0.0-0",
+ "es3ify": "^0.1.3",
+ "express": "^4.10.4",
+ "inherits": "~2.0.1",
+ "level-js": "^2.1.3",
+ "level-sublevel": "~5.2.0",
+ "levelup": "~0.18.4",
+ "lie": "^2.6.0",
+ "localstorage-down": "^0.6.2",
+ "memdown": "^1.0.0",
+ "miller-rabin": "1.1.1",
+ "pouchdb-collate": "^1.2.0",
+ "pouchdb-collections": "^1.0.0",
+ "pouchdb-extend": "^0.1.2",
+ "pouchdb-mapreduce": "~2.3.2",
+ "pouchdb-upsert": "^1.0.2",
+ "request": "~2.28.0",
+ "spark-md5": "0.0.5",
+ "through2": "^0.4.1",
+ "vuvuzela": "^1.0.0"
+ },
+ "optionalDependencies": {
+ "leveldown": "~0.10.2"
+ }
+ },
+ "node_modules/pouchdb-collate": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-1.2.0.tgz",
+ "integrity": "sha512-8GPHMn5qCUkIsDNLh0Z8wLwXcXu4Ep4SdgSLjhIMs2KTt1MjVvPQT4vSa0tsQ8FQpstJ4SZzZQKKsbDYVjBz6Q==",
+ "license": "Apache"
+ },
+ "node_modules/pouchdb-collections": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-1.0.1.tgz",
+ "integrity": "sha512-31db6JRg4+4D5Yzc2nqsRqsA2oOkZS8DpFav3jf/qVNBxusKa2ClkEIZ2bJNpaDbMfWtnuSq59p6Bn+CipPMdg==",
+ "license": "Apache 2"
+ },
+ "node_modules/pouchdb-extend": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/pouchdb-extend/-/pouchdb-extend-0.1.2.tgz",
+ "integrity": "sha512-aGWbcFJNQLAdv30hExdFE8fhjsoOsyxv5s1TBNPSc6noTu4MX9n0s3h+YhWyJaE75SOTFbpmimuvXx9qONjI8w==",
+ "license": "MIT"
+ },
+ "node_modules/pouchdb-mapreduce": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/pouchdb-mapreduce/-/pouchdb-mapreduce-2.3.2.tgz",
+ "integrity": "sha512-xAVLFkvcfGYvKShfRrxcg2QqsSvo1eLImpcHSDlh2SP74VkrbjjTPpm0RNwCJyII5jORXwJcJ2Rt4towYn4V5w==",
+ "license": "Apache",
+ "dependencies": {
+ "argsarray": "0.0.1",
+ "es3ify": "^0.1.3",
+ "inherits": "~2.0.1",
+ "lie": "^2.6.0",
+ "pouchdb-collate": "^1.2.0",
+ "pouchdb-extend": "^0.1.0",
+ "pouchdb-upsert": "^1.0.2",
+ "spark-md5": "0.0.5"
+ }
+ },
+ "node_modules/pouchdb-upsert": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-upsert/-/pouchdb-upsert-1.1.3.tgz",
+ "integrity": "sha512-4KFEhoNvczLLPySGloya/xD6oGOebF2Yoztw3UiFWXjFioZKVzACwbEnSwoUebFZdnhGYQYRuyZ8nuyZLtFVXQ==",
+ "license": "Apache",
+ "dependencies": {
+ "es3ify": "^0.1.3",
+ "lie": "^2.6.0"
+ }
+ },
+ "node_modules/pouchdb/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/pouchdb/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/pouchdb/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/pouchdb/node_modules/through2": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
+ "integrity": "sha512-45Llu+EwHKtAZYTPPVn3XZHBgakWMN3rokhEv5hu596XP+cNgplMg+Gj+1nmAvj+L0K7+N49zBKx5rah5u0QIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "~1.0.17",
+ "xtend": "~2.1.1"
}
},
"node_modules/preact": {
- "version": "10.27.0",
- "resolved": "https://registry.npmjs.org/preact/-/preact-10.27.0.tgz",
- "integrity": "sha512-/DTYoB6mwwgPytiqQTh/7SFRL98ZdiD8Sk8zIUVOxtwq4oWcwrcd1uno9fE/zZmUaUrFNYzbH14CPebOz9tZQw==",
+ "version": "10.27.1",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.27.1.tgz",
+ "integrity": "sha512-V79raXEWch/rbqoNc7nT9E4ep7lu+mI3+sBmfRD4i1M73R3WLYcCtdI0ibxGVf4eQL8ZIz2nFacqEC+rmnOORQ==",
"license": "MIT",
"funding": {
"type": "opencollective",
@@ -7173,19 +8995,56 @@
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
+ "node_modules/private": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
+ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==",
+ "license": "MIT"
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/prr": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
+ "integrity": "sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==",
"license": "MIT"
},
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/qs": {
- "version": "6.14.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
- "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"license": "BSD-3-Clause",
"dependencies": {
- "side-channel": "^1.1.0"
+ "side-channel": "^1.0.6"
},
"engines": {
"node": ">=0.6"
@@ -7194,6 +9053,27 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/quill": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/quill/-/quill-2.0.2.tgz",
@@ -7224,15 +9104,15 @@
}
},
"node_modules/quill-resize-module": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/quill-resize-module/-/quill-resize-module-2.0.4.tgz",
- "integrity": "sha512-RzKj4qSrZB3Kjgi3QjxDmGR96bQI7XOwFenLvdWdzSecSf5eD1BMIXQcvKBp7BwBX+9OilHOyQ13TJT9MW11Ig==",
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/quill-resize-module/-/quill-resize-module-2.0.6.tgz",
+ "integrity": "sha512-7QqhRmh0rZr4PrjV+ZlOZBIS/9Mw4TjjO5nn/qYEveLtcIH6uwxf2Rb7PykE4adaeuRlUSVjm0YBdAjEGBI/Sw==",
"license": "MIT"
},
"node_modules/quill-table-better": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/quill-table-better/-/quill-table-better-1.2.1.tgz",
- "integrity": "sha512-2N7Nhu29I6O3P5cfLH8soDY1462XOqvIko42SNyyrcG+nni/BSUcZK3+SejTegg7/WuICBG4rHFr/neYLEQeBg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/quill-table-better/-/quill-table-better-1.2.3.tgz",
+ "integrity": "sha512-AlXGuIPhNx0B65DI7eCbGsEThxGWc0gLsd3Y+3NpMaPkFIQpcDCk0htrD2BzNLynOF/Euja1BkHnzjkVz3QFGw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.17.9",
@@ -7245,6 +9125,56 @@
"node": ">= 14.15.0"
}
},
+ "node_modules/quote-stream": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz",
+ "integrity": "sha512-kKr2uQ2AokadPjvTyKJQad9xELbZwYzWlNfI3Uz2j/ib5u6H9lDP7fUUR//rMycd0gv4Z5P1qXMfXR8YpIxrjQ==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer-equal": "0.0.1",
+ "minimist": "^1.1.3",
+ "through2": "^2.0.0"
+ },
+ "bin": {
+ "quote-stream": "bin/cmd.js"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/raw-body/node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/read-package-up": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz",
@@ -7283,52 +9213,60 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/read-pkg/node_modules/parse-json": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz",
- "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.26.2",
- "index-to-position": "^1.1.0",
- "type-fest": "^4.39.1"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/readable-stream": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
- "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "integrity": "sha512-TXcFfb63BQe1+ySzsHZI/5v1aJPCShfqvWJ64ayNImXMsN1Cd0YGk/wm8KB7/OeessgPc9QvS9Zou8QTkFzsLw==",
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
+ "inherits": "~2.0.1",
"isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
"util-deprecate": "~1.0.1"
}
},
- "node_modules/readable-stream/node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "node_modules/readable-stream/node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"license": "MIT"
},
- "node_modules/readable-stream/node_modules/string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "node_modules/recast": {
+ "version": "0.10.43",
+ "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz",
+ "integrity": "sha512-GC1g4P336t8WOpzVGFOo83m14xQfHbVqe+eDus+4oubobkWb/kONwMWSG6+K3BUtBOoUdUU+GT9kmNCSOBv9+g==",
"license": "MIT",
"dependencies": {
- "safe-buffer": "~5.1.0"
+ "ast-types": "0.8.15",
+ "esprima-fb": "~15001.1001.0-dev-harmony-fb",
+ "private": "~0.1.5",
+ "source-map": "~0.5.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/recast/node_modules/esprima-fb": {
+ "version": "15001.1001.0-dev-harmony-fb",
+ "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
+ "integrity": "sha512-m7OsYzocA8OQ3+9CxmhIv7NPHtyDR2ixaLCO7kLZ+YH+xQ/BpaZmll9EXmc+kBxzWA8BRBXbNEuEQqQ6vfsgDw==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/recast/node_modules/source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
}
},
"node_modules/rechoir": {
@@ -7384,12 +9322,6 @@
"node": ">=4"
}
},
- "node_modules/regenerator-runtime": {
- "version": "0.14.1",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
- "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
- "license": "MIT"
- },
"node_modules/regexp-tree": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz",
@@ -7467,11 +9399,43 @@
"node": ">=6"
}
},
+ "node_modules/request": {
+ "version": "2.28.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.28.0.tgz",
+ "integrity": "sha512-6Z/lLMHDdBk4Gq7bVGfpkfa3vprifgKqwvwVYjf5tt7UZJjIyz1AC4fmnTJikLkW74bgdE3FR0XF4r1mf7cmlg==",
+ "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
+ "engines": [
+ "node >= 0.8.0"
+ ],
+ "dependencies": {
+ "forever-agent": "~0.5.0",
+ "json-stringify-safe": "~5.0.0",
+ "mime": "~1.2.9",
+ "node-uuid": "~1.4.0",
+ "qs": "~0.6.0"
+ },
+ "optionalDependencies": {
+ "aws-sign2": "~0.5.0",
+ "form-data": "~0.1.0",
+ "hawk": "~1.0.0",
+ "http-signature": "~0.10.0",
+ "oauth-sign": "~0.3.0",
+ "tough-cookie": "~0.9.15",
+ "tunnel-agent": "~0.3.0"
+ }
+ },
+ "node_modules/request/node_modules/qs": {
+ "version": "0.6.6",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz",
+ "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/requirejs": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.7.tgz",
"integrity": "sha512-DouTG8T1WanGok6Qjg2SXuCMzszOo0eHeH9hDZ5Y4x8Je+9JB38HdTLT4/VA8OaUhBa0JPVHJ0pyBkM1z+pDsw==",
- "dev": true,
"license": "MIT",
"bin": {
"r_js": "bin/r.js",
@@ -7524,6 +9488,17 @@
"node": ">=4"
}
},
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -7539,9 +9514,9 @@
}
},
"node_modules/rollup": {
- "version": "4.45.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.45.1.tgz",
- "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==",
+ "version": "4.50.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.1.tgz",
+ "integrity": "sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7555,26 +9530,27 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.45.1",
- "@rollup/rollup-android-arm64": "4.45.1",
- "@rollup/rollup-darwin-arm64": "4.45.1",
- "@rollup/rollup-darwin-x64": "4.45.1",
- "@rollup/rollup-freebsd-arm64": "4.45.1",
- "@rollup/rollup-freebsd-x64": "4.45.1",
- "@rollup/rollup-linux-arm-gnueabihf": "4.45.1",
- "@rollup/rollup-linux-arm-musleabihf": "4.45.1",
- "@rollup/rollup-linux-arm64-gnu": "4.45.1",
- "@rollup/rollup-linux-arm64-musl": "4.45.1",
- "@rollup/rollup-linux-loongarch64-gnu": "4.45.1",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.45.1",
- "@rollup/rollup-linux-riscv64-gnu": "4.45.1",
- "@rollup/rollup-linux-riscv64-musl": "4.45.1",
- "@rollup/rollup-linux-s390x-gnu": "4.45.1",
- "@rollup/rollup-linux-x64-gnu": "4.45.1",
- "@rollup/rollup-linux-x64-musl": "4.45.1",
- "@rollup/rollup-win32-arm64-msvc": "4.45.1",
- "@rollup/rollup-win32-ia32-msvc": "4.45.1",
- "@rollup/rollup-win32-x64-msvc": "4.45.1",
+ "@rollup/rollup-android-arm-eabi": "4.50.1",
+ "@rollup/rollup-android-arm64": "4.50.1",
+ "@rollup/rollup-darwin-arm64": "4.50.1",
+ "@rollup/rollup-darwin-x64": "4.50.1",
+ "@rollup/rollup-freebsd-arm64": "4.50.1",
+ "@rollup/rollup-freebsd-x64": "4.50.1",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.50.1",
+ "@rollup/rollup-linux-arm-musleabihf": "4.50.1",
+ "@rollup/rollup-linux-arm64-gnu": "4.50.1",
+ "@rollup/rollup-linux-arm64-musl": "4.50.1",
+ "@rollup/rollup-linux-loongarch64-gnu": "4.50.1",
+ "@rollup/rollup-linux-ppc64-gnu": "4.50.1",
+ "@rollup/rollup-linux-riscv64-gnu": "4.50.1",
+ "@rollup/rollup-linux-riscv64-musl": "4.50.1",
+ "@rollup/rollup-linux-s390x-gnu": "4.50.1",
+ "@rollup/rollup-linux-x64-gnu": "4.50.1",
+ "@rollup/rollup-linux-x64-musl": "4.50.1",
+ "@rollup/rollup-openharmony-arm64": "4.50.1",
+ "@rollup/rollup-win32-arm64-msvc": "4.50.1",
+ "@rollup/rollup-win32-ia32-msvc": "4.50.1",
+ "@rollup/rollup-win32-x64-msvc": "4.50.1",
"fsevents": "~2.3.2"
}
},
@@ -7591,6 +9567,36 @@
"rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
}
},
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/rw": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
+ "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
+ "license": "BSD-3-Clause"
+ },
"node_modules/rxn-parser": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/rxn-parser/-/rxn-parser-0.1.2.tgz",
@@ -7694,7 +9700,6 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true,
"license": "MIT"
},
"node_modules/sanitize-html": {
@@ -7710,20 +9715,97 @@
"postcss": "^7.0.27"
}
},
- "node_modules/seed-random": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz",
- "integrity": "sha512-34EQV6AAHQGhoc0tn/96a9Fsi6v2xdqe/dMUwljGRaFOzR3EgRmECvD0O8vi8X+/uQ50LGHfkNu/Eue5TPKZkQ==",
+ "node_modules/seedrandom": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
+ "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.19.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/send/node_modules/debug/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"license": "MIT"
},
- "node_modules/semver": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
- "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
- "dev": true,
- "license": "ISC",
+ "node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/send/node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
"bin": {
- "semver": "bin/semver"
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.19.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
}
},
"node_modules/set-function-length": {
@@ -7772,6 +9854,22 @@
"node": ">= 0.4"
}
},
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/sexagesimal": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/sexagesimal/-/sexagesimal-0.5.0.tgz",
+ "integrity": "sha512-xwbZEEGr5SQxON2PskNQQmPjrir+rnkaAoZqeHEDQ29fElSgpOh2rA5tBmZZd07NyBgUpU5/budc6wWm2Wjy+w==",
+ "deprecated": "This module is now under the @mapbox namespace: install @mapbox/sexagesimal instead",
+ "license": "BSD",
+ "bin": {
+ "sexagesimal": "bin/sexagesimal"
+ }
+ },
"node_modules/shallow-clone": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
@@ -7784,6 +9882,61 @@
"node": ">=8"
}
},
+ "node_modules/shallow-copy": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz",
+ "integrity": "sha512-b6i4ZpVuUxB9h5gfCxPiusKYkqTMOjEbBs4wMaFbkfia4yFv92UKZ6Df8WXcKbn08JNL/abvg3FnMAOfakDvUw==",
+ "license": "MIT"
+ },
+ "node_modules/shapefile": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/shapefile/-/shapefile-0.3.1.tgz",
+ "integrity": "sha512-BZoPvnq4ULce0pyKiZUU4D8CdPl0Z1fpE73AeCkwyMbD2hpUeVA0s7jIE/wX8uWNruVeJV6e+rznPHBwuH5J6g==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "d3-queue": "1",
+ "iconv-lite": "0.2",
+ "optimist": "0.3"
+ },
+ "bin": {
+ "dbfcat": "bin/dbfcat",
+ "shp2json": "bin/shp2json",
+ "shpcat": "bin/shpcat"
+ }
+ },
+ "node_modules/shapefile/node_modules/d3-queue": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/d3-queue/-/d3-queue-1.2.3.tgz",
+ "integrity": "sha512-m6KtxX4V5pmVf1PqhH4SkQVMshSJfyCLM2vf2oFPi9FWFVT3+rtbCGerk766b/JXymHQDU3oqXHaZoiQ/e8yUQ==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/shapefile/node_modules/iconv-lite": {
+ "version": "0.2.11",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
+ "integrity": "sha512-KhmFWgaQZY83Cbhi+ADInoUQ8Etn6BG5fikM9syeOjQltvR45h7cRKJ/9uvQEuD61I3Uju77yYce0/LhKVClQw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/shapefile/node_modules/optimist": {
+ "version": "0.3.7",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz",
+ "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==",
+ "license": "MIT/X11",
+ "dependencies": {
+ "wordwrap": "~0.0.2"
+ }
+ },
+ "node_modules/shapefile/node_modules/wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -7886,6 +10039,35 @@
"lodash.escaperegexp": "^4.1.2"
}
},
+ "node_modules/sntp": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz",
+ "integrity": "sha512-bDLrKa/ywz65gCl+LmOiIhteP1bhEsAAzhfMedPoiHP3dyYnAevlaJshdqb9Yu0sRifyP/fRqSt8t+5qGIWlGQ==",
+ "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.",
+ "optional": true,
+ "dependencies": {
+ "hoek": "0.9.x"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "devOptional": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/spark-md5": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-0.0.5.tgz",
+ "integrity": "sha512-QGtEdz/0/MI86uAb2Wy4AbuNNGFw0bWeOstjN64xXF9mXn07gx3ZYhVebvmPLnmT8Zb5xyWJQyCvbuytVe4hWA==",
+ "license": "WTFPL"
+ },
"node_modules/spdx-correct": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
@@ -7927,9 +10109,9 @@
}
},
"node_modules/spdx-license-ids": {
- "version": "3.0.21",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz",
- "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==",
+ "version": "3.0.22",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz",
+ "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==",
"dev": true,
"license": "CC0-1.0"
},
@@ -7940,6 +10122,226 @@
"dev": true,
"license": "BSD-3-Clause"
},
+ "node_modules/static-eval": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz",
+ "integrity": "sha512-6dWWPfa/0+1zULdQi7ssT5EQZHsGK8LygBzhE/HdafNCo4e/Ibt7vLPfxBw9VcdVV+t0ARtN4ZAJKtApVc0A5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "escodegen": "~0.0.24"
+ }
+ },
+ "node_modules/static-eval/node_modules/escodegen": {
+ "version": "0.0.28",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.28.tgz",
+ "integrity": "sha512-6ioQhg16lFs5c7XJlJFXIDxBjO4yRvXC9yK6dLNNGuhI3a/fJukHanPF6qtpjGDgAFzI8Wuq3PSIarWmaOq/5A==",
+ "dependencies": {
+ "esprima": "~1.0.2",
+ "estraverse": "~1.3.0"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "optionalDependencies": {
+ "source-map": ">= 0.1.2"
+ }
+ },
+ "node_modules/static-eval/node_modules/esprima": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
+ "integrity": "sha512-rp5dMKN8zEs9dfi9g0X1ClLmV//WRyk/R15mppFNICIFRG5P92VP7Z04p8pk++gABo9W2tY+kHyu6P1mEHgmTA==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/static-eval/node_modules/estraverse": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.3.2.tgz",
+ "integrity": "sha512-OkbCPVUu8D9tbsLcUR+CKFRBbhZlogmkbWaP3BPERlkqzWL5Q6IdTz6eUk+b5cid2MTaCqJb2nNRGoJ8TpfPrg==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/static-module": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/static-module/-/static-module-1.5.0.tgz",
+ "integrity": "sha512-XTj7pQOHT33l77lK/Pu8UXqzI44C6LYAqwAc9hLTTESHRqJAFudBpReuopFPpoRr5CtOoSmGfFQC6FPlbDnyCw==",
+ "license": "MIT",
+ "dependencies": {
+ "concat-stream": "~1.6.0",
+ "duplexer2": "~0.0.2",
+ "escodegen": "~1.3.2",
+ "falafel": "^2.1.0",
+ "has": "^1.0.0",
+ "object-inspect": "~0.4.0",
+ "quote-stream": "~0.0.0",
+ "readable-stream": "~1.0.27-1",
+ "shallow-copy": "~0.0.1",
+ "static-eval": "~0.2.0",
+ "through2": "~0.4.1"
+ }
+ },
+ "node_modules/static-module/node_modules/acorn": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/static-module/node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/concat-stream": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+ "engines": [
+ "node >= 0.8"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "node_modules/static-module/node_modules/concat-stream/node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/concat-stream/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/static-module/node_modules/concat-stream/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/static-module/node_modules/falafel": {
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz",
+ "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^7.1.1",
+ "isarray": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/static-module/node_modules/falafel/node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/object-inspect": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz",
+ "integrity": "sha512-8WvkvUZiKAjjsy/63rJjA7jw9uyF0CLVLjBKEfnPHE3Jxvs1LgwqL2OmJN+LliIX1vrzKW+AAu02Cc+xv27ncQ==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/quote-stream": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-0.0.0.tgz",
+ "integrity": "sha512-m4VtvjAMx00wgAS6eOy50ZDat1EBQeFKBIrtF/oxUt0MenEI33y7runJcRiOihc+JBBIt2aFFJhILIh4e9shJA==",
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "0.0.8",
+ "through2": "~0.4.1"
+ }
+ },
+ "node_modules/static-module/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/static-module/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
+ "node_modules/static-module/node_modules/through2": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz",
+ "integrity": "sha512-45Llu+EwHKtAZYTPPVn3XZHBgakWMN3rokhEv5hu596XP+cNgplMg+Gj+1nmAvj+L0K7+N49zBKx5rah5u0QIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "~1.0.17",
+ "xtend": "~2.1.1"
+ }
+ },
+ "node_modules/static-module/node_modules/typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+ "license": "MIT"
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/stop-iteration-iterator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
@@ -7953,6 +10355,18 @@
"node": ">= 0.4"
}
},
+ "node_modules/string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
+ "license": "MIT"
+ },
+ "node_modules/string-range": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz",
+ "integrity": "sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==",
+ "license": "MIT"
+ },
"node_modules/string.prototype.trim": {
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
@@ -8022,16 +10436,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/strip-ansi/node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
@@ -8069,35 +10473,94 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/superagent": {
- "version": "3.8.3",
- "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz",
- "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==",
- "deprecated": "Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net",
+ "node_modules/superagent": {
+ "version": "10.2.3",
+ "resolved": "https://registry.npmjs.org/superagent/-/superagent-10.2.3.tgz",
+ "integrity": "sha512-y/hkYGeXAj7wUMjxRbB21g/l6aAEituGXM9Rwl4o20+SX3e8YOSV6BxFXl+dL3Uk0mjSL3kCbNkwURm8/gEDig==",
+ "license": "MIT",
+ "dependencies": {
+ "component-emitter": "^1.3.1",
+ "cookiejar": "^2.1.4",
+ "debug": "^4.3.7",
+ "fast-safe-stringify": "^2.1.1",
+ "form-data": "^4.0.4",
+ "formidable": "^3.5.4",
+ "methods": "^1.1.2",
+ "mime": "2.6.0",
+ "qs": "^6.11.2"
+ },
+ "engines": {
+ "node": ">=14.18.0"
+ }
+ },
+ "node_modules/superagent/node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/superagent/node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/superagent/node_modules/form-data": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
+ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/superagent/node_modules/mime": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
+ "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
"license": "MIT",
- "dependencies": {
- "component-emitter": "^1.2.0",
- "cookiejar": "^2.1.0",
- "debug": "^3.1.0",
- "extend": "^3.0.0",
- "form-data": "^2.3.1",
- "formidable": "^1.2.0",
- "methods": "^1.1.1",
- "mime": "^1.4.1",
- "qs": "^6.5.1",
- "readable-stream": "^2.3.5"
+ "bin": {
+ "mime": "cli.js"
},
"engines": {
- "node": ">= 4.0"
+ "node": ">=4.0.0"
}
},
- "node_modules/superagent/node_modules/debug": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "node_modules/superagent/node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/superagent/node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
- "ms": "^2.1.1"
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
}
},
"node_modules/supports-color": {
@@ -8148,12 +10611,85 @@
"node": ">=8"
}
},
+ "node_modules/through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
+ "license": "MIT"
+ },
+ "node_modules/through2": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": "~2.3.6",
+ "xtend": "~4.0.1"
+ }
+ },
+ "node_modules/through2/node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "license": "MIT"
+ },
+ "node_modules/through2/node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
+ },
+ "node_modules/through2/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/through2/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
+ "node_modules/through2/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/through2/node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==",
"license": "MIT"
},
+ "node_modules/tiny-queue": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/tiny-queue/-/tiny-queue-0.2.0.tgz",
+ "integrity": "sha512-ucfrvjzfbtc+xqmn95DEUtGcDHJHQgZ9IR0mizPOZBkY45reZDCJjafUGVJOGJassjn0MavTyWOCQcG+agpLxw==",
+ "license": "Apache 2"
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -8167,6 +10703,128 @@
"node": ">=8.0"
}
},
+ "node_modules/togeojson": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/togeojson/-/togeojson-0.13.0.tgz",
+ "integrity": "sha512-d8qA5mSUpnqYBQDuq0Lhgl1rMUOWwrHh50Qy00qkk3SuwjYnaxZR2h8pXMOrMGa6d/7m1YmStOI4CMRa14K46A==",
+ "deprecated": "This module has moved: please install @mapbox/togeojson instead",
+ "license": "BSD",
+ "dependencies": {
+ "concat-stream": "~1.4.5",
+ "minimist": "0.0.8",
+ "xmldom": "~0.1.19"
+ },
+ "bin": {
+ "togeojson": "togeojson"
+ }
+ },
+ "node_modules/togeojson/node_modules/concat-stream": {
+ "version": "1.4.11",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.11.tgz",
+ "integrity": "sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw==",
+ "engines": [
+ "node >= 0.8"
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "readable-stream": "~1.1.9",
+ "typedarray": "~0.0.5"
+ }
+ },
+ "node_modules/togeojson/node_modules/minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==",
+ "license": "MIT"
+ },
+ "node_modules/togeojson/node_modules/readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/topojson": {
+ "version": "1.6.26",
+ "resolved": "https://registry.npmjs.org/topojson/-/topojson-1.6.26.tgz",
+ "integrity": "sha512-W0B6UMeC9ZzH6OQ4vWG8tGb6ITis7/gDG0nNq13GL/ysy1LKU07HM0GtjQMrecQ/Q8S5EP7sjpjBjoKiz6P3nQ==",
+ "deprecated": "Use topojson-client, topojson-server or topojson-simplify directly.",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "d3": "3",
+ "d3-geo-projection": "0.2",
+ "d3-queue": "2",
+ "optimist": "0.3",
+ "rw": "1",
+ "shapefile": "0.3"
+ },
+ "bin": {
+ "topojson": "bin/topojson",
+ "topojson-geojson": "bin/topojson-geojson",
+ "topojson-group": "bin/topojson-group",
+ "topojson-merge": "bin/topojson-merge",
+ "topojson-svg": "bin/topojson-svg"
+ }
+ },
+ "node_modules/topojson/node_modules/optimist": {
+ "version": "0.3.7",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz",
+ "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==",
+ "license": "MIT/X11",
+ "dependencies": {
+ "wordwrap": "~0.0.2"
+ }
+ },
+ "node_modules/topojson/node_modules/wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/tough-cookie": {
+ "version": "0.9.15",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz",
+ "integrity": "sha512-j4C2GYjRuBjEGRgF5eIvxSvUkTXk7KJDAX6SZtlDWNioUlCcW4lLSlETSWWSiVbXS6SOB+LUK7PYn0RDxgJ3pQ==",
+ "deprecated": "ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130",
+ "optional": true,
+ "dependencies": {
+ "punycode": ">=0.2.0"
+ },
+ "engines": {
+ "node": ">=0.4.12"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
+ "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@@ -8191,6 +10849,15 @@
"json5": "lib/cli.js"
}
},
+ "node_modules/tunnel-agent": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz",
+ "integrity": "sha512-jlGqHGoKzyyjhwv/c9omAgohntThMcGtw8RV/RDLlkbbc08kni/akVxO62N8HaXMVbVsK1NCnpSK3N2xCt22ww==",
+ "optional": true,
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/twig": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/twig/-/twig-1.17.1.tgz",
@@ -8234,9 +10901,9 @@
}
},
"node_modules/type-fest": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.40.1.tgz",
- "integrity": "sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==",
+ "version": "4.41.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
+ "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"engines": {
@@ -8246,6 +10913,40 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/type-is/node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/type-is/node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
@@ -8321,11 +11022,42 @@
}
},
"node_modules/typed-function": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-1.1.0.tgz",
- "integrity": "sha512-TuQzwiT4DDg19beHam3E66oRXhyqlyfgjHB/5fcvsRXbfmWPJfto9B4a0TBdTrQAPGlGmXh/k7iUI+WsObgORA==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-4.2.1.tgz",
+ "integrity": "sha512-EGjWssW7Tsk4DGfE+5yluuljS1OGYWiI1J6e8puZz9nTMM51Oug8CD5Zo4gWMsOhq5BI+1bF+rWTm4Vbj3ivRA==",
+ "license": "MIT",
"engines": {
- "node": ">= 6"
+ "node": ">= 18"
+ }
+ },
+ "node_modules/typedarray": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.7.tgz",
+ "integrity": "sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typedarray-to-buffer": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz",
+ "integrity": "sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==",
+ "license": "MIT"
+ },
+ "node_modules/typescript": {
+ "version": "5.9.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
+ "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
}
},
"node_modules/uglify-js": {
@@ -8443,6 +11175,57 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/unreachable-branch-transform": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.2.3.tgz",
+ "integrity": "sha512-sC1tzgcokfmS1WbdNYWHihhqA6a5x6p7Te17lCPKGuewYOEWiL8J2AH1JcwGNCOgn5iFt9Y2prJFCIyp9yNuYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "esmangle-evaluator": "^1.0.0",
+ "recast": "^0.10.1",
+ "through2": "^0.6.2"
+ }
+ },
+ "node_modules/unreachable-branch-transform/node_modules/readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "node_modules/unreachable-branch-transform/node_modules/through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==",
+ "license": "MIT",
+ "dependencies": {
+ "readable-stream": ">=1.0.33-1 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ }
+ },
+ "node_modules/unreachable-branch-transform/node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
"node_modules/update-browserslist-db": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
@@ -8482,21 +11265,21 @@
"punycode": "^2.1.0"
}
},
- "node_modules/uri-js/node_modules/punycode": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
- "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
"node_modules/uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
@@ -8540,6 +11323,30 @@
"spdx-license-ids": "^3.0.0"
}
},
+ "node_modules/vanilla-picker": {
+ "version": "2.12.3",
+ "resolved": "https://registry.npmjs.org/vanilla-picker/-/vanilla-picker-2.12.3.tgz",
+ "integrity": "sha512-qVkT1E7yMbUsB2mmJNFmaXMWE2hF8ffqzMMwe9zdAikd8u2VfnsVY2HQcOUi2F38bgbxzlJBEdS1UUhOXdF9GQ==",
+ "license": "ISC",
+ "dependencies": {
+ "@sphinxxxx/color-conversion": "^2.2.2"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vuvuzela": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz",
+ "integrity": "sha512-Tm7jR1xTzBbPW+6y1tknKiEhz04Wf/1iZkcTJjSFcpNko43+dFW6+OOeQe9taJIug3NdfUAjFKgUSyQrIKaDvQ==",
+ "license": "Apache-2.0"
+ },
"node_modules/walk": {
"version": "2.3.15",
"resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz",
@@ -8563,6 +11370,25 @@
"node": ">=10.0.0"
}
},
+ "node_modules/wellknown": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/wellknown/-/wellknown-0.4.2.tgz",
+ "integrity": "sha512-ivKT+rEy/GKU3q4Yi0dT/OnkMPXmUJF0SoPwthcCh2cr4PFeEeFjIENV3kB2WF7KgLakl2J0kbkcEMDl3WXSUA==",
+ "license": "BSD",
+ "dependencies": {
+ "concat-stream": "~1.5.0",
+ "minimist": "~1.1.2"
+ },
+ "bin": {
+ "wellknown": "cli.js"
+ }
+ },
+ "node_modules/wellknown/node_modules/minimist": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz",
+ "integrity": "sha512-2RbeLaM/Hbo9vJ1+iRrxzfDnX9108qb2m923U+s+Ot2eMey0IYGdSjzHmvtg2XsxoCuMnzOMw7qc573RvnLgwg==",
+ "license": "MIT"
+ },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -8695,9 +11521,35 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true,
"license": "ISC"
},
+ "node_modules/xmldom": {
+ "version": "0.1.31",
+ "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz",
+ "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==",
+ "deprecated": "Deprecated due to CVE-2021-21366 resolved in 0.5.0",
+ "license": "(LGPL-2.0 or MIT)",
+ "engines": {
+ "node": ">=0.1"
+ }
+ },
+ "node_modules/xtend": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
+ "integrity": "sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==",
+ "dependencies": {
+ "object-keys": "~0.4.0"
+ },
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/xtend/node_modules/object-keys": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
+ "integrity": "sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==",
+ "license": "MIT"
+ },
"node_modules/yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
diff --git a/package.json b/package.json
index ab6581503d..5c7448a1e4 100644
--- a/package.json
+++ b/package.json
@@ -40,15 +40,15 @@
"url": "https://github.com/NPellet/visualizer.git"
},
"devDependencies": {
- "@babel/types": "^7.28.1",
+ "@babel/types": "^7.28.4",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"add-stream": "^1.0.0",
"bower": "^1.8.14",
"conventional-changelog": "^6.0.0",
- "eslint": "^9.31.0",
- "eslint-config-cheminfo": "^14.1.1",
+ "eslint": "^9.35.0",
+ "eslint-config-cheminfo": "^15.0.2",
"extend": "^3.0.2",
"globals": "^16.3.0",
"grunt": "^1.6.1",
@@ -61,37 +61,52 @@
"lodash": "^4.17.21",
"mkpath": "^1.0.0",
"prettier": "^3.6.2",
- "rollup": "^4.45.1",
+ "rollup": "^4.50.1",
"rollup-plugin-polyfill-node": "^0.13.0",
- "semver": "^5.7.2",
"tempfile": "^3.0.0",
"walk": "^2.3.15"
},
"private": true,
"dependencies": {
- "@babel/preset-env": "^7.28.0",
- "@fortawesome/fontawesome-free": "^6.7.2",
+ "@babel/preset-env": "^7.28.3",
+ "@fortawesome/fontawesome-free": "^7.0.1",
+ "@mapbox/leaflet-omnivore": "^0.3.4",
"angularplasmid": "^1.0.5",
"babel-preset-minify": "^0.5.2",
"country-data": "0.0.31",
- "d3-hierarchy": "^1.1.9",
"delay": "^4.4.1",
"eslint-plugin-import": "^2.32.0",
- "katex": "^0.10.0",
- "mathjs": "^5.10.3",
- "mf-parser": "^1.5.0",
- "mime-types": "^2.1.35",
+ "jquery": "^3.7.1",
+ "jquery-migrate": "^3.5.2",
+ "jquery-ui": "^1.14.1",
+ "jquery.fancytree": "^2.38.5",
+ "jsbarcode": "^3.12.1",
+ "json-chart": "^1.1.0",
+ "jsoneditor": "^10.4.1",
+ "katex": "^0.16.22",
+ "leaflet": "^1.9.4",
+ "marked": "^0.3.19",
+ "mathjs": "^14.7.0",
+ "mf-parser": "^3.6.0",
+ "mime-types": "^3.0.1",
+ "moment": "^2.30.1",
+ "moment-duration-format": "^2.3.2",
"node-jsgraph": "2.4.15",
- "openchemlib": "^9.6.0",
- "quill": "^2.0.2",
- "quill-resize-module": "^2.0.4",
- "quill-table-better": "^1.2.1",
+ "numeral": "^2.0.6",
+ "openchemlib": "^9.7.0",
+ "papaparse": "^5.5.3",
+ "pouchdb": "^3.6.0",
+ "quill": "2.0.2",
+ "quill-resize-module": "^2.0.6",
+ "quill-table-better": "^1.2.3",
+ "requirejs": "^2.3.7",
"rxn-renderer": "^1.0.2",
+ "semver": "^7.7.2",
"smart-array-filter": "^4.1.1",
- "superagent": "^3.8.3",
+ "superagent": "^10.2.3",
"twig": "^1.17.1"
},
"volta": {
- "node": "20.19.1"
+ "node": "20.19.5"
}
}
diff --git a/rollup.config.mjs b/rollup.config.mjs
index 8f175a6641..6997ec221f 100644
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -25,7 +25,16 @@ export default [
plugins,
},
{
- input: 'node_modules/mf-parser/src/index.js',
+ input: 'node_modules/json-chart/src/index.js',
+ output: {
+ file: 'src/browserified/json-chart/json-chart.js',
+ format: 'umd',
+ name: 'JSONChart',
+ },
+ plugins,
+ },
+ {
+ input: 'node_modules/mf-parser/lib/src/index.js',
output: {
file: 'src/browserified/MFParser/index.js',
format: 'umd',
@@ -59,6 +68,15 @@ export default [
},
plugins,
},
+ {
+ input: 'node_modules/semver/index.js',
+ output: {
+ file: 'src/browserified/semver/semver.js',
+ format: 'umd',
+ name: 'semver',
+ },
+ plugins,
+ },
{
input: 'node_modules/smart-array-filter/lib/index.js',
output: {
diff --git a/src/css/main.css b/src/css/main.css
index e681cdf6f9..746575e008 100644
--- a/src/css/main.css
+++ b/src/css/main.css
@@ -288,7 +288,7 @@ div.ci-module-header-toolbar ul {
}
div.ci-module-header-toolbar ul li {
- margin: 0 0 0 10px;
+ margin: 0 0 0 5px;
list-style-type: none;
cursor: pointer;
color: #666666;
diff --git a/src/index.html b/src/index.html
index 3f7d443c65..68188a5b0c 100644
--- a/src/index.html
+++ b/src/index.html
@@ -3,7 +3,7 @@
Visualizer
-
+
'
- ).appendTo('head');
-
- //
- // Add the click event to each character in the content
- // But remember, we must to figure out when 'Hello' is selected only
- this._container.find('span')
- .mousedown(function() {
-
- // Turn on the flag
- isMouseDown = true;
-
- // A new selection is starting
- // Reset all by removing the CSS "selected" class if already applied
- self._container.children('span').removeClass('selected')
-
- // Apply the class for this span/character
- // NOTE: "this" refers to the internal object 'span'
- // NOT to the component's instance
- jQuery(this).addClass('selected');
-
- }).mouseover(function() {
- // Check if the mouse is being dragged
- if (isMouseDown) {
- jQuery(this).addClass('selected');
- }
- })
- .mouseup(function() {
-
- /// Turn off the flag
- isMouseDown = false;
-
- var textSelected = '';
-
- // Get the entire selected word
- self._container.children('span.selected')
- .each(function(){
- textSelected += jQuery(this).text();
- });
-
- // Since requirements, only "Hello" word should be selected
- // to raise the event
- if (textSelected == 'Hello') {
- self.raiseEvent('onHelloSelected', {
- textSelected : textSelected
- })
- }
- });
- },
-
- _addSimpleClickTrigger: function () {
-
- var self = this;
-
- // Add the click event to each character in the content
- this._container.find('span')
- .click( function(e) {
- // A letter was clicked!
- // Let's discover which one was it
- // TIP: e.target contains the clicked DOM node
- var selected = jQuery(e.target).text();
-
- // Create an event object
- var evtObject = { "selected": selected };
-
- // We're ready to raise the event onClick of our component
- self.raiseEvent('onClick', evtObject);
- });
- }
-
-});
-
-
-
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.HelloWorldYUI.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.HelloWorldYUI.js
deleted file mode 100755
index 13571bdd3c..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.HelloWorldYUI.js
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * This is the description of the HelloWorldYUI component. Here you can set any HTML text
- * for putting on the generated documentation.
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 1
- *
- * @requires YUI Core 3.3.0
- * @dependency
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @param {Object} options An object with the options for HelloWorldYUI component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} [fontFamily=ÔŇAndale monoÓ, courier, monospaceŐ]
- * Font list to be applied to the component content.
- *
- * @option {string} [fontColor="white"]
- * HTML color code for the font.
- *
- * @option {string} [backgroundColor="#7BBFE9"]
- * Background color for the entire div content.
- *
- * @option {Object} [selectionFontColor="white"]
- * This color will be used to change the font color of selected text.
- *
- * @option {Object} [ selectionBackgroundColor="yellow"]
- * This color will be used to change the background of selected text.
- *
- * @example
- * var instance = new Biojs.HelloWorldYUI({
- * target : "YourOwnDivId",
- * selectionBackgroundColor : '#FFFF00'
- * });
- *
- */
-Biojs.HelloWorldYUI = Biojs.extend (
-/** @lends Biojs.HelloWorldYUI# */
-{
- constructor: function (options) {
- var self = this;
-// var toggleClass = function (span) {
-// span.toggleClass( 'selected' );
-// if ( span.hasClass('selected') ) {
-// span.css('color', self.opt.selectionFontColor)
-// .css("background-color", self.opt.selectionBackgroundColor);
-// } else {
-// span.css('color', self.opt.fontColor)
-// .css("background-color", self.opt.backgroundColor);
-// }
-// };
-//
-
- // Apply options values
- $("#"+self.opt.target).css({
- 'font-family': self.opt.fontFamily,
- 'background-color': self.opt.backgroundColor,
- 'color': self.opt.fontColor,
- 'font-size': '36px',
- 'text-align': 'center',
- 'vertical-align':'middle',
- 'display': 'table-cell',
- 'width': '597px',
- 'height': '300px'
- });
-
- // Disable text selection and
- // Change the selection mouse pointer
- // from text to hand.
- $("#"+self.opt.target).css({
- '-moz-user-select':'none',
- '-webkit-user-select':'none',
- 'user-select':'none'
- });
-
- // Set the content
- text = 'Hello World with YUI+jQuery!';
- contentHTML = '';
- for( i=0; i< text.length; i++ ) {
- contentHTML += '' + text[i] + ' ';
- }
- $( contentHTML ).appendTo( "#"+self.opt.target );
-
- // Internal method to initialize mouse events
- self._addSelectionTrigger();
- },
-
- /**
- * Default values for the options
- * @name Biojs.HelloWorldYUI-opt
- */
- opt: {
- target: "YourOwnDivId",
- fontFamily: '"Andale mono", courier, monospace',
- fontColor: "white",
- backgroundColor: "#7BBFE9",
- selectionFontColor: "black",
- selectionBackgroundColor: "yellow"
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.HelloWorldYUI-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.HelloWorldYUI#onHelloSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} textSelected Selected text, will be 'Hello' obviously.
- * @example
- * instance.onHelloSelected(
- * function( objEvent ) {
- * alert("The word " + objEvent.textSelected + " was selected.");
- * }
- * );
- *
- * */
- "onHelloSelected"
- ],
-
- /**
- * Change the font size. Do nothing it no value is provided.
- *
- * @param {string} [size] The new font size in pixels.
- *
- * @example
- * instance.setSize("72px");
- */
- setSize: function(size) {
- if ( size != undefined ){
- $("#"+this.opt.target).css('font-size', size);
- }
- },
-
- /**
- * Set text 'Hi there! who are you?'
- *
- * @example
- * instance.sayHello();
- */
- sayHello: function() {
- var self = this;
- // Set the content
- text = 'Hi there! who are you?';
- contentHTML = '';
- for( i=0; i< text.length; i++ ) {
- contentHTML += '' + text[i] + ' ';
- }
- $( "#"+self.opt.target ).html( contentHTML );
- },
-
-
-
- _addSelectionTrigger: function() {
-
- var self = this;
- var isMouseDown = false;
-
- /**
- * @private
- * @function
- */
- var toggleClass = function (span) {
- if ( span.hasClass('selected') ) {
- span.removeClass('selected');
- span.setStyle('color', self.opt.fontColor);
- span.setStyle("background-color", self.opt.backgroundColor);
- } else {
- span.addClass('selected');
- span.setStyle('color', self.opt.selectionFontColor);
- span.setStyle("background-color", self.opt.selectionBackgroundColor);
- }
- };
-
- YUI().use('node', function (Y) {
-
-
- Y.all('#' + self.opt.target + ' span').on("mousedown", function( e ) {
- isMouseDown = true;
-
- var allSpan = Y.all('#' + self.opt.target + ' span');
-
- allSpan.removeClass('selected');
- allSpan.setStyle('color', self.opt.fontColor);
- allSpan.setStyle("background-color", self.opt.backgroundColor);
-
- toggleClass( e.currentTarget );
- });
-
-
- Y.all('#' + self.opt.target + ' span').on("mouseover", function(e) {
- if (isMouseDown) {
- toggleClass( e.currentTarget );
- }
- });
-
-
- Y.all('#' + self.opt.target + ' span').on("mouseup", function() {
- isMouseDown = false;
- var textSelected = '';
-
- $('#' + self.opt.target + ' span.selected' )
- .each(function(){
- textSelected += $(this).text();
- });
-
- if (textSelected == 'Hello') {
- self.raiseEvent('onHelloSelected', {
- textSelected : textSelected
- })
- }
- });
-
-
- });
- }
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeature.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeature.js
deleted file mode 100755
index ddd100de54..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeature.js
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * Component to represent one summary feature. Originally design to display protein expression information from the Human Protein Atlas (HPA)
- *
- * @class
- * @extends Biojs
- *
- * @author Rafael C Jimenez
- * @version 1.0.0
- * @category 1
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires Biojs.HpaSummaryFeature.css
- * @dependency
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} title
- * Title of the summary
- *
- * @option {string} imageUrl
- * URL of an image file with expression data
- *
- * @option {string} imageTitle
- * Title or description of an image file with expression data
- *
- * @option {string} notes
- * List of point including summary information for this feature
- *
- * @option {string} linkUrl
- * List of points including summary information for this feature
- *
- * @option {string} linkTitle
- * List of points including summary information for this feature
- *
- * @option {string} width [900px]
- * List of points including summary information for this feature
- *
- * @option {string} imageWidth [200px]
- * List of points including summary information for this feature
- *
- * @example
- * var instance = new Biojs.HpaSummaryFeature({
- * target: 'YourOwnDivId',
- * title: 'HPA001012 Normal Tissue immunohistochemistry summary',
- * imageUrl: 'http://www.proteinatlas.org/images/1012/ihc_selected_medium.jpg',
- * imageTitle: 'Immunohistochemical staining of human lymph node shows strong cytoplasmic positivity in lymphoid cells outside reaction centra',
- * notes: ["Lymphoid tissues showed moderate to strong cytoplasmic positivity. Remaining normal cells were generally negative","Two (or more) antibodies yielding similar staining patterns which are consistent with available gene/protein characterization data","Expression summary: Selective cytoplasmic expression in lymphoid cells","Reliable score: High","Validation score: Supportive","67 normal tissues by immunohistochemistry"],
- * linkUrl:'http://www.proteinatlas.org/ENSG00000089820/normal',
- * linkTitle:'HPA original source',
- * width: '585px',
- * imageWidth: '150px'
- * });
- *
- */
-
-Biojs.HpaSummaryFeature = Biojs.extend (
- /** @lends Biojs.HpaSummaryFeature# */
- {
- constructor: function (options) {
- this._draw();
- },
- /*
- * Function: Biojs.GeneExpressionSummary._draw
- * Purpose: Draw HPA summary feature
- * Returns: -
- * Inputs: opt -> {Object} options object.
- */
- _draw: function(){
- var self = this;
- self._componentPrefix = "hpaSummaryFeature_";
-
- /* Create a component container */
- self._componentDiv = jQuery('
');
- self._componentDiv.css('width',self.opt.width);
-
- /* Create table */
- self._leftColumn = jQuery(' ');
- self._leftColumn.css({
- 'width': self.opt.imageWidth,
- 'vertical-align': 'top'
- });
- self._rightColumn = jQuery(' ');
- self._rightColumn.css({
- 'vertical-align': 'top'
- });
- self._mainRow = jQuery(' ');
- self._mainRow.append(self._leftColumn);
- self._mainRow.append(self._rightColumn);
- self._table = jQuery('');
- self._table.append(self._mainRow);
- self._table.css('width', '100%');
-
- /* Create container for left column */
- self._leftContainer = jQuery('
');
-
- /* Create image title */
- if (self.opt.imageTitle != "") {
- self._imageTitle = jQuery(''+self.opt.imageTitle+'
');
- }
-
- /* Create image */
- if (self.opt.imageUrl != "") {
- /* HPA image */
- self._image = jQuery(' ');
- self._image.css({
- 'width': '100%'
- });
- if(self.opt.imageTitle != ""){
- self._image.attr({
- 'alt': 'HPA image',
- 'title': self.opt.imageTitle
- });
- }
- }
-
- /* Create link icon */
- self._linkImage = jQuery('
');
-
- /* Create link in left column including: image, link icon and image title */
- if (self.opt.linkUrl != "") {
- self._link = jQuery(' ');
- if(self.opt.linkTitle != ""){
- self._link.attr({
- 'title': self.opt.linkTitle
- });
- }
- if (self.opt.imageUrl != "") {
- self._link.append(self._image);
- }
- self._link.append(self._linkImage);
- self._leftContainer.append(self._link);
- if (self.opt.imageTitle != "" && self.opt.imageUrl != "") {
- /* Include image legend in left column */
- self._leftContainer.append(self._imageTitle);
- }
- } else {
- /* Still print image if there is no link */
- self._leftContainer.append(self._image);
- if (self.opt.imageTitle != "" && self.opt.imageUrl != "") {
- /* Include image legend in left column */
- self._leftContainer.appenf(self._imageTitle);
- }
- }
-
- /* Create title in right column */
- self._contentTitle = jQuery(''+self.opt.title+'
');
-
- /* Create notes in right column */
- self._contentNotes = jQuery('');
- jQuery.each(self.opt.notes, function(k, v) {
- self._contentNotes.append(jQuery('' + v + ' '))
- });
-
- /* Put everything together */
- jQuery("#"+self.opt.target).append(self._componentDiv);
- self._componentDiv.append(self._table);
- self._leftColumn.append(self._leftContainer);
- self._rightColumn.append(self._contentTitle);
- self._rightColumn.append(self._contentNotes);
- },
- /**
- * Default values for the options
- * @name Biojs.HpaSummaryFeature-opt
- */
- opt: {
- target: '',
- title: '',
- imageUrl: '',
- imageTitle: '',
- notes: [],
- linkUrl:'',
- linkTitle:'',
- width: '900px',
- imageWidth: '200px'
- },
- /**
- * Array containing the supported event names
- * @name Biojs.HpaSummaryFeature-eventTypes
- */
- eventTypes: [
- /**
- * @name Biojs.HpaSummaryFeature#onFeatureSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} textSelected Selected text.
- * @example
- * instance.onTextSelected(
- * function( objEvent ) {
- * alert(objEvent.textSelected);
- * }
- * );
- *
- * */
- "onTextSelected"
- ]
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeatures.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeatures.js
deleted file mode 100755
index b1ed02b332..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.HpaSummaryFeatures.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * Component to represent Human Protein Atlas summary protein expression
- * information from a DAS XML
- *
- * @class
- * @extends Biojs.HpaSummaryFeature
- *
- * @author Rafael C Jimenez
- * @version 1.0.0
- * @category 2
- *
- * @requires Biojs.HpaSummaryFeature.css
- * @dependency
- *
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} hpaDasUrl
- * Url pointing to an XML including HPA infomration in DAS format
- *
- * @option {string} width [900px]
- * List of points including summary information for this feature
- *
- * @option {string} imageWidth [200px]
- * List of points including summary information for this feature
- *
- * @option {string} [proxyUrl='../biojs/dependencies/proxy/proxy.php']
- * Proxy to bypass the same origin policy ({@link http://en.wikipedia.org/wiki/Same_origin_policy})
- *
- * @example
- * var instance = new Biojs.HpaSummaryFeatures({
- * target: 'YourOwnDivId',
- * hpaDasUrl: 'http://das.proteinatlas.org/das/proteinatlas/features?segment=Q9NTI5',
- * width: '585px',
- * imageWidth: '150px'
- * });
- *
- */
-
-Biojs.HpaSummaryFeatures = Biojs.HpaSummaryFeature.extend (
- /** @lends Biojs.HpaSummaryFeatures# */
- {
- constructor: function (options) {
- var self = this;
- this.setHpaDasUrl(self.opt.hpaDasUrl);
- },
- /*
- * Function: Biojs.HpaSummaryFeatures.setHpaDasUrl
- * Purpose: Set an URL with HPA DAS XML to start the query and visualization of HPA summary features
- * Returns: -
- * Inputs: hpaDasUrl -> {String} DAS XML with HPA summary information
- */
-
- /**
- * Set an URL with HPA DAS XML to start the query and visualization of HPA summary features
- * @param {string} hpaDasUrl DAS XML with HPA summary information
- *
- * @example
- * instance.setHpaDasUrl("http://www.ebi.ac.uk/~rafael/web/copa/biojs/src/test/data/Q9NTI5_hpa_summary.xml");
- *
- * @example
- * instance.setHpaDasUrl("http://www.ebi.ac.uk/~rafael/web/copa/biojs/src/test/data/unknownsegment.xml");
- *
- */
- setHpaDasUrl: function(hpaDasUrl){
- var self = this;
- /* URL where to get DAS XML */
- self._url;
- if(self.opt.proxyUrl != ""){
- self._url= self.opt.proxyUrl + "?url=" + hpaDasUrl;
- } else {
- self._url= hpaDasUrl;
- }
-
- /* get XML */
- jQuery.ajax({
- type: "GET",
- url: self._url,
- dataType: "xml",
- success: function(a){self._processDasHpaXml(a);},
- error: function(a){self._processErrorRequest(a);}
- });
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._processDasHpaXml
- * Purpose: process HPA XML
- * Returns: -
- * Inputs: xml -> {String} DAS XML with HPA summary information
- */
- _processDasHpaXml: function (xml)
- {
- var self = this;
- Biojs.console.log("SUCCESS: data received");
- var antibodies = this._getAntibodiesAccessions(xml);
- if(antibodies.length > 0){
- var html = this._createHtmlContainer(antibodies);
- jQuery('#'+self.opt.target+'').html(html);
- this._displayHpaSummaries(xml,antibodies)
- } else {
- jQuery('#'+self.opt.target+'').html(Biojs.HpaSummaryFeatures.MESSAGE_NODATA);
- }
-
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._processErrorRequest
- * Purpose: Process request error
- * Returns: -
- * Inputs: textStatus -> {String} Text satus
- */
- _processErrorRequest: function (textStatus){
- var self = this;
- Biojs.console.log("ERROR: " + textStatus );
- self.raiseEvent( Biojs.HpaSummaryFeatures.EVT_ON_REQUEST_ERROR, { message: textStatus } );
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._getAntibodiesAccessions
- * Purpose: get antibodies accessions
- * Returns: -
- * Inputs: xml -> {String} DAS XML with HPA summary information
- */
- _getAntibodiesAccessions: function (xml){
- var tempSet = new Object();
- jQuery(xml).find("PARENT").each(function(){
- var antibodyTextSplit = jQuery(this).attr("id").split("_");
- if(antibodyTextSplit.length == 2){
- tempSet[antibodyTextSplit[0]] = true;
- }
- });
- var antibodies = new Array();
- for (var a in tempSet){
- antibodies.push(a);
- }
- return antibodies;
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._createHtmlContainer
- * Purpose: create HTML container to later populate HPA data
- * Returns: -
- * Inputs: antibodies -> {Array} List of antibodies
- */
- _createHtmlContainer: function(antibodies) {
- var self = this;
- var html = '';
- jQuery.each(antibodies, function(key, value){
- html += 'Antibody '+value+'
'
- html += '
';
- html += '
';
- html += '
';
- html += '
';
- html += '
';
- });
- return html;
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._displayHpaSummaries
- * Purpose: Disaply HPA summaries inside the HTML container
- * Returns: -
- * Inputs: xml -> {String} DAS XML with HPA summary information
- */
- _displayHpaSummaries: function(xml){
- var self = this;
- jQuery(xml).find("FEATURE").each(function(){
- if (jQuery(this).attr("id").indexOf("_summary") != -1) {
- /* Get notes */
- var notes = new Array();
- var xmlNotes = jQuery(this).find("NOTE");
- xmlNotes.each(function(){
- notes.push(jQuery(this).text());
- });
- /* Get links */
- var imageUrl = "";
- var imageTitle = "";
- var linkUrl = "";
- var linkTitle = "";
- var xmlLinks = jQuery(this).find("LINK");
- xmlLinks.each(function(){
- if (jQuery(this).attr("href").indexOf(".jpg") != -1 || jQuery(this).attr("href").indexOf(".png") != -1) {
- imageUrl = jQuery(this).attr("href");
- imageTitle = jQuery(this).text();
- }
- else
- if (jQuery(this).text().indexOf("original source") != -1) {
- linkUrl = jQuery(this).attr("href");
- linkTitle = jQuery(this).text();
- }
- });
- new Biojs.HpaSummaryFeature({
- target: jQuery(this).attr("id"),
- title: jQuery(this).attr("label"),
- imageUrl: imageUrl,
- imageTitle: imageTitle,
- notes: notes,
- linkUrl: linkUrl,
- linkTitle: linkTitle,
- width: self.opt.width,
- imageWidth: self.opt.imageWidth
- });
- }
- });
-
- },
-
- /**
- * Default values for the options
- * @name Biojs.HpaSummaryFeatures-opt
- */
- opt: {
- target: 'hpaSummaryFeatues',
- hpaDasUrl: '',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- width: '900px',
- imageWidth: '200px'
- },
- /**
- * Array containing the supported event names
- * @name Biojs.HpaSummaryFeatures-eventTypes
- */
- eventTypes: [
- /**
- * @name Biojs.HpaSummaryFeatures#onRequestError
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} file The name of the loaded file.
- * @eventData {string} result A string with either value 'success' or 'failure'.
- * @eventData {string} message Error message in case of result be 'failure'.
- *
- * @example
- * instance.onRequestError(
- * function( e ) {
- * alert( e.message );
- * }
- * );
- *
- **/
- "onRequestError"
- ]
-},{
- // Some static values
- COMPONENT_PREFIX: "hpaSummaryFeatures_",
- MESSAGE_NODATA: "Sorry, we could not find summary data for your request",
- // Events
- EVT_ON_REQUEST_ERROR: "onRequestError",
-});
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsBundleD3.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsBundleD3.js
deleted file mode 100755
index 701d857bff..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsBundleD3.js
+++ /dev/null
@@ -1,1021 +0,0 @@
-/**
- * This component uses the D3 library and specifically its implementation of the bundle algorithm to
- * represent a network of protein interactions.
- *
- * @class
- * @extends Biojs
- *
- * @author Gustavo A. Salazar
- * @version 0.9.0_alpha
- * @category 1
- *
- * @requires jQuery Core 1.7.2
- * @dependency
- *
- * @requires D3
- * @dependency
- *
- * @requires InteractionsD3 CSS
- * @dependency
- *
- * @param {Object} options An object with the options for the InteractionsD3 component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- * @option {string} width
- * Width of the SVG element, if given in percentage, it will use it on proportion of the container
- * @option {string} height
- * Height of the SVG element, if given in percentage, it will use it on proportion of the container
- * @option {string} radius
- * Radius of the nodes representing the proteins
- * @option {string} textLength
- * Space in pixels to be reserved for the labels around the circle
- *
- * @example
- * var instance = new Biojs.InteractionsBundleD3({
- * target: "YourOwnDivId",
- * });
- * var pid=1;
- * for (var i=0;i<100;i++)
- * instance.addProtein({id:'p'+pid++,group:1,organism:"human"});
- * for (var i=0;i<100;i++)
- * instance.addProtein({id:'p'+pid++,group:1,organism:"TB"});
- * for (var i=1;i<200;i++){
- * instance.addInteraction("p"+(i),"p"+(100+i),{id:"p"+(i)+"_p"+(100+i),feature1:"value"});
- * instance.addInteraction("p"+(i),"p"+(i%17),{id:"p"+(i)+"_p"+(i%17),feature1:"value"});
- * }
- * instance.restart();
- */
-Biojs.InteractionsBundleD3 = Biojs.extend (
- /** @lends Biojs.InteractionsBundleD3# */
- {
- cluster:null,
- bundle:null,
- vis:null,
- splines:[],
- model:{},
- organisms:{},
- proteins:[],
- interactions:[],
- interactionsA:{},
- svg:null,
-
- //Transformation values
- tTranslate:null,
- tScale:null,
-
- constructor: function (options) {
- var self = this;
- self.cluster=null;
- self.bundle=null;
- self.vis=null;
- self.splines=[];
- self.model={"name":"", "children":[] };
- self.organisms={};
- self.proteins=[];
- self.interactions=[];
- self.svg=null;
- self.interactionsA={};
-
- this._container = $("#"+self.opt.target);
- this._container.empty();
- $(this._container).addClass("graphCircle");
-
- var w = $(this._container).width(),
- h = $(this._container).height();
-
- w = (self.opt.width.indexOf("%")!=-1)?w*(self.opt.width.substring(0, self.opt.width.length-1)*1)/100.0:self.opt.width*1;
- self.opt.width=w;
-
- h = (self.opt.height.indexOf("%")!=-1)?h*(self.opt.height.substring(0, self.opt.height.length-1)*1)/100.0:self.opt.height*1;
- self.opt.height=h;
-
- var rx = w / 2,
- ry = h / 2;
-
- var tmpR=(rxb[1]){
- return -1;
- }else
- return 1;
- return 0;
- });
- },
- _paintLegend:function(legend,type){
- var self = this;
- legend.filter(function(d) { return d[0]== "label" && d[1]==type; }).append("text")
- .attr("x", self.opt.width/2 - 6)
- .attr("y", 7-self.opt.height/2)
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .style("font-size", "1.2em")
- .text(type+":");
- if (type.indexOf("Resize By")==0){
-
- legend.filter(function(d) { return d[0]!="label" && d[1]==type; }).append("path")
- .attr("class", "figure")
- .attr("d", function(d) {
- var h=2*self.opt.radius*Math.sqrt(d[0][2]);
- return "M0,0L0,10M0,5L"+h+",5M"+h+",0L"+h+",10 ";
- })
- .attr("transform", function(d) {
- return "translate(" + (self.opt.width/2 - 18 - 2*self.opt.radius*Math.sqrt(d[0][2])) + ", -" + self.opt.height/2 + ")";
- })
- .style("fill", "transparent")
- .style("stroke", "black");
- legend.filter(function(d) { return d[0]!="label" && d[1]== type; }).append("text")
- .attr("x", function(d) {
- return (self.opt.width/2 - 22 - 5*self.opt.radius);
- })
- .attr("y", 7-self.opt.height/2 )
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .text(function(d) { return (d[0][1]*1.0).toFixed(2); });
-
- }else{
-
- legend.filter(function(d) { return d[0]!="label" && d[1]==type; }).append("rect")
- .attr("x", self.opt.width/2 - 18)
- .attr("y", -self.opt.height/2)
- .attr("width", 13)
- .attr("height", 13)
- .style("fill", function(d,i) {
- if (typeof d[2]== "undefined")
- return self.color(i);
- return d[2];
- });
- legend.filter(function(d) { return d[0]!="label" && d[1]== type; }).append("text")
- .attr("x", self.opt.width/2 - 24)
- .attr("y", 7-self.opt.height/2)
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .text(function(d) { return d[0]; });
- }
- },
- _paintLegends: function(){
- var self = this;
- var w=18 + self.longestLegend*7 + 10;
- var legendBlock = self.svg.insert("g",".link")
- .attr("class", "legendBlock");
- self._sortLegends();
- legendBlock.append("rect")
- .attr("x", self.opt.width/2 -w)
- .attr("y", -self.opt.height/2)
- .attr("height", 6 + self.legends.length *16)
- .attr("width", w)
- .style("fill", "#ddd")
- .style("fill-opacity","0.4");
-
- var legend = legendBlock.selectAll(".mainLegend")
- .data(self.legends)
- .enter().insert("g")
- .attr("class", "mainLegend")
- .attr("transform", function(d, i) { return "translate(0," + (3 + i * 16) + ")"; });
- for (var i=0; i< self.legendTypes.length; i++)
- self._paintLegend(legend,self.legendTypes[i]);
-
- },
- longestLegend:4,
- legendTypes:[],
- /**
- * Adds a legend to the graphic
- *
- * @example
- * instance.addLegends(["Legend red"],"Color","#FF0000");
- * instance.restart();
- */
- addLegends:function(legends,type,color){
- var self = this;
- if (self.legends==null) self.legends=[],self.legendTypes=[];
-
- if (legends==null) {
- self.legends = null;
- self.legendTypes=[];
- self.longestLegend=4;
- return;
- }
- if (type=="Resize By")
- type = type+ " "+legends[0];
- if (self.legendTypes.indexOf(type)==-1) {
- self.legends.push(["label",type]);
- self.legendTypes.push(type);
- if (type.length>self.longestLegend)
- self.longestLegend=type.length;
- }
-
- if (type.indexOf("Resize By")==0){ //is a size label
- self.legends.push([legends,type]);
- } else //is a color label
- for (var i=0;iself.longestLegend)
- self.longestLegend=legends[i].length;
- }
- },
-
- /**
- * Hides the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.hide('[id *="node-p1"]');
- */
- hide: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("visibility", 'hidden');
- self.vis.selectAll(selector).selectAll(" .legend").attr("visibility", 'hidden');
- },
- /**
- * Shows the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.show('[id *="node-p1"]');
- */
- show: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("visibility", 'visible');
- self.vis.selectAll(selector).selectAll(" .legend").attr("visibility",function(d) { return (d.showLegend)?"visible":"hidden";});
- },
- /**
- * Highlight the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.highlight(".figure");
- */
- highlight: function(selector){
- var self=this;
- self.vis.selectAll(selector).style("stroke", '#0f0');
- },
- /**
- * Set the fill's color of the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- * @param {string} color a color in web format eg. #FF0000
- *
- * @example
- * instance.setFillColor(".figure","#FF0000");
- */
- setFillColor: function(selector,color){
- var self=this;
- self.vis.selectAll(selector).style("fill", color);
- },
- /**
- * Set the stroke's color of the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- * @param {string} color a color in web format eg. #FF0000
- *
- * @example
- * instance.setColor(".figure","#FF0000");
- */
- setColor: function(selector,color){
- var self=this;
- self.vis.selectAll(selector).style("stroke", color);
- },
- /**
- * Shows/Hide the legend(id) of the protein
- *
- * @param {string} protein the id of the protein to swap the visibility of the legend
- *
- * @example
- * instance.swapShowLegend("#node-p"+(pid-1)+" .legend");
- */
- showLegend: function(selector,typeLegend){
- var self=this;
- self.vis.selectAll(selector).selectAll(".legend").attr("visibility", "visible").text(function(d) {
- d.typeLegend=typeLegend;
- if (d.typeLegend=="id")
- return d.id;
-// else if (d.typeLegend.indexOf("features.")==0)
-// return d.features[d.typeLegend.substr(9)];
- else
- return d.features[d.typeLegend];
- });
- },
-
- /**
- * Scales the area of a protein
- *
- * @param {string} protein the id of the protein to scale
- * @param {integer} scale value to scale a node
- *
- * @example
- * instance.setSizeScale("#figure_p188",4);
- */
- setSizeScale: function(selector,scale){
- var self=this;
-
-
- self.vis.selectAll(selector).attr("r", function(d) {
- d.size=scale;
- return self.opt.radius*Math.sqrt(d.size);
- });
- },
- /**
- * Scales the size of the proteins which value has been modify by other means
- *
- * @param {string} selector a CSS3 selector to choose the nodes to resize
- *
- * @example
- * var j=0;
- * for (var i in instance.proteins)
- * instance.proteins[i].size=1+(j++)%4;
- * instance.refreshSizeScale(".figure");
- */
- refreshSizeScale: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("r", function(d) {
- return self.opt.radius*Math.sqrt(d.size);
- });
- },
-
-
- /**
- * Shows/Hide the legend(id) of the protein
- *
- * @param {string} protein the id of the protein to swap the visibility of the legend
- *
- * @example
- * instance.swapShowLegend("#node-p"+(pid-1)+" .legend");
- */
- hideLegend: function(selector){
- var self=this;
- self.vis.selectAll(selector).selectAll(".legend").attr("visibility", "hidden");
- },
- /**
- * Shows/Hide the legend(id) of the protein
- *
- * @param {string} protein the id of the protein to swap the visibility of the legend
- *
- * @example
- * instance.swapShowLegend("#node-p"+(pid-1)+" .legend");
- */
- swapShowLegend: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("visibility", function(d) {
- d.showLegend = !d.showLegend;
- return (d.showLegend)?"visible":"hidden";
- });
- },
- /**
- *
- * Resizing the graph depending on the size of the window.
- *
- * @param self
- */
- _resize: function (self) {
- var width = window.innerWidth, height = window.innerHeight;
- self.vis.attr("width", width).attr("height", height);
- self.force.size([width, height]).resume();
- },
- colors: [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5",
- "#0077b4", "#11c7e8", "#227f0e", "#33bb78", "#44a02c", "#55df8a", "#662728", "#779896", "#8867bd", "#99b0d5", "#AA564b", "#BB9c94", "#CC77c2", "#DDb6d2", "#EE7f7f", "#FFc7c7", "#00bd22", "#11db8d", "#22becf", "#33dae5",
- "#1f00b4", "#ae11e8", "#ff220e", "#ff3378", "#2c442c", "#98558a", "#d66628", "#ff7796", "#9488bd", "#c599d5", "#8cAA4b", "#c4BB94", "#e3CCc2", "#f7DDd2", "#7fEE7f", "#c7FFc7", "#bc0022", "#db118d", "#1722cf", "#9e33e5",
- "#1f7700", "#aec711", "#ff7f22", "#ffbb33", "#2ca044", "#98df55", "#d62766", "#ff9877", "#946788", "#c5b099", "#8c56AA", "#c49cBB", "#e377FC", "#f7b6FD", "#7f7fEE", "#c7c7FF", "#bcbd00", "#dbdb11", "#17be22", "#9eda33"
- ]
- });
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsD3.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsD3.js
deleted file mode 100755
index 94da99b4c6..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsD3.js
+++ /dev/null
@@ -1,1085 +0,0 @@
-/**
- * This component uses the D3 library and specifically its implementation of the force algorithm to
- * represent a network of protein interactions.
- *
- * @class
- * @extends Biojs
- *
- * @author Gustavo A. Salazar
- * @version 0.9.1_beta
- * @category 1
- *
- * @requires jQuery Core 1.7.2
- * @dependency
- *
- * @requires D3
- * @dependency
- *
- * @requires InteractionsD3 CSS
- * @dependency
- *
- * @param {Object} options An object with the options for the InteractionsD3 component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- * @option {string} width
- * Width of the SVG element, if given in percentage it will use it on proportion of the container
- * @option {string} height
- * Height of the SVG element, if given in percentage it will use it on proportion of the container
- * @option {string} radius
- * Radius of the nodes representing the proteins
- * @option {string} enableEdges
- * Force the proteins to stay in the defined area of the SVG
- *
- * @example
- * var instance = new Biojs.InteractionsD3({
- * target: "YourOwnDivId",
- * });
- * for (var pid=1;pid<=15;pid++)
- * instance.addProtein({ "id":pid,"name":pid,"showLegend":false,"typeLegend":"id","organism":"human"+pid%3,"features":{"f1":"val1","f2":"val2","f3":"val3"}});
- *
- * for (var pid=1;pid<=30;pid++)
- * instance.addInteraction(Math.floor((Math.random()*15)+1),Math.floor((Math.random()*15)+1) ,{score:Math.random()});
- * instance.restart();
- */
-Biojs.InteractionsD3 = Biojs.extend (
- /** @lends Biojs.InteractionsD3# */
- {
- force:null,
- vis:null,
- interactions:[],
- interactionsA:{},
- proteins:[],
- proteinsA:{},
- node_drag:null,
- color: null,
- foci: [],
- organisms: {},
-
- //Transformation values
- tTranslate:null,
- tScale:null,
-
- constructor: function (options) {
- var self = this;
- self.force =null;
- self.vis =null;
- self.interactions=[];
- self.interactionsA={};
- self.proteins=[];
- self.proteinsA={};
- self.node_drag=null;
- self.color= null;
- self.foci=[];
- self.organisms={};
-
- this._container = $("#"+self.opt.target);
- this._container.empty();
- $(this._container).addClass("graphNetwork");
-
- var width = $(this._container).width(),
- height = $(this._container).height();
-
- if (self.opt.width.indexOf("%")!=-1)
- width = width*(self.opt.width.substring(0, self.opt.width.length-1)*1)/100.0;
- else
- width=self.opt.width*1;
- self.opt.width=width;
-
- if (self.opt.height.indexOf("%")!=-1)
- height = height*(self.opt.height.substring(0, self.opt.height.length-1)*1)/100.0;
- else
- height=self.opt.height*1;
- self.opt.height=height;
-
- this._container.width(width);
- this._container.height(height);
-
- self.color = function() {
- return d3.scale.ordinal().range(self.colors);
- }();
-
- self.zoom=d3.behavior.zoom().
- scaleExtent([(self.opt.enableEdges)?1:0.1, 10])
- .on("zoom", redraw);
- self.vis = d3.select("#"+self.opt.target).append("svg")
- .attr("width", width)
- .attr("height", height)
- .attr("pointer-events", "all")
- .call(self.zoom)
- .append('svg:g');
-
- self.vis.append('svg:rect')
- .attr('width', width*20)
- .attr('height', height*20)
- .attr('x', -width*10)
- .attr('y', -height*10)
- .attr('fill', 'white')
- .attr('stroke','white');
-
- self.rect= self.vis.append('svg:rect')
- .attr("class", "frame")
- .attr('width', width)
- .attr('height', height)
- .attr('fill', 'white')
- .attr('stroke','white')
- .attr("stroke-dasharray","5,5");
-
-
- self.perspective=d3.select("#"+self.opt.target + " svg").append('svg:g');
-
-
-
- function redraw(x,y,scaleP) {
- var trans=null,scale=null;
- if (typeof x!="undefined" && typeof y!="undefined"){
- trans=[x,y];
- scale = scaleP;
- }else{
- trans=d3.event.translate;
- scale = d3.event.scale;
- }
- self.tTranslate=trans;
- self.tScale=scale;
- if (self.opt.enableEdges) {
- if(scale<1)scale=1;
- d3.behavior.zoom().scaleExtent([1, Infinity]);
- if (trans[0]>0)trans[0]=0;
- if (trans[1]>0)trans[1]=0;
-
- var W = self.rect[0][0].width.animVal.value, H= self.rect[0][0].height.animVal.value;
- var Ws = W*scale, Hs = H*scale;
- if (Wsb[1]){
- return -1;
- }else
- return 1;
- return 0;
- });
- },
- _paintLegend:function(legend,type){
- var self = this;
- legend.filter(function(d) { return d[0]== "label" && d[1]==type; }).append("text")
- .attr("x", self.opt.width - 6)
- .attr("y", 7)
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .style("font-size", "1.2em")
- .text(type+":");
- if (type.indexOf("Resize By")==0){
-
- legend.filter(function(d) { return d[0]!="label" && d[1]==type; }).append("path")
- .attr("class", "figure")
- .attr("d", function(d) {
- var h=2*self.opt.radius*Math.sqrt(d[0][2]);
- return "M0,0L0,10M0,5L"+h+",5M"+h+",0L"+h+",10 ";
- })
- .attr("transform", function(d) {
- return "translate(" + (self.opt.width - 18 - 2*self.opt.radius*Math.sqrt(d[0][2])) + "," + 0 + ")";
- })
- .style("fill", "transparent")
- .style("stroke", "black");
- legend.filter(function(d) { return d[0]!="label" && d[1]== type; }).append("text")
- .attr("x", function(d) {
- return (self.opt.width - 22 - 5*self.opt.radius);
- })
- .attr("y", 7)
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .text(function(d) { return (d[0][1]*1.0).toFixed(2); });
-
- }else{
- legend.filter(function(d) { return d[0]!="label" && d[1]==type; }).append("rect")
- .attr("x", self.opt.width - 18)
- .attr("width", 13)
- .attr("height", 13)
- .style("fill", function(d,i) {
- if (typeof d[2]== "undefined")
- return self.color(i);
- return d[2];
- });
- legend.filter(function(d) { return d[0]!="label" && d[1]== type; }).append("text")
- .attr("x", self.opt.width - 24)
- .attr("y", 7)
- .attr("dy", ".35em")
- .style("text-anchor", "end")
- .text(function(d) { return d[0]; });
- }
- },
- _paintLegends: function(){
- var self = this;
- var w=18 + self.longestLegend*7 + 10;
- var legendBlock = self.perspective.insert("g",".link")
- .attr("class", "legendBlock");
- self._sortLegends();
- legendBlock.append("rect")
- .attr("x", self.opt.width -w)
- .attr("height", 6 + self.legends.length *16)
- .attr("width", w)
- .style("fill", "#ddd")
- .style("fill-opacity","0.4");
-
- var legend = legendBlock.selectAll(".mainLegend")
- .data(self.legends)
- .enter().insert("g")
- .attr("class", "mainLegend")
- .attr("transform", function(d, i) {
- return "translate(0," + (3 + i * 16) + ")";
- });
- for (var i=0; i< self.legendTypes.length; i++)
- self._paintLegend(legend,self.legendTypes[i]);
-
- },
- longestLegend:4,
- legendTypes:[],
- /**
- * Adds a legend to the graphic
- *
- * @example
- * instance.addLegends(["Legend red"],"Color","#FF0000");
- * instance.restart();
- */
- addLegends:function(legends,type,color){
- var self = this;
- if (self.legends==null) self.legends=[],self.legendTypes=[];
-
- if (legends==null) {
- self.legends = null;
- self.legendTypes=[];
- self.longestLegend=4;
- return;
- }
- if (type=="Resize By")
- type = type+ " "+legends[0];
- if (self.legendTypes.indexOf(type)==-1) {
- self.legends.push(["label",type]);
- self.legendTypes.push(type);
- if (type.length>self.longestLegend)
- self.longestLegend=type.length;
- }
-
- if (type.indexOf("Resize By")==0){ //is a size label
- self.legends.push([legends,type]);
- } else //is a color label
- for (var i=0;iself.longestLegend)
- self.longestLegend=legends[i].length;
- }
- },
- /**
- * Hides the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.hide("[id = node_10]");
- */
- hide: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("visibility", 'hidden');
- self.vis.selectAll(selector).selectAll(" .legend").attr("visibility", 'hidden');
- },
- /**
- * Shows the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.show("[id = node_10]");
- */
- show: function(selector){
- var self=this;
- self.vis.selectAll(selector).attr("visibility", 'visible');
- self.vis.selectAll(selector).selectAll(" .legend").attr("visibility",function(d) { return (d.showLegend)?"visible":"hidden";});
- },
- /**
- * Highlight the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- *
- * @example
- * instance.highlight("[id *= node_1]");
- */
- highlight: function(selector){
- var self=this;
- self.vis.selectAll(selector).style("stroke", '#3d6');
- },
- /**
- * Set the fill's color of the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- * @param {string} color a color in web format eg. #FF0000
- *
- * @example
- * instance.setFillColor(".figure","#FF0000");
- */
- setFillColor: function(selector,color){
- var self=this;
- self.vis.selectAll(selector).style("fill", color);
- },
- /**
- * Set the stroke's color of the elements on the graphic that match the selector.
- * Check the CSS3 selectors documentation to build a selector string
- *
- * @param {string} selector a string to represent a set of elements. Check the CSS3 selectors documentation to build a selector string
- * @param {string} color a color in web format eg. #FF0000
- *
- * @example
- * instance.setColor("[id *= node_2]","#FF0000");
- */
- setColor: function(selector,color){
- var self=this;
- self.vis.selectAll(selector).style("stroke", color);
- },
- /**
- * If the protein has a fixed position in the graphic it gets released, or viceversa other wise
- *
- * @param {string} protein the id of the protein to swap is position on the graphic
- *
- * @example
- * instance.swapFixed("3");
- */
- swapFixed: function(protein){
- var self=this;
- var nodes=self.force.nodes();
- nodes.forEach(function(d, i) {
- if (d.id==protein)
- d.fixed = !d.fixed;
- });
- },
- /**
- * Shows the legend(id) of the protein
- *
- * @param {string} protein the id of the protein to swap the visibility of the legend
- *
- * @example
- * instance.swapShowLegend("#node_5 .legend");
- */
- showLegend: function(selector,typeLegend){
- var self=this;
- self.vis.selectAll(selector).selectAll(".legend").attr("visibility", "visible").text(function(d) {
- d.typeLegend=typeLegend;
- if (d.typeLegend=="id")
- return d.id;
- else //if (d.typeLegend.indexOf("features.")==0)
- return d.features[d.typeLegend];
-// else
-// return d[d.typeLegend];
- });
-// self.restart();
- },
- /**
- * Scales the area of a protein
- *
- * @param {string} protein the id of the protein to scale
- * @param {integer} scale value to scale a node
- *
- * @example
- * instance.setSizeScale("#figure_1",4);
- */
- setSizeScale: function(selector,scale){
- var self=this;
- self.vis.selectAll(selector).attr("d", d3.svg.symbol()
- .size(function(d) {
- d.size=scale;
- return (2*self.opt.radius)*(2*self.opt.radius)*scale;
- })
- .type(function(d) {
- return d3.svg.symbolTypes[self._figuresOrder[self.organisms[d.organism]]];
- })
- );
- },
- /**
- * Scales the size of the proteins which value has been modify by other means
- *
- * @param {string} selector a CSS3 selector to choose the nodes to resize
- *
- * @example
- * for (var i=0;iNOTE: The selection
- * radio button options will just work if the instance of your object is globlal. Example:
- * "var instance; window.onload = function() {instance = new Biojs.InteractionsFilterGraph(...)};"
- *
- * @class
- * @extends Biojs
- *
- * @author Rafael Jimenez
- * @version 1.0.0
- * @category 2
- *
- * @requires Biojs.InteractionsFilterGraph.css
- * @dependency
- *
- * @requires jQuery 1.7.2
- * @dependency
- *
- * @requires Cytoscape.js (latest version strongly suggested)
- * @dependency
- *
- * @requires Arbor JS (included with Cytoscape.js)
- * @dependency
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} instanceName
- * Instance name of the object
- *
- * @option {string} interactions
- * Object with binary interactions including interactors
- *
- * @option {string} filters
- * Filtering options use to highlight interactions in the graph
- *
- * @option {string} graphHeight [400]
- * Graph height
- *
- * @option {string} graphWidth [400]
- * Graph width
- *
- * @example
- * var instance = new Biojs.InteractionsFilterGraph({
- * target: "YourOwnDivId",
- * instanceName: "instance",
- * graphHeight: '350px',
- * graphWidth: '100%',
- * interactions: {
- * "i1": ["P1","P2"],
- * "i2": ["P3","P4"],
- * "i3": ["P5","P6"],
- * "i4": ["P2","P6"],
- * "i5": ["P2","P4"],
- * "i6": ["P6","P1"],
- * "i7": ["P2","P6"]
- * },
- * filters:{
- * timeSeries: {
- * title: "Time after Sendai viral infection (hours)",
- * presentation: "radio",
- * active: true,
- * dataType: "edges",
- * data: {
- * "2":["i2","i3","i4"],
- * "6":["i2","i5","i6","i7"],
- * "12":["i1","i2","i3","i4","i6","i7"]
- * }
- * }
- * }
- * });
- */
-
-
-Biojs.InteractionsFilterGraph = Biojs.extend(
-/** @lends Biojs.InteractionsFilterGraph# */
-{
- constructor: function (options) {
- //Biojs.console.enable();
- //this._setExample();
- if(this._getObjectSize(this.opt.interactions)){
- this._setHtmlTemplate();
- this._createFilterOptions();
- this._setCytoscapeHeight();
- this._startCytoscape();
- }
- },
- /**
- * Default values for the options
- * @name Biojs.InteractionsFilterGraph-opt
- */
- opt: {
- target: "YourOwnDivId",
- instanceName: "instance",
- graphHeight: 500,
- graphWidth: 500,
- interactions: {},
- filters:{}
- },
- /**
- * Array containing the supported event names
- * @name Biojs.InteractionsFilterGraph-eventTypes
- */
- eventTypes: [],
-
- _setExample: function(){
- this.opt.interactions = {
- "i1": ["P1","P2"],
- "i2": ["P3","P4"],
- "i3": ["P5","P6"],
- "i4": ["P2","P6"],
- "i5": ["P2","P4"],
- "i6": ["P6","P1"],
- "i7": ["P2","P6"]
- };
- this.opt.filters = {
- timeSeries: {
- title: "Time after Sendai viral infection (hours)",
- presentation: "radio",
- active: true,
- dataType: "edges",
- data: {
- "2":["i2","i3","i4"],
- "6":["i2","i5","i6","i7"],
- "12":["i1","i2","i3","i4","i6","i7"]
- }
- },
- interactionTypes: {
- title: "Interaction types",
- presentation: "radio",
- active: true,
- dataType: "edges",
- data: {
- "association":["i3","i4"],
- "physical association":["i2","i5","i6","i7"],
- "colocalization":["i1","i2"]
- }
- },
- publications: {
- title: "Publications",
- presentation: "checkbox",
- active: false,
- dataType: "edges",
- data: {
- "pumned01":["i1","i2","i3","i4","i5","i6","i7"],
- "pumned02":["i1","i2","i3","i4","i5","i6"],
- "pumned03":["i1","i2","i3","i6"],
- "pumned04":["i1","i3"],
- "pumned05":["i3"]
- }
- }
- };
-
- },
-
- _getObjectSize: function(object){
- var count = 0;
- for (i in object) {
- if (object.hasOwnProperty(i)) {
- count++;
- }
- }
- return count;
- },
-
- _setCytoscapeHeight: function(){
- this.opt.graphHeight = this.opt.graphHeight.toString();
- var height = this.opt.graphHeight;
- if(this.opt.graphHeight.indexOf("px") != -1){
- height = this.opt.graphHeight.substring(0,this.opt.graphHeight.length - 2);
- }
- var filterHeight = jQuery("#"+this._filtersTarget).height();
- var cytoscapeHeight = parseInt(this.opt.graphHeight) - parseInt(filterHeight) - 5;
- var cytoscape = jQuery("#"+this._cytoscapeTarget);
- cytoscape.height(cytoscapeHeight);
- //cytoscape.width(parseInt(cytoscape.width())-1);
- },
-
- /*
- * Function: Biojs.HpaSummaryFeatures._getCytoscapeElements
- * Purpose: Get an elements object defining the data structure of the graph
- * Returns: {Object} elements object used by cytoscape
- * Inputs: -
- */
- _getCytoscapeElements: function(){
- var self = this;
- var nodes = [];
- var edges = [];
- var elements = new Object();
- var nodeExists = {}; // id => true
- var addNode = function(id){
- if( !nodeExists[id] ){
- nodes.push({ data: { id: id, weight: self.opt.nodeWeight }, classes: "allnodes" });
-
- nodeExists[id] = true;
- }
- };
-
- for(interactionId in self.opt.interactions){
- var interactors = self.opt.interactions[interactionId];
-
- edges.push({ data: { id: interactionId, source: interactors[0], target: interactors[1]},classes: "alledges"});
-
- addNode( interactors[0] );
- addNode( interactors[1] );
- }
- elements = {"nodes": nodes, "edges": edges};
- return elements;
- },
-
-
- /*
- * Function: Biojs.HpaSummaryFeatures._startCytoscape
- * Purpose: Start cytoscape and draw the network
- * Returns: -
- * Inputs: -
- */
- _startCytoscape: function(){
-
- var elements = this._getCytoscapeElements();
-
- jQuery("#"+this._cytoscapeTarget).cytoscape({
-
- // define the elements in the graph
- elements: elements,
-
- // define the layout to use
- layout: {
- name:"arbor"
- },
-
- // define the visual style (like css) of the graph
- style: [
- {
- selector: "node",
- css: {
- shape: "ellipse",
- backgroundColor: "#888",
- height: "mapData(weight, 0, 100, 15, 30)",
- width: "mapData(weight, 0, 100, 15, 30)",
- content: "data(id)"
- }
- },
-
- {
- selector: ".unselect",
- css: {
- backgroundColor: "#888",
- borderColor: "#ccc"
- }
-
- },
-
- {
- selector: "edge",
- css: {
- lineColor: "#ccc",
- targetArrowColor: "#ccc",
- width: "mapData(weight, 0, 100, 2, 5)"
- }
- },
-
- {
- selector: "node:selected",
- css: {
- backgroundColor: "#cc0000"
- }
- },
-
- {
- selector: "edge:selected",
- css: {
- lineColor: "#ff9999"
- }
- }
-
- ],
-
- // define the callback for when cytoscape web is ready
- ready: function(){
- window.cy = this;
- }
- });
-
-
- },
-
-
- /**
- * The idea would be to load some stuff once cytoscape is ready.
- * However it seems this cannot be done since the cy.ready or cy.done
- * events of cytoscape do not work on this version.
- */
- _onCytoscapeReady: function(){
- alert("asdasdaa");
- },
-
-
- /*
- * Function: Biojs.HpaSummaryFeatures._printInteractionDetails
- * Purpose: Print node and edges information
- * Returns: -
- * Inputs: nodes -> {String} String of interactors.
- * edges -> {String} String of interactions.
- */
- _printInteractionDetails: function(nodes, edges){
- var edgesMsg = jQuery('Interactions: '+edges+' ');
- var nodesMsg = jQuery('Interactors: '+nodes+' ');
- jQuery("#"+this._informationTarget).append(edgesMsg);
- jQuery("#"+this._informationTarget).append(nodesMsg);
- },
-
-
- /**
- * Highlight a filter option in the graph
- * @param {string} [dataElement] Data element of one filter option.
- * @param {string} [filterName] Filter name of one filter option.
- *
- * @example
- * instance.highlightFilterOption("6","timeSeries");
- *
- * @example
- * instance.highlightFilterOption("2","timeSeries");
- */
- highlightFilterOption: function(dataElement,filterName){
- jQuery(".miRadioBtn").not('.'+filterName+'RadioBtn').prop('checked', false);
- //jQuery(".miRadioBtn").attr('checked', false);
- if(typeof filterName != undefined){
- if(typeof dataElement != undefined){
- if(dataElement == 'none'){
- this.unselect();
- }
- else if(typeof this.opt.filters[filterName].data[dataElement] != undefined){
- var edgeIds = "";
- var nodeIds = "";
- // SELECT EDGES - interactions
- for (key in this.opt.filters[filterName].data[dataElement]) {
- if (this.opt.filters[filterName].data[dataElement].hasOwnProperty(key)){
- var edgeId = this.opt.filters[filterName].data[dataElement][key];
- if(typeof edgeId != 'function'){
- edgeIds += "#" + edgeId + ", ";
- // SELECT NODES - interactors
- if(this.opt.interactions[edgeId] != undefined){
- for (i=0; i');
- var filterTitle = jQuery(''+this.opt.filters[key].title+'
');
- var filterOptions = jQuery('
');
- filterContainer.append(filterTitle);
- filterContainer.append(filterOptions);
- jQuery("#"+this._filtersTarget).append(filterContainer);
- if(this.opt.filters[key].presentation == "radio"){
- this._createRadioButtons(this.opt.filters[key].data, key, '#'+key+'Options');
- } else if (this.opt.filters[key].presentation == "checkbox"){
- // todo
- } else {
- Biojs.console.log("ERROR: " + "filter presentation value unknown for filter " + key);
- }
- }
- }
- }
- },
-
- /*
- * Function: Biojs.HpaSummaryFeatures._createCheckBox
- * Purpose: Create checkbox options
- * Returns: -
- * Inputs: -
- */
- _createCheckBox: function(data, filterName, target){
- },
- /*
- * Function: Biojs.HpaSummaryFeatures._createRadioButtons
- * Purpose: Create radio button options
- * Returns: -
- * Inputs: data -> {Object} Data for one filter.
- * filterName -> {String} Filter name.
- * target -> {String} HTML tag where to draw.
- */
- _createRadioButtons: function(data, filterName, target){
- for (key in data) {
- if (data.hasOwnProperty(key)){
- var br = jQuery(' ');
- var radioBtnContainer = jQuery(' ');
- var radioBtn = jQuery(' ');
- var radioBtnName = jQuery(''+key+' ');
- radioBtnContainer.append(radioBtn);
- radioBtnContainer.append(radioBtnName);
- radioBtnContainer.appendTo(target);
- //br.appendTo('#timeSeriesRadioButtons');
- }
- }
- var nondeRadioBtn = jQuery(' '); //checked="checked"
- var noneRadioBtnName = jQuery('None ');
- nondeRadioBtn.appendTo(target);
- noneRadioBtnName.appendTo(target);
- },
-
-
- /*
- * Function: Biojs.HpaSummaryFeatures._setHtmlTemplate
- * Purpose: Create an HTML template to later on populate with information
- * Returns: -
- * Inputs: -
- */
- _setHtmlTemplate: function(){
- this.opt.graphWidth = this.opt.graphWidth.toString();
- var width = this.opt.graphWidth + "px";
- if(this.opt.graphWidth.indexOf("%") != -1 || this.opt.graphWidth.indexOf("px") != -1){
- width = this.opt.graphWidth;
- }
- var interactionFilters = jQuery('
');
- var cytoscape = jQuery('
');
- var information = jQuery('
');
- jQuery("#"+this.opt.target).append(interactionFilters);
- jQuery("#"+this.opt.target).append(cytoscape);
- jQuery("#"+this.opt.target).append(information);
- },
-
- /*
- * Variable: Biojs.HpaSummaryFeatures._setHtmlTemplate
- * Purpose: Create an HTML template to later on populate with information
- * Returns: -
- * Inputs: -
- */
- _cytoscapeTarget: "miCy",
- _filtersTarget: "miInteractionFilters",
- _informationTarget: "miInformation"
-
-
-
-
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsTable.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsTable.js
deleted file mode 100755
index dda7668fc5..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractionsTable.js
+++ /dev/null
@@ -1,668 +0,0 @@
-/**
- * Table to show binary molecular interactions.
- *
- * @class
- * @extends Biojs.Table
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 3
- *
- * @param {Object} options
- * An object with the options for InteractionTable' component.
- *
- * @option {string[][]|Object} dataSet
- * Either 2D string array containing the whole data to be displayed or a plain object defining the data source.
- *
- *
- * {
- * url: <url>,
- * proxyUrl: <proxy>,
- * paramsMap: { "iDisplayStart": <newName1>, "iDisplayLength": <newName2>, ... },
- * filter: <flag>,
- * version: <MITAB_VERSION>,
- * totalRecords:<number>
- * }
- *
- * where:
- *
- * url is string containing the url data source.
- * paramsMap Customize the name of the following params which will be passed to server:
- *
- * iDisplayStart: index of the first expected record for paging.
- * iDisplayLength: size of the fetched data (page size).
- * sSearch: filter string entered by the user in case of filter is enabled.
- *
- *
- * filter is a boolean to show/hide the search box on the table top.
- * The entered string will be passed to the server by means of 'sSearch' parameter.
- * Personalize the parameter name using paramsMap.
- * proxyUrl optional string containing the url of the proxy in case of needing access to server through a proxy.
- * version either string or integer containing the version of MITAB format as follows:
- *
- *
- * totalRecords integer containing the number of total records. MITAB format does not contains this value on the response.
- * You must do a request to ask for it.
- *
- *
- *
- * {
- * psiquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * version: "MITAB_VERSION_2_5_EXT",
- * query: "species:human",
- * filter: false
- * }
- *
- *
- *
- * ...soon
- *
- *
- * @example
- * var myTable = new Biojs.InteractionsTable({
- * target: "YourOwnDivId",
- * dataSet: {
- * psicquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * query: "brca2",
- * version: "MITAB_VERSION_2_5",
- * filter: false
- * },
- * rowSelection: true
- * });
- *
- */
-Biojs.InteractionsTable = Biojs.Table.extend(
-/** @lends Biojs.InteractionsTable# */
-{
- constructor: function (options) {
- //Biojs.console.enable();
-
- options.dataSet.version = (options.dataSet.version != undefined) ? options.dataSet.version : Biojs.InteractionsTable.MITAB_VERSION_2_5
-
- this._useVersion ( options.dataSet.version );
-
- // Calling super's constructor
- this.base(options);
-
- },
-
- /**
- * Default values for the options
- * @name Biojs.InteractionsTable-opt
- */
- opt: {
- target: "YourOwnDivId",
- rowSelection: false,
- version: "MITAB_VERSION_2_5",
- psiquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php'
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.InteractionsTable-eventTypes
- */
- eventTypes: [],
-
- /**
- * Do a query to PSICQUIC server by using the provided query in MIQL.
- * Uses the structure of the URL to fetch data from PSICQUIC.
- * @param {string} columns Column indexes to be hided.
- *
- * @example
- * myTable.setQuery("species:human");
- *
- */
- setQuery: function ( query ) {
-
- // remove this properties to set a new query
- delete this.opt.dataSet.url;
- delete this.opt.totalRecords;
-
- // set the new query
- this.opt.dataSet.query = query;
-
- // request data
- this.setDataSource(this.opt.dataSet);
- },
-
- /**
- * Get the actual query.
- * Uses the structure of the URL to fetch data from PSICQUIC.
- *
- * @return {string} Current query.
- *
- * @example
- * alert( "The query is " + myTable.getQuery() );
- */
- getQuery: function () {
- return unescape(this.opt.dataSet.query);
- },
-
- /*
- * Function: Biojs.InteractionTable._requestQueryCount
- * Purpose: Request total rows counting with the provided query for pagination purposes.
- * Since the PSIQUIC service does not provides the total row count with retrieved data,
- * it's necessary to do another request in order to get it.
- * Inputs: dataSet -> {Object} Settings of the data set.
- * action -> {function} Callback function having the dataSet as argument.
- */
- _requestQueryCount: function ( dataSet, action ) {
- var self = this;
-
- dataSet.url = dataSet.psicquicUrl + '/' + dataSet.query;
- dataSet.paramsMap = { "iDisplayStart": "firstResult", "iDisplayLength": "maxResults" };
-
- jQuery.ajax({
- url: dataSet.proxyUrl,
- dataType: "text",
- data: [{ name: "url", value: dataSet.url + '?format=count' }],
- success: function ( data ) {
- dataSet.totalRecords = parseInt(data) | 0;
- action.call( self, dataSet );
- }
- });
- },
-
- /**
- * Rebuild the table
- *
- * @example
- * myTable.setDataSource({
- * psicquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * query: "pubid:(10837477 OR 12029088)",
- * version: "MITAB_VERSION_2_5",
- * filter: false
- * });
- *
- */
- setDataSource: function ( dataSet ) {
-
- if ( dataSet instanceof Array ) {
- // Local data
- // invoke parent's setDataSource
- this.base( dataSet );
-
- } else {
- // Remote data
- if ( dataSet.hasOwnProperty("totalRecords") && dataSet.hasOwnProperty("url") ) {
- // Already have the number of records for pagination
- // then, invoke parent's setDataSource
- this.base( dataSet );
-
- } else {
- // Set the new query
- this.opt.dataSet = {};
- this.opt.dataSet.psicquicUrl = dataSet.psicquicUrl;
- this.opt.dataSet.proxyUrl = dataSet.proxyUrl;
- this.opt.dataSet.version = dataSet.version;
- this.opt.dataSet.filter = dataSet.filter;
- this.opt.dataSet.query = escape(dataSet.query);
- this.opt.dataSet.url = dataSet.psicquicUrl + '/' + dataSet.query;
- this.opt.dataSet.paramsMap = { "iDisplayStart": "firstResult", "iDisplayLength": "maxResults" };
- // Request query counting rows and apply setDataSource then
- this._requestQueryCount( this.opt.dataSet, this.base );
- }
- }
- },
- /*
- * Function: Biojs.InteractionTable._decodeToJSON
- * Purpose: Overrides the parent method to decode the received MITAB data into the expected JSON format.
- * Returns: {Object} formatted in the expected JSON.
- * Inputs: data -> {*} MITAB data received from the PSIQUIC server or another one.
- */
- _decodeToJSON: function ( mitabData ) {
- Biojs.console.log("DATA DECODING FROM MITAB to JSON");
-
- var jsonData = {};
- var decoder = new Biojs.InteractionsTable.MITabTxtDecoder(mitabData);
-
- jsonData.aaData = decoder.decodeData();
- jsonData.iTotalRecords = this.getTotalRecords();
- jsonData.iTotalDisplayRecords = this.getTotalRecords();
-
- delete decoder;
- return jsonData;
- },
-
- /*
- * Function: Biojs.InteractionTable._useVersion
- * Purpose: Set the columns depending on the MITAB format version.
- * Returns:
- * Inputs: {string|int} Either the name or the number of columns of the MITAB version.
- * Use values defined in the static members of Biojs.InteractionsTable declared at the end of this class.
- */
- _useVersion: function (version) {
-
- var length = ( (typeof version) == "string" ) ? Biojs.InteractionsTable[version] : version;
-
- var columnsToHide = [];
-
- switch (length) {
-
- case Biojs.InteractionsTable.MITAB_VERSION_2_7:
- for ( var i = 36; i < 42; i++ ) {
- this.opt.columns[i] = Biojs.InteractionsTable.MITAB_COLUMNS[i];
- }
- columnsToHide = [36,37,38,39,40,41];
-
- case Biojs.InteractionsTable.MITAB_VERSION_2_6:
- for ( var i = 31; i < 36; i++ ) {
- this.opt.columns[i] = Biojs.InteractionsTable.MITAB_COLUMNS[i];
- }
- columnsToHide = columnsToHide.concat([31,32,33,34,35]);
-
- case Biojs.InteractionsTable.MITAB_VERSION_2_5_EXT:
- for ( var i = 15; i < 31; i++ ) {
- this.opt.columns[i] = Biojs.InteractionsTable.MITAB_COLUMNS[i];
- }
- columnsToHide = columnsToHide.concat([15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]);
-
- // Complex expansion
- this.opt.columns[15].render = this._columnRender.showDescXRef;
-
- // Biological Role A
- this.opt.columns[16].render = this._columnRender.showDescXRef;
-
- // Biological Role B
- this.opt.columns[17].render = this._columnRender.showDescXRef;
-
- // Experimental Role A
- this.opt.columns[18].render = this._columnRender.showRowDescXRef;
-
- // Experimental Role B
- this.opt.columns[19].render = this._columnRender.showRowDescXRef;
-
- // Interactor Type A
- this.opt.columns[20].render = this._columnRender.showDescXRef;
-
- // Interactor Type B
- this.opt.columns[21].render = this._columnRender.showDescXRef;
-
- // XRef Interactor Type A
- this.opt.columns[22].render = this._columnRender.showDescXRef;
-
- // Xref Interactor Type B
- this.opt.columns[23].render = this._columnRender.showDescXRef;
-
- // XRef Interaction
- this.opt.columns[24].render = this._columnRender.showDescXRef;
-
- // Annotation Interactor A
- this.opt.columns[25].render = this._columnRender.showRowDescXRef;
-
- // Annotations Interactor B
- this.opt.columns[26].render = this._columnRender.showRowDescXRef;
-
- // Annotations Interaction
- this.opt.columns[27].render = this._columnRender.showRowDescXRef;
-
- // NCBI Taxonomy
- this.opt.columns[28].render = this._columnRender.showDescXRef;
-
- // Parameters
- this.opt.columns[29].render = this._columnRender.showRowDescXRef;
-
- // Creation Date
- this.opt.columns[30].render = this._columnRender.showRowDescXRef;
-
- case Biojs.InteractionsTable.MITAB_VERSION_2_5:
-
- for ( var i = 0; i < 15; i++ ) {
- this.opt.columns[i] = Biojs.InteractionsTable.MITAB_COLUMNS[i];
- }
- columnsToHide = columnsToHide.concat([2,3,7,8,11,12,13]);
-
- this.opt.columns[0].render = this._columnRender.showProteinXRef;
- this.opt.columns[1].render = this._columnRender.showProteinXRef;
- this.opt.columns[2].render = this._columnRender.showValueXRef;
- this.opt.columns[3].render = this._columnRender.showValueXRef;
- this.opt.columns[4].render = this._columnRender.showValueXRef;
- this.opt.columns[5].render = this._columnRender.showValueXRef;
-
- this.opt.columns[6].render = this._columnRender.showDescXRef;
-
- // NCBI Taxon
- this.opt.columns[9].render = this._columnRender.showDescXRef;
- this.opt.columns[10].render = this._columnRender.showDescXRef;
-
- // Interaction type
- this.opt.columns[11].render = this._columnRender.showDescXRef;
-
- // source
- this.opt.columns[12].render = this._columnRender.showDescXRef;
-
- // Interaction AC
- this.opt.columns[13].render = this._columnRender.showInteractionXRef;
-
- // Confidence Score
- this.opt.columns[14].render = this._columnRender.showRawValueXRef;
-
- break;
-
- default :
- Biojs.console.log("Wrong version <"+length+"> ");
- }
-
-
- this.opt.hideColumns = columnsToHide;
-
- },
-
- /*
- * Object: Biojs.InteractionTable._columnRender.showProteinXRef
- * Purpose: Store the render functions to format values on the table cells.
- */
- _columnRender: {
-
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender
- * Purpose: Format the string :(DESC) as link to Protein
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showProteinXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- var xref = {};
- while ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- url = Biojs.InteractionsTable.DATABASE_URL[xref.key];
- newValue += '' + xref.value + ' ';
- }
- delete tk;
- return newValue;
- },
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender.showInteractionXRef
- * Purpose: Format the string :(DESC) as link to Interaction
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showInteractionXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- var xref = {};
- while ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- url = Biojs.InteractionsTable.DATABASE_URL[xref.key];
- newValue += '' + xref.value + ' ';
- }
- delete tk;
- return newValue;
- },
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender.showValueXRef
- * Purpose: Format the string :(DESC) as the VALUE text into a
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showValueXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- var comma = "";
- var xref;
- while ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- newValue += comma + '' + xref.value + ' ';
- comma = ', ';
- }
- delete tk;
- return newValue;
- },
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender.showDescXRef
- * Purpose: Format the string :(DESC) as linked DESC to the ontology
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showDescXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- while ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- url = Biojs.InteractionsTable.DATABASE_URL[xref.key.replace(/-/gi,'')];
- newValue += '' + xref.desc + ' ';
- }
- delete tk;
- return newValue;
- },
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender.showDescXRef
- * Purpose: Format the string :(DESC) as the VALUE text
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showRawValueXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- if ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- newValue = xref.value;
- }
- delete tk;
- return newValue;
- },
- /**
- * @ignore
- *
- * Function: Biojs.InteractionTable._columnRender.showDescXRef
- * Purpose: Format the string :(DESC) as the DESC text
- * Returns: {string} the formatted value
- * Inputs:
- * col -> {int} column index (0-based)
- * dataRow -> {string[]} 1D array containing the whole row on the cell being formatted.
- * currentValue -> {string} raw cell value.
- */
- showRowDescXRef: function (col, dataRow, currentValue) {
- var tk = new Biojs.InteractionsTable.MITabTxtDecoder(currentValue);
- var newValue = "";
- var comma = "";
- while ( tk.hasNext() ) {
- xref = tk.decodeXRef();
- newValue += comma + xref.desc;
- comma = ", ";
- }
- delete tk;
- return newValue;
- }
- }
-},
-{
- MITabTxtDecoder: function (str) {
- this.buffer = ( str != undefined )? str : "" ;
- this.offset = 0;
-
- this.nextToken =
- /**
- * @ignore
- */
- function (delimiter) {
- var token = "";
- var index;
- if ( this.offset < this.buffer.length ) {
- start = this.offset;
- index = this.buffer.indexOf(delimiter, start);
-
- if ( index != -1 ) {
- this.offset = index;
- token = this.buffer.substring(start, index);
- this.offset += delimiter.length;
- } else {
- this.offset = this.buffer.length;
- token = this.buffer.substring(start);
- }
- } else {
- // no more tokens
- }
- return token;
- }
- /**
- * @ignore
- */
- this.hasNext = function () {
- return this.offset < this.buffer.length;
- }
- /**
- * @ignore
- */
- this.decodeXRef = function () {
-
- var token = "";
- var xref = { key:"", value:"", desc:"" };
-
- token = this.nextToken(":");
-
- if ( token.length > 1 ) {
-
- xref.key = token;
- xref.value = this.nextToken("|").replace(/\"/gi,'');
-
- descIdx = xref.value.indexOf("(");
-
- if ( descIdx != -1 ) {
- xref.desc = xref.value.substring( descIdx +1, xref.value.length -1);
- xref.value = xref.value.substring( 0, descIdx);
- }
-
- Biojs.console.log("XREF<"+ xref.key +">, VALUE<"+ xref.value +">, DESC<"+ xref.desc +">" );
- }
-
- return xref;
- }
- /**
- * @ignore
- */
- this.decodeRow = function () {
- var row = [];
- if ( this.hasNext() ) {
- row = this.nextToken("\n").split("\t");
- }
- return row;
- }
- /**
- * @ignore
- */
- this.decodeData = function () {
- var data = [];
-
- while ( this.hasNext() ){
- data.push(this.decodeRow());
- }
- return data;
- }
-
- },
- /**
- * Number of columns for MITAB 2.5 format.
- * @type {int}
- */
- MITAB_VERSION_2_5: 15,
- /**
- * Number of columns for MITAB 2.5 extended format.
- * @type {int}
- */
- MITAB_VERSION_2_5_EXT: 31,
- /**
- * Number of columns for MITAB 2.6 format.
- * @type {int}
- */
- MITAB_VERSION_2_6: 36,
- /**
- * Number of columns for MITAB 2.7 format.
- * @type {int}
- */
- MITAB_VERSION_2_7: 42,
- /**
- * Columns for all MITAB formats
- * @type {Object[]}
- */
- MITAB_COLUMNS: [
- { name: "Identifier A" },
- { name: "Identifier B"},
- { name: "Alternative id A"},
- { name: "Alternative id B"},
- { name: "Aliases for A"},
- { name: "Aliases for B"},
- { name: "Detection Method"},
- { name: "first author"},
- { name: "Id of publication"},
- { name: "NCBI taxon A"},
- { name: "NCBI taxon B"},
- { name: "Interaction type"},
- { name: "Source"},
- { name: "Interaction identifier(s)"},
- { name: "Confidence score"},
- { name: "Complex expansion"},
- { name: "Biological role A"},
- { name: "Biological role B"},
- { name: "Experimental role A"},
- { name: "Experimental role B"},
- { name: "Interactor type A"},
- { name: "Interactor type B"},
- { name: "Xref for interactor A"},
- { name: "Xref for interactor B"},
- { name: "Xref for the interaction"},
- { name: "Annotations for interactor A"},
- { name: "Annotations for Interactor B"},
- { name: "Annotations for the interaction"},
- { name: "NCBI Taxonomy identifier for the host organism"},
- { name: "Parameters of the interaction"},
- { name: "Creation date"},
- { name: "Update date"},
- { name: "Checksum for interactor A"},
- { name: "Checksum for interactor B"},
- { name: "Checksum for interaction"},
- { name: "negative"},
- { name: "Binding domain for interactor A"},
- { name: "Binding domain for interactor B"},
- { name: "Stoichiometry for interactor A"},
- { name: "Stoichiometry for interactor B"},
- { name: "Participant identification method for interactor A"},
- { name: "Participant identification method for interactor B"}
- ],
- /**
- * Map to translate the XRef key into an URL
- * @type {Object}
- */
- DATABASE_URL: {
- uniprotkb: 'http://www.uniprot.org/uniprot/',
- intact: 'http://www.ebi.ac.uk/intact/',
- taxid: 'http://www.uniprot.org/taxonomy/',
- psimi: 'http://www.ebi.ac.uk/ontology-lookup/browse.do?ontName=MI&termId='
- }
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractiveInteractionTable.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractiveInteractionTable.js
deleted file mode 100755
index dccd2d011b..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.InteractiveInteractionTable.js
+++ /dev/null
@@ -1,1221 +0,0 @@
- /*
- * This is the description of the cInteractionTable component.
- * Construct or refresh a dataTable of biomolecule interaction
- * and provides a right click contextual menu for cell elements
- *
- * @class
- * @extends Biojs
- *
- * @author Guillaume Launay
- */
-
-Biojs.InteractiveInteractionTable = Biojs.extend (
- /*
- * @lends Biojs.InteractiveInteractionTable
- * @requires jQuery core
- * @dependency
- *
- * @requires jQuery-UI 1.10.3
- * @dependency
- *
- * @requires Cytoscape.js v2.0.2
- * @dependency
- *
- * @dependency
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * id of the div where the component should be displayed
- *
- * @option {string} pathId
- * KEGG pathway ID
- *
- * @option {string} proxyUrl
- * url of the proxy to use.
- *
- * @option {Object} expression
- * expression values to highloght in the pathway.
- *
- * @option {string} upColor
- * Prefered color for upregulated genes.
- *
- * @option {string} downColor
- * Prefered color for downregulated genes.
- *
- * @option {string[]} genes
- * Array containing the KEGG id of the genes to highlight.
- *
- * @option {Object[]} conditions
- * Array containing the different conditions.
- *
- * @option {string} name
- * Condition name.
- *
- * @option {string[]} values
- * Array containing the gene expression values for the particular condition.
- *
- * @example
- * var instance = new Biojs.KEGGViewer({
- * target: 'YourOwnDivId',
- * pathId: 'hsa04910',
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * expression:{
- * upColor:'red',
- * downColor:'blue',
- * genes: ['hsa:7248', 'hsa:51763', 'hsa:2002', 'hsa:2194'],
- * conditions: [
- * {
- * name: 'condition 1',
- * values: [-1, 0.5, 0.7, -0.3]
- * },
- * {
- * name: 'condition 2',
- * values: [0.5, -0.1, -0.2, 1]
- * },
- * {
- * name: 'condition 3',
- * values: [0, 0.4, -0.2, 0.5]
- * }
- * ]
- * }
- *
- * });
- */
-
-Biojs.KEGGViewer = Biojs.extend(
-/** @lends Biojs.KEGGViewer# */
-{
- constructor: function (options) {
- //Biojs.console.enable();
- var self = this;
-
- if(options.expression && options.expression.conditions.length > 0)
- self._initInfo(this.opt);
-
- self._query(this.opt);
- },
- /**
- * Default values for the options
- * @name Biojs.KEGGViewer-opt
- */
- opt: {
- target: 'YourOwnDivId',
- pathId: 'hsa04910',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- expression:{
- upColor:'red',
- downColor:'blue',
- genes: ['hsa:7248', 'hsa:51763', 'hsa:2002', 'hsa:2194'],
- conditions: [
- {
- name: 'condition 1',
- values: [-1, 0.5, 0.7, -0.3]
- },
- {
- name: 'condition 2',
- values: [0.5, -0.1, -0.2, 1]
- },
- {
- name: 'condition 3',
- values: [0, 0.4, -0.2, 0.5]
- }
- ]
- }
- },
- /**
- * Array containing the supported event names
- * @name Biojs.KEGGViewer-eventTypes
- */
- eventTypes: [],
- /*
- * Function: Biojs.KEGGViewer._initInfo
- * Purpose: Initializes the info panel
- * Inputs: opt -> {Object} component options.
- */
- _initInfo: function(opt){
-
- var self = this;
-
- var cond = 'No Condition ';
- opt.expression.conditions.forEach(function(e, i){
- cond+=''+e.name+' ';
- });
-
- jQuery('').appendTo('#'+opt.target);
-
- $( "#play" ).button({
- text: false,
- icons: {
- primary: "ui-icon-play"
- }
- }).click(function() {
- var options;
- if ( $(this).text() === "play" ) {
- options = {
- label: "stop",
- icons: {
- primary: "ui-icon-stop"
- }
- };
- $("#refresh").button("disable");
-
- self._conditions = $("#condition > option");
- self._interval = setInterval(function(){
-
- var conditions = self._conditions;
- var selected = $('#condition').val();
-
- var index;
- for(var i=0; imax){
- max = val;
- }
- }
- }
-
- opt.expression.min = min;
- opt.expression.max = max;
-
- $( "#slider-range" ).slider({
- range: true,
- min: min,
- max: max,
- step: 0.01,
- slide: function( event, ui ) {
- $( "#amount" ).text(ui.values[ 0 ] + " , " + ui.values[ 1 ] );
- }
- });
- $("#amount").text($("#slider-range").slider("values", 0) +" , " + $("#slider-range").slider("values", 1));
-
- $('#condition').change(function(){
- self._paintExpression(self);
- });
-
- },
- /*
- * Function: Biojs.KEGGViewer._query
- * Purpose: Queries KEGG using the provided KEGGId.
- * Inputs: dataSet -> {Object} Settings of the data set.
- */
- _query: function(dataSet){
-
- var self = this;
- $.ajax({
- dataType: 'xml',
- url: dataSet.proxyUrl,
- data: {
- url:'http://rest.kegg.jp/get/'+dataSet.pathId+'/kgml'
- },
- success: function(xml){
- self._renderPathway(xml, self);
- }
- });
- },
- /*
- * Function: Biojs.KEGGViewer._clearExpression
- * Purpose: Clears the highlighted genes
- * Inputs: self -> {Object} component.
- */
- _clearExpression: function(self){
- var nodes = self._cy.nodes();
- for(var j=0; j {Object} component.
- */
- _paintExpression: function(self){
-
- if($('#condition').val() == 'nocondition')
- self._clearExpression(self);
-
- var min = $("#slider-range").slider("values", 0);
- var max = $("#slider-range").slider("values", 1);
-
- var condition = {};
- for(var i=0; i max){
- color = self.opt.expression.upColor;
- }
- nodes[j].css("background-color", color);
- }
- }
- }
-
- break;
- }
- }
- },
- /*
- * Function: Biojs.KEGGViewer._renderPathway
- * Purpose: Paints the pathway
- * Inputs: data -> {Object} JSON representation of the pathway
- * self -> {Object} component.
- */
- _renderPathway: function(data, self){
- var positions = {},
- node_map = {};
- var nodes = [],
- links = [],
- keggIds = [];
-
- $(data).find('entry').each(function(){
- var entry = $(this);
- var type = entry.attr('type');
- var graphics = entry.find('graphics');
-
- var text_valign = 'center',
- shape = 'rectangle',
- bkg_color = '#99ff99',
- opacity = 0.9,
- border_width = 0,
- width = $(graphics).attr('width'),
- height = $(graphics).attr('height');
-
- if(type == 'gene'){
- border_width = 2;
- }else if(type == 'ortholog'){
- border_width = 2;
- }else if(type == 'compound'){
- shape = 'ellipse';
- bkg_color = '#aaaaee';
- text_valign = 'bottom';
- opacity = 1
- }else if(type == 'map'){
- shape = 'roundrectangle';
- bkg_color = '#00bfff';
- }else if( type == 'group'){
- //shape = 'roundrectangle';
- //bkg_color = '#ffffff';
- width = undefined;
- height = undefined;
- entry.find('component').each(function(){
- node_map[$(this).attr('id')].data.parent = entry.attr('id');
- });
- }
-
- var names = [];
- if(graphics.attr('name') !== undefined){
- names = graphics.attr('name').split(',');
- }
-
- var node = {};
- node.data = {
- id: entry.attr('id'),
- keggId: entry.attr('name').split(' '),
- name: names[0],
- names: names,
- type: type,
- link: entry.attr('link'),
- width: width,
- height: height,
- shape: shape,
- bkg_color: bkg_color,
- text_valign: text_valign,
- 'border-width': border_width
- }
-
- keggIds.push(entry.attr('name'));
-
- node_map[entry.attr('id')] = node;
- nodes.push(node);
-
- positions[entry.attr('id')] = {
- x : +graphics.attr('x'),
- y : +graphics.attr('y')
- }
-
- });
-
- $(data).find('relation').each(function(){
- var rel = $(this);
- var type = rel.attr('type');
-
- var subtypes = [];
- rel.find('subtype').each(function(){
- var sub = $(this);
- var name = sub.attr('name'),
- line_style = 'solid',
- target_arrow_shape = 'none',
- text = '';
-
- if(name == 'maplink'){
- target_arrow_shape = 'diamond';
- }else if(name == 'indirect effect'){
- line_style = 'dotted';
- target_arrow_shape = 'diamond'
- }else if(name == 'state change'){
- line_style = 'dotted';
- }else if(name == 'missing interaction'){
- line_style = 'dotted';
- target_arrow_shape = 'triangle';
- }else if(name == 'phosphorylation'){
- target_arrow_shape = 'triangle';
- text = 'p+';
- }else if(name == 'dephosphorylation'){
- target_arrow_shape = 'triangle';
- text = 'p-';
- }else if(name == 'glycosylation'){
- line_style = 'dashed';
- target_arrow_shape = 'circle';
- }else if(name == 'ubiquitination'){
- line_style = 'dashed';
- target_arrow_shape = 'circle';
- }else if(name == 'methylation'){
- line_style = 'dashed';
- target_arrow_shape = 'circle';
- }else if(name == 'activation'){
- target_arrow_shape = 'triangle';
- }else if(name == 'inhibition'){
- target_arrow_shape = 'tee';
- }else if(name == 'expression'){
- target_arrow_shape = 'triangle';
- }else if(name == 'repression'){
- target_arrow_shape = 'tee';
- }
-
- links.push({
- data:{
- source: rel.attr('entry1'),
- target: rel.attr('entry2'),
- name: name,
- reaction: type,
- line_style: line_style,
- target_arrow_shape: target_arrow_shape,
- text: text
- }
- });
- });
- });
-
- jQuery('
').appendTo('#'+self.opt.target).cytoscape({
- elements: {
- nodes : nodes,
- edges : links
- },
- style: cytoscape.stylesheet().selector('node').css({
- 'content': 'data(name)',
- 'text-valign': 'center',
- 'width': 'data(width)',
- 'height': 'data(height)',
- 'shape':'data(shape)',
- 'background-color': 'data(bkg_color)',
- 'text-valign': 'data(text_valign)',
- 'opacity': 'data(opacity)',
- 'border-color': '#000000',
- 'border-width': 'data(border-width)',
- 'font-size': 11
- }).selector('edge').css({
- 'content': 'data(text)',
- 'target-arrow-shape': 'data(target_arrow_shape)',
- 'line-style': 'data(line_style)',
- 'line-color':'#000000',
- 'target-arrow-color':'#000000',
- 'text-valign' : 'bottom'
- }),
- layout: {
- name: "preset",
- fit: false,
- positions: positions
- },ready:function(){
- var cy = this;
- self._cy = cy;
- }
- });
- }
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.MmcifViewer.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.MmcifViewer.js
deleted file mode 100755
index 62f56a931a..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.MmcifViewer.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * This is the description of the MmcifViewer component. This component shows tabular views of information in PDB's mmcif files.
- *
- * @class
- * @extends Biojs
- *
- * @author Swanand Gore
- * @version 1.0.0
- * @category 0
- *
- *
- * @param {Object} options An object with the options for MmcifViewer component.
- *
- *
- * @example
- * var myview = new Biojs.MmcifViewer({
- * divid:"YourOwnDivId", pdbid:"1cbs"
- * });
- *
- */
-Biojs.MmcifViewer = Biojs.extend (
-/** @lends Biojs.MmcifViewer# */
-{
- /**
- * Default values for the options
- * @name Biojs.MmcifViewer-opt
- */
- opt: {
- divid: "YourOwnDivId", pdbid:'1cbs'
- },
-
- constructor: function (options) {
- var self = this;
- // make the top table with all categories listed
- jQuery("#"+options.divid).html( ' ' );
- self.pdbid = options.pdbid;
- self.catable = null;
- jQuery.ajax({
- url: 'http://puck.ebi.ac.uk:4000/mmcif/'+self.pdbid+'/categories',
- data: {'varname':'catlist'},
- dataType: 'script',
- crossDomain: 'true',
- type: 'GET',
- success: function(response, callOptions) { self.showCategoriesList(catlist); }
- });
- },
-
- showCategoriesList: function(catlist) {
- var self = this;
- for(var ci=0; ci < catlist.length; ci++) catlist[ci] = [catlist[ci]];
- var dtable = jQuery('#catlistTable').dataTable( {
- "aaData": catlist,
- "aoColumns": [ { "sTitle": "Categories" } ]
- } );
- dtable.$('td').click( function () {
- var sData = dtable.fnGetData( this );
- self.showAcategory(sData);
- } );
- },
- standardizeVals: function(vals) {
- if(vals instanceof Array) return vals;
- return [vals];
- },
- showAcategory: function(catname) {
- var self = this;
- console.log( 'Start showing category '+catname );
- jQuery.ajax({
- url: 'http://puck.ebi.ac.uk:4000/mmcif/'+self.pdbid+'/'+catname,
- data: {'varname':'catinfo'},
- dataType: 'script',
- crossDomain: 'true',
- type: 'GET',
- success: function(response, callOptions) { self.showCategoryTable(catinfo); }
- });
- //var dtable = jQuery('#catlistTable').dataTable( {
- // "aaData": catlist,
- // "aoColumns": [ { "sTitle": "Categories" } ]
- //} );
- },
-
- showCategoryTable: function(catinfo) {
- var self = this;
- var colinfo = [], rows = [];
- for(var item in catinfo) {
- colinfo.push( {"sTitle":item} );
- var vals = self.standardizeVals(catinfo[item]);
- if(rows.length == 0) {
- for(ri=0; ri < vals.length; ri++) rows.push([]);
- }
- for(ri=0; ri < vals.length; ri++)
- rows[ri].push(vals[ri]);
- }
- if(self.catable!=null) { self.catable.fnDestroy(); jQuery("#categoryTable").html(""); }
- //self.catable = null;
- self.catable = jQuery('#categoryTable').dataTable( {
- "aaData": rows, "aoColumns": colinfo, bDestroy:true //, "bRetrieve": true, "bDestroy": true
- } );
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.MmcifViewer-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.MmcifViewer#onClick
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} selected Selected character.
- * @example
- * instance.onClick(
- * function( objEvent ) {
- * alert("The character " + objEvent.selected + " was clicked.");
- * }
- * );
- *
- * */
- "onClick",
-
- /**
- * @name Biojs.MmcifViewer#onHelloSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} textSelected Selected text, will be 'Hello' obviously.
- * @example
- * instance.onHelloSelected(
- * function( objEvent ) {
- * alert("The word " + objEvent.textSelected + " was selected.");
- * }
- * );
- *
- * */
- "onHelloSelected"
- ]
-});
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBLogos.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBLogos.js
deleted file mode 100755
index ac0dd21d3d..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBLogos.js
+++ /dev/null
@@ -1,261 +0,0 @@
-/**
- * PDBLogos shows a set of icons to give a quick summary of salient features of a PDB entry.
- * See more info on PDBLogos at http://pdbe.org/prints
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez-Carvajal
- * @version 1.0.0
- * @category 2
- *
- * @requires Raphael 2.1.0
- * @dependency
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @param {Object} options An object with the options for PDBLogos component.
- *
- * @option {string} target
- * Identifier/HTMLElement of the div container where the component should be rendered.
- *
- * @option {string} identifier
- * PDB entry id for which prints will be rendered.
- *
- * @option {Object} raphael
- * A Raphael object instead of div to render PDBprints into.
- *
- * @option {int} startX
- * X-coordinate of point where rendering the array of PDBprints will start in the Raphael canvas
- *
- * @option {int} startY
- * Y-coordinate of point point where rendering the array of PDBprints will start in the Raphael canvas
- *
- * @option {int} interval
- * Gap size between successive PDBprints in a vertical or horizontal array
- *
- * @option {int} size
- * Length of an icon logo
- *
- * @option {string} [color="#588FE5"]
- * Color for background as HTML color code.
- *
- * @option {char} orient
- * Rendering orientation either vertical or horizontal
- *
- * @option {string} [pdb3DIcon='biojs/css/images/3d.png']
- * Image URL to be used as 3D structure's icon
- *
- * @example
- * var instance = new Biojs.PDBLogos({
- * target: "YourOwnDivId",
- * identifier: "1cbs"
- * });
- *
- */
-Biojs.PDBLogos = Biojs.extend (
-/** @lends Biojs.PDBLogos# */
-{
- /**
- * Default values for the options
- * @name Biojs.PDBLogos-opt
- */
- opt: {
- target: "YourOwnDivId",
- raphael: null,
- identifier:"",
- startX: 10,
- startY: 10,
- interval: 10,
- size: 40,
- orient: 'h',
- logosURL: 'http://www.ebi.ac.uk/pdbe-apps/widgets/pdbprints',
- logos: [],
- color: "#588FE5",
- pdb3DIcon: 'biojs/css/images/3d.png'
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.PDBLogos-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.PDBLogos#onClick
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {string} identifier PDB actual entry.
- * @eventData {string} category Name of the PDBLogo category clicked.
- * @eventData {string} printsUrl Url of the PDB general information.
- * @example
- * instance.onClick(
- * function( e ) {
- * alert("Logo " + e.category + " of PDB " + e.identifier + " was clicked.");
- * }
- * );
- *
- * */
- "onClick"
- ],
-
- constructor: function (options) {
- this._initCanvas();
- if( !Biojs.Utils.isEmpty(this.opt.identifier) ) {
- this._doRequest(this.opt.identifier);
- }
- },
-
- _initCanvas: function() {
- var config = this.opt;
-
- // Make Raphael object if not provided already
- if ( !Biojs.Utils.isEmpty( config.raphael ) ){
- config.raphael.remove();
- config.raphael = null;
- }
-
- var sizex = config.startX + config.size * Biojs.PDBLogos.CATEGORY.lenght;
- var sizey = config.startY + (config.interval+config.size);
-
- if(config.orient == Biojs.PDBLogos.VERTICAL) {
- sizey = config.startY + config.size * Biojs.PDBLogos.CATEGORY.lenght;
- sizex = config.startX + (config.interval+config.size);
- }
- config.raphael = Raphael(config.target, sizex, sizey);
- },
-
- /**
- * Sets the pdb identifier generating a new request of logos.
- *
- * @param {string} value PDB entry.
- *
- * @example
- * instance.setIdentifier("1j3s");
- *
- */
- setIdentifier: function ( value ) {
- this.opt.identifier = value;
- this._initCanvas();
- this._doRequest(value);
- },
-
- _doRequest: function(identifier){
-
- var self = this;
-
- jQuery.ajax({
- url: 'http://www.ebi.ac.uk/pdbe-apps/widgets/pdbprints',
- data: { 'varname':'printsdata', 'pdbid': identifier, color: "transparent" },
- dataType: 'script',
- crossDomain: 'true',
- type: 'GET',
- success: function(response, callOptions) { self._printsLayout(printsdata); }
- });
- },
-
-
- _printsLayout: function(data) {
- var self = this;
- var config = this.opt;
- var ix = config.startX;
- var iy = config.startY;
- var i=0;
-
- config.logos = [];
-
- data[config.identifier].PDBStructure = [ config.pdb3DIcon, 'structure'];
-
- for( category in Biojs.PDBLogos.CATEGORY ) {
-
- var isizeY = config.size, isizeX = config.size;
- var imgUrl = data[config.identifier][category][0];
- var printsURL = "http://www.pdbe.org";
-
- ix = config.startX;
- iy = config.startY;
-
- if( config.orient == Biojs.PDBLogos.VERTICAL ) {
- iy += config.size * (i++);
- } else {
- ix += config.size * (i++);
- }
-
- if(category == "PDBeLogo") {
- config.logos.push(
- config.raphael.text(ix, iy + self.opt.size/4, config.identifier)
- .attr({
- 'font-family':'Mono',
- 'text-anchor':'start',
- 'font-size': self.opt.size/3,
- 'cursor':'pointer',
- 'title':'View all about PDB ' + config.identifier
- })
- .data("identifier", config.identifier)
- .mouseup( function() {
- window.open( "http://www.pdbe.org/" + this.data("identifier") );
- })
- );
-
- imgUrl = "http://www.ebi.ac.uk/pdbe-apps/widgets/html/PDBeWatermark_horizontal_128.png";
- isizeX = config.size * 0.9;
- isizeY = config.size/2;
- iy += config.size/2;
-
- } else {
-
- printsURL += "/"+config.identifier+"/" + Biojs.PDBLogos.CATEGORY[category];
-
- if ( category == "PDBStructure" ) {
- printsURL = "http://www.ebi.ac.uk/pdbe-srv/view/entry/" + config.identifier + "/openastex";
- }
-
- // Add icon background
- config.raphael.rect(ix, iy, isizeX, isizeY, 7).attr({'fill':self.opt.color});
- }
-
- config.logos.push(
- config.raphael.image(imgUrl, ix, iy, isizeX, isizeY)
- .attr({
- 'cursor':'pointer',
- 'title':'View '+category
- })
- .data({
- "printsURL": printsURL,
- "category": category
- })
- .mouseup( function() {
- self.raiseEvent( Biojs.PDBLogos.EVT_ON_CLICK, {
- printsURL: this.data("printsURL"),
- identifier: config.identifier,
- category: this.data("category")
- });
- })
- .mouseover( function() { } )
- );
-
- }
-
- }
-
-},{
- HORIZONTAL: 'h',
- VERTICAL: 'v',
-
- CATEGORY: {
- "PDBeLogo": "",
- "PrimaryCitation": "citation",
- "Taxonomy": "taxonomy",
- "Expressed": "taxonomy",
- "Experimental": "experimental",
- "Protein": "primary",
- "NucleicAcid": "primary",
- "Ligands": "ligands",
- "PDBStructure": "PDBStructure"
- },
-
- EVT_ON_CLICK: "onClick"
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBprints.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBprints.js
deleted file mode 100755
index 5b38cc36dd..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.PDBprints.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * This is the description of the PDBprints component. This component renders a set of icons to give a quick summary of salient features of a PDB entry.
- * See more info on PDBprints at http://pdbe.org/prints
- *
- * @class
- * @extends Biojs
- *
- * @author Swanand Gore
- * @version 1.0.0
- * @category 0
- *
- * @requires Raphael 2.1.0
- * @dependency
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @param {Object} options An object with the options for PDBprints component.
- *
- * @option {list} targets
- * This is a list of configuration options, each corresponding to PDBprints to be rendered in a div.
- * Each config consists of following:
- *
- * pdbids: PDB entry ids for which prints are to be rendered.
- * divid: the id of div in which the prints are to be rendered.
- * rapha: A Raphael object instead of div to render PDBprints into.
- * startX: X-coordinate of point where rendering the array of PDBprints will start in the Raphael canvas
- * startY: Y-coordinate of point point where rendering the array of PDBprints will start in the Raphael canvas
- * interval: gap between successive PDBprints in a vertical or horizontal array
- * size: length of an icon logo in PDBprints
- * orient: vertical or horizontal rendering fo PDBprints
- *
- *
- * @example
- * var instance = new Biojs.PDBprints({
- * targets : [
- * {divid:"YourOwnDivId", pdbids:["1aac","1cbs"]}
- * ]
- * });
- *
- */
-Biojs.PDBprints = Biojs.extend (
-/** @lends Biojs.PDBprints# */
-{
- /**
- * Default values for the options
- * @name Biojs.PDBprints-opt
- */
- opt: {
- target: "YourOwnDivId", rapha: null, pdbids:['2x9t']
- },
-
- constructor: function (options) {
- var self = this;
-
- var defconf = {size:40, orient:'h', interval:10, startX:10, startY:10};
-
- // Make Raphael object if not provided already
- var deldiv = [];
- for(var ci=0; ci < self.opt.targets.length; ci++) {
- var config = self.opt.targets[ci];
- for(var akey in defconf) {
- if(!config[akey]) config[akey] = defconf[akey];
- }
- if(!config['rapha']) {
- var sizex = config.startX + config.size*8;
- var sizey = config.startY + (config.interval+config.size)*config.pdbids.length;
- if(config.orient == "v") {
- sizey = config.startY + config.size*8;
- sizex = config.startX + (config.interval+config.size)*config.pdbids.length;
- }
- config['rapha'] = Raphael(config['divid'], sizex, sizey);
- }
- }
- var pdbids = '';
- for(var rapha in self.opt.targets) {
- for(var pi=0; pi < self.opt.targets[rapha]['pdbids'].length; pi++)
- pdbids += self.opt.targets[rapha]['pdbids'][pi]+",";
- }
- pdbids = pdbids.replace(/,$/,"");
-
- jQuery.ajax({
- url: 'http://www.ebi.ac.uk/pdbe-apps/widgets/pdbprints',
- data: {'varname':'printsdata', 'pdbid':pdbids},
- dataType: 'script',
- crossDomain: 'true',
- type: 'GET',
- success: function(response, callOptions) { self.printsLayout(printsdata); }
- });
- },
-
- printsLayout: function(printsdata) {
- var self = this;
- for(var ci=0; ci < self.opt.targets.length; ci++) {
- var config = self.opt.targets[ci];
- self.printsLayout1(config, printsdata)
- }
- },
- printsLayout1: function(conf, printsdata) {
- var self = this;
- var printsize = 50, printsorient = 'h', printstartX = 10, printstartY = 10, printsInterval = 5;
- printsize = conf.size;
- printsorient = conf.orient;
- printsInterval = conf.interval;
- printstartX = conf.startX;
- printstartY = conf.startY;
-
- var printscats = [ "PDBeLogo", "PrimaryCitation", "Taxonomy", "Expressed", "Experimental", "Protein", "NucleicAcid", "Ligands" ];
- var catsinfo = {
- "PDBeLogo": [""],
- "PrimaryCitation": ["citation"],
- "Taxonomy": ["taxonomy"],
- "Expressed": ["taxonomy"],
- "Experimental": ["experimental"],
- "Protein": ["primary"],
- "NucleicAcid": ["primary"],
- "Ligands": ["ligands"]
- };
- for(var pi=0; pi < conf['pdbids'].length; pi++) {
- var pid = conf['pdbids'][pi];
- for(var ci=0; ci < printscats.length; ci++) {
- var cat = printscats[ci];
- var ix = printstartX + printsize*ci;
- var iy = printstartY;
- if(printsorient == 'v') {
- ix = printstartX;
- iy = printstartY + printsize*ci;
- }
- var imgurl = printsdata[pid][cat][0], isizeY = printsize, isizeX = printsize;
- var printsURL = "http://pdbe.org";
- if(cat=="PDBeLogo") {
- var pidlink = conf.rapha.text(ix,iy+printsize/4,pid).attr({'font-family':'Mono', 'text-anchor':'start', 'font-size':printsize/3})
- .attr({'cursor':'pointer','title':'a tooltip '+pid}).data("pdbid",pid); // TODO tooltips
- pidlink.mouseup( function() { window.open("http://pdbe.org/"+this.data("pdbid")); } );
- imgurl = "http://www.ebi.ac.uk/pdbe-apps/widgets/html/PDBeWatermark_horizontal_128.png";
- isizeX = printsize*0.9; isizeY = printsize/2; iy += printsize/2;
- }
- else printsURL += "/"+pid+"/"+catsinfo[cat][0];
- var printsLogo = conf.rapha.image(imgurl,ix,iy,isizeX,isizeY).attr({'cursor':'pointer','title':'a tooltip '+cat});
- printsLogo.data("printsURL", printsURL);
- printsLogo.mouseup( function() { window.open(this.data("printsURL")); } );
- printsLogo.mouseover( function() { } );
- }
- if(printsorient == 'v') printstartX += printsize + printsInterval;
- if(printsorient == 'h') printstartY += printsize + printsInterval;
- }
- },
- /**
- * Array containing the supported event names
- * @name Biojs.PDBprints-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.PDBprints#onClick
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} selected Selected character.
- * @example
- * instance.onClick(
- * function( objEvent ) {
- * alert("The character " + objEvent.selected + " was clicked.");
- * }
- * );
- *
- * */
- "onClick",
-
- /**
- * @name Biojs.PDBprints#onHelloSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} textSelected Selected text, will be 'Hello' obviously.
- * @example
- * instance.onHelloSelected(
- * function( objEvent ) {
- * alert("The word " + objEvent.textSelected + " was selected.");
- * }
- * );
- *
- * */
- "onHelloSelected"
- ]
-});
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3D.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3D.js
deleted file mode 100755
index d03876020c..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3D.js
+++ /dev/null
@@ -1,1260 +0,0 @@
-/**
- * Pdb file 3D viewer component using JMol
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez , Christine Jandrasits
- * @version 1.0.0
- * @category 3
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires jMol 12.0.48
- * @dependency
- *
- * @requires Protein3D CSS
- * @dependency
- *
- * @param {Object} options An object with the options for Biojs.Protein3D component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {int} [width=597]
- * Width in pixels.
- *
- * @option {int} [height=400]
- * Height in pixels.
- *
- * @option {string} [jmolFolder="{BIOJS_HOME}/dependencies/jmol-12.0.48"]
- * Relative path of the jMol library.
- *
- * @option {string} [loadingStatusImage="{BIOJS_HOME}/css/images/ajax-loader-1.gif"]
- * Relative path of the image to be displayed on loading status.
- *
- * @option {string} [unpolarColor="salmon"]
- * This value is used by displayUnpolar() method for coloring hydrophobic residues.
- *
- * @option {string} [negativeColor="red"]
- * This value is used by displayNegative() method for coloring acidic(-) residues.
- *
- * @option {string} [positiveColor="blue"]
- * This value is used by displayNegative() method for coloring basic(+) residues.
- *
- * @option {string} [polarColor="yellow"]
- * This value is used by displayNegative() method for coloring hydrophylic residues.
- *
- * @option {string} [backgroundColor="white"]
- * Background color of the jMol applet
- *
- * @option {bool} [enableControls=true]
- * Enable for showing the control panel. If value is 'false', it disables both methods showControls and hideControls.
- *
- *
- * @example
- * var instance = new Biojs.Protein3D({
- * target: 'YourOwnDivId'
- * });
- *
- *
- * // Example of loading a pdb file by means of an HTTP request to
- * // 'http://www.ebi.ac.uk/pdbe/entry-files/pdb1wq6.ent' through the local proxy 'proxy.php'.
- * // Note that instance.setPdb(data) is invoked once the data have been arrived.
- * jQuery.ajax({
- * url: '../biojs/dependencies/proxy/proxy.php',
- * data: 'url=http://www.ebi.ac.uk/pdbe/entry-files/pdb1wq6.ent',
- * dataType: 'text',
- * success: function(pdbFile){
- * instance.setPdb(pdbFile);
- * },
- * error: function(qXHR, textStatus, errorThrown){
- * alert(textStatus);
- * }
- * });
- *
- */
-Biojs.Protein3D = Biojs.extend(
-/** @lends Biojs.Protein3D# */
-{
- constructor: function (options) {
-
- var self = this;
-
- var width = this.opt.width;
- var height = this.opt.height;
-
- this._appletId = "jmolApplet" + self.getId();
-
- this._container = jQuery('#' + this.opt.target).addClass('Protein3D');
-
- // Container Width
- if ( width == undefined ) {
- width = this._container.css('width');
-
- } else {
- this._container.width( width );
- }
-
- // Container Height
- if ( height == undefined ) {
- height = this._container.css('height');
-
- } else {
- this._container.height( height );
- }
-
- this.opt.backgroundColor = ( this.opt.backgroundColor !== undefined )? this.opt.backgroundColor : this._container.css('background-color');
-
- this._container.html('');
-
- this._controlsContainer = jQuery('
')
- .appendTo( this._container );
-
- this._appletContainer = jQuery('
')
- .appendTo( this._container );
-
- this._loadingImage = jQuery('
')
- .appendTo( this._container )
- .hide();
-
- if (this.opt.loadingStatusImage !== undefined ) {
- this._loadingImage.css( 'background-image', 'url(' + this.opt.loadingStatusImage + ')' );
- }
-
- this._initializeJmolApplet();
-
- Biojs.console.log("ending Biojs.Protein3D constructor");
- },
-
- /**
- * Default options (and its values) for the Protein3D component.
- * @name Biojs.Protein3D-opt
- * @type Object
- */
- opt:
- {
- target: 'component',
- width: 597,
- height: 400,
- jmolFolder: '../biojs/dependencies/jmol-12.0.48',
- unpolarColor: "salmon",
- negativeColor: "red",
- positiveColor: "blue",
- polarColor: "yellow",
- backgroundColor: "white",
- enableControls: true,
- loadingStatusImage: undefined,
- surface: "None",
- style: "Cartoon",
- colorScheme: "By Chain",
- antialias: false,
- rotate: false
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Protein3D-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.Protein3D#onPdbLoaded
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} file The name of the loaded file.
- * @eventData {string} result A string with either value 'success' or 'failure'.
- * @eventData {string} message Error message in case of result be 'failure'.
- *
- * @example
- * instance.onPdbLoaded(
- * function( objEvent ) {
- * alert( (objEvent.result == "success")? "Pdb file "+ objEvent.file+" loaded." : objEvent.message );
- * }
- * );
- *
- * */
- "onPdbLoaded",
- /**
- * @name Biojs.Protein3D#onSelection
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} selectionType String with either value 'region' or 'positions'.
- * @eventData {Object|Array} selection If the type of selection is a region, this will be a Object
- * with attributes 'start' and 'end'. In other case, this will be an array
- * containing the selected positions.
- *
- * @example
- * instance.onSelection(
- * function( objEvent ) {
- * selection = (objEvent.selectionType === "region")? (objEvent.selection.start +" - "+ objEvent.selection.end) : objEvent.selection.join(',');
- * alert( "Selected "+objEvent.selectionType+": "+selection );
- * }
- * );
- *
- * */
- "onSelection"
- ],
-
- /* Internal members */
- _appletId: undefined,
- _controlsReady: false,
- _jmoljarfile: "JmolApplet.jar",
- _jmolAppletInitialized: false,
- _selection: undefined,
- _selectionType: undefined,
-
- _display: {
- property: {
- polar: false,
- unpolar: false,
- positive: false,
- negative: false
- },
- surface: false,
- halos: true
- },
-
-
- _initializeJmolApplet: function() {
-
- var self = this;
-
- jmolInitialize( self.opt.jmolFolder );
- jmolSetAppletColor( self.opt.backgroundColor );
- jmolSetDocument(0);
-
- // Jmol needs a global function for executing up whenever a pbd is loaded
- // Name for the function in global scope
- var functionCbName = self._appletId + "_pdbLoadCb";
-
- Biojs.console.log("registring callback function loadStructCallback " + functionCbName);
-
- // Register the function this._loadStructCallback as global for JmolApplet use
- Biojs.registerGlobal( functionCbName , self._loadStructCallback );
-
- // Tell Jmol the name of the function in global scope
- jmolSetCallback("loadStructCallback", functionCbName );
- },
-
- /**
- * Shows the form of controls.
- *
- * @example
- * instance.showControls();
- *
- */
- showControls: function() {
- this.changeControlsVisiblility(true);
- },
-
- /**
- * Hides the form of controls.
- *
- * @example
- * instance.hideControls();
- *
- */
- hideControls: function() {
- this.changeControlsVisiblility(false);
- },
-
- /**
- * Shows/Hides the form of controls.
- *
- * @example
- * instance.changeControlsVisiblility(true);
- *
- */
- changeControlsVisiblility: function( flag ) {
-
- if (this.opt.enableControls) {
-
- if (!this._controlsReady) {
- this._buildControls();
- }
-
- if ( flag != this._controlsAreVisible() ) {
- this._toggleControls();
- }
- }
- },
-
- /**
- * Returns the information about the region of the currently PDB file.
- *
- * @example
- * //Show the region in an alert window.
- * var selection = instance.getSelection();
- * alert("selected: "+ selection );
- *
- * @returns {Object|Array}
- * Returns a plain object if the current selection is a region.
- * In this case, will contain the fields start and end; where "start" is greater than or equal to "end".
- * Returns an array if the current selection is a set of positions.
- * Returns undefined if there are not selection.
- *
- */
- getSelection: function(){
- return Biojs.Utils.clone(this._selection);
- },
-
- /**
- * Restores the default display settings for the current PDB file.
- * Note: for removing out the current selection use removeSelection().
- *
- * @example instance.reset();
- */
- reset: function(){
- jmolScriptWait( this._getDisplayColor( this.opt.colorScheme ) + this._getDisplayStyle( this.opt.style ), this.getId() );
-
- // TODO: use functions instead of jquery
-
- var theTargetDiv = jQuery("#"+this.opt.target);
- theTargetDiv.find("div#controlSection > div#controls > input[type='checkbox']").attr("checked",false);
- theTargetDiv.find('#styleSelect').val( this.opt.style );
- theTargetDiv.find('#colorSelect').val( this.opt.colorScheme );
- theTargetDiv.find('#surfaceSelect').val( this.opt.style );
-
- for (var key in this._display.property) {
- this._display.property[key] = false;
- }
-
- this.setHalosVisible(true);
- },
-
- showLoadingImage: function(flag){
- var visible = (flag === undefined) ? true: flag;
-
- // Toggle loading image if its status is different than flag
- if ( this._loadingImage.is(':visible') != visible ) {
- this._controlsContainer.toggle();
- this._appletContainer.toggle();
- this._loadingImage.toggle();
- }
- },
-
- /**
- * Sets the pdb file to be displayed.
- * Also triggers the event whenever a new pdb file is loaded.
- *
- * @param {string} pdb The content of the pdb file.
- *
- * @example
- * instance.showLoadingImage();
- *
- * jQuery.ajax({
- * url: '../biojs/dependencies/proxy/proxy.php',
- * data: 'url=http://www.ebi.ac.uk/pdbe/entry-files/pdb3u01.ent',
- * dataType: 'text',
- * success: function(pdbFile){
- * instance.setPdb(pdbFile);
- * },
- * error: function(qXHR, textStatus, errorThrown){
- * alert(textStatus);
- * }
- * });
- *
- */
- setPdb: function( pdb ){
- Biojs.console.log("LOADING pdb content");
- //Biojs.console.log(pdb);
-
- var self = this;
- var surfaceCmd = this._getDisplaySurface( this.opt.surface );
- var styleCmd = this._getDisplayStyle( this.opt.style );
- var colorSchemeCmd = this._getDisplayColor( this.opt.colorScheme );
-
- var scr = colorSchemeCmd + styleCmd + surfaceCmd + this._getSelectionScript( this._selection );
-
- this.showLoadingImage(false);
-
- if ( this._jmolAppletInitialized ) {
- this.reset();
- }
-
- htmlContent = jmolAppletInline([self._appletContainer.width(), self._appletContainer.height()], pdb, scr, self.getId() );
-
- this._appletContainer.html( htmlContent );
- this._jmolAppletInitialized = true;
-
- Biojs.console.log("setPdb() ending");
- },
-
- /**
- * Reverts the highlighting of a region and removes the current selection.
- *
- * @example
- * instance.removeSelection();
- *
- */
- removeSelection: function(){
- this._selection = undefined;
- var scr = 'select all; ';
- scr += (!this._display.halos)? 'color translucent 1; ': 'selectionHalos off; ';
- scr += 'select none;'
- jmolScriptWait(scr, this.getId());
- },
-
- // function that highlights the atoms in the given region
- // has the same interface as in Dasty
-
-
- /**
- * Filters the currently provided PDB files: Only PDB files containing a part of the requested region
- * are selectable. The specified region is highlighted in the displayed PDB file.
- *
- * @example
- * // Selection of the region in the interval [100,150].
- * instance.setSelection({start: 100, end: 150});
- *
- * @example
- * // Selection of the positions 4, 8 and 100.
- * instance.setSelection([4,8,100]);
- *
- * @example
- * // Selection from 51 to 60, 87, and from 101 to 110
- * instance.setSelection([{start:51,end:60},87,{start:101,end:110}]);
- *
- * @param {Object|Array} selection Can be either a plain object or an array.
- * If object, it must have the fields start and end; Where "start" is greater than or equal to "end".
- * If array, it must contain numbers representing the positions to be selected.
- */
- setSelection: function(selection){
- if ( selection instanceof Array ) {
- this._selection = Biojs.Utils.clone(selection);
- this._drawSelection();
- this.raiseEvent( Biojs.Protein3D.EVT_ON_SELECTION, {
- selectionType: this._selectionType,
- selection: Biojs.Utils.clone(selection)
- });
- }
- else if ( selection instanceof Object && selection.start <= selection.end ){
- this._selection = Biojs.Utils.clone(selection);
- this._drawSelection();
- this.raiseEvent( Biojs.Protein3D.EVT_ON_SELECTION, {
- selectionType: "region",
- selection: Biojs.Utils.clone(selection)
- });
- } else {
- Biojs.console.log("selection not valid");
- }
- },
-
- // highlight given region
- _getSelectionScript: function(selection){
- var scr = "";
- var selectionText = "";
- var singleRegion = false;
- var regionInSelection = false;
- var positionInSelection = false;
-
- if ( selection ){
- scr = 'select all; color translucent 1;';
- //selectionText = (selection instanceof Array)? selection.join(",") : selection.start + "-" + selection.end;
- if (selection instanceof Array) {
- for (i = 0; i < selection.length; i++) {
- if (selection[i] instanceof Object) {
- selectionText = selectionText + selection[i].start + "-" + selection[i].end;
- regionInSelection = true;
- } else {
- selectionText = selectionText + selection[i];
- positionInSelection = true;
- }
- if (i != (selection.length-1)) {
- selectionText = selectionText + ",";
- }
- }
- } else {
- selectionText = selection.start + "-" + selection.end;
- singleRegion = true;
- }
-
- if ( !this._display.halos ) {
- scr += 'select not ' + selectionText + '; color translucent 0.8; selectionHalos off;';
- } else {
- scr += 'select ' + selectionText + '; selectionHalos on;';
- }
- } else {
- scr = "select none";
- }
- Biojs.console.log("Selection script: " + scr);
- if (singleRegion == true) {
- this._selectionType = "region";
- } else if ((regionInSelection == true) && (positionInSelection == true)) {
- this._selectionType = "mixed";
- } else if ((regionInSelection == true) && (positionInSelection == false)) {
- this._selectionType = "multipleRegion";
- } else if ((regionInSelection == false) && (positionInSelection == true)) {
- this._selectionType = "positions";
- } else {
- this._selectionType = "region";
- }
- Biojs.console.log("Selection type: " + this._selectionType);
- return scr;
- },
-
- _drawSelection: function(){
- if ( this._selection !== undefined ) {
- result = jmolScriptWait( this._getSelectionScript(this._selection), this.getId() );
- Biojs.console.log("Selection done, result: "+result);
- }
- },
-
- /**
- * Apply antialias rendering filter.
- *
- * @param {boolean} flag If true, smooth rendering will be applied.
- *
- * @example
- * instance.displayAntialias(true);
- */
- displayAntialias: function ( flag ) {
- // Update the checkbox control
- this._getControl('antialiasCheck').attr("checked", flag );
- // Apply the antialiasing
- this.applyJmolCommand('set antialiasDisplay '+ flag );
- },
-
- /**
- * Apply rotation.
-
- * @example
- * instance.rotate(true);
- *
- */
- rotate: function ( flag ) {
- // Update the checkbox control
- this._getControl('rotationCheck').attr("checked", flag );
- // Apply the rotation
- this.applyJmolCommand('spin '+ flag );
- },
-
- /**
- * Draws a translucent surface surrounding the protein.
- *
- * @param {string} name Type of surface wanted. Use one of these: Biojs.Protein3D.SURFACE_NONE,
- * Biojs.Protein3D.SURFACE_ACCESSIBLE, Biojs.Protein3D.SURFACE_EXCLUDED, Biojs.Protein3D.SURFACE_CAVITIES
- *
- * @example
- * instance.displaySurface( Biojs.Protein3D.SURFACE_CAVITIES );
- *
- */
- displaySurface: function ( name ) {
-
- var surfaceCmd = this._getDisplaySurface( name );
-
- if ( surfaceCmd === undefined ) {
- Biojs.console.log("Unknown surface name " + name );
- return;
- }
-
- // Update select control
- this._getControl('surfaceSelect').val(name);
- this.applyJmolCommand( surfaceCmd + this._getSelectionScript(this._selection) );
- },
-
- /**
- * Undo the action of method displaySurface.
- *
- * @example
- * //
- * instance.hideSurface();
- *
- */
- hideSurface: function(){
- this.displaySurface( Biojs.Protein3D.SURFACE_NONE );
- },
-
- /**
- * Selects the acidic atoms and do coloring.
- *
- * @param {string} [color="red"] Refer to the Jmol documentation for availables coloring schemes.
- *
- * @example
- * //
- * instance.displayNegative("red");
- *
- */
- displayNegative: function (color, flag) {
-
- color = ( color !== undefined )? color : this.opt.positiveColor;
- flag = ( flag !== undefined )? flag : true;
-
- // Update the checkbox control
- this._getControl('negativeCheck').attr("checked", flag );
-
- // Update the Jmol applet
- (flag) ? this.display('acidic', color) : this.undisplay('acidic');
- this._display.property.negative = flag;
-
- },
- /**
- * Undo the action of method displayNegative.
- *
- * @example
- * //
- * instance.hideNegative();
- *
- */
- hideNegative: function () {
- this.displayNegative(undefined, false);
- },
-
- /**
- * Selects the basic atoms and do coloring.
- *
- * @param {string} [color="blue"] Refer to the Jmol documentation for availables coloring schemes.
- *
- * @example
- * //
- * instance.displayPositive();
- *
- */
- displayPositive: function ( color, flag ) {
-
- color = ( color !== undefined )? color : this.opt.positiveColor;
- flag = ( flag !== undefined )? flag : true;
-
- // Update the checkbox control
- this._getControl('positiveCheck').attr("checked", flag );
-
- // Update the Jmol applet
- (flag) ? this.display('basic', color) : this.undisplay('basic');
- this._display.property.positive = flag;
- },
-
- /**
- * Undo the action of method displayPositive.
- *
- * @example
- * //
- * instance.hidePositive();
- *
- */
- hidePositive: function () {
- this.displayPositive(undefined, false);
- },
-
- /**
- * Selects the polar atoms and do coloring.
- *
- * @param {string} [color="yellow"] Refer to the Jmol documentation for availables coloring schemes.
- *
- * @example
- * //
- * instance.displayPolar();
- *
- */
- displayPolar: function ( color, flag ) {
-
- polarColor = ( color !== undefined )? color : this.opt.polarColor;
- flag = ( flag !== undefined )? flag : true;
-
- // Update the checkbox control
- this._getControl('polarCheck').attr("checked", flag );
-
- // Update the Jmol applet
- (flag) ? this.display('polar', polarColor) : this.undisplay('polar');
- this._display.property.polar = flag;
-
- },
-
- _getControl: function ( name ) {
- return jQuery ( jQuery( "#"+this.opt.target ).find( '#'+name )[0] );
- },
-
- /**
- * Undo the action of method displayPolar.
- *
- * @example
- * //
- * instance.hidePolar();
- *
- */
- hidePolar: function () {
- this.displayPolar( undefined, false );
- },
-
- /**
- * Selects the polar atoms and do coloring.
- *
- * @param {string} [color="salmon"] Refer to the Jmol documentation for availables coloring schemes.
- *
- * @example
- * //
- * instance.displayUnPolar();
- *
- */
- // colors the structure depending on the checked check boxes
- displayUnPolar: function ( color, flag ) {
-
- color = ( color !== undefined )? color : this.opt.unpolarColor;
- flag = ( flag !== undefined )? flag : true;
-
- // Update the checkbox control
- this._getControl('unpolarCheck').attr("checked", flag );
-
- // Update the Jmol applet
- (flag) ? this.display('hydrophobic', color) : this.undisplay('hydrophobic');
- this._display.property.unpolar = flag;
- },
-
-
- /**
- * Selects the color scheme for the current structure.
- *
- * @param {string} colorScheme Color scheme to be applied to the current structure.
- * Use one of these values: Biojs.Protein3D.COLOR_BY_CHAIN, Biojs.Protein3D.COLOR_SECONDARY_STRUCTURE,
- * Biojs.Protein3D.COLOR_RAINBOW, Biojs.Protein3D.COLOR_BY_ELEMENT, Biojs.Protein3D.COLOR_BY_AMINO_ACID,
- * Biojs.Protein3D.COLOR_BY_TEMPERATURE, Biojs.Protein3D.COLOR_HIDROPHOBICITY
- *
- * @example
- * instance.displayColorScheme(Biojs.Protein3D.COLOR_RAINBOW);
- *
- */
- displayColorScheme: function ( colorScheme ) {
-
- colorCmd = this._getDisplayColor( colorScheme );
-
- if ( colorCmd === undefined ) {
- Biojs.console.log("Unknown color scheme " + colorScheme );
- return;
- }
-
- this._getControl("colorSelect").val( colorScheme );
- this.applyJmolCommand( colorCmd + this._getSelectionScript( this._selection ) );
- },
- /**
- * Selects the style for the current structure.
- *
- * @param {string} style Style of structure to be applied to the current structure.
- * Use one of these values: Biojs.Protein3D.STYLE_CARTOON, Biojs.Protein3D.STYLE_BACKBONE, Biojs.Protein3D.STYLE_CPK,
- * Biojs.Protein3D.STYLE_BALL_STICK, Biojs.Protein3D.STYLE_LIGANDS, Biojs.Protein3D.STYLE_LIGANDS_POCKET
- *
- * @example
- * instance.displayStyle( Biojs.Protein3D.STYLE_CPK );
- *
- */
- displayStyle: function ( style ) {
-
- var styleCmd = this._getDisplayStyle( style );
-
- if ( styleCmd === undefined ) {
- Biojs.console.log("Unknown style name " + style );
- return;
- }
-
- this._getControl("styleSelect").val( style );
- this.applyJmolCommand( styleCmd + this._getSelectionScript(this._selection) );
- },
-
- /**
- * Undo the action of method displayUnPolar.
- *
- * @example
- * //
- * instance.hideUnPolar();
- *
- */
- hideUnPolar: function () {
- this.displayUnPolar( undefined, false );
- },
-
- /**
- * Enable/disable the visibility of halos for showing up the current selection.
- * On halos off, all not selected atoms will be translucent.
- *
- * @param {boolean} value 'true' for halos on, 'false' for halos off.
- *
- * @example
- * // Sets the halos off
- * instance.setHalosVisible(false);
- *
- */
- setHalosVisible: function (value) {
- this._display.halos = value;
- if (value) {
- if ( ! jQuery("#"+this.opt.target).find('#halosRadio:checked').val() ) {
- jQuery("#"+this.opt.target).find('#halosRadio').attr("checked","halosRadio");
- jQuery("#"+this.opt.target).find('#translucentRadio').removeAttr("checked");
- }
- } else {
- if ( jQuery("#"+this.opt.target).find('#halosRadio:checked').val() ) {
- jQuery("#"+this.opt.target).find('#halosRadio').removeAttr("checked");
- jQuery("#"+this.opt.target).find('#translucentRadio').attr("checked","translucentRadio");
- }
- }
-
- this._drawSelection();
- },
-
- /**
- * Apply a script to the Jmol applet that currently are displayed
- *
- * @example
- * // Rotate one time in X-axis.
- * instance.applyJmolCommand('select all; cartoon off; meshribbons on;');
- *
- * @param {string} The Jmol script.
- */
- applyJmolCommand: function(cmd){
- jmolScriptWait(cmd, this.getId());
- },
-
- /**
- * Select and coloring atoms.
- *
- * @example
- * // Select hetero atoms and coloring with the RGB triplet code [xFF0088].
- * instance.display("hetero","[xFF0088]");
- *
- * @param {string} The color. Refer to the Jmol documentation for availables coloring schemes.
- */
- display: function(property, color) {
- scr = (this._isAnyDisplayed())? '' : 'select all; color lightgrey;';
- scr += 'select '+property+';color '+color+'; select none';
-
- jmolScriptWait(scr, this.getId());
- Biojs.console.log("applied: "+scr);
-
- this._drawSelection();
- },
-
- /**
- * Select and coloring atoms.
- *
- * @example
- * // Select hetero atoms and coloring with the RGB triplet code [xFF0088].
- * instance.changeBackgroundColor("[xFF0088]");
- *
- * @param {string} color Refer to the Jmol documentation for availables coloring schemes.
- */
- changeBackgroundColor: function ( color ) {
- this.applyJmolCommand('background '+ ( ( color !== undefined )? color : this.opt.backgroundColor) );
- },
-
- /**
- * Select and remove the coloring atoms.
- *
- * @example
- * // Select hetero atoms and remove the coloring .
- * instance.undisplay("hetero");
- *
- * @param {string} The Jmol script.
- */
- undisplay: function( property ) {
- scr = 'select '+property+';color lightgrey; select none;'
- scr += (this._isAnyDisplayed())? '' : 'select all; color chain; select none;';
-
- jmolScriptWait(scr, this.getId());
- Biojs.console.log("applied: "+scr);
-
- this._drawSelection();
- },
-
- _isAnyDisplayed: function(){
- for ( var key in this._display.property ){
- if ( this._display.property[key] ) {
- return true;
- }
- }
- return false;
- },
-
- _buildTabPanel: function( container, onVisibilityChangeCb ) {
-
- container.html('');
-
- var content = jQuery('
').appendTo(container);
- content.expand = jQuery('
').appendTo(container);
- content.collapse = jQuery('
').appendTo(container);
-
- var contentWidth = container.width() - content.expand.outerWidth();
-
- container.css( 'left', 0 )
- .find('.toggle.collapse')
- .click( function(){
- // Animate show/hide this tab
- container.animate({
- left: ( content.expand.width() - container.outerWidth() ) + "px"
- },
- // to call once the animation is complete
- function() {
-
- container.find('.toggle').toggle();
-
- // apply callback function if defined
- if ( "function" == typeof onVisibilityChangeCb ) {
- onVisibilityChangeCb.call( content, false, content.expand.outerWidth() );
- }
-
- content.hide();
- container.css( {left: '0px', width: 'auto'});
-
- }
- );
- })
- .css({
- 'float':'right',
- 'position':'relative'
- });
-
- container
- .find('.toggle.expand')
- .click( function(){
-
- container.css({ left: ( -contentWidth ) + "px" });
- content.show();
-
- container.animate({
- left: '0px'
- },
- function() {
- container.find('.toggle').toggle();
-
- // apply callback function if defined
- if ( "function" == typeof onVisibilityChangeCb ) {
- onVisibilityChangeCb.call( content, true, container.outerWidth() );
- }
- }
- );
- });
-
- Biojs.console.log('content width '+ contentWidth);
-
- content.css({
- 'width': contentWidth + "px",
- 'height': container.height() + "px",
- 'word-wrap': 'break-word'
- });
-
- return content;
- },
-
- _buildControls : function () {
- Biojs.console.log("_buildControls()");
-
- if ( this._controlsReady ) {
- Biojs.console.log("exiting _buildControls(): controls has been built already.");
- return;
- }
-
- var self = this;
-
- jmolResizeApplet([ self._container.width() - self._controlsContainer.outerWidth(), self._container.height()], self.getId());
-
- this._controlsDiv = this._buildTabPanel(
- this._controlsContainer,
- function ( isVisible, visibleWidth ) {
- jmolResizeApplet([ self._container.width() - visibleWidth, self._container.height()], self.getId());
- self._appletContainer.css("width", self._container.width() - visibleWidth );
- }
- );
-
- var controlDiv = this._controlsDiv.append(
- ' Display: ' +
- ' Hydrophylic residues ' +
- ' Hydrophobic residues ' +
- ' Basic(+) residues ' +
- ' Acidic(-) residues ' +
- ' Antialias '+
- ' Black background '+
- ' Rotation'+
-
- 'Style: '+
- '' + Biojs.Protein3D.STYLE_CARTOON + ' '+
- '' + Biojs.Protein3D.STYLE_BACKBONE + ' '+
- '' + Biojs.Protein3D.STYLE_CPK + ' '+
- '' + Biojs.Protein3D.STYLE_BALL_STICK + ' '+
- '' + Biojs.Protein3D.STYLE_LIGANDS + ' '+
- '' + Biojs.Protein3D.STYLE_LIGANDS_POCKET + ' '+
- ' '+
-
- 'Color: '+
- '' + Biojs.Protein3D.COLOR_BY_CHAIN + ' '+
- '' + Biojs.Protein3D.COLOR_SECONDARY_STRUCTURE + ' '+
- '' + Biojs.Protein3D.COLOR_RAINBOW + ' '+
- '' + Biojs.Protein3D.COLOR_BY_ELEMENT + ' '+
- '' + Biojs.Protein3D.COLOR_BY_AMINO_ACID + ' '+
- '' + Biojs.Protein3D.COLOR_BY_TEMPERATURE + ' '+
- '' + Biojs.Protein3D.COLOR_HIDROPHOBICITY + ' '+
- ' '+
-
- 'Surface: '+
- '' + Biojs.Protein3D.SURFACE_NONE + ' '+
- '' + Biojs.Protein3D.SURFACE_ACCESSIBLE + ' '+
- '' + Biojs.Protein3D.SURFACE_EXCLUDED + ' '+
- '' + Biojs.Protein3D.SURFACE_CAVITIES + ' '+
- ' '+
-
- ' Show selection using: ' +
- ' Translucent ' +
- ' Halos')
-
- .change( function ( e ) {
-
- var targetId = jQuery(e.target).attr('id');
-
- switch ( targetId ) {
- case "polarCheck":
- self.displayPolar( undefined, e.target.checked );
- break;
- case "unpolarCheck":
- self.displayUnPolar( undefined, e.target.checked );
- break;
- case "positiveCheck":
- self.displayPositive( undefined, e.target.checked );
- break;
- case "negativeCheck":
- self.displayNegative( undefined, e.target.checked );
- break;
- case "antialiasCheck":
- self.displayAntialias( event.target.checked );
- break;
- case "rotationCheck":
- self.rotate( event.target.checked );
- break;
- case "backgroundCheck":
- self.changeBackgroundColor( "black", e.target );
- break;
- case "styleSelect":
- self.displayStyle( e.target.value );
- break;
- case "colorSelect":
- self.displayColorScheme( e.target.value );
- break;
- case "surfaceSelect":
- self.displaySurface( e.target.value );
- break;
- case "translucentRadio":
- self.setHalosVisible(false);
- break;
- case "halosRadio":
- self.setHalosVisible(true);
- break;
- default:
- ;
- }
-
- });
-
- this._controlsReady = true;
-
- Biojs.console.log("_buildControls done");
- },
-
- _controlsAreVisible: function () {
- return this._controlsContainer.find('.toggle.collapse').is(':visible');
- },
-
- _toggleControls: function(){
-
- if ( this._controlsAreVisible() ) {
- this._controlsContainer.find('.toggle.collapse').click();
- } else {
- this._controlsContainer.find('.toggle.expand').click();
- }
- },
-
- _addControl: function(html){
- this._controlsDiv.append( html );
- },
-
- _getDisplayStyle: function ( text ) {
- if (text == Biojs.Protein3D.STYLE_CARTOON ) {
-
- return "hide null; select all; spacefill off; wireframe off; backbone off;" +
- " cartoon on; " +
- " select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
- }
- else if (text == Biojs.Protein3D.STYLE_BACKBONE ) {
-
- return "hide null; select all; spacefill off; wireframe off; backbone 0.4;" +
- " cartoon off; " +
- " select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
-
- } else if (text == Biojs.Protein3D.STYLE_CPK ) {
-
- return "hide null; select all; spacefill off; wireframe off; backbone off;" +
- " cartoon off; cpk on;" +
- " select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
-
- }
- else if (text == Biojs.Protein3D.STYLE_LIGANDS ) {
- return "restrict ligand; cartoon off; wireframe on; display selected;"+
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
- }
-
- else if (text == Biojs.Protein3D.STYLE_LIGANDS_POCKET ) {
- return " select within (6.0, true, ligand); cartoon off; wireframe on; backbone off; display selected; " +
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
- }
- else if (text == Biojs.Protein3D.STYLE_BALL_STICK ) {
-
- return "hide null; restrict not water; wireframe 0.2; spacefill 25%;" +
- " cartoon off; backbone off; " +
- " select ligand; wireframe 0.16; spacefill 0.5; color cpk; " +
- " select *.FE; spacefill 0.7; color cpk ; " +
- " select *.CU; spacefill 0.7; color cpk ; " +
- " select *.ZN; spacefill 0.7; color cpk ; " +
- " select all; ";
-
- } else {
- return undefined;
- }
- },
-
- _getDisplayColor: function ( text ) {
- if ( text == Biojs.Protein3D.COLOR_BY_CHAIN ) {
- return "hide null; select all; cartoon on; wireframe off; spacefill off; color chain; select ligand; wireframe 0.16; spacefill 0.5; color chain ; select all; ";
- }
- else if ( text == Biojs.Protein3D.COLOR_BY_TEMPERATURE ) {
- return "hide null; select all;spacefill off; wireframe off; backbone 0.4; cartoon off; set defaultColors Jmol; color relativeTemperature; color cartoon relateiveTemperature select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " ;
- }
- else if ( text == Biojs.Protein3D.COLOR_RAINBOW ){
- return "hide null; select all; set defaultColors Jmol; color group; color cartoon group; select ligand;wireframe 0.16;spacefill 0.5; color cpk ; select all; " ;
- }
- else if ( text == Biojs.Protein3D.COLOR_SECONDARY_STRUCTURE ){
- return "hide null; select all; set defaultColors Jmol; color structure; color cartoon structure;select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " ;
- }
- else if ( text == Biojs.Protein3D.COLOR_BY_ELEMENT ){
- return "hide null; select all; set defaultColors Jmol; color cpk; color cartoon cpk; select ligand;wireframe 0.16; spacefill 0.5; color cpk ; select all; " ;
- }
- else if ( text == Biojs.Protein3D.COLOR_BY_AMINO_ACID ){
- return "hide null; select all; set defaultColors Jmol; color amino; color cartoon amino; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " ;
- }
- else if ( text == Biojs.Protein3D.COLOR_HIDROPHOBICITY ){
- return "hide null; set defaultColors Jmol; select hydrophobic; color red; color cartoon red; select not hydrophobic ; color blue ; color cartoon blue; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " ;
- } else {
- return undefined;
- }
- },
-
- _getDisplaySurface: function ( text ) {
- if ( text == Biojs.Protein3D.SURFACE_NONE ){
- return "select all; isosurface off; select none;";
- }
- else if ( text == Biojs.Protein3D.SURFACE_ACCESSIBLE ){
- return "select all; isosurface sasurface 1.2; color isoSurface translucent 0.8; select none;";
- }
- else if ( text == Biojs.Protein3D.SURFACE_EXCLUDED ){
- return "select all; isosurface solvent 1.2; color isoSurface translucent 0.8; select none;";
- }
- else if ( text == Biojs.Protein3D.SURFACE_CAVITIES ){
- return "select all; isosurface cavity 1.2 10; color isoSurface translucent 0.8; select none;";
- } else {
- return undefined;
- }
- },
-
- toString: function() {
- return "Biojs.Protein3D";
- },
- /*
- * Function: Biojs.Protein3D._functionCbName
- * Purpose: enable controls an triggers the loading pdb file event.
- * It is invoked by JmolApplet.
- * Returns: -
- * Inputs:
- * appletId -> {string} Applet identifier.
- * url -> {string} URL of the loaded file (full path+filename).
- * file -> {string} the filename of the loaded file (without the path).
- * title -> {string} the internal title of the model in the loaded file.
- * message -> {string} any error messages generated.
- * code -> {int} A numeric code:
- * 3 when the file loaded successfully,
- * 0 when the model was zapped,
- * -1 when the loading failed.
- * formerFrame -> {string} a text string with the frame
- * number prior to loading the current model, in file.model syntax
- * (for example, "3.1" or "1.1 - 3.31" if a whole range of models was framed).
- * frame -> {string} A text string with the last frame number after loading the current model,
- * in file.model syntax.
- */
- _loadStructCallback: function ( appletId, url, file, title, message, code, formerFrame, frame ) {
-
- Biojs.console.log("executing _loadStructCallback for " + appletId);
-
- switch (code) {
- case 3 : result = 'success'; break;
- case 0 : result = 'zapped'; break;
- case -1 : result = 'failure'; break;
- default : result = 'undefined'; break;
- }
-
- // Ignore the execution of the callback on replacing pdb file.
- if ( "zapped" != result ) {
- var instanceId = parseInt( appletId.replace("jmolApplet",'') );
- var instance = Biojs.getInstance(instanceId);
-
- if ( "success" == result ) {
- instance.showControls();
- instance.displayAntialias(instance.opt.antialias);
- instance.rotate(instance.opt.rotate);
- }
-
- instance.raiseEvent(Biojs.Protein3D.EVT_ON_PDB_LOADED, {
- "file": title,
- "result": result,
- "message": message
- });
-
- }
-
- }
-
-
-},{
- //
- // Coloring Schemes
- //
- COLOR_BY_CHAIN: "By Chain",
- COLOR_SECONDARY_STRUCTURE: "Secondary Structure",
- COLOR_RAINBOW: "Rainbow",
- COLOR_BY_ELEMENT: "By Element",
- COLOR_BY_AMINO_ACID: "By Amino Acid",
- COLOR_BY_TEMPERATURE: "By Temperature",
- COLOR_HIDROPHOBICITY: "Hidrophobicity",
- //
- // Surfaces
- //
- SURFACE_NONE: "None",
- SURFACE_ACCESSIBLE: "Solvent Accessible",
- SURFACE_EXCLUDED: "Solvent Excluded",
- SURFACE_CAVITIES: "Cavities",
- //
- // Drawing Style
- //
- STYLE_CARTOON: "Cartoon",
- STYLE_BACKBONE: "Backbone",
- STYLE_CPK: "CPK",
- STYLE_BALL_STICK: "Ball and Stick",
- STYLE_LIGANDS: "Ligands",
- STYLE_LIGANDS_POCKET: "Ligands and Pocket",
- //
- // Events
- //
- EVT_ON_PDB_LOADED: "onPdbLoaded",
- EVT_ON_SELECTION: "onSelection"
-});
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DCanvas.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DCanvas.js
deleted file mode 100755
index 0a2b4ac465..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DCanvas.js
+++ /dev/null
@@ -1,289 +0,0 @@
-/**
- * Pdb file 3D viewer component using JSMol and Canvas HTML5 technology if available (downgrade to Applet technology otherwise).
- *
- *
- * @class
- * @extends Biojs.Protein3D
- *
- * @author Francesco Talo
- * @version 1.0.0
- * @category 3
- *
- * @requires jQuery Core 1.8.2 (not necessaty if you import the JSmol.min.js)
- * @dependency
- *
- * @requires jsMol 14.0.2
- * @dependency
- *
- * @requires jsMol 14.0.2 (use this if you import separately jQuery)
- * @dependency
-
- *
- *
- * @requires jsMol 14.0.2 (use this if you don't import already jQuery in your application)
- * @dependency
- *
- *
- *
- * @requires Protein3D CSS
- * @dependency
- *
- * @param {Object} options An object with the options for Biojs.Protein3DCanvas component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {int} [width=597]
- * Width in pixels.
- *
- * @option {int} [height=400]
- * Height in pixels.
- *
- * @option {string} [jsmolFolder="{BIOJS_HOME}/dependencies/jmol-12.0.48"]
- * Relative path of the jSMol library.
-
- * @option {string} [use="HTML5 JAVA"]
- * This string determines the various options to be tried (HTML5, Java Applet and surrogates) and the order in which to try them.
- * The default setting is HTML5 CANVAS and then Java if Canvas is not available.
- *
- * @option {string} [urlProxy="{BIOJS_HOME}/dependencies/jsmol-14.0.2/jsmol/proxy/jsmol.jsp"]
- * Path of the proxy to use for transformation of the gzip file in base64 files for MSIE and CHROME.
- *
- * @option {string} [loadingStatusImage="{BIOJS_HOME}/css/images/ajax-loader-1.gif"]
- * Relative path of the image to be displayed on loading status.
- *
- * @option {string} [unpolarColor="salmon"]
- * This value is used by displayUnpolar() method for coloring hydrophobic residues.
- *
- * @option {string} [negativeColor="red"]
- * This value is used by displayNegative() method for coloring acidic(-) residues.
- *
- * @option {string} [positiveColor="blue"]
- * This value is used by displayNegative() method for coloring basic(+) residues.
- *
- * @option {string} [polarColor="yellow"]
- * This value is used by displayNegative() method for coloring hydrophylic residues.
- *
- * @option {string} [backgroundColor="white"]
- * Background color of the jMol applet
- *
- * @option {bool} [enableControls=true]
- * Enable for showing the control panel. If value is 'false', it disables both methods showControls and hideControls.
-
- @option {bool} [viewControls=true]
- * Show/Hide controls panel after the loading of the PDB structure.
- *
- *
- * @example
- * // Example of loading a pdb file by means of an HTTP request to get the zip file
- * // 'http://www.rcsb.org/pdb/files/"+pdb+".pdb.gz' containing the structure of the protein.
- * //The file id downloaded form the server as a zipped file and then it's unzipped on the client
- * var instance = new Biojs.Protein3DCanvas({
- * target: "YourOwnDivId",
- * jsmolFolder: '/bioJs/dependencies/jsmol-14.0.2/jsmol',
- * height: 440,
- * width: 440,
- * style: Biojs.Protein3D.STYLE_CARTOON,
- * use:"HTML5 JAVA",
- * urlProxy:"/bioJs/dependencies/jsmol-14.0.2/jsmol/proxy/jsmol.jsp",
- * viewControls: true
- * });
- * instance.onPdbLoaded(
- * function( objEvent ) {
- * alert('PDB LOADED');
- * }
- * );
- * //trigger to download the zip file containing the pdb structure from the server and unzip the file on the client
- * instance.setPdb('2al6');
- *
- *
- */
-Biojs.Protein3DCanvas = Biojs.Protein3D.extend(
-/** @lends Biojs.Protein3DCanvas# */
-{
- constructor: function (options) {
-
- this.opt.jmolFolder= this.opt.jsmolFolder;
- Biojs.Protein3D.call(this, options);
-
- //JMol configuraion
- if ( this.opt.use == undefined ) {
- Jmol.Info["use"] = "HTML5 JAVA";
-
- }else{
- Jmol.Info["use"] = this.opt.use;
- }
-
-
- if ( this.opt.proxyUrl != undefined ) {
- Jmol.Info["serverURL"] = this.opt.proxyUrl;
- }
-
- Jmol.Info["jarPath"] = this.opt.jsmolFolder+"/java",
- Jmol.Info["jarFile"] = this.opt.jsmolFolder+"/java/JmolApplet0.jar",
- Jmol.Info["j2sPath"] = this.opt.jsmolFolder+"/j2s";
-
- Jmol.Info["addSelectionOptions"]= false;
- Jmol.Info["color"]= "#ffffff";
- Jmol.Info["debug"]= false;
- Jmol.Info["memoryLimit"]= 512; // Java only
- Jmol.Info["readyFunction"]= null;
- Jmol.Info["src"]= null;
- Jmol.Info["disableInitialConsole"]=true;
- Jmol.Info["disableJ2SLoadMonitor"]= true;
- Jmol.Info["deferUncover"]=true;
- Jmol.Info["deferApplet"]= false;
- },
-
- /**
- * Default options (and its values) for the Protein3DCanvas component.
- * @name Biojs.Protein3DCanvas-opt
- * @type Object
- */
- opt:
- {
- use: "HTML5 JAVA",
- jsmolFolder: "../biojs/dependencies/jsmol-14.0.2/jsmol",
- viewControls: true
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Protein3DCanvas-eventTypes
- */
- eventTypes : [],
-
- /**
- * Sets the pdb file to be displayed.
- * Also triggers the event whenever a new pdb file is loaded.
- * It demands entirely to JSMol the download from the server and unzip of of the PDB file on the browser
- *
- * @param The pdb id to use to download the gz file from the server http://www.rcsb.org/pdb/files/"+pdb+".pdb.gz.
- *
- * @example
- * var instance = new Biojs.Protein3DCanvas({
- * target: "YourOwnDivId",
- * jsmolFolder: '/bioJs/dependencies/jsmol-14.0.2/jsmol',
- * height: 440,
- * width: 440,
- * style: Biojs.Protein3D.STYLE_CARTOON,
- * use:"HTML5 JAVA",
- urlProxy:"/bioJs/dependencies/jsmol-14.0.2/jsmol/proxy/jsmol.jsp",
- viewControls: true
- * });
- *
- * instance.onPdbLoaded(
- * function( objEvent ) {
- * alert('PDB LOADED');
- * }
- * );
- *
- * //trigger the downloading of the zip containing the pdb file from the server and unzip the file on the client
- * instance.setPdb('2al6');
- *
- *
- */
- setPdb: function( pdb ){
- Biojs.console.log("LOADING pdb content");
-
- var self = this;
-
- var surfaceCmd = this._getDisplaySurface( this.opt.surface );
- var styleCmd = this._getDisplayStyle( this.opt.style );
- var colorSchemeCmd = this._getDisplayColor( this.opt.colorScheme );
-
- var scr = colorSchemeCmd + styleCmd + surfaceCmd + this._getSelectionScript( this._selection );
-
- this.showLoadingImage(true);
-
- if ( this._jmolAppletInitialized ) {
- this.reset();
- }
- Jmol.setDocument(0);
- htmlContent = jmolApplet([self._appletContainer.width(), self._appletContainer.height()], " load 'http://www.rcsb.org/pdb/files/"+pdb+".pdb.gz';"+ scr, self.getId());
-
- this._appletContainer.html(Jmol.getAppletHtml(eval(htmlContent._id)));
-
- this._jmolAppletInitialized = true;
-
- Biojs.console.log("setPdb() ending");
- },
-
- toString: function() {
- return "Biojs.Protein3DCanvas";
- },
-
- /*
- * Function: Biojs.Protein3D._functionCbName
- * Purpose: enable controls an triggers the loading pdb file event.
- * It is invoked by JmolApplet.
- * Returns: -
- * Inputs:
- * appletId -> {string} Applet identifier.
- * url -> {string} URL of the loaded file (full path+filename).
- * file -> {string} the filename of the loaded file (without the path).
- * title -> {string} the internal title of the model in the loaded file.
- * message -> {string} any error messages generated.
- * code -> {int} A numeric code:
- * 3 when the file loaded successfully,
- * 0 when the model was zapped,
- * -1 when the loading failed.
- * formerFrame -> {string} a text string with the frame
- * number prior to loading the current model, in file.model syntax
- * (for example, "3.1" or "1.1 - 3.31" if a whole range of models was framed).
- * frame -> {string} A text string with the last frame number after loading the current model,
- * in file.model syntax.
- */
-
- _loadStructCallback: function ( appletId, url, file, title, message, code, formerFrame, frame ) {
-
-Biojs.console.log("executing _loadStructCallback for " + appletId);
-
- switch (code) {
- case 3 : result = 'success'; break;
- case 0 : result = 'zapped'; break;
- case -1 : result = 'failure'; break;
- default : result = 'undefined'; break;
- }
-
- // Ignore the execution of the callback on replacing pdb file.
-
- if ( "zapped" != result ) {
- //uncover the loading image
- var instanceId = parseInt( appletId.replace("jmolApplet",'') );
- var instance = Biojs.getInstance(instanceId);
-
- if ( "success" == result ) {
- instance.displayAntialias(instance.opt.antialias);
- instance.rotate(instance.opt.rotate);
- }
-
- instance.showLoadingImage(false);
- if (instance.opt.viewControls){
- instance.showControls();
- instance._controlsContainer.css('display','block');
- jmolResizeApplet([ instance._container.width() - instance._controlsContainer.outerWidth(), instance._container.height()], instance.getId());
- instance._appletContainer.css('float','right');
-
- }else{
- instance.hideControls();
- instance._controlsContainer.css('display','none');
- jmolResizeApplet([ instance._container.width(), instance._container.height()], instance.getId());
- instance._appletContainer.css('float','left');
- }
-
- instance.raiseEvent(Biojs.Protein3D.EVT_ON_PDB_LOADED, {
- "file": title,
- "result": result,
- "message": message
- });
-
- instance._appletContainer.css('display','block');
-
-
- }
-
-
- }
-
-});
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DUniprot.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DUniprot.js
deleted file mode 100755
index 5a261c5035..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DUniprot.js
+++ /dev/null
@@ -1,582 +0,0 @@
-/**
- *
- * Protein viewer to show the pdb files aligned to an Uniprot Accession
- *
- * @class
- * @extends Biojs.Protein3DWS
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 2
- *
- * @param {Object} options An object with the options for the component.
- *
- * @option {string} [proteinId]
- * Uniprot identifier of the protein.
- *
- * @option {string} [mapping=Biojs.Protein3DUniprot.ALIGNMENTS_UNIPROT_MAPPING]
- * Mapping function to obtain the protein's alignments:
- *
- * Biojs.Protein3DUniprot.ALIGNMENTS_UNIPROT_MAPPING
- * Biojs.Protein3DUniprot.ALIGNMENTS_PDBe_MAPPING
- *
- *
- * @example
- *
- * var instance = new Biojs.Protein3DUniprot({
- * target: 'YourOwnDivId',
- * proteinId: 'P07148'
- * });
- *
- */
-Biojs.Protein3DUniprot = Biojs.Protein3DWS.extend(
-/** @lends Biojs.Protein3DUniprot# */
-{
- constructor: function(options) {
- this.base(options);
- var self = this;
-
- this.onPdbLoaded(function(e) {
- Biojs.console.log(e.result + " loading the pdb file " + e.file);
- Biojs.console.log("self._aligmentsJustArrived= " + self._alignmentsJustArrived);
- if (self._alignmentsJustArrived) {
- Biojs.console.log("Initialising the alignments selection list");
- self.reset();
- var alignments = self._filterAligmentsBySelection(self._selection);
- var pdbOptions = self._createOptions(alignments);
- if (jQuery('#' + self.opt.target).find('div#pdbStructures').length == 0) {
- self._addControl('
');
- }
- jQuery('#' + self.opt.target).find('div#pdbStructures').html('Structures for ' + self.opt.proteinId + ' ' + '' + pdbOptions + ' ');
- jQuery('#' + self.opt.target + ' #pdbFile_select').val(pdb);
- jQuery('#' + self.opt.target + ' #pdbFile_select').change(function() {
- self._onAlignmentSelectionChange();
- });
- jQuery('#' + self.opt.target).find('#pdbStructures').show();
- var alignmentId = pdb;
- var pdbId = alignmentId.substring(0, pdb.indexOf('.')).toLowerCase();
- var alignment = self.getAlignmentsByPdb(alignmentId);
- if (alignment.hasOwnProperty(alignmentId)) {
- var start = alignment[alignmentId][1].start;
- var end = alignment[alignmentId][1].end;
- self.raiseEvent('onPdbSelected', {"pdbId": pdbId,"alignmentId": alignmentId,"start": start,"end": end});
- }
- self._alignmentsJustArrived = false;
- }
- });
-
- if (this.opt.proteinId != undefined) {
- var proteinId = this.opt.proteinId;
- this.opt.proteinId = '';
- this.setProtein(proteinId);
- }
- },
-
- opt: {
- proteinId: undefined,
- mapping: 'http://www.ebi.ac.uk/pdbe-apps/widgets/unipdb?uniprot=',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php'
- },
-
- eventTypes : [
- /**
- * @name Biojs.Protein3DUniprot#onPdbSelected
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} pdbId The name of the loaded file.
- * @eventData {string} alignmentId Alignment identifier.
- * @eventData {string} start Starting base index.
- * @eventData {string} end Ending base index.
- *
- * @example
- * instance.onPdbSelected(
- * function( e ) {
- * alert( "Alignment " + e.alignmentId + " selected. Start: " + e.start + " End: " + e.end );
- * }
- * );
- *
- * */
- "onPdbSelected"
- ],
-
- _aligments: undefined,
-
-
- /**
- * Get all pdb files for a given uniprot id.
- * Also triggers the event that a new pdb file was loaded.
- *
- * @option {string} proteinId Uniprot identifier of the protein.
- *
- * @example
- * instance.setProtein("P99999");
- *
- */
- setProtein: function(proteinId){
- if (proteinId != this.opt.proteinId) {
- this.opt.proteinId = proteinId;
- this._selection = undefined;
- this._minStart = Number.MAX_VALUE;
- this._maxEnd = 0;
- this._alignments = undefined;
-
- if ( this.opt.mapping == Biojs.Protein3DUniprot.ALIGNMENTS_UNIPROT_MAPPING ) {
- this._requestAligmentsFromUniprot();
- } else if ( this.opt.mapping == Biojs.Protein3DUniprot.ALIGNMENTS_PDBe_MAPPING ) {
- this._requestAligmentsFromPdbe();
- } else {
- throw "Error in mapping function. this.opt.mapping="+this.opt.mapping;
- }
- }
- },
-
- // makes an ajax request to get the pdb files for the given uniprot id
- _requestAligmentsFromUniprot: function(){
- var self = this;
- jQuery.ajax({
- url: self.opt.mapping + self.opt.proteinId,
- data: {biojsmapping:'1', varname:'pdbmappings'},
- dataType: "script",
- crossDomain: true,
- success: function(){
- Biojs.console.log("SUCCESS: data received");
- self._alignments = pdbmappings;
- //change proteinId to the one retrieved from pdbmappings (in case it is a protein id rather than an accession)
- //Warning: Here we suppose that position [0] always give the info for the pdb and position [1] always give the info for the accession
- for (obj in pdbmappings) {
- if ( pdbmappings[obj][1].intObjectId != self.opt.proteinId ) {
- self.opt.proteinId = pdbmappings[obj][1].intObjectId;
- }
- break;
- }
- self._aligmentsArrived();
- },
- async: false,
- error: function(qXHR, textStatus, errorThrown){
- Biojs.console.log("ERROR: requesting "+this.data);
- self.raiseEvent('onRequestError', {message: textStatus});
- }
- });
- },
-
- // makes an ajax request to get the pdb files for the given uniprot id
- _requestAligmentsFromPdbe: function(){
- var self = this;
-
- jQuery.ajax({
- url: self.opt.proxyUrl,
- dataType: "text",
- data: { url: self.opt.mapping + self.opt.proteinId + '/'},
- success: function(data){
- Biojs.console.log("SUCCESS: data received");
- self._parseResponse(data);
- },
- async: false,
- error: function(qXHR, textStatus, errorThrown){
- Biojs.console.log("ERROR: requesting "+this.data);
- self.raiseEvent('onRequestError', { message: textStatus});
- }
- });
- },
-
- // parses the xml file from the request and stores the information in an easy to access way
- _parseResponse: function (text) {
- this._alignments = {};
- var i = 0;
- var self = this;
- var data;
-
- Biojs.console.log("Decoding " + text);
-
- if ( !Biojs.Utils.isEmpty(text) ) {
-
- try {
- data = jQuery.parseJSON(text);
-
- } catch (e) {
- Biojs.console.log("Error decoding response: " + e.message );
- }
-
- for ( var i in data ) {
-
- try {
- var segments = [];
-
- segments.push({
- "start": data[i].pdb_range[0],
- "end": data[i].pdb_range[1],
- "intObjectId": data[i].pdbid + '.' + data[i].chain } );
-
- segments.push({
- "start": data[i].uniprot_range[0],
- "end": data[i].uniprot_range[1],
- "intObjectId": data[i].uniprot_acc } );
-
- self._alignments[ segments[0].intObjectId ] = segments;
-
- if (self._minStart > segment[1].start) {
- self._minStart = segment[1].start;
- }
-
- if (self._maxEnd < segment[1].end) {
- self._maxEnd = segment[1].end;
- }
-
- } catch (e) {
- Biojs.console.log("Error decoding alignment: " + e.message );
- }
- }
- }
-
- Biojs.console.log("Alignments decoded:");
- Biojs.console.log(self._alignments);
- this._aligmentsArrived();
- },
-
- // adds all available pdb files to a dropdown box
- // or displays the fact that there are no pdb files for the given id
- _aligmentsArrived: function(){
-
- this._alignmentsJustArrived = true;
-
- var alignments = this._filterAligmentsBySelection(this._selection);
-
- if (!Biojs.Utils.isEmpty(alignments)) {
- var pdb = undefined;
- for (pdb in alignments) {
- break;
- }
-
- Biojs.console.log("Requesting pdb " + pdb);
- this.requestPdb(pdb.substring(0, pdb.indexOf('.')).toLowerCase());
-
- } else {
- this._container.html("No structural information for " + this.opt.proteinId );
- this.raiseEvent('onRequestError', { message: "No structural information available for " + this.opt.proteinId });
- }
- },
-
- _onAlignmentSelectionChange: function(){
- var pdb = jQuery('#pdbFile_select').val();
-
- if ( pdb != undefined ) {
-
- var alignmentId = pdb.substring(0, pdb.indexOf(' '));
- var pdbId = alignmentId.substring(0, pdb.indexOf('.')).toLowerCase();
-
- var alignment = this.getAlignmentsByPdb(alignmentId);
-
- if ( alignment.hasOwnProperty( alignmentId ) ) {
- var start = alignment[alignmentId][1].start;
- var end = alignment[alignmentId][1].end;
-
- this.raiseEvent('onPdbSelected', {
- "pdbId": pdbId,
- "alignmentId": alignmentId,
- "start": start,
- "end": end
- });
- }
-
- this.requestPdb(pdbId);
-
- } else {
- Biojs.console.log("No structural information available for "+this.opt.proteinId);
- }
- },
-
- /**
- * Request and display a pdb file by means of its identifier.
- *
- * @param {string} pdbId Pdb file identifier.
- *
- * @example
- * instance.requestPdb('3t6f');
- *
- */
- requestPdb: function(pdbId) {
- var self = this;
-
- self.showLoadingImage();
- self.opt.id = pdbId;
-
- jQuery.ajax({
- url: self.opt.proxyUrl,
- data: 'url='+self.opt.pdbUrl+'/pdb'+pdbId+'.ent',
- dataType: 'text',
- success: function (pdbContent) {
- Biojs.console.log("DATA ARRIVED");
- //reset the PDB selected area if a uniprot selection has been made already
- if (self._uniprotSelection != undefined) {
- self._selection = self._translateSelection(self._uniprotSelection);
- }
- self.setPdb(pdbContent);
- },
- error: function(qXHR, textStatus, errorThrown){
- self.raiseEvent('onRequestError', {message: textStatus});
- }
- });
- },
-
-
- /**
- * Get the available alignments for the current protein filtered by selection (PDB files containing a part of the requested region).
- *
- * @example
- * // Selection of the region in the interval [100,150].
- * instance.setSelection({start: 120, end: 150});
- *
- * @example
- * // Get the alignments matching with bases 4, 8 and 100.
- * alert ( instance.filterAlignments([4,8,100]) );
- *
- * @param {Object|Array} selection Can be either a plain object or an array.
- * If object, it must have the fields start and end; Where "start" is greater than or equal to "end".
- * If array, it must contain numbers representing the positions to be selected.
- */
- getAlignmentsBySelection: function ( selection ) {
-
- var alignments = this._alignments;
-
- if ( selection != undefined ) {
- this._filterAligmentsBySelection(selection);
- }
-
- return alignments;
- },
-
- /**
- * Get the available alignments for the current protein filtered by selection (PDB files containing a part of the requested region).
- *
- * @example
- * // Get the alignments matching with bases 4, 8 and 100.
- * alert ( instance.getAlignmentsByPdb("2F73") );
- *
- * @param {string} pdb identifier.
- * @returns {Object} .
- *
- */
- getAlignmentsByPdb: function ( pdbId ) {
-
- var alignments = {};
-
- for (al in this._alignments) {
- if ( this._alignments[al][0].intObjectId.indexOf( pdbId ) != -1 ) {
- alignments[this._alignments[al][0].intObjectId] = this._alignments[al];
- }
- }
-
- Biojs.console.log("Alignments for pdb " + pdbId );
- Biojs.console.log(alignments);
-
- return alignments;
- },
-
- /**
- * Filters the alignments available for the current protein: Only PDB files containing a part of the requested region
- * are selectable. The specified region is highlighted in the displayed PDB file.
- *
- * @example
- * // Selection of the region in the interval [100,150].
- * instance.filterAlignments({start: 120, end: 150});
- *
- * @param {Object|Array} selection Can be either a plain object or an array.
- * If object, it must have the fields start and end; Where "start" is greater than or equal to "end".
- * If array, it must contain numbers representing the positions to be selected.
- */
- filterAlignments: function ( selection ) {
-
- var alignments = this._filterAligmentsBySelection(selection);
- var selectedAlignment = jQuery('#pdbFile_select').val();
-
- // Update the drop-down box showing the filtered alignments
- jQuery('#pdbFile_select').html(this._createOptions(alignments));
-
- // Select an alignment
- if ( alignments.hasOwnProperty( selectedAlignment.slice(0,selectedAlignment.indexOf(' '))) ) {
- // Select current alignment if it belongs to filtered alignments
- jQuery('#pdbFile_select').val(selectedAlignment);
-
- } else {
- // Select any alignment
- for ( a in alignments ){
- jQuery('#pdbFile_select').val(a);
- break;
- }
- this._onAlignmentSelectionChange();
- }
-
- // invoke setSelection on the parent
- this.base(selection);
- },
-
- _createOptions: function(alignments) {
- var pdbOptions = "";
- for (pdb in alignments) {
- text = pdb + " (" + alignments[pdb][1].start + ".." + alignments[pdb][1].end + ")";
- pdbOptions += '' + text + ' ';
- }
- Biojs.console.log("_createOptions: " + pdbOptions);
- return pdbOptions;
- },
-
- _filterAligmentsBySelection: function(selection) {
- var alignments = undefined;
- if (selection instanceof Array) {
- alignments = {};
- for (al in this._alignments) {
- var uniprot = this._alignments[al][1];
- for (i in selection) {
- if (selection[i] >= uniprot.start && selection[i] <= uniprot.end) {
- alignments[this._alignments[al][0].intObjectId] = this._alignments[al];
- break;
- }
- }
- }
- } else if (selection instanceof Object) {
- alignments = {};
- var i = 0;
- for (al in this._alignments) {
- var uniprot = this._alignments[al][1];
- if ((selection.start >= uniprot.start && selection.start <= uniprot.end) || (selection.end >= uniprot.start && selection.end <= uniprot.end) || (selection.start < uniprot.start && selection.end > uniprot.end)) {
- alignments[this._alignments[al][0].intObjectId] = this._alignments[al];
- i++;
- }
- }
- } else {
- alignments = this._alignments;
- }
- Biojs.console.log("Filtered alignments:");
- Biojs.console.log(alignments);
- return alignments;
- },
-
- /**
- * Selection of a region using the uniprot positions.
- *
- * @example
- * // Selection of the region in the interval [100,150].
- * instance.setSelection({start: 100, end: 150});
- *
- * @example
- * // Selection of the positions 4, 8 and 100.
- * instance.setSelection([4,8,100]);
- *
- * @param {Object|Array} selection Can be either a plain object or an array.
- * If object, it must have the fields start and end; Where "start" is greater than or equal to "end".
- * If array, it must contain numbers representing the positions to be selected.
- */
- setSelection: function ( s ) {
- this._uniprotSelection = Biojs.Utils.clone(s);
- var selection = this._translateSelection(s);
- this.base(selection);
- },
-
- _translateSelection: function (s) {
- //Selection in Uniprot regions needs to be translated into PDB regions
- var selection = Biojs.Utils.clone(s);
- var alignmentId = this.getCurrentAlignmentId();
- var proteinId = this.getCurrentProteinId();
- var segment = this.getAlignmentsByPdb(alignmentId)[alignmentId];
- var offset = 0;
- for ( i in segment ) {
- if ( segment[i].intObjectId == alignmentId ) {
- pdbSegment = segment[i];
- } else if ( segment[i].intObjectId == proteinId ) {
- uniprotSegment = segment[i];
- }
- }
- offset = uniprotSegment.start - pdbSegment.start;
- if ( selection instanceof Array ) {
- var toDelete = new Array(selection.length);
- for ( i in selection ) {
- if (selection[i] instanceof Object) {//a range
- if ( (selection[i].start > uniprotSegment.end) || (selection[i].end < uniprotSegment.start) ){
- //we first check whether it is completely out of the range
- selection[i].start = 0;
- selection[i].end = 0;
- toDelete[i] = true;
- } else if ( (selection[i].start >= uniprotSegment.start) && (selection[i].end <= uniprotSegment.end) ){
- selection.start -= offset;
- selection.end -= offset;
- toDelete[i] = false;
- } else if ( (selection[i].start < uniprotSegment.start) && (selection[i].end <= uniprotSegment.end) ){
- selection[i].start = pdbSegment.start - 0;
- selection[i].end -= offset;
- toDelete[i] = false;
- } else if ( (selection[i].start >= uniprotSegment.start) && (selection[i].end > uniprotSegment.end) ){
- selection[i].start -= offset;
- selection[i].end = pdbSegment.end - 0;
- toDelete[i] = false;
- } else if ( (selection[i].start < uniprotSegment.start) && (selection[i].end > uniprotSegment.end) ){
- selection[i].start = pdbSegment.start - 0
- selection[i].end = pdbSegment.end - 0;
- toDelete[i] = false;
- }
- } else { //a position
- if ( (uniprotSegment.start <= selection[i]) && (selection[i] <= uniprotSegment.end) ) {
- selection[i] -= offset;
- toDelete[i] = false;
- } else {
- toDelete[i] = true;
- }
- }
- }
- var deleted = 0;
- for (j in toDelete) {
- if (toDelete[j] == true) {
- selection.splice(j-deleted,j-deleted);
- deleted += 1;
- }
- }
- } else if ( selection instanceof Object && selection.start <= selection.end ){
- if ( (selection.start > uniprotSegment.end) || (selection.end < uniprotSegment.start) ){
- //we first check whether it is completely out of the range
- selection.start = 0;
- selection.end = 0;
- this.removeSelection();
- } else if ( (selection.start >= uniprotSegment.start) && (selection.end <= uniprotSegment.end) ){
- selection.start -= offset;
- selection.end -= offset;
- } else if ( (selection.start < uniprotSegment.start) && (selection.end <= uniprotSegment.end) ){
- selection.start = pdbSegment.start - 0;
- selection.end -= offset;
- } else if ( (selection.start >= uniprotSegment.start) && (selection.end > uniprotSegment.end) ){
- selection.start -= offset;
- selection.end = pdbSegment.end - 0;
- } else if ( (selection.start < uniprotSegment.start) && (selection.end > uniprotSegment.end) ){
- selection.start = pdbSegment.start - 0
- selection.end = pdbSegment.end - 0;
- }
- }
- return (selection);
- },
-
- getCurrentAlignmentId: function () {
- var selectedValue = jQuery('#pdbFile_select').val();
- var alignmentId = selectedValue.substring(0, selectedValue.indexOf(' '));
- //var pdbId = alignmentId.substring(0, pdb.indexOf('.')).toLowerCase();
- return alignmentId;
- },
-
- getCurrentProteinId: function () {
- return this.opt.proteinId;
- },
-
- /**
- * Removes selection in the current displayed structure.
- *
- * @example
- * instance.removeSelection();
- */
- removeSelection: function() {
- this.base();
- }
-}, {
-
- // Mapping services
- ALIGNMENTS_UNIPROT_MAPPING: 'http://www.ebi.ac.uk/pdbe-apps/widgets/unipdb?uniprot=',
- ALIGNMENTS_PDBe_MAPPING: 'http://wwwdev.ebi.ac.uk/pdbe-apps/jsonizer/mappings/best/all/'
-
-});
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DWS.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DWS.js
deleted file mode 100755
index 48746b433c..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Protein3DWS.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- *
- * Extension of the pdb file viewer getting data from a web service
- *
- * @class
- * @extends Biojs.Protein3D
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 2
- *
- * @requires Server side proxy
- *
- * @param {Object} options An object with the options for the component.
- *
- * @option {string} [pdbUrl="http://www.ebi.ac.uk/pdbe/entry-files"]
- * Url of the web service in order to require the pdb file.
- *
- * @option {string} [id]
- * Identifier of the pdb to be displayed (i.e. '3nuc' to require 3nuc.pdb file). You can load another pbd by using requestPdb method.
- *
- * @option {string} [proxyUrl="../biojs/dependencies/proxy/proxy.php"]
- * Server side proxy server.
- *
- * @example
- *
- * var instance = new Biojs.Protein3DWS({
- * target: 'YourOwnDivId',
- * id: '3nuc'
- * });
- *
- *
- */
-Biojs.Protein3DWS = Biojs.Protein3D.extend(
-/** @lends Biojs.Protein3DWS# */
-{
- constructor: function(options){
- this.base(options);
- //constructor of Biojs.Protein3DWS
- if (this.opt.id !== undefined) {
- this.requestPdb(this.opt.id);
- }
- },
-
- opt: {
- id: undefined,
- pdbUrl: 'http://www.ebi.ac.uk/pdbe/entry-files',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php'
- },
-
- eventTypes : [
- /**
- * @name Biojs.Protein3DWS#onRequestError
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} file The name of the loaded file.
- * @eventData {string} result A string with either value 'success' or 'failure'.
- * @eventData {string} message Error message in case of result be 'failure'.
- *
- * @example
- * instance.onRequestError(
- * function( e ) {
- * alert( e.message );
- * }
- * );
- *
- * */
- "onRequestError"
- ],
-
- /**
- * Request and display a pdb file by means of its identifier.
- *
- * @param {string} pdbId Pdb file identifier.
- *
- * @example
- * instance.requestPdb('3t6f');
- *
- */
- requestPdb: function(pdbId) {
- var self = this;
-
- self.showLoadingImage();
- self.opt.id = pdbId;
-
- jQuery.ajax({
- url: self.opt.proxyUrl,
- data: 'url='+self.opt.pdbUrl+'/pdb'+pdbId+'.ent',
- dataType: 'text',
- success: function (pdbContent) {
- Biojs.console.log("DATA ARRIVED");
- self.setPdb(pdbContent);
- },
- error: function(qXHR, textStatus, errorThrown){
- self.raiseEvent('onRequestError', {message: textStatus});
- }
- });
- },
-
- getPdbId: function(pdb) {
- return opt.id;
- }
-
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.ProteinPortafolio.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.ProteinPortafolio.js
deleted file mode 100755
index 1d7e978ff9..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.ProteinPortafolio.js
+++ /dev/null
@@ -1,522 +0,0 @@
-/**
- * ProteinPortafolio component shows the description of a protein as well as its PDB alignments if there is any.
- * Component shows the PDBLogos of the selected alignment and ables to play with the sequence and
- * the 3D draw of the alignment.
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 3
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires Raphael 2.1.0
- * @dependency
- *
- * @requires PDBLogos
- * @dependency
- *
- * @requires Sequence
- * @dependency
- *
- * @requires Protein3DWS
- * @dependency
- * @dependency
- *
- * @requires jMol 12.0.48
- * @dependency
- *
- * @requires Protein3D CSS
- * @dependency
- *
- * @requires ProteinPortafolio CSS
- * @dependency
- *
- * @param {Object} options An object with the options for ProteinPortafolio component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} [fontFamily='"Andale mono", courier, monospace']
- * Font list to be applied to the component content.
- *
- * @option {string} [fontColor="white"]
- * HTML color code for the font.
- *
- * @option {string} [backgroundColor="#7BBFE9"]
- * Background color for the entire div content.
- *
- * @option {Object} [selectionFontColor="white"]
- * This color will be used to change the font color of selected text.
- *
- * @option {Object} [ selectionBackgroundColor="yellow"]
- * This color will be used to change the background of selected text.
- *
- * @option {string} [pdb3DIcon='../biojs/css/images/3d.png']
- * The only PDB icon is able to defines the 3D structure.
- * Set source URL for 3D icon
- *
- * @example
- * var instance = new Biojs.ProteinPortafolio({
- * target : "YourOwnDivId",
- * accession : 'P99999'
- * });
- *
- */
-Biojs.ProteinPortafolio = Biojs.extend (
-/** @lends Biojs.ProteinPortafolio# */
-{
- constructor: function (options) {
- // In JavaScript "this" always refers to the owner of the function we're executing (http://www.quirksmode.org/js/this.html)
- // Let's preserve the reference to 'this' through the variable self. In this way, we can invoke/execute
- // our component instead of the object where 'this' is being invoked/executed.
- var self = this;
-
- Biojs.console.enable();
-
- // For practical use, create an object with the main DIV container
- // to be used in all of the code of our component
- this._container = jQuery("#"+self.opt.target);
-
- this._initialize();
-
- if ( !Biojs.Utils.isEmpty( options.accession ) ) {
- this.setProtein(options.accession);
- }
-
- },
-
- /**
- * Default values for the options
- * @name Biojs.ProteinPortafolio-opt
- */
- opt: {
- target: "YourOwnDivId",
- accession: "",
- mappingUrl: 'http://www.ebi.ac.uk/pdbe-apps/widgets/unipdb?uniprot=',
- featuresUrl: 'http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot-summary/features',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- jmolFolder: '../biojs/dependencies/jmol-12.0.48',
- pdb3DIcon: '../biojs/css/images/3d.png',
- pdbIconSize: 40
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.ProteinPortafolio-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.ProteinPortafolio#onClick
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} selected Selected character.
- * @example
- * instance.onClick(
- * function( objEvent ) {
- * alert("The character " + objEvent.selected + " was clicked.");
- * }
- * );
- *
- * */
- "onClick",
-
- /**
- * @name Biojs.ProteinPortafolio#onPdbSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} alignmentId Identifier .
- * @eventData {string} pdbId Selected pdb entry.
- * @eventData {int} start Start position of the alignment.
- * @eventData {int} end End position of the alignment.
- * @example
- * instance.onPdbSelected(
- * function( e ) {
- * alert("Selected " + e.alignmentId + " alignment.");
- * }
- * );
- *
- * */
- "onPdbSelected"
- ],
-
- /**
- * Change the font size. Do nothing it no value is provided.
- *
- * @param {string} [size] The new font size in pixels.
- *
- * @example
- * instance.setSize("72px");
- */
- setSize: function(size) {
-
- },
-
- _initialize: function() {
-
- this._alpha = jQuery('
').appendTo( this._container );
- this._beta = jQuery('
').appendTo( this._container );
-
- this._header = jQuery('').appendTo( this._alpha );
- this._toolbar = jQuery('
').appendTo( this._alpha );
- this._content = jQuery('
').appendTo( this._alpha );
-
- this._content.attr('id', 'ProteinPortafolio_content_' + this.getId() );
-
- this._container.addClass('ProteinPortafolio');
- },
-
- _clearAll: function () {
- this._header.children().remove();
- this._toolbar.children().remove();
- this._content.children().remove();
- },
-
- /**
- * Sets the protein accession which changes everything to reflect the new protein information
- *
- * @param {string} accession The new protein identifier
- *
- * @example
- * instance.setProtein("P07148");
- *
- * @example
- * instance.setProtein("P12345");
- */
- setProtein: function( accession ) {
-
- this.opt.accession = accession;
-
- this._requestAligments(accession, function(alignments){
-
- this._alignments = alignments;
-
- this._container.removeClass('loading');
-
- if (!Biojs.Utils.isEmpty(alignments)) {
- // Alignments found
- this._setHeader( this.opt.accession, this._createPDBSelect(alignments) );
-
- } else {
- // none alignment found
- this._setHeader( this.opt.accession );
- }
- });
-
- this._showFeatures(accession);
- },
-
- _requestAligments: function( accession, action ){
- var self = this;
-
- this._clearAll();
- this._container.addClass('loading');
-
- var xhr = jQuery.ajax({
- url: self.opt.mappingUrl + accession,
- data: {biojsmapping:'1', varname:'pdbmappings'},
- dataType: "script",
- crossDomain: true,
- timeout: 5000,
- success: function(){
- Biojs.console.log("SUCCESS: data received");
- self._alignments = pdbmappings;
- action.call(self,pdbmappings);
- },
- async: true,
- error: function(qXHR, textStatus, errorThrown){
- Biojs.console.log("ERROR: " + textStatus );
- self.raiseEvent('onRequestError', {message: textStatus});
- action.call(self,{});
- }
- });
- },
-
- _createPDBSelect: function(alignments) {
- var pdbOptions = "";
- for (pdb in alignments) {
- text = pdb + " (" + alignments[pdb][1].start + ".." + alignments[pdb][1].end + ")";
- pdbOptions += '' + text + ' ';
- }
- Biojs.console.log("_createOptions: " + pdbOptions);
- return pdbOptions;
- },
-
- _setHeader: function( accession, mappingsSelector ) {
- var self = this;
-
- if ( mappingsSelector !== undefined ) {
- this._header.html("Accession: "+ accession + ", PDB Alignments: "+ mappingsSelector + " " );
- this._onAlignmentSelectionChange();
- this._header.children('select').change( function(){ self._onAlignmentSelectionChange() });
- } else {
- this._header.html("Accession: "+ accession + ", No PDB alignments found." );
- }
-
- this._adjustContentSize();
-
- },
-
- _onAlignmentSelectionChange: function(){
-
- var alignment = this.getCurrentAlignment();
-
- if ( !Biojs.Utils.isEmpty(alignment) ) {
-
- this.raiseEvent('onPdbSelected', {
- "pdbId": alignment.pdbId,
- "alignmentId": alignment.alignmentId,
- "start": alignment.start,
- "end": alignment.end
- });
-
- this._showPDBPrints(alignment.pdbId);
- this._showImage(alignment.pdbId);
- this._showFeatures(this.opt.accession);
-
- } else {
- Biojs.console.log("No structural information available for " + this.opt.accession );
- }
- },
-
- _showPDBPrints: function(pdbId) {
-
- var self = this;
- this._toolbar.children().remove();
- this._toolbar.attr('id', 'PDBLogos_toolbar_' + this.getId() );
-
- var myprints = new Biojs.PDBLogos({
- target: this._toolbar.attr('id'),
- identifier: pdbId,
- size: self.opt.pdbIconSize,
- pdb3DIcon: self.opt.pdb3DIcon
- });
-
- myprints.onClick( function(e) {
- if ( e.category == "PDBStructure" ) {
- self._showProtein3D();
- } else {
- window.open( e.printsURL );
- }
- });
-
- this._adjustContentSize();
- },
-
- /**
- * Get the available alignments for the current protein filtered by selection (PDB files containing a part of the requested region).
- *
- * @example
- * // Get the alignments matching with bases 4, 8 and 100.
- * alert ( instance.getAlignmentsByPdb("2F73") );
- *
- * @param {string} pdb identifier.
- * @returns {Object} .
- *
- */
- getAlignmentsByPdb: function ( pdbId ) {
-
- var alignments = {};
-
- for (al in this._alignments) {
- if ( this._alignments[al][0].intObjectId.indexOf( pdbId ) != -1 ) {
- alignments[this._alignments[al][0].intObjectId] = this._alignments[al];
- }
- }
-
- Biojs.console.log("Alignments for pdb " + pdbId );
- Biojs.console.log(alignments);
-
- return alignments;
- },
-
- getCurrentAlignment: function(){
-
- var result = {};
- var pdbSelectedValue = this._header.find('select').val();
-
- if ( pdbSelectedValue != undefined ) {
-
- result.accession = this.opt.accession;
- result.alignmentId = pdbSelectedValue.substring(0, pdbSelectedValue.indexOf(' '));
- result.pdbId = pdbSelectedValue.substring(0, pdbSelectedValue.indexOf('.')).toLowerCase();
-
-
- var alignment = this.getAlignmentsByPdb(result.alignmentId);
-
- result.start = alignment[result.alignmentId][1].start;
- result.end = alignment[result.alignmentId][1].end;
- result.offset = 0;
-
- if ( alignment.hasOwnProperty( result.alignmentId ) ) {
- result.offset = result.start - alignment[result.alignmentId][0].start;
- }
-
- result.alignment = alignment;
- }
-
- Biojs.console.log("Current alignment");
- Biojs.console.log(result);
-
- return result;
- },
-
- _showProtein3D: function( ){
-
- var self = this;
- var alignment = this.getCurrentAlignment();
- var height = this._container.height() - this._header.height() - this._toolbar.height();
-
- self._content.children().remove();
- self._beta.children().remove();
-
- self._beta.attr('id','biojs_protein3D_' + self._content.attr('id') );
-
- // Calculate character width
- var test = jQuery("X ").appendTo(self._content);
- var columns = Math.round( self._content.width() * (1/test.width()) );
- test.remove();
-
- var sequence = new Biojs.Sequence({
- target : self._content.attr('id'),
- format : 'FASTA',
- id : alignment.accession,
- formatSelectorVisible: false,
- columns: { size: columns, spacedEach: 10 }
- });
-
- var proteinStructure = new Biojs.Protein3DWS({
- id: alignment.pdbId,
- target: self._beta.attr('id'),
- width: Math.round( self._beta.width() ),
- height: self._container.height(),
- proxyUrl: self.opt.proxyUrl,
- jmolFolder: self.opt.jmolFolder
- });
-
- sequence.onSelectionChange( function (e) {
- // [e.start, e.end] from the event data corresponds to the protein sequence positions
- // which need to be aligned with PDB structure
- var selection = {start: e.start, end: e.end};
-
- selection.start -= alignment.offset;
- selection.end -= alignment.offset;
-
- proteinStructure.setSelection( selection );
- });
-
- },
-
- _showSequence: function( accession ){
-
- var self = this;
-
- this._content.children().remove();
-
- var sequence = new Biojs.Sequence({
- target : this._content.attr('id'),
- format : 'FASTA',
- id : accession,
- formatSelectorVisible: false,
- columns: { size: Math.round( self._content.width()/20 ), spacedEach: 10 }
- });
- },
-
- _showImage: function( pdbId ){
-
- this._beta.children().remove();
-
- var img = jQuery(' ')
- .appendTo(this._beta)
- .addClass('crop');
-
- },
-
- _showFeatures: function( accession ) {
-
- var self = this;
-
- this._content.children().remove();
- this._adjustContentSize();
-
- this._requestFeatures( accession, function(xml){
-
- Biojs.console.log("Features received " + xml );
-
- var xmlDoc = "";
-
- try {
- xmlDoc = jQuery.parseXML( xml );
- } catch (e) {
- Biojs.console.log("XML parser error" + e);
- }
-
- var features = jQuery('').appendTo(self._content);
- var label="", value="";
-
- jQuery(xmlDoc).find('FEATURE')
- .each( function(){
- //features.push( self._decodeFeature(this) );
- label = '' + jQuery(this).attr('label') + ' ';
- value = '' + jQuery(this).children('NOTE:first').text() + ' ';
-
- features.append('' + label + value + ' ');
- });
- });
- },
-
- /*
- * Function: Biojs.ProteinPortafolio._requestFeatures
- * Purpose: Request data to the server
- * Returns: -
- * Inputs: opt -> {Object} options object.
- */
- _requestFeatures: function( accession, action ){
-
- var self = this;
-
- Biojs.console.log("Requesting features for '" + accession + "'" );
-
- var httpRequest = {
- url: self.opt.proxyUrl,
- data: [{ name: "url", value: self.opt.featuresUrl + "?segment=" + accession }],
- method: "GET",
- dataType: "text",
- success: action,
- error: function(e) {
- Biojs.console.log("Error requesting features for " + accession );
- }
- };
-
- jQuery.ajax(httpRequest);
-
- },
-
- _adjustContentSize: function() {
-
- if ( this._beta.children().length > 0 ) {
- this._alpha.addClass('alpha');
- this._beta.addClass('beta');
- this._content.height(this._container.height() - this._header.height() - this._toolbar.height());
-
- } else {
- this._alpha.removeClass('alpha');
- this._beta.removeClass('beta');
- this._content.height('auto');
- }
- }
-
-});
-
-
-
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.PsicquicGraph.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.PsicquicGraph.js
deleted file mode 100755
index d9be353de4..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.PsicquicGraph.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- *
- * Graph display of molecular interactions using PSICQUIC .
- *
- * @class
- * @extends Biojs
- *
- * @author José Villaveces
- * @version 1.0.0_beta
- * @category 2
- *
- * @requires jQuery 1.7.2
- * @dependency
- *
- * @requires Cytoscape.js (latest version strongly suggested)
- * @dependency
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * id of the div where the component should be displayed
- *
- * @option {string} psicquicUrl
- * url of the PSICQUIC server to query.
- *
- * @option {string} proxyUrl
- * url of the proxy to use.
- *
- * @option {string} query
- * MIQL query.
- *
- * @option {Object} cyoptions
- * cytoscapejs inititlization options more info here
- *
- * @example
- * var instance = new Biojs.PsicquicGraph({
- * target: "YourOwnDivId",
- * psicquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * query: 'species:human?firstResult=0&maxResults=100',
- * cyoptions: {
- * style: cytoscape.stylesheet().selector('node').css({
- * 'content': 'data(id)',
- * 'font-family': 'helvetica',
- * 'font-size': 14,
- * 'text-outline-width': 3,
- * 'text-outline-color': '#888',
- * 'text-valign': 'center',
- * 'color': '#fff',
- * 'width': 'mapData(weight, 30, 80, 20, 50)',
- * 'height': 'mapData(height, 0, 200, 10, 45)',
- * 'border-color': '#fff'
- * }).selector(':selected').css({
- * 'background-color': '#000',
- * 'line-color': '#000',
- * 'target-arrow-color': '#000',
- * 'text-outline-color': '#000'
- * }).selector('edge').css({
- * 'width': 2
- * }),
- * layout: {
- * name: 'circle',
- * fit: true, // whether to fit the viewport to the graph
- * ready: undefined, // callback on layoutready
- * stop: undefined, // callback on layoutstop
- * rStepSize: 10, // the step size for increasing the radius if the nodes don't fit on screen
- * padding: 30, // the padding on fit
- * startAngle: 3/2 * Math.PI, // the position of the first node
- * counterclockwise: false // whether the layout should go counterclockwise (true) or clockwise (false)
- * },
- * ready:function(){
- * var cy = this;
- * cy.nodes().click(function(e){
- * console.log(e.cyTarget.id());
- * });
- * }
- * }
- * });
- */
-
-Biojs.PsicquicGraph = Biojs.extend(
-/** @lends Biojs.PsicquicGraph# */
-{
- constructor: function (options) {
- //Biojs.console.enable();
- this._query(this.opt);
- },
- /**
- * Default values for the options
- * @name Biojs.PsicquicGraph-opt
- */
- opt: {
- target: "YourOwnDivId",
- psicquicUrl: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- query: 'species:human?firstResult=0&maxResults=100',
- cyoptions: {
- //see cytoscapejs inititlization options
- style: cytoscape.stylesheet().selector('node').css({
- 'content': 'data(id)',
- 'font-family': 'helvetica',
- 'font-size': 14,
- 'text-outline-width': 3,
- 'text-outline-color': '#888',
- 'text-valign': 'center',
- 'color': '#fff',
- 'width': 'mapData(weight, 30, 80, 20, 50)',
- 'height': 'mapData(height, 0, 200, 10, 45)',
- 'border-color': '#fff'
- }).selector(':selected').css({
- 'background-color': '#000',
- 'line-color': '#000',
- 'target-arrow-color': '#000',
- 'text-outline-color': '#000'
- }).selector('edge').css({
- 'width': 2
- }),
- layout: {
- name: 'circle',
- fit: true, // whether to fit the viewport to the graph
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- rStepSize: 10, // the step size for increasing the radius if the nodes don't fit on screen
- padding: 30, // the padding on fit
- startAngle: 3/2 * Math.PI, // the position of the first node
- counterclockwise: false // whether the layout should go counterclockwise (true) or clockwise (false)
- },
- ready:function(){
- var cy = this;
- cy.nodes().click(function(e){
- console.log(e.cyTarget.id());
- });
- }
- }
- },
- /**
- * Array containing the supported event names
- * @name Biojs.PsicquicGraph-eventTypes
- */
- eventTypes: [],
- /*
- * Function: Biojs.PsicquicGraph._query
- * Purpose: Queries PSIQUIC using the provided query in MIQL.
- * Inputs: dataSet -> {Object} Settings of the data set.
- */
- _query: function(dataSet){
-
- dataSet.url = dataSet.psicquicUrl + '/' + dataSet.query;
-
- var instance = this;
- jQuery.ajax({
- url: dataSet.proxyUrl,
- dataType: "text",
- data: [{ name: "url", value: dataSet.url }],
- success: function ( data ) {
- instance._decodeToJSON(data, instance);
- }
- });
- },
- /*
- * Function: Biojs.PsicquicGraph._decodeToJSON
- * Purpose: Transforms MiTab data into JSON and renders the graph.
- * Inputs: miTabData -> {Object} interactions in MiTab format.
- * instance -> {Object} a reference to this widget instance.
- */
- _decodeToJSON: function(miTabData, instance){
- var nodes = [], edges = [], map = {};
-
- var lines = miTabData.split('\n');
- for(var i=0; i 13){
-
- var idSource = line[0].split('|')[0].split(':')[1];
-
- if(map[idSource] === undefined){
- map[idSource] = {
- data:{
- id: idSource,
- organism: line[9].split('|')
- }
- }
- nodes.push(map[idSource]);
- }
-
- var idTarget = line[1].split('|')[0].split(':')[1];
-
- if(map[idTarget] === undefined){
- map[idTarget] = {
- data:{
- id: idTarget,
- organism: line[10].split('|')
- }
- }
- nodes.push(map[idTarget]);
- }
-
- edges.push({
- data:{
- source: idSource,
- target: idTarget,
- type: line[11].split('|'),
- score: line[14].split('|')
- }
- });
- }
- }
-
- instance.opt.cyoptions.elements = {
- nodes: nodes,
- edges: edges
- };
-
- jQuery('
').appendTo('#'+instance.opt.target).cytoscape(instance.opt.cyoptions);
- }
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.RaphaelCanvas.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.RaphaelCanvas.js
deleted file mode 100755
index f63adbf3b4..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.RaphaelCanvas.js
+++ /dev/null
@@ -1,175 +0,0 @@
-/**
- * This is the description of the RaphaelCanvas component. This component provides pan/zoom functionality over Raphael's paper object,
- * and saves repitition of development effort involved in pan/zoom in other components.
- *
- * @class
- * @extends Biojs
- *
- * @author Swanand Gore
- * @version 1.0.0
- * @category 0
- *
- * @requires Raphael 2.1.0
- * @dependency
- *
- * @requires jQuery Core 1.7.2
- * @dependency
- *
- * @param {Object} options An object with the options for RaphaelCanvas component.
- *
- * @option {String} divid
- * the div in which the canvas should be created.
- *
- * @option {Number} dimension
- * the side of the square canvas
- *
- * @example
- * var instance = new Biojs.RaphaelCanvas({
- * divid:"YourOwnDivId", dimension:500
- * });
- * instance.testSetup();
- *
- */
-Biojs.RaphaelCanvas = Biojs.extend (
-/** @lends Biojs.RaphaelCanvas# */
-{
- /**
- * Default values for the options
- * @name Biojs.RaphaelCanvas-opt
- */
- opt: { divid:"YourOwnDivId", dimension:500 },
-
- constructor: function (options) {
- var self = this;
- self.dim = options.dimension;
- self.divid = options.divid;
- self.jq = jQuery('#'+self.divid);
- self.mousedownEvent = null;
- self.init();
- },
- init: function() {
- var self = this;
- self.rapha = Raphael(self.divid, self.dim, self.dim);
- self.fullbox = self.rapha.rect(0,0,self.dim,self.dim).attr({fill:'green',stroke:'black', opacity:0.01});
- self.jq.mousedown( function(e) { self.recordMousedown(e); } );
- self.makeZoomPannable();
- self.setVbox(0,0,self.dim);
- },
- testSetup: function() {
- var self = this;
- for(var x=0; x < self.dim; x+=self.dim/10) {
- for(var y=0; y < self.dim; y+=self.dim/10) {
- self.rapha.text(x, y, x+","+y).attr({'text-anchor':'start'});
- self.rapha.circle(x, y, self.dim/50);
- }
- }
- },
- makeZoomPannable: function() {
- var self = this;
- self.jq.mouseup( function(e) { self.zoompan(e); self.zoompanstarted = null; } );
- self.jq.mousemove( function(e) { self.zoompan(e) ;} );
- },
- setVbox: function(x,y,dim) {
- var self = this;
- self.rapha.setViewBox(x,y,dim,dim,true);
- self.curVbox = [x,y,dim];
- },
- zoompan: function(e) {
- var self = this;
- e.preventDefault();
- if(!self.zoompanMouseactivity(e)) return;
- if(self.zoompanstarted != 1) return;
- console.log("zoompan event", e.button, e.buttons, e.which);
- var pxy = self.event2paperxy(e);
- var pxy1 = self.event2paperxy(self.mousedownEvent);
- var dx = e.clientX - self.mousedownEvent.clientX;
- var pdx = pxy[0] - pxy1[0];
- var dy = e.clientY - self.mousedownEvent.clientY;
- var pdy = pxy[1] - pxy1[1];
- console.log("zoompan", pdx.toFixed(1), dx.toFixed(1), self.zoom);
- if(Math.abs(dx) < 5 && Math.abs(dy) < 5) return;
- if(e.shiftKey) { // zoom i.e. enlarge viewbox when zoomed in, and make it small when when zoomed out
- dd = self.curVbox[2] - pdx;
- decr = (dd-self.curVbox[2])/2;
- console.log("viewbox", pxy1, dd);
- self.setVbox(self.curVbox[0]-decr, self.curVbox[1]-decr, dd);
- }
- else if(e.ctrlKey) { // pan i.e. change viewbox in such a way that pxy1 goes onto pxy
- console.log("viewbox", pxy1, self.curVbox[2]);
- dx = pxy1[0]-pxy[0];
- dy = pxy1[1]-pxy[1];
- self.setVbox(self.curVbox[0]+dx, self.curVbox[1]+dy, self.curVbox[2]);
- }
- self.mousedownEvent = e;
- },
- zoompanMouseactivity: function(e) {
- var self = this;
- if(!e.shiftKey && !e.ctrlKey) return false;
- if(e.which != 1) return false;
- return true;
- },
- recordMousedown: function(e) {
- var self = this;
- if(!self.zoompanMouseactivity(e)) return;
- //console.log("mousedown", e);
- e.preventDefault();
- self.mousedownEvent = e;
- self.zoompanstarted = 1;
- },
- event2paperxy: function(e) {
- var self = this;
- // gratefully copied from a http://stackoverflow.com/questions/15257059/how-do-i-get-an-event-in-raphaels-paper-coordinates
- var rect = self.fullbox;
- var bnds = self.jq[0].getBoundingClientRect();
- // adjust mouse x/y
- var mx = e.clientX - bnds.left;
- var my = e.clientY - bnds.top;
- // divide x/y by the bounding w/h to get location %s and apply factor by actual paper w/h
- var fx = mx/bnds.width * rect.attrs.width;
- var fy = my/bnds.height * rect.attrs.height;
- console.log("event2paper", mx.toFixed(1), my.toFixed(1), fx.toFixed(1), fy.toFixed(1));
- return [fx,fy];
- // TODO make this work even when clicked outside raphael in the divid
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.RaphaelCanvas-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.RaphaelCanvas#onClick
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} selected Selected character.
- * @example
- * instance.onClick(
- * function( objEvent ) {
- * alert("The character " + objEvent.selected + " was clicked.");
- * }
- * );
- *
- * */
- "onClick",
-
- /**
- * @name Biojs.RaphaelCanvas#onHelloSelected
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} textSelected Selected text, will be 'Hello' obviously.
- * @example
- * instance.onHelloSelected(
- * function( objEvent ) {
- * alert("The word " + objEvent.textSelected + " was selected.");
- * }
- * );
- *
- * */
- "onHelloSelected"
- ]
-});
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Rheaction.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Rheaction.js
deleted file mode 100755
index b613936b54..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Rheaction.js
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * BioJS component to display Rhea reactions.
- * @class
- * @extends Biojs
- *
- * @author Rafael Alcántara
- * @version 1.0.0
- * @category 3
- *
- * @requires Server side proxy
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires Rheaction.css
- * @dependency
- *
- * @param {Object} options An object with the options for the component.
- *
- * @option {string} target
- * The ID of the DIV tag where the component should be displayed.
- *
- * @option {string} id
- * The Rhea ID, with or without 'RHEA:' prefix.
- *
- * @option {string} [dimensions='200']
- * The dimensions of compound structure images (side of the square) in pixels.
- *
- * @option {string} [proxyUrl='../biojs/dependencies/proxy/proxy.php']
- * This component needs to request data from a web service. To bypass the same origin policy
- * (http://en.wikipedia.org/wiki/Same_origin_policy) this component needs a proxy.
- * You could use your own proxy by modifying this value or one of the BioJS proxies:
- * '../biojs/dependencies/proxy/proxy.php' or '../biojs/dependencies/proxy/proxy.jsp'
- *
- *
- * @example
- * var instance = new Biojs.Rheaction({
- * target: 'YourOwnDivId',
- * id: '21881'
- * });
- */
-Biojs.Rheaction = Biojs.extend (
-/** @lends Biojs.Rheaction# */
-{
- constructor: function (options){
- //Biojs.console.enable();
- this.setId(this.opt.id);
- },
- /**
- * Sets and displays data for a new identifier.
- * @param {string} id The identifier.
- *
- * @example
- * instance.setId("RHEA:10280");
- *
- * @example
- * instance.setId("10735");
- *
- * @example
- * instance.setId("RHEA:18476");
- *
- * @example
- * instance.setId("XXXXX");
- *
- */
- setId: function(id){
- this._clearContent();
- var self = this;
- var rheaId = id.replace('RHEA:', '');
- this._rheaIdLabel = 'RHEA_' + rheaId;
- if ( "string" == (typeof this.opt.target) ) {
- this._container = jQuery( "#" + this.opt.target );
- } else {
- this.opt.target = "biojs_Rheaction_" + rheaId;
- this._container = jQuery('
');
- }
- this._container.addClass('scrollpane');
- this._reactionRow = jQuery('
',{"class":'reactionRow'});
- this._container.append(this._reactionRow);
- this._getCml(rheaId);
- },
-
- /**
- * Default values for the options.
- * @name Biojs.Rheaction-opt
- */
- opt: {
- target: undefined,
- id: undefined,
- dimensions: '200',
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- rheaWsUrl: 'http://www.ebi.ac.uk/rhea/rest/1.0/ws/reaction/cmlreact/',
- chebiUrl: 'http://www.ebi.ac.uk/chebi/searchId.do?chebiId=',
- chebiImgUrl: 'http://www.ebi.ac.uk/chebi/displayImage.do?defaultImage=true&scaleMolecule=true&chebiId='
- },
-
- _clearContent: function(){
- jQuery("#" + this.opt.target).html("");
- },
-
- _displayNoDataMessage: function(){
- jQuery('#'+this.opt.target+'').html(Biojs.Rheaction.MESSAGE_NODATA);
- },
-
- _getCml: function(rheaId){
- var self = this;
- var reactionUrl = this.opt.rheaWsUrl + rheaId;
- var httpRequest = {
- url: reactionUrl,
- method: 'GET',
- /** @ignore No need to document this object */
- success: function(xml){
- self._dataReceived(xml);
- },
- error: function(qXHR, textStatus, errorThrown){
- Biojs.console.log("ERROR requesting reaction. Response: " + textStatus);
- }
- };
-
- // Using proxy?
- // Redirect using the proxy and encode all params as url data
- if ( this.opt.proxyUrl != undefined ) {
- // Redirect to proxy url
- httpRequest.url = this.opt.proxyUrl;
- // Encode both url and parameters under the param url
- httpRequest.data = [{ name: "url", value: reactionUrl }];
- // Data type
- httpRequest.dataType = "text";
- }
-
- jQuery.ajax(httpRequest);
- },
-
- _dataReceived: function(xml){
- var self = this;
- var data = {};
- var xmlDoc = "";
- if (xml.length > 0){
- try {
- xmlDoc = jQuery.parseXML(xml);
- xmlResult = jQuery(xmlDoc).find('reaction');
- var reactants = xmlResult.find('reactant');
- for (var i = 0; i < reactants.length; i++){
- if (i > 0) self._addPlus();
- self._addParticipant(reactants[i]);
- }
- self._addDirection(xmlResult.attr('convention'));
- var products = xmlResult.find('product');
- for (var i = 0; i < products.length; i++){
- if (i > 0) self._addPlus();
- self._addParticipant(products[i]);
- }
- } catch (e) {
- Biojs.console.log("ERROR decoding ");
- Biojs.console.log(e);
- this._displayNoDataMessage();
- }
- }
- },
-
-
- _addPlus: function(){
- jQuery('
', { "class": 'direction', html: '+' })
- .appendTo(this._reactionRow);
- },
-
- _addDirection: function(convention){
- var direction = convention.replace('rhea:direction.', '');
- var dirLabel = undefined;
- switch (direction){
- case 'UN':
- dirLabel = '<?>';
- break;
- case 'BI':
- dirLabel = '<=>';
- break;
- default:
- dirLabel = '=>';
- break;
- }
- jQuery('
', { "class": 'direction', html: dirLabel })
- .appendTo(this._reactionRow);
- },
-
- _addParticipant: function(participant){
- var coef = parseInt(participant.attributes['count'].value);
- var molecule = jQuery(participant).find('molecule')[0];
- var compoundName = molecule.attributes['title'].value;
- var chebiId = molecule.attributes['id'].value.replace('CHEBI:', '');
- var compDivId = this._rheaIdLabel + '_CHEBI_' + chebiId;
-
- jQuery('
', {
- id: compDivId,
- "class": 'compound',
- css: { width: this.opt.dimensions }
- }).appendTo(this._reactionRow);
- if (coef > 1){
- $('#'+compDivId).append(jQuery(' ', {
- "class": 'stoichCoef',
- html: coef
- }));
- }
- $('#'+compDivId).append(jQuery(' ', {
- "class": 'compoundName',
- html: compoundName,
- href: this.opt.chebiUrl + chebiId,
- title: 'CHEBI:' + chebiId
- }));
- $('#'+compDivId).append(jQuery(' '));
- var imgUrl = this.opt.chebiImgUrl + chebiId
- + '&dimensions=' + this.opt.dimensions;
- $('#'+compDivId).append(jQuery(' ', {
- src: imgUrl,
- "class": 'compoundStructure',
- title: 'CHEBI:' + chebiId
- }));
- }
-},{
- MESSAGE_NODATA: "Sorry, no results for your request",
-});
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Ruler.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Ruler.js
deleted file mode 100755
index 2150238141..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Ruler.js
+++ /dev/null
@@ -1,657 +0,0 @@
-/**
- *
- * Ruler is a component to deal with the definition and interaction of rules that follow the structure:
- * In [LOCATION] [ACTION] the [TARGET] with [CONDITION] [PARAMETERS]
- * The component receives a JSON structure defining the values of the different parts of the rule and it
- * generates forms and lists.
- * The component generates events when rules are created, removed or reordered.
- *
- *
- * @class
- * @extends Biojs
- *
- * @author Gustavo A. Salazar
- * @version 1.0.1
- * @category 1
- *
- *
- * @requires jQuery Core 1.7.2
- * @dependency
- *
- * @requires jQuery UI 1.8.2
- * @dependency
- *
- * @requires jQuery UI CSS 1.8.2
- * @dependency
- *
- * @requires Selector CSS
- * @dependency
- *
- * @requires Color Selector CSS
- * @dependency
- *
- * @requires Color Selector
- * @dependency
- *
- *
- *
- *
- * @param {Object} options An object with the options for the Ruler component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {boolean} [allowOrdering=true]
- * The list of created rules can be reordered by drag&drop, it requires the jquery ui dependencies
- *
- * @option {Object} rules
- * A json stucture defining, the rules, possible values, conditions, etc. An example of the structure here:
- * {
- "location": [ "Some part of the page" ],
- "action": ["Action 1", "Action 2", "Action 3" ],
- "target": [ {
- "name": "First Target",
- "conditions": [ {
- "name": "Select from",
- "type": "selects",
- "amount": 1,
- "values": ["An Option","another option" ]
- }, {
- "name": "number",
- "type": "numeric_comparison"
- }, {
- "name": "some text",
- "type": "text_comparison"
- } ]
- } ]
-}
- *
- * @example
- * var instance = new Biojs.Ruler({
- * target: "YourOwnDivId",
- * allowOrdering:true,
- * rules:{
- * "location": [
- * "all proteins",
- * "protein1",
- * "protein2",
- * "protein3",
- * "protein4"
- * ],
- * "target": [
- * {
- * "name": "Proteins",
- * "action": [
- * {name:"Show",type:"single"},
- * {name:"Hide",type:"single"},
- * {name:"Highlight",type:"single"},
- * {name:"Color",type:"color"},
- * {name:"Color Range",type:"colorRange"},
- * {name:"Show Label",type:"select",options:["ID","Functional Class","Organism","Gene Name"]}
- * ],
- * "conditions": [
- * {
- * "name": "interactions with",
- * "type": "selects",
- * "amount": 1,
- * "values": [
- * "protein1",
- * "protein2",
- * "protein3",
- * "protein4"
- * ]
- * },
- * {
- * "name": "number of interactions",
- * "type": "numeric_comparison"
- * },
- * {
- * "name": "accession number",
- * "type": "text_comparison"
- * }
- * ]
- * },
- * {
- * "name": "Interactions",
- * "action": [
- * {name:"Show",type:"single"},
- * {name:"Hide",type:"single"},
- * {name:"Highlight",type:"single"},
- * {name:"Color",type:"color"},
- * ],
- * "conditions": [
- * {
- * "name": "protein",
- * "type": "selects",
- * "amount": 1,
- * "values": [
- * "protein1",
- * "protein2",
- * "protein3",
- * "protein4"
- * ]
- * },
- * {
- * "name": "proteins",
- * "type": "selects",
- * "amount": 2,
- * "values": [
- * "protein1",
- * "protein2",
- * "protein3",
- * "protein4"
- * ]
- * },
- * {
- * "name": "score",
- * "type": "numeric_comparison"
- * }
- * ]
- * }
- * ]
- * }
- * });
- *
- */
-Biojs.Ruler = Biojs.extend (
-/** @lends Biojs.Ruler# */
-{
- _number: 1,
- constructor: function (options) {
- var self=this;
- var target =self.opt.target;
- var innerCode = ' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- innerCode +=' ';
- $("#"+target).append(innerCode);
- if (self.opt.allowOrdering==true){
- $( ".sortable" ).sortable({
- stop: function(event,ui) {
- self.raiseEvent('onOrderChanged', {
- rules : self.getActiveRules()
- });
- }
- });
- $( ".sortable" ).disableSelection();
- }else
- $( ".sortable" ).removeClass("sortable");
-
- $( "#"+target+"_add_rule a" ).click(function(){
- self.addRule();
- });
- },
-
- /**
- * Default values for the options
- * @name Biojs.Ruler-opt
- */
- opt: {
- target: "YourOwnDivId",
- rules: null,
- allowOrdering:true
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Ruler-eventTypes
- */
- eventTypes: [
- /**
- * @name Biojs.Ruler#onRuleCreated
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event}
- * object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {Object} new_rule The rule that has been created. The rule Object contain the fields: location, action, target, condition, parameters(array), id, color
- * @eventData {Array} rules Array with all the active rules. Each rule is an Object that contain the fields: location, action, target, condition, parameters, id, color
- * @example
- * instance.onRuleCreated(
- * function( objEvent ) {
- * alert("New rule: In "+objEvent.new_rule.location+" "+objEvent.new_rule.action+" the "+objEvent.new_rule.target+" with "+objEvent.new_rule.condition+" "+objEvent.new_rule.parameters.join()+"");
- * }
- * );
- */
- "onRuleCreated",
- /**
- * @name Biojs.Ruler#onRuleRemoved
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event}
- * object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {Object} removed The rule that has been removed. The rule Object contain the fields: location, action, target, condition, parameters(array), id, color
- * @eventData {Array} rules Array with all the active rules. Each rule is an Object that contain the fields: location, action, target, condition, parameters, id, color
- * @example
- * instance.onRuleRemoved(
- * function( objEvent ) {
- * alert("Rule removed: In "+objEvent.removed.location+" "+objEvent.removed.action+" the "+objEvent.removed.target+" with "+objEvent.removed.condition+" "+objEvent.removed.parameters.join()+"");
- * }
- * );
- */
- "onRuleRemoved",
- /**
- * @name Biojs.Ruler#onOrderChanged
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event}
- * object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {Array} rules Array with all the active rules. Each rule is an Object that contain the fields: location, action, target, condition, parameters, id, color
- * @example
- * instance.onOrderChanged(
- * function( objEvent ) {
- * alert("Order has changed");
- * }
- * );
- */
- "onOrderChanged",
- /**
- * @name Biojs.Ruler#onRuleEditing
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event}
- * object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {Object} editing The rule that has been selected to be edited. The rule Object contain the fields: location, action, target, condition, parameters(array), id, color
- * @eventData {Array} rules Array with all the active rules. Each rule is an Object that contain the fields: location, action, target, condition, parameters, id, color
- * @example
- * instance.onRuleEditing(
- * function( objEvent ) {
- * alert("Editing Rule: In "+objEvent.editing.location+" "+objEvent.editing.action+" the "+objEvent.editing.target+" with "+objEvent.editing.condition+" "+objEvent.editing.parameters.join()+"");
- * }
- * );
- */
- "onRuleEditing"
- ],
-
- /**
- * Get an array with the active rules
- *
- * @example
- * instance.getActiveRules();
- */
- getActiveRules:function(){
- var self=this;
- var rules= new Array();
- $("#"+self.opt.target+'_list > li').each(function () {
- rules.push($(this).data("rule"))
- });
- return rules;
- },
- /**
- * Set the number of affected values by a given rule
- *
- * @param {string} id The id of the rule wich affecte value is going to be set.
- * @param {integer} number The amount of entities affected by the rule.
- *
- * @example
- * instance.setAffectedByRule('YourOwnDivId_rule_1',58);
- */
- setAffectedByRule:function(ruleId,affected){
- var self=this;
- $("#"+ruleId+" .affected").html(affected);
- },
-
- /**
- * Change the Rules' model. Warning: this method does not take care of rules that have been defined with a previous model.
- *
- * @param {object} rules A json stucture defining, the rules, possible values, conditions, etc. See the example for the the constructor.
- *
- * @example
- * instance.changeRules({
- "location": [ "Some part of the page" ],
- "action": ["Action 1", "Action 2", "Action 3" ],
- "target": [ {
- "name": "First Target",
- "conditions": [ {
- "name": "Select from",
- "type": "selects",
- "amount": 1,
- "values": ["An Option","another option" ]
- }, {
- "name": "number",
- "type": "numeric_comparison"
- }, {
- "name": "some text",
- "type": "text_comparison"
- } ]
- } ]
- });
- */
- changeRules: function (rules){
- var self=this;
- self.opt.rules=rules;
- },
-
- /**
- * Add a rule to the new rule panel. this method can be invoked from an external script, be careful when using to
- * create rules that follow the rules' model.
- *
- * @param {object} [rule] A rule with predefined values as an Object that contain the fields: location, action, target, condition, parameters, color
- *
- * @example
- * instance.addRule({location:"protein1", action:"Color", target:"Proteins", condition:"number of interactions", parameters:["==","2"], color:"#F00"});
- */
- addRule: function (rule){
- var self = this;
- var target =self.opt.target;
- var number = self._number;
- var code_rule = ' ';
- var gotRule =!(typeof rule=="undefined");
- var selectedTarget=0;
-
- if (typeof self.opt.rules.location !='undefined' && self.opt.rules.location.length>0){
- code_rule+= "In";
- code_rule+= self._getSelect('location_'+number,self.opt.rules.location,"",
- gotRule?rule.location:rule
- );
- }
-
- if (gotRule)
- for (var i in self.opt.rules.target)
- if (self.opt.rules.target[i].name==rule.target)
- selectedTarget=i;
-
- code_rule+= ' '+ self._getActionSpan(number,selectedTarget,rule)+' ';
- code_rule+= ' the ';
- code_rule+= self._getSelect('target_'+number,self.opt.rules.target,"name",
- gotRule?rule.target:rule
- );
- code_rule+= ' with ';
-
- var visible=gotRule?"none":"inline";
- for (var i in self.opt.rules.target){
- visible=gotRule?
- ((self.opt.rules.target[i].name==rule.target)?"inline":"none"):
- visible;
- code_rule+= self._getConditionsSpan(number,self.opt.rules.target[i],visible,rule);
- visible="none";
- }
- code_rule+= ' ';
- code_rule+= ' APPLY ';
- code_rule+= '
';
- $("#"+target+'_list_to_add').append(code_rule);
-
-
- $( "#"+target+"_apply_rule_"+number ).click(function(){
- self._applyRule($(this));
- });
-
-
- //Visualizing the right inputs for the selected target
- $( "#target_"+number ).change(function(){
- var n= $(this)[0].id.substr($(this)[0].id.lastIndexOf("_")+1);
- for (var i in self.opt.rules.target){
- var target_name =self.opt.rules.target[i].name;
- var target_id = target_name.replace(/ /g,"");
- $("#conditions_"+n+"_"+target_id).css("display","none");
- }
- $("#target_"+n+" option:selected").each(function () {
- $("#conditions_"+n+"_"+$(this).text()).css("display","inline");
- $("#condition_params_"+n+"_"+$(this).text()+"_"+($("#condition_"+n+"_"+$(this).text()).val().replace(/ /g,""))).css("display","inline");
- $('#action_span_'+n).html(self._getActionSpan(n,$(this).parent()[0].selectedIndex));
- self._enableAction(n);
-
- });
- });
-
- self._enableAction(number,rule);
-
- //Visualizing the right attributes for the selected condition
- for (var i in self.opt.rules.target){
- var target_name =self.opt.rules.target[i].name;
- var target_id = target_name.replace(/ /g,"");
- $( "#condition_"+number+"_"+target_id ).change(function(){
- var parts= $(this)[0].id.split("_");
- $("#condition_"+parts[1]+"_"+parts[2]+" option").each(function () {
- $("#condition_params_"+parts[1]+"_"+parts[2]+"_"+($(this).text().replace(/ /g,""))).css("display","none");
- });
- $("#condition_"+parts[1]+"_"+parts[2]+" option:selected").each(function () {
- $("#condition_params_"+parts[1]+"_"+parts[2]+"_"+($(this).text().replace(/ /g,""))).css("display","inline");
- });
- });
- }
- self._number++;
- },
- /**
- * Add a rule to the active rules' set. this method can be invoked from an external script, be careful when using by
- * following the rules' model.
- *
- * @param {object} [rule] A rule with predefined values as an Object that contain the fields: location, action, target, condition, parameters, color
- *
- * @example
- * instance.addActiveRule({location:"protein1", action:"Color", target:"Proteins", condition:"number of interactions", parameters:["==","2"], color:"#F00"});
- */
- addActiveRule: function(rule,n){
- var self =this;
- var target =self.opt.target;
- if (typeof n == "undefined"){
- n=self._number++;
- rule.id =target+'_rule_'+n;
- }
-
- var parameter_span="";
- switch (rule.action.type){
- case "color":
- parameter_span = '_ ';
- break;
- case "colorRange":
- parameter_span = '_ ';
- parameter_span += '_ ';
- break;
- case "select":
- parameter_span = ''+rule.actionParameters[0]+' ';
- break;
- }
-
- var locText = (typeof rule.location == 'undefined')?'':'In '+rule.location+' ';
- $("#"+target+'_list').append(''+rule.action.name+' '+parameter_span+' the '+rule.target+' with '+rule.condition+' '+rule.parameters.join(" ")+' remove edit 0
');
-
- $('#'+target+'_rule_'+n).data("rule",rule);//{location:location,action:action,target:target1,condition:condition,parameters:parameters,id:target+'_rule_'+n, color:color})
- $('#'+target+'_rule_'+n+' span.remove').click(function(){
- var removed = $(this).parent().parent().parent().parent().parent().data("rule");
- $(this).parent().parent().parent().parent().parent().remove();
- self.raiseEvent('onRuleRemoved', {
- rules : self.getActiveRules(),
- removed: removed
- });
- });
- $('#'+target+'_rule_'+n+' span.edit').click(function(){
- var editing = $(this).parent().parent().parent().parent().parent().data("rule");
- $(this).parent().parent().parent().parent().parent().remove();
- self.addRule(editing);
- self.raiseEvent('onRuleEditing', {
- rules : self.getActiveRules(),
- editing: editing
- });
- });
- self.raiseEvent('onRuleCreated', {
- rules : self.getActiveRules(),
- new_rule: $('#'+target+'_rule_'+n).data("rule")
- });
-
- },
- _applyRule: function(clicked){
- var self =this;
- var target =self.opt.target;
- var n= clicked[0].id.substr(clicked[0].id.lastIndexOf("_")+1);
- var location = $('#location_'+n).val();
- var actionName= $('#action_'+n).val();
- var target1= $('#target_'+n).val();
- var action=self._getAction(target1,actionName);
- var condition= $('#condition_'+n+'_'+target1.replace(/ /g,"")).val();
- var parameters= new Array();
- var par=0;
- while (typeof $('#condition_params_'+n+'_'+target1+'_'+condition.replace(/ /g,"")+'_'+par).val() != "undefined"){
- parameters.push($('#condition_params_'+n+'_'+target1+'_'+condition.replace(/ /g,"")+'_'+par).val());
- par++;
- }
- var actionPar=[];
- switch (action.type){
- case "color":
- actionPar.push($("#action_parameters_0_"+n).val());
- break;
- case "colorRange":
- actionPar.push($("#action_parameters_0_"+n).val());
- actionPar.push($("#action_parameters_1_"+n).val());
- break;
- case "select":
- actionPar.push($("#action_parameters_0_"+n).val());
- break
- }
- var rule = {location:location,action:action,actionParameters:actionPar,target:target1,condition:condition,parameters:parameters,id:target+'_rule_'+n};
- self.addActiveRule(rule,n);
- clicked.parent().parent().parent().parent().parent().remove();
-
- },
- _getConditionsSpan: function(n,target,visible,rule){
- var self= this;
- var target_name =target.name;
- var target_id = target_name.replace(/ /g,"");
- var code_rule = ' ';
- var gotRule =!(typeof rule=="undefined");
-
- code_rule+= self._getSelect('condition_'+n+'_'+target_id,target.conditions,"name",
- gotRule?rule.condition:rule
- );
-
- var visible_p=gotRule?"none":"inline";
- for (var j in target.conditions){
- visible_p=gotRule?
- ((target.conditions[j].name==rule.condition)?"inline":"none"):
- visible_p;
- code_rule += self._getConditionSpan(n,target_id,target.conditions[j],visible_p,rule);
- visible_p="none";
- }
- code_rule+= ' ';
- return code_rule;
-
- },
- _getConditionSpan: function(n,target_id,condition,visible_p,rule){
- var self =this;
- var condition_name=condition.name;
- var condition_id = condition_name.replace(/ /g,"");
- var gotRule =!(typeof rule=="undefined");
-
- var code_rule = ' ';
- switch (condition.type){
- case "selects":
- for (var i=0;i<1*condition.amount;i++)
- code_rule+=self._getSelect('condition_params_'+n+'_'+target_id+'_'+condition_id+'_'+i,condition.values,"",
- gotRule?rule.parameters[i]:rule
- );
- break;
-
- case "numeric_comparison":
- code_rule+=self._getSelect('condition_params_'+n+'_'+target_id+'_'+condition_id+'_0',["==",">","<",">=","<="],"",
- gotRule?rule.parameters[0]:rule
- );
- var value = gotRule?rule.parameters[1]:"";
- code_rule += ' ';
- break;
-
- case "text_comparison":
- code_rule+=self._getSelect('condition_params_'+n+'_'+target_id+'_'+condition_id+'_0',["equals","contains","different","not contains"],"",
- gotRule?rule.parameters[0]:rule
- );
- var value = gotRule?rule.parameters[1]:"";
- code_rule += ' ';
- break;
- case "feature_comparison":
- code_rule+=self._getSelect('condition_params_'+n+'_'+target_id+'_'+condition_id+'_0',condition.values,"",
- gotRule?rule.parameters[0]:rule
- );
- code_rule+=self._getSelect('condition_params_'+n+'_'+target_id+'_'+condition_id+'_1',["equals","contains","different","not contains"],"",
- gotRule?rule.parameters[1]:rule
- );
- var value = gotRule?rule.parameters[2]:"";
- code_rule += ' ';
- break;
- case "all":
- break;
- }
- code_rule += ' ';
- return code_rule;
- },
- _getSelect: function(id, options,field,selected){
- var code = ' ';
- for (var i in options){
- var value = options[i];
- if (typeof field != "undefined" && field!="") value= options[i][field];
- var selector=(value==selected)?"selected='selected'":"";
- code += ' '+ value +' ';
- }
- code += ' ';
- return code;
- },
- _getActionSpan: function(number,selectedTarget,rule){
- var self=this;
- var gotRule =!(typeof rule=="undefined");
- var code = self._getSelect('action_'+number,self.opt.rules.target[selectedTarget].action,"name",
- gotRule?rule.action.name:rule
- );
- code+= ' ';
- return code;
- },
- _enableAction: function(number,rule){
- var self=this;
- var gotRule =!(typeof rule=="undefined");
- //Visualizing the right inputs for the selected action
- $( "#action_"+number ).change(function(){
- var n= $(this)[0].id.substr($(this)[0].id.lastIndexOf("_")+1);
- self._enableActionParameters(n);
- });
- self._enableActionParameters(number, rule);
-
- },
- _enableActionParameters: function(number,rule){
- var self=this;
- var gotRule =!(typeof rule=="undefined");
- var action = (gotRule)?self._getAction(rule.target,rule.action.name):self._getAction($('#target_'+number).val(),$('#action_'+number).val());
- $("#action_parameters_"+number).html('');
- switch (action.type){
- case "color":
- self._addColorSelector(number,0,(gotRule)?rule.actionParameters[0]:rule);
- break;
- case "colorRange":
- self._addColorSelector(number,1,(gotRule)?rule.actionParameters[0]:"#F00");
- self._addColorSelector(number,0,(gotRule)?rule.actionParameters[1]:"#0F0");
- break;
- case "select":
- $("#action_parameters_"+number).html(self._getSelect('action_parameters_0_'+number,action.options,"",
- gotRule?rule.actionParameters[0]:rule
- ));
- break
- case "single": default:
- $("#action_parameters_"+number).html('');
- }
- },
- _addColorSelector: function(n,parameter,color){
- color = (typeof color!="undefined")?color:'#56992F';
- $("#action_parameters_"+n).append(' ')
- $("#action_parameters_"+parameter+"_"+n).miniColors({
- letterCase: 'uppercase'
- }).miniColors('value',color);
- },
- _getAction: function(targetName,actionName){
- var self=this;
- for (var i=0; i< self.opt.rules.target.length; i++){
- var target = self.opt.rules.target[i];
- if (target.name==targetName){
- for (var j=0; j< target.action.length; j++){
- var action=target.action[j];
- if (action.name==actionName)
- return action;
- }
- }
- }
- }
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Sequence.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Sequence.js
deleted file mode 100755
index ad36ffb31e..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Sequence.js
+++ /dev/null
@@ -1,1404 +0,0 @@
-/**
- * Sequence component
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez , Jose Villaveces
- * @version 1.0.0
- * @category 3
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires jQuery UI 1.8.16
- * @dependency
- *
- * @requires Biojs.Tooltip
- * @dependency
- *
- * @param {Object} options An object with the options for Sequence component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} sequence
- * The sequence to be displayed.
- *
- * @option {string} [id]
- * Sequence identifier if apply.
- *
- * @option {string} [format="FASTA"]
- * The display format for the sequence representation.
- *
- * @option {Object[]} [highlights]
- * For highlighting multiple regions.
- *
- * [
- * // Highlight aminoacids from 'start' to 'end' of the current strand using the specified 'color' (optional) and 'background' (optional).
- * { start: <startVal1>, end: <endVal1> [, id:<idVal1>] [, color: <HTMLColor>] [, background: <HTMLColor>]},
- * //
- * // Any others highlights
- * ...,
- * //
- * { start: <startValN>, end: <endValN> [, id:<idValN>] [, color: <HTMLColor>] [, background: <HTMLColor>]}
- * ]
- *
- *
- * highlights : [
- * { start:30, end:42, color:"white", background:"green", id:"spin1" },
- * { start:139, end:140 },
- * { start:631, end:633, color:"white", background:"blue" }
- * ]
- *
- *
- * @option {Object} [columns={size:40,spacedEach:10}]
- * Options for displaying the columns. Syntax: { size: <numCols>, spacedEach: <numCols>}
- *
- * @option {Object} [selection]
- * Positions for the current selected region. Syntax: { start: <startValue>, end: <endValue>}
- *
- * @option {Object[]} [annotations]
- * Set of overlapping annotations. Must be an array of objects following the syntax:
- *
- * [
- * // An annotation:
- * { name: <name>,
- * html: <message>,
- * color: <color_code>,
- * regions: [{ start: <startVal1>, end: <endVal1> color: <HTMLColor>}, ...,{ start: <startValN>, end: <endValN>, color: <HTMLColor>}]
- * },
- *
- * // ...
- * // more annotations here
- * // ...
- * ]
- *
- * where:
- *
- * name is the unique name for the annotation
- * html is the message (can be HTML) to be displayed in the tool tip.
- * color is the default HTML color code for all the regions.
- * regions array of objects defining the intervals which belongs to the annotation.
- * regions[i].start is the starting character for the i-th interval.
- * regions[i].end is the ending character for the i-th interval.
- * regions[i].color is an optional color for the i-th interval.
- *
- *
- * @option {Object} [formatOptions={title:true, footer:true}]
- * Options for displaying the title. by now just affecting the CODATA format.
- *
- * formatOptions : {
- * title:false,
- * footer:false
- * }
- *
- *
- * @example
- * var theSequence = "METLCQRLNVCQDKILTHYENDSTDLRDHIDYWKHMRLECAIYYKAREMGFKHINHQVVPTLAVSKNKALQAIELQLTLETIYNSQYSNEKWTLQDVSLEVYLTAPTGCIKKHGYTVEVQFDGDICNTMHYTNWTHIYICEEAojs SVTVVEGQVDYYGLYYVHEGIRTYFVQFKDDAEKYSKNKVWEVHAGGQVILCPTSVFSSNEVSSPEIIRQHLANHPAATHTKAVALGTEETQTTIQRPRSEPDTGNPCHTTKLLHRDSVDSAPILTAFNSSHKGRINCNSNTTPIVHLKGDANTLKCLRYRFKKHCTLYTAVSSTWHWTGHNVKHKSAIVTLTYDSEWQRDQFLSQVKIPKTITVSTGFMSI";
- * var mySequence = new Biojs.Sequence({
- * sequence : theSequence,
- * target : "YourOwnDivId",
- * format : 'CODATA',
- * id : 'P918283',
- * annotations: [
- * { name:"CATH",
- * color:"#F0F020",
- * html: "Using color code #F0F020 ",
- * regions: [{start: 122, end: 135}]
- * },
- * { name:"TEST",
- * html:"<br> Example of <b>HTML</b>",
- * color:"green",
- * regions: [
- * {start: 285, end: 292},
- * {start: 293, end: 314, color: "#2E4988"}]
- * }
- * ],
- * highlights : [
- * { start:30, end:42, color:"white", background:"green", id:"spin1" },
- * { start:139, end:140 },
- * { start:631, end:633, color:"white", background:"blue" }
- * ]
- * });
- *
- */
-
-Biojs.Sequence = Biojs.extend(
-/** @lends Biojs.Sequence# */
-{
- constructor: function (options) {
- var self = this;
-
- this._container = jQuery( "#" + this.opt.target );
-
- // Lazy initialization
- this._container.ready(function() {
- self._initialize();
- });
- },
-
- /**
- * Default values for the options
- * @name Biojs.Sequence-opt
- */
- opt : {
-
- sequence : "",
- id : "",
- target : "",
- format : "FASTA",
- selection: { start: 0, end: 0 },
- columns: { size: 35, spacedEach: 10 },
- highlights : [],
- annotations: [],
- sequenceUrl: 'http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/sequence',
-
- // Styles
- selectionColor : 'Yellow',
- selectionFontColor : 'black',
- highlightFontColor : 'red',
- highlightBackgroundColor : 'white',
- fontFamily: '"Andale mono", courier, monospace',
- fontSize: '12px',
- fontColor : 'inherit',
- backgroundColor : 'inherit',
- width: undefined,
- height: undefined,
- formatSelectorVisible: true
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Sequence-eventTypes
- */
- eventTypes : [
- /**
- * @name Biojs.Sequence#onSelectionChanged
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} start A number indicating the start of the selection.
- * @eventData {int} end A number indicating the ending of selection.
- * @example
- * mySequence.onSelectionChanged(
- * function( objEvent ) {
- * alert("Selected: " + objEvent.start + ", " + objEvent.end );
- * }
- * );
- *
- * */
- "onSelectionChanged",
-
- /**
- * @name Biojs.Sequence#onSelectionChange
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {int} start A number indicating the start of the selection.
- * @eventData {int} end A number indicating the ending of selection.
- * @example
- * mySequence.onSelectionChange(
- * function( objEvent ) {
- * alert("Selection in progress: " + objEvent.start + ", " + objEvent.end );
- * }
- * );
- *
- *
- * */
- "onSelectionChange",
-
- /**
- * @name Biojs.Sequence#onAnnotationClicked
- * @event
- * @param {function} actionPerformed An function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {string} name The name of the selected annotation.
- * @eventData {int} pos A number indicating the position of the selected amino acid.
- * @example
- * mySequence.onAnnotationClicked(
- * function( objEvent ) {
- * alert("Clicked " + objEvent.name + " on position " + objEvent.pos );
- * }
- * );
- *
- * */
- "onAnnotationClicked"
- ],
-
- // internal members
- _headerDiv : null,
- _contentDiv : null,
-
- // Methods
-
- _initialize: function () {
-
- if ( this.opt.width !== undefined ) {
- this._container.width( this.opt.width );
- }
-
- if ( this.opt.height !== undefined ) {
- this._container.height( this.opt.height );
- }
-
- // Disable text selection
-
- this._container.css({
- '-moz-user-select':'none',
- '-webkit-user-select':'none',
- 'user-select':'none'
- });
-
- // DIV for the format selector
- this._buildFormatSelector();
-
- // DIV for the sequence
- this._contentDiv = jQuery('
').appendTo(this._container);
- this._contentDiv.css({
- 'font-family': this.opt.fontFamily,
- 'font-size': this.opt.fontSize,
- 'text-align': 'left'
- });
-
- // Initialize highlighting
- this._highlights = this.opt.highlights;
-
- // Initialize annotations
- this._annotations = this.opt.annotations;
-
- //Initialize tooltip
- jQuery('
')
- .css({
- 'position': "absolute",
- 'z-index': "999999",
- 'color': "#fff",
- 'font-size': "12px",
- 'width': "auto",
- 'display': 'none'
- })
- .addClass("tooltip")
- .appendTo("body")
- .hide();
-
- if ( ! Biojs.Utils.isEmpty(this.opt.sequence) ) {
- this._redraw();
-
- } else if ( ! Biojs.Utils.isEmpty(this.opt.id) ) {
- this._requestSequence( this.opt.id );
-
- } else {
- this.clearSequence("No sequence available", "../biojs/css/images/warning_icon.png");
- }
-
- },
-
-
- /**
- * Shows the columns indicated by the indexes array.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * mySequence.setSequence("P99999");
- *
- */
- setSequence: function ( seq, identifier ) {
-
- if ( seq.match(/^([A-N,R-Z][0-9][A-Z][A-Z, 0-9][A-Z, 0-9][0-9])|([O,P,Q][0-9][A-Z, 0-9][A-Z, 0-9][A-Z, 0-9][0-9])(\.\d+)?$/i) ) {
- this._requestSequence( arguments[0] );
-
- } else {
- this.opt.sequence = seq;
- this.opt.id = identifier;
- this._highlights = [];
- this._highlightsCount = 0;
- this.opt.selection = { start: 0, end: 0 };
- this._annotations = [];
-
- this._contentDiv.children().remove();
- this._redraw();
- }
- },
-
- _requestSequence: function ( accession ) {
- var self = this;
-
- Biojs.console.log("Requesting sequence for: " + accession );
-
- jQuery.ajax({
- url: self.opt.sequenceUrl,
- dataType: "xml",
- data: { segment: accession },
- success: function ( xml ) {
- try {
-
- var sequenceNode = jQuery(xml).find('SEQUENCE:first');
- self.setSequence( sequenceNode.text(), sequenceNode.attr("id"), sequenceNode.attr("label") );
-
- } catch (e) {
- Biojs.console.log("Error decoding response data: " + e.message );
- self.clearSequence("No sequence available", "../biojs/css/images/warning_icon.png");
- }
-
- },
- error: function (jqXHR, textStatus, errorThrown) {
- Biojs.console.log("Error decoding response data: " + textStatus );
- self.clearSequence("Error requesting the sequence to the server " + this.url , "../biojs/css/images/warning_icon.png");
- }
- });
- },
-
- /**
- * Shows the columns indicated by the indexes array.
- * @param {string} [showMessage] Message to be showed.
- * @param {string} [icon] Icon to be showed a side of the message
- *
- * @example
- * mySequence.clearSequence("No sequence available", "../biojs/css/images/warning_icon.png");
- *
- */
- clearSequence: function ( showMessage, icon ) {
-
- var message = undefined;
-
- this.opt.sequence = "";
- this.opt.id = "";
- this._highlights = [];
- this._highlightsCount = 0;
- this.opt.selection = { start: 0, end: 0 };
- this._annotations = [];
- this._contentDiv.children().remove();
-
- this._headerDiv.hide();
-
- if ( undefined !== showMessage ) {
- message = jQuery('' + showMessage + '
')
- .appendTo(this._contentDiv)
- .addClass("message");
-
- if ( undefined !== icon ) {
- message.css({
- 'background': 'transparent url("' + icon + '") no-repeat center left',
- 'padding-left': '20px'
- });
- }
- }
- },
-
- /**
- * Set the current selection in the sequence causing the event {@link Biojs.Sequence#onSelectionChanged}
- *
- * @example
- * // set selection from the position 100 to 150
- * mySequence.setSelection(100, 150);
- *
- * @param {int} start The starting character of the selection.
- * @param {int} end The ending character of the selection
- */
- setSelection : function(start, end) {
- if(start > end) {
- var aux = end;
- end = start;
- start = aux;
-
- }
-
- if(start != this.opt.selection.start || end != this.opt.selection.end) {
- this._setSelection(start, end);
- this.raiseEvent(
- Biojs.Sequence.EVT_ON_SELECTION_CHANGED,
- { "start" : start, "end" : end }
- );
- }
- },
-
- _buildFormatSelector: function () {
- var self = this;
-
- this._headerDiv = jQuery('
').appendTo(this._container);
- this._headerDiv.css({
- 'font-family': '"Heveltica Neue", Arial, "sans serif"',
- 'font-size': '14px'
- }).append('Format: ');
-
- this._formatSelector = jQuery(' '+
- 'FASTA '+
- 'CODATA '+
- 'PRIDE '+
- 'RAW ').appendTo(self._headerDiv);
-
- this._formatSelector.change(function(e) {
- self.opt.format = jQuery(this).val();
- self._redraw();
- });
-
- this._formatSelector.val(self.opt.format);
-
- this.formatSelectorVisible( this.opt.formatSelectorVisible );
- },
-
- /**
- * Highlights a region using the font color defined in {Biojs.Protein3D#highlightFontColor} by default is red.
- *
- * @deprecated use addHighlight instead.
- *
- * @param {int} start The starting character of the highlighting.
- * @param {int} end The ending character of the highlighting.
- * @param {string} [color] HTML color code.
- * @param {string} [background] HTML color code.
- * @param {string} [id] Custom identifier.
- *
- * @return {int} representing the id of the highlight on the internal array. Returns -1 on failure
- */
- highlight : function (start, end, color, background, id ) {
- return this.addHighlight({ "start": start, "end": end, "color": color, "background": background, "id": id });
- },
-
- /**
- * Highlights a region using the font color defined in {Biojs.Sequence#highlightFontColor} by default is red.
- *
- * @example
- * // highlight the characters within the position 100 to 150, included.
- * mySequence.addHighlight( { "start": 100, "end": 150, "color": "white", "background": "red", "id": "aaa" } );
- *
- * @param {Object} h The highlight defined as follows:
- *
- *
- * @return {int} representing the id of the highlight on the internal array. Returns -1 on failure
- */
- addHighlight : function ( h ) {
- var id = '-1';
- var color = "";
- var background = "";
- var highlight = {};
-
- if ( h instanceof Object && h.start <= h.end ) {
-
- color = ( "string" == typeof h.color )? h.color : this.opt.highlightFontColor;
- background = ( "string" == typeof h.background )? h.background : this.opt.highlightBackgroundColor;
- id = ( "string" == typeof h.id )? h.id : (new Number(this._highlightsCount++)).toString();
-
- highlight = { "start": h.start, "end": h.end, "color": color, "background": background, "id": id };
-
- this._highlights.push(highlight);
- this._applyHighlight(highlight);
- this._restoreSelection(h.start,h.end);
- }
-
- return id;
- },
- /*
- * Function: Biojs.Sequence._applyHighlight
- * Purpose: Apply the specified color and background to a region between 'start' and 'end'.
- * Returns: -
- * Inputs: highlight -> {Object} An object containing the fields start (int), end (int),
- * color (HTML color string) and background (HTML color string).
- */
- _applyHighlight: function ( highlight ) {
- var seq = this._contentDiv.find('.sequence');
- for ( var i = highlight.start - 1; i < highlight.end; i++ ){
- zindex = jQuery(seq[i]).css("z-index");
- if (zindex=="auto"){
- z = 1;
- o = 1;
- }
- else{
- z = 0;
- o = 0.5;
- }
- jQuery(seq[i])
- .css({
- "color": highlight.color,
- "background-color": highlight.background,
- "z-index": z,
- "opacity": o
- })
- .addClass("highlighted");
- }
- },
- /*
- * Function: Biojs.Sequence._applyHighlights
- * Purpose: Apply the specified highlights.
- * Returns: -
- * Inputs: highlights -> {Object[]} An array containing the highlights to be applied.
- */
- _applyHighlights: function ( highlights ) {
- for ( var i in highlights ) {
- this._applyHighlight(highlights[i]);
- }
- },
- /*
- * Function: Biojs.Sequence._restoreHighlights
- * Purpose: Repaint the highlights in the specified region.
- * Returns: -
- * Inputs: start -> {int} Start of the region to be restored.
- * end -> {int} End of the region to be restored.
- */
- _restoreHighlights: function ( start, end ) {
- var h = this._highlights;
- // paint the region using default blank settings
- this._applyHighlight({
- "start": start,
- "end": end,
- "color": this.opt.fontColor,
- "background": this.opt.backgroundColor
- });
- // restore highlights in that region
- for ( var i in h ) {
- // interval intersects with highlight i ?
- if ( !( h[i].start > end || h[i].end < start ) ) {
- a = ( h[i].start < start ) ? start : h[i].start;
- b = ( h[i].end > end ) ? end : h[i].end;
- this._applyHighlight({
- "start": a,
- "end": b,
- "color": h[i].color,
- "background": h[i].background
- });
- }
- }
- },
- /*
- * Function: Biojs.Sequence._restoreSelection
- * Purpose: Repaint the current selection in the specified region.
- * It is used in the case of any highlight do overriding of the current selection.
- * Returns: -
- * Inputs: start -> {int} Start of the region to be restored.
- * end -> {int} End of the region to be restored.
- */
- _restoreSelection: function ( start, end ) {
- var sel = this.opt.selection;
- // interval intersects with current selection ?
- // restore selection
- if ( !( start > sel.end || end < sel.start ) ) {
- a = ( start < sel.start ) ? sel.start : start;
- b = ( end > sel.end ) ? sel.end : end;
-
- this._applyHighlight({
- "start": a,
- "end": b,
- "color": this.opt.selectionFontColor,
- "background": this.opt.selectionColor,
- });
- }
- },
-
- /**
- * Clear a highlighted region using.
- *
- * @deprecated use removeHighlight instead.
- *
- * @param {int} id The id of the highlight on the internal array. This value is returned by method highlight.
- */
- unHighlight : function (id) {
- this.removeHighlight(id);
- },
-
- /**
- * Remove a highlight.
- *
- * @example
- * // Clear the highlighted characters within the position 100 to 150, included.
- * mySequence.removeHighlight("spin1");
- *
- * @param {string} id The id of the highlight on the internal array. This value is returned by method highlight.
- */
- removeHighlight : function (id) {
- var h = this._highlights;
- for ( i in h ) {
- if ( h[i].id == id ) {
- start = h[i].start;
- end = h[i].end;
- h.splice(i,1);
-
- this._restoreHighlights(start,end);
- this._restoreSelection(start,end);
-
- break;
- }
- }
- },
-
- /**
- * Clear the highlights of whole sequence.
- * @deprecated use removeAllHighlights instead.
- */
- unHighlightAll : function () {
- this.removeAllHighlights();
- },
-
- /**
- * Remove all the highlights of whole sequence.
- *
- * @example
- * mySequence.removeAllHighlights();
- */
- removeAllHighlights : function () {
- this._highlights = [];
- this._restoreHighlights(1,this.opt.sequence.length);
- this._restoreSelection(1,this.opt.sequence.length);
- },
-
- /**
- * Changes the current displaying format of the sequence.
- *
- * @example
- * // Set format to 'FASTA'.
- * mySequence.setFormat('FASTA');
- *
- * @param {string} format The format for the sequence to be displayed.
- */
- setFormat : function(format) {
- if ( this.opt.format != format.toUpperCase() ) {
- this.opt.format = format.toUpperCase();
- this._redraw();
- }
-
- var self = this;
- // Changes the option in the combo box
- this._headerDiv.find('option').each(function() {
- if(jQuery(this).val() == self.opt.format.toUpperCase()) {
- jQuery(this).attr('selected', 'selected');
- }
- });
- },
-
- /**
- * Changes the current number of columns in the displayed sequence.
- *
- * @example
- * // Set the number of columns to 70.
- * mySequence.setNumCols(70);
- *
- * @param {int} numCols The number of columns.
- */
- setNumCols : function(numCols) {
- this.opt.columns.size = numCols;
- this._redraw();
- },
-
- /**
- * Set the visibility of the drop-down list of formats.
- *
- * @param {boolean} visible true: show; false: hide.
- */
- formatSelectorVisible : function (visible){
- if (visible) {
- this._headerDiv.show();
- } else {
- this._headerDiv.hide();
- }
- },
-
- /**
- * This is similar to a {Biojs.Protein3D#formatSelectorVisible} with the 'true' argument.
- *
- * @example
- * // Shows the format selector.
- * mySequence.showFormatSelector();
- *
- */
- showFormatSelector : function() {
- this._headerDiv.show();
- },
-
- /**
- * This is similar to a {Biojs.Protein3D#formatSelectorVisible} with the 'false' argument.
- *
- * @example
- * // Hides the format selector.
- * mySequence.hideFormatSelector();
- *
- */
- hideFormatSelector : function() {
- this._headerDiv.hide();
- },
-
- /**
- * Hides the whole component.
- *
- */
- hide : function () {
- this._headerDiv.hide();
- this._contentDiv.hide();
- },
-
- /**
- * Shows the whole component.
- *
- */
- show : function () {
- this._headerDiv.show();
- this._contentDiv.show();
- },
- /*
- * Function: Biojs.Sequence._setSelection
- * Purpose: Update the current selection.
- * Returns: -
- * Inputs: start -> {int} Start of the region to be selected.
- * end -> {int} End of the region to be selected.
- */
- _setSelection : function(start, end) {
- //alert("adsas");
-
- var current = this.opt.selection;
- var change = {};
-
- // Which is the change on selection?
- if ( current.start == start ) {
- // forward?
- if ( current.end < end ) {
- change.start = current.end;
- change.end = end;
- } else {
- this._restoreHighlights(end+1, current.end);
- }
- } else if ( current.end == end ) {
- // forward?
- if ( current.start > start ) {
- change.start = start;
- change.end = current.start;
- } else {
- this._restoreHighlights(current.start, start-1);
- }
- } else {
- this._restoreHighlights(current.start, current.end);
- change.start = start;
- change.end = end;
- }
-
- current.start = start;
- current.end = end;
-
- if ( change.start != undefined ) {
- this._applyHighlight({
- "start": change.start,
- "end": change.end,
- "color": this.opt.selectionFontColor,
- "background": this.opt.selectionColor
- });
- }
-
- },
-
- /*
- * Function: Biojs.Sequence._repaintSelection
- * Purpose: Repaint the whole current selection.
- * Returns: -
- * Inputs: -
- */
- _repaintSelection: function(){
- var s = Biojs.Utils.clone(this.opt.selection);
- this._setSelection(0,0);
- this._setSelection(s.start,s.end);
- },
-
- /*
- * Function: Biojs.Sequence._redraw
- * Purpose: Repaint the current sequence.
- * Returns: -
- * Inputs: -
- */
- _redraw : function() {
- var i = 0;
- var self = this;
-
- // Reset the content
- //this._contentDiv.text('');
- this._contentDiv.children().remove();
-
- // Rebuild the spans of the sequence
- // according to format
- if(this.opt.format == 'RAW') {
- this._drawRaw();
- } else if(this.opt.format == 'CODATA') {
- this._drawCodata();
- } else if (this.opt.format == 'FASTA'){
- this._drawFasta();
- } else {
- this.opt.format = 'PRIDE';
- this._drawPride();
- }
-
- // Restore the highlighted regions
- this._applyHighlights(this._highlights);
- this._repaintSelection();
- this._addSpanEvents();
- },
- /*
- * Function: Biojs.Sequence._drawFasta
- * Purpose: Repaint the current sequence using FASTA format.
- * Returns: -
- * Inputs: -
- */
- _drawFasta : function() {
- var self = this;
- var a = this.opt.sequence.toUpperCase().split('');
- var pre = jQuery(' ').appendTo(this._contentDiv);
-
- var i = 1;
- var arr = [];
- var str = '>' + this.opt.id + ' ' + a.length + ' bp ';
-
- /* Correct column size in case the sequence is as small peptide */
- var numCols = this.opt.columns.size;
- if ( this.opt.sequence.length < this.opt.columns.size ) {
- numCols = this.opt.sequence.length;
- }
-
- var opt = {
- numCols: numCols,
- numColsForSpace: 0
- };
-
- str += this._drawSequence(a, opt);
- pre.html(str);
-
- this._drawAnnotations(opt);
- },
- /*
- * Function: Biojs.Sequence._drawCodata
- * Purpose: Repaint the current sequence using CODATA format.
- * Returns: -
- * Inputs: -
- */
- _drawCodata : function() {
-
- var self = this;
- var a = this.opt.sequence.toUpperCase().split('');
- var pre = jQuery(' ').appendTo(this._contentDiv);
-
- var i = 0;
- var str = 'ENTRY ' + this.opt.id + ' ';
- str += 'SEQUENCE ';
- if ( this.opt.formatOptions !== undefined ){
- if(this.opt.formatOptions.title !== undefined ){
- if (this.opt.formatOptions.title == false) {
- str = '';
- }
- }
- }
-
- /* Correct column size in case the sequence is as small peptide */
- var numCols = this.opt.columns.size;
- if ( this.opt.sequence.length < this.opt.columns.size ) {
- numCols = this.opt.sequence.length;
- }
-
- var opt = {
- numLeft: true,
- numLeftSize: 7,
- numLeftPad:' ',
- numTop: true,
- numTopEach: 5,
- numCols: numCols,
- numColsForSpace: 0,
- spaceBetweenChars: true
- };
-
- str += this._drawSequence(a, opt);
-
- var footer = ' ///';
- if (this.opt.formatOptions !== undefined) {
- if (this.opt.formatOptions.footer !== undefined) {
- if (this.opt.formatOptions.footer == false) {
- footer = '';
- }
- }
- }
- str += footer;
- pre.html(str);
-
- this._drawAnnotations(opt);
- },
- /*
- * Function: Biojs.Sequence._drawAnnotations
- * Purpose: Paint the annotations on the sequence.
- * Returns: -
- * Inputs: settings -> {object}
- */
- _drawAnnotations: function ( settings ){
-
- var self = this;
- var a = this.opt.sequence.toLowerCase().split('');
- var annotations = this._annotations;
- var leftSpaces = '';
- var row = '';
- var annot = '';
-
- // Index at the left?
- if ( settings.numLeft ) {
- leftSpaces += this._formatIndex(' ', settings.numLeftSize+2, ' ');
- }
-
- for ( var i = 0; i < a.length; i += settings.numCols ){
- row = '';
- for ( var key in annotations ){
- annotations[key].id = this.getId() + "_" + key;
- annot = this._getHTMLRowAnnot(i+1, annotations[key], settings);
- if (annot.length > 0) {
- row += ' ';
- row += leftSpaces;
- row += annot;
- row += ' ';
- }
- }
-
- var numCols = settings.numCols;
- var charRemaining = a.length-i;
- if(charRemaining < numCols){
- numCols = charRemaining;
- }
-
- if ( settings.numRight ) {
- jQuery(row).insertAfter('div#'+self.opt.target+' div pre span#numRight_' + this.getId() + '_' + (i + numCols) );
- } else {
- jQuery(row).insertAfter('div#'+self.opt.target+' div pre span#'+ this.getId() + '_' + (i + numCols) );
- }
- }
-
- // add tool tips and background' coloring effect
- jQuery(this._contentDiv).find('.annotation').each( function(){
- self._addToolTip( this, function() {
- return self._getAnnotationString( jQuery(this).attr("id") );
- });
-
- jQuery(this).mouseover(function(e) {
- jQuery('.annotation.'+jQuery(e.target).attr("id")).each(function(){
- jQuery(this).css("background-color", jQuery(this).attr("color") );
- });
- }).mouseout(function() {
- jQuery('.annotation').css("background-color", "transparent");
-
- }).click(function(e) {
- self.raiseEvent( Biojs.Sequence.EVT_ON_ANNOTATION_CLICKED, {
- "name": self._annotations[ jQuery(e.target).attr("id") ].name,
- "pos": parseInt( jQuery(e.target).attr("pos") )
- });
- });
-
- });
-
- },
- /*
- * Function: Biojs.Sequence._getAnnotationString
- * Purpose: Get the annotation text message for the tooltip
- * Returns: {string} Annotation text for the annotation
- * Inputs: id -> {int} index of the internal annotation array
- */
- _getAnnotationString: function ( id ) {
- var annotation = this._annotations[id.substr(id.indexOf("_") + 1)];
- return annotation.name + " " + ((annotation.html)? annotation.html : '');
- },
-
- /*
- * Function: Biojs.Sequence._getHTMLRowAnnot
- * Purpose: Build an annotation
- * Returns: HTML of the annotation
- * Inputs: currentPos -> {int}
- * annotation -> {Object}
- * settings -> {Object}
- */
- _getHTMLRowAnnot : function (currentPos, annotation, settings) {
- var styleBegin = 'border-left:1px solid; border-bottom:1px solid; border-color:';
- var styleOn = 'border-bottom:1px solid; border-color:';
- var styleEnd = 'border-bottom:1px solid; border-right:1px solid; border-color:';
- var styleBeginAndEnd = 'border-left:1px solid; border-right:1px solid; border-bottom:1px solid; border-color:';
-
- var row = [];
- var end = (currentPos + settings.numCols);
- var spaceBetweenChars = (settings.spaceBetweenChars)? ' ' : '';
- var defaultColor = annotation.color;
- var id = annotation.id;
- for ( var pos=currentPos; pos < end ; pos++ ) {
- // regions
- for ( var r in annotation.regions ) {
- region = annotation.regions[r];
-
- spaceAfter = '';
- spaceAfter += (pos % settings.numColsForSpace == 0 )? ' ' : '';
- spaceAfter += spaceBetweenChars;
-
- color = ((region.color)? region.color : defaultColor);
- data = 'class="annotation '+id+'" id="'+id+'" color="'+color+'" pos="'+pos+'"';
-
- if ( pos == region.start && pos == region.end) {
- row[pos] = ' ';
- row[pos] += spaceAfter;
- row[pos] += ' ';
- } else if ( pos == region.start ) {
- row[pos] = ' ';
- row[pos] += spaceAfter;
- row[pos] += ' ';
- } else if ( pos == region.end ) {
- row[pos] = ' ';
- //row[pos] += spaceAfter;
- row[pos] += ' ';
- } else if ( pos > region.start && pos < region.end ) {
- row[pos] = ' ';
- row[pos] += spaceAfter;
- row[pos] += ' ';
- } else if (!row[pos]) {
- row[pos] = ' ';
- row[pos] += spaceAfter;
- }
- }
- }
-
- var str = row.join("");
-
- return ( str.indexOf("span") == -1 )? "" : str;
- },
- /*
- * Function: Biojs.Sequence._drawRaw
- * Purpose: Repaint the current sequence using RAW format.
- * Returns: -
- * Inputs: -
- */
- _drawRaw : function() {
- var self = this;
- var a = this.opt.sequence.toLowerCase().split('');
- var i = 0;
- var arr = [];
- var pre = jQuery(' ').appendTo(this._contentDiv);
-
- /* Correct column size in case the sequence is as small peptide */
- var numCols = this.opt.columns.size;
- if ( this.opt.sequence.length < this.opt.columns.size ) {
- numCols = this.opt.sequence.length;
- }
-
- var opt = {
- numCols: numCols
- };
-
- pre.html(
- this._drawSequence(a, opt)
- );
-
- this._drawAnnotations(opt);
- },
- /*
- * Function: Biojs.Sequence._drawPride
- * Purpose: Repaint the current sequence using PRIDE format.
- * Returns: -
- * Inputs: -
- */
- _drawPride : function() {
- var self = this;
- var a = this.opt.sequence.toUpperCase().split('');
- var pre = jQuery(' ').appendTo(this._contentDiv);
-
- /* Correct column size in case the sequence is as small peptide */
- var numCols = this.opt.columns.size;
- if ( this.opt.sequence.length < this.opt.columns.size ) {
- numCols = this.opt.sequence.length;
- }
-
- opt = {
- numLeft: true,
- numLeftSize: 5,
- numLeftPad:'0',
- numRight: true,
- numRightSize: 5,
- numRightPad: '0',
- numCols: numCols,
- numColsForSpace: self.opt.columns.spacedEach
- };
-
- pre.html(
- this._drawSequence(a, opt)
- );
-
- this._drawAnnotations(opt);
- },
- /*
- * Function: Biojs.Sequence._drawSequence
- * Purpose: Repaint the current sequence using CUSTOM format.
- * Returns: -
- * Inputs: a -> {char[]} a The sequence strand.
- * opt -> {Object} opt The CUSTOM format.
- */
- _drawSequence : function(a, opt) {
- var str = '';
-
- var spaceStyle = "white-space: pre;";
-
- // Index at top?
- if( opt.numTop )
- {
- str += ''
- var size = (opt.spaceBetweenChars)? opt.numTopEach*2: opt.numTopEach;
-
- if (opt.numLeft) {
- str += this._formatIndex(' ', opt.numLeftSize, ' ');
- }
-
- str += this._formatIndex(' ', size, ' ');
-
- for(var x = opt.numTopEach; x < opt.numCols; x += opt.numTopEach) {
- str += this._formatIndex(x, size, ' ', true);
- }
- str += ' '
- }
-
-
- // Index at the left?
- if (opt.numLeft) {
- str += this._formatIndex(1, opt.numLeftSize, opt.numLeftPad);
- str += ' ';
- }
-
- var j=1;
- for (var i=1; i <= a.length; i++) {
-
- if( i % opt.numCols == 0) {
- str += '' + a[i-1] + ' ';
-
- if (opt.numRight) {
- str += '';
- str += ' ';
- str += this._formatIndex(i, opt.numRightSize, opt.numRightPad);
- str += ' ';
- }
-
- str += ' ';
-
- var aaRemaining = a.length - i;
- if (opt.numLeft && aaRemaining > 0) {
- str += '';
- str += this._formatIndex(i+1, opt.numLeftSize, opt.numLeftPad);
- str += ' ';
- str += ' ';
- }
-
- j = 1;
-
- } else {
- str += '' + a[i-1];
- str += ( j % opt.numColsForSpace == 0)? ' ' : '';
- str += (opt.spaceBetweenChars)? ' ' : '';
- str += ' ';
- j++;
- }
- }
-
- str += ' '
-
- if (jQuery.browser.msie) {
- str = "" + str + " ";
- }
-
- return str;
- },
- /*
- * Function: Biojs.Sequence._formatIndex
- * Purpose: Build the HTML corresponding to counting numbers (top, left, right) in the strand.
- * Returns: -
- * Inputs: number -> {int} The number
- * size -> {int} Number of bins to suit the number.
- * fillingChar -> {char} Character to be used for filling out blank bins.
- * alignLeft -> {bool} Tell if aligned to the left.
- */
- _formatIndex : function( number, size, fillingChar, alignLeft) {
- var str = number.toString();
- var filling = '';
- var padding = size - str.length;
- if ( padding > 0 ) {
- while ( padding-- > 0 ) {
- filling += (""+fillingChar+" ");
- }
- if (alignLeft){
- str = number+filling;
- } else {
- str = filling+number;
- }
- }
- return str;
- },
- /*
- * Function: Biojs.Sequence._addSpanEvents
- * Purpose: Add the event handlers to the strand.
- * Returns: -
- * Inputs: -
- */
- _addSpanEvents : function() {
- var self = this;
- var isMouseDown = false;
- var currentPos;
-
- self._contentDiv.find('.sequence').each( function () {
-
- // Register the starting position
- jQuery(this).mousedown(function() {
- var id = jQuery(this).attr('id');
- currentPos = parseInt(id.substr(id.indexOf("_") + 1));
- clickPos = currentPos;
- self._setSelection(clickPos,currentPos);
- isMouseDown = true;
-
- // Selection is happening, raise an event
- self.raiseEvent(
- Biojs.Sequence.EVT_ON_SELECTION_CHANGE,
- {
- "start" : self.opt.selection.start,
- "end" : self.opt.selection.end
- }
- );
-
- }).mouseover(function() {
- // Update selection
- // Show tooltip containing the position
- var id = jQuery(this).attr('id');
- currentPos = parseInt(id.substr(id.indexOf("_") + 1));
-
- if(isMouseDown) {
- if( currentPos > clickPos ) {
- self._setSelection(clickPos, currentPos);
- } else {
- self._setSelection(currentPos, clickPos);
- }
-
- // Selection is happening, raise an event
- self.raiseEvent( Biojs.Sequence.EVT_ON_SELECTION_CHANGE, {
- "start" : self.opt.selection.start,
- "end" : self.opt.selection.end
- });
- }
-
- }).mouseup(function() {
- isMouseDown = false;
- // Selection is done, raise an event
- self.raiseEvent( Biojs.Sequence.EVT_ON_SELECTION_CHANGED, {
- "start" : self.opt.selection.start,
- "end" : self.opt.selection.end
- });
- });
-
- // Add a tooltip for this sequence base.
- self._addToolTip.call( self, this, function( ) {
- if (isMouseDown) {
- return "[" + self.opt.selection.start +", " + self.opt.selection.end + "]";
- } else {
- return currentPos;
- }
- });
-
- })
- .css('cursor', 'pointer');
- },
- /*
- * Function: Biojs.Sequence._addTooltip
- * Purpose: Add a tooltip around the target DOM element provided as argument
- * Returns: -
- * Inputs: target -> {Element} DOM element wich is the targeted focus for the tooltip.
- * cbGetMessageFunction -> {function} A callback function wich returns the message to be displayed in the tip.
- */
- _addToolTip : function ( target, cbGetMessageFunction ) {
-
- var tipId = '#sequenceTip' + this.getId();
-
- jQuery(target).mouseover(function(e) {
-
- var offset = jQuery(e.target).offset();
-
- if ( ! jQuery( tipId ).is(':visible') ) {
- jQuery( tipId )
- .css({
- 'background-color': "#000",
- 'padding': "3px 10px 3px 10px",
- 'top': offset.top + jQuery(e.target).height() + "px",
- 'left': offset.left + jQuery(e.target).width() + "px"
- })
- .animate( {opacity: '0.85'}, 10)
- .html( cbGetMessageFunction.call( target ) )
- .show();
- }
-
- }).mouseout(function() {
- //Remove the appended tooltip template
- jQuery( tipId ).hide();
- });
- },
-
- /**
- * Annotate a set of intervals provided in the argument.
- *
- * @deprecated Use addAnnotation() instead.
- *
- * @param {Object} annotation The intervals belonging to the same annotation.
- * Syntax: { name: <value>, color: <HTMLColorCode>, html: <HTMLString>, regions: [{ start: <startVal1>, end: <endVal1>}, ..., { start: <startValN>, end: <endValN>}] }
- */
- setAnnotation: function ( annotation ) {
- this.addAnnotation(annotation);
- },
-
- /**
- * Annotate a set of intervals provided in the argument.
- *
- * @example
- * // Annotations using regions with different colors.
- * mySequence.addAnnotation({
- * name:"UNIPROT",
- * html:"<br> Example of <b>HTML</b>",
- * color:"green",
- * regions: [
- * {start: 540, end: 560},
- * {start: 561, end:580, color: "#FFA010"},
- * {start: 581, end:590, color: "red"},
- * {start: 690, end:710}]
- * });
- *
- *
- * @param {Object} annotation The intervals belonging to the same annotation.
- * Syntax: { name: <value>, color: <HTMLColorCode>, html: <HTMLString>, regions: [{ start: <startVal1>, end: <endVal1>}, ..., { start: <startValN>, end: <endValN>}] }
- */
- addAnnotation: function ( annotation ) {
- this._annotations.push(annotation);
- this._redraw();
- },
-
- /**
- * Removes an annotation by means of its name.
- *
- * @example
- * // Remove the UNIPROT annotation.
- * mySequence.removeAnnotation('UNIPROT');
- *
- * @param {string} name The name of the annotation to be removed.
- *
- */
- removeAnnotation: function ( name ) {
- for (var i=0; i < this._annotations.length ; i++ ){
- if(name != this._annotations[i].name){
- this._annotations.splice(i,1);
- this._redraw();
- break;
- }
- }
- },
- /**
- * Removes all the current annotations.
- *
- * @example
- * mySequence.removeAllAnnotations();
- *
- */
- removeAllAnnotations: function () {
- this._annotations = [];
- this._redraw();
- }
-
-},
-{
- EVT_ON_SELECTION_CHANGE: "onSelectionChange",
- EVT_ON_SELECTION_CHANGED: "onSelectionChanged",
- EVT_ON_ANNOTATION_CLICKED: "onAnnotationClicked"
-
-});
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.SimpleFeatureViewer.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.SimpleFeatureViewer.js
deleted file mode 100755
index d7a03dbf88..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.SimpleFeatureViewer.js
+++ /dev/null
@@ -1,649 +0,0 @@
-/**
- * This component generates the JSON structure used by the FeatureViewer. It is a simplified version as it only
- * includes a non-overlapping view. Regions are represented as rectangles while one-base/aa are represented as lines.
- * Some few shapes are also supported for one-base/aa features, particularly{"diamond", "triangle", "hexagon",
- * "wave", "circle"}. In proteins, we recommend "diamond" for active sites, "triangle" for PTMs, "hexagon" for glycosylation,
- * "wave" for lipids, and "circle" for metals. Any other shape will be rendered as a rectangle. Bridges can be specified
- * with the type "bridge".
- * The legend is generated based on the first feature of each "typeLabel"; thus, if features with the same "typeLabel"
- * have different colours, only the first one will be used in the legend.
- *
- * @class
- * @extends Biojs.FeatureViewer
- *
- * @author Leyla Jael Garcia Castro
- * @version 1.0.0
- * @category 2
- *
- *
- * @param {Object} options An object with the options for SimpleFeatureViewer component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {boolean} [showSlider=true]
- * Should the slider for zooming be displayed?
- *
- * @option {boolean} [showPrintButton=true]
- * Should the button for printing/exporting to image be displayed?
- *
- * @option {boolean} [showFeatureTooltipOnMouseOver=true]
- * Should the tooltip for features be displayed?
- *
- * @option {boolean} [highlightFeatureOnMouseOver=true]
- * Should the features be highlighted when mouse over?
- *
- * @option {boolean} [selectFeatureOnMouseClick=true]
- * Should the features remain highlighted, i.e. being selected, after a mouse click,
- * and deselected after a second click or whenever other feature is selected?
- *
- * @option {String} [selectionColor=#ff8c00]
- * Color in hexa format so the features on mouse-over and click will change to it.
- * Make sure you do not use that color for any feature.
- *
- * @option {string} sequenceId
- * Sequence identifier
- *
- * @option {string} sequenceLength
- * Sequence length
- *
- * @option {Array} features
- * A JSON array containing the features to be displayed. type element for a feature is optional and can be either of
- * {"rect", "bridge", "diamond", "triangle", "hexagon", "wave", "circle"}
- * If you want bridges or one-single-position features to be rendered as rectangles, do not specify any type for the feature
- * In proteins, we recommend "diamond" for active sites, "triangle" for PTMs, "hexagon" for glycosylation,
- * "wave" for lipids, and "circle" for metals. Any other shape will be rendered as a rectangle
- * Colours can be specified in hexa, string, or rgb; if no colour is specified, black will be used.
- * features = [
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PROPEP_1_73",
- * featureStart:1,featureEnd:73,
- * typeLabel:"Propeptide",
- * featureLabel:"Propeptide",
- * typeCategory:"Molecule processing",typeCode:"SO:0001062",
- * evidenceText:"UniProt",evidenceCode:"none",
- * color: "red"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PEPTIDE_54_96",
- * featureStart:54,featureEnd:96,
- * typeLabel:"Peptide",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * color: "blue"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PEPTIDE_74_96",
- * featureStart:74,featureEnd:96,
- * typeLabel:"Active Site",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * type: "diamond"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_DISULFID_75_96",
- * featureStart:75,featureEnd:96,
- * typeLabel:"Active Site",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * color: "#33FF66",
- * type: "bridge"
- * }
- * ];
- *
- * @option {int} [imageWidth=700]
- * Image width
- *
- * @example
- * var myFT = [
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PROPEP_1_73",
- * featureStart:1,featureEnd:73,
- * typeLabel:"Propeptide",
- * featureLabel:"Propeptide",
- * typeCategory:"Molecule processing",typeCode:"SO:0001062",
- * evidenceText:"UniProt",evidenceCode:"none",
- * color: "red"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PEPTIDE_54_96",
- * featureStart:54,featureEnd:96,
- * typeLabel:"Peptide",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * color: "blue"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_PEPTIDE_74_96",
- * featureStart:74,featureEnd:96,
- * typeLabel:"Active Site",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * type: "diamond"
- * },
- * {
- * featureId:"UNIPROTKB_Q8LAX3_DISULFID_75_96",
- * featureStart:75,featureEnd:96,
- * typeLabel:"Active Site",
- * featureLabel:"Elicitor peptide 3",
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",
- * evidenceText:"UniProt",evidenceCode:"no ECO",
- * color: "#33FF66",
- * type: "bridge"
- * }
- * ];
- * var myPainter = new Biojs.SimpleFeatureViewer({
- * target: "YourOwnDivId",
- * sequenceId: "a4_human",
- * sequenceLength: 770,
- * features: myFT
- * });
- *
- */
-Biojs.SimpleFeatureViewer = Biojs.FeatureViewer.extend(
- /** @lends Biojs.SimpleFeatureViewer */
- {
- /**
- * Default values for the options
- * @name Biojs.SimpleFeatureViewer-constructor
- */
- constructor:function (options) {
- this.base(options);
- //Biojs.console.enable();
- this._generatesJSON();
- this.paintFeatures(this.opt.json);
- },
-
- /**
- * Default values for the options:
- * target: "",
- * showSlider: true,
- * showPrintButton: true,
- * showFeatureTooltipOnMouseOver: true,
- * highlightFeatureOnMouseOver: true,
- * selectFeatureOnMouseClick: true,
- * selectionColor: "#ff8c00"
- * imageWidth: 700,
- * sequenceId: "none"
- * sequenceLength: 0
- * features: {}
- *
- * @name Biojs.SimpleFeatureViewer-opt
- */
- opt:{
- //Parent
- /* target:"YourOwnDivId",
- json: {}, //will be created by this component
- showSlider:true,
- showPrintButton:true,
- showFeatureTooltipOnMouseOver:true,
- highlightFeatureOnMouseOver:true,
- selectFeatureOnMouseClick:true,
- selectionColor:"#ff8c00",
- */
- dragSites: false,
- imageWidth:700
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.SimpleFeatureViewer-eventTypes
- */
- eventTypes : [],
-
- /**
- * Opens a new window/tab in the browser with the graphical representation as a plain image.
- * Note: For IE it does not reflect the drags/drops on sites
- *
- * @example
- * myPainter.exportFeaturesToImage();
- *
- */
- exportFeaturesToImage: function() {
- var config = this.opt.json.configuration;
- var dataURL = "";
- if (jQuery.browser.msie) { //canvas does not work (not even with IE 9)
- alert("Operation not supported for IE, please try from a different browser");
- } else {
- svg = document.getElementById('uniprotFeaturePainter-holder').innerHTML;
- var canvas = document.createElement("canvas");
- canvg(canvas, svg);
- dataURL = canvas.toDataURL();
- this.$imageExported = jQuery('
')
- .html(' ')
- .dialog({
- autoOpen: true,
- title: 'Exported image',
- modal: true,
- width: config.sizeX+20
- });
- }
- },
- //Default height for rectangles
- _rectangleHeight: 10,
- _tracks: 0,
-
- /*
- * Generates a json file with all configuration and raphaël related info from a simple features json
- * INPUT (example)
- * sequenceId, sequenceLength,
- * features = [
- * {
- * featureEnd:73,
- * evidenceText:"UniProt",typeLabel:"Propeptide",
- * featureLabel:"Propeptide",featureStart:1,
- * typeCategory:"Molecule processing",typeCode:"SO:0001062",evidenceCode:"none",
- * featureId:"UNIPROTKB_Q8LAX3_PROPEP_1_73",
- * color: "#7DBAA4"
- * }
- * ,{
- * featureEnd:96,
- * evidenceText:"UniProt",typeLabel:"Peptide",
- * featureLabel:"Elicitor peptide 3",featureStart:74,
- * typeCategory:"Molecule processing",typeCode:"SO:0001064",evidenceCode:"no ECO",
- * featureId:"UNIPROTKB_Q8LAX3_PEPTIDE_74_96",
- * color: "#9B7057"
- * }
- * ];
- *
- * OUTPUT (example)
- * var json = {
- * "featuresArray":[
- * {
- * featureEnd:73,
- * evidenceText:"UniProt",typeLabel:"Propeptide",
- * featureLabel:"Propeptide",featureStart:1,
- * typeCategory:"Molecule processing",typeCode:"SO:0001062",evidenceCode:"none,
- * featureId:"UNIPROTKB_Q8LAX3_PROPEP_1_73",
- * color: "#000000",
- * type:"rect",fillOpacity:0.5
- * ,stroke:"#9B7057",height:10,path:""
- * ,strokeWidth:1,text:""
- * ,fill:"#9B7057",width:495
- * ,cy:56,cx:27
- * ,r:10
- * ,y:56,x:27
- * }
- * ,{
- * featureEnd":96,
- * evidenceText":"UniProt","typeLabel":"Peptide",
- * featureLabel":"Elicitor peptide 3",featureStart:74,
- * typeCategory":"Molecule processing",typeCode:"SO:0001064",evidenceCode:"no ECO"
- * featureId":"UNIPROTKB_Q8LAX3_PEPTIDE_74_96",
- * color": "#000000",
- * type":"rect",fillOpacity:0.5
- * ,stroke":"#7DBAA4",height:10,path:""
- * ,strokeWidth":1,text:""
- * ,fill":"#7DBAA4",width:151
- * ,cy:56,cx:529
- * ,r:10,
- * ,y:56,x:529
- * }
- * ]
- * ,"segment":"Q8LAx3" //same as sequenceId
- * ,"legend":{
- * "segment":{"text":"Q8LAX3","yPos":106,"xPos":15}
- * ,"key":[
- * {
- * "label":{
- * "total":"1","text":"Peptide","yPos":126,"xPos":50
- * }
- * ,"shape":{
- * "text":""
- * ,"width":30,"fill":"#7DBAA4"
- * ,"cy":121,"cx":15,"type":"rect","fillOpacity":0.5,"stroke":"#7DBAA4","height":5,"r":10
- * ,"path":"","typeLabel":"Peptide","y":121
- * ,"strokeWidth":1,"x":15
- * }
- * }
- * ,{
- * "label":{
- * "total":"1","text":"Propeptide","yPos":126,"xPos":205
- * }
- * ,"shape":{
- * "text":""
- * ,"width":30,"fill":"#9B7057"
- * ,"cy":121,"cx":170,"type":"rect","fillOpacity":0.5,"stroke":"#9B7057","height":5,"r":10
- * ,"path":"","typeLabel":"Propeptide","y":121
- * ,"strokeWidth":1,"x":170
- * }
- * }
- * ]
- * }
- * ,"configuration":{
- * "requestedStop":96 //same as sequenceLength
- * ,"requestedStart":1 //always 1
- * ,"rightMargin":20 //always 20
- * ,"belowRuler":30 //always 30
- * ,"sequenceLength":96 //same as sequenceLength
- * ,"unitSize":6.875 //rulerLength/sequenceLength
- * ,"style":"nonOverlapping" //always "nonOverlapping"
- * ,"sequenceLineY":54
- * ,"verticalGrid":false //always false
- * ,"rulerY":20 //always 20
- * ,"horizontalGrid":false //always false
- * ,"pixelsDivision":50 //always 50
- * ,"sizeY":76
- * ,"sizeX":700 //same as imageWidth
- * ,"aboveRuler":10 //always 10
- * ,"rulerLength":660 //imageWidth-rightMargin-leftMargin
- * ,"sizeYKey":210
- * ,"leftMargin":20 //always 20
- * ,"nonOverlapping":true //always true
- * }
- * };
- */
- _generatesJSON: function() {
- this.opt.json.segment = this.opt.sequenceId;
-
- this.opt.json = {};
- this.opt.json.configuration = {};
- this.opt.json.configuration.requestedStart = 1;
- this.opt.json.configuration.requestedStop = this.opt.sequenceLength;
- this.opt.json.configuration.sequenceLength = this.opt.sequenceLength;
- this.opt.json.configuration.rightMargin = 20;
- this.opt.json.configuration.leftMargin = 20;
- this.opt.json.configuration.rulerLength = this.opt.imageWidth - this.opt.json.configuration.rightMargin - this.opt.json.configuration.leftMargin;
- this.opt.json.configuration.belowRuler = 30;
- this.opt.json.configuration.aboveRuler = 10;
- this.opt.json.configuration.rulerY = 20;
- this.opt.json.configuration.unitSize = this.opt.json.configuration.rulerLength / this.opt.sequenceLength;
- this.opt.json.configuration.style = "nonOverlapping";
- this.opt.json.configuration.nonOverlapping = true;
- this.opt.json.configuration.verticalGrid = false;
- this.opt.json.configuration.horizontalGrid = false
- this.opt.json.configuration.sizeX = this.opt.imageWidth;
- this.opt.json.configuration.sequenceLineY = 4 + this.opt.json.configuration.rulerY + this.opt.json.configuration.belowRuler;
- this.opt.json.configuration.pixelsDivision = 50;
-
- this._organizeTracks(this.opt.features);
- if (this._trackShapes != 0) {
- this.opt.json.configuration.sizeY = this.opt.json.configuration.sequenceLineY + (this._tracks+1)*(this._rectangleHeight+2) + this._rectangleHeight;
- this.opt.json.configuration.sequenceLineY = this.opt.json.configuration.sequenceLineY + (this._trackShapes + 1)*this._rectangleHeight;
- } else {
- this.opt.json.configuration.sizeY = this.opt.json.configuration.sequenceLineY + this._tracks*(this._rectangleHeight+2) + this._rectangleHeight;
- }
- this._renderFeatures(this.opt.features);
- this.opt.json.featuresArray = this.opt.features;
- console.log(this.opt.json.featuresArray);
-
- sizeKey = this._generateLegend(this.opt.features);
- this.opt.json.configuration.sizeYKey = sizeKey + this.opt.json.configuration.sizeY;
- },
-
- /*
- * Organizes the features in non-overlapping tracks and defines the shape corresponding to each feature.
- */
- _organizeTracks: function (features) {
- tracks = new Array();
- trackShapes = new Array();
- //features[0].track = 0;
- //tracks[0] = new Array(features[0]);
- for (var i = 0; i < features.length; i++) {
- //console.log('feature ' + i);
- var tryShape = false;
- var found = false;
- if (features[i].type != undefined) {
- if ( (features[i].type != "rect") && (features[i].type != "bridge") && (features[i].type != "circle")
- && (features[i].type != "diamond") && (features[i].type != "hexagon")
- && (features[i].type != "triangle") && (features[i].type != "wave")) {
- features[i].type = "rect";
- }
- if ( features[i].featureStart == features[i].featureEnd) {
- if ((features[i].type != "rect") && (features[i].type != "bridge")) {
- tryShape = true;
- }
- }
- if (features[i].type == "bridge") {
- features[i].track = 0;
- continue;
- }
- } else {
- features[i].type = "rect";
- }
- if (!tryShape) { //rectangles
- for (var j = 0; j < tracks.length; j++) {
- var overlapping = false;
- for (var m = 0; m < tracks[j].length; m++) {
- if ( features[i].featureStart == features[i].featureEnd) {
- if ( (features[i].featureStart < tracks[j][m].featureStart)
- && (features[i].featureEnd < tracks[j][m].featureStart) ) { //starts and ends before
- overlapping = false;
- } else if (features[i].featureStart > tracks[j][m].featureEnd) { //starts after
- overlapping = false;
- } else {
- overlapping = true;
- break;
- }
- } else {
- if ( (features[i].featureStart < tracks[j][m].featureStart) //starts and ends before
- && (features[i].featureEnd <= tracks[j][m].featureStart) ){
- overlapping = false;
- } else if ( (features[i].featureStart >= tracks[j][m].featureEnd)
- && (features[i].featureEnd > tracks[j][m].featureStart )) {
- overlapping = false;
- } else {
- overlapping = true;
- break;
- }
- }
- }
- if (!overlapping) {
- //console.log('tracks j ' + j);
- features[i].track = j;
- tracks[j][tracks[j].length] = features[i];
- found = true;
- break;
- }
- }
- if (!found) {
- //console.log('tracks.length ' + tracks.length);
- features[i].track = tracks.length;
- tracks[tracks.length] = new Array(features[i]);
- }
- } else { //shapes
- for (var j = 0; j < trackShapes.length; j++) {
- var overlapping = false;
- for (var m = 0; m < trackShapes[j].length; m++) {
- if ( features[i].featureStart == features[i].featureEnd) {
- if ( ((features[i].featureStart-3) < trackShapes[j][m].featureStart)
- && ((features[i].featureEnd+3) < trackShapes[j][m].featureStart) ) { //starts and ends before
- overlapping = false;
- } else if ((features[i].featureStart-3) > trackShapes[j][m].featureEnd) { //starts after
- overlapping = false;
- } else {
- overlapping = true;
- break;
- }
- }
- }
- if (!overlapping) {
- //console.log('tracks j ' + j);
- features[i].track = j;
- trackShapes[j][trackShapes[j].length] = features[i];
- found = true;
- break;
- }
- }
- if (!found) {
- //console.log('tracks.length ' + tracks.length);
- features[i].track = trackShapes.length;
- trackShapes[trackShapes.length] = new Array(features[i]);
- }
- }
- }
- this._tracks = tracks.length + trackShapes.length;
- this._trackRects = tracks.length;
- this._trackShapes = trackShapes.length;
- },
-
- /*
- * Adds SVG information to the features
- *
- * OUTPUT (example of one feature with position, shape, and color)
- * "featureEnd":73,
- * "evidenceText":"UniProt","typeLabel":"Propeptide",
- * "featureLabel":"Propeptide","featureStart":1,
- * "typeCategory":"Molecule processing","typeCode":"SO:0001062","evidenceCode":"",
- * "featureId":"UNIPROTKB_Q8LAX3_PROPEP_1_73",
- * "featureTypeLabel":"propeptide",
- * "color": "#000000",
- * "type":"rect","fillOpacity":0.5
- * ,"stroke":"#9B7057","height":10,"path":""
- * ,"strokeWidth":1,"text":""
- * ,"fill":"#9B7057","width":495
- * ,"cy":56,"cx":27
- * ,"r":10
- * ,"y":56,"x":27
- */
- _renderFeatures: function(features) {
- for (i=0; i < features.length; i++) {
- if (features[i].type == undefined) {
- features[i].type = "rect";
- }
- if (features[i].color == undefined) {
- features[i].color = "black";
- }
- features[i].fillOpacity = 0.5;
- features[i].path = "";
- features[i].text = "";
- features[i].fill = features[i].color;
- features[i].stroke = features[i].color;
- features[i].strokeWidth = 1;
- features[i].width = this.opt.json.configuration.unitSize * (features[i].featureEnd - features[i].featureStart + 1);
- if (features[i].type == "rect") {
- features[i].height = this._rectangleHeight;
- features[i].cy = this.opt.json.configuration.sequenceLineY + features[i].track * (this._rectangleHeight) + (features[i].track+1)*2;
- } else if (features[i].type == "bridge") {
- features[i].height = this._rectangleHeight;
- features[i].cy = this.opt.json.configuration.sequenceLineY;
- } else {
- features[i].cy = this.opt.json.configuration.sequenceLineY - (features[i].track+2) * (this._rectangleHeight)// + (features[i].track+1)*2 -20;
- if (features[i].type == "triangle") {
- features[i].height = 10;
- } else if (features[i].type == "hexagon") {
- features[i].height = 7;
- } else {
- features[i].height = 5;
- }
- }
- features[i].r = features[i].height;
- features[i].cx = this.opt.json.configuration.unitSize * (features[i].featureStart-1) + this.opt.json.configuration.leftMargin;
- features[i].x = features[i].cx;
- features[i].y = features[i].cy;
- }
- },
-
- /*
- * Generates the legend.
- * {
- "segment":{"text":"Q8LAX3","yPos":106,"xPos":15}
- ,"key":[
- {
- "label":{
- "total":"1","text":"Peptide","yPos":126,"xPos":50
- }
- ,"shape":{
- "text":""
- ,"width":30,"fill":"#7DBAA4"
- ,"cy":121,"cx":15,"type":"rect","fillOpacity":0.5,"stroke":"#7DBAA4","height":5,"r":10
- ,"path":"","typeLabel":"Peptide","y":121
- ,"strokeWidth":1,"x":15
- }
- }
- ,{
- "label":{
- "total":"1","text":"Propeptide","yPos":126,"xPos":205
- }
- ,"shape":{
- "text":""
- ,"width":30,"fill":"#9B7057"
- ,"cy":121,"cx":170,"type":"rect","fillOpacity":0.5,"stroke":"#9B7057","height":5,"r":10
- ,"path":"","typeLabel":"Propeptide","y":121
- ,"strokeWidth":1,"x":170
- }
- }
- ]
- }
- */
- _generateLegend: function(features) {
- mykey = [];
- for (i=0; i < features.length; i++) {
- found = false;
- for (j=0; j < mykey.length; j++) {
- if (features[i].typeLabel == mykey[j].label.text) {
- mykey[j].label.total = mykey[j].label.total + 1;
- mykey[j].label.text = mykey[j].label.text;// + "(" + mykey[j].label.total + ")";
- found = true;
- break;
- }
- }
- if (!found) {
- mykey[mykey.length] = {};
- mykey[mykey.length-1].label = {}; //later yPos, xPos
- mykey[mykey.length-1].label.total = 1;
- mykey[mykey.length-1].label.text = features[i].typeLabel;
- mykey[mykey.length-1].shape = {}; //later cy, cx, y, x
- mykey[mykey.length-1].shape.text = "";
- mykey[mykey.length-1].shape.width = 30;
- mykey[mykey.length-1].shape.fill = features[i].fill;
- mykey[mykey.length-1].shape.type = "rect";
- mykey[mykey.length-1].shape.fillOpacity = 0.5;
- mykey[mykey.length-1].shape.stroke = features[i].stroke;
- mykey[mykey.length-1].shape.height = 5;
- mykey[mykey.length-1].shape.r = this._rectangleHeight;
- mykey[mykey.length-1].shape.path = "";
- mykey[mykey.length-1].shape.typeLabel = features[i].typeLabel;
- mykey[mykey.length-1].shape.strokeWidth = 1;
- }
- }
-
- this.opt.json.legend = {};
- yCell = this.opt.json.configuration.sizeY + this.opt.json.configuration.belowRuler;
- cellWidth = 200;
- cellsByRow = this.opt.json.configuration.sizeX / cellWidth;
- cellHeight = 20;
-
- this.opt.json.legend.segment = {};
- this.opt.json.legend.segment.text = this.opt.sequenceId;
- this.opt.json.legend.segment.yPos = yCell;
- this.opt.json.legend.segment.xPos = this.opt.json.configuration.leftMargin;
-
- yCell = yCell + cellHeight;
- cell = 0;
- totalRows = 1;
- for (i=0; i < mykey.length; i++) {
- xPos = 0;
- if (cell == 0) {
- xPos = this.opt.json.configuration.leftMargin;
- } else {
- xPos = cell * cellWidth;
- }
- mykey[i].label.yPos = yCell;
- mykey[i].label.xPos = xPos + cellHeight + 15;
- mykey[i].shape.y = yCell;
- mykey[i].shape.cy = yCell;
- mykey[i].shape.x = xPos;
- mykey[i].shape.cx = xPos;
- if (mykey[i].label.text.length > 21) {
- cell = Math.min(cell+2, cellsByRow);
- } else {
- cell = Math.min(cell+1, cellsByRow);
- }
- if (cell == cellsByRow) {
- yCell = yCell + cellHeight;
- cell = 0;
- totalRows++;
- }
- }
-
- this.opt.json.legend.key = mykey;
- return ((totalRows+1) * cellHeight);
- }
- }
-);
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Table.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Table.js
deleted file mode 100755
index 9023d2e696..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Table.js
+++ /dev/null
@@ -1,899 +0,0 @@
-/**
- * Table.
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 1
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires DataTables Plugin
- * @dependency
- *
- * @requires jQuery UI 1.8.2+
- * @dependency
- *
- * @requires MultiSelect Plugin
- * @dependency
- *
- * @dependency
- * @dependency
- *
- * @param {Object} options
- * An object with the options for HelloWorld component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string[][]|Object} dataSet
- * Either 2D string array containing the whole data to be displayed or a plain object defining the data source.
- *
- *
- * {
- * url: <url>,
- * proxyUrl: <proxy>,
- * paramsMap: { "iDisplayStart": <newName1>, "iDisplayLength": <newName2>, ... },
- * filter: <flag>
- * }
- *
- * where:
- *
- * url is string containing the url data source.
- * paramsMap Customize the name of the following params which will be passed to server:
- *
- * iDisplayStart: index of the first expected record for paging.
- * iDisplayLength: size of the fetched data (page size).
- * sSearch: filter string entered by the user in case of filter is enabled.
- *
- *
- * filter is a boolean to show/hide the search box on the table top.
- * The entered string will be passed to the server by means of 'sSearch' parameter.
- * Personalize the parameter name using paramsMap.
- * proxyUrl optional string containing the url of the proxy in case of needing access to server through a proxy.
- *
- *
- *
- * {
- * url: 'http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/species:human',
- * paramsMap: { "iDisplayStart": "firstResult", "iDisplayLength": "maxResults" },
- * filter: false
- * }
- *
- *
- *
- * [
- * [ 1, "chi", "China", 1347350000, "December 31, 2011", "0.1925" ],
- * [ 2, "ind", "India", 1210193422, "March 1, 2011", "0.1729" ],
- * [ 3, "usa", "United States", 313149000, "March 9, 2012", "0.0447" ],
- * [ 4, "ino", "Indonesia", 237641326, "May 1, 2010", "0.034" ],
- * [ 5, "bra", "Brazil", 192376496, "July 1, 2011", "0.0275" ],
- * [ 6, "pak", "Pakistan", 178945000, "March 9, 2012", "0.0256" ],
- * [ 7, "nig", "Nigeria", 162471000, "July 1, 2011", "0.0232" ],
- * [ 8, "rus", "Russia", 143030106, "January 1, 2012", "0.0204" ],
- * [ 9, "ban", "Bangladesh", 142319000, "March 15, 2011", "0.0203" ],
- * [ 10, "jap", "Japan", 127770000, "February 1, 2012", "0.0183" ],
- * [ 11, "mex", "Mexico", 112336538, "June 12, 2010", "0.016" ],
- * [ 12, "phi", "Philippines", 94013200, "July 1, 2010", "0.0134" ],
- * [ 13, "vie", "Vietnam", 87840000, "December 31, 2011", "0.0125" ],
- * [ 14, "eth", "Ethiopia", 84320987, "July 1, 2012", "0.012" ],
- * [ 15, "ger", "Germany", 81796000, "August 31, 2011", "0.0117" ]
- * ]
- *
- *
- * @option {(string|Object)[]} columns
- * Array containing the column descriptors. A descriptor can be either a string or an object.
- * Use a string to define column name only. Use an object to define column name, rendering function and fixed width.
- *
- *
- * {
- * name: <string>,
- * render: <function>,
- * width: <string>
- * }
- *
- * where:
- *
- * name will be used for the column title, and 'render'.
- * render is a function to format each row value in that column.
- * Returns a string containing the new formatted value.
- * Arguments:
- *
- * col: index of the column.
- * dataRow: 1D array containing whole row.
- * value: current value of the cell.
- *
- *
- *
- * // Formats a decimal value in a percentage value.
- * var numberToPercentageFormat = function (col, dataRow, value) {
- * return ( new Number(value) * 100 ).toFixed(2) + "%";
- * };
- *
- * width of the column using either pixels or percentage.
- *
- *
- * // Three columns: Identifier, Name and Location.
- * // Custom rendering function will apply bold to Identifier values.
- * columns: [
- * "Name",
- * "Location",
- * { name: "Population %", render: numberToPercentageFormat }
- * ]
- *
- *
- * @option {int[]} [hideColumns=[]]
- * Indexes (0-based) of the columns to be hided.
- *
- * @option {array[][int,string]} [orderBy=[]]
- * A 2D array to tell how to order the columns. Each 1D array must contains both column index and ordering direction.
- *
- *
- * // order column 0 in ascending direction and column 3 in descending direction
- * orderBy: [ [0,'asc'], [3,'desc'] ]
- *
- *
- * @option {int} [pageLength=10]
- * Number of rows per page.
- *
- * @option {bool} [rowSelection=true]
- * Show/hide the first check boxes column used for selecting rows.
- *
- * @option {bool} [paginate=true]
- * Enable/disable the pagination, so whole the data will be displayed.
- *
- * @option {int} [width=597]
- * Horizontal size of the general container.
- *
- * @option {int} [height=400]
- * Vertical size of the general container.
- *
- * @example
- * // Adds a flag to the cell value.
- * var flagRender = function (col, dataRow, value) {
- * return ' ' + value;
- * };
- *
- * // Formats a decimal value in a percentage value.
- * var numberToPercentageFormat = function (col, dataRow, value) {
- * return ( new Number(value) * 100 ).toFixed(2) + "%";
- * };
- *
- * // Example of instantiation of the Table
- * var myTable = new Biojs.Table({
- * target: "YourOwnDivId",
- * hideColumns: [1],
- * orderBy: [ [0,'asc'], [3,'desc'] ],
- * columns: [
- * "Rank",
- * "Flag",
- * { name: "Country", render: flagRender },
- * "Population",
- * "Date",
- * { name:"% World Population", render: numberToPercentageFormat }
- * ],
- * dataSet: [
- * [ 1, "chi", "China", 1347350000, "December 31, 2011", "0.1925" ],
- * [ 2, "ind", "India", 1210193422, "March 1, 2011", "0.1729" ],
- * [ 3, "usa", "United States", 313149000, "March 9, 2012", "0.0447" ],
- * [ 4, "ino", "Indonesia", 237641326, "May 1, 2010", "0.034" ],
- * [ 5, "bra", "Brazil", 192376496, "July 1, 2011", "0.0275" ],
- * [ 6, "pak", "Pakistan", 178945000, "March 9, 2012", "0.0256" ],
- * [ 7, "nig", "Nigeria", 162471000, "July 1, 2011", "0.0232" ],
- * [ 8, "rus", "Russia", 143030106, "January 1, 2012", "0.0204" ],
- * [ 9, "ban", "Bangladesh", 142319000, "March 15, 2011", "0.0203" ],
- * [ 10, "jap", "Japan", 127770000, "February 1, 2012", "0.0183" ],
- * [ 11, "mex", "Mexico", 112336538, "June 12, 2010", "0.016" ],
- * [ 12, "phi", "Philippines", 94013200, "July 1, 2010", "0.0134" ],
- * [ 13, "vie", "Vietnam", 87840000, "December 31, 2011", "0.0125" ],
- * [ 14, "eth", "Ethiopia", 84320987, "July 1, 2012", "0.012" ],
- * [ 15, "ger", "Germany", 81796000, "August 31, 2011", "0.0117" ]
- * ]
- *
- * });
- */
-Biojs.Table = Biojs.extend (
-/** @lends Biojs.Table# */
-{
- constructor: function (options) {
- var self = this;
-
- //Biojs.console.enable();
-
- // TODO: validate mandatory values
-
- self._tableId = 'biojs_Table_'+self.getId();
- self._tableSelector = '#'+self._tableId;
- self._topControls = jQuery('
').appendTo("#"+self.opt.target);
- self._body = jQuery('
').appendTo("#"+self.opt.target);
- self._table = jQuery('').appendTo(self._body);
- self._columnsOffset = (this.opt.rowSelection)? 1 : 0;
-
- self._settings = {};
- self._settings.opt = this.opt;
-
- self._initSettings(self._settings);
- self.setDataSource(self.opt.dataSet);
- self._addEvents();
-
- Biojs.console.log("Biojs.Table constructor has finished");
- },
-
- /**
- * Default values for the options
- * @name Biojs.Table-opt
- */
- opt: {
- target: "YourOwnDivId",
- hideColumns: [],
- columns: [""],
- dataSet: [],
- paginate: true,
- pageLength: 10,
- width: 597,
- height: 400,
- rowSelection: true,
- orderBy: []
- //mapUrlParams: function ( params ) { ; }
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Table-eventTypes
- */
- eventTypes: [
- /**
- * @name Biojs.Table#onCellClicked
- * @event
- * @param {function} actionPerformed A function which receives a {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which triggered the event.
- * @eventData {int} rowIndex Row selected (0-based index).
- * @eventData {int} colIndex Column number (0-based index).
- * @eventData {HTMLTableCellElement} cell Instance of the DOM HTMLTableCellElement selected.
- * @example
- * myTable.onCellClicked(
- * function( e ) {
- * alert("Cell selected in row "+ e.rowIndex +", column " + e.colIndex + ". Value: " + e.cell.innerText );
- * }
- * );
- *
- **/
- "onCellClicked",
-
- /**
- * @name Biojs.Table#onRowSelected
- * @event
- * @param {function} actionPerformed A function which receives a {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which triggered the event.
- * @eventData {int} rowIndex Row selected (0-based index).
- * @eventData {HTMLTableRowElement} row Instance of the DOM HTMLTableRowElement selected.
- * @example
- * myTable.onRowSelected(
- * function( e ) {
- * alert("Row selected: "+ e.rowIndex );
- * }
- * );
- *
- **/
- "onRowSelected",
-
- /**
- * @name Biojs.Table#onHeaderClicked
- * @event
- * @param {function} actionPerformed A function which receives a {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which triggered the event.
- * @eventData {string} colName Column name.
- * @eventData {int} colIndex Column number (0-based index).
- * @example
- * myTable.onHeaderClicked(
- * function( e ) {
- * alert("Header \""+ e.colName +"\" selected. Column index " + e.colIndex + ". " );
- * }
- * );
- *
- **/
- "onHeaderClicked",
-
- /**
- * @name Biojs.Table#onDataArrived
- * @event
- * @param {function} actionPerformed A function which receives a {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which triggered the event.
- * @eventData {Object} jsonData Data object just arrived.
- * @example
- * myTable.onDataArrived(
- * function( e ) {
- * alert( e.jsonData.aaData.length + " new records has arrived." );
- * }
- * );
- *
- **/
- "onDataArrived"],
-
- /**
- * Rebuild the table
- *
- * @example
- * myTable.setDataSource({
- * url: 'data/tableJSON.js'
- * });
- *
- */
- setDataSource: function ( dataSet ) {
-
- this.opt.dataSet = dataSet;
-
- if ( dataSet instanceof Array ) {
- this._initSettingsForLocalData(this._settings);
- } else {
- this._initSettingsForRemoteData(this._settings);
- }
-
- Biojs.console.log("Drawing..");
- this._settings.bDestroy = true;
- this._table.dataTable( this._settings );
- this._setColumnSelector( this._table.fnSettings() );
- },
-
- /**
- * Shows the columns indicated by the indexes array.
- * @param {int[]} columns Column indexes to be showed.
- * @param {bool} flag The new value.
- *
- * @example
- * myTable.toggleColumns([0,3],true);
- *
- */
- toggleColumns: function (columns, flag) {
- Biojs.console.log("Toggle columns to :"+ flag );
- Biojs.console.log(columns);
-
- var checkbox = jQuery('input[name="multiselect_' + this._tableId + '_columns"]');
-
- for ( i=0; i < columns.length; i++ ) {
- toToggle = jQuery(checkbox[ columns[i] ]);
- if ( toToggle.attr("checked") != flag ) {
- toToggle.click();
- }
- this._table.fnSetColumnVis( columns[i] + this._columnsOffset, flag );
- }
- },
-
- /**
- * Shows the columns indicated by the indexes array.
- * @param {int[]} columns Column indexes to be showed.
- *
- * @example
- * myTable.showColumns([0,3]);
- *
- */
- showColumns: function(columns){
- Biojs.console.log("Showing columns:");
- Biojs.console.log(columns);
-
- this.toggleColumns(columns,true);
- },
-
- /**
- * Hides the columns indicated by the indexes array.
- * @param {int[]} columns Column indexes to be hided.
- *
- * @example
- * myTable.hideColumns([0,3]);
- *
- */
- hideColumns: function(columns){
- Biojs.console.log("Hiding columns:");
- Biojs.console.log(columns);
-
- this.toggleColumns(columns,false);
- },
-
- /**
- * Sorts by column.
- * @param {int} columnIndex Column indexes to be sorted (0-based index).
- * @param {string} direction Sorting direction; 'asc' for ascending, 'desc' for descending.
- *
- * @example
- * myTable.orderBy(1,'desc');
- *
- */
- orderBy: function (columnIndex, direction) {
- this._table.fnSort( [ [columnIndex + this._columnsOffset, direction] ] );
- },
-
- /**
- * Gets the current selected data.
- *
- * @returns {string[][]} data current selection.
- *
- * @example
- * myTable.getSelectedRows();
- *
- */
- getSelectedRows: function(){
- var self = this;
- var selectedRows = [];
-
- jQuery(self._tableSelector + ' tr.selected')
- .each(function(index, e) {
- selectedRows.push(self._table.fnGetData(e));
- });
-
- Biojs.console.log(selectedRows)
- return selectedRows;
- },
-
- /*
- * Function: Biojs.Table._initSettings
- * Purpose: initialize the settings for DataTables plugin in case of using local data
- * Returns: -
- * Inputs: settings -> {Object} where the configuration settings will be added.
- */
- _initSettings: function( settings ) {
- Biojs.console.log("initializing settings...");
-
- settings.aoColumnDefs = [];
-
- this._setColumns(this.opt.columns, settings);
- //this._setData(this.opt.dataSet, settings);
-
- // Hide columns
- if ( this.opt.hideColumns.length > 0 ) {
- settings.aoColumnDefs.push( { "bVisible": false, "aTargets": this.opt.hideColumns } );
- }
-
- // Order by
- if ( this.opt.orderBy.length > 0 ) {
- settings.aaSorting = this.opt.orderBy;
- }
-
- // Row selection column (checkboxes column) is enabled?
- if (this.opt.rowSelection) {
- var columnsToHide = settings.aoColumnDefs[0].aTargets;
-
- // Shift the index of the columns to hide
- for ( i in columnsToHide ) {
- columnsToHide[i] += 1;
- }
-
- // Shift the index of the columns to order
- for ( i in settings.aaSorting ) {
- settings.aaSorting[i][0] += 1;
- }
-
- // Disable the ordering on the column 0 (checkboxes column)
- settings.aoColumnDefs.push( { "bSortable": false, "aTargets": [ 0 ] } );
- }
-
- // pagination
- if ( !this.opt.paginate ) {
- settings.bScrollInfinite = true;
- settings.bScrollCollapse = true;
-
- } else {
- settings.sPaginationType = "full_numbers";
- settings.iDisplayLength = this.opt.pageLength;
- settings.oLanguage = {
- "oPaginate": {
- "sPrevious": "<",
- "sNext": ">",
- "sFirst": "|",
- "sLast": "|"
- }
- };
- }
- settings.bProcessing = true;
- settings.bLengthChange = false;
- settings.sScrollX = this.opt.height;
- settings.sScrollY = "100%";
- },
-
- /*
- * Function: Biojs.Table._initSettingsForLocalData
- * Purpose: initialize the settings for DataTables plugin in case of using local data
- * Returns: -
- * Inputs: settings -> {Object} where the configuration settings will be added.
- */
- _initSettingsForLocalData: function( settings ) {
- Biojs.console.log("Using local data");
- this._setData(this.opt.dataSet, settings);;
- // Don't use data source provided by a server
- settings.bServerSide = false;
- // Set URL of the data source
- settings.sAjaxSource = null;
- // Set the function which manages the Ajax requests
- settings.fnServerData = null;
- // Enable filtering
- settings.bFilter = true;
- },
-
- /*
- * Function: Biojs.Table._initSettingsForRemoteData
- * Purpose: initialize the settings for DataTables plugin in case of using remote data
- * Returns: -
- * Inputs: settings -> {Object} where the configuration settings will be added.
- */
- _initSettingsForRemoteData: function(settings) {
-
- Biojs.console.log("Using data from remote URL: "+ this.opt.dataSet.url);
-
- // Use data source provided by a server
- settings.bServerSide = true;
- // Set URL of the data source
- settings.sAjaxSource = this.opt.dataSet.url;
- // Set the function which manages the Ajax requests
- settings.fnServerData = this._fetchData;
- // Enable/disable filtering depending on the support by the server
- settings.bFilter = this.opt.dataSet.filter;
- },
-
- /*
- * Function: _fetchData
- * Purpose: do the Ajax request to get the data from server. Note that 'this' will not refered to the Biojs.Table instance
- * due to this function will be linked to the internal DataTables object.
- * Returns: -
- * Inputs:
- * sSource -> {string} HTTP source to obtain the data from (defined in option dataSet.url).
- * aoData -> {Object[]} a key/value pair object containing the data to send to the server.
- * fnCallback -> {function} to be called on completion of the data get process that will draw the data on the page.
- * oSettings -> {object} DataTables settings object.
- */
- _fetchData: function ( sSource, aoData, fnCallback, oSettings ) {
-
- var httpRequest = { url: sSource };
- var params = aoData;
-
- // Get the Biojs Table instance
- var biojsId = oSettings.sTableId.substr( "biojs_Table_".length );
- var instance = Biojs.getInstance(biojsId);
-
- // Rename param names using those defined in the options instance.opt.dataSet.mapParams
- instance._mapUrlParams(aoData);
-
- // Set callback function on success
- //httpRequest.success = fnCallback;
-
- // Data type expected
- httpRequest.dataType = 'json';
-
- // Using proxy?
- // Redirect using the proxy and encode all params as url data
- if ( instance.getProxy() != undefined ) {
-
- // Redirect to proxy url
- httpRequest.url = instance.getProxy();
-
- // Encode both url and parameters under the param url
- params = [{ name: "url", value: sSource + '?' + jQuery.param(aoData) }];
-
- // Data type
- httpRequest.dataType = instance.getProxyDataType();
-
- }
-
- // Wrap the callback function
- httpRequest.success =
- /**
- * @ignore
- **/
- function ( data ) {
-
- // Decode data
- jsonData = instance._decodeToJSON( data );
-
- // Set the echo var
- jsonData.sEcho = this.sEcho;
-
- // Add the column of checkboxes in case of using row selection
- instance._setSelectionColumn( jsonData );
-
- // Call the datatables cb function
- fnCallback( jsonData );
-
- // fire event
- instance.raiseEvent( Biojs.Table.EVT_ON_DATA_ARRIVED, {
- "jsonData": jsonData
- });
- }
-
- httpRequest.type = 'GET';
- httpRequest.data = params;
- httpRequest.sEcho = aoData[0].value;
-
- jQuery.ajax( httpRequest );
- },
-
- getProxy: function() {
- return this.opt.dataSet.proxyUrl;
- },
-
- getProxyDataType: function() {
- return this.opt.dataSet.dataType | "text";
- },
-
- /**
- * Returns the total records in the dataset.
- *
- * @example
- * alert("Total records:" + myTable.getTotalRecords());
- *
- */
- getTotalRecords: function() {
- return this.opt.dataSet.totalRecords;
- },
-
- _setSelectionColumn: function( jsonData ) {
- if ( this.opt.rowSelection && jsonData.aaData instanceof Array ) {
- for ( i = 0; i < jsonData.aaData.length; i++ ){
- jsonData.aaData[i].unshift(' ');
- }
- }
- },
-
- /*
- * Function: Biojs.Table._decodeToJSON
- * Purpose: Decode the received data to suit it into the expected JSON format.
- * Override this method in the Biojs.Table's children to suit any raw data into the expected JSON format.
- * Returns: {Object} formatted in the expected JSON format.
- * Inputs: data -> {*} raw data received from the server.
- */
- _decodeToJSON: function ( data ) {
- var jsonData = data;
-
- if ( Biojs.Utils.isEmpty(data) ) {
- Biojs.console.log("Empty data was received");
-
- } else if ( !(jsonData instanceof Object) || !(jsonData.aaData instanceof Array) ) {
- jsonData = {};
- jsonData.aaData = [];
- jsonData.iTotalRecords = 0;
- jsonData.iTotalDisplayRecords = 0;
- Biojs.console.log("Error: data with unknown format was detected.");
- }
-
- Biojs.console.log(jsonData);
- return jsonData;
- },
-
- /*
- * Function: Biojs.Table._mapUrlParams
- * Purpose: Rename the param names with the customized names declared in the option dataSet.paramsMap
- * Returns: -
- * Inputs: {Object[]} a key/value pair object containing the data to send to the server.
- */
- _mapUrlParams: function ( params ) {
- var map = this.opt.dataSet.paramsMap;
- for ( key in map ) {
- for ( i = 0; i < params.length; i++) {
- // rename the parameter name
- if ( params[i].name == key ) {
- Biojs.console.log("Renaming param <" + key + "> with <" + map[key] + ">" );
- params[i].name = map[key];
- }
- }
- }
- },
-
- /*
- * Function: Biojs.Table._setColumnSelector
- * Purpose: Build the drop down box to hide/show columns by means of the user selection.
- * Returns: -
- * Inputs: oSettings -> {Object} DataTables settings object.
- */
- _setColumnSelector: function( settings ){
-
- var self = this;
- var columns = settings.aoColumns;
- var select = jQuery(' ');
-
- for ( i = this._columnsOffset ; i< columns.length; i++) {
- select.append('' + columns[i].sTitle + ' ');
- }
-
- // Take selector out of the DOM
- jQuery(self._tableSelector+'_wrapper > ' + self._tableId + '_columns').remove();
-
- // Add selector to the DOM
- select.prependTo(self._tableSelector+'_wrapper');
-
- // Uses the MultiSelect plugin as column selector
- self._columnSelector = select.multiselect({
- header: false,
- click: function(event, ui) {
- self._table.fnSetColumnVis(ui.value, ui.checked);
- }
- });
-
- // Changes the icon for the column selector
- jQuery(self._tableSelector+'_wrapper > button')
- .html(' ')
- .css("width","auto")
- .addClass('dataTables_settings')
- .attr("title", "Show/hide columns");
-
- // Set the current selection status
- self._columnSelector.multiselect('uncheckAll');
-
- var visibleCols = settings.aiDisplayMaster;
- var checkbox = jQuery('input[name="multiselect_' + this._tableId + '_columns"]');
-
- for ( i = 0 ; i < checkbox.length ; i++ ) {
- jQuery( checkbox[i] ).attr("checked", settings.aoColumns[ i + this._columnsOffset ].bVisible );
- }
- },
-
-
- /**
- * Add a single new row or multiple rows of data to the table.
- * @param {array} data 1D array of data - add a single row with the data provided
- *
- * @example
- * myTable.addDataRow([ 1, "col", "Colombia", 46420000, "March 12, 2012", "0.0066" ]);
- *
- */
- addDataRow: function(row) {
- if (this.opt.rowSelection) {
- row.unshift(' ');
- }
- this._table.fnAddData(row);
- },
-
- /**
- * Add a single new row or multiple rows of data to the table.
- * @param {array} data 1D array of data - add a single row with the data provided
- *
- * @example
- * myTable.removeDataRow(2);
- *
- */
- removeDataRow: function(i){
- this._table.fnDeleteRow(i)
- },
-
- /*
- * Function: Biojs.Table._setColumns
- * Purpose: Map the columns values defined in the option 'columns' to the columns values for DataTables plugin
- * Returns: -
- * Inputs:
- * columns -> {(string|Object)[]} columns in the format defined in the option 'columns'.
- * oSettings -> {Object} DataTables settings object.
- */
- _setColumns: function ( columns, oSettings ) {
- var self = this;
- var result = [];
-
- // Add a column of checkbox for selection
- if (this.opt.rowSelection) {
- columns.splice(0, 0, { "name": ' ' } );
- }
-
- for ( j in columns ) {
- if ( typeof columns[j] == "string" ) {
- result[j] = { "sTitle": columns[j] };
- } else {
- result[j] = { "sTitle": columns[j].name };
- if ( columns[j].render && typeof columns[j].render == "function") {
- result[j].fnRender = function ( o, value ) {
- return columns[o.iDataColumn].render(o.iDataColumn, o.aData, value);
- }
- }
- if ( columns[j].width && typeof columns[j].width == "string") {
- result[j].sWidth = columns[j].width;
- }
- }
- }
- oSettings.aoColumns = result;
- },
-
- /*
- * Function: Biojs.Table._setData
- * Purpose: Set the data in case of using local data to initialize the Biojs.Table instance.
- * Returns: -
- * Inputs:
- * data -> {string[][]} data to be displayed.
- * oSettings -> {Object} DataTables settings object.
- */
- _setData: function ( data, oSettings ) {
-
- // Check if row selection is currently activated.
- if (this.opt.rowSelection) {
- // Adds a column for a checkbox for each row
- for ( r in data ) {
- data[r].splice(0, 0, ' ');
- }
- }
- // Set the data in DataTables object.
- oSettings.aaData = data;
- },
-
- _showEmptyMessage: function(){
- this._body.html("Empty");
- },
-
- /*
- * Function: Biojs.Table._addEvents
- * Purpose: initialize the event triggers for the clicks on the Biojs.Table
- * Returns: -
- * Inputs: -
- */
- _addEvents: function(){
- var self = this;
-
- // Cell clicked
- jQuery(this._tableSelector)
- .click( function (eventData) {
- var cell = eventData.target;
-
- while (cell.tagName != "TD" ) {
- cell = cell.parentNode;
- }
-
- var column = new Number(cell.cellIndex);
- var row = new Number(cell.parentNode.rowIndex-1);
-
- if ( self.opt.rowSelection && column == 0 ) {
- if( cell.children[0].checked ) {
- jQuery(cell).parent().addClass('selected');
- self.raiseEvent( Biojs.Table.EVT_ON_ROW_SELECTED , {
- rowIndex: row,
- row: jQuery(cell).parent()
- });
- } else {
- jQuery(cell).parent().removeClass('selected');
- }
- } else {
- self.raiseEvent( Biojs.Table.EVT_ON_CELL_CLICKED, {
- "cell": cell,
- "rowIndex": row,
- "colIndex": column
- });
- }
- Biojs.console.log(eventData);
- });
-
- // Header clicked
- jQuery(self._tableSelector+'_wrapper table.dataTable thead tr th')
- .click( function (eventData) {
- var cell = eventData.currentTarget;
- var column = cell.cellIndex;
-
- if ( self.opt.rowSelection && column == 0 ) {
- if( cell.children[0].checked ) {
- jQuery(self._tableSelector + ' tr').addClass('selected');
- jQuery(self._tableSelector + ' tr td input').attr('checked',true);
- } else {
- jQuery(self._tableSelector + ' tr').removeClass('selected');
- jQuery(self._tableSelector + ' tr td input').attr('checked',false);
- }
- } else {
- self.raiseEvent( Biojs.Table.EVT_ON_HEADER_CLICKED, {
- "colName": cell.innerHTML,
- "colIndex": column
- });
- }
-
- Biojs.console.log(eventData);
- });
- }
-
-
-
- //TODO: Render functions to format used data types: date, number, ...
-
-},
-/** @static */
-/** @lends Biojs.Table */
-{
- // Indexes to access the event name in this.eventTypes array
- EVT_ON_CELL_CLICKED: "onCellClicked",
- EVT_ON_ROW_SELECTED: "onRowSelected",
- EVT_ON_HEADER_CLICKED: "onHeaderClicked",
- EVT_ON_DATA_ARRIVED: "onDataArrived"
-}
-
-
-);
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Tooltip.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Tooltip.js
deleted file mode 100755
index 194d3469b4..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Tooltip.js
+++ /dev/null
@@ -1,535 +0,0 @@
-/**
- * Tooltip for general purpose.
- *
- * @class
- * @extends Biojs
- *
- * @author John Gomez
- * @version 1.0.0
- * @category 1
- *
- * @requires Tooltip CSS
- * @dependency
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @param {Object} options
- * An object with the options for Article component.
- *
- * @param {string} targetSelector
- * A selector string to match the elements in the document. For more
- * information on it, see jQuery selectors .
- *
- *
- * // Select all the links
- * targetSelector: "a"
- *
- * // Select the element with the id 'target'
- * targetSelector: "#target"
- *
- * // Select all elements whose belong to the class 'here'
- * targetSelector: ".here"
- *
- * // Select all list elements whose belong to the class 'here'
- * targetSelector: "li.here"
- *
- *
- * @param {function} [cbRender]
- * By default, BiojsTooltip uses the 'title' attribute to render the content.
- * Set this option to customize the content rendering instead of using the default value.
- *
- *
- * cbRender: function( element ) {
- * return "This is my personalized content for element " + element.tagName;
- * }
- *
- *
- * @param {static} [arrowType=Biojs.Tooltip.ARROW_LEFT_TOP]
- * Automatic positioning of the tooltip depends on the arrow direction.
- * Possible arrow types are:
- *
- * Biojs.Tooltip.ARROW_LEFT_TOP
- * Biojs.Tooltip.ARROW_LEFT_MIDDLE
- * Biojs.Tooltip.ARROW_LEFT_BOTTOM
- * Biojs.Tooltip.ARROW_TOP_LEFT
- * Biojs.Tooltip.ARROW_TOP_MIDDLE
- * Biojs.Tooltip.ARROW_TOP_RIGHT
- * Biojs.Tooltip.ARROW_RIGHT_TOP
- * Biojs.Tooltip.ARROW_RIGHT_MIDDLE
- * Biojs.Tooltip.ARROW_RIGHT_BOTTOM
- * Biojs.Tooltip.ARROW_BOTTOM_LEFT
- * Biojs.Tooltip.ARROW_BOTTOM_MIDDLE
- * Biojs.Tooltip.ARROW_BOTTOM_RIGHT
- *
- *
- * @param {static} [position=Biojs.Tooltip.ELEMENT_POSITION]
- * Position is calculated through either mouse position or element position.
- * Allowed values are: Biojs.Tooltip.ELEMENT_POSITION or Biojs.Tooltip.MOUSE_POSITION
- *
- * @param {int} [delay=200]
- * Time interval in milliseconds starting on mouse exiting from element/Tooltip until the Tooltip hides itself.
- *
- * @example
- * // These examples use the component's example div 'YourOwnDivId' to draw the links only.
- * jQuery('#YourOwnDivId')
- * .append('Pass the mouse over here. ')
- * .css({
- * 'display': 'table-cell',
- * 'vertical-align': 'middle',
- * 'text-align': 'center',
- * 'width': '730px',
- * 'height': '400px'
- * });
- *
- * // Tooltip will come out whenever mouse enter to any anchor 'a' with class 'example'
- * var simpleTip = new Biojs.Tooltip({
- * targetSelector: "a.example"
- * });
- *
- * //
- * // Another example using rendering function instead of 'title' attribute
- * //
- * jQuery('#YourOwnDivId')
- * .append(' This example change the tooltip direction for each mouse entry. ');
- *
- * // Tooltip will come out whenever mouse enter to any anchor 'a' with class 'example'
- * var tipRendered = new Biojs.Tooltip({
- * targetSelector: "a.example.render",
- * cbRender: function( element ) {
- * return "Tooltip type Biojs.Tooltip.ARROW_" + this.getArrowType().toUpperCase() + " using rendering function to build up content dynamically"
- * }
- * });
- *
- * // Changes the tooltip's direction
- * var counter = 0;
- * var arrowTypes = [
- * Biojs.Tooltip.ARROW_LEFT_TOP,
- * Biojs.Tooltip.ARROW_LEFT_MIDDLE,
- * Biojs.Tooltip.ARROW_LEFT_BOTTOM,
- * Biojs.Tooltip.ARROW_TOP_LEFT,
- * Biojs.Tooltip.ARROW_TOP_MIDDLE,
- * Biojs.Tooltip.ARROW_TOP_RIGHT,
- * Biojs.Tooltip.ARROW_RIGHT_TOP,
- * Biojs.Tooltip.ARROW_RIGHT_MIDDLE,
- * Biojs.Tooltip.ARROW_RIGHT_BOTTOM,
- * Biojs.Tooltip.ARROW_BOTTOM_LEFT,
- * Biojs.Tooltip.ARROW_BOTTOM_MIDDLE,
- * Biojs.Tooltip.ARROW_BOTTOM_RIGHT
- * ];
- *
- * // Changes the Tooltip arrow type dynamically
- * jQuery('#YourOwnDivId a.example.render').mouseover( function() {
- * var arrowType = arrowTypes[ counter++ % 12 ];
- * tipRendered.setArrowType( arrowType );
- * });
- *
- * //
- * // Another example using rich content
- * //
- * jQuery('#YourOwnDivId')
- * .append(' Rich content ');
- *
- * var richContent =
- * ''+
- * '
Santiago de Cali ' +
- * '
'+
- * '
'+
- * 'Simply referred to as Cali, is a city located in western Colombia '+
- * 'It is the capital of the Valle del Cauca Department. With a population of 2.5 million, '+
- * 'Cali is the third largest city in the country, after Bogota and Medellin. The city '+
- * 'was founded on 25 July 1536.
';
- *
- * var tipRich = new Biojs.Tooltip({
- * targetSelector: "a.example.rich",
- * cbRender: function( element ) {
- * return richContent;
- * },
- * arrowType: Biojs.Tooltip.ARROW_BOTTOM_MIDDLE
- * });
- *
- * //
- * // Last example using mouse position instead of element's
- * //
- * jQuery('#YourOwnDivId')
- * .append(' Tooltip changes with mouse positioning. ');
- *
- * var tipPosition = new Biojs.Tooltip({
- * targetSelector: "a.example.position",
- * position: Biojs.Tooltip.MOUSE_POSITION
- * });
- *
- **/
-Biojs.Tooltip = Biojs.extend (
-/** @lends Biojs.Tooltip# */
-{
- constructor: function (options) {
-
- var self = this;
- var arrowType = this.opt.arrowType;
-
- this._container = jQuery('
').addClass("Tooltip");
-
- this._arrow = jQuery('
').appendTo( self._container );
- this._body = jQuery('
').appendTo( self._container );
-
- this._container.appendTo('body');
-
- this._initialize();
- },
-
- /**
- * Default values for the options
- * @name Biojs.Tooltip-opt
- */
- opt: {
- targetSelector: "a",
- cbRender: undefined,
- arrowType: "left_top",
- position: 2, // ELEMENT_POSITION
- delay: 200
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Tooltip-eventTypes
- */
- eventTypes: [
- /**
- * @name Biojs.Tooltip#onShowUp
- * @event
- * @param {function} actionPerformed A function which receives an {@link Biojs.Event} object as argument.
- * @eventData {Object} source The component which did triggered the event.
- * @eventData {string} type The name of the event.
- * @eventData {string} target Target element.
- *
- * @example
- * simpleTip.onShowUp(
- * function( e ) {
- * alert("Mouse has passed over the first example.");
- * }
- * );
- *
- */
- "onShowUp"
- ],
-
- _initialize: function( ) {
-
- var self = this;
- var timer = 0;
- var targetSelector = this.opt.targetSelector;
- var cbRender = this.opt.cbRender;
- var refPos = this.opt.position;
- var target;
-
- // Get the text from the title attribute by default
- if ( "function" != typeof cbRender ) {
- cbRender = function( element ) {
- return jQuery( element ).attr('title');
- }
- }
-
- // Add the class to the arrow
- //arrow.addClass( self.opt.arrowType.match(/^(left|top|right|bottom)/g)[0] );
- this.setArrowType( this.opt.arrowType );
-
- // Positioning
- this._arrow.css({
- "position": "absolute",
- "z-index": "99999"
- });
-
- this._body.css({
- 'position': 'absolute',
- 'z-index': '99998',
- 'margin': '0px'
- });
-
- if ( refPos == Biojs.Tooltip.MOUSE_POSITION ) {
- jQuery( targetSelector ).mousemove( function (e) {
-
- target = jQuery(e.target);
-
- if (timer) {
- clearTimeout(timer);
- }
- timer = 0;
-
- // Set the content
- content = cbRender.call( self, e.target );
-
- self._body.html( content );
-
- // Show up
- self._show();
-
- // Positioning
- self._setPosition(
- { left: e.pageX - 10, top: e.pageY - 10 },
- { width: 20, height: 20 }
- );
-
- // Event triggering
- self.raiseEvent( Biojs.Tooltip.EVT_ON_SHOW_UP, { 'target': target });
-
- }).mouseout( function() {
- timer = setTimeout( 'Biojs.getInstance(' + self.getId() + ')._hide()' , self.opt.delay );
- });
-
- } else {
- jQuery( targetSelector ).mouseover( function (e) {
-
- target = jQuery(e.target);
-
- if (timer) {
- clearTimeout(timer);
- }
- timer = 0;
-
- // Set the content
- content = cbRender.call( self, e.target );
-
- self._body.html( content );
-
- // Show up
- self._show();
-
- // Positioning
- self._setPosition(
- target.offset(),
- { width: target.width(), height: target.height() }
- );
-
- // Event triggering
- self.raiseEvent( Biojs.Tooltip.EVT_ON_SHOW_UP, { 'target': target });
-
- }).mouseout( function() {
- timer = setTimeout( 'Biojs.getInstance(' + self.getId() + ')._hide()' , self.opt.delay );
- });
- }
-
- self._container.mouseover( function(){
- clearTimeout(timer);
- timer = 0;
- self._show();
-
- }).mouseout( function() {
- timer = setTimeout( 'Biojs.getInstance(' + self.getId() + ')._hide()' , self.opt.delay );
- });
-
- this._hide();
- },
-
- _hide: function() {
- this._container.hide();
- },
-
- _show: function() {
- this._container.show();
- },
-
- _setPosition: function ( offset, dim ) {
-
- var arrow = this._arrow;
- var arrowType = this.opt.arrowType;
- var arrowPos = { top: offset.top, left: offset.left };
-
- var body = this._body;
- var bodyPos = {};
-
- arrow.removeClass();
- arrow.addClass( 'arrow ' + arrowType.match(/^(left|top|right|bottom)/g)[0] );
-
- if ( arrowType == Biojs.Tooltip.ARROW_LEFT_TOP ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left += arrow.width() + dim.width ;
-
- bodyPos.left = arrowPos.left + arrow.width() - 1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()/4);
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_LEFT_MIDDLE ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left += arrow.width() + dim.width ;
-
- bodyPos.left = arrowPos.left + arrow.width() - 1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()/2);
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_LEFT_BOTTOM ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left += arrow.width() + dim.width ;
-
- bodyPos.left = arrowPos.left + arrow.width() - 1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()*(3/4));
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_TOP_LEFT ) {
-
- arrowPos.top += dim.height;
- arrowPos.left += Math.floor(dim.width/2) - Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.height()/2) - Math.floor(body.width()/4);
- bodyPos.top = arrowPos.top + arrow.height() -1;
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_TOP_MIDDLE ) {
-
- arrowPos.top += dim.height;
- arrowPos.left += Math.floor(dim.width/2) - Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.height()/2) - Math.floor(body.width()/2);
- bodyPos.top = arrowPos.top + arrow.height() -1;
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_TOP_RIGHT ) {
-
- arrowPos.top += dim.height;
- arrowPos.left += Math.floor(dim.width/2) - Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.height()/2) - Math.floor( body.width()*(3/4) );
- bodyPos.top = arrowPos.top + arrow.height() -1;
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_RIGHT_TOP ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left -= arrow.width();
-
- bodyPos.left = arrowPos.left - body.outerWidth() +1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()/4);
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_RIGHT_MIDDLE ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left -= arrow.width();
-
- bodyPos.left = arrowPos.left - body.outerWidth() +1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()/2);
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_RIGHT_BOTTOM ) {
-
- arrowPos.top += Math.floor(dim.height/2) - Math.floor(arrow.height()/2);
- arrowPos.left -= arrow.width();
-
- bodyPos.left = arrowPos.left - body.outerWidth() +1;
- bodyPos.top = arrowPos.top + Math.floor(arrow.height()/2) - Math.floor(body.height()*(3/4));
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_BOTTOM_LEFT ) {
-
- arrowPos.top -= arrow.height();
- arrowPos.left += Math.floor(dim.width/2) + Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.width()/2) - Math.floor(body.width()/4);
- bodyPos.top = arrowPos.top - body.outerHeight() +1;
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_BOTTOM_MIDDLE ) {
-
- arrowPos.top -= arrow.height();
- arrowPos.left += Math.floor(dim.width/2) - Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.width()/2) - Math.floor(body.width()/2);
- bodyPos.top = arrowPos.top - body.outerHeight() +1;
-
- } else if ( arrowType == Biojs.Tooltip.ARROW_BOTTOM_RIGHT ) {
-
- arrowPos.top -= arrow.height();
- arrowPos.left += Math.floor(dim.width/2) - Math.floor(arrow.width()/2);
-
- bodyPos.left = arrowPos.left + Math.floor(arrow.width()/2) - Math.floor(body.width()*(3/4));
- bodyPos.top = arrowPos.top - body.outerHeight() +1;
- }
-
- this._arrow.css( arrowPos );
- this._body.css( bodyPos );
- },
-
- /**
- * Changes the Tooltip direction. The point of reference is the arrow's type.
- * Choose one of the following available types:
- *
- * Biojs.Tooltip.ARROW_LEFT_TOP
- * Biojs.Tooltip.ARROW_LEFT_MIDDLE
- * Biojs.Tooltip.ARROW_LEFT_BOTTOM
- * Biojs.Tooltip.ARROW_TOP_LEFT
- * Biojs.Tooltip.ARROW_TOP_MIDDLE
- * Biojs.Tooltip.ARROW_TOP_RIGHT
- * Biojs.Tooltip.ARROW_RIGHT_TOP
- * Biojs.Tooltip.ARROW_RIGHT_MIDDLE
- * Biojs.Tooltip.ARROW_RIGHT_BOTTOM
- * Biojs.Tooltip.ARROW_BOTTOM_LEFT
- * Biojs.Tooltip.ARROW_BOTTOM_MIDDLE
- * Biojs.Tooltip.ARROW_BOTTOM_RIGHT
- *
- *
- * @param {static} arrowType Static Biojs.Tooltip.ARROW_[TYPE] value.
- *
- * @example
- * simpleTip.setArrowType(Biojs.Tooltip.ARROW_BOTTOM_RIGHT);
- *
- */
- setArrowType: function( arrowType ) {
-
- var newClass = arrowType.match(/^(left|top|right|bottom)/g)[0];
-
- if ( newClass !== undefined ) {
- this.opt.arrowType = arrowType;
- }
- },
- /**
- * Returns the actual arrow type.
- * @returns {static} Static Biojs.Tooltip.ARROW_[TYPE] value.
- *
- * @example
- * alert ( "First example is using " + simpleTip.getArrowType() + " arrow." );
- *
- */
- getArrowType: function( arrowType ) {
- return this.opt.arrowType;
- },
-
- /**
- * Returns the actual id attribute value.
- * @returns {string} DOM element identifier of this component.
- *
- * @example
- * alert ( "Identifier of the second example is " + tipRendered.getIdentifier() + "." );
- *
- */
- getIdentifier: function( ) {
- return this._container.attr('id');
- },
-
- /**
- * Sets the id attribute value.
- * @param {string} DOM element identifier for this component.
- *
- * @example
- * tipRendered.setIdentifier("MyIdentifier");
- *
- */
- setIdentifier: function( value ) {
- return this._container.attr( 'id', value );
- }
-
-
-},{
- // Arrows height: 12px width: 7px;
- ARROW_LEFT_TOP: "left_top",
- ARROW_LEFT_MIDDLE: "left_middle",
- ARROW_LEFT_BOTTOM: "left_bottom",
- ARROW_TOP_LEFT: "top_left",
- ARROW_TOP_MIDDLE: "top_middle",
- ARROW_TOP_RIGHT: "top_right",
- ARROW_RIGHT_TOP: "right_top",
- ARROW_RIGHT_MIDDLE: "right_middle",
- ARROW_RIGHT_BOTTOM: "right_bottom",
- ARROW_BOTTOM_LEFT: "bottom_left",
- ARROW_BOTTOM_MIDDLE: "bottom_middle",
- ARROW_BOTTOM_RIGHT: "bottom_right",
-
- // Events
- EVT_ON_SHOW_UP: "onShowUp",
-
- MOUSE_POSITION: 1,
- ELEMENT_POSITION: 2
-
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.Tree.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.Tree.js
deleted file mode 100755
index fbe64772ad..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.Tree.js
+++ /dev/null
@@ -1,3113 +0,0 @@
-/**
- * Tree component
- *
- * @class
- * @extends Biojs
- *
- * @author Fabian Schreiber
- * @version 1.0.0
- * @category 3
- *
- * @requires jQuery Core 1.9.2
- * @dependency
- *
- * @requires jQuery Tipsy
- * @dependency
- *
- * @requires D3
- * @dependency
- * @requires Additional tree functions
- * @dependency
-
- * @requires BioJS Tree css
- * @dependency
-
- * @requires jQuery Tipsy
- * @dependency
- *
- *
- * @param {Object} options An object with the options for Tree component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- *
- * @option {file} tree
- * JSON that contains the tree information.
- *
- * [
- * //
- * { name: <name>,
- * display_label: <display_label>,
- * duplication: <duplication>,
- * branch_length: <endVal1>,
- * common_name: <common_name>,
- * seq_length: <seq_length>,
- * type: <type>,
- * uniprot_name: <uniprot_name>,
- *
- * children: []},
- * //
- * // Any others nodes
- * ...,
- * //
- * ]
- *
- *
- * tree : [
- * {"name":"Amniota_1","branch_length":"0.2212","binary_alignment":"N/A","children": [..]
- * ,"common_name":"Chicken","seq_length":3397,"swissprot_gene_name":"N/A","display_label":"BRCA2"}
- * ]
- *
- *
- * @option {file} domains_file
- * Set of annotations for the leaves of the tree. Must be an array of objects following the syntax:
- *
- * [
- * // An annotation:
- * { name: <name>,
- * species_name: <message>,
- * alignment_length: <message>,
- * seq_length: <message>,
- * cigar_string: <color_code>,
- * domains: [{ name: name; domain_start: <startVal1>, domain_end: <endVal1> id: <HTMLColor> name : name}, ...,{ start: <startValN>, end: <endValN>, color: <HTMLColor>}]
- * },
- *
- * // ...
- * // more annotations here
- * // ...
- * ]
- *
- *
- * tree : [
- * {
- * "cigar_string" : "4D22MD23M3D10MD13M2D44M2D23M3D7MD13M11D16MD57M5D27MD26M2D3M9D8MD9M2D3MD12MD11M2D10M3D3MD2MDMD9MD19M4D2MD17MD10MD24M5D7MD3MD24MD19MD10M3D6M10D26M6D5M2D17M12D11M2D10M2D52M2D7M2D12MD7M5D22M2D4M2D10M3D46MD20MD6M4D4M2D3M3DM2D11M4D4MDM2D4MDMD3MD5M4D5MD9M5D5M2DM7D18M3D5MD2MD6MD21MD5MDM2D6MDMD2MD23MD9M5D19M7D3M2D19MD2MD7M7D14M5D13MD9MD7M3D45MD7M2D4M3D7M8D3M13D2M12D3M5D4MD35MD44M3D2M2D18M15D17MD18M8D4M8DMD21MD36MD17MD2MD25M2D19MD6MD2MD3MD12M6D12MD21M4D11MD17MD18M2D79MD55M2D18M2D30M4D5MD5MD8MD11MD23MD42M8D26M4DMD25MD6M5D7M2D6M2D3MD15M6DMD14MD32M10D3MD6M5D43M3D13MD21MD6MD6M3D3MD8MD10M7D11M4D23M10D44MD12M5D4MDM3D19M13D34MD4MD15MD2MD6MD53M4D2MD10MD38MD13MD25MD104M3D62M2D15M5D5M6D37M2D6MDMD234MD3MD162MD11M2D30M2D45MD20MD2MD100M13D25M4D20M4D78M8D62MD38MD2MD8MD3MD4MD5MD41MD3MD4M16D11M2DM3D38M2D",
- * "species_name" : "Ailuropoda_melanoleuca",
- * "alignment_length" : 4010,
- * "domains" : [ ..]
- * "seq_length" : 3460,
- * "name" : "ENSAMEP00000009909"}
- * ]
- *
- *
- * where:
- *
- * name is the unique name corresponding to an id in the tree
- * species_name the species the annotation belong to.
- * alignment_length the length of the alignment sequence
- * seq_length the length of the sequence
- * domains array of objects defining the intervals which belongs to the annotation.
- * domains[i].domain_start domain's start position
- * domains[i].domain_end domain's stop position.
- * domains[i].name name of the domain, e.g. BRCA-2_OB1 .
- * domains[i].id the domain's id in the source database. Here, e.g. PF09103.5
- * domains[i].evalue the domains evalue
- *
- *
- * @option {string} image_path
- * Path to directory which contains species images.
- *
- * @option {string} [annotation_option="seqDomains"]
- * The display format for the annotations.
- *
- * @option {boolean} [two_windows]
- * specifies whether the tree and the annotations should be printed into the same div/svg or separate
- *
- * @option {string} [highlight_gene]
- * Gene identifier to be highlighted.
- *
- *
- * @example
- * var alignment_file = "../biojs/data/tree/just_sequences.json";
- * var domain_file = "../biojs/data/tree/just_domains.TF105041.json";
- * var model_json_tree = "../biojs/data/tree/TF105041_model.json";
- *
- * var image_path = "../biojs/data/tree/images/species_files/";
- * //var highlight_gene = "ENSBTAP00000001311";
- * var highlight_gene = "";
- * //var newick_tree = "../data/trees/newick_tree.nh";
- * var newick_tree = "";
- * var load_from_variable = 0;
- * var json_tree_string;
- *
- * myTree = new Biojs.Tree({
- * target : "YourOwnDivId",
- * formatOptions : {
- * tree:'json'
- * },
- * // tree parameters
- * json_tree : model_json_tree,
- * alignment_file : alignment_file,
- * show_real_branchlength : "false",
- * annotation_option : "seq_domains",
- * domains_file : domain_file,
- * two_window : true,
- * image_path : image_path,
- * highlight_gene : highlight_gene,
- * json_tree_string : json_tree_string,
- * load_from_variable : load_from_variable,
- * });
- *
- */
-
-Biojs.Tree = Biojs.extend(
-/** @lends Biojs.Tree# */
-{
- constructor: function (options) {
- //Biojs.console.enable();
- var self = this;
-
- this._container = jQuery( "#" + this.opt.target );
- //this._contentcontainer = jQuery( "#" + this.opt.tv_contentcontainer );
-
- // Lazy initialization
- this._container.ready(function() {
- self._initialize();
- });
- },
-
- /**
- * Default values for the options
- * @name Biojs.Tree-opt
- */
- opt : {
-
- // new opts for tree
- //__show_alignments: false,
- //__show_domains: false,
- //show_species_tree: false,
- show_lost_taxa: false, // alignment, domains, seq_domains, speciestree || false
- tree_view: "", // reconciledView
- annotation_option: "annotation_grid", // alignment, domains, seq_domains, speciestree || false
- species_nodes: 190,
- alignment_length : "",
- domains_file : "",
- json_tree : "",
- species_tree : "",
- image_path : "",
- newick_tree : "",
- tree_data : "",
- tree_target : "",
- max_annot_div_width : "", // in case an alignment will be shown, the svg in the annotation panel needs to be a lot wider
- default_view : "ensembl",
- annot_target : "",
- no_genes : "",
- tree : "",
- highlight_gene : "",
- load_from_variable : undefined,
- load_from_web : undefined,
- json_tree_string : "",
- json_alignment_string : "",
- json_domain_string : "",
- root : "",
- show_real_branchlength: false,
- alignment_font_size:8,
- //domainScale : d3.scale.linear().domain([20,4000]).range([1, 250]),
-
- sequence : "",
- id : "",
- target : "",
- format : "FASTA",
- selection: { start: 0, end: 0 },
- columns: { size: 35, spacedEach: 10 },
- highlights : [],
- annotations: [],
- sequenceUrl: 'http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/sequence',
- modelTreeOn: "",
-
- // Styles
- duplication_circle_size : 15,
- circle_size : 3,
- sequence_rect_width : 12,
- leaf_group_x : 188,
- sequence_start_y : 300,
- link_type : "elbow",
- leaf_space : "300",
- i : 0,
- duration : 500,
- two_window: false,
- root: "",
- diagonal: "",
- fontSize: 10,
- tree_representation_type: "not-radial",
- max_seq_representation: 400,
-
-
- selectionColor : 'Yellow',
- selectionFontColor : 'black',
- highlightFontColor : 'red',
- highlightBackgroundColor : 'white',
- fontFamily: '"Andale mono", courier, monospace',
- fontSize: '12px',
- fontColor : 'inherit',
- backgroundColor : 'inherit',
- width: 400,
- availablewidth: 1500,
- height: undefined,
- formatSelectorVisible: true
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.Tree-eventTypes
- */
- eventTypes : [],
-
- // internal members
- _headerDiv : null,
- _contentDiv : null,
-
- // Methods
-
- _initialize: function () {
- var self = this;
-
- //this.__setModelOrganisms();
- // Read tree data
- //if(self.opt.tree_view == "reconciledView"){
- // have to set this to the species tree
- //this.opt.json_tree = this.opt.species_tree;
- // Biojs.console.enable("changed to species tree");
- //}
- // read tree
- // read also annotation
-// set padding for tree window
- this.padding = {
- "top": 0,
- "right": 10,
- "bottom": 0,
- "left": 10
- };
- if(self.opt.two_window){
- // this will be the main div
- this.opt.tree_target = "tree_panel";
- this.opt.annot_target = "annotation_panel"
- }
- //jQuery('
').appendTo("#"+this.opt.target);
- //jQuery('
').appendTo("#"+this.opt.target);
-
- jQuery('
').appendTo("#"+this.opt.target);
- jQuery('Loading tree data...
').appendTo("#"+this.opt.tree_target);
- jQuery('Loading annotation data...
').appendTo("#"+this.opt.annot_target);
- jQuery("#tree_spinner").hide();
- jQuery("#annotation_spinner").hide();
-
- // this is important!!!
- // because we are getting data via an asyncronous ajax call, the function will continue
- // we have to be aware the things are getting executed within the "success" function
- this.tree_data = this.__readTree({'load_from_variable': this.opt.load_from_variable,'tree_format' : this.opt.formatOptions.tree,
- 'tree_data': this.opt.json_tree,'tree_data_variable' : this.opt.json_tree_string,
- 'load_from_web' : this.opt.load_from_web});
-
- },
- /*
- * Setting the svg
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * this._setvisualSpace();
- *
- */
- _setVisualSpace: function ( args ) {
- var width = args.width;
- var height = args.height;
- var two_window = args.two_window;
- var annot_div_width = args.annot_div_width;
- var self = this;
- /*this.opt.vis = d3.select("#"+this.opt.target).append("svg:svg")
- .attr("width", width)
- .attr("height", height)
- //.attr("padding", "40px");
- //.attr("pointer-events", "all")
- //.append('svg:g');
-
- */
- var m = [40, 240, 40, 240],
- w = 1000 -m[0] -m[0],
- h = 1840 -m[0] -m[2],
- i = 0,
- root;
- var div_width, div_height,computed_div_width,div_width_half;
- if(two_window){
- div_width = d3.select("#"+self.opt.target).style("width");
-
- //div_width = jQuery("#wrapper").width;
- div_heigth = parseInt(d3.select("#"+self.opt.target).style("height"));
- div_width_half = div_width.replace("px","");
- div_width_half = parseInt(div_width_half /2);
- computed_div_width = div_width_half+"px";
- Biojs.console.enable("half width is "+div_width_half+" ("+div_width+"), "+computed_div_width+"");
- }
- else{
- div_width = d3.select("#"+this.opt.target).style("width");
- div_heigth = parseInt(d3.select("#"+this.opt.target).style("height"));
- }
-
- self.opt.div_width_half = div_width_half;
- Biojs.console.enable("heigth is "+div_heigth+" and width is "+div_width);
- //blaaaa
- self.opt.availablewidth = div_width;
-
- var w = window,
- d = document,
- e = d.documentElement,
- g = d.getElementsByTagName('body')[0],
- x = w.innerWidth || e.clientWidth || g.clientWidth,
- y = w.innerHeight|| e.clientHeight|| g.clientHeight;
- Biojs.console.enable("x: "+x+" y: "+y);
- Biojs.console.enable("setting height to "+(height * 2));
-
- if(self.opt.two_window){
- this.opt.tree_panel = d3.select("#"+this.opt.tree_target).append("svg:svg")
- .attr("class","svg_container")
- .attr("width", div_width_half)
- .attr("height", height)
- .style("overflow", "scroll")
- //.style("background-color","#EEEEEE")
- .append("svg:g")
- .attr("class","drawarea");
- //this.opt.tree_panel.append("svg:g").attr("class","axisarea");
- this.opt.tree_panel = this.opt.tree_panel
- //.append("div")
- .append("svg:g")
- .attr("class","treearea")
- .append("svg:g")
- .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
-
-
- this.opt.annot_panel = d3.select("#"+this.opt.annot_target).append("svg:svg");
- this.opt.annot_panel.append("svg:g").attr("class","axisarea");
-
- Biojs.console.enable("annotation svg with: "+annot_div_width);
- this.opt.annot_panel.attr("class","svg_container")
- .attr("width", annot_div_width)
- .attr("height", height + 200)
- .attr("id", "annotation_svg_container")
- .style("overflow", "auto")
- //.style("background-color","#EEEEEE")
- .append("svg:g")
- .attr("class","annot_area");
-
- this.opt.annot_panel = this.opt.annot_panel
- //.append("div")
- .append("svg:g")
- .attr("class","annotationarea")
- .style("padding", "20")
- .append("svg:g")
- .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
- }
- else{
- this.opt.vis = d3.select("#"+this.opt.target).append("svg:svg")
- .attr("class","svg_container")
- .attr("width", div_width)
- .attr("height", height)
- //.attr("viewBox", "30 0 300 800")
- //.style("overflow", "scroll")
- //.style("background-color","#EEEEEE")
- .append("svg:g")
- .attr("class","drawarea");
- // add textares
- this.opt.vis
- .append("svg:g")
- .attr("class","axisarea");
- this.opt.vis = this.opt.vis
- //.append("div")
- .append("svg:g")
- .attr("class","treearea")
- .append("svg:g")
- .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
- }
- // self.zoomObject = d3.behavior.zoom()
- // .scaleExtent([0.5, 2])
- // .on("zoom", zoom);
-
- // self.zoomObject = d3.behavior.zoom().scaleExtent([0.2, 8]).on("zoom", zoom);
-
- // d3.select("#"+this.opt.target+" svg").call(self.zoomObject);
-
- },
-
-_setTreeSpace: function ( args ) {
- var width = args.width;
- var height = args.height;
- var two_window = args.two_window;
- var annot_div_width = args.annot_div_width;
- var self = this;
- var m = [40, 240, 40, 240],
- w = 1000 -m[0] -m[0],
- h = 1840 -m[0] -m[2],
- i = 0,
- root;
- var div_width, div_height,computed_div_width,div_width_half;
- if(two_window){
- div_width = d3.select("#"+self.opt.target).style("width");
-
- //div_width = jQuery("#wrapper").width;
- div_heigth = parseInt(d3.select("#"+self.opt.target).style("height"));
- div_width_half = div_width.replace("px","");
- div_width_half = parseInt(div_width_half /2);
- computed_div_width = div_width_half+"px";
- Biojs.console.enable("half width is "+div_width_half+" ("+div_width+"), "+computed_div_width+"");
- }
- else{
- div_width = d3.select("#"+this.opt.target).style("width");
- div_heigth = parseInt(d3.select("#"+this.opt.target).style("height"));
- }
- self.opt.div_width_half = div_width_half;
- self.opt.availablewidth = div_width;
-
- var w = window,
- d = document,
- e = d.documentElement,
- g = d.getElementsByTagName('body')[0],
- x = w.innerWidth || e.clientWidth || g.clientWidth,
- y = w.innerHeight|| e.clientHeight|| g.clientHeight;
- Biojs.console.enable("x: "+x+" y: "+y);
- Biojs.console.enable("setting height to "+(height * 2));
-
- if(self.opt.two_window){
- this.opt.tree_panel = d3.select("#"+this.opt.tree_target).append("svg:svg")
- .attr("class","svg_container")
- .attr("width", div_width_half)
- .attr("height", height)
- .style("overflow", "scroll")
- //.style("background-color","#EEEEEE")
- .append("svg:g")
- .attr("class","drawarea");
- //this.opt.tree_panel.append("svg:g").attr("class","axisarea");
- this.opt.tree_panel = this.opt.tree_panel
- //.append("div")
- .append("svg:g")
- .attr("class","treearea")
- .append("svg:g")
- .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
-
- }
- else{
- this.opt.vis = d3.select("#"+this.opt.target).append("svg:svg")
- .attr("class","svg_container")
- .attr("width", div_width)
- .attr("height", height)
- //.attr("viewBox", "30 0 300 800")
- //.style("overflow", "scroll")
- //.style("background-color","#EEEEEE")
- .append("svg:g")
- .attr("class","drawarea");
- // add textares
- this.opt.vis
- .append("svg:g")
- .attr("class","axisarea");
- this.opt.vis = this.opt.vis
- //.append("div")
- .append("svg:g")
- .attr("class","treearea")
- .append("svg:g")
- .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
- }
-
- },
-
- __slideZoom: function(zoom_level){
-
- Biojs.console.enable("ready to zoom-slide:"+zoom_level);
- //self.zoomObject = d3.behavior.zoom().scaleExtent([0.2, 8]).on("zoom", zoom);
- //Biojs.console.enable(this.zoomObject);
- //Biojs.console.enable(this.zoomObject.scale);
- //this.zoomObject.translate([0,0]).scale(1);
- //var currentScale = d3.event.scale;
- //this.zoomObject.scale(currentScale);
-
-
- zoom_slider({scale: [zoom_level] });
- },
- _addZoom: function(args){
- //Biojs.console.enable("add zoom");
- var self = this;
- self.zoom_behavior =d3.behavior.zoom()
- .scaleExtent([0.5, 2])
- .on("zoom", zoom);
- if(self.opt.two_window){
- Biojs.console.enable("adding to annot");
- d3.select("#"+this.opt.annot_target+" svg").call(self.zoom_behavior);
- }
- else{
- Biojs.console.enable("not adding to annot");
- d3.select("#"+this.opt.target+" svg").call(self.zoom_behavior);
- }
- // self.zoomObject = d3.behavior.zoom().scaleExtent([0.2, 8]).on("zoom", zoom);
-
-
- },
-
- __removeZoom: function(args){
- //Biojs.console.enable("add zoom");
- //this.opt.vis.call(d3.behavior.zoom().on("zoom", this.__redraw({vis : this.opt.vis})))
- // .append('svg:g');
-
- self.zoom_behavior = d3.behavior.zoom()
- .scaleExtent([0.5, 2])
- .on("zoom", null);
- d3.select("#"+this.opt.target+" svg").call(self.zoom_behavior);
- },
- __resetZoom: function(args){
- var self = this;
- //Biojs.console.enable("add zoom");
- //this.opt.vis.call(d3.behavior.zoom().on("zoom", this.__redraw({vis : this.opt.vis})))
- // .append('svg:g');
- self.zoom_behavior = d3.behavior.zoom()
- .scaleExtent([0.5, 2])
- .on("zoom", null);
- self.zoom_behavior.scale(1);
- self.zoom_behavior.translate([0, 0]);
- var vis = d3.select("#"+this.opt.target+" svg");
- vis.transition().duration(500).attr('transform', 'translate(' + zoom.translate() + ') scale(' + zoom.scale() + ')')
-
- //.call(self.zoom_behavior);
- },
-
- __comparator: function (a, b) {
- var a_name = a.children? a.name.replace(/_\d+/g, '') : a.taxon;
- var b_name = b.children? b.name.replace(/_\d+/g, '') : b.taxon;
- var species2index = new Object();
- species2index["Tetraodon_nigroviridis"] = 0;
- species2index["Takifugu_rubripes"] = 1;
- species2index["Tetraodontidae"] = 2;
- species2index["Oreochromis_niloticus"] = 3;
- species2index["Gasterosteus_aculeatus"] = 4;
- species2index["Oryzias_latipes"] = 5;
- species2index["Xiphophorus_maculatus"] = 6;
- species2index["Atherinomorpha"] = 7;
- species2index["Smegmamorpha"] = 8;
- species2index["Percomorpha"] = 9;
- species2index["Gadus_morhua"] = 10;
- species2index["Holacanthopterygii"] = 11;
- species2index["Danio_rerio"] = 12;
- species2index["Clupeocephala"] = 13;
- species2index["Tupaia_belangeri"] = 14;
- species2index["Cavia_porcellus"] = 15;
- species2index["Spermophilus_tridecemlineatus"] = 16;
- species2index["Rattus_norvegicus"] = 17;
- species2index["Mus_musculus"] = 18;
- species2index["Murinae"] = 19;
- species2index["Dipodomys_ordii"] = 20;
- species2index["Sciurognathi"] = 21;
- species2index["Rodentia"] = 22;
- species2index["Oryctolagus_cuniculus"] = 23;
- species2index["Ochotona_princeps"] = 24;
- species2index["Lagomorpha"] = 25;
- species2index["Glires"] = 26;
- species2index["Otolemur_garnettii"] = 27;
- species2index["Microcebus_murinus"] = 28;
- species2index["Strepsirrhini"] = 29;
- species2index["Nomascus_leucogenys"] = 30;
- species2index["Pongo_abelii"] = 31;
- species2index["Homo_sapiens"] = -3;
- species2index["Pan_troglodytes"] = -2;
- species2index["Gorilla_gorilla"] = -1;
- species2index["Homininae"] = 0;
- species2index["Hominidae"] = 36;
- species2index["Hominoidea"] = 37;
- species2index["Macaca_mulatta"] = 38;
- species2index["Catarrhini"] = 39;
- species2index["Callithrix_jacchus"] = 40;
- species2index["Simiiformes"] = 41;
- species2index["Tarsius_syrichta"] = 42;
- species2index["Haplorrhini"] = 43;
- species2index["Primates"] = 44;
- species2index["Euarchontoglires"] = -3;
- species2index["Procavia_capensis"] = 46;
- species2index["Loxodonta_africana"] = 47;
- species2index["Echinops_telfairi"] = 48;
- species2index["Afrotheria"] = 49;
- species2index["Pteropus_vampyrus"] = 50;
- species2index["Myotis_lucifugus"] = 51;
- species2index["Chiroptera"] = 52;
- species2index["Equus_caballus"] = 53;
- species2index["Vicugna_pacos"] = 54;
- species2index["Bos_taurus"] = 55;
- species2index["Sus_scrofa"] = 56;
- species2index["Tursiops_truncatus"] = 57;
- species2index["Cetartiodactyla"] = 58;
- species2index["Felis_catus"] = 59;
- species2index["Mustela_putorius_furo"] = 60;
- species2index["Ailuropoda_melanoleuca"] = 61;
- species2index["Canis_lupus_familiaris"] = 62;
- species2index["Caniformia"] = 63;
- species2index["Carnivora"] = 64;
- species2index["Sorex_araneus"] = 65;
- species2index["Erinaceus_europaeus"] = 66;
- species2index["Insectivora"] = 67;
- species2index["Laurasiatheria"] = 68;
- species2index["Dasypus_novemcinctus"] = 69;
- species2index["Choloepus_hoffmanni"] = 70;
- species2index["Xenarthra"] = 71;
- species2index["Eutheria"] = 72;
- species2index["Monodelphis_domestica"] = 73;
- species2index["Macropus_eugenii"] = 74;
- species2index["Sarcophilus_harrisii"] = 75;
- species2index["Metatheria"] = 76;
- species2index["Theria"] = 77;
- species2index["Ornithorhynchus_anatinus"] = 78;
- species2index["Mammalia"] = 79;
- species2index["Pelodiscus_sinensis"] = 80;
- species2index["Anolis_carolinensis"] = 81;
- species2index["Taeniopygia_guttata"] = 82;
- species2index["Meleagris_gallopavo"] = 83;
- species2index["Gallus_gallus"] = 84;
- species2index["Phasianidae"] = 85;
- species2index["Neognathae"] = 86;
- species2index["Sauria"] = 87;
- species2index["Sauropsida"] = 88;
- species2index["Amniota"] = 89;
- species2index["Xenopus_tropicalis"] = 90;
- species2index["Tetrapoda"] = 91;
- species2index["Latimeria_chalumnae"] = 92;
- species2index["Sarcopterygii"] = 93;
- species2index["Euteleostomi"] = 94;
- species2index["Petromyzon_marinus"] = 95;
- species2index["Vertebrata"] = 96;
- species2index["Ciona_savignyi"] = 97;
- species2index["Ciona_intestinalis"] = 98;
- species2index["Ciona"] = 99;
- species2index["Chordata"] = 100;
- species2index["Strongylocentrotus_purpuratus"] = 101;
- species2index["Deuterostomia"] = 102;
- species2index["Lottia_gigantea"] = 103;
- species2index["Capitella_teleta"] = 104;
- species2index["Helobdella_robusta"] = 105;
- species2index["Annelida"] = 106;
- species2index["Lophotrochozoa"] = 107;
- species2index["Ixodes_scapularis"] = 108;
- species2index["Atta_cephalotes"] = 109;
- species2index["Apis_mellifera"] = 110;
- species2index["Aculeata"] = 111;
- species2index["Nasonia_vitripennis"] = 112;
- species2index["Apocrita"] = 113;
- species2index["Drosophila_virilis"] = 114;
- species2index["Drosophila_mojavensis"] = 115;
- species2index["Drosophila"] = 116;
- species2index["Drosophila_grimshawi"] = 117;
- species2index["Drosophila_willistoni"] = 118;
- species2index["Drosophila_pseudoobscura_pseudoobscura"] = 119;
- species2index["Drosophila_persimilis"] = 120;
- species2index["pseudoobscura_subgroup"] = 121;
- species2index["Drosophila_yakuba"] = 122;
- species2index["Drosophila_simulans"] = 123;
- species2index["Drosophila_sechellia"] = 124;
- species2index["Drosophila_melanogaster"] = 125;
- species2index["Drosophila_erecta"] = 126;
- species2index["melanogaster_subgroup"] = 127;
- species2index["Drosophila_ananassae"] = 128;
- species2index["melanogaster_group"] = 129;
- species2index["Sophophora"] = 130;
- species2index["Drosophila"] = 131;
- species2index["Anopheles_darlingi"] = 132;
- species2index["Anopheles_gambiae"] = 133;
- species2index["Anopheles"] = 134;
- species2index["Culex_quinquefasciatus"] = 135;
- species2index["Aedes_aegypti"] = 136;
- species2index["Culicinae"] = 137;
- species2index["Culicidae"] = 138;
- species2index["Diptera"] = 139;
- species2index["Heliconius_melpomene"] = 140;
- species2index["Danaus_plexippus"] = 141;
- species2index["Nymphalidae"] = 142;
- species2index["Bombyx_mori"] = 143;
- species2index["Obtectomera"] = 144;
- species2index["Tribolium_castaneum"] = 145;
- species2index["Endopterygota"] = 146;
- species2index["Pediculus_humanus_corporis"] = 147;
- species2index["Acyrthosiphon_pisum"] = 148;
- species2index["Paraneoptera"] = 149;
- species2index["Neoptera"] = 150;
- species2index["Daphnia_pulex"] = 151;
- species2index["Pancrustacea"] = 152;
- species2index["Arthropoda"] = 153;
- species2index["Trichinella_spiralis"] = 154;
- species2index["Pristionchus_pacificus"] = 155;
- species2index["Bursaphelenchus_xylophilus"] = 156;
- species2index["Meloidogyne_hapla"] = 157;
- species2index["Tylenchida"] = 158;
- species2index["Strongyloides_ratti"] = 159;
- species2index["Heterorhabditis_bacteriophora"] = 160;
- species2index["Caenorhabditis_briggsae_AF16"] = 161;
- species2index["Caenorhabditis_japonica"] = 162;
- species2index["Caenorhabditis_brenneri"] = 163;
- species2index["Caenorhabditis_remanei"] = 164;
- species2index["Caenorhabditis_elegans"] = 165;
- species2index["Caenorhabditis"] = 166;
- species2index["Rhabditoidea"] = 167;
- species2index["Rhabditida"] = 168;
- species2index["Chromadorea"] = 169;
- species2index["Nematoda"] = 170;
- species2index["Ecdysozoa"] = 171;
- species2index["Protostomia"] = 172;
- species2index["Schistosoma_mansoni"] = 173;
- species2index["Bilateria"] = 174;
- species2index["Nematostella_vectensis"] = 175;
- species2index["Eumetazoa"] = 176;
- species2index["Amphimedon_queenslandica"] = 177;
- species2index["Trichoplax_adhaerens"] = 178;
- species2index["Metazoa"] = 179;
- species2index["Saccharomyces_cerevisiae_S288c"] = 180;
- species2index["Schizosaccharomyces_pombe_972h-"] = 181;
- species2index["Ascomycota"] = 182;
- species2index["Proterospongia"] = 183;
- species2index["Monosiga_brevicollis"] = 184;
- species2index["Codonosigidae"] = 185;
- species2index["Opisthokonta"] = 186;
- species2index["Arabidopsis_thaliana"] = 187;
- species2index["Eukaryota"] = 188;
-
-
- var comparison = species2index[a_name] > species2index[b_name];
- //Biojs.console.enable("comparing "+a_name+" ("+species2index[a_name]+") and "+b_name+" ("+species2index[b_name]+") : "+comparison);
- return comparison;
- },
-
- __redraw: function(args){
- var vis = args.vis;
- Biojs.console.enable("in zoom");
- //Biojs.console.enable("here", d3.event.translate, d3.event.scale);
- //vis.attr("transform",
- // "translate(" + d3.event.translate + ")"
- //+ " scale(" + d3.event.scale + ")");
- },
- /*
- * __readTree in different formats
- * @param {string} load_from_variable whether to read the annotation from a file or variable.
- * @param {string} data_source file/variable.
- * @param {string} format nhx|json.
- *
- * @example
- * myTree.__readTree();
- *
- */
- __readAnnotation: function(args){
- var self = this;
- var load_from_variable = args.load_from_variable;
- var format = args.format;
- var data_source = args.data_source;
- var data_variable = args.data_variable;
- var load_from_web = args.load_from_web;
- var json_annotation_data;
- Biojs.console.enable("load annotation from web is: "+load_from_variable);
-
- if(load_from_variable){
- Biojs.console.enable("load from variable selected");
- Biojs.console.enable(data_variable);
- //json_tree_data = JSON.parse(
- json_annotation_data = JSON.parse(data_variable);
- //self.__update({'root' : json_tree_data});
- //self.__update({'root' : tree_data_variable});
- }
- else if(load_from_web){
- json_annotation_data = data_variable;
- }
-
- if(format == "json" ){
- Biojs.console.enable("json selected");
- var test_url = data_source;
- Biojs.console.enable("loading annotation from "+test_url);
- jQuery.ajax({
- url: test_url,
- dataType: "json",
- async: false,
- beforeSend: function(){
- jQuery("#annotation_spinner").show();
- },
- complete: function(){
- jQuery('#annotation_spinner').hide();
- },
- //type: 'POST',
- //data: {list_item: selected_from_list},
-
- success: function(result){
- Biojs.console.enable("have result");
- //return result;
- json_annotation_data = result;
- self.annotation_data = result;
- self.__update_annotation(json_annotation_data);
- //Biojs.console.enable(result);
- },
- error: function(){
- alert('Failed to retrieve annotations from '+test_url);
- }
-
- });
-
-
- //d3.json(tree_data, function(json_tree_data) {
- // //gTree.__update(root = json);
- // Biojs.console.enable("setting json data from "+tree_data+" ");
- // Biojs.console.enable(json_tree_data);
- // self.tree_data = json_tree_data;
- // some_test = json_tree_data;
- // //var pruned_tree = self._iterateTree(json_tree_data);
- // Biojs.console.enable(some_test);
- // Biojs.console.enable("done with d3.json");
- // return json_tree_data;
- // //self.__update(self.opt.root = json_tree_data);
- //});
- //Biojs.console.enable("well, we are outside the json read routine");
- //Biojs.console.enable(json_tree_data);
- //return json_tree_data;
- }
- //test
- //Biojs.console.enable(json_annotation_data);
- return json_annotation_data;
-
- },
-
-
- __readNHFormat: function(args){
- var self = this;
- var result = args.result;
- var json_tree_data;
- Biojs.console.enable("have result");
- var x = newick.parse(result);
- Biojs.console.enable(x);
- var cluster = d3.layout.cluster()
- .size([360, 1])
- .sort(null)
- .value(function(d) { return d.length; })
- .children(function(d) { return d.branchset; })
- .separation(function(a, b) { return 1; });
- json_tree_data = cluster(x);
- var nodes = cluster.nodes(x);
-
- //Biojs.console.enable(json_tree_data);
- //json_tree_data = x;
- return json_tree_data;
-
-
- },
- __collapseTree: function(){
- var self = this;
- var found_node;
- jQuery.each(self.selected_nodes, function(i,d){
-
- if(d.name == self.opt.highlight_gene){
- found_node = d;
- return false;
- }
- });
- if(found_node){
- var curr_node = found_node;
-
- while(parent = curr_node.parent){
- parent.children.forEach(function(d) {
- if(d.name === curr_node.name){
- curr_node = parent;
- return false;
- }
- if (d.children) {
- d._collapsed_children = get_all_childs(d).length - 1;
- d._children = d.children;
- d.children = null;
-
- }
- });
- curr_node = parent;
- }
- }
-
- self.root = self.selected_nodes[0];
-
- self.____update_tree(self.selected_nodes[0]);
- self.__update_annotation();
- },
- __readTree: function(args){
- var self = this;
- var load_from_variable = args.load_from_variable;
- var tree_format = args.tree_format;
- var tree_data = args.tree_data;
- var tree_data_variable = args.tree_data_variable;
- var load_from_web = args.load_from_web;
- var json_tree_data;
- Biojs.console.enable("load from web is: "+load_from_web);
-
- if(load_from_variable){
- Biojs.console.enable("load from variable selected");
- Biojs.console.enable(tree_data_variable);
- //json_tree_data = JSON.parse(
- if(tree_format == "json" ){
- json_tree_data = JSON.parse(tree_data_variable);
- }
- else{
- Biojs.console.enable("read nh tree");
- json_tree_data = self.__readNHFormat({result : tree_data_variable});
- }
- }
- else if(load_from_web){
- json_tree_data = tree_data_variable;
- }
- else if(tree_format == "json" ){
- Biojs.console.enable("json selected");
-
- jQuery.ajax({
- url: tree_data,
- dataType: "json",
- beforeSend: function(){
- jQuery("#tree_spinner").show();
- },
- complete: function(){
- jQuery('#tree_spinner').hide();
- },
- //async: false,
- //type: 'POST',
- //data: {list_item: selected_from_list},
-
- success: function(result){
- Biojs.console.enable("have result");
- json_tree_data = result;
- self.root = json_tree_data;
- self.all_data= json_tree_data;
-
-
- self.____update_tree(json_tree_data);
- // ok, do we read annotations as well?
- if(self.opt.two_window){
- Biojs.console.enable("remove spinner");
- jQuery("#tree_spinner").remove;
- $('#tree_spinner').remove()
- self.domain_data = self.__readAnnotation({load_from_variable: self.opt.load_from_variable,format : "json",
- data_source: self.opt.domains_file,data_variable : self.opt.json_domain_string});
- Biojs.console.enable("remove spinner");
- jQuery("#annotation_spinner").remove;
- $('#annotation_spinner').remove()
- }
- else{
- // so annotation is in the tree json
- var domains = rects.selectAll(".domain").data(function(d) { return d.domains; })
- self.__update_annotation();
- }
-
- if(self.opt.highlight_gene){
- self.__collapseTree();
- }
-
-
- }
-
- });
-
-
- //d3.json(tree_data, function(json_tree_data) {
- // //gTree.__update(root = json);
- // Biojs.console.enable("setting json data from "+tree_data+" ");
- // Biojs.console.enable(json_tree_data);
- // self.tree_data = json_tree_data;
- // some_test = json_tree_data;
- // //var pruned_tree = self._iterateTree(json_tree_data);
- // Biojs.console.enable(some_test);
- // Biojs.console.enable("done with d3.json");
- // return json_tree_data;
- // //self.__update(self.opt.root = json_tree_data);
- //});
- //Biojs.console.enable("well, we are outside the json read routine");
- //Biojs.console.enable(json_tree_data);
- //return json_tree_data;
- }
- else{
- Biojs.console.enable("nh selected");
- var test_url = "../../main/resources/dependencies/data/trees/life.txt";
- Biojs.console.enable("loading tree from "+test_url);
-
- jQuery.ajax({
- url: test_url,
- //dataType: "json",
- async: false,
- //type: 'POST',
- //data: {list_item: selected_from_list},
-
- success: function(result){
- Biojs.console.enable("have result");
- json_tree_data = self.__readNHFormat({result : result});
- //var x = newick.parse(result);
- //Biojs.console.enable(x);
- //var cluster = d3.layout.cluster()
- // .size([360, 1])
- // .sort(null)
- // .value(function(d) { return d.length !== undefined; })
- // .children(function(d) { return d.branchset !== undefined; })
- // .separation(function(a, b) { return 1; });
- //json_tree_data = cluster(x);
- //Biojs.console.enable(json_tree_data);
- //json_tree_data = x;
- return json_tree_data;
- },
- error: function(){
- alert('Failed to retrieve annotations from '+test_url);
- }
-
- });
-
- }
-
- //Biojs.console.enable("end of 'read_tree'")
- //Biojs.console.enable(some_test);
- Biojs.console.enable(json_tree_data);
-
- //test
- return json_tree_data;
-
- },
- /*
- * Sets controls.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * myTree.__update();
- *
- */
-
-
- _iterateTree: function(obj) {
- var self = this;
- for(var key in obj) { // iterate, `key` is the property key
- var elem = obj[key]; // `obj[key]` is the value
- //Biojs.console.enable(key);
- if(key === "taxon") { // found "text" property
- Biojs.console.enable(elem);
- if(elem == "Homo_sapiens"){
- Biojs.console.enable("delete it");
- delete(elem);
- }
- //count++;
- }
-
- if(typeof elem === "object") { // is an object (plain object or array),// so contains children
- self._iterateTree(elem); // call recursively
- }
- }
- return obj;
- },
-
-
-
- /*
- * clears the div
- *
- * @example
- * myTree.__showModelTree();
- *
- */
- _clear_divs: function(){
- jQuery('.added_button').remove();
- jQuery('#tree').empty();
- jQuery('#tree_panel').empty();
- jQuery('#annotation_panel').empty();
- jQuery('#YourOwnDivId').empty();
-
- Biojs.console.enable("cleared divs");
- },
- __showModelTree: function(){
- //var full_tree = this.tree_data;
- this.opt.modelTreeOn = "on";
- Biojs.console.enable("model tree with "+full_tree.length);
- //Biojs.console.enable(full_tree);
- this.__update();
- },
- __showFullTree: function(full_tree){
- //var full_tree = this.tree_data;
- this.opt.modelTreeOn = "";
- Biojs.console.enable("full tree with "+full_tree.length);
- var new_tree_data = this.__readTree({'load_from_variable': this.opt.load_from_variable,'tree_format' : this.opt.formatOptions.tree,
- 'tree_data': full_tree,'tree_data_variable' : this.opt.json_tree_string,
- 'load_from_web' : this.opt.load_from_web});
- //Biojs.console.enable(full_tree);
- var tree_layout = d3.layout.cluster();
- var nodes = tree_layout.nodes(new_tree_data);
- // set correct height
- var current_size = this.opt.tree.size;
- var new_height = nodes.length * 11;
- this.opt.tree.size([new_height, this.opt.div_width_half-this.opt.leaf_space]);
- d3.select("#"+this.opt.tree_target+" svg").style("height", new_height);
- this.__update(new_tree_data);
- },
-
-
- __addAxis: function(args){
- var max_value = args.max_value;
- var max_width = args.max_width;
- var self = this;
- // AXIS
- //var annotation_scale = d3.scale.linear().domain([0, max_seq_length+((max_seq_length * 20) / 100)]).range([0, 400]);
- max_value = max_value+((max_value * 20) / 100);
- Biojs.console.enable("adding axis :max_seq_length "+max_value+" max_width:"+max_width+" max_value: "+max_value);
-
- var annotation_scale = d3.scale.linear().domain([0, max_value]).range([0, this.opt.max_seq_representation]);
-
- var xAnnotation_axis = d3.svg.axis().scale(annotation_scale).orient("bottom");
-
-
- //d3.select("#"+this.opt.target).append("svg")
- jQuery('.axis').remove();
- d3.select(".axisarea").append("svg")
- //d3.select("#"+this.opt.target+" svg")
- //.append("svg")
- .attr("class", "axis")
- .attr("x", 0)
- .attr("y", 0)
- .attr("orient", "top")
- //.attr("transform", "translate(30,30)")
- .call(xAnnotation_axis);
-
- /*this.opt.vis.append("svg")
- .append("text")
- // text label for the x axis
- .attr("x", 800 )
- .attr("y", 8 )
- .style("text-anchor", "middle")
- .text("Sequence length"); */
-
-
- },
-
-
- _highlightGeneData: function(test,d){
- var self = this;
-
- Biojs.console.enable("looking at "+d.name);
- var name = d.name;
-
- //var found_nodes = d3.select(".treearea").selectAll("[taxon="+name+"]");
-
- var found_nodes = d3.selectAll(".treearea").selectAll("g.node").filter(function(d) {
- return d.taxon == name;
- })
- //var found_nodes = self.selected_nodes.filter(function(d){
- // return d.taxon == name
- //})
- jQuery.each(found_nodes, function(d){
- //var test = this;
- //var group_circle_box = d3.select(d).select("svg circle");
- //group_circle_box.attr("r", 6);
- //Biojs.console.enable("looking at node "+d.name);
- var this_node = d3.select(this);
- this_node.name = "ahhhhh";
- //var d_node = d3.select(d);
-
-
- //var group_circle_box = this_node.select("circle");
- //var group_circle_box2 = d_node.select("circle");
-
- //group_circle_box.attr("r", 6);
-
- //var test = this;
- //self._highlightSpeciesData(test,d);
- })
- // now have to find species in gene tree
- Biojs.console.enable("some test here");
-
- },
-
- _highlightSpeciesData: function(test,d){
- if(!d.children){
- //Biojs.console.enable("mouseovered a leaf");
- var group_circle_box = d3.select(test).select("svg circle");
- group_circle_box.attr("r", 6);
- //var group_image = d3.select(test).select("svg image");
- //group_image.attr("width", 40).attr("height", 40);
- //var group_text = d3.select(test).select("svg text");
- //group_text.attr("x", 65);
- }
- },
- _deHighlightSpeciesData: function(test,d){
- if(!d.children){
- //Biojs.console.enable("mouseovered a leaf");
- var group_circle_box = d3.select(test).select("svg circle");
- //Biojs.console.enable(group_circle_box);
- group_circle_box.attr("r", 0);
- //var group_image = d3.select(test).select("svg image");
- //group_image.attr("width", 20).attr("height", 20);
- //var group_text = d3.select(test).select("svg text");
- //group_text.attr("x", 35);
- }
- },
-
- __set_branchlengths: function(n, offset) {
- var self = this;
- var plot_domain = self.opt.plottableDomain;
- var max_branch_length = self.opt.max_branch_length;
- //
- //
- //Biojs.console.enable(n.name+" has "+n.branch_length);
- //if (n.length != null) offset += n.length * 115;
- // n.y = offset;
-
-
- if (n.branch_length != null && n.branch_length != "N/A"){
- if(n.branch_length === 0){
- offset += 0;
- }
- else if(n.depth === 0 ){
- offset += plot_domain(parseFloat(max_branch_length*0.1));
- }
- else if( n.branch_length < 0.01){
- //offset += 3;
- offset += plot_domain(max_branch_length);
- }
- else if(n.branch_length > 2){
- //offset += 115;
- offset += plot_domain(max_branch_length);
- //Biojs.console.enable("found branch_length: offset += n.data.length * 115: "+offset+" += "+n.branch_length);
- }
- else{
- //offset += n.branch_length * 115;
- offset += plot_domain(n.branch_length);
- //Biojs.console.enable("found branch_length: offset += n.data.length * 115: "+offset+" += "+n.branch_length);
- }
- }
- else{
- //offset += 100;
- offset += plot_domain(max_branch_length);
- }
-
- //if (n.data && n.data.length != null){
- // offset += n.data.length * 115;
- //Biojs.console.enable("offset += n.data.length * 115: "+offset+" += "+n.data.length);
- //}
- //Biojs.console.enable("setting n.y to "+offset);
- //offset = plot_domain(offset);
- n.y = offset;
- var offset_test = offset;
- if (n.children)
- //Biojs.console.enable("has children");
- n.children.forEach(function(n) {
- //Biojs.console.enable(n)
- self.__set_branchlengths(n, offset_test);
- });
- },
- __show_gene_annotation: function(){
- show_leaf_common_name({target: this.opt.target});
- },
- __show_uniprot_annotation: function(){
- show_leaf_uniprot({target:this.opt.target});
- },
- __toggleAll: function(d) {
- if (d.children) {
- d.children.forEach(toggle);
- //click(d);
- }
- },
-
-// Toggle children.
- __toggle: function(d) {
- if (d.children) {
- d._children = d.children;
- d.children = null;
- } else {
- d.children = d._children;
- d._children = null;
- }
- } ,
-
- __toggle_branchlength: function(){
- // remove everything in annotation div
- var all_nodes = jQuery('.annotation_panel .node');
- Biojs.console.enable("Found "+all_nodes.length+" nodes");
- all_nodes.remove();
- Biojs.console.enable("about to toggle branch length is: "+this.opt.show_real_branchlength)
- if(this.opt.show_real_branchlength){
- this.opt.show_real_branchlength = false;
- }
- else{
- this.opt.show_real_branchlength = true;
- }
- this.____update_tree();
- },
- __show_alignments: function(){
- // remove everything in annotation div
- //var all_nodes = jQuery("#annotation_panel").delete;
- // jQuery('
').appendTo("#tree_panel");
- //var myNode = document.getElementsByClassName("annotationarea");
- //while (myNode.firstChild) {
- // myNode.removeChild(myNode.firstChild);
- //}
- //this.all_domains = null;
- //jQuery('
').appendTo("#tree_panel");
-
- this.opt.annotation_option = "alignment";
- Biojs.console.enable("showing alignments now");
- this.__update();
- },
- __show_domains: function(){
- //var full_tree = this.tree_data;
- //Biojs.console.enable("about to toggle branch length is: "+this.opt.show_real_branchlength)
- //this.opt.show_real_branchlength = "on";
- //jQuery('#annotation_panel').empty();
- //jQuery('#annotation_panel').empty();
- var myNode = document.getElementsByClassName("annotationarea");
- while (myNode.firstChild) {
- myNode.removeChild(myNode.firstChild);
- }
- this.opt.__show_alignments = false;
- this.opt.__show_domains = true;
- this.opt.annotation_option = "domains";
-
- Biojs.console.enable("showing domains now");
- //Biojs.console.enable("model tree with "+full_tree.length);
- //Biojs.console.enable(full_tree);
- this.__update();
- },
-
- __show_bootstrap: function(){
- d3.select("#"+this.opt.target+" svg").selectAll(".bootstrap").attr("visibility", "");
- //d3.select("#tree svg").selectAll(".bootstrap").attr("visibility", "");
- },
- __hide_bootstrap: function(){
- d3.select("#"+this.opt.target+" svg").selectAll(".bootstrap").attr("visibility", "hidden");
- //d3.select("#tree svg").selectAll(".bootstrap").attr("visibility", "hidden");
- },
- __show_taxlevel: function(){
- d3.select("#"+this.opt.target+" svg").selectAll(".innerNode_label").attr("visibility", "");
- //d3.select("#tree svg").selectAll(".innerNode_label").attr("visibility", "");
- },
- __hide_taxlevel: function(){
- d3.select("#"+this.opt.target+" svg").selectAll(".innerNode_label").attr("visibility", "hidden");
- //d3.select("#tree svg").selectAll(".innerNode_label").attr("visibility", "hidden");
- },
- /*
- * __updates a tree layout.
- *
- * @example
- * myTree.__update();
- *
- */
- ____update_tree: function(source){
- var self = this;
- var root = this.root;
- var i = 0;
- // get tree data
- this.opt.tree = d3.layout.cluster();
- var tree = this.opt.tree;
- var nodes = tree.nodes(root).reverse();
-
- // set correct height
- this.opt.height = nodes.length * 11;
- // get available width of div
- this.opt.div_width = parseInt(d3.select("#"+this.opt.target).style("width"));
- if(self.opt.two_window){
- if(this.opt.__show_alignments){
- // setting width of annotation div to max alignment length
- this.opt.max_annot_div_width = d3.max(self.alignment_data, function(d) { return +d.alignment_length;} ) * this.opt.alignment_font_size;
- }
- else{
- div_width = d3.select("#"+self.opt.target).style("width");
- div_width_half = div_width.replace("px","");
- div_width_half = parseInt(div_width_half /2);
- this.opt.div_width_half = div_width_half;
- this.opt.max_annot_div_width = div_width_half;
- this.opt.max_seq_representation = div_width_half;
- }
- }
- // build the svg(s)
- // if using two divs/windows, there will be one div to hold the tree and another one to hold the annotation
- if (!$('#tree_panel svg').length){
- this._setVisualSpace({'width':div_width,'height':this.opt.height, "two_window": self.opt.two_window, "annot_div_width" : this.opt.max_annot_div_width});
- }
- // set visual area to this.opt.vis
- var width = this.opt.width - this.padding.left - this.padding.right;
- var height = this.opt.height - this.padding.top - this.padding.bottom;
- var div_width;
-
- //
- if(self.opt.two_window){
- div_width = parseInt(d3.select("#"+this.opt.tree_target).style("width"));
- this.opt.leaf_space = parseInt( div_width/ 4);
- //this.opt.tree = d3.layout.cluster()
- this.opt.tree
- .separation(function(a, b) {
- return a.parent === b.parent ? 4 : 4;
- })
- .sort(this.__comparator)
- .size([height, self.opt.div_width_half-this.opt.leaf_space]);
- }
- else{
- div_width= parseInt(d3.select("#"+this.opt.target).style("width")) - 400;
- this.opt.leaf_space = parseInt( div_width/ 2);
- this.opt.tree
- .separation(function(a, b) { return a.parent === b.parent ? 4 : 4; })
- .size([height, div_width-this.opt.leaf_space]);
- }
- this.opt.diagonal = d3.svg.diagonal().projection(function(d) { return [d.y, d.x]; });
-
- // define colors used to draw the domains
- if(!self.opt.two_window){
- Biojs.console.enable("domaincolors: opt.vis");
- this.__setDomainColors({target : this.opt.vis});
- }
- else{
- Biojs.console.enable("domaincolors: opt.annot_panel");
- this.__setDomainColors({target : this.opt.annot_panel});
- }
-
- var target = d3.select(".treearea");
- var tree_target = d3.select(".treearea");
- var annot_target = d3.select(".annotationarea");
-
- //var tree = this.opt.tree;
- var nodes = this.opt.tree.nodes(root);
- // set correct height
- //this.opt.height = nodes.length * 11;
-
- // get the tree's nodes
- var selected_nodes = nodes;
-
- if(self.opt.formatOptions.tree == "json"){
- Biojs.console.enable("using json in branch length test");
- selected_nodes = nodes.slice(0);
- }
- else{
- Biojs.console.enable("well, selecting nodes and setting branch lengths");
- selected_nodes = nodes[0].slice(0);
- //self.__set_branchlengths(selected_nodes[0], 0);
- }
-
- // from here on --> all nodes should be in self.selected_nodes
- self.selected_nodes = selected_nodes;
-
- selected_nodes = self.selected_nodes;
- nodes = self.selected_nodes;
- // showing ultrametric tree or using real branch length
- // sets the "branch_length" field of each node
- if(self.opt.show_real_branchlength){
- Biojs.console.enable("switched on real branch length");
- if(!self.opt.formatOptions.tree === "json"){
- Biojs.console.enable("well, selecting nodes and setting branch lengths");
- selected_nodes = nodes[0].slice(0);
- }
- self.opt.plottable_tree_space = self.opt.div_width_half-self.opt.leaf_space;
- self.opt.max_branch_length= d3.max(selected_nodes, function(d) { return +d.branch_length;} );
-
- self.opt.max_depth= d3.max(selected_nodes, function(d) { return +d.depth;} );
- var max_estimated_tree_length = self.opt.max_depth * self.opt.max_branch_length;
- self.opt.plottableDomain = d3.scale.linear().domain([0,max_estimated_tree_length]).range([0, self.opt.plottable_tree_space]);
- self.__set_branchlengths(selected_nodes[0], 0);
- }
- self.nodes = nodes;
-
- /* if(self.opt.two_window){
- Biojs.console.enable("remove spinner");
- jQuery("#tree_spinner").remove;
- jQuery("#annotation_spinner").remove;
- $('#tree_spinner').remove()
- $('#annotation_spinner').remove()
- } */
- this.opt.domainScale = d3.scale.linear().domain([0,4000]).range([0, 400]);
- this.opt.divScale = d3.scale.linear().domain([0,5]).range([0, this.opt.availablewidth]);
-
-
- // Recompute the layout: __update the nodes
- var node = target.selectAll("g.node").data(selected_nodes, function(d) { return d.id || (d.id = ++i); });
- //var node = target.selectAll("g.node").data(tree.nodes(root), function(d) {
- // return d.id || (d.id = ++i);
- //});
- this.nodeEnter = node.enter().append("svg:g").attr("class", "node")
- .on("click", function(d){
- Biojs.console.enable("clicked!!!!");
- //self._focus(d);
- Biojs.console.enable("clicked!!!!");
- self._collapseNode(d);
- })
- //.on("dblclick", function(d) { self._reset_tree(d) })
- .on("contextmenu", function(d, index) {
- var position = d3.mouse(this);
- var offsetLeft = document.getElementById("tree_panel").offsetLeft;
- var offsetTop = document.getElementById("tree_panel").offsetTop;
- var mouse_x =d3.event.x ;
- var mouse_y =d3.event.y ;
- this.current_d = d;
- d3.select('#my_custom_menu')
- .style('position', 'absolute')
- .style('left', mouse_x + "px")
- .style('top', mouse_y + "px")
- .style('display', 'block');
- self._buildContextMenu(d);
-
- d3.event.preventDefault();
- })
- .on("mouseover", function(d){
- var test = this;self._highlightSpeciesData(test,d)
- })
- .on("mouseout", function(d){var test = this;self._deHighlightSpeciesData(test,d)})
- // __update the links…
- var link = target.selectAll("path.link").data(tree.links(nodes), function(d) { return d.source.id + "-" + d.target.id; });
-
- draw_nodes({nodeEnter : this.nodeEnter, node : node, source : self.tree_data , circle_size : this.opt.circle_size,tree_representation_type : this.opt.tree_representation_type, availablewidth : this.opt.availablewidth});
-
- var species_silhouette = self.opt.tree_view == "reconciledView"? true: false;
- set_links({link: link, link_type : this.opt.link_type, duration : this.opt.duration, species_silhouette : species_silhouette});
-
-
- // colors based on taxonomy
- var subtree_colors = get_subtree_color_data({nodeEnter : this.nodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
- jQuery('.clade_tax_rect').remove();
- var color_codes = color_subtrees({subtree_colors : subtree_colors, target : this.opt.target});
- //Biojs.console.enable("here are the color codes: ");
- this._addLegend({target : "legend_panel", legend_dictionary : color_codes})
-
- // shall we print the species tree silhouette here?
- if(self.opt.tree_view == "reconciledView"){
- //collect_data_from_plotted_tree({target : this.opt.target});
- //print_species_tree_silhouette({link: link, link_type : this.opt.link_type, duration : this.opt.duration, species_silhouette : species_silhouette});
- self.____showSpeciesTreeSilhouette({annot_target : annot_target});
- }
-
- //Biojs.console.enable(color_codes);
-
-
- var how_to_color_hash = get_gene_color_stats({nodeEnter : this.nodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
-
-
- // remove on __update
- jQuery('.tax_color_rect').remove();
-
- var circles = draw_circles({nodeEnter : this.nodeEnter, circle_size : this.opt.circle_size}); // Draw the little symbols for each node
- var images = draw_images({nodeEnter : this.nodeEnter , image_path : this.opt.image_path}); // Draw images for species
-
- // Bootstrap nodes
-
- // Draw taxon names (leaf nodes)
- var texts = draw_taxon_names({nodeEnter : this.nodeEnter, show_taxa: this.opt.show_taxa,highlight_gene : this.opt.highlight_gene, default_view : this.opt.default_view});
- var bootstrap_texts = draw_bootstraps({nodeEnter : this.nodeEnter, visibility : "hidden"}); // Draw bootstrap values
- self.__setTooltips();
-
- //self.root.children.forEach(self._toggleAll);
-
- //collapse nodes
-
- },
-
-
- __update: function(source){
- var self = this;
- // var root = this.tree_data;
- var root = source;
- var target = d3.select(".treearea");
- var tree_target = d3.select(".treearea");
- var annot_target = d3.select(".annotationarea");
- //this.opt.target;
- var i = 0;
-
- // tree data
- this.opt.tree = d3.layout.cluster();
- var tree = this.opt.tree;
- var nodes = tree.nodes(root);
- // get the tree's nodes
- var selected_nodes;
- //nodes.forEach(function(d) {
- // if(d.depth == 0){ d.y = 10;}
- // else{
- // d.y = d.depth * 180;
- // }
- // });
- /*if(self.opt.show_lost_taxa){
- Biojs.console.enable("show lost taxa");
- var copy_of_nodes = nodes.slice(0);
- for (var i = 0 ; i < nodes.length; i++) {
- //Biojs.console.enable(selected_nodes[i]);
- var node = nodes[i];
- var name = node.name;
- //Biojs.console.enable("node "+name+" has lost taxa and "+node.children.length+" children");
-
- if(node.lost_taxa){
- var n = {name: "lost_taxon","branch_length":"1536","taxon":"Danio_rerio","x":95, "y":689,"children":[]};
- //node.children.push(node.lost_taxa);
- Biojs.console.enable("node "+name+" has lost taxa");
- //Biojs.console.enable("now "+node.children.length+" children");
- //selected_nodes.push(node.lost_taxa);
-
- if (node.children){
- node.children.push(n);
- }
- else{
- node.children = [n];
- }
- //Array.prototype.insert = function (index, item) {
- // this.splice(index, 0, item);
- //};
- var first_part = copy_of_nodes.slice(0,i);
- var second_part = copy_of_nodes.slice(i,copy_of_nodes.length);
- //selected_nodes.insert(i,n);
- var all = first_part.concat(n,second_part);
- copy_of_nodes = all.slice(0);
- Biojs.console.enable("test");
-
- }
- //var x = node.x;
- //nodeindex[name] = x;
-
- }
- //sdf
- nodes = copy_of_nodes.slice(0);
- } */
-
- /*var n = {id: nodes.length, name : "lost_taxon", taxon: "lost_taxon", type: "leaf"},
- p = nodes[4];
- if (p.children) p.children.push(n); else p.children = [n];
- nodes.push(n);
- */
- //self.__set_branchlengths(nodes[0], 0);
- // make a copy of all nodes
-
- if(self.opt.formatOptions.tree == "json"){
- Biojs.console.enable("using json in branch length test");
- selected_nodes = nodes.slice(0);
- }
- else{
- Biojs.console.enable("well, selecting nodes and setting branch lengths");
- selected_nodes = nodes[0].slice(0);
- self.__set_branchlengths(selected_nodes[0], 0);
- }
-
- // from here on --> all nodes should be in self.selected_nodes
-
- self.selected_nodes = selected_nodes;
- nodes = selected_nodes;
- self.nodes = nodes;
- // showing ultrametric tree or using real branch length
- // sets the "branch_length" field of each node
- if(self.opt.show_real_branchlength){
- Biojs.console.enable("switched on real branch length");
- self.__set_branchlengths(nodes[0], 0);
- }
-
- if(self.opt.two_window){
- Biojs.console.enable("remove spinner");
- jQuery("#tree_spinner").remove;
- jQuery("#annotation_spinner").remove;
- $('#tree_spinner').remove()
- $('#annotation_spinner').remove()
- }
-
- //Biojs.console.enable(selected_nodes);
- // get the max of either
- // - length of aligned sequence
- // - domain
- // - length of unaligned sequence
- var max_seq_length, max_value, max_width;
- this.__get_max_values();
- // this will add an axis to the top of the annotation panel
- if(this.opt.annotation_option && this.opt.annotation_option != "speciestree" && this.opt.two_window){
- this.__addAxis({max_value : this.opt.max_value, max_width: this.opt.max_width});
- }
- // since the annotation space is limited, we define a domain that maps all input values to a certain range.
- // e.g. an unaligned sequence might be 3432 AA long, so we can do domainScale(3432) and get the value e.g. 374
- // set domain scale
- this.opt.domainScale = d3.scale.linear().domain([0,this.opt.max_seq_length]).range([0, this.opt.max_seq_representation]);
- this.opt.divScale = d3.scale.linear().domain([0,5]).range([0, this.opt.availablewidth]);
-
-
- // Recompute the layout: __update the nodes
- //var node = target.selectAll("g.node").data(selected_nodes, function(d) { return d.id || (d.id = ++i); });
- var node = target.selectAll("g.node").data(tree.nodes(root), function(d) {
- return d.id || (d.id = ++i);
- });
- this.nodeEnter = node.enter().append("svg:g").attr("class", "node")
- //.on("click", function(d){Biojs.console.enable("uff, clicked");self._collapseNode(d);})
- .on("click", function(d){Biojs.console.enable("uff, clicked");self._focus(d);})
- //.on("mouseover", function(d){var test = this;self._highlightSpeciesData(test,d)})
- //.on("mouseout", function(d){var test = this;self._deHighlightSpeciesData(test,d)})
- // __update the links…
- var link = target.selectAll("path.link").data(tree.links(nodes), function(d) { return d.source.id + "-" + d.target.id; });
-
- draw_nodes({nodeEnter : this.nodeEnter, node : node, source : self.tree_data , circle_size : this.opt.circle_size,tree_representation_type : this.opt.tree_representation_type, availablewidth : this.opt.availablewidth});
-
- var species_silhouette = self.opt.tree_view == "reconciledView"? true: false;
- set_links({link: link, link_type : this.opt.link_type, duration : this.opt.duration, species_silhouette : species_silhouette});
-
-
- // colors based on taxonomy
- var subtree_colors = get_subtree_color_data({nodeEnter : this.nodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
- jQuery('.clade_tax_rect').remove();
- var color_codes = color_subtrees({subtree_colors : subtree_colors, target : this.opt.target});
- //Biojs.console.enable("here are the color codes: ");
- this._addLegend({target : "legend_panel", legend_dictionary : color_codes})
-
- // shall we print the species tree silhouette here?
- if(self.opt.tree_view == "reconciledView"){
- //collect_data_from_plotted_tree({target : this.opt.target});
- //print_species_tree_silhouette({link: link, link_type : this.opt.link_type, duration : this.opt.duration, species_silhouette : species_silhouette});
- self.____showSpeciesTreeSilhouette({annot_target : annot_target});
- }
-
- //Biojs.console.enable(color_codes);
-
-
- var how_to_color_hash = get_gene_color_stats({nodeEnter : this.nodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
-
-
- // remove on __update
- jQuery('.tax_color_rect').remove();
-
- var circles = draw_circles({nodeEnter : this.nodeEnter, circle_size : this.opt.circle_size}); // Draw the little symbols for each node
- var images = draw_images({nodeEnter : this.nodeEnter , image_path : this.opt.image_path}); // Draw images for species
-
- // Bootstrap nodes
-
- // Draw taxon names (leaf nodes)
- var texts = draw_taxon_names({nodeEnter : this.nodeEnter, show_taxa: this.opt.show_taxa,highlight_gene : this.opt.highlight_gene, default_view : this.opt.default_view});
- var bootstrap_texts = draw_bootstraps({nodeEnter : this.nodeEnter, visibility : "hidden"}); // Draw bootstrap values
-
-
-
- Biojs.console.enable("showing annotation: "+this.opt.annotation_option);
- if(this.opt.annotation_option == "speciestree"){
- Biojs.console.enable("showing speciestree");
- self.__showSpeciesTree({annot_target : annot_target});
- }
- else if(this.opt.annotation_option == "alignment"
- || this.opt.annotation_option == "domains"
- || this.opt.annotation_option == "seq_domains"){
- var nodeindex = self.__getNodeIndices({selected_nodes : selected_nodes});
-
- switch(this.opt.annotation_option){
- case "alignment":
- Biojs.console.enable("adding alignment");
- self.__showAlignments({nodeindex : nodeindex, annot_target : annot_target});
- break;
- case "domains":
- Biojs.console.enable("adding domains");
- self.__showDomains({nodeindex : nodeindex, annot_target : annot_target});
- break;
- case "seq_domains":
- Biojs.console.enable("adding seq_domains");
- self.__showSeqDomains({nodeindex : nodeindex, annot_target : annot_target});
- break;
-
-
- default:
- Biojs.console.enable("no annotation selected");
- }
- }
- self.__setTooltips();
-
- },
- /* __updates a tree annotationlayout.
- *
- * @example
- * myTree.__update_annotation();
- *
- */
- __update_annotation: function(source){
- var self = this;
- // var root = this.tree_data;
- var annotation_data = self.annotation_data;
- var target = d3.select(".treearea");
- var tree_target = d3.select(".treearea");
- var annot_target = d3.select(".annotationarea");
- //this.opt.target;
- var i = 0;
- self.domain_data = annotation_data;
- //Biojs.console.enable(selected_nodes);
- // get the max of either
- // - length of aligned sequence
- // - domain
- // - length of unaligned sequence
- var max_seq_length, max_value, max_width;
- this.__get_max_values({annotation : annotation_data});
- // this will add an axis to the top of the annotation panel
- if(this.opt.annotation_option && this.opt.annotation_option != "speciestree" && this.opt.two_window){
- this.__addAxis({max_value : this.opt.max_value, max_width: this.opt.max_width});
- }
- // since the annotation space is limited, we define a domain that maps all input values to a certain range.
- // e.g. an unaligned sequence might be 3432 AA long, so we can do domainScale(3432) and get the value e.g. 374
- // set domain scale
- this.opt.domainScale = d3.scale.linear().domain([0,this.opt.max_seq_length]).range([0, this.opt.max_seq_representation]);
- this.opt.divScale = d3.scale.linear().domain([0,5]).range([0, this.opt.availablewidth]);
-
-
- Biojs.console.enable("showing annotation: "+this.opt.annotation_option);
- if(this.opt.annotation_option == "speciestree"){
- Biojs.console.enable("showing speciestree");
- self.__showSpeciesTree({annot_target : annot_target});
- }
- else if(this.opt.annotation_option == "alignment"
- || this.opt.annotation_option == "domains"
- || this.opt.annotation_option == "annotation_grid"
- || this.opt.annotation_option == "seq_domains"){
- var nodeindex = self.__getNodeIndices({selected_nodes : this.nodes});
-
- switch(this.opt.annotation_option){
- case "alignment":
- Biojs.console.enable("adding alignment");
- self.__showAlignments({nodeindex : nodeindex, annot_target : annot_target});
- break;
- case "domains":
- Biojs.console.enable("adding domains");
- self.__showDomains({nodeindex : nodeindex, annot_target : annot_target});
- break;
- case "seq_domains":
- Biojs.console.enable("adding seq_domains");
- self.__showSeqDomains({nodeindex : nodeindex, annot_target : annot_target});
- break;
- case "annotation_grid":
- Biojs.console.enable("adding annotation_grid");
- self.__showAnnotationGrid({nodeindex : nodeindex, annot_target : annot_target});
- break;
-
-
- default:
- Biojs.console.enable("no annotation selected");
- }
- }
- self.__setTooltips();
-
- },
-
-
- __get_max_values: function(args){
- var annotation = args.annotation;
- if(this.opt.two_window){
- if(this.opt.annotation_option){
- if(this.opt.annotation_option == "seq_domains"){
- this.opt.max_value = d3.max(annotation, function(d) { return +d.alignment_length;} );
- this.opt.max_width = this.opt.max_value;
- this.opt.max_seq_length = this.opt.max_value;
- }
- else{
- this.opt.max_width = d3.max(annotation, function(d) { return +d.seq_length;} );
- this.opt.max_value = this.opt.max_width;
- this.opt.max_seq_length = this.opt.max_width;
- }
- }
- }
- else{
- this.opt.max_width = d3.max(annotation, function(d) { return +d.seq_length;} );
- this.opt.max_value = this.opt.max_value;
- this.opt.max_seq_length = this.opt.max_width;
- }
- },
-
- __getNodeIndices: function(args){
- var selected_nodes = args.selected_nodes;
- var nodeindex = new Object();
- //Biojs.console.enable(selected_nodes);
- for (var i = 0 ; i < selected_nodes.length; i++) {
- //Biojs.console.enable(selected_nodes[i]);
- var node = selected_nodes[i];
- var name = node.name;
- var x = node.x;
- nodeindex[name] = x;
-
- }
- if(nodeindex.length < 1){
- Biojs.console.enable("could not map annotations");
- // need to capture this case
- }
- return nodeindex;
- },
-
- __showAlignments: function(args){
- var nodeindex = args.nodeindex;
- var annot_target = args.annot_target;
- var self = this;
-
- Biojs.console.enable("nodeindex is: ");
- Biojs.console.enable(nodeindex);
-
- var annot_node = annot_target.selectAll("g.node").data(self.alignment_data);
- annot_node.exit().remove();
- this.annot_nodeEnter = annot_node.enter()
- .append("svg:g").filter(function(d){ return nodeindex.hasOwnProperty(d.name)})
- .attr("class", "node")
- //.on("click", function(d) { __toggle(d); self.__update(d); })
- .on("mouseover", function(d){var test = this;self._highlightSpeciesData(test,d)})
- .on("mouseout", function(d){var test = this;self._deHighlightSpeciesData(test,d)});
- if(self.opt.two_window){
- this.nodeEnter = this.annot_nodeEnter;
- }
- draw_nodes({two_window:self.opt.two_window, nodeEnter : this.nodeEnter, nodeindex: nodeindex, node : annot_node, source : self.tree_data , tree_representation_type : this.opt.tree_representation_type});
- var alignment_patterns = this.nodeEnter.selectAll("text").data(function(d) { return d.sequence;})
- this.aligned_sequences = draw_alignment_sequences({alignment_patterns: alignment_patterns,
- domainScale : this.opt.domainScale ,
- leaf_group_x : this.opt.leaf_group_x,
- sequence_start_y : this.opt.sequence_start_y,
- two_window : this.opt.two_window,
- nodeindex : nodeindex,
- alignment_font_size : this.opt.alignment_font_size,
- visibility : ""});
-
-
- },
-
- __showAnnotationGrid: function(args){
- var nodeindex = args.nodeindex;
- var annot_target = args.annot_target;
- var self = this;
- Object.size = function(obj) {
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) size++;
- }
- return size;
- };
-
- var size = Object.size(nodeindex);
-
- // columns are: protein_id, sf_name, definition, organism, gene_id, gene_symbol, molecular function, biological process, cellular component, protein class
- // well, which of those do we need?
- // expande
- var table_html = " ";
- jQuery.each(self.annotation_data, function(seq_no,d){
- table_html += "";
- if(d.xref){
- if(d.xref.protein_id){table_html += ""+d.xref.protein_id+" "}
- else {table_html += " "}
- if(d.xref.sf_name){table_html += ""+d.xref.sf_name+" "}
- else {table_html += " "}
- if(d.xref.definition){table_html += ""+d.xref.definition+" "}
- else {table_html += " "}
- if(d.xref.gene_id){table_html += ""+d.xref.gene_id+" "}
- else {table_html += " "}
- if(d.xref.molecular_function){table_html += ""+d.xref.molecular_function+" "}
- else {table_html += " "}
- if(d.xref.biological_process){table_html += ""+d.xref.biological_process+" "}
- else {table_html += " "}
- if(d.xref.cellular_component){table_html += ""+d.xref.cellular_component+" "}
- else {table_html += " "}
- if(d.xref.protein_class){table_html += ""+d.xref.protein_class+" "}
- else {table_html += " "}
-
- }
- table_html += " ";
- });
- table_html += "
";
- jQuery(table_html).appentTo("#annotation_panel");
-
- },
-
- __showSeqDomains: function(args){
- var nodeindex = args.nodeindex;
- var annot_target = args.annot_target;
- var self = this;
- Object.size = function(obj) {
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) size++;
- }
- return size;
-
-
- // bind data to nodes
- var annot_node = annot_target.selectAll("g.node").data(self.annotation_data);
- // enter selection
- this.annot_nodeEnter = annot_node.enter()
- .append("svg:g").filter(function(d){
- var test = d;
- if(nodeindex.hasOwnProperty(d.name)){
- Biojs.console.enable("take "+d.name);
- }
- else{
- Biojs.console.enable("could not map "+d.name);
- }
- return nodeindex.hasOwnProperty(d.name)})
- .attr("class", "xref_node")
-
- // exit selection
- annot_node.exit().remove();
- if(self.opt.two_window){
- this.nodeEnter = this.annot_nodeEnter;
- }
- // draw conservation patterns
- var alignment_length = this.opt.max_value;
- //var rects = this.annot_nodeEnter.filter(function(d){ return typeof d.children == 'undefined' });
- draw_xref_nodes({two_window:self.opt.two_window, nodeEnter : this.nodeEnter, nodeindex: nodeindex, node : annot_node, source : self.tree_data , tree_representation_type : this.opt.tree_representation_type});
-
- };
-
- var size = Object.size(nodeindex);
- var offset_dictionary = {};
- Biojs.console.enable("looking at the domains, nodeindex: "+size);
- //Biojs.console.enable(nodeindex);
- Biojs.console.enable(self.domain_data);
- var alignment_length;
-
- /*
- todo: save offset mapping for each seq.
- this will be used for mapping the domains correctly.
- Given: domain start+end: 34-114
- want: start+stop coordinates mapped onto alignment
- todo: foreach position in alignment count number of gaps until here
- dict[curr_pos-gaps] = curr_pos
- */
- var offset_dictionary = {};
- jQuery.each(self.domain_data, function(seq_no,d){
- var gap_counter = 0,
- real_position= 1,
- cigar_array = [];
- if(d.cigar_string){
- var offset = 0; // this is to plot the rects next to each other
- var result = d.cigar_string.match(/(\d*\w)/g);
- //for (var set = 0; set < result.length; set++) {
- for (var set = 0; set < result.length; set++) {
- var submatch = result[set].match(/(\d*)(\w)/),
- length,
- cigar_type = submatch[2];
- if(submatch[1]){
- // there was a number for this cigar state
- length = parseInt(submatch[1]);
- }
- else{
- length = 1;
- }
- if(cigar_type.toLowerCase() === "d"){
- gap_counter += length;
- }
- if(cigar_type.toLowerCase() === "m"){
- for (var j=0; j < length; j++){
- if(offset_dictionary[d.name] === undefined){
- offset_dictionary[d.name] = {};
- }
- var new_real_position = j+real_position;
- offset_dictionary[d.name][new_real_position] = gap_counter + new_real_position;
-
- }
- real_position +=length;
- cigar_array.push({"type": cigar_type, "length": length, "offset" : offset});
- }
- offset = offset + length;
- }
- //alignment_length = offset;
- }
- // change the coordinates of the domains
- if(d.domains){
- jQuery.each(d.domains, function(iteration,domain){
- if(offset_dictionary[d.name] !== undefined){
- domain.domain_start = offset_dictionary[d.name][domain.domain_start];
- domain.domain_stop = offset_dictionary[d.name][domain.domain_stop];
- }
- });
- }
- d.cigar_array = cigar_array;
- })
-
- this.opt.cigarScale = d3.scale.linear().domain([0,this.opt.max_value]).range([0, this.opt.max_seq_representation]);
- var annot_node = annot_target.selectAll("g.node").data(self.domain_data);
- // enter selection
- this.annot_nodeEnter = annot_node.enter()
- .append("svg:g").filter(function(d){
- var test = d;
- if(nodeindex.hasOwnProperty(d.name)){
- Biojs.console.enable("take "+d.name);
- }
- else{
- Biojs.console.enable("could not map "+d.name);
- }
- return nodeindex.hasOwnProperty(d.name)})
- .attr("class", "node")
- .on("mouseover", function(d){var test = this;self._highlightSpeciesData(test,d)})
- .on("mouseout", function(d){var test = this;self._deHighlightSpeciesData(test,d)});
-
- // exit selection
- annot_node.exit().remove();
- //Biojs.console.enable(this.annot_nodeEnter);
- if(self.opt.two_window){
- this.nodeEnter = this.annot_nodeEnter;
- }
- // draw conservation patterns
- var alignment_length = this.opt.max_value;
- //var rects = this.annot_nodeEnter.filter(function(d){ return typeof d.children == 'undefined' });
- draw_nodes({two_window:self.opt.two_window, nodeEnter : this.nodeEnter, nodeindex: nodeindex, node : annot_node, source : self.tree_data , tree_representation_type : this.opt.tree_representation_type});
- var rects = draw_cigar_borders({nodeEnter: this.nodeEnter,
- domainScale : this.opt.cigarScale ,
- leaf_group_x : this.opt.leaf_group_x+2,
- sequence_start_y : this.opt.sequence_start_y,
- two_window : this.opt.two_window,
- nodeindex : nodeindex,
- visibility : "",
- alignment_length: alignment_length});
-
-
- var cigars = rects.selectAll(".cigar_rect").data(function(d) { return d.cigar_array});
-
- //draw_nodes({two_window:self.opt.two_window, nodeEnter : this.nodeEnter, nodeindex: nodeindex, node : annot_node, source : self.tree_data , tree_representation_type : this.opt.tree_representation_type});
-
- var cigar_rects = draw_cigar_sequences({domains: cigars,
- domainScale : this.opt.cigarScale,
- leaf_group_x : this.opt.leaf_group_x+4,
- sequence_rect_width : this.opt.sequence_rect_width - 4,
- sequence_start_y : this.opt.sequence_start_y,
- two_window : this.opt.two_window,
- nodeindex : nodeindex,
- visibility : ""
- });
- // Domains
- var domains = rects.selectAll(".domain").data(function(d) { return d.domains; })
- var leaves = rects.selectAll(".leaf_label");
- //Biojs.console.enable(domains);
- //Biojs.console.enable(" after specified domains/leaves");
- //this.opt.domainScale = d3.scale.linear().domain([0,this.opt.max_seq_length]).range([0, this.opt.max_seq_representation]);
- this.all_domains = draw_domains({domains : domains, sequence_start_y : this.opt.sequence_start_y,
- domainScale: this.opt.cigarScale, sequence_rect_width : this.opt.sequence_rect_width,
- two_window : this.opt.two_window,
- leaf_group_x : this.opt.leaf_group_x,domain_colors : this.opt.domain_colors,visibility: "" });
-
- },
-
- __showDomains: function(args){
- var nodeindex = args.nodeindex;
- var annot_target = args.annot_target;
- var self = this;
-
-
- Object.size = function(obj) {
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) size++;
- }
- return size;
- };
-
- var size = Object.size(nodeindex);
-
- // binding data
- var annot_node = annot_target.selectAll("g.node").data(self.domain_data);
- this.annot_nodeEnter = annot_node.enter()
- .append("svg:g").filter(function(d){
- //if(nodeindex.hasOwnProperty(d.name)){ Biojs.console.enable("take "+d.name); }
- return nodeindex.hasOwnProperty(d.name)})
- .attr("class", "node")
- .on("mouseover", function(d){var test = this;self._highlightSpeciesData(test,d)})
- .on("mouseout", function(d){var test = this;self._deHighlightSpeciesData(test,d)});
-
- annot_node.exit().remove();
- if(self.opt.two_window){
- this.nodeEnter = this.annot_nodeEnter;
- }
- draw_nodes({two_window:self.opt.two_window, nodeEnter : this.nodeEnter, nodeindex: nodeindex, node : annot_node, source : self.tree_data , tree_representation_type : this.opt.tree_representation_type});
- var rects = draw_sequences({nodeEnter: this.nodeEnter,
- domainScale : this.opt.domainScale ,
- leaf_group_x : this.opt.leaf_group_x,
- sequence_start_y : this.opt.sequence_start_y,
- two_window : this.opt.two_window,
- nodeindex : nodeindex,
- visibility : ""});
- //
-
- Biojs.console.enable("after sequence drawn");
-
- // Domains
- var domains = rects.selectAll(".domain").data(function(d) { return d.domains; })
- var leaves = rects.selectAll(".leaf_label");
- //Biojs.console.enable(domains);
- //Biojs.console.enable(" after specified domains/leaves");
- Biojs.console.enable("setting domainscale to "+this.opt.max_seq_length);
- this.opt.domainScale = d3.scale.linear().domain([0,this.opt.max_seq_length]).range([0, this.opt.max_seq_representation]);
- Biojs.console.enable(" after domainscale");
- this.all_domains = draw_domains({domains : domains, sequence_start_y : this.opt.sequence_start_y,
- domainScale: this.opt.domainScale, sequence_rect_width : this.opt.sequence_rect_width,
- two_window : this.opt.two_window,
- leaf_group_x : this.opt.leaf_group_x,domain_colors : this.opt.domain_colors,visibility: "" });
-
- },
-
- ____showSpeciesTreeSilhouette: function(args){
- var annot_target = args.annot_target;
- var right2left = false;
- var class_type_path = "species_link";
- var class_type_node = "species_node";
- var i = 0;
- Biojs.console.enable("before reading tree")
- this.species_tree_data = this.__readTree({'load_from_variable': this.opt.load_from_variable,'tree_format' : this.opt.formatOptions.tree,
- 'tree_data': this.opt.species_tree,'tree_data_variable' : this.opt.json_tree_string,
- 'load_from_web' : this.opt.load_from_web});
-
- var temp_tree = d3.layout.cluster();
-
- var temp_nodes = temp_tree.nodes(this.species_tree_data);
- // set correct height
- //var species_height = this.opt.species_nodes * 11;
- var species_height = temp_nodes.length * 11;
- jQuery("#annotation_svg_container").height(species_height);
- Biojs.console.enable("d3.layout.cluster: "+species_height+", "+this.opt.div_width_half+"-"+this.opt.leaf_space+"");
-
- var available_width = this.opt.div_width_half-this.opt.leaf_space;
- var species_tree = d3.layout.cluster()
- .separation(function(a, b) { return a.parent === b.parent ? 4 : 4; })
- .size([species_height , available_width ]);
- Biojs.console.enable("read tree");
- Biojs.console.enable(this.species_tree_data);
-
- // get the tree's nodes
- var species_nodes = species_tree.nodes(this.species_tree_data);
-
-
-
-
- var species_node = annot_target.selectAll("g.node").data(species_nodes, function(d) {
- var value = d.id || (d.id = ++i);
- return value;
- });
-
- this.speciesnodeEnter = species_node.enter().append("svg:g").attr("class", "node");
-
- draw_nodes({nodeEnter : this.speciesnodeEnter, node : species_node, source : this.species_tree_data,
- right2left : right2left,
- circle_size : this.opt.circle_size,tree_representation_type : this.opt.tree_representation_type, availablewidth : this.opt.div_width_half});
- // __update the links…
- var link = annot_target.selectAll("path."+class_type_path).data(species_tree.links(species_nodes), function(d) { return d.target.id; });
-
- set_links({link: link, link_type : this.opt.link_type, duration : this.opt.duration, right2left : right2left, availablewidth : this.opt.div_width_half,
- species_silhouette: true, class_type : class_type_path, opacity: 0.3, node_thickness : 30});
- //var species_subtree_colors = get_subtree_color_data({nodeEnter : this.speciesnodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.annot_target});
- //jQuery('.clade_tax_rect').remove();
- //var species_color_codes = color_subtrees({subtree_colors : species_subtree_colors, target : this.opt.annot_target, right2left : right2left});
- //Biojs.console.enable("here are the color codes: ");
- //Biojs.console.enable(color_codes);
-
- //this._addLegend({target : "legend_panel", legend_dictionary : color_codes})
- //var how_to_color_hash = get_gene_color_stats({nodeEnter : this.speciesnodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
-
-
- // remove on __update
- //jQuery('.tax_color_rect').remove();
- // Draw the little symbols for each node
- //var circles = draw_circles({nodeEnter : this.speciesnodeEnter, circle_size : this.opt.circle_size});
- // Draw images for species
- //var images = draw_images({nodeEnter : this.speciesnodeEnter , image_path : this.opt.image_path, right2left : right2left});
- // Bootstrap nodes
- // Draw taxon names (leaf nodes)
- //var texts = draw_taxon_names({nodeEnter : this.speciesnodeEnter, show_taxa: this.opt.show_taxa,
- // right2left : right2left,highlight_gene : this.opt.highlight_gene, model_organisms : this.opt.model_organisms});
- // Draw bootstrap values
- //var bootstrap_texts = draw_bootstraps({nodeEnter : this.speciesnodeEnter, visibility : "hidden"});
-
- },
-
- __showSpeciesTree: function(args){
- var annot_target = args.annot_target;
- var class_type_path = "species_link";
- var class_type_node = "species_node";
- var right2left = true;
- var self = this;
- Biojs.console.enable("before reading tree")
- this.species_tree_data = this.__readTree({'load_from_variable': this.opt.load_from_variable,'tree_format' : this.opt.formatOptions.tree,
- 'tree_data': this.opt.species_tree,'tree_data_variable' : this.opt.json_tree_string,
- 'load_from_web' : this.opt.load_from_web});
-
-
- var species_height = this.opt.species_nodes * 5;
- jQuery("#annotation_svg_container").height(species_height);
- Biojs.console.enable("d3.layout.cluster: "+species_height+", "+this.opt.div_width_half+"-"+this.opt.leaf_space+"");
-
- var available_width = this.opt.div_width_half-this.opt.leaf_space;
- var species_tree = d3.layout.cluster()
- .separation(function(a, b) { return a.parent === b.parent ? 1 : 1; })
- .size([species_height , available_width ]);
-
- Biojs.console.enable("read tree");
- Biojs.console.enable(this.species_tree_data);
-
- // get gt node data
- var geneNode2Coordinate = {};
- var speciesNode2Path = [];
-
- self._getGTNodeInfo({speciesNode2Path: speciesNode2Path, geneNode2Coordinate : geneNode2Coordinate})
-
-
- // get the tree's nodes
- var species_nodes = species_tree.nodes(this.species_tree_data);
- var i = 0;
- var species_node = annot_target.selectAll("g.node").data(species_nodes, function(d) { return d.id || (d.id = ++i); });
-
- this.speciesnodeEnter = species_node.enter().append("svg:g").attr("class", "node")
- .on("mouseover", function(d){
- var test = this;
- self._highlightGeneData(test,d)
- });
-
- draw_nodes({nodeEnter : this.speciesnodeEnter, node : species_node, source : this.species_tree_data ,
- right2left : right2left,
- circle_size : this.opt.circle_size,tree_representation_type : this.opt.tree_representation_type, availablewidth : this.opt.div_width_half});
- // __update the links…
- var link = annot_target.selectAll("path.link").data(species_tree.links(species_nodes), function(d) { return d.target.id; });
-
- // ok, we want to show branches leading to species not in the gene tree with different lines
-
- set_links({link: link, link_type : this.opt.link_type, duration : this.opt.duration, right2left : right2left, availablewidth : this.opt.div_width_half,
- class_type : class_type_path, genePresence: geneNode2Coordinate});
- //var species_subtree_colors = get_subtree_color_data({nodeEnter : this.speciesnodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.annot_target});
- //jQuery('.clade_tax_rect').remove();
- //var species_color_codes = color_subtrees({subtree_colors : species_subtree_colors, target : this.opt.annot_target, right2left : right2left});
- //Biojs.console.enable("here are the color codes: ");
- //Biojs.console.enable(color_codes);
-
- //this._addLegend({target : "legend_panel", legend_dictionary : color_codes})
- //var how_to_color_hash = get_gene_color_stats({nodeEnter : this.speciesnodeEnter, highlight_gene : this.opt.highlight_gene, target : this.opt.target});
-
-
- // remove on __update
- //jQuery('.tax_color_rect').remove();
- // Draw the little symbols for each node
- var circles = draw_circles({nodeEnter : this.speciesnodeEnter, circle_size : this.opt.circle_size});
- // Draw images for species
- //var images = draw_images({nodeEnter : this.speciesnodeEnter , image_path : this.opt.image_path, right2left : right2left});
- // Bootstrap nodes
- // Draw taxon names (leaf nodes)
- var texts = draw_taxon_names({nodeEnter : this.speciesnodeEnter, show_taxa: this.opt.show_taxa,
- right2left : right2left,highlight_gene : this.opt.highlight_gene, model_organisms : this.opt.model_organisms,
- genePresence : geneNode2Coordinate});
- // Draw bootstrap values
- //var bootstrap_texts = draw_bootstraps({nodeEnter : this.speciesnodeEnter, visibility : "hidden"});
-
-
- // now we save the coordinates for gene tree and species tree nodes
- var geneNode2Coordinate = {};
- var speciesNode2Path = [];
- self.selected_nodes.forEach(function(d) {
- var coordinates = {"y":d.y, "x":d.x};
- geneNode2Coordinate[d.taxon] = coordinates;
- /*if(geneNode2Coordinate.hasOwnProperty(d.taxon)){
- var tmp_array = [];
- tmp_array = geneNode2Coordinate[d.taxon];
- tmp_array.push(coordinates);
- geneNode2Coordinate[d.taxon] = tmp_array;
- }
- else{
- var tmp_array = [];
- tmp_array.push(coordinates);
- geneNode2Coordinate[d.taxon] = coordinates;
- }*/
- //d.y = d.depth * 180;
- });
- /*species_nodes.forEach(function(d) {
-
- var species_name = d.name;
- if(geneNode2Coordinate.hasOwnProperty(species_name)){
- var gene4species = geneNode2Coordinate[species_name];
- if(gene4species){
- var path_coord = {
- "species_name":species_name,
- "source": {"x":d.x,"y": d.y},
- "target": {"x":gene4species.x, "y":gene4species.y}
- }
- speciesNode2Path.push(path_coord);
- }
- }
- else{
- //Biojs.console.enable("skipping "+species_name);
-
- }
- });*/
-
- // on mouseover
- //
- // var btw_link = d3.select("#"+self.opt.target).selectAll("path.link").data(speciesNode2Path);
- // set_links({link: btw_link, link_type : this.opt.link_type, duration : this.opt.duration, right2left : right2left, availablewidth : this.opt.div_width_half});
- // return speciesNode2Path;
-
- },
- _getGTNodeInfo: function(args){
- var self = this;
-
- var geneNode2Coordinate = args.geneNode2Coordinate;
- var speciesNode2Path = args.speciesNode2Path;
- self.selected_nodes.forEach(function(d) {
- var coordinates = {"y":d.y, "x":d.x};
- geneNode2Coordinate[d.taxon] = coordinates;
- /*if(geneNode2Coordinate.hasOwnProperty(d.taxon)){
- var tmp_array = [];
- tmp_array = geneNode2Coordinate[d.taxon];
- tmp_array.push(coordinates);
- geneNode2Coordinate[d.taxon] = tmp_array;
- }
- else{
- var tmp_array = [];
- tmp_array.push(coordinates);
- geneNode2Coordinate[d.taxon] = coordinates;
- }*/
- //d.y = d.depth * 180;
- });
- /*species_nodes.forEach(function(d) {
-
- var species_name = d.name;
- if(geneNode2Coordinate.hasOwnProperty(species_name)){
- var gene4species = geneNode2Coordinate[species_name];
- if(gene4species){
- var path_coord = {
- "species_name":species_name,
- "source": {"x":d.x,"y": d.y},
- "target": {"x":gene4species.x, "y":gene4species.y}
- }
- speciesNode2Path.push(path_coord);
- }
- }
- else{
- //Biojs.console.enable("skipping "+species_name);
-
- }
- });*/
-
- },
-
- __setTooltips: function(){
- add_tipsy({where : ".leaf_label", default_view:this.opt.default_view});
- add_tipsy({where : ".domain", default_view:this.opt.default_view});
- add_tipsy({where : ".clade_tax_rect", default_view:this.opt.default_view});
-
- },
-
- /*
- * Sets controls.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * myTree.setControls();
- *
- */
- __setControls: function(){},
-
- /*
- * Sets domain colors.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * myTree.__setDomainColors();
- *
- */
- __setDomainColors: function(arg){
- var target = arg.target;
- Biojs.console.enable("set domain colors to: "+target);
- var domain_colors = new Object();
- domain_colors[0] = "domain_gradient";
- domain_colors[1] = "domain_gradient2";
- domain_colors[2] = "domain_gradient3";
- domain_colors[3] = "domain_gradient4";
- domain_colors[4] = "domain_gradient5";
- domain_colors[5] = "domain_gradient6";
- var gradient = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "line_gradient")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "0").attr("x2", "2").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#999999");
- gradient.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "40%").attr("stop-color", "#eeeeee");
- gradient.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#cccccc");
- gradient.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#999999");
-
- var gradient2 = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "domain_gradient")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "1").attr("x2", "6.12").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient2.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#FF8585");
- gradient2.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "50%").attr("stop-color", "#7a1e74");
- gradient2.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#7a1e74");
- gradient2.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#ffffff");
-
- var gradient3 = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "domain_gradient2")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "1").attr("x2", "6.12").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient3.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#0099CC");
- gradient3.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "50%").attr("stop-color", "#7a1e74");
- gradient3.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#7a1e74");
- gradient3.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#ffffff");
-
- var gradient4 = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "domain_gradient3")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "1").attr("x2", "6.12").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient4.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#CCF2CC");
- gradient4.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "50%").attr("stop-color", "#7a1e74");
- gradient4.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#7a1e74");
- gradient4.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#ffffff");
-
- var gradient5 = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "domain_gradient4")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "1").attr("x2", "6.12").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient5.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#14101f");
- gradient5.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "50%").attr("stop-color", "#7a1e74");
- gradient5.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#7a1e74");
- gradient5.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#ffffff");
-
- var gradient6 = target.append("svg:defs").append("svg:linearGradient")
- .attr("id", "domain_gradient5")
- .attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("x1", "0").attr("y1", "1").attr("x2", "6.12").attr("y2", "0").attr("gradientTransform", "matrix(1,0,0,1,0,0)");
- gradient6.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "0%").attr("stop-color", "#623e32");
- gradient6.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "50%").attr("stop-color", "#7a1e74");
- gradient6.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "60%").attr("stop-color", "#7a1e74");
- gradient6.append("svg:stop").attr("webkit-tap-highlight-color", "rgba(0, 0, 0, 0)").attr("offset", "100%").attr("stop-color", "#ffffff");
-
- this.opt.domain_colors = domain_colors;
- },
-
-
-
- _collapseNode: function(d){
- //var d = arg.d;
- Biojs.console.enable("collapsing "+d.name);
- //d3.select(d).append("svg:circle")
- // .attr("r", function(d){
- // return d.children ? circle_size : 0; })
- // .attr("fill", function(d){return d.duplication == "Y"? "red":"green"})
- if (d.children) {
- d._collapsed_children = get_all_childs(d).length - 1;
- d._children = d.children;
- d.children = null;
-
- } else {
- d.children = d._children;
- d._children = null;
- }
- this.____update_tree(d);
- this.__update_annotation(d);
- },
- __expandNode: function(arg){},
-
-
- /*
- * Get maximal length of domain/aligned_seq.
- * @param {array} leaves The leaves of the tree with annotated domains.
- *
- * @example
- * myTree.__getMaxSeqLength();
- *
- */
- __getMaxSeqLength: function(args){
- var self = this;
- var leaves = args.leaves;
- var max_seq_length;
- Biojs.console.enable("looking at "+leaves.length+" leaves");
- for (var i = 0; i < leaves.length; i++) {
- Biojs.console.enable("first leaf is: ");
- Biojs.console.enable(leaves[i]);
- Biojs.console.enable(leaves[i].seq_length);
- var temp_x, temp_y;
- var temp_seq_length = leaves[i].seq_length;
-
- if ( temp_seq_length >= max_seq_length ) { max_seq_length = temp_seq_length; }
-
- }
- return max_seq_length;
- },
-
- /*
- * Sets model organism.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * myTree.__setModelOrganisms();
- *
- */
- __setModelOrganisms: function (){
-
- var model_organisms = new Object(); // or just {}
- model_organisms['Homo_sapiens'] = "red";
- model_organisms['Pan_troglodytes'] = "red";
-
- model_organisms['Mus_musculus'] = "blue";
- model_organisms['Xenopus_tropicalis'] = "blue";
- model_organisms['Gallus_gallus'] = "blue";
- model_organisms['Drosophila_melanogaster'] = "blue";
- model_organisms['Arabidopsis_thaliana'] = "blue";
- model_organisms['Caenorhabditis_elegans'] = "blue";
-
- this.opt.model_organisms = model_organisms;
- },
-
-
-
- /*
- * Prunes a tree given a selected subset of species
- * @param {string} a list of nodes of the tree.
- *
- * @example
- * myTree._pruneTree();
- *
- */
- _pruneTree: function (selected_nodes) {
- var self = this;
- var children2hide = new Object();
- var nodes2delete = new Array();
- for (var i = selected_nodes.length; i >= 0; i--) {
- if(!selected_nodes[i]){
- Biojs.console.enable("could not look at node "+i);
- continue;
- }
- var node = selected_nodes[i];
- var name = selected_nodes[i].name;
- var parent = node.parent;
- var taxon = selected_nodes[i].taxon;
-
- Biojs.console.enable("Looking at node: "+name+" taxon: "+taxon);
- //continue;
- // Leaf
- if(!node.children){
- Biojs.console.enable("is a leaf");
- }
- // can implement inner node deletions here
- //if(!self.opt.innerNodes[taxon] && node.children){
- if(!self.opt.model_organisms[taxon] && !node.children){
- //Biojs.console.enable("should be deleted");
- // tell parent
- var parent = node.parent;
- if (typeof parent.children2hide == 'undefined' || parent.children2hide.length == 0) {
- //Biojs.console.enable("creating empty children2hash in parent: "+parent.name);
- parent.children2hide = {};
- }
- parent.children2hide[name] = 1;
- //Biojs.console.enable("adding node "+name+" to be deleted in parent: "+parent.name);
- selected_nodes.splice(i, 1);
- //nodes2delete.push(node);
- }
- else{
- //Biojs.console.enable("keep it");
- }
- //}
- //else{
- // Inner Node
- Biojs.console.enable("is a innerNode");
- //Biojs.console.enable("list of children2hide");
- //Biojs.console.enable(node.children2hide);
- //Biojs.console.enable("list of children2add");
- //Biojs.console.enable(node.children2add);
- Biojs.console.enable(node.children2hide);
- Biojs.console.enable(node.children2add);
- if(node.children2hide){
- // since we are changing a node's children, let's make a backup.
- node._children = node.children;
- var size = 0, key;
- for (key in node.children2hide) {
- if (node.children2hide.hasOwnProperty(key)) size++;
- }
- //Biojs.console.enable("has "+node.children.length+" children and to hide: "+size);
- if(size == node.children.length && typeof node.parent != 'undefined'){
- Biojs.console.enable("hide all children");
- // hide children (d3 will look for .children by default)
- node.children = null;
- // tell the parent about this
- if (typeof parent.children2hide == 'undefined' || parent.children2hide.length == 0) {
- //Biojs.console.enable("creating empty children2hash in parent: "+parent.name);
- parent.children2hide = {};
- }
- Biojs.console.enable("splice current node from selected nodes");
- parent.children2hide[name] = 1;
- //selected_nodes.splice(i, 1);
- //nodes2delete.push(node);
-
- // tell parent
- //Biojs.console.enable("now we have: 0 nodes");
- }
- else{
- //hide only a few nodes
- //Biojs.console.enable("looping over "+node.children.length+" children");
- //Biojs.console.enable(node.children);
-
- var copy_of_children = node.children.slice(0);
- for (var j = 0 ; j < node.children.length; j++) {
- var curr_child = node.children[j];
- var child_name = node.children[j].name;
- Biojs.console.enable("looking at child: "+child_name);
- if(node.children2hide[child_name]){
- Biojs.console.enable("slicing it no: "+j+" out!")
- copy_of_children.splice(j, 1);
- }
- //else{
- //}
- }
- // now copy back to children
- node.children = copy_of_children.slice(0);
- // do we need to copy a child child here?
- // in case we deleted a child node and there is only one left (A)
- // -> mark current node as to be deleted from parent.children
- // but give him a copy of the current child node A
- }
- }
-
- if(node.children2add){
-
- var size_children2add = 0
- for (key in node.children2add) {
- if (node.children2add.hasOwnProperty(key)) size_children2add++;
- }
- //for(var k=0; k < node.children2add.length; k++){
-
- //if (typeof node.children == 'undefined' || node.children.length == 0) {
- // Biojs.console.enable("setting children to 0");
- // node.children = [];
- //}
- node.children = ( typeof node.children != 'undefined' && node.children instanceof Array ) ? node.children : [];
-
- for (key in node.children2add) {
- //Biojs.console.enable("will add node "+key)
- node.children.push(node.children2add[key]);
- }
- //Biojs.console.enable("has "+node.children.length+" children and to add: "+size_children2add);
- //Biojs.console.enable("afterwards has "+node.children.length+" children");
- }
-
- if(typeof node.children != 'undefined' && node.children instanceof Array){
- Biojs.console.enable("now we have: "+node.children.length+" nodes");
- if(node.children.length == 1 && typeof node.parent != 'undefined'){
- if (typeof parent.children2add == 'undefined' || parent.children2add.length == 0) {
- //Biojs.console.enable("adding empty children2add array");
- parent.children2add = {};
- }
- //Biojs.console.enable("well, let's keep node "+node.children[0].name+" in the parent");
- parent.children2add[node.children[0].name] = node.children[0];
- //Biojs.console.enable("ok, we tell the parent "+parent.name+" to add child "+curr_child.name);
- //Biojs.console.enable(parent.children2add);
-
- Biojs.console.enable("wow, just one child. tell my parent to hide/ignore this inner node!");
- if (typeof parent.children2hide == 'undefined' || parent.children2hide.length == 0) {
- //Biojs.console.enable("creating empty children2hash in parent: "+parent.name);
- parent.children2hide = {};
- }
- parent.children2hide[name] = 1;
- Biojs.console.enable("splice current node from selected nodes");
- selected_nodes.splice(i, 1);
- //nodes2delete.push(node);
- }
- }
- //if(typeof node.children == 'undefined' && node.children instanceof Array){
- //}
- }
-
- Biojs.console.enable("done with the nodes");
-
- //Biojs.console.enable("have to delete "+nodes2delete.length+" nodes");
- //for (var i = 0; i < nodes2delete.length; ++i) {
- // var obj = nodes2delete[i];
- // Biojs.console.enable("delete: "+obj.name);
- //}
- //sdsdad
-
- // get a list of leaf
-
- //var selected_nodes = selected_nodes
- /* Biojs.console.enable("showing model tree only");
- var filtered_nodes = copy_of_nodes.filter(function(d){
-
- var current_node = d;
- var taxon = d.taxon;
-
- // is leaf node
- if(!d.children){
- if(!self.opt.model_organisms[taxon]){
- var parent = d.parent;
- if(parent.children){
- var i = 0;
- while(i < parent.children.length) {
- var data = parent.children[i].taxon;
- if(!self.opt.model_organisms[data]){
- var child = parent.children.splice(i,1);
- }
- else{i++;}
- }
- Biojs.console.enable("parent now has: "+parent.children+" childen");
- if(!parent.children){
- var parent_of_parent
- }
- }
- }
- else{
- return d;
- }
- }
- else{
- return d;
- }
- }); */
-
- function prune(array, label) {
- for (var i = 0; i < array.length; ++i) {
- var obj = array[i];
- var taxon = obj.taxon;
- Biojs.console.enable("looking at taxon: "+taxon);
- if (taxon === label) {
- //if(!self.opt.model_organisms[taxon]){
- // splice out 1 element starting at position i
- array.splice(i, 1);
- //return true;
- //continue;
- Biojs.console.enable("found label: "+taxon);
- }
- if (typeof obj.children !== 'undefined' && obj.children.length > 0) {
- var no_children = obj.children.length;
- obj.node_type = "innerNode";
- Biojs.console.enable("internal node with "+no_children+" children");
- Biojs.console.enable("node_type is "+obj.node_type);
- if (prune(obj.children, label)) {
- if (obj.children.length === 0) {
- // delete children property when empty
- //delete obj.children;
- obj._children = obj.children;
- obj.children = null;
-
- }
- return true;
- }
- }
- else{
- if(obj.node_type == "innerNode"){
- Biojs.console.enable("is an innerNode, but is empty. splicing i:"+i);
- array.splice(i, 1);
- }
- Biojs.console.enable("must be a leaf");
- }
-
- }
- }
- //var wasItPruned = prune(selected_nodes, "Pan_troglodytes");
- //var wasItPruned = prune(selected_nodes, "Homo_sapiens");
- //var wasItPruned = prune(selected_nodes, "Homininae");
- //var wasItPruned = prune(copy_of_nodes, "Pan_troglodytes");
- //var wasItPruned = prune(copy_of_nodes, "Pongo_abelii");
- //var wasItPruned = prune(copy_of_nodes, "Gorilla_gorilla");
- //var wasItPruned = prune(copy_of_nodes, "Tarsius_syrichta");
- //var wasItPruned = prune(copy_of_nodes, "Tupaia_belangeri");
- //var wasItPruned = prune(copy_of_nodes, "Microcebus_murinus");
- //var wasItPruned = prune(copy_of_nodes, "Otolemur_garnettii");
- //var wasItPruned = prune(copy_of_nodes, "Callithrix_jacchus");
- //var wasItPruned = prune(copy_of_nodes, "Macaca_mulatta");
-
- },
- _focus: function(d) {
- var self = this;
-
- // determine the subset of
- if(self.current_d){
- self.root = self.current_d;
- }
- else{
- self.root = d;
- }
- self.____update_tree();
- }
- ,
- _reset_tree: function(d) {
- var self = this;
-
- // determine the subset of
-
- this.root = this.all_data;
- self.____update_tree();
- self.__update_annotation();
- },
- _prune: function(array, label) {
- var self = this;
- for (var i = 0; i < array.length; ++i) {
- var obj = array[i];
- if (obj.label === label) {
- // splice out 1 element starting at position i
- array.splice(i, 1);
- return true;
- }
- if (obj.children) {
- if (self._prune(obj.children, label)) {
- if (obj.children.length === 0) {
- // delete children property when empty
- delete obj.children;
-
- // or, to delete this parent altogether
- // as a result of it having no more children
- // do this instead
- array.splice(i, 1);
- }
- return true;
- }
- }
- }
- },
-
-
- _addLegend: function (args) {
- var self = this;
- var target = args.target;
- var legend_dictionary = args.legend_dictionary;
- var html_text = "";
-
- //html_text += "";
- for (var key in legend_dictionary) {
- Biojs.console.enable(""+key+" ");
- html_text += ""+key+" ";
- //html_text += ""+key+" ";
- }
- //html_text += " ";
- html_text += " ";
-
- jQuery("#"+target).html(html_text);
- Biojs.console.enable("added to #legend_panel: "+html_text);
- },
-
- _buildContextMenu: function(d){
- var self = this;
- jQuery("").appendTo('#my_custom_menu ul');
- jQuery(" ").appendTo('#my_custom_menu ul');
- jQuery("").appendTo('#my_custom_menu ul');
- },
-
- _buildDivs: function () {
- var self = this;
-
- //this._headerDiv = jQuery('
').appendTo(this._contentcontainer);
-
- jQuery(
- //''
- ).appendTo('#tv_controls');
- //jQuery('Lappen
').appendTo('#tv_controls');
- Biojs.console.enable("finished building div");
- //jQuery('
').appentTo(jQuery("#tv_controls"));
-
-
- // font size
- jQuery('img.increase_font').click(function() {
- self.opt.fontSize = parseInt(self.opt.fontSize) + 1 + "px";
- d3.select("svg").selectAll(".text").attr("font-size", function(d){ return self.opt.fontSize; });
- });
-
- jQuery('img.decrease_font').click(function() {
- self.opt.fontSize = parseInt(self.opt.fontSize) - 1 + "px";
- d3.select("svg").selectAll(".text").attr("font-size", function(d){ return self.opt.fontSize; });
- });
-
-
-
- },
- /*
- * Shows the columns indicated by the indexes array.
- * @param {string} seq The sequence strand.
- * @param {string} [identifier] Sequence identifier.
- *
- * @example
- * myTree.__setModelOrganisms();
- *
- */
- _setTaxaToShow: function (){
-
- var show_taxa = new Object();
- show_taxa['Metazoa'] = 1;
- show_taxa['Bilateria'] = 1;
- show_taxa['Mammalia'] = 1;
- show_taxa['Dipteria'] = 1;
- show_taxa['Primates'] = 1;
- show_taxa['Arabidopsis_thaliana'] = 1;
-
-
- this.opt.show_taxa = show_taxa;
- },
- __drawProteinDomains: function (){
- Biojs.console.enable("drawing protein domains");
- // Sequences
- var rects = draw_sequences({nodeEnter: this.nodeEnter,
- domainScale : this.opt.domainScale ,
- leaf_group_x : this.opt.leaf_group_x,
- sequence_start_y : this.opt.sequence_start_y,
- visibility : ""});
- // Domains
- var domains = rects.selectAll(".domain").data(function(d) { return d.domains; })
- var all_domains = draw_domains({domains : domains,
- sequence_start_y : this.opt.sequence_start_y,
- domainScale: this.opt.domainScale,
- sequence_rect_width : this.opt.sequence_rect_width,
- leaf_group_x : this.opt.leaf_group_x,
- domain_colors : this.opt.domain_colors,
- visibility: "" });
-
- }
-},
-{
- EVT_ON_SELECTION_CHANGE: "onSelectionChange",
- EVT_ON_SELECTION_CHANGED: "onSelectionChanged",
- EVT_ON_ANNOTATION_CLICKED: "onAnnotationClicked"
-
-});
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.UniProtDiseaseSummary.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.UniProtDiseaseSummary.js
deleted file mode 100755
index eb8d0934d5..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.UniProtDiseaseSummary.js
+++ /dev/null
@@ -1,375 +0,0 @@
-/**
- * Component to present UniProt disease information.
- *
- * @class
- * @extends Biojs
- *
- * @author Rafael C Jimenez
- * @version 1.0.0
- * @category 2
- *
- * @requires jQuery 1.7.2
- * @dependency
- *
- *
- * @requires Biojs.UniProtDiseaseSummary.css
- * @dependency
- *
- *
- * @param {Object} options An object with the options for this component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- * @option {string} uniProtDasUrl
- * Url pointing to an XML including UniProt infomration in DAS format
- *
- * @option {string} keywordFiltereing [['cancer','brain']]
- * List of keywords to filter disease information
- *
- * @option {string} [proxyUrl='../biojs/dependencies/proxy/proxy.php']
- * Since the same origin policy ({@link http://en.wikipedia.org/wiki/Same_origin_policy}) in the browsers
- * Biojs include a proxy script in PHP which redirects Ajax requests from local to any other domain.
- * You can use tour own proxy script by modifying this value.
- *
- * @option {string} width [100%]
- * Defines the width of the component
- *
- * @option {string} referencesColumnWidth [200px]
- * Defines the width of the columns with reference links
- *
- * @option {boolean} tableHeader
- * Boolean value to control the display of the table header
- *
- * @option {boolean} componentTitle
- * Boolean value to control the display of the title of the component
- *
- * @example
- * var instance = new Biojs.UniProtDiseaseSummary({
- * target: 'YourOwnDivId',
- * uniProtDasUrl: 'http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/features?segment=P08123;type=BS:01019',
- * keywordFiltereing: ['osteogenesis','lipoblastoma'],
- * proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- * width: '100%',
- * referencesColumnWidth: '150px',
- * tableHeader: false,
- * componentTitle: false
- * });
- *
- */
-
-
-Biojs.UniProtDiseaseSummary = Biojs.extend (
- /** @lends Biojs.UniProtDiseaseSummary# */
- {
- constructor: function (options) {
- //Biojs.console.enable();
- this.setUniProtDasUrl(this.opt.uniProtDasUrl);
- this._component_wrapper_id = "UDS_component_wrapper";
- },
-
- /**
- * Set an URL to start the query and visualization
- * @param {string} uniProtDasUrl DAS XML
- *
- * @example
- * instance.setUniProtDasUrl("http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/features?segment=P37173;type=BS:01019");
- *
- * @example
- * instance.setUniProtDasUrl("http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/features?segment=P08123;type=BS:01019");
- *
- */
-
- setUniProtDasUrl: function(uniProtDasUrl){
- var self = this;
- self._clearHtmlTemplate();
- /* URL where to get DAS XML */
- self._url;
- if(self.opt.proxyUrl != ""){
- self._url= self.opt.proxyUrl + "?url=" + uniProtDasUrl;
- } else {
- self._url= uniProtDasUrl;
- }
-
- /* get XML */
- jQuery.ajax({
- type: "GET",
- url: self._url,
- dataType: "xml",
- success: function(a){self._processDasUniProtXml(a);},
- error: function(a){self._processErrorRequest(a);}
- });
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._processErrorRequest
- * Purpose: Process request error
- * Returns: -
- * Inputs: textStatus -> {String} Text satus
- */
- _processErrorRequest: function (textStatus){
- var self = this;
- Biojs.console.log("ERROR: " + textStatus );
- self.raiseEvent( Biojs.UniProtDiseaseSummary.EVT_ON_REQUEST_ERROR, { message: textStatus } );
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._drawHtmlTemplate
- * Purpose: Create HTML template
- * Returns: -
- * Inputs: -
- */
- _drawHtmlTemplate: function (){
- var _selector = "#" + this.opt.target;
- var _container = jQuery(_selector);
- var _tableTitle = jQuery('
').appendTo(_container);
- jQuery("
").appendTo(_tableTitle);
- jQuery("
").appendTo(_tableTitle);
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._clearHtmlTemplate
- * Purpose: Remove component content
- * Returns: -
- * Inputs: -
- */
- _clearHtmlTemplate: function (){
- var _selector = "#" + this.opt.target;
- var _container = jQuery(_selector).html('');
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._drawComponentTitle
- * Purpose: Draw component title
- * Returns: -
- * Inputs: -
- */
- _drawComponentTitle: function (){
- if(this.opt.componentTitle){
- var _selector = "#" + this._component_wrapper_id;
- var _container = jQuery(_selector);
- var _tableTitle = jQuery("Involvement in disease
").appendTo(_container);
- }
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._drawComments
- * Purpose: Draw disease main summary using UniProt disease comments
- * Returns: -
- * Inputs: -
- */
- _drawComments: function (){
- var _container = jQuery("#UDS_info");
- var _tableWrapper = jQuery("
");
- var _table = jQuery('').appendTo(_tableWrapper);
- if(this.opt.tableHeader){
- var _fisrtRow = jQuery("").appendTo(_table);
- jQuery("Notes ").appendTo(_fisrtRow);
- jQuery("References ").appendTo(_fisrtRow);
- }
- /* Print table */
- var isVisible = true;
- var rowType = "UDS_even";
- var commmentsDisplayed = 0;
- for(i=0; i 0) {
- isVisible = this._isAnyKewordInText(this.opt.keywordFiltereing, this._comments[i].notes[0]);
- }
- /* Print table */
- if (isVisible) {
- if (rowType == "UDS_odd") {
- rowType = "UDS_even";
- }
- else {
- rowType = "UDS_odd";
- }
- var _row = jQuery(" ").appendTo(_table);
- jQuery("" + this._comments[i].notes[0] + " ").appendTo(_row);
- var reference = "";
- var omimAccs = "";
- var pubmedAccs = "";
- /* Display OMIM */
- for (j = 0; j < this._comments[i].omimAccs.length; j++) {
- omimAccs += '' + this._comments[i].omimAccs[j] + ' , ';
- }
- if (omimAccs.length > 0) {
- omimAccs = omimAccs.substring(0, omimAccs.length - 2);
- omimAccs = "Links to OMIM: " + omimAccs + "
";
-
- }
- /* Display Pubmed */
- for (k = 0; k < this._comments[i].pubmedAccs.length; k++) {
- pubmedAccs += '' + this._comments[i].pubmedAccs[k] + ' , ';
- }
- if (pubmedAccs.length > 0) {
- pubmedAccs = pubmedAccs.substring(0, pubmedAccs.length - 2);
- pubmedAccs = "Links to Pubmed: " + pubmedAccs + "
";
-
- }
- jQuery("" + omimAccs + pubmedAccs + " ").appendTo(_row);
- commmentsDisplayed++;
- }
- }
- if (commmentsDisplayed == 0) {
- jQuery("#UDS_warnings").html("No disease notes found for this query");
- } else {
- _tableWrapper.appendTo(_container);
- }
-
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._isAnyKewordInText
- * Purpose: Check if a keyword from a list is present in a text
- * Returns: -
- * Inputs: -
- */
- _isAnyKewordInText: function (keywords, text){
- /* Check keywords */
- var found = false;
- keyword_loop:
- for(j=0; j 0) {
- isVisible = this._isAnyKewordInText(this.opt.keywordFiltereing, this._keywords[i].label);
- }
- if (isVisible) {
- links += ""+this._keywords[i].label+" , ";
- }
- }
- if (links.length > 0) {
- links = links.substring(0, links.length - 2);
- links = "Keywords: " + links + "
";
- jQuery(links).appendTo(_container);
- } else {
- var _info = jQuery("#UDS_info").html();
- if(_info.length > 0){
- jQuery("#UDS_warnings").html("No disease keywords or notes found for this query");
- } else {
- jQuery("#UDS_warnings").html("No disease keywords found for this query");
- }
- }
-
- },
-
-
- /*
- * Function: Biojs.UniProtDiseaseSummary._processUniProtXml
- * Purpose: process XML
- * Returns: -
- * Inputs: xml -> {String} DAS XML
- */
- _processDasUniProtXml: function (xml){
- Biojs.console.log("SUCCESS: data received");
- this._keywords = new Array();
- this._comments = new Array();
- var self = this;
- jQuery(xml).find("FEATURE").each(function(){
- var xmlType = jQuery(this).find("TYPE")[0];
- var featureCategory = jQuery(xmlType).attr("category");
- if(featureCategory.toLowerCase() == "keyword"){
- self._setKeyword(this);
- } else if (featureCategory.toLowerCase() == "comment"){
- self._setComment(this);
- }
-
- });
- this._drawHtmlTemplate();
- this._drawComponentTitle()
- this._drawComments();
- this._drawKeywords();
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._setKeyword
- * Purpose: parse keyword information
- * Returns: -
- * Inputs: featureXml -> {String} DAS XML
- */
- _setKeyword: function (featureXml){
- var keyword = new Object();
- keyword.label = jQuery(featureXml).attr("label");
- keyword.link = "http://www.uniprot.org/keywords/?query=" + jQuery(featureXml).attr("label");
- this._keywords.push(keyword);
- },
- /*
- * Function: Biojs.UniProtDiseaseSummary._setComment
- * Purpose: parse comment information
- * Returns: -
- * Inputs: featureXml -> {String} DAS XML
- */
- _setComment: function (featureXml){
- /* Find OMIM accs and notes */
- var diseaseHeader = "DISEASE: ";
- var comment = new Object();
- comment.omimAccs = new Array();
- comment.pubmedAccs = new Array();
- comment.notes = new Array();
- jQuery(featureXml).find("NOTE").each(function(){
- var omimPatern = /\[MIM\:[0-9]*\]/i; //[MIM:166200]
- var note = jQuery(this).text();
- if (note.indexOf(diseaseHeader) == 0) {
- note = note.substring(diseaseHeader.length,note.length);
- }
- if(note.match(omimPatern) != null){
- var omim = note.match(omimPatern)[0];
- var omimIndexStart = note.indexOf(omim);
- var omimIndexEnd = parseInt(omimIndexStart) + omim.length;
- note = note.substring(0,omimIndexStart-1) + note.substring(omimIndexEnd,note.length);
- comment.omimAccs.push(omim.substring(5,omim.length-1));
- }
- comment.notes.push(note);
- });
- /* Find Pubmed accs */
- jQuery(featureXml).find("LINK").each(function(){
- var linkHref = jQuery(this).attr("href");
- pubmedAcc ="";
- var pubmedUrl = "http://www.ncbi.nlm.nih.gov/pubmed/";
- var pubmedUrlIndex = linkHref.indexOf(pubmedUrl);
- if(pubmedUrlIndex == 0){
- pubmedAcc = linkHref.substring(pubmedUrl.length,linkHref.length);
- comment.pubmedAccs.push(pubmedAcc);
- }
- });
- this._comments.push(comment);
- Biojs.console.log(comment.omimAccs);
- Biojs.console.log(comment.pubmedAccs);
- Biojs.console.log(comment.notes);
- },
-
-
-
- /**
- * Default values for the options
- * @name Biojs.UniProtDiseaseSummary-opt
- */
- opt: {
- target: 'uniprotDiseaseSummary',
- uniProtDasUrl: 'http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/features?segment=P08123;type=BS:01019',
- keywordFiltereing: [],
- proxyUrl: '../biojs/dependencies/proxy/proxy.php',
- width: '100%',
- referencesColumnWidth: '150px',
- tableHeader: false,
- componentTitle: false
- },
- /**
- * Array containing the supported event names
- * @name Biojs.UniProtDiseaseSummary-eventTypes
- */
- eventTypes: []
-});
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.js
deleted file mode 100755
index b09b92ccb2..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.js
+++ /dev/null
@@ -1,727 +0,0 @@
-/**
- * Main container of the BioJS library. It is the parent class for all the components.
- *
- * @namespace
- *
- */
-var Biojs = function() {
- // dummy
-};
-
-/**
- * @class
- * @param {string} eventType The name of the event.
- */
-Biojs.EventHandler = function(eventType) {
- /**
- * The name of the event.
- * @type {string}
- */
- this.eventType = eventType;
- /**
- * Array of the registered listeners.
- * @type {function[]}
- */
- this.listeners = [];
- /**
- * Register action listeners for the event.
- * @param {function} actionPerformed The action listener to be registered.
- */
- this.addListener = function ( actionPerformed ) {
- if ( (typeof actionPerformed) == "function" ) {
- this.listeners.push(actionPerformed);
- }
- };
- /**
- * Removes an action listener for the event.
- * @param {function} actionPerformed The action listener to be removed.
- */
- this.removeListener = function ( actionPerformed ) {
- if ( (typeof actionPerformed) == "function" ) {
- var pos = Biojs.Utils.indexOf(this.listeners,actionPerformed);
- if (pos!=-1)
- this.listeners.splice(pos,1);
- }
- };
- /**
- * Executes all listener actions registered in the listeners field.
- * @param {Object} eventObject The event' object to be passed as argument to the listeners.
- */
- this.triggerEvent = function( eventObject ) {
- for ( var i in this.listeners ) {
- this.listeners[i](eventObject);
- }
- }
-};
-
-/**
- * @class
- * @param {string} type The name of the event.
- * @param {Object} data An object containing the data for copying it in this event.
- * @param {Biojs} source The component source of the event.
- */
-Biojs.Event = function ( type, data, source ) {
-
- /**
- * The component which did triggered the event.
- * @type {Biojs}
- */
- this.source = source;
- /**
- * The name of the event.
- * @type {string}
- */
- this.type = type;
-
- for ( var key in data ) {
- this[key] = data[key];
- }
-};
-
-/**
- * @class
- *
- */
-Biojs.Utils = {
- /**
- * Clone all members from an object.
- * @param {object} object The object to be cloned.
- * @returns {object} A Clone of the object passed as argument.
- *
- */
- clone: function(obj) {
- var newObj = (obj instanceof Array) ? [] : {};
- for (i in obj) {
- if (obj[i] && typeof obj[i] == "object") {
- newObj[i] = Biojs.Utils.clone(obj[i]);
- } else {
- newObj[i] = obj[i];
- }
- }
- return newObj;
- },
-
- /**
- * Determine if an onject or array is empty.
- * @param {object|array} o Either object or array to figure out if empty or not.
- * @returns {bool} true if empty, false if don't
- */
- isEmpty: function(o){
- if (o instanceof Array) {
- return (o.length<=0);
- } else {
- for (var i in o) {
- if (o.hasOwnProperty(i)) {
- return false;
- }
- }
- return true;
- }
- },
-
- /**
- * Searches the array for the specified item, and returns its position.
- * The search will start at the specified position, or at the beginning if no start position is specified,
- * and end the search at the end of the array.
- *
- * Returns -1 if the item is not found.
- * If the item is present more than once, the indexOf method returns the position of the first occurence.
- *
- * indexOf is not supported in IE < v9
- *
- * @param {array} The array containing the element to look for.
- * @param {object} Required. The item to search for.
- * @param {int} Optional. Where to start the search.
- */
- indexOf : function(elem, arr, i){
- var len;
-
- if ( arr ) {
- if ( indexOf ) {
- return indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- /**
- * Cross-browser console for debugging.
- * The console is disabled by default. That means, all messages written by means Biojs.console.log("My Message") will be ignored.
- * Use Biojs.console.enable() to enable it.
- *
- * @example
- * // Enabling loggin messages
- * Biojs.console.enable();
- * ...
- * // Writing a log
- * Biojs.console.log("My Message");
- *
- * @type {Object}
- */
- console: {
- enable: function() {
- // Define a cross-browser window.console.log method.
- // For IE and FF without Firebug, fallback to using an alert.
- if (window.console) {
- /**
- * @ignore
- */
- // In this case, there are a console, perfect!
- this.log = function (msg) { console.log(msg) };
- } else {
- // We have not window.console, but it is Opera browser?
- if (window.opera) {
- /**
- * @ignore
- */
- // Right! then lets use window.opera.postError
- this.log = function (msg) { window.opera.postError(msg) };
- } else {
- // None console found!
- // Try to write the logs somewhere
- // That's it! in a new window, identified by 'Biojs.console'
- var consoleWin = window.open('','myconsole',
- 'width=350,height=250'
- +',menubar=0'
- +',toolbar=0'
- +',status=0'
- +',scrollbars=1'
- +',resizable=1');
-
- // We got it?
- if (consoleWin) {
- // Good, build a blank document into with a DIV 'Biojs.console'
- consoleWin.document.writeln(
- 'BioJS Console '
- +''
- +'
'
- +''
- );
- consoleWin.document.close();
-
- Biojs.console.domDocument = consoleWin.document;
- Biojs.console.domDivNode = consoleWin.document.getElementById("Biojs.console");
-
- /**
- * @ignore
- */
- // Finally, the log function will write into the DIV
- this.log = function (msg) {
- var message = '';
-
- if (msg instanceof Array) {
- for ( i=0; i < msg.length; i++ ) {
- message += '[' + i + ']=' + msg[i] + ' ';
- }
-
- } else if (msg instanceof String || typeof msg === "string") {
- message = msg;
-
- } else {
- for (var i in msg) {
- message += '[' + i + ']=' + msg[i] + ' ';
- }
- }
-
- textNode = Biojs.console.domDocument.createTextNode(message);
- line = Biojs.console.domDocument.createElement('pre');
- line.appendChild(textNode);
- Biojs.console.domDivNode.appendChild(line);
- };
-
- } else {
- // Game over! do not write logs, but let's tell to user by means an alert (sorry!)
- alert("Please activate the pop-up window in this page " +
- "in order to enable the BioJS console");
- }
- }
- }
- },
-
- log: function (msg) { ; /* Do nothing by default */ }
- }
-};
-
-/**
- * Extend this class Biojs in order to create a new component.
- * @param {object} instance The subclass.
- * @param {object} interface (optional) A second parameter passed to the extend method of a class defines the class interface.
- * @returns {object} SubClass The class with its own members and the inherited ones from Biojs.
- *
- * @example
- * Biojs.MyComponent = Biojs.extend(
- * { // instance
- * constructor: function(options) {
- * // constructor code here
- * },
- *
- * opt: { target: "divId" },
- *
- * eventTypes: [ "myEvent1", "myEvent2" ],
- *
- * getVersion: function() {
- * return Biojs.MyComponent.VERSION;
- * }
- * },
- * { // class interface
- * VERSION: "3.14.15"
- * });
- *
- * alert(Biojs.MyComponent.VERSION);
- *
- */
-Biojs.extend = function(_child, _static) { // subclass
- var extend = Biojs.prototype.extend;
-
- // build the prototype
- Biojs._prototyping = true;
-
- /**
- * @name proto
- * @constructs
- */
- var proto = new this;
-
- // Inherit parent' events to the child
- if (proto.eventTypes instanceof Array) {
- for ( var i in proto.eventTypes ) {
- _child.eventTypes.push(proto.eventTypes[i]);
- }
- }
-
- // Inherit parent' options to the child
- if (proto.opt instanceof Object) {
- for ( var key in proto.opt ) {
- _child.opt[key] = proto.opt[key];
- }
- }
-
- extend.call(proto, _child);
-
- /**
- * @ignore
- */
- proto.base = function() {
- // call this method from any other method to invoke that method's ancestor
- };
-
- delete Biojs._prototyping;
-
- // create the wrapper for the constructor function
- var constructor = proto.constructor;
- var klass = proto.constructor = function() {
-
- if (!Biojs._prototyping) {
-
- if (this.constructor == klass) { // instantiation
-
- // Create a instance of this class
- function BiojsComponent() {};
- BiojsComponent.prototype = proto;
- var instance = new BiojsComponent();
-
- // Change the default option's values
- // in the instance by the provided ones
- instance.setOptions(arguments[0]);
-
- // Set the event handlers
- instance.setEventHandlers(instance.eventTypes);
-
- // Set the unique id for the instance
- instance.biojsObjectId = Biojs.uniqueId();
-
- // register instance
- Biojs.addInstance(instance);
-
- // execute the instance's constructor
- constructor.apply(instance, arguments);
-
- // return the instance
- return instance;
-
- } else { // Calling to ancestor's constructor
- constructor.apply(this,arguments);
- }
- }
- };
-
- // build the class interface
- klass.ancestor = this;
- klass.extend = this.extend;
- klass.forEach = this.forEach;
- klass.implement = this.implement;
- klass.prototype = proto;
- /**
- * @ignore
- */
- klass.valueOf = function(type) {
- return (type == "object") ? klass : constructor.valueOf();
- };
- klass.toString = this.toString;
- extend.call(klass, _static);
-
- // class initialization
- if (typeof klass.init == "function") {
- klass.init();
- }
-
- return klass;
-};
-
-Biojs.prototype =
-/** @lends Biojs# */
-{
- extend: function(source, value) {
- if (arguments.length > 1) { // extending with a name/value pair
- var ancestor = this[source];
- if (ancestor && (typeof value == "function") && // overriding a method?
- // the valueOf() comparison is to avoid circular references
- (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) &&
- /\bbase\b/.test(value)) {
- // get the underlying method
- var method = value.valueOf();
- // override
- value = function() {
- var previous = this.base || Biojs.prototype.base;
- this.base = ancestor;
- var returnValue = method.apply(this, arguments);
- this.base = previous;
- return returnValue;
- };
- // point to the underlying method
- value.valueOf = function(type) {
- return (type == "object") ? value : method;
- };
- value.toString = Biojs.toString;
- }
- this[source] = value;
- } else if (source) { // extending with an object literal
- var extend = Biojs.prototype.extend;
- // if this object has a customised extend method then use it
- if (!Biojs._prototyping && typeof this != "function") {
- extend = this.extend || extend;
- }
- var proto = {toSource: null};
- // do the "toString" and other methods manually
- var hidden = ["constructor", "toString", "valueOf"];
- // if we are prototyping then include the constructor
- var i = Biojs._prototyping ? 0 : 1;
- while (key = hidden[i++]) {
- if (source[key] != proto[key]) {
- extend.call(this, key, source[key]);
- }
- }
- // copy each of the source object's properties to this object
- for (var key in source) {
- if (!proto[key]) extend.call(this, key, source[key]);
- }
- }
-
- return this;
- },
-
- /**
- * Register a function under an event type in order to execute it whenever the event is triggered.
- * @param {string} eventType The event to be listened.
- * @param {function} actionPerformed The action to be executed whenever the event occurs. it
- *
- *
- * @example
- *
- * var listener = function(eventObj){
- * alert("Selected: "+eventObj.start+", end: "+ eventObj.end);
- * }
- *
- * var mySequence = new Biojs.Sequence( {
- * sequence : "mlpglallllaawtaralevptdgnagllaepqiamfcgrlnmhmnvqngsgtktcidtkegilqy",
- * target : "#div0001",
- * format : 'CODATA',
- * id : 'P918283'
- * });
- *
- * mySequence.addListener('onSelectionChanged', listener);
- *
- * // HTML div tag with the id='div0001' must exist in the HTML document
- *
- */
- addListener: function(eventType, actionPerformed) {
- if (this._eventHandlers) {
- // register the listener in this._eventHandlers for the eventType
- for(var key in this._eventHandlers) {
- if ( eventType == this._eventHandlers[key].eventType ) {
- this._eventHandlers[key].addListener( actionPerformed );
- return;
- }
- }
- }
- },
-
- /**
- * Unregister a function under an event type in order to stop its execution it whenever the event is triggered.
- * @param {string} eventType The event to be listened.
- * @param {function} actionPerformed The action to be unregister.
- *
- *
- * @example
- * mySequence.removeListener('onSelectionChanged', listener);
- *
- * // HTML div tag with the id='div0001' must exist in the HTML document
- *
- */
- removeListener: function(eventType, actionPerformed) {
- if (this._eventHandlers) {
- // register the listener in this._eventHandlers for the eventType
- for(var key in this._eventHandlers) {
- if ( eventType == this._eventHandlers[key].eventType ) {
- this._eventHandlers[key].removeListener( actionPerformed );
- return;
- }
- }
- }
- },
-
- /**
- * Sets an event handler and an alias method for each string in the array eventTypes.
- * This method is executed automatically before constructing an instance, using the eventTypes array
- * that should be defined as member of subclass. Then, the resulting instance will have methods
- * named in the form instance.≶eventName>(actionPerformed) for all eventTypes.
- *
- * @param {string[]} eventTypes Array of names of the events to be set.
- *
- */
- setEventHandlers: function (eventTypes) {
- // Supposed that this._eventHandlers does not exist.
- this._eventHandlers = [];
- // Because the event handlers are not initialized yet
-
- var alias = function (handler) {
- return function (actionPerformed) {
- handler.listeners.push(actionPerformed);
- }
- };
-
- if ( typeof eventTypes == "object" ) {
- // Create an event handler for each eventType in eventTypes
- for ( var i=0; i < eventTypes.length; i++ ) {
- var handler = new Biojs.EventHandler( eventTypes[i] );
- this._eventHandlers.push( handler );
- // Creates the alias this. ()
- // as alternative to be used instead of this.addistener(, )
-
- this[ eventTypes[i] ] = new alias(handler);
- }
- }
- },
-
- /**
- * Trigger the registered functions under an event type.
- * @param {string} eventType The event to be raised.
- * @param {Object} params The values to be included into Biojs.Event object.
- *
- * @example
- *
- * Biojs.MyComponent = Biojs.extend({
- * // ...
- * // code before the event
- *
- * this.raiseEvent('onSelectionChanged', {start : start, end : end});
- *
- * // code after the event
- * // ...
- * });
- *
- */
- raiseEvent : function(eventType, eventObj) {
- for(var key in this._eventHandlers ) {
- if ( eventType == this._eventHandlers[key].eventType ) {
- this._eventHandlers[key].triggerEvent( eventObj );
- return;
- }
- }
- },
-
-
- //
- // Save the option values to be applied to this component
- // options -> [Object] containing the values
- //
- setOptions : function (options) {
- if ( this.opt instanceof Object )
- {
- this.opt = Biojs.Utils.clone(this.opt);
- for ( var key in options ) {
- this.opt[key] = options[key];
- }
- }
- },
-
- //
- //
- // source -> [BioJs] the another component
- // eventType -> [string] the event to be listened
- // callbackFunction -> [function] the action to be executed
- //
- /**
- * Connect this component with another by means listening its events.
- * @param {Biojs} source The another component.
- * @param {string} eventType The event to be listened.
- * @param {function} actionPerformed The action to be executed whenever the event occurs. it
- *
- *
- * @example
- *
- * var mySequence = new Biojs.Sequence( {
- * sequence : "mlpglallllaawtaralevptdgnagllaepqiamfcgrlnmhmnvqngsgtktcidtkegilqy",
- * target : "#div0001",
- * format : 'CODATA',
- * id : 'P918283'
- * });
- *
- * var anotherSequence = new Biojs.Sequence({
- * sequence : "laawtaralevptmlpglallldgnagllaepqi",
- * target : "#div0002",
- * });
- *
- * anotherSequence.listen(
- * mySequence,
- * "onSelectionChange",
- * function( eventObj ) {
- * anotherSequence.setSelection(eventObj.start, eventObj.end);
- * }
- * );
- *
- */
- listen: function ( source, eventType, callbackFunction ) {
- if ( source instanceof Biojs ){
- if ( typeof callbackFunction == "function" ) {
- source.addListener(eventType, callbackFunction);
- }
- }
- },
-
- getId: function () {
- return this.biojsObjectId;
- }
-
-};
-
-// initialize
-Biojs = Biojs.extend({
- constructor: function() {
- this.extend(arguments[0]);
- },
-
- vaueOf: function () { return "Biojs" }
-},
-/** @static */
-/** @lends Biojs */
-{
- /**
- * Ancestor of the Biojs class (Object).
- * @type {Object}
- */
- ancestor: Object,
- /**
- * Version of the Biojs class.
- * @type {string}
- */
- version: "1.0",
-
- forEach: function(object, block, context) {
- for (var key in object) {
- if (this.prototype[key] === undefined) {
- block.call(context, object[key], key, object);
- }
- }
- },
-
- implement: function() {
- for (var i = 0; i < arguments.length; i++) {
- if (typeof arguments[i] == "function") {
- // if it's a function, call it
- arguments[i](this.prototype);
- } else {
- // add the interface using the extend method
- this.prototype.extend(arguments[i]);
- }
- }
- return this;
- },
- /**
- * Get string.
- * @type {function}
- */
- toString: function() {
- return String(this.valueOf());
- },
- /**
- * Get a unique identifier. It is useful to assign the instance' id
- * @type {function}
- */
- uniqueId: function() {
- if ( typeof Biojs.prototype.__uniqueid == "undefined" ) {
- Biojs.prototype.__uniqueid = 0;
- }
- return Biojs.prototype.__uniqueid++;
- },
- /**
- * Register a Biojs instance.
- * @type {function}
- */
- addInstance: function ( instance ) {
- if ( typeof Biojs.prototype.__instances == "undefined" ) {
- Biojs.prototype.__instances = {};
- }
- return Biojs.prototype.__instances[instance.biojsObjectId] = instance;
- },
- /**
- * Get a Biojs instance by means of its id.
- * @type {function}
- */
- getInstance: function ( id ) {
- return Biojs.prototype.__instances[id];
- },
- /**
- * Set a variable in the DOM window.
- * @type {function}
- */
- registerGlobal: function ( key, value ) {
- window[key] = value;
- },
- /**
- * Get a variable value from the DOM window.
- * @type {function}
- */
- getGlobal: function(key){
- return window[key];
- },
- /**
- * Cross-browser console for debugging.
- * This is a shorcut for {@link Biojs.Utils.console}
- *
- * @type {Object}
- *
- */
- console: Biojs.Utils.console,
-
- EventHandler: Biojs.EventHandler,
-
- Event: Biojs.Event,
-
- Utils: Biojs.Utils
-
-});
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/javascript/Biojs.wigExplorer.js b/src/lib/biojs-1.0/src/main/javascript/Biojs.wigExplorer.js
deleted file mode 100755
index c8523439fb..0000000000
--- a/src/lib/biojs-1.0/src/main/javascript/Biojs.wigExplorer.js
+++ /dev/null
@@ -1,864 +0,0 @@
-/**
- * This component uses the D3 library to visualise a wig formatted file as an area chart, with panning and zooming functionality.
- *
- * @class
- * @extends Biojs
- *
- * @author Anil Thanki
- * @version 1.0.0
- * @category 2
- *
- *
- * @requires D3
- * @dependency
- *
- *
- * @requires jQuery UI 1.8.2+
- * @dependency
- *
- * @requires jQuery Core 1.6.4
- * @dependency
- *
- * @requires jQuery UI CSS 1.8.2
- * @dependency
- *
- * @requires jQuery.tooltip
- * @dependency
- *
- * @requires jQuery.tooltip CSS
- * @dependency
- *
- * @requires biojs.wigExplorer.css
- * @dependency
- *
- *
- * @requires jQuery UI CSS 1.8.2
- * @dependency
- *
- *
- * @param {Object} options An object with the options for wigExplorer component.
- *
- * @option {string} target
- * Identifier of the DIV tag where the component should be displayed.
- *
- *
- * @example
- * var instance = new Biojs.wigExplorer({
- * target: "YourOwnDivId",
- * selectionBackgroundColor: 'steelblue',
- * dataSet: "../biojs/data/wigExplorerDataSet5.txt"
- * });
- *
- * @option {string} dataSet
- * File in text format including input data. Examples of text file ...
- * variableStep chrom=chr2 span=5
- * 10 34
- * 20 41
- * 30 46
- * 40 49
- * 50 52
- *
- * ...
- *
- * or
- *
- * fixedStep chrom=chr2 start=10 step=10 span=5
- * 34
- * 41
- * 46
- * 49
- * 52
- *
- * ...
- *
- * @option {string} [selectionBackgroundColor]
- * Name of the colour to be set as background for area chart
- *
- */
-
-
-Biojs.wigExplorer = Biojs.extend(
- /** @lends Biojs.wigExplorer# */
-
-
- {
- zoomSlider: '',
- slider_stop: 0,
- slider_start: 0,
- track: [],
- width: 1,
- height: 1,
- data_last_start: 1,
- data_first_start: 1,
- max: 0,
- span: null,
- chrom: [],
- data: [],
- main_data: [],
-
-
- constructor: function (options) {
-
- var self = this;
- self.vis = null;
- self.color = null;
- self.foci = [];
-
-
- this.track; // data
-
-
- this._container = $("#wigFeaturePainter-holder");
- $(this._container).addClass("graph");
-
-
- // Apply options values
- this._container.css({
- 'font-family': self.opt.fontFamily, // this is one example of the use of self instead of this
- 'background-color': self.opt.selectionBackgroundColor,
- 'color': self.opt.fontColor,
- 'font-size': '36px',
- 'text-align': 'center',
- 'vertical-align': 'middle',
- 'width': '700px',
- 'height': '100px',
- 'bottom': '0px'
- });
-
- // Disable text selection and
- // Change the selection mouse pointer
- // from text to hand.
- this._container.css({
- '-moz-user-select': 'none',
- '-webkit-user-select': 'none',
- 'user-select': 'none'
- });
-
- this.color = self.opt.selectionBackgroundColor;
- this.paintFeatures(self.opt.dataSet);
-
- },
-
- /**
- * Default values for the options
- * @name Biojs.wigExplorer-opt
- */
- opt: {
- target: "YourOwnDivId",
- dataSet: "",
- fontFamily: '"Andale mono", courier, monospace',
- fontColor: "white",
- backgroundColor: "",
- selectionFontColor: "black",
- selectionBackgroundColor: "yellow",
- width: "100%",
- height: "130",
- radius: 10,
- reference: null
- },
-
- /**
- * Array containing the supported event names
- * @name Biojs.wigExplorer-eventTypes
- */
- eventTypes: [
- /**
- * No events added for now but can be added in future
- */
- ],
-
-
- /**
- * Repaints everything: ruler, shapes, and legend.
- * @param {int} [newStart] Zoom from this sequence start value.
- * @param {int} [newStop] Zoom to this sequence end value.
- *
- * @example
- * instance._updateDraw();
- *
- */
- _updateDraw: function (newStart, newStop, target) {
- var self = this;
- //recalculate start and stop
- if (newStart && newStop) {
- this.slider_start += newStart;
- this.slider_stop += newStop;
- }
-
- if (target) {
- } else {
- target = self.opt.target;
- }
- if (this.slider_start < this.data_first_start) {
- if (newStart == newStop) {
- this.slider_stop += this.data_first_start - this.slider_start;
- }
- this.slider_start = this.data_first_start;
-
- }
-
- if (this.slider_stop > this.data_last_start) {
-
- if (newStart == newStop) {
- this.slider_start += this.data_last_start - this.slider_stop;
- }
- this.slider_stop = this.data_last_start;
- }
- //recalculate start and stop
- if ((parseFloat(this.slider_start) < parseFloat(this.slider_stop))) {
- this.paintWig(this.slider_start, this.slider_stop, target);
- }
- },
-
- /**
- * Paint the features according to the values specified in the json object defined when creating the object.
- * This method initializes the holder, paints the slider and print button depending on the options, and
- * paints the features and legend.
- *
- * @example
- * instance.paintFeatures("path-to-wig.txt");
- *
- * @param {string} dataSet Location of the file with the input data in text format.
- * variableStep chrom=chr2 span=5
- * 10 34
- * 20 41
- * 30 46
- * 40 49
- * 50 52
- *
- * ...
- *
- * or
- *
- * fixedStep chrom=chr2 start=10 step=10 span=5
- * 34
- * 41
- * 46
- * 49
- * 52
- *
- * ...
- *
- */
- paintFeatures: function (dataSet) {
- if (dataSet != undefined) {
- this._setDataSource(dataSet);
- this._init();
- } else {
- alert('Dataset not defined ');
- }
-
- },
-
- /**
- * Private: Initializes the component.
- */
- _init: function () {
- Biojs.wigExplorer.myself = this;
- var self = this;
- var painter_div = jQuery("#" + this.opt.target);
- painter_div.text('');
- painter_div.append(this._withSliderOnly(100));
-
- painter_div.append('
');
- var holder = document.getElementById(this.opt.target + '_wigFeaturePainter-holder');
- if (!holder) {
- this.$errorMsg = jQuery('
')
- .html('There was an unexpected failure, the image cannot be displayed.')
- .dialog({
- autoOpen: true,
- title: 'Error',
- modal: true
- });
- throw "Error";
- }
-
-
- holder.innerHTML = "";
- holder.style.height = "250px";
- holder.style.width = "700px";
- this.width = $('#' + self.opt.target + '_wigFeaturePainter-holder').width(),
- this.height = $('#' + self.opt.target + '_wigFeaturePainter-holder').height(),
- this.r = self.opt.radius;
-
- self.opt.width = self.opt.width.toString();
-
- if (self.opt.width.indexOf("%") >= 1)
- self.opt.width = self.opt.width.toString();
- else
- self.opt.width = parseInt(this.width);
-
- //had similar problem before so I used contains and it should works
- self.opt.height = self.opt.height.toString();
- if (self.opt.height.indexOf("%") >= 1)
- self.opt.height = self.opt.height.toString();
- if (self.opt.height.indexOf("%") != -1)
- this.height = this.height * (self.opt.height.substring(0, self.opt.height.length - 1) * 1) / 100.0;
- else
- this.height = self.opt.height * 1;
- self.opt.height = parseInt(this.height);
-
- self.color = function () {
- return d3.scale.ordinal().range(self.colors);
- }();
-
- jQuery.ajax({
- type: "GET",
- url: self.opt.dataSet,
- dataType: "text",
- success: function (data) {
- var wig = [];
- var max = 0
- var data_split = data.split("\n")
- var data_len = data_split.length;
- if (data.indexOf("variableStep") >= 0 || data.indexOf("fixedStep") >= 0) {
- self.chrom = []
- for (var i = 0; i < data_len; i++) {
- if (data_split[i].indexOf("chrom") >= 0) {
- var chr = data_split[i].split(/\s+/)[1].split("=")[1];
- if (self.chrom.indexOf(chr) < 0) {
- self.chrom.push(chr);
- }
- }
- }
- self._buildReferenceSelector();
- } else {
- alert("Unknown format detected")
- }
-
- },
- error: function (qXHR, textStatus, errorThrown) {
- alert(textStatus);
- }
- });
- },
-
-
- /**
- * Private: Function to create reference dropdown.
- * @ignore
- */
- _buildReferenceSelector: function () {
- var self = this;
-
- this._headerDiv = jQuery('#' + self.opt.target + '_selectorMenu');
- this._headerDiv.css({
- 'font-family': '"Heveltica Neue", Arial, "sans serif"',
- 'font-size': '14px'
- }).append('Reference: ');
-
- var selector_html = "";
-
- for (var i = 0; i < this.chrom.length; i++) {
- selector_html += "" + this.chrom[i] + " "
- }
- selector_html += "/";
-
- this._formatSelector = jQuery(selector_html).appendTo(self._headerDiv);
-
- this._formatSelector.change(function (e) {
- self.opt.reference = jQuery(this).val();
- self.setReference(self.opt.reference, self.opt.target)
- });
-
- self.setReference(this._formatSelector.val())
- },
-
-
- /**
- * Private: Function to create slider only.
- * @param {int} sizeX Width.
- * @ignore
- */
- _withSliderOnly: function (sizeX) {
- var self = this;
- var text =
- '' +
- '' +
- '' +
- '
' +
- ' ' +
- '' +
- ' ' +
- ' ' +
- '
' +
- ' ';
- return text;
- },
- /**
- * Private: Paints the slider
- * Purpose: set up slider buttons
- * Returns: -
- * @ignore
- */
- _paintSlider: function () {//holder size, left and right margins of the holder, and number of amino acids
- var sequenceLength = 100;//config.sequenceLength;
- var self = this;
- if (!document.getElementById(self.opt.target + "_wigFeaturePainter-slider")) {
- return;
- }
-
- var slider_div = jQuery("#" + self.opt.target + "_wigFeaturePainter-slider");
- slider_div.text('');
- slider_div.append(' ');
- slider_div.append('
');
-
- var length = this.track.length - 1;
- var difference = parseInt(this.track[length][0]) - parseInt(this.track[0][0]);
-
- var diff = parseInt(difference / 20);
- this.zoomSlider = jQuery('
').appendTo(slider_div);
-
-
- var updater_html = '
' +
- '
' +
- '
' +
- '
';
-
- jQuery(slider_div).html("")
- this._updateSelector = jQuery(updater_html).appendTo(slider_div);
-
- this._updateSelector.click(function (e) {
- if (jQuery(this).hasClass("left")) {
- self._updateDraw(-1 * diff, -1 * diff, self.opt.target);
- } else if (jQuery(this).hasClass("right")) {
- self._updateDraw(diff, diff, self.opt.target);
- } else if (jQuery(this).hasClass("zoomin")) {
- self._updateDraw(diff, -1 * diff, self.opt.target);
- } else if (jQuery(this).hasClass("zoomout")) {
- self._updateDraw(-1 * diff, diff, self.opt.target);
- }
- });
- },
-
-
- /**
- * Select reference from Wig file from the given parameter and then parse Data for reference
- *
- * @example
- * instance.setReference("ref_name")
- *
- */
- setReference: function (ref_chr) {
- var self = this;
- var flag = false;
- jQuery.ajax({
- type: "GET",
- url: self.opt.dataSet,
- dataType: "text",
- success: function (data) {
- var wig = [];
- var max = 0
- var data_split = data.split("\n")
- var data_len = data_split.length;
- var span = null;
- var ref = false;
- if (data.indexOf("variableStep") >= 0) {
-
- var data_split = data.split("\n")
- var data_len = data_split.length;
-
-
- for (var i = 0; i < data_len; i++) {
- if (data_split[i].indexOf("chrom") >= 0) {
- var chr = data_split[i].split(/\s+/)[1].split("=")[1];
- flag = false;
- if (chr == ref_chr) {
- if (data_split[i].indexOf("span") >= 0) {
- span = data_split[i].split(/\s+/)[2].split("=")[1]
- }
- flag = true;
- ref = true;
- }
- }
- else if (data_split[i].indexOf("#") >= 0) {
- continue;
- } else if (flag) {
- var temp_data = data_split[i].split(/\s+/);
- wig.push([temp_data[0], temp_data[1], span]);
- if (parseInt(temp_data[1]) > parseInt(max)) {
- max = temp_data[1];
- }
- }
- }
- self.max = max;
-
- self.track = wig;
- if (ref == false) {
- alert("Selected reference not found")
- } else if (wig.length > 0) {
- var start = parseInt(wig[0][0]);//config.requestedStart;
- var stop = parseInt(wig[wig.length - 1][0]);
-
-
- self.slider_start = start;
- self.slider_stop = stop;
- self.data_last_start = stop;
- self.data_first_start = start;
-
- }
- else {
- alert("No data for selected reference")
- }
-
-
- }
- else if (data.indexOf("fixedStep") >= 0) {
- var data_split = data.split("\n")
- var data_len = data_split.length;
- var start = null;
- var step = null;
- var ref = false;
-
- for (var i = 0; i < data_len; i++) {
- if (data_split[i].indexOf("chrom") >= 0) {
- var line = data_split[i].split(/\s+/);
-
- var chr = data_split[i].split(/\s+/)[1].split("=")[1];
- flag = false;
-
- if (chr == ref_chr) {
- start = line[2].split("=")[1];
- step = line[3].split("=")[1];
- if (data_split[i].indexOf("span") >= 0) {
- span = line[4].split("=")[1]
- }
-
- flag = true;
- ref = true;
- }
- }
- else if (data_split[i].indexOf("#") >= 0) {
- continue;
- } else if (flag) {
- var temp_data = data_split[i];
- start = parseInt(start) + parseInt(step)
- wig.push([start, temp_data, span]);
- if (parseInt(temp_data) > parseInt(max)) {
- max = temp_data;
- }
- }
- }
-
- self.max = max;
- self.track = wig;
-
- if (ref == false) {
- alert("Selected reference not found")
- } else if (wig.length > 0) {
- var start = parseInt(wig[0][0]);//config.requestedStart;
- var stop = parseInt(wig[wig.length - 1][0]);
-
-
- self.slider_start = start;
- self.slider_stop = stop;
- self.data_last_start = stop;
- self.data_first_start = start;
-
- } else if (start == null || step == null) {
- alert("Unknown format detected")
- }
- else {
- alert("No data for selected reference")
- }
- }
- else {
- alert("Unknown format detected")
- }
- },
- error: function (qXHR, textStatus, errorThrown) {
- alert(textStatus);
- }
- }).done(function () {
- self._paintSlider();
- self._updateDraw();
- });
- },
-
- /**
- * Draws area chart from wig file using D3.js based on the specified positions
- *
- * @example
- * instance.paintWig(1000,100000,"target-div")
- *
- */
- paintWig: function (start, end, target) {
- var self = this;
- if (this.track.length > 0) {
- var color = this.opt.selectionBackgroundColor
- var left = "50px";
- var top = "0px";
- var filtered_track = [];
- var height = this.height;
- var width = this.width;
- var max = this.max;
-
-
- // filter data if start and end positions are defined
- if (start && end) {
- if (start < self.slider_start) {
- start = self.slider_start;
- }
- if (end > self.slider_stop) {
- end = self.slider_stop
- }
-
-
- filtered_track = this.track;
- filtered_track = jQuery.grep(filtered_track, function (element) {
- return element[0] >= start && element[0] <= end; // retain appropriate elements
- });
- }
- else {
- filtered_track = this.track;
- var length = this.track.length - 1;
- end = parseInt(this.track[length][0]);
- start = parseInt(this.track[0][0]);
- }
- var space = parseInt(width) / (end - start);
-
- var length = filtered_track.length - 1;
- if (length > 0) {
-
- this._clear(target);
- var svg = d3.select('#' + target + '_wigFeaturePainter-holder').append("svg")
- .attr("width", this.width + 20)
- .attr("height", $('#' + target + '_wigFeaturePainter-holder').height())
- .append("g")
- .attr("transform", "translate(" + left + "," + top + ")");
-
- this._container = jQuery('#' + target + '_wigFeaturePainter-holder');
-
- var d3line2 = d3.svg.line()
- .x(function (d) {
- return d.x;
- })
- .y(function (d) {
- return d.y;
- })
- .interpolate("linear");
-
- var end_val = parseInt(filtered_track[length][0]) + parseInt(filtered_track[1][0] - filtered_track[0][0]);
- var start_val = parseInt(filtered_track[0][0]) - (parseInt(filtered_track[1][0] - filtered_track[0][0]));
-
- if (start_val < 0) {
- start_val = 0;
- }
-
- // add a 0 to start position
- filtered_track.splice(0, 0, [start_val, 0]);
-
- // add a 0 to end position
- filtered_track.splice(filtered_track.length, 0, [end_val, 0]);
-
- var pathinfo = [];
-
- var last_start = 0;
- // check for average difference between each positions
- var diff = parseInt(filtered_track[1][0] - filtered_track[0][0]);
- if (diff > parseInt(filtered_track[2][0] - filtered_track[1][0]) || diff > parseInt(filtered_track[3][0] - filtered_track[2][0])) {
- if (diff > parseInt(filtered_track[2][0] - filtered_track[1][0])) {
- diff = parseInt(filtered_track[2][0] - filtered_track[1][0])
- }
- else {
- diff = parseInt(filtered_track[3][0] - filtered_track[2][0])
- }
- }
- else {
- }
-
- // loop through each element and calculate x and y axis for chart
- for (var i = 0; i < filtered_track.length - 1;) {
- var tempx;
- if (start > 0) {
- tempx = (filtered_track[i][0] - start) * space;
- }
- else {
- tempx = (filtered_track[i][0]) * space;
- }
- var tempy = height - (filtered_track[i][1] * height / max);
- pathinfo.push({ x: tempx, y: tempy});
-
- i++;
-
- if (last_start < filtered_track[i][0] - diff) {
-
- if (start > 0) {
- tempx = ((parseInt(last_start) + parseInt(diff)) - start) * space;
- }
- else {
- tempx = ((parseInt(last_start) + parseInt(diff))) * space;
- }
-
- var tempy = height;
-
- pathinfo.push({ x: tempx, y: tempy});
-
- if (start > 0) {
- tempx = ((parseInt(filtered_track[i][0]) - parseInt(diff)) - start) * space;
- }
- else {
- tempx = ((parseInt(filtered_track[i][0]) - parseInt(diff))) * space;
- }
- var tempy = height;
-
- pathinfo.push({ x: tempx, y: tempy});
-
- }
-
- last_start = filtered_track[i][0];
-
- }
-
- if (start > 0) {
- tempx = (filtered_track[filtered_track.length - 1][0] - start) * space;
- }
- else {
- tempx = (filtered_track[filtered_track.length - 1][0]) * space;
- }
-
- var tempy = height - (filtered_track[filtered_track.length - 1][1] * height / max);
-
- pathinfo.push({ x: tempx, y: tempy});
- var path = svg.selectAll("path")
- .data([1]);
-
- //select 10 positions to be displayed on x axis
- var filter_track_legend = [];
- var legend_start = filtered_track[0][0]
- var diff = (filtered_track[filtered_track.length - 1][0] - filtered_track[0][0]) / 10;
-
- for (i = 0; i < 10; i++) {
- if (filtered_track[i][2]) {
- filter_track_legend.push([
- [parseInt(legend_start) + parseInt(i * diff)],
- [filtered_track[i][2]]
- ]);
- } else {
- filter_track_legend.push([
- [parseInt(legend_start) + parseInt(i * diff)]
- ]);
- }
- }
-
- //draw selected 10 positions as legend
- var legendtext = svg.selectAll('text.day')
- .data(filter_track_legend);
-
- legendtext.enter().append('svg:text')
- .attr('x', 40)
- .attr('y', 155)
- .attr("transform", function (d, i) {
- if (start > 0) {
- return "translate(" + (((d[0] - start) * space) + 150) + "," + 100 + ")rotate(90)";
- }
- else {
- return "translate(" + (((d[0]) * space) + 150) + "," + 100 + ")rotate(90)";
- }
- })
- .text(function (d) {
- if (d[0] > 1000000) {
- return parseFloat(d[0] / 1000000).toFixed(2) + "M";
- } else if (d[0] > 1000) {
- return parseFloat(d[0] / 1000).toFixed(2) + "K";
- } else {
- if (d[1]) {
- return parseInt(d[0]) + " - " + (parseInt(d[0]) + parseInt(d[1]));
- } else {
- return parseInt(d[0]);
- }
- }
- });
-
-
-// lines at bottom of diagram to show the positions
- var line = svg.selectAll("line.bottom")
- .data(filter_track_legend);
-
- line.enter().insert("svg:line")
- .attr("class", "line")
- .attr("x1", function (d) {
- if (start > 0) {
- return parseInt((d[0] - start) * space);
- }
- else {
- return parseInt((d[0] ) * space);
- }
- })
- .attr("y1", 130)
- .attr("x2",function (d) {
- if (start > 0) {
- return parseInt((d[0] - start) * space);
- }
- else {
- return parseInt((d[0] ) * space);
- }
- }).attr("y2", 140)
- .attr('stroke', function () {
- return "black";
- });
-
- //draw path from calculated chart axis
- path.enter().append("svg:path")
- .attr("width", 200)
- .attr("height", 200)
- .attr("class", "path")
-
- .attr('stroke', function () {
- return "steelblue";
- })
- .attr('stroke-width', function () {
- return "1px";
- })
- .attr("fill", function () {
- return color;
- })
- .attr("d", d3line2(pathinfo));
-
- }
- } else {
- alert("Reference not set: use instance.setReference")
- }
-
-
- },
-
- /**
- * Private: Clears all divs content.
- * @ignore
- */
- _clear: function (target) {
- jQuery('#' + target + '_wigFeaturePainter-holder').html("");
- },
-
- /**
- * Private: sets data source.
- * @param {string} [dataset], it sets file path to this.opt.dataset.
- * @ignore
- */
- _setDataSource: function (dataSet) {
- this.opt.dataSet = dataSet;
- },
-
- _addSimpleClickTrigger: function () {
-
- var self = this;
-
- // Add the click event to each character in the content
- this._container.find('span')
- .click(function (e) {
- // TIP: e.target contains the clicked DOM node
- var selected = jQuery(e.target).text();
-
- // Create an event object
- var evtObject = { "selected": selected };
-
- // We're ready to raise the event onClick of our component
- self.raiseEvent('onClick', evtObject);
- });
- }
-
-
- }, {
- myself: undefined
- });
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.EbiGlobalSearch.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.EbiGlobalSearch.css
deleted file mode 100755
index 9b250b7746..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.EbiGlobalSearch.css
+++ /dev/null
@@ -1,7 +0,0 @@
-body {
- /*
- background-image: none;
- background-color: transparent;
- */
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeature.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeature.css
deleted file mode 100755
index 4a3ffaa558..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeature.css
+++ /dev/null
@@ -1,63 +0,0 @@
-table.hpaSummaryFeature_table {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- font-size: 100%;
- vertical-align: baseline;
- background: transparent;
- border-collapse:collapse;
- border-spacing:0;
-}
-
-.hpaSummaryFeature_leftColumn {
- background-color:#E0E0E0;
- padding:8px;
- border:#E0E0E0 solid 1px;
- border-top:#E0E0E0 solid 0px;
-}
-
-.hpaSummaryFeature_rightColumn {
- padding:8px;
- border:#E0E0E0 solid 0px;
- border-top:#E0E0E0 solid 1px;
- border-left:#C0C0C0 solid 3px;
- line-height:120%;
-}
-
-.hpaSummaryFeature_image {
- border: #808080 solid 1px;
-}
-
-.hpaSummaryFeature_linkImage{
- background: url('Rocky32px/link.png') no-repeat top right;
- background-size:20px;
- opacity:0.6;
- filter:alpha(opacity=60);
- float:right;
- z-index:1;
- height:30px;
- position:absolute;
- top:3px;
- width:100%;
-}
-
-.hpaSummaryFeature_contentTitle {
- font-size:120%;
- font-weight:bold;
-}
-
-.hpaSummaryFeature_imageTitle {
- font-size:85%;
- font-style:italic;
-}
-
-.hpaSummaryFeature_leftContainer{
- width:100%;
- text-align:right;
- position:relative;
-}
-
-.hpaSummaryFeature_contentNotes, .hpaSummaryFeature_contentLinks {
- list-style-type:square;
-}
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeatures.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeatures.css
deleted file mode 100755
index ecaf27fa39..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.HpaSummaryFeatures.css
+++ /dev/null
@@ -1,12 +0,0 @@
-.hpaSummaryFeatures_antibodyTitle {
- font-size:120%;
- font-weight:bold;
- border-bottom:#808080 solid 1px;
- margin-bottom:4px;
- margin-top:4px;
-}
-
-.hpaSummaryFeatures_summary {
- margin-bottom:10px;
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.InteractionsFilterGraph.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.InteractionsFilterGraph.css
deleted file mode 100755
index 6800bcc4cc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.InteractionsFilterGraph.css
+++ /dev/null
@@ -1,38 +0,0 @@
- .miFilterTitle{
- background-color: #F0F0F0;
- padding: 2px;
- font-size: 100%;
- font-weight: bold;
- }
- .miFilterOptions{
- padding: 6px;
- font-size: 92%;
-
- }
- .miDisplay{
- margin-top:2px;
- /*float:left;*/
- }
- #miInformation{
- font-size: 92%;
- }
- .inInformation{
- padding-right:15px;
- }
- .miDisplay, .miFilter{
- border: 1px solid #D8D8D8;
- background-color:#FAFAFA;
- }
- .miFilter, .miDisplay{
- margin-bottom:5px;
- }
- .miFilter{
- margin-right:-2px;
- }
- .miRadioBtnName{
- padding-right:10px;
- }
- .miGreyText{
- color:#C0C0C0;
- }
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.PsicquicViewSearch.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.PsicquicViewSearch.css
deleted file mode 100755
index 4b54a8a04d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.PsicquicViewSearch.css
+++ /dev/null
@@ -1,23 +0,0 @@
-@CHARSET "UTF-8";
-
-div.PsicquicViewSearch {
- padding: 0px;
- margin: 40px;
- font-family: "Heveltica Neue", Arial, "sans serif";
- font-size: 12px;
- color: #066;
- white-space:nowrap;
- position:relative;
- float: left;
-
-}
-
-#TheTable{
- font-family: "Heveltica Neue", Arial, "sans serif";
- font-size: 12px;
- color: #066;
- white-space:nowrap;
- position:relative;
- float: left;
-
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.Tree.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.Tree.css
deleted file mode 100755
index 697035b064..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.Tree.css
+++ /dev/null
@@ -1,489 +0,0 @@
-#YourOwnDivId {
- /*width: 900px; */
- //border: 1px solid black;
- //overflow: auto; /* will contain if #first is longer than #second */
-}
-#tree_panel {
- /*width: 300px;
- #background-color: #EEEEEE; */
- //max-height:700px;
- float:left; /* add this */
- padding: 20px;
- /*border: 1px solid red; */
- overflow: auto; /* will contain if #first is longer than #second */
-}
-#annotation_panel {
- /*border: 1px solid green;
- //padding: 20px; */
- //max-height:700px;
- overflow: auto; /* if you don't want #second to wrap below #first */
-}
-
-
-text.alignment_text {
- /* fill: black;
- stroke: none;
- opacity: 0.5; */
- font-family: Monaco, Arial, monospace;
- font-size: 8pt;
-}
-rect.A{
- background-color: #EEEEEE;
- opacity: 0.4;
-}
-rect.B{
- background-color: #EEEEEE;
- opacity: 0.3;
-}
-rect.C{
- background-color: #EEEEEE;
- opacity: 0.2;
-}
-rect.D{
- background-color: #EEEEEE;
- opacity: 0.1;
-}
-
-
-text.leaf_label {
- font-size:11px;
-}
-
-text.model_organism {
- font-size:12px;
- font-weight: bold;
-}
-
-text.highlight_gene {
- font-size:14px;
- font-weight: bold;
-}
-
-text.missing_species {
- font-size:9px;
- //color:grey;
- opacity: 0.5;
-}
-
-text.species_name {
- font-style:italic;
-}
-path.link {
- fill: none;
- stroke: gray;
- stroke-width: 2.5px;
- }
-
-path.species_link {
- fill: none;
- stroke: black;
- stroke-width: 2.5px;
-}
-path.absent_species_link {
- fill: none;
- opacity: 0.5;
- stroke-dasharray: 2,2;
- //stroke: red;
- //stroke-width: 0.5px;
-}
-
- path.selected {
- stroke: darkred;
- fill: none;
- stroke-width: 5px;
- }
-
-.tv_tree_container {
- height: 660px;
- overflow: auto;
- padding: 20px;
-}
-
-.tree_container{
-}
-
-.middle-display{ }
-
-.tv_general_info_container {
- padding: 10px;
- height: 40%;
- max-height:210px;
- background-color: #FEFEFE;
- box-shadow: 0 1px 5px #3D3D3D;
- -moz-border-radius: 1em 1em 1em 1em;
- border-radius: 1em 1em 1em 1em;
- margin-top: 9px;
-}
-
-
-circle {
- stroke-width: 5.5px;
-}
-
-text.domainlabel{
- color : white;
-}
-
-
-
-.tv_tooltip, .tv_tooltip-pending-removal {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 10px;
- border: 1px solid #ddd;
- z-index: 10000;
- display: inline-block;
- font-family: Arial;
- font-size: 13px;
- border-radius: 10px;
-
- pointer-events: none;
-
- -webkit-user-select: none;
- user-select: none;
-}
-
-.tv_contentcontainer {
- margin: 0 auto;
- padding: 0;
- width: 100%;
-}
-
-.tv_breadcrumbs {
- color: #48402E;
- box-shadow: 0 1px 5px #3D3D3D;
- font-size: 1em;
- /*height: 40px; */
- padding-bottom: 11px;
- padding-left: 11px;
- padding-right: 11px;
- padding-top: 4px;
- -moz-border-radius: 1em 1em 1em 1em;
- border-radius: 1em 1em 1em 1em;
-}
-
-.tv_homesidebar {
- float: right;
- font-size: 0.9em;
- margin-left: 13px;
- margin-top: 0;
- padding-bottom: 10px;
- padding-top: 0;
- width: 19%;
- height: 650px;
- -moz-border-radius: 1em 1em 1em 1em;
- border-radius: 1em 1em 1em 1em;
-
-}
-.tv_contentcontainer .tv_homecontent {
- margin-bottom: 9px;
- margin-top: 9px;
-}
-.tv_homecontent {
- background-color: #FEFEFE;
- color: #48402E;
- overflow: auto;
- font-size: 0.9em;
- padding-top: 30px;
- padding-left: 10px;
- /*width: 79.6%;*/
- -moz-border-radius: 1em 1em 1em 1em;
- border-radius: 1em 1em 1em 1em;
-
-}
-.clearfloat {
- clear: both;
- font-size: 1px;
- height: 0;
- line-height: 0;
-}
-
-div.inline { float:right; }
-
-
-.annotation_div {
- filter: alpha(opacity=50); /* internet explorer */
- -khtml-opacity: 0.5; /* khtml, old safari */
- -moz-opacity: 0.5; /* mozilla, netscape */
- opacity: 0.5; /* fx, safari, opera */
-}
-
-
-
-.dotted_line {
-border-left: 1px dotted gray !important;
-margin-left: 5px !important;
-padding-left: 5px !important;
-}
-
-.highlight_gene{
- /*font-size: 22px; */
- background: blue;
- color: white;
-}
-
-.axis path,
-.axis line {
- fill: none;
- stroke: black;
- shape-rendering: crispEdges;
- padding-left: 100px;
-}
-
-.axis text {
- font-family: sans-serif;
- font-size: 11px;
-}
-.axis {
- padding-left: 50px !important;
-}
-
-
-.treearea {
- padding-top: 50px !important;
-}
-
-#toggle-view {
- list-style:none;
- font-family:arial;
- font-size:11px;
- margin:0;
- padding:0;
- max-width:500px;
- min-width:300px;
-
-}
-
- #toggle-view #li_head {
- margin:10px;
- border-bottom:1px solid #ccc;
- position:relative;
- cursor:pointer;
- }
-
- #toggle-view h3 {
- margin:0;
- font-size:14px;
- }
-
- #toggle-view span {
- position:absolute;
- right:5px; top:0;
- color:#ccc;
- font-size:13px;
- }
-
- #toggle-view .panel {
- margin:5px 0;
- display:none;
- }
-
-
- p {
- margin: 10px;
- }
-
- #sliderLabel {
- border: 1px solid #a2a2a2;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- cursor: pointer;
- display: block;
- height: 30px;
- margin: 20px auto;
- overflow: hidden;
- position: relative;
- width: 200px;
- }
- #sliderLabel input {
- display: none;
- }
- #sliderLabel input:checked + #slider {
- left: 110px;
- }
- #slider {
- left: -50px;
- position: absolute;
- top: 0px;
- -moz-transition: left .25s ease-out;
- -webkit-transition: left .25s ease-out;
- -o-transition: left .25s ease-out;
- transition: left .25s ease-out;
- }
- #sliderOn, #sliderBlock, #sliderOff {
- display: block;
- font-family: arial, verdana, sans-serif;
- font-weight: bold;
- height: 30px;
- line-height: 30px;
- position: absolute;
- text-align: center;
- top: 0px;
- }
- #sliderOn {
- background: #3269aa;
- background: -moz-linear-gradient(top, #3269aa 0%, #82b3f4 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3269aa), color-stop(100%,#82b3f4));
- background: -webkit-linear-gradient(top, #3269aa 0%,#82b3f4 100%);
- background: -o-linear-gradient(top, #3269aa 0%,#82b3f4 100%);
- background: -ms-linear-gradient(top, #3269aa 0%,#82b3f4 100%);
- background: linear-gradient(top, #3269aa 0%,#82b3f4 100%);
- color: white;
- left: -110px;
- width: 164px;
- }
- #sliderBlock {
- background: #d9d9d8;
- background: -moz-linear-gradient(top, #d9d9d8 0%, #fcfcfc 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d9d9d8), color-stop(100%,#fcfcfc));
- background: -webkit-linear-gradient(top, #d9d9d8 0%,#fcfcfc 100%);
- background: -o-linear-gradient(top, #d9d9d8 0%,#fcfcfc 100%);
- background: -ms-linear-gradient(top, #d9d9d8 0%,#fcfcfc 100%);
- background: linear-gradient(top, #d9d9d8 0%,#fcfcfc 100%);
- border: 1px solid #a2a2a2;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- height: 28px;
- left: 50px;
- width: 50px;
- }
- #sliderOff {
- background: #f2f3f2;
- background: -moz-linear-gradient(top, #8b8c8b 0%, #f2f3f2 50%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8b8c8b), color-stop(50%,#f2f3f2));
- background: -webkit-linear-gradient(top, #8b8c8b 0%,#f2f3f2 50%);
- background: -o-linear-gradient(top, #8b8c8b 0%,#f2f3f2 50%);
- background: -ms-linear-gradient(top, #8b8c8b 0%,#f2f3f2 50%);
- background: linear-gradient(top, #8b8c8b 0%,#f2f3f2 50%);
- color: #8b8b8b;
- left: 100px;
- width: 150px;
- }
-
-
-
-.settings div {
- float: left;
- margin-right: 5px;
-
-}
-
-.settings ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-.settings {
- width: 100%;
- overflow: hidden;
-}
-.settings .left{
- float: left;
-}
-.settings .middle{
- top: 10px;
- margin-bottom: -2000px;
- padding-bottom: 2000px;
-}
- .settings .right{
-}
-
-
-
-.collapsible,
-.page_collapsible {
- margin: 0;
- padding:10px;
- height:20px;
-
- border-top:#f0f0f0 1px solid;
- background: #cccccc;
-
- font-family: Arial, Helvetica, sans-serif;
- text-decoration:none;
- text-transform:uppercase;
- color: #000;
- font-size:1em;
-}
-
-.collapse-open {
- background:#000;
- color: #fff;
-}
-
-.collapse-open span {
- display:block;
- float:right;
- padding:10px;
-}
-
-.collapse-open span {
- background:url(images/minus.png) center center no-repeat;
-}
-
-.collapse-close span {
- display:block;
- float:right;
- background:url(images/plus.png) center center no-repeat;
- padding:10px;
-}
-
-div.container {
- padding:0;
- margin:0;
-}
-
-div.content {
- background:#f0f0f0;
- margin: 0;
- padding:10px;
- font-size:.9em;
- line-height:1.5em;
- font-family:"Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
-}
-
-div.content ul, div.content p {
- margin:0;
- padding:3px;
-}
-
-div.content ul li {
- list-style-position:inside;
- line-height:25px;
-}
-
-div.content ul li a {
- color:#555555;
-}
-
-code {
- overflow:auto;
-}
-
-div.legend
-{
-background-color:transparent;
-padding-left: 13px;
-//z-index:+2;
-font-size:10pt;
-font-family:times new roman;
-//font-weight:bold;
-//font-style:italic;
-//color:#23238e;
-}
-
-div.my_custom_menu{
- position: absolute;
- text-align: center;
- width: 60px;
- height: 28px;
- padding: 2px;
- font: 12px sans-serif;
- background: lightsteelblue;
- border: 0px;
- border-radius: 8px;
- pointer-events: none;
-}
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Biojs.UniProtDiseaseSummary.css b/src/lib/biojs-1.0/src/main/resources/css/Biojs.UniProtDiseaseSummary.css
deleted file mode 100755
index 5a3884dd11..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Biojs.UniProtDiseaseSummary.css
+++ /dev/null
@@ -1,87 +0,0 @@
-#UDS_component_wrapper{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:10pt;
-}
-
-table.UDS_table {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- font-size: 100%;
- vertical-align: baseline;
- background: transparent;
- border-collapse:collapse;
- border-spacing:0;
-}
-
-.UDS_table_title {
- font-size:larger;
- font-weight:bold;
-}
-
-.UDS_table_wrapper {
- padding: 5px;
-}
-
-.UDS_keywords_wrapper{
- font-size:smaller;
- padding: 0px 5px 5px 5px;
-}
-
-.UDS_accs {
- padding: 3px 0px 6px 8px;
-}
-
-table.UDS_table tr td
-{
- vertical-align:top;
- padding: 4px;
-}
-
-table.UDS_table tr
-{
-
-}
-
-
-.UDS_notes {
- text-align:justify;
- border: solid 1px #CCCCCC;
-}
-
-.UDS_references{
- border: solid 1px #CCCCCC;
-}
-
-
-
-.UDS_header {
- background-color:#ffffff;
- font-weight:bold;
-}
-
-.UDS_omim_title {
- font-size:smaller;
- font-weight:bold;
- text-decoration:underline;
-}
-
-.UDS_pubmed_title {
- font-size:smaller;
- font-weight:bold;
- text-decoration:underline;
-}
-
-.UDS_odd {
- background-color:#e7e8ec;
-}
-
-.UDS_even {
- background-color:#feffff;
-}
-
-#UDS_warnings {
- font-size:smaller;
- font-style:italic;
-}
diff --git a/src/lib/biojs-1.0/src/main/resources/css/GeneExpressionSummary.css b/src/lib/biojs-1.0/src/main/resources/css/GeneExpressionSummary.css
deleted file mode 100755
index d2af5b2b9b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/GeneExpressionSummary.css
+++ /dev/null
@@ -1,68 +0,0 @@
-@CHARSET "UTF-8";
-
-div.GeneExpressionSummary {
- margin:0px;
- padding:0px;
-}
-
-div.GeneExpressionSummary_title {
- font-size:120%;
- font-weight: bold;
- margin-bottom:15px;
-}
-
-.GeneExpressionSummary_table{
- margin: 0;
- padding: 0;
- border: 0;
-}
-
-div.GeneExpressionSummary table tr td {
- vertical-align:top;
-}
-
-div.GeneExpressionSummary table {
- padding-left:20px;
-}
-
-div.GeneExpressionSummary_image {
- border: thin silver solid;
-}
-
-div.GeneExpressionSummary_image p {
- text-align: justify;
- font-style: italic;
- font-size:85%;
- text-indent: 0;
- margin:10px;
-}
-
-.GeneExpressionSummary_subtitle {
- text-transform: uppercase;
- font-size:85%;
- font-weight:bold;
-}
-.GeneExpressionSummary_feature{
- margin-top:5px;
- margin-bottom:15px;
-}
-
-/*
-div.GeneExpressionSummary_summary a {
- background-image:url(Rocky32px/link.png);
- display:block;
- height:8px;
- width:8px;
-}*/
-
-div.GeneExpressionSummary_summary {
-
-}
-
-div.GeneExpressionSummary_footer {
- text-align: justify;
- font-style: italic;
- font-size: 85%;
- text-indent: 0;
-
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/accessibility.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/accessibility.png.mno
deleted file mode 100755
index def6a79bc5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/accessibility.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/add.png.mno
deleted file mode 100755
index 5ef5efb4df..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/agenda.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/agenda.png.mno
deleted file mode 100755
index 2ac75b95f5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/agenda.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/airplane.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/airplane.png.mno
deleted file mode 100755
index d199e91220..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/airplane.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alarm.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alarm.png.mno
deleted file mode 100755
index 81dabe2582..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alarm.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/album.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/album.png.mno
deleted file mode 100755
index d3ef205772..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/album.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alert.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alert.png.mno
deleted file mode 100755
index 8d37e5eaca..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/alert.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/announcement.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/announcement.png.mno
deleted file mode 100755
index 9ffe11d61f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/announcement.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/archive.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/archive.png.mno
deleted file mode 100755
index b39f4b0ecf..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/archive.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-down.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-down.png.mno
deleted file mode 100755
index 7b3ce3db56..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-down.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-left.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-left.png.mno
deleted file mode 100755
index 1fc9c75f97..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-left.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-right.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-right.png.mno
deleted file mode 100755
index 8358a01869..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-right.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-up.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-up.png.mno
deleted file mode 100755
index 7c21df9cf5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/arrow-up.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/art-brush.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/art-brush.png.mno
deleted file mode 100755
index a4ac49c3e6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/art-brush.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/auction.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/auction.png.mno
deleted file mode 100755
index 6caf7c0ed3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/auction.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/award.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/award.png.mno
deleted file mode 100755
index 6373dd34bd..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/award.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-charge.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-charge.png.mno
deleted file mode 100755
index 3ceca08e1e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-charge.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-full.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-full.png.mno
deleted file mode 100755
index 63d2530746..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-full.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-half.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-half.png.mno
deleted file mode 100755
index 74ca1693fd..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-half.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-low.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-low.png.mno
deleted file mode 100755
index 33b299f582..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/battery-low.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bell.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bell.png.mno
deleted file mode 100755
index f3e26c7a29..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bell.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bicycle.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bicycle.png.mno
deleted file mode 100755
index 878215e63b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bicycle.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/blackberry.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/blackberry.png.mno
deleted file mode 100755
index 1e3df5ba81..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/blackberry.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bluetooth.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bluetooth.png.mno
deleted file mode 100755
index a828247f2d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bluetooth.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/boat.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/boat.png.mno
deleted file mode 100755
index 236838c752..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/boat.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/book.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/book.png.mno
deleted file mode 100755
index f7c28e59da..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/book.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bookmark.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bookmark.png.mno
deleted file mode 100755
index 6bc5ba3bca..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bookmark.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/briefcase.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/briefcase.png.mno
deleted file mode 100755
index cebb0804b2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/briefcase.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/brightness.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/brightness.png.mno
deleted file mode 100755
index aec948939a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/brightness.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bug.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bug.png.mno
deleted file mode 100755
index 6e3752ed50..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bug.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bus.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bus.png.mno
deleted file mode 100755
index e901c25c19..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/bus.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calculator.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calculator.png.mno
deleted file mode 100755
index 8cc4186f2f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calculator.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-add.png.mno
deleted file mode 100755
index 46541f5735..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-delete.png.mno
deleted file mode 100755
index 869818d433..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-edit.png.mno
deleted file mode 100755
index aada76b8f9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-na.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-na.png.mno
deleted file mode 100755
index 7e984606a9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-na.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-time.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-time.png.mno
deleted file mode 100755
index 55cc9d6796..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar-time.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar.png.mno
deleted file mode 100755
index 2e552666d5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/calendar.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/camera.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/camera.png.mno
deleted file mode 100755
index 855d79bafe..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/camera.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/car.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/car.png.mno
deleted file mode 100755
index 1a21bbc911..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/car.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cd.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cd.png.mno
deleted file mode 100755
index 8f7d798c29..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cd.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/chart.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/chart.png.mno
deleted file mode 100755
index bfa8e1ac36..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/chart.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check-box.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check-box.png.mno
deleted file mode 100755
index ec6e7410d1..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check-box.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check.png.mno
deleted file mode 100755
index 1ed08ef92b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/check.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clipboard.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clipboard.png.mno
deleted file mode 100755
index 9d568cc446..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clipboard.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clock.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clock.png.mno
deleted file mode 100755
index e20b3a118d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/clock.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-cup.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-cup.png.mno
deleted file mode 100755
index f5b15c69d8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-cup.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-mug.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-mug.png.mno
deleted file mode 100755
index 39bee616f6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/coffee-mug.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/collapse.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/collapse.png.mno
deleted file mode 100755
index 14188db472..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/collapse.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-add.png.mno
deleted file mode 100755
index 3c7895ab3f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-check.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-check.png.mno
deleted file mode 100755
index 3f9618f129..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-check.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-delete.png.mno
deleted file mode 100755
index dccde8ece7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-disable.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-disable.png.mno
deleted file mode 100755
index 95733beb5e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-disable.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-write.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-write.png.mno
deleted file mode 100755
index 8bb1e4c2b8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment-write.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment.png.mno
deleted file mode 100755
index c3979aa97b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/comment.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/compass.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/compass.png.mno
deleted file mode 100755
index 8a6d4b4e8a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/compass.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connect.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connect.png.mno
deleted file mode 100755
index 8da8633c3e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connect.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connection-signal.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connection-signal.png.mno
deleted file mode 100755
index 90b7104c0b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/connection-signal.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction-hat.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction-hat.png.mno
deleted file mode 100755
index dacea85ce7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction-hat.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction.png.mno
deleted file mode 100755
index ca42218aeb..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/construction.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-book.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-book.png.mno
deleted file mode 100755
index 096c14dc80..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-book.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-card.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-card.png.mno
deleted file mode 100755
index 0edbffe331..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contact-card.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contrast.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contrast.png.mno
deleted file mode 100755
index b045a917db..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/contrast.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-eject.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-eject.png.mno
deleted file mode 100755
index ab148b4af8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-eject.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-forward.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-forward.png.mno
deleted file mode 100755
index e5339d5a8e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-forward.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-next.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-next.png.mno
deleted file mode 100755
index 820c13d8c7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-next.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-pause.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-pause.png.mno
deleted file mode 100755
index c2d7ee1024..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-pause.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-play.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-play.png.mno
deleted file mode 100755
index 6593be8799..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-play.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-previous.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-previous.png.mno
deleted file mode 100755
index e6302ddceb..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-previous.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-record.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-record.png.mno
deleted file mode 100755
index 632272aff4..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-record.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-rewind.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-rewind.png.mno
deleted file mode 100755
index 2b2cc0de98..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-rewind.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-stop.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-stop.png.mno
deleted file mode 100755
index 9bab87e8dd..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/controller-stop.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cool.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cool.png.mno
deleted file mode 100755
index 6c57dcd4e7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cool.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/copy.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/copy.png.mno
deleted file mode 100755
index 7a403eda11..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/copy.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/credit-card.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/credit-card.png.mno
deleted file mode 100755
index 27417878e5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/credit-card.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cursor.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cursor.png.mno
deleted file mode 100755
index e6447e0143..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cursor.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cut.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cut.png.mno
deleted file mode 100755
index e9a62dc695..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/cut.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/dashboard.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/dashboard.png.mno
deleted file mode 100755
index 1f16e770e2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/dashboard.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-add.png.mno
deleted file mode 100755
index c9b8dec6b5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-check.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-check.png.mno
deleted file mode 100755
index e2838bb5fc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-check.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-delete.png.mno
deleted file mode 100755
index ead59d6570..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-edit.png.mno
deleted file mode 100755
index c1359910c4..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-error.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-error.png.mno
deleted file mode 100755
index b5b7e83c16..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-error.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-export.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-export.png.mno
deleted file mode 100755
index 45493984b8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-export.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-import.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-import.png.mno
deleted file mode 100755
index 3d03131b36..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-import.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-lock.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-lock.png.mno
deleted file mode 100755
index b41f8f786f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-lock.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-na.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-na.png.mno
deleted file mode 100755
index 44c4e226bb..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-na.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-reload.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-reload.png.mno
deleted file mode 100755
index a3ad08fa24..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-reload.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-save.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-save.png.mno
deleted file mode 100755
index 123ff52081..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-save.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-search.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-search.png.mno
deleted file mode 100755
index a289a1981f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-search.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-start.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-start.png.mno
deleted file mode 100755
index 59668f9c5b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-start.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-stop.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-stop.png.mno
deleted file mode 100755
index 67b3715e62..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-stop.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-user.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-user.png.mno
deleted file mode 100755
index 648e998f43..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database-user.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database.png.mno
deleted file mode 100755
index 0fe7a3ffb2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/database.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delete.png.mno
deleted file mode 100755
index 36c2f8cf83..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delivery-truck.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delivery-truck.png.mno
deleted file mode 100755
index 6b00297c8a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/delivery-truck.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/disconnect.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/disconnect.png.mno
deleted file mode 100755
index 823985cee7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/disconnect.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/discussion.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/discussion.png.mno
deleted file mode 100755
index c22bba970d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/discussion.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/download.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/download.png.mno
deleted file mode 100755
index f778e70949..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/download.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/earth.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/earth.png.mno
deleted file mode 100755
index 502c18fc6b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/earth.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/edit-disable.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/edit-disable.png.mno
deleted file mode 100755
index fcfeb92979..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/edit-disable.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-delete.png.mno
deleted file mode 100755
index 5ee73af91c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-forward.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-forward.png.mno
deleted file mode 100755
index 68edfc7e47..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-forward.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-new.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-new.png.mno
deleted file mode 100755
index dea45ecc97..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-new.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-open.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-open.png.mno
deleted file mode 100755
index 16d015eeb2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-open.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-reply.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-reply.png.mno
deleted file mode 100755
index acbbd28e82..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-reply.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-write.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-write.png.mno
deleted file mode 100755
index 5b7da42dee..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email-write.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email.png.mno
deleted file mode 100755
index 69b962ec3c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/email.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/employee-id.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/employee-id.png.mno
deleted file mode 100755
index 5bef7ce4e4..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/employee-id.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/exchange.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/exchange.png.mno
deleted file mode 100755
index 2c0cf31930..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/exchange.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/expand.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/expand.png.mno
deleted file mode 100755
index f94e5a59ab..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/expand.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eye.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eye.png.mno
deleted file mode 100755
index 81036770bb..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eye.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eyedropper.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eyedropper.png.mno
deleted file mode 100755
index c5a3f1b13a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/eyedropper.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fan.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fan.png.mno
deleted file mode 100755
index ef440b69b1..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fan.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-add.png.mno
deleted file mode 100755
index 68f04a132a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-delete.png.mno
deleted file mode 100755
index 8cfdaf7992..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-edit.png.mno
deleted file mode 100755
index a3b45ce291..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite.png.mno
deleted file mode 100755
index a340646d06..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/favorite.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fever-chart.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fever-chart.png.mno
deleted file mode 100755
index 2cfb419e34..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fever-chart.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/filter.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/filter.png.mno
deleted file mode 100755
index 10964f36d0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/filter.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/financial.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/financial.png.mno
deleted file mode 100755
index 0d69928110..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/financial.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/first-aid-box.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/first-aid-box.png.mno
deleted file mode 100755
index 4758b82a45..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/first-aid-box.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flag.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flag.png.mno
deleted file mode 100755
index c7832240cb..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flag.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flash.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flash.png.mno
deleted file mode 100755
index 646d6148dc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/flash.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-add.png.mno
deleted file mode 100755
index c357c69733..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-delete.png.mno
deleted file mode 100755
index d4c4800d07..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-edit.png.mno
deleted file mode 100755
index 8ef85758b3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-search.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-search.png.mno
deleted file mode 100755
index a549496447..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder-search.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder.png.mno
deleted file mode 100755
index 10215e180a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/folder.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-decrease.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-decrease.png.mno
deleted file mode 100755
index 873a1f3793..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-decrease.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-increase.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-increase.png.mno
deleted file mode 100755
index 7d46cd74b1..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/font-increase.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-enter.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-enter.png.mno
deleted file mode 100755
index 7962a69baa..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-enter.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-exit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-exit.png.mno
deleted file mode 100755
index 4f106f97f0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen-exit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen.png.mno
deleted file mode 100755
index 7459dd1877..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/fullscreen.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/game-controller.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/game-controller.png.mno
deleted file mode 100755
index 9c19e55293..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/game-controller.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift-card.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift-card.png.mno
deleted file mode 100755
index 1d28a89f49..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift-card.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift.png.mno
deleted file mode 100755
index f7a2200ff6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gift.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-bottom.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-bottom.png.mno
deleted file mode 100755
index d9fa5c0b83..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-bottom.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-top.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-top.png.mno
deleted file mode 100755
index 0a397081b5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/go-to-top.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gym.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gym.png.mno
deleted file mode 100755
index b3e4a0b923..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/gym.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hammer.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hammer.png.mno
deleted file mode 100755
index 0d3aba57ff..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hammer.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand-pointer.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand-pointer.png.mno
deleted file mode 100755
index 022293ea00..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand-pointer.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand.png.mno
deleted file mode 100755
index a1c5309cad..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hand.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/headphone.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/headphone.png.mno
deleted file mode 100755
index 2993014466..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/headphone.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/help.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/help.png.mno
deleted file mode 100755
index 63b5b8a22c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/help.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/highlighter.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/highlighter.png.mno
deleted file mode 100755
index 5cf753997a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/highlighter.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/history.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/history.png.mno
deleted file mode 100755
index e26d30e0dc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/history.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/home.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/home.png.mno
deleted file mode 100755
index b0798bc09d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/home.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hot.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hot.png.mno
deleted file mode 100755
index 8af4835418..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hot.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hourglass.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hourglass.png.mno
deleted file mode 100755
index 9c5682bf2b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/hourglass.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/infinite.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/infinite.png.mno
deleted file mode 100755
index 3b020b3d8c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/infinite.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/info.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/info.png.mno
deleted file mode 100755
index 58cc3e4733..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/info.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/iphone.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/iphone.png.mno
deleted file mode 100755
index c9284274cf..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/iphone.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ipod.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ipod.png.mno
deleted file mode 100755
index 054e52ca30..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ipod.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/key.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/key.png.mno
deleted file mode 100755
index c1364e89d6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/key.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lab.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lab.png.mno
deleted file mode 100755
index a85f48b23f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lab.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/laptop.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/laptop.png.mno
deleted file mode 100755
index 3d5058cb92..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/laptop.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/light-bulb.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/light-bulb.png.mno
deleted file mode 100755
index 0c98aaba55..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/light-bulb.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/link.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/link.png.mno
deleted file mode 100755
index 6250cbc4da..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/link.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location-pin.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location-pin.png.mno
deleted file mode 100755
index 9d18ec5aa3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location-pin.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location.png.mno
deleted file mode 100755
index 057994677e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/location.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lock.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lock.png.mno
deleted file mode 100755
index 3cb24fd1ba..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/lock.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/login.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/login.png.mno
deleted file mode 100755
index 20ce86c865..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/login.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/logout.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/logout.png.mno
deleted file mode 100755
index 1264017a84..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/logout.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/luggage.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/luggage.png.mno
deleted file mode 100755
index cd7cf18f66..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/luggage.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/magic-wand.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/magic-wand.png.mno
deleted file mode 100755
index ddbea0d27a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/magic-wand.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-in.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-in.png.mno
deleted file mode 100755
index 2e411e93e6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-in.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-out.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-out.png.mno
deleted file mode 100755
index cf00fc2a8b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox-out.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox.png.mno
deleted file mode 100755
index 559d7d7048..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mailbox.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/martini-glass.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/martini-glass.png.mno
deleted file mode 100755
index c2a8366a2b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/martini-glass.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/merge.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/merge.png.mno
deleted file mode 100755
index e8687d77ad..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/merge.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/microphone.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/microphone.png.mno
deleted file mode 100755
index 3116033e13..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/microphone.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/minus.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/minus.png.mno
deleted file mode 100755
index c17e539f2f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/minus.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/monitor.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/monitor.png.mno
deleted file mode 100755
index 8ee1774120..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/monitor.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mouse.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mouse.png.mno
deleted file mode 100755
index 002504a038..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/mouse.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/move.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/move.png.mno
deleted file mode 100755
index 135a7001e5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/move.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/museum.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/museum.png.mno
deleted file mode 100755
index 182be5128d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/museum.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/music.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/music.png.mno
deleted file mode 100755
index 25b4f58644..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/music.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/network.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/network.png.mno
deleted file mode 100755
index 4ba6dc70f8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/network.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/newspaper.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/newspaper.png.mno
deleted file mode 100755
index 280d7bda44..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/newspaper.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/notepad.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/notepad.png.mno
deleted file mode 100755
index 2e2fb09420..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/notepad.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/office-chair.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/office-chair.png.mno
deleted file mode 100755
index 422a702235..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/office-chair.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/orbit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/orbit.png.mno
deleted file mode 100755
index 676ab5a890..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/orbit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/package-box.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/package-box.png.mno
deleted file mode 100755
index 02c5745065..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/package-box.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-add.png.mno
deleted file mode 100755
index f189fde898..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-check.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-check.png.mno
deleted file mode 100755
index cf968a1224..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-check.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-delete.png.mno
deleted file mode 100755
index 93402901e9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-edit.png.mno
deleted file mode 100755
index 032fe4a302..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-error.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-error.png.mno
deleted file mode 100755
index a55001d17e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-error.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-lock.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-lock.png.mno
deleted file mode 100755
index 977c231423..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-lock.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-new.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-new.png.mno
deleted file mode 100755
index 0e4931d29e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-new.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-not-found.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-not-found.png.mno
deleted file mode 100755
index f1609eb56f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-not-found.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-save.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-save.png.mno
deleted file mode 100755
index 489cd86c48..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-save.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-search.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-search.png.mno
deleted file mode 100755
index d992b7614a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-search.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-user.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-user.png.mno
deleted file mode 100755
index 829e73f827..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page-user.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page.png.mno
deleted file mode 100755
index 7708e59fc5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/page.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paint-brush.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paint-brush.png.mno
deleted file mode 100755
index bfd0c35c86..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paint-brush.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paper-clip.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paper-clip.png.mno
deleted file mode 100755
index ae32393e14..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paper-clip.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paste.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paste.png.mno
deleted file mode 100755
index 288d313328..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/paste.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pen.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pen.png.mno
deleted file mode 100755
index 3e908c6511..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pen.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pencil.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pencil.png.mno
deleted file mode 100755
index 9ec7a1ceef..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pencil.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-classic.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-classic.png.mno
deleted file mode 100755
index 1fcf73027a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-classic.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-mobile.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-mobile.png.mno
deleted file mode 100755
index 0a863c01c6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone-mobile.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone.png.mno
deleted file mode 100755
index 55eee0e26e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/phone.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/picture.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/picture.png.mno
deleted file mode 100755
index d455bf0bb5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/picture.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pie-chart.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pie-chart.png.mno
deleted file mode 100755
index 8a63b519e7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pie-chart.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pin.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pin.png.mno
deleted file mode 100755
index 969f0b1c61..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/pin.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/plugin.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/plugin.png.mno
deleted file mode 100755
index c719607e72..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/plugin.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/podcast.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/podcast.png.mno
deleted file mode 100755
index a8a9ca23d3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/podcast.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/power.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/power.png.mno
deleted file mode 100755
index 8bd7084387..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/power.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/presentation.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/presentation.png.mno
deleted file mode 100755
index 83ee9de7c9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/presentation.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/print.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/print.png.mno
deleted file mode 100755
index 8cfb7bc860..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/print.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/puzzle.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/puzzle.png.mno
deleted file mode 100755
index 49d83ae1b0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/puzzle.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/quote.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/quote.png.mno
deleted file mode 100755
index 2bbd0ff03e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/quote.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/radio.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/radio.png.mno
deleted file mode 100755
index c22f82af4b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/radio.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/recycle.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/recycle.png.mno
deleted file mode 100755
index 5c7c8f152d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/recycle.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/redo.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/redo.png.mno
deleted file mode 100755
index d8053c896e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/redo.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/reload.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/reload.png.mno
deleted file mode 100755
index d7fe988823..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/reload.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/remote-control.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/remote-control.png.mno
deleted file mode 100755
index 6e0d78ebe0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/remote-control.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/repeat.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/repeat.png.mno
deleted file mode 100755
index 0ddc45aafe..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/repeat.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/replay.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/replay.png.mno
deleted file mode 100755
index b0084e189c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/replay.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/restrict.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/restrict.png.mno
deleted file mode 100755
index 54f03bb5a9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/restrict.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rocket.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rocket.png.mno
deleted file mode 100755
index e740fe57c8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rocket.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rss.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rss.png.mno
deleted file mode 100755
index 00002d33d0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/rss.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/satellite.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/satellite.png.mno
deleted file mode 100755
index eb5c9ef89d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/satellite.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/save.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/save.png.mno
deleted file mode 100755
index 639d7e617d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/save.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/script.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/script.png.mno
deleted file mode 100755
index 91ef1a2172..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/script.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/search.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/search.png.mno
deleted file mode 100755
index 3ec0bb064a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/search.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/security.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/security.png.mno
deleted file mode 100755
index e2628cf499..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/security.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/setting.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/setting.png.mno
deleted file mode 100755
index 9a8474d0e5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/setting.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/share.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/share.png.mno
deleted file mode 100755
index cdcd37defa..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/share.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-bag.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-bag.png.mno
deleted file mode 100755
index d2b3924d50..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-bag.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-basket.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-basket.png.mno
deleted file mode 100755
index 553e9c26b8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-basket.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-cart.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-cart.png.mno
deleted file mode 100755
index 2f017ed2c2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shopping-cart.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shovel.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shovel.png.mno
deleted file mode 100755
index 1d6106a642..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shovel.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shuffle.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shuffle.png.mno
deleted file mode 100755
index 8c0e4eb643..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shuffle.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shutter.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shutter.png.mno
deleted file mode 100755
index 6b65793f73..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/shutter.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sign.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sign.png.mno
deleted file mode 100755
index 89d2bd11be..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sign.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sitemap.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sitemap.png.mno
deleted file mode 100755
index 3ff9a0999a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sitemap.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/slice.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/slice.png.mno
deleted file mode 100755
index 48a471513d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/slice.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sofa-chair.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sofa-chair.png.mno
deleted file mode 100755
index 5c1e838217..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sofa-chair.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/split.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/split.png.mno
deleted file mode 100755
index cfad0257bf..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/split.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sport.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sport.png.mno
deleted file mode 100755
index 44c8cf6932..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sport.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sprayer.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sprayer.png.mno
deleted file mode 100755
index b48ebe4f22..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/sprayer.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/star.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/star.png.mno
deleted file mode 100755
index c7a09ab1e6..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/star.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stock-chart.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stock-chart.png.mno
deleted file mode 100755
index c6db00ef6f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stock-chart.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stop.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stop.png.mno
deleted file mode 100755
index 5e2eda6508..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/stop.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag-cloud.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag-cloud.png.mno
deleted file mode 100755
index 40cd70ae76..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag-cloud.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag.png.mno
deleted file mode 100755
index 2f8e7b60d3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tag.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-down.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-down.png.mno
deleted file mode 100755
index 44e02cc6c1..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-down.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-up.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-up.png.mno
deleted file mode 100755
index 6e2fa63abf..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/thumb-up.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ticket.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ticket.png.mno
deleted file mode 100755
index 90c8d10ae5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/ticket.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/timer.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/timer.png.mno
deleted file mode 100755
index 2a875f624f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/timer.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool-box.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool-box.png.mno
deleted file mode 100755
index b34852a360..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool-box.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool.png.mno
deleted file mode 100755
index 7934284af3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tool.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/train.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/train.png.mno
deleted file mode 100755
index 74f7cfaae2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/train.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trash.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trash.png.mno
deleted file mode 100755
index d5c7ffc228..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trash.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trophy.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trophy.png.mno
deleted file mode 100755
index 3357218dfe..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/trophy.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tv.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tv.png.mno
deleted file mode 100755
index 24a1b43952..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/tv.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/umbella.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/umbella.png.mno
deleted file mode 100755
index ec8dcc5526..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/umbella.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/undo.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/undo.png.mno
deleted file mode 100755
index 0dd0dd60f0..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/undo.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/unlock.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/unlock.png.mno
deleted file mode 100755
index e0304257b8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/unlock.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/upload.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/upload.png.mno
deleted file mode 100755
index 09b8f57a26..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/upload.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/usb.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/usb.png.mno
deleted file mode 100755
index 3c51ffe554..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/usb.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-add.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-add.png.mno
deleted file mode 100755
index b027c5d5ae..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-add.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-comment.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-comment.png.mno
deleted file mode 100755
index fe6cb78dcc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-comment.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-delete.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-delete.png.mno
deleted file mode 100755
index 90033dc575..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-delete.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-disable.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-disable.png.mno
deleted file mode 100755
index 95c8be9c46..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-disable.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-edit.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-edit.png.mno
deleted file mode 100755
index fcd2c42f1c..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-edit.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-group.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-group.png.mno
deleted file mode 100755
index e7cf3783f8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user-group.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user.png.mno
deleted file mode 100755
index 9a0af46d25..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/user.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-camera.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-camera.png.mno
deleted file mode 100755
index cea8d01d57..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-camera.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-clapper.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-clapper.png.mno
deleted file mode 100755
index 05b2e980e8..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-clapper.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-film.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-film.png.mno
deleted file mode 100755
index cee0cbf147..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-film.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-reel.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-reel.png.mno
deleted file mode 100755
index bb4a763a9b..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/video-reel.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command-disable.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command-disable.png.mno
deleted file mode 100755
index 66ee60524e..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command-disable.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command.png.mno
deleted file mode 100755
index d62f5c7554..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/voice-command.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-high.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-high.png.mno
deleted file mode 100755
index 872bb91f6a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-high.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-low.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-low.png.mno
deleted file mode 100755
index c750851027..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-low.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-mute.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-mute.png.mno
deleted file mode 100755
index d29215100f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/volume-mute.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/walk.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/walk.png.mno
deleted file mode 100755
index fe0fbd3673..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/walk.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wallet.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wallet.png.mno
deleted file mode 100755
index 02703ccfc5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wallet.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/weather.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/weather.png.mno
deleted file mode 100755
index 63f7b3dea7..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/weather.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/web.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/web.png.mno
deleted file mode 100755
index 3b4a93bca9..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/web.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/webcam.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/webcam.png.mno
deleted file mode 100755
index 56f5b8dd64..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/webcam.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wine-glass.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wine-glass.png.mno
deleted file mode 100755
index 9bfdd87a55..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wine-glass.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wireless.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wireless.png.mno
deleted file mode 100755
index 7dab170957..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/wireless.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/write-note.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/write-note.png.mno
deleted file mode 100755
index 080258a934..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/write-note.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-in.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-in.png.mno
deleted file mode 100755
index e07daecd7f..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-in.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-out.png.mno b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-out.png.mno
deleted file mode 100755
index 145dca8d45..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/_notes/zoom-out.png.mno
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset.png b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset.png
deleted file mode 100755
index 37dfc5384c..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset_hover.png b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset_hover.png
deleted file mode 100755
index d7f7e4d3c6..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/iconset_hover.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/link.png b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/link.png
deleted file mode 100755
index acaefbe938..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/link.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/star_yellow.png b/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/star_yellow.png
deleted file mode 100755
index 55a29baa32..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/Rocky32px/star_yellow.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.ChEBICompound.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.ChEBICompound.css
deleted file mode 100755
index 7ea560b86d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.ChEBICompound.css
+++ /dev/null
@@ -1,101 +0,0 @@
-@CHARSET "UTF-8";
-
-div.ChEBICompound {
- padding: 0px;
- margin: 0px;
- overflow: hidden;
- background-color: white;
-}
-
-div.ChEBICompound_image {
- position: relative;
- float: right;
- width: 65%;
- height: 100%;
-}
-
-div.ChEBICompound .noImage {
- background-image: url('images/noImage.png') no-repeat;
- margin: auto;
- width: 48px;
- height: 64px
-}
-
-
-div.ChEBICompound_tab {
- width: 35%;
- height: 100%;
- position: relative;
- float: left;
- background-color: #EEF5F5;
- background-image: url('images/panel1.png');
- background-repeat: repeat-y;
- background-position-x: right;
- color: #066;
-}
-
-div.ChEBICompound_image img {
- margin-top: auto;
- margin-right: auto;
- margin-bottom: auto;
- margin-left: auto;
- display: table-cell;
-}
-
-div.ChEBICompound_tab div.content {
- font-family: "Heveltica Neue", Arial, "sans serif";
- font-size: 12px;
- color: #066;
- word-wrap:break-word;
- position:relative;
- float: left;
-}
-
-div.ChEBICompound_tab div.content h2 {
- font-weight: 600;
- margin: 0;
- margin: 10px 7px 0 0px;
- font-size: 100%;
-}
-
-div.ChEBICompound_tab div.content p {
- text-align: left;
- font-style: italic;
- text-indent: 0;
- line-height: 1.2;
- padding: 0 7px 0 7px;
-}
-
-div.ChEBICompound_tab div.content div.star {
- background-image: url('Rocky32px/star_yellow.png');
- background-size: 16px 16px;
- background-repeat: repeat-x;
- width: 16px;
- height: 16px;
- margin: 0 7px 0 7px;
-}
-
-/* Button to hide/show the left panel */
-div.ChEBICompound_tab div.toggle {
- width: 24px;
- height: 24px;
- position:relative;
- float: right;
- background-image: url('Rocky32px/iconset.png');
-}
-
-div.ChEBICompound_tab div:hover.toggle {
- background-image: url('Rocky32px/iconset_hover.png');
-}
-
-div.ChEBICompound_tab div.collapse {
- background-position: 0 0;
-}
-
-div.ChEBICompound_tab div.expand {
- background-position: 0 -24px;
-}
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.DNAContentViewer.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.DNAContentViewer.css
deleted file mode 100755
index c72da1e5ca..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.DNAContentViewer.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/* remove label borders in IE6 because IE6 does not support transparency */
-* html .ui-multiselect-checkboxes label { border:none }
-
-.label{
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-marker-base{
- position:absolute;
-}
-
-.redrawn-path{
- position:absolute;
-
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsBundleD3.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsBundleD3.css
deleted file mode 100755
index 95724fff40..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsBundleD3.css
+++ /dev/null
@@ -1,54 +0,0 @@
-.graphCircle {
- border: 1px solid #000;
- background-color: #E5E5EF;
-}
-
-.graphCircle path.arc {
- fill: #fff;
-}
-
-.graphCircle .node {
- font-size: 10px;
-}
-
-.graphCircle .node:hover {
- fill: #1f77b4;
-}
-
-.graphCircle .link {
- fill: none;
- stroke: #1f77b4;
- stroke-opacity: .4;
- pointer-events: none;
-}
-
-.graphCircle .link.source, .graphCircle .link.target {
- stroke-opacity: 1;
- stroke-width: 2px;
-}
-
-.graphCircle .node.target {
- fill: #d62728 !important;
-}
-
-.graphCircle .link.source {
- stroke: #d62728;
-}
-
-.graphCircle .node.source {
- fill: #2ca02c;
-}
-
-.graphCircle .link.target {
- stroke: #2ca02c;
-}
-.graphCircle .figure {
- fill: #46D;
-}
-.graphCircle .legend {
- stroke: transparent;
- pointer-events: none;
-}
-.graphCircle .mainLegend{
- font-size: 70%;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsD3.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsD3.css
deleted file mode 100755
index c48926a435..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.InteractionsD3.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.node {
- stroke: #fff;
- stroke-width: 1.5px;
-}
-
-.cursor {
- fill: none;
- stroke: brown;
- pointer-events: none;
-}
-line.link {
- stroke: #999;
- stroke-opacity: .6;
-}
-
-div.graph {
- border: 1px solid #000;
- background-color: #E5E5EF;
-}
-
-.figure {
- fill: #46D;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.Protein3D.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.Protein3D.css
deleted file mode 100755
index 82989dae4d..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.Protein3D.css
+++ /dev/null
@@ -1,79 +0,0 @@
-@CHARSET "UTF-8";
-
-div.Protein3D {
- padding: 0px;
- margin: 0px;
- overflow: hidden;
- display: block;
-}
-
-div.Protein3D_loadingImage {
- background-image: url('images/ajax-loader-1.gif');
- background-repeat: no-repeat;
- background-position: center;
- width: 100%;
- height: 100%;
-}
-
-div.Protein3D_applet {
- position: relative;
- float: right;
- width: 65%;
- height: 100%;
-}
-
-div.Protein3D_tab {
- width: 35%;
- height: 100%;
- position: relative;
- float: left;
- background-color: #FFF;
- background-image: url('images/panel1.png');
- background-repeat: repeat-y;
- background-position-x: right;
- color: #EEE;
-}
-
-div.Protein3D_tab div.content {
- font-family: "Heveltica Neue", Arial, "sans serif";
- font-size: 12px;
- position:relative;
- float: left;
- background-color: #000;
-}
-
-div.Protein3D_tab div.content h1 {
- margin: 5px 7px 0 7px;
- font-size: 12px;
-}
-
-div.Protein3D_tab div.content input, select {
- text-align: left;
- line-height: 1.1;
- margin: 0 5px 0 7px;
-}
-
-/* Button to hide/show the left panel */
-div.Protein3D_tab div.toggle {
- width: 24px;
- height: 24px;
- position:relative;
- float: right;
- background-image: url('Rocky32px/iconset.png');
-}
-
-div.Protein3D_tab div:hover.toggle {
- background-image: url('Rocky32px/iconset_hover.png');
-}
-
-div.Protein3D_tab div.collapse {
- background-position: 0 0;
-}
-
-div.Protein3D_tab div.expand {
- background-position: 0 -24px;
-}
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.ProteinPortafolio.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.ProteinPortafolio.css
deleted file mode 100755
index 9bbdd5a39a..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.ProteinPortafolio.css
+++ /dev/null
@@ -1,71 +0,0 @@
-div.ProteinPortafolio {
- width: 900px;
- height: 350px;
-}
-
-div.ProteinPortafolio .crop {
- width: 100%;
- display:table-cell;
- position:relative;
- vertical-align: middle;
-}
-
-div.ProteinPortafolio .alpha {
- float: left;
- width: 50%;
-}
-
-div.ProteinPortafolio .beta {
- float: right;
- width: 50%;
-}
-
-div.ProteinPortafolio .content {
- overflow: auto;
- height: auto;
-}
-
-div.ProteinPortafolio .header {
- height: auto;
-}
-
-div.ProteinPortafolio .toolbar {
-
-}
-
-div.ProteinPortafolio ul.features {
- list-style: none;
- padding-left: 15px;
-}
-
-div.ProteinPortafolio ul.features li span.label {
- background: gray;
- color: white;
- position: relative;
- padding: 0.16em;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- margin: 7px 7px 0 0;
- text-decoration: none;
- left: -10px;
- font-family: Helvetica, Arial, sans-serif;
-}
-
-div.ProteinPortafolio ul.features li span.label:after {
- display: inline-block;
- border: 0.74em solid;
- height: 0;
- width: 0;
- position: absolute;
- right: -1.4em;
- top: 0;
- content: "";
- display: inline-block;
- border-color: transparent transparent transparent gray
-}
-
-
-div.ProteinPortafolio pre {
- padding: 0px;
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.Rheaction.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.Rheaction.css
deleted file mode 100755
index 94113a1447..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.Rheaction.css
+++ /dev/null
@@ -1,35 +0,0 @@
-.scrollpane {
- overflow: auto;
-}
-
-.reactionRow {
- display: table-row;
-}
-
-div.compound {
- display: table-cell;
- text-align: center;
-}
-
-.stoichCoef {
- font-weight: bold;
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-
-.direction {
- display: table-cell;
- font-weight: bold;
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-
-.compoundName {
- color: blue;
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-
-.compoundStructure {
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.Tooltip.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.Tooltip.css
deleted file mode 100755
index dac63d7c03..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.Tooltip.css
+++ /dev/null
@@ -1,69 +0,0 @@
-@CHARSET "UTF-8";
-
-div.Tooltip div.body {
- background-color: white;
-
- border: 1px solid #AAA;
- padding: 2px 10px;
- word-wrap:break-word;
-
- min-width: 36px;
- min-height: 36px;
-
- overflow: auto;
-
- display: table-cell;
- vertical-align: middle;
- text-align: center;
-}
-
-/* Fancy border */
-div.Tooltip div.body {
- -moz-border-radius: 0 7px 0 7px;
- -khtml-border-radius: 0 7px 0 7px;
- -webkit-border-radius: 0 7px 0 7px;
- border-radius: 7px 0 7px 0;
- box-shadow: 3px 3px 4px #f3f3f3;
- -moz-box-shadow: 3px 3px 4px #f3f3f3;
- -khtml-box-shadow: 3px 3px 4px #f3f3f3;
- -webkit-box-shadow: 3px 3px 4px #f3f3f3;
-}
-
-
-
-/* ARROW images */
-div.Tooltip div.arrow {
- background: url(images/arrows.png) no-repeat;
-}
-
-div.Tooltip div.left.arrow {
- background-position: 0 -1px;
- height: 12px;
- width: 7px;
-}
-
-div.Tooltip div.right.arrow {
- background-position: -12px -1px;
- height: 12px;
- width: 7px;
-}
-
-div.Tooltip div.top.arrow {
- background-position: -37px -1px;
- height: 7px;
- width: 12px;
-}
-
-div.Tooltip div.bottom.arrow {
- background-position: -21px -1px;
- height: 7px;
- width: 12px;
-}
-
-
-
-
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.chromosome.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.chromosome.css
deleted file mode 100755
index 0cfa0cdcd2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.chromosome.css
+++ /dev/null
@@ -1,82 +0,0 @@
-
-.band {
- position: relative;
- z-index: 3;
- height: 15px;
- border: 1px solid #333;
- border-right: 0px;
- border-left: 0px;
- border-image: initial;
- cursor: pointer;
- float:left;
-}
-.band:hover {
- border-color: #F00;
- background-color: #FEE;
-
-}
-.q_acen, .first{
- border-left: 1px solid #333;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -webkit-top-bottom-left-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-topleft: 4px;
-}
-.p_acen, .last {
- border-right: 1px solid #333;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -webkit-top-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-topright: 4px;
-}
-.p_acen,.q_acen {
- background-color: #DDD;
-}
-.gpos25 {
- background-color: rgb(25%, 25%, 25%);
-}
-.gpos50 {
- background-color: rgb(50%, 50%, 50%);
-}
-.gpos75 {
- background-color: rgb(75%, 75%, 75%);
-}
-.gpos100 {
- background-color: #000;
-}
-.gneg {
- background-color: #FFF;
-}
-.gvar {
- background-color: #CCC;
-}
-.stalk {
- background-color: #666;
- height: 10px;
- top:3px;
-}
-div.band:before{
- content:attr(title);
- display:none;
-}
-div.band:hover::before{
- width:60px;
- display:block;
- background:#CCF;
- border:1px solid #99C;
- padding:4px;
- margin: 25px 0 0 -20px;
- text-align:center;
- border-radius: 3px;
- -webkit-radius: 3px;
- -moz-border-radius: 3px;
-}
-div:hover{
- z-index:5;
-}
-#YourOwnDivId {
- padding: 10px;
- padding-bottom: 40px;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.detailsFrame.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.detailsFrame.css
deleted file mode 100755
index 333f93f8f5..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.detailsFrame.css
+++ /dev/null
@@ -1,103 +0,0 @@
-.protein ::-webkit-scrollbar {
- width: 12px;
-}
-.protein ::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
- border-radius: 10px;
-}
-.protein ::-webkit-scrollbar-thumb {
- border-radius: 10px;
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
-}
-.protein{
- font-family: "Helvetica Neue", Helvetica, sans-serif;
- display: inline-block;
- position: relative;
- vertical-align: text-top;
- text-align: center;
- margin: 10px 0 10px 0;
- zoom: 1;
- -webkit-font-smoothing: antialiased;
- background: #E9EEEF;
- width: 240px;
- border-radius: 10px;
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),inset 0 1px 1px rgba(255, 255, 255, 0.8);
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3),inset 0 1px 1px rgba(255,255,255,0.8);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),inset 0 1px 1px rgba(255, 255, 255, 0.8);
- padding: 10px 10px 10px 10px;
-}
-header.protein-label {
- font-size: 22px;
- font-weight: bold;
- font-style: normal;
- color: #333;
- letter-spacing: .8px;
- text-align: center;
- padding-bottom: 0px;
-}
-.protein ul {
- line-height: 150%;
- list-style: none;
- text-align: left;
- padding: 0px;
- margin: 0px;
- height: 20em;
- overflow: auto;
-}
-
-.protein li {
- padding: 0px;
- display: block;
- margin: 0 auto 0 auto;
- color: gray;
-}
-.protein .protein-description{
- text-align: center;
- margin: 0 0 0 auto;
-}
-.protein .protein-description h2 {
- font-weight: normal;
- font-variant: normal;
- font-style:italic;
- line-height: 1.5;
- font-size: 14px;
- color: #888;
- display: inline-block;
- padding-bottom: 10px;
- margin-top: 0px;
- margin-bottom: 5px;
- border-bottom: 1px dotted gray;
- zoom: 1;
-}
-.to_minimize{
- background-image:url('images/arrowAR.png');
- background-repeat: no-repeat;
-}
-.minimized{
- background-image:url('images/arrowDL.png');
- background-repeat: no-repeat;
-}
-.minimize{
- float: right;
- position:relative;
- top: 5px;
- right: 5px;
- width:20px;
- height: 20px;
-}
-.minimize:hover{
- cursor: pointer;
-}
-.dragger{
- background-image:url('images/draggable.png');
- background-repeat: no-repeat;
- width:20px;
- height: 20px;
- float: left;
- position:relative;
- top: 5px;
- left: 5px;
-}
-.dragger:hover{
- cursor: move;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.expressionLoader.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.expressionLoader.css
deleted file mode 100755
index 40a0823404..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.expressionLoader.css
+++ /dev/null
@@ -1,47 +0,0 @@
-.ui-dialog table {
- background-color:gray;
-}
-.ui-dialog td, .ui-dialog th {
- background-color:white; text-align:center;
-}
-.button-link {
- display:none;
-}
-.fake-file{
- padding-left:32px;
- padding-top:16px;
- vertical-align:middle;
- background-image:url('images/open-exp.png');
-}
-.exp-edit{
- background-image:url('images/pencil-exp.png');
-}
-.exp-remove{
- background-image:url('images/off-exp.png');
-}
-.fake-file, .exp-edit , .exp-remove{
- min-width:32px;
- height:32px;
- background-repeat: no-repeat;
- float: left;
- margin: 5px;
- color: #1F77B4;
- text-decoration: underline;
- font-size: 75%;
-}
-.fake-file:hover, .exp-edit:hover, .exp-remove:hover {
- cursor: pointer;
- font-weight:bold;
- background-color: #FDD;
-}
-output {
- text-decoration: none;
- font-size: 75%;
- color: #F55;
-}
-label[for=color] {
- font-size: 75%;
- text-decoration: none;
- padding-top: 10px;
-
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.interactiveInteractionTable.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.interactiveInteractionTable.css
deleted file mode 100755
index 4aaea98e58..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.interactiveInteractionTable.css
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Default style for interativeDataTable */
-
-div.dataTables_paginate {
- float: right;
-
-}
-
-div.dataTables_filter {
- float: right;
- margin-top:10px;
- margin-right:5px;
- margin-bottom:5px;
-}
-
-div.dataTables_length {
- float: left;
- margin-top:10px;
- margin-left:5px;
- margin-bottom:5px;
-}
-
-.dataTables_cellWrapper {
- white-space:nowrap;
- text-overflow:ellipsis;
- overflow:hidden;
- display:block;
- width:80px; /*80px*/
- /*text-align: left;*/
- /*background: #91c5d4;*/
-}
-
-.ellipsis {
- white-space:nowrap;
- text-overflow:ellipsis;
- overflow:hidden;
- width:25px;
- display:block;
-}
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.ruler.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.ruler.css
deleted file mode 100755
index 832d774a72..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.ruler.css
+++ /dev/null
@@ -1,116 +0,0 @@
-.ruler {
- height:100%;
- line-height:1;
- font-family:Helvetica, Arial, sans-serif;
- color:#666;
- font-size: 12px;
-}
-
-.ruler .active_rules, .rules_editor{
- background-image:url('images/arrow_right_small.png');
- background-repeat: no-repeat;
- background-color: transparent;
- padding: 7px 10px 10px 40px;
-}
-.ruler header{
- font-size: 120%;
- font-weight:bold;
- letter-spacing: -0.04em;
-}
-.ruler ul{
- list-style-type: none;
- padding: 0px;
- margin: 0px;
-}
-.ruler ul li{
- background-color: #F3F3F3;
- padding: 6px;
- margin-top:8px;
- border-radius: 15px;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-box-shadow: rgba(0, 0, 128, 0.246094) 2px 2px 1px;
-}
-.ruler .active_rules ul.sortable li{
- padding-left: 40px;
-}
-.ruler .active_rules ul.sortable li:hover{
- background-color: #F3F8F3;
- background-image:url('images/draggable.png');
- background-repeat: no-repeat;
- background-position: 10px 4px;
-}
-.rule {
- width:80%;
-}
-.rights {
- text-align:right;
-}
-.affected {
- width:9%;
- text-align:center;
- font-size: 70%;
- border: 1px solid #CCC;
- padding: 0px 2px 0px 2px;
- border-radius: .8em;
- -webkit-border-radius: .8em;
- -moz-border-radius: .5em;
- text-align:right;
-}
-table {
- width:100%
-}
-.rule_item{
- list-style-type: none;
-}
-.rule_item td {
- background: transparent;
- border: 0px;
-}
-.rule_item table{
- margin: 0px;
-}
-.action {
- width:9%;
- text-align:center;
- font-size: 85%;
- background-color: #E3E3E3;
- padding: 2px;
- border-radius: 7px;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- -webkit-box-shadow: rgba(0, 0, 128, 0.246094) 2px 2px 1px;
-}
-.action:active {
- background-color: #F3F3F3;
- -webkit-box-shadow: rgba(0, 0, 128, 0.246094) -2px -2px 1px;
-
-}
-.action:hover {
- font-weight:bold;
- cursor: pointer;
-}
-.styled-select {
- background-color: transparent;
- font-family:Helvetica, Arial, sans-serif;
- font-size: 12px;
- text-decoration: underline;
- border: 0px ;
- overflow: hidden;
- -webkit-appearance: none;
-}
-.styled-select:hover {
- cursor: pointer;
-}
-.add_rule {
- text-align:right;
- margin-top:10px;
- text-decoration: underline;
-}
-.add_rule a{
- font-weight:bold;
-}
-.add_rule a:hover {
- color: #898;
- cursor: pointer;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.selector.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.selector.css
deleted file mode 100755
index 00274af704..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.selector.css
+++ /dev/null
@@ -1,30 +0,0 @@
-.selector {
- border: 1px solid #00F;
- position: absolute;
- height: 30px;
- width: 30px;
- z-index: 10;
- background-color: rgb(75%, 75%, 100%);
- opacity:0.4;
- filter:alpha(opacity=40); /* For IE8 and earlier */
-}
-
-.scaler {
- z-index: 11;
- position: absolute;
- height: 10px;
- width: 10px;
- border: 0px solid blue;
- background-image:url('images/grid2.png');
- background-repeat:repeat;
-}
-
-.left {cursor:w-resize;}
-.right {cursor:e-resize;}
-.top {cursor:n-resize;}
-.bottom {cursor:s-resize;}
-
-
-#YourOwnDivId {
- height: 100px;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.table.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.table.css
deleted file mode 100755
index 9ef960a630..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.table.css
+++ /dev/null
@@ -1,227 +0,0 @@
-
-/*
- * Table
- */
-table.dataTable {
- margin: 0 auto;
- clear: both;
- width: 100%;
-}
-
-table.dataTable thead tr th {
- padding: 3px 18px 3px 10px;
- font-weight: bold;
- cursor: pointer;
- *cursor: hand;
- color: #FFF;
- background: #777;
- white-space: nowrap;
-}
-
-table.dataTable tfoot th {
- padding: 3px 18px 3px 10px;
- border-top: 1px solid black;
- font-weight: bold;
-}
-
-table.dataTable td {
- padding: 3px 10px;
- border: 1px solid #EBEBEB;
- background-color: inherit;
-}
-
-table.dataTable td.center,
-table.dataTable td.dataTables_empty {
- text-align: center;
-}
-
-/*
- * Rows coloring
- */
-table.dataTable tr.selected td { background-color: #fffba4; }
-
-table.dataTable tr.odd { background-color: white; }
-table.dataTable tr.even { background-color: white; }
-
-table.dataTable tr.odd td.sorting_1 { background-color: #A9C7E0; }
-table.dataTable tr.odd td.sorting_2 { background-color: #A9C7E0; }
-table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
-
-table.dataTable tr.even td.sorting_1 { background-color: #A9C7E0; }
-table.dataTable tr.even td.sorting_2 { background-color: #A9C7E0; }
-table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
-
-
-/*
- * Table wrapper
- */
-.dataTables_wrapper {
- position: relative;
- clear: both;
- *zoom: 1;
-}
-
-
-/*
- * Page length menu
- */
-.dataTables_length {
- float: left;
-}
-
-
-/*
- * Filter
- */
-.dataTables_filter {
- float: left;
- text-align: right;
- margin: 0px 0px 5px 0px;
-}
-
-/*
- * Table information
- */
-.dataTables_info {
- clear: both;
- float: left;
-}
-
-/*
- * Pagination
- */
-.dataTables_paginate {
- float: right;
- text-align: right;
-}
-
-/* Full number pagination */
-.paging_full_numbers {
- height: 22px;
- line-height: 22px;
-}
-.paging_full_numbers a:active {
- outline: none
-}
-.paging_full_numbers a:hover {
- text-decoration: none;
-}
-
-.paging_full_numbers a.paginate_button,
-.paging_full_numbers a.paginate_active {
- border: 0px;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- padding: 2px 5px;
- margin: 0 1px;
- cursor: pointer;
- *cursor: hand;
- color: #FFF !important;
-}
-
-.paging_full_numbers a.paginate_button {
- background-color: #555544;
-}
-
-.paging_full_numbers a.paginate_button:hover {
- background-color: #ccc;
- text-decoration: none !important;
-}
-
-.paging_full_numbers a.paginate_active {
- background-color: #5D96C5;
-}
-
-.paging_full_numbers a.paginate_active:hover {
- background-color: #ccc;
-}
-
-.paging_full_numbers a.first {
-
-}
-
-
-/*
- * Processing indicator
- */
-.dataTables_processing {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 250px;
- height: 30px;
- margin-left: -125px;
- margin-top: -15px;
- padding: 14px 0 2px 0;
- border: 1px solid #ddd;
- text-align: center;
- color: #999;
- font-size: 14px;
- background-color: white;
-}
-
-
-/*
- * Sorting
- */
-.sorting { background: url('images/sort_both.png') no-repeat center right; }
-.sorting_asc { background: url('images/sort_asc.png') no-repeat center right; }
-.sorting_desc { background: url('images/sort_desc.png') no-repeat center right; }
-
-.sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; }
-.sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; }
-
-table.dataTable th:active {
- outline: none;
-}
-
-
-/*
- * Scrolling
- */
-.dataTables_scroll {
- clear: both;
-}
-
-.dataTables_scrollBody {
- *margin-top: -1px;
-}
-
-
-
-/*
- * MultiSelect Plugin
- */
-.dataTables_settings {
- float: right;
- width: auto;
-}
-
-.ui-multiselect { padding:0px; text-align:left }
-.ui-multiselect span.ui-icon { float:right }
-.ui-multiselect-single .ui-multiselect-checkboxes input { position:absolute !important; top: auto !important; left:-9999px; }
-.ui-multiselect-single .ui-multiselect-checkboxes label { padding:5px !important }
-
-.ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 4px }
-.ui-multiselect-header ul { font-size:0.9em }
-.ui-multiselect-header ul li { float:left; padding:0 10px 0 0 }
-.ui-multiselect-header a { text-decoration:none }
-.ui-multiselect-header a:hover { text-decoration:underline }
-.ui-multiselect-header span.ui-icon { float:left }
-.ui-multiselect-header li.ui-multiselect-close { float:right; text-align:right; padding-right:0 }
-
-.ui-multiselect-menu { display:none; padding:3px; position:absolute; z-index:10000 }
-.ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */; overflow-y:scroll }
-.ui-multiselect-checkboxes label { cursor:default; display:block; border:1px solid transparent; padding:3px 1px }
-.ui-multiselect-checkboxes label input { position:relative; top:1px }
-.ui-multiselect-checkboxes li { clear:both; font-size:0.9em; padding-right:3px }
-.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label { text-align:center; font-weight:bold; border-bottom:1px solid }
-.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a { display:block; padding:3px; margin:1px 0; text-decoration:none }
-
-/* remove label borders in IE6 because IE6 does not support transparency */
-* html .ui-multiselect-checkboxes label { border:none }
-
-
-
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/biojs.wigExplorer.css b/src/lib/biojs-1.0/src/main/resources/css/biojs.wigExplorer.css
deleted file mode 100755
index da657c15a3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/biojs.wigExplorer.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* remove label borders in IE6 because IE6 does not support transparency */
-* html .ui-multiselect-checkboxes label { border:none }
-
-.label{
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-table {
- background-color: #FFFFFF;
- border: 5px solid #F1F1F1;
- border-collapse: collapse;
- margin: 9px auto;
- width: 99%;
-}
-
-th, td {
- font-size: 93%;
-}
-th, td {
- border: 1px solid #F1F1F1;
- border-collapse: collapse;
- padding: 8px 5px 5px;
- vertical-align: top;
-}
-
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_page.css b/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_page.css
deleted file mode 100755
index 89c62bb785..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_page.css
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * General page setup
- */
-#dt_example {
- font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
- margin: 0;
- padding: 0;
- color: #333;
- background-color: #fff;
-}
-
-
-#dt_example #container {
- width: 800px;
- margin: 30px auto;
- padding: 0;
-}
-
-
-#dt_example #footer {
- margin: 50px auto 0 auto;
- padding: 0;
-}
-
-#dt_example #demo {
- margin: 30px auto 0 auto;
-}
-
-#dt_example .demo_jui {
- margin: 30px auto 0 auto;
-}
-
-#dt_example .big {
- font-size: 1.3em;
- font-weight: bold;
- line-height: 1.6em;
- color: #4E6CA3;
-}
-
-#dt_example .spacer {
- height: 20px;
- clear: both;
-}
-
-#dt_example .clear {
- clear: both;
-}
-
-#dt_example pre {
- padding: 15px;
- background-color: #F5F5F5;
- border: 1px solid #CCCCCC;
-}
-
-#dt_example h1 {
- margin-top: 2em;
- font-size: 1.3em;
- font-weight: normal;
- line-height: 1.6em;
- color: #4E6CA3;
- border-bottom: 1px solid #B0BED9;
- clear: both;
-}
-
-#dt_example h2 {
- font-size: 1.2em;
- font-weight: normal;
- line-height: 1.6em;
- color: #4E6CA3;
- clear: both;
-}
-
-#dt_example a {
- color: #0063DC;
- text-decoration: none;
-}
-
-#dt_example a:hover {
- text-decoration: underline;
-}
-
-#dt_example ul {
- color: #4E6CA3;
-}
-
-.css_right {
- float: right;
-}
-
-.css_left {
- float: left;
-}
-
-.demo_links {
- float: left;
- width: 50%;
- margin-bottom: 1em;
-}
-
-#demo_info {
- padding: 5px;
- border: 1px solid #B0BED9;
- height: 100px;
- width: 100%;
- overflow: auto;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_table.css b/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_table.css
deleted file mode 100755
index f41a0042d2..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/dataTable/demo_table.css
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- * File: demo_table.css
- * CVS: $Id$
- * Description: CSS descriptions for DataTables demo pages
- * Author: Allan Jardine
- * Created: Tue May 12 06:47:22 BST 2009
- * Modified: $Date$ by $Author$
- * Language: CSS
- * Project: DataTables
- *
- * Copyright 2009 Allan Jardine. All Rights Reserved.
- *
- * ***************************************************************************
- * DESCRIPTION
- *
- * The styles given here are suitable for the demos that are used with the standard DataTables
- * distribution (see www.datatables.net). You will most likely wish to modify these styles to
- * meet the layout requirements of your site.
- *
- * Common issues:
- * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
- * no conflict between the two pagination types. If you want to use full_numbers pagination
- * ensure that you either have "example_alt_pagination" as a body class name, or better yet,
- * modify that selector.
- * Note that the path used for Images is relative. All images are by default located in
- * ../images/ - relative to this CSS file.
- */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables features
- */
-
-.dataTables_wrapper {
- position: relative;
- clear: both;
- zoom: 1; /* Feeling sorry for IE */
-}
-
-.dataTables_processing {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 250px;
- height: 30px;
- margin-left: -125px;
- margin-top: -15px;
- padding: 14px 0 2px 0;
- border: 1px solid #ddd;
- text-align: center;
- color: #999;
- font-size: 14px;
- background-color: white;
-}
-
-.dataTables_length {
- width: 40%;
- float: left;
-}
-
-.dataTables_filter {
- width: 50%;
- float: right;
- text-align: right;
-}
-
-.dataTables_info {
- width: 60%;
- float: left;
-}
-
-.dataTables_paginate {
- float: right;
- text-align: right;
-}
-
-/* Pagination nested */
-.paginate_disabled_previous, .paginate_enabled_previous,
-.paginate_disabled_next, .paginate_enabled_next {
- height: 19px;
- float: left;
- cursor: pointer;
- *cursor: hand;
- color: #111 !important;
-}
-.paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
-.paginate_disabled_next:hover, .paginate_enabled_next:hover {
- text-decoration: none !important;
-}
-.paginate_disabled_previous:active, .paginate_enabled_previous:active,
-.paginate_disabled_next:active, .paginate_enabled_next:active {
- outline: none;
-}
-
-.paginate_disabled_previous,
-.paginate_disabled_next {
- color: #666 !important;
-}
-.paginate_disabled_previous, .paginate_enabled_previous {
- padding-left: 23px;
-}
-.paginate_disabled_next, .paginate_enabled_next {
- padding-right: 23px;
- margin-left: 10px;
-}
-
-.paginate_disabled_previous {
- background: url('../images/back_disabled.png') no-repeat top left;
-}
-
-.paginate_enabled_previous {
- background: url('../images/back_enabled.png') no-repeat top left;
-}
-.paginate_enabled_previous:hover {
- background: url('../images/back_enabled_hover.png') no-repeat top left;
-}
-
-.paginate_disabled_next {
- background: url('../images/forward_disabled.png') no-repeat top right;
-}
-
-.paginate_enabled_next {
- background: url('../images/forward_enabled.png') no-repeat top right;
-}
-.paginate_enabled_next:hover {
- background: url('../images/forward_enabled_hover.png') no-repeat top right;
-}
-
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables display
- */
-table.display {
- margin: 0 auto;
- clear: both;
- width: 100%;
-
- /* Note Firefox 3.5 and before have a bug with border-collapse
- * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
- * border-spacing: 0; is one possible option. Conditional-css.com is
- * useful for this kind of thing
- *
- * Further note IE 6/7 has problems when calculating widths with border width.
- * It subtracts one px relative to the other browsers from the first column, and
- * adds one to the end...
- *
- * If you want that effect I'd suggest setting a border-top/left on th/td's and
- * then filling in the gaps with other borders.
- */
-}
-
-table.display thead th {
- padding: 3px 18px 3px 10px;
- border-bottom: 1px solid black;
- font-weight: bold;
- cursor: pointer;
- * cursor: hand;
-}
-
-table.display tfoot th {
- padding: 3px 18px 3px 10px;
- border-top: 1px solid black;
- font-weight: bold;
-}
-
-table.display tr.heading2 td {
- border-bottom: 1px solid #aaa;
-}
-
-table.display td {
- padding: 3px 10px;
-}
-
-table.display td.center {
- text-align: center;
-}
-
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables sorting
- */
-
-.sorting_asc {
- background: url('../images/sort_asc.png') no-repeat center right;
-}
-
-.sorting_desc {
- background: url('../images/sort_desc.png') no-repeat center right;
-}
-
-.sorting {
- background: url('../images/sort_both.png') no-repeat center right;
-}
-
-.sorting_asc_disabled {
- background: url('../images/sort_asc_disabled.png') no-repeat center right;
-}
-
-.sorting_desc_disabled {
- background: url('../images/sort_desc_disabled.png') no-repeat center right;
-}
-
-th:active {
- outline: none;
-}
-
-
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * DataTables row classes
- */
-table.display tr.odd.gradeA {
- background-color: #ddffdd;
-}
-
-table.display tr.even.gradeA {
- background-color: #eeffee;
-}
-
-table.display tr.odd.gradeC {
- background-color: #ddddff;
-}
-
-table.display tr.even.gradeC {
- background-color: #eeeeff;
-}
-
-table.display tr.odd.gradeX {
- background-color: #ffdddd;
-}
-
-table.display tr.even.gradeX {
- background-color: #ffeeee;
-}
-
-table.display tr.odd.gradeU {
- background-color: #ddd;
-}
-
-table.display tr.even.gradeU {
- background-color: #eee;
-}
-
-
-tr.odd {
- background-color: #E2E4FF;
-}
-
-tr.even {
- background-color: white;
-}
-
-
-
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Misc
- */
-.dataTables_scroll {
- clear: both;
-}
-
-.dataTables_scrollBody {
- *margin-top: -1px;
- -webkit-overflow-scrolling: touch;
-}
-
-.top, .bottom {
- padding: 15px;
- background-color: #F5F5F5;
- border: 1px solid #CCCCCC;
-}
-
-.top .dataTables_info {
- float: none;
-}
-
-.clear {
- clear: both;
-}
-
-.dataTables_empty {
- text-align: center;
-}
-
-tfoot input {
- margin: 0.5em 0;
- width: 100%;
- color: #444;
-}
-
-tfoot input.search_init {
- color: #999;
-}
-
-td.group {
- background-color: #d1cfd0;
- border-bottom: 2px solid #A19B9E;
- border-top: 2px solid #A19B9E;
-}
-
-td.details {
- background-color: #d1cfd0;
- border: 2px solid #A19B9E;
-}
-
-
-.example_alt_pagination div.dataTables_info {
- width: 40%;
-}
-
-.paging_full_numbers {
- width: 400px;
- height: 22px;
- line-height: 22px;
-}
-
-.paging_full_numbers a:active {
- outline: none
-}
-
-.paging_full_numbers a:hover {
- text-decoration: none;
-}
-
-.paging_full_numbers a.paginate_button,
- .paging_full_numbers a.paginate_active {
- border: 1px solid #aaa;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- padding: 2px 5px;
- margin: 0 3px;
- cursor: pointer;
- *cursor: hand;
- color: #333 !important;
-}
-
-.paging_full_numbers a.paginate_button {
- background-color: #ddd;
-}
-
-.paging_full_numbers a.paginate_button:hover {
- background-color: #ccc;
- text-decoration: none !important;
-}
-
-.paging_full_numbers a.paginate_active {
- background-color: #99B3FF;
-}
-
-table.display tr.even.row_selected td {
- background-color: #B0BED9;
-}
-
-table.display tr.odd.row_selected td {
- background-color: #9FAFD1;
-}
-
-
-/*
- * Sorting classes for columns
- */
-/* For the standard odd/even */
-tr.odd td.sorting_1 {
- background-color: #D3D6FF;
-}
-
-tr.odd td.sorting_2 {
- background-color: #DADCFF;
-}
-
-tr.odd td.sorting_3 {
- background-color: #E0E2FF;
-}
-
-tr.even td.sorting_1 {
- background-color: #EAEBFF;
-}
-
-tr.even td.sorting_2 {
- background-color: #F2F3FF;
-}
-
-tr.even td.sorting_3 {
- background-color: #F9F9FF;
-}
-
-
-/* For the Conditional-CSS grading rows */
-/*
- Colour calculations (based off the main row colours)
- Level 1:
- dd > c4
- ee > d5
- Level 2:
- dd > d1
- ee > e2
- */
-tr.odd.gradeA td.sorting_1 {
- background-color: #c4ffc4;
-}
-
-tr.odd.gradeA td.sorting_2 {
- background-color: #d1ffd1;
-}
-
-tr.odd.gradeA td.sorting_3 {
- background-color: #d1ffd1;
-}
-
-tr.even.gradeA td.sorting_1 {
- background-color: #d5ffd5;
-}
-
-tr.even.gradeA td.sorting_2 {
- background-color: #e2ffe2;
-}
-
-tr.even.gradeA td.sorting_3 {
- background-color: #e2ffe2;
-}
-
-tr.odd.gradeC td.sorting_1 {
- background-color: #c4c4ff;
-}
-
-tr.odd.gradeC td.sorting_2 {
- background-color: #d1d1ff;
-}
-
-tr.odd.gradeC td.sorting_3 {
- background-color: #d1d1ff;
-}
-
-tr.even.gradeC td.sorting_1 {
- background-color: #d5d5ff;
-}
-
-tr.even.gradeC td.sorting_2 {
- background-color: #e2e2ff;
-}
-
-tr.even.gradeC td.sorting_3 {
- background-color: #e2e2ff;
-}
-
-tr.odd.gradeX td.sorting_1 {
- background-color: #ffc4c4;
-}
-
-tr.odd.gradeX td.sorting_2 {
- background-color: #ffd1d1;
-}
-
-tr.odd.gradeX td.sorting_3 {
- background-color: #ffd1d1;
-}
-
-tr.even.gradeX td.sorting_1 {
- background-color: #ffd5d5;
-}
-
-tr.even.gradeX td.sorting_2 {
- background-color: #ffe2e2;
-}
-
-tr.even.gradeX td.sorting_3 {
- background-color: #ffe2e2;
-}
-
-tr.odd.gradeU td.sorting_1 {
- background-color: #c4c4c4;
-}
-
-tr.odd.gradeU td.sorting_2 {
- background-color: #d1d1d1;
-}
-
-tr.odd.gradeU td.sorting_3 {
- background-color: #d1d1d1;
-}
-
-tr.even.gradeU td.sorting_1 {
- background-color: #d5d5d5;
-}
-
-tr.even.gradeU td.sorting_2 {
- background-color: #e2e2e2;
-}
-
-tr.even.gradeU td.sorting_3 {
- background-color: #e2e2e2;
-}
-
-
-/*
- * Row highlighting example
- */
-.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
- background-color: #ECFFB3;
-}
-
-.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
- background-color: #E6FF99;
-}
-
-.ex_highlight_row #example tr.even:hover {
- background-color: #ECFFB3;
-}
-
-.ex_highlight_row #example tr.even:hover td.sorting_1 {
- background-color: #DDFF75;
-}
-
-.ex_highlight_row #example tr.even:hover td.sorting_2 {
- background-color: #E7FF9E;
-}
-
-.ex_highlight_row #example tr.even:hover td.sorting_3 {
- background-color: #E2FF89;
-}
-
-.ex_highlight_row #example tr.odd:hover {
- background-color: #E6FF99;
-}
-
-.ex_highlight_row #example tr.odd:hover td.sorting_1 {
- background-color: #D6FF5C;
-}
-
-.ex_highlight_row #example tr.odd:hover td.sorting_2 {
- background-color: #E0FF84;
-}
-
-.ex_highlight_row #example tr.odd:hover td.sorting_3 {
- background-color: #DBFF70;
-}
-
-
-/*
- * KeyTable
- */
-table.KeyTable td {
- border: 3px solid transparent;
-}
-
-table.KeyTable td.focus {
- border: 3px solid #3366FF;
-}
-
-table.display tr.gradeA {
- background-color: #eeffee;
-}
-
-table.display tr.gradeC {
- background-color: #ddddff;
-}
-
-table.display tr.gradeX {
- background-color: #ffdddd;
-}
-
-table.display tr.gradeU {
- background-color: #ddd;
-}
-
-div.box {
- height: 100px;
- padding: 10px;
- overflow: auto;
- border: 1px solid #8080FF;
- background-color: #E5E5FF;
-}
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/ajax-loader-1.gif b/src/lib/biojs-1.0/src/main/resources/css/images/ajax-loader-1.gif
deleted file mode 100755
index 597ddf0603..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/ajax-loader-1.gif and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/arrowAR.png b/src/lib/biojs-1.0/src/main/resources/css/images/arrowAR.png
deleted file mode 100755
index 4c89cefb07..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/arrowAR.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/arrowDL.png b/src/lib/biojs-1.0/src/main/resources/css/images/arrowDL.png
deleted file mode 100755
index 7bc1e1bdba..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/arrowDL.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/arrow_right_small.png b/src/lib/biojs-1.0/src/main/resources/css/images/arrow_right_small.png
deleted file mode 100755
index a137531437..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/arrow_right_small.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/arrows.png b/src/lib/biojs-1.0/src/main/resources/css/images/arrows.png
deleted file mode 100755
index 61a756c6d6..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/arrows.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/back_disabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/back_disabled.png
deleted file mode 100755
index 881de7976f..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/back_disabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled.png
deleted file mode 100755
index c608682b04..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled_hover.png b/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled_hover.png
deleted file mode 100755
index d300f1064b..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/back_enabled_hover.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/circle.gif b/src/lib/biojs-1.0/src/main/resources/css/images/circle.gif
deleted file mode 100755
index 599f7f13a6..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/circle.gif and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/draggable.png b/src/lib/biojs-1.0/src/main/resources/css/images/draggable.png
deleted file mode 100755
index 1e1c662304..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/draggable.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/forward_disabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/forward_disabled.png
deleted file mode 100755
index 6a6ded7de8..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/forward_disabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled.png
deleted file mode 100755
index a4e6b5384b..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled_hover.png b/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled_hover.png
deleted file mode 100755
index fc46c5ebf0..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/forward_enabled_hover.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/gradient.png b/src/lib/biojs-1.0/src/main/resources/css/images/gradient.png
deleted file mode 100755
index 561cdd9c59..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/gradient.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/grid2.png b/src/lib/biojs-1.0/src/main/resources/css/images/grid2.png
deleted file mode 100755
index ec7d3b51d1..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/grid2.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/line.gif b/src/lib/biojs-1.0/src/main/resources/css/images/line.gif
deleted file mode 100755
index 9eb1983788..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/line.gif and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/off-exp.png b/src/lib/biojs-1.0/src/main/resources/css/images/off-exp.png
deleted file mode 100755
index 4ebb871c0c..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/off-exp.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/open-exp.png b/src/lib/biojs-1.0/src/main/resources/css/images/open-exp.png
deleted file mode 100755
index 05ab6459e2..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/open-exp.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/panel1.png b/src/lib/biojs-1.0/src/main/resources/css/images/panel1.png
deleted file mode 100755
index 235b489468..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/panel1.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/pencil-exp.png b/src/lib/biojs-1.0/src/main/resources/css/images/pencil-exp.png
deleted file mode 100755
index b2d3454c80..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/pencil-exp.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/rainbow.png b/src/lib/biojs-1.0/src/main/resources/css/images/rainbow.png
deleted file mode 100755
index 8d6c71bf95..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/rainbow.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc.png b/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc.png
deleted file mode 100755
index a88d7975fe..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc_disabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc_disabled.png
deleted file mode 100755
index 4e144cf0b1..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/sort_asc_disabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/sort_both.png b/src/lib/biojs-1.0/src/main/resources/css/images/sort_both.png
deleted file mode 100755
index 18670406bc..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/sort_both.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc.png b/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc.png
deleted file mode 100755
index def071ed5a..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc_disabled.png b/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc_disabled.png
deleted file mode 100755
index 7824973cc6..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/sort_desc_disabled.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/images/trigger.png b/src/lib/biojs-1.0/src/main/resources/css/images/trigger.png
deleted file mode 100755
index 8c169fd605..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/images/trigger.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/jquery.miniColors.css b/src/lib/biojs-1.0/src/main/resources/css/jquery.miniColors.css
deleted file mode 100755
index 0ba19761cc..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/jquery.miniColors.css
+++ /dev/null
@@ -1,65 +0,0 @@
-.miniColors-trigger {
- height: 22px;
- width: 22px;
- background: url(images/trigger.png) center no-repeat;
- vertical-align: middle;
- margin: 0 .25em;
- display: inline-block;
- outline: none;
-}
-
-.miniColors-selector {
- position: absolute;
- width: 175px;
- height: 150px;
- background: #FFF;
- border: solid 1px #BBB;
- -moz-box-shadow: 0 0 6px rgba(0, 0, 0, .25);
- -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .25);
- box-shadow: 0 0 6px rgba(0, 0, 0, .25);
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- padding: 5px;
- z-index: 999999;
-}
-
-.miniColors-selector.black {
- background: #000;
- border-color: #000;
-}
-
-.miniColors-colors {
- position: absolute;
- top: 5px;
- left: 5px;
- width: 150px;
- height: 150px;
- background: url(images/gradient.png) center no-repeat;
- cursor: crosshair;
-}
-
-.miniColors-hues {
- position: absolute;
- top: 5px;
- left: 160px;
- width: 20px;
- height: 150px;
- background: url(images/rainbow.png) center no-repeat;
- cursor: crosshair;
-}
-
-.miniColors-colorPicker {
- position: absolute;
- width: 11px;
- height: 11px;
- background: url(images/circle.gif) center no-repeat;
-}
-
-.miniColors-huePicker {
- position: absolute;
- left: -3px;
- width: 26px;
- height: 3px;
- background: url(images/line.gif) center no-repeat;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/jquery.qtip.css b/src/lib/biojs-1.0/src/main/resources/css/jquery.qtip.css
deleted file mode 100755
index 9dc13b4b86..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/jquery.qtip.css
+++ /dev/null
@@ -1,567 +0,0 @@
-/*!
-* qTip2 - Pretty powerful tooltips
-* http://craigsworks.com/projects/qtip2/
-*
-* Version: nightly
-* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
-*
-* Dual licensed under MIT or GPLv2 licenses
-* http://en.wikipedia.org/wiki/MIT_License
-* http://en.wikipedia.org/wiki/GNU_General_Public_License
-*
-* Date: Tue Jul 3 15:45:43.0000000000 2012
-*/
-
-/* Core qTip styles */
-.ui-tooltip, .qtip{
- position: absolute;
- left: -28000px;
- top: -28000px;
- display: none;
-
- max-width: 280px;
- min-width: 50px;
-
- font-size: 10.5px;
- line-height: 12px;
-
- border-width: 1px;
- border-style: solid;
-}
-
- /* Fluid class for determining actual width in IE */
- .ui-tooltip-fluid{
- display: block;
- visibility: hidden;
- position: static !important;
- float: left !important;
- }
-
- .ui-tooltip-content{
- position: relative;
- padding: 5px 9px;
- overflow: hidden;
-
- text-align: left;
- word-wrap: break-word;
- overflow: hidden;
- }
-
- .ui-tooltip-titlebar{
- position: relative;
- min-height: 14px;
- padding: 5px 35px 5px 10px;
- overflow: hidden;
-
- border-width: 0 0 1px;
- font-weight: bold;
- }
-
- .ui-tooltip-titlebar + .ui-tooltip-content{ border-top-width: 0px !important; }
-
- /*! Default close button class */
- .ui-tooltip-titlebar .ui-state-default{
- position: absolute;
- right: 4px;
- top: 50%;
- margin-top: -9px;
-
- cursor: pointer;
- outline: medium none;
-
- border-width: 1px;
- border-style: solid;
- }
-
- * html .ui-tooltip-titlebar .ui-state-default{ top: 16px; } /* IE fix */
-
- .ui-tooltip-titlebar .ui-icon,
- .ui-tooltip-icon .ui-icon{
- display: block;
- text-indent: -1000em;
- }
-
- .ui-tooltip-icon, .ui-tooltip-icon .ui-icon{
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- text-decoration: none;
- }
-
- .ui-tooltip-icon .ui-icon{
- width: 18px;
- height: 14px;
-
- text-align: center;
- text-indent: 0;
- font: normal bold 10px/13px Tahoma,sans-serif;
-
- color: inherit;
- background: transparent none no-repeat -100em -100em;
- }
-
-
-/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
-.ui-tooltip-focus{
-
-}
-
-/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
-.ui-tooltip-hover{
-
-}
-
-
-/*! Default tooltip style */
-.ui-tooltip-default{
- border-color: #F1D031;
- background-color: #FFFFA3;
- color: #555;
-}
-
- .ui-tooltip-default .ui-tooltip-titlebar{
- background-color: #FFEF93;
- }
-
- .ui-tooltip-default .ui-tooltip-icon{
- border-color: #CCC;
- background: #F1F1F1;
- color: #777;
- }
-
- .ui-tooltip-default .ui-tooltip-titlebar .ui-state-hover{
- border-color: #AAA;
- color: #111;
- }
-
-/* Tips plugin */
-.ui-tooltip .ui-tooltip-tip{
- margin: 0 auto;
- overflow: hidden;
- z-index: 10;
-}
-
- .ui-tooltip .ui-tooltip-tip,
- .ui-tooltip .ui-tooltip-tip *{
- position: absolute;
-
- line-height: 0.1px !important;
- font-size: 0.1px !important;
- color: #123456;
-
- background: transparent;
- border: 0px dashed transparent;
- }
-
- .ui-tooltip .ui-tooltip-tip canvas{ top: 0; left: 0; }
-
-
-/* Modal plugin */
-#qtip-overlay{
- position: fixed;
- left: -10000em;
- top: -10000em;
-}
-
- /* Applied to modals with show.modal.blur set to true */
- #qtip-overlay.blurs{ cursor: pointer; }
-
- /* Change opacity of overlay here */
- #qtip-overlay div{
- position: absolute;
- left: 0; top: 0;
- width: 100%; height: 100%;
-
- background-color: black;
-
- opacity: 0.7;
- filter:alpha(opacity=70);
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
- }
-
-/*! Light tooltip style */
-.ui-tooltip-light{
- background-color: white;
- border-color: #E2E2E2;
- color: #454545;
-}
-
- .ui-tooltip-light .ui-tooltip-titlebar{
- background-color: #f1f1f1;
- }
-
-
-/*! Dark tooltip style */
-.ui-tooltip-dark{
- background-color: #505050;
- border-color: #303030;
- color: #f3f3f3;
-}
-
- .ui-tooltip-dark .ui-tooltip-titlebar{
- background-color: #404040;
- }
-
- .ui-tooltip-dark .ui-tooltip-icon{
- border-color: #444;
- }
-
- .ui-tooltip-dark .ui-tooltip-titlebar .ui-state-hover{
- border-color: #303030;
- }
-
-
-/*! Cream tooltip style */
-.ui-tooltip-cream{
- background-color: #FBF7AA;
- border-color: #F9E98E;
- color: #A27D35;
-}
-
- .ui-tooltip-cream .ui-tooltip-titlebar{
- background-color: #F0DE7D;
- }
-
- .ui-tooltip-cream .ui-state-default .ui-tooltip-icon{
- background-position: -82px 0;
- }
-
-
-/*! Red tooltip style */
-.ui-tooltip-red{
- background-color: #F78B83;
- border-color: #D95252;
- color: #912323;
-}
-
- .ui-tooltip-red .ui-tooltip-titlebar{
- background-color: #F06D65;
- }
-
- .ui-tooltip-red .ui-state-default .ui-tooltip-icon{
- background-position: -102px 0;
- }
-
- .ui-tooltip-red .ui-tooltip-icon{
- border-color: #D95252;
- }
-
- .ui-tooltip-red .ui-tooltip-titlebar .ui-state-hover{
- border-color: #D95252;
- }
-
-
-/*! Green tooltip style */
-.ui-tooltip-green{
- background-color: #CAED9E;
- border-color: #90D93F;
- color: #3F6219;
-}
-
- .ui-tooltip-green .ui-tooltip-titlebar{
- background-color: #B0DE78;
- }
-
- .ui-tooltip-green .ui-state-default .ui-tooltip-icon{
- background-position: -42px 0;
- }
-
-
-/*! Blue tooltip style */
-.ui-tooltip-blue{
- background-color: #E5F6FE;
- border-color: #ADD9ED;
- color: #5E99BD;
-}
-
- .ui-tooltip-blue .ui-tooltip-titlebar{
- background-color: #D0E9F5;
- }
-
- .ui-tooltip-blue .ui-state-default .ui-tooltip-icon{
- background-position: -2px 0;
- }
-
-/*! Add shadows to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
-.ui-tooltip-shadow{
- -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
- -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
- box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
-}
-
-/*! Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
-.ui-tooltip-rounded,
-.ui-tooltip-tipsy,
-.ui-tooltip-bootstrap{
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-/*! Youtube tooltip style */
-.ui-tooltip-youtube{
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-
- -webkit-box-shadow: 0 0 3px #333;
- -moz-box-shadow: 0 0 3px #333;
- box-shadow: 0 0 3px #333;
-
- color: white;
- border-width: 0;
-
- background: #4A4A4A;
- background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
- background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
- background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
- background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
- background-image: linear-gradient(to bottom,#4A4A4A 0,black 100%);
-}
-
- .ui-tooltip-youtube .ui-tooltip-titlebar{
- background-color: #4A4A4A;
- background-color: rgba(0,0,0,0);
- }
-
- .ui-tooltip-youtube .ui-tooltip-content{
- padding: .75em;
- font: 12px arial,sans-serif;
-
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
- -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
- }
-
- .ui-tooltip-youtube .ui-tooltip-icon{
- border-color: #222;
- }
-
- .ui-tooltip-youtube .ui-tooltip-titlebar .ui-state-hover{
- border-color: #303030;
- }
-
-
-/* jQuery TOOLS Tooltip style */
-.ui-tooltip-jtools{
- background: #232323;
- background: rgba(0, 0, 0, 0.7);
- background-image: -moz-linear-gradient(top, #717171, #232323);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
-
- border: 2px solid #ddd;
- border: 2px solid rgba(241,241,241,1);
-
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-
- -webkit-box-shadow: 0 0 12px #333;
- -moz-box-shadow: 0 0 12px #333;
- box-shadow: 0 0 12px #333;
-}
-
- /* IE Specific */
- .ui-tooltip-jtools .ui-tooltip-titlebar{
- background-color: transparent;
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
- }
- .ui-tooltip-jtools .ui-tooltip-content{
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
- }
-
- .ui-tooltip-jtools .ui-tooltip-titlebar,
- .ui-tooltip-jtools .ui-tooltip-content{
- background: transparent;
- color: white;
- border: 0 dashed transparent;
- }
-
- .ui-tooltip-jtools .ui-tooltip-icon{
- border-color: #555;
- }
-
- .ui-tooltip-jtools .ui-tooltip-titlebar .ui-state-hover{
- border-color: #333;
- }
-
-
-/* Cluetip style */
-.ui-tooltip-cluetip{
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
-
- background-color: #D9D9C2;
- color: #111;
- border: 0 dashed transparent;
-}
-
- .ui-tooltip-cluetip .ui-tooltip-titlebar{
- background-color: #87876A;
- color: white;
- border: 0 dashed transparent;
- }
-
- .ui-tooltip-cluetip .ui-tooltip-icon{
- border-color: #808064;
- }
-
- .ui-tooltip-cluetip .ui-tooltip-titlebar .ui-state-hover{
- border-color: #696952;
- color: #696952;
- }
-
-
-/* Tipsy style */
-.ui-tooltip-tipsy{
- background: black;
- background: rgba(0, 0, 0, .87);
-
- color: white;
- border: 0px solid transparent;
-
- font-size: 11px;
- font-family: 'Lucida Grande', sans-serif;
- font-weight: bold;
- line-height: 16px;
- text-shadow: 0 1px black;
-}
-
- .ui-tooltip-tipsy .ui-tooltip-titlebar{
- padding: 6px 35px 0 10;
- background-color: transparent;
- }
-
- .ui-tooltip-tipsy .ui-tooltip-content{
- padding: 6px 10;
- }
-
- .ui-tooltip-tipsy .ui-tooltip-icon{
- border-color: #222;
- text-shadow: none;
- }
-
- .ui-tooltip-tipsy .ui-tooltip-titlebar .ui-state-hover{
- border-color: #303030;
- }
-
-
-/* Tipped style */
-.ui-tooltip-tipped{
- border: 3px solid #959FA9;
-
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-
- background-color: #F9F9F9;
- color: #454545;
-
- font-weight: normal;
- font-family: serif;
-}
-
- .ui-tooltip-tipped .ui-tooltip-titlebar{
- border-bottom-width: 0;
-
- color: white;
- background: #3A79B8;
- background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
- }
-
- .ui-tooltip-tipped .ui-tooltip-icon{
- border: 2px solid #285589;
- background: #285589;
- }
-
- .ui-tooltip-tipped .ui-tooltip-icon .ui-icon{
- background-color: #FBFBFB;
- color: #555;
- }
-
-
-/**
- * Twitter Bootstrap style.
- *
- * Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
- * Does not work with IE 7.
- */
-.ui-tooltip-bootstrap{
- font-size: 13px;
- line-height: 18px;
-
- color: #333333;
- background-color: #ffffff;
-
-
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
-
- *border-right-width: 2px;
- *border-bottom-width: 2px;
-
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
-}
-
- .ui-tooltip-bootstrap .ui-tooltip-titlebar{
- font-size: 18px;
- line-height: 22px;
-
- border-bottom: 1px solid #ccc;
- background-color: transparent;
- }
-
- .ui-tooltip-bootstrap .ui-tooltip-titlebar .ui-state-default{
- right: 9px; top: 49%;
- border-style: none;
- }
-
- .ui-tooltip-bootstrap .ui-tooltip-icon{
- background: white;
- }
-
- .ui-tooltip-bootstrap .ui-tooltip-icon .ui-icon{
- width: auto;
- height: auto;
- float: right;
- font-size: 20px;
- font-weight: bold;
- line-height: 18px;
- color: #000000;
- text-shadow: 0 1px 0 #ffffff;
- opacity: 0.2;
- filter: alpha(opacity=20);
- }
-
- .ui-tooltip-bootstrap .ui-tooltip-icon .ui-icon:hover{
- color: #000000;
- text-decoration: none;
- cursor: pointer;
- opacity: 0.4;
- filter: alpha(opacity=40);
- }
-
-
-/* IE9 fix - removes all filters */
-.ui-tooltip:not(.ie9haxors) div.ui-tooltip-content,
-.ui-tooltip:not(.ie9haxors) div.ui-tooltip-titlebar{
- filter: none;
- -ms-filter: none;
-}
-
diff --git a/src/lib/biojs-1.0/src/main/resources/css/jquery/tipsy.css b/src/lib/biojs-1.0/src/main/resources/css/jquery/tipsy.css
deleted file mode 100755
index 2302b0e459..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/jquery/tipsy.css
+++ /dev/null
@@ -1,26 +0,0 @@
-.tipsy { font-size: 12px; position: absolute; padding: 5px; z-index: 100000; }
- .tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
-
- /* Rounded corners */
- .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
-
- /* Uncomment for shadow */
- /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
-
- .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
-
- /* Rules to colour arrows */
- .tipsy-arrow-n { border-bottom-color: #000; }
- .tipsy-arrow-s { border-top-color: #000; }
- .tipsy-arrow-e { border-left-color: #000; }
- .tipsy-arrow-w { border-right-color: #000; }
-
- .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
- .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
- .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
- .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
- .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
- .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
- .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
- .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
-
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/olstreeview/ae-common-1.0.131017.css b/src/lib/biojs-1.0/src/main/resources/css/olstreeview/ae-common-1.0.131017.css
deleted file mode 100755
index 2f68a9fd21..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/olstreeview/ae-common-1.0.131017.css
+++ /dev/null
@@ -1,950 +0,0 @@
-/*
- Mitigating ugliness of ebi-visual.css
- */
-
-* {
- text-align: inherit;
- font-weight: inherit
-}
-
-
-#content section img {
- margin: 0
-}
-
-#content form {
- font-size: 100%
-}
-
-#content form input
-, #content form textarea {
- font-family: inherit
-}
-
-#content table {
- width: auto;
- margin: 0;
- padding: 0;
- border: 0 none
-}
-
-#content th, #content td {
- padding: 0;
- border: 0 none;
- border-collapse: collapse;
- vertical-align: middle
-}
-
-.container_24 {
- min-width: 984px
-}
-
-.logo-title {
- display: inline-block
-}
-
-span.searchterm {
- padding: 0.1em 0.4em 0.1em 0.2em
-}
-
-.icon-awesome:before {
- font-family: 'FontAwesome';
- font-size: 100%;
- color: #bbb;
- content: attr(data-icon);
- margin: 0 0.3em 0 0
-}
-
-ul#secondary-nav li.active a {
- font-weight: normal
-}
-
-ul#secondary-nav li.active > a {
- font-weight: bold !important
-}
-
-/*
- Palette color codes
-
- Palette URL: http://colorschemedesigner.com/#3B61ThNE8w0w0
- */
-
-.primary-1 { background-color: #5E8CC0 }
-.primary-2 { background-color: #597390 }
-.primary-3 { background-color: #1E4B7D }
-.primary-4 { background-color: #8AB2DF }
-.primary-5 { background-color: #A1BEDF }
-
-.secondary-a-1 { background-color: #7068C8 }
-.secondary-a-2 { background-color: #656096 }
-.secondary-a-3 { background-color: #2A2282 }
-.secondary-a-4 { background-color: #9991E3 }
-.secondary-a-5 { background-color: #ADA7E3 }
-
-.secondary-b-1 { background-color: #56C1A1 }
-.secondary-b-2 { background-color: #54917F }
-.secondary-b-3 { background-color: #1C7E60 }
-.secondary-b-4 { background-color: #83E0C4 }
-.secondary-b-5 { background-color: #9CE0CB }
-
-.complement-1 { background-color: #FFC771 }
-.complement-2 { background-color: #BFA070 }
-.complement-3 { background-color: #A67325 }
-.complement-4 { background-color: #FFD595 }
-.complement-5 { background-color: #FFE0B1 }
-
-/* EBI template colour substitutions */
-
-/* These style rules will over-ride the core EBI styles and apply
- your custom colour palette in a consistent manner */
-
-/* Links */
-a:link,
-a:visited { border-bottom-color: #5E8CC0; }
-
-a:hover,
-a:focus,
-a:active {
- color: #5E8CC0;
- border-bottom: 1px solid #5E8CC0;
-}
-
-a.special:hover,
-a.special:focus,
-a.special:active {
- color: #5E8CC0;
- border-bottom: 3px double #5E8CC0;
-}
-
-
-a:link { color: #2A2282; }
-
-a:hover,
-a:focus,
-a:active { color: #1C7E60; }
-
-a.special { background-color: #9CE0CB; }
-
-
-/* Headings */
-h1, h2, h3, h4, h5, h6 { color: #222222; }
-
-h1 { color: #5E8CC0; }
-
-h2 { color: #1E4B7D; }
-
-h3 { color: #BFA070; }
-
-h1 a:link,
-h2 a:link,
-h3 a:link,
-h4 a:link,
-h5 a:link,
-h6 a:link,
-h1 a:visited,
-h2 a:visited,
-h3 a:visited,
-h4 a:visited,
-h5 a:visited,
-h6 a:visited {
- border-bottom-color: #5E8CC0;
-}
-
-
-/* Table heading cells */
-th { background-color: #EEEEEE; }
-
-
-/* Form submission button */
-form input.submit {
- /* colours */
- color: #fff;
- text-shadow: #1E4B7D 1px 1px;
- border-top: 1px solid #A1BEDF;
- border-left: 1px solid #A1BEDF;
- border-right: 1px solid #1E4B7D;
- border-bottom: 1px solid #1E4B7D;
-
- background-image: -moz-linear-gradient(top, #5E8CC0, #597390);
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #ccc),color-stop(1, #597390));
- background-image: -webkit-linear-gradient(#5E8CC0, #597390);
- background-image: linear-gradient(top, #5E8CC0, #597390);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5E8CC0', EndColorStr='#597390');
-}
-
-/* Define the basic colour your local masthead */
-div#local-masthead { background-color: #A1BEDF; }
-
-/* Colour the faux-underline for local menu items */
-div#local-masthead ul li a:hover,
-div#local-masthead ul li a:focus,
-div#local-masthead ul li a:active {
- border-bottom: 3px solid #5E8CC0;
-}
-
-/* --------------------------------- */
-
-::-webkit-input-placeholder {
- font-style: italic;
- color: #999
-}
-:-moz-placeholder {
- font-style: italic;
- color: #999
-}
-::-moz-placeholder {
- font-style: italic;
- color: #999
-}
-:-ms-input-placeholder {
- font-style: italic;
- color: #999
-}
-
-/* --------------------------------- */
-
-#ae-login *
-, #ae-feedback * {
- box-sizing: border-box;
- -moz-box-sizing: border-box
-}
-
-#ae-login
-, #ae-feedback {
- position: absolute;
- top: 2px;
- right: 5px;
- background-color: #EEE;
- color: #000;
- border-radius: 5px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- padding: 0;
- z-index: 40001
-}
-
-#ae-login {
- left: 55%
-}
-
-#ae-feedback {
- left: 50%;
- background-color: #FFE0B1
-}
-
-#ae-login > h3
-, #ae-feedback > h3 {
- font-size: 123.1%;
- color: black;
- background-color: rgba(0, 0, 0, 0.1);
- margin: 0;
- padding: 7px 9px 2px;
- border-top-left-radius: 5px;
- -webkit-border-top-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- border-top-right-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topright: 5px
-}
-
-#ae-login > h3 a
-, #ae-feedback > h3 a {
- float: right;
- font-size: 87%;
- border-bottom-style: none
-}
-
-#ae-login .icon-functional:hover:before
-, #ae-feedback .icon-functional:hover:before {
- color: #444
-}
-
-#ae-login .icon-functional:before
-, #ae-feedback .icon-functional:before {
- margin: 0
-}
-
-#ae-login form
-, #ae-feedback form {
- position: relative;
- margin: 0;
- padding: 20px 20px 10px;
- width: 100%;
- overflow: auto
-}
-
-#ae-login form {
- padding: 20px 20px 10px
-}
-
-#ae-login form
-, #ae-login form *
-, #ae-feedback form
-, #ae-feedback form * {
- font-size: 100%
-}
-
-#ae-login-form fieldset
-, #ae-forgot-form fieldset
-, #ae-feedback fieldset {
- padding: 0;
- margin: 0;
- border: 0 none;
- width: 100%
-}
-
-#ae-login-form fieldset {
- float: left;
- width: 50%
-}
-
-#ae-login input[type = 'checkbox'] {
- vertical-align: baseline;
- margin: 0 3px
-}
-
-#ae-login input[type = 'checkbox'] + label {
- font-size: 93%;
- vertical-align: middle
-}
-
-#ae-login fieldset
-, #ae-feedback fieldset
-, #ae-feedback span {
- background-color: transparent;
- color: inherit
-}
-
-#ae-login-form fieldset:first-child {
- padding: 0 10px 0 0
-}
-
-#ae-feedback fieldset:first-child
-, #ae-forgot-form fieldset:first-child {
- padding: 0;
- margin-bottom: 10px
-}
-
-#ae-forgot-form div {
- margin-top: 10px
-}
-
-#ae-login fieldset label
-, #ae-feedback fieldset label {
- width: 100%;
- margin: 0;
- padding: 0;
- font-size: 100%;
- display: inline-block
-}
-
-#ae-login fieldset label a.forgot {
- font-style: italic
-}
-
-#ae-login fieldset input
-, #ae-feedback fieldset input {
- width: 100%;
- margin: 0 0 5px 0;
- padding: 0;
- font-size: 100%
-}
-
-#ae-feedback fieldset textarea {
- width: 100%;
- margin: 0 0 5px 0;
- padding: 0;
- font-size: 100%;
- height: 10em
-}
-
-#ae-login input[type='submit']
-, #ae-feedback input[type='submit'] {
- float: right
-}
-
-#ae-login input[type='submit']:last-child {
- position: absolute;
- bottom: 10px;
- right: 20px
-}
-
-#ae-login-remember-option {
- float: left;
- margin: 8px 0 0
-}
-
-#ae-login-forgot {
- clear: both;
- text-align: center
-}
-
-#ae-login .ae-login-status {
- clear: both;
- padding: 5px 0;
- text-align: center
-}
-
-#ae-accession-field {
- width: 150px !important
-}
-
-/* --------------------------------- */
-
-#ae-content {
-}
-
-#ae-content h4 {
- border-bottom: 1px solid #CCC;
- margin-bottom: 10px;
-}
-
-#ae-content span.icon::before {
- color: inherit !important;
- margin: 0;
-}
-
-/* --------------------------------- */
-
-#ae-infotext {
- font-size: 108%;
- text-align: center;
-}
-
-.text-hit {
- background-color: #FFFF00;
-}
-
-.text-syn {
- background-color: #CCFFAA;
-}
-
-.text-efo {
- background-color: #FFCCAA;
-}
-
-/* home page stuff */
-
-#ae-news {
- background-image: url(../images/bg-news.gif);
- padding: 10px 0;
- margin: 10px 0
-}
-
-p.intro {
- font-size: 108%;
-}
-
-p.justify {
- text-align: justify;
-}
-
-/* browse page stuff */
-
-#ae-filters *
-, #ae-query * {
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
-}
-
-#ae-filters form
-, #ae-query form {
- margin: 0;
- padding: 0
-}
-
-#ae-filters form fieldset {
- padding: 10px;
- margin: 0 0 9px;
- border: 0 none;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- background-color: #E3E1F2 !important
-}
-
-#ae-filters legend {
- padding: 0.25em 0.5em;
- background-color: #C7C4D7;
- border: 0 none;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px
-}
-
-#ae-filters label,
-#ae-filters input[type='text'],
-#ae-filters select {
- margin: 3px 0
-}
-
-#ae-filters label,
-#ae-query label {
- font-size: 100%;
- display: inline-block
-}
-
-#ae-filters input[type = 'checkbox']
-, #ae-query input[type = 'checkbox'] {
- vertical-align: baseline;
- margin: 0 3px
-}
-
-#ae-filters input[type = 'checkbox'] + label
-, #ae-query input[type = 'checkbox'] + label {
- font-size: 93%;
- vertical-align: middle
-}
-
-/*
-#ae-filters select {
- font-family: Verdana,sans-serif;
- font-size: 12px;
-}
-*/
-
-#ae-filters .option
-, #ae-query .option {
- float: left;
- margin-right: 10px;
- font-size: 100%
-}
-
-#ae-filters input[type='submit']
-, #ae-query input[type='submit'] {
- float: right
-}
-
-#ae-query {
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- background-color: #E3E1F2;
- padding: 10px;
- margin: 0 9px 9px
-}
-
-#ae-query fieldset {
- padding: 0;
- margin: 0;
- border: 0 none;
- background-color: inherit;
-}
-
-#ae-query input[type='text'] {
- width: 100%;
- font-size: 100%;
- margin: 3px 0 8px 0;
-}
-
-/* browse table stuff */
-
-#ae-browse {
- margin: 0 9px;
-}
-
-#ae-browse table {
- table-layout: fixed;
- width: 100%;
- padding: 0;
- margin: 0;
- border: 0 none;
-}
-
-#ae-browse th {
- font-size: 108%;
- font-weight: normal;
- vertical-align: bottom;
- white-space: nowrap;
- background-color: #EEEEEE;
- border-bottom: 2px solid #5E8CC0;
-}
-
-#ae-browse table.floating-header th.col_pager {
- /* border-top: 1px solid #CCCCCC; */
-}
-
-#ae-browse th.sortable a:link,
-#ae-browse th.sortable a:visited,
-#ae-browse th {
- color: #666
-}
-
-#ae-browse th.sortable a:hover,
-#ae-browse th.sortable a:focus,
-#ae-browse th.sortable a:active {
- color: #1C7E60;
-}
-
-#ae-browse th.sortable i {
- margin: 0 0 0 2px
-}
-
-#ae-browse tbody tr:nth-child(odd) {
- background-color: #E8F1FC
-}
-
-#ae-browse tbody tr:nth-child(even) {
- background-color: #FFF
-}
-
-#ae-browse td {
- vertical-align: bottom;
- font-size: 93%;
-}
-
-#ae-browse th
-, #ae-browse td {
- padding: 3px 5px
-}
-
-#ae-browse .experiments td {
- vertical-align: top;
-}
-
-#ae-browse td div {
- white-space: nowrap;
- width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- -moz-text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- -webkit-text-overflow: ellipsis;
-}
-
-#ae-browse .experiments td div {
- white-space: normal;
-}
-
-#ae-browse td.col_accession span.icon {
- float: right;
-}
-
-#ae-browse .floating-header {
- position: fixed;
- top: 0;
- box-shadow: 0 3px 5px #CCC;
- -moz-box-shadow: 0 3px 5px #CCC;
- -webkit-box-shadow: 0 3px 5px #CCC;
- visibility: hidden;
-}
-
-#ae-browse .col_pager {
- font-size: 100%;
- padding: 3px 5px;
- border-bottom: 2px solid #FFF;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
-}
-
-#ae-browse .ae-stats {
- position: relative;
- text-align: center;
- pointer-events: none;
- margin: 0
-}
-
-#ae-browse .ae-pager {
- float: left;
- text-align: left
-}
-
-#ae-browse .ae-page-size {
- float: right;
- text-align: right
-}
-
-#ae-browse .ae-pager,
-#ae-browse .ae-page-size {
- width: 33%
-}
-
-#ae-browse .col_pager div {
- color: #A67325;
-}
-
-#ae-browse .col_pager a {
- padding: 2px 3px 0 3px;
- margin: 0 2px;
- color: #A67325;
-}
-
-#ae-browse .col_pager span {
- padding: 2px 3px;
- margin: 0 2px;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-#ae-browse .col_pager a:link,
-#ae-browse .col_pager a:visited {
-}
-
-#ae-browse .col_pager a:hover,
-#ae-browse .col_pager a:focus,
-#ae-browse .col_pager a:active {
- padding: 2px 3px;
- margin: 0 2px;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-bottom: 0 none;
- background-color: #A67325;
- color: #FFF;
-}
-
-#ae-browse .col_pager span {
- background-color: #68798D;
- color: #FFF;
-}
-
-#ae-browse .col_footer {
- font-size: 93%;
- text-align: center;
- padding: 0 5px 3px 5px;
- border-top: 2px solid #FFF;
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- -moz-border-radius-bottomleft: 5px;
- -moz-border-radius-bottomleft: 5px;
- -webkit-border-bottom-left-radius: 5px;
- -webkit-border-bottom-right-radius: 5px;
- background-color: #EEE;
-}
-
-#ae-browse .col_footer a {
- padding: 0;
- margin: 0 0 0 20px;
-}
-
-#ae-browse .col_footer a:first-child {
- margin: 0;
-}
-
-/* detailed entity */
-
-#ae-detail {
- margin: 0 9px;
-}
-
-#ae-detail * {
- font-style: inherit;
-}
-
-#ae-detail table {
- width: 100%;
- table-layout: fixed;
-}
-
-#ae-detail tr:nth-child(odd) {
- background-color: #E8F1FC
-}
-
-#ae-detail tr:nth-child(even) {
- background-color: #FFF
-}
-
-#ae-detail tr table
-, #ae-detail tr tr:nth-child(n) {
- background-color: transparent
-}
-
-#ae-detail th
-, #ae-detail td {
- font-size: 100%
-}
-
-#ae-detail td {
- vertical-align: top
-}
-
-#ae-detail td.name {
- white-space: nowrap;
- font-size: 108%;
- color: #666;
- background-image: url(../images/bg-ltgray.gif);
- text-align: right;
- vertical-align: top;
- padding: 5px 10px;
- width: 150px;
-}
-
-#ae-detail td.value {
- text-align: justify;
- vertical-align: top;
- padding: 7px 10px;
-}
-
-#ae-detail td.value > div {
- padding: 0 0 0.5em 0;
-}
-
-#ae-detail td.value > div:last-child {
- padding-bottom: 0;
-}
-
-#ae-detail td em {
- font-style: italic
-}
-
-#ae-detail td th {
- font-size: 100%;
- font-weight: normal;
- color: #666;
- background-color: transparent
-}
-
-#ae-detail td th.name
-, #ae-detail td td.name {
- font-size: 100%;
- text-align: left;
- background-image: none;
- padding: 0 10px 0 0;
- width: 30%
-}
-
-#ae-detail td td.name {
- color: #000;
-}
-
-#ae-detail td th.value
-, #ae-detail td td.value {
- text-align: left;
- padding: 0;
- width: 70%
-}
-
-#ae-detail td i {
- padding: 0 3px
-}
-
-#ae-detail a img {
- vertical-align: top
-}
-
-/* help pages stuff */
-
-#ae-help table {
- width: 99%;
- padding: 0 9px;
- margin: 9px auto;
- border: 5px solid #EEEEEE;
-}
-
-#ae-help th, #ae-help td {
- padding: 1px 5px 5px 5px;
- border: 1px solid #EEEEEE;
- border-collapse: collapse;
- vertical-align: top;
-}
-
-#ae-help p {
- overflow: auto;
- clear: both
-}
-
-#ae-help a > img {
- float: left
-}
-
-/* autocomplete-related classes */
-.ac_results {
- padding: 0;
- background-color: #FFF;
- overflow: hidden;
- z-index: 99999;
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-.ac_results ul {
- width: 100%;
- list-style-position: outside;
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-.ac_results li {
- margin: 0;
- padding: 0 3px;
- cursor: default;
- display: block;
- height: 16px;
- overflow: hidden;
- position: relative;
-}
-
-.ac_tree_level
-, .ac_tree_control {
- float: left;
- width: 16px;
- height: 16px;
-}
-
-.ac_tree_control div {
- width: 9px;
- height: 9px;
- margin: 3px 3px 3px 3px;
- overflow: hidden;
-}
-
-.ac_tree_collapsed .ac_tree_control div {
- background: url(../images/_old_/tminmax.gif) 0 0 no-repeat;
-}
-
-.ac_tree_expanded .ac_tree_control div {
- background: url(../images/_old_/tminmax.gif) 0 -9px no-repeat;
-}
-
-.ac_loading {
- background: #FFF url('../images/busy.gif') right center no-repeat;
-}
-
-.ac_over {
- background-color: #5E8CC0;
- color: #FFF;
-}
-
-.ac_over .ac_efo
-, .ac_over .ac_field {
- color: #FFF;
-}
-
-.ac_outer {
- background-color: #FFF;
- color: #000;
- cursor: default;
- box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
-}
-
-.ac_outer > div {
- padding: 1px;
-}
-
-.ac_field
-, .ac_efo {
- position: absolute;
- top: 0;
- right: 2px;
- color: #5E8CC0;
-}
-
-.ac_field {
- font-style: italic;
-}
-
-.ac_efo {
- font-weight: bold;
-}
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
deleted file mode 100755
index 5b5dab2ab7..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
deleted file mode 100755
index ac8b229af9..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
deleted file mode 100755
index ad3d6346e0..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
deleted file mode 100755
index 42ccba269b..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
deleted file mode 100755
index 5a46b47cb1..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
deleted file mode 100755
index 86c2baa655..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
deleted file mode 100755
index 4443fdc1a1..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
deleted file mode 100755
index 7c9fa6c6ed..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_222222_256x240.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_222222_256x240.png
deleted file mode 100755
index b273ff111d..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_222222_256x240.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_2e83ff_256x240.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_2e83ff_256x240.png
deleted file mode 100755
index 09d1cdc856..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_2e83ff_256x240.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_454545_256x240.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_454545_256x240.png
deleted file mode 100755
index 59bd45b907..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_454545_256x240.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_888888_256x240.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_888888_256x240.png
deleted file mode 100755
index 6d02426c11..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_888888_256x240.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_cd0a0a_256x240.png b/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_cd0a0a_256x240.png
deleted file mode 100755
index 2ab019b73e..0000000000
Binary files a/src/lib/biojs-1.0/src/main/resources/css/smoothness/images/ui-icons_cd0a0a_256x240.png and /dev/null differ
diff --git a/src/lib/biojs-1.0/src/main/resources/css/smoothness/jquery-ui-1.8.18.custom.css b/src/lib/biojs-1.0/src/main/resources/css/smoothness/jquery-ui-1.8.18.custom.css
deleted file mode 100755
index 4cfb50a4a3..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/css/smoothness/jquery-ui-1.8.18.custom.css
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * jQuery UI CSS Framework 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
-.ui-helper-clearfix:after { clear: both; }
-.ui-helper-clearfix { zoom: 1; }
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
-.ui-widget-content a { color: #222222; }
-.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
-.ui-widget-header a { color: #222222; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }
-/*
- * jQuery UI Autocomplete 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.18
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
-/*
- * jQuery UI Button 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: hidden; *overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
-
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4; }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/*
- * jQuery UI Slider 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
- * jQuery UI Tabs 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tabs#theming
- */
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/*
- * jQuery UI Datepicker 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}/*
- * jQuery UI Progressbar 1.8.18
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/LGPL-LICENSE.txt b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/LGPL-LICENSE.txt
deleted file mode 100755
index 02bbb60bc4..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/LGPL-LICENSE.txt
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/arbor.js b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/arbor.js
deleted file mode 100755
index b6ae116d31..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/arbor.js
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// arbor.js - version 0.91
-// a graph vizualization toolkit
-//
-// Copyright (c) 2011 Samizdat Drafting Co.
-// Physics code derived from springy.js, copyright (c) 2010 Dennis Hotson
-//
-// 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.
-//
-
-(function($){
-
- /* etc.js */ var trace=function(msg){if(typeof(window)=="undefined"||!window.console){return}var len=arguments.length;var args=[];for(var i=0;i0){return a[0]}else{return null}};
- /* kernel.js */ var Kernel=function(b){var k=window.location.protocol=="file:"&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1;var a=(window.Worker!==undefined&&!k);var i=null;var c=null;var f=[];f.last=new Date();var l=null;var e=null;var d=null;var h=null;var g=false;var j={system:b,tween:null,nodes:{},init:function(){if(typeof(Tween)!="undefined"){c=Tween()}else{if(typeof(arbor.Tween)!="undefined"){c=arbor.Tween()}else{c={busy:function(){return false},tick:function(){return true},to:function(){trace("Please include arbor-tween.js to enable tweens");c.to=function(){};return}}}}j.tween=c;var m=b.parameters();if(a){trace("using web workers");l=setInterval(j.screenUpdate,m.timeout);i=new Worker(arbor_path()+"arbor.js");i.onmessage=j.workerMsg;i.onerror=function(n){trace("physics:",n)};i.postMessage({type:"physics",physics:objmerge(m,{timeout:Math.ceil(m.timeout)})})}else{trace("couldn't use web workers, be careful...");i=Physics(m.dt,m.stiffness,m.repulsion,m.friction,j.system._updateGeometry);j.start()}return j},graphChanged:function(m){if(a){i.postMessage({type:"changes",changes:m})}else{i._update(m)}j.start()},particleModified:function(n,m){if(a){i.postMessage({type:"modify",id:n,mods:m})}else{i.modifyNode(n,m)}j.start()},physicsModified:function(m){if(!isNaN(m.timeout)){if(a){clearInterval(l);l=setInterval(j.screenUpdate,m.timeout)}else{clearInterval(d);d=null}}if(a){i.postMessage({type:"sys",param:m})}else{i.modifyPhysics(m)}j.start()},workerMsg:function(n){var m=n.data.type;if(m=="geometry"){j.workerUpdate(n.data)}else{trace("physics:",n.data)}},_lastPositions:null,workerUpdate:function(m){j._lastPositions=m;j._lastBounds=m.bounds},_lastFrametime:new Date().valueOf(),_lastBounds:null,_currentRenderer:null,screenUpdate:function(){var n=new Date().valueOf();var m=false;if(j._lastPositions!==null){j.system._updateGeometry(j._lastPositions);j._lastPositions=null;m=true}if(c&&c.busy()){m=true}if(j.system._updateBounds(j._lastBounds)){m=true}if(m){var o=j.system.renderer;if(o!==undefined){if(o!==e){o.init(j.system);e=o}if(c){c.tick()}o.redraw();var p=f.last;f.last=new Date();f.push(f.last-p);if(f.length>50){f.shift()}}}},physicsUpdate:function(){if(c){c.tick()}i.tick();var n=j.system._updateBounds();if(c&&c.busy()){n=true}var o=j.system.renderer;var m=new Date();var o=j.system.renderer;if(o!==undefined){if(o!==e){o.init(j.system);e=o}o.redraw({timestamp:m})}var q=f.last;f.last=m;f.push(f.last-q);if(f.length>50){f.shift()}var p=i.systemEnergy();if((p.mean+p.max)/2<0.05){if(h===null){h=new Date().valueOf()}if(new Date().valueOf()-h>1000){clearInterval(d);d=null}else{}}else{h=null}},fps:function(n){if(n!==undefined){var q=1000/Math.max(1,targetFps);j.physicsModified({timeout:q})}var r=0;for(var p=0,o=f.length;p0);if(y){$.extend(c.adjacency[D][E].data,z.data);return}else{c.edges[z._id]=z;c.adjacency[D][E].push(z);var x=(z.length!==undefined)?z.length:1;k.push({t:"addSpring",id:z._id,fm:D,to:E,l:x});h._notify()}return z},pruneEdge:function(C){k.push({t:"dropSpring",id:C._id});delete c.edges[C._id];for(var z in c.adjacency){for(var D in c.adjacency[z]){var A=c.adjacency[z][D];for(var B=A.length-1;B>=0;B--){if(c.adjacency[z][D][B]._id===C._id){c.adjacency[z][D].splice(B,1)}}}}h._notify()},getEdges:function(y,x){y=h.getNode(y);x=h.getNode(x);if(!y||!x){return[]}if(typeof(c.adjacency[y._id])!=="undefined"&&typeof(c.adjacency[y._id][x._id])!=="undefined"){return c.adjacency[y._id][x._id]}return[]},getEdgesFrom:function(x){x=h.getNode(x);if(!x){return[]}if(typeof(c.adjacency[x._id])!=="undefined"){var y=[];$.each(c.adjacency[x._id],function(A,z){y=y.concat(z)});return y}return[]},getEdgesTo:function(x){x=h.getNode(x);if(!x){return[]}var y=[];$.each(c.edges,function(A,z){if(z.target==x){y.push(z)}});return y},eachEdge:function(x){$.each(c.edges,function(B,z){var A=c.nodes[z.source._id]._p;var y=c.nodes[z.target._id]._p;if(A.x==null||y.x==null){return}A=(w!==null)?h.toScreen(A):A;y=(w!==null)?h.toScreen(y):y;if(A&&y){x.call(h,z,A,y)}})},prune:function(y){var x={dropped:{nodes:[],edges:[]}};if(y===undefined){$.each(c.nodes,function(A,z){x.dropped.nodes.push(z);h.pruneNode(z)})}else{h.eachNode(function(A){var z=y.call(h,A,{from:h.getEdgesFrom(A),to:h.getEdgesTo(A)});if(z){x.dropped.nodes.push(A);h.pruneNode(A)}})}return x},graft:function(y){var x={added:{nodes:[],edges:[]}};if(y.nodes){$.each(y.nodes,function(A,z){var B=h.getNode(A);if(B){B.data=z}else{x.added.nodes.push(h.addNode(A,z))}c.kernel.start()})}if(y.edges){$.each(y.edges,function(B,z){var A=h.getNode(B);if(!A){x.added.nodes.push(h.addNode(B,{}))}$.each(z,function(F,C){var E=h.getNode(F);if(!E){x.added.nodes.push(h.addNode(F,{}))}var D=h.getEdges(B,F);if(D.length>0){D[0].data=C}else{x.added.edges.push(h.addEdge(B,F,C))}})})}return x},merge:function(y){var x={added:{nodes:[],edges:[]},dropped:{nodes:[],edges:[]}};$.each(c.edges,function(C,B){if((y.edges[B.source.name]===undefined||y.edges[B.source.name][B.target.name]===undefined)){h.pruneEdge(B);x.dropped.edges.push(B)}});var A=h.prune(function(C,B){if(y.nodes[C.name]===undefined){x.dropped.nodes.push(C);return true}});var z=h.graft(y);x.added.nodes=x.added.nodes.concat(z.added.nodes);x.added.edges=x.added.edges.concat(z.added.edges);x.dropped.nodes=x.dropped.nodes.concat(A.dropped.nodes);x.dropped.edges=x.dropped.edges.concat(A.dropped.edges);return x},tweenNode:function(A,x,z){var y=h.getNode(A);if(y){c.tween.to(y,x,z)}},tweenEdge:function(y,x,B,A){if(A===undefined){h._tweenEdge(y,x,B)}else{var z=h.getEdges(y,x);$.each(z,function(C,D){h._tweenEdge(D,B,A)})}},_tweenEdge:function(y,x,z){if(y&&y._id!==undefined){c.tween.to(y,x,z)}},_updateGeometry:function(A){if(A!=undefined){var x=(A.epoch1||C.y*w.height>1){p=_newBounds;return true}else{return false}},energy:function(){return a},bounds:function(){var y=null;var x=null;$.each(c.nodes,function(B,A){if(!y){y=new Point(A._p);x=new Point(A._p);return}var z=A._p;if(z.x===null||z.y===null){return}if(z.x>y.x){y.x=z.x}if(z.y>y.y){y.y=z.y}if(z.x0){c.kernel.graphChanged(k);k=[];i=null}}};c.kernel=Kernel(h);c.tween=c.kernel.tween||null;var e=(window.__defineGetter__==null||window.__defineSetter__==null)?function(y,x,z){if(!y.hasOwnProperty(x)){Object.defineProperty(y,x,z)}}:function(y,x,z){if(z.get){y.__defineGetter__(x,z.get)}if(z.set){y.__defineSetter__(x,z.set)}};var n=function(x){this._n=x;this._state=c};n.prototype=new Point();e(n.prototype,"x",{get:function(){return this._n._p.x},set:function(x){this._state.kernel.particleModified(this._n._id,{x:x})}});e(n.prototype,"y",{get:function(){return this._n._p.y},set:function(x){this._state.kernel.particleModified(this._n._id,{y:x})}});e(Node.prototype,"p",{get:function(){return new n(this)},set:function(x){this._p.x=x.x;this._p.y=x.y;this._state.kernel.particleModified(this._id,{x:x.x,y:x.y})}});e(Node.prototype,"mass",{get:function(){return this._mass},set:function(x){this._mass=x;this._state.kernel.particleModified(this._id,{m:x})}});e(Node.prototype,"tempMass",{set:function(x){this._state.kernel.particleModified(this._id,{_m:x})}});e(Node.prototype,"fixed",{get:function(){return this._fixed},set:function(x){this._fixed=x;this._state.kernel.particleModified(this._id,{f:x?1:0})}});return h};
- /* barnes-hut.js */ var BarnesHutTree=function(){var b=[];var a=0;var e=null;var d=0.5;var c={init:function(g,h,f){d=f;a=0;e=c._newBranch();e.origin=g;e.size=h.subtract(g)},insert:function(j){var f=e;var g=[j];while(g.length){var h=g.shift();var m=h._m||h.m;var p=c._whichQuad(h,f);if(f[p]===undefined){f[p]=h;f.mass+=m;if(f.p){f.p=f.p.add(h.p.multiply(m))}else{f.p=h.p.multiply(m)}}else{if("origin" in f[p]){f.mass+=(m);if(f.p){f.p=f.p.add(h.p.multiply(m))}else{f.p=h.p.multiply(m)}f=f[p];g.unshift(h)}else{var l=f.size.divide(2);var n=new Point(f.origin);if(p[0]=="s"){n.y+=l.y}if(p[1]=="e"){n.x+=l.x}var o=f[p];f[p]=c._newBranch();f[p].origin=n;f[p].size=l;f.mass=m;f.p=h.p.multiply(m);f=f[p];if(o.p.x===h.p.x&&o.p.y===h.p.y){var k=l.x*0.08;var i=l.y*0.08;o.p.x=Math.min(n.x+l.x,Math.max(n.x,o.p.x-k/2+Math.random()*k));o.p.y=Math.min(n.y+l.y,Math.max(n.y,o.p.y-i/2+Math.random()*i))}g.push(o);g.unshift(h)}}}},applyForces:function(m,g){var f=[e];while(f.length){node=f.shift();if(node===undefined){continue}if(m===node){continue}if("f" in node){var k=m.p.subtract(node.p);var l=Math.max(1,k.magnitude());var i=((k.magnitude()>0)?k:Point.random(1)).normalize();m.applyForce(i.multiply(g*(node._m||node.m)).divide(l*l))}else{var j=m.p.subtract(node.p.divide(node.mass)).magnitude();var h=Math.sqrt(node.size.x*node.size.y);if(h/j>d){f.push(node.ne);f.push(node.nw);f.push(node.se);f.push(node.sw)}else{var k=m.p.subtract(node.p.divide(node.mass));var l=Math.max(1,k.magnitude());var i=((k.magnitude()>0)?k:Point.random(1)).normalize();m.applyForce(i.multiply(g*(node.mass)).divide(l*l))}}}},_whichQuad:function(i,f){if(i.p.exploded()){return null}var h=i.p.subtract(f.origin);var g=f.size.divide(2);if(h.y-1){o.splice(p,1)}delete c.particles[r];delete l.particles[r]},modifyNode:function(r,p){if(r in c.particles){var q=c.particles[r];if("x" in p){q.p.x=p.x}if("y" in p){q.p.y=p.y}if("m" in p){q.m=p.m}if("f" in p){q.fixed=(p.f===1)}if("_m" in p){if(q._m===undefined){q._m=q.m}q.m=p._m}}},addSpring:function(t){var s=t.id;var p=t.l;var r=c.particles[t.fm];var q=c.particles[t.to];if(r!==undefined&&q!==undefined){c.springs[s]=new Spring(r,q,p,i.stiffness);k.push(c.springs[s]);r.connections++;q.connections++;delete l.particles[t.fm];delete l.particles[t.to]}},dropSpring:function(s){var r=s.id;var q=c.springs[r];q.point1.connections--;q.point2.connections--;var p=$.inArray(q,k);if(p>-1){k.splice(p,1)}delete c.springs[r]},_update:function(p){d++;$.each(p,function(q,r){if(r.t in i){i[r.t](r)}});return d},tick:function(){i.tendParticles();i.eulerIntegrator(i.dt);i.tock()},tock:function(){var p=[];$.each(c.particles,function(r,q){p.push(r);p.push(q.p.x);p.push(q.p.y)});if(h){h({geometry:p,epoch:d,energy:b,bounds:g})}},tendParticles:function(){$.each(c.particles,function(q,p){if(p._m!==undefined){if(Math.abs(p.m-p._m)<1){p.m=p._m;delete p._m}else{p.m*=0.98}}p.v.x=p.v.y=0})},eulerIntegrator:function(p){if(i.repulsion>0){if(i.theta>0){i.applyBarnesHutRepulsion()}else{i.applyBruteForceRepulsion()}}if(i.stiffness>0){i.applySprings()}i.applyCenterDrift();if(i.gravity){i.applyCenterGravity()}i.updateVelocity(p);i.updatePosition(p)},applyBruteForceRepulsion:function(){$.each(c.particles,function(q,p){$.each(c.particles,function(s,r){if(p!==r){var u=p.p.subtract(r.p);var v=Math.max(1,u.magnitude());var t=((u.magnitude()>0)?u:Point.random(1)).normalize();p.applyForce(t.multiply(i.repulsion*(r._m||r.m)*0.5).divide(v*v*0.5));r.applyForce(t.multiply(i.repulsion*(p._m||p.m)*0.5).divide(v*v*-0.5))}})})},applyBarnesHutRepulsion:function(){if(!g.topleft||!g.bottomright){return}var q=new Point(g.bottomright);var p=new Point(g.topleft);f.init(p,q,i.theta);$.each(c.particles,function(s,r){f.insert(r)});$.each(c.particles,function(s,r){f.applyForces(r,i.repulsion)})},applySprings:function(){$.each(c.springs,function(t,p){var s=p.point2.p.subtract(p.point1.p);var q=p.length-s.magnitude();var r=((s.magnitude()>0)?s:Point.random(1)).normalize();p.point1.applyForce(r.multiply(p.k*q*-0.5));p.point2.applyForce(r.multiply(p.k*q*0.5))})},applyCenterDrift:function(){var q=0;var r=new Point(0,0);$.each(c.particles,function(t,s){r.add(s.p);q++});if(q==0){return}var p=r.divide(-q);$.each(c.particles,function(t,s){s.applyForce(p)})},applyCenterGravity:function(){$.each(c.particles,function(r,p){var q=p.p.multiply(-1);p.applyForce(q.multiply(i.repulsion/100))})},updateVelocity:function(p){$.each(c.particles,function(t,q){if(q.fixed){q.v=new Point(0,0);q.f=new Point(0,0);return}var s=q.v.magnitude();q.v=q.v.add(q.f.multiply(p)).multiply(1-i.friction);q.f.x=q.f.y=0;var r=q.v.magnitude();if(r>j){q.v=q.v.divide(r*r)}})},updatePosition:function(q){var r=0,p=0,u=0;var t=null;var s=null;$.each(c.particles,function(w,v){v.p=v.p.add(v.v.multiply(q));var x=v.v.magnitude();var z=x*x;r+=z;p=Math.max(z,p);u++;if(!t){t=new Point(v.p.x,v.p.y);s=new Point(v.p.x,v.p.y);return}var y=v.p;if(y.x===null||y.y===null){return}if(y.x>t.x){t.x=y.x}if(y.y>t.y){t.y=y.y}if(y.x1000){e.stop()}else{}}else{c=null}},tock:function(h){h.type="geometry";postMessage(h)},modifyNode:function(i,h){a.modifyNode(i,h);e.go()},modifyPhysics:function(h){a.modifyPhysics(h)},update:function(h){var i=a._update(h)}};return e};var physics=PhysicsWorker();onmessage=function(a){if(!a.data.type){postMessage("¿kérnèl?");return}if(a.data.type=="physics"){var b=a.data.physics;physics.init(a.data.physics);return}switch(a.data.type){case"modify":physics.modifyNode(a.data.id,a.data.mods);break;case"changes":physics.update(a.data.changes);physics.go();break;case"start":physics.go();break;case"stop":physics.stop();break;case"sys":var b=a.data.param||{};if(!isNaN(b.timeout)){physics.timeout(b.timeout)}physics.modifyPhysics(b);physics.go();break}};
- })()
-
-
- arbor = (typeof(arbor)!=='undefined') ? arbor : {}
- $.extend(arbor, {
- // object constructors (don't use â€new’, just call them)
- ParticleSystem:ParticleSystem,
- Point:function(x, y){ return new Point(x, y) },
-
- // immutable object with useful methods
- etc:{
- trace:trace, // Ć’(msg) -> safe console logging
- dirname:dirname, // Ć’(path) -> leading part of path
- basename:basename, // Ć’(path) -> trailing part of path
- ordinalize:ordinalize, // Ć’(num) -> abbrev integers (and add commas)
- objcopy:objcopy, // Ć’(old) -> clone an object
- objcmp:objcmp, // Ć’(a, b, strict_ordering) -> t/f comparison
- objkeys:objkeys, // Ć’(obj) -> array of all keys in obj
- objmerge:objmerge, // Ć’(dst, src) -> like $.extend but non-destructive
- uniq:uniq, // Ć’(arr) -> array of unique items in arr
- arbor_path:arbor_path, // Ć’() -> guess the directory of the lib code
- }
- })
-
-})(this.jQuery)
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.js b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.js
deleted file mode 100755
index 0fa9f15fdd..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.js
+++ /dev/null
@@ -1,15934 +0,0 @@
-
-/* cytoscape.js */
-
-/**
- * This file is part of cytoscape.js 2.0.2.
- *
- * Cytoscape.js is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * Cytoscape.js is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with
- * cytoscape.js. If not, see .
- */
-
-
-// this is put as a global var in the browser
-// or it's just a global to this module if commonjs
-var cytoscape;
-
-(function(){
-
- // the object iteself is a function that init's an instance of cytoscape
- var $$ = cytoscape = function(){
- return cytoscape.init.apply(cytoscape, arguments);
- };
-
- // allow functional access to cytoscape.js
- // e.g. var cyto = $.cytoscape({ selector: "#foo", ... });
- // var nodes = cyto.nodes();
- $$.init = function( options ){
-
- // if no options specified, use default
- if( options === undefined ){
- options = {};
- }
-
- // create instance
- if( $$.is.plainObject( options ) ){
- return new $$.Core( options );
- }
-
- // allow for registration of extensions
- // e.g. $.cytoscape("renderer", "svg", SvgRenderer);
- // e.g. $.cytoscape("renderer", "svg", "nodeshape", "ellipse", SvgEllipseNodeShape);
- // e.g. $.cytoscape("core", "doSomething", function(){ /* doSomething code */ });
- // e.g. $.cytoscape("collection", "doSomething", function(){ /* doSomething code */ });
- else if( $$.is.string( options ) ) {
- return $$.extension.apply($$.extension, arguments);
- }
- };
-
- // define the function namespace here, since it has members in many places
- $$.fn = {};
-
- // TODO test that this works:
- if( typeof exports !== 'undefined' ){ // expose as a commonjs module
- exports = module.exports = cytoscape;
- }
-
- // make sure we always register in the window just in case (e.g. w/ derbyjs)
- window.cytoscape = cytoscape;
-
-})();
-
-// type testing utility functions
-
-;(function($$){
-
- $$.is = {
- string: function(obj){
- return obj != null && typeof obj == typeof "";
- },
-
- fn: function(obj){
- return obj != null && typeof obj === typeof function(){};
- },
-
- array: function(obj){
- return obj != null && obj instanceof Array;
- },
-
- plainObject: function(obj){
- return obj != null && typeof obj === typeof {} && !$$.is.array(obj) && obj.constructor === Object;
- },
-
- number: function(obj){
- return obj != null && typeof obj === typeof 1 && !isNaN(obj);
- },
-
- integer: function( obj ){
- return $$.is.number(obj) && Math.floor(obj) === obj;
- },
-
- color: function(obj){
- return obj != null && typeof obj === typeof "" && $.Color(obj).toString() !== "";
- },
-
- bool: function(obj){
- return obj != null && typeof obj === typeof true;
- },
-
- elementOrCollection: function(obj){
- return $$.is.element(obj) || $$.is.collection(obj);
- },
-
- element: function(obj){
- return obj instanceof $$.Element && obj._private.single;
- },
-
- collection: function(obj){
- return obj instanceof $$.Collection && !obj._private.single;
- },
-
- core: function(obj){
- return obj instanceof $$.Core;
- },
-
- style: function(obj){
- return obj instanceof $$.Style;
- },
-
- stylesheet: function(obj){
- return obj instanceof $$.Stylesheet;
- },
-
- event: function(obj){
- return obj instanceof $$.Event;
- },
-
- emptyString: function(obj){
- if( !obj ){ // null is empty
- return true;
- } else if( $$.is.string(obj) ){
- if( obj === "" || obj.match(/^\s+$/) ){
- return true; // empty string is empty
- }
- }
-
- return false; // otherwise, we don't know what we've got
- },
-
- nonemptyString: function(obj){
- if( obj && $$.is.string(obj) && obj !== "" && !obj.match(/^\s+$/) ){
- return true;
- }
-
- return false;
- },
-
- domElement: function(obj){
- if( typeof HTMLElement === 'undefined' ){
- return false; // we're not in a browser so it doesn't matter
- } else {
- return obj instanceof HTMLElement;
- }
-
-
- }
- };
-
-})( cytoscape );
-
-;(function($$){
-
- // utility functions only for internal use
-
- $$.util = {
-
- // the jquery extend() function
- // NB: modified to use $$.is etc since we can't use jquery functions
- extend: function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !$$.is.fn(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( $$.is.plainObject(copy) || (copyIsArray = $$.is.array(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && $$.is.array(src) ? src : [];
-
- } else {
- clone = src && $$.is.plainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = $$.util.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
- },
-
- error: function( msg ){
- if( console ){
- if( console.error ){
- console.error( msg );
- } else if( console.log ){
- console.log( msg );
- } else {
- throw msg;
- }
- } else {
- throw msg;
- }
- },
-
- clone: function( obj ){
- var target = {};
- for (var i in obj) {
- if ( obj.hasOwnProperty(i) ) { // TODO is this hasOwnProperty() call necessary for our use?
- target[i] = obj[i];
- }
- }
- return target;
- },
-
- // gets a shallow copy of the argument
- copy: function( obj ){
- if( obj == null ){
- return obj;
- } if( $$.is.array(obj) ){
- return obj.slice();
- } else if( $$.is.plainObject(obj) ){
- return $$.util.clone( obj );
- } else {
- return obj;
- }
- },
-
- // has anything been set in the map
- mapEmpty: function( map ){
- var empty = true;
-
- if( map != null ){
- for(var i in map){
- empty = false;
- break;
- }
- }
-
- return empty;
- },
-
- // pushes to the array at the end of a map (map may not be built)
- pushMap: function( options ){
- var array = $$.util.getMap(options);
-
- if( array == null ){ // if empty, put initial array
- $$.util.setMap( $.extend({}, options, {
- value: [ options.value ]
- }) );
- } else {
- array.push( options.value );
- }
- },
-
- // sets the value in a map (map may not be built)
- setMap: function( options ){
- var obj = options.map;
- var key;
- var keys = options.keys;
- var l = keys.length;
-
- for(var i = 0; i < l; i++){
- var key = keys[i];
-
- if( $$.is.plainObject( key ) ){
- $$.util.error("Tried to set map with object key");
- }
-
- if( i < keys.length - 1 ){
-
- // extend the map if necessary
- if( obj[key] == null ){
- obj[key] = {};
- }
-
- obj = obj[key];
- } else {
- // set the value
- obj[key] = options.value;
- }
- }
- },
-
- // gets the value in a map even if it's not built in places
- getMap: function( options ){
- var obj = options.map;
- var keys = options.keys;
- var l = keys.length;
-
- for(var i = 0; i < l; i++){
- var key = keys[i];
-
- if( $$.is.plainObject( key ) ){
- $$.util.error("Tried to get map with object key");
- }
-
- obj = obj[key];
-
- if( obj == null ){
- return obj;
- }
- }
-
- return obj;
- },
-
- // deletes the entry in the map
- deleteMap: function( options ){
- var obj = options.map;
- var keys = options.keys;
- var l = keys.length;
- var keepChildren = options.keepChildren;
-
- for(var i = 0; i < l; i++){
- var key = keys[i];
-
- if( $$.is.plainObject( key ) ){
- $$.util.error("Tried to delete map with object key");
- }
-
- var lastKey = i === options.keys.length - 1;
- if( lastKey ){
-
- if( keepChildren ){ // then only delete child fields not in keepChildren
- for( var child in obj ){
- if( !keepChildren[child] ){
- delete obj[child];
- }
- }
- } else {
- delete obj[key];
- }
-
- } else {
- obj = obj[key];
- }
- }
- },
-
- capitalize: function(str){
- if( $$.is.emptyString(str) ){
- return str;
- }
-
- return str.charAt(0).toUpperCase() + str.substring(1);
- },
-
- camel2dash: function( str ){
- var ret = [];
-
- for( var i = 0; i < str.length; i++ ){
- var ch = str[i];
- var chLowerCase = ch.toLowerCase();
- var isUpperCase = ch !== chLowerCase;
-
- if( isUpperCase ){
- ret.push( "-" );
- ret.push( chLowerCase );
- } else {
- ret.push( ch );
- }
- }
-
- var noUpperCases = ret.length === str.length;
- if( noUpperCases ){ return str } // cheaper than .join()
-
- return ret.join("");
- },
-
- dash2camel: function( str ){
- var ret = [];
- var nextIsUpper = false;
-
- for( var i = 0; i < str.length; i++ ){
- var ch = str[i];
- var isDash = ch === "-";
-
- if( isDash ){
- nextIsUpper = true;
- } else {
- if( nextIsUpper ){
- ret.push( ch.toUpperCase() );
- } else {
- ret.push( ch );
- }
-
- nextIsUpper = false;
- }
- }
-
- return ret.join("");
- },
-
- // strip spaces from beginning of string and end of string
- trim: function( str ){
- var first, last;
-
- // find first non-space char
- for( first = 0; first < str.length && str[first] === " "; first++ ){}
-
- // find last non-space char
- for( last = str.length - 1; last > first && str[last] === " "; last-- ){}
-
- return str.substring(first, last + 1);
- },
-
- // get [r, g, b] from #abc or #aabbcc
- hex2tuple: function( hex ){
- if( !(hex.length === 4 || hex.length === 7) || hex[0] !== "#" ){ return; }
-
- var shortHex = hex.length === 4;
- var r, g, b;
- var base = 16;
-
- if( shortHex ){
- r = parseInt( hex[1] + hex[1], base );
- g = parseInt( hex[2] + hex[2], base );
- b = parseInt( hex[3] + hex[3], base );
- } else {
- r = parseInt( hex[1] + hex[2], base );
- g = parseInt( hex[3] + hex[4], base );
- b = parseInt( hex[5] + hex[6], base );
- }
-
- return [r, g, b];
- },
-
- // get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0)
- hsl2tuple: function( hsl ){
- var ret;
- var number = $$.util.regex.number;
- var h, s, l, a, r, g, b;
-
- var m = new RegExp("^" + $$.util.regex.hsla + "$").exec(hsl);
- if( m ){
-
- // get hue
- h = parseInt( m[1] );
- if( h < 0 ){
- h = ( 360 - (-1*h % 360) ) % 360;
- } else if( h > 360 ){
- h = h % 360;
- }
- h /= 360; // normalise on [0, 1]
-
- s = parseFloat( m[2] );
- if( s < 0 || s > 100 ){ return; } // saturation is [0, 100]
- s = s/100; // normalise on [0, 1]
-
- l = parseFloat( m[3] );
- if( l < 0 || l > 100 ){ return; } // lightness is [0, 100]
- l = l/100; // normalise on [0, 1]
-
- a = m[4];
- if( a !== undefined ){
- a = parseFloat( a );
-
- if( a < 0 || a > 1 ){ return; } // alpha is [0, 1]
- }
-
- // now, convert to rgb
- // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
- if( s === 0 ){
- r = g = b = Math.round(l * 255); // achromatic
- } else {
- function hue2rgb(p, q, t){
- if(t < 0) t += 1;
- if(t > 1) t -= 1;
- if(t < 1/6) return p + (q - p) * 6 * t;
- if(t < 1/2) return q;
- if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
- return p;
- }
-
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
- var p = 2 * l - q;
- r = Math.round( 255 * hue2rgb(p, q, h + 1/3) );
- g = Math.round( 255 * hue2rgb(p, q, h) );
- b = Math.round( 255 * hue2rgb(p, q, h - 1/3) );
- }
-
- ret = [r, g, b, a];
- }
-
- return ret;
- },
-
- // get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0)
- rgb2tuple: function( rgb ){
- var ret;
- var number = $$.util.regex.number;
-
- var m = new RegExp("^" + $$.util.regex.rgba + "$").exec(rgb);
- if( m ){
- ret = [];
-
- var isPct = [];
- for( var i = 1; i <= 3; i++ ){
- var channel = m[i];
-
- if( channel[ channel.length - 1 ] === "%" ){
- isPct[i] = true;
- }
- channel = parseFloat( channel );
-
- if( isPct[i] ){
- channel = channel/100 * 255; // normalise to [0, 255]
- }
-
- if( channel < 0 || channel > 255 ){ return; } // invalid channel value
-
- ret.push( Math.floor(channel) );
- }
-
- var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3];
- var allArePct = isPct[1] && isPct[2] && isPct[3];
- if( atLeastOneIsPct && !allArePct ){ return; } // must all be percent values if one is
-
- var alpha = m[4];
- if( alpha !== undefined ){
- alpha = parseFloat( alpha );
-
- if( alpha < 0 || alpha > 1 ){ return; } // invalid alpha value
-
- ret.push( alpha );
- }
- }
-
- return ret;
- },
-
- colorname2tuple: function( color ){
- return $$.util.colors[ color.toLowerCase() ];
- },
-
- color2tuple: function( color ){
- return $$.util.colorname2tuple(color)
- || $$.util.hex2tuple(color)
- || $$.util.rgb2tuple(color)
- || $$.util.hsl2tuple(color);
- },
-
- tuple2hex: function( tuple ){
- var r = tuple[0];
- var g = tuple[1];
- var b = tuple[2];
-
- function ch2hex( ch ){
- var hex = ch.toString(16);
-
- if( hex.length === 1 ){
- hex = '0' + hex;
- }
-
- return hex;
- }
-
- return '#' + ch2hex(r) + ch2hex(g) + ch2hex(b);
- },
-
- colors: {
- // special colour names
- transparent: [0,0,0,0], // NB alpha === 0
-
- // regular colours
- aliceblue: [240,248,255],
- antiquewhite: [250,235,215],
- aqua: [0,255,255],
- aquamarine: [127,255,212],
- azure: [240,255,255],
- beige: [245,245,220],
- bisque: [255,228,196],
- black: [0,0,0],
- blanchedalmond: [255,235,205],
- blue: [0,0,255],
- blueviolet: [138,43,226],
- brown: [165,42,42],
- burlywood: [222,184,135],
- cadetblue: [95,158,160],
- chartreuse: [127,255,0],
- chocolate: [210,105,30],
- coral: [255,127,80],
- cornflowerblue: [100,149,237],
- cornsilk: [255,248,220],
- crimson: [220,20,60],
- cyan: [0,255,255],
- darkblue: [0,0,139],
- darkcyan: [0,139,139],
- darkgoldenrod: [184,134,11],
- darkgray: [169,169,169],
- darkgreen: [0,100,0],
- darkgrey: [169,169,169],
- darkkhaki: [189,183,107],
- darkmagenta: [139,0,139],
- darkolivegreen: [85,107,47],
- darkorange: [255,140,0],
- darkorchid: [153,50,204],
- darkred: [139,0,0],
- darksalmon: [233,150,122],
- darkseagreen: [143,188,143],
- darkslateblue: [72,61,139],
- darkslategray: [47,79,79],
- darkslategrey: [47,79,79],
- darkturquoise: [0,206,209],
- darkviolet: [148,0,211],
- deeppink: [255,20,147],
- deepskyblue: [0,191,255],
- dimgray: [105,105,105],
- dimgrey: [105,105,105],
- dodgerblue: [30,144,255],
- firebrick: [178,34,34],
- floralwhite: [255,250,240],
- forestgreen: [34,139,34],
- fuchsia: [255,0,255],
- gainsboro: [220,220,220],
- ghostwhite: [248,248,255],
- gold: [255,215,0],
- goldenrod: [218,165,32],
- gray: [128,128,128],
- grey: [128,128,128],
- green: [0,128,0],
- greenyellow: [173,255,47],
- honeydew: [240,255,240],
- hotpink: [255,105,180],
- indianred: [205,92,92],
- indigo: [75,0,130],
- ivory: [255,255,240],
- khaki: [240,230,140],
- lavender: [230,230,250],
- lavenderblush: [255,240,245],
- lawngreen: [124,252,0],
- lemonchiffon: [255,250,205],
- lightblue: [173,216,230],
- lightcoral: [240,128,128],
- lightcyan: [224,255,255],
- lightgoldenrodyellow: [250,250,210],
- lightgray: [211,211,211],
- lightgreen: [144,238,144],
- lightgrey: [211,211,211],
- lightpink: [255,182,193],
- lightsalmon: [255,160,122],
- lightseagreen: [32,178,170],
- lightskyblue: [135,206,250],
- lightslategray: [119,136,153],
- lightslategrey: [119,136,153],
- lightsteelblue: [176,196,222],
- lightyellow: [255,255,224],
- lime: [0,255,0],
- limegreen: [50,205,50],
- linen: [250,240,230],
- magenta: [255,0,255],
- maroon: [128,0,0],
- mediumaquamarine: [102,205,170],
- mediumblue: [0,0,205],
- mediumorchid: [186,85,211],
- mediumpurple: [147,112,219],
- mediumseagreen: [60,179,113],
- mediumslateblue: [123,104,238],
- mediumspringgreen: [0,250,154],
- mediumturquoise: [72,209,204],
- mediumvioletred: [199,21,133],
- midnightblue: [25,25,112],
- mintcream: [245,255,250],
- mistyrose: [255,228,225],
- moccasin: [255,228,181],
- navajowhite: [255,222,173],
- navy: [0,0,128],
- oldlace: [253,245,230],
- olive: [128,128,0],
- olivedrab: [107,142,35],
- orange: [255,165,0],
- orangered: [255,69,0],
- orchid: [218,112,214],
- palegoldenrod: [238,232,170],
- palegreen: [152,251,152],
- paleturquoise: [175,238,238],
- palevioletred: [219,112,147],
- papayawhip: [255,239,213],
- peachpuff: [255,218,185],
- peru: [205,133,63],
- pink: [255,192,203],
- plum: [221,160,221],
- powderblue: [176,224,230],
- purple: [128,0,128],
- red: [255,0,0],
- rosybrown: [188,143,143],
- royalblue: [65,105,225],
- saddlebrown: [139,69,19],
- salmon: [250,128,114],
- sandybrown: [244,164,96],
- seagreen: [46,139,87],
- seashell: [255,245,238],
- sienna: [160,82,45],
- silver: [192,192,192],
- skyblue: [135,206,235],
- slateblue: [106,90,205],
- slategray: [112,128,144],
- slategrey: [112,128,144],
- snow: [255,250,250],
- springgreen: [0,255,127],
- steelblue: [70,130,180],
- tan: [210,180,140],
- teal: [0,128,128],
- thistle: [216,191,216],
- tomato: [255,99,71],
- turquoise: [64,224,208],
- violet: [238,130,238],
- wheat: [245,222,179],
- white: [255,255,255],
- whitesmoke: [245,245,245],
- yellow: [255,255,0],
- yellowgreen: [154,205,50]
- }
-
- };
-
- $$.util.regex = {};
-
- $$.util.regex.number = "(?:\\d*\\.\\d+|\\d+|\\d*\\.\\d+[eE]\\d+)";
-
- $$.util.regex.rgba = "rgb[a]?\\(("+ $$.util.regex.number +"[%]?)\\s*,\\s*("+ $$.util.regex.number +"[%]?)\\s*,\\s*("+ $$.util.regex.number +"[%]?)(?:\\s*,\\s*("+ $$.util.regex.number +"))?\\)";
- $$.util.regex.rgbaNoBackRefs = "rgb[a]?\\((?:"+ $$.util.regex.number +"[%]?)\\s*,\\s*(?:"+ $$.util.regex.number +"[%]?)\\s*,\\s*(?:"+ $$.util.regex.number +"[%]?)(?:\\s*,\\s*(?:"+ $$.util.regex.number +"))?\\)";
-
- $$.util.regex.hsla = "hsl[a]?\\(("+ $$.util.regex.number +")\\s*,\\s*("+ $$.util.regex.number +"[%])\\s*,\\s*("+ $$.util.regex.number +"[%])(?:\\s*,\\s*("+ $$.util.regex.number +"))?\\)";
- $$.util.regex.hslaNoBackRefs = "hsl[a]?\\((?:"+ $$.util.regex.number +")\\s*,\\s*(?:"+ $$.util.regex.number +"[%])\\s*,\\s*(?:"+ $$.util.regex.number +"[%])(?:\\s*,\\s*(?:"+ $$.util.regex.number +"))?\\)";
-
- $$.util.regex.hex3 = "\\#[0-9a-fA-F]{3}";
- $$.util.regex.hex6 = "\\#[0-9a-fA-F]{6}";
-
-})( cytoscape );
-
-;(function($$){
-
- $$.math = {};
-
- $$.math.boxInBezierVicinity = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, x3, y3, tolerance) {
-
- // Return values:
- // 0 - curve is not in box
- // 1 - curve may be in box; needs precise check
- // 2 - curve is in box
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- if (x1 >= boxMinX && x1 <= boxMaxX && y1 >= boxMinY && y1 <= boxMaxY) {
- return 2;
- } else if (x3 >= boxMinX && x3 <= boxMaxX && y3 >= boxMinY && y3 <= boxMaxY) {
- return 2;
- } else if (x2 >= boxMinX && x2 <= boxMaxX && y2 >= boxMinY && y2 <= boxMaxY) {
- return 1;
- }
-
- var curveMinX = Math.min(x1, x2, x3);
- var curveMinY = Math.min(y1, y2, y3);
- var curveMaxX = Math.max(x1, x2, x3);
- var curveMaxY = Math.max(y1, y2, y3);
-
- /*
- console.log(curveMinX + ", " + curveMinY + ", " + curveMaxX
- + ", " + curveMaxY);
- if (curveMinX == undefined) {
- console.log("undefined curveMinX: " + x1 + ", " + x2 + ", " + x3);
- }
- */
-
- if (curveMinX > boxMaxX
- || curveMaxX < boxMinX
- || curveMinY > boxMaxY
- || curveMaxY < boxMinY) {
-
- return 0;
- }
-
- return 1;
- }
-
- $$.math.checkStraightEdgeCrossesBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, tolerance) {
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- // Check left + right bounds
- var aX = x2 - x1;
- var bX = x1;
- var yValue;
-
- // Top and bottom
- var aY = y2 - y1;
- var bY = y1;
- var xValue;
-
- if (Math.abs(aX) < 0.0001) {
- return (x1 >= boxMinX && x1 <= boxMaxX
- && Math.min(y1, y2) <= boxMinY
- && Math.max(y1, y2) >= boxMaxY);
- }
-
- var tLeft = (boxMinX - bX) / aX;
- if (tLeft > 0 && tLeft <= 1) {
- yValue = aY * tLeft + bY;
- if (yValue >= boxMinY && yValue <= boxMaxY) {
- return true;
- }
- }
-
- var tRight = (boxMaxX - bX) / aX;
- if (tRight > 0 && tRight <= 1) {
- yValue = aY * tRight + bY;
- if (yValue >= boxMinY && yValue <= boxMaxY) {
- return true;
- }
- }
-
- var tTop = (boxMinY - bY) / aY;
- if (tTop > 0 && tTop <= 1) {
- xValue = aX * tTop + bX;
- if (xValue >= boxMinX && xValue <= boxMaxX) {
- return true;
- }
- }
-
- var tBottom = (boxMaxY - bY) / aY;
- if (tBottom > 0 && tBottom <= 1) {
- xValue = aX * tBottom + bX;
- if (xValue >= boxMinX && xValue <= boxMaxX) {
- return true;
- }
- }
-
- return false;
- }
-
- $$.math.checkBezierCrossesBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, x3, y3, tolerance) {
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- if (x1 >= boxMinX && x1 <= boxMaxX && y1 >= boxMinY && y1 <= boxMaxY) {
- return true;
- } else if (x3 >= boxMinX && x3 <= boxMaxX && y3 >= boxMinY && y3 <= boxMaxY) {
- return true;
- }
-
- var aX = x1 - 2 * x2 + x3;
- var bX = -2 * x1 + 2 * x2;
- var cX = x1;
-
- var xIntervals = [];
-
- if (Math.abs(aX) < 0.0001) {
- var leftParam = (boxMinX - x1) / bX;
- var rightParam = (boxMaxX - x1) / bX;
-
- xIntervals.push(leftParam, rightParam);
- } else {
- // Find when x coordinate of the curve crosses the left side of the box
- var discriminantX1 = bX * bX - 4 * aX * (cX - boxMinX);
- var tX1, tX2;
- if (discriminantX1 > 0) {
- var sqrt = Math.sqrt(discriminantX1);
- tX1 = (-bX + sqrt) / (2 * aX);
- tX2 = (-bX - sqrt) / (2 * aX);
-
- xIntervals.push(tX1, tX2);
- }
-
- var discriminantX2 = bX * bX - 4 * aX * (cX - boxMaxX);
- var tX3, tX4;
- if (discriminantX2 > 0) {
- var sqrt = Math.sqrt(discriminantX2);
- tX3 = (-bX + sqrt) / (2 * aX);
- tX4 = (-bX - sqrt) / (2 * aX);
-
- xIntervals.push(tX3, tX4);
- }
- }
-
- xIntervals.sort(function(a, b) { return a - b; });
-
-
- var aY = y1 - 2 * y2 + y3;
- var bY = -2 * y1 + 2 * y2;
- var cY = y1;
-
- var yIntervals = [];
-
- if (Math.abs(aY) < 0.0001) {
- var topParam = (boxMinY - y1) / bY;
- var bottomParam = (boxMaxY - y1) / bY;
-
- yIntervals.push(topParam, bottomParam);
- } else {
- var discriminantY1 = bY * bY - 4 * aY * (cY - boxMinY);
-
- var tY1, tY2;
- if (discriminantY1 > 0) {
- var sqrt = Math.sqrt(discriminantY1);
- tY1 = (-bY + sqrt) / (2 * aY);
- tY2 = (-bY - sqrt) / (2 * aY);
-
- yIntervals.push(tY1, tY2);
- }
-
- var discriminantY2 = bY * bY - 4 * aY * (cY - boxMaxY);
-
- var tY3, tY4;
- if (discriminantY2 > 0) {
- var sqrt = Math.sqrt(discriminantY2);
- tY3 = (-bY + sqrt) / (2 * aY);
- tY4 = (-bY - sqrt) / (2 * aY);
-
- yIntervals.push(tY3, tY4);
- }
- }
-
- yIntervals.sort(function(a, b) { return a - b; });
-
- for (var index = 0; index < xIntervals.length; index += 2) {
- for (var yIndex = 1; yIndex < yIntervals.length; yIndex += 2) {
-
- // Check if there exists values for the Bezier curve
- // parameter between 0 and 1 where both the curve's
- // x and y coordinates are within the bounds specified by the box
- if (xIntervals[index] < yIntervals[yIndex]
- && yIntervals[yIndex] >= 0.0
- && xIntervals[index] <= 1.0
- && xIntervals[index + 1] > yIntervals[yIndex - 1]
- && yIntervals[yIndex - 1] <= 1.0
- && xIntervals[index + 1] >= 0.0) {
-
- return true;
- }
- }
- }
-
- return false;
- }
-
- $$.math.inBezierVicinity = function(
- x, y, x1, y1, x2, y2, x3, y3, toleranceSquared) {
-
- // Middle point occurs when t = 0.5, this is when the Bezier
- // is closest to (x2, y2)
- var middlePointX = 0.25 * x1 + 0.5 * x2 + 0.25 * x3;
- var middlePointY = 0.25 * y1 + 0.5 * y2 + 0.25 * y3;
-
- var displacementX, displacementY, offsetX, offsetY;
- var dotProduct, dotSquared, hypSquared;
- var outside = function(x, y, startX, startY, endX, endY,
- toleranceSquared, counterClockwise) {
-
- dotProduct = (endY - startY) * (x - startX) + (startX - endX) * (y - startY);
- dotSquared = dotProduct * dotProduct;
- sideSquared = (endY - startY) * (endY - startY)
- + (startX - endX) * (startX - endX);
-
- if (counterClockwise) {
- if (dotProduct > 0) {
- return false;
- }
- } else {
- if (dotProduct < 0) {
- return false;
- }
- }
-
- return (dotSquared / sideSquared > toleranceSquared);
- };
-
- // Used to check if the test polygon winding is clockwise or counterclockwise
- var testPointX = (middlePointX + x2) / 2.0;
- var testPointY = (middlePointY + y2) / 2.0;
-
- var counterClockwise = true;
-
- // The test point is always inside
- if (outside(testPointX, testPointY, x1, y1, x2, y2, 0, counterClockwise)) {
- counterClockwise = !counterClockwise;
- }
-
- /*
- return (!outside(x, y, x1, y1, x2, y2, toleranceSquared, counterClockwise)
- && !outside(x, y, x2, y2, x3, y3, toleranceSquared, counterClockwise)
- && !outside(x, y, x3, y3, middlePointX, middlePointY, toleranceSquared,
- counterClockwise)
- && !outside(x, y, middlePointX, middlePointY, x1, y1, toleranceSquared,
- counterClockwise)
- );
- */
-
- return (!outside(x, y, x1, y1, x2, y2, toleranceSquared, counterClockwise)
- && !outside(x, y, x2, y2, x3, y3, toleranceSquared, counterClockwise)
- && !outside(x, y, x3, y3, x1, y1, toleranceSquared,
- counterClockwise)
- );
- }
-
- // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where
- // r is the real component, i is the imaginary component
- $$.math.solveCubic = function(a, b, c, d, result) {
-
- // An implementation of the Cardano method
- // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots
- // provided by http://www3.telus.net/thothworks/Quad3Deg.html
-
- // Get rid of a
- b /= a;
- c /= a;
- d /= a;
-
- var discrim, q, r, dum1, s, t, term1, r13;
-
- q = (3.0 * c - (b * b)) / 9.0;
- r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b));
- r /= 54.0;
-
- discrim = q * q * q + r * r;
- result[1] = 0; //The first root is always real.
- term1 = (b / 3.0);
-
- if (discrim > 0) { // one root real, two are complex
- s = r + Math.sqrt(discrim);
- s = ((s < 0) ? -Math.pow(-s, (1.0 / 3.0)) : Math.pow(s, (1.0 / 3.0)));
- t = r - Math.sqrt(discrim);
- t = ((t < 0) ? -Math.pow(-t, (1.0 / 3.0)) : Math.pow(t, (1.0 / 3.0)));
- result[0] = -term1 + s + t;
- term1 += (s + t) / 2.0;
- result[4] = result[2] = -term1;
- term1 = Math.sqrt(3.0) * (-t + s) / 2;
- result[3] = term1;
- result[5] = -term1;
- return;
- } // End if (discrim > 0)
-
- // The remaining options are all real
- result[5] = result[3] = 0;
-
- if (discrim == 0){ // All roots real, at least two are equal.
- r13 = ((r < 0) ? -Math.pow(-r, (1.0 / 3.0)) : Math.pow(r, (1.0 / 3.0)));
- result[0] = -term1 + 2.0 * r13;
- result[4] = result[2] = -(r13 + term1);
- return;
- } // End if (discrim == 0)
-
- // Only option left is that all roots are real and unequal (to get here, q < 0)
- q = -q;
- dum1 = q * q * q;
- dum1 = Math.acos(r / Math.sqrt(dum1));
- r13 = 2.0 * Math.sqrt(q);
- result[0] = -term1 + r13 * Math.cos(dum1 / 3.0);
- result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0);
- result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0);
- return;
- }
-
- $$.math.sqDistanceToQuadraticBezier = function(x, y,
- x1, y1, x2, y2, x3, y3) {
-
- // Find minimum distance by using the minimum of the distance
- // function between the given point and the curve
-
- // This gives the coefficients of the resulting cubic equation
- // whose roots tell us where a possible minimum is
- // (Coefficients are divided by 4)
-
- var a = 1.0 * x1*x1 - 4*x1*x2 + 2*x1*x3 + 4*x2*x2 - 4*x2*x3 + x3*x3
- + y1*y1 - 4*y1*y2 + 2*y1*y3 + 4*y2*y2 - 4*y2*y3 + y3*y3;
-
- var b = 1.0 * 9*x1*x2 - 3*x1*x1 - 3*x1*x3 - 6*x2*x2 + 3*x2*x3
- + 9*y1*y2 - 3*y1*y1 - 3*y1*y3 - 6*y2*y2 + 3*y2*y3;
-
- var c = 1.0 * 3*x1*x1 - 6*x1*x2 + x1*x3 - x1*x + 2*x2*x2 + 2*x2*x - x3*x
- + 3*y1*y1 - 6*y1*y2 + y1*y3 - y1*y + 2*y2*y2 + 2*y2*y - y3*y;
-
- var d = 1.0 * x1*x2 - x1*x1 + x1*x - x2*x
- + y1*y2 - y1*y1 + y1*y - y2*y;
-
- debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a);
-
- var roots = [];
-
- // Use the cubic solving algorithm
- this.solveCubic(a, b, c, d, roots);
-
- var zeroThreshold = 0.0000001;
-
- var params = [];
-
- for (var index = 0; index < 6; index += 2) {
- if (Math.abs(roots[index + 1]) < zeroThreshold
- && roots[index] >= 0
- && roots[index] <= 1.0) {
- params.push(roots[index]);
- }
- }
-
- params.push(1.0);
- params.push(0.0);
-
- var minDistanceSquared = -1;
- var closestParam;
-
- var curX, curY, distSquared;
- for (var i = 0; i < params.length; i++) {
- curX = Math.pow(1.0 - params[i], 2.0) * x1
- + 2.0 * (1 - params[i]) * params[i] * x2
- + params[i] * params[i] * x3;
-
- curY = Math.pow(1 - params[i], 2.0) * y1
- + 2 * (1.0 - params[i]) * params[i] * y2
- + params[i] * params[i] * y3;
-
- distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2);
- debug("distance for param " + params[i] + ": " + Math.sqrt(distSquared));
- if (minDistanceSquared >= 0) {
- if (distSquared < minDistanceSquared) {
- minDistanceSquared = distSquared;
- closestParam = params[i];
- }
- } else {
- minDistanceSquared = distSquared;
- closestParam = params[i];
- }
- }
-
- /*
- debugStats.clickX = x;
- debugStats.clickY = y;
-
- debugStats.closestX = Math.pow(1.0 - closestParam, 2.0) * x1
- + 2.0 * (1.0 - closestParam) * closestParam * x2
- + closestParam * closestParam * x3;
-
- debugStats.closestY = Math.pow(1.0 - closestParam, 2.0) * y1
- + 2.0 * (1.0 - closestParam) * closestParam * y2
- + closestParam * closestParam * y3;
- */
-
- debug("given: "
- + "( " + x + ", " + y + "), "
- + "( " + x1 + ", " + y1 + "), "
- + "( " + x2 + ", " + y2 + "), "
- + "( " + x3 + ", " + y3 + ")");
-
-
- debug("roots: " + roots);
- debug("params: " + params);
- debug("closest param: " + closestParam);
- return minDistanceSquared;
- }
-
- var debug = function(o) {
- if (false) {
- console.log(o);
- }
- }
-
-})( cytoscape );
-
-// type testing utility functions
-
-;(function($$){
-
- // list of ids with other metadata assoc'd with it
- $$.instances = [];
- $$.instanceCounter = 0;
- $$.lastInstanceTime;
-
- $$.registerInstance = function( instance, domElement ){
- var cy;
-
- if( $$.is.core(instance) ){
- cy = instance;
- } else if( $$.is.domElement(instance) ){
- domElement = instance;
- }
-
- // if we have an old reg that is empty (no cy), then
- var oldReg = $$.getRegistrationForInstance(instance, domElement);
- if( oldReg ){
- if( !oldReg.cy ){
- oldReg.cy = instance;
- oldReg.domElement = domElement;
- } else {
- $$.util.error('Tried to register on a pre-existing registration');
- }
-
- return oldReg;
-
- // otherwise, just make a new registration
- } else {
- var time = +new Date;
- var suffix;
-
- // add a suffix in case instances collide on the same time
- if( !$$.lastInstanceTime || $$.lastInstanceTime === time ){
- $$.instanceCounter = 0;
- } else {
- ++$$.instanceCounter;
- }
- $$.lastInstanceTime = time;
- suffix = $$.instanceCounter;
-
- var id = "cy-" + time + "-" + suffix;
-
- // create the registration object
- var registration = {
- id: id,
- cy: cy,
- domElement: domElement,
- readies: [] // list of bound ready functions before calling init
- };
-
- // put the registration object in the pool
- $$.instances.push( registration );
- $$.instances[ id ] = registration;
-
- return registration;
- }
- };
-
- $$.removeRegistrationForInstance = function(instance, domElement){
- var cy;
-
- if( $$.is.core(instance) ){
- cy = instance;
- } else if( $$.is.domElement(instance) ){
- domElement = instance;
- }
-
- if( $$.is.core(cy) ){
- var id = cy._private.instanceId;
- delete $$.instances[ id ];
- $$.instances.splice(id, 1);
-
- } else if( $$.is.domElement(domElement) ){
- for( var i = 0; i < $$.instances.length; i++ ){
- var reg = $$.instances[i];
-
- if( reg.domElement === domElement ){
- delete $$.instances[ reg.id ];
- $$.instances.splice(i, 1);
- i--;
- }
- }
- }
- }
-
- $$.getRegistrationForInstance = function( instance, domElement ){
- var cy;
-
- if( $$.is.core(instance) ){
- if( instance.registered() ){ // only want it if it's registered b/c if not it has no reg'd id
- cy = instance;
- }
- } else if( $$.is.domElement(instance) ){
- domElement = instance;
- }
-
- if( $$.is.core(cy) ){
- var id = cy._private.instanceId;
- return $$.instances[ id ];
-
- } else if( $$.is.domElement(domElement) ){
- for( var i = $$.instances.length - 1; i >= 0; i-- ){ // look backwards, since most recent is the one we want
- var reg = $$.instances[i];
-
- if( reg.domElement === domElement ){
- return reg;
- }
- }
- }
- };
-
-})( cytoscape );
-
-;(function($$){
-
- // registered extensions to cytoscape, indexed by name
- var extensions = {};
- $$.extensions = extensions;
-
- // registered modules for extensions, indexed by name
- var modules = {};
- $$.modules = modules;
-
- function setExtension(type, name, registrant){
- var impl = {};
- impl[name] = registrant;
-
- switch( type ){
- case "core":
- case "collection":
- $$.fn[type]( impl );
- }
-
- return $$.util.setMap({
- map: extensions,
- keys: [ type, name ],
- value: registrant
- });
- }
-
- function getExtension(type, name){
- return $$.util.getMap({
- map: extensions,
- keys: [ type, name ]
- });
- }
-
- function setModule(type, name, moduleType, moduleName, registrant){
- return $$.util.setMap({
- map: modules,
- keys: [ type, name, moduleType, moduleName ],
- value: registrant
- });
- }
-
- function getModule(type, name, moduleType, moduleName){
- return $$.util.getMap({
- map: modules,
- keys: [ type, name, moduleType, moduleName ]
- });
- }
-
- $$.extension = function(){
- // e.g. $$.extension("renderer", "svg")
- if( arguments.length == 2 ){
- return getExtension.apply(this, arguments);
- }
-
- // e.g. $$.extension("renderer", "svg", { ... })
- else if( arguments.length == 3 ){
- return setExtension.apply(this, arguments);
- }
-
- // e.g. $$.extension("renderer", "svg", "nodeShape", "ellipse")
- else if( arguments.length == 4 ){
- return getModule.apply(this, arguments);
- }
-
- // e.g. $$.extension("renderer", "svg", "nodeShape", "ellipse", { ... })
- else if( arguments.length == 5 ){
- return setModule.apply(this, arguments);
- }
-
- else {
- $.error("Invalid extension access syntax");
- }
-
- };
-
-})( cytoscape );
-
-;(function($, $$){
-
- if( !$ ){ return } // no jquery => don't need this
-
- // allow calls on a jQuery selector by proxying calls to $.cytoscape
- // e.g. $("#foo").cytoscape(options) => $.cytoscape(options) on #foo
- $.fn.cytoscape = function(opts){
- var $this = $(this);
-
- // get object
- if( opts === "get" ){
- var reg = $$.getRegistrationForInstance( $this[0] );
- return reg.cy;
- }
-
- // bind to ready
- else if( $$.is.fn(opts) ){
- //debugger;
-
- var ready = opts;
- var domEle = $this[0];
- var reg = $$.getRegistrationForInstance( domEle );
-
- if( !reg ){
- reg = $$.registerInstance( domEle );
- }
-
- if( reg && reg.cy && reg.cy.ready() ){
- // already ready so just trigger now
- reg.cy.trigger("ready", [], ready);
-
- } else {
- // not yet ready, so add to readies list
-
- reg.readies.push( ready );
- }
-
- }
-
- // proxy to create instance
- else if( $$.is.plainObject(opts) ){
- return $this.each(function(){
- var options = $.extend({}, opts, {
- container: $(this)[0]
- });
-
- cytoscape(options);
- });
- }
-
- // proxy a function call
- else {
- var domEle = $this[0];
- var rets = [];
- var args = [];
- for(var i = 1; i < arguments.length; i++){
- args[i - 1] = arguments[i];
- }
-
- $this.each(function(){
- var reg = $$.getRegistrationForInstance( domEle );
- var cy = reg.cy;
- var fnName = opts;
-
- if( cy && $$.is.fn( cy[fnName] ) ){
- var ret = cy[fnName].apply(cy, args);
- rets.push(ret);
- }
- });
-
- // if only one instance, don't need to return array
- if( rets.length === 1 ){
- rets = rets[0];
- } else if( rets.length == 0 ){
- rets = $(this);
- }
-
- return rets;
- }
-
- };
-
- // allow access to the global cytoscape object under jquery for legacy reasons
- $.cytoscape = cytoscape;
-
- // use short alias (cy) if not already defined
- if( $.fn.cy == null && $.cy == null ){
- $.fn.cy = $.fn.cytoscape;
- $.cy = $.cytoscape;
- }
-
-})(typeof jQuery !== 'undefined' ? jQuery : null , cytoscape);
-
-;(function($$){
-
- // shamelessly taken from jQuery
- // https://github.com/jquery/jquery/blob/master/src/event.js
-
- $$.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof $$.Event) ) {
- return new $$.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- $$.util.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || +new Date;
-
- // Mark it as fixed
- //this[ jQuery.expando ] = true;
- };
-
- function returnFalse() {
- return false;
- }
- function returnTrue() {
- return true;
- }
-
- // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
- // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
- $$.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
-
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if stopPropagation exists run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
- };
-
-
-})( cytoscape );
-
-;(function($$){
-
- // metaprogramming makes me happy
-
- // use this module to cherry pick functions into your prototype
- // (useful for functions shared between the core and collections, for example)
-
- // e.g.
- // $$.fn.collection({
- // foo: $$.define.foo({ /* params... */ })
- // });
-
- $$.define = {
-
- // access data field
- data: function( params ){
- var defaults = {
- field: "data",
- bindingEvent: "data",
- allowBinding: false,
- allowSetting: false,
- allowGetting: false,
- settingEvent: "data",
- settingTriggersEvent: false,
- triggerFnName: "trigger",
- immutableKeys: {}, // key => true if immutable
- updateMappers: false
- };
- params = $$.util.extend({}, defaults, params);
-
- return function( name, value ){
- var p = params;
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
- var single = selfIsArrayLike ? self[0] : self;
-
- // .data("foo", ...)
- if( $$.is.string(name) ){ // set or get property
-
- // .data("foo")
- if( p.allowGetting && value === undefined ){ // get
-
- var ret;
- if( single ){
- ret = single._private[ p.field ][ name ];
- }
- return ret;
-
- // .data("foo", "bar")
- } else if( p.allowSetting && value !== undefined ) { // set
- var valid = !p.immutableKeys[name];
- if( valid ){
-
- for( var i = 0, l = all.length; i < l; i++ ){
- all[i]._private[ p.field ][ name ] = value;
- }
-
- // update mappers if asked
- if( p.updateMappers ){ self.updateMappers(); }
-
- if( p.settingTriggersEvent ){
- self[ p.triggerFnName ]( p.settingEvent );
- }
- }
- }
-
- // .data({ "foo": "bar" })
- } else if( p.allowSetting && $$.is.plainObject(name) ){ // extend
- var obj = name;
- var k, v;
-
- for( k in obj ){
- v = obj[ k ];
-
- var valid = !p.immutableKeys[k];
- if( valid ){
- for( var i = 0, l = all.length; i < l; i++ ){
- all[i]._private[ p.field ][ k ] = v;
- }
- }
- }
-
- // update mappers if asked
- if( p.updateMappers ){ self.updateMappers(); }
-
- if( p.settingTriggersEvent ){
- self[ p.triggerFnName ]( p.settingEvent );
- }
-
- // .data(function(){ ... })
- } else if( p.allowBinding && $$.is.fn(name) ){ // bind to event
- var fn = name;
- self.bind( p.bindingEvent, fn );
-
- // .data()
- } else if( p.allowGetting && name === undefined ){ // get whole object
- var ret;
- if( single ){
- ret = single._private[ p.field ];
- }
- return ret;
- }
-
- return self; // maintain chainability
- }; // function
- }, // data
-
- batchData: function( params ){
- var defaults = {
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- immutableKeys: {}, // key => true if immutable
- updateMappers: false
- };
- var p = params = $$.util.extend({}, defaults, params);
-
- return function( map ){
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var eles = selfIsArrayLike ? self : self._private.elements;
-
- if( eles.length === 0 ){ return self; }
- var cy = selfIsArrayLike ? eles[0]._private.cy : self; // NB must have at least 1 ele to get cy
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- var id = ele._private.data.id;
- var mapData = map[id];
-
- if( mapData !== undefined && mapData !== null ){
- var obj = mapData;
- var k, v;
-
- // set the (k, v) pairs from the map
- for( k in obj ){
- v = obj[ k ];
-
- var valid = !p.immutableKeys[k];
- if( valid ){
- ele._private[ p.field ][ k ] = v;
- }
- }
- } // if
- } // for
-
- // update mappers if asked
- var coln = new $$.Collection(cy, eles);
- if( p.updateMappers ){ coln.updateMappers(); }
-
- coln[ p.triggerFnName ]( p.event );
-
- return self; // chaining
- };
- },
-
- // remove data field
- removeData: function( params ){
- var defaults = {
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- triggerEvent: false,
- immutableKeys: {} // key => true if immutable
- };
- params = $$.util.extend({}, defaults, params);
-
- return function( names ){
- var p = params;
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
- var single = selfIsArrayLike ? self[0] : self;
-
- // .removeData("foo bar")
- if( $$.is.string(names) ){ // then get the list of keys, and delete them
- var keys = names.split(/\s+/);
- var l = keys.length;
-
- for( var i = 0; i < l; i++ ){ // delete each non-empty key
- var key = keys[i];
- if( $$.is.emptyString(key) ){ continue; }
-
- var valid = !p.immutableKeys[ key ]; // not valid if immutable
- if( valid ){
- for( var i_a = 0, l_a = all.length; i_a < l_a; i_a++ ){
- delete all[ i_a ]._private[ p.field ][ key ];
- }
- }
- }
-
- if( p.triggerEvent ){
- self[ p.triggerFnName ]( p.event );
- }
-
- // .removeData()
- } else if( names === undefined ){ // then delete all keys
-
- for( var i_a = 0, l_a = all.length; i_a < l_a; i_a++ ){
- var _privateFields = all[ i_a ]._private[ p.field ];
-
- for( var key in _privateFields ){
- var validKeyToDelete = !p.immutableKeys[ key ];
-
- if( validKeyToDelete ){
- delete _privateFields[ key ];
- }
- }
- }
-
- if( p.triggerEvent ){
- self[ p.triggerFnName ]( p.event );
- }
- }
-
- return self; // maintain chaining
- }; // function
- }, // removeData
-
- // event function reusable stuff
- event: {
- regex: /(\w+)(\.\w+)?/, // regex for matching event strings (e.g. "click.namespace")
- optionalTypeRegex: /(\w+)?(\.\w+)?/,
-
- // properties to copy to the event obj
- props: "altKey bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase metaKey offsetX offsetY originalTarget pageX pageY prevValue relatedTarget screenX screenY shiftKey target view which".split(/\s+/),
-
- aliases: "mousedown mouseup click mouseover mouseout mousemove touchstart touchmove touchend grab drag free".split(/\s+/),
-
- aliasesOn: function( thisPrototype ){
-
- var aliases = $$.define.event.aliases;
- for( var i = 0; i < aliases.length; i++ ){
- var eventType = aliases[i];
-
- thisPrototype[ eventType ] = function(data, callback){
- if( $$.is.fn(callback) ){
- this.on(eventType, data, callback);
-
- } else if( $$.is.fn(data) ){
- callback = data;
- this.on(eventType, callback);
-
- } else {
- this.trigger(eventType);
- }
-
- return this; // maintain chaining
- };
- }
- },
-
- falseCallback: function(){ return false; }
- },
-
- // event binding
- on: function( params ){
- var defaults = {
- unbindSelfOnTrigger: false,
- unbindAllBindersOnTrigger: false
- };
- params = $$.util.extend({}, defaults, params);
-
- return function(events, selector, data, callback){
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
- var single = selfIsArrayLike ? self[0] : self;
- var eventsIsString = $$.is.string(events);
- var p = params;
-
- if( $$.is.plainObject(selector) ){ // selector is actually data
- callback = data;
- data = selector;
- selector = undefined;
- } else if( $$.is.fn(selector) || selector === false ){ // selector is actually callback
- callback = selector;
- data = undefined;
- selector = undefined;
- }
-
- if( $$.is.fn(data) || data === false ){ // data is actually callback
- callback = data;
- data = undefined;
- }
-
- // if there isn't a callback, we can't really do anything
- // (can't speak for mapped events arg version)
- if( !($$.is.fn(callback) || callback === false) && eventsIsString ){
- return self; // maintain chaining
- }
-
- if( eventsIsString ){ // then convert to map
- var map = {};
- map[ events ] = callback;
- events = map;
- }
-
- for( var evts in events ){
- callback = events[evts];
- if( callback === false ){
- callback = $$.define.event.falseCallback;
- }
-
- if( !$$.is.fn(callback) ){ continue; }
-
- evts = evts.split(/\s+/);
- for( var i = 0; i < evts.length; i++ ){
- var evt = evts[i];
- if( $$.is.emptyString(evt) ){ continue; }
-
- var match = evt.match( $$.define.event.regex ); // type[.namespace]
-
- if( match ){
- var type = match[1];
- var namespace = match[2] ? match[2] : undefined;
-
- var listener = {
- callback: callback, // callback to run
- data: data, // extra data in eventObj.data
- delegated: selector ? true : false, // whether the evt is delegated
- selector: selector, // the selector to match for delegated events
- type: type, // the event type (e.g. "click")
- namespace: namespace, // the event namespace (e.g. ".foo")
- unbindSelfOnTrigger: p.unbindSelfOnTrigger,
- unbindAllBindersOnTrigger: p.unbindAllBindersOnTrigger,
- binders: all // who bound together
- };
-
- for( var j = 0; j < all.length; j++ ){
- all[j]._private.listeners.push( listener );
- }
- }
- } // for events array
- } // for events map
-
- return self; // maintain chaining
- }; // function
- }, // on
-
- off: function( params ){
- var defaults = {
- };
- params = $$.util.extend({}, defaults, params);
-
- return function(events, selector, callback){
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
- var single = selfIsArrayLike ? self[0] : self;
- var eventsIsString = $$.is.string(events);
- var p = params;
-
- if( arguments.length === 0 ){ // then unbind all
-
- for( var i = 0; i < all.length; i++ ){
- all[i]._private.listeners = [];
- }
-
- return self; // maintain chaining
- }
-
- if( $$.is.fn(selector) || selector === false ){ // selector is actually callback
- callback = selector;
- selector = undefined;
- }
-
- if( eventsIsString ){ // then convert to map
- var map = {};
- map[ events ] = callback;
- events = map;
- }
-
- for( var evts in events ){
- callback = events[evts];
-
- if( callback === false ){
- callback = $$.define.event.falseCallback;
- }
-
- evts = evts.split(/\s+/);
- for( var h = 0; h < evts.length; h++ ){
- var evt = evts[h];
- if( $$.is.emptyString(evt) ){ continue; }
-
- var match = evt.match( $$.define.event.optionalTypeRegex ); // [type][.namespace]
- if( match ){
- var type = match[1] ? match[1] : undefined;
- var namespace = match[2] ? match[2] : undefined;
-
- for( var i = 0; i < all.length; i++ ){ //
- var listeners = all[i]._private.listeners;
-
- for( var j = 0; j < listeners.length; j++ ){
- var listener = listeners[j];
- var nsMatches = !namespace || namespace === listener.namespace;
- var typeMatches = !type || listener.type === type;
- var cbMatches = !callback || callback === listener.callback;
- var listenerMatches = nsMatches && typeMatches && cbMatches;
-
- // delete listener if it matches
- if( listenerMatches ){
- listeners.splice(j, 1);
- j--;
- }
- } // for listeners
- } // for all
- } // if match
- } // for events array
-
- } // for events map
-
- return self; // maintain chaining
- }; // function
- }, // off
-
- trigger: function( params ){
- var defaults = {};
- params = $$.util.extend({}, defaults, params);
-
- return function(events, extraParams, fnToTrigger){
- var self = this;
- var selfIsArrayLike = self.length !== undefined;
- var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
- var single = selfIsArrayLike ? self[0] : self;
- var eventsIsString = $$.is.string(events);
- var eventsIsObject = $$.is.plainObject(events);
- var eventsIsEvent = $$.is.event(events);
- var p = params;
- var cy = this._private.cy || this;
-
- if( eventsIsString ){ // then make a plain event object for each event name
- var evts = events.split(/\s+/);
- events = [];
-
- for( var i = 0; i < evts.length; i++ ){
- var evt = evts[i];
- if( $$.is.emptyString(evt) ){ continue; }
-
- var match = evt.match( $$.define.event.regex ); // type[.namespace]
- var type = match[1];
- var namespace = match[2] ? match[2] : undefined;
-
- events.push( {
- type: type,
- namespace: namespace
- } );
- }
- } else if( eventsIsObject ){ // put in length 1 array
- var eventArgObj = events;
-
- events = [ eventArgObj ];
- }
-
- if( extraParams ){
- if( !$$.is.array(extraParams) ){ // make sure extra params are in an array if specified
- extraParams = [ extraParams ];
- }
- } else { // otherwise, we've got nothing
- extraParams = [];
- }
-
- for( var i = 0; i < events.length; i++ ){ // trigger each event in order
- var evtObj = events[i];
-
- for( var j = 0; j < all.length; j++ ){ // for each
- var triggerer = all[j];
- var listeners = triggerer._private.listeners;
- var triggererIsElement = $$.is.element(triggerer);
- var bubbleUp = triggererIsElement;
-
- // create the event for this element from the event object
- var evt;
-
- if( eventsIsEvent ){ // then just get the object
- evt = evtObj;
-
- evt.cyTarget = evt.cyTarget || triggerer;
- evt.cy = evt.cy || cy;
- evt.namespace = evt.namespace || evtObj.namespace;
-
- } else { // then we have to make one
- evt = new $$.Event( evtObj, {
- cyTarget: triggerer,
- cy: cy,
- namespace: evtObj.namespace
- } );
-
- // copy properties like jQuery does
- var props = $$.define.event.props;
- for( var k = 0; k < props.length; k++ ){
- var prop = props[k];
- evt[ prop ] = evtObj[ prop ];
- }
- }
-
- if( fnToTrigger ){ // then override the listeners list with just the one we specified
- listeners = [{
- namespace: evt.namespace,
- type: evt.type,
- callback: fnToTrigger
- }];
- }
-
- for( var k = 0; k < listeners.length; k++ ){ // check each listener
- var lis = listeners[k];
- var nsMatches = !lis.namespace || lis.namespace === evt.namespace;
- var typeMatches = lis.type === evt.type;
- var targetMatches = lis.delegated ? ( triggerer !== evt.cyTarget && $$.is.element(evt.cyTarget) && evt.cyTarget.is(lis.selector) ) : (true); // we're not going to validate the hierarchy; that's too expensive
- var listenerMatches = nsMatches && typeMatches && targetMatches;
-
- if( listenerMatches ){ // then trigger it
- var args = [ evt ];
- args = args.concat( extraParams ); // add extra params to args list
-
- if( lis.data ){ // add on data plugged into binding
- evt.data = lis.data;
- } else { // or clear it in case the event obj is reused
- evt.data = undefined;
- }
-
- if( lis.unbindSelfOnTrigger || lis.unbindAllBindersOnTrigger ){ // then remove listener
- listeners.splice(k, 1);
- k--;
- }
-
- if( lis.unbindAllBindersOnTrigger ){ // then delete the listener for all binders
- var binders = lis.binders;
- for( var l = 0; l < binders.length; l++ ){
- var binder = binders[l];
- if( !binder || binder === triggerer ){ continue; } // already handled triggerer or we can't handle it
-
- var binderListeners = binder._private.listeners;
- for( var m = 0; m < binderListeners.length; m++ ){
- var binderListener = binderListeners[m];
-
- if( binderListener === lis ){ // delete listener from list
- binderListeners.splice(m, 1);
- m--;
- }
- }
- }
- }
-
- // run the callback
- var context = lis.delegated ? evt.cyTarget : triggerer;
- var ret = lis.callback.apply( context, args );
-
- if( ret === false || evt.isPropagationStopped() ){
- // then don't bubble
- bubbleUp = false;
-
- if( ret === false ){
- // returning false is a shorthand for stopping propagation and preventing the def. action
- evt.stopPropagation();
- evt.preventDefault();
- }
- }
- } // if listener matches
- } // for each listener
-
- // bubble up event for elements
- if( bubbleUp ){
- var parent = triggerer.parent();
- var hasParent = parent.length !== 0;
-
- if( hasParent ){ // then bubble up to parent
- parent = parent[0];
- parent.trigger(evt);
- } else { // otherwise, bubble up to the core
- cy.trigger(evt);
- }
- }
-
- } // for each of all
- } // for each event
-
- return self; // maintain chaining
- }; // function
- } // trigger
-
- }; // define
-
-
-})( cytoscape );
-
-;(function($$, window){
-
- var isTouch = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
-
- $$.Style = function( cy ){
-
- if( !(this instanceof $$.Style) ){
- return new $$.Style(cy);
- }
-
- if( !$$.is.core(cy) ){
- $$.util.error("A style must have a core reference");
- return;
- }
-
- this._private = {
- cy: cy,
- coreStyle: {}
- };
-
- this.length = 0;
-
- this.addDefaultStylesheet();
- };
-
- // nice-to-have aliases
- $$.style = $$.Style;
- $$.styfn = $$.Style.prototype;
-
- // define functions in the Style prototype
- $$.fn.style = function( fnMap, options ){
- for( var fnName in fnMap ){
- var fn = fnMap[ fnName ];
- $$.Style.prototype = fn;
- }
- };
-
- // a dummy stylesheet object that doesn't need a reference to the core
- $$.stylesheet = $$.Stylesheet = function(){
- if( !(this instanceof $$.Stylesheet) ){
- return new $$.Stylesheet();
- }
-
- this.length = 0;
- };
-
- // just store the selector to be parsed later
- $$.Stylesheet.prototype.selector = function( selector ){
- var i = this.length++;
-
- this[i] = {
- selector: selector,
- properties: []
- };
-
- return this; // chaining
- };
-
- // just store the property to be parsed later
- $$.Stylesheet.prototype.css = function( name, value ){
- var i = this.length - 1;
-
- if( $$.is.string(name) ){
- this[i].properties.push({
- name: name,
- value: value
- });
- } else if( $$.is.plainObject(name) ){
- map = name;
-
- for( var j = 0; j < $$.style.properties.length; j++ ){
- var prop = $$.style.properties[j];
- var mapVal = map[ prop.name ];
-
- if( mapVal === undefined ){ // also try camel case name
- mapVal = map[ $$.util.dash2camel(prop.name) ];
- }
-
- if( mapVal !== undefined ){
- var name = prop.name;
- var value = mapVal;
-
- this[i].properties.push({
- name: name,
- value: value
- });
- }
- }
- }
-
- return this; // chaining
- };
-
- // static function
- $$.style.fromJson = function( cy, json ){
- var style = new $$.Style(cy);
-
- for( var i = 0; i < json.length; i++ ){
- var context = json[i];
- var selector = context.selector;
- var props = context.css;
-
- style.selector(selector); // apply selector
-
- for( var name in props ){
- var value = props[name];
-
- style.css( name, value ); // apply property
- }
- }
-
- return style;
- };
-
- $$.styfn.fromJson = function( json ){
- var style = this;
-
- style.resetToDefault();
-
- for( var i = 0; i < json.length; i++ ){
- var context = json[i];
- var selector = context.selector;
- var props = context.css;
-
- style.selector(selector); // apply selector
-
- for( var name in props ){
- var value = props[name];
-
- style.css( name, value ); // apply property
- }
- }
-
- return style;
- };
-
- // generate a real style object from the dummy stylesheet
- $$.Stylesheet.prototype.generateStyle = function( cy ){
- var style = new $$.Style(cy);
-
- for( var i = 0; i < this.length; i++ ){
- var context = this[i];
- var selector = context.selector;
- var props = context.properties;
-
- style.selector(selector); // apply selector
-
- for( var j = 0; j < props.length; j++ ){
- var prop = props[j];
-
- style.css( prop.name, prop.value ); // apply property
- }
- }
-
- return style;
- };
-
- $$.Stylesheet.prototype.assignToStyle = function( style, addDefaultStylesheet ){
- style.clear();
-
- if( addDefaultStylesheet || addDefaultStylesheet === undefined ){
- style.addDefaultStylesheet();
- }
-
- for( var i = 0; i < this.length; i++ ){
- var context = this[i];
- var selector = context.selector;
- var props = context.properties;
-
- style.selector(selector); // apply selector
-
- for( var j = 0; j < props.length; j++ ){
- var prop = props[j];
-
- style.css( prop.name, prop.value ); // apply property
- }
- }
- };
-
- (function(){
- var number = $$.util.regex.number;
- var rgba = $$.util.regex.rgbaNoBackRefs;
- var hsla = $$.util.regex.hslaNoBackRefs;
- var hex3 = $$.util.regex.hex3;
- var hex6 = $$.util.regex.hex6;
-
- // each visual style property has a type and needs to be validated according to it
- $$.style.types = {
- zeroOneNumber: { number: true, min: 0, max: 1, unitless: true },
- nonNegativeInt: { number: true, min: 0, integer: true, unitless: true },
- size: { number: true, min: 0, enums: ["auto"] },
- bgSize: { number: true, min: 0, allowPercent: true },
- color: { color: true },
- lineStyle: { enums: ["solid", "dotted", "dashed"] },
- curveStyle: { enums: ["bundled", "bezier"] },
- fontFamily: { regex: "^([\\w- ]+(?:\\s*,\\s*[\\w- ]+)*)$" },
- fontVariant: { enums: ["small-caps", "normal"] },
- fontStyle: { enums: ["italic", "normal", "oblique"] },
- fontWeight: { enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] },
- textDecoration: { enums: ["none", "underline", "overline", "line-through"] },
- textTransform: { enums: ["none", "capitalize", "uppercase", "lowercase"] },
- nodeShape: { enums: ["rectangle", "roundrectangle", "ellipse", "triangle",
- "square", "pentagon", "hexagon", "heptagon", "octagon"] },
- arrowShape: { enums: ["tee", "triangle", "square", "circle", "diamond", "none"] },
- visibility: { enums: ["hidden", "visible"] },
- valign: { enums: ["top", "center", "bottom"] },
- halign: { enums: ["left", "center", "right"] },
- positionx: { enums: ["left", "center", "right"], number: true, allowPercent: true },
- positiony: { enums: ["top", "center", "bottom"], number: true, allowPercent: true },
- bgRepeat: { enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"] },
- cursor: { enums: ["auto", "crosshair", "default", "e-resize", "n-resize", "ne-resize", "nw-resize", "pointer", "progress", "s-resize", "sw-resize", "text", "w-resize", "wait", "grab", "grabbing"] },
- text: { string: true },
- data: { mapping: true, regex: "^data\\s*\\(\\s*([\\w\\.]+)\\s*\\)$" },
- mapData: { mapping: true, regex: "^mapData\\(([\\w\\.]+)\\s*\\,\\s*(" + number + ")\\s*\\,\\s*(" + number + ")\\s*,\\s*(" + number + "|\\w+|" + rgba + "|" + hsla + "|" + hex3 + "|" + hex6 + ")\\s*\\,\\s*(" + number + "|\\w+|" + rgba + "|" + hsla + "|" + hex3 + "|" + hex6 + ")\\)$" },
- url: { regex: "^url\\s*\\(\\s*([^\\s]+)\\s*\\s*\\)|none|(.+)$" }
- };
-
- // define visual style properties
- var t = $$.style.types;
- $$.style.properties = [
- // these are for elements
- { name: "cursor", type: t.cursor },
- { name: "text-valign", type: t.valign },
- { name: "text-halign", type: t.halign },
- { name: "color", type: t.color },
- { name: "content", type: t.text },
- { name: "text-outline-color", type: t.color },
- { name: "text-outline-width", type: t.size },
- { name: "text-outline-opacity", type: t.zeroOneNumber },
- { name: "text-opacity", type: t.zeroOneNumber },
- { name: "text-decoration", type: t.textDecoration },
- { name: "text-transform", type: t.textTransform },
- { name: "font-family", type: t.fontFamily },
- { name: "font-style", type: t.fontStyle },
- { name: "font-variant", type: t.fontVariant },
- { name: "font-weight", type: t.fontWeight },
- { name: "font-size", type: t.size },
- { name: "min-zoomed-font-size", type: t.size },
- { name: "visibility", type: t.visibility },
- { name: "opacity", type: t.zeroOneNumber },
- { name: "z-index", type: t.nonNegativeInt },
- { name: "overlay-padding", type: t.size },
- { name: "overlay-color", type: t.color },
- { name: "overlay-opacity", type: t.zeroOneNumber },
-
- // these are just for nodes
- { name: "background-color", type: t.color },
- { name: "background-opacity", type: t.zeroOneNumber },
- { name: "background-image", type: t.url },
- { name: "background-position-x", type: t.positionx },
- { name: "background-position-y", type: t.positiony },
- { name: "background-repeat", type: t.bgRepeat },
- { name: "background-size-x", type: t.bgSize },
- { name: "background-size-y", type: t.bgSize },
- { name: "border-color", type: t.color },
- { name: "border-opacity", type: t.zeroOneNumber },
- { name: "border-width", type: t.size },
- { name: "border-style", type: t.lineStyle },
- { name: "height", type: t.size },
- { name: "width", type: t.size },
- { name: "padding-left", type: t.size },
- { name: "padding-right", type: t.size },
- { name: "padding-top", type: t.size },
- { name: "padding-bottom", type: t.size },
- { name: "shape", type: t.nodeShape },
-
- // these are just for edges
- { name: "source-arrow-shape", type: t.arrowShape },
- { name: "target-arrow-shape", type: t.arrowShape },
- { name: "source-arrow-color", type: t.color },
- { name: "target-arrow-color", type: t.color },
- { name: "line-style", type: t.lineStyle },
- { name: "line-color", type: t.color },
- { name: "control-point-step-size", type: t.size },
- { name: "curve-style", type: t.curveStyle },
-
- // these are just for the core
- { name: "selection-box-color", type: t.color },
- { name: "selection-box-opacity", type: t.zeroOneNumber },
- { name: "selection-box-border-color", type: t.color },
- { name: "selection-box-border-width", type: t.size },
- { name: "panning-cursor", type: t.cursor },
- { name: "active-bg-color", type: t.color },
- { name: "active-bg-opacity", type: t.zeroOneNumber },
- { name: "active-bg-size", type: t.size }
- ];
-
- // allow access of properties by name ( e.g. $$.style.properties.height )
- var props = $$.style.properties;
- for( var i = 0; i < props.length; i++ ){
- var prop = props[i];
-
- props[ prop.name ] = prop; // allow lookup by name
- }
- })();
-
- // adds the default stylesheet to the current style
- $$.styfn.addDefaultStylesheet = function(){
- // to be nice, we build font related style properties from the core container
- // so that cytoscape matches the style of its container by default
- var fontFamily = this.containerPropertyAsString("font-family") || "sans-serif";
- var fontStyle = this.containerPropertyAsString("font-style") || "normal";
- var fontVariant = this.containerPropertyAsString("font-variant") || "normal";
- var fontWeight = this.containerPropertyAsString("font-weight") || "normal";
- var color = this.containerPropertyAsString("color") || "#000";
- var textTransform = this.containerPropertyAsString("text-transform") || "none";
- var textDecoration = this.containerPropertyAsString("text-decoration") || "none";
- var fontSize = this.containerPropertyAsString("font-size") || 12;
-
- // fill the style with the default stylesheet
- this
- .selector("node, edge") // common properties
- .css({
- "cursor": "default",
- "text-valign": "top",
- "text-halign": "center",
- "color": color,
- "content": undefined, // => no label
- "text-outline-color": "#000",
- "text-outline-width": 0,
- "text-outline-opacity": 1,
- "text-opacity": 1,
- "text-decoration": "none",
- "text-transform": textTransform,
- "font-family": fontFamily,
- "font-style": fontStyle,
- "font-variant": fontVariant,
- "font-weight": fontWeight,
- "font-size": fontSize,
- "min-zoomed-font-size": 0,
- "visibility": "visible",
- "opacity": 1,
- "z-index": 0,
- "content": "",
- "overlay-opacity": 0,
- "overlay-color": "#000",
- "overlay-padding": 10,
-
- // node props
- "background-color": "#888",
- "background-opacity": 1,
- "background-image": "none",
- "border-color": "#000",
- "border-opacity": 1,
- "border-width": 0,
- "border-style": "solid",
- "height": 30,
- "width": 30,
- "padding-top": 0,
- "padding-bottom": 0,
- "padding-left": 0,
- "padding-right": 0,
- "shape": "ellipse",
-
- // edge props
- "source-arrow-shape": "none",
- "target-arrow-shape": "none",
- "source-arrow-color": "#bbb",
- "target-arrow-color": "#bbb",
- "line-style": "solid",
- "line-color": "#bbb",
- "control-point-step-size": 40,
- "curve-style": "bezier"
- })
- .selector("$node > node") // compound (parent) node properties
- .css({
- "width": "auto",
- "height": "auto",
- "shape": "rectangle",
- "background-opacity": 0.5,
- "padding-top": 10,
- "padding-right": 10,
- "padding-left": 10,
- "padding-bottom": 10
- })
- .selector("edge") // just edge properties
- .css({
- "width": 1,
- })
- .selector(":active")
- .css({
- "overlay-color": "black",
- "overlay-padding": 10,
- "overlay-opacity": 0.25
- })
- .selector("core") // just core properties
- .css({
- "selection-box-color": "#ddd",
- "selection-box-opacity": 0.65,
- "selection-box-border-color": "#aaa",
- "selection-box-border-width": 1,
- "panning-cursor": "grabbing",
- "active-bg-color": "black",
- "active-bg-opacity": 0.15,
- "active-bg-size": isTouch ? 40 : 15
- })
- ;
- };
-
- // remove all contexts
- $$.styfn.clear = function(){
- this._private.newStyle = true;
-
- for( var i = 0; i < this.length; i++ ){
- delete this[i];
- }
- this.length = 0;
-
- return this; // chaining
- };
-
- $$.styfn.resetToDefault = function(){
- this.clear();
- this.addDefaultStylesheet();
-
- return this;
- };
-
- // builds a style object for the "core" selector
- $$.styfn.core = function(){
- return this._private.coreStyle;
- };
-
- // parse a property; return null on invalid; return parsed property otherwise
- // fields :
- // - name : the name of the property
- // - value : the parsed, native-typed value of the property
- // - strValue : a string value that represents the property value in valid css
- // - bypass : true iff the property is a bypass property
- $$.styfn.parse = function( name, value, propIsBypass ){
-
- name = $$.util.camel2dash( name ); // make sure the property name is in dash form (e.g. "property-name" not "propertyName")
- var property = $$.style.properties[ name ];
- var passedValue = value;
-
- if( !property ){ return null; } // return null on property of unknown name
- if( value === undefined || value === null ){ return null; } // can't assign null
-
- var valueIsString = $$.is.string(value);
- if( valueIsString ){ // trim the value to make parsing easier
- value = $$.util.trim( value );
- }
-
- var type = property.type;
- if( !type ){ return null; } // no type, no luck
-
- // check if bypass is null or empty string (i.e. indication to delete bypass property)
- if( propIsBypass && (value === "" || value === null) ){
- return {
- name: name,
- value: value,
- bypass: true,
- deleteBypass: true
- };
- }
-
- // check if value is mapped
- var data, mapData;
- if( !valueIsString ){
- // then don't bother to do the expensive regex checks
-
- } else if( data = new RegExp( $$.style.types.data.regex ).exec( value ) ){
- return {
- name: name,
- value: data,
- strValue: value,
- mapped: $$.style.types.data,
- field: data[1],
- bypass: propIsBypass
- };
-
- } else if( mapData = new RegExp( $$.style.types.mapData.regex ).exec( value ) ){
- // we can map only if the type is a colour or a number
- if( !(type.color || type.number) ){ return false; }
-
- var valueMin = this.parse( name, mapData[4]); // parse to validate
- if( !valueMin || valueMin.mapped ){ return false; } // can't be invalid or mapped
-
- var valueMax = this.parse( name, mapData[5]); // parse to validate
- if( !valueMax || valueMax.mapped ){ return false; } // can't be invalid or mapped
-
- // check if valueMin and valueMax are the same
- if( valueMin.value === valueMax.value ){
- return false; // can't make much of a mapper without a range
-
- } else if( type.color ){
- var c1 = valueMin.value;
- var c2 = valueMax.value;
-
- var same = c1[0] === c2[0] // red
- && c1[1] === c2[1] // green
- && c1[2] === c2[2] // blue
- && ( // optional alpha
- c1[3] === c2[3] // same alpha outright
- || (
- (c1[3] == null || c1[3] === 1) // full opacity for colour 1?
- &&
- (c2[3] == null || c2[3] === 1) // full opacity for colour 2?
- )
- )
- ;
-
- if( same ){ return false; } // can't make a mapper without a range
- }
-
- return {
- name: name,
- value: mapData,
- strValue: value,
- mapped: $$.style.types.mapData,
- field: mapData[1],
- fieldMin: parseFloat( mapData[2] ), // min & max are numeric
- fieldMax: parseFloat( mapData[3] ),
- valueMin: valueMin.value,
- valueMax: valueMax.value,
- bypass: propIsBypass
- };
- }
-
- // TODO check if value is inherited (i.e. "inherit")
-
- // check the type and return the appropriate object
- if( type.number ){
- var units;
- if( !type.unitless ){
- if( valueIsString ){
- var match = value.match( "^(" + $$.util.regex.number + ")(px|em" + (type.allowPercent ? "|\\%" : "") + ")?" + "$" );
-
- if( !type.enums ){
- if( !match ){ return null; } // no match => not a number
-
- value = match[1];
- units = match[2] || "px";
- }
- } else {
- units = "px"; // implicitly px if unspecified
- }
- }
-
- value = parseFloat( value );
-
- // check if this number type also accepts special keywords in place of numbers
- // (i.e. `left`, `auto`, etc)
- if( isNaN(value) && type.enums !== undefined ){
- value = passedValue;
-
- for( var i = 0; i < type.enums.length; i++ ){
- var en = type.enums[i];
-
- if( en === value ){
- return {
- name: name,
- value: value,
- strValue: value,
- bypass: propIsBypass
- };
- }
- }
-
- return null; // failed on enum after failing on number
- }
-
- // check if value must be an integer
- if( type.integer && !$$.is.integer(value) ){
- return null;
- }
-
- // check value is within range
- if( (type.min !== undefined && value < type.min)
- || (type.max !== undefined && value > type.max)
- ){
- return null;
- }
-
- var ret = {
- name: name,
- value: value,
- strValue: "" + value + (units ? units : ""),
- units: units,
- bypass: propIsBypass,
- pxValue: type.unitless || units === "%" ?
- undefined
- :
- ( units === "px" || !units ? (value) : (this.getEmSizeInPixels() * value) )
- };
-
- return ret;
-
- } else if( type.color ){
- var tuple = $$.util.color2tuple( value );
-
- return {
- name: name,
- value: tuple,
- strValue: value,
- bypass: propIsBypass
- };
-
- } else if( type.enums ){
- for( var i = 0; i < type.enums.length; i++ ){
- var en = type.enums[i];
-
- if( en === value ){
- return {
- name: name,
- value: value,
- strValue: value,
- bypass: propIsBypass
- };
- }
- }
-
- } else if( type.regex ){
- var regex = new RegExp( type.regex ); // make a regex from the type
- var m = regex.exec( value );
-
- if( m ){ // regex matches
- return {
- name: name,
- value: m,
- strValue: value,
- bypass: propIsBypass
- };
- } else { // regex doesn't match
- return null; // didn't match the regex so the value is bogus
- }
-
- } else if( type.string ){
- // just return
- return {
- name: name,
- value: value,
- strValue: value,
- bypass: propIsBypass
- };
-
- } else {
- return null; // not a type we can handle
- }
-
- };
-
- // gets what an em size corresponds to in pixels relative to a dom element
- $$.styfn.getEmSizeInPixels = function(){
- var cy = this._private.cy;
- var domElement = cy.container();
-
- if( window && domElement ){
- var pxAsStr = window.getComputedStyle(domElement).getPropertyValue("font-size");
- var px = parseFloat( pxAsStr );
- return px;
- } else {
- return 1; // in case we're running outside of the browser
- }
- };
-
- // gets css property from the core container
- $$.styfn.containerCss = function( propName ){
- var cy = this._private.cy;
- var domElement = cy.container();
-
- if( window && domElement ){
- return window.getComputedStyle(domElement).getPropertyValue( propName );
- }
- };
-
- $$.styfn.containerProperty = function( propName ){
- var propStr = this.containerCss( propName );
- var prop = this.parse( propName, propStr );
- return prop;
- };
-
- $$.styfn.containerPropertyAsString = function( propName ){
- var prop = this.containerProperty( propName );
-
- if( prop ){
- return prop.strValue;
- }
- };
-
- // create a new context from the specified selector string and switch to that context
- $$.styfn.selector = function( selectorStr ){
- // "core" is a special case and does not need a selector
- var selector = selectorStr === "core" ? null : new $$.Selector( selectorStr );
-
- var i = this.length++; // new context means new index
- this[i] = {
- selector: selector,
- properties: []
- };
-
- return this; // chaining
- };
-
- // add one or many css rules to the current context
- $$.styfn.css = function(){
- var args = arguments;
-
- switch( args.length ){
- case 1:
- var map = args[0];
-
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var mapVal = map[ prop.name ];
-
- if( mapVal === undefined ){
- mapVal = map[ $$.util.dash2camel(prop.name) ];
- }
-
- if( mapVal !== undefined ){
- this.cssRule( prop.name, mapVal );
- }
- }
-
- break;
-
- case 2:
- this.cssRule( args[0], args[1] );
- break;
-
- default:
- break; // do nothing if args are invalid
- }
-
- return this; // chaining
- };
-
- // add a single css rule to the current context
- $$.styfn.cssRule = function( name, value ){
- // name-value pair
- var property = this.parse( name, value );
-
- // add property to current context if valid
- if( property ){
- var i = this.length - 1;
- this[i].properties.push( property );
-
- // add to core style if necessary
- var currentSelectorIsCore = !this[i].selector;
- if( currentSelectorIsCore ){
- this._private.coreStyle[ property.name ] = property;
- }
- }
-
- return this; // chaining
- };
-
- // apply a property to the style (for internal use)
- // returns whether application was successful
- //
- // now, this function flattens the property, and here's how:
- //
- // for parsedProp:{ bypass: true, deleteBypass: true }
- // no property is generated, instead the bypass property in the
- // element's style is replaced by what's pointed to by the `bypassed`
- // field in the bypass property (i.e. restoring the property the
- // bypass was overriding)
- //
- // for parsedProp:{ mapped: truthy }
- // the generated flattenedProp:{ mapping: prop }
- //
- // for parsedProp:{ bypass: true }
- // the generated flattenedProp:{ bypassed: parsedProp }
- $$.styfn.applyParsedProperty = function( ele, parsedProp, context ){
- parsedProp = $$.util.clone( parsedProp ); // copy b/c the same parsedProp may be applied to many elements, BUT
- // the instances put in each element should be unique to avoid overwriting other the lists of other elements
-
- var prop = parsedProp;
- var style = ele._private.style;
- var fieldVal, flatProp;
- var type = $$.style.properties[ prop.name ].type;
- var propIsBypass = prop.bypass;
- var origProp = style[ prop.name ];
- var origPropIsBypass = origProp && origProp.bypass;
-
- // can't apply auto to width or height unless it's a parent node
- if( (parsedProp.name === "height" || parsedProp.name === "width") && parsedProp.value === "auto" && ele.isNode() && !ele.isParent() ){
- return false;
- }
-
- // check if we need to delete the current bypass
- if( propIsBypass && prop.deleteBypass ){ // then this property is just here to indicate we need to delete
- var currentProp = style[ prop.name ];
-
- // can only delete if the current prop is a bypass and it points to the property it was overriding
- if( !currentProp ){
- return true; // property is already not defined
- } else if( currentProp.bypass && currentProp.bypassed ){ // then replace the bypass property with the original
-
- // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary)
- style[ prop.name ] = currentProp.bypassed;
- return true;
-
- } else {
- return false; // we're unsuccessful deleting the bypass
- }
- }
-
- // put the property in the style objects
- switch( prop.mapped ){ // flatten the property if mapped
- case $$.style.types.mapData:
- fieldVal = ele._private.data[ prop.field ];
- if( !$$.is.number(fieldVal) ){ return false; } // it had better be a number
-
- var percent = (fieldVal - prop.fieldMin) / (prop.fieldMax - prop.fieldMin);
-
- if( type.color ){
- var r1 = prop.valueMin[0];
- var r2 = prop.valueMax[0];
- var g1 = prop.valueMin[1];
- var g2 = prop.valueMax[1];
- var b1 = prop.valueMin[2];
- var b2 = prop.valueMax[2];
- var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3];
- var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3];
-
- var clr = [
- Math.round( r1 + (r2 - r1)*percent ),
- Math.round( g1 + (g2 - g1)*percent ),
- Math.round( b1 + (b2 - b1)*percent ),
- Math.round( a1 + (a2 - a1)*percent )
- ];
-
- flatProp = { // colours are simple, so just create the flat property instead of expensive string parsing
- bypass: prop.bypass, // we're a bypass if the mapping property is a bypass
- name: prop.name,
- value: clr,
- strValue: [ "rgba(", clr[0], ", ", clr[1], ", ", clr[2], ", ", clr[3] , ")" ].join("") // fake it til you make it
- };
-
- } else if( type.number ){
- var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent;
- flatProp = this.parse( prop.name, calcValue, prop.bypass );
-
- } else {
- return false; // can only map to colours and numbers
- }
-
- if( !flatProp ){ // if we can't flatten the property, then use the origProp so we still keep the mapping itself
- flatProp = this.parse( prop.name, origProp.strValue, prop.bypass);
- }
-
- flatProp.mapping = prop; // keep a reference to the mapping
- prop = flatProp; // the flattened (mapped) property is the one we want
-
- break;
-
- case $$.style.types.data: // direct mapping
- fieldVal = eval('ele._private.data.' + prop.field );
-
- flatProp = this.parse( prop.name, fieldVal, prop.bypass );
- if( !flatProp ){ // if we can't flatten the property, then use the origProp so we still keep the mapping itself
- flatProp = this.parse( prop.name, origProp.strValue, prop.bypass);
- }
-
- flatProp.mapping = prop; // keep a reference to the mapping
- prop = flatProp; // the flattened (mapped) property is the one we want
- break;
-
- case undefined:
- break; // just set the property
-
- default:
- return false; // danger, will robinson
- }
-
- // if the property is a bypass property, then link the resultant property to the original one
- if( propIsBypass ){
- if( origPropIsBypass ){ // then this bypass overrides the existing one
- prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass
- } else { // then link the orig prop to the new bypass
- prop.bypassed = origProp;
- }
-
- style[ prop.name ] = prop; // and set
-
- } else { // prop is not bypass
- var prevProp;
-
- if( origPropIsBypass ){ // then keep the orig prop (since it's a bypass) and link to the new prop
- prevProp = origProp.bypassed;
-
- origProp.bypassed = prop;
- } else { // then just replace the old prop with the new one
- prevProp = style[ prop.name ];
-
- style[ prop.name ] = prop;
- }
-
- if( prevProp && prevProp.mapping && prop.mapping && prevProp.context === context ){
- prevProp = prevProp.prev;
- }
-
- if( prevProp && prevProp !== prop ){
- prop.prev = prevProp;
- }
- }
-
- prop.context = context;
-
- return true;
- };
-
- $$.styfn.rollBackContext = function( ele, context ){
- for( var j = 0; j < context.properties.length; j++ ){ // for each prop
- var prop = context.properties[j];
- var eleProp = ele._private.style[ prop.name ];
-
- // because bypasses do not store prevs, look at the bypassed property
- if( eleProp.bypassed ){
- eleProp = eleProp.bypassed;
- }
-
- var first = true;
- var lastEleProp;
- var l = 0;
- while( eleProp.prev ){
- var prev = eleProp.prev;
-
- if( eleProp.context === context ){
-
- if( first ){
- ele._private.style[ prop.name ] = prev;
- } else if( lastEleProp ){
- lastEleProp.prev = prev;
- }
-
- }
-
- lastEleProp = eleProp;
- eleProp = prev;
- first = false;
- l++;
-
- // in case we have a problematic prev list
- // if( l >= 100 ){
- // debugger;
- // }
- }
- }
- };
-
-
- // (potentially expensive calculation)
- // apply the style to the element based on
- // - its bypass
- // - what selectors match it
- $$.styfn.apply = function( eles ){
- var self = this;
-
- for( var ie = 0; ie < eles.length; ie++ ){
- var ele = eles[ie];
-
- if( self._private.newStyle ){
- ele._private.styleCxts = [];
- ele._private.style = {};
- }
-
- // apply the styles
- for( var i = 0; i < this.length; i++ ){
- var context = this[i];
- var contextSelectorMatches = context.selector && context.selector.filter( ele ).length > 0; // NB: context.selector may be null for "core"
- var props = context.properties;
-
- if( contextSelectorMatches ){ // then apply its properties
-
- // apply the properties in the context
-
- for( var j = 0; j < props.length; j++ ){ // for each prop
- var prop = props[j];
-
- //if(prop.mapped) debugger;
-
- if( !ele._private.styleCxts[i] || prop.mapped ){
- this.applyParsedProperty( ele, prop, context );
- }
- }
-
- // keep a note that this context matches
- ele._private.styleCxts[i] = context;
- } else {
-
- // roll back style cxts that don't match now
- if( ele._private.styleCxts[i] ){
- this.rollBackContext( ele, context );
- }
-
- delete ele._private.styleCxts[i];
- }
- } // for context
-
- } // for elements
-
- self._private.newStyle = false;
- };
-
- // updates the visual style for all elements (useful for manual style modification after init)
- $$.styfn.update = function(){
- var cy = this._private.cy;
- var eles = cy.elements();
-
- eles.updateStyle();
- };
-
- // gets the rendered style for an element
- $$.styfn.getRenderedStyle = function( ele ){
- var ele = ele[0]; // insure it's an element
-
- if( ele ){
- var rstyle = {};
- var style = ele._private.style;
- var cy = this._private.cy;
- var zoom = cy.zoom();
-
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var styleProp = style[ prop.name ];
-
- if( styleProp ){
- var val = styleProp.unitless ? styleProp.strValue : (styleProp.pxValue * zoom) + "px";
- rstyle[ prop.name ] = val;
- rstyle[ $$.util.dash2camel(prop.name) ] = val;
- }
- }
-
- return rstyle;
- }
- };
-
- // gets the raw style for an element
- $$.styfn.getRawStyle = function( ele ){
- var ele = ele[0]; // insure it's an element
-
- if( ele ){
- var rstyle = {};
- var style = ele._private.style;
-
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var styleProp = style[ prop.name ];
-
- if( styleProp ){
- rstyle[ prop.name ] = styleProp.strValue;
- rstyle[ $$.util.dash2camel(prop.name) ] = styleProp.strValue;
- }
- }
-
- return rstyle;
- }
- };
-
- // gets the value style for an element (useful for things like animations)
- $$.styfn.getValueStyle = function( ele ){
- var rstyle, style;
-
- if( $$.is.element(ele) ){
- rstyle = {};
- style = ele._private.style;
- } else {
- rstyle = {};
- style = ele; // just passed the style itself
- }
-
- if( style ){
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var styleProp = style[ prop.name ] || style[ $$.util.dash2camel(prop.name) ];
-
- if( styleProp !== undefined && !$$.is.plainObject( styleProp ) ){ // then make a prop of it
- styleProp = this.parse(prop.name, styleProp);
- }
-
- if( styleProp ){
- var val = styleProp.value === undefined ? styleProp : styleProp.value;
-
- rstyle[ prop.name ] = val;
- rstyle[ $$.util.dash2camel(prop.name) ] = val;
- }
- }
- }
-
- return rstyle;
- };
-
- // just update the functional properties (i.e. mappings) in the elements'
- // styles (less expensive than recalculation)
- $$.styfn.updateFunctionalProperties = function( eles ){
- for( var i = 0; i < eles.length; i++ ){ // for each ele
- var ele = eles[i];
- var style = ele._private.style;
-
- for( var j = 0; j < $$.style.properties.length; j++ ){ // for each prop
- var prop = $$.style.properties[j];
- var propInStyle = style[ prop.name ];
-
- if( propInStyle && propInStyle.mapping ){
- var mapping = propInStyle.mapping;
- this.applyParsedProperty( ele, mapping ); // reapply the mapping property
- }
- }
- }
- };
-
- // bypasses are applied to an existing style on an element, and just tacked on temporarily
- // returns true iff application was successful for at least 1 specified property
- $$.styfn.applyBypass = function( eles, name, value ){
- var props = [];
-
- // put all the properties (can specify one or many) in an array after parsing them
- if( name === "*" || name === "**" ){ // apply to all property names
-
- if( value !== undefined ){
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var name = prop.name;
-
- var parsedProp = this.parse(name, value, true);
-
- if( parsedProp ){
- props.push( parsedProp );
- }
- }
- }
-
- } else if( $$.is.string(name) ){ // then parse the single property
- var parsedProp = this.parse(name, value, true);
-
- if( parsedProp ){
- props.push( parsedProp );
- }
- } else if( $$.is.plainObject(name) ){ // then parse each property
- var specifiedProps = name;
-
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var name = prop.name;
- var value = specifiedProps[ name ];
-
- if( value === undefined ){ // try camel case name too
- value = specifiedProps[ $$.util.dash2camel(name) ];
- }
-
- if( value !== undefined ){
- var parsedProp = this.parse(name, value, true);
-
- if( parsedProp ){
- props.push( parsedProp );
- }
- }
- }
- } else { // can't do anything without well defined properties
- return false;
- }
-
- // we've failed if there are no valid properties
- if( props.length === 0 ){ return false; }
-
- // now, apply the bypass properties on the elements
- var ret = false; // return true if at least one succesful bypass applied
- for( var i = 0; i < eles.length; i++ ){ // for each ele
- var ele = eles[i];
-
- for( var j = 0; j < props.length; j++ ){ // for each prop
- var prop = props[j];
-
- ret = this.applyParsedProperty( ele, prop ) || ret;
- }
- }
-
- return ret;
- };
-
- $$.styfn.removeAllBypasses = function( eles ){
- for( var i = 0; i < $$.style.properties.length; i++ ){
- var prop = $$.style.properties[i];
- var name = prop.name;
- var value = ""; // empty => remove bypass
-
- var parsedProp = this.parse(name, value, true);
-
- for( var j = 0; j < eles.length; j++ ){
- var ele = eles[j];
- this.applyParsedProperty(ele, parsedProp);
- }
- }
- };
-
-
-})( cytoscape, typeof window === 'undefined' ? null : window );
-
-;(function($$){
-
- var defaults = {
- showOverlay: true,
- hideEdgesOnViewport: false
- };
-
- var origDefaults = $$.util.copy( defaults );
-
- $$.defaults = function( opts ){
- defaults = $$.util.extend({}, origDefaults, opts);
- };
-
- $$.fn.core = function( fnMap, options ){
- for( var name in fnMap ){
- var fn = fnMap[name];
- $$.Core.prototype[ name ] = fn;
- }
- };
-
- $$.Core = function( opts ){
- if( !(this instanceof $$.Core) ){
- return new $$.Core(opts);
- }
- var cy = this;
-
- opts = $$.util.extend({}, defaults, opts);
-
- var container = opts.container;
- var reg = $$.getRegistrationForInstance(cy, container);
- if( reg && reg.cy ){
- reg.domElement.innerHTML = '';
- reg.cy.notify({ type: 'destroy' }); // destroy the renderer
-
- $$.removeRegistrationForInstance(reg.cy, reg.domElement);
- }
-
- reg = $$.registerInstance( cy, container );
- var readies = reg.readies;
-
- var options = opts;
- options.layout = $$.util.extend( { name: typeof window === 'undefined' ? "null" : "grid" }, options.layout );
- options.renderer = $$.util.extend( { name: typeof window === 'undefined' ? "null" : "canvas" }, options.renderer );
-
- // TODO determine whether we need a check like this even though we allow running headless now
- //
- // if( !$$.is.domElement(options.container) ){
- // $$.util.error("Cytoscape.js must be called on an element");
- // return;
- // }
-
- this._private = {
- ready: false, // whether ready has been triggered
- instanceId: reg.id, // the registered instance id
- options: options, // cached options
- elements: [], // array of elements
- id2index: {}, // element id => index in elements array
- listeners: [], // list of listeners
- aniEles: [], // array of elements being animated
- scratch: {}, // scratch object for core
- layout: null,
- renderer: null,
- notificationsEnabled: true, // whether notifications are sent to the renderer
- minZoom: 1e-50,
- maxZoom: 1e50,
- zoomEnabled: options.zoomEnabled === undefined ? true : options.zoomEnabled,
- panEnabled: options.panEnabled === undefined ? true : options.panEnabled,
- boxSelectionEnabled: options.boxSelectionEnabled === undefined ? true : options.boxSelectionEnabled,
- zoom: $$.is.number(options.zoom) ? options.zoom : 1,
- pan: {
- x: $$.is.plainObject(options.pan) && $$.is.number(options.pan.x) ? options.pan.x : 0,
- y: $$.is.plainObject(options.pan) && $$.is.number(options.pan.y) ? options.pan.y : 0,
- },
- hasCompoundNodes: false
- };
-
- // init zoom bounds
- if( $$.is.number(options.minZoom) && $$.is.number(options.maxZoom) && options.minZoom < options.maxZoom ){
- this._private.minZoom = options.minZoom;
- this._private.maxZoom = options.maxZoom;
- } else if( $$.is.number(options.minZoom) && options.maxZoom === undefined ){
- this._private.minZoom = options.minZoom;
- } else if( $$.is.number(options.maxZoom) && options.minZoom === undefined ){
- this._private.maxZoom = options.maxZoom;
- }
-
- // init style
- this._private.style = $$.is.stylesheet(options.style) ? options.style.generateStyle(this) : ( $$.is.array(options.style) ? $$.style.fromJson(this, options.style) : new $$.Style( cy ) );
-
- cy.initRenderer( $$.util.extend({
- showOverlay: options.showOverlay,
- hideEdgesOnViewport: options.hideEdgesOnViewport
- }, options.renderer) );
-
- // initial load
- cy.load(options.elements, function(){ // onready
- cy.startAnimationLoop();
- cy._private.ready = true;
-
- // if a ready callback is specified as an option, the bind it
- if( $$.is.fn( options.ready ) ){
- cy.bind("ready", options.ready);
- }
-
- // bind all the ready handlers registered before creating this instance
- for( var i = 0; i < readies.length; i++ ){
- var fn = readies[i];
- cy.bind("ready", fn);
- }
- reg.readies = []; // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc
-
- cy.trigger("ready");
- }, options.done);
- };
-
- $$.corefn = $$.Core.prototype; // short alias
-
-
- $$.fn.core({
- ready: function(){
- return this._private.ready;
- },
-
- registered: function(){
- if( this._private && this._private.instanceId != null ){
- return true;
- } else {
- return false;
- }
- },
-
- registeredId: function(){
- return this._private.instanceId;
- },
-
- getElementById: function( id ){
- var index = this._private.id2index[ id ];
- if( index !== undefined ){
- return this._private.elements[ index ];
- }
-
- // worst case, return an empty collection
- return new $$.Collection( this );
- },
-
- hasCompoundNodes: function(){
- return this._private.hasCompoundNodes;
- },
-
- addToPool: function( eles ){
- var elements = this._private.elements;
- var id2index = this._private.id2index;
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
-
- var id = ele._private.data.id;
- var index = id2index[ id ];
- var alreadyInPool = index !== undefined;
-
- if( !alreadyInPool ){
- index = elements.length;
- elements.push( ele )
- id2index[ id ] = index;
- ele._private.index = index;
- }
- }
-
- return this; // chaining
- },
-
- removeFromPool: function( eles ){
- var elements = this._private.elements;
- var id2index = this._private.id2index;
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
-
- var id = ele._private.data.id;
- var index = id2index[ id ];
- var inPool = index !== undefined;
-
- if( inPool ){
- delete this._private.id2index[ id ];
- elements.splice(index, 1);
-
- // adjust the index of all elements past this index
- for( var j = index; j < elements.length; j++ ){
- var jid = elements[j]._private.data.id;
- id2index[ jid ]--;
- }
- }
- }
- },
-
- container: function(){
- return this._private.options.container;
- },
-
- options: function(){
- return $$.util.copy( this._private.options );
- },
-
- json: function(params){
- var json = {};
- var cy = this;
-
- json.elements = {};
- cy.elements().each(function(i, ele){
- var group = ele.group();
-
- if( !json.elements[group] ){
- json.elements[group] = [];
- }
-
- json.elements[group].push( ele.json() );
- });
-
- json.style = cy.style();
- json.scratch = cy.scratch();
- json.zoomEnabled = cy._private.zoomEnabled;
- json.panEnabled = cy._private.panEnabled;
- json.layout = cy._private.options.layout;
- json.renderer = cy._private.options.renderer;
-
- return json;
- }
-
- });
-
-})( cytoscape );
-
-(function($$, window){
-
- $$.fn.core({
- add: function(opts){
-
- var elements;
- var cy = this;
-
- // add the elements
- if( $$.is.elementOrCollection(opts) ){
- var eles = opts;
- var jsons = [];
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- jsons.push( ele.json() );
- }
-
- elements = new $$.Collection( cy, jsons );
- }
-
- // specify an array of options
- else if( $$.is.array(opts) ){
- var jsons = opts;
-
- elements = new $$.Collection(cy, jsons);
- }
-
- // specify via opts.nodes and opts.edges
- else if( $$.is.plainObject(opts) && ($$.is.array(opts.nodes) || $$.is.array(opts.edges)) ){
- var elesByGroup = opts;
- var jsons = [];
-
- var grs = ["nodes", "edges"];
- for( var i = 0, il = grs.length; i < il; i++ ){
- var group = grs[i];
- var elesArray = elesByGroup[group];
-
- if( $$.is.array(elesArray) ){
-
- for( var j = 0, jl = elesArray.length; j < jl; j++ ){
- var json = elesArray[j];
-
- var mjson = $$.util.extend({}, json, { group: group });
- jsons.push( mjson );
- }
- }
- }
-
- elements = new $$.Collection(cy, jsons);
- }
-
- // specify options for one element
- else {
- var json = opts;
- elements = (new $$.Element( cy, json )).collection();
- }
-
- return elements.filter(function(){
- return !this.removed();
- });
- },
-
- remove: function(collection){
- if( $$.is.elementOrCollection(collection) ){
- collection = collection;
- } else if( $$.is.string(collection) ){
- var selector = collection;
- collection = this.$( selector );
- }
-
- return collection.remove();
- },
-
- load: function(elements, onload, ondone){
- var cy = this;
-
- // remove old elements
- var oldEles = cy.elements();
- if( oldEles.length > 0 ){
- oldEles.remove();
- }
-
- cy.notifications(false);
-
- var processedElements = [];
-
- if( elements != null ){
- if( $$.is.plainObject(elements) || $$.is.array(elements) ){
- cy.add( elements );
- }
- }
-
- function callback(){
- cy.one("layoutready", function(e){
- cy.notifications(true);
- cy.trigger(e); // we missed this event by turning notifications off, so pass it on
-
- cy.notify({
- type: "load",
- collection: cy.elements(),
- style: cy._private.style
- });
-
- cy.one("load", onload);
- cy.trigger("load");
- }).one("layoutstop", function(){
- cy.one("done", ondone);
- cy.trigger("done");
- });
-
- cy.layout( cy._private.options.layout );
-
- }
-
- // TODO remove timeout when chrome reports dimensions onload properly
- // TODO investigate dimensions reporting issue (also affects safari/ios)
- if( true || window && window.chrome ){
- setTimeout(function(){
- callback();
- }, 30);
- } else {
- callback();
- }
-
- return this;
- }
- });
-
-})( cytoscape, typeof window === 'undefined' ? null : window );
-
-;(function($$){
-
- $$.fn.core({
-
- addToAnimationPool: function( eles ){
- var cy = this;
- var aniEles = cy._private.aniEles;
- var aniElesHas = [];
-
- for( var i = 0; i < aniEles.length; i++ ){
- var id = aniEles[i]._private.data.id;
- aniElesHas[ id ] = true;
- }
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- var id = ele._private.data.id;
-
- if( !aniElesHas[id] ){
- aniEles.push( ele );
- }
- }
- },
-
- startAnimationLoop: function(){
- var cy = this;
- var stepDelay = 1000/60;
- var useTimeout = false;
- var useRequestAnimationFrame = true;
-
- // initialise the list
- cy._private.aniEles = [];
-
- // TODO change this when standardised
- var requestAnimationFrame = typeof window === 'undefined' ? function(){} : ( window.requestAnimationFrame || window.mozRequestAnimationFrame ||
- window.webkitRequestAnimationFrame || window.msRequestAnimationFrame );
-
- if( requestAnimationFrame == null || !useRequestAnimationFrame ){
- requestAnimationFrame = function(fn){
- window.setTimeout(function(){
- fn(+new Date);
- }, stepDelay);
- };
- }
-
- var containerDom = cy.container();
-
- function globalAnimationStep(){
- function exec(){
- requestAnimationFrame(function(now){
- handleElements(now);
- globalAnimationStep();
- }, containerDom);
- }
-
- if( useTimeout ){
- setTimeout(function(){
- exec();
- }, stepDelay);
- } else {
- exec();
- }
- }
-
- globalAnimationStep(); // first call
-
- function handleElements(now){
- now = +new Date;
-
- var eles = cy._private.aniEles;
- for( var e = 0; e < eles.length; e++ ){
- var ele = eles[e];
-
- // we might have errors if we edit animation.queue and animation.current
- // for ele (i.e. by stopping)
- // try{
-
- var current = ele._private.animation.current;
- var queue = ele._private.animation.queue;
-
- // if nothing currently animating, get something from the queue
- if( current.length === 0 ){
- var q = queue;
- var next = q.length > 0 ? q.shift() : null;
-
- if( next != null ){
- next.callTime = +new Date; // was queued, so update call time
- current.push( next );
- }
- }
-
- // step and remove if done
- var completes = [];
- for(var i = 0; i < current.length; i++){
- var ani = current[i];
- step( ele, ani, now );
-
- if( current[i].done ){
- completes.push( ani );
-
- // remove current[i]
- current.splice(i, 1);
- i--;
- }
- }
-
- // call complete callbacks
- for( var i = 0; i < completes.length; i++ ){
- var ani = completes[i];
- var complete = ani.params.complete;
-
- if( $$.is.fn(complete) ){
- complete.apply( ele, [ now ] );
- }
- }
-
- // } catch(e){
- // // do nothing
- // }
-
- } // each element
-
-
- // notify renderer
- if( eles.length > 0 ){
- cy.notify({
- type: "draw",
- collection: eles
- });
- }
-
- // remove elements from list of currently animating if its queues are empty
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- var queue = ele._private.animation.queue;
- var current = ele._private.animation.current;
- var keepEle = current.length > 0 || queue.length > 0;
-
- if( !keepEle ){ // then remove from the array
- eles.splice(i, 1);
- i--;
- }
- }
-
- } // handleElements
-
- function step( self, animation, now ){
- var style = cy._private.style;
- var properties = animation.properties;
- var params = animation.params;
- var startTime = animation.callTime;
- var percent;
-
- if( animation.duration === 0 ){
- percent = 1;
- } else {
- percent = Math.min(1, (now - startTime)/animation.duration);
- }
-
- if( percent < 0 ){
- percent = 0;
- } else if( percent > 1 ){
- percent = 1;
- }
-
- if( properties.delay == null ){ // then update the position
- var startPos = animation.startPosition;
- var endPos = properties.position;
- var pos = self._private.position;
- if( endPos ){
- if( valid( startPos.x, endPos.x ) ){
- pos.x = ease( startPos.x, endPos.x, percent );
- }
-
- if( valid( startPos.y, endPos.y ) ){
- pos.y = ease( startPos.y, endPos.y, percent );
- }
- }
-
- if( properties.css ){
- var props = $$.style.properties;
- for( var i = 0; i < props.length; i++ ){
- var name = props[i].name;
- var end = properties.css[ name ];
-
- if( end !== undefined ){
- var start = animation.startStyle[ name ];
- var easedVal = ease( start, end, percent );
-
- style.applyBypass( self, name, easedVal );
- }
- } // for props
- } // if
- }
-
- if( $$.is.fn(params.step) ){
- params.step.apply( self, [ now ] );
- }
-
- if( percent >= 1 ){
- animation.done = true;
- }
-
- return percent;
- }
-
- function valid(start, end){
- if( start == null || end == null ){
- return false;
- }
-
- if( $$.is.number(start) && $$.is.number(end) ){
- return true;
- } else if( (start) && (end) ){
- return true;
- }
-
- return false;
- }
-
- function ease(start, end, percent){
- if( percent < 0 ){
- percent = 0;
- } else if( percent > 1 ){
- percent = 1;
- }
-
- if( $$.is.number(start) && $$.is.number(end) ){
- return start + (end - start) * percent;
-
- } else if( $$.is.number(start[0]) && $$.is.number(end[0]) ){ // then assume a colour
- var c1 = start;
- var c2 = end;
-
- function ch(ch1, ch2){
- var diff = ch2 - ch1;
- var min = ch1;
- return Math.round( percent * diff + min );
- }
-
- var r = ch( c1[0], c2[0] );
- var g = ch( c1[1], c2[1] );
- var b = ch( c1[2], c2[2] );
-
- return 'rgb(' + r + ', ' + g + ', ' + b + ')';
- }
-
- return undefined;
- }
-
- }
-
- });
-
-})( cytoscape );
-
-
-
-
-
-;(function($$){
-
- $$.fn.core({
- data: $$.define.data({
- field: "data",
- bindingEvent: "data",
- allowBinding: true,
- allowSetting: true,
- settingEvent: "data",
- settingTriggersEvent: true,
- triggerFnName: "trigger",
- allowGetting: true
- }),
-
- removeData: $$.define.removeData({
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- triggerEvent: true
- }),
-
- batchData: $$.define.batchData({
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- immutableKeys: {
- "id": true,
- "source": true,
- "target": true,
- "parent": true
- },
- updateMappers: true
- }),
-
- scratch: $$.define.data({
- field: "scratch",
- allowBinding: false,
- allowSetting: true,
- settingTriggersEvent: false,
- allowGetting: true
- }),
-
- removeScratch: $$.define.removeData({
- field: "scratch",
- triggerEvent: false
- }),
- });
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
- on: $$.define.on(), // .on( events [, selector] [, data], handler)
- one: $$.define.on({ unbindSelfOnTrigger: true }),
- once: $$.define.on({ unbindAllBindersOnTrigger: true }),
- off: $$.define.off(), // .off( events [, selector] [, handler] )
- trigger: $$.define.trigger(), // .trigger( events [, extraParams] )
- });
-
- // aliases for those folks who like old stuff:
- $$.corefn.bind = $$.corefn.on;
- $$.corefn.unbind = $$.corefn.off;
-
- // add event aliases like .click()
- $$.define.event.aliasesOn( $$.corefn );
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
-
- png: function(){
- var cy = this;
- var renderer = this._private.renderer;
-
- return renderer.png();
- }
-
- });
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
-
- layout: function( params ){
- var cy = this;
-
- if( this._private.layoutRunning ){ // don't run another layout if one's already going
- return this;
- }
-
- // if no params, use the previous ones
- if( params == null ){
- params = this._private.options.layout;
- }
-
- this.initLayout( params );
-
- cy.trigger("layoutstart");
-
- this._private.layoutRunning = true;
- this.one('layoutstop', function(){
- this._private.layoutRunning = false;
- });
-
- this._private.layout.run();
-
- return this;
-
- },
-
- initLayout: function( options ){
- if( options == null ){
- $$.util.error("Layout options must be specified to run a layout");
- return;
- }
-
- if( options.name == null ){
- $$.util.error("A `name` must be specified to run a layout");
- return;
- }
-
- var name = options.name;
- var layoutProto = $$.extension("layout", name);
-
- if( layoutProto == null ){
- $$.util.error("Can not apply layout: No such layout `%s` found; did you include its JS file?", name);
- return;
- }
-
- this._private.layout = new layoutProto( $$.util.extend({}, options, {
- renderer: this._private.renderer,
- cy: this
- }) );
- this._private.options.layout = options; // save options
- }
-
- });
-
-})( cytoscape );
-
-(function($$){
-
- $$.fn.core({
- notify: function( params ){
- if( !this._private.notificationsEnabled ){ return; } // exit on disabled
-
- var renderer = this.renderer();
- var cy = this;
-
- // normalise params.collection
- if( $$.is.element(params.collection) ){ // make collection from element
- var element = params.collection;
- params.collection = new $$.Collection(cy, [ element ]);
-
- } else if( $$.is.array(params.collection) ){ // make collection from elements array
- var elements = params.collection;
- params.collection = new $$.Collection(cy, elements);
- }
-
- renderer.notify(params);
- },
-
- notifications: function( bool ){
- var p = this._private;
-
- if( bool === undefined ){
- return p.notificationsEnabled;
- } else {
- p.notificationsEnabled = bool ? true : false;
- }
- },
-
- noNotifications: function( callback ){
- this.notifications(false);
- callback();
- this.notifications(true);
- }
- });
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
-
- renderTo: function( context, zoom, pan ){
- var r = this._private.renderer;
-
- r.renderTo( context, zoom, pan );
- },
-
- renderer: function(){
- return this._private.renderer;
- },
-
- initRenderer: function( options ){
- var cy = this;
-
- var rendererProto = $$.extension("renderer", options.name);
- if( rendererProto == null ){
- $$.util.error("Can not initialise: No such renderer `%s` found; did you include its JS file?", options.name);
- return;
- }
-
- this._private.renderer = new rendererProto(
- $$.util.extend({}, options, {
- cy: cy,
- style: cy._private.style
- })
- );
-
-
- }
-
- });
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
-
- // get a collection
- // - empty collection on no args
- // - collection of elements in the graph on selector arg
- // - guarantee a returned collection when elements or collection specified
- collection: function( eles ){
-
- if( $$.is.string(eles) ){
- return this.$( eles );
- } else if( $$.is.elementOrCollection(eles) ){
- return eles.collection();
- }
-
- return new $$.Collection( this );
- },
-
- nodes: function( selector ){
- var nodes = this.$("node");
-
- if( selector ){
- return nodes.filter( selector );
- }
-
- return nodes;
- },
-
- edges: function( selector ){
- var edges = this.$("edge");
-
- if( selector ){
- return edges.filter( selector );
- }
-
- return edges;
- },
-
- // search the graph like jQuery
- $: function( selector ){
- var eles = new $$.Collection( this, this._private.elements );
-
- if( selector ){
- return eles.filter( selector );
- }
-
- return eles;
- }
-
- });
-
- // aliases
- $$.corefn.elements = $$.corefn.filter = $$.corefn.$;
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.core({
-
- style: function(val){
- return this._private.style;
- }
- });
-
-})( cytoscape );
-
-
-;(function($$){
-
- $$.fn.core({
-
- panningEnabled: function( bool ){
- if( bool !== undefined ){
- this._private.panEnabled = bool ? true : false;
- } else {
- return this._private.panEnabled;
- }
-
- return this; // chaining
- },
-
- zoomingEnabled: function( bool ){
- if( bool !== undefined ){
- this._private.zoomEnabled = bool ? true : false;
- } else {
- return this._private.zoomEnabled;
- }
-
- return this; // chaining
- },
-
- boxSelectionEnabled: function( bool ){
- if( bool !== undefined ){
- this._private.boxSelectionEnabled = bool ? true : false;
- } else {
- return this._private.boxSelectionEnabled;
- }
-
- return this; // chaining
- },
-
- pan: function(){
- var args = arguments;
- var pan = this._private.pan;
- var dim, val, dims, x, y;
-
- switch( args.length ){
- case 0: // .pan()
- return pan;
-
- case 1:
-
- if( !this._private.panEnabled ){
- return this;
-
- } else if( $$.is.string( args[0] ) ){ // .pan("x")
- dim = args[0];
- return pan[ dim ];
-
- } else if( $$.is.plainObject( args[0] ) ) { // .pan({ x: 0, y: 100 })
- dims = args[0];
- x = dims.x;
- y = dims.y;
-
- if( $$.is.number(x) ){
- pan.x = x;
- }
-
- if( $$.is.number(y) ){
- pan.y = y;
- }
-
- this.trigger("pan");
- }
- break;
-
- case 2: // .pan("x", 100)
- if( !this._private.panEnabled ){
- return this;
- }
-
- dim = args[0];
- val = args[1];
-
- if( (dim === "x" || dim === "y") && $$.is.number(val) ){
- pan[dim] = val;
- }
-
- this.trigger("pan");
- break;
-
- default:
- break; // invalid
- }
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- },
-
- panBy: function(params){
- var args = arguments;
- var pan = this._private.pan;
- var dim, val, dims, x, y;
-
- if( !this._private.panEnabled ){
- return this;
- }
-
- switch( args.length ){
- case 1:
-
- if( $$.is.plainObject( args[0] ) ) { // .panBy({ x: 0, y: 100 })
- dims = args[0];
- x = dims.x;
- y = dims.y;
-
- if( $$.is.number(x) ){
- pan.x += x;
- }
-
- if( $$.is.number(y) ){
- pan.y += y;
- }
-
- this.trigger("pan");
- }
- break;
-
- case 2: // .panBy("x", 100)
- dim = args[0];
- val = args[1];
-
- if( (dim === "x" || dim === "y") && $$.is.number(val) ){
- pan[dim] += val;
- }
-
- this.trigger("pan");
- break;
-
- default:
- break; // invalid
- }
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- },
-
- fit: function( elements, padding ){
- if( $$.is.number(elements) && padding === undefined ){ // elements is optional
- padding = elements;
- elements = undefined;
- }
-
- if( !this._private.panEnabled || !this._private.zoomEnabled ){
- return this;
- }
-
- if( $$.is.string(elements) ){
- var sel = elements;
- elements = this.$( sel );
- } else if( !$$.is.elementOrCollection(elements) ){
- elements = this.elements();
- }
-
- var bb = elements.boundingBox();
- var style = this.style();
-
- var w = parseFloat( style.containerCss("width") );
- var h = parseFloat( style.containerCss("height") );
- var zoom;
- padding = $$.is.number(padding) ? padding : 0;
-
- if( !isNaN(w) && !isNaN(h) ){
- zoom = this._private.zoom = Math.min( (w - 2*padding)/bb.w, (h - 2*padding)/bb.h );
-
- // crop zoom
- zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom;
- zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom;
-
- this._private.pan = { // now pan to middle
- x: (w - zoom*( bb.x1 + bb.x2 ))/2,
- y: (h - zoom*( bb.y1 + bb.y2 ))/2
- };
- }
-
- this.trigger("pan zoom");
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- },
-
- minZoom: function( zoom ){
- if( zoom === undefined ){
- return this._private.minZoom;
- } else if( $$.is.number(zoom) ){
- this._private.minZoom = zoom;
- }
-
- return this;
- },
-
- maxZoom: function( zoom ){
- if( zoom === undefined ){
- return this._private.maxZoom;
- } else if( $$.is.number(zoom) ){
- this._private.maxZoom = zoom;
- }
-
- return this;
- },
-
- zoom: function( params ){
- var pos;
- var zoom;
-
- if( params === undefined ){ // then get the zoom
- return this._private.zoom;
-
- } else if( $$.is.number(params) ){ // then set the zoom
- zoom = params;
- pos = {
- x: 0,
- y: 0
- };
-
- } else if( $$.is.plainObject(params) ){ // then zoom about a point
- zoom = params.level;
-
- if( params.renderedPosition ){
- var rpos = params.renderedPosition;
- var p = this._private.pan;
- var z = this._private.zoom;
-
- pos = {
- x: (rpos.x - p.x)/z,
- y: (rpos.y - p.y)/z
- };
- } else if( params.position ){
- pos = params.position;
- }
-
- if( pos && !this._private.panEnabled ){
- return this; // panning disabled
- }
- }
-
- if( !this._private.zoomEnabled ){
- return this; // zooming disabled
- }
-
- if( !$$.is.number(zoom) || !$$.is.number(pos.x) || !$$.is.number(pos.y) ){
- return this; // can't zoom with invalid params
- }
-
- // crop zoom
- zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom;
- zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom;
-
- var pan1 = this._private.pan;
- var zoom1 = this._private.zoom;
- var zoom2 = zoom;
-
- var pan2 = {
- x: -zoom2/zoom1 * (pos.x - pan1.x) + pos.x,
- y: -zoom2/zoom1 * (pos.y - pan1.y) + pos.y
- };
-
- this._private.zoom = zoom;
- this._private.pan = pan2;
-
- var posChanged = pan1.x !== pan2.x || pan1.y !== pan2.y;
- this.trigger("zoom" + (posChanged ? " pan" : "") );
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- },
-
- // get the bounding box of the elements (in raw model position)
- boundingBox: function( selector ){
- var eles = this.$( selector );
-
- return eles.boundingBox();
- },
-
- center: function(elements){
- if( !this._private.panEnabled || !this._private.zoomEnabled ){
- return this;
- }
-
- if( $$.is.string(elements) ){
- var selector = elements;
- elements = cy.elements( selector );
- } else if( !$$.is.elementOrCollection(elements) ){
- elements = cy.elements();
- }
-
- var bb = elements.boundingBox();
- var style = this.style();
- var w = parseFloat( style.containerCss("width") );
- var h = parseFloat( style.containerCss("height") );
- var zoom = this._private.zoom;
-
- this.pan({ // now pan to middle
- x: (w - zoom*( bb.x1 + bb.x2 ))/2,
- y: (h - zoom*( bb.y1 + bb.y2 ))/2
- });
-
- this.trigger("pan");
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- },
-
- reset: function(){
- if( !this._private.panEnabled || !this._private.zoomEnabled ){
- return this;
- }
-
- this.pan({ x: 0, y: 0 });
-
- if( this._private.maxZoom > 1 && this._private.minZoom < 1 ){
- this.zoom(1);
- }
-
- this.notify({ // notify the renderer that the viewport changed
- type: "viewport"
- });
-
- return this; // chaining
- }
- });
-
-})( cytoscape );
-
-;(function($$){
-
- // Use this interface to define functions for collections/elements.
- // This interface is good, because it forces you to think in terms
- // of the collections case (more than 1 element), so we don't need
- // notification blocking nonsense everywhere.
- //
- // Other collection-*.js files depend on this being defined first.
- // It's a trade off: It simplifies the code for Collection and
- // Element integration so much that it's worth it to create the
- // JS dependency.
- //
- // Having this integration guarantees that we can call any
- // collection function on an element and vice versa.
- $$.fn.collection = $$.fn.eles = function( fnMap, options ){
- for( var name in fnMap ){
- var fn = fnMap[name];
-
- $$.Collection.prototype[ name ] = fn;
- }
- };
-
- // factory for generating edge ids when no id is specified for a new element
- var idFactory = {
- prefix: {
- nodes: "n",
- edges: "e"
- },
- id: {
- nodes: 0,
- edges: 0
- },
- generate: function(cy, element, tryThisId){
- var json = $$.is.element( element ) ? element._private : element;
- var group = json.group;
- var id = tryThisId != null ? tryThisId : this.prefix[group] + this.id[group];
-
- if( cy.getElementById(id).empty() ){
- this.id[group]++; // we've used the current id, so move it up
- } else { // otherwise keep trying successive unused ids
- while( !cy.getElementById(id).empty() ){
- id = this.prefix[group] + ( ++this.id[group] );
- }
- }
-
- return id;
- }
- };
-
- // Element
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // represents a node or an edge
- $$.Element = function(cy, params, restore){
- if( !(this instanceof $$.Element) ){
- return new $$.Element(cy, params, restore);
- }
-
- var self = this;
- restore = (restore === undefined || restore ? true : false);
-
- if( cy === undefined || params === undefined || !$$.is.core(cy) ){
- $$.util.error("An element must have a core reference and parameters set");
- return;
- }
-
- // validate group
- if( params.group !== "nodes" && params.group !== "edges" ){
- $$.util.error("An element must be of type `nodes` or `edges`; you specified `" + params.group + "`");
- return;
- }
-
- // make the element array-like, just like a collection
- this.length = 1;
- this[0] = this;
-
- // NOTE: when something is added here, add also to ele.json()
- this._private = {
- cy: cy,
- single: true, // indicates this is an element
- data: params.data || {}, // data object
- position: params.position || {}, // fields x, y, etc (could be 3d or radial coords; renderer decides)
- autoWidth: undefined, // width and height of nodes calculated by the renderer when set to special "auto" value
- autoHeight: undefined,
- listeners: [], // array of bound listeners
- group: params.group, // string; "nodes" or "edges"
- style: {}, // properties as set by the style
- rstyle: {}, // properties for style sent from the renderer to the core
- styleCxts: [], // applied style contexts from the styler
- removed: true, // whether it's inside the vis; true if removed (set true here since we call restore)
- selected: params.selected ? true : false, // whether it's selected
- selectable: params.selectable === undefined ? true : ( params.selectable ? true : false ), // whether it's selectable
- locked: params.locked ? true : false, // whether the element is locked (cannot be moved)
- grabbed: false, // whether the element is grabbed by the mouse; renderer sets this privately
- grabbable: params.grabbable === undefined ? true : ( params.grabbable ? true : false ), // whether the element can be grabbed
- active: false, // whether the element is active from user interaction
- classes: {}, // map ( className => true )
- animation: { // object for currently-running animations
- current: [],
- queue: []
- },
- rscratch: {}, // object in which the renderer can store information
- scratch: {}, // scratch objects
- edges: [], // array of connected edges
- children: [] // array of children
- };
-
- // renderedPosition overrides if specified
- if( params.renderedPosition ){
- var rpos = params.renderedPosition;
- var pan = cy.pan();
- var zoom = cy.zoom();
-
- this._private.position = {
- x: (rpos.x - pan.x)/zoom,
- y: (rpos.y - pan.y)/zoom
- };
- }
-
- if( $$.is.string(params.classes) ){
- var classes = params.classes.split(/\s+/);
- for( var i = 0, l = classes.length; i < l; i++ ){
- var cls = classes[i];
- if( !cls || cls === "" ){ continue; }
-
- self._private.classes[cls] = true;
- }
- }
-
- if( restore === undefined || restore ){
- this.restore();
- }
-
- };
-
-
- // Collection
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // represents a set of nodes, edges, or both together
- $$.Collection = function(cy, elements){
- if( !(this instanceof $$.Collection) ){
- return new $$.Collection(cy, elements);
- }
-
- if( cy === undefined || !$$.is.core(cy) ){
- $$.util.error("A collection must have a reference to the core");
- return;
- }
-
- var ids = {};
- var uniqueElements = [];
- var createdElements = false;
-
- if( !elements ){
- elements = [];
- } else if( elements.length > 0 && $$.is.plainObject( elements[0] ) && !$$.is.element( elements[0] ) ){
- createdElements = true;
-
- // make elements from json and restore all at once later
- var eles = [];
- var elesIds = {};
-
- for( var i = 0, l = elements.length; i < l; i++ ){
- var json = elements[i];
-
- if( json.data == null ){
- json.data = {};
- }
-
- var data = json.data;
-
- // make sure newly created elements have valid ids
- if( data.id == null ){
- data.id = idFactory.generate( cy, json );
- } else if( cy.getElementById( data.id ).length != 0 || elesIds[ data.id ] ){
- continue; // can't create element
- }
-
- var ele = new $$.Element( cy, json, false );
- eles.push( ele );
- elesIds[ data.id ] = true;
- }
-
- elements = eles;
- }
-
- for( var i = 0, l = elements.length; i < l; i++ ){
- var element = elements[i];
- if( !element ){ continue; }
-
- var id = element._private.data.id;
-
- if( !ids[ id ] ){
- ids[ id ] = element;
- uniqueElements.push( element );
- }
- }
-
- for(var i = 0, l = uniqueElements.length; i < l; i++){
- this[i] = uniqueElements[i];
- }
- this.length = uniqueElements.length;
-
- this._private = {
- cy: cy,
- ids: ids
- };
-
- // restore the elements if we created them from json
- if( createdElements ){
- this.restore();
- }
- };
-
-
- // Functions
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // keep the prototypes in sync (an element has the same functions as a collection)
- // and use $$.elefn and $$.elesfn as shorthands to the prototypes
- $$.elefn = $$.elesfn = $$.Element.prototype = $$.Collection.prototype;
-
- $$.elesfn.cy = function(){
- return this._private.cy;
- };
-
- $$.elesfn.element = function(){
- return this[0];
- };
-
- $$.elesfn.collection = function(){
- if( $$.is.collection(this) ){
- return this;
- } else { // an element
- return new $$.Collection( this._private.cy, [this] );
- }
- };
-
- $$.elesfn.json = function(){
- var ele = this.element();
- if( ele == null ){ return undefined }
-
- var p = ele._private;
-
- var json = $$.util.copy({
- data: p.data,
- position: p.position,
- group: p.group,
- bypass: p.bypass,
- removed: p.removed,
- selected: p.selected,
- selectable: p.selectable,
- locked: p.locked,
- grabbed: p.grabbed,
- grabbable: p.grabbable,
- classes: ""
- });
-
- var classes = [];
- for( var cls in p.classes ){
- classes.push(cls);
- }
-
- for( var i = 0; i < classes.length; i++ ){
- var cls = classes[i];
- json.classes += cls + ( i < classes.length - 1 ? " " : "" );
- }
-
- return json;
- };
-
- $$.elesfn.restore = function( notifyRenderer ){
- var self = this;
- var restored = [];
- var cy = self.cy();
-
- if( notifyRenderer === undefined ){
- notifyRenderer = true;
- }
-
- // create arrays of nodes and edges, since we need to
- // restore the nodes first
- var elements = [];
- var nodes = [], edges = [];
- var numNodes = 0;
- var numEdges = 0;
- for( var i = 0, l = self.length; i < l; i++ ){
- var ele = self[i];
-
- // keep nodes first in the array and edges after
- if( ele.isNode() ){ // put to front of array if node
- nodes.push( ele );
- numNodes++;
- } else { // put to end of array if edge
- edges.push( ele );
- numEdges++;
- }
- }
-
- elements = nodes.concat( edges );
-
- // now, restore each element
- for( var i = 0, l = elements.length; i < l; i++ ){
- var ele = elements[i];
-
- if( !ele.removed() ){
- // don't need to do anything
- continue;
- }
-
- var _private = ele._private;
- var data = _private.data;
-
- // set id and validate
- if( data.id === undefined ){
- data.id = idFactory.generate( cy, ele );
- } else if( $$.is.emptyString(data.id) || !$$.is.string(data.id) ){
- // can't create element if it has empty string as id or non-string id
- continue;
- } else if( cy.getElementById( data.id ).length != 0 ){
- // can't create element if one already has that id
- continue;
- }
-
- var id = data.id; // id is finalised, now let's keep a ref
-
- if( ele.isEdge() ){ // extra checks for edges
-
- var edge = ele;
- var fields = ["source", "target"];
- var fieldsLength = fields.length;
- for(var j = 0; j < fieldsLength; j++){
-
- var field = fields[j];
- var val = data[field];
-
- if( val == null || val === "" ){
- // can't create if source or target is not defined properly
- continue;
- } else if( cy.getElementById(val).empty() ){
- // can't create edge if one of its nodes doesn't exist
- continue;
- }
- }
-
- var src = cy.getElementById( data.source );
- var tgt = cy.getElementById( data.target );
-
- src._private.edges.push( edge );
- tgt._private.edges.push( edge );
-
- } // if is edge
-
- // create mock ids map for element so it can be used like collections
- _private.ids = {};
- _private.ids[ data.id ] = ele;
-
- _private.removed = false;
- cy.addToPool( ele );
-
- restored.push( ele );
- } // for each element
-
- // do compound node sanity checks
- for( var i = 0; i < numNodes; i++ ){ // each node
- var node = elements[i];
- var data = node._private.data;
- var id = data.id;
-
- var parentId = node._private.data.parent;
- var specifiedParent = parentId != null;
-
- if( specifiedParent ){
- var parent = cy.getElementById( parentId );
-
- if( parent.empty() ){
- // non-existant parent; just remove it
- delete data.parent;
- } else {
- var selfAsParent = false;
- var ancestor = parent;
- while( !ancestor.empty() ){
- if( node.same(ancestor) ){
- // mark self as parent and remove from data
- selfAsParent = true;
- delete data.parent; // remove parent reference
-
- // exit or we loop forever
- break;
- }
-
- ancestor = ancestor.parent();
- }
-
- if( !selfAsParent ){
- // connect with children
- parent[0]._private.children.push( node );
-
- // let the core know we have a compound graph
- cy._private.hasCompoundNodes = true;
- }
- } // else
- } // if specified parent
- } // for each node
-
- restored = new $$.Collection( cy, restored );
- if( restored.length > 0 ){
-
- var toUpdateStyle = restored.add( restored.connectedNodes() ).add( restored.parent() );
- toUpdateStyle.updateStyle( notifyRenderer );
-
- if( notifyRenderer ){
- restored.rtrigger("add");
- } else {
- restored.trigger("add");
- }
- }
-
- return self; // chainability
- };
-
- $$.elesfn.removed = function(){
- var ele = this[0];
- return ele && ele._private.removed;
- };
-
- $$.elesfn.inside = function(){
- var ele = this[0];
- return ele && !ele._private.removed;
- };
-
- $$.elesfn.remove = function( notifyRenderer ){
- var self = this;
- var removed = [];
- var elesToRemove = [];
- var elesToRemoveIds = {};
- var cy = self._private.cy;
-
- if( notifyRenderer === undefined ){
- notifyRenderer = true;
- }
-
- // add connected edges
- function addConnectedEdges(node){
- var edges = node._private.edges;
- for( var i = 0; i < edges.length; i++ ){
- add( edges[i] );
- }
- }
-
-
- // add descendant nodes
- function addChildren(node){
- var children = node._private.children;
-
- for( var i = 0; i < children.length; i++ ){
- add( children[i] );
- }
- }
-
- function add( ele ){
- var alreadyAdded = elesToRemoveIds[ ele.id() ];
- if( alreadyAdded ){
- return;
- } else {
- elesToRemoveIds[ ele.id() ] = true;
- }
-
- if( ele.isNode() ){
- elesToRemove.push( ele ); // nodes are removed last
-
- addConnectedEdges( ele );
- addChildren( ele );
- } else {
- elesToRemove.unshift( ele ); // edges are removed first
- }
- }
-
- // make the list of elements to remove
- // (may be removing more than specified due to connected edges etc)
-
- for( var i = 0, l = self.length; i < l; i++ ){
- var ele = self[i];
-
- add( ele );
- }
-
- function removeEdgeRef(node, edge){
- var connectedEdges = node._private.edges;
- for( var j = 0; j < connectedEdges.length; j++ ){
- var connectedEdge = connectedEdges[j];
-
- if( edge === connectedEdge ){
- connectedEdges.splice( j, 1 );
- break;
- }
- }
- }
-
- function removeChildRef(parent, ele){
- ele = ele[0];
- parent = parent[0];
- var children = parent._private.children;
-
- for( var j = 0; j < children.length; j++ ){
- if( children[j][0] === ele[0] ){
- children.splice(j, 1);
- break;
- }
- }
- }
-
- for( var i = 0; i < elesToRemove.length; i++ ){
- var ele = elesToRemove[i];
-
- // mark as removed
- ele._private.removed = true;
-
- // remove from core pool
- cy.removeFromPool( ele );
-
- // add to list of removed elements
- removed.push( ele );
-
- if( ele.isEdge() ){ // remove references to this edge in its connected nodes
- var src = ele.source()[0];
- var tgt = ele.target()[0];
-
- removeEdgeRef( src, ele );
- removeEdgeRef( tgt, ele );
-
- } else { // remove reference to parent
- var parent = ele.parent();
-
- if( parent.length !== 0 ){
- removeChildRef(parent, ele);
- }
- }
- }
-
- // check to see if we have a compound graph or not
- var elesStillInside = cy._private.elements;
- cy._private.hasCompoundNodes = false;
- for( var i = 0; i < elesStillInside.length; i++ ){
- var ele = elesStillInside[i];
-
- if( ele.isParent() ){
- cy._private.hasCompoundNodes = true;
- break;
- }
- }
-
- var removedElements = new $$.Collection( this.cy(), removed );
- if( removedElements.size() > 0 ){
- // must manually notify since trigger won't do this automatically once removed
-
- if( notifyRenderer ){
- this.cy().notify({
- type: "remove",
- collection: removedElements
- });
- }
-
- removedElements.trigger("remove");
- }
-
- // check for empty remaining parent nodes
- var checkedParentId = {};
- for( var i = 0; i < elesToRemove.length; i++ ){
- var ele = elesToRemove[i];
- var isNode = ele._private.group === "nodes";
- var parentId = ele._private.data.parent;
-
- if( isNode && parentId !== undefined && !checkedParentId[ parentId ] ){
- checkedParentId[ parentId ] = true;
- var parent = cy.getElementById( parentId );
-
- if( parent && parent.length !== 0 && !parent._private.removed && parent.children().length === 0 ){
- parent.updateStyle();
- }
- }
- }
-
- return this;
- };
-
-})( cytoscape );
-
-
-;(function( $$ ){
-
- $$.fn.eles({
- animated: function(){
- var ele = this[0];
-
- if( ele ){
- return ele._private.animation.current.length > 0;
- }
- },
-
- clearQueue: function(){
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
- ele._private.animation.queue = [];
- }
-
- return this;
- },
-
- delay: function( time, complete ){
- this.animate({
- delay: time
- }, {
- duration: time,
- complete: complete
- });
-
- return this;
- },
-
- animate: function( properties, params ){
- var callTime = +new Date;
- var cy = this._private.cy;
- var style = cy.style();
- var q;
-
- if( params === undefined ){
- params = {};
- }
-
- if( params.duration === undefined ){
- params.duration = 400;
- }
-
- switch( params.duration ){
- case "slow":
- params.duration = 600;
- break;
- case "fast":
- params.duration = 200;
- break;
- }
-
- if( properties == null || (properties.position == null && properties.css == null && properties.delay == null) ){
- return this; // nothing to animate
- }
-
- if( properties.css ){
- properties.css = style.getValueStyle( properties.css );
- }
-
- for( var i = 0; i < this.length; i++ ){
- var self = this[i];
-
- var pos = self._private.position;
- var startPosition = {
- x: pos.x,
- y: pos.y
- };
- var startStyle = style.getValueStyle( self );
-
- if( self.animated() && (params.queue === undefined || params.queue) ){
- q = self._private.animation.queue;
- } else {
- q = self._private.animation.current;
- }
-
- q.push({
- properties: properties,
- duration: params.duration,
- params: params,
- callTime: callTime,
- startPosition: startPosition,
- startStyle: startStyle
- });
- }
-
- cy.addToAnimationPool( this );
-
- return this; // chaining
- }, // animate
-
- stop: function(clearQueue, jumpToEnd){
- for( var i = 0; i < this.length; i++ ){
- var self = this[i];
- var anis = self._private.animation.current;
-
- for( var j = 0; j < anis.length; j++ ){
- var animation = anis[j];
- if( jumpToEnd ){
- // next iteration of the animation loop, the animation
- // will go straight to the end and be removed
- animation.duration = 0;
- }
- }
-
- // clear the queue of future animations
- if( clearQueue ){
- self._private.animation.queue = [];
- }
- }
-
- // we have to notify (the animation loop doesn't do it for us on `stop`)
- this.cy().notify({
- collection: this,
- type: "draw"
- });
-
- return this;
- }
- });
-
-})( cytoscape );
-
-;(function( $$ ){
-
- $$.fn.eles({
- addClass: function(classes){
- classes = classes.split(/\s+/);
- var self = this;
- var changed = [];
-
- for( var i = 0; i < classes.length; i++ ){
- var cls = classes[i];
- if( $$.is.emptyString(cls) ){ continue; }
-
- for( var j = 0; j < self.length; j++ ){
- var ele = self[j];
- var hasClass = ele._private.classes[cls];
- ele._private.classes[cls] = true;
-
- if( !hasClass ){ // if didn't already have, add to list of changed
- changed.push( ele );
- }
- }
- }
-
- // trigger update style on those eles that had class changes
- if( changed.length > 0 ){
- new $$.Collection(this._private.cy, changed).updateStyle();
- }
-
- self.trigger("class");
- return self;
- },
-
- hasClass: function(className){
- var ele = this[0];
- return ele != null && ele._private.classes[className];
- },
-
- toggleClass: function(classesStr, toggle){
- var classes = classesStr.split(/\s+/);
- var self = this;
- var changed = []; // eles who had classes changed
-
- for( var i = 0, il = self.length; i < il; i++ ){
- var ele = self[i];
-
- for( var j = 0; j < classes.length; j++ ){
- var cls = classes[j];
-
- if( $$.is.emptyString(cls) ){ continue; }
-
- var hasClass = ele._private.classes[cls];
- var shouldAdd = toggle || (toggle === undefined && !hasClass);
-
- if( shouldAdd ){
- ele._private.classes[cls] = true;
-
- if( !hasClass ){ changed.push(ele); }
- } else { // then remove
- ele._private.classes[cls] = false;
-
- if( hasClass ){ changed.push(ele); }
- }
-
- } // for j classes
- } // for i eles
-
- // trigger update style on those eles that had class changes
- if( changed.length > 0 ){
- new $$.Collection(this._private.cy, changed).updateStyle();
- }
-
- self.trigger("class");
- return self;
- },
-
- removeClass: function(classes){
- classes = classes.split(/\s+/);
- var self = this;
- var changed = [];
-
- for( var i = 0; i < self.length; i++ ){
- var ele = self[i];
-
- for( var j = 0; j < classes.length; j++ ){
- var cls = classes[j];
- if( !cls || cls === "" ){ continue; }
-
- var hasClass = ele._private.classes[cls];
- delete ele._private.classes[cls];
-
- if( hasClass ){ // then we changed its set of classes
- changed.push( ele );
- }
- }
- }
-
- // trigger update style on those eles that had class changes
- if( changed.length > 0 ){
- new $$.Collection(self._private.cy, changed).updateStyle();
- }
-
- self.trigger("class");
- return self;
- }
- });
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.eles({
- allAre: function(selector){
- return this.filter(selector).length === this.length;
- },
-
- is: function(selector){
- return this.filter(selector).length > 0;
- },
-
- same: function( collection ){
- collection = this.cy().collection( collection );
-
- // cheap extra check
- if( this.length !== collection.length ){
- return false;
- }
-
- return this.intersect( collection ).length === this.length;
- },
-
- anySame: function(collection){
- collection = this.cy().collection( collection );
-
- return this.intersect( collection ).length > 0;
- },
-
- allAreNeighbors: function(collection){
- collection = this.cy().collection( collection );
-
- return this.neighborhood().intersect( collection ).length === collection.length;
- }
- });
-
-})( cytoscape );
-
-;(function($$){
-
- var borderWidthMultiplier = 1.4;
- var borderWidthAdjustment = 1;
-
- $$.fn.eles({
-
- // fully updates (recalculates) the style for the elements
- updateStyle: function( notifyRenderer ){
- var cy = this._private.cy;
- var style = cy.style();
- notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false;
-
- style.apply( this );
-
- if( notifyRenderer ){
- this.rtrigger("style"); // let renderer know we changed style
- } else {
- this.trigger("style"); // just fire the event
- }
- return this; // chaining
- },
-
- // just update the mappers in the elements' styles; cheaper than eles.updateStyle()
- updateMappers: function( notifyRenderer ){
- var cy = this._private.cy;
- var style = cy.style();
- notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false;
-
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
- style.apply( ele );
- }
-
- if( notifyRenderer ){
- this.rtrigger("style"); // let renderer know we changed style
- } else {
- this.trigger("style"); // just fire the event
- }
- return this; // chaining
- },
-
- data: $$.define.data({
- field: "data",
- bindingEvent: "data",
- allowBinding: true,
- allowSetting: true,
- settingEvent: "data",
- settingTriggersEvent: true,
- triggerFnName: "trigger",
- allowGetting: true,
- immutableKeys: {
- "id": true,
- "source": true,
- "target": true,
- "parent": true
- },
- updateMappers: true
- }),
-
- removeData: $$.define.removeData({
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- triggerEvent: true,
- immutableKeys: {
- "id": true,
- "source": true,
- "target": true,
- "parent": true
- },
- updateMappers: true
- }),
-
- batchData: $$.define.batchData({
- field: "data",
- event: "data",
- triggerFnName: "trigger",
- immutableKeys: {
- "id": true,
- "source": true,
- "target": true,
- "parent": true
- },
- updateMappers: true
- }),
-
- scratch: $$.define.data({
- field: "scratch",
- allowBinding: false,
- allowSetting: true,
- settingTriggersEvent: false,
- allowGetting: true
- }),
-
- removeScratch: $$.define.removeData({
- field: "scratch",
- triggerEvent: false
- }),
-
- rscratch: $$.define.data({
- field: "rscratch",
- allowBinding: false,
- allowSetting: true,
- settingTriggersEvent: false,
- allowGetting: true
- }),
-
- removeRscratch: $$.define.removeData({
- field: "rscratch",
- triggerEvent: false
- }),
-
- id: function(){
- var ele = this[0];
-
- if( ele ){
- return ele._private.data.id;
- }
- },
-
- position: $$.define.data({
- field: "position",
- bindingEvent: "position",
- allowBinding: true,
- allowSetting: true,
- settingEvent: "position",
- settingTriggersEvent: true,
- triggerFnName: "rtrigger",
- allowGetting: true,
- validKeys: ["x", "y"]
- }),
-
- positions: function( pos ){
- if( $$.is.plainObject(pos) ){
- this.position(pos);
-
- } else if( $$.is.fn(pos) ){
- var fn = pos;
-
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
-
- var pos = fn.apply(ele, [i, ele]);
-
- if( pos && !ele.locked() ){
- var elePos = ele._private.position;
- elePos.x = pos.x;
- elePos.y = pos.y;
- }
- }
-
- this.rtrigger("position");
- }
-
- return this; // chaining
- },
-
- // get the rendered (i.e. on screen) positon of the element
- // TODO allow setting
- renderedPosition: function( dim ){
- var ele = this[0];
- var cy = this.cy();
- var zoom = cy.zoom();
- var pan = cy.pan();
-
- if( ele && ele.isNode() ){ // must have an element and must be a node to return position
- var pos = ele._private.position;
- var rpos = {
- x: pos.x * zoom + pan.x,
- y: pos.y * zoom + pan.y
- };
-
- if( dim === undefined ){ // then return the whole rendered position
- return rpos;
- } else { // then return the specified dimension
- return rpos[ dim ];
- }
- }
- },
-
- // get the specified css property as a rendered value (i.e. on-screen value)
- // or get the whole rendered style if no property specified (NB doesn't allow setting)
- renderedCss: function( property ){
- var ele = this[0];
-
- if( ele ){
- var renstyle = ele.cy().style().getRenderedStyle( ele );
-
- if( property === undefined ){
- return renstyle;
- } else {
- return renstyle[ property ];
- }
- }
- },
-
- // read the calculated css style of the element or override the style (via a bypass)
- css: function( name, value ){
- var style = this.cy().style();
-
- if( $$.is.plainObject(name) ){ // then extend the bypass
- var props = name;
- style.applyBypass( this, props );
- this.rtrigger("style"); // let the renderer know we've updated style
-
- } else if( $$.is.string(name) ){
-
- if( value === undefined ){ // then get the property from the style
- var ele = this[0];
-
- if( ele ){
- return ele._private.style[ name ].strValue;
- } else { // empty collection => can't get any value
- return;
- }
-
- } else { // then set the bypass with the property value
- style.applyBypass( this, name, value );
- this.rtrigger("style"); // let the renderer know we've updated style
- }
-
- } else if( name === undefined ){
- var ele = this[0];
-
- if( ele ){
- return style.getRawStyle( ele );
- } else { // empty collection => can't get any value
- return;
- }
- }
-
- return this; // chaining
- },
-
- removeCss: function(){
- var style = this.cy().style();
- var eles = this;
-
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
-
- style.removeAllBypasses( ele );
- }
-
- this.rtrigger('style');
- },
-
- show: function(){
- this.css("visibility", "visible");
- return this; // chaining
- },
-
- hide: function(){
- this.css("visibility", "hidden");
- return this; // chaining
- },
-
- visible: function(){
- var ele = this[0];
-
- if( ele ){
- if( ele.css("visibility") !== "visible" ){
- return false;
- }
-
- if( ele.isNode() ){
- var parents = ele.parents();
- for( var i = 0; i < parents.length; i++ ){
- var parent = parents[i];
- var parentVisibility = parent.css("visibility");
-
- if( parentVisibility !== "visible" ){
- return false;
- }
- }
-
- return true;
- } else if( ele.isEdge() ){
- var src = ele.source();
- var tgt = ele.target();
-
- return src.visible() && tgt.visible();
- }
-
- }
- },
-
- hidden: function(){
- var ele = this[0];
-
- if( ele ){
- return !this.visible();
- }
- },
-
- // convenience function to get a numerical value for the width of the node/edge
- width: function(){
- var ele = this[0];
-
- if( ele ){
- var w = this._private.style.width;
- return w.strValue === "auto" ? ele._private.autoWidth : w.pxValue;
- }
- },
-
- outerWidth: function(){
- var ele = this[0];
-
- if( ele ){
- var style = this._private.style;
- var width = style.width.strValue === "auto" ? ele._private.autoWidth : style.width.pxValue;;
- var border = style["border-width"] ? style["border-width"].pxValue * borderWidthMultiplier + borderWidthAdjustment : 0;
-
- return width + border;
- }
- },
-
- renderedWidth: function(){
- var ele = this[0];
-
- if( ele ){
- var width = this.width();
- return width * this.cy().zoom();
- }
- },
-
- renderedOuterWidth: function(){
- var ele = this[0];
-
- if( ele ){
- var owidth = this.outerWidth();
- return owidth * this.cy().zoom();
- }
- },
-
- // convenience function to get a numerical value for the height of the node
- height: function(){
- var ele = this[0];
-
- if( ele && ele.isNode() ){
- var h = this._private.style.height;
- return h.strValue === "auto" ? ele._private.autoHeight : h.pxValue;
- }
- },
-
- outerHeight: function(){
- var ele = this[0];
-
- if( ele ){
- var style = this._private.style;
- var height = style.height.strValue === "auto" ? ele._private.autoHeight : style.height.pxValue;
- var border = style["border-width"] ? style["border-width"].pxValue * borderWidthMultiplier + borderWidthAdjustment : 0;
-
- return height + border;
- }
- },
-
- renderedHeight: function(){
- var ele = this[0];
-
- if( ele ){
- var height = this.height();
- return height * this.cy().zoom();
- }
- },
-
- renderedOuterHeight: function(){
- var ele = this[0];
-
- if( ele ){
- var oheight = this.outerHeight();
- return oheight * this.cy().zoom();
- }
- },
-
- // get the position of the element relative to the container (i.e. not relative to parent node)
- offset: function(){
- var ele = this[0];
-
- if( ele && ele.isNode() ){
- var offset = {
- x: ele._private.position.x,
- y: ele._private.position.y
- };
-
- var parents = ele.parents();
- for( var i = 0; i < parents.length; i++ ){
- var parent = parents[i];
- var parentPos = parent._private.position;
-
- offset.x += parentPos.x;
- offset.y += parentPos.y;
- }
-
- return offset;
- }
- },
-
- renderedOffset: function(){
- var ele = this[0];
-
- if( ele && ele.isNode() ){
- var offset = this.offset();
- var cy = this.cy();
- var zoom = cy.zoom();
- var pan = cy.pan();
-
- return {
- x: offset.x * zoom + pan.x,
- y: offset.y * zoom + pan.y
- };
- }
- },
-
- // get the bounding box of the elements (in raw model position)
- boundingBox: function( selector ){
- var eles = this;
-
- if( !selector || ( $$.is.elementOrCollection(selector) && selector.length === 0 ) ){
- eles = this;
- } else if( $$.is.string(selector) ){
- eles = this.filter( selector );
- } else if( $$.is.elementOrCollection(selector) ){
- eles = selector;
- }
-
- var x1 = Infinity;
- var x2 = -Infinity;
- var y1 = Infinity;
- var y2 = -Infinity;
-
- // find bounds of elements
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- var ex1, ex2, ey1, ey2, x, y;
-
- if( ele.isNode() ){
- var pos = ele._private.position;
- x = pos.x;
- y = pos.y;
- var w = ele.outerWidth();
- var halfW = w/2;
- var h = ele.outerHeight();
- var halfH = h/2;
-
- // handle node dimensions
- /////////////////////////
-
- ex1 = x - halfW;
- ex2 = x + halfW;
- ey1 = y - halfH;
- ey2 = y + halfH;
-
- x1 = ex1 < x1 ? ex1 : x1;
- x2 = ex2 > x2 ? ex2 : x2;
- y1 = ey1 < y1 ? ey1 : y1;
- y2 = ey2 > y2 ? ey2 : y2;
-
- } else { // is edge
- var n1pos = ele.source()[0]._private.position;
- var n2pos = ele.target()[0]._private.position;
-
- // handle edge dimensions (rough box estimate)
- //////////////////////////////////////////////
-
- var rstyle = ele._private.rstyle;
- x = rstyle.labelX;
- y = rstyle.labelY;
-
- ex1 = n1pos.x;
- ex2 = n2pos.x;
- ey1 = n1pos.y;
- ey2 = n2pos.y;
-
- if( ex1 > ex2 ){
- var temp = ex1;
- ex1 = ex2;
- ex2 = temp;
- }
-
- if( ey1 > ey2 ){
- var temp = ey1;
- ey1 = ey2;
- ey2 = temp;
- }
-
- x1 = ex1 < x1 ? ex1 : x1;
- x2 = ex2 > x2 ? ex2 : x2;
- y1 = ey1 < y1 ? ey1 : y1;
- y2 = ey2 > y2 ? ey2 : y2;
-
- // handle points along edge (sanity check)
- //////////////////////////////////////////
-
- var bpts = rstyle.bezierPts || [];
- var w = ele._private.style['width'].value;
- for( var j = 0; j < bpts.length; j++ ){
- var bpt = bpts[j];
-
- x1 = bpt.x - w < x1 ? bpt.x - w : x1;
- x2 = bpt.x + w > x2 ? bpt.x + w : x2;
- y1 = bpt.y - w < y1 ? bpt.y - w : y1;
- y2 = bpt.y + w > y2 ? bpt.y + w : y2;
- }
-
- }
-
- // handle label dimensions
- //////////////////////////
-
- var style = ele._private.style;
- var label = style['content'].value;
- var fontSize = style['font-size'];
- var halign = style['text-halign'];
- var valign = style['text-valign'];
- var labelWidth = ele._private.rstyle.labelWidth;
-
- if( label && fontSize && labelWidth != undefined && halign && valign ){
- var lh = fontSize.value;
- var lw = labelWidth;
- var lx1, lx2, ly1, ly2;
-
- switch( halign.value ){
- case "left":
- lx1 = ex1 - lw;
- lx2 = ex1;
- break;
-
- case "center":
- lx1 = x - lw/2;
- lx2 = x + lw/2;
- break;
-
- case "right":
- lx1 = ex2;
- lx2 = ex2 + lw;
- break;
- }
-
- if( ele.isEdge() ){ // force center case
- lx1 = x - lw/2;
- lx2 = x + lw/2;
- }
-
- switch( valign.value ){
- case "top":
- ly1 = ey1 - lh;
- ly2 = ey1;
- break;
-
- case "center":
- ly1 = y - lh/2;
- ly2 = y + lh/2;
- break;
-
- case "bottom":
- ly1 = ey2;
- ly2 = ey2 + lh;
- break;
- }
-
- if( ele.isEdge() ){ // force center case
- ly1 = y - lh/2;
- ly2 = y + lh/2;
- }
-
- x1 = lx1 < x1 ? lx1 : x1;
- x2 = lx2 > x2 ? lx2 : x2;
- y1 = ly1 < y1 ? ly1 : y1;
- y2 = ly2 > y2 ? ly2 : y2;
- }
- } // for
-
- // testing on debug page
- // $('#bb').remove();
- // $('#cytoscape').css('position', 'relative').append('
');
- // $('#bb').css({
- // 'position': 'absolute',
- // 'left': x1,
- // 'top': y1,
- // 'width': x2 - x1,
- // 'height': y2 - y1,
- // 'background': 'rgba(255, 0, 0, 0.5)'
- // })
-
- return {
- x1: x1,
- x2: x2,
- y1: y1,
- y2: y2,
- w: x2 - x1,
- h: y2 - y1
- };
- }
- });
-
-
-})( cytoscape );
-
-;(function( $$ ){
-
- // Regular degree functions (works on single element)
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- function defineDegreeFunction(callback){
- return function(){
- var self = this;
-
- if( self.length === 0 ){ return; }
-
- if( self.isNode() && !self.removed() ){
- var degree = 0;
- var node = self[0];
- var connectedEdges = node._private.edges;
-
- for( var i = 0; i < connectedEdges.length; i++ ){
- var edge = connectedEdges[i];
- degree += callback( node, edge );
- }
-
- return degree;
- } else {
- return;
- }
- };
- }
-
- $$.fn.eles({
- degree: defineDegreeFunction(function(node, edge){
- if( edge.source().same( edge.target() ) ){
- return 2;
- } else {
- return 1;
- }
- }),
-
- indegree: defineDegreeFunction(function(node, edge){
- if( edge.target().same(node) ){
- return 1;
- } else {
- return 0;
- }
- }),
-
- outdegree: defineDegreeFunction(function(node, edge){
- if( edge.source().same(node) ){
- return 1;
- } else {
- return 0;
- }
- })
- });
-
-
- // Collection degree stats
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- function defineDegreeBoundsFunction(degreeFn, callback){
- return function(){
- var ret = undefined;
- var nodes = this.nodes();
-
- for( var i = 0; i < nodes.length; i++ ){
- var ele = nodes[i];
- var degree = ele[degreeFn]();
- if( degree !== undefined && (ret === undefined || callback(degree, ret)) ){
- ret = degree;
- }
- }
-
- return ret;
- };
- }
-
- $$.fn.eles({
- minDegree: defineDegreeBoundsFunction("degree", function(degree, min){
- return degree < min;
- }),
-
- maxDegree: defineDegreeBoundsFunction("degree", function(degree, max){
- return degree > max;
- }),
-
- minIndegree: defineDegreeBoundsFunction("indegree", function(degree, min){
- return degree < min;
- }),
-
- maxIndegree: defineDegreeBoundsFunction("indegree", function(degree, max){
- return degree > max;
- }),
-
- minOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, min){
- return degree < min;
- }),
-
- maxOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, max){
- return degree > max;
- })
- });
-
- $$.fn.eles({
- totalDegree: function(){
- var total = 0;
- var nodes = this.nodes();
-
- for( var i = 0; i < nodes.length; i++ ){
- total += nodes[i].degree();
- }
-
- return total;
- }
- });
-
-})( cytoscape );
-
-
-
-;(function($$){
-
- // Functions for binding & triggering events
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- $$.fn.eles({
- on: $$.define.on(), // .on( events [, selector] [, data], handler)
- one: $$.define.on({ unbindSelfOnTrigger: true }),
- once: $$.define.on({ unbindAllBindersOnTrigger: true }),
- off: $$.define.off(), // .off( events [, selector] [, handler] )
- trigger: $$.define.trigger(), // .trigger( events [, extraParams] )
-
- rtrigger: function(event, extraParams){ // for internal use only
- // notify renderer unless removed
- this.cy().notify({
- type: event,
- collection: this.filter(function(){
- return !this.removed();
- })
- });
-
- this.trigger(event, extraParams);
- return this;
- }
- });
-
- // aliases for those folks who like old stuff:
- $$.elesfn.bind = $$.elesfn.on;
- $$.elesfn.unbind = $$.elesfn.off;
-
- // add event aliases like .click()
- $$.define.event.aliasesOn( $$.elesfn );
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.eles({
- isNode: function(){
- return this.group() === "nodes";
- },
-
- isEdge: function(){
- return this.group() === "edges";
- },
-
- isLoop: function(){
- return this.isEdge() && this.source().id() === this.target().id();
- },
-
- group: function(){
- var ele = this[0];
-
- if( ele ){
- return ele._private.group;
- }
- }
- });
-
-
-})( cytoscape );
-
-;(function($$){
-
- // Functions for iterating over collections
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- $$.fn.eles({
- each: function(fn){
- if( $$.is.fn(fn) ){
- for(var i = 0; i < this.length; i++){
- var ele = this[i];
- var ret = fn.apply( ele, [ i, ele ] );
-
- if( ret === false ){ break; } // exit each early on return false
- }
- }
- return this;
- },
-
- toArray: function(){
- var array = [];
-
- for(var i = 0; i < this.length; i++){
- array.push( this[i] );
- }
-
- return array;
- },
-
- slice: function(start, end){
- var array = [];
- var thisSize = this.length;
-
- if( end == null ){
- end = thisSize;
- }
-
- if( start < 0 ){
- start = thisSize + start;
- }
-
- for(var i = start; i >= 0 && i < end && i < thisSize; i++){
- array.push( this[i] );
- }
-
- return new $$.Collection(this.cy(), array);
- },
-
- size: function(){
- return this.length;
- },
-
- eq: function(i){
- return this[i];
- },
-
- empty: function(){
- return this.length === 0;
- },
-
- nonempty: function(){
- return !this.empty();
- }
- });
-
-})( cytoscape );
-
-;(function($$){
-
- // Collection functions that toggle a boolean value
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
- function defineSwitchFunction(params){
- return function(){
- var args = arguments;
-
- // e.g. cy.nodes().select( data, handler )
- if( args.length === 2 ){
- var data = args[0];
- var handler = args[1];
- this.bind( params.event, data, handler );
- }
-
- // e.g. cy.nodes().select( handler )
- else if( args.length === 1 ){
- var handler = args[0];
- this.bind( params.event, handler );
- }
-
- // e.g. cy.nodes().select()
- else if( args.length === 0 ){
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
-
- if( !params.ableField || ele._private[params.ableField] ){
- ele._private[params.field] = params.value;
- }
- }
- this.updateStyle(); // change of state => possible change of style
- this.trigger(params.event);
- }
-
- return this;
- };
- }
-
- function defineSwitchSet( params ){
- $$.elesfn[ params.field ] = function(){
- var ele = this[0];
- if( ele ){
- return ele._private[ params.field ];
- }
- };
-
- $$.elesfn[ params.on ] = defineSwitchFunction({
- event: params.on,
- field: params.field,
- ableField: params.ableField,
- value: true
- });
-
- $$.elesfn[ params.off ] = defineSwitchFunction({
- event: params.off,
- field: params.field,
- ableField: params.ableField,
- value: false
- });
- }
-
- defineSwitchSet({
- field: "locked",
- on: "lock",
- off: "unlock"
- });
-
- defineSwitchSet({
- field: "grabbable",
- on: "grabify",
- off: "ungrabify"
- });
-
- defineSwitchSet({
- field: "selected",
- ableField: "selectable",
- on: "select",
- off: "unselect"
- });
-
- defineSwitchSet({
- field: "selectable",
- on: "selectify",
- off: "unselectify"
- });
-
- $$.elesfn.grabbed = function(){
- var ele = this[0];
- if( ele ){
- return ele._private.grabbed;
- }
- };
-
- defineSwitchSet({
- field: "active",
- on: "activate",
- off: "unactivate"
- });
-
- $$.elesfn.inactive = function(){
- var ele = this[0];
- if( ele ){
- return !ele._private.active;
- }
- };
-
-})( cytoscape );
-
-;(function($$){
-
- $$.fn.eles({
- nodes: function(selector){
- return this.filter(function(i, element){
- return element.isNode();
- }).filter(selector);
- },
-
- edges: function(selector){
- return this.filter(function(i, element){
- return element.isEdge();
- }).filter(selector);
- },
-
- filter: function(filter){
- var cy = this._private.cy;
-
- if( $$.is.fn(filter) ){
- var elements = [];
-
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
-
- if( filter.apply(ele, [i, ele]) ){
- elements.push(ele);
- }
- }
-
- return new $$.Collection(cy, elements);
-
- } else if( $$.is.string(filter) || $$.is.elementOrCollection(filter) ){
- return new $$.Selector(filter).filter(this);
-
- } else if( filter === undefined ){
- return this;
- }
-
- return new $$.Collection( cy ); // if not handled by above, give 'em an empty collection
- },
-
- not: function(toRemove){
- var cy = this._private.cy;
-
- if( !toRemove ){
- return this;
- } else {
-
- if( $$.is.string( toRemove ) ){
- toRemove = this.filter( toRemove );
- }
-
- var elements = [];
-
- for( var i = 0; i < this.length; i++ ){
- var element = this[i];
-
- var remove = toRemove._private.ids[ element.id() ];
- if( !remove ){
- elements.push( element );
- }
- }
-
- return new $$.Collection( cy, elements );
- }
-
- },
-
- intersect: function( other ){
- var self = this;
- var cy = this._private.cy;
-
- // if a selector is specified, then filter by it
- if( $$.is.string(other) ){
- var selector = other;
- return this.filter( selector );
- }
-
- var elements = [];
- var col1 = this;
- var col2 = other;
- var col1Smaller = this.length < other.length;
- var ids1 = col1Smaller ? col1._private.ids : col2._private.ids;
- var ids2 = col1Smaller ? col2._private.ids : col1._private.ids;
-
- for( var id in ids1 ){
- var ele = ids2[ id ];
-
- if( ele ){
- elements.push( ele );
- }
- }
-
- return new $$.Collection( cy, elements );
- },
-
- add: function(toAdd){
- var self = this;
- var cy = this._private.cy;
-
- if( !toAdd ){
- return this;
- }
-
- if( $$.is.string(toAdd) ){
- var selector = toAdd;
- toAdd = cy.elements(selector);
- }
-
- var elements = [];
- var ids = {};
-
- function add(element){
- if( !element ){
- return;
- }
-
- if( !ids[ element.id() ] ){
- elements.push( element );
- ids[ element.id() ] = true;
- }
- }
-
- // add own
- for( var i = 0; i < self.length; i++ ){
- var element = self[i];
- add(element);
- }
-
- // add toAdd
- for( var i = 0; i < toAdd.length; i++ ){
- var element = toAdd[i];
- add(element);
- }
-
- return new $$.Collection(cy, elements);
- }
- });
-
- $$.fn.eles({
- // do a breadth first search from the nodes in the collection
- // from pseudocode on wikipedia
- breadthFirstSearch: function( fn, directed ){
- fn = fn || function(){};
- var cy = this._private.cy;
- var v = this;
- var Q = [];
- var marked = {};
- var id2depth = {};
- var connectedFrom = {};
- var connectedEles = [];
-
- // enqueue v
- for( var i = 0; i < v.length; i++ ){
- if( v[i].isNode() ){
- Q.unshift( v[i] );
-
- // and mark v
- marked[ v[i].id() ] = true;
-
- id2depth[ v[i].id() ] = 0;
-
- connectedEles.push( v[i] );
- }
- }
-
- i = 0;
- while( Q.length !== 0 ){ // while Q not empty
- var t = Q.shift();
- var depth = 0;
-
- var fromNodeId = connectedFrom[ t.id() ];
- while( fromNodeId ){
- depth++;
- fromNodeId = connectedFrom[ fromNodeId ];
- }
-
- id2depth[ t.id() ] = depth;
- var ret = fn.call(t, i, depth);
- i++;
-
- // on return true, return the result
- if( ret === true ){
- return new $$.Collection( cy, [ t ] );
- }
-
- // on return false, stop iteration
- else if( ret === false ){
- break;
- }
-
- var adjacentEdges = t.connectedEdges(directed ? '[source = "' + t.id() + '"]' : undefined);
-
- for( var j = 0; j < adjacentEdges.length; j++ ){
- var e = adjacentEdges[j];
- var u = e.connectedNodes('[id != "' + t.id() + '"]');
-
- if( u.length !== 0 ){
- u = u[0];
-
- if( !marked[ u.id() ] ){
- marked[ u.id() ] = true; // mark u
- Q.unshift( u ); // enqueue u onto Q
-
- connectedFrom[ u.id() ] = t.id();
-
- connectedEles.push( u );
- connectedEles.push( e );
- }
- }
- }
- }
-
- return new $$.Collection( cy, connectedEles ); // return none
- },
-
- // do a depth first search on the nodes in the collection
- // from pseudocode on wikipedia (iterative impl)
- depthFirstSearch: function( fn, directed ){
- fn = fn || function(){};
- var cy = this._private.cy;
- var v = this;
- var S = [];
- var discovered = [];
- var forwardEdge = {};
- var backEdge = {};
- var crossEdge = {};
- var treeEdge = {};
- var explored = {};
-
- function labelled(e){
- var id = e.id();
- return forwardEdge[id] || backEdge[id] || crossEdge[id] || treeEdge[id];
- }
-
- // push v
- for( var i = 0; i < v.length; i++ ){
- if( v[i].isNode() ){
- S.push( v[i] );
-
- // and mark discovered
- discovered[ v[i].id() ] = true;
- }
- }
-
- while( S.length !== 0 ){
- var t = S[ S.length - 1 ];
- var ret = fn.call(t);
- var breaked = false;
-
- if( ret === true ){
- return new $$.Collection( cy, [t] );
- }
-
- var adjacentEdges = t.connectedEdges(directed ? '[source = "' + t.id() + '"]' : undefined);
- for( var i = 0; i < adjacentEdges.length; i++ ){
- var e = adjacentEdges[i];
-
- if( labelled(e) ){
- continue;
- }
-
- var w = e.connectedNodes('[id != "' + t.id() + '"]');
- if( w.length !== 0 ){
- w = w[0];
- var wid = w.id();
-
- if( !discovered[wid] && !explored[wid] ){
- treeEdge[wid] = true;
- discovered[wid] = true;
- S.push(w);
- breaked = true;
- break;
- } else if( discovered[wid] ){
- backEdge[wid] = true;
- } else {
- crossEdge[wid] = true;
- }
- }
- }
-
- if( !breaked ){
- explored[ t.id() ] = true;
- S.pop();
- }
- }
- },
-
- // get the root nodes in the DAG
- roots: function( selector ){
- var eles = this;
- var roots = [];
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- if( !ele.isNode() ){
- continue;
- }
-
- var hasEdgesPointingIn = ele.connectedEdges('[target = "' + ele.id() + '"][source != "' + ele.id() + '"]').length > 0;
-
- if( !hasEdgesPointingIn ){
- roots.push( ele );
- }
- }
-
- return new $$.Collection( this._private.cy, roots ).filter( selector );
- },
-
- // kruskal's algorithm (finds min spanning tree, assuming undirected graph)
- // implemented from pseudocode from wikipedia
- kruskal: function( weightFn ){
- weightFn = weightFn || function(){ return 1; }; // if not specified, assume each edge has equal weight (1)
-
- function findSet(ele){
- for( var i = 0; i < forest.length; i++ ){
- var eles = forest[i];
-
- if( eles.anySame(ele) ){
- return {
- eles: eles,
- index: i
- };
- }
- }
- }
-
- var A = new $$.Collection(this._private.cy, []);
- var forest = [];
- var nodes = this.nodes();
-
- for( var i = 0; i < nodes.length; i++ ){
- forest.push( nodes[i].collection() );
- }
-
- var edges = this.edges();
- var S = edges.toArray().sort(function(a, b){
- var weightA = weightFn.call(a);
- var weightB = weightFn.call(b);
-
- return weightA - weightB;
- });
-
- for(var i = 0; i < S.length; i++){
- var edge = S[i];
- var u = edge.source()[0];
- var v = edge.target()[0];
- var setU = findSet(u);
- var setV = findSet(v);
-
- if( setU.eles !== setV.eles ){
- A = A.add( edge );
-
- forest[ setU.index ] = setU.eles.add( setV.eles );
- forest.splice( setV.index, 1 );
- }
- }
-
- return nodes.add( A );
-
- },
-
- dijkstra: function( target, weightFn, directed ){
- var cy = this._private.cy;
- directed = !$$.is.fn(weightFn) ? weightFn : directed;
- directed = directed === undefined || directed;
- weightFn = $$.is.fn(weightFn) ? weightFn : function(){ return 1; }; // if not specified, assume each edge has equal weight (1)
-
- if( this.length === 0 || !target || !$$.is.elementOrCollection(target) || target.length === 0 ){
- return new $$.Collection(cy, []);
- }
-
- var source = this[0];
- target = target[0];
- var dist = {};
- var prev = {};
-
- var nodes = cy.nodes();
- for( var i = 0; i < nodes.length; i++ ){
- dist[ nodes[i].id() ] = Infinity;
- }
-
- dist[ source.id() ] = 0;
- var Q = nodes;
-
- var smallestDist = function(Q){
- var smallest = Infinity;
- var index;
- for(var i in dist){
- if( dist[i] < smallest && Q.$('#' + i).length !== 0 ){
- smallest = dist[i];
- index = i;
- }
- }
-
- return index;
- };
-
- var distBetween = function(u, v){
- var edges = u.edgesWith(v);
- var smallestDistance = Infinity;
- var smallestEdge;
-
- for( var i = 0; i < edges.length; i++ ){
- var edge = edges[i];
- var weight = weightFn.call(edge);
-
- if( weight < smallestDistance ){
- smallestDistance = weight;
- smallestEdge = edge;
- }
- }
-
- return {
- edge: smallestEdge,
- dist: smallestDistance
- };
- };
-
- while( Q.length !== 0 ){
- var uid = smallestDist(Q);
- var u = Q.filter('#' + uid);
-
- if( u.length === 0 ){
- continue;
- }
-
- //debugger;
-
- Q = Q.not( u );
-
- if( u.same(target) ){
- break;
- }
-
- if( dist[uid] === Math.Infinite ){
- break;
- }
-
- var neighbors = u.neighborhood().nodes();
- for( var i = 0; i < neighbors.length; i++ ){
- var v = neighbors[i];
- var vid = v.id()
-
- var duv = distBetween(u, v);
- var alt = dist[uid] + duv.dist;
- if( alt < dist[vid] ){
- dist[vid] = alt;
- prev[vid] = {
- node: v,
- edge: duv.edge
- };
- // TODO decrease-key v in Q
- }
- }
- }
- }
- });
-
- // nice, short mathemathical alias
- $$.elesfn.bfs = $$.elesfn.breadthFirstSearch;
- $$.elesfn.dfs = $$.elesfn.depthFirstSearch;
-
-
-
- // Neighbourhood functions
- //////////////////////////
-
- $$.fn.eles({
- neighborhood: function(selector){
- var elements = [];
- var cy = this._private.cy;
- var nodes = this.nodes();
-
- for( var i = 0; i < nodes.length; i++ ){ // for all nodes
- var node = nodes[i];
- var connectedEdges = node.connectedEdges();
-
- // for each connected edge, add the edge and the other node
- for( var j = 0; j < connectedEdges.length; j++ ){
- var edge = connectedEdges[j];
- var otherNode = edge.connectedNodes().not(node);
-
- // need check in case of loop
- if( otherNode.length > 0 ){
- elements.push( otherNode[0] ); // add node 1 hop away
- }
-
- // add connected edge
- elements.push( edge[0] );
- }
-
- }
-
- return ( new $$.Collection( cy, elements ) ).filter( selector );
- },
-
- closedNeighborhood: function(selector){
- return this.neighborhood().add(this).filter(selector);
- },
-
- openNeighborhood: function(selector){
- return this.neighborhood(selector);
- }
- });
-
-
- // Edge functions
- /////////////////
-
- $$.fn.eles({
- source: defineSourceFunction({
- attr: "source"
- }),
-
- target: defineSourceFunction({
- attr: "target"
- })
- });
-
- function defineSourceFunction( params ){
- return function( selector ){
- var sources = [];
- var edges = this.edges();
- var cy = this._private.cy;
-
- for( var i = 0; i < edges.length; i++ ){
- var edge = edges[i];
- var id = edge._private.data[params.attr];
- var src = cy.getElementById( id );
-
- if( src.length > 0 ){
- sources.push( src );
- }
- }
-
- return new $$.Collection( cy, sources ).filter( selector );
- }
- }
-
- $$.fn.eles({
- edgesWith: defineEdgesWithFunction(),
-
- edgesTo: defineEdgesWithFunction({
- thisIs: "source"
- })
- });
-
- function defineEdgesWithFunction( params ){
-
- return function(otherNodes){
- var elements = [];
- var cy = this._private.cy;
- var p = params || {};
-
- // get elements if a selector is specified
- if( $$.is.string(otherNodes) ){
- otherNodes = cy.$( otherNodes );
- }
-
- var edges = otherNodes.connectedEdges();
- var thisIds = this._private.ids;
-
- for( var i = 0; i < edges.length; i++ ){
- var edge = edges[i];
- var foundId;
- var edgeData = edge._private.data;
-
- if( p.thisIs ){
- var idToFind = edgeData[ p.thisIs ];
- foundId = thisIds[ idToFind ];
- } else {
- foundId = thisIds[ edgeData.source ] || thisIds[ edgeData.target ];
- }
-
- if( foundId ){
- elements.push( edge );
- }
- }
-
- return new $$.Collection( cy, elements );
- };
- }
-
- $$.fn.eles({
- connectedEdges: function( selector ){
- var elements = [];
- var cy = this._private.cy;
-
- var nodes = this.nodes();
- for( var i = 0; i < nodes.length; i++ ){
- var node = nodes[i];
- var edges = node._private.edges;
-
- for( var j = 0; j < edges.length; j++ ){
- var edge = edges[j];
- elements.push( edge );
- }
- }
-
- return new $$.Collection( cy, elements ).filter( selector );
- },
-
- connectedNodes: function( selector ){
- var elements = [];
- var cy = this._private.cy;
-
- var edges = this.edges();
- for( var i = 0; i < edges.length; i++ ){
- var edge = edges[i];
-
- elements.push( edge.source()[0] );
- elements.push( edge.target()[0] );
- }
-
- return new $$.Collection( cy, elements ).filter( selector );
- },
-
- parallelEdges: defineParallelEdgesFunction(),
-
- codirectedEdges: defineParallelEdgesFunction({
- codirected: true
- }),
-
- parallelIndex: function(){
- var edge = this[0];
-
- if( edge.isEdge() ){
- var src = edge.source()[0];
- var srcEdges = src._private.edges;
- var index = 0;
-
- for( var i = 0; i < srcEdges.length; i++ ){
- var srcEdge = srcEdges[i];
- var thisIsTheIndex = srcEdge === edge;
-
- if( thisIsTheIndex ){
- return index;
- }
-
- var codirected = edge._private.data.source === srcEdge._private.data.source
- && edge._private.data.target === srcEdge._private.data.target;
- var opdirected = edge._private.data.source === srcEdge._private.data.target
- && edge._private.data.target === srcEdge._private.data.source;
- var parallel = codirected || opdirected;
-
- if( parallel ){ // then increase the count
- index++;
- }
- }
- }
- },
-
- parallelSize: function(){
- var edge = this[0];
-
- if( edge.isEdge() ){
- var src = edge.source()[0];
- var srcEdges = src._private.edges;
- var numEdges = 0;
-
- for( var i = 0; i < srcEdges.length; i++ ){
- var srcEdge = srcEdges[i];
- var codirected = edge._private.data.source === srcEdge._private.data.source
- && edge._private.data.target === srcEdge._private.data.target;
- var opdirected = edge._private.data.source === srcEdge._private.data.target
- && edge._private.data.target === srcEdge._private.data.source;
- var parallel = codirected || opdirected;
-
- if( parallel ){ // then increase the count
- numEdges++;
- }
- }
-
- return numEdges;
- }
- }
- });
-
- function defineParallelEdgesFunction(params){
- var defaults = {
- codirected: false
- };
- params = $$.util.extend({}, defaults, params);
-
- return function( selector ){
- var cy = this._private.cy;
- var elements = [];
- var edges = this.edges();
- var p = params;
-
- // look at all the edges in the collection
- for( var i = 0; i < edges.length; i++ ){
- var edge1 = edges[i];
- var src1 = edge1.source()[0];
- var srcid1 = src1.id();
- var tgt1 = edge1.target()[0];
- var tgtid1 = tgt1.id();
- var srcEdges1 = src1._private.edges;
-
- // look at edges connected to the src node of this edge
- for( var j = 0; j < srcEdges1.length; j++ ){
- var edge2 = srcEdges1[j];
- var edge2data = edge2._private.data;
- var tgtid2 = edge2data.target;
- var srcid2 = edge2data.source;
-
- var codirected = tgtid2 === tgtid1 && srcid2 === srcid1;
- var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2;
-
- if( (p.codirected && codirected)
- || (!p.codirected && (codirected || oppdirected)) ){
- elements.push( edge2 );
- }
- }
- }
-
- return new $$.Collection( cy, elements ).filter( selector );
- };
-
- }
-
-
- // Compound functions
- /////////////////////
-
- $$.fn.eles({
- parent: function( selector ){
- var parents = [];
- var cy = this._private.cy;
-
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
- var parent = cy.getElementById( ele._private.data.parent );
-
- if( parent.size() > 0 ){
- parents.push( parent );
- }
- }
-
- return new $$.Collection( cy, parents ).filter( selector );
- },
-
- parents: function( selector ){
- var parents = [];
-
- var eles = this.parent();
- while( eles.nonempty() ){
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
- parents.push( ele );
- }
-
- eles = eles.parent();
- }
-
- return new $$.Collection( this.cy(), parents ).filter( selector );
- },
-
- children: function( selector ){
- var children = [];
-
- for( var i = 0; i < this.length; i++ ){
- var ele = this[i];
- children = children.concat( ele._private.children );
- }
-
- return new $$.Collection( this.cy(), children ).filter( selector );
- },
-
- siblings: function( selector ){
- return this.parent().children().not( this ).filter( selector );
- },
-
- isParent: function(){
- var ele = this[0];
-
- if( ele ){
- return ele._private.children.length !== 0;
- }
- },
-
- isChild: function(){
- var ele = this[0];
-
- if( ele ){
- return ele._private.data.parent !== undefined && ele.parent().length !== 0;
- }
- },
-
- descendants: function( selector ){
- var elements = [];
-
- function add( eles ){
- for( var i = 0; i < eles.length; i++ ){
- var ele = eles[i];
-
- elements.push( ele );
-
- if( ele.children().nonempty() ){
- add( ele.children() );
- }
- }
- }
-
- add( this.children() );
-
- return new $$.Collection( this.cy(), elements ).filter( selector );
- }
- });
-
-
-})( cytoscape );
-
-;(function($$){
-
-
- $$.fn.selector = function(map, options){
- for( var name in map ){
- var fn = map[name];
- $$.Selector.prototype[ name ] = fn;
- }
- };
-
- $$.Selector = function(onlyThisGroup, selector){
-
- if( !(this instanceof $$.Selector) ){
- return new $$.Selector(onlyThisGroup, selector);
- }
-
- if( selector === undefined && onlyThisGroup !== undefined ){
- selector = onlyThisGroup;
- onlyThisGroup = undefined;
- }
-
- var self = this;
-
- self._private = {
- selectorText: null,
- invalid: true
- }
-
- // storage for parsed queries
- // when you add something here, also add to Selector.toString()
- function newQuery(){
- return {
- classes: [],
- colonSelectors: [],
- data: [],
- group: null,
- ids: [],
- meta: [],
-
- // fake selectors
- collection: null, // a collection to match against
- filter: null, // filter function
-
- // these are defined in the upward direction rather than down (e.g. child)
- // because we need to go up in Selector.filter()
- parent: null, // parent query obj
- ancestor: null, // ancestor query obj
- subject: null, // defines subject in compound query (subject query obj; points to self if subject)
-
- // use these only when subject has been defined
- child: null,
- descendant: null
- };
- }
-
- if( !selector || ( $$.is.string(selector) && selector.match(/^\s*$/) ) ){
-
- if( onlyThisGroup == null ){
- // ignore
- self.length = 0;
- } else {
- self[0] = newQuery();
- self[0].group = onlyThisGroup;
- self.length = 1;
- }
-
- } else if( $$.is.element( selector ) ){
- var collection = new $$.Collection(self.cy(), [ selector ]);
-
- self[0] = newQuery();
- self[0].collection = collection;
- self.length = 1;
-
- } else if( $$.is.collection( selector ) ){
- self[0] = newQuery();
- self[0].collection = selector;
- self.length = 1;
-
- } else if( $$.is.fn( selector ) ) {
- self[0] = newQuery();
- self[0].filter = selector;
- self.length = 1;
-
- } else if( $$.is.string( selector ) ){
-
- // these are the actual tokens in the query language
- var metaChar = "[\\!\\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]"; // chars we need to escape in var names, etc
- var variable = "(?:[\\w-]|(?:\\\\"+ metaChar +"))+"; // a variable name
- var comparatorOp = "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*="; // binary comparison op (used in data selectors)
- var boolOp = "\\?|\\!|\\^"; // boolean (unary) operators (used in data selectors)
- var string = '"(?:\\\\"|[^"])+"' + "|" + "'(?:\\\\'|[^'])+'"; // string literals (used in data selectors) -- doublequotes | singlequotes
- var number = $$.util.regex.number; // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123
- var value = string + "|" + number; // a value literal, either a string or number
- var meta = "degree|indegree|outdegree"; // allowed metadata fields (i.e. allowed functions to use from $$.Collection)
- var separator = "\\s*,\\s*"; // queries are separated by commas; e.g. edge[foo = "bar"], node.someClass
- var className = variable; // a class name (follows variable conventions)
- var descendant = "\\s+";
- var child = "\\s+>\\s+";
- var subject = "\\$";
- var id = variable; // an element id (follows variable conventions)
-
- // when a token like a variable has escaped meta characters, we need to clean the backslashes out
- // so that values get compared properly in Selector.filter()
- function cleanMetaChars(str){
- return str.replace(new RegExp("\\\\(" + metaChar + ")", "g"), "\1");
- }
-
- // add @ variants to comparatorOp
- var ops = comparatorOp.split("|");
- for( var i = 0; i < ops.length; i++ ){
- var op = ops[i];
- comparatorOp += "|@" + op;
- }
-
- // the current subject in the query
- var currentSubject = null;
-
- // NOTE: add new expression syntax here to have it recognised by the parser;
- // a query contains all adjacent (i.e. no separator in between) expressions;
- // the current query is stored in self[i] --- you can use the reference to `this` in the populate function;
- // you need to check the query objects in Selector.filter() for it actually filter properly, but that's pretty straight forward
- var exprs = {
- group: {
- query: true,
- regex: "(node|edge|\\*)",
- populate: function( group ){
- this.group = group == "*" ? group : group + "s";
- }
- },
-
- state: {
- query: true,
- regex: "(:selected|:unselected|:locked|:unlocked|:visible|:hidden|:grabbed|:free|:removed|:inside|:grabbable|:ungrabbable|:animated|:unanimated|:selectable|:unselectable|:parent|:child|:active|:inactive|:touch)",
- populate: function( state ){
- this.colonSelectors.push( state );
- }
- },
-
- id: {
- query: true,
- regex: "\\#("+ id +")",
- populate: function( id ){
- this.ids.push( cleanMetaChars(id) );
- }
- },
-
- className: {
- query: true,
- regex: "\\.("+ className +")",
- populate: function( className ){
- this.classes.push( cleanMetaChars(className) );
- }
- },
-
- dataExists: {
- query: true,
- regex: "\\[\\s*("+ variable +")\\s*\\]",
- populate: function( variable ){
- this.data.push({
- field: cleanMetaChars(variable)
- });
- }
- },
-
- dataCompare: {
- query: true,
- regex: "\\[\\s*("+ variable +")\\s*("+ comparatorOp +")\\s*("+ value +")\\s*\\]",
- populate: function( variable, comparatorOp, value ){
- this.data.push({
- field: cleanMetaChars(variable),
- operator: comparatorOp,
- value: value
- });
- }
- },
-
- dataBool: {
- query: true,
- regex: "\\[\\s*("+ boolOp +")\\s*("+ variable +")\\s*\\]",
- populate: function( boolOp, variable ){
- this.data.push({
- field: cleanMetaChars(variable),
- operator: boolOp
- });
- }
- },
-
- metaCompare: {
- query: true,
- regex: "\\{\\s*("+ meta +")\\s*("+ comparatorOp +")\\s*("+ number +")\\s*\\}",
- populate: function( meta, comparatorOp, number ){
- this.meta.push({
- field: cleanMetaChars(meta),
- operator: comparatorOp,
- value: number
- });
- }
- },
-
- nextQuery: {
- separator: true,
- regex: separator,
- populate: function(){
- // go on to next query
- self[++i] = newQuery();
- currentSubject = null;
- }
- },
-
- child: {
- separator: true,
- regex: child,
- populate: function(){
- // this query is the parent of the following query
- var childQuery = newQuery();
- childQuery.parent = this;
- childQuery.subject = currentSubject;
-
- // we're now populating the child query with expressions that follow
- self[i] = childQuery;
- }
- },
-
- descendant: {
- separator: true,
- regex: descendant,
- populate: function(){
- // this query is the ancestor of the following query
- var descendantQuery = newQuery();
- descendantQuery.ancestor = this;
- descendantQuery.subject = currentSubject;
-
- // we're now populating the descendant query with expressions that follow
- self[i] = descendantQuery;
- }
- },
-
- subject: {
- modifier: true,
- regex: subject,
- populate: function(){
- if( currentSubject != null && this.subject != this ){
- $$.util.error("Redefinition of subject in selector `" + selector + "`");
- return false;
- }
-
- currentSubject = this;
- this.subject = this;
- },
-
- }
- };
-
- var j = 0;
- for( var name in exprs ){
- exprs[j] = exprs[name];
- exprs[j].name = name;
-
- j++;
- }
- exprs.length = j;
-
- self._private.selectorText = selector;
- var remaining = selector;
- var i = 0;
-
- // of all the expressions, find the first match in the remaining text
- function consumeExpr( expectation ){
- var expr;
- var match;
- var name;
-
- for( var j = 0; j < exprs.length; j++ ){
- var e = exprs[j];
- var n = e.name;
-
- // ignore this expression if it doesn't meet the expectation function
- if( $$.is.fn( expectation ) && !expectation(n, e) ){ continue }
-
- var m = remaining.match(new RegExp( "^" + e.regex ));
-
- if( m != null ){
- match = m;
- expr = e;
- name = n;
-
- var consumed = m[0];
- remaining = remaining.substring( consumed.length );
-
- break; // we've consumed one expr, so we can return now
- }
- }
-
- return {
- expr: expr,
- match: match,
- name: name
- };
- }
-
- // consume all leading whitespace
- function consumeWhitespace(){
- var match = remaining.match(/^\s+/);
-
- if( match ){
- var consumed = match[0];
- remaining = remaining.substring( consumed.length );
- }
- }
-
- self[0] = newQuery(); // get started
-
- consumeWhitespace(); // get rid of leading whitespace
- for(;;){
- var check = consumeExpr();
-
- if( check.expr == null ){
- $$.util.error("The selector `"+ selector +"`is invalid");
- return;
- } else {
- var args = [];
- for(var j = 1; j < check.match.length; j++){
- args.push( check.match[j] );
- }
-
- // let the token populate the selector object (i.e. in self[i])
- var ret = check.expr.populate.apply( self[i], args );
-
- if( ret === false ){ return } // exit if population failed
- }
-
- // we're done when there's nothing left to parse
- if( remaining.match(/^\s*$/) ){
- break;
- }
- }
-
- self.length = i + 1;
-
- // adjust references for subject
- for(j = 0; j < self.length; j++){
- var query = self[j];
-
- if( query.subject != null ){
- // go up the tree until we reach the subject
- for(;;){
- if( query.subject == query ){ break } // done if subject is self
-
- if( query.parent != null ){ // swap parent/child reference
- var parent = query.parent;
- var child = query;
-
- child.parent = null;
- parent.child = child;
-
- query = parent; // go up the tree
- } else if( query.ancestor != null ){ // swap ancestor/descendant
- var ancestor = query.ancestor;
- var descendant = query;
-
- descendant.ancestor = null;
- ancestor.descendant = descendant;
-
- query = ancestor; // go up the tree
- } else {
- $$.util.error("When adjusting references for the selector `"+ query +"`, neither parent nor ancestor was found");
- break;
- }
- } // for
-
- self[j] = query.subject; // subject should be the root query
- } // if
- } // for
-
- // make sure for each query that the subject group matches the implicit group if any
- if( onlyThisGroup != null ){
- for(var j = 0; j < self.length; j++){
- if( self[j].group != null && self[j].group != onlyThisGroup ){
- $$.util.error("Group `"+ self[j].group +"` conflicts with implicit group `"+ onlyThisGroup +"` in selector `"+ selector +"`");
- return;
- }
-
- self[j].group = onlyThisGroup; // set to implicit group
- }
- }
-
- } else {
- $$.util.error("A selector must be created from a string; found " + selector);
- return;
- }
-
- self._private.invalid = false;
-
- };
-
- $$.selfn = $$.Selector.prototype;
-
- $$.selfn.size = function(){
- return this.length;
- };
-
- $$.selfn.eq = function(i){
- return this[i];
- };
-
- // get elements from the core and then filter them
- $$.selfn.find = function(){
- // TODO impl if we decide to use a DB for storing elements
- };
-
- // filter an existing collection
- $$.selfn.filter = function(collection, addLiveFunction){
- var self = this;
- var cy = collection.cy();
-
- // don't bother trying if it's invalid
- if( self._private.invalid ){
- return new $$.Collection( cy );
- }
-
- var queryMatches = function(query, element){
- // check group
- if( query.group != null && query.group != "*" && query.group != element._private.group ){
- return false;
- }
-
- // check colon selectors
- var allColonSelectorsMatch = true;
- for(var k = 0; k < query.colonSelectors.length; k++){
- var sel = query.colonSelectors[k];
- var renderer = cy.renderer(); // TODO remove reference after refactoring
-
- switch(sel){
- case ":selected":
- allColonSelectorsMatch = element.selected();
- break;
- case ":unselected":
- allColonSelectorsMatch = !element.selected();
- break;
- case ":selectable":
- allColonSelectorsMatch = element.selectable();
- break;
- case ":unselectable":
- allColonSelectorsMatch = !element.selectable();
- break;
- case ":locked":
- allColonSelectorsMatch = element.locked();
- break;
- case ":unlocked":
- allColonSelectorsMatch = !element.locked();
- break;
- case ":visible":
- allColonSelectorsMatch = element.visible();
- break;
- case ":hidden":
- allColonSelectorsMatch = !element.visible();
- break;
- case ":grabbed":
- allColonSelectorsMatch = element.grabbed();
- break;
- case ":free":
- allColonSelectorsMatch = !element.grabbed();
- break;
- case ":removed":
- allColonSelectorsMatch = element.removed();
- break;
- case ":inside":
- allColonSelectorsMatch = !element.removed();
- break;
- case ":grabbable":
- allColonSelectorsMatch = element.grabbable();
- break;
- case ":ungrabbable":
- allColonSelectorsMatch = !element.grabbable();
- break;
- case ":animated":
- allColonSelectorsMatch = element.animated();
- break;
- case ":unanimated":
- allColonSelectorsMatch = !element.animated();
- break;
- case ":parent":
- allColonSelectorsMatch = element.children().nonempty();
- break;
- case ":child":
- allColonSelectorsMatch = element.parent().nonempty();
- break;
- case ":active":
- allColonSelectorsMatch = element.active();
- break;
- case ":inactive":
- allColonSelectorsMatch = !element.active();
- break;
- case ":touch":
- allColonSelectorsMatch = window && document && (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
- break;
- }
-
- if( !allColonSelectorsMatch ) break;
- }
- if( !allColonSelectorsMatch ) return false;
-
- // check id
- var allIdsMatch = true;
- for(var k = 0; k < query.ids.length; k++){
- var id = query.ids[k];
- var actualId = element._private.data.id;
-
- allIdsMatch = allIdsMatch && (id == actualId);
-
- if( !allIdsMatch ) break;
- }
- if( !allIdsMatch ) return false;
-
- // check classes
- var allClassesMatch = true;
- for(var k = 0; k < query.classes.length; k++){
- var cls = query.classes[k];
-
- allClassesMatch = allClassesMatch && element.hasClass(cls);
-
- if( !allClassesMatch ) break;
- }
- if( !allClassesMatch ) return false;
-
- // generic checking for data/metadata
- function operandsMatch(params){
- var allDataMatches = true;
- for(var k = 0; k < query[params.name].length; k++){
- var data = query[params.name][k];
- var operator = data.operator;
- var value = data.value;
- var field = data.field;
- var matches;
-
- if( operator != null && value != null ){
-
- var fieldStr = "" + params.fieldValue(field);
- var valStr = "" + eval(value);
-
- var caseInsensitive = false;
- if( operator.charAt(0) == "@" ){
- fieldStr = fieldStr.toLowerCase();
- valStr = valStr.toLowerCase();
-
- operator = operator.substring(1);
- caseInsensitive = true;
- }
-
- if( operator == "=" ){
- operator = "==";
- }
-
- switch(operator){
- case "*=":
- matches = fieldStr.search(valStr) >= 0;
- break;
- case "$=":
- matches = new RegExp(valStr + "$").exec(fieldStr) != null;
- break;
- case "^=":
- matches = new RegExp("^" + valStr).exec(fieldStr) != null;
- break;
- default:
- // if we're doing a case insensitive comparison, then we're using a STRING comparison
- // even if we're comparing numbers
- if( caseInsensitive ){
- // eval with lower case strings
- var expr = "fieldStr " + operator + " valStr";
- matches = eval(expr);
- } else {
- // just eval as normal
- var expr = params.fieldRef(field) + " " + operator + " " + value;
- matches = eval(expr);
- }
-
- }
- } else if( operator != null ){
- switch(operator){
- case "?":
- matches = params.fieldTruthy(field);
- break;
- case "!":
- matches = !params.fieldTruthy(field);
- break;
- case "^":
- matches = params.fieldUndefined(field);
- break;
- }
- } else {
- matches = !params.fieldUndefined(field);
- }
-
- if( !matches ){
- allDataMatches = false;
- break;
- }
- } // for
-
- return allDataMatches;
- } // operandsMatch
-
- // check data matches
- var allDataMatches = operandsMatch({
- name: "data",
- fieldValue: function(field){
- return element._private.data[field];
- },
- fieldRef: function(field){
- return "element._private.data." + field;
- },
- fieldUndefined: function(field){
- return element._private.data[field] === undefined;
- },
- fieldTruthy: function(field){
- if( element._private.data[field] ){
- return true;
- }
- return false;
- }
- });
-
- if( !allDataMatches ){
- return false;
- }
-
- // check metadata matches
- var allMetaMatches = operandsMatch({
- name: "meta",
- fieldValue: function(field){
- return element[field]();
- },
- fieldRef: function(field){
- return "element." + field + "()";
- },
- fieldUndefined: function(field){
- return element[field]() == undefined;
- },
- fieldTruthy: function(field){
- if( element[field]() ){
- return true;
- }
- return false;
- }
- });
-
- if( !allMetaMatches ){
- return false;
- }
-
- // check collection
- if( query.collection != null ){
- var matchesAny = query.collection._private.ids[ element.id() ] != null;
-
- if( !matchesAny ){
- return false;
- }
- }
-
- // check filter function
- if( query.filter != null && element.collection().filter( query.filter ).size() == 0 ){
- return false;
- }
-
-
- // check parent/child relations
- function confirmRelations( query, elements ){
- if( query != null ){
- var matches = false;
- elements = elements(); // make elements functional so we save cycles if query == null
-
- // query must match for at least one element (may be recursive)
- for(var i = 0; i < elements.size(); i++){
- if( queryMatches( query, elements.eq(i) ) ){
- matches = true;
- break;
- }
- }
-
- return matches;
- } else {
- return true;
- }
- }
-
- if (! confirmRelations(query.parent, function(){
- return element.parent()
- }) ){ return false }
-
- if (! confirmRelations(query.ancestor, function(){
- return element.parents()
- }) ){ return false }
-
- if (! confirmRelations(query.child, function(){
- return element.children()
- }) ){ return false }
-
- if (! confirmRelations(query.descendant, function(){
- return element.descendants()
- }) ){ return false }
-
- // we've reached the end, so we've matched everything for this query
- return true;
- }; // queryMatches
-
- var selectorFunction = function(i, element){
- for(var j = 0; j < self.length; j++){
- var query = self[j];
-
- if( queryMatches(query, element) ){
- return true;
- }
- }
-
- return false;
- };
-
- if( self._private.selectorText == null ){
- selectorFunction = function(){ return true; };
- }
-
- var filteredCollection = collection.filter( selectorFunction );
-
- return filteredCollection;
- }; // filter
-
- // ith query to string
- $$.selfn.toString = $$.selfn.selector = function(){
-
- var str = "";
-
- function clean(obj){
- if( $$.is.string(obj) ){
- return obj;
- }
- return "";
- }
-
- function queryToString(query){
- var str = "";
-
- var group = clean(query.group);
- str += group.substring(0, group.length - 1);
-
- for(var j = 0; j < query.data.length; j++){
- var data = query.data[j];
- str += "[" + data.field + clean(data.operator) + clean(data.value) + "]"
- }
-
- for(var j = 0; j < query.meta.length; j++){
- var meta = query.meta[j];
- str += "{" + meta.field + clean(meta.operator) + clean(meta.value) + "}"
- }
-
- for(var j = 0; j < query.colonSelectors.length; j++){
- var sel = query.colonSelectors[i];
- str += sel;
- }
-
- for(var j = 0; j < query.ids.length; j++){
- var sel = "#" + query.ids[i];
- str += sel;
- }
-
- for(var j = 0; j < query.classes.length; j++){
- var sel = "." + query.classes[i];
- str += sel;
- }
-
- if( query.parent != null ){
- str = queryToString( query.parent ) + " > " + str;
- }
-
- if( query.ancestor != null ){
- str = queryToString( query.ancestor ) + " " + str;
- }
-
- if( query.child != null ){
- str += " > " + queryToString( query.child );
- }
-
- if( query.descendant != null ){
- str += " " + queryToString( query.descendant );
- }
-
- return str;
- }
-
- for(var i = 0; i < this.length; i++){
- var query = this[i];
-
- str += queryToString( query );
-
- if( this.length > 1 && i < this.length - 1 ){
- str += ", ";
- }
- }
-
- return str;
- };
-
-})( cytoscape );
-
-;(function($$){
-
- function NullRenderer(options){
- }
-
- NullRenderer.prototype.notify = function(params){
- };
-
- $$("renderer", "null", NullRenderer);
-
-})( cytoscape );
-
-(function($$) {
-
- var isTouch = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
- var time = function() { return Date.now(); } ;
- var arrowShapes = {}; var nodeShapes = {};
- var rendFunc = CanvasRenderer.prototype;
- var panOrBoxSelectDelay = 400;
-
- // Canvas layer constants
- var CANVAS_LAYERS = 5, SELECT_BOX = 0, DRAG = 2, OVERLAY = 3, NODE = 4, BUFFER_COUNT = 2;
-
- function CanvasRenderer(options) {
-
- this.options = options;
-
- this.data = {
-
- select: [undefined, undefined, undefined, undefined, 0], // Coordinates for selection box, plus enabled flag
- renderer: this, cy: options.cy, container: options.cy.container(),
-
- canvases: new Array(CANVAS_LAYERS),
- canvasRedrawReason: new Array(CANVAS_LAYERS),
- canvasNeedsRedraw: new Array(CANVAS_LAYERS),
-
- bufferCanvases: new Array(BUFFER_COUNT)
-
- };
-
- //--Pointer-related data
- this.hoverData = {down: null, last: null,
- downTime: null, triggerMode: null,
- dragging: false,
- initialPan: [null, null], capture: false};
-
- this.timeoutData = {panTimeout: null};
-
- this.dragData = {possibleDragElements: []};
-
- this.touchData = {start: null, capture: false,
- // These 3 fields related to tap, taphold events
- startPosition: [null, null, null, null, null, null],
- singleTouchStartTime: null,
- singleTouchMoved: true,
-
-
- now: [null, null, null, null, null, null],
- earlier: [null, null, null, null, null, null] };
- //--
-
- //--Wheel-related data
- this.zoomData = {freeToZoom: false, lastPointerX: null};
- //--
-
- this.redraws = 0;
-
- this.bindings = [];
-
- this.init();
-
- for (var i = 0; i < CANVAS_LAYERS; i++) {
- this.data.canvases[i] = document.createElement("canvas");
- this.data.canvases[i].style.position = "absolute";
- this.data.canvases[i].setAttribute("data-id", "layer" + i);
- this.data.canvases[i].style.zIndex = String(CANVAS_LAYERS - i);
- this.data.container.appendChild(this.data.canvases[i]);
-
- this.data.canvasRedrawReason[i] = new Array();
- this.data.canvasNeedsRedraw[i] = false;
- }
-
- this.data.canvases[NODE].setAttribute("data-id", "layer" + NODE + '-node');
- this.data.canvases[SELECT_BOX].setAttribute("data-id", "layer" + SELECT_BOX + '-selectbox');
- this.data.canvases[DRAG].setAttribute("data-id", "layer" + DRAG + '-drag');
- this.data.canvases[OVERLAY].setAttribute("data-id", "layer" + OVERLAY + '-overlay');
-
- for (var i = 0; i < BUFFER_COUNT; i++) {
- this.data.bufferCanvases[i] = document.createElement("canvas");
- this.data.bufferCanvases[i].style.position = "absolute";
- this.data.bufferCanvases[i].setAttribute("data-id", "buffer" + i);
- this.data.bufferCanvases[i].style.zIndex = String(-i - 1);
- this.data.bufferCanvases[i].style.visibility = "visible";
- this.data.container.appendChild(this.data.bufferCanvases[i]);
- }
-
- var overlay = document.createElement('div');
- this.data.container.appendChild( overlay );
- this.data.overlay = overlay;
- overlay.style.position = 'absolute';
- overlay.style.zIndex = 1000;
-
- if( options.showOverlay ){
-
- var link = document.createElement('a');
- overlay.appendChild( link );
- this.data.link = link;
-
- link.innerHTML = 'cytoscape.js';
- link.style.font = '14px helvetica';
- link.style.position = 'absolute';
- link.style.right = 0;
- link.style.bottom = 0;
- link.style.padding = '1px 3px';
- link.style.paddingLeft = '5px';
- link.style.paddingTop = '5px';
- link.style.opacity = 0;
- link.style['-webkit-tap-highlight-color'] = 'transparent';
- link.style.background = 'red';
-
- link.href = 'http://cytoscape.github.io/cytoscape.js/';
- link.target = '_blank';
-
- }
-
- this.hideEdgesOnViewport = options.hideEdgesOnViewport;
-
- this.load();
- }
-
- CanvasRenderer.prototype.notify = function(params) {
- if ( params.type == "destroy" ){
- this.destroy();
- return;
-
- } else if (params.type == "add"
- || params.type == "remove"
- || params.type == "load"
- ) {
-
- this.updateNodesCache();
- this.updateEdgesCache();
- }
-
- if (params.type == "viewport") {
- this.data.canvasNeedsRedraw[SELECT_BOX] = true;
- this.data.canvasRedrawReason[SELECT_BOX].push("viewchange");
- }
-
- this.data.canvasNeedsRedraw[DRAG] = true; this.data.canvasRedrawReason[DRAG].push("notify");
- this.data.canvasNeedsRedraw[NODE] = true; this.data.canvasRedrawReason[NODE].push("notify");
-
- this.redraws++;
- this.redraw();
- };
-
- CanvasRenderer.prototype.registerBinding = function(target, event, handler, useCapture){
- this.bindings.push({
- target: target,
- event: event,
- handler: handler,
- useCapture: useCapture
- });
-
- target.addEventListener(event, handler, useCapture);
- };
-
- CanvasRenderer.prototype.destroy = function(){
- this.destroyed = true;
-
- for( var i = 0; i < this.bindings.length; i++ ){
- var binding = this.bindings[i];
- var b = binding;
-
- b.target.removeEventListener(b.event, b.handler, b.useCapture);
- }
- };
-
-
- CanvasRenderer.prototype.png = function(){
- var data = this.data;
-
- // Rasterize the layers, but only if container has nonzero size
- if (this.data.container.clientHeight > 0
- && this.data.container.clientWidth > 0) {
-
- context = data.bufferCanvases[1].getContext("2d");
- context.globalCompositeOperation = "copy";
- context.drawImage(data.canvases[4], 0, 0);
- context.globalCompositeOperation = "source-over";
- context.drawImage(data.canvases[2], 0, 0);
- context.drawImage(data.canvases[0], 0, 0);
-
- context = data.bufferCanvases[0].getContext("2d");
- context.globalCompositeOperation = "copy";
- context.drawImage(data.bufferCanvases[1], 0, 0);
- }
-
- var canvas = this.data.bufferCanvases[0];
-
- return canvas.toDataURL("image/png");
- };
-
- // @O Initialization functions
- {
- CanvasRenderer.prototype.load = function() {
- var r = this;
-
- // helper function to determine which child nodes and inner edges
- // of a compound node to be dragged as well as the grabbed and selected nodes
- var addDescendantsToDrag = function(node, addSelected, dragElements) {
- if (!addSelected)
- {
- var parents = node.parents();
-
- // do not process descendants for this node,
- // because those will be handled for the topmost selected parent
- for (var i=0; i < parents.size(); i++)
- {
- if (parents[i]._private.selected)
- {
- return;
- }
- }
- }
-
- var innerNodes = node.descendants();
-
- function hasNonAutoParent(ele){
- while( ele.parent().nonempty() && ele.parent().id() !== node.id() ){
- parent = ele.parent()[0];
- var pstyle = parent._private.style;
-
- if( pstyle.width.value !== 'auto' || pstyle.height.value !== 'auto' ){
- return true;
- }
-
- ele = ele.parent();
- }
-
- return false;
- }
-
- // TODO do not drag hidden children & children of hidden children?
- for (var i=0; i < innerNodes.size(); i++)
- {
- // if addSelected is true, then add node in any case,
- // if not, then add only non-selected nodes
- if ( (addSelected || !innerNodes[i]._private.selected) )
- {
- innerNodes[i]._private.rscratch.inDragLayer = true;
- //innerNodes[i].trigger(new $$.Event(e, {type: "grab"}));
- //innerNodes[i].trigger(event);
- dragElements.push(innerNodes[i]);
-
- for (var j=0; j < innerNodes[i]._private.edges.length; j++)
- {
- innerNodes[i]._private.edges[j]._private.rscratch.inDragLayer = true;
- }
- }
- }
- };
-
- // adds the given nodes, and its edges to the drag layer
- var addNodeToDrag = function(node, dragElements) {
- node._private.grabbed = true;
- node._private.rscratch.inDragLayer = true;
-
- dragElements.push(node);
-
- for (var i=0;i containerPageCoords[0] && e.pageX < containerPageCoords[0] + r.data.container.clientWidth
- && e.pageY > containerPageCoords[1] && e.pageY < containerPageCoords[1] + r.data.container.clientHeight) {
-
- } else {
- return;
- }
- }
-
- var cy = r.data.cy;
- var pos = r.projectIntoViewport(e.pageX, e.pageY);
- var select = r.data.select;
-
- var near = r.findNearestElement(pos[0], pos[1], true);
- var last = r.hoverData.last;
- var down = r.hoverData.down;
-
- var disp = [pos[0] - select[2], pos[1] - select[3]];
- var nodes = r.getCachedNodes();
- var edges = r.getCachedEdges();
-
- var draggedElements = r.dragData.possibleDragElements;
-
-
- var shiftDown = e.shiftKey;
-
-
- preventDefault = true;
-
- // Mousemove event
- {
- var event = new $$.Event(e, {type: "mousemove"});
-
- if (near != null) {
- near.trigger(event);
-
- } else if (near == null) {
- cy.trigger(event);
- }
-
- }
-
-
- // trigger context drag if rmouse down
- if( r.hoverData.which === 3 ){
- var cxtEvt = new $$.Event(e, {type: "cxtdrag"});
-
- if( down ){
- down.trigger( cxtEvt );
- } else {
- cy.trigger( cxtEvt );
- }
-
- r.hoverData.cxtDragged = true;
-
- // Check if we are drag panning the entire graph
- } else if (r.hoverData.dragging) {
- preventDefault = true;
-
- if( cy.panningEnabled() ){
- var deltaP = {x: disp[0] * cy.zoom(), y: disp[1] * cy.zoom()};
-
- cy.panBy( deltaP );
- }
-
- // Needs reproject due to pan changing viewport
- pos = r.projectIntoViewport(e.pageX, e.pageY);
-
- // Checks primary button down & out of time & mouse not moved much
- } else if (select[4] == 1 && (down == null || down.isEdge())
- && ( !cy.boxSelectionEnabled() || +new Date - r.hoverData.downTime >= panOrBoxSelectDelay )
- && (Math.abs(select[3] - select[1]) + Math.abs(select[2] - select[0]) < 4)
- && cy.panningEnabled() ) {
-
- r.hoverData.dragging = true;
- select[4] = 0;
-
- } else {
- // deactivate bg on box selection
- if (cy.boxSelectionEnabled() && Math.pow(select[2] - select[0], 2) + Math.pow(select[3] - select[1], 2) > 7 && select[4]){
- clearTimeout( r.bgActiveTimeout );
- }
-
- if( down && down.isEdge() && down.active() ){ down.unactivate(); }
-
- if (near != last) {
-
- if (last) { last.trigger(new $$.Event(e, {type: "mouseout"})); }
- if (near) { near.trigger(new $$.Event(e, {type: "mouseover"})); }
-
- r.hoverData.last = near;
- }
-
- if ( down && down.isNode() && r.nodeIsDraggable(down) ) {
- r.dragData.didDrag = true; // indicate that we actually did drag the node
-
- var toTrigger = [];
- for (var i=0; i 7 && select[4]) // not box selection
- && !r.hoverData.dragging // not panning
- ) {
-
- // console.log('unselect all from bg');
-
- //++clock+unselect
- // var a = time();
- cy.$(':selected').unselect();
-
- //++clock+unselect
- // console.log("unselect", time() - a);
-
- if (draggedElements.length > 0) {
- r.data.canvasNeedsRedraw[NODE] = true; r.data.canvasRedrawReason[NODE].push("De-select");
- }
-
- r.dragData.possibleDragElements = draggedElements = [];
- }
-
- // Click event
- {
- // console.log('trigger click et al');
-
- if (Math.pow(select[2] - select[0], 2) + Math.pow(select[3] - select[1], 2) == 0) {
- if (near != null) {
- near
- .trigger( new $$.Event(e, {type: "click"}) )
- .trigger( new $$.Event(e, {type: "tap"}) )
- .trigger( new $$.Event(e, {type: "vclick"}) )
- ;
- } else if (near == null) {
- cy
- .trigger( new $$.Event(e, {type: "click"}) )
- .trigger( new $$.Event(e, {type: "tap"}) )
- .trigger( new $$.Event(e, {type: "vclick"}) )
- ;
- }
- }
- }
-
- // Mouseup event
- {
- // console.log('trigger mouseup et al');
-
- if (near != null) {
- near
- .trigger(new $$.Event(e, {type: "mouseup"}))
- .trigger(new $$.Event(e, {type: "tapend"}))
- .trigger(new $$.Event(e, {type: "vmouseup"}))
- ;
- } else if (near == null) {
- cy
- .trigger(new $$.Event(e, {type: "mouseup"}))
- .trigger(new $$.Event(e, {type: "tapend"}))
- .trigger(new $$.Event(e, {type: "vmouseup"}))
- ;
- }
- }
-
- // Single selection
- if (near == down && !r.dragData.didDrag) {
- if (near != null && near._private.selectable) {
-
- // console.log('single selection')
-
- if( !shiftDown ){
- cy.$(':selected').unselect();
- }
-
- if( near.selected() ){
- near.unselect();
- } else {
- near.select();
- }
-
- updateAncestorsInDragLayer(near, false);
-
- r.data.canvasNeedsRedraw[NODE] = true; r.data.canvasRedrawReason[NODE].push("sglslct");
-
- }
- // Ungrab single drag
- } else if (near == down) {
- if (near != null && near._private.grabbed) {
- // console.log('ungrab single drag')
-
- var grabbedEles = cy.$(':grabbed');
-
- for(var i = 0; i < grabbedEles.length; i++){
- var ele = grabbedEles[i];
-
- ele._private.grabbed = false;
-
- var sEdges = ele._private.edges;
- for (var j=0;j 7 && select[4] ) {
- // console.log("box selection");
-
- if( !shiftDown ){
- cy.$(':selected').unselect();
- }
-
- var newlySelected = [];
- var box = r.getAllInBox(select[0], select[1], select[2], select[3]);
- // console.log(box);
- var event = new $$.Event(e, {type: "select"});
- for (var i=0;i 0) {
- r.data.canvasNeedsRedraw[NODE] = true; r.data.canvasRedrawReason[NODE].push("Selection");
- }
- }
-
- // Cancel drag pan
- r.hoverData.dragging = false;
-
- if (!select[4]) {
- // console.log('free at end', draggedElements)
- var freeEvent = new $$.Event(e, {type: "free"});
-
- for (var i=0;i 250) {
- if (r.touchData.start) {
- r.touchData.start.trigger(new $$.Event(e, {type: "taphold"}));
- } else {
- r.data.cy.trigger(new $$.Event(e, {type: "taphold"}));
-
- cy.$(':selected').unselect();
- }
-
-// console.log("taphold");
- }
- }, 1000);
- }
-
- r.redraw();
-
- }, false);
-
-// console.log = function(m){ $('#console').append(''+m+'
'); };
-
- r.registerBinding(window, "touchmove", function(e) {
-
- var select = r.data.select;
- var capture = r.touchData.capture; //if (!capture) { return; };
- capture && e.preventDefault();
-
- var cy = r.data.cy;
- var nodes = r.getCachedNodes(); var edges = r.getCachedEdges();
- var now = r.touchData.now; var earlier = r.touchData.earlier;
-
- if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].pageX, e.touches[0].pageY); now[0] = pos[0]; now[1] = pos[1]; }
- if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].pageX, e.touches[1].pageY); now[2] = pos[0]; now[3] = pos[1]; }
- if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].pageX, e.touches[2].pageY); now[4] = pos[0]; now[5] = pos[1]; }
- var disp = []; for (var j=0;j= 1.5 || distance2 >= 150 ){
- r.touchData.cxt = false;
- if( r.touchData.start ){ r.touchData.start.unactivate(); r.touchData.start = null; }
- r.data.bgActivePosistion = undefined;
- r.data.canvasNeedsRedraw[SELECT_BOX] = true;
-
- var cxtEvt = new $$.Event(e, {type: "cxttapend"});
- if( r.touchData.start ){
- r.touchData.start.trigger( cxtEvt );
- } else {
- cy.trigger( cxtEvt );
- }
- }
-
- }
-
- if( capture && r.touchData.cxt ){
- var cxtEvt = new $$.Event(e, {type: "cxtdrag"});
- r.data.bgActivePosistion = undefined;
- r.data.canvasNeedsRedraw[SELECT_BOX] = true;
-
- if( r.touchData.start ){
- r.touchData.start.trigger( cxtEvt );
- } else {
- cy.trigger( cxtEvt );
- }
-
- if( r.touchData.start ){ r.touchData.start._private.grabbed = false; }
- r.touchData.cxtDragged = true;
-
- //console.log('cxtdrag')
-
- } else if( capture && e.touches[2] && cy.boxSelectionEnabled() ){
- r.data.bgActivePosistion = undefined;
- clearTimeout( this.threeFingerSelectTimeout );
- this.lastThreeTouch = +new Date;
-
- r.data.canvasNeedsRedraw[SELECT_BOX] = true;
- r.data.canvasRedrawReason[SELECT_BOX].push("Touch moved, redraw selection box");
-
- if( !select || select.length === 0 || select[0] === undefined ){
- select[0] = (now[0] + now[2] + now[4])/3;
- select[1] = (now[1] + now[3] + now[5])/3;
- select[2] = (now[0] + now[2] + now[4])/3 + 1;
- select[3] = (now[1] + now[3] + now[5])/3 + 1;
- } else {
- select[2] = (now[0] + now[2] + now[4])/3;
- select[3] = (now[1] + now[3] + now[5])/3;
- }
-
- select[4] = 1;
-
- } else if ( capture && e.touches[1] && cy.zoomingEnabled() && cy.panningEnabled() ) { // two fingers => pinch to zoom
- r.data.bgActivePosistion = undefined;
- r.data.canvasNeedsRedraw[SELECT_BOX] = true;
-
- // console.log('touchmove ptz');
-
- // (x2, y2) for fingers 1 and 2
- var f1x2 = e.touches[0].pageX - offsetLeft, f1y2 = e.touches[0].pageY - offsetTop;
- var f2x2 = e.touches[1].pageX - offsetLeft, f2y2 = e.touches[1].pageY - offsetTop;
-
- // console.log( f1x2, f1y2 )
- // console.log( f2x2, f2y2 )
-
- var distance2 = distance( f1x2, f1y2, f2x2, f2y2 );
- var factor = distance2 / distance1;
-
- // console.log(distance2)
- // console.log(factor)
-
- if( factor != 1 && twoFingersStartInside){
-
- // console.log(factor)
- // console.log(distance2 + ' / ' + distance1);
- // console.log('--');
-
- // delta finger1
- var df1x = f1x2 - f1x1;
- var df1y = f1y2 - f1y1;
-
- // delta finger 2
- var df2x = f2x2 - f2x1;
- var df2y = f2y2 - f2y1;
-
- // translation is the normalised vector of the two fingers movement
- // i.e. so pinching cancels out and moving together pans
- var tx = (df1x + df2x)/2;
- var ty = (df1y + df2y)/2;
-
- // adjust factor by the speed multiplier
- // var speed = 1.5;
- // if( factor > 1 ){
- // factor = (factor - 1) * speed + 1;
- // } else {
- // factor = 1 - (1 - factor) * speed;
- // }
-
- // now calculate the zoom
- var zoom1 = cy.zoom();
- var zoom2 = zoom1 * factor;
- var pan1 = cy.pan();
-
- // the model center point converted to the current rendered pos
- var ctrx = modelCenter1[0] * zoom1 + pan1.x;
- var ctry = modelCenter1[1] * zoom1 + pan1.y;
-
- var pan2 = {
- x: -zoom2/zoom1 * (ctrx - pan1.x - tx) + ctrx,
- y: -zoom2/zoom1 * (ctry - pan1.y - ty) + ctry
- };
-
- // console.log(pan2);
- // console.log(zoom2);
-
- cy._private.zoom = zoom2;
- cy._private.pan = pan2;
- cy
- .trigger('pan zoom')
- .notify('viewport')
- ;
-
- distance1 = distance2;
- f1x1 = f1x2;
- f1y1 = f1y2;
- f2x1 = f2x2;
- f2y1 = f2y2;
-
- r.pinching = true;
- }
-
- // Re-project
- if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].pageX, e.touches[0].pageY); now[0] = pos[0]; now[1] = pos[1]; }
- if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].pageX, e.touches[1].pageY); now[2] = pos[0]; now[3] = pos[1]; }
- if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].pageX, e.touches[2].pageY); now[4] = pos[0]; now[5] = pos[1]; }
-
- } else if (e.touches[0]) {
- var start = r.touchData.start;
- var last = r.touchData.last;
-
- if ( start != null && start._private.group == "nodes" && r.nodeIsDraggable(start)) {
- var draggedEles = r.dragData.touchDragEles;
-
- for( var k = 0; k < draggedEles.length; k++ ){
- var draggedEle = draggedEles[k];
-
- if( r.nodeIsDraggable(draggedEle) ){
- r.dragData.didDrag = true;
-
- draggedEle._private.position.x += disp[0];
- draggedEle._private.position.y += disp[1];
-
- }
- }
-
- ( new $$.Collection(cy, draggedEles) )
- .trigger( new $$.Event(e, {type: "drag"}) )
- .trigger( new $$.Event(e, {type: "position"}) )
- ;
-
- r.data.canvasNeedsRedraw[DRAG] = true;
- r.data.canvasRedrawReason[DRAG].push("touchdrag node");
-
- if (r.touchData.startPosition[0] == earlier[0]
- && r.touchData.startPosition[1] == earlier[1]) {
-
- r.data.canvasNeedsRedraw[NODE] = true;
- r.data.canvasRedrawReason[NODE].push("node drag started");
- }
-
- }
-
- // Touchmove event
- {
- if (start != null) { start.trigger(new $$.Event(e, {type: "touchmove"})); }
-
- if (start == null) {
- var near = r.findNearestElement(now[0], now[1], true);
- if (near != null) { near.trigger(new $$.Event(e, {type: "touchmove"})); }
- if (near == null) { cy.trigger(new $$.Event(e, {type: "touchmove"})); }
- }
-
- if (near != last) {
- if (last) { last.trigger(new $$.Event(e, {type: "touchout"})); }
- if (near) { near.trigger(new $$.Event(e, {type: "touchover"})); }
- }
-
- r.touchData.last = near;
- }
-
- // Check to cancel taphold
- for (var i=0;i 4) {
-
- r.touchData.singleTouchMoved = true;
- }
- }
-
- if ( capture && (start == null || start.isEdge()) && cy.panningEnabled() ) {
- if( start ){
- start.unactivate();
-
- if( !r.data.bgActivePosistion ){
- r.data.bgActivePosistion = {
- x: now[0],
- y: now[1]
- };
- }
-
- r.data.canvasNeedsRedraw[SELECT_BOX] = true;
- r.data.canvasRedrawReason[SELECT_BOX].push("bgactive");
- }
-
- cy.panBy({x: disp[0] * cy.zoom(), y: disp[1] * cy.zoom()});
- r.swipePanning = true;
-
- // Re-project
- var pos = r.projectIntoViewport(e.touches[0].pageX, e.touches[0].pageY);
- now[0] = pos[0]; now[1] = pos[1];
- }
- }
-
- for (var j=0;j 0) {
- r.data.canvasNeedsRedraw[NODE] = true; r.data.canvasRedrawReason[NODE].push("Selection");
- }
-
- }, 100);
- }
-
- if( !e.touches[1] ){
- r.pinching = false;
- }
-
- var updateStartStyle = false;
-
- if( start != null ){
- start._private.active = false;
- updateStartStyle = true;
- start.trigger( new $$.Event(e, {type: "unactivate"}) );
- }
-
- if (e.touches[2]) {
- r.data.bgActivePosistion = undefined;
- } else if (e.touches[1]) {
-
- } else if (e.touches[0]) {
-
- // Last touch released
- } else if (!e.touches[0]) {
-
- r.data.bgActivePosistion = undefined;
-
- if (start != null ) {
-
- if (start._private.grabbed == true) {
- start._private.grabbed = false;
- start.trigger(new $$.Event(e, {type: "free"}));
- start._private.rscratch.inDragLayer = false;
- }
-
- var sEdges = start._private.edges;
- for (var j=0;j
- this.sqDistanceToQuadraticBezier(x, y,
- rs.startX,
- rs.startY,
- rs.cp2ax,
- rs.cp2ay,
- rs.selfEdgeMidX,
- rs.selfEdgeMidY)))
- ||
- (this.inBezierVicinity(x, y,
- rs.selfEdgeMidX,
- rs.selfEdgeMidY,
- rs.cp2cx,
- rs.cp2cy,
- rs.endX,
- rs.endY,
- Math.pow(edges[i]._private.style["width"].value/2, 2))
- &&
- (Math.pow(edges[i]._private.style["width"].value/2, 2) + edgeThreshold >
- this.sqDistanceToQuadraticBezier(x, y,
- rs.selfEdgeMidX,
- rs.selfEdgeMidY,
- rs.cp2cx,
- rs.cp2cy,
- rs.endX,
- rs.endY))))
- { addCurrentEdge = true; }
-
- } else if (rs.edgeType == "straight") {
- if (this.inLineVicinity(x, y, rs.startX, rs.startY, rs.endX, rs.endY, edges[i]._private.style["width"].value * 2)
- &&
- Math.pow(edges[i]._private.style["width"].value / 2, 2) + edgeThreshold >
- this.sqDistanceToFiniteLine(x, y,
- rs.startX,
- rs.startY,
- rs.endX,
- rs.endY))
- { addCurrentEdge = true; }
-
- } else if (rs.edgeType == "bezier") {
- if (this.inBezierVicinity(x, y,
- rs.startX,
- rs.startY,
- rs.cp2x,
- rs.cp2y,
- rs.endX,
- rs.endY,
- Math.pow(edges[i]._private.style["width"].value / 2, 2))
- &&
- (Math.pow(edges[i]._private.style["width"].value / 2 , 2) + edgeThreshold >
- this.sqDistanceToQuadraticBezier(x, y,
- rs.startX,
- rs.startY,
- rs.cp2x,
- rs.cp2y,
- rs.endX,
- rs.endY)))
- { addCurrentEdge = true; }
- }
-
- if (!near.length || near[near.length - 1] != edges[i]) {
- if ((arrowShapes[edges[i]._private.style["source-arrow-shape"].value].roughCollide(x, y,
- edges[i]._private.rscratch.arrowStartX, edges[i]._private.rscratch.arrowStartY,
- this.getArrowWidth(edges[i]._private.style["width"].value),
- this.getArrowHeight(edges[i]._private.style["width"].value),
- [edges[i]._private.rscratch.arrowStartX - edges[i].source()[0]._private.position.x,
- edges[i]._private.rscratch.arrowStartY - edges[i].source()[0]._private.position.y], 0)
- &&
- arrowShapes[edges[i]._private.style["source-arrow-shape"].value].collide(x, y,
- edges[i]._private.rscratch.arrowStartX, edges[i]._private.rscratch.arrowStartY,
- this.getArrowWidth(edges[i]._private.style["width"].value),
- this.getArrowHeight(edges[i]._private.style["width"].value),
- [edges[i]._private.rscratch.arrowStartX - edges[i].source()[0]._private.position.x,
- edges[i]._private.rscratch.arrowStartY - edges[i].source()[0]._private.position.y], 0))
- ||
- (arrowShapes[edges[i]._private.style["target-arrow-shape"].value].roughCollide(x, y,
- edges[i]._private.rscratch.arrowEndX, edges[i]._private.rscratch.arrowEndY,
- this.getArrowWidth(edges[i]._private.style["width"].value),
- this.getArrowHeight(edges[i]._private.style["width"].value),
- [edges[i]._private.rscratch.arrowEndX - edges[i].target()[0]._private.position.x,
- edges[i]._private.rscratch.arrowEndY - edges[i].target()[0]._private.position.y], 0)
- &&
- arrowShapes[edges[i]._private.style["target-arrow-shape"].value].collide(x, y,
- edges[i]._private.rscratch.arrowEndX, edges[i]._private.rscratch.arrowEndY,
- this.getArrowWidth(edges[i]._private.style["width"].value),
- this.getArrowHeight(edges[i]._private.style["width"].value),
- [edges[i]._private.rscratch.arrowEndX - edges[i].target()[0]._private.position.x,
- edges[i]._private.rscratch.arrowEndY - edges[i].target()[0]._private.position.y], 0)))
- { addCurrentEdge = true; }
- }
-
- if (addCurrentEdge) {
- if (visibleElementsOnly) {
- // For edges, make sure the edge is visible/has nonzero opacity,
- // then also make sure both source and target nodes are visible/have
- // nonzero opacity
- var source = data.cy.getElementById(edges[i]._private.data.source)
- var target = data.cy.getElementById(edges[i]._private.data.target)
-
- if (edges[i]._private.style["opacity"].value != 0
- && edges[i]._private.style["visibility"].value == "visible"
- && source._private.style["opacity"].value != 0
- && source._private.style["visibility"].value == "visible"
- && target._private.style["opacity"].value != 0
- && target._private.style["visibility"].value == "visible") {
-
- near.push(edges[i]);
- }
- } else {
- near.push(edges[i]);
- }
- }
- }
-
- near.sort( zOrderSort );
-
- if (near.length > 0) { return near[ near.length - 1 ]; } else { return null; }
- }
-
- // "Give me everything from this box"
- CanvasRenderer.prototype.getAllInBox = function(x1, y1, x2, y2) {
- var data = this.data; var nodes = this.getCachedNodes(); var edges = this.getCachedEdges(); var box = [];
-
- var x1c = Math.min(x1, x2); var x2c = Math.max(x1, x2); var y1c = Math.min(y1, y2); var y2c = Math.max(y1, y2); x1 = x1c; x2 = x2c; y1 = y1c; y2 = y2c; var heur;
-
- for (var i=0;i= 0; i--)
- {
- if (elements[i].isNode() &&
- (elements[i]._private.style["width"].value == "auto" ||
- elements[i]._private.style["height"].value == "auto") &&
- elements[i].children().length > 0)
- {
- var node = elements[i];
- var bounds = this.calcCompoundBounds(node);
-
- //console.log("%s : %o", node._private.data.id, bounds);
- node._private.position.x = bounds.x;
- node._private.position.y = bounds.y;
- node._private.autoWidth = bounds.width;
- node._private.autoHeight = bounds.height;
- }
- }
-
- };
-
- /**
- * Calculates rectangular bounds of a given compound node.
- * If the node is hidden, or none of its children is visible,
- * then instead of calculating the bounds, returns the last
- * calculated value.
- *
- * @param node a node with children (compound node)
- * @return {{x: number, y: number, width: number, height: number}}
- */
- CanvasRenderer.prototype.calcCompoundBounds = function(node)
- {
- // TODO assuming rectangular compounds, we may add support for other shapes in the future
-
- // this selection doesn't work if parent is invisible
- //var children = node.children(":visible").not(":removed");
-
- // consider only not removed children
- var children = node.descendants().not(":removed");
-
- // TODO instead of last calculated width & height define a default compound node size?
- // last calculated bounds
- var bounds = {x: node._private.position.x,
- y: node._private.position.y,
- width: node._private.autoWidth,
- height: node._private.autoHeight};
-
- // check node visibility
- if (node._private.style["visibility"].value != "visible")
- {
- // do not calculate bounds for invisible compounds,
- // just return last calculated values
- return bounds;
- }
-
- var visibleChildren = [];
-
- // find out visible children
- for (var i=0; i < children.size(); i++)
- {
- if (children[i]._private.style["visibility"].value == "visible")
- {
- visibleChildren.push(children[i]);
- }
- }
-
- if (visibleChildren.length == 0)
- {
- // no visible children, just return last calculated values
- return bounds;
- }
-
- // process only visible children
- children = visibleChildren;
-
- // find the leftmost, rightmost, topmost, and bottommost child node positions
- var leftBorder = this.borderValue(children, "left");
- var rightBorder = this.borderValue(children, "right");
- var topBorder = this.borderValue(children, "top");
- var bottomBorder = this.borderValue(children, "bottom");
-
- // take padding values into account in addition to border values
- var padding = this.getNodePadding(node);
- var x = (leftBorder - padding.left + rightBorder + padding.right) / 2;
- var y = (topBorder - padding.top + bottomBorder + padding.bottom) / 2;
- var width = (rightBorder - leftBorder) + padding.left + padding.right;
- var height = (bottomBorder - topBorder) + padding.top + padding.bottom;
-
- // it is not possible to use the function boundingBox() before
- // actually rendering the graph
-// var bBox = children.boundingBox();
-//
-// var x = (bBox.x1 + bBox.x2) / 2;
-// var y = (bBox.y1 + bBox.y2) / 2;
-// var width = bBox.width;
-// var height = bBox.height;
-
- bounds = {x: x,
- y: y,
- width: width,
- height: height};
-
- return bounds;
- };
-
- /**
- * Calculates the leftmost, rightmost, topmost or bottommost point for the given
- * set of nodes. If the type parameter is "left" (or "right"), then the min (or
- * the max) x-coordinate value will be returned. If the type is "top" (or "bottom")
- * then the min (or the max) y-coordinate value will be returned.
- *
- * This function is designed to help determining the bounds (bounding box) of
- * compound nodes.
- *
- * @param nodes set of nodes
- * @param type "left", "right", "top", "bottom"
- * @return {number} border value for the specified type
- */
- CanvasRenderer.prototype.borderValue = function(nodes, type)
- {
- var nodeVals, labelVals;
- var minValue = 1/0, maxValue = -1/0;
- var r = this;
-
- // helper function to determine node position and dimensions
- var calcNodePosAndDim = function(node) {
- var values = {};
-
- values.x = node._private.position.x;
- values.y = node._private.position.y;
- //values.width = r.getNodeWidth(node);
- //values.height = r.getNodeHeight(node);
- values.width = node.outerWidth();
- values.height = node.outerHeight();
-
- return values;
- };
-
- // helper function to determine label width
- var getLabelWidth = function(node)
- {
- var text = String(node._private.style["content"].value);
- var textTransform = node._private.style["text-transform"].value;
-
- if (textTransform == "none") {
- } else if (textTransform == "uppercase") {
- text = text.toUpperCase();
- } else if (textTransform == "lowercase") {
- text = text.toLowerCase();
- }
-
- // TODO width doesn't measure correctly without actually rendering
- var context = r.data.canvases[4].getContext("2d");
- return context.measureText(text).width;
- };
-
- // helper function to determine label position and dimensions
- var calcLabelPosAndDim = function(node) {
-
- var values = {};
- var nodeWidth = r.getNodeWidth(node);
- var nodeHeight = r.getNodeHeight(node);
-
-
- values.height = node._private.style["font-size"].value;
-
- // TODO ignoring label width for now, it may be a good idea to do so,
- // since longer label texts may increase the node size unnecessarily
- //values.width = getLabelWidth(node);
- values.width = values.height;
-
- var textHalign = node._private.style["text-halign"].strValue;
-
- if (textHalign == "left") {
- values.x = node._private.position.x - nodeWidth / 2;
- values.left = values.x - values.width;
- values.right = values.x;
- } else if (textHalign == "right") {
- values.x = node._private.position.x + nodeWidth / 2;
- values.left = values.x;
- values.right = values.x + values.width;
- } else { //if (textHalign == "center")
- values.x = node._private.position.x;
- values.left = values.x - values.width / 2;
- values.right = values.x + values.width / 2;
- }
-
- var textValign = node._private.style["text-valign"].strValue;
-
- if (textValign == "top") {
- values.y = node._private.position.y - nodeHeight / 2;
- values.top = values.y - values.height;
- values.bottom = values.y;
- } else if (textValign == "bottom") {
- values.y = node._private.position.y + nodeHeight / 2;
- values.top = values.y;
- values.bottom = values.y + values.height;
- } else { // if (textValign == "middle" || textValign == "center")
- values.y = node._private.position.y;
- values.top = values.y - values.height / 2;
- values.bottom = values.y + values.height / 2;
- }
-
- return values;
- };
-
-
-
- // find out border values by iterating given nodes
-
- for (i = 0; i < nodes.length; i++)
- {
- nodeVals = calcNodePosAndDim(nodes[i]);
- labelVals = calcLabelPosAndDim(nodes[i]);
-
- if (type == "left")
- {
- var leftBorder = Math.min(nodeVals.x - nodeVals.width / 2,
- labelVals.left);
-
- if (leftBorder < minValue)
- {
- minValue = leftBorder;
- }
- }
- else if (type == "right")
- {
- var rightBorder = Math.max(nodeVals.x + nodeVals.width / 2,
- labelVals.right);
-
- if (rightBorder > maxValue)
- {
- maxValue = rightBorder;
- }
- }
- else if (type == "top")
- {
- var topBorder = Math.min(nodeVals.y - nodeVals.height / 2,
- labelVals.top);
-
- if (topBorder < minValue)
- {
- minValue = topBorder;
- }
- }
- else if (type == "bottom")
- {
- var bottomBorder = Math.max(nodeVals.y + nodeVals.height / 2,
- labelVals.bottom);
-
- if (bottomBorder > maxValue)
- {
- maxValue = bottomBorder;
- }
- }
- }
-
- // return the border value according to the type
-
- if ((type == "left") || (type == "top"))
- {
- return minValue;
- }
- else
- {
- return maxValue;
- }
- };
-
- /**
- * Returns the width of the given node. If the width is set to auto,
- * returns the value of the autoWidth field.
- *
- * @param node a node
- * @return {number} width of the node
- */
- CanvasRenderer.prototype.getNodeWidth = function(node)
- {
- if (node._private.style["width"].value == "auto" ||
- node._private.style["height"].value == "auto")
- {
- return node._private.autoWidth;
- }
- else
- {
- return node._private.style["width"].value;
- }
- };
-
- /**
- * Returns the height of the given node. If the height is set to auto,
- * returns the value of the autoHeight field.
- *
- * @param node a node
- * @return {number} width of the node
- */
- CanvasRenderer.prototype.getNodeHeight = function(node)
- {
- if (node._private.style["width"].value == "auto" ||
- node._private.style["height"].value == "auto")
- {
- return node._private.autoHeight;
- }
- else
- {
- return node._private.style["height"].value;
- }
- };
-
- /**
- * Returns the shape of the given node. If the height or width of the given node
- * is set to auto, the node is considered to be a compound.
- *
- * @param node a node
- * @return {String} shape of the node
- */
- CanvasRenderer.prototype.getNodeShape = function(node)
- {
- // TODO only allow rectangle for a compound node?
-// if (node._private.style["width"].value == "auto" ||
-// node._private.style["height"].value == "auto")
-// {
-// return "rectangle";
-// }
-
- var shape = node._private.style["shape"].value;
-
- if( node.isParent() ){
- if( shape === 'rectangle' || shape === 'roundrectangle' ){
- return shape;
- } else {
- return 'rectangle';
- }
- }
-
- return shape;
- };
-
- CanvasRenderer.prototype.getNodePadding = function(node)
- {
- var left = node._private.style["padding-left"].value;
- var right = node._private.style["padding-right"].value;
- var top = node._private.style["padding-top"].value;
- var bottom = node._private.style["padding-bottom"].value;
-
- if (isNaN(left))
- {
- left = 0;
- }
-
- if (isNaN(right))
- {
- right = 0;
- }
-
- if (isNaN(top))
- {
- top = 0;
- }
-
- if (isNaN(bottom))
- {
- bottom = 0;
- }
-
- return {left : left,
- right : right,
- top : top,
- bottom : bottom};
- };
-
- // @O Keyboard functions
- {
- }
-
- // @O Drawing functions
- {
-
- // Resize canvas
- CanvasRenderer.prototype.matchCanvasSize = function(container) {
- var data = this.data; var width = container.clientWidth; var height = container.clientHeight;
-
- var canvas, canvasWidth = width, canvasHeight = height;
-
- if ('devicePixelRatio' in window) {
- canvasWidth *= devicePixelRatio;
- canvasHeight *= devicePixelRatio;
- }
-
- for (var i = 0; i < CANVAS_LAYERS; i++) {
-
- canvas = data.canvases[i];
-
- if (canvas.width !== canvasWidth || canvas.height !== canvasHeight) {
-
- canvas.width = canvasWidth;
- canvas.height = canvasHeight;
-
- canvas.style.width = width + 'px';
- canvas.style.height = height + 'px';
- }
- }
-
- for (var i = 0; i < BUFFER_COUNT; i++) {
-
- canvas = data.bufferCanvases[i];
-
- if (canvas.width !== canvasWidth || canvas.height !== canvasHeight) {
-
- canvas.width = canvasWidth;
- canvas.height = canvasHeight;
- }
- }
-
- this.data.overlay.style.width = width + 'px';
- this.data.overlay.style.height = height + 'px';
- }
-
-
- // helper function for the sort operation
- var elementDepth = function(ele) {
- if (ele._private.group == "nodes")
- {
- return ele.parents().size();
- }
- else if (ele._private.group == "edges")
- {
- return Math.max(ele.source()[0].parents().size(),
- ele.target()[0].parents().size());
- }
- else
- {
- return 0;
- }
- };
-
-
- CanvasRenderer.prototype.getCachedZSortedEles = function(){
- var lastNodes = this.lastZOrderCachedNodes;
- var lastEdges = this.lastZOrderCachedEdges;
- var nodes = this.getCachedNodes();
- var edges = this.getCachedEdges();
- var eles = [];
-
- if( !lastNodes || !lastEdges || lastNodes !== nodes || lastEdges !== edges ){
- //console.time('cachezorder')
-
- for( var i = 0; i < nodes.length; i++ ){
- eles.push( nodes[i] );
- }
-
- for( var i = 0; i < edges.length; i++ ){
- eles.push( edges[i] );
- }
-
- eles.sort( zOrderSort );
- this.cachedZSortedEles = eles;
- //console.log('make cache')
-
- //console.timeEnd('cachezorder')
- } else {
- eles = this.cachedZSortedEles;
- //console.log('read cache')
- }
-
- this.lastZOrderCachedNodes = nodes;
- this.lastZOrderCachedEdges = edges;
-
- return eles;
- };
-
-
- var zOrderSort = function(a, b) {
- var result = a._private.style["z-index"].value
- - b._private.style["z-index"].value;
-
- var depthA = 0;
- var depthB = 0;
-
- // no need to calculate element depth if there is no compound node
- if ( a.cy().hasCompoundNodes() )
- {
- depthA = elementDepth(a);
- depthB = elementDepth(b);
- }
-
- // if both elements has same depth,
- // then edges should be drawn first
- if (depthA - depthB === 0)
- {
- // "a" is a node, it should be drawn later
- if (a._private.group === "nodes"
- && b._private.group === "edges")
- {
- return 1;
- }
-
- // "a" is an edge, it should be drawn first
- else if (a._private.group === "edges"
- && b._private.group === "nodes")
- {
- return -1;
- }
-
- // both nodes or both edges
- else
- {
- if( result === 0 ){ // same z-index => compare indices in the core (order added to graph w/ last on top)
- return a._private.index - b._private.index;
- } else {
- return result;
- }
- }
- }
-
- // elements on different level
- else
- {
- // deeper element should be drawn later
- return depthA - depthB;
- }
-
- // return zero if z-index values are not the same
- return 0;
- };
-
- CanvasRenderer.prototype.renderTo = function( cxt, zoom, pan ){
- this.redraw( cxt, true, zoom, pan );
- };
-
- // Redraw frame
- CanvasRenderer.prototype.redraw = function( forcedContext, drawAll, forcedZoom, forcedPan ) {
- var r = this;
-
- if( this.averageRedrawTime === undefined ){ this.averageRedrawTime = 0; }
-
- var minRedrawLimit = 1000/60; // people can't see much better than 60fps
- var maxRedrawLimit = 1000; // don't cap max b/c it's more important to be responsive than smooth
-
- var redrawLimit = this.averageRedrawTime; // estimate the ideal redraw limit based on how fast we can draw
-
- redrawLimit = Math.max(minRedrawLimit, redrawLimit);
- redrawLimit = Math.min(redrawLimit, maxRedrawLimit);
-
- //console.log('--\nideal: %i; effective: %i', this.averageRedrawTime, redrawLimit);
-
- if( this.lastDrawTime === undefined ){ this.lastDrawTime = 0; }
-
- var nowTime = +new Date;
- var timeElapsed = nowTime - this.lastDrawTime;
- var callAfterLimit = timeElapsed >= redrawLimit;
-
- if( !forcedContext ){
- if( !callAfterLimit ){
- clearTimeout( this.redrawTimeout );
- this.redrawTimeout = setTimeout(function(){
- r.redraw();
- }, redrawLimit);
-
- return;
- }
-
- this.lastDrawTime = nowTime;
- }
-
-
- // start on thread ready
- setTimeout(function(){
-
- var startTime = nowTime;
-
- var looperMax = 100;
- //console.log('-- redraw --')
-
- // console.time('init'); for( var looper = 0; looper <= looperMax; looper++ ){
-
- var cy = r.data.cy; var data = r.data;
- var nodes = r.getCachedNodes(); var edges = r.getCachedEdges();
- r.matchCanvasSize(data.container);
-
- var zoom = cy.zoom();
- var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom;
- var pan = cy.pan();
- var effectivePan = {
- x: pan.x,
- y: pan.y
- };
-
- if( forcedPan ){
- effectivePan = forcedPan;
- }
-
- if( 'devicePixelRatio' in window ){
- effectiveZoom *= devicePixelRatio;
- effectivePan.x *= devicePixelRatio;
- effectivePan.y *= devicePixelRatio;
- }
-
- var elements = [];
- for( var i = 0; i < nodes.length; i++ ){
- elements.push( nodes[i] );
- }
- for( var i = 0; i < edges.length; i++ ){
- elements.push( edges[i] );
- }
-
- // } console.timeEnd('init')
-
-
-
- if (data.canvasNeedsRedraw[DRAG] || data.canvasNeedsRedraw[NODE] || drawAll) {
- //NB : VERY EXPENSIVE
- //console.time('edgectlpts'); for( var looper = 0; looper <= looperMax; looper++ ){
-
- if( r.hideEdgesOnViewport && (r.pinching || r.hoverData.dragging || r.data.wheel || r.swipePanning) ){
- } else {
- r.findEdgeControlPoints(edges);
- }
-
- //} console.timeEnd('edgectlpts')
-
-
-
- // console.time('sort'); for( var looper = 0; looper <= looperMax; looper++ ){
- var elements = r.getCachedZSortedEles();
- // } console.timeEnd('sort')
-
- // console.time('updatecompounds'); for( var looper = 0; looper <= looperMax; looper++ ){
- // no need to update graph if there is no compound node
- if ( cy.hasCompoundNodes() )
- {
- r.updateAllCompounds(elements);
- }
- // } console.timeEnd('updatecompounds')
- }
-
- var elesInDragLayer;
- var elesNotInDragLayer;
- var element;
-
-
- // console.time('drawing'); for( var looper = 0; looper <= looperMax; looper++ ){
- if (data.canvasNeedsRedraw[NODE] || drawAll) {
- // console.log("redrawing node layer", data.canvasRedrawReason[NODE]);
-
- if( !elesInDragLayer || !elesNotInDragLayer ){
- elesInDragLayer = [];
- elesNotInDragLayer = [];
-
- for (var index = 0; index < elements.length; index++) {
- element = elements[index];
-
- if ( element._private.rscratch.inDragLayer ) {
- elesInDragLayer.push( element );
- } else {
- elesNotInDragLayer.push( element );
- }
- }
- }
-
- var context = forcedContext || data.canvases[NODE].getContext("2d");
-
- context.setTransform(1, 0, 0, 1, 0, 0);
- context.clearRect(0, 0, context.canvas.width, context.canvas.height);
-
- if( !drawAll ){
- context.translate(effectivePan.x, effectivePan.y);
- context.scale(effectiveZoom, effectiveZoom);
- }
- if( forcedPan ){
- context.translate(forcedPan.x, forcedPan.y);
- }
- if( forcedZoom ){
- context.scale(forcedZoom, forcedZoom);
- }
-
- for (var index = 0; index < elesNotInDragLayer.length; index++) {
- element = elesNotInDragLayer[index];
-
- if (element._private.group == "nodes") {
- r.drawNode(context, element);
-
- } else if (element._private.group == "edges") {
- r.drawEdge(context, element);
- }
- }
-
- for (var index = 0; index < elesNotInDragLayer.length; index++) {
- element = elesNotInDragLayer[index];
-
- if (element._private.group == "nodes") {
- r.drawNodeText(context, element);
- } else if (element._private.group == "edges") {
- r.drawEdgeText(context, element);
- }
-
- // draw the overlay
- if (element._private.group == "nodes") {
- r.drawNode(context, element, true);
- } else if (element._private.group == "edges") {
- r.drawEdge(context, element, true);
- }
- }
-
- if( !drawAll ){
- data.canvasNeedsRedraw[NODE] = false; data.canvasRedrawReason[NODE] = [];
- }
- }
-
- if (data.canvasNeedsRedraw[DRAG] || drawAll) {
- // console.log("redrawing drag layer", data.canvasRedrawReason[DRAG]);
-
- if( !elesInDragLayer || !elesNotInDragLayer ){
- elesInDragLayer = [];
- elesNotInDragLayer = [];
-
- for (var index = 0; index < elements.length; index++) {
- element = elements[index];
-
- if ( element._private.rscratch.inDragLayer ) {
- elesInDragLayer.push( element );
- } else {
- elesNotInDragLayer.push( element );
- }
- }
- }
-
- var context = forcedContext || data.canvases[DRAG].getContext("2d");
-
- if( !drawAll ){
- context.setTransform(1, 0, 0, 1, 0, 0);
- context.clearRect(0, 0, context.canvas.width, context.canvas.height);
-
- context.translate(effectivePan.x, effectivePan.y);
- context.scale(effectiveZoom, effectiveZoom);
- }
- if( forcedPan ){
- context.translate(forcedPan.x, forcedPan.y);
- }
- if( forcedZoom ){
- context.scale(forcedZoom, forcedZoom);
- }
-
- var element;
-
- for (var index = 0; index < elesInDragLayer.length; index++) {
- element = elesInDragLayer[index];
-
- if (element._private.group == "nodes") {
- r.drawNode(context, element);
- } else if (element._private.group == "edges") {
- r.drawEdge(context, element);
- }
- }
-
- for (var index = 0; index < elesInDragLayer.length; index++) {
- element = elesInDragLayer[index];
-
- if (element._private.group == "nodes") {
- r.drawNodeText(context, element);
- } else if (element._private.group == "edges") {
- r.drawEdgeText(context, element);
- }
-
- // draw the overlay
- if (element._private.group == "nodes") {
- r.drawNode(context, element, true);
- } else if (element._private.group == "edges") {
- r.drawEdge(context, element, true);
- }
- }
-
- if( !drawAll ){
- data.canvasNeedsRedraw[DRAG] = false; data.canvasRedrawReason[DRAG] = [];
- }
- }
-
- if (data.canvasNeedsRedraw[SELECT_BOX]) {
- // console.log("redrawing selection box", data.canvasRedrawReason[SELECT_BOX]);
-
- var context = forcedContext || data.canvases[SELECT_BOX].getContext("2d");
-
- if( !drawAll ){
- context.setTransform(1, 0, 0, 1, 0, 0);
- context.clearRect(0, 0, context.canvas.width, context.canvas.height);
-
- context.translate(effectivePan.x, effectivePan.y);
- context.scale(effectiveZoom, effectiveZoom);
- }
- if( forcedPan ){
- context.translate(forcedPan.x, forcedPan.y);
- }
- if( forcedZoom ){
- context.scale(forcedZoom, forcedZoom);
- }
-
- var coreStyle = cy.style()._private.coreStyle;
-
- if (data.select[4] == 1) {
- var zoom = data.cy.zoom();
- var borderWidth = coreStyle["selection-box-border-width"].value / zoom;
-
- context.lineWidth = borderWidth;
- context.fillStyle = "rgba("
- + coreStyle["selection-box-color"].value[0] + ","
- + coreStyle["selection-box-color"].value[1] + ","
- + coreStyle["selection-box-color"].value[2] + ","
- + coreStyle["selection-box-opacity"].value + ")";
-
- context.fillRect(
- data.select[0],
- data.select[1],
- data.select[2] - data.select[0],
- data.select[3] - data.select[1]);
-
- if (borderWidth > 0) {
- context.strokeStyle = "rgba("
- + coreStyle["selection-box-border-color"].value[0] + ","
- + coreStyle["selection-box-border-color"].value[1] + ","
- + coreStyle["selection-box-border-color"].value[2] + ","
- + coreStyle["selection-box-opacity"].value + ")";
-
- context.strokeRect(
- data.select[0],
- data.select[1],
- data.select[2] - data.select[0],
- data.select[3] - data.select[1]);
- }
- }
-
- if( data.bgActivePosistion ){
- var zoom = data.cy.zoom();
- var pos = data.bgActivePosistion;
-
- context.fillStyle = "rgba("
- + coreStyle["active-bg-color"].value[0] + ","
- + coreStyle["active-bg-color"].value[1] + ","
- + coreStyle["active-bg-color"].value[2] + ","
- + coreStyle["active-bg-opacity"].value + ")";
-
- context.beginPath();
- context.arc(pos.x, pos.y, coreStyle["active-bg-size"].pxValue / zoom, 0, 2 * Math.PI);
- context.fill();
- }
-
- if( !drawAll ){
- data.canvasNeedsRedraw[SELECT_BOX] = false; data.canvasRedrawReason[SELECT_BOX] = [];
- }
- }
-
- if( r.options.showOverlay ){
- var context = data.canvases[OVERLAY].getContext("2d");
-
- context.lineJoin = 'round';
- context.font = '14px helvetica';
- context.strokeStyle = '#fff';
- context.lineWidth = '4';
- context.fillStyle = '#666';
- context.textAlign = 'right';
-
- var text = 'cytoscape.js';
-
- var w = context.canvas.width;
- var h = context.canvas.height;
- var p = 4;
- var tw = context.measureText(text).width;
- var th = 14;
-
- context.clearRect(0, 0, w, h);
- context.strokeText(text, w - p, h - p);
- context.fillText(text, w - p, h - p);
-
- data.overlayDrawn = true;
- }
-
- // } console.timeEnd('drawing')
-
- var endTime = +new Date;
-
- if( r.averageRedrawTime === undefined ){
- r.averageRedrawTime = endTime - startTime;
- }
-
- // use a weighted average with a bias from the previous average so we don't spike so easily
- r.averageRedrawTime = r.averageRedrawTime/2 + (endTime - startTime)/2;
- //console.log('actual: %i, average: %i', endTime - startTime, this.averageRedrawTime);
-
-
- // end on thread ready
- }, 0);
- };
-
- var imageCache = {};
-
- // Discard after 5 min. of disuse
- var IMAGE_KEEP_TIME = 30 * 300; // 300frames@30fps, or. 5min
-
- CanvasRenderer.prototype.getCachedImage = function(url, onLoadRedraw) {
-
- if (imageCache[url] && imageCache[url].image) {
-
- // Reset image discard timer
- imageCache[url].keepTime = IMAGE_KEEP_TIME;
- return imageCache[url].image;
- }
-
- var imageContainer = imageCache[url];
-
- if (imageContainer == undefined) {
- imageCache[url] = new Object();
- imageCache[url].image = new Image();
- imageCache[url].image.onload = onLoadRedraw;
-
- imageCache[url].image.src = url;
-
- // Initialize image discard timer
- imageCache[url].keepTime = IMAGE_KEEP_TIME;
-
- imageContainer = imageCache[url];
- }
-
- return imageContainer.image;
- }
-
- // Attempt to replace the image object with a canvas buffer to solve zooming problem
- CanvasRenderer.prototype.swapCachedImage = function(url) {
- if (imageCache[url]) {
-
- if (imageCache[url].image
- && imageCache[url].image.complete) {
-
- var image = imageCache[url].image;
-
- var buffer = document.createElement("canvas");
- buffer.width = image.width;
- buffer.height = image.height;
-
- buffer.getContext("2d").drawImage(image,
- 0, 0
- );
-
- imageCache[url].image = buffer;
- imageCache[url].swappedWithCanvas = true;
-
- return buffer;
- } else {
- return null;
- }
- } else {
- return null;
- }
- }
-
- CanvasRenderer.prototype.updateImageCaches = function() {
-
- for (var url in imageCache) {
- if (imageCache[url].keepTime <= 0) {
-
- if (imageCache[url].image != undefined) {
- imageCache[url].image.src = undefined;
- imageCache[url].image = undefined;
- }
-
- imageCache[url] = undefined;
- } else {
- imageCache[url] -= 1;
- }
- }
- }
-
- CanvasRenderer.prototype.drawImage = function(context, x, y, widthScale, heightScale, rotationCW, image) {
-
- image.widthScale = 0.5;
- image.heightScale = 0.5;
-
- image.rotate = rotationCW;
-
- var finalWidth; var finalHeight;
-
- canvas.drawImage(image, x, y);
- }
-
- // Draw edge
- CanvasRenderer.prototype.drawEdge = function(context, edge, drawOverlayInstead) {
-
- if( this.hideEdgesOnViewport && (this.dragData.didDrag || this.pinching || this.hoverData.dragging || this.data.wheel || this.swipePanning) ){ return; } // save cycles on pinching
-
- var startNode, endNode;
-
- startNode = edge.source()[0];
- endNode = edge.target()[0];
-
- if (edge._private.style["visibility"].value != "visible"
- || startNode._private.style["visibility"].value != "visible"
- || endNode._private.style["visibility"].value != "visible") {
- return;
- }
-
- var overlayPadding = edge._private.style["overlay-padding"].value;
- var overlayOpacity = edge._private.style["overlay-opacity"].value;
- var overlayColor = edge._private.style["overlay-color"].value;
-
- // Edge color & opacity
- if( drawOverlayInstead ){
- context.strokeStyle = "rgba( " + overlayColor[0] + ", " + overlayColor[1] + ", " + overlayColor[2] + ", " + overlayOpacity + " )";
- context.lineCap = "round";
-
- if( edge._private.rscratch.edgeType == "self"){
- context.lineCap = "butt";
- }
-
- } else {
- context.strokeStyle = "rgba("
- + edge._private.style["line-color"].value[0] + ","
- + edge._private.style["line-color"].value[1] + ","
- + edge._private.style["line-color"].value[2] + ","
- + edge._private.style.opacity.value + ")";
- }
-
- // Edge line width
- if (edge._private.style["width"].value <= 0) {
- return;
- }
-
- var edgeWidth = edge._private.style["width"].value + (drawOverlayInstead ? 2 * overlayPadding : 0);
- var lineStyle = drawOverlayInstead ? "solid" : edge._private.style["line-style"].value;
- context.lineWidth = edgeWidth;
-
- this.findEndpoints(edge);
-
- if (edge._private.rscratch.edgeType == "self") {
-
- var details = edge._private.rscratch;
- this.drawStyledEdge(edge, context, [details.startX, details.startY, details.cp2ax,
- details.cp2ay, details.selfEdgeMidX, details.selfEdgeMidY],
- lineStyle,
- edgeWidth);
-
- this.drawStyledEdge(edge, context, [details.selfEdgeMidX, details.selfEdgeMidY,
- details.cp2cx, details.cp2cy, details.endX, details.endY],
- lineStyle,
- edgeWidth);
-
- } else if (edge._private.rscratch.edgeType == "straight") {
-
- var nodeDirectionX = endNode._private.position.x - startNode._private.position.x;
- var nodeDirectionY = endNode._private.position.y - startNode._private.position.y;
-
- var edgeDirectionX = edge._private.rscratch.endX - edge._private.rscratch.startX;
- var edgeDirectionY = edge._private.rscratch.endY - edge._private.rscratch.startY;
-
- if (nodeDirectionX * edgeDirectionX
- + nodeDirectionY * edgeDirectionY < 0) {
-
- edge._private.rscratch.straightEdgeTooShort = true;
- } else {
-
- var details = edge._private.rscratch;
- this.drawStyledEdge(edge, context, [details.startX, details.startY,
- details.endX, details.endY],
- lineStyle,
- edgeWidth);
-
- edge._private.rscratch.straightEdgeTooShort = false;
- }
- } else {
-
- var details = edge._private.rscratch;
- this.drawStyledEdge(edge, context, [details.startX, details.startY,
- details.cp2x, details.cp2y, details.endX, details.endY],
- lineStyle,
- edgeWidth);
-
- }
-
- if (edge._private.rscratch.noArrowPlacement !== true
- && edge._private.rscratch.startX !== undefined) {
- this.drawArrowheads(context, edge, drawOverlayInstead);
- }
-
- }
-
- var _genPoints = function(pt, spacing, even) {
-
- var approxLen = Math.sqrt(Math.pow(pt[4] - pt[0], 2) + Math.pow(pt[5] - pt[1], 2));
- approxLen += Math.sqrt(Math.pow((pt[4] + pt[0]) / 2 - pt[2], 2) + Math.pow((pt[5] + pt[1]) / 2 - pt[3], 2));
-
- var pts = Math.ceil(approxLen / spacing); var inc = approxLen / spacing;
- var pz;
-
- if (pts > 0) {
- pz = new Array(pts * 2);
- } else {
- return null;
- }
-
- for (var i = 0; i < pts; i++) {
- var cur = i / pts;
- pz[i * 2] = pt[0] * (1 - cur) * (1 - cur) + 2 * (pt[2]) * (1 - cur) * cur + pt[4] * (cur) * (cur);
- pz[i * 2 + 1] = pt[1] * (1 - cur) * (1 - cur) + 2 * (pt[3]) * (1 - cur) * cur + pt[5] * (cur) * (cur);
- }
-
- return pz;
- }
-
- var _genStraightLinePoints = function(pt, spacing, even) {
-
- var approxLen = Math.sqrt(Math.pow(pt[2] - pt[0], 2) + Math.pow(pt[3] - pt[1], 2));
-
- var pts = Math.ceil(approxLen / spacing);
- var pz;
-
- if (pts > 0) {
- pz = new Array(pts * 2);
- } else {
- return null;
- }
-
- var lineOffset = [pt[2] - pt[0], pt[3] - pt[1]];
- for (var i = 0; i < pts; i++) {
- var cur = i / pts;
- pz[i * 2] = lineOffset[0] * cur + pt[0];
- pz[i * 2 + 1] = lineOffset[1] * cur + pt[1];
- }
-
- return pz;
- }
-
- var _genEvenOddpts = function(pt, evenspac, oddspac) {
-
- pt1 = _genpts(pt, evenspac);
- pt2 = _genpts(pt, oddspac);
- }
-
- CanvasRenderer.prototype.createBuffer = function(w, h) {
- var buffer = document.createElement("canvas");
- buffer.width = w;
- buffer.height = h;
-
- return [buffer, buffer.getContext("2d")];
- }
-
- /*
- CanvasRenderer.prototype.
-
- CanvasRenderer.prototype.drawStraightEdge = function(context, x1, y1, x2, y2, type, width) {
-
- if (type == "solid") {
- context.beginPath();
- context.moveTo(
- edge._private.rscratch.startX,
- edge._private.rscratch.startY);
-
-
- context.stroke();
- } else if (type == "dotted") {
- var pt = _genStraightLinePoints([x1, y1, x2, y2], 10, false);
-
-
- } else if (type == "dashed") {
- var pt = _genStraightLinePoints([x1, y1, x2, y2], 10, false);
- }
-
- }
- */
-
- CanvasRenderer.prototype.drawStyledEdge = function(
- edge, context, pts, type, width) {
-
- // 3 points given -> assume Bezier
- // 2 -> assume straight
-
- var cy = this.data.cy;
- var zoom = cy.zoom();
-
- // Adjusted edge width for dotted
-// width = Math.max(width * 1.6, 3.4) * zoom;
-
- // console.log("w", width);
-
- // from http://en.wikipedia.org/wiki/Bézier_curve#Quadratic_curves
- function qbezierAt(p0, p1, p2, t){
- return (1 - t)*(1 - t)*p0 + 2*(1 - t)*t*p1 + t*t*p2;
- }
-
- if( edge._private.rstyle.bezierPts === undefined ){
- edge._private.rstyle.bezierPts = [];
- }
-
- var nBpts = edge._private.rstyle.bezierPts.length;
- if( edge.isLoop() ){
- if( nBpts >= 12 ){
- edge._private.rstyle.bezierPts = [];
- } else {
- // append to current array
- }
- } else {
- edge._private.rstyle.bezierPts = [];
- }
-
- var bpts = edge._private.rstyle.bezierPts;
-
- if( pts.length === 6 ){
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.05 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.05 )
- });
-
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.25 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.25 )
- });
-
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.35 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.35 )
- });
-
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.65 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.65 )
- });
-
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.75 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.75 )
- });
-
- bpts.push({
- x: qbezierAt( pts[0], pts[2], pts[4], 0.95 ),
- y: qbezierAt( pts[1], pts[3], pts[5], 0.95 )
- });
- }
-
- if (type == "solid") {
-
- context.beginPath();
- context.moveTo(pts[0], pts[1]);
- if (pts.length == 3 * 2) {
- context.quadraticCurveTo(pts[2], pts[3], pts[4], pts[5]);
- } else {
- context.lineTo(pts[2], pts[3]);
- }
-// context.closePath();
- context.stroke();
-
- } else if (type == "dotted") {
-
- var pt;
- if (pts.length == 3 * 2) {
- pt = _genPoints(pts, 16, true);
- } else {
- pt = _genStraightLinePoints(pts, 16, true);
- }
-
- if (!pt) { return; }
-
- var dotRadius = Math.max(width * 1.6, 3.4) * zoom;
- var bufW = dotRadius * 2, bufH = dotRadius * 2;
- bufW = Math.max(bufW, 1);
- bufH = Math.max(bufH, 1);
-
- var buffer = this.createBuffer(bufW, bufH);
-
- var context2 = buffer[1];
-// console.log(buffer);
-// console.log(bufW, bufH);
-
- // Draw on buffer
- context2.setTransform(1, 0, 0, 1, 0, 0);
- context2.clearRect(0, 0, bufW, bufH);
-
- context2.fillStyle = context.strokeStyle;
- context2.beginPath();
- context2.arc(bufW/2, bufH/2, dotRadius * 0.5, 0, Math.PI * 2, false);
- context2.fill();
-
- // Now use buffer
- context.beginPath();
- //context.save();
-
- for (var i=0; i 0) {
- context.stroke();
- }
-
-
- // draw the overlay
- } else {
-
- var overlayPadding = node._private.style["overlay-padding"].value;
- var overlayOpacity = node._private.style["overlay-opacity"].value;
- var overlayColor = node._private.style["overlay-color"].value;
- if( overlayOpacity > 0 ){
- context.fillStyle = "rgba( " + overlayColor[0] + ", " + overlayColor[1] + ", " + overlayColor[2] + ", " + overlayOpacity + " )";
-
- nodeShapes[this.getNodeShape(node)].draw(
- context,
- node._private.position.x,
- node._private.position.y,
- nodeWidth + overlayPadding * 2,
- nodeHeight + overlayPadding * 2
- );
- }
- }
-
- };
-
- CanvasRenderer.prototype.drawInscribedImage = function(context, img, node) {
- var r = this;
-// console.log(this.data);
- var zoom = this.data.cy._private.zoom;
-
- var nodeX = node._private.position.x;
- var nodeY = node._private.position.y;
-
- //var nodeWidth = node._private.style["width"].value;
- //var nodeHeight = node._private.style["height"].value;
- var nodeWidth = this.getNodeWidth(node);
- var nodeHeight = this.getNodeHeight(node);
-
- context.save();
-
- nodeShapes[r.getNodeShape(node)].drawPath(
- context,
- nodeX, nodeY,
- nodeWidth, nodeHeight);
-
- context.clip();
-
-// context.setTransform(1, 0, 0, 1, 0, 0);
-
- var imgDim = [img.width, img.height];
- context.drawImage(img,
- nodeX - imgDim[0] / 2,
- nodeY - imgDim[1] / 2,
- imgDim[0],
- imgDim[1]);
-
- context.restore();
-
- if (node._private.style["border-width"].value > 0) {
- context.stroke();
- }
-
- };
-
- // Draw node text
- CanvasRenderer.prototype.drawNodeText = function(context, node) {
-
- if (node._private.style["visibility"].value != "visible") {
- return;
- }
-
- var computedSize = node._private.style["font-size"].pxValue * node.cy().zoom();
- var minSize = node._private.style["min-zoomed-font-size"].pxValue;
-
- if( computedSize < minSize ){
- return;
- }
-
- var textX, textY;
-
- //var nodeWidth = node._private.style["width"].value;
- //var nodeHeight = node._private.style["height"].value;
- var nodeWidth = this.getNodeWidth(node);
- var nodeHeight = this.getNodeHeight(node);
-
- // Find text position
- var textHalign = node._private.style["text-halign"].strValue;
- if (textHalign == "left") {
- // Align right boundary of text with left boundary of node
- context.textAlign = "right";
- textX = node._private.position.x - nodeWidth / 2;
- } else if (textHalign == "right") {
- // Align left boundary of text with right boundary of node
- context.textAlign = "left";
- textX = node._private.position.x + nodeWidth / 2;
- } else if (textHalign == "center") {
- context.textAlign = "center";
- textX = node._private.position.x;
- } else {
- // Same as center
- context.textAlign = "center";
- textX = node._private.position.x;
- }
-
- var textValign = node._private.style["text-valign"].strValue;
- if (textValign == "top") {
- context.textBaseline = "bottom";
- textY = node._private.position.y - nodeHeight / 2;
- } else if (textValign == "bottom") {
- context.textBaseline = "top";
- textY = node._private.position.y + nodeHeight / 2;
- } else if (textValign == "middle" || textValign == "center") {
- context.textBaseline = "middle";
- textY = node._private.position.y;
- } else {
- // same as center
- context.textBaseline = "middle";
- textY = node._private.position.y;
- }
-
- this.drawText(context, node, textX, textY);
- };
-
- // Draw text
- CanvasRenderer.prototype.drawText = function(context, element, textX, textY) {
-
- var parentOpacity = 1;
- var parents = element.parents();
- for( var i = 0; i < parents.length; i++ ){
- var parent = parents[i];
- var opacity = parent._private.style.opacity.value;
-
- parentOpacity = opacity * parentOpacity;
-
- if( opacity === 0 ){
- return;
- }
- }
-
- // Font style
- var labelStyle = element._private.style["font-style"].strValue;
- var labelSize = element._private.style["font-size"].value + "px";
- var labelFamily = element._private.style["font-family"].strValue;
- var labelVariant = element._private.style["font-variant"].strValue;
- var labelWeight = element._private.style["font-weight"].strValue;
-
- context.font = labelStyle + " " + labelWeight + " "
- + labelSize + " " + labelFamily;
-
- var text = String(element._private.style["content"].value);
- var textTransform = element._private.style["text-transform"].value;
-
- if (textTransform == "none") {
- } else if (textTransform == "uppercase") {
- text = text.toUpperCase();
- } else if (textTransform == "lowercase") {
- text = text.toLowerCase();
- }
-
- // Calculate text draw position based on text alignment
-
- // so text outlines aren't jagged
- context.lineJoin = 'round';
-
- context.fillStyle = "rgba("
- + element._private.style["color"].value[0] + ","
- + element._private.style["color"].value[1] + ","
- + element._private.style["color"].value[2] + ","
- + (element._private.style["text-opacity"].value
- * element._private.style["opacity"].value * parentOpacity) + ")";
-
- context.strokeStyle = "rgba("
- + element._private.style["text-outline-color"].value[0] + ","
- + element._private.style["text-outline-color"].value[1] + ","
- + element._private.style["text-outline-color"].value[2] + ","
- + (element._private.style["text-opacity"].value
- * element._private.style["opacity"].value * parentOpacity) + ")";
-
- if (text != undefined) {
- var lineWidth = 2 * element._private.style["text-outline-width"].value; // *2 b/c the stroke is drawn centred on the middle
- if (lineWidth > 0) {
- context.lineWidth = lineWidth;
- context.strokeText(text, textX, textY);
- }
-
- // Thanks sysord@github for the isNaN checks!
- if (isNaN(textX)) { textX = 0; }
- if (isNaN(textY)) { textY = 0; }
-
- context.fillText("" + text, textX, textY);
-
- // record the text's width for use in bounding box calc
- element._private.rstyle.labelWidth = context.measureText( text ).width;
- }
- };
-
- CanvasRenderer.prototype.drawBackground = function(context, color1, color2,
- startPosition, endPosition) {
-
-
- }
-
- // @O Edge calculation functions
- {
-
- // Find edge control points
- CanvasRenderer.prototype.findEdgeControlPoints = function(edges) {
- var hashTable = {}; var cy = this.data.cy;
- var pairIds = [];
-
- var pairId;
- for (var i = 0; i < edges.length; i++) {
- pairId = edges[i]._private.data.source > edges[i]._private.data.target ?
- edges[i]._private.data.target + '-' + edges[i]._private.data.source :
- edges[i]._private.data.source + '-' + edges[i]._private.data.target ;
-
- if (hashTable[pairId] == undefined) {
- hashTable[pairId] = [];
- }
-
- hashTable[pairId].push( edges[i] );
- pairIds.push( pairId );
- }
- var src, tgt;
-
- // Nested for loop is OK; total number of iterations for both loops = edgeCount
- for (var p = 0; p < pairIds.length; p++) {
- pairId = pairIds[p];
-
- src = cy.getElementById( hashTable[pairId][0]._private.data.source );
- tgt = cy.getElementById( hashTable[pairId][0]._private.data.target );
-
- var midPointX = (src._private.position.x + tgt._private.position.x) / 2;
- var midPointY = (src._private.position.y + tgt._private.position.y) / 2;
-
- var displacementX, displacementY;
-
- if (hashTable[pairId].length > 1) {
- displacementX = tgt._private.position.y - src._private.position.y;
- displacementY = src._private.position.x - tgt._private.position.x;
-
- var displacementLength = Math.sqrt(displacementX * displacementX
- + displacementY * displacementY);
-
- displacementX /= displacementLength;
- displacementY /= displacementLength;
- }
-
- var edge;
-
- for (var i = 0; i < hashTable[pairId].length; i++) {
- edge = hashTable[pairId][i];
-
- var edgeIndex1 = edge._private.rscratch.lastEdgeIndex;
- var edgeIndex2 = i;
-
- var numEdges1 = edge._private.rscratch.lastNumEdges;
- var numEdges2 = hashTable[pairId].length;
-
- var srcX1 = edge._private.rscratch.lastSrcCtlPtX;
- var srcX2 = src._private.position.x;
- var srcY1 = edge._private.rscratch.lastSrcCtlPtY;
- var srcY2 = src._private.position.y;
- var srcW1 = edge._private.rscratch.lastSrcCtlPtW;
- var srcW2 = src.outerWidth();
- var srcH1 = edge._private.rscratch.lastSrcCtlPtH;
- var srcH2 = src.outerHeight();
-
- var tgtX1 = edge._private.rscratch.lastTgtCtlPtX;
- var tgtX2 = tgt._private.position.x;
- var tgtY1 = edge._private.rscratch.lastTgtCtlPtY;
- var tgtY2 = tgt._private.position.y;
- var tgtW1 = edge._private.rscratch.lastTgtCtlPtW;
- var tgtW2 = tgt.outerWidth();
- var tgtH1 = edge._private.rscratch.lastTgtCtlPtH;
- var tgtH2 = tgt.outerHeight();
-
- if( srcX1 === srcX2 && srcY1 === srcY2 && srcW1 === srcW2 && srcH1 === srcH2
- && tgtX1 === tgtX2 && tgtY1 === tgtY2 && tgtW1 === tgtW2 && tgtH1 === tgtH2
- && edgeIndex1 === edgeIndex2 && numEdges1 === numEdges2 ){
- // console.log('edge ctrl pt cache HIT')
- continue; // then the control points haven't changed and we can skip calculating them
- } else {
- var rs = edge._private.rscratch;
-
- rs.lastSrcCtlPtX = srcX2;
- rs.lastSrcCtlPtY = srcY2;
- rs.lastSrcCtlPtW = srcW2;
- rs.lastSrcCtlPtH = srcH2;
- rs.lastTgtCtlPtX = tgtX2;
- rs.lastTgtCtlPtY = tgtY2;
- rs.lastTgtCtlPtW = tgtW2;
- rs.lastTgtCtlPtH = tgtH2;
- rs.lastEdgeIndex = edgeIndex2;
- rs.lastNumEdges = numEdges2;
- // console.log('edge ctrl pt cache MISS')
- }
-
- // Self-edge
- if (src._private.data.id == tgt._private.data.id) {
- var stepSize = edge._private.style["control-point-step-size"].pxValue;
-
- edge._private.rscratch.edgeType = "self";
-
- // New -- fix for large nodes
- edge._private.rscratch.cp2ax = src._private.position.x;
- edge._private.rscratch.cp2ay = src._private.position.y
- - (1 + Math.pow(this.getNodeHeight(src), 1.12) / 100) * stepSize * (i / 3 + 1);
-
- edge._private.rscratch.cp2cx = src._private.position.x
- - (1 + Math.pow(this.getNodeWidth(src), 1.12) / 100) * stepSize * (i / 3 + 1);
- edge._private.rscratch.cp2cy = src._private.position.y;
-
- edge._private.rscratch.selfEdgeMidX =
- (edge._private.rscratch.cp2ax + edge._private.rscratch.cp2cx) / 2.0;
-
- edge._private.rscratch.selfEdgeMidY =
- (edge._private.rscratch.cp2ay + edge._private.rscratch.cp2cy) / 2.0;
-
- // Straight edge
- } else if (hashTable[pairId].length % 2 == 1
- && i == Math.floor(hashTable[pairId].length / 2)) {
-
- edge._private.rscratch.edgeType = "straight";
-
- // Bezier edge
- } else {
- var stepSize = edge._private.style["control-point-step-size"].value;
- var distanceFromMidpoint = (0.5 - hashTable[pairId].length / 2 + i) * stepSize;
-
- edge._private.rscratch.edgeType = "bezier";
-
- edge._private.rscratch.cp2x = midPointX
- + displacementX * distanceFromMidpoint;
- edge._private.rscratch.cp2y = midPointY
- + displacementY * distanceFromMidpoint;
-
- // console.log(edge, midPointX, displacementX, distanceFromMidpoint);
- }
- }
- }
-
- return hashTable;
- }
-
- CanvasRenderer.prototype.findEndpoints = function(edge) {
- var intersect;
-
- var source = edge.source()[0];
- var target = edge.target()[0];
-
-// var sourceRadius = Math.max(edge.source()[0]._private.style["width"].value,
-// edge.source()[0]._private.style["height"].value);
-
- var sourceRadius = Math.max(this.getNodeWidth(source),
- this.getNodeHeight(source));
-
-// var targetRadius = Math.max(edge.target()[0]._private.style["width"].value,
-// edge.target()[0]._private.style["height"].value);
-
- var targetRadius = Math.max(this.getNodeWidth(target),
- this.getNodeHeight(target));
-
- sourceRadius = 0;
- targetRadius /= 2;
-
- var start = [edge.source().position().x, edge.source().position().y];
- var end = [edge.target().position().x, edge.target().position().y];
-
- if (edge._private.rscratch.edgeType == "self") {
-
- var cp = [edge._private.rscratch.cp2cx, edge._private.rscratch.cp2cy];
-
- intersect = nodeShapes[this.getNodeShape(target)].intersectLine(
- target._private.position.x,
- target._private.position.y,
- //target._private.style["width"].value,
- //target._private.style["height"].value,
- this.getNodeWidth(target),
- this.getNodeHeight(target),
- cp[0], //halfPointX,
- cp[1], //halfPointY
- target._private.style["border-width"].value / 2
- );
-
- var arrowEnd = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["target-arrow-shape"].value].spacing(edge));
- var edgeEnd = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["target-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.endX = edgeEnd[0];
- edge._private.rscratch.endY = edgeEnd[1];
-
- edge._private.rscratch.arrowEndX = arrowEnd[0];
- edge._private.rscratch.arrowEndY = arrowEnd[1];
-
- var cp = [edge._private.rscratch.cp2ax, edge._private.rscratch.cp2ay];
-
- intersect = nodeShapes[this.getNodeShape(source)].intersectLine(
- source._private.position.x,
- source._private.position.y,
- //source._private.style["width"].value,
- //source._private.style["height"].value,
- this.getNodeWidth(source),
- this.getNodeHeight(source),
- cp[0], //halfPointX,
- cp[1], //halfPointY
- source._private.style["border-width"].value / 2
- );
-
- var arrowStart = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["source-arrow-shape"].value].spacing(edge));
- var edgeStart = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["source-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.startX = edgeStart[0];
- edge._private.rscratch.startY = edgeStart[1];
-
- edge._private.rscratch.arrowStartX = arrowStart[0];
- edge._private.rscratch.arrowStartY = arrowStart[1];
-
- } else if (edge._private.rscratch.edgeType == "straight") {
-
- intersect = nodeShapes[this.getNodeShape(target)].intersectLine(
- target._private.position.x,
- target._private.position.y,
- //target._private.style["width"].value,
- //target._private.style["height"].value,
- this.getNodeWidth(target),
- this.getNodeHeight(target),
- source.position().x,
- source.position().y,
- target._private.style["border-width"].value / 2);
-
- if (intersect.length == 0) {
- edge._private.rscratch.noArrowPlacement = true;
- // return;
- } else {
- edge._private.rscratch.noArrowPlacement = false;
- }
-
- var arrowEnd = this.shortenIntersection(intersect,
- [source.position().x, source.position().y],
- arrowShapes[edge._private.style["target-arrow-shape"].value].spacing(edge));
- var edgeEnd = this.shortenIntersection(intersect,
- [source.position().x, source.position().y],
- arrowShapes[edge._private.style["target-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.endX = edgeEnd[0];
- edge._private.rscratch.endY = edgeEnd[1];
-
- edge._private.rscratch.arrowEndX = arrowEnd[0];
- edge._private.rscratch.arrowEndY = arrowEnd[1];
-
- intersect = nodeShapes[this.getNodeShape(source)].intersectLine(
- source._private.position.x,
- source._private.position.y,
- //source._private.style["width"].value,
- //source._private.style["height"].value,
- this.getNodeWidth(source),
- this.getNodeHeight(source),
- target.position().x,
- target.position().y,
- source._private.style["border-width"].value / 2);
-
- if (intersect.length == 0) {
- edge._private.rscratch.noArrowPlacement = true;
- // return;
- } else {
- edge._private.rscratch.noArrowPlacement = false;
- }
-
- /*
- console.log("1: "
- + arrowShapes[edge._private.style["source-arrow-shape"].value],
- edge._private.style["source-arrow-shape"].value);
- */
- var arrowStart = this.shortenIntersection(intersect,
- [target.position().x, target.position().y],
- arrowShapes[edge._private.style["source-arrow-shape"].value].spacing(edge));
- var edgeStart = this.shortenIntersection(intersect,
- [target.position().x, target.position().y],
- arrowShapes[edge._private.style["source-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.startX = edgeStart[0];
- edge._private.rscratch.startY = edgeStart[1];
-
- edge._private.rscratch.arrowStartX = arrowStart[0];
- edge._private.rscratch.arrowStartY = arrowStart[1];
-
- } else if (edge._private.rscratch.edgeType == "bezier") {
-
- var cp = [edge._private.rscratch.cp2x, edge._private.rscratch.cp2y];
-
- // Point at middle of Bezier
- var halfPointX = start[0] * 0.25 + end[0] * 0.25 + cp[0] * 0.5;
- var halfPointY = start[1] * 0.25 + end[1] * 0.25 + cp[1] * 0.5;
-
- intersect = nodeShapes[
- this.getNodeShape(target)].intersectLine(
- target._private.position.x,
- target._private.position.y,
- //target._private.style["width"].value,
- //target._private.style["height"].value,
- this.getNodeWidth(target),
- this.getNodeHeight(target),
- cp[0], //halfPointX,
- cp[1], //halfPointY
- target._private.style["border-width"].value / 2
- );
-
- /*
- console.log("2: "
- + arrowShapes[edge._private.style["source-arrow-shape"].value],
- edge._private.style["source-arrow-shape"].value);
- */
- var arrowEnd = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["target-arrow-shape"].value].spacing(edge));
- var edgeEnd = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["target-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.endX = edgeEnd[0];
- edge._private.rscratch.endY = edgeEnd[1];
-
- edge._private.rscratch.arrowEndX = arrowEnd[0];
- edge._private.rscratch.arrowEndY = arrowEnd[1];
-
- intersect = nodeShapes[
- this.getNodeShape(source)].intersectLine(
- source._private.position.x,
- source._private.position.y,
- //source._private.style["width"].value,
- //source._private.style["height"].value,
- this.getNodeWidth(source),
- this.getNodeHeight(source),
- cp[0], //halfPointX,
- cp[1], //halfPointY
- source._private.style["border-width"].value / 2
- );
-
- var arrowStart = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["source-arrow-shape"].value].spacing(edge));
- var edgeStart = this.shortenIntersection(intersect, cp,
- arrowShapes[edge._private.style["source-arrow-shape"].value].gap(edge));
-
- edge._private.rscratch.startX = edgeStart[0];
- edge._private.rscratch.startY = edgeStart[1];
-
- edge._private.rscratch.arrowStartX = arrowStart[0];
- edge._private.rscratch.arrowStartY = arrowStart[1];
-
- } else if (edge._private.rscratch.isArcEdge) {
- return;
- }
- }
-
- }
-
- // @O Graph traversal functions
- {
-
- // Find adjacent edges
- CanvasRenderer.prototype.findEdges = function(nodeSet) {
-
- var edges = this.getCachedEdges();
-
- var hashTable = {};
- var adjacentEdges = [];
-
- for (var i = 0; i < nodeSet.length; i++) {
- hashTable[nodeSet[i]._private.data.id] = nodeSet[i];
- }
-
- for (var i = 0; i < edges.length; i++) {
- if (hashTable[edges[i]._private.data.source]
- || hashTable[edges[i]._private.data.target]) {
-
- adjacentEdges.push(edges[i]);
- }
- }
-
- return adjacentEdges;
- }
-
- }
-
- // @O Intersection functions
- {
- CanvasRenderer.prototype.intersectLineEllipse = function(
- x, y, centerX, centerY, ellipseWradius, ellipseHradius) {
-
- var dispX = centerX - x;
- var dispY = centerY - y;
-
- dispX /= ellipseWradius;
- dispY /= ellipseHradius;
-
- var len = Math.sqrt(dispX * dispX + dispY * dispY);
-
- var newLength = len - 1;
-
- if (newLength < 0) {
- return [];
- }
-
- var lenProportion = newLength / len;
-
- return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y];
- }
-
- CanvasRenderer.prototype.dotProduct = function(
- vec1, vec2) {
-
- if (vec1.length != 2 || vec2.length != 2) {
- throw 'dot product: arguments are not vectors';
- }
-
- return (vec1[0] * vec2[0] + vec1[1] * vec2[1]);
- }
-
- // Returns intersections of increasing distance from line's start point
- CanvasRenderer.prototype.intersectLineCircle = function(
- x1, y1, x2, y2, centerX, centerY, radius) {
-
- // Calculate d, direction vector of line
- var d = [x2 - x1, y2 - y1]; // Direction vector of line
- var s = [x1, y1]; // Start of line
- var c = [centerX, centerY]; // Center of circle
- var f = [x1 - centerX, y1 - centerY]
-
- var a = d[0] * d[0] + d[1] * d[1];
- var b = 2 * (f[0] * d[0] + f[1] * d[1]);
- var c = (f[0] * f[0] + f[1] * f[1]) - radius * radius ;
-
- /*
- var a = this.dotProduct(d, d);
- var b = 2 * this.dotProduct(s, d) - this.dotProduct(d, c);
- var c = this.dotProduct(s, s) - 2 * this.dotProduct(s, c) + this.dotProduct(c, c) - radius * radius ;
- */
-
- var discriminant = b*b-4*a*c;
-
- if (discriminant < 0) {
- return [];
- }
-
- t1 = (-b + Math.sqrt(discriminant)) / (2 * a);
- t2 = (-b - Math.sqrt(discriminant)) / (2 * a);
-
- var tMin = Math.min(t1, t2);
- var tMax = Math.max(t1, t2);
- var inRangeParams = [];
-
- if (tMin >= 0 && tMin <= 1) {
- inRangeParams.push(tMin);
- }
-
- if (tMax >= 0 && tMax <= 1) {
- inRangeParams.push(tMax);
- }
-
- if (inRangeParams.length == 0) {
- return [];
- }
-
- var nearIntersectionX = inRangeParams[0] * d[0] + x1;
- var nearIntersectionY = inRangeParams[0] * d[1] + y1;
-
- if (inRangeParams.length > 1) {
-
- if (inRangeParams[0] == inRangeParams[1]) {
- return [nearIntersectionX, nearIntersectionY];
- } else {
-
- var farIntersectionX = inRangeParams[1] * d[0] + x1;
- var farIntersectionY = inRangeParams[1] * d[1] + y1;
-
- return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY];
- }
-
- } else {
- return [nearIntersectionX, nearIntersectionY]
- }
-
- }
-
- CanvasRenderer.prototype.findCircleNearPoint = function(centerX, centerY,
- radius, farX, farY) {
-
- var displacementX = farX - centerX;
- var displacementY = farY - centerY;
- var distance = Math.sqrt(displacementX * displacementX
- + displacementY * displacementY);
-
- var unitDisplacementX = displacementX / distance;
- var unitDisplacementY = displacementY / distance;
-
- return [centerX + unitDisplacementX * radius,
- centerY + unitDisplacementY * radius];
- }
-
- CanvasRenderer.prototype.findMaxSqDistanceToOrigin = function(points) {
- var maxSqDistance = 0.000001;
- var sqDistance;
-
- for (var i = 0; i < points.length / 2; i++) {
-
- sqDistance = points[i * 2] * points[i * 2]
- + points[i * 2 + 1] * points[i * 2 + 1];
-
- if (sqDistance > maxSqDistance) {
- maxSqDistance = sqDistance;
- }
- }
-
- return maxSqDistance;
- }
-
- CanvasRenderer.prototype.finiteLinesIntersect = function(
- x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) {
-
- var ua_t = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
- var ub_t = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
- var u_b = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
-
- if (u_b != 0) {
- var ua = ua_t / u_b;
- var ub = ub_t / u_b;
-
- if (0 <= ua && ua <= 1 && 0 <= ub && ub <= 1) {
- return [x1 + ua * (x2 - x1), y1 + ua * (y2 - y1)];
-
- } else {
- if (!infiniteLines) {
- return [];
- } else {
- return [x1 + ua * (x2 - x1), y1 + ua * (y2 - y1)];
- }
- }
- } else {
- if (ua_t == 0 || ub_t == 0) {
-
- // Parallel, coincident lines. Check if overlap
-
- // Check endpoint of second line
- if ([x1, x2, x4].sort()[1] == x4) {
- return [x4, y4];
- }
-
- // Check start point of second line
- if ([x1, x2, x3].sort()[1] == x3) {
- return [x3, y3];
- }
-
- // Endpoint of first line
- if ([x3, x4, x2].sort()[1] == x2) {
- return [x2, y2];
- }
-
- return [];
- } else {
-
- // Parallel, non-coincident
- return [];
- }
- }
- }
-
- // (boxMinX, boxMinY, boxMaxX, boxMaxY, padding,
- // cornerRadius * 2, cornerRadius * 2, vBoxTopLeftX + padding, hBoxTopLeftY + padding)) {
-
- CanvasRenderer.prototype.boxIntersectEllipse = function(
- x1, y1, x2, y2, padding, width, height, centerX, centerY) {
-
- if (x2 < x1) {
- var oldX1 = x1;
- x1 = x2;
- x2 = oldX1;
- }
-
- if (y2 < y1) {
- var oldY1 = y1;
- y1 = y2;
- y2 = oldY1;
- }
-
- // 4 ortho extreme points
- var west = [centerX - width / 2 - padding, centerY];
- var east = [centerX + width / 2 + padding, centerY];
- var north = [centerX, centerY - height / 2 - padding];
- var south = [centerX, centerY + height / 2 + padding];
-
- // out of bounds: return false
- if (x2 < west[0]) {
- return false;
- }
-
- if (x1 > east[0]) {
- return false;
- }
-
- if (y1 > south[1]) {
- return false;
- }
-
- if (y2 < north[1]) {
- return false;
- }
-
- // 1 of 4 ortho extreme points in box: return true
- if (x1 <= east[0] && east[0] <= x2
- && y1 <= east[1] && east[1] <= y2) {
- return true;
- }
-
- if (x1 <= west[0] && west[0] <= x2
- && y1 <= west[1] && west[1] <= y2) {
- return true;
- }
-
- if (x1 <= north[0] && north[0] <= x2
- && y1 <= north[1] && north[1] <= y2) {
- return true;
- }
-
- if (x1 <= south[0] && south[0] <= x2
- && y1 <= south[1] && south[1] <= y2) {
- return true;
- }
-
- // box corner in ellipse: return true
- x1 = (x1 - centerX) / (width / 2 + padding);
- x2 = (x2 - centerX) / (width / 2 + padding);
-
- y1 = (y1 - centerY) / (height / 2 + padding);
- y2 = (y2 - centerY) / (height / 2 + padding);
-
- if (x1 * x1 + y1 * y1 <= 1) {
- return true;
- }
-
- if (x2 * x2 + y1 * y1 <= 1) {
- return true;
- }
-
- if (x2 * x2 + y2 * y2 <= 1) {
- return true;
- }
-
- if (x1 * x1 + y2 * y2 <= 1) {
- return true;
- }
-
- return false;
- }
-
- CanvasRenderer.prototype.boxIntersectPolygon = function(
- x1, y1, x2, y2, basePoints, width, height, centerX, centerY, direction, padding) {
-
-// console.log(arguments);
-
- if (x2 < x1) {
- var oldX1 = x1;
- x1 = x2;
- x2 = oldX1;
- }
-
- if (y2 < y1) {
- var oldY1 = y1;
- y1 = y2;
- y2 = oldY1;
- }
-
- var transformedPoints = new Array(basePoints.length)
-
- // Gives negative of angle
- var angle = Math.asin(direction[1] / (Math.sqrt(direction[0] * direction[0]
- + direction[1] * direction[1])));
-
- if (direction[0] < 0) {
- angle = angle + Math.PI / 2;
- } else {
- angle = -angle - Math.PI / 2;
- }
-
- var cos = Math.cos(-angle);
- var sin = Math.sin(-angle);
-
- for (var i = 0; i < transformedPoints.length / 2; i++) {
- transformedPoints[i * 2] =
- width / 2 * (basePoints[i * 2] * cos
- - basePoints[i * 2 + 1] * sin);
-
- transformedPoints[i * 2 + 1] =
- height / 2 * (basePoints[i * 2 + 1] * cos
- + basePoints[i * 2] * sin);
-
- transformedPoints[i * 2] += centerX;
- transformedPoints[i * 2 + 1] += centerY;
- }
-
- // Assume transformedPoints.length > 0, and check if intersection is possible
- var minTransformedX = transformedPoints[0];
- var maxTransformedX = transformedPoints[0];
- var minTransformedY = transformedPoints[1];
- var maxTransformedY = transformedPoints[1];
-
- for (var i = 1; i < transformedPoints.length / 2; i++) {
- if (transformedPoints[i * 2] > maxTransformedX) {
- maxTransformedX = transformedPoints[i * 2];
- }
-
- if (transformedPoints[i * 2] < minTransformedX) {
- minTransformedX = transformedPoints[i * 2];
- }
-
- if (transformedPoints[i * 2 + 1] > maxTransformedY) {
- maxTransformedY = transformedPoints[i * 2 + 1];
- }
-
- if (transformedPoints[i * 2 + 1] < minTransformedY) {
- minTransformedY = transformedPoints[i * 2 + 1];
- }
- }
-
- if (x2 < minTransformedX - padding) {
- return false;
- }
-
- if (x1 > maxTransformedX + padding) {
- return false;
- }
-
- if (y2 < minTransformedY - padding) {
- return false;
- }
-
- if (y1 > maxTransformedY + padding) {
- return false;
- }
-
- // Continue checking with padding-corrected points
- var points;
-
- if (padding > 0) {
- var expandedLineSet = renderer.expandPolygon(
- transformedPoints,
- -padding);
-
- points = renderer.joinLines(expandedLineSet);
- } else {
- points = transformedPoints;
- }
-
- // Check if a point is in box
- for (var i = 0; i < transformedPoints.length / 2; i++) {
- if (x1 <= transformedPoints[i * 2]
- && transformedPoints[i * 2] <= x2) {
-
- if (y1 <= transformedPoints[i * 2 + 1]
- && transformedPoints[i * 2 + 1] <= y2) {
-
- return true;
- }
- }
- }
-
-
- // Check for intersections with the selection box
- for (var i = 0; i < points.length / 2; i++) {
-
- var currentX = points[i * 2];
- var currentY = points[i * 2 + 1];
- var nextX;
- var nextY;
-
- if (i < points.length / 2 - 1) {
- nextX = points[(i + 1) * 2];
- nextY = points[(i + 1) * 2 + 1]
- } else {
- nextX = points[0];
- nextY = points[1];
- }
-
- // Intersection with top of selection box
- if (renderer.finiteLinesIntersect(currentX, currentY, nextX, nextY, x1, y1, x2, y1, false).length > 0) {
- return true;
- }
-
- // Intersection with bottom of selection box
- if (renderer.finiteLinesIntersect(currentX, currentY, nextX, nextY, x1, y2, x2, y2, false).length > 0) {
- return true;
- }
-
- // Intersection with left side of selection box
- if (renderer.finiteLinesIntersect(currentX, currentY, nextX, nextY, x1, y1, x1, y2, false).length > 0) {
- return true;
- }
-
- // Intersection with right side of selection box
- if (renderer.finiteLinesIntersect(currentX, currentY, nextX, nextY, x2, y1, x2, y2, false).length > 0) {
- return true;
- }
- }
-
- /*
- // Check if box corner in the polygon
- if (renderer.pointInsidePolygon(
- x1, y1, points, 0, 0, 1, 1, 0, direction)) {
-
- return true;
- } else if (renderer.pointInsidePolygon(
- x1, y2, points, 0, 0, 1, 1, 0, direction)) {
-
- return true;
- } else if (renderer.pointInsidePolygon(
- x2, y2, points, 0, 0, 1, 1, 0, direction)) {
-
- return true;
- } else if (renderer.pointInsidePolygon(
- x2, y1, points, 0, 0, 1, 1, 0, direction)) {
-
- return true;
- }
- */
- return false;
- }
-
- CanvasRenderer.prototype.polygonIntersectLine = function(
- x, y, basePoints, centerX, centerY, width, height, padding) {
-
- var intersections = [];
- var intersection;
-
- var transformedPoints = new Array(basePoints.length);
-
- for (var i = 0; i < transformedPoints.length / 2; i++) {
- transformedPoints[i * 2] = basePoints[i * 2] * width + centerX;
- transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY;
- }
-
- var points;
-
- if (padding > 0) {
- var expandedLineSet = renderer.expandPolygon(
- transformedPoints,
- -padding);
-
- points = renderer.joinLines(expandedLineSet);
- } else {
- points = transformedPoints;
- }
- // var points = transformedPoints;
-
- var currentX, currentY, nextX, nextY;
-
- for (var i = 0; i < points.length / 2; i++) {
-
- currentX = points[i * 2];
- currentY = points[i * 2 + 1];
-
- if (i < points.length / 2 - 1) {
- nextX = points[(i + 1) * 2];
- nextY = points[(i + 1) * 2 + 1];
- } else {
- nextX = points[0];
- nextY = points[1];
- }
-
- intersection = this.finiteLinesIntersect(
- x, y, centerX, centerY,
- currentX, currentY,
- nextX, nextY);
-
- if (intersection.length != 0) {
- intersections.push(intersection[0], intersection[1]);
- }
- }
-
- return intersections;
- }
-
- CanvasRenderer.prototype.shortenIntersection = function(
- intersection, offset, amount) {
-
- var disp = [intersection[0] - offset[0], intersection[1] - offset[1]];
-
- var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]);
-
- var lenRatio = (length - amount) / length;
-
- if (lenRatio < 0) {
- return [];
- } else {
- return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]];
- }
- }
- }
-
- // @O Arrow shapes
- {
- // Contract for arrow shapes:
- {
- // 0, 0 is arrow tip
- // (0, 1) is direction towards node
- // (1, 0) is right
- //
- // functional api:
- // collide: check x, y in shape
- // roughCollide: called before collide, no false negatives
- // draw: draw
- // spacing: dist(arrowTip, nodeBoundary)
- // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip
- }
-
- // Declarations
- {
- arrowShapes["arrow"] = {
- _points: [
- -0.15, -0.3,
- 0, 0,
- 0.15, -0.3
- ],
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- var points = arrowShapes["arrow"]._points;
-
-// console.log("collide(): " + direction);
-
- return rendFunc.pointInsidePolygon(
- x, y, points, centerX, centerY, width, height, direction, padding);
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- if (typeof(arrowShapes["arrow"]._farthestPointSqDistance) == "undefined") {
- arrowShapes["arrow"]._farthestPointSqDistance =
- rendFunc.findMaxSqDistanceToOrigin(arrowShapes["arrow"]._points);
- }
-
- return rendFunc.checkInBoundingCircle(
- x, y, arrowShapes["arrow"]._farthestPointSqDistance,
- 0, width, height, centerX, centerY);
- },
- draw: function(context) {
- var points = arrowShapes["arrow"]._points;
-
- for (var i = 0; i < points.length / 2; i++) {
- context.lineTo(points[i * 2], points[i * 2 + 1]);
- }
- },
- spacing: function(edge) {
- return 0;
- },
- gap: function(edge) {
- return edge._private.style["width"].value * 2;
- }
- }
-
- arrowShapes["triangle"] = arrowShapes["arrow"];
-
- arrowShapes["none"] = {
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- return false;
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- return false;
- },
- draw: function(context) {
- },
- spacing: function(edge) {
- return 0;
- },
- gap: function(edge) {
- return 0;
- }
- }
-
- arrowShapes["circle"] = {
- _baseRadius: 0.15,
-
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- // Transform x, y to get non-rotated ellipse
-
- if (width != height) {
- // This gives negative of the angle
- var angle = Math.asin(direction[1] /
- (Math.sqrt(direction[0] * direction[0]
- + direction[1] * direction[1])));
-
- var cos = Math.cos(-angle);
- var sin = Math.sin(-angle);
-
- var rotatedPoint =
- [x * cos - y * sin,
- y * cos + x * sin];
-
- var aspectRatio = (height + padding) / (width + padding);
- y /= aspectRatio;
- centerY /= aspectRatio;
-
- return (Math.pow(centerX - x, 2)
- + Math.pow(centerY - y, 2) <= Math.pow((width + padding)
- * arrowShapes["circle"]._baseRadius, 2));
- } else {
- return (Math.pow(centerX - x, 2)
- + Math.pow(centerY - y, 2) <= Math.pow((width + padding)
- * arrowShapes["circle"]._baseRadius, 2));
- }
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- return true;
- },
- draw: function(context) {
- context.arc(0, 0, arrowShapes["circle"]._baseRadius, 0, Math.PI * 2, false);
- },
- spacing: function(edge) {
- return rendFunc.getArrowWidth(edge._private.style["width"].value)
- * arrowShapes["circle"]._baseRadius;
- },
- gap: function(edge) {
- return edge._private.style["width"].value * 2;
- }
- }
-
- arrowShapes["inhibitor"] = {
- _points: [
- -0.25, 0,
- -0.25, -0.1,
- 0.25, -0.1,
- 0.25, 0
- ],
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- var points = arrowShapes["inhibitor"]._points;
-
- return rendFunc.pointInsidePolygon(
- x, y, points, centerX, centerY, width, height, direction, padding);
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- if (typeof(arrowShapes["inhibitor"]._farthestPointSqDistance) == "undefined") {
- arrowShapes["inhibitor"]._farthestPointSqDistance =
- rendFunc.findMaxSqDistanceToOrigin(arrowShapes["inhibitor"]._points);
- }
-
- return rendFunc.checkInBoundingCircle(
- x, y, arrowShapes["inhibitor"]._farthestPointSqDistance,
- 0, width, height, centerX, centerY);
- },
- draw: function(context) {
- var points = arrowShapes["inhibitor"]._points;
-
- for (var i = 0; i < points.length / 2; i++) {
- context.lineTo(points[i * 2], points[i * 2 + 1]);
- }
- },
- spacing: function(edge) {
- return 4;
- },
- gap: function(edge) {
- return 4;
- }
- }
-
- arrowShapes["square"] = {
- _points: [
- -0.12, 0.00,
- 0.12, 0.00,
- 0.12, -0.24,
- -0.12, -0.24
- ],
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- var points = arrowShapes["square"]._points;
-
- return rendFunc.pointInsidePolygon(
- x, y, points, centerX, centerY, width, height, direction, padding);
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- if (typeof(arrowShapes["square"]._farthestPointSqDistance) == "undefined") {
- arrowShapes["square"]._farthestPointSqDistance =
- rendFunc.findMaxSqDistanceToOrigin(arrowShapes["square"]._points);
- }
-
- return rendFunc.checkInBoundingCircle(
- x, y, arrowShapes["square"]._farthestPointSqDistance,
- 0, width, height, centerX, centerY);
- },
- draw: function(context) {
- var points = arrowShapes["square"]._points;
-
- for (var i = 0; i < points.length / 2; i++) {
- context.lineTo(points[i * 2], points[i * 2 + 1]);
- }
- },
- spacing: function(edge) {
- return 0;
- },
- gap: function(edge) {
- return edge._private.style["width"].value * 2;
- }
- }
-
- arrowShapes["diamond"] = {
- _points: [
- -0.14, -0.14,
- 0, -0.28,
- 0.14, -0.14,
- 0, 0
- ],
- collide: function(x, y, centerX, centerY, width, height, direction, padding) {
- var points = arrowShapes["diamond"]._points;
-
- return rendFunc.pointInsidePolygon(
- x, y, points, centerX, centerY, width, height, direction, padding);
- },
- roughCollide: function(x, y, centerX, centerY, width, height, direction, padding) {
- if (typeof(arrowShapes["diamond"]._farthestPointSqDistance) == "undefined") {
- arrowShapes["diamond"]._farthestPointSqDistance =
- rendFunc.findMaxSqDistanceToOrigin(arrowShapes["diamond"]._points);
- }
-
- return rendFunc.checkInBoundingCircle(
- x, y, arrowShapes["diamond"]._farthestPointSqDistance,
- 0, width, height, centerX, centerY);
- },
- draw: function(context) {
-// context.translate(0, 0.16);
- context.lineTo(-0.14, -0.14);
- context.lineTo(0, -0.28);
- context.lineTo(0.14, -0.14);
- context.lineTo(0, 0.0);
- },
- spacing: function(edge) {
- return 0;
- },
- gap: function(edge) {
- return edge._private.style["width"].value * 2;
- }
- }
-
- arrowShapes["tee"] = arrowShapes["inhibitor"];
- }
-
- // @O Arrow shape sizing (w + l)
- {
-
- CanvasRenderer.prototype.getArrowWidth = function(edgeWidth) {
- return Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29);
- }
-
- CanvasRenderer.prototype.getArrowHeight = function(edgeWidth) {
- return Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29);
- }
-
- }
-
- // @O Arrow shape drawing
-
- // Draw arrowheads on edge
- CanvasRenderer.prototype.drawArrowheads = function(context, edge, drawOverlayInstead) {
- if( drawOverlayInstead ){ return; } // don't do anything for overlays
-
- // Displacement gives direction for arrowhead orientation
- var dispX, dispY;
-
- var startX = edge._private.rscratch.arrowStartX;
- var startY = edge._private.rscratch.arrowStartY;
-
- dispX = startX - edge.source().position().x;
- dispY = startY - edge.source().position().y;
-
- //this.context.strokeStyle = "rgba("
- context.fillStyle = "rgba("
- + edge._private.style["source-arrow-color"].value[0] + ","
- + edge._private.style["source-arrow-color"].value[1] + ","
- + edge._private.style["source-arrow-color"].value[2] + ","
- + edge._private.style.opacity.value + ")";
-
- context.lineWidth = edge._private.style["width"].value;
-
- this.drawArrowShape(context, edge._private.style["source-arrow-shape"].value,
- startX, startY, dispX, dispY);
-
- var endX = edge._private.rscratch.arrowEndX;
- var endY = edge._private.rscratch.arrowEndY;
-
- dispX = endX - edge.target().position().x;
- dispY = endY - edge.target().position().y;
-
- //this.context.strokeStyle = "rgba("
- context.fillStyle = "rgba("
- + edge._private.style["target-arrow-color"].value[0] + ","
- + edge._private.style["target-arrow-color"].value[1] + ","
- + edge._private.style["target-arrow-color"].value[2] + ","
- + edge._private.style.opacity.value + ")";
-
- context.lineWidth = edge._private.style["width"].value;
-
- this.drawArrowShape(context, edge._private.style["target-arrow-shape"].value,
- endX, endY, dispX, dispY);
- }
-
- // Draw arrowshape
- CanvasRenderer.prototype.drawArrowShape = function(context, shape, x, y, dispX, dispY) {
-
- // Negative of the angle
- var angle = Math.asin(dispY / (Math.sqrt(dispX * dispX + dispY * dispY)));
-
- if (dispX < 0) {
- //context.strokeStyle = "AA99AA";
- angle = angle + Math.PI / 2;
- } else {
- //context.strokeStyle = "AAAA99";
- angle = - (Math.PI / 2 + angle);
- }
-
- //context.save();
- context.translate(x, y);
-
- context.moveTo(0, 0);
- context.rotate(-angle);
-
- var size = this.getArrowWidth(context.lineWidth);
- /// size = 100;
- context.scale(size, size);
-
- context.beginPath();
-
- arrowShapes[shape].draw(context);
-
- context.closePath();
-
-// context.stroke();
- context.fill();
-
- context.scale(1/size, 1/size);
- context.rotate(angle);
- context.translate(-x, -y);
- //context.restore();
- }
-
- }
-
- // @O Node shapes
- {
-
- // Generate polygon points
- var generateUnitNgonPoints = function(sides, rotationRadians) {
-
- var increment = 1.0 / sides * 2 * Math.PI;
- var startAngle = sides % 2 == 0 ?
- Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0;
-// console.log(nodeShapes["square"]);
- startAngle += rotationRadians;
-
- var points = new Array(sides * 2);
-
- var currentAngle;
- for (var i = 0; i < sides; i++) {
- currentAngle = i * increment + startAngle;
-
- points[2 * i] = Math.cos(currentAngle);// * (1 + i/2);
- points[2 * i + 1] = Math.sin(-currentAngle);// * (1 + i/2);
- }
-
- // The above generates points for a polygon inscribed in a radius 1 circle.
- // Stretch so that the maximum of the height and width becomes 2 so the resulting
- // scaled shape appears to be inscribed inside a rectangle with the given
- // width and height. The maximum of the width and height is used to preserve
- // the shape's aspect ratio.
-
- // Stretch width
- var maxAbsX = 0
- var maxAbsY = 0;
- for (var i = 0; i < points.length / 2; i++) {
- if (Math.abs(points[2 * i] > maxAbsX)) {
- maxAbsX = Math.abs(points[2 * i]);
- }
-
- if (Math.abs(points[2 * i + 1] > maxAbsY)) {
- maxAbsY = Math.abs(points[2 * i + 1]);
- }
- }
-
- var minScaleLimit = 0.0005;
-
- // Use the larger dimension to do the scale, in order to preserve the shape's
- // aspect ratio
- var maxDimension = Math.max(maxAbsX, maxAbsY);
-
- for (var i = 0; i < points.length / 2; i++) {
- if (maxDimension > minScaleLimit) {
- points[2 * i] *= (1 / maxDimension);
- points[2 * i + 1] *= (1 / maxDimension);
- }
- }
-
- return points;
- }
-
- // Node shape declarations
-
- // Contract for node shapes:
- {
- // Node shape contract:
- //
- // draw: draw
- // intersectLine: report intersection from x, y, to node center
- // checkPointRough: heuristic check x, y in node, no false negatives
- // checkPoint: check x, y in node
- }
-
- // Declarations
- {
-
- var renderer = rendFunc;
-
- nodeShapes["ellipse"] = {
- draw: function(context, centerX, centerY, width, height) {
- nodeShapes["ellipse"].drawPath(context, centerX, centerY, width, height);
- context.fill();
-
-// console.log("drawing ellipse");
-// console.log(arguments);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
-
- //context.save();
-
- context.beginPath();
- context.translate(centerX, centerY);
- context.scale(width / 2, height / 2);
- // At origin, radius 1, 0 to 2pi
- context.arc(0, 0, 1, 0, Math.PI * 2 * 0.999, false); // *0.999 b/c chrome rendering bug on full circle
- context.closePath();
-
- context.scale(2/width, 2/height);
- context.translate(-centerX, -centerY);
- //context.restore();
-
-// console.log("drawing ellipse");
-// console.log(arguments);
-
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- var intersect = rendFunc.intersectLineEllipse(
- x, y,
- nodeX,
- nodeY,
- width / 2 + padding,
- height / 2 + padding);
-
- return intersect;
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- return CanvasRenderer.prototype.boxIntersectEllipse(
- x1, y1, x2, y2, padding, width, height, centerX, centerY);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return true;
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
-// console.log(arguments);
-
- x -= centerX;
- y -= centerY;
-
- x /= (width / 2 + padding);
- y /= (height / 2 + padding);
-
- return (Math.pow(x, 2) + Math.pow(y, 2) <= 1);
- }
- }
-
- nodeShapes["triangle"] = {
- points: generateUnitNgonPoints(3, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height,
- nodeShapes["triangle"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height,
- nodeShapes["triangle"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["triangle"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
-
- /*
- polygonIntersectLine(x, y, basePoints, centerX, centerY,
- width, height, padding);
- */
-
-
- /*
- return renderer.polygonIntersectLine(
- node, width, height,
- x, y, nodeShapes["triangle"].points);
- */
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- var points = nodeShapes["triangle"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX, centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["triangle"].points, // Triangle?
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(
- x, y, nodeShapes["triangle"].points,
- centerX, centerY, width, height,
- [0, -1], padding);
- }
- }
-
- nodeShapes["square"] = {
- points: generateUnitNgonPoints(4, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height,
- nodeShapes["square"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height,
- nodeShapes["square"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["square"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2,
- width, height, centerX,
- centerY, padding) {
-
- var points = nodeShapes["square"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX,
- centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height,
- centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["square"].points,
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(x, y, nodeShapes["square"].points,
- centerX, centerY, width, height, [0, -1], padding);
- }
- }
-
- nodeShapes["rectangle"] = nodeShapes["square"];
-
- nodeShapes["octogon"] = {};
-
- nodeShapes["roundrectangle"] = {
- points: generateUnitNgonPoints(4, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawRoundRectangle(context,
- centerX, centerY,
- width, height,
- 10);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawRoundRectanglePath(context,
- centerX, centerY,
- width, height,
- 10);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.roundRectangleIntersectLine(
- x, y,
- nodeX,
- nodeY,
- width, height,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2,
- width, height, centerX,
- centerY, padding) {
-
- return renderer.roundRectangleIntersectBox(
- x1, y1, x2, y2,
- width, height, centerX, centerY, padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height,
- centerX, centerY) {
-
- // This check is OK because it assumes the round rectangle
- // has sharp edges for the rough check
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["roundrectangle"].points,
- padding, width, height, centerX, centerY);
- },
-
- // Looks like the width passed into this function is actually the total width / 2
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- var cornerRadius = renderer.getRoundRectangleRadius(width, height);
-
- // Check hBox
- if (renderer.pointInsidePolygon(x, y, nodeShapes["roundrectangle"].points,
- centerX, centerY, width, height - 2 * cornerRadius, [0, -1], padding)) {
- return true;
- }
-
- // Check vBox
- if (renderer.pointInsidePolygon(x, y, nodeShapes["roundrectangle"].points,
- centerX, centerY, width - 2 * cornerRadius, height, [0, -1], padding)) {
- return true;
- }
-
- var checkInEllipse = function(x, y, centerX, centerY, width, height, padding) {
- x -= centerX;
- y -= centerY;
-
- x /= (width / 2 + padding);
- y /= (height / 2 + padding);
-
- return (Math.pow(x, 2) + Math.pow(y, 2) <= 1);
- }
-
-
- // Check top left quarter circle
- if (checkInEllipse(x, y,
- centerX - width / 2 + cornerRadius,
- centerY - height / 2 + cornerRadius,
- cornerRadius * 2, cornerRadius * 2, padding)) {
-
- return true;
- }
-
- /*
- if (renderer.boxIntersectEllipse(x, y, x, y, padding,
- cornerRadius * 2, cornerRadius * 2,
- centerX - width + cornerRadius,
- centerY - height + cornerRadius)) {
- return true;
- }
- */
-
- // Check top right quarter circle
- if (checkInEllipse(x, y,
- centerX + width / 2 - cornerRadius,
- centerY - height / 2 + cornerRadius,
- cornerRadius * 2, cornerRadius * 2, padding)) {
-
- return true;
- }
-
- // Check bottom right quarter circle
- if (checkInEllipse(x, y,
- centerX + width / 2 - cornerRadius,
- centerY + height / 2 - cornerRadius,
- cornerRadius * 2, cornerRadius * 2, padding)) {
-
- return true;
- }
-
- // Check bottom left quarter circle
- if (checkInEllipse(x, y,
- centerX - width / 2 + cornerRadius,
- centerY + height / 2 - cornerRadius,
- cornerRadius * 2, cornerRadius * 2, padding)) {
-
- return true;
- }
-
- return false;
- }
- };
-
- nodeShapes["roundrectangle2"] = {
- roundness: 4.99,
-
- draw: function(node, width, height) {
- if (width <= roundness * 2) {
- return;
- }
-
- renderer.drawPolygon(node._private.position.x,
- node._private.position.y, width, height, nodeSapes["roundrectangle2"].points);
- },
-
- intersectLine: function(node, width, height, x, y) {
- return renderer.findPolygonIntersection(
- node, width, height, x, y, nodeShapes["square"].points);
- },
-
- // TODO: Treat rectangle as sharp-cornered for now. This is a not-large approximation.
- intersectBox: function(x1, y1, x2, y2, width, height, centerX, centerY, padding) {
- var points = nodeShapes["square"].points;
-
- /*
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points,
- */
- }
- }
-
- /*
- function PolygonNodeShape(points) {
- this.points = points;
-
- this.draw = function(context, node, width, height) {
- renderer.drawPolygon(context,
- node._private.position.x,
- node._private.position.y,
- width, height, nodeShapes["pentagon"].points);
- };
-
- this.drawPath =
- }
- */
-
- nodeShapes["pentagon"] = {
- points: generateUnitNgonPoints(5, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height, nodeShapes["pentagon"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height, nodeShapes["pentagon"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["pentagon"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- var points = nodeShapes["pentagon"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX, centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["pentagon"].points,
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(x, y, nodeShapes["pentagon"].points,
- centerX, centerY, width, height, [0, -1], padding);
- }
- }
-
- nodeShapes["hexagon"] = {
- points: generateUnitNgonPoints(6, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height,
- nodeShapes["hexagon"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height,
- nodeShapes["hexagon"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["hexagon"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- var points = nodeShapes["hexagon"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX, centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["hexagon"].points,
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(x, y, nodeShapes["hexagon"].points,
- centerX, centerY, width, height, [0, -1], padding);
- }
- }
-
- nodeShapes["heptagon"] = {
- points: generateUnitNgonPoints(7, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height,
- nodeShapes["heptagon"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height,
- nodeShapes["heptagon"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["heptagon"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- var points = nodeShapes["heptagon"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX, centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["heptagon"].points,
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(x, y, nodeShapes["heptagon"].points,
- centerX, centerY, width, height, [0, -1], padding);
- }
- }
-
- nodeShapes["octagon"] = {
- points: generateUnitNgonPoints(8, 0),
-
- draw: function(context, centerX, centerY, width, height) {
- renderer.drawPolygon(context,
- centerX, centerY,
- width, height,
- nodeShapes["octagon"].points);
- },
-
- drawPath: function(context, centerX, centerY, width, height) {
- renderer.drawPolygonPath(context,
- centerX, centerY,
- width, height,
- nodeShapes["octagon"].points);
- },
-
- intersectLine: function(nodeX, nodeY, width, height, x, y, padding) {
- return renderer.polygonIntersectLine(
- x, y,
- nodeShapes["octagon"].points,
- nodeX,
- nodeY,
- width / 2, height / 2,
- padding);
- },
-
- intersectBox: function(
- x1, y1, x2, y2, width, height, centerX, centerY, padding) {
-
- var points = nodeShapes["octagon"].points;
-
- return renderer.boxIntersectPolygon(
- x1, y1, x2, y2,
- points, width, height, centerX, centerY, [0, -1], padding);
- },
-
- checkPointRough: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.checkInBoundingBox(
- x, y, nodeShapes["octagon"].points,
- padding, width, height, centerX, centerY);
- },
-
- checkPoint: function(
- x, y, padding, width, height, centerX, centerY) {
-
- return renderer.pointInsidePolygon(x, y, nodeShapes["octagon"].points,
- centerX, centerY, width, height, [0, -1], padding);
- }
- };
-
- var star5Points = new Array(20);
- {
- var outerPoints = generateUnitNgonPoints(5, 0);
- var innerPoints = generateUnitNgonPoints(5, Math.PI / 5);
-
-// console.log(outerPoints);
-// console.log(innerPoints);
-
- // Outer radius is 1; inner radius of star is smaller
- var innerRadius = 0.5 * (3 - Math.sqrt(5));
- innerRadius *= 1.57;
-
- for (var i=0;i 0) {
- var expandedLineSet = renderer.expandPolygon(
- transformedPoints,
- -padding);
-
- points = renderer.joinLines(expandedLineSet);
- } else {
- points = transformedPoints;
- }
-
- var x1, y1, x2, y2;
- var y3;
-
- // Intersect with vertical line through (x, y)
- var up = 0;
- var down = 0;
- for (var i = 0; i < points.length / 2; i++) {
-
- x1 = points[i * 2];
- y1 = points[i * 2 + 1];
-
- if (i + 1 < points.length / 2) {
- x2 = points[(i + 1) * 2];
- y2 = points[(i + 1) * 2 + 1];
- } else {
- x2 = points[(i + 1 - points.length / 2) * 2];
- y2 = points[(i + 1 - points.length / 2) * 2 + 1];
- }
-
-//* console.log("line from (" + x1 + ", " + y1 + ") to (" + x2 + ", " + y2 + ")");
-
-//& console.log(x1, x, x2);
-
- if (x1 == x && x2 == x) {
-
- } else if ((x1 >= x && x >= x2)
- || (x1 <= x && x <= x2)) {
-
- y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1;
-
- if (y3 > y) {
- up++;
- }
-
- if (y3 < y) {
- down++;
- }
-
-//* console.log(y3, y);
-
- } else {
-//* console.log("22");
- continue;
- }
-
- }
-
-//* console.log("up: " + up + ", down: " + down);
-
- if (up % 2 == 0) {
- return false;
- } else {
- return true;
- }
- }
- }
-
- // @O Polygon drawing
- CanvasRenderer.prototype.drawPolygonPath = function(
- context, x, y, width, height, points) {
-
- //context.save();
-
-
- context.translate(x, y);
- context.scale(width / 2, height / 2);
-
- context.beginPath();
-
- context.moveTo(points[0], points[1]);
-
- for (var i = 1; i < points.length / 2; i++) {
- context.lineTo(points[i * 2], points[i * 2 + 1]);
- }
-
- context.closePath();
-
- context.scale(2/width, 2/height);
- context.translate(-x, -y);
- // context.restore();
- }
-
- CanvasRenderer.prototype.drawPolygon = function(
- context, x, y, width, height, points) {
-
- // Draw path
- this.drawPolygonPath(context, x, y, width, height, points);
-
- // Fill path
- context.fill();
- }
-
- CanvasRenderer.prototype.getRoundRectangleRadius = function(width, height) {
-
- // Set the default radius, unless half of width or height is smaller than default
- return Math.min(width / 2, height / 2, 10);
- }
-
- // Round rectangle drawing
- CanvasRenderer.prototype.drawRoundRectanglePath = function(
- context, x, y, width, height, radius) {
-
- var halfWidth = width / 2;
- var halfHeight = height / 2;
- var cornerRadius = this.getRoundRectangleRadius(width, height);
- context.translate(x, y);
-
- context.beginPath();
-
- // Start at top middle
- context.moveTo(0, -halfHeight);
- // Arc from middle top to right side
- context.arcTo(halfWidth, -halfHeight, halfWidth, 0, cornerRadius);
- // Arc from right side to bottom
- context.arcTo(halfWidth, halfHeight, 0, halfHeight, cornerRadius);
- // Arc from bottom to left side
- context.arcTo(-halfWidth, halfHeight, -halfWidth, 0, cornerRadius);
- // Arc from left side to topBorder
- context.arcTo(-halfWidth, -halfHeight, 0, -halfHeight, cornerRadius);
- // Join line
- context.lineTo(0, -halfHeight);
-
- /*
- void arc(unrestricted double x,
- unrestricted double y,
- unrestricted double radius,
- unrestricted double startAngle,
- unrestricted double endAngle,
- optional boolean anticlockwise = false);
- */
- /*
- context.arc(-width / 2 + cornerRadius,
- -height / 2 + cornerRadius,
- cornerRadius,
- 0,
- Math.PI * 2 * 0.999);
- */
-
- context.closePath();
-
- context.translate(-x, -y);
- }
-
- CanvasRenderer.prototype.drawRoundRectangle = function(
- context, x, y, width, height, radius) {
-
- this.drawRoundRectanglePath(context, x, y, width, height, radius);
-
- context.fill();
- }
-
- CanvasRenderer.prototype.roundRectangleIntersectLine = function(
- x, y, nodeX, nodeY, width, height, padding) {
-
- var cornerRadius = this.getRoundRectangleRadius(width, height);
-
- var halfWidth = width / 2;
- var halfHeight = height / 2;
-
- // Check intersections with straight line segments
- var straightLineIntersections;
-
- // Top segment, left to right
- {
- var topStartX = nodeX - halfWidth + cornerRadius - padding;
- var topStartY = nodeY - halfHeight - padding;
- var topEndX = nodeX + halfWidth - cornerRadius + padding;
- var topEndY = topStartY;
-
- straightLineIntersections = this.finiteLinesIntersect(
- x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false);
-
- if (straightLineIntersections.length > 0) {
- return straightLineIntersections;
- }
- }
-
- // Right segment, top to bottom
- {
- var rightStartX = nodeX + halfWidth + padding;
- var rightStartY = nodeY - halfHeight + cornerRadius - padding;
- var rightEndX = rightStartX;
- var rightEndY = nodeY + halfHeight - cornerRadius + padding;
-
- straightLineIntersections = this.finiteLinesIntersect(
- x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false);
-
- if (straightLineIntersections.length > 0) {
- return straightLineIntersections;
- }
- }
-
- // Bottom segment, left to right
- {
- var bottomStartX = nodeX - halfWidth + cornerRadius - padding;
- var bottomStartY = nodeY + halfHeight + padding;
- var bottomEndX = nodeX + halfWidth - cornerRadius + padding;
- var bottomEndY = bottomStartY;
-
- straightLineIntersections = this.finiteLinesIntersect(
- x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false);
-
- if (straightLineIntersections.length > 0) {
- return straightLineIntersections;
- }
- }
-
- // Left segment, top to bottom
- {
- var leftStartX = nodeX - halfWidth - padding;
- var leftStartY = nodeY - halfHeight + cornerRadius - padding;
- var leftEndX = leftStartX;
- var leftEndY = nodeY + halfHeight - cornerRadius + padding;
-
- straightLineIntersections = this.finiteLinesIntersect(
- x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false);
-
- if (straightLineIntersections.length > 0) {
- return straightLineIntersections;
- }
- }
-
- // Check intersections with arc segments
- var arcIntersections;
-
- // Top Left
- {
- var topLeftCenterX = nodeX - halfWidth + cornerRadius;
- var topLeftCenterY = nodeY - halfHeight + cornerRadius
- arcIntersections = this.intersectLineCircle(
- x, y, nodeX, nodeY,
- topLeftCenterX, topLeftCenterY, cornerRadius + padding);
-
- // Ensure the intersection is on the desired quarter of the circle
- if (arcIntersections.length > 0
- && arcIntersections[0] <= topLeftCenterX
- && arcIntersections[1] <= topLeftCenterY) {
- return [arcIntersections[0], arcIntersections[1]];
- }
- }
-
- // Top Right
- {
- var topRightCenterX = nodeX + halfWidth - cornerRadius;
- var topRightCenterY = nodeY - halfHeight + cornerRadius
- arcIntersections = this.intersectLineCircle(
- x, y, nodeX, nodeY,
- topRightCenterX, topRightCenterY, cornerRadius + padding);
-
- // Ensure the intersection is on the desired quarter of the circle
- if (arcIntersections.length > 0
- && arcIntersections[0] >= topRightCenterX
- && arcIntersections[1] <= topRightCenterY) {
- return [arcIntersections[0], arcIntersections[1]];
- }
- }
-
- // Bottom Right
- {
- var bottomRightCenterX = nodeX + halfWidth - cornerRadius;
- var bottomRightCenterY = nodeY + halfHeight - cornerRadius
- arcIntersections = this.intersectLineCircle(
- x, y, nodeX, nodeY,
- bottomRightCenterX, bottomRightCenterY, cornerRadius + padding);
-
- // Ensure the intersection is on the desired quarter of the circle
- if (arcIntersections.length > 0
- && arcIntersections[0] >= bottomRightCenterX
- && arcIntersections[1] >= bottomRightCenterY) {
- return [arcIntersections[0], arcIntersections[1]];
- }
- }
-
- // Bottom Left
- {
- var bottomLeftCenterX = nodeX - halfWidth + cornerRadius;
- var bottomLeftCenterY = nodeY + halfHeight - cornerRadius
- arcIntersections = this.intersectLineCircle(
- x, y, nodeX, nodeY,
- bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding);
-
- // Ensure the intersection is on the desired quarter of the circle
- if (arcIntersections.length > 0
- && arcIntersections[0] <= bottomLeftCenterX
- && arcIntersections[1] >= bottomLeftCenterY) {
- return [arcIntersections[0], arcIntersections[1]];
- }
- }
- }
-
- CanvasRenderer.prototype.roundRectangleIntersectBox = function(
- boxX1, boxY1, boxX2, boxY2, width, height, centerX, centerY, padding) {
-
- // We have the following shpae
-
- // _____
- // _| |_
- // | |
- // |_ _|
- // |_____|
- //
- // With a quarter circle at each corner.
-
- var cornerRadius = this.getRoundRectangleRadius(width, height);
-
- var hBoxTopLeftX = centerX - width / 2 - padding;
- var hBoxTopLeftY = centerY - height / 2 + cornerRadius - padding;
- var hBoxBottomRightX = centerX + width / 2 + padding;
- var hBoxBottomRightY = centerY + height / 2 - cornerRadius + padding;
-
- var vBoxTopLeftX = centerX - width / 2 + cornerRadius - padding;
- var vBoxTopLeftY = centerY - height / 2 - padding;
- var vBoxBottomRightX = centerX + width / 2 - cornerRadius + padding;
- var vBoxBottomRightY = centerY + height / 2 + padding;
-
- // Check if the box is out of bounds
- var boxMinX = Math.min(boxX1, boxX2);
- var boxMaxX = Math.max(boxX1, boxX2);
- var boxMinY = Math.min(boxY1, boxY2);
- var boxMaxY = Math.max(boxY1, boxY2);
-
- if (boxMaxX < hBoxTopLeftX) {
- return false;
- } else if (boxMinX > hBoxBottomRightX) {
- return false;
- }
-
- if (boxMaxY < vBoxTopLeftY) {
- return false;
- } else if (boxMinY > vBoxBottomRightY) {
- return false;
- }
-
- // Check if an hBox point is in given box
- if (hBoxTopLeftX >= boxMinX && hBoxTopLeftX <= boxMaxX
- && hBoxTopLeftY >= boxMinY && hBoxTopLeftY <= boxMaxY) {
- return true;
- }
-
- if (hBoxBottomRightX >= boxMinX && hBoxBottomRightX <= boxMaxX
- && hBoxTopLeftY >= boxMinY && hBoxTopLeftY <= boxMaxY) {
- return true;
- }
-
- if (hBoxBottomRightX >= boxMinX && hBoxBottomRightX <= boxMaxX
- && hBoxBottomRightY >= boxMinY && hBoxBottomRightY <= boxMaxY) {
- return true;
- }
-
- if (hBoxTopLeftX >= boxMinX && hBoxTopLeftX <= boxMaxX
- && hBoxBottomRightY >= boxMinY && hBoxBottomRightY <= boxMaxY) {
- return true;
- }
-
- // Check if a given point box is in the hBox
- if (boxMinX >= hBoxTopLeftX && boxMinX <= hBoxBottomRightX
- && boxMinY >= hBoxTopLeftY && boxMinY <= hBoxBottomRightY) {
- return true;
- }
-
- if (boxMaxX >= hBoxTopLeftX && boxMaxX <= hBoxBottomRightX
- && boxMinY >= hBoxTopLeftY && boxMinY <= hBoxBottomRightY) {
- return true;
- }
-
- if (boxMaxX >= hBoxTopLeftX && boxMaxX <= hBoxBottomRightX
- && boxMaxY >= hBoxTopLeftY && boxMaxY <= hBoxBottomRightY) {
- return true;
- }
-
- if (boxMinX >= hBoxTopLeftX && boxMinX <= hBoxBottomRightX
- && boxMaxY >= hBoxTopLeftY && boxMaxY <= hBoxBottomRightY) {
- return true;
- }
-
- // Check if an vBox point is in given box
- if (vBoxTopLeftX >= boxMinX && vBoxTopLeftX <= boxMaxX
- && vBoxTopLeftY >= boxMinY && vBoxTopLeftY <= boxMaxY) {
- return true;
- }
-
- if (vBoxBottomRightX >= boxMinX && vBoxBottomRightX <= boxMaxX
- && vBoxTopLeftY >= boxMinY && vBoxTopLeftY <= boxMaxY) {
- return true;
- }
-
- if (vBoxBottomRightX >= boxMinX && vBoxBottomRightX <= boxMaxX
- && vBoxBottomRightY >= boxMinY && vBoxBottomRightY <= boxMaxY) {
- return true;
- }
-
- if (vBoxTopLeftX >= boxMinX && vBoxTopLeftX <= boxMaxX
- && vBoxBottomRightY >= boxMinY && vBoxBottomRightY <= boxMaxY) {
- return true;
- }
-
- // Check if a given point box is in the vBox
- if (boxMinX >= vBoxTopLeftX && boxMinX <= vBoxBottomRightX
- && boxMinY >= vBoxTopLeftY && boxMinY <= vBoxBottomRightY) {
- return true;
- }
-
- if (boxMaxX >= vBoxTopLeftX && boxMaxX <= vBoxBottomRightX
- && boxMinY >= vBoxTopLeftY && boxMinY <= vBoxBottomRightY) {
- return true;
- }
-
- if (boxMaxX >= vBoxTopLeftX && boxMaxX <= vBoxBottomRightX
- && boxMaxY >= vBoxTopLeftY && boxMaxY <= vBoxBottomRightY) {
- return true;
- }
-
- if (boxMinX >= vBoxTopLeftX && boxMinX <= vBoxBottomRightX
- && boxMaxY >= vBoxTopLeftY && boxMaxY <= vBoxBottomRightY) {
- return true;
- }
-
- // Lastly, check if one of the ellipses coincide with the box
-
- if (this.boxIntersectEllipse(boxMinX, boxMinY, boxMaxX, boxMaxY, padding,
- cornerRadius * 2, cornerRadius * 2, vBoxTopLeftX + padding, hBoxTopLeftY + padding)) {
- return true;
- }
-
- if (this.boxIntersectEllipse(boxMinX, boxMinY, boxMaxX, boxMaxY, padding,
- cornerRadius * 2, cornerRadius * 2, vBoxBottomRightX - padding, hBoxTopLeftY + padding)) {
- return true;
- }
-
- if (this.boxIntersectEllipse(boxMinX, boxMinY, boxMaxX, boxMaxY, padding,
- cornerRadius * 2, cornerRadius * 2, vBoxBottomRightX - padding, hBoxBottomRightY - padding)) {
- return true;
- }
-
- if (this.boxIntersectEllipse(boxMinX, boxMinY, boxMaxX, boxMaxY, padding,
- cornerRadius * 2, cornerRadius * 2, vBoxTopLeftX + padding, hBoxBottomRightY - padding)) {
- return true;
- }
-
- return false;
- }
-
- // @O Approximate collision functions
- CanvasRenderer.prototype.checkInBoundingCircle = function(
- x, y, farthestPointSqDistance, padding, width, height, centerX, centerY) {
-
- x = (x - centerX) / (width + padding);
- y = (y - centerY) / (height + padding);
-
- return (x * x + y * y) <= farthestPointSqDistance;
- }
-
- CanvasRenderer.prototype.checkInBoundingBox = function(
- x, y, points, padding, width, height, centerX, centerY) {
-
- // Assumes width, height >= 0, points.length > 0
-
- var minX = points[0], minY = points[1];
- var maxX = points[0], maxY = points[1];
-
- for (var i = 1; i < points.length / 2; i++) {
-
- if (points[i * 2] < minX) {
- minX = points[i * 2];
- } else if (points[i * 2] > maxX) {
- maxX = points[i * 2];
- }
-
- if (points[i * 2 + 1] < minY) {
- minY = points[i * 2 + 1];
- } else if (points[i * 2 + 1] > maxY) {
- maxY = points[i * 2 + 1];
- }
- }
-
- x -= centerX;
- y -= centerY;
-
- x /= width;
- y /= height;
-
- if (x < minX) {
- return false;
- } else if (x > maxX) {
- return false;
- }
-
- if (y < minY) {
- return false;
- } else if (y > maxY) {
- return false;
- }
-
- return true;
- }
-
- // @O Straight/bezier edge approximate collision, precise collision, and distance calculation functions
- {
- CanvasRenderer.prototype.boxInBezierVicinity = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, x3, y3, tolerance) {
-
- // Return values:
- // 0 - curve is not in box
- // 1 - curve may be in box; needs precise check
- // 2 - curve is in box
-
- // midpoint
- var midX = 0.25 * x1 + 0.5 * x2 + 0.25 * x3;
- var midY = 0.25 * y1 + 0.5 * y2 + 0.25 * y3;
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- if (x1 >= boxMinX && x1 <= boxMaxX && y1 >= boxMinY && y1 <= boxMaxY) { // (x1, y1) in box
- return 1;
- } else if (x3 >= boxMinX && x3 <= boxMaxX && y3 >= boxMinY && y3 <= boxMaxY) { // (x3, y3) in box
- return 1;
- } else if (midX >= boxMinX && midX <= boxMaxX && midY >= boxMinY && midY <= boxMaxY) { // (midX, midY) in box
- return 1;
- } else if (x2 >= boxMinX && x2 <= boxMaxX && y2 >= boxMinY && y2 <= boxMaxY) { // ctrl pt in box
- return 1;
- }
-
- var curveMinX = Math.min(x1, midX, x3);
- var curveMinY = Math.min(y1, midY, y3);
- var curveMaxX = Math.max(x1, midX, x3);
- var curveMaxY = Math.max(y1, midY, y3);
-
- /*
- console.log(curveMinX + ", " + curveMinY + ", " + curveMaxX
- + ", " + curveMaxY);
- if (curveMinX == undefined) {
- console.log("undefined curveMinX: " + x1 + ", " + x2 + ", " + x3);
- }
- */
-
- if (curveMinX > boxMaxX
- || curveMaxX < boxMinX
- || curveMinY > boxMaxY
- || curveMaxY < boxMinY) {
-
- return 0;
- }
-
- return 1;
- }
-
- CanvasRenderer.prototype.checkBezierInBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, x3, y3, tolerance) {
-
-
- function qbezierAt(p0, p1, p2, t){
- return (1 - t)*(1 - t)*p0 + 2*(1 - t)*t*p1 + t*t*p2;
- }
-
- function sampleInBox(t){
- var x = qbezierAt(x1, x2, x3, t);
- var y = qbezierAt(y1, y2, y3, t);
-
- return x1box <= x && x <= x2box
- && y1box <= y && y <= y2box
- ;
- }
-
- for( var t = 0; t <= 1; t += 0.25 ){
- if( !sampleInBox(t) ){
- return false;
- }
- }
-
- return true;
- };
-
- CanvasRenderer.prototype.checkStraightEdgeInBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, tolerance) {
-
- return x1box <= x1 && x1 <= x2box
- && x1box <= x2 && x2 <= x2box
- && y1box <= y1 && y1 <= y2box
- && y1box <= y2 && y2 <= y2box
- ;
- };
-
- CanvasRenderer.prototype.checkStraightEdgeCrossesBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, tolerance) {
-
- //console.log(arguments);
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- // Check left + right bounds
- var aX = x2 - x1;
- var bX = x1;
- var yValue;
-
- // Top and bottom
- var aY = y2 - y1;
- var bY = y1;
- var xValue;
-
- if (Math.abs(aX) < 0.0001) {
- return (x1 >= boxMinX && x1 <= boxMaxX
- && Math.min(y1, y2) <= boxMinY
- && Math.max(y1, y2) >= boxMaxY);
- }
-
- var tLeft = (boxMinX - bX) / aX;
- if (tLeft > 0 && tLeft <= 1) {
- yValue = aY * tLeft + bY;
- if (yValue >= boxMinY && yValue <= boxMaxY) {
- return true;
- }
- }
-
- var tRight = (boxMaxX - bX) / aX;
- if (tRight > 0 && tRight <= 1) {
- yValue = aY * tRight + bY;
- if (yValue >= boxMinY && yValue <= boxMaxY) {
- return true;
- }
- }
-
- var tTop = (boxMinY - bY) / aY;
- if (tTop > 0 && tTop <= 1) {
- xValue = aX * tTop + bX;
- if (xValue >= boxMinX && xValue <= boxMaxX) {
- return true;
- }
- }
-
- var tBottom = (boxMaxY - bY) / aY;
- if (tBottom > 0 && tBottom <= 1) {
- xValue = aX * tBottom + bX;
- if (xValue >= boxMinX && xValue <= boxMaxX) {
- return true;
- }
- }
-
- return false;
- }
-
- CanvasRenderer.prototype.checkBezierCrossesBox = function(
- x1box, y1box, x2box, y2box, x1, y1, x2, y2, x3, y3, tolerance) {
-
- var boxMinX = Math.min(x1box, x2box) - tolerance;
- var boxMinY = Math.min(y1box, y2box) - tolerance;
- var boxMaxX = Math.max(x1box, x2box) + tolerance;
- var boxMaxY = Math.max(y1box, y2box) + tolerance;
-
- if (x1 >= boxMinX && x1 <= boxMaxX && y1 >= boxMinY && y1 <= boxMaxY) {
- return true;
- } else if (x3 >= boxMinX && x3 <= boxMaxX && y3 >= boxMinY && y3 <= boxMaxY) {
- return true;
- }
-
- var aX = x1 - 2 * x2 + x3;
- var bX = -2 * x1 + 2 * x2;
- var cX = x1;
-
- var xIntervals = [];
-
- if (Math.abs(aX) < 0.0001) {
- var leftParam = (boxMinX - x1) / bX;
- var rightParam = (boxMaxX - x1) / bX;
-
- xIntervals.push(leftParam, rightParam);
- } else {
- // Find when x coordinate of the curve crosses the left side of the box
- var discriminantX1 = bX * bX - 4 * aX * (cX - boxMinX);
- var tX1, tX2;
- if (discriminantX1 > 0) {
- var sqrt = Math.sqrt(discriminantX1);
- tX1 = (-bX + sqrt) / (2 * aX);
- tX2 = (-bX - sqrt) / (2 * aX);
-
- xIntervals.push(tX1, tX2);
- }
-
- var discriminantX2 = bX * bX - 4 * aX * (cX - boxMaxX);
- var tX3, tX4;
- if (discriminantX2 > 0) {
- var sqrt = Math.sqrt(discriminantX2);
- tX3 = (-bX + sqrt) / (2 * aX);
- tX4 = (-bX - sqrt) / (2 * aX);
-
- xIntervals.push(tX3, tX4);
- }
- }
-
- xIntervals.sort(function(a, b) { return a - b; });
-
- var aY = y1 - 2 * y2 + y3;
- var bY = -2 * y1 + 2 * y2;
- var cY = y1;
-
- var yIntervals = [];
-
- if (Math.abs(aY) < 0.0001) {
- var topParam = (boxMinY - y1) / bY;
- var bottomParam = (boxMaxY - y1) / bY;
-
- yIntervals.push(topParam, bottomParam);
- } else {
- var discriminantY1 = bY * bY - 4 * aY * (cY - boxMinY);
-
- var tY1, tY2;
- if (discriminantY1 > 0) {
- var sqrt = Math.sqrt(discriminantY1);
- tY1 = (-bY + sqrt) / (2 * aY);
- tY2 = (-bY - sqrt) / (2 * aY);
-
- yIntervals.push(tY1, tY2);
- }
-
- var discriminantY2 = bY * bY - 4 * aY * (cY - boxMaxY);
-
- var tY3, tY4;
- if (discriminantY2 > 0) {
- var sqrt = Math.sqrt(discriminantY2);
- tY3 = (-bY + sqrt) / (2 * aY);
- tY4 = (-bY - sqrt) / (2 * aY);
-
- yIntervals.push(tY3, tY4);
- }
- }
-
- yIntervals.sort(function(a, b) { return a - b; });
-
- for (var index = 0; index < xIntervals.length; index += 2) {
- for (var yIndex = 1; yIndex < yIntervals.length; yIndex += 2) {
-
- // Check if there exists values for the Bezier curve
- // parameter between 0 and 1 where both the curve's
- // x and y coordinates are within the bounds specified by the box
- if (xIntervals[index] < yIntervals[yIndex]
- && yIntervals[yIndex] >= 0.0
- && xIntervals[index] <= 1.0
- && xIntervals[index + 1] > yIntervals[yIndex - 1]
- && yIntervals[yIndex - 1] <= 1.0
- && xIntervals[index + 1] >= 0.0) {
-
- return true;
- }
- }
- }
-
- return false;
- }
-
- CanvasRenderer.prototype.inLineVicinity = function(x, y, lx1, ly1, lx2, ly2, tolerance){
- var t = tolerance;
-
- var x1 = Math.min(lx1, lx2);
- var x2 = Math.max(lx1, lx2);
- var y1 = Math.min(ly1, ly2);
- var y2 = Math.max(ly1, ly2);
-
- return x1 - t <= x && x <= x2 + t
- && y1 - t <= y && y <= y2 + t;
- };
-
- CanvasRenderer.prototype.inBezierVicinity = function(
- x, y, x1, y1, x2, y2, x3, y3, toleranceSquared) {
-
- // Middle point occurs when t = 0.5, this is when the Bezier
- // is closest to (x2, y2)
- var middlePointX = 0.25 * x1 + 0.5 * x2 + 0.25 * x3;
- var middlePointY = 0.25 * y1 + 0.5 * y2 + 0.25 * y3;
-
- // a rough bounding box of the bezier curve
- var bb = {
- x1: Math.min( x1, x3, middlePointX ),
- x2: Math.max( x1, x3, middlePointX ),
- y1: Math.min( y1, y3, middlePointY ),
- y2: Math.max( y1, y3, middlePointY )
- };
-
- // if outside the rough bounding box for the bezier, then it can't be a hit
- if( x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2 ){
- // console.log('bezier out of rough bb')
- return false;
- } else {
- // console.log('do more expensive check');
- }
-
- var displacementX, displacementY, offsetX, offsetY;
- var dotProduct, dotSquared, hypSquared;
- var outside = function(x, y, startX, startY, endX, endY,
- toleranceSquared, counterClockwise) {
-
- dotProduct = (endY - startY) * (x - startX) + (startX - endX) * (y - startY);
- dotSquared = dotProduct * dotProduct;
- sideSquared = (endY - startY) * (endY - startY)
- + (startX - endX) * (startX - endX);
-
- if (counterClockwise) {
- if (dotProduct > 0) {
- return false;
- }
- } else {
- if (dotProduct < 0) {
- return false;
- }
- }
-
- return (dotSquared / sideSquared > toleranceSquared);
- };
-
- // Used to check if the test polygon winding is clockwise or counterclockwise
- var testPointX = (middlePointX + x2) / 2.0;
- var testPointY = (middlePointY + y2) / 2.0;
-
- var counterClockwise = true;
-
- // The test point is always inside
- if (outside(testPointX, testPointY, x1, y1, x2, y2, 0, counterClockwise)) {
- counterClockwise = !counterClockwise;
- }
-
- /*
- return (!outside(x, y, x1, y1, x2, y2, toleranceSquared, counterClockwise)
- && !outside(x, y, x2, y2, x3, y3, toleranceSquared, counterClockwise)
- && !outside(x, y, x3, y3, middlePointX, middlePointY, toleranceSquared,
- counterClockwise)
- && !outside(x, y, middlePointX, middlePointY, x1, y1, toleranceSquared,
- counterClockwise)
- );
- */
-
- return (!outside(x, y, x1, y1, x2, y2, toleranceSquared, counterClockwise)
- && !outside(x, y, x2, y2, x3, y3, toleranceSquared, counterClockwise)
- && !outside(x, y, x3, y3, x1, y1, toleranceSquared,
- counterClockwise)
- );
- }
-
- CanvasRenderer.prototype.solveCubic = function(a, b, c, d, result) {
-
- // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where
- // r is the real component, i is the imaginary component
-
- // An implementation of the Cardano method from the year 1545
- // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots
-
- b /= a;
- c /= a;
- d /= a;
-
- var discriminant, q, r, dum1, s, t, term1, r13;
-
- q = (3.0 * c - (b * b)) / 9.0;
- r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b));
- r /= 54.0;
-
- discriminant = q * q * q + r * r;
- result[1] = 0;
- term1 = (b / 3.0);
-
- if (discriminant > 0) {
- s = r + Math.sqrt(discriminant);
- s = ((s < 0) ? -Math.pow(-s, (1.0 / 3.0)) : Math.pow(s, (1.0 / 3.0)));
- t = r - Math.sqrt(discriminant);
- t = ((t < 0) ? -Math.pow(-t, (1.0 / 3.0)) : Math.pow(t, (1.0 / 3.0)));
- result[0] = -term1 + s + t;
- term1 += (s + t) / 2.0;
- result[4] = result[2] = -term1;
- term1 = Math.sqrt(3.0) * (-t + s) / 2;
- result[3] = term1;
- result[5] = -term1;
- return;
- }
-
- result[5] = result[3] = 0;
-
- if (discriminant == 0) {
- r13 = ((r < 0) ? -Math.pow(-r, (1.0 / 3.0)) : Math.pow(r, (1.0 / 3.0)));
- result[0] = -term1 + 2.0 * r13;
- result[4] = result[2] = -(r13 + term1);
- return;
- }
-
- q = -q;
- dum1 = q * q * q;
- dum1 = Math.acos(r / Math.sqrt(dum1));
- r13 = 2.0 * Math.sqrt(q);
- result[0] = -term1 + r13 * Math.cos(dum1 / 3.0);
- result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0);
- result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0);
-
- return;
- }
-
- CanvasRenderer.prototype.sqDistanceToQuadraticBezier = function(
- x, y, x1, y1, x2, y2, x3, y3) {
-
- // Find minimum distance by using the minimum of the distance
- // function between the given point and the curve
-
- // This gives the coefficients of the resulting cubic equation
- // whose roots tell us where a possible minimum is
- // (Coefficients are divided by 4)
-
- var a = 1.0 * x1*x1 - 4*x1*x2 + 2*x1*x3 + 4*x2*x2 - 4*x2*x3 + x3*x3
- + y1*y1 - 4*y1*y2 + 2*y1*y3 + 4*y2*y2 - 4*y2*y3 + y3*y3;
-
- var b = 1.0 * 9*x1*x2 - 3*x1*x1 - 3*x1*x3 - 6*x2*x2 + 3*x2*x3
- + 9*y1*y2 - 3*y1*y1 - 3*y1*y3 - 6*y2*y2 + 3*y2*y3;
-
- var c = 1.0 * 3*x1*x1 - 6*x1*x2 + x1*x3 - x1*x + 2*x2*x2 + 2*x2*x - x3*x
- + 3*y1*y1 - 6*y1*y2 + y1*y3 - y1*y + 2*y2*y2 + 2*y2*y - y3*y;
-
- var d = 1.0 * x1*x2 - x1*x1 + x1*x - x2*x
- + y1*y2 - y1*y1 + y1*y - y2*y;
-
- debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a);
-
- var roots = [];
-
- // Use the cubic solving algorithm
- this.solveCubic(a, b, c, d, roots);
-
- var zeroThreshold = 0.0000001;
-
- var params = [];
-
- for (var index = 0; index < 6; index += 2) {
- if (Math.abs(roots[index + 1]) < zeroThreshold
- && roots[index] >= 0
- && roots[index] <= 1.0) {
- params.push(roots[index]);
- }
- }
-
- params.push(1.0);
- params.push(0.0);
-
- var minDistanceSquared = -1;
- var closestParam;
-
- var curX, curY, distSquared;
- for (var i = 0; i < params.length; i++) {
- curX = Math.pow(1.0 - params[i], 2.0) * x1
- + 2.0 * (1 - params[i]) * params[i] * x2
- + params[i] * params[i] * x3;
-
- curY = Math.pow(1 - params[i], 2.0) * y1
- + 2 * (1.0 - params[i]) * params[i] * y2
- + params[i] * params[i] * y3;
-
- distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2);
- debug("distance for param " + params[i] + ": " + Math.sqrt(distSquared));
- if (minDistanceSquared >= 0) {
- if (distSquared < minDistanceSquared) {
- minDistanceSquared = distSquared;
- closestParam = params[i];
- }
- } else {
- minDistanceSquared = distSquared;
- closestParam = params[i];
- }
- }
-
- /*
- debugStats.clickX = x;
- debugStats.clickY = y;
-
- debugStats.closestX = Math.pow(1.0 - closestParam, 2.0) * x1
- + 2.0 * (1.0 - closestParam) * closestParam * x2
- + closestParam * closestParam * x3;
-
- debugStats.closestY = Math.pow(1.0 - closestParam, 2.0) * y1
- + 2.0 * (1.0 - closestParam) * closestParam * y2
- + closestParam * closestParam * y3;
- */
-
- debug("given: "
- + "( " + x + ", " + y + "), "
- + "( " + x1 + ", " + y1 + "), "
- + "( " + x2 + ", " + y2 + "), "
- + "( " + x3 + ", " + y3 + ")");
-
-
- debug("roots: " + roots);
- debug("params: " + params);
- debug("closest param: " + closestParam);
- return minDistanceSquared;
- }
-
- CanvasRenderer.prototype.sqDistanceToFiniteLine = function(x, y, x1, y1, x2, y2) {
- var offset = [x - x1, y - y1];
- var line = [x2 - x1, y2 - y1];
-
- var lineSq = line[0] * line[0] + line[1] * line[1];
- var hypSq = offset[0] * offset[0] + offset[1] * offset[1];
-
- var dotProduct = offset[0] * line[0] + offset[1] * line[1];
- var adjSq = dotProduct * dotProduct / lineSq;
-
- if (dotProduct < 0) {
- return hypSq;
- }
-
- if (adjSq > lineSq) {
- return (x - x2) * (x - x2) + (y - y2) * (y - y2);
- }
-
- return (hypSq - adjSq)
- }
-
- }
- }
-
- var debug = function(){};
- $$("renderer", "canvas", CanvasRenderer);
-
-})( cytoscape );
-
-;(function($$){
-
- // default layout options
- var defaults = {
- ready: function(){},
- stop: function(){}
- };
-
- // constructor
- // options : object containing layout options
- function NullLayout( options ){
- this.options = $$.util.extend(true, {}, defaults, options);
- }
-
- // runs the layout
- NullLayout.prototype.run = function(){
- var options = this.options;
- var cy = options.cy; // cy is automatically populated for us in the constructor
-
- // puts all nodes at (0, 0)
- cy.nodes().positions(function(){
- return {
- x: 0,
- y: 0
- };
- });
-
- // trigger layoutready when each node has had its position set at least once
- cy.one("layoutready", options.ready);
- cy.trigger("layoutready");
-
- // trigger layoutstop when the layout stops (e.g. finishes)
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
- };
-
- // called on continuous layouts to stop them before they finish
- NullLayout.prototype.stop = function(){
- var options = this.options;
-
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
- };
-
- // register the layout
- $$("layout", "null", NullLayout);
-
-})(cytoscape);
-
-;(function($$){
-
- var defaults = {
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- fit: true, // whether to fit to viewport
- padding: 30 // fit padding
- };
-
- function RandomLayout( options ){
- this.options = $$.util.extend(true, {}, defaults, options);
- }
-
- RandomLayout.prototype.run = function(){
- var options = this.options;
- var cy = options.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
-
- var width = container.clientWidth;
- var height = container.clientHeight;
-
-
- nodes.positions(function(i, element){
-
- if( element.locked() ){
- return false;
- }
-
- return {
- x: Math.round( Math.random() * width ),
- y: Math.round( Math.random() * height )
- };
- });
-
- // layoutready should be triggered when the layout has set each node's
- // position at least once
- cy.one("layoutready", options.ready);
- cy.trigger("layoutready");
-
- if( options.fit ){
- cy.fit( options.padding );
- }
-
- // layoutstop should be triggered when the layout stops running
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
- };
-
- RandomLayout.prototype.stop = function(){
- // stop the layout if it were running continuously
- };
-
- // register the layout
- $$(
- "layout", // we're registering a layout
- "random", // the layout name
- RandomLayout // the layout prototype
- );
-
-})(cytoscape);
-
-;(function($$){
-
- var defaults = {
- fit: true, // whether to fit the viewport to the graph
- rows: undefined, // force num of rows in the grid
- columns: undefined, // force num of cols in the grid
- ready: undefined, // callback on layoutready
- stop: undefined // callback on layoutstop
- };
-
- function GridLayout( options ){
- this.options = $$.util.extend({}, defaults, options);
- }
-
- GridLayout.prototype.run = function(){
- var params = this.options;
- var options = params;
-
- var cy = params.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
-
- var width = container.clientWidth;
- var height = container.clientHeight;
-
- if( height == 0 || width == 0){
- nodes.positions(function(){
- return { x: 0, y: 0 };
- });
-
- } else {
-
- // width/height * splits^2 = cells where splits is number of times to split width
- var cells = nodes.size();
- var splits = Math.sqrt( cells * height/width );
- var rows = Math.round( splits );
- var cols = Math.round( width/height * splits );
-
- function small(val){
- if( val == undefined ){
- return Math.min(rows, cols);
- } else {
- var min = Math.min(rows, cols);
- if( min == rows ){
- rows = val;
- } else {
- cols = val;
- }
- }
- }
-
- function large(val){
- if( val == undefined ){
- return Math.max(rows, cols);
- } else {
- var max = Math.max(rows, cols);
- if( max == rows ){
- rows = val;
- } else {
- cols = val;
- }
- }
- }
-
- // if rows or columns were set in options, use those values
- if( options.rows != null && options.columns != null ){
- rows = options.rows;
- cols = options.columns;
- } else if( options.rows != null && options.columns == null ){
- rows = options.rows;
- cols = Math.ceil( cells / rows );
- } else if( options.rows == null && options.columns != null ){
- cols = options.columns;
- rows = Math.ceil( cells / cols );
- }
-
- // otherwise use the automatic values and adjust accordingly
-
- // if rounding was up, see if we can reduce rows or columns
- else if( cols * rows > cells ){
- var sm = small();
- var lg = large();
-
- // reducing the small side takes away the most cells, so try it first
- if( (sm - 1) * lg >= cells ){
- small(sm - 1);
- } else if( (lg - 1) * sm >= cells ){
- large(lg - 1);
- }
- } else {
-
- // if rounding was too low, add rows or columns
- while( cols * rows < cells ){
- var sm = small();
- var lg = large();
-
- // try to add to larger side first (adds less in multiplication)
- if( (lg + 1) * sm >= cells ){
- large(lg + 1);
- } else {
- small(sm + 1);
- }
- }
- }
-
- var cellWidth = width / cols;
- var cellHeight = height / rows;
-
- var row = 0;
- var col = 0;
- nodes.positions(function(i, element){
-
- if( element.locked() ){
- return false;
- }
-
- var x = col * cellWidth + cellWidth/2;
- var y = row * cellHeight + cellHeight/2;
-
- col++;
- if( col >= cols ){
- col = 0;
- row++;
- }
-
- return { x: x, y: y };
-
- });
- }
-
- if( params.fit ){
- cy.reset();
- }
-
- cy.one("layoutready", params.ready);
- cy.trigger("layoutready");
-
- cy.one("layoutstop", params.stop);
- cy.trigger("layoutstop");
- };
-
- GridLayout.prototype.stop = function(){
- // not a continuous layout
- };
-
- $$("layout", "grid", GridLayout);
-
-})( cytoscape );
-
-;(function($$){
-
- var defaults = {
- fit: true, // whether to fit to viewport
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- positions: undefined, // map of (node id) => (position obj)
- zoom: undefined, // the zoom level to set (prob want fit = false if set)
- pan: undefined, // the pan level to set (prob want fit = false if set)
- padding: 30 // padding on fit
- };
-
- function PresetLayout( options ){
- this.options = $$.util.extend(true, {}, defaults, options);
- }
-
- PresetLayout.prototype.run = function(){
- var options = this.options;
- var cy = options.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
-
- function getPosition(node){
- if( options.positions == null ){
- return null;
- }
-
- if( options.positions[node._private.data.id] == null ){
- return null;
- }
-
- return options.positions[node._private.data.id];
- }
-
- nodes.positions(function(i, node){
- var position = getPosition(node);
-
- if( node.locked() || position == null ){
- return false;
- }
-
- return position;
- });
-
- if( options.pan != null ){
- cy.pan( options.pan );
- }
-
- if( options.zoom != null ){
- cy.zoom( options.zoom );
- }
-
- cy.one("layoutready", options.ready);
- cy.trigger("layoutready");
-
- if( options.fit ){
- cy.fit( options.padding );
- }
-
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
- };
-
- $$("layout", "preset", PresetLayout);
-
- $$("core", "presetLayout", function(){
- var cy = this;
- var layout = {};
- var elements = {};
-
- cy.nodes().each(function(i, ele){
- elements[ ele.data("id") ] = ele.position();
- });
-
- layout.positions = elements;
- layout.name = "preset";
- layout.zoom = cy.zoom();
- layout.pan = cy.pan();
-
- return layout;
- });
-
-})(cytoscape);
-
-;(function($$){
-
- var defaults = {
- liveUpdate: true, // whether to show the layout as it's running
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- maxSimulationTime: 4000, // max length in ms to run the layout
- fit: true, // fit to viewport
- padding: [ 50, 50, 50, 50 ], // top, right, bottom, left
- ungrabifyWhileSimulating: true, // so you can't drag nodes during layout
-
- // forces used by arbor (use arbor default on undefined)
- repulsion: undefined,
- stiffness: undefined,
- friction: undefined,
- gravity: true,
- fps: undefined,
- precision: undefined,
-
- // static numbers or functions that dynamically return what these
- // values should be for each element
- nodeMass: undefined,
- edgeLength: undefined,
-
- stepSize: 1, // size of timestep in simulation
-
- // function that returns true if the system is stable to indicate
- // that the layout can be stopped
- stableEnergy: function( energy ){
- var e = energy;
- return (e.max <= 0.5) || (e.mean <= 0.3);
- }
- };
-
- function ArborLayout(options){
- this.options = $$.util.extend({}, defaults, options);
- }
-
- ArborLayout.prototype.run = function(){
- var options = this.options;
- var cy = options.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
- var width = container.clientWidth;
- var height = container.clientHeight;
-
- // arbor doesn't work with just 1 node
- if( cy.nodes().size() <= 1 ){
- if( options.fit ){
- cy.reset();
- }
-
- cy.nodes().position({
- x: Math.round( width/2 ),
- y: Math.round( height/2 )
- });
-
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
-
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
-
- return;
- }
-
- var sys = this.system = arbor.ParticleSystem(options.repulsion, options.stiffness, options.friction, options.gravity, options.fps, options.dt, options.precision);
- this.system = sys;
-
- if( options.liveUpdate && options.fit ){
- cy.reset();
- };
-
- var doneTime = 250;
- var doneTimeout;
-
- var ready = false;
-
- var lastDraw = +new Date;
- var sysRenderer = {
- init: function(system){
- },
- redraw: function(){
- var energy = sys.energy();
-
- // if we're stable (according to the client), we're done
- if( options.stableEnergy != null && energy != null && energy.n > 0 && options.stableEnergy(energy) ){
- sys.stop();
- return;
- }
-
- clearTimeout(doneTimeout);
- doneTimeout = setTimeout(doneHandler, doneTime);
-
- var movedNodes = [];
-
- sys.eachNode(function(n, point){
- var id = n.name;
- var data = n.data;
- var node = data.element;
-
- if( node == null ){
- return;
- }
- var pos = node._private.position;
-
- if( !node.locked() && !node.grabbed() ){
- pos.x = point.x;
- pos.y = point.y;
-
- movedNodes.push( node );
- }
- });
-
-
- var timeToDraw = (+new Date - lastDraw) >= 16;
- if( options.liveUpdate && movedNodes.length > 0 && timeToDraw ){
- new $$.Collection(cy, movedNodes).rtrigger("position");
- lastDraw = +new Date;
- }
-
-
- if( !ready ){
- ready = true;
- cy.one("layoutready", options.ready);
- cy.trigger("layoutready");
- }
- }
-
- };
- sys.renderer = sysRenderer;
- sys.screenSize( width, height );
- sys.screenPadding( options.padding[0], options.padding[1], options.padding[2], options.padding[3] );
- sys.screenStep( options.stepSize );
-
- function calculateValueForElement(element, value){
- if( value == null ){
- return undefined;
- } else if( typeof value == typeof function(){} ){
- return value.apply(element, [element._private.data, {
- nodes: nodes.length,
- edges: edges.length,
- element: element
- }]);
- } else {
- return value;
- }
- }
-
- // TODO we're using a hack; sys.toScreen should work :(
- function fromScreen(pos){
- var x = pos.x;
- var y = pos.y;
- var w = width;
- var h = height;
-
- var left = -2;
- var right = 2;
- var top = -2;
- var bottom = 2;
-
- var d = 4;
-
- return {
- x: x/w * d + left,
- y: y/h * d + right
- };
- }
-
- var grabHandler = function(e){
- grabbed = this;
- var pos = sys.fromScreen( this.position() );
- var p = arbor.Point(pos.x, pos.y);
- this.scratch().arbor.p = p;
-
- switch( e.type ){
- case "grab":
- this.scratch().arbor.fixed = true;
- break;
- case "dragstop":
- this.scratch().arbor.fixed = false;
- this.scratch().arbor.tempMass = 1000
- break;
- }
- };
- nodes.bind("grab drag dragstop", grabHandler);
-
- nodes.each(function(i, node){
- var id = this._private.data.id;
- var mass = calculateValueForElement(this, options.nodeMass);
- var locked = this._private.locked;
-
- var pos = fromScreen({
- x: node.position().x,
- y: node.position().y
- });
-
- if( node.locked() ){
- return;
- }
-
- this.scratch().arbor = sys.addNode(id, {
- element: this,
- mass: mass,
- fixed: locked,
- x: locked ? pos.x : undefined,
- y: locked ? pos.y : undefined
- });
- });
-
- edges.each(function(){
- var id = this.id();
- var src = this.source().id();
- var tgt = this.target().id();
- var length = calculateValueForElement(this, options.edgeLength);
-
- this.scratch().arbor = sys.addEdge(src, tgt, {
- length: length
- });
- });
-
- function packToCenter(callback){
- // TODO implement this for IE :(
-
- if( options.fit ){
- cy.fit();
- }
- callback();
- };
-
- var grabbableNodes = nodes.filter(":grabbable");
- // disable grabbing if so set
- if( options.ungrabifyWhileSimulating ){
- grabbableNodes.ungrabify();
- }
-
- var doneHandler = function(){
- if( window.isIE ){
- packToCenter(function(){
- done();
- });
- } else {
- done();
- }
-
- function done(){
- if( !options.liveUpdate ){
- if( options.fit ){
- cy.reset();
- }
-
- cy.nodes().rtrigger("position");
- }
-
- // unbind handlers
- nodes.unbind("grab drag dragstop", grabHandler);
-
- // enable back grabbing if so set
- if( options.ungrabifyWhileSimulating ){
- grabbableNodes.grabify();
- }
-
- cy.one("layoutstop", options.stop);
- cy.trigger("layoutstop");
- }
- };
-
- sys.start();
- setTimeout(function(){
- sys.stop();
- }, options.maxSimulationTime);
-
- };
-
- ArborLayout.prototype.stop = function(){
- if( this.system != null ){
- system.stop();
- }
- };
-
- $$("layout", "arbor", ArborLayout);
-
-
-})(cytoscape);
-
-;(function($$){
-
- var defaults = {
- fit: true, // whether to fit the viewport to the graph
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- rStepSize: 10, // the step size for increasing the radius if the nodes don't fit on screen
- padding: 30, // the padding on fit
- startAngle: 3/2 * Math.PI, // the position of the first node
- counterclockwise: false // whether the layout should go counterclockwise (true) or clockwise (false)
- };
-
- function CircleLayout( options ){
- this.options = $$.util.extend({}, defaults, options);
- }
-
- CircleLayout.prototype.run = function(){
- var params = this.options;
- var options = params;
-
- var cy = params.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
-
- var width = container.clientWidth;
- var height = container.clientHeight;
-
- var center = {
- x: width/2,
- y: height/2
- };
-
- var padding = 50;
-
- var theta = options.startAngle;
- var dTheta = 2 * Math.PI / nodes.length;
- var maxNodeSize = 0;
-
- for( var i = 0; i < nodes.length; i++ ){
- var node = nodes[i];
-
- maxNodeSize = Math.max( node.outerWidth(), node.outerHeight() );
- }
-
- var r = width/2 - maxNodeSize;
-
- function distanceBetweenNodes(){
- var t1 = 0;
- var t2 = dTheta;
-
- var p1 = {
- x: center.x + r * Math.cos(t1),
- y: center.y + r * Math.sin(t1)
- };
-
- var p2 = {
- x: center.x + r * Math.cos(t2),
- y: center.y + r * Math.sin(t2)
- };
-
- var dist = Math.sqrt( (p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y) );
-
- return dist;
- }
-
- while( distanceBetweenNodes() < maxNodeSize ){
- r += options.rStepSize;
- }
-
-
- var i = 0;
- nodes.positions(function(){
- var node = this;
- var rx = r * Math.cos( theta );
- var ry = r * Math.sin( theta );
- var pos = {
- x: center.x + rx,
- y: center.y + ry
- };
-
- i++;
- theta = options.counterclockwise ? theta - dTheta : theta + dTheta;
- return pos;
- });
-
- if( params.fit ){
- cy.fit( options.padding );
- }
-
- cy.one("layoutready", params.ready);
- cy.trigger("layoutready");
-
- cy.one("layoutstop", params.stop);
- cy.trigger("layoutstop");
- };
-
- CircleLayout.prototype.stop = function(){
- // not a continuous layout
- };
-
- $$("layout", "circle", CircleLayout);
-
-})( cytoscape );
-
-;(function($$){
-
- var defaults = {
- fit: true, // whether to fit the viewport to the graph
- ready: undefined, // callback on layoutready
- stop: undefined, // callback on layoutstop
- directed: true, // whether the tree is directed downwards (or edges can point in any direction if false)
- padding: 30, // padding on fit
- circle: false, // put depths in concentric circles if true, put depths top down if false
- roots: undefined // the roots of the trees
- };
-
- function BreadthFirstLayout( options ){
- this.options = $$.util.extend({}, defaults, options);
- }
-
- BreadthFirstLayout.prototype.run = function(){
- var params = this.options;
- var options = params;
-
- var cy = params.cy;
- var nodes = cy.nodes();
- var edges = cy.edges();
- var container = cy.container();
-
- var width = container.clientWidth;
- var height = container.clientHeight;
-
- var roots;
- if( $$.is.elementOrCollection(options.roots) ){
- roots = options.roots;
- } else if( $$.is.array(options.roots) ){
- var rootsArray = [];
-
- for( var i = 0; i < options.roots.length; i++ ){
- var id = options.roots[i];
- var ele = cy.getElementById( id );
- roots.push( ele );
- }
-
- roots = new $$.Collection( cy, rootsArray );
- } else {
- roots = nodes.roots();
- }
-
-
- var depths = [];
- var foundByBfs = {};
- var id2depth = {};
-
- // find the depths of the nodes
- roots.bfs(function(i, depth){
- var ele = this[0];
-
- if( !depths[depth] ){
- depths[depth] = [];
- }
-
- depths[depth].push( ele );
- foundByBfs[ ele.id() ] = true;
- id2depth[ ele.id() ] = depth;
- }, options.directed);
-
- // check for nodes not found by bfs
- var orphanNodes = [];
- for( var i = 0; i < nodes.length; i++ ){
- var ele = nodes[i];
-
- if( foundByBfs[ ele.id() ] ){
- continue;
- } else {
- orphanNodes.push( ele );
- }
- }
-
- // assign orphan nodes a depth from their neighborhood
- var maxChecks = orphanNodes.length * 3;
- var checks = 0;
- while( orphanNodes.length !== 0 && checks < maxChecks ){
- var node = orphanNodes.shift();
- var neighbors = node.neighborhood().nodes();
- var assignedDepth = false;
-
- for( var i = 0; i < neighbors.length; i++ ){
- var depth = id2depth[ neighbors[i].id() ];
-
- if( depth !== undefined ){
- depths[depth].push( node );
- assignedDepth = true;
- break;
- }
- }
-
- if( !assignedDepth ){
- orphanNodes.push( node );
- }
-
- checks++;
- }
-
- // assign orphan nodes that are still left to the depth of their subgraph
- while( orphanNodes.length !== 0 ){
- var node = orphanNodes.shift();
- var subgraph = node.bfs();
- var assignedDepth = false;
-
- for( var i = 0; i < subgraph.length; i++ ){
- var depth = id2depth[ subgraph[i].id() ];
-
- if( depth !== undefined ){
- depths[depth].push( node );
- assignedDepth = true;
- break;
- }
- }
-
- if( !assignedDepth ){ // worst case if the graph really isn't tree friendly, then just dump it in 0
- if( depths.length === 0 ){
- depths.push([]);
- }
-
- depths[0].push( node );
- }
- }
-
- // assign the nodes a depth and index
- function assignDepthsToEles(){
- for( var i = 0; i < depths.length; i++ ){
- var eles = depths[i];
-
- for( var j = 0; j < eles.length; j++ ){
- var ele = eles[j];
-
- ele._private.scratch.BreadthFirstLayout = {
- depth: i,
- index: j
- };
- }
- }
- }
- assignDepthsToEles();
-
- // find min distance we need to leave between nodes
- var minDistance = 0;
- for( var i = 0; i < nodes.length; i++ ){
- var w = nodes[i].outerWidth();
- var h = nodes[i].outerHeight();
-
- minDistance = Math.max(minDistance, w, h);
- }
- minDistance *= 1.75; // just to have some nice spacing
-
- // get the weighted percent for an element based on its connectivity to other levels
- var cachedWeightedPercent = {};
- function getWeightedPercent( ele ){
- if( cachedWeightedPercent[ ele.id() ] ){
- return cachedWeightedPercent[ ele.id() ];
- }
-
- var eleDepth = ele._private.scratch.BreadthFirstLayout.depth;
- var neighbors = ele.neighborhood().nodes();
- var percent = 0;
- var samples = 0;
-
- for( var i = 0; i < neighbors.length; i++ ){
- var neighbor = neighbors[i];
- var nEdges = neighbor.edgesWith( ele );
- var index = neighbor._private.scratch.BreadthFirstLayout.index;
- var depth = neighbor._private.scratch.BreadthFirstLayout.depth;
- var nDepth = depths[depth].length;
-
- if( eleDepth > depth || eleDepth === 0 ){ // only get influenced by elements above
- percent += index / nDepth;
- samples++;
- }
- }
-
- samples = Math.max(1, samples);
- percent = percent / samples;
-
- if( samples === 0 ){ // so lone nodes have a "don't care" state in sorting
- percent = undefined;
- }
-
- cachedWeightedPercent[ ele.id() ] = percent;
- return percent;
- }
-
- // rearrange the indices in each depth level based on connectivity
- for( var times = 0; times < 3; times++ ){ // do it a few times b/c the depths are dynamic and we want a more stable result
-
- for( var i = 0; i < depths.length; i++ ){
- var depth = i;
- var newDepths = [];
-
- depths[i] = depths[i].sort(function(a, b){
- var apct = getWeightedPercent( a );
- var bpct = getWeightedPercent( b );
-
-
- return apct - bpct;
- });
- }
- assignDepthsToEles(); // and update
-
- }
-
- var center = {
- x: width/2,
- y: height/2
- };
- nodes.positions(function(){
- var ele = this[0];
- var info = ele._private.scratch.BreadthFirstLayout;
- var depth = info.depth;
- var index = info.index;
-
- var distanceX = Math.max( width / (depths[depth].length + 1), minDistance );
- var distanceY = Math.max( height / (depths.length + 1), minDistance );
- var radiusStepSize = Math.min( width / 2 / depths.length, height / 2 / depths.length );
- radiusStepSize = Math.max( radiusStepSize, minDistance );
-
- if( options.circle ){
- var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize/2 : 0);
- var theta = 2 * Math.PI / depths[depth].length * index;
-
- if( depth === 0 && depths[0].length === 1 ){
- radius = 1;
- }
-
- return {
- x: center.x + radius * Math.cos(theta),
- y: center.y + radius * Math.sin(theta)
- };
-
- } else {
- return {
- x: (index + 1) * distanceX,
- y: (depth + 1) * distanceY
- };
- }
-
- });
-
- if( params.fit ){
- cy.fit( options.padding );
- }
-
- cy.one("layoutready", params.ready);
- cy.trigger("layoutready");
-
- cy.one("layoutstop", params.stop);
- cy.trigger("layoutstop");
- };
-
- BreadthFirstLayout.prototype.stop = function(){
- // not a continuous layout
- };
-
- $$("layout", "breadthfirst", BreadthFirstLayout);
-
-})( cytoscape );
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.min.js b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.min.js
deleted file mode 100755
index b84eb45650..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/cytoscape.min.js
+++ /dev/null
@@ -1,377 +0,0 @@
-
-/* cytoscape.min.js */
-
-/**
- * This file is part of cytoscape.js 2.0.2.
- *
- * Cytoscape.js is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * Cytoscape.js is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with
- * cytoscape.js. If not, see .
- */
-
-var cytoscape;(function(){var a=cytoscape=function(){return cytoscape.init.apply(cytoscape,arguments)};a.init=function(b){if(b===undefined){b={}}if(a.is.plainObject(b)){return new a.Core(b)}else{if(a.is.string(b)){return a.extension.apply(a.extension,arguments)}}};a.fn={};if(typeof exports!=="undefined"){exports=module.exports=cytoscape}window.cytoscape=cytoscape})();(function(a){a.is={string:function(b){return b!=null&&typeof b==typeof""},fn:function(b){return b!=null&&typeof b===typeof function(){}
-},array:function(b){return b!=null&&b instanceof Array},plainObject:function(b){return b!=null&&typeof b===typeof{}&&!a.is.array(b)&&b.constructor===Object},number:function(b){return b!=null&&typeof b===typeof 1&&!isNaN(b)},integer:function(b){return a.is.number(b)&&Math.floor(b)===b},color:function(b){return b!=null&&typeof b===typeof""&&$.Color(b).toString()!==""},bool:function(b){return b!=null&&typeof b===typeof true},elementOrCollection:function(b){return a.is.element(b)||a.is.collection(b)},element:function(b){return b instanceof a.Element&&b._private.single
-},collection:function(b){return b instanceof a.Collection&&!b._private.single},core:function(b){return b instanceof a.Core},style:function(b){return b instanceof a.Style},stylesheet:function(b){return b instanceof a.Stylesheet},event:function(b){return b instanceof a.Event},emptyString:function(b){if(!b){return true}else{if(a.is.string(b)){if(b===""||b.match(/^\s+$/)){return true}}}return false},nonemptyString:function(b){if(b&&a.is.string(b)&&b!==""&&!b.match(/^\s+$/)){return true}return false},domElement:function(b){if(typeof HTMLElement==="undefined"){return false
-}else{return b instanceof HTMLElement}}}})(cytoscape);(function(a){a.util={extend:function(){var l,d,b,c,h,j,g=arguments[0]||{},f=1,e=arguments.length,k=false;if(typeof g==="boolean"){k=g;g=arguments[1]||{};f=2}if(typeof g!=="object"&&!a.is.fn(g)){g={}}if(e===f){g=this;--f}for(;fc&&d[b]===" ";b--){}return d.substring(c,b+1)},hex2tuple:function(h){if(!(h.length===4||h.length===7)||h[0]!=="#"){return
-}var f=h.length===4;var e,d,c;var i=16;if(f){e=parseInt(h[1]+h[1],i);d=parseInt(h[2]+h[2],i);c=parseInt(h[3]+h[3],i)}else{e=parseInt(h[1]+h[2],i);d=parseInt(h[3]+h[4],i);c=parseInt(h[5]+h[6],i)}return[e,d,c]},hsl2tuple:function(z){var u;var k=a.util.regex.number;var o,A,j,w,c,t,v;var i=new RegExp("^"+a.util.regex.hsla+"$").exec(z);if(i){o=parseInt(i[1]);if(o<0){o=(360-(-1*o%360))%360}else{if(o>360){o=o%360}}o/=360;A=parseFloat(i[2]);if(A<0||A>100){return}A=A/100;j=parseFloat(i[3]);if(j<0||j>100){return
-}j=j/100;w=i[4];if(w!==undefined){w=parseFloat(w);if(w<0||w>1){return}}if(A===0){c=t=v=Math.round(j*255)}else{function f(h,g,b){if(b<0){b+=1}if(b>1){b-=1}if(b<1/6){return h+(g-h)*6*b}if(b<1/2){return g}if(b<2/3){return h+(g-h)*(2/3-b)*6}return h}var d=j<0.5?j*(1+A):j+A-j*A;var e=2*j-d;c=Math.round(255*f(e,d,o+1/3));t=Math.round(255*f(e,d,o));v=Math.round(255*f(e,d,o-1/3))}u=[c,t,v,w]}return u},rgb2tuple:function(k){var h;var d=a.util.regex.number;var b=new RegExp("^"+a.util.regex.rgba+"$").exec(k);
-if(b){h=[];var l=[];for(var e=1;e<=3;e++){var g=b[e];if(g[g.length-1]==="%"){l[e]=true}g=parseFloat(g);if(l[e]){g=g/100*255}if(g<0||g>255){return}h.push(Math.floor(g))}var f=l[1]||l[2]||l[3];var j=l[1]&&l[2]&&l[3];if(f&&!j){return}var c=b[4];if(c!==undefined){c=parseFloat(c);if(c<0||c>1){return}h.push(c)}}return h},colorname2tuple:function(b){return a.util.colors[b.toLowerCase()]},color2tuple:function(b){return a.util.colorname2tuple(b)||a.util.hex2tuple(b)||a.util.rgb2tuple(b)||a.util.hsl2tuple(b)
-},tuple2hex:function(d){var f=d[0];var e=d[1];var c=d[2];function h(b){var g=b.toString(16);if(g.length===1){g="0"+g}return g}return"#"+h(f)+h(e)+h(c)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}};
-a.util.regex={};a.util.regex.number="(?:\\d*\\.\\d+|\\d+|\\d*\\.\\d+[eE]\\d+)";a.util.regex.rgba="rgb[a]?\\(("+a.util.regex.number+"[%]?)\\s*,\\s*("+a.util.regex.number+"[%]?)\\s*,\\s*("+a.util.regex.number+"[%]?)(?:\\s*,\\s*("+a.util.regex.number+"))?\\)";a.util.regex.rgbaNoBackRefs="rgb[a]?\\((?:"+a.util.regex.number+"[%]?)\\s*,\\s*(?:"+a.util.regex.number+"[%]?)\\s*,\\s*(?:"+a.util.regex.number+"[%]?)(?:\\s*,\\s*(?:"+a.util.regex.number+"))?\\)";a.util.regex.hsla="hsl[a]?\\(("+a.util.regex.number+")\\s*,\\s*("+a.util.regex.number+"[%])\\s*,\\s*("+a.util.regex.number+"[%])(?:\\s*,\\s*("+a.util.regex.number+"))?\\)";
-a.util.regex.hslaNoBackRefs="hsl[a]?\\((?:"+a.util.regex.number+")\\s*,\\s*(?:"+a.util.regex.number+"[%])\\s*,\\s*(?:"+a.util.regex.number+"[%])(?:\\s*,\\s*(?:"+a.util.regex.number+"))?\\)";a.util.regex.hex3="\\#[0-9a-fA-F]{3}";a.util.regex.hex6="\\#[0-9a-fA-F]{6}"})(cytoscape);(function(b){b.math={};b.math.boxInBezierVicinity=function(o,j,u,k,q,i,p,h,l,f,m){var v=Math.min(o,u)-m;var s=Math.min(j,k)-m;var t=Math.max(o,u)+m;var r=Math.max(j,k)+m;if(q>=v&&q<=t&&i>=s&&i<=r){return 2}else{if(l>=v&&l<=t&&f>=s&&f<=r){return 2
-}else{if(p>=v&&p<=t&&h>=s&&h<=r){return 1}}}var g=Math.min(q,p,l);var e=Math.min(i,h,f);var d=Math.max(q,p,l);var c=Math.max(i,h,f);if(g>t||dr||c=B&&t<=z&&Math.min(g,d)<=w&&Math.max(g,d)>=v)}var c=(B-m)/h;if(c>0&&c<=1){u=e*c+l;if(u>=w&&u<=v){return true
-}}var j=(z-m)/h;if(j>0&&j<=1){u=e*j+l;if(u>=w&&u<=v){return true}}var f=(w-l)/e;if(f>0&&f<=1){p=h*f+m;if(p>=B&&p<=z){return true}}var i=(v-l)/e;if(i>0&&i<=1){p=h*i+m;if(p>=B&&p<=z){return true}}return false};b.math.checkBezierCrossesBox=function(w,h,L,A,q,U,l,R,j,O,d){var s=Math.min(w,L)-d;var p=Math.min(h,A)-d;var T=Math.max(w,L)+d;var Q=Math.max(h,A)+d;if(q>=s&&q<=T&&U>=p&&U<=Q){return true}else{if(j>=s&&j<=T&&O>=p&&O<=Q){return true}}var v=q-2*l+j;var g=-2*q+2*l;var H=q;var B=[];if(Math.abs(v)<0.0001){var M=(s-q)/g;
-var z=(T-q)/g;B.push(M,z)}else{var E=g*g-4*v*(H-s);var t,r;if(E>0){var F=Math.sqrt(E);t=(-g+F)/(2*v);r=(-g-F)/(2*v);B.push(t,r)}var D=g*g-4*v*(H-T);var o,k;if(D>0){var F=Math.sqrt(D);o=(-g+F)/(2*v);k=(-g-F)/(2*v);B.push(o,k)}}B.sort(function(W,V){return W-V});var u=U-2*R+O;var e=-2*U+2*R;var G=U;var K=[];if(Math.abs(u)<0.0001){var f=(p-U)/e;var I=(Q-U)/e;K.push(f,I)}else{var m=e*e-4*u*(G-p);var c,S;if(m>0){var F=Math.sqrt(m);c=(-e+F)/(2*u);S=(-e-F)/(2*u);K.push(c,S)}var i=e*e-4*u*(G-Q);var P,N;if(i>0){var F=Math.sqrt(i);
-P=(-e+F)/(2*u);N=(-e-F)/(2*u);K.push(P,N)}}K.sort(function(W,V){return W-V});for(var C=0;C=0&&B[C]<=1&&B[C+1]>K[J-1]&&K[J-1]<=1&&B[C+1]>=0){return true}}}return false};b.math.inBezierVicinity=function(i,h,t,e,s,d,r,c,A){var k=0.25*t+0.5*s+0.25*r;var j=0.25*e+0.5*d+0.25*c;var o,m,w,u;var g,f,l;var z=function(C,I,D,B,H,G,E,F){g=(G-B)*(C-D)+(D-H)*(I-B);f=g*g;sideSquared=(G-B)*(G-B)+(D-H)*(D-H);if(F){if(g>0){return false}}else{if(g<0){return false
-}}return(f/sideSquared>E)};var q=(k+s)/2;var p=(j+d)/2;var v=true;if(z(q,p,t,e,s,d,0,v)){v=!v}return(!z(i,h,t,e,s,d,A,v)&&!z(i,h,s,d,r,c,A,v)&&!z(i,h,r,c,t,e,A,v))};b.math.solveCubic=function(o,m,l,k,v){m/=o;l/=o;k/=o;var f,g,e,i,u,p,h,j;g=(3*l-(m*m))/9;e=-(27*k)+m*(9*l-2*(m*m));e/=54;f=g*g*g+e*e;v[1]=0;h=(m/3);if(f>0){u=e+Math.sqrt(f);u=((u<0)?-Math.pow(-u,(1/3)):Math.pow(u,(1/3)));p=e-Math.sqrt(f);p=((p<0)?-Math.pow(-p,(1/3)):Math.pow(p,(1/3)));v[0]=-h+u+p;h+=(u+p)/2;v[4]=v[2]=-h;h=Math.sqrt(3)*(-p+u)/2;
-v[3]=h;v[5]=-h;return}v[5]=v[3]=0;if(f==0){j=((e<0)?-Math.pow(-e,(1/3)):Math.pow(e,(1/3)));v[0]=-h+2*j;v[4]=v[2]=-(j+h);return}g=-g;i=g*g*g;i=Math.acos(e/Math.sqrt(i));j=2*Math.sqrt(g);v[0]=-h+j*Math.cos(i/3);v[2]=-h+j*Math.cos((i+2*Math.PI)/3);v[4]=-h+j*Math.cos((i+4*Math.PI)/3);return};b.math.sqDistanceToQuadraticBezier=function(q,p,v,j,u,h,t,g){var D=1*v*v-4*v*u+2*v*t+4*u*u-4*u*t+t*t+j*j-4*j*h+2*j*g+4*h*h-4*h*g+g*g;var C=1*9*v*u-3*v*v-3*v*t-6*u*u+3*u*t+9*j*h-3*j*j-3*j*g-6*h*h+3*h*g;var A=1*3*v*v-6*v*u+v*t-v*q+2*u*u+2*u*q-t*q+3*j*j-6*j*h+j*g-j*p+2*h*h+2*h*p-g*p;
-var z=1*v*u-v*v+v*q-u*q+j*h-j*j+j*p-h*p;a("coefficients: "+D/D+", "+C/D+", "+A/D+", "+z/D);var k=[];this.solveCubic(D,C,A,z,k);var e=1e-7;var B=[];for(var l=0;l<6;l+=2){if(Math.abs(k[l+1])=0&&k[l]<=1){B.push(k[l])}}B.push(1);B.push(0);var f=-1;var w;var o,m,r;for(var s=0;s=0){if(r=0;c--){var d=a.instances[c];if(d.domElement===e){return d}}}}}})(cytoscape);(function(c){var f={};c.extensions=f;var d={};c.modules=d;
-function b(j,i,k){var h={};h[i]=k;switch(j){case"core":case"collection":c.fn[j](h)}return c.util.setMap({map:f,keys:[j,i],value:k})}function g(i,h){return c.util.getMap({map:f,keys:[i,h]})}function e(k,i,j,h,l){return c.util.setMap({map:d,keys:[k,i,j,h],value:l})}function a(k,i,j,h){return c.util.getMap({map:d,keys:[k,i,j,h]})}c.extension=function(){if(arguments.length==2){return g.apply(this,arguments)}else{if(arguments.length==3){return b.apply(this,arguments)}else{if(arguments.length==4){return a.apply(this,arguments)
-}else{if(arguments.length==5){return e.apply(this,arguments)}else{$.error("Invalid extension access syntax")}}}}}})(cytoscape);(function(b,a){if(!b){return}b.fn.cytoscape=function(h){var k=b(this);if(h==="get"){var g=a.getRegistrationForInstance(k[0]);return g.cy}else{if(a.is.fn(h)){var f=h;var c=k[0];var g=a.getRegistrationForInstance(c);if(!g){g=a.registerInstance(c)}if(g&&g.cy&&g.cy.ready()){g.cy.trigger("ready",[],f)}else{g.readies.push(f)}}else{if(a.is.plainObject(h)){return k.each(function(){var i=b.extend({},h,{container:b(this)[0]});
-cytoscape(i)})}else{var c=k[0];var j=[];var d=[];for(var e=1;e node").css({width:"auto",height:"auto",shape:"rectangle","background-opacity":0.5,"padding-top":10,"padding-right":10,"padding-left":10,"padding-bottom":10}).selector("edge").css({width:1,}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":0.25}).selector("core").css({"selection-box-color":"#ddd","selection-box-opacity":0.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"panning-cursor":"grabbing","active-bg-color":"black","active-bg-opacity":0.15,"active-bg-size":isTouch?40:15})
-};$$.styfn.clear=function(){this._private.newStyle=true;for(var i=0;itype.max)){return null}var ret={name:name,value:value,strValue:""+value+(units?units:""),units:units,bypass:propIsBypass,pxValue:type.unitless||units==="%"?undefined:(units==="px"||!units?(value):(this.getEmSizeInPixels()*value))};return ret}else{if(type.color){var tuple=$$.util.color2tuple(value);return{name:name,value:tuple,strValue:value,bypass:propIsBypass}}else{if(type.enums){for(var i=0;i0;var props=context.properties;if(contextSelectorMatches){for(var j=0;j0){d.remove()
-}i.notifications(false);var c=[];if(f!=null){if(a.is.plainObject(f)||a.is.array(f)){i.add(f)}}function h(){i.one("layoutready",function(j){i.notifications(true);i.trigger(j);i.notify({type:"load",collection:i.elements(),style:i._private.style});i.one("load",g);i.trigger("load")}).one("layoutstop",function(){i.one("done",e);i.trigger("done")});i.layout(i._private.options.layout)}if(true||b&&b.chrome){setTimeout(function(){h()},30)}else{h()}return this}})})(cytoscape,typeof window==="undefined"?null:window);
-(function(a){a.fn.core({addToAnimationPool:function(b){var h=this;var c=h._private.aniEles;var e=[];for(var d=0;d0?o.shift():null;if(u!=null){u.callTime=+new Date;z.push(u)}}var A=[];for(var t=0;t0){g.notify({type:"draw",collection:C})}for(var t=0;t0||v.length>0;if(!m){C.splice(t,1);t--}}}function e(F,w,s){var o=g._private.style;var C=w.properties;var v=w.params;var t=w.callTime;var B;if(w.duration===0){B=1}else{B=Math.min(1,(s-t)/w.duration)
-}if(B<0){B=0}else{if(B>1){B=1}}if(C.delay==null){var A=w.startPosition;var r=C.position;var E=F._private.position;if(r){if(b(A.x,r.x)){E.x=h(A.x,r.x,B)}if(b(A.y,r.y)){E.y=h(A.y,r.y,B)}}if(C.css){var D=a.style.properties;for(var z=0;z=1){w.done=true}return B}function b(o,m){if(o==null||m==null){return false}if(a.is.number(o)&&a.is.number(m)){return true
-}else{if((o)&&(m)){return true}}return false}function h(p,q,v){if(v<0){v=0}else{if(v>1){v=1}}if(a.is.number(p)&&a.is.number(q)){return p+(q-p)*v}else{if(a.is.number(p[0])&&a.is.number(q[0])){var t=p;var s=q;function o(A,r){var B=r-A;var z=A;return Math.round(v*B+z)}var m=o(t[0],s[0]);var u=o(t[1],s[1]);var w=o(t[2],s[2]);return"rgb("+m+", "+u+", "+w+")"}}return undefined}}})})(cytoscape);(function(a){a.fn.core({data:a.define.data({field:"data",bindingEvent:"data",allowBinding:true,allowSetting:true,settingEvent:"data",settingTriggersEvent:true,triggerFnName:"trigger",allowGetting:true}),removeData:a.define.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:true}),batchData:a.define.batchData({field:"data",event:"data",triggerFnName:"trigger",immutableKeys:{id:true,source:true,target:true,parent:true},updateMappers:true}),scratch:a.define.data({field:"scratch",allowBinding:false,allowSetting:true,settingTriggersEvent:false,allowGetting:true}),removeScratch:a.define.removeData({field:"scratch",triggerEvent:false}),})
-})(cytoscape);(function(a){a.fn.core({on:a.define.on(),one:a.define.on({unbindSelfOnTrigger:true}),once:a.define.on({unbindAllBindersOnTrigger:true}),off:a.define.off(),trigger:a.define.trigger(),});a.corefn.bind=a.corefn.on;a.corefn.unbind=a.corefn.off;a.define.event.aliasesOn(a.corefn)})(cytoscape);(function(a){a.fn.core({png:function(){var c=this;var b=this._private.renderer;return b.png()}})})(cytoscape);(function(a){a.fn.core({layout:function(b){var c=this;if(this._private.layoutRunning){return this
-}if(b==null){b=this._private.options.layout}this.initLayout(b);c.trigger("layoutstart");this._private.layoutRunning=true;this.one("layoutstop",function(){this._private.layoutRunning=false});this._private.layout.run();return this},initLayout:function(d){if(d==null){a.util.error("Layout options must be specified to run a layout");return}if(d.name==null){a.util.error("A `name` must be specified to run a layout");return}var c=d.name;var b=a.extension("layout",c);if(b==null){a.util.error("Can not apply layout: No such layout `%s` found; did you include its JS file?",c);
-return}this._private.layout=new b(a.util.extend({},d,{renderer:this._private.renderer,cy:this}));this._private.options.layout=d}})})(cytoscape);(function(a){a.fn.core({notify:function(e){if(!this._private.notificationsEnabled){return}var d=this.renderer();var f=this;if(a.is.element(e.collection)){var b=e.collection;e.collection=new a.Collection(f,[b])}else{if(a.is.array(e.collection)){var c=e.collection;e.collection=new a.Collection(f,c)}}d.notify(e)},notifications:function(b){var c=this._private;
-if(b===undefined){return c.notificationsEnabled}else{c.notificationsEnabled=b?true:false}},noNotifications:function(b){this.notifications(false);b();this.notifications(true)}})})(cytoscape);(function(a){a.fn.core({renderTo:function(b,d,e){var c=this._private.renderer;c.renderTo(b,d,e)},renderer:function(){return this._private.renderer},initRenderer:function(c){var d=this;var b=a.extension("renderer",c.name);if(b==null){a.util.error("Can not initialise: No such renderer `%s` found; did you include its JS file?",c.name);
-return}this._private.renderer=new b(a.util.extend({},c,{cy:d,style:d._private.style}))}})})(cytoscape);(function(a){a.fn.core({collection:function(b){if(a.is.string(b)){return this.$(b)}else{if(a.is.elementOrCollection(b)){return b.collection()}}return new a.Collection(this)},nodes:function(b){var c=this.$("node");if(b){return c.filter(b)}return c},edges:function(b){var c=this.$("edge");if(b){return c.filter(b)}return c},$:function(c){var b=new a.Collection(this,this._private.elements);if(c){return b.filter(c)
-}return b}});a.corefn.elements=a.corefn.filter=a.corefn.$})(cytoscape);(function(a){a.fn.core({style:function(b){return this._private.style}})})(cytoscape);(function(a){a.fn.core({panningEnabled:function(b){if(b!==undefined){this._private.panEnabled=b?true:false}else{return this._private.panEnabled}return this},zoomingEnabled:function(b){if(b!==undefined){this._private.zoomEnabled=b?true:false}else{return this._private.zoomEnabled}return this},boxSelectionEnabled:function(b){if(b!==undefined){this._private.boxSelectionEnabled=b?true:false
-}else{return this._private.boxSelectionEnabled}return this},pan:function(){var c=arguments;var g=this._private.pan;var d,f,e,b,h;switch(c.length){case 0:return g;case 1:if(!this._private.panEnabled){return this}else{if(a.is.string(c[0])){d=c[0];return g[d]}else{if(a.is.plainObject(c[0])){e=c[0];b=e.x;h=e.y;if(a.is.number(b)){g.x=b}if(a.is.number(h)){g.y=h}this.trigger("pan")}}}break;case 2:if(!this._private.panEnabled){return this}d=c[0];f=c[1];if((d==="x"||d==="y")&&a.is.number(f)){g[d]=f}this.trigger("pan");
-break;default:break}this.notify({type:"viewport"});return this},panBy:function(h){var c=arguments;var g=this._private.pan;var d,f,e,b,i;if(!this._private.panEnabled){return this}switch(c.length){case 1:if(a.is.plainObject(c[0])){e=c[0];b=e.x;i=e.y;if(a.is.number(b)){g.x+=b}if(a.is.number(i)){g.y+=i}this.trigger("pan")}break;case 2:d=c[0];f=c[1];if((d==="x"||d==="y")&&a.is.number(f)){g[d]+=f}this.trigger("pan");break;default:break}this.notify({type:"viewport"});return this},fit:function(g,i){if(a.is.number(g)&&i===undefined){i=g;
-g=undefined}if(!this._private.panEnabled||!this._private.zoomEnabled){return this}if(a.is.string(g)){var f=g;g=this.$(f)}else{if(!a.is.elementOrCollection(g)){g=this.elements()}}var j=g.boundingBox();var d=this.style();var b=parseFloat(d.containerCss("width"));var c=parseFloat(d.containerCss("height"));var e;i=a.is.number(i)?i:0;if(!isNaN(b)&&!isNaN(c)){e=this._private.zoom=Math.min((b-2*i)/j.w,(c-2*i)/j.h);e=e>this._private.maxZoom?this._private.maxZoom:e;e=ethis._private.maxZoom?this._private.maxZoom:k;k=k1&&this._private.minZoom<1){this.zoom(1)}this.notify({type:"viewport"});return this}})})(cytoscape);(function(b){b.fn.collection=b.fn.eles=function(c,e){for(var d in c){var f=c[d];b.Collection.prototype[d]=f
-}};var a={prefix:{nodes:"n",edges:"e"},id:{nodes:0,edges:0},generate:function(h,d,g){var c=b.is.element(d)?d._private:d;var e=c.group;var f=g!=null?g:this.prefix[e]+this.id[e];if(h.getElementById(f).empty()){this.id[e]++}else{while(!h.getElementById(f).empty()){f=this.prefix[e]+(++this.id[e])}}return f}};b.Element=function(d,f,h){if(!(this instanceof b.Element)){return new b.Element(d,f,h)}var o=this;h=(h===undefined||h?true:false);if(d===undefined||f===undefined||!b.is.core(d)){b.util.error("An element must have a core reference and parameters set");
-return}if(f.group!=="nodes"&&f.group!=="edges"){b.util.error("An element must be of type `nodes` or `edges`; you specified `"+f.group+"`");return}this.length=1;this[0]=this;this._private={cy:d,single:true,data:f.data||{},position:f.position||{},autoWidth:undefined,autoHeight:undefined,listeners:[],group:f.group,style:{},rstyle:{},styleCxts:[],removed:true,selected:f.selected?true:false,selectable:f.selectable===undefined?true:(f.selectable?true:false),locked:f.locked?true:false,grabbed:false,grabbable:f.grabbable===undefined?true:(f.grabbable?true:false),active:false,classes:{},animation:{current:[],queue:[]},rscratch:{},scratch:{},edges:[],children:[]};
-if(f.renderedPosition){var p=f.renderedPosition;var j=d.pan();var m=d.zoom();this._private.position={x:(p.x-j.x)/m,y:(p.y-j.y)/m}}if(b.is.string(f.classes)){var e=f.classes.split(/\s+/);for(var g=0,c=e.length;g0&&b.is.plainObject(c[0])&&!b.is.element(c[0])){p=true;var s=[];var j={};for(var o=0,g=c.length;o0){var H=J.add(J.connectedNodes()).add(J.parent());H.updateStyle(s);if(s){J.rtrigger("add")}else{J.trigger("add")}}return r};b.elesfn.removed=function(){var c=this[0];return c&&c._private.removed};b.elesfn.inside=function(){var c=this[0];
-return c&&!c._private.removed};b.elesfn.remove=function(r){var q=this;var A=[];var C=[];var f={};var c=q._private.cy;if(r===undefined){r=true}function B(E){var l=E._private.edges;for(var D=0;D0){if(r){this.cy().notify({type:"remove",collection:v})}v.trigger("remove")}var e={};for(var w=0;w0
-}},clearQueue:function(){for(var b=0;b0){new a.Collection(this._private.cy,k).updateStyle()}c.trigger("class");return c},hasClass:function(b){var c=this[0];
-return c!=null&&c._private.classes[b]},toggleClass:function(h,g){var b=h.split(/\s+/);var o=this;var e=[];for(var f=0,k=o.length;f0){new a.Collection(this._private.cy,e).updateStyle()}o.trigger("class");return o},removeClass:function(g){g=g.split(/\s+/);
-var c=this;var k=[];for(var f=0;f0){new a.Collection(c._private.cy,k).updateStyle()}c.trigger("class");return c}})})(cytoscape);(function(a){a.fn.eles({allAre:function(b){return this.filter(b).length===this.length},is:function(b){return this.filter(b).length>0},same:function(b){b=this.cy().collection(b);if(this.length!==b.length){return false
-}return this.intersect(b).length===this.length},anySame:function(b){b=this.cy().collection(b);return this.intersect(b).length>0},allAreNeighbors:function(b){b=this.cy().collection(b);return this.neighborhood().intersect(b).length===b.length}})})(cytoscape);(function(b){var a=1.4;var c=1;b.fn.eles({updateStyle:function(d){var f=this._private.cy;var e=f.style();d=d||d===undefined?true:false;e.apply(this);if(d){this.rtrigger("style")}else{this.trigger("style")}return this},updateMappers:function(d){var h=this._private.cy;
-var f=h.style();d=d||d===undefined?true:false;for(var e=0;eo?A:o;V=mT?l:T}else{var z=U.source()[0]._private.position;var d=U.target()[0]._private.position;var D=U._private.rstyle;G=D.labelX;F=D.labelY;B=z.x;A=d.x;m=z.y;l=d.y;if(B>A){var f=B;B=A;A=f}if(m>l){var f=m;m=l;l=f}p=Bo?A:o;V=mT?l:T;var k=D.bezierPts||[];var H=U._private.style.width.value;
-for(var Q=0;Qo?P.x+H:o;V=P.y-HT?P.y+H:T}}var O=U._private.style;var N=O.content.value;var q=O["font-size"];var u=O["text-halign"];var I=O["text-valign"];var g=U._private.rstyle.labelWidth;if(N&&q&&g!=undefined&&u&&I){var E=q.value;var t=g;var M,K,s,r;switch(u.value){case"left":M=B-t;K=B;break;case"center":M=G-t/2;K=G+t/2;break;case"right":M=A;K=A+t;break}if(U.isEdge()){M=G-t/2;K=G+t/2}switch(I.value){case"top":s=m-E;r=m;break;
-case"center":s=F-E/2;r=F+E/2;break;case"bottom":s=l;r=l+E;break}if(U.isEdge()){s=F-E/2;r=F+E/2}p=Mo?K:o;V=sT?r:T}}return{x1:p,x2:o,y1:V,y2:T,w:o-p,h:T-V}}})})(cytoscape);(function(b){function a(d){return function(){var f=this;if(f.length===0){return}if(f.isNode()&&!f.removed()){var k=0;var j=f[0];var e=j._private.edges;for(var g=0;gd}),minIndegree:c("indegree",function(e,d){return ed
-}),minOutdegree:c("outdegree",function(e,d){return ed})});b.fn.eles({totalDegree:function(){var f=0;var d=this.nodes();for(var e=0;e=0&&d0;if(!j){g.push(k)}}return new b.Collection(this._private.cy,g).filter(f)},kruskal:function(l){l=l||function(){return 1};function m(v){for(var u=0;
-u0){e.push(o[0])}e.push(g[0])}}return(new b.Collection(l,e)).filter(m)},closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});b.fn.eles({source:d({attr:"source"}),target:d({attr:"target"})});function d(e){return function(f){var h=[];var g=this.edges();
-var o=this._private.cy;for(var j=0;j0){h.push(l)}}return new b.Collection(o,h).filter(f)}}b.fn.eles({edgesWith:a(),edgesTo:a({thisIs:"source"})});function a(e){return function(r){var f=[];var j=this._private.cy;var g=e||{};if(b.is.string(r)){r=j.$(r)}var l=r.connectedEdges();var s=this._private.ids;for(var m=0;m0){f.push(h)}}return new b.Collection(k,f).filter(e)},parents:function(f){var g=[];var e=this.parent();while(e.nonempty()){for(var h=0;
-h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]";var variable="(?:[\\w-]|(?:\\\\"+metaChar+"))+";var comparatorOp="=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=";var boolOp="\\?|\\!|\\^";
-var string="\"(?:\\\\\"|[^\"])+\"|'(?:\\\\'|[^'])+'";var number=$$.util.regex.number;var value=string+"|"+number;var meta="degree|indegree|outdegree";var separator="\\s*,\\s*";var className=variable;var descendant="\\s+";var child="\\s+>\\s+";var subject="\\$";var id=variable;function cleanMetaChars(str){return str.replace(new RegExp("\\\\("+metaChar+")","g"),"\1")}var ops=comparatorOp.split("|");for(var i=0;i=0;
-break;case"$=":matches=new RegExp(valStr+"$").exec(fieldStr)!=null;break;case"^=":matches=new RegExp("^"+valStr).exec(fieldStr)!=null;break;default:if(caseInsensitive){var expr="fieldStr "+operator+" valStr";matches=eval(expr)}else{var expr=params.fieldRef(field)+" "+operator+" "+value;matches=eval(expr)}}}else{if(operator!=null){switch(operator){case"?":matches=params.fieldTruthy(field);break;case"!":matches=!params.fieldTruthy(field);break;case"^":matches=params.fieldUndefined(field);break}}else{matches=!params.fieldUndefined(field)
-}}if(!matches){allDataMatches=false;break}}return allDataMatches}var allDataMatches=operandsMatch({name:"data",fieldValue:function(field){return element._private.data[field]},fieldRef:function(field){return"element._private.data."+field},fieldUndefined:function(field){return element._private.data[field]===undefined},fieldTruthy:function(field){if(element._private.data[field]){return true}return false}});if(!allDataMatches){return false}var allMetaMatches=operandsMatch({name:"meta",fieldValue:function(field){return element[field]()
-},fieldRef:function(field){return"element."+field+"()"},fieldUndefined:function(field){return element[field]()==undefined},fieldTruthy:function(field){if(element[field]()){return true}return false}});if(!allMetaMatches){return false}if(query.collection!=null){var matchesAny=query.collection._private.ids[element.id()]!=null;if(!matchesAny){return false}}if(query.filter!=null&&element.collection().filter(query.filter).size()==0){return false}function confirmRelations(query,elements){if(query!=null){var matches=false;
-elements=elements();for(var i=0;i "+str}if(query.ancestor!=null){str=queryToString(query.ancestor)+" "+str}if(query.child!=null){str+=" > "+queryToString(query.child)}if(query.descendant!=null){str+=" "+queryToString(query.descendant)}return str}for(var i=0;i1&&i0&&this.data.container.clientWidth>0){context=H.bufferCanvases[1].getContext("2d");context.globalCompositeOperation="copy";context.drawImage(H.canvases[4],0,0);context.globalCompositeOperation="source-over";context.drawImage(H.canvases[2],0,0);
-context.drawImage(H.canvases[0],0,0);context=H.bufferCanvases[0].getContext("2d");context.globalCompositeOperation="copy";context.drawImage(H.bufferCanvases[1],0,0)}var i=this.data.bufferCanvases[0];return i.toDataURL("image/png")};z.prototype.load=function(){var R=this;var P=function(ad,Y,ae){if(!Y){var ab=ad.parents();for(var ac=0;acag[0]&&ap.pageXag[1]&&ap.pageY=p)&&(Math.abs(aj[3]-aj[1])+Math.abs(aj[2]-aj[0])<4)&&aa.panningEnabled()){R.hoverData.dragging=true;aj[4]=0}else{if(aa.boxSelectionEnabled()&&Math.pow(aj[2]-aj[0],2)+Math.pow(aj[3]-aj[1],2)>7&&aj[4]){clearTimeout(R.bgActiveTimeout)}if(ai&&ai.isEdge()&&ai.active()){ai.unactivate()}if(aq!=ah){if(ah){ah.trigger(new w.Event(ap,{type:"mouseout"}))
-}if(aq){aq.trigger(new w.Event(ap,{type:"mouseover"}))}R.hoverData.last=aq}if(ai&&ai.isNode()&&R.nodeIsDraggable(ai)){R.dragData.didDrag=true;var ar=[];for(var ao=0;ao7&&ak[4])&&!R.hoverData.dragging){Z.$(":selected").unselect();if(ac.length>0){R.data.canvasNeedsRedraw[G]=true;R.data.canvasRedrawReason[G].push("De-select")}R.dragData.possibleDragElements=ac=[]}if(Math.pow(ak[2]-ak[0],2)+Math.pow(ak[3]-ak[1],2)==0){if(au!=null){au.trigger(new w.Event(at,{type:"click"})).trigger(new w.Event(at,{type:"tap"})).trigger(new w.Event(at,{type:"vclick"}))
-}else{if(au==null){Z.trigger(new w.Event(at,{type:"click"})).trigger(new w.Event(at,{type:"tap"})).trigger(new w.Event(at,{type:"vclick"}))}}}if(au!=null){au.trigger(new w.Event(at,{type:"mouseup"})).trigger(new w.Event(at,{type:"tapend"})).trigger(new w.Event(at,{type:"vmouseup"}))}else{if(au==null){Z.trigger(new w.Event(at,{type:"mouseup"})).trigger(new w.Event(at,{type:"tapend"})).trigger(new w.Event(at,{type:"vmouseup"}))}}if(au==ag&&!R.dragData.didDrag){if(au!=null&&au._private.selectable){if(!ab){Z.$(":selected").unselect()
-}if(au.selected()){au.unselect()}else{au.select()}W(au,false);R.data.canvasNeedsRedraw[G]=true;R.data.canvasRedrawReason[G].push("sglslct")}}else{if(au==ag){if(au!=null&&au._private.grabbed){var an=Z.$(":grabbed");for(var aq=0;aq7&&ak[4]){if(!ab){Z.$(":selected").unselect()
-}var aa=[];var af=R.getAllInBox(ak[0],ak[1],ak[2],ak[3]);var ao=new w.Event(at,{type:"select"});for(var aq=0;aq0){R.data.canvasNeedsRedraw[G]=true;R.data.canvasRedrawReason[G].push("Selection")}}R.hoverData.dragging=false;if(!ak[4]){var ar=new w.Event(at,{type:"free"});for(var aq=0;aq250){if(R.touchData.start){R.touchData.start.trigger(new w.Event(au,{type:"taphold"}))
-}else{R.data.cy.trigger(new w.Event(au,{type:"taphold"}));ab.$(":selected").unselect()}}},1000)}}}R.redraw()},false);R.registerBinding(window,"touchmove",function(aH){var aA=R.data.select;var an=R.touchData.capture;an&&aH.preventDefault();var al=R.data.cy;var aw=R.getCachedNodes();var af=R.getCachedEdges();var az=R.touchData.now;var Z=R.touchData.earlier;if(aH.touches[0]){var aq=R.projectIntoViewport(aH.touches[0].pageX,aH.touches[0].pageY);az[0]=aq[0];az[1]=aq[1]}if(aH.touches[1]){var aq=R.projectIntoViewport(aH.touches[1].pageX,aH.touches[1].pageY);
-az[2]=aq[0];az[3]=aq[1]}if(aH.touches[2]){var aq=R.projectIntoViewport(aH.touches[2].pageX,aH.touches[2].pageY);az[4]=aq[0];az[5]=aq[1]}var ab=[];for(var aE=0;aE=1.5||au>=150){R.touchData.cxt=false;if(R.touchData.start){R.touchData.start.unactivate();R.touchData.start=null}R.data.bgActivePosistion=undefined;
-R.data.canvasNeedsRedraw[D]=true;var aa=new w.Event(aH,{type:"cxttapend"});if(R.touchData.start){R.touchData.start.trigger(aa)}else{al.trigger(aa)}}}if(an&&R.touchData.cxt){var aa=new w.Event(aH,{type:"cxtdrag"});R.data.bgActivePosistion=undefined;R.data.canvasNeedsRedraw[D]=true;if(R.touchData.start){R.touchData.start.trigger(aa)}else{al.trigger(aa)}if(R.touchData.start){R.touchData.start._private.grabbed=false}R.touchData.cxtDragged=true}else{if(an&&aH.touches[2]&&al.boxSelectionEnabled()){R.data.bgActivePosistion=undefined;
-clearTimeout(this.threeFingerSelectTimeout);this.lastThreeTouch=+new Date;R.data.canvasNeedsRedraw[D]=true;R.data.canvasRedrawReason[D].push("Touch moved, redraw selection box");if(!aA||aA.length===0||aA[0]===undefined){aA[0]=(az[0]+az[2]+az[4])/3;aA[1]=(az[1]+az[3]+az[5])/3;aA[2]=(az[0]+az[2]+az[4])/3+1;aA[3]=(az[1]+az[3]+az[5])/3+1}else{aA[2]=(az[0]+az[2]+az[4])/3;aA[3]=(az[1]+az[3]+az[5])/3}aA[4]=1}else{if(an&&aH.touches[1]&&al.zoomingEnabled()&&al.panningEnabled()){R.data.bgActivePosistion=undefined;
-R.data.canvasNeedsRedraw[D]=true;var ap=aH.touches[0].pageX-L,ac=aH.touches[0].pageY-V;var ak=aH.touches[1].pageX-L,Y=aH.touches[1].pageY-V;var au=I(ap,ac,ak,Y);var aF=au/U;if(aF!=1&&i){var aJ=ap-H;var aI=ac-N;var av=ak-T;var at=Y-X;var aD=(aJ+av)/2;var aB=(aI+at)/2;var ae=al.zoom();var ad=ae*aF;var ah=al.pan();var ay=J[0]*ae+ah.x;var ax=J[1]*ae+ah.y;var ag={x:-ad/ae*(ay-ah.x-aD)+ay,y:-ad/ae*(ax-ah.y-aB)+ax};al._private.zoom=ad;al._private.pan=ag;al.trigger("pan zoom").notify("viewport");U=au;H=ap;
-N=ac;T=ak;X=Y;R.pinching=true}if(aH.touches[0]){var aq=R.projectIntoViewport(aH.touches[0].pageX,aH.touches[0].pageY);az[0]=aq[0];az[1]=aq[1]}if(aH.touches[1]){var aq=R.projectIntoViewport(aH.touches[1].pageX,aH.touches[1].pageY);az[2]=aq[0];az[3]=aq[1]}if(aH.touches[2]){var aq=R.projectIntoViewport(aH.touches[2].pageX,aH.touches[2].pageY);az[4]=aq[0];az[5]=aq[1]}}else{if(aH.touches[0]){var ao=R.touchData.start;var ai=R.touchData.last;if(ao!=null&&ao._private.group=="nodes"&&R.nodeIsDraggable(ao)){var aj=R.dragData.touchDragEles;
-for(var aC=0;aC4){R.touchData.singleTouchMoved=true
-}}if(an&&(ao==null||ao.isEdge())&&al.panningEnabled()){if(ao){ao.unactivate();if(!R.data.bgActivePosistion){R.data.bgActivePosistion={x:az[0],y:az[1]}}R.data.canvasNeedsRedraw[D]=true;R.data.canvasRedrawReason[D].push("bgactive")}al.panBy({x:ab[0]*al.zoom(),y:ab[1]*al.zoom()});R.swipePanning=true;var aq=R.projectIntoViewport(aH.touches[0].pageX,aH.touches[0].pageY);az[0]=aq[0];az[1]=aq[1]}}}}}for(var aE=0;aE0){R.data.canvasNeedsRedraw[G]=true;R.data.canvasRedrawReason[G].push("Selection")}},100)}if(!aq.touches[1]){R.pinching=false
-}var al=false;if(ac!=null){ac._private.active=false;al=true;ac.trigger(new w.Event(aq,{type:"unactivate"}))}if(aq.touches[2]){R.data.bgActivePosistion=undefined}else{if(aq.touches[1]){}else{if(aq.touches[0]){}else{if(!aq.touches[0]){R.data.bgActivePosistion=undefined;if(ac!=null){if(ac._private.grabbed==true){ac._private.grabbed=false;ac.trigger(new w.Event(aq,{type:"free"}));ac._private.rscratch.inDragLayer=false}var af=ac._private.edges;for(var am=0;amthis.sqDistanceToQuadraticBezier(V,U,N.startX,N.startY,N.cp2ax,N.cp2ay,N.selfEdgeMidX,N.selfEdgeMidY)))||(this.inBezierVicinity(V,U,N.selfEdgeMidX,N.selfEdgeMidY,N.cp2cx,N.cp2cy,N.endX,N.endY,Math.pow(O[P]._private.style.width.value/2,2))&&(Math.pow(O[P]._private.style.width.value/2,2)+M>this.sqDistanceToQuadraticBezier(V,U,N.selfEdgeMidX,N.selfEdgeMidY,N.cp2cx,N.cp2cy,N.endX,N.endY)))){I=true
-}}else{if(N.edgeType=="straight"){if(this.inLineVicinity(V,U,N.startX,N.startY,N.endX,N.endY,O[P]._private.style.width.value*2)&&Math.pow(O[P]._private.style.width.value/2,2)+M>this.sqDistanceToFiniteLine(V,U,N.startX,N.startY,N.endX,N.endY)){I=true}}else{if(N.edgeType=="bezier"){if(this.inBezierVicinity(V,U,N.startX,N.startY,N.cp2x,N.cp2y,N.endX,N.endY,Math.pow(O[P]._private.style.width.value/2,2))&&(Math.pow(O[P]._private.style.width.value/2,2)+M>this.sqDistanceToQuadraticBezier(V,U,N.startX,N.startY,N.cp2x,N.cp2y,N.endX,N.endY))){I=true
-}}}}if(!R.length||R[R.length-1]!=O[P]){if((b[O[P]._private.style["source-arrow-shape"].value].roughCollide(V,U,O[P]._private.rscratch.arrowStartX,O[P]._private.rscratch.arrowStartY,this.getArrowWidth(O[P]._private.style.width.value),this.getArrowHeight(O[P]._private.style.width.value),[O[P]._private.rscratch.arrowStartX-O[P].source()[0]._private.position.x,O[P]._private.rscratch.arrowStartY-O[P].source()[0]._private.position.y],0)&&b[O[P]._private.style["source-arrow-shape"].value].collide(V,U,O[P]._private.rscratch.arrowStartX,O[P]._private.rscratch.arrowStartY,this.getArrowWidth(O[P]._private.style.width.value),this.getArrowHeight(O[P]._private.style.width.value),[O[P]._private.rscratch.arrowStartX-O[P].source()[0]._private.position.x,O[P]._private.rscratch.arrowStartY-O[P].source()[0]._private.position.y],0))||(b[O[P]._private.style["target-arrow-shape"].value].roughCollide(V,U,O[P]._private.rscratch.arrowEndX,O[P]._private.rscratch.arrowEndY,this.getArrowWidth(O[P]._private.style.width.value),this.getArrowHeight(O[P]._private.style.width.value),[O[P]._private.rscratch.arrowEndX-O[P].target()[0]._private.position.x,O[P]._private.rscratch.arrowEndY-O[P].target()[0]._private.position.y],0)&&b[O[P]._private.style["target-arrow-shape"].value].collide(V,U,O[P]._private.rscratch.arrowEndX,O[P]._private.rscratch.arrowEndY,this.getArrowWidth(O[P]._private.style.width.value),this.getArrowHeight(O[P]._private.style.width.value),[O[P]._private.rscratch.arrowEndX-O[P].target()[0]._private.position.x,O[P]._private.rscratch.arrowEndY-O[P].target()[0]._private.position.y],0))){I=true
-}}if(I){if(J){var H=Q.cy.getElementById(O[P]._private.data.source);var S=Q.cy.getElementById(O[P]._private.data.target);if(O[P]._private.style.opacity.value!=0&&O[P]._private.style.visibility.value=="visible"&&H._private.style.opacity.value!=0&&H._private.style.visibility.value=="visible"&&S._private.style.opacity.value!=0&&S._private.style.visibility.value=="visible"){R.push(O[P])}}else{R.push(O[P])}}}R.sort(C);if(R.length>0){return R[R.length-1]}else{return null}};z.prototype.getAllInBox=function(J,T,H,S){var O=this.data;
-var I=this.getCachedNodes();var M=this.getCachedEdges();var P=[];var R=Math.min(J,H);var L=Math.max(J,H);var U=Math.min(T,S);var Q=Math.max(T,S);J=R;H=L;T=U;S=Q;var K;for(var N=0;N=0;H--){if(K[H].isNode()&&(K[H]._private.style.width.value=="auto"||K[H]._private.style.height.value=="auto")&&K[H].children().length>0){var J=K[H];var I=this.calcCompoundBounds(J);J._private.position.x=I.x;J._private.position.y=I.y;J._private.autoWidth=I.width;J._private.autoHeight=I.height}}};z.prototype.calcCompoundBounds=function(N){var M=N.descendants().not(":removed");var H={x:N._private.position.x,y:N._private.position.y,width:N._private.autoWidth,height:N._private.autoHeight};
-if(N._private.style.visibility.value!="visible"){return H}var I=[];for(var P=0;PP){P=O}}else{if(R=="top"){var M=Math.min(N.y-N.height/2,I.top);if(MP){P=K}}}}}}if((R=="left")||(R=="top")){return S
-}else{return P}};z.prototype.getNodeWidth=function(i){if(i._private.style.width.value=="auto"||i._private.style.height.value=="auto"){return i._private.autoWidth}else{return i._private.style.width.value}};z.prototype.getNodeHeight=function(i){if(i._private.style.width.value=="auto"||i._private.style.height.value=="auto"){return i._private.autoHeight}else{return i._private.style.height.value}};z.prototype.getNodeShape=function(H){var i=H._private.style.shape.value;if(H.isParent()){if(i==="rectangle"||i==="roundrectangle"){return i
-}else{return"rectangle"}}return i};z.prototype.getNodePadding=function(I){var K=I._private.style["padding-left"].value;var H=I._private.style["padding-right"].value;var J=I._private.style["padding-top"].value;var i=I._private.style["padding-bottom"].value;if(isNaN(K)){K=0}if(isNaN(H)){H=0}if(isNaN(J)){J=0}if(isNaN(i)){i=0}return{left:K,right:H,top:J,bottom:i}};z.prototype.matchCanvasSize=function(J){var O=this.data;var N=J.clientWidth;var I=J.clientHeight;var L,H=N,K=I;if("devicePixelRatio" in window){H*=devicePixelRatio;
-K*=devicePixelRatio}for(var M=0;M=N;if(!M){if(!L){clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout(function(){i.redraw()},N);return}this.lastDrawTime=O}setTimeout(function(){var ai=O;var ad=100;var V=i.data.cy;var ar=i.data;var al=i.getCachedNodes();var U=i.getCachedEdges();i.matchCanvasSize(ar.container);var R=V.zoom();var ac=Q!==undefined?Q:R;
-var ak=V.pan();var ao={x:ak.x,y:ak.y};if(I){ao=I}if("devicePixelRatio" in window){ac*=devicePixelRatio;ao.x*=devicePixelRatio;ao.y*=devicePixelRatio}var ah=[];for(var am=0;am0){W.strokeStyle="rgba("+S["selection-box-border-color"].value[0]+","+S["selection-box-border-color"].value[1]+","+S["selection-box-border-color"].value[2]+","+S["selection-box-opacity"].value+")";W.strokeRect(ar.select[0],ar.select[1],ar.select[2]-ar.select[0],ar.select[3]-ar.select[1])}}if(ar.bgActivePosistion){var R=ar.cy.zoom();var ab=ar.bgActivePosistion;W.fillStyle="rgba("+S["active-bg-color"].value[0]+","+S["active-bg-color"].value[1]+","+S["active-bg-color"].value[2]+","+S["active-bg-opacity"].value+")";
-W.beginPath();W.arc(ab.x,ab.y,S["active-bg-size"].pxValue/R,0,2*Math.PI);W.fill()}if(!K){ar.canvasNeedsRedraw[D]=false;ar.canvasRedrawReason[D]=[]}}if(i.options.showOverlay){var W=ar.canvases[u].getContext("2d");W.lineJoin="round";W.font="14px helvetica";W.strokeStyle="#fff";W.lineWidth="4";W.fillStyle="#666";W.textAlign="right";var ag="cytoscape.js";var af=W.canvas.width;var an=W.canvas.height;var aj=4;var ap=W.measureText(ag).width;var Z=14;W.clearRect(0,0,af,an);W.strokeText(ag,af-aj,an-aj);W.fillText(ag,af-aj,an-aj);
-ar.overlayDrawn=true}var Y=+new Date;if(i.averageRedrawTime===undefined){i.averageRedrawTime=Y-ai}i.averageRedrawTime=i.averageRedrawTime/2+(Y-ai)/2},0)};var l={};var h=30*300;z.prototype.getCachedImage=function(H,I){if(l[H]&&l[H].image){l[H].keepTime=h;return l[H].image}var i=l[H];if(i==undefined){l[H]=new Object();l[H].image=new Image();l[H].image.onload=I;l[H].image.src=H;l[H].keepTime=h;i=l[H]}return i.image};z.prototype.swapCachedImage=function(H){if(l[H]){if(l[H].image&&l[H].image.complete){var I=l[H].image;
-var i=document.createElement("canvas");i.width=I.width;i.height=I.height;i.getContext("2d").drawImage(I,0,0);l[H].image=i;l[H].swappedWithCanvas=true;return i}else{return null}}else{return null}};z.prototype.updateImageCaches=function(){for(var i in l){if(l[i].keepTime<=0){if(l[i].image!=undefined){l[i].image.src=undefined;l[i].image=undefined}l[i]=undefined}else{l[i]-=1}}};z.prototype.drawImage=function(i,N,M,K,J,O,I){I.widthScale=0.5;I.heightScale=0.5;I.rotate=O;var L;var H;canvas.drawImage(I,N,M)
-};z.prototype.drawEdge=function(I,K,L){if(this.hideEdgesOnViewport&&(this.dragData.didDrag||this.pinching||this.hoverData.dragging||this.data.wheel||this.swipePanning)){return}var M,Q;M=K.source()[0];Q=K.target()[0];if(K._private.style.visibility.value!="visible"||M._private.style.visibility.value!="visible"||Q._private.style.visibility.value!="visible"){return}var U=K._private.style["overlay-padding"].value;var S=K._private.style["overlay-opacity"].value;var T=K._private.style["overlay-color"].value;
-if(L){I.strokeStyle="rgba( "+T[0]+", "+T[1]+", "+T[2]+", "+S+" )";I.lineCap="round";if(K._private.rscratch.edgeType=="self"){I.lineCap="butt"}}else{I.strokeStyle="rgba("+K._private.style["line-color"].value[0]+","+K._private.style["line-color"].value[1]+","+K._private.style["line-color"].value[2]+","+K._private.style.opacity.value+")"}if(K._private.style.width.value<=0){return}var R=K._private.style.width.value+(L?2*U:0);var O=L?"solid":K._private.style["line-style"].value;I.lineWidth=R;this.findEndpoints(K);
-if(K._private.rscratch.edgeType=="self"){var i=K._private.rscratch;this.drawStyledEdge(K,I,[i.startX,i.startY,i.cp2ax,i.cp2ay,i.selfEdgeMidX,i.selfEdgeMidY],O,R);this.drawStyledEdge(K,I,[i.selfEdgeMidX,i.selfEdgeMidY,i.cp2cx,i.cp2cy,i.endX,i.endY],O,R)}else{if(K._private.rscratch.edgeType=="straight"){var J=Q._private.position.x-M._private.position.x;var H=Q._private.position.y-M._private.position.y;var P=K._private.rscratch.endX-K._private.rscratch.startX;var N=K._private.rscratch.endY-K._private.rscratch.startY;
-if(J*P+H*N<0){K._private.rscratch.straightEdgeTooShort=true}else{var i=K._private.rscratch;this.drawStyledEdge(K,I,[i.startX,i.startY,i.endX,i.endY],O,R);K._private.rscratch.straightEdgeTooShort=false}}else{var i=K._private.rscratch;this.drawStyledEdge(K,I,[i.startX,i.startY,i.cp2x,i.cp2y,i.endX,i.endY],O,R)}}if(K._private.rscratch.noArrowPlacement!==true&&K._private.rscratch.startX!==undefined){this.drawArrowheads(I,K,L)}};var t=function(P,L,J){var I=Math.sqrt(Math.pow(P[4]-P[0],2)+Math.pow(P[5]-P[1],2));
-I+=Math.sqrt(Math.pow((P[4]+P[0])/2-P[2],2)+Math.pow((P[5]+P[1])/2-P[3],2));var O=Math.ceil(I/L);var H=I/L;var M;if(O>0){M=new Array(O*2)}else{return null}for(var K=0;K0){M=new Array(O*2)}else{return null}var H=[P[2]-P[0],P[3]-P[1]];for(var K=0;K=12){O._private.rstyle.bezierPts=[]}else{}}else{O._private.rstyle.bezierPts=[]}var R=O._private.rstyle.bezierPts;if(ab.length===6){R.push({x:aa(ab[0],ab[2],ab[4],0.05),y:aa(ab[1],ab[3],ab[5],0.05)});R.push({x:aa(ab[0],ab[2],ab[4],0.25),y:aa(ab[1],ab[3],ab[5],0.25)});R.push({x:aa(ab[0],ab[2],ab[4],0.35),y:aa(ab[1],ab[3],ab[5],0.35)});R.push({x:aa(ab[0],ab[2],ab[4],0.65),y:aa(ab[1],ab[3],ab[5],0.65)});R.push({x:aa(ab[0],ab[2],ab[4],0.75),y:aa(ab[1],ab[3],ab[5],0.75)});R.push({x:aa(ab[0],ab[2],ab[4],0.95),y:aa(ab[1],ab[3],ab[5],0.95)})
-}if(L=="solid"){K.beginPath();K.moveTo(ab[0],ab[1]);if(ab.length==3*2){K.quadraticCurveTo(ab[2],ab[3],ab[4],ab[5])}else{K.lineTo(ab[2],ab[3])}K.stroke()}else{if(L=="dotted"){var T;if(ab.length==3*2){T=t(ab,16,true)}else{T=s(ab,16,true)}if(!T){return}var N=Math.max(U*1.6,3.4)*I;var M=N*2,Q=N*2;M=Math.max(M,1);Q=Math.max(Q,1);var X=this.createBuffer(M,Q);var V=X[1];V.setTransform(1,0,0,1,0,0);V.clearRect(0,0,M,Q);V.fillStyle=K.strokeStyle;V.beginPath();V.arc(M/2,Q/2,N*0.5,0,Math.PI*2,false);V.fill();
-K.beginPath();for(var Y=0;Y0){K.stroke()}}else{var V=M._private.style["overlay-padding"].value;var Q=M._private.style["overlay-opacity"].value;
-var R=M._private.style["overlay-color"].value;if(Q>0){K.fillStyle="rgba( "+R[0]+", "+R[1]+", "+R[2]+", "+Q+" )";q[this.getNodeShape(M)].draw(K,M._private.position.x,M._private.position.y,U+V*2,J+V*2)}}};z.prototype.drawInscribedImage=function(I,N,L){var i=this;var P=this.data.cy._private.zoom;var K=L._private.position.x;var J=L._private.position.y;var O=this.getNodeWidth(L);var H=this.getNodeHeight(L);I.save();q[i.getNodeShape(L)].drawPath(I,K,J,O,H);I.clip();var M=[N.width,N.height];I.drawImage(N,K-M[0]/2,J-M[1]/2,M[0],M[1]);
-I.restore();if(L._private.style["border-width"].value>0){I.stroke()}};z.prototype.drawNodeText=function(I,J){if(J._private.style.visibility.value!="visible"){return}var M=J._private.style["font-size"].pxValue*J.cy().zoom();var i=J._private.style["min-zoomed-font-size"].pxValue;if(M0){H.lineWidth=P;H.strokeText(V,O,N)}if(isNaN(O)){O=0}if(isNaN(N)){N=0}H.fillText(""+V,O,N);L._private.rstyle.labelWidth=H.measureText(V).width}};z.prototype.drawBackground=function(I,H,i,J,K){};z.prototype.findEdgeControlPoints=function(Z){var H={};var ac=this.data.cy;var M=[];var V;for(var aq=0;aqZ[aq]._private.data.target?Z[aq]._private.data.target+"-"+Z[aq]._private.data.source:Z[aq]._private.data.source+"-"+Z[aq]._private.data.target;
-if(H[V]==undefined){H[V]=[]}H[V].push(Z[aq]);M.push(V)}var ad,aj;for(var al=0;al1){U=aj._private.position.y-ad._private.position.y;T=ad._private.position.x-aj._private.position.x;var S=Math.sqrt(U*U+T*T);U/=S;T/=S}var R;for(var aq=0;aq=0&&J<=1){K.push(J)
-}if(L>=0&&L<=1){K.push(L)}if(K.length==0){return[]}var aa=K[0]*U[0]+S;var Z=K[0]*U[1]+H;if(K.length>1){if(K[0]==K[1]){return[aa,Z]}else{var P=K[1]*U[0]+S;var O=K[1]*U[1]+H;return[aa,Z,P,O]}}else{return[aa,Z]}};z.prototype.findCircleNearPoint=function(K,J,L,P,O){var H=P-K;var i=O-J;var I=Math.sqrt(H*H+i*i);var N=H/I;var M=i/I;return[K+N*L,J+M*L]};z.prototype.findMaxSqDistanceToOrigin=function(K){var H=0.000001;var J;for(var I=0;IH){H=J}}return H
-};z.prototype.finiteLinesIntersect=function(L,S,J,Q,H,P,T,N,R){var M=(T-H)*(S-P)-(N-P)*(L-H);var O=(J-L)*(S-P)-(Q-S)*(L-H);var K=(N-P)*(J-L)-(T-H)*(Q-S);if(K!=0){var I=M/K;var i=O/K;if(0<=I&&I<=1&&0<=i&&i<=1){return[L+I*(J-L),S+I*(Q-S)]}else{if(!R){return[]}else{return[L+I*(J-L),S+I*(Q-S)]}}}else{if(M==0||O==0){if([L,J,T].sort()[1]==T){return[T,N]}if([L,J,H].sort()[1]==H){return[H,P]}if([H,T,J].sort()[1]==J){return[J,Q]}return[]}else{return[]}}};z.prototype.boxIntersectEllipse=function(I,R,i,P,Q,H,U,M,K){if(iO[0]){return false}if(R>N[1]){return false}if(PQ){Q=S[aa*2]}if(S[aa*2]O){O=S[aa*2+1]}if(S[aa*2+1]Q+U){return false}if(KO+U){return false}var Z;if(U>0){var ai=B.expandPolygon(S,-U);Z=B.joinLines(ai)}else{Z=S}for(var aa=0;aa0){return true}if(B.finiteLinesIntersect(Y,X,ag,af,ad,K,ab,K,false).length>0){return true}if(B.finiteLinesIntersect(Y,X,ag,af,ad,N,ad,K,false).length>0){return true}if(B.finiteLinesIntersect(Y,X,ag,af,ab,N,ab,K,false).length>0){return true}}return false};z.prototype.polygonIntersectLine=function(N,M,H,K,I,Q,P,O){var Y=[];var L;var J=new Array(H.length);
-for(var U=0;U0){var X=B.expandPolygon(J,-O);T=B.joinLines(X)}else{T=J}var S,R,W,V;for(var U=0;UR)){R=Math.abs(P[2*K])}if(Math.abs(P[2*K+1]>Q)){Q=Math.abs(P[2*K+1])}}var M=0.0005;var O=Math.max(R,Q);for(var K=0;KM){P[2*K]*=(1/O);P[2*K+1]*=(1/O)}}return P};var B=c;q.ellipse={draw:function(H,K,J,I,i){q.ellipse.drawPath(H,K,J,I,i);H.fill()},drawPath:function(H,K,J,I,i){H.beginPath();H.translate(K,J);H.scale(I/2,i/2);H.arc(0,0,1,0,Math.PI*2*0.999,false);H.closePath();H.scale(2/I,2/i);H.translate(-K,-J)},intersectLine:function(L,K,J,I,H,N,M){var i=c.intersectLineEllipse(H,N,L,K,J/2+M,I/2+M);
-return i},intersectBox:function(I,N,i,L,H,O,K,J,M){return z.prototype.boxIntersectEllipse(I,N,i,L,M,H,O,K,J)},checkPointRough:function(H,M,L,I,i,K,J){return true},checkPoint:function(H,M,L,I,i,K,J){H-=K;M-=J;H/=(I/2+L);M/=(i/2+L);return(Math.pow(H,2)+Math.pow(M,2)<=1)}};q.triangle={points:k(3,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.triangle.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.triangle.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.triangle.points,K,J,I/2,H/2,L)
-},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.triangle.points;return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.triangle.points,L,I,i,K,J)},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.triangle.points,K,J,I,i,[0,-1],L)}};q.square={points:k(4,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.square.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.square.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.square.points,K,J,I/2,H/2,L)
-},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.square.points;return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.square.points,L,I,i,K,J)},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.square.points,K,J,I,i,[0,-1],L)}};q.rectangle=q.square;q.octogon={};q.roundrectangle={points:k(4,0),draw:function(H,K,J,I,i){B.drawRoundRectangle(H,K,J,I,i,10)},drawPath:function(H,K,J,I,i){B.drawRoundRectanglePath(H,K,J,I,i,10)
-},intersectLine:function(K,J,I,H,i,M,L){return B.roundRectangleIntersectLine(i,M,K,J,I,H,L)},intersectBox:function(I,N,i,L,H,O,K,J,M){return B.roundRectangleIntersectBox(I,N,i,L,H,O,K,J,M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.roundrectangle.points,L,I,i,K,J)},checkPoint:function(N,L,M,i,O,J,H){var K=B.getRoundRectangleRadius(i,O);if(B.pointInsidePolygon(N,L,q.roundrectangle.points,J,H,i,O-2*K,[0,-1],M)){return true}if(B.pointInsidePolygon(N,L,q.roundrectangle.points,J,H,i-2*K,O,[0,-1],M)){return true
-}var I=function(Q,V,U,S,R,P,T){Q-=U;V-=S;Q/=(R/2+T);V/=(P/2+T);return(Math.pow(Q,2)+Math.pow(V,2)<=1)};if(I(N,L,J-i/2+K,H-O/2+K,K*2,K*2,M)){return true}if(I(N,L,J+i/2-K,H-O/2+K,K*2,K*2,M)){return true}if(I(N,L,J+i/2-K,H+O/2-K,K*2,K*2,M)){return true}if(I(N,L,J-i/2+K,H+O/2-K,K*2,K*2,M)){return true}return false}};q.roundrectangle2={roundness:4.99,draw:function(I,H,i){if(H<=roundness*2){return}B.drawPolygon(I._private.position.x,I._private.position.y,H,i,nodeSapes.roundrectangle2.points)},intersectLine:function(J,I,H,i,K){return B.findPolygonIntersection(J,I,H,i,K,q.square.points)
-},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.square.points}};q.pentagon={points:k(5,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.pentagon.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.pentagon.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.pentagon.points,K,J,I/2,H/2,L)},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.pentagon.points;return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.pentagon.points,L,I,i,K,J)
-},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.pentagon.points,K,J,I,i,[0,-1],L)}};q.hexagon={points:k(6,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.hexagon.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.hexagon.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.hexagon.points,K,J,I/2,H/2,L)},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.hexagon.points;return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)
-},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.hexagon.points,L,I,i,K,J)},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.hexagon.points,K,J,I,i,[0,-1],L)}};q.heptagon={points:k(7,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.heptagon.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.heptagon.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.heptagon.points,K,J,I/2,H/2,L)},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.heptagon.points;
-return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.heptagon.points,L,I,i,K,J)},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.heptagon.points,K,J,I,i,[0,-1],L)}};q.octagon={points:k(8,0),draw:function(H,K,J,I,i){B.drawPolygon(H,K,J,I,i,q.octagon.points)},drawPath:function(H,K,J,I,i){B.drawPolygonPath(H,K,J,I,i,q.octagon.points)},intersectLine:function(K,J,I,H,i,M,L){return B.polygonIntersectLine(i,M,q.octagon.points,K,J,I/2,H/2,L)
-},intersectBox:function(I,N,i,L,H,P,K,J,M){var O=q.octagon.points;return B.boxIntersectPolygon(I,N,i,L,O,H,P,K,J,[0,-1],M)},checkPointRough:function(H,M,L,I,i,K,J){return B.checkInBoundingBox(H,M,q.octagon.points,L,I,i,K,J)},checkPoint:function(H,M,L,I,i,K,J){return B.pointInsidePolygon(H,M,q.octagon.points,K,J,I,i,[0,-1],L)}};var j=new Array(20);var g=k(5,0);var F=k(5,Math.PI/5);var o=0.5*(3-Math.sqrt(5));o*=1.57;for(var E=0;E0){var ad=B.expandPolygon(O,-U);X=B.joinLines(ad)}else{X=O}var aa,L,Z,K;var I;var R=0;var T=0;for(var Y=0;Y=S&&S>=Z)||(aa<=S&&S<=Z)){I=(S-aa)/(Z-aa)*(K-L)+L;if(I>Q){R++}if(I0){return I}var ah=ap+U+ai;var af=am-K+ag-ai;var i=ah;var an=am+K-ag+ai;I=this.finiteLinesIntersect(ae,ad,ap,am,ah,af,i,an,false);if(I.length>0){return I}var ab=ap-U+ag-ai;var Z=am+K+ai;var S=ap+U-ag+ai;var R=Z;I=this.finiteLinesIntersect(ae,ad,ap,am,ab,Z,S,R,false);if(I.length>0){return I}var Y=ap-U-ai;var X=am-K+ag-ai;var W=Y;var V=am+K-ag+ai;I=this.finiteLinesIntersect(ae,ad,ap,am,Y,X,W,V,false);if(I.length>0){return I
-}var T;var Q=ap-U+ag;var P=am-K+ag;T=this.intersectLineCircle(ae,ad,ap,am,Q,P,ag+ai);if(T.length>0&&T[0]<=Q&&T[1]<=P){return[T[0],T[1]]}var M=ap+U-ag;var L=am-K+ag;T=this.intersectLineCircle(ae,ad,ap,am,M,L,ag+ai);if(T.length>0&&T[0]>=M&&T[1]<=L){return[T[0],T[1]]}var ao=ap+U-ag;var al=am+K-ag;T=this.intersectLineCircle(ae,ad,ap,am,ao,al,ag+ai);if(T.length>0&&T[0]>=ao&&T[1]>=al){return[T[0],T[1]]}var ac=ap-U+ag;var aa=am+K-ag;T=this.intersectLineCircle(ae,ad,ap,am,ac,aa,ag+ai);if(T.length>0&&T[0]<=ac&&T[1]>=aa){return[T[0],T[1]]
-}};z.prototype.roundRectangleIntersectBox=function(M,S,L,R,T,Q,O,N,P){var I=this.getRoundRectangleRadius(T,Q);var H=O-T/2-P;var i=N-Q/2+I-P;var V=O+T/2+P;var U=N+Q/2-I+P;var Y=O-T/2+I-P;var W=N-Q/2-P;var K=O+T/2-I+P;var J=N+Q/2+P;var ab=Math.min(M,L);var aa=Math.max(M,L);var Z=Math.min(S,R);var X=Math.max(S,R);if(aaV){return false}}if(XJ){return false}}if(H>=ab&&H<=aa&&i>=Z&&i<=X){return true}if(V>=ab&&V<=aa&&i>=Z&&i<=X){return true}if(V>=ab&&V<=aa&&U>=Z&&U<=X){return true
-}if(H>=ab&&H<=aa&&U>=Z&&U<=X){return true}if(ab>=H&&ab<=V&&Z>=i&&Z<=U){return true}if(aa>=H&&aa<=V&&Z>=i&&Z<=U){return true}if(aa>=H&&aa<=V&&X>=i&&X<=U){return true}if(ab>=H&&ab<=V&&X>=i&&X<=U){return true}if(Y>=ab&&Y<=aa&&W>=Z&&W<=X){return true}if(K>=ab&&K<=aa&&W>=Z&&W<=X){return true}if(K>=ab&&K<=aa&&J>=Z&&J<=X){return true}if(Y>=ab&&Y<=aa&&J>=Z&&J<=X){return true}if(ab>=Y&&ab<=K&&Z>=W&&Z<=J){return true}if(aa>=Y&&aa<=K&&Z>=W&&Z<=J){return true}if(aa>=Y&&aa<=K&&X>=W&&X<=J){return true}if(ab>=Y&&ab<=K&&X>=W&&X<=J){return true
-}if(this.boxIntersectEllipse(ab,Z,aa,X,P,I*2,I*2,Y+P,i+P)){return true}if(this.boxIntersectEllipse(ab,Z,aa,X,P,I*2,I*2,K-P,i+P)){return true}if(this.boxIntersectEllipse(ab,Z,aa,X,P,I*2,I*2,K-P,U-P)){return true}if(this.boxIntersectEllipse(ab,Z,aa,X,P,I*2,I*2,Y+P,U-P)){return true}return false};z.prototype.checkInBoundingCircle=function(H,N,I,M,J,i,L,K){H=(H-L)/(J+M);N=(N-K)/(i+M);return(H*H+N*N)<=I};z.prototype.checkInBoundingBox=function(R,P,S,Q,J,T,N,M){var L=S[0],K=S[1];var I=S[0],H=S[1];for(var O=1;
-OI){I=S[O*2]}}if(S[O*2+1]H){H=S[O*2+1]}}}R-=N;P-=M;R/=J;P/=T;if(RI){return false}}if(PH){return false}}return true};z.prototype.boxInBezierVicinity=function(T,N,Z,Q,V,M,U,L,R,J,S){var P=0.25*V+0.5*U+0.25*R;var O=0.25*M+0.5*L+0.25*J;var aa=Math.min(T,Z)-S;var X=Math.min(N,Q)-S;var Y=Math.max(T,Z)+S;var W=Math.max(N,Q)+S;if(V>=aa&&V<=Y&&M>=X&&M<=W){return 1}else{if(R>=aa&&R<=Y&&J>=X&&J<=W){return 1
-}else{if(P>=aa&&P<=Y&&O>=X&&O<=W){return 1}else{if(U>=aa&&U<=Y&&L>=X&&L<=W){return 1}}}}var K=Math.min(V,P,R);var I=Math.min(M,O,J);var H=Math.max(V,P,R);var i=Math.max(M,O,J);if(K>Y||HW||i=ac&&W<=aa&&Math.min(K,H)<=Z&&Math.max(K,H)>=Y)}var i=(ac-Q)/L;if(i>0&&i<=1){X=I*i+P;if(X>=Z&&X<=Y){return true}}var N=(aa-Q)/L;if(N>0&&N<=1){X=I*N+P;if(X>=Z&&X<=Y){return true}}var J=(Z-P)/I;if(J>0&&J<=1){S=L*J+Q;if(S>=ac&&S<=aa){return true}}var M=(Y-P)/I;
-if(M>0&&M<=1){S=L*M+Q;if(S>=ac&&S<=aa){return true}}return false};z.prototype.checkBezierCrossesBox=function(Z,L,am,ab,T,aw,P,at,N,ap,H){var V=Math.min(Z,am)-H;var S=Math.min(L,ab)-H;var av=Math.max(Z,am)+H;var ar=Math.max(L,ab)+H;if(T>=V&&T<=av&&aw>=S&&aw<=ar){return true}else{if(N>=V&&N<=av&&ap>=S&&ap<=ar){return true}}var Y=T-2*P+N;var K=-2*T+2*P;var ai=T;var ac=[];if(Math.abs(Y)<0.0001){var an=(V-T)/K;var aa=(av-T)/K;ac.push(an,aa)}else{var af=K*K-4*Y*(ai-V);var W,U;if(af>0){var ag=Math.sqrt(af);
-W=(-K+ag)/(2*Y);U=(-K-ag)/(2*Y);ac.push(W,U)}var ae=K*K-4*Y*(ai-av);var R,O;if(ae>0){var ag=Math.sqrt(ae);R=(-K+ag)/(2*Y);O=(-K-ag)/(2*Y);ac.push(R,O)}}ac.sort(function(ay,ax){return ay-ax});var X=aw-2*at+ap;var I=-2*aw+2*at;var ah=aw;var al=[];if(Math.abs(X)<0.0001){var J=(S-aw)/I;var aj=(ar-aw)/I;al.push(J,aj)}else{var Q=I*I-4*X*(ah-S);var i,au;if(Q>0){var ag=Math.sqrt(Q);i=(-I+ag)/(2*X);au=(-I-ag)/(2*X);al.push(i,au)}var M=I*I-4*X*(ah-ar);var aq,ao;if(M>0){var ag=Math.sqrt(M);aq=(-I+ag)/(2*X);
-ao=(-I-ag)/(2*X);al.push(aq,ao)}}al.sort(function(ay,ax){return ay-ax});for(var ad=0;ad=0&&ac[ad]<=1&&ac[ad+1]>al[ak-1]&&al[ak-1]<=1&&ac[ad+1]>=0){return true}}}return false};z.prototype.inLineVicinity=function(Q,O,L,J,K,I,M){var R=M;var H=Math.min(L,K);var i=Math.max(L,K);var P=Math.min(J,I);var N=Math.max(J,I);return H-R<=Q&&Q<=i+R&&P-R<=O&&O<=N+R};z.prototype.inBezierVicinity=function(N,M,X,I,W,H,V,i,ac){var P=0.25*X+0.5*W+0.25*V;
-var O=0.25*I+0.5*H+0.25*i;var K={x1:Math.min(X,V,P),x2:Math.max(X,V,P),y1:Math.min(I,i,O),y2:Math.max(I,i,O)};if(NK.x2||MK.y2){return false}else{}var S,R,aa,Y;var L,J,Q;var ab=function(ae,ak,af,ad,aj,ai,ag,ah){L=(ai-ad)*(ae-af)+(af-aj)*(ak-ad);J=L*L;sideSquared=(ai-ad)*(ai-ad)+(af-aj)*(af-aj);if(ah){if(L>0){return false}}else{if(L<0){return false}}return(J/sideSquared>ag)};var U=(P+W)/2;var T=(O+H)/2;var Z=true;if(ab(U,T,X,I,W,H,0,Z)){Z=!Z}return(!ab(N,M,X,I,W,H,ac,Z)&&!ab(N,M,W,H,V,i,ac,Z)&&!ab(N,M,V,i,X,I,ac,Z))
-};z.prototype.solveCubic=function(O,N,M,L,S){N/=O;M/=O;L/=O;var Q,H,i,J,R,P,I,K;H=(3*M-(N*N))/9;i=-(27*L)+N*(9*M-2*(N*N));i/=54;Q=H*H*H+i*i;S[1]=0;I=(N/3);if(Q>0){R=i+Math.sqrt(Q);R=((R<0)?-Math.pow(-R,(1/3)):Math.pow(R,(1/3)));P=i-Math.sqrt(Q);P=((P<0)?-Math.pow(-P,(1/3)):Math.pow(P,(1/3)));S[0]=-I+R+P;I+=(R+P)/2;S[4]=S[2]=-I;I=Math.sqrt(3)*(-P+R)/2;S[3]=I;S[5]=-I;return}S[5]=S[3]=0;if(Q==0){K=((i<0)?-Math.pow(-i,(1/3)):Math.pow(i,(1/3)));S[0]=-I+2*K;S[4]=S[2]=-(K+I);return}H=-H;J=H*H*H;J=Math.acos(i/Math.sqrt(J));
-K=2*Math.sqrt(H);S[0]=-I+K*Math.cos(J/3);S[2]=-I+K*Math.cos((J+2*Math.PI)/3);S[4]=-I+K*Math.cos((J+4*Math.PI)/3);return};z.prototype.sqDistanceToQuadraticBezier=function(R,Q,W,L,V,K,U,J){var ac=1*W*W-4*W*V+2*W*U+4*V*V-4*V*U+U*U+L*L-4*L*K+2*L*J+4*K*K-4*K*J+J*J;var ab=1*9*W*V-3*W*W-3*W*U-6*V*V+3*V*U+9*L*K-3*L*L-3*L*J-6*K*K+3*K*J;var Z=1*3*W*W-6*W*V+W*U-W*R+2*V*V+2*V*R-U*R+3*L*L-6*L*K+L*J-L*Q+2*K*K+2*K*Q-J*Q;var Y=1*W*V-W*W+W*R-V*R+L*K-L*L+L*Q-K*Q;A("coefficients: "+ac/ac+", "+ab/ac+", "+Z/ac+", "+Y/ac);
-var M=[];this.solveCubic(ac,ab,Z,Y,M);var H=1e-7;var aa=[];for(var N=0;N<6;N+=2){if(Math.abs(M[N+1])=0&&M[N]<=1){aa.push(M[N])}}aa.push(1);aa.push(0);var I=-1;var X;var P,O,S;for(var T=0;T=0){if(SJ){return(O-i)*(O-i)+(L-M)*(L-M)}return(Q-K)};var A=function(){};w("renderer","canvas",z)})(cytoscape);(function(a){var b={ready:function(){},stop:function(){}};function c(d){this.options=a.util.extend(true,{},b,d)}c.prototype.run=function(){var d=this.options;
-var e=d.cy;e.nodes().positions(function(){return{x:0,y:0}});e.one("layoutready",d.ready);e.trigger("layoutready");e.one("layoutstop",d.stop);e.trigger("layoutstop")};c.prototype.stop=function(){var d=this.options;cy.one("layoutstop",d.stop);cy.trigger("layoutstop")};a("layout","null",c)})(cytoscape);(function(a){var c={ready:undefined,stop:undefined,fit:true,padding:30};function b(d){this.options=a.util.extend(true,{},c,d)}b.prototype.run=function(){var h=this.options;var j=h.cy;var g=j.nodes();var f=j.edges();
-var e=j.container();var i=e.clientWidth;var d=e.clientHeight;g.positions(function(l,k){if(k.locked()){return false}return{x:Math.round(Math.random()*i),y:Math.round(Math.random()*d)}});j.one("layoutready",h.ready);j.trigger("layoutready");if(h.fit){j.fit(h.padding)}j.one("layoutstop",h.stop);j.trigger("layoutstop")};b.prototype.stop=function(){};a("layout","random",b)})(cytoscape);(function(a){var c={fit:true,rows:undefined,columns:undefined,ready:undefined,stop:undefined};function b(d){this.options=a.util.extend({},c,d)
-}b.prototype.run=function(){var z=this.options;var h=z;var g=z.cy;var u=g.nodes();var f=g.edges();var q=g.container();var t=q.clientWidth;var s=q.clientHeight;if(s==0||t==0){u.positions(function(){return{x:0,y:0}})}else{var i=u.size();var o=Math.sqrt(i*s/t);var m=Math.round(o);var p=Math.round(t/s*o);function l(B){if(B==undefined){return Math.min(m,p)}else{var A=Math.min(m,p);if(A==m){m=B}else{p=B}}}function e(B){if(B==undefined){return Math.max(m,p)}else{var A=Math.max(m,p);if(A==m){m=B}else{p=B
-}}}if(h.rows!=null&&h.columns!=null){m=h.rows;p=h.columns}else{if(h.rows!=null&&h.columns==null){m=h.rows;p=Math.ceil(i/m)}else{if(h.rows==null&&h.columns!=null){p=h.columns;m=Math.ceil(i/p)}else{if(p*m>i){var w=l();var r=e();if((w-1)*r>=i){l(w-1)}else{if((r-1)*w>=i){e(r-1)}}}else{while(p*m=i){e(r+1)}else{l(w+1)}}}}}}var v=t/p;var d=s/m;var k=0;var j=0;u.positions(function(C,B){if(B.locked()){return false}var A=j*v+v/2;var D=k*d+d/2;j++;if(j>=p){j=0;k++}return{x:A,y:D}
-})}if(z.fit){g.reset()}g.one("layoutready",z.ready);g.trigger("layoutready");g.one("layoutstop",z.stop);g.trigger("layoutstop")};b.prototype.stop=function(){};a("layout","grid",b)})(cytoscape);(function(a){var c={fit:true,ready:undefined,stop:undefined,positions:undefined,zoom:undefined,pan:undefined,padding:30};function b(d){this.options=a.util.extend(true,{},c,d)}b.prototype.run=function(){var g=this.options;var i=g.cy;var f=i.nodes();var e=i.edges();var d=i.container();function h(j){if(g.positions==null){return null
-}if(g.positions[j._private.data.id]==null){return null}return g.positions[j._private.data.id]}f.positions(function(k,l){var j=h(l);if(l.locked()||j==null){return false}return j});if(g.pan!=null){i.pan(g.pan)}if(g.zoom!=null){i.zoom(g.zoom)}i.one("layoutready",g.ready);i.trigger("layoutready");if(g.fit){i.fit(g.padding)}i.one("layoutstop",g.stop);i.trigger("layoutstop")};a("layout","preset",b);a("core","presetLayout",function(){var f=this;var d={};var e={};f.nodes().each(function(g,h){e[h.data("id")]=h.position()
-});d.positions=e;d.name="preset";d.zoom=f.zoom();d.pan=f.pan();return d})})(cytoscape);(function(a){var b={liveUpdate:true,ready:undefined,stop:undefined,maxSimulationTime:4000,fit:true,padding:[50,50,50,50],ungrabifyWhileSimulating:true,repulsion:undefined,stiffness:undefined,friction:undefined,gravity:true,fps:undefined,precision:undefined,nodeMass:undefined,edgeLength:undefined,stepSize:1,stableEnergy:function(d){var f=d;return(f.max<=0.5)||(f.mean<=0.3)}};function c(d){this.options=a.util.extend({},b,d)
-}c.prototype.run=function(){var k=this.options;var j=k.cy;var v=j.nodes();var i=j.edges();var q=j.container();var u=q.clientWidth;var s=q.clientHeight;if(j.nodes().size()<=1){if(k.fit){j.reset()}j.nodes().position({x:Math.round(u/2),y:Math.round(s/2)});j.one("layoutstop",k.stop);j.trigger("layoutstop");j.one("layoutstop",k.stop);j.trigger("layoutstop");return}var m=this.system=arbor.ParticleSystem(k.repulsion,k.stiffness,k.friction,k.gravity,k.fps,k.dt,k.precision);this.system=m;if(k.liveUpdate&&k.fit){j.reset()
-}var t=250;var g;var p=false;var f=+new Date;var r={init:function(z){},redraw:function(){var A=m.energy();if(k.stableEnergy!=null&&A!=null&&A.n>0&&k.stableEnergy(A)){m.stop();return}clearTimeout(g);g=setTimeout(w,t);var B=[];m.eachNode(function(H,C){var G=H.name;var E=H.data;var D=E.element;if(D==null){return}var F=D._private.position;if(!D.locked()&&!D.grabbed()){F.x=C.x;F.y=C.y;B.push(D)}});var z=(+new Date-f)>=16;if(k.liveUpdate&&B.length>0&&z){new a.Collection(j,B).rtrigger("position");f=+new Date
-}if(!p){p=true;j.one("layoutready",k.ready);j.trigger("layoutready")}}};m.renderer=r;m.screenSize(u,s);m.screenPadding(k.padding[0],k.padding[1],k.padding[2],k.padding[3]);m.screenStep(k.stepSize);function o(z,A){if(A==null){return undefined}else{if(typeof A==typeof function(){}){return A.apply(z,[z._private.data,{nodes:v.length,edges:i.length,element:z}])}else{return A}}}function d(D){var G=D.x;var E=D.y;var H=u;var B=s;var A=-2;var I=2;var F=-2;var z=2;var C=4;return{x:G/H*C+A,y:E/B*C+I}}var l=function(A){grabbed=this;
-var B=m.fromScreen(this.position());var z=arbor.Point(B.x,B.y);this.scratch().arbor.p=z;switch(A.type){case"grab":this.scratch().arbor.fixed=true;break;case"dragstop":this.scratch().arbor.fixed=false;this.scratch().arbor.tempMass=1000;break}};v.bind("grab drag dragstop",l);v.each(function(B,C){var E=this._private.data.id;var A=o(this,k.nodeMass);var z=this._private.locked;var D=d({x:C.position().x,y:C.position().y});if(C.locked()){return}this.scratch().arbor=m.addNode(E,{element:this,mass:A,fixed:z,x:z?D.x:undefined,y:z?D.y:undefined})
-});i.each(function(){var C=this.id();var A=this.source().id();var B=this.target().id();var z=o(this,k.edgeLength);this.scratch().arbor=m.addEdge(A,B,{length:z})});function h(z){if(k.fit){j.fit()}z()}var e=v.filter(":grabbable");if(k.ungrabifyWhileSimulating){e.ungrabify()}var w=function(){if(window.isIE){h(function(){z()})}else{z()}function z(){if(!k.liveUpdate){if(k.fit){j.reset()}j.nodes().rtrigger("position")}v.unbind("grab drag dragstop",l);if(k.ungrabifyWhileSimulating){e.grabify()}j.one("layoutstop",k.stop);
-j.trigger("layoutstop")}};m.start();setTimeout(function(){m.stop()},k.maxSimulationTime)};c.prototype.stop=function(){if(this.system!=null){system.stop()}};a("layout","arbor",c)})(cytoscape);(function(a){var c={fit:true,ready:undefined,stop:undefined,rStepSize:10,padding:30,startAngle:3/2*Math.PI,counterclockwise:false};function b(d){this.options=a.util.extend({},c,d)}b.prototype.run=function(){var o=this.options;var w=o;var m=o.cy;var f=m.nodes();var p=m.edges();var g=m.container();var h=g.clientWidth;
-var v=g.clientHeight;var e={x:h/2,y:v/2};var u=50;var j=w.startAngle;var s=2*Math.PI/f.length;var t=0;for(var q=0;qh||Q===0){S+=R/W;T++}}T=Math.max(1,T);S=S/T;if(T===0){S=undefined
-}e[Y.id()]=S;return S}for(var t=0;t<3;t++){for(var J=0;J0&&q[0].length<=3?S/2:0);var h=2*Math.PI/q[w].length*Q;
-if(w===0&&q[0].length===1){R=1}return{x:O.x+R*Math.cos(h),y:O.y+R*Math.sin(h)}}else{return{x:(Q+1)*U,y:(w+1)*T}}});if(N.fit){j.fit(m.padding)}j.one("layoutready",N.ready);j.trigger("layoutready");j.one("layoutstop",N.stop);j.trigger("layoutstop")};c.prototype.stop=function(){};a("layout","breadthfirst",c)})(cytoscape);
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.js b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.js
deleted file mode 100755
index ddaf7db957..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.js
+++ /dev/null
@@ -1,348 +0,0 @@
-
-/* jquery.cxtmenu.js */
-
-/**
- * This file is part of cytoscape.js 2.0.2.
- *
- * Cytoscape.js is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * Cytoscape.js is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with
- * cytoscape.js. If not, see .
- */
-
-;(function($){
-
- var defaults = {
- menuRadius: 100,
- cytoscape: true,
- selector: undefined,
- commands: [],
- fillColor: 'rgba(0, 0, 0, 0.75)',
- activeFillColor: 'rgba(92, 194, 237, 0.75)',
- activePadding: 20,
- indicatorSize: 30,
- indicatorColor: 'black',
- separatorWidth: 3,
- spotlightPadding: 4,
- itemColor: 'white',
- itemTextShadowColor: 'black'
- };
-
- $.fn.cxtmenu = function(params){
- var options = $.extend(true, {}, defaults, params);
- var fn = params;
- var $container = $(this);
- var cy;
-
- $container.cytoscape(function(e){
- cy = this;
- });
-
- var functions = {
- destroy: function(){
-
- },
-
- init: function(){
- var $parent = $('');
- var $canvas = $(' ');
- var c2d = $canvas[0].getContext('2d');
- var r = options.menuRadius;
- var offset = $container.offset();
- var containerSize = (r + options.activePadding)*2;
- var activeCommandI = undefined;
-
- $container.append( $parent );
- $parent.append( $canvas );
-
- $parent.css({
- width: containerSize + 'px',
- height: containerSize + 'px',
- position: 'fixed',
- zIndex: 999999,
- marginLeft: offset.left - options.activePadding + 'px',
- marginTop: offset.top - options.activePadding + 'px'
- }).hide();
-
- $canvas[0].width = containerSize;
- $canvas[0].height = containerSize;
-
- var commands = options.commands;
- var dtheta = 2*Math.PI/(commands.length);
- var theta1 = commands.length % 2 !== 0 ? Math.PI/2 : 0;
- var theta2 = theta1 + dtheta;
- var $items = [];
-
- for( var i = 0; i < commands.length; i++ ){
- var command = commands[i];
-
- var midtheta = (theta1 + theta2)/2;
- var rx1 = 0.66 * r * Math.cos( midtheta );
- var ry1 = 0.66 * r * Math.sin( midtheta );
-
- // console.log(rx1, ry1, theta1, theta2)
-
- var $item = $('');
- $item.css({
- color: options.itemColor,
- cursor: 'default',
- display: 'table',
- 'text-align': 'center',
- //background: 'red',
- position: 'absolute',
- 'text-shadow': '-1px -1px ' + options.itemTextShadowColor + ', 1px -1px ' + options.itemTextShadowColor + ', -1px 1px ' + options.itemTextShadowColor + ', 1px 1px ' + options.itemTextShadowColor,
- left: '50%',
- top: '50%',
- 'min-height': r * 0.66,
- width: r * 0.66,
- height: r * 0.66,
- marginLeft: rx1 - r * 0.33,
- marginTop: -ry1 -r * 0.33
- });
-
- var $content = $('');
- $content.css({
- 'width': r * 0.66,
- 'height': r * 0.66,
- 'vertical-align': 'middle',
- 'display': 'table-cell'
- });
-
- $parent.append( $item );
- $item.append( $content );
-
-
- theta1 += dtheta;
- theta2 += dtheta;
- }
-
- function drawBg( rspotlight ){
- rspotlight = rspotlight !== undefined ? rspotlight : rs;
-
- c2d.globalCompositeOperation = 'source-over';
-
- c2d.clearRect(0, 0, containerSize, containerSize);
-
- c2d.fillStyle = options.fillColor;
- c2d.beginPath();
- c2d.arc(r + options.activePadding, r + options.activePadding, r, 0, Math.PI*2, true);
- c2d.closePath();
- c2d.fill();
-
- c2d.globalCompositeOperation = 'destination-out';
- c2d.strokeStyle = 'white';
- c2d.lineWidth = options.separatorWidth;
- var commands = options.commands;
- var dtheta = 2*Math.PI/(commands.length);
- var theta1 = commands.length % 2 !== 0 ? Math.PI/2 : 0;
- var theta2 = theta1 + dtheta;
-
- for( var i = 0; i < commands.length; i++ ){
- var command = commands[i];
-
- var rx1 = r * Math.cos(theta1);
- var ry1 = r * Math.sin(theta1);
- c2d.beginPath();
- c2d.moveTo(r + options.activePadding, r + options.activePadding);
- c2d.lineTo(r + options.activePadding + rx1, r + options.activePadding - ry1);
- c2d.closePath();
- c2d.stroke();
-
- // var rx2 = r * Math.cos(theta2);
- // var ry2 = r * Math.sin(theta2);
- // c2d.moveTo(r, r);
- // c2d.lineTo(r + rx2, r + ry2);
- // c2d.stroke();
-
- theta1 += dtheta;
- theta2 += dtheta;
- }
-
-
- c2d.fillStyle = 'white';
- c2d.globalCompositeOperation = 'destination-out';
- c2d.beginPath();
- c2d.arc(r + options.activePadding, r + options.activePadding, rspotlight + options.spotlightPadding, 0, Math.PI*2, true);
- c2d.closePath();
- c2d.fill();
-
- c2d.globalCompositeOperation = 'source-over';
- }
-
- var lastCallTime = 0;
- var minCallDelta = 1000/30;
- var endCallTimeout;
- var firstCall = true;
- function rateLimitedCall( fn ){
- var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
- var now = +new Date;
-
- clearTimeout( endCallTimeout );
-
- if( firstCall || now >= lastCallTime + minCallDelta ){
- requestAnimationFrame(fn);
- lastCallTime = now;
- firstCall = false;
- } else {
- endCallTimeout = setTimeout(function(){
- requestAnimationFrame(fn);
- lastCallTime = now;
- }, minCallDelta * 2);
- }
- }
-
- var ctrx, ctry, rs;
- var tapendHandler;
-
- cy
- .on('cxttapstart', options.selector, function(e){
- var ele = this;
- var rp = ele.renderedPosition();
- var rw = ele.renderedWidth();
- var rh = ele.renderedHeight();
- var scrollLeft = $(window).scrollLeft();
- var scrollTop = $(window).scrollTop();
-
- ctrx = rp.x;
- ctry = rp.y;
-
- $parent.show().css({
- 'left': rp.x - r - scrollLeft,
- 'top': rp.y - r - scrollTop
- });
-
- rs = Math.max(rw, rh);
- rs = 32;
-
- drawBg();
-
- activeCommandI = undefined;
- })
-
- .on('cxtdrag', options.selector, function(e){ rateLimitedCall(function(){
-
- var dx = e.originalEvent.pageX - $container.offset().left - ctrx;
- var dy = e.originalEvent.pageY - $container.offset().top - ctry;
-
- if( dx === 0 ){ dx = 0.01; }
-
- var d = Math.sqrt( dx*dx + dy*dy );
- var cosTheta = (dy*dy - d*d - dx*dx)/(-2 * d * dx);
- var theta = Math.acos( cosTheta );
-
- activeCommandI = undefined;
-
- if( d < rs + options.spotlightPadding ){
- drawBg();
- return;
- }
-
- drawBg();
-
- var rx = dx*r / d;
- var ry = dy*r / d;
-
- if( dy > 0 ){
- theta = Math.PI + Math.abs(theta - Math.PI);
- }
-
- var commands = options.commands;
- var dtheta = 2*Math.PI/(commands.length);
- var theta1 = commands.length % 2 !== 0 ? Math.PI/2 : 0;
- var theta2 = theta1 + dtheta;
-
- for( var i = 0; i < commands.length; i++ ){
- var command = commands[i];
-
-
- // console.log(i, theta1, theta, theta2);
-
- var inThisCommand = theta1 <= theta && theta <= theta2
- || theta1 <= theta + 2*Math.PI && theta + 2*Math.PI <= theta2;
-
- if( inThisCommand ){
- // console.log('in command ' + i)
-
- c2d.fillStyle = options.activeFillColor;
- c2d.strokeStyle = 'black';
- c2d.lineWidth = 1;
- c2d.beginPath();
- c2d.moveTo(r + options.activePadding, r + options.activePadding);
- c2d.arc(r + options.activePadding, r + options.activePadding, r + options.activePadding, 2*Math.PI - theta1, 2*Math.PI - theta2, true);
- c2d.closePath();
- c2d.fill();
- //c2d.stroke();
-
- activeCommandI = i;
-
- break;
- }
-
- theta1 += dtheta;
- theta2 += dtheta;
- }
-
- c2d.fillStyle = 'white';
- c2d.globalCompositeOperation = 'destination-out';
-
- // clear the indicator
- c2d.beginPath();
- //c2d.arc(r + rx/r*(rs + options.spotlightPadding), r + ry/r*(rs + options.spotlightPadding), options.indicatorSize, 0, 2*Math.PI, true);
-
- c2d.translate( r + options.activePadding + rx/r*(rs + options.spotlightPadding - options.indicatorSize/4), r + options.activePadding + ry/r*(rs + options.spotlightPadding - options.indicatorSize/4) );
- c2d.rotate( Math.PI/4 - theta );
- c2d.fillRect(-options.indicatorSize/2, -options.indicatorSize/2, options.indicatorSize, options.indicatorSize);
- c2d.closePath();
- c2d.fill();
-
- c2d.setTransform(1, 0, 0, 1, 0, 0);
-
- // clear the spotlight
- c2d.beginPath();
- c2d.arc(r + options.activePadding, r + options.activePadding, rs + options.spotlightPadding, 0, Math.PI*2, true);
- c2d.closePath();
- c2d.fill();
-
- c2d.globalCompositeOperation = 'source-over';
- }) })
-
- .on('cxttapend', options.selector, function(e){
- var ele = this;
- $parent.hide();
-
- if( activeCommandI !== undefined ){
- var select = options.commands[ activeCommandI ].select;
-
- if( select ){
- select.apply( ele );
- }
- }
- })
-
- .on('cxttapend', function(e){
- $parent.hide();
- })
- ;
- }
- };
-
- if( functions[fn] ){
- return functions[fn].apply(this, Array.prototype.slice.call( arguments, 1 ));
- } else if( typeof fn == 'object' || !fn ) {
- return functions.init.apply( this, arguments );
- } else {
- $.error("No such function `"+ fn +"` for jquery.cxtmenu");
- }
-
- return $(this);
- };
-
-})(jQuery);
\ No newline at end of file
diff --git a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.min.js b/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.min.js
deleted file mode 100755
index b42a48a940..0000000000
--- a/src/lib/biojs-1.0/src/main/resources/dependencies/cytoscape/2.0.2/jquery.cxtmenu.min.js
+++ /dev/null
@@ -1,30 +0,0 @@
-
-/* jquery.cxtmenu.min.js */
-
-/**
- * This file is part of cytoscape.js 2.0.2.
- *
- * Cytoscape.js is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * Cytoscape.js is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with
- * cytoscape.js. If not, see .
- */
-
-(function(a){var b={menuRadius:100,cytoscape:true,selector:undefined,commands:[],fillColor:"rgba(0, 0, 0, 0.75)",activeFillColor:"rgba(92, 194, 237, 0.75)",activePadding:20,indicatorSize:30,indicatorColor:"black",separatorWidth:3,spotlightPadding:4,itemColor:"white",itemTextShadowColor:"black"};a.fn.cxtmenu=function(g){var c=a.extend(true,{},b,g);var d=g;var f=a(this);var h;f.cytoscape(function(i){h=this});var e={destroy:function(){},init:function(){var D=a('');var w=a(" ");
-var F=w[0].getContext("2d");var A=c.menuRadius;var u=f.offset();var H=(A+c.activePadding)*2;var y=undefined;f.append(D);D.append(w);D.css({width:H+"px",height:H+"px",position:"fixed",zIndex:999999,marginLeft:u.left-c.activePadding+"px",marginTop:u.top-c.activePadding+"px"}).hide();w[0].width=H;w[0].height=H;var v=c.commands;var z=2*Math.PI/(v.length);var E=v.length%2!==0?Math.PI/2:0;var C=E+z;var o=[];for(var J=0;J