diff --git a/.editorconfig b/.editorconfig index 422f746882..1752907a89 100644 --- a/.editorconfig +++ b/.editorconfig @@ -41,4 +41,7 @@ indent_style=tab indent_size=4 [typo.css] +indent_style=tab + +[Gemma.tld] indent_style=tab \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2cd0505b68..7cacd2a9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ _$* *.Z *.elc *.ln +.envrc +.ipynb_checkpoints/ + # Project ignores (converted from .cvsignore files) gemma-web/.settings/org.eclipse.m2e.core.prefs gemma-web/surefire* @@ -134,4 +137,5 @@ atlassian-ide-plugin.xml # a user-defined Gemma.properties file /Gemma.properties /gemma-data -/gemma-logs \ No newline at end of file +/gemma-logs + diff --git a/.idea/runConfigurations/Build_static_assets.xml b/.idea/runConfigurations/Build_static_assets.xml new file mode 100644 index 0000000000..38e4bf7e41 --- /dev/null +++ b/.idea/runConfigurations/Build_static_assets.xml @@ -0,0 +1,12 @@ + + + + + + - + gtag( 'js', new Date() ); - - diff --git a/gemma-web/src/main/webapp/common/exception.jsp b/gemma-web/src/main/webapp/common/exception.jsp index 6e5ebf8f48..e275484508 100644 --- a/gemma-web/src/main/webapp/common/exception.jsp +++ b/gemma-web/src/main/webapp/common/exception.jsp @@ -1,26 +1,19 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %>
-

- - - +
-
-

- - <%-- this is causing stackoverflow errors ... no idea why, since upgrading to spring 3.2 from 3.0.7 --%> - - + <%-- this is causing stackoverflow errors ... no idea why, since upgrading to spring 3.2 from 3.0.7 --%> +
-
-

+
+

${fn:escapeXml(requestScope['javax.servlet.error.message'])}" />

+
-
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/common/header.inner.jsp b/gemma-web/src/main/webapp/common/header.inner.jsp index 2fa13d7051..1d904ed851 100644 --- a/gemma-web/src/main/webapp/common/header.inner.jsp +++ b/gemma-web/src/main/webapp/common/header.inner.jsp @@ -1,6 +1,6 @@ <%@ include file="/common/taglibs.jsp"%> - +
in English diff --git a/gemma-web/src/main/webapp/common/messages.jsp b/gemma-web/src/main/webapp/common/messages.jsp index e6fbfbd2fa..551f2805e4 100644 --- a/gemma-web/src/main/webapp/common/messages.jsp +++ b/gemma-web/src/main/webapp/common/messages.jsp @@ -1,21 +1,9 @@ -<%-- Error Messages --%> -<%@ include file="/common/taglibs.jsp"%> - -
- - -
-
-
- -
- -<%-- Success Messages --%> +<%@ include file="/common/taglibs.jsp" %> -
+
-
+
diff --git a/gemma-web/src/main/webapp/common/meta.jsp b/gemma-web/src/main/webapp/common/meta.jsp deleted file mode 100644 index 7590c3c945..0000000000 --- a/gemma-web/src/main/webapp/common/meta.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"/> - - - diff --git a/gemma-web/src/main/webapp/common/social.jsp b/gemma-web/src/main/webapp/common/social.jsp index 20cb3b1efd..5c7b4a3b63 100644 --- a/gemma-web/src/main/webapp/common/social.jsp +++ b/gemma-web/src/main/webapp/common/social.jsp @@ -1,3 +1,4 @@ +<%@ taglib uri="/WEB-INF/Gemma.tld" prefix="Gemma"%> <%-- see https://twitter.com/about/resources/buttons#follow --%> @@ -14,6 +15,6 @@ + title="Subscribe to Gemma feeds" target="_blank">
diff --git a/gemma-web/src/main/webapp/common/taglibs.jsp b/gemma-web/src/main/webapp/common/taglibs.jsp index d442f1049d..14a8e6db92 100644 --- a/gemma-web/src/main/webapp/common/taglibs.jsp +++ b/gemma-web/src/main/webapp/common/taglibs.jsp @@ -1,11 +1,9 @@ -<%@ page language="java" errorPage="/pages/error/500.jsp" pageEncoding="UTF-8" - contentType="text/html; charset=utf-8"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> +<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%> <%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> -<%@ taglib uri="/WEB-INF/Gemma.tld" prefix="Gemma"%> -<%@ taglib uri="http://jawr.net/tags" prefix="jwr"%> +<%@ taglib uri="/WEB-INF/Gemma.tld" prefix="Gemma"%> \ No newline at end of file diff --git a/gemma-web/src/main/webapp/common/userStatusVariables.jsp b/gemma-web/src/main/webapp/common/userStatusVariables.jsp index 29ab29fdaf..a8895ad415 100644 --- a/gemma-web/src/main/webapp/common/userStatusVariables.jsp +++ b/gemma-web/src/main/webapp/common/userStatusVariables.jsp @@ -1,35 +1,38 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> + <%-- Security fields used in Java script calls to hide or display information on pages, used to be in footer --%> - + - + - + - + - + - + - " /> + " /> - + <%-- dump some other useful settings --%> - - - + + + diff --git a/gemma-web/src/main/webapp/debug.html b/gemma-web/src/main/webapp/debug.html new file mode 100644 index 0000000000..721d5dc5fb --- /dev/null +++ b/gemma-web/src/main/webapp/debug.html @@ -0,0 +1,67 @@ + + + +Debug Webpack | Gemma + + + + + + +
+ + +
+
+
+
+
+

Debug Webpack

+

+ This HTML document contains the minimum necessary to load and debug + Gemma Webpack bundles.
+

+

+ It can be tested out with: +

+
npm run serve
+

+ You can inspect the following bundles: +

+ +
+
+
+
+ + diff --git a/gemma-web/src/main/webapp/decorators/default.jsp b/gemma-web/src/main/webapp/decorators/default.jsp index b21f22d305..444295d5d6 100644 --- a/gemma-web/src/main/webapp/decorators/default.jsp +++ b/gemma-web/src/main/webapp/decorators/default.jsp @@ -1,77 +1,42 @@ +<%@ include file="/common/taglibs.jsp" %> + -<%-- Include common set of tag library declarations for each layout --%> -<%@ include file="/common/taglibs.jsp"%> - + -<%-- Include common set of meta tags for each layout --%> -<%@ include file="/common/meta.jsp"%> - - + + <decorator:title /> | <fmt:message key="webapp.name" /> - - - - - - - - -<%-- for dwr creation of javascript objects to mirror java value objects; including one of these causes all the objects to be exposed.--%> - -<%-- We should use this as soon as we figure out how to set generateDtoClasses option to dtoall - script type='text/javascript' src='/Gemma/dwr/dtoall.js'> --%> - + +" /> +" /> + + + <%-- for registration, possible from any page--%> - -<%-- log javascript errors --%> - - + + + - - - - > - -
- -
- -
- - -
- - - -
- <%@ include file="/common/messages.jsp"%> - -

- -

- - - -
- - -
- - - - - -
- + + +
+
+ +
+
+
+ <%@ include file="/common/messages.jsp" %> + +
+
+
- - + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/error.jsp b/gemma-web/src/main/webapp/error.jsp index 66705e1df2..0fe166a1d9 100644 --- a/gemma-web/src/main/webapp/error.jsp +++ b/gemma-web/src/main/webapp/error.jsp @@ -1,12 +1,12 @@ +<%@ page isErrorPage="true" %> + <%@ include file="/common/taglibs.jsp" %> - - -<%@ page isErrorPage="true" %> +--%> @@ -38,7 +38,8 @@ If you can, avoid producing error this way and prefer raising an exception that

Unsupported Status Code

- There is no error page configured for the status code . + There is no error page configured for the status code .


<%@ include file="/common/exception.jsp" %> diff --git a/gemma-web/src/main/webapp/package-lock.json b/gemma-web/src/main/webapp/package-lock.json new file mode 100644 index 0000000000..44a1009f0d --- /dev/null +++ b/gemma-web/src/main/webapp/package-lock.json @@ -0,0 +1,4322 @@ +{ + "name": "gemma-web", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "gemma-web", + "license": "Apache 2.0", + "dependencies": { + "bean": "^1.0.15", + "flotr2": "^0.1.0", + "jquery": "^2.1.1", + "jquery-sparkline": "^2.1.2", + "jquery-ui": "^1.10.4", + "qtip2": "^2.2.0", + "underscore": "^1.13.7" + }, + "devDependencies": { + "css-loader": "^7.1.2", + "mini-css-extract-plugin": "^2.9.2", + "webpack": "^5.96.1", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.1.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.0.tgz", + "integrity": "sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.5.0.tgz", + "integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", + "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.1.tgz", + "integrity": "sha512-CRICJIl0N5cXDONAdlTv5ShATZ4HEwk6kDDIW2/w9qOWKg+NU/5F8wYRWCrONad0/UKkloNSmmyN/wX4rtpbVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/express/node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.15", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.15.tgz", + "integrity": "sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.8" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.17", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", + "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/retry": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-index": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", + "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", + "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "license": "Apache-2.0", + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bean": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/bean/-/bean-1.0.15.tgz", + "integrity": "sha512-/X7mF8caOC3qZYSJu62wEJ7AO5/ZIKwwvjBFded5s8IDdRLJSAXfYLJaNPIa/ALThJIWtqtJbbfGbGOjISX1bw==" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "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/bonjour-service": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001680", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", + "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.5.tgz", + "integrity": "sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "negotiator": "~0.6.4", + "on-headers": "~1.0.2", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true, + "license": "MIT" + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.63", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", + "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", + "dev": true, + "license": "ISC" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/envinfo": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true, + "license": "MIT" + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/express": { + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "dev": true, + "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.10", + "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" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "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", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "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==", + "dev": true, + "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/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flotr2": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/flotr2/-/flotr2-0.1.0.tgz", + "integrity": "sha512-6JvA9O09AP9zWFKgO+QycLUkgydtciewM0OtV5d4lG39QlqxxkQv3Mgv5Fd8URBr8AW29RLFEyaFpUhugWR8Mg==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/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==", + "dev": true, + "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/hpack.js/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/hpack.js/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.18" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ipaddr.js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-network-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", + "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jquery": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", + "integrity": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==", + "license": "MIT" + }, + "node_modules/jquery-sparkline": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jquery-sparkline/-/jquery-sparkline-2.4.0.tgz", + "integrity": "sha512-SzjpMkOwlnqZpH4Ni2UbdRU5GxDl/BljgN8Smlun7CXUDqRhjPf2eolJ37KKcaG0/ufsMKY+XDERfPTV1hIcjg==", + "license": "BSD-2-Clause" + }, + "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/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/launch-editor": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.9.1.tgz", + "integrity": "sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.14.0.tgz", + "integrity": "sha512-JUeY0F/fQZgIod31Ja1eJgiSxLn7BfQlCnqhwXFBzFHEw63OdLK7VJUJ7bnzNsWgCyoUP5tEp1VRY8rDaYzqOA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, + "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==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "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==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.2.tgz", + "integrity": "sha512-GJuACcS//jtq4kCtd5ii/M0SZf7OZRH+BxdqXZHaJfb8TJiVl+NgQRPwiYt2EuqeSkNydn/7vP+bcE27C5mb9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "dev": true, + "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", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/open": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "license": "(WTFPL OR MIT)", + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-retry": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", + "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "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", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "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", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", + "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/qtip2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/qtip2/-/qtip2-2.2.0.tgz", + "integrity": "sha512-igbHo28jugnQuLsfW62psi1kAUQUAbUEUuXSYPZn0yTA7jcN6Fj5a9hMfyE9N7czBNJkbHGrHqIvSc07FzUegg==" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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/safer-buffer": { + "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/schema-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true, + "license": "MIT" + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "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==", + "dev": true, + "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/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "dev": true, + "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": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "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==", + "dev": true, + "license": "ISC" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "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/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/spdy-transport/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/spdy-transport/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/spdy/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/spdy/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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/terser-webpack-plugin/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/thingies": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", + "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tree-dump": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.2.tgz", + "integrity": "sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/underscore": { + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/watchpack": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/webpack": { + "version": "5.96.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", + "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-dev-middleware": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.2.tgz", + "integrity": "sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^4.6.0", + "mime-types": "^2.1.31", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.1.0.tgz", + "integrity": "sha512-aQpaN81X6tXie1FoOB7xlMfCsN19pSvRAeYUHOdFWOlhpQ/LlbfTqYwwmEDFV0h8GGuqmCmKmT+pxcUV/Nt2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "express": "^4.19.2", + "graceful-fs": "^4.2.6", + "html-entities": "^2.4.0", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "schema-utils": "^4.2.0", + "selfsigned": "^2.4.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^7.4.2", + "ws": "^8.18.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/webpack/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/gemma-web/src/main/webapp/package.json b/gemma-web/src/main/webapp/package.json new file mode 100644 index 0000000000..26b8710218 --- /dev/null +++ b/gemma-web/src/main/webapp/package.json @@ -0,0 +1,29 @@ +{ + "name": "gemma-web", + "private": true, + "scripts": { + "build": "webpack --mode production", + "devbuild": "webpack --mode development", + "serve": "webpack serve --mode development" + }, + "author": "", + "license": "Apache 2.0", + "description": "", + "devDependencies": { + "css-loader": "^7.1.2", + "mini-css-extract-plugin": "^2.9.2", + "webpack": "^5.96.1", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.1.0" + }, + "dependencies": { + "bean": "^1.0.15", + "flotr2": "^0.1.0", + "jquery": "^2.1.1", + "jquery-sparkline": "^2.1.2", + "jquery-ui": "^1.10.4", + "qtip2": "^2.2.0", + "underscore": "^1.13.7" + } +} diff --git a/gemma-web/src/main/webapp/pages/admin/activeUsers.jsp b/gemma-web/src/main/webapp/pages/admin/activeUsers.jsp index d0cb97dcee..d932eb7e32 100644 --- a/gemma-web/src/main/webapp/pages/admin/activeUsers.jsp +++ b/gemma-web/src/main/webapp/pages/admin/activeUsers.jsp @@ -1,44 +1,41 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> + <fmt:message key="activeUsers.title" /> - - - - - +
-

Tasks

-
+

Tasks

+
-
+
-

- -

- +

+ +

+
Signed in: ?
- -
-
-

FIXME table of authenticated users should go here.

- -

System Stats

- + + +
+

FIXME table of authenticated users should go here.

+ +

System Stats

+ Gemma version ${appConfig["gemma.version"] != null ? appConfig["gemma.version"] : "?"} built @@ -48,11 +45,11 @@ from ${appConfig["gemma.build.gitHash"]} + target="_blank" rel="noopener noreferrer">${appConfig["gemma.build.gitHash"]} - + - +
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/admin/geoRecordBrowser.jsp b/gemma-web/src/main/webapp/pages/admin/geoRecordBrowser.jsp index ec66fa6667..dfcf62130c 100644 --- a/gemma-web/src/main/webapp/pages/admin/geoRecordBrowser.jsp +++ b/gemma-web/src/main/webapp/pages/admin/geoRecordBrowser.jsp @@ -1,61 +1,56 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> GEO Record browser + + - - +
+ +
+ +
+

+ Displaying GEO records. +

+
+ +
+ +
+
+

+ Note: Records are not shown for taxa not in the Gemma system. If you + choose to load an experiment, please be careful: experiments that + have two (or more) array designs should be loaded using the regular + load form if you need to suppress the sample-matching functions. + Click on a row to display more information about the dataset, if available + from GEO, including information about platforms. This information is + often not available for a day or two after the data sets becomes + publicly available. +

+

+ To search GEO, type your query in the 'Search' field, e.g. Mus+musculus[ORGN]+AND+brain[ALL]. + For more information on how to construct queries, go to the + NCBI website. +

+
+ - - - - -
- -
- -
-

- Displaying GEO records. -

-
- -
- -
-
-

- Note: Records are not shown for taxa not in the Gemma system. If you - choose to load an experiment, please be careful: experiments that - have two (or more) array designs should be loaded using the regular - load form if you need to suppress the sample-matching functions. - Click on a row to display more information about the dataset, if available - from GEO, including information about platforms. This information is - often not available for a day or two after the data sets becomes - publicly available. -

-

- To search GEO, type your query in the 'Search' field, e.g. Mus+musculus[ORGN]+AND+brain[ALL]. - For more information on how to construct queries, go to the - NCBI website. -

-
- - \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/admin/indexer.jsp b/gemma-web/src/main/webapp/pages/admin/indexer.jsp index 07cbe29b35..22b6f21aa7 100644 --- a/gemma-web/src/main/webapp/pages/admin/indexer.jsp +++ b/gemma-web/src/main/webapp/pages/admin/indexer.jsp @@ -1,31 +1,25 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - Index Gemma - - - - +Manage Search Indexes + - - - - -

- Choose the indexing options that are appropriate and then click - index. -

- -
-
- -
-
- -
- +
+

Manage Search Indexes

+ +

+ Choose the indexing options that are appropriate and then click + index. +

+
+
+ +
+
+
+
diff --git a/gemma-web/src/main/webapp/pages/admin/loadExpressionExperimentForm.jsp b/gemma-web/src/main/webapp/pages/admin/loadExpressionExperimentForm.jsp index 604b558a3b..b1fd679b37 100644 --- a/gemma-web/src/main/webapp/pages/admin/loadExpressionExperimentForm.jsp +++ b/gemma-web/src/main/webapp/pages/admin/loadExpressionExperimentForm.jsp @@ -1,181 +1,177 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - - - - - <fmt:message key="expressionExperimentLoad.title" /> + <fmt:message key="expressionExperimentLoad.title" /> + + - - - -
- -
-
+
+ +
- +
- - - - - + + + + + + + + + + + + +
- - - " /> - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - -
+ + + " /> + -
- - - - - - "> - " value="true" - checked /> - +
+ + + + + + "> + " value="true" + checked /> + -
- - - - - - "> - " - value="true" id="loadPlatformOnly" - checked /> - +
+ + + + + + "> + " + value="true" id="loadPlatformOnly" + checked /> + -
- - - - - - "> - " value="true" - checked /> - +
+ + + + + + "> + " value="true" + checked /> + -
- - - - - - "> - " value="true" - checked /> - +
+ + + + + + "> + " value="true" + checked /> + -
- - - - - - "> - " value="true" - checked /> - +
+ + + + + + "> + " value="true" + checked /> + -
- - - - - - "> - " value="false" - checked /> - +
+ + + + + + "> + " value="false" + checked /> + -
- - -
-
-
-
+
+ + +
+
+
+
+ + diff --git a/gemma-web/src/main/webapp/pages/admin/maintenanceMode.jsp b/gemma-web/src/main/webapp/pages/admin/maintenanceMode.jsp index 312b8be282..0704885602 100644 --- a/gemma-web/src/main/webapp/pages/admin/maintenanceMode.jsp +++ b/gemma-web/src/main/webapp/pages/admin/maintenanceMode.jsp @@ -1,13 +1,19 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> -

- Maintenance mode simply puts a notice on every page that things might - be broken. -

-
- + +Maintenance Mode + - -
\ No newline at end of file +
+

+ Maintenance mode simply puts a notice on every page that things might + be broken. +

+
+ + + +
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/admin/reIndexOntologies.jsp b/gemma-web/src/main/webapp/pages/admin/reIndexOntologies.jsp index 7010a17547..a9c928e533 100755 --- a/gemma-web/src/main/webapp/pages/admin/reIndexOntologies.jsp +++ b/gemma-web/src/main/webapp/pages/admin/reIndexOntologies.jsp @@ -2,10 +2,7 @@ Index Gemma - - - - + diff --git a/gemma-web/src/main/webapp/pages/admin/systemStats.jsp b/gemma-web/src/main/webapp/pages/admin/systemStats.jsp index fdd7dff8c9..3782ba9f5c 100644 --- a/gemma-web/src/main/webapp/pages/admin/systemStats.jsp +++ b/gemma-web/src/main/webapp/pages/admin/systemStats.jsp @@ -1,8 +1,7 @@ <%@ include file="/common/taglibs.jsp"%> -System stats - - +System Stats + +
+

EE Page

+
-

EE Page

-
+

ComboBoxes

+

DatasetGroup combo

+
-

ComboBoxes

-

DatasetGroup combo

-
+

DatasetGroupComboPanel

+
+

TaxonCombo

+
-

DatasetGroupComboPanel

-
-

TaxonCombo

-
+

FactorValueCombo

+
-

FactorValueCombo

-
+

Dataset search field

+
+
-

Dataset search field

-
-
+

CharacteristicCombo

+
+

Gene combo

+
-

CharacteristicCombo

-
+

Gene Group Combo

+
-

Gene combo

-
-

Gene Group Combo

-
+

MGEDCombo

+
+

ArrayDesignCombo

+
+

Panels

-

MGEDCombo

-
-

ArrayDesignCombo

-
+

GeneChooserPanel

+
-

Panels

-

GeneChooserPanel

-
+

DatasetGroupGridPanel with DatasetGroupEditToolbar

+
+

ExpressionExperiment Grid

+
+

AuditTrailGrid

+
-

DatasetGroupGridPanel with DatasetGroupEditToolbar

-
-

ExpressionExperiment Grid

-
+

FilesUpload

+
+

Visualization

+
-

AuditTrailGrid

-
+

ProgressWidget

+
-

FilesUpload

-
+

AnalysisResultsSearch

+
+
+
+
-

Visualization

-
+

Widget

+
-

ProgressWidget

-
+

Font-awesome test

+

+ fa-camera-retro +

+
+ diff --git a/gemma-web/src/main/webapp/pages/analysesResultsSearch.jsp b/gemma-web/src/main/webapp/pages/analysesResultsSearch.jsp index 1a48adbcf5..ace50307af 100755 --- a/gemma-web/src/main/webapp/pages/analysesResultsSearch.jsp +++ b/gemma-web/src/main/webapp/pages/analysesResultsSearch.jsp @@ -1,34 +1,23 @@ +<%@ include file="/common/taglibs.jsp" %> - - - Search Analyses Results - - - - - - + +Search Analyses Results + + + - - +
- - - +Ext.onReady( function() { + Ext.QuickTips.init(); -
- + new Gemma.GemmaViewPort( { + centerPanelConfig : new Gemma.AnalysisResultsSearch() + } ); +} ); + diff --git a/gemma-web/src/main/webapp/pages/arrayDesign.detail.jsp b/gemma-web/src/main/webapp/pages/arrayDesign.detail.jsp index 9f060caea1..8dfc0a0132 100644 --- a/gemma-web/src/main/webapp/pages/arrayDesign.detail.jsp +++ b/gemma-web/src/main/webapp/pages/arrayDesign.detail.jsp @@ -1,32 +1,27 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> - +${fn:escapeXml(arrayDesign.shortName)} - ${fn:escapeXml(arrayDesign.name)} + + + + + + - -${arrayDesignShortName} - ${arrayDesignName } - - - - - - - - diff --git a/gemma-web/src/main/webapp/pages/arrayDesign.edit.jsp b/gemma-web/src/main/webapp/pages/arrayDesign.edit.jsp index 36652cbf57..fed57c8c02 100644 --- a/gemma-web/src/main/webapp/pages/arrayDesign.edit.jsp +++ b/gemma-web/src/main/webapp/pages/arrayDesign.edit.jsp @@ -1,12 +1,15 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> -Edit Array Design ${arrayDesign.name} + +Edit ${fn:escapeXml(arrayDesign.name)} +
- " alt="" class="icon" /> + +
@@ -15,70 +18,73 @@
" id="arrayDesignForm" - onsubmit="return validateArrayDesign(this)"> + onsubmit="return validateArrayDesign(this)"> - - - - - - - -
- - - - " id="name" /> - - -
- - - - " id="shortName" /> - + + + + + + + + - - - - - + + + + + + + - - - - - - - - + + + + + + + + -
+ + + + " id="name" /> + + +
+ + + + " id="shortName" /> + - -
- - - - - -
+ + + + + +
- - - - - - -
- " /> - " /> - -
+ + + + + + +
+ " /> + " /> + +
+
diff --git a/gemma-web/src/main/webapp/pages/arrayDesign.jsp b/gemma-web/src/main/webapp/pages/arrayDesign.jsp deleted file mode 100644 index 7288c13417..0000000000 --- a/gemma-web/src/main/webapp/pages/arrayDesign.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ include file="/common/taglibs.jsp"%> - - - <jsp:getProperty name="arrayDesign" property="shortName" /> - <jsp:getProperty name="arrayDesign" - property="name" /> - - - - - - - - -
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/arrayDesignAdd.jsp b/gemma-web/src/main/webapp/pages/arrayDesignAdd.jsp index 96bc534acd..b53ad8f258 100644 --- a/gemma-web/src/main/webapp/pages/arrayDesignAdd.jsp +++ b/gemma-web/src/main/webapp/pages/arrayDesignAdd.jsp @@ -8,7 +8,8 @@
- " alt="" class="icon" /> + +
diff --git a/gemma-web/src/main/webapp/pages/arrayDesigns.jsp b/gemma-web/src/main/webapp/pages/arrayDesigns.jsp index ac6f766e0b..78fb8ed733 100644 --- a/gemma-web/src/main/webapp/pages/arrayDesigns.jsp +++ b/gemma-web/src/main/webapp/pages/arrayDesigns.jsp @@ -1,23 +1,16 @@ - -<%@ include file="/common/taglibs.jsp"%> - +Platforms + + - - - -Platforms - diff --git a/gemma-web/src/main/webapp/pages/bibRefAdd.jsp b/gemma-web/src/main/webapp/pages/bibRefAdd.jsp new file mode 100644 index 0000000000..90c0c07d02 --- /dev/null +++ b/gemma-web/src/main/webapp/pages/bibRefAdd.jsp @@ -0,0 +1,22 @@ +<%@ include file="/common/taglibs.jsp" %> + + +Import ${fn:escapeXml(bibliographicReference.pubAccession.accession)} + from ${fn:escapeXml(bibliographicReference.pubAccession.externalDatabase.name)} + + + +
+

Import ${fn:escapeXml(bibliographicReference.pubAccession.accession)} + from ${fn:escapeXml(bibliographicReference.pubAccession.externalDatabase.name)}

+

+ This reference was obtained from PubMed; it is not in the Gemma system. +

+ +
"> + + +
+
+
diff --git a/gemma-web/src/main/webapp/pages/bibRefAllExperiments.jsp b/gemma-web/src/main/webapp/pages/bibRefAllExperiments.jsp index 8684a16498..6596ce7a67 100644 --- a/gemma-web/src/main/webapp/pages/bibRefAllExperiments.jsp +++ b/gemma-web/src/main/webapp/pages/bibRefAllExperiments.jsp @@ -17,7 +17,7 @@ To search for a paper or experiment and see more details, visit the - PubMed link + diff --git a/gemma-web/src/main/webapp/pages/bibRefList.jsp b/gemma-web/src/main/webapp/pages/bibRefList.jsp index 0e4a730539..d4e066aa2a 100644 --- a/gemma-web/src/main/webapp/pages/bibRefList.jsp +++ b/gemma-web/src/main/webapp/pages/bibRefList.jsp @@ -1,15 +1,14 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - +Bibliographic References + - Bibliographic References - diff --git a/gemma-web/src/main/webapp/pages/bibRefView.jsp b/gemma-web/src/main/webapp/pages/bibRefView.jsp index 4ca6da852f..bbf108b94d 100644 --- a/gemma-web/src/main/webapp/pages/bibRefView.jsp +++ b/gemma-web/src/main/webapp/pages/bibRefView.jsp @@ -1,54 +1,25 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> <%-- Shows the results of a search for pubmed references. --%> - - -Bibliographic Reference - - -

Bibliographic Reference record

- - - - -

- This reference was obtained from PubMed; it is not in the Gemma - system. You can add it to Gemma by clicking the button on the bottom - of the page, or do a ">new search. -

-
- - -

The entry is incomplete. You can attempt to complete it from - pubmed by clicking the 'add' button below.

-
-
"> - -
-
-
-
- -
+ +${fn:escapeXml(bibliographicReference.pubAccession.accession)} + from ${fn:escapeXml(bibliographicReference.pubAccession.externalDatabase.name)} + +
+Ext.namespace( 'Gemma' ); +Ext.onReady( function() { + Ext.QuickTips.init(); + var detailPanel = new Gemma.BibliographicReference.DetailsPanel( { + //loadBibRefId : ${bibliographicReference.id} + //height: 400, + //width: 400, + renderTo : 'detailPanel' + } ); + + detailPanel.loadFromId( ${bibliographicReference.id} ); +} ); + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/bioAssay.detail.jsp b/gemma-web/src/main/webapp/pages/bioAssay.detail.jsp index c00b37e60f..3552199d3a 100644 --- a/gemma-web/src/main/webapp/pages/bioAssay.detail.jsp +++ b/gemma-web/src/main/webapp/pages/bioAssay.detail.jsp @@ -1,45 +1,153 @@ -<%@ include file="/common/taglibs.jsp"%> - - -<fmt:message key="bioAssay.details" /> - -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ${bioAssay.name}
- ${bioAssay.description}
Sample${bioAssay.sample.name}
Platform${bioAssay.arrayDesign.shortName}  - ${bioAssay.arrayDesign.name}
Original platform${bioAssay.originalPlatform.shortName}  - ${bioAssay.originalPlatform.name}
+<%@ include file="/common/taglibs.jsp" %> + +${fn:escapeXml(bioAssay.name)} + + + + + + + + + + +
+

${fn:escapeXml(bioAssay.name)}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
: + + + + + + (inherited) + + + No external identifier available + + +
: + + +
${fn:escapeXml(fn:trim(bioAssay.description))}
+
+ +
${fn:escapeXml(fn:trim(singleParent.description))} (inherited)
+
+ No description available +
+
Experiments used in: + + , + + ${fn:escapeXml(bioAssaySet.name)} + + +
Sample: + + ${fn:escapeXml(bioAssay.sampleUsed.name)} + +
Platform: + + ${fn:escapeXml(bioAssay.arrayDesignUsed.shortName)} + + - ${fn:escapeXml(bioAssay.arrayDesignUsed.name)} +
Original Platform: + ${bioAssay.originalPlatform.shortName} + - ${fn:escapeXml(bioAssay.originalPlatform.name)} +
Original Platform: + ${singleParent.originalPlatform.shortName} + - ${fn:escapeXml(singleParent.originalPlatform.name)} (inherited) +
+ + + +
+ +

Hierarchy for ${fn:escapeXml(dimension.name)}

+ + <%-- Having more than one parent would be very unusual, but the data model allows it --%> +

${parents.size() > 1 ? 'Parents' : 'Parent'}:

+
    + +
  • + ${fn:escapeXml(parent.name)} + (via ${fn:escapeXml(parent.sampleUsed.name)}) +
  • +
    +
+
+ +

Siblings:

+
    + +
  • + ${fn:escapeXml(sibling.name)} + (via ${fn:escapeXml(sibling.sampleUsed.name)}) +
  • +
    +
+
+ +

Children:

+
    + +
  • + ${fn:escapeXml(child.name)} + (via ${fn:escapeXml(child.sampleUsed.name)}) +
  • +
    +
+
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/bioAssaySet.jsp b/gemma-web/src/main/webapp/pages/bioAssaySet.jsp new file mode 100644 index 0000000000..2273e0d77a --- /dev/null +++ b/gemma-web/src/main/webapp/pages/bioAssaySet.jsp @@ -0,0 +1,15 @@ +<%@ include file="/common/taglibs.jsp" %> + +Assays for ${bioAssaySet.name} + +

Assays for ${bioAssaySet.name}

+ + + + + + + +
+ ${bioAssay.name} +
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/bioAssays.jsp b/gemma-web/src/main/webapp/pages/bioAssays.jsp deleted file mode 100644 index 3044dd0988..0000000000 --- a/gemma-web/src/main/webapp/pages/bioAssays.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ include file="/common/taglibs.jsp" %> - - <fmt:message key="bioAssays.title"/> - - - - - - - -
- -

- - for ${expressionExperiment.shortName} -

-

- View the Experimental - design -

- - - - - - - - -
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/bioMaterial.detail.jsp b/gemma-web/src/main/webapp/pages/bioMaterial.detail.jsp index cd0bab8fdd..8f89e7916c 100644 --- a/gemma-web/src/main/webapp/pages/bioMaterial.detail.jsp +++ b/gemma-web/src/main/webapp/pages/bioMaterial.detail.jsp @@ -1,152 +1,214 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> -<fmt:message key="bioMaterial.details" /> - - - - - - +${fn:escapeXml(bioMaterial.name)} + + + + + + + + Description not available + +
-

- BioMaterial: ${bioMaterial.name} from - ${expressionExperiment.shortName} -

- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - Description not available - -
- - - - - - - - Taxon not available - -
- - - - - - - - No external identifier - -
- Assays used in - - -
- -
- -

- -

- - - - - - -
- -

- -

-
- -
- -

Annotations

-
- - - - -
- - - - -
- -
- -
- -
\ No newline at end of file +

${fn:escapeXml(bioMaterial.name)}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
: + + +
${fn:escapeXml(fn:trim(bioMaterial.description))}
+
+ +
${fn:escapeXml(fn:trim(bioMaterial.sourceBioMaterial.description))} (inherited)
+
+ Description not available +
+
: + + + ${bioMaterial.sourceTaxon.scientificName} + + Taxon not available + +
: + + + + + + (inherited) + + No external identifier available + +
Assays used in: +
    + +
  • + ${fn:escapeXml(assay.name)} +
  • +
    +
+
Experiments used in + + + ${fn:escapeXml(ba2bm.value.shortName)} + + (via ${fn:escapeXml(e.key.name)} → ${fn:escapeXml(ba2bm.key.name)}) + + + +
+ + + +
+ +

Hierarchy for ${fn:escapeXml(dimension.name)}

+
    +
  • + +

    Parent:

    + ${fn:escapeXml(parent.name)} +
    +
    + +

    Siblings:

    +
      + +
    • + ${fn:escapeXml(sibling.name)} +
    • +
      +
    +
    + +

    Children:

    +
      + +
    • + ${fn:escapeXml(child.name)} +
    • +
      +
    +
    +
  • +
+
+ + +
+

+ + + + + + + + + + + + + + + +
NameDescriptionOrder Applied
${fn:escapeXml(treatment.name)}${fn:escapeXml(fn:trim(treatment.description))}${treatment.orderApplied}
+
+ +
+ +

+ +

+
+ +
+ +

Annotations

+
+ + + + + +
+ + + +
+ +
+ +
+ +
+ + diff --git a/gemma-web/src/main/webapp/pages/characteristics.jsp b/gemma-web/src/main/webapp/pages/characteristics.jsp index b3a25e4904..f635376e00 100644 --- a/gemma-web/src/main/webapp/pages/characteristics.jsp +++ b/gemma-web/src/main/webapp/pages/characteristics.jsp @@ -1,19 +1,13 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - <fmt:message key="characteristicBrowser.title" /> - - - - +<fmt:message key="characteristicBrowser.title" /> + -

- -

- -
-
- - +
+

+
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/compositeSequence.detail.jsp b/gemma-web/src/main/webapp/pages/compositeSequence.detail.jsp index 4744eff37f..68b5f26b69 100644 --- a/gemma-web/src/main/webapp/pages/compositeSequence.detail.jsp +++ b/gemma-web/src/main/webapp/pages/compositeSequence.detail.jsp @@ -1,93 +1,60 @@ -<%@ include file="/common/taglibs.jsp" %> - - - <fmt:message key="compositeSequence.title"/> ${ compositeSequence.name} - - <%-- deprecated. We should replace this with something tidier --%> - - -

- - : ${ compositeSequence.name} on - - ${compositeSequence.arrayDesign.shortName} - - ${ compositeSequence.arrayDesign.name} - + ${fn:escapeXml(compositeSequence.name)} on + ${compositeSequence.arrayDesign.shortName}

- + - + - + - + - + - + - + - + @@ -196,6 +158,30 @@

Alignment information

- - + +<%-- deprecated. We should replace this with something tidier --%> + diff --git a/gemma-web/src/main/webapp/pages/contactUs.jsp b/gemma-web/src/main/webapp/pages/contactUs.jsp index f35bd91fe1..5602d05c00 100644 --- a/gemma-web/src/main/webapp/pages/contactUs.jsp +++ b/gemma-web/src/main/webapp/pages/contactUs.jsp @@ -1,33 +1,26 @@ - -<%-- Decorator for the home page --%> - - -<%-- Include common set of tag library declarations for each layout --%> -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> +Contact Us - -
-
-

- Contacting us -

-

- For feature requests and bug reports, send us an email - here. -

-

- Please also keep an eye out for the feedback button-tab on the left - of some pages in Gemma. It looks like - this + +

+
+

+ Contacting us +

+

+ For feature requests and bug reports, send us an email + here. +

+

+ Please also keep an eye out for the feedback button-tab on the left + of some pages in Gemma. It looks like + this
-
and is an easy way to give us in-context feedback! -

+ and is an easy way to give us in-context feedback! +

-
-
- - +
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/dataUpload.jsp b/gemma-web/src/main/webapp/pages/dataUpload.jsp index be55671c7e..7764a29c7d 100644 --- a/gemma-web/src/main/webapp/pages/dataUpload.jsp +++ b/gemma-web/src/main/webapp/pages/dataUpload.jsp @@ -1,32 +1,34 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> +Upload Expression Data + - Expression data upload - - - - - - + + + - -
-
-
-
+
+

Upload Expression Data

+ + +
+
+
+
- - -

- Sorry, to upload data you must - login or - register. -

-
+ + +

+ Sorry, to upload data you must + login or + register. +

+
+
diff --git a/gemma-web/src/main/webapp/pages/error/403.jsp b/gemma-web/src/main/webapp/pages/error/403.jsp index 303c221631..0a783e0b4b 100644 --- a/gemma-web/src/main/webapp/pages/error/403.jsp +++ b/gemma-web/src/main/webapp/pages/error/403.jsp @@ -1,26 +1,24 @@ <%@ include file="/common/taglibs.jsp" %> -<fmt:message key="403.title"/> +<fmt:message key="403.title" /> - - - +
-

+

- +

diff --git a/gemma-web/src/main/webapp/pages/error/404.jsp b/gemma-web/src/main/webapp/pages/error/404.jsp index 3101a1311b..88282178cc 100644 --- a/gemma-web/src/main/webapp/pages/error/404.jsp +++ b/gemma-web/src/main/webapp/pages/error/404.jsp @@ -1,13 +1,11 @@ <%@ include file="/common/taglibs.jsp" %> -<fmt:message key="404.title"/> +<fmt:message key="404.title" /> - - - +
-

+

diff --git a/gemma-web/src/main/webapp/pages/experimentalDesign.detail.jsp b/gemma-web/src/main/webapp/pages/experimentalDesign.detail.jsp index 21b0b97253..f0f59efe2d 100644 --- a/gemma-web/src/main/webapp/pages/experimentalDesign.detail.jsp +++ b/gemma-web/src/main/webapp/pages/experimentalDesign.detail.jsp @@ -1,175 +1,168 @@ -<%@ include file="/common/taglibs.jsp"%> - - +<%@ include file="/common/taglibs.jsp" %> -${expressionExperiment.shortName} | <fmt:message key="experimentalDesign.details" /> - - - - + + <fmt:message key="experimentalDesign.details" /> + for ${fn:escapeXml(expressionExperiment.shortName)} - ${fn:escapeXml(expressionExperiment.name)} + - - - + value="${expressionExperiment.id}" /> + + value="${experimentalDesign.id}" /> + value="${currentUserCanEdit ? 'true' : ''}" />

-
-

- - for - - -

- - - - This experiment does not have any experimental - design details filled in. - - -

- Download design File: - Click - to start download - - -

- -
-
- -
- -
- : - - : + title="Description for the probe, usually provided by the manufacturer. It might not match the sequence annotation!"> - ${compositeSequence.description} - No description available + + ${fn:escapeXml(compositeSequence.description)} + + No description available
- Taxon : - Taxon: - + ${compositeSequence.biologicalCharacteristic.taxon.commonName} - [Taxon missing] + No taxon available
- Sequence Type : - Sequence type: + title="The type of this sequence as recorded in our system"> @@ -101,91 +68,86 @@ - [Not available] + No sequence type available
- Sequence name : - Sequence name: + title='Name of the sequence in our system.'> - ${ compositeSequence.biologicalCharacteristic.name} - No name available + + ${fn:escapeXml(compositeSequence.biologicalCharacteristic.name)} + + + No sequence name available +
- Sequence description : - Sequence description: + title='Description of the sequence in our system.'> - - ${ compositeSequence.biologicalCharacteristic.description} + + ${fn:escapeXml(compositeSequence.biologicalCharacteristic.description)} - No description available + + No sequence description available +
- Sequence accession : - Sequence accession: + title='External accession for this sequence, if known'> - ${ compositeSequence.biologicalCharacteristic.sequenceDatabaseEntry.accession} - No accession + ${compositeSequence.biologicalCharacteristic.sequenceDatabaseEntry.accession} + + No accession available
- Sequence : - + title='Sequence, if known'> - - No sequence + + No sequence available
- Sequence length : - Sequence length: - + ${fn:length(compositeSequence.biologicalCharacteristic.sequence)} - No sequence available + No sequence available
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - (Name not available) - -
- - - - - - - (Description not available) - -
- - - - - - - (Database entry not available) - -
- - - - - - - (Primary publication not available) - -
-
-
+

+ + for + ${fn:escapeXml(expressionExperiment.shortName)} + - ${fn:escapeXml(expressionExperiment.name)} +

+ + + + This experiment does not have any experimental + design details filled in. + + +

+ + Download design file + + +

+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + (Name not available) + +
+ + + + +
${fn:escapeXml(fn:trim(expressionExperiment.description))}
+
+ Description not available +
+
+ + + + + + + (Database entry not available) + +
+ + + + + + + (Primary publication not available) + +
+ + + +
+

+ Use the form below to populate the experimental design details. + Alternatively you can + upload + a design description file. Instructions are + here + . If you want to use the upload method, you can get a blank + template + file + to get started. +

+
+
+
+ + + +

This experimental design needs attention, check in the tables below for more details.

+
+ +

+ Here's another experimental design that needs attention: + ${randomExperimentalDesignThatNeedsAttentionShortName} +

+
+
+ + + + <%-- This form element is needed for the checkboxes in the factor value panel --%> +
+
+
+
+ +
+ +
+ +
- - -
-

- Use the form below to populate the experimental design details. - Alternatively you can - upload - a design description file. Instructions are - here - . If you want to use the upload method, you can get a blank - template - file - to get started. -

-
-
-
- - - -

This experimental design needs attention, check in the tables below for more details.

-
- -

- Here's another experimental design that needs attention: - ${randomExperimentalDesignThatNeedsAttentionShortName} -

-
-
- - - - <%-- This form element is needed for the checkboxes in the factor value panel --%> -
-
-
-
- -
- -
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/expressionExperiment.bioAssays.jsp b/gemma-web/src/main/webapp/pages/expressionExperiment.bioAssays.jsp new file mode 100644 index 0000000000..9aba3e233c --- /dev/null +++ b/gemma-web/src/main/webapp/pages/expressionExperiment.bioAssays.jsp @@ -0,0 +1,102 @@ +<%@ include file="/common/taglibs.jsp" %> + + + + <fmt:message key="bioAssays.title" /> from ${expressionExperiment.shortName} + - ${fn:escapeXml(expressionExperiment.name)} + <c:if test="${platform != null}"> + in ${platform.shortName} - ${fn:escapeXml(platform.name)} + </c:if> + + + + + +
+

+ + from + + ${fn:escapeXml(expressionExperiment.shortName)} + + - ${fn:escapeXml(expressionExperiment.name)} + + in ${fn:escapeXml(platform.shortName)} + - ${fn:escapeXml(platform.name)} + +

+ +

+ + Show all assays + +

+
+

+ + View the experimental design + +

+ + + + + + + + + + + + + +
NameDescription
+ + ${fn:escapeXml(bioAssay.name)} + + + + + ${fn:escapeXml(bioAssay.description)} + + + No description available + + +
+
+ + + + + + +
+
diff --git a/gemma-web/src/main/webapp/pages/expressionExperiment.bioMaterials.jsp b/gemma-web/src/main/webapp/pages/expressionExperiment.bioMaterials.jsp new file mode 100644 index 0000000000..897d1bab3a --- /dev/null +++ b/gemma-web/src/main/webapp/pages/expressionExperiment.bioMaterials.jsp @@ -0,0 +1,48 @@ +<%@ include file="/common/taglibs.jsp" %> + + +Biomaterials from ${fn:escapeXml(expressionExperiment.shortName)} - ${fn:escapeXml(expressionExperiment.name)} + + + + +
+

+ Biomaterials from + ${fn:escapeXml(expressionExperiment.shortName)} + - ${fn:escapeXml(expressionExperiment.name)} +

+ +

+ + View the experimental design + +

+ + + + + + + + + + + + +
NameDescription
+ + ${fn:escapeXml(bioMaterial.name)} + + + + +
${fn:escapeXml(fn:trim(bioMaterial.description))}
+
+ + No description available + +
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/expressionExperiment.detail.jsp b/gemma-web/src/main/webapp/pages/expressionExperiment.detail.jsp index 55c7ebcd02..eda291de97 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperiment.detail.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperiment.detail.jsp @@ -1,36 +1,38 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> -${expressionExperiment.shortName} Details - - - +${fn:escapeXml(expressionExperiment.shortName)} - ${fn:escapeXml(expressionExperiment.name)} + + + - - - - - - - + + + +
-
+
+ + diff --git a/gemma-web/src/main/webapp/pages/expressionExperiment.edit.jsp b/gemma-web/src/main/webapp/pages/expressionExperiment.edit.jsp index 3ebeed5ea3..aa42a595c8 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperiment.edit.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperiment.edit.jsp @@ -1,149 +1,134 @@ <%@ include file="/common/taglibs.jsp" %> + - - +Edit ${fn:escapeXml(expressionExperiment.shortName)} - ${fn:escapeXml(expressionExperiment.name)} + + + - - - -
- - - -
-
-
-
-
- -<fmt:message key="expressionExperiment.title"/> ${expressionExperiment.shortName} +<fmt:message key="expressionExperiment.title" /> ${expressionExperiment.shortName}
-
"> +

- Editing: ">${expressionExperiment.shortName} + Editing: + "> + ${expressionExperiment.shortName} +

+

Quantitation Types

- - - No quantitation types! Data may be corrupted (likely data import error) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescPref?Recom?Batch?Ratio?Bkg?BkgSub?Norm?TypeSpec.TypeScaleRep.
- " - value=""/> - - " - value=""/> - - checked="checked" /> - "> - - checked="checked" /> - "> - - checked="checked" /> - "> - - checked="checked" /> - "> - - checked="checked" /> - "> - - checked="checked" /> - "> - - checked="checked" /> - "> - - - ${status.errorMessage} - - - ${status.errorMessage} - - - ${status.errorMessage} - - - ${status.errorMessage} -
-
-
+ + +

No quantitation types! Data may be corrupted (likely data import error)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPreferredRecomputedBatch Corrected?RatioBackgroundBackground SubtractedNormalizedGeneral TypeTypeScaleRepresentation
+ + +

+
+ +

Unused quantitation types

+

These quantitation types are not associated to any vectors.

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Biomaterials and Assays

+ + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/expressionExperiment.subSets.jsp b/gemma-web/src/main/webapp/pages/expressionExperiment.subSets.jsp new file mode 100644 index 0000000000..751a21ad62 --- /dev/null +++ b/gemma-web/src/main/webapp/pages/expressionExperiment.subSets.jsp @@ -0,0 +1,85 @@ +<%@ include file="/common/taglibs.jsp" %> + + +Subsets of ${expressionExperiment.shortName} - ${expressionExperiment.name} + + + + +
+

+ Subsets of ${expressionExperiment.shortName} + - ${expressionExperiment.name} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Description: +
${fn:escapeXml(fn:trim(expressionExperiment.description))}
+
Accession:
Publication:
+
+
Dimension:${fn:escapeXml(e.key.name)} (${e.key.bioAssays.size()} samples)
Quantitation types: + +
Subsets: +
    + +
  • + ${fn:escapeXml(subSet.name)} +
  • +
    +
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/expressionExperimentLinkSummary.jsp b/gemma-web/src/main/webapp/pages/expressionExperimentLinkSummary.jsp index d5bc6a7a95..3141b898c0 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperimentLinkSummary.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperimentLinkSummary.jsp @@ -1,28 +1,24 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - - Dataset manager - - +Dataset manager - - + diff --git a/gemma-web/src/main/webapp/pages/expressionExperimentSet.detail.jsp b/gemma-web/src/main/webapp/pages/expressionExperimentSet.detail.jsp index e1a3d342d2..36da980a50 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperimentSet.detail.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperimentSet.detail.jsp @@ -1,38 +1,37 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - ${eeSetName} Details - +${fn:escapeXml(eeSet.name)} + - - - - - + + - +
-
+
+ + diff --git a/gemma-web/src/main/webapp/pages/expressionExperimentSetManager.jsp b/gemma-web/src/main/webapp/pages/expressionExperimentSetManager.jsp index 228ae87dd0..0c60b89bea 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperimentSetManager.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperimentSetManager.jsp @@ -1,43 +1,40 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> Dataset Group Manager - - - - - + + - - -

Sorry, you must be logged in to use this tool.

+ + +

Sorry, you must be logged in to use this tool.

-
- - - - +
+ + + +
diff --git a/gemma-web/src/main/webapp/pages/expressionExperimentSubSet.detail.jsp b/gemma-web/src/main/webapp/pages/expressionExperimentSubSet.detail.jsp new file mode 100644 index 0000000000..8add14272e --- /dev/null +++ b/gemma-web/src/main/webapp/pages/expressionExperimentSubSet.detail.jsp @@ -0,0 +1,167 @@ +<%@ include file="/common/taglibs.jsp" %> + + + + +${subSet.name} + + + + + + + + + + + +
+

+ ${subSet.name} + (subset of ${subSet.sourceExperiment.shortName}, + see + all subsets) +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Annotations: + + + ${annotation.termName}, + +
Description: + + +
${fn:escapeXml(fn:trim(subSet.description))}
+
+ +
${fn:escapeXml(fn:trim(subSet.sourceExperiment.description))} (inherited)
+
+ + No description available + +
+
Accession: + + + + + +  (inherited) + + No accession available + +
Publication: + + + + + +  (inherited) + + No publication/i> + +
Dimension: + + + + ${fn:escapeXml(pd.name)} (${bioAssays.size()}/${pd.bioAssays.size()} samples) + + + ${fn:escapeXml(pd.name)} + (${bioAssays.size()}/${pd.bioAssays.size()} samples) + + + +
Other subsets: + +
+ +
+

Assays

+ + + + + + + + + + + + + + + +
NameDescription
+ ${ba.name} + + + + ${fn:escapeXml(ba.description)} + + No description available + +
+
+ +
+

Annotations

+ + + + + + + + + + + + + + + + + + + +
CategoryValue
 (inherited)
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/expressionExperimentsWithQC.jsp b/gemma-web/src/main/webapp/pages/expressionExperimentsWithQC.jsp index 82b8c6ac42..86b335b0fa 100644 --- a/gemma-web/src/main/webapp/pages/expressionExperimentsWithQC.jsp +++ b/gemma-web/src/main/webapp/pages/expressionExperimentsWithQC.jsp @@ -1,31 +1,27 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> Expression Experiments with QC Issues - - - - + + - + new Gemma.GemmaViewPort( { + centerPanelConfig : new Gemma.ExpressionExperimentQCGrid( { + header : true, + experimentNameAsLink : true + } ) + } ); -
- - \ No newline at end of file +} ); + diff --git a/gemma-web/src/main/webapp/pages/gene.detail.jsp b/gemma-web/src/main/webapp/pages/gene.detail.jsp index e61962bd16..1de543d0f8 100644 --- a/gemma-web/src/main/webapp/pages/gene.detail.jsp +++ b/gemma-web/src/main/webapp/pages/gene.detail.jsp @@ -1,45 +1,40 @@ -<%@ include file="/common/taglibs.jsp"%> - - - - +<%@ include file="/common/taglibs.jsp" %> + -<c:if test="${not empty geneOfficialSymbol}"> - ${geneOfficialSymbol} - </c:if> <fmt:message key="gene.details" /> + +${fn:escapeXml(gene.name)} - ${fn:escapeXml(gene.officialName)} + - - - - - - - - + + + + + + -
+
- \ No newline at end of file + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/geneGroupManager.jsp b/gemma-web/src/main/webapp/pages/geneGroupManager.jsp index 9388ad8380..9643bb2bc1 100644 --- a/gemma-web/src/main/webapp/pages/geneGroupManager.jsp +++ b/gemma-web/src/main/webapp/pages/geneGroupManager.jsp @@ -2,60 +2,52 @@ - Manage Gene Groups - - +Manage Gene Groups + - - - + + -

- Manage Gene Groups -

+

Manage Gene Groups

- - -

- Sorry, you must be logged in to use this tool. -

-
+ + +

+ Sorry, you must be logged in to use this tool. +

+
- - -

- You can create a group of genes to be used in searches and analyses. - This interface allows you to create gene groups, modify them, and - control who else can see them. -

+ } ); + +

+ You can create a group of genes to be used in searches and analyses. + This interface allows you to create gene groups, modify them, and + control who else can see them. +

-
-
-
- -
- - +
+
+ +
diff --git a/gemma-web/src/main/webapp/pages/geneSet.detail.jsp b/gemma-web/src/main/webapp/pages/geneSet.detail.jsp index 3217207432..0c48cf2fce 100644 --- a/gemma-web/src/main/webapp/pages/geneSet.detail.jsp +++ b/gemma-web/src/main/webapp/pages/geneSet.detail.jsp @@ -1,39 +1,40 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> + - ${geneSetName} Details - +${fn:escapeXml(geneSet.name)} Details + - - - - - + + - +
-
+
+ + + diff --git a/gemma-web/src/main/webapp/pages/generalSearch.jsp b/gemma-web/src/main/webapp/pages/generalSearch.jsp index 852a933ea4..e9e7d456dd 100644 --- a/gemma-web/src/main/webapp/pages/generalSearch.jsp +++ b/gemma-web/src/main/webapp/pages/generalSearch.jsp @@ -1,27 +1,23 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> - <fmt:message key="generalSearch.title" /> - - - - - + +
-
+
+ diff --git a/gemma-web/src/main/webapp/pages/home.jsp b/gemma-web/src/main/webapp/pages/home.jsp index a9052289c5..c7540068ae 100755 --- a/gemma-web/src/main/webapp/pages/home.jsp +++ b/gemma-web/src/main/webapp/pages/home.jsp @@ -3,32 +3,9 @@ <%@ include file="/common/taglibs.jsp" %> Home - - -<%-- --%> - +<%-- --%> - - <%-- jshowoff.css is included in the bundle --%> @@ -60,20 +37,21 @@ Ext.onReady( function() { width="340" height="240" alt="A pie chart representing proportion of taxa among Gemma datasets." />--%>
- Example of a dataset view overlaid with a heatmap of top differentially expressed probes. - <%-- An overlay of a human on top of its section of the pie chart. - An overlay of a mouse on top of its section of the pie chart.--%> - - <%--
--%> - + <%-- + + + +
+ --%>
@@ -104,12 +82,12 @@ $.getJSON( '${pageContext.request.contextPath}' + '/rest/v2/datasets/count', fun

- Bioconductor Logo - PyPi Logo @@ -122,8 +100,8 @@ $.getJSON( '${pageContext.request.contextPath}' + '/rest/v2/datasets/count', fun and more features and improvements are planned, but we'd love to hear your feedback.

- A screenshot of the new Gemma Browser.
@@ -152,7 +130,7 @@ $.getJSON( '${pageContext.request.contextPath}' + '/rest/v2/datasets/count', fun
Copyright © 2007-2024
@@ -161,4 +139,24 @@ $.getJSON( '${pageContext.request.contextPath}' + '/rest/v2/datasets/count', fun src="https://i.creativecommons.org/l/by-nc/4.0/80x15.png" width="80" height="15" />
-
\ No newline at end of file + + + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/invalidGeoAccession.jsp b/gemma-web/src/main/webapp/pages/invalidGeoAccession.jsp deleted file mode 100644 index 3872bfc31b..0000000000 --- a/gemma-web/src/main/webapp/pages/invalidGeoAccession.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ include file="/common/taglibs.jsp"%> -<%@ page language="java" isErrorPage="true"%> - - -<%-- This is not being used. --%> - - Invalid GEO accession - - - - Invalid GEO accession - - - « Back - - - -

- Either that accession does not exist in GEO, or if you entered a GDS number, Gemma could not locate a matching series - (GSE) on the GEO web site. Please check the - GEO web site to make sure you selected a valid accession. -

- diff --git a/gemma-web/src/main/webapp/pages/manageGroups.jsp b/gemma-web/src/main/webapp/pages/manageGroups.jsp index a020f82d2d..0107f3fcbd 100644 --- a/gemma-web/src/main/webapp/pages/manageGroups.jsp +++ b/gemma-web/src/main/webapp/pages/manageGroups.jsp @@ -1,38 +1,27 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - Manage groups - - +Manage groups + - - - -

- Manage groups -

- -

- A 'Group' is a set of Gemma users who have a common set of permissions. This page allows you to see what Groups you - belong to, create groups, and change who is in groups you control. -

- -

- For additional controls on which groups can view or edit your data sets, visit the - ">Data Manager. If - you want to manage Gene Groups go to the - ">Gene Group Manager. To manage Expression Dataset Groups go to - the - ">Dataset Group Manager. -

- -
-
- -
- - - - - \ No newline at end of file + + +

Manage groups

+ +

+ A 'Group' is a set of Gemma users who have a common set of permissions. This page allows you to see what Groups you + belong to, create groups, and change who is in groups you control. +

+ +

+ For additional controls on which groups can view or edit your data sets, visit the + ">Data Manager. If + you want to manage Gene Groups go to the + ">Gene Group Manager. To manage Expression Dataset Groups go to + the + ">Dataset Group Manager. +

+ +
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/metaAnalysisManager.jsp b/gemma-web/src/main/webapp/pages/metaAnalysisManager.jsp index 42ad896107..4edd9efcc7 100644 --- a/gemma-web/src/main/webapp/pages/metaAnalysisManager.jsp +++ b/gemma-web/src/main/webapp/pages/metaAnalysisManager.jsp @@ -1,27 +1,24 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> Meta-analysis Manager - - - + - - - <%-- The function fetchDiffExpressionData(analysisId) in eeDataFetch.js requires "messages" to be defined. --%>
+ + diff --git a/gemma-web/src/main/webapp/pages/metaheatmap.jsp b/gemma-web/src/main/webapp/pages/metaheatmap.jsp index 8c80990a8a..40b03e1d4f 100644 --- a/gemma-web/src/main/webapp/pages/metaheatmap.jsp +++ b/gemma-web/src/main/webapp/pages/metaheatmap.jsp @@ -1,59 +1,59 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - - - - - - +Meta-analysis Heatmap + + -Start a new search

-
\ No newline at end of file + +Start a new search

+
+ + diff --git a/gemma-web/src/main/webapp/pages/passwordHint.jsp b/gemma-web/src/main/webapp/pages/passwordHint.jsp index 54d176fd61..11b407696e 100644 --- a/gemma-web/src/main/webapp/pages/passwordHint.jsp +++ b/gemma-web/src/main/webapp/pages/passwordHint.jsp @@ -1,16 +1,8 @@ -<%-- -author: keshav - ---%> - -<%@ include file="/common/taglibs.jsp"%> - +<%-- author: keshav --%> +<%@ include file="/common/taglibs.jsp" %> Password reset - - + -
- diff --git a/gemma-web/src/main/webapp/pages/personForm.jsp b/gemma-web/src/main/webapp/pages/personForm.jsp index bd43291bfe..83f9039c28 100644 --- a/gemma-web/src/main/webapp/pages/personForm.jsp +++ b/gemma-web/src/main/webapp/pages/personForm.jsp @@ -1,98 +1,101 @@ -<%@ include file="/common/taglibs.jsp"%> -<fmt:message key="personDetail.title" /> - - -

- -

-
+<%@ include file="/common/taglibs.jsp" %> + +<fmt:message key="personDetail.title" /> + + +

- - - +
- -
+ + - - + - + + + - - + + - - + - + + + - + - + - - + - + + + - - - - - -
+ + - First Name - - - <%-- + + First Name + + + <%-- " id="" value="" /> --%> - " value="" /> - + " + value="" /> + - -
- -
+ + - Middle Name: - - - <%-- + + Middle Name: + + + <%-- " id="" value="" /> --%> - " value="" /> - + " + value="" /> + - -
- - + + - Last Name: - - - <%-- + + Last Name: + + + <%-- " id="" value="" /> --%> - " value="" /> - + " + value="" /> + - -
- " /> - " /> - " /> -
+ + + + + " /> + " /> + " /> + + +
diff --git a/gemma-web/src/main/webapp/pages/processProgress.jsp b/gemma-web/src/main/webapp/pages/processProgress.jsp index 035a9ba86f..54f0c0b7a8 100644 --- a/gemma-web/src/main/webapp/pages/processProgress.jsp +++ b/gemma-web/src/main/webapp/pages/processProgress.jsp @@ -1,29 +1,26 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> <%-- DEPRECATED, please use form-page-embedded ajaxified progress bar instead; see loadExpressionExperiment.js for some pointers. --%> -<fmt:message key="processProgress.title" /> - - + +<fmt:message key="processProgress.title" /> + -

- -

- +

- - - - - + diff --git a/gemma-web/src/main/webapp/pages/register.jsp b/gemma-web/src/main/webapp/pages/register.jsp index ffdc635996..b3c3f8b868 100644 --- a/gemma-web/src/main/webapp/pages/register.jsp +++ b/gemma-web/src/main/webapp/pages/register.jsp @@ -2,6 +2,5 @@ Registration - - + \ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/systemNotices.jsp b/gemma-web/src/main/webapp/pages/systemNotices.jsp index 152c127c9c..a0a25cceb9 100644 --- a/gemma-web/src/main/webapp/pages/systemNotices.jsp +++ b/gemma-web/src/main/webapp/pages/systemNotices.jsp @@ -1,26 +1,14 @@ -<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/taglibs.jsp" %> - System stats +System stats - -

- Compute grid status -

- -

- This page has information about the status of the Gemma compute grid. Hit 'refresh' in your browser to see updated - information. -

- - - -
-

- ${status} -

-
- - - +

Compute grid status

+

+ This page has information about the status of the Gemma compute grid. Hit 'refresh' in your browser to see updated + information. +

+
+

${status}

+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/taxa.jsp b/gemma-web/src/main/webapp/pages/taxa.jsp new file mode 100644 index 0000000000..eacfa27374 --- /dev/null +++ b/gemma-web/src/main/webapp/pages/taxa.jsp @@ -0,0 +1,15 @@ +<%@ include file="/common/taglibs.jsp" %> + +Taxa + + +
+

Taxa

+
    + +
  • + ${taxon.commonName} +
  • +
    +
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/taxon.detail.jsp b/gemma-web/src/main/webapp/pages/taxon.detail.jsp new file mode 100644 index 0000000000..049d65f350 --- /dev/null +++ b/gemma-web/src/main/webapp/pages/taxon.detail.jsp @@ -0,0 +1,27 @@ +<%@ include file="/common/taglibs.jsp" %> + + +${fn:escapeXml(taxon.commonName)} + + +
+

${fn:escapeXml(taxon.commonName)}

+ + + + + + + + + + + + + + + +
NCBI ID:${taxon.ncbiId}
Scientific name:${fn:escapeXml(taxon.scientificName)}
Number of experiments:${numberOfExperiments}
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/pages/userProfile.jsp b/gemma-web/src/main/webapp/pages/userProfile.jsp index cb92c1998d..7cd3f98c23 100644 --- a/gemma-web/src/main/webapp/pages/userProfile.jsp +++ b/gemma-web/src/main/webapp/pages/userProfile.jsp @@ -1,14 +1,15 @@ -<%@ include file="/common/taglibs.jsp"%> - +<%@ include file="/common/taglibs.jsp" %> - Edit your profile - - +Edit your profile + -

- Change your email address or password. You must enter your current password. -

-
-
+
+

User Profile

+

+ Change your email address or password. You must enter your current password. +

+
+
+
\ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/.sorting b/gemma-web/src/main/webapp/scripts/api/.sorting deleted file mode 100755 index 7b65e4e2d1..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/.sorting +++ /dev/null @@ -1,14 +0,0 @@ -dwrServices.js -Eventbus.js -valueObjectsInheritanceStructure.js -userHelpMessages.js -ext/ -util/ -search/ -security/ -entities/ -annotation/ -diff/ -coexpression/ -visualization/ - diff --git a/gemma-web/src/main/webapp/scripts/api/analysisSearch/AnalysisResultsSearchForm.js b/gemma-web/src/main/webapp/scripts/api/analysisSearch/AnalysisResultsSearchForm.js index bcfd7992da..d370853874 100755 --- a/gemma-web/src/main/webapp/scripts/api/analysisSearch/AnalysisResultsSearchForm.js +++ b/gemma-web/src/main/webapp/scripts/api/analysisSearch/AnalysisResultsSearchForm.js @@ -82,7 +82,7 @@ Gemma.AnalysisResultsSearchForm = Ext Ext.DomHelper.overwrite("analysis-results-search-form-messages", { tag: 'img', - src: ctxBasePath + '/images/icons/warning.png' + src: Gemma.CONTEXT_PATH + '/images/icons/warning.png' }); Ext.DomHelper.append("analysis-results-search-form-messages", { @@ -497,7 +497,7 @@ Gemma.AnalysisResultsSearchForm = Ext }, { xtype: 'button', width: 55, - icon: ctxBasePath + '/images/icons/arrow_refresh_small.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/arrow_refresh_small.png', style: 'margin-top: 8px', text: 'Reset', tooltip: 'Clear all selections and reset the taxon mode ', @@ -693,7 +693,7 @@ Gemma.AnalysisResultsSearchForm = Ext this.geneSearchAndPreviewPanel.add(this.geneSearchAndPreview); if (typeof Ext.getCmp('geneChooser' + (this.geneChooserIndex - 1) + 'Button') !== 'undefined') { Ext.getCmp('geneChooser' + (this.geneChooserIndex - 1) + 'Button').show().setIcon( - ctxBasePath + '/images/icons/delete.png').setTooltip('Remove this gene or group from your search') + Gemma.CONTEXT_PATH + '/images/icons/delete.png').setTooltip('Remove this gene or group from your search') .setHandler( this.removeGeneChooser.createDelegate(this, ['geneChooserPanel' + (this.geneChooserIndex - 1)], false)); diff --git a/gemma-web/src/main/webapp/scripts/api/analysisSearch/index.js b/gemma-web/src/main/webapp/scripts/api/analysisSearch/index.js new file mode 100644 index 0000000000..6eabc5e853 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/analysisSearch/index.js @@ -0,0 +1,5 @@ +import './AnalysesSearchUtils' +import './AnalysisResultsSearchExamples' +import './AnalysisResultsSearchForm' +import './AnalysisResultsSearchMethods' +import './SessionBoundSetRegistrationUtils' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/annotation/.sorting b/gemma-web/src/main/webapp/scripts/api/annotation/.sorting deleted file mode 100644 index f4de5b4add..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/annotation/.sorting +++ /dev/null @@ -1,3 +0,0 @@ - -CharacteristicCombo.js -CharcteristicBrowser.js diff --git a/gemma-web/src/main/webapp/scripts/api/annotation/AnnotationGrid.js b/gemma-web/src/main/webapp/scripts/api/annotation/AnnotationGrid.js index f5c1c7f06f..c2caaf5841 100755 --- a/gemma-web/src/main/webapp/scripts/api/annotation/AnnotationGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/annotation/AnnotationGrid.js @@ -87,7 +87,7 @@ Gemma.AnnotationDataView = Ext '', '', '', - '', + '', '{termName}', '', '', diff --git a/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js b/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js index 51d44f69a7..f94067595a 100755 --- a/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js +++ b/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js @@ -722,7 +722,7 @@ Gemma.FactorValueToolbar = Ext.extend( Ext.Toolbar, { } ); this.refreshButton = new Ext.Toolbar.Button( { - icon : ctxBasePath + '/images/icons/arrow_refresh_small.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/arrow_refresh_small.png', tooltip : 'Refresh the factor values', handler : function() { this.fireEvent( "refresh" ); diff --git a/gemma-web/src/main/webapp/scripts/api/annotation/index.js b/gemma-web/src/main/webapp/scripts/api/annotation/index.js new file mode 100644 index 0000000000..ff47f21c63 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/annotation/index.js @@ -0,0 +1,11 @@ +import './AnnotationGrid' +import './AnnotationToolBar' +import './BioMaterialEditor' +import './CategoryCombo' +import './CharacteristicCombo' +import './EvidenceCodeCombo' +import './ExperimentalFactorCombo' +import './ExperimentalFactorEditor' +import './FactorValueCombo' +import './FactorValueEditor' +import './RelationCombo' diff --git a/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGrid.js b/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGrid.js index b6d9aca7a2..8661418c78 100755 --- a/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGrid.js @@ -148,7 +148,7 @@ Gemma.CoexpressionGrid = Ext xtype: 'label', html: '  ', + + '" src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/>', height: 15 }, { xtype: 'tbspacer' @@ -203,7 +203,7 @@ Gemma.CoexpressionGrid = Ext itemId: 'bbarStatus' }, '->', { xtype: 'button', - icon: ctxBasePath + "/images/icons/cross.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/cross.png", itemId: 'bbarClearButton', handler: function () { this.hideBottomToolbar(); @@ -393,7 +393,7 @@ Gemma.CoexpressionGrid = Ext Ext.DomHelper.applyStyles("coexpression-msg", "height: 2.2em"); Ext.DomHelper.overwrite("coexpression-msg", [{ tag: 'img', - src: ctxBasePath + '/images/icons/information.png' + src: Gemma.CONTEXT_PATH + '/images/icons/information.png' }, { tag: 'span', html: "  " + errorMessage @@ -561,7 +561,7 @@ Gemma.CoexpressionGrid = Ext * */ geneTemplate: new Ext.Template( - "{officialSymbol} {officialName}"), + "{officialSymbol} {officialName}"), /** * @@ -584,7 +584,7 @@ Gemma.CoexpressionGrid = Ext }, visStyler: function (value, metadata, record, row, col, ds) { - return ""; + return ""; }, /** @@ -617,7 +617,7 @@ Gemma.CoexpressionGrid = Ext experiments: activeExperiments, queryGene: queryGene, foundGene: foundGene, - downloadLink: String.format(ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&g={1},{2}", activeExperiments + downloadLink: String.format(Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&g={1},{2}", activeExperiments .join(','), queryGene.id, foundGene.id), title: "Coexpression for: " + queryGene.name + " + " + foundGene.name }); diff --git a/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGridLight.js b/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGridLight.js index b302ce0d4a..e39e7d72a7 100755 --- a/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGridLight.js +++ b/gemma-web/src/main/webapp/scripts/api/coexpression/CoexpressionGridLight.js @@ -133,7 +133,7 @@ Gemma.CoexpressionGridLight = Ext.extend(Ext.grid.GridPanel, { Ext.DomHelper.applyStyles("coexpression-msg", "height: 2.2em"); Ext.DomHelper.overwrite("coexpression-msg", [{ tag: 'img', - src: ctxBasePath + '/images/icons/information.png' + src: Gemma.CONTEXT_PATH + '/images/icons/information.png' }, { tag: 'span', html: "  " + errorMessage @@ -264,10 +264,10 @@ Gemma.CoexpressionGridLight = Ext.extend(Ext.grid.GridPanel, { }, geneTemplate: new Ext.Template("{officialSymbol} {officialName}"), + + "target='_blank' href='" + Gemma.CONTEXT_PATH + "/gene/showGene.html?id={id}'>{officialSymbol} {officialName}"), visStyler: function (value, metadata, record, row, col, ds) { - return ""; + return ""; }, /** @@ -298,7 +298,7 @@ Gemma.CoexpressionGridLight = Ext.extend(Ext.grid.GridPanel, { experiments: activeExperiments, queryGene: queryGene, foundGene: foundGene, - downloadLink: String.format(ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&g={1},{2}", activeExperiments + downloadLink: String.format(Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&g={1},{2}", activeExperiments .join(','), queryGene.id, foundGene.id), title: "Coexpression for: " + queryGene.name + " + " + foundGene.name }); diff --git a/gemma-web/src/main/webapp/scripts/api/coexpression/index.js b/gemma-web/src/main/webapp/scripts/api/coexpression/index.js new file mode 100644 index 0000000000..a9726a4d51 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/coexpression/index.js @@ -0,0 +1,7 @@ +import './CoexpressionDisplaySettings' +import './CoexpressionDownloadWindow' +import './CoexpressionGrid' +import './CoexpressionGridLight' +import './CoexpressionGridRecord' +import './CoexpressionSearchData' +import './CoexVOUtil' diff --git a/gemma-web/src/main/webapp/scripts/api/diff/DiffExSearchAndVisualize.js b/gemma-web/src/main/webapp/scripts/api/diff/DiffExSearchAndVisualize.js index b122529a1f..6c3a5989d5 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/DiffExSearchAndVisualize.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/DiffExSearchAndVisualize.js @@ -62,7 +62,7 @@ Gemma.DiffExSearchAndVisualize = Ext .overwrite( this.applyToParam, { - html: ' Sorry, there was an error performing your search, data was null.' + html: ' Sorry, there was an error performing your search, data was null.' }); } } @@ -71,7 +71,7 @@ Gemma.DiffExSearchAndVisualize = Ext else if (data.conditions.length === 0) { if (this.applyToParam) { Ext.DomHelper.overwrite(this.applyToParam, { - html: 'No data returned for your search.' + html: 'No data returned for your search.' }); } @@ -104,7 +104,7 @@ Gemma.DiffExSearchAndVisualize = Ext _handleFail: function (error) { this.fireEvent("visualizationLoaded"); Ext.DomHelper.overwrite(this.applyToParam, { - html: ' Sorry, there was an error performing your search: ' + html: ' Sorry, there was an error performing your search: ' + error }); }, @@ -131,7 +131,7 @@ Gemma.DiffExSearchAndVisualize = Ext DifferentialExpressionSearchController.scheduleDiffExpSearchTask(this.taxonId, this.experimentGroupValueObject, this.geneGroupValueObject, { callback: this._initBackgroundTaskProgress.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, diff --git a/gemma-web/src/main/webapp/scripts/api/diff/ProbeLevelDiffExGrid.js b/gemma-web/src/main/webapp/scripts/api/diff/ProbeLevelDiffExGrid.js index e8260cf760..36579f49ff 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/ProbeLevelDiffExGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/ProbeLevelDiffExGrid.js @@ -205,7 +205,7 @@ Gemma.ProbeLevelDiffExGrid = Ext Ext.DomHelper.applyStyles("diffExpression-msg", "height: 2.2em"); Ext.DomHelper.overwrite("diffExpression-msg", [{ tag: 'img', - src: ctxBasePath + '/images/icons/information.png' + src: Gemma.CONTEXT_PATH + '/images/icons/information.png' }, { tag: 'span', html: "  " + errorMessage @@ -265,7 +265,7 @@ Gemma.ProbeLevelDiffExGrid = Ext }, visStyler: function (value, metadata, record, row, col, ds) { - return ""; + return ""; }, rowClickHandler: function (grid, rowIndex, columnIndex, e) { @@ -298,7 +298,7 @@ Gemma.ProbeLevelDiffExGrid = Ext cascadeOnFirstShow: true, title: title, thumbnails: false, - downloadLink: String.format(ctxBasePath + '/dedv/downloadDEDV.html?ee={0}&g={1}', ee.id, geneId), + downloadLink: String.format(Gemma.CONTEXT_PATH + '/dedv/downloadDEDV.html?ee={0}&g={1}', ee.id, geneId), readMethod: DEDVController.getDEDVForDiffExVisualizationByExperiment }); visDifWindow.show({ @@ -318,7 +318,7 @@ Gemma.ProbeLevelDiffExGrid = Ext Gemma.ProbeLevelDiffExGrid.getEEStyler = function () { if (Gemma.ProbeLevelDiffExGrid.eeNameStyler === undefined) { Gemma.ProbeLevelDiffExGrid.eeNameTemplate = new Ext.XTemplate( - '{[values.sourceExperiment ? "Subset of " + values.sourceExperiment : values.shortName]}'); Gemma.ProbeLevelDiffExGrid.eeNameStyler = function (value, metadata, record, row, col, ds) { diff --git a/gemma-web/src/main/webapp/scripts/api/diff/index.js b/gemma-web/src/main/webapp/scripts/api/diff/index.js new file mode 100644 index 0000000000..fd0bc2e1d9 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/diff/index.js @@ -0,0 +1,3 @@ +import './DiffExSearchAndVisualize' +import './ProbeLevelDiffExGrid' +import './metaanalysis' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisEvidenceWindow.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisEvidenceWindow.js index e6ca584aec..617e308066 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisEvidenceWindow.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisEvidenceWindow.js @@ -79,7 +79,7 @@ Gemma.MetaAnalysisEvidenceWindow = Ext Ext.Msg .alert( Gemma.HelpText.WidgetDefaults.MetaAnalysisManagerGridPanel.ErrorTitle.saveMetaAnalysisAsEvidence, - Gemma.convertToEvidenceError( validateEvidenceValueObject ).errorMessage, + Gemma.Evidence.convertToEvidenceError( validateEvidenceValueObject ).errorMessage, function() { if ( validateEvidenceValueObject.userNotLoggedIn ) { Gemma.AjaxLogin.showLoginWindowFn(); diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisManagerGridPanel.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisManagerGridPanel.js index 218b4e3e33..8f01bc73af 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisManagerGridPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisManagerGridPanel.js @@ -41,7 +41,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext }.createDelegate(this); var generateLinkPlaceholder = function () { - return ''; + return ''; }; var showLoadMask = function (msg) { @@ -124,7 +124,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext hideLoadMask(); if (baseValueObject.errorFound) { - Gemma.alertUserToError(baseValueObject, errorDialogTitle); + Gemma.Error.alertUserToError(baseValueObject, errorDialogTitle); } else { metaAnalysisCache[id] = baseValueObject.valueObject; @@ -193,7 +193,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext hideLoadMask(); if (baseValueObject.errorFound) { - Gemma.alertUserToError(baseValueObject, + Gemma.Error.alertUserToError(baseValueObject, 'Cannot save meta-analysis as Phenocarta evidence'); } else { metaAnalysisCache[id] = baseValueObject.valueObject; @@ -238,7 +238,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext hideLoadMask(); if (baseValueObject.errorFound) { - Gemma + Gemma.Error .alertUserToError( baseValueObject, Gemma.HelpText.WidgetDefaults.MetaAnalysisManagerGridPanel.ErrorTitle.removeMetaAnalysis); @@ -275,7 +275,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext + '\\\'Cannot view meta-analysis\\\', ' + 'showMetaAnalysisWindow, ' + '[ \\\'' + escape(record.data.name) + '\\\', ' + record.data.numGenesAnalyzed + ' ])\');', - ctxBasePath + '/images/icons/magnifier.png', 'Show details', 10, 10); + Gemma.CONTEXT_PATH + '/images/icons/magnifier.png', 'Show details', 10, 10); } }, { @@ -314,7 +314,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext if (record.data.diffExpressionEvidence == null) { if (record.data.ownedByCurrentUser) { adminLinks += generateLink('showSaveAsEvidenceWindow(' + record.data.id - + ');', ctxBasePath + '/images/icons/neurocarta-add.png', + + ');', Gemma.CONTEXT_PATH + '/images/icons/neurocarta-add.png', 'Save as Phenocarta evidence'); } else { adminLinks += generateLinkPlaceholder(); @@ -323,13 +323,13 @@ Gemma.MetaAnalysisManagerGridPanel = Ext adminLinks += generateLink('eval(\'processMetaAnalysis(' + record.data.id + ', ' + '\\\'Cannot view Phenocarta evidence\\\', ' + 'showViewEvidenceWindow, ' + '[ ' + record.data.id + ' ])\');', - ctxBasePath + '/images/icons/neurocarta-check.png', 'View Phenocarta evidence'); + Gemma.CONTEXT_PATH + '/images/icons/neurocarta-check.png', 'View Phenocarta evidence'); } adminLinks += ' '; if (record.data.editable) { adminLinks += generateLink('removeMetaAnalysis(' + record.data.id + ');', - ctxBasePath + '/images/icons/cross.png', 'Remove meta-analysis'); + Gemma.CONTEXT_PATH + '/images/icons/cross.png', 'Remove meta-analysis'); } else { adminLinks += generateLinkPlaceholder(); } @@ -380,7 +380,7 @@ Gemma.MetaAnalysisManagerGridPanel = Ext }); }, scope: this, - icon: ctxBasePath + "/images/icons/add.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/add.png", tooltip: "Add new meta-analysis" }] }); diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisResultPanel.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisResultPanel.js index 2dbc13dc98..1c02125079 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisResultPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisResultPanel.js @@ -57,7 +57,7 @@ Gemma.MetaAnalysisResultPanel = Ext var downloadButton = this.showDownloadButton ? new Ext.Button( { text : 'Download', - icon : ctxBasePath + '/images/download.gif', + icon : Gemma.CONTEXT_PATH + '/images/download.gif', handler : function() { var downloadData = [ [ GENE_SYMBOL_COLUMN_TITLE, GENE_NAME_COLUMN_TITLE, P_VALUE_COLUMN_TITLE, Q_VALUE_COLUMN_TITLE, DIRECTION_COLUMN_TITLE ] ]; diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectExperimentPanel.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectExperimentPanel.js index 8dbbf8bfbd..9a54ff0df4 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectExperimentPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectExperimentPanel.js @@ -49,7 +49,7 @@ Gemma.MetaAnalysisSelectExperimentPanel = Ext.extend( Gemma.WizardTabPanelItemPa var resetButton = new Ext.Button( { disabled : true, - icon : ctxBasePath + '/images/icons/arrow_refresh_small.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/arrow_refresh_small.png', margins : '0 0 0 10', text : 'Reset', handler : function( button, eventObject ) { diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectFactorPanel.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectFactorPanel.js index 0828e8c464..65e98bf580 100755 --- a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectFactorPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/MetaAnalysisSelectFactorPanel.js @@ -41,7 +41,7 @@ Gemma.MetaAnalysisSelectFactorPanel = Ext } ); var experimentTitle = '' - + '' + experimentDetails.shortName + ' ' + experimentDetails.name + ''; @@ -112,7 +112,7 @@ Gemma.MetaAnalysisSelectFactorPanel = Ext if ( this.metaAnalysis ) { resultSetComponent = { xtype : 'displayfield', - value : (shouldResultSetSelected ? '' + value : (shouldResultSetSelected ? '' : '') + ' ' + text diff --git a/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/index.js b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/index.js new file mode 100644 index 0000000000..684cb0bde7 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/diff/metaanalysis/index.js @@ -0,0 +1,9 @@ +import './MetaAnalysisEvidenceWindow' +import './MetaAnalysisManagerGridPanel' +import './MetaAnalysisResultPanel' +import './MetaAnalysisSaveResultWindow' +import './MetaAnalysisSelectExperimentPanel' +import './MetaAnalysisSelectFactorPanel' +import './MetaAnalysisShowResultPanel' +import './MetaAnalysisUtilities' +import './MetaAnalysisWindow' diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/engine.js b/gemma-web/src/main/webapp/scripts/api/dwr/engine.js new file mode 100644 index 0000000000..3e01f79eb1 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/engine.js @@ -0,0 +1,1334 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +/* + * Copyright 2005 Joe Walker + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Declare an object to which we can add real functions. + */ +var dwr = {}; +dwr.engine = {}; +var DWREngine = dwr.engine; + +/** + * Set an alternative error handler from the default alert box. + * @see getahead.org/dwr/browser/engine/errors + */ +dwr.engine.setErrorHandler = function(handler) { + dwr.engine._errorHandler = handler; +}; + +/** + * Set an alternative warning handler from the default alert box. + * @see getahead.org/dwr/browser/engine/errors + */ +dwr.engine.setWarningHandler = function(handler) { + dwr.engine._warningHandler = handler; +}; + +/** + * Setter for the text/html handler - what happens if a DWR request gets an HTML + * reply rather than the expected Javascript. Often due to login timeout + */ +dwr.engine.setTextHtmlHandler = function(handler) { + dwr.engine._textHtmlHandler = handler; +}; + +/** + * Set a default timeout value for all calls. 0 (the default) turns timeouts off. + * @see getahead.org/dwr/browser/engine/errors + */ +dwr.engine.setTimeout = function(timeout) { + dwr.engine._timeout = timeout; +}; + +/** + * The Pre-Hook is called before any DWR remoting is done. + * @see getahead.org/dwr/browser/engine/hooks + */ +dwr.engine.setPreHook = function(handler) { + dwr.engine._preHook = handler; +}; + +/** + * The Post-Hook is called after any DWR remoting is done. + * @see getahead.org/dwr/browser/engine/hooks + */ +dwr.engine.setPostHook = function(handler) { + dwr.engine._postHook = handler; +}; + +/** + * Custom headers for all DWR calls + * @see getahead.org/dwr/???? + */ +dwr.engine.setHeaders = function(headers) { + dwr.engine._headers = headers; +}; + +/** + * Custom parameters for all DWR calls + * @see getahead.org/dwr/???? + */ +dwr.engine.setParameters = function(parameters) { + dwr.engine._parameters = parameters; +}; + +/** XHR remoting type constant. See dwr.engine.set[Rpc|Poll]Type() */ +dwr.engine.XMLHttpRequest = 1; + +/** XHR remoting type constant. See dwr.engine.set[Rpc|Poll]Type() */ +dwr.engine.IFrame = 2; + +/** XHR remoting type constant. See dwr.engine.setRpcType() */ +dwr.engine.ScriptTag = 3; + +/** + * Set the preferred remoting type. + * @param newType One of dwr.engine.XMLHttpRequest or dwr.engine.IFrame or dwr.engine.ScriptTag + * @see getahead.org/dwr/browser/engine/options + */ +dwr.engine.setRpcType = function(newType) { + if (newType != dwr.engine.XMLHttpRequest && newType != dwr.engine.IFrame && newType != dwr.engine.ScriptTag) { + dwr.engine._handleError(null, { name:"dwr.engine.invalidRpcType", message:"RpcType must be one of dwr.engine.XMLHttpRequest or dwr.engine.IFrame or dwr.engine.ScriptTag" }); + return; + } + dwr.engine._rpcType = newType; +}; + +/** + * Which HTTP method do we use to send results? Must be one of "GET" or "POST". + * @see getahead.org/dwr/browser/engine/options + */ +dwr.engine.setHttpMethod = function(httpMethod) { + if (httpMethod != "GET" && httpMethod != "POST") { + dwr.engine._handleError(null, { name:"dwr.engine.invalidHttpMethod", message:"Remoting method must be one of GET or POST" }); + return; + } + dwr.engine._httpMethod = httpMethod; +}; + +/** + * Ensure that remote calls happen in the order in which they were sent? (Default: false) + * @see getahead.org/dwr/browser/engine/ordering + */ +dwr.engine.setOrdered = function(ordered) { + dwr.engine._ordered = ordered; +}; + +/** + * Do we ask the XHR object to be asynchronous? (Default: true) + * @see getahead.org/dwr/browser/engine/options + */ +dwr.engine.setAsync = function(async) { + dwr.engine._async = async; +}; + +/** + * Does DWR poll the server for updates? (Default: false) + * @see getahead.org/dwr/browser/engine/options + */ +dwr.engine.setActiveReverseAjax = function(activeReverseAjax) { + if (activeReverseAjax) { + // Bail if we are already started + if (dwr.engine._activeReverseAjax) return; + dwr.engine._activeReverseAjax = true; + dwr.engine._poll(); + } + else { + // Can we cancel an existing request? + if (dwr.engine._activeReverseAjax && dwr.engine._pollReq) dwr.engine._pollReq.abort(); + dwr.engine._activeReverseAjax = false; + } + // TODO: in iframe mode, if we start, stop, start then the second start may + // well kick off a second iframe while the first is still about to return + // we should cope with this but we don't +}; + +/** + * The default message handler. + * @see getahead.org/dwr/browser/engine/errors + */ +dwr.engine.defaultErrorHandler = function(message, ex) { + dwr.engine._debug("Error: " + ex.name + ", " + ex.message, true); + if (message == null || message == "") alert("A server error has occured."); + // Ignore NS_ERROR_NOT_AVAILABLE if Mozilla is being narky + else if (message.indexOf("0x80040111") != -1) dwr.engine._debug(message); + else alert(message); +}; + +/** + * The default warning handler. + * @see getahead.org/dwr/browser/engine/errors + */ +dwr.engine.defaultWarningHandler = function(message, ex) { + dwr.engine._debug(message); +}; + +/** + * For reduced latency you can group several remote calls together using a batch. + * @see getahead.org/dwr/browser/engine/batch + */ +dwr.engine.beginBatch = function() { + if (dwr.engine._batch) { + dwr.engine._handleError(null, { name:"dwr.engine.batchBegun", message:"Batch already begun" }); + return; + } + dwr.engine._batch = dwr.engine._createBatch(); +}; + +/** + * Finished grouping a set of remote calls together. Go and execute them all. + * @see getahead.org/dwr/browser/engine/batch + */ +dwr.engine.endBatch = function(options) { + var batch = dwr.engine._batch; + if (batch == null) { + dwr.engine._handleError(null, { name:"dwr.engine.batchNotBegun", message:"No batch in progress" }); + return; + } + dwr.engine._batch = null; + if (batch.map.callCount == 0) return; + + // The hooks need to be merged carefully to preserve ordering + if (options) dwr.engine._mergeBatch(batch, options); + + // In ordered mode, we don't send unless the list of sent items is empty + if (dwr.engine._ordered && dwr.engine._batchesLength != 0) { + dwr.engine._batchQueue[dwr.engine._batchQueue.length] = batch; + } + else { + dwr.engine._sendData(batch); + } +}; + +/** @deprecated */ +dwr.engine.setPollMethod = function(type) { dwr.engine.setPollType(type); }; +dwr.engine.setMethod = function(type) { dwr.engine.setRpcType(type); }; +dwr.engine.setVerb = function(verb) { dwr.engine.setHttpMethod(verb); }; +dwr.engine.setPollType = function() { dwr.engine._debug("Manually setting the Poll Type is not supported"); }; + +//============================================================================== +// Only private stuff below here +//============================================================================== + +/** The original page id sent from the server */ +dwr.engine._origScriptSessionId = "B2847CB374AAFF14C3E8088C9B8D08AE"; + +/** The session cookie name */ +dwr.engine._sessionCookieName = "JSESSIONID"; // JSESSIONID + +/** Is GET enabled for the benefit of Safari? */ +dwr.engine._allowGetForSafariButMakeForgeryEasier = "false"; + +/** The script prefix to strip in the case of scriptTagProtection. */ +dwr.engine._scriptTagProtection = "throw 'allowScriptTagRemoting is false.';"; + +/** The default path to the DWR servlet */ +dwr.engine._defaultPath = "/dwr"; + +/** Do we use XHR for reverse ajax because we are not streaming? */ +dwr.engine._pollWithXhr = "false"; + +/** The read page id that we calculate */ +dwr.engine._scriptSessionId = null; + +/** The function that we use to fetch/calculate a session id */ +dwr.engine._getScriptSessionId = function() { + if (dwr.engine._scriptSessionId == null) { + dwr.engine._scriptSessionId = dwr.engine._origScriptSessionId + Math.floor(Math.random() * 1000); + } + return dwr.engine._scriptSessionId; +}; + +/** A function to call if something fails. */ +dwr.engine._errorHandler = dwr.engine.defaultErrorHandler; + +/** For debugging when something unexplained happens. */ +dwr.engine._warningHandler = dwr.engine.defaultWarningHandler; + +/** A function to be called before requests are marshalled. Can be null. */ +dwr.engine._preHook = null; + +/** A function to be called after replies are received. Can be null. */ +dwr.engine._postHook = null; + +/** An map of the batches that we have sent and are awaiting a reply on. */ +dwr.engine._batches = {}; + +/** A count of the number of outstanding batches. Should be == to _batches.length unless prototype has messed things up */ +dwr.engine._batchesLength = 0; + +/** In ordered mode, the array of batches waiting to be sent */ +dwr.engine._batchQueue = []; + +/** What is the default rpc type */ +dwr.engine._rpcType = dwr.engine.XMLHttpRequest; + +/** What is the default remoting method (ie GET or POST) */ +dwr.engine._httpMethod = "POST"; + +/** Do we attempt to ensure that calls happen in the order in which they were sent? */ +dwr.engine._ordered = false; + +/** Do we make the calls async? */ +dwr.engine._async = true; + +/** The current batch (if we are in batch mode) */ +dwr.engine._batch = null; + +/** The global timeout */ +dwr.engine._timeout = 0; + +/** ActiveX objects to use when we want to convert an xml string into a DOM object. */ +dwr.engine._DOMDocument = ["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]; + +/** The ActiveX objects to use when we want to do an XMLHttpRequest call. */ +dwr.engine._XMLHTTP = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; + +/** Are we doing comet or polling? */ +dwr.engine._activeReverseAjax = false; + +/** The iframe that we are using to poll */ +dwr.engine._outstandingIFrames = []; + +/** The xhr object that we are using to poll */ +dwr.engine._pollReq = null; + +/** How many milliseconds between internal comet polls */ +dwr.engine._pollCometInterval = 200; + +/** How many times have we re-tried to poll? */ +dwr.engine._pollRetries = 0; +dwr.engine._maxPollRetries = 0; + +/** Do we do a document.reload if we get a text/html reply? */ +dwr.engine._textHtmlHandler = null; + +/** If you wish to send custom headers with every request */ +dwr.engine._headers = null; + +/** If you wish to send extra custom request parameters with each request */ +dwr.engine._parameters = null; + +/** Undocumented interceptors - do not use */ +dwr.engine._postSeperator = "\n"; +dwr.engine._defaultInterceptor = function(data) { return data; }; +dwr.engine._urlRewriteHandler = dwr.engine._defaultInterceptor; +dwr.engine._contentRewriteHandler = dwr.engine._defaultInterceptor; +dwr.engine._replyRewriteHandler = dwr.engine._defaultInterceptor; + +/** Batch ids allow us to know which batch the server is answering */ +dwr.engine._nextBatchId = 0; + +/** A list of the properties that need merging from calls to a batch */ +dwr.engine._propnames = [ "rpcType", "httpMethod", "async", "timeout", "errorHandler", "warningHandler", "textHtmlHandler" ]; + +/** Do we stream, or can be hacked to do so? */ +dwr.engine._partialResponseNo = 0; +dwr.engine._partialResponseYes = 1; +dwr.engine._partialResponseFlush = 2; + +/** Is this page in the process of unloading? */ +dwr.engine._unloading = false; + +/** + * @private Send a request. Called by the Javascript interface stub + * @param path part of URL after the host and before the exec bit without leading or trailing /s + * @param scriptName The class to execute + * @param methodName The method on said class to execute + * @param func The callback function to which any returned data should be passed + * if this is null, any returned data will be ignored + * @param vararg_params The parameters to pass to the above class + */ +dwr.engine._execute = function(path, scriptName, methodName, vararg_params) { + var singleShot = false; + if (dwr.engine._batch == null) { + dwr.engine.beginBatch(); + singleShot = true; + } + var batch = dwr.engine._batch; + // To make them easy to manipulate we copy the arguments into an args array + var args = []; + for (var i = 0; i < arguments.length - 3; i++) { + args[i] = arguments[i + 3]; + } + // All the paths MUST be to the same servlet + if (batch.path == null) { + batch.path = path; + } + else { + if (batch.path != path) { + dwr.engine._handleError(batch, { name:"dwr.engine.multipleServlets", message:"Can't batch requests to multiple DWR Servlets." }); + return; + } + } + // From the other params, work out which is the function (or object with + // call meta-data) and which is the call parameters + var callData; + var lastArg = args[args.length - 1]; + if (typeof lastArg == "function" || lastArg == null) callData = { callback:args.pop() }; + else callData = args.pop(); + + // Merge from the callData into the batch + dwr.engine._mergeBatch(batch, callData); + batch.handlers[batch.map.callCount] = { + exceptionHandler:callData.exceptionHandler, + callback:callData.callback + }; + + // Copy to the map the things that need serializing + var prefix = "c" + batch.map.callCount + "-"; + batch.map[prefix + "scriptName"] = scriptName; + batch.map[prefix + "methodName"] = methodName; + batch.map[prefix + "id"] = batch.map.callCount; + var refctx = []; + for (i = 0; i < args.length; i++) { + dwr.engine._serializeAll(batch, refctx, args[i], prefix + "param" + i); + } + + // Now we have finished remembering the call, we incr the call count + batch.map.callCount++; + if (singleShot) dwr.engine.endBatch(); +}; + +/** @private Poll the server to see if there is any data waiting */ +dwr.engine._poll = function() { + if (!dwr.engine._activeReverseAjax) return; + + var batch = dwr.engine._createBatch(); + batch.map.id = 0; // TODO: Do we need this?? + batch.map.callCount = 1; + batch.isPoll = true; + if (dwr.engine._pollWithXhr == "true") { + batch.rpcType = dwr.engine.XMLHttpRequest; + batch.map.partialResponse = dwr.engine._partialResponseNo; + } + else { + if (navigator.userAgent.indexOf("Gecko/") != -1) { + batch.rpcType = dwr.engine.XMLHttpRequest; + batch.map.partialResponse = dwr.engine._partialResponseYes; + } + else { + batch.rpcType = dwr.engine.XMLHttpRequest; + batch.map.partialResponse = dwr.engine._partialResponseNo; + } + } + batch.httpMethod = "POST"; + batch.async = true; + batch.timeout = 0; + batch.path = dwr.engine._defaultPath; + batch.preHooks = []; + batch.postHooks = []; + batch.errorHandler = dwr.engine._pollErrorHandler; + batch.warningHandler = dwr.engine._pollErrorHandler; + batch.handlers[0] = { + callback:function(pause) { + dwr.engine._pollRetries = 0; + setTimeout(dwr.engine._poll, pause); + } + }; + + // Send the data + dwr.engine._sendData(batch); + if (batch.rpcType == dwr.engine.XMLHttpRequest && batch.map.partialResponse == dwr.engine._partialResponseYes) { + dwr.engine._checkCometPoll(); + } +}; + +/** Try to recover from polling errors */ +dwr.engine._pollErrorHandler = function(msg, ex) { + // if anything goes wrong then just silently try again (up to 3x) after 10s + dwr.engine._pollRetries++; + dwr.engine._debug("Reverse Ajax poll failed (pollRetries=" + dwr.engine._pollRetries + "): " + ex.name + " : " + ex.message); + if (dwr.engine._pollRetries < dwr.engine._maxPollRetries) { + setTimeout(dwr.engine._poll, 10000); + } + else { + dwr.engine._activeReverseAjax = false; + dwr.engine._debug("Giving up."); + } +}; + +/** @private Generate a new standard batch */ +dwr.engine._createBatch = function() { + var batch = { + map:{ + callCount:0, + page:window.location.pathname + window.location.search, + httpSessionId:dwr.engine._getJSessionId(), + scriptSessionId:dwr.engine._getScriptSessionId() + }, + charsProcessed:0, paramCount:0, + parameters:{}, headers:{}, + isPoll:false, handlers:{}, preHooks:[], postHooks:[], + rpcType:dwr.engine._rpcType, + httpMethod:dwr.engine._httpMethod, + async:dwr.engine._async, + timeout:dwr.engine._timeout, + errorHandler:dwr.engine._errorHandler, + warningHandler:dwr.engine._warningHandler, + textHtmlHandler:dwr.engine._textHtmlHandler + }; + if (dwr.engine._preHook) batch.preHooks.push(dwr.engine._preHook); + if (dwr.engine._postHook) batch.postHooks.push(dwr.engine._postHook); + var propname, data; + if (dwr.engine._headers) { + for (propname in dwr.engine._headers) { + data = dwr.engine._headers[propname]; + if (typeof data != "function") batch.headers[propname] = data; + } + } + if (dwr.engine._parameters) { + for (propname in dwr.engine._parameters) { + data = dwr.engine._parameters[propname]; + if (typeof data != "function") batch.parameters[propname] = data; + } + } + return batch; +}; + +/** @private Take further options and merge them into */ +dwr.engine._mergeBatch = function(batch, overrides) { + var propname, data; + for (var i = 0; i < dwr.engine._propnames.length; i++) { + propname = dwr.engine._propnames[i]; + if (overrides[propname] != null) batch[propname] = overrides[propname]; + } + if (overrides.preHook != null) batch.preHooks.unshift(overrides.preHook); + if (overrides.postHook != null) batch.postHooks.push(overrides.postHook); + if (overrides.headers) { + for (propname in overrides.headers) { + data = overrides.headers[propname]; + if (typeof data != "function") batch.headers[propname] = data; + } + } + if (overrides.parameters) { + for (propname in overrides.parameters) { + data = overrides.parameters[propname]; + if (typeof data != "function") batch.map["p-" + propname] = "" + data; + } + } +}; + +/** @private What is our session id? */ +dwr.engine._getJSessionId = function() { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = cookies[i]; + while (cookie.charAt(0) == ' ') cookie = cookie.substring(1, cookie.length); + if (cookie.indexOf(dwr.engine._sessionCookieName + "=") == 0) { + return cookie.substring(dwr.engine._sessionCookieName.length + 1, cookie.length); + } + } + return ""; +}; + +/** @private Check for reverse Ajax activity */ +dwr.engine._checkCometPoll = function() { + for (var i = 0; i < dwr.engine._outstandingIFrames.length; i++) { + var text = ""; + var iframe = dwr.engine._outstandingIFrames[i]; + try { + text = dwr.engine._getTextFromCometIFrame(iframe); + } + catch (ex) { + dwr.engine._handleWarning(iframe.batch, ex); + } + if (text != "") dwr.engine._processCometResponse(text, iframe.batch); + } + if (dwr.engine._pollReq) { + var req = dwr.engine._pollReq; + var text = req.responseText; + if (text != null) dwr.engine._processCometResponse(text, req.batch); + } + + // If the poll resources are still there, come back again + if (dwr.engine._outstandingIFrames.length > 0 || dwr.engine._pollReq) { + setTimeout(dwr.engine._checkCometPoll, dwr.engine._pollCometInterval); + } +}; + +/** @private Extract the whole (executed an all) text from the current iframe */ +dwr.engine._getTextFromCometIFrame = function(frameEle) { + var body = frameEle.contentWindow.document.body; + if (body == null) return ""; + var text = body.innerHTML; + // We need to prevent IE from stripping line feeds + if (text.indexOf("
") == 0 || text.indexOf("
") == 0) {
+    text = text.substring(5, text.length - 7);
+  }
+  return text;
+};
+
+/** @private Some more text might have come in, test and execute the new stuff */
+dwr.engine._processCometResponse = function(response, batch) {
+  if (batch.charsProcessed == response.length) return;
+  if (response.length == 0) {
+    batch.charsProcessed = 0;
+    return;
+  }
+
+  var firstStartTag = response.indexOf("//#DWR-START#", batch.charsProcessed);
+  if (firstStartTag == -1) {
+    // dwr.engine._debug("No start tag (search from " + batch.charsProcessed + "). skipping '" + response.substring(batch.charsProcessed) + "'");
+    batch.charsProcessed = response.length;
+    return;
+  }
+  // if (firstStartTag > 0) {
+  //   dwr.engine._debug("Start tag not at start (search from " + batch.charsProcessed + "). skipping '" + response.substring(batch.charsProcessed, firstStartTag) + "'");
+  // }
+
+  var lastEndTag = response.lastIndexOf("//#DWR-END#");
+  if (lastEndTag == -1) {
+    // dwr.engine._debug("No end tag. unchanged charsProcessed=" + batch.charsProcessed);
+    return;
+  }
+
+  // Skip the end tag too for next time, remembering CR and LF
+  if (response.charCodeAt(lastEndTag + 11) == 13 && response.charCodeAt(lastEndTag + 12) == 10) {
+    batch.charsProcessed = lastEndTag + 13;
+  }
+  else {
+    batch.charsProcessed = lastEndTag + 11;
+  }
+
+  var exec = response.substring(firstStartTag + 13, lastEndTag);
+
+  dwr.engine._receivedBatch = batch;
+  dwr.engine._eval(exec);
+  dwr.engine._receivedBatch = null;
+};
+
+/** @private Actually send the block of data in the batch object. */
+dwr.engine._sendData = function(batch) {
+  batch.map.batchId = dwr.engine._nextBatchId;
+  dwr.engine._nextBatchId++;
+  dwr.engine._batches[batch.map.batchId] = batch;
+  dwr.engine._batchesLength++;
+  batch.completed = false;
+
+  for (var i = 0; i < batch.preHooks.length; i++) {
+    batch.preHooks[i]();
+  }
+  batch.preHooks = null;
+  // Set a timeout
+  if (batch.timeout && batch.timeout != 0) {
+    batch.timeoutId = setTimeout(function() { dwr.engine._abortRequest(batch); }, batch.timeout);
+  }
+  // Get setup for XMLHttpRequest if possible
+  if (batch.rpcType == dwr.engine.XMLHttpRequest) {
+    if (window.XMLHttpRequest) {
+      batch.req = new XMLHttpRequest();
+    }
+    // IE5 for the mac claims to support window.ActiveXObject, but throws an error when it's used
+    else if (window.ActiveXObject && !(navigator.userAgent.indexOf("Mac") >= 0 && navigator.userAgent.indexOf("MSIE") >= 0)) {
+      batch.req = dwr.engine._newActiveXObject(dwr.engine._XMLHTTP);
+    }
+  }
+
+  var prop, request;
+  if (batch.req) {
+    // Proceed using XMLHttpRequest
+    if (batch.async) {
+      batch.req.onreadystatechange = function() {
+        if (typeof dwr != 'undefined') dwr.engine._stateChange(batch);
+      };
+    }
+    // If we're polling, record this for monitoring
+    if (batch.isPoll) {
+      dwr.engine._pollReq = batch.req;
+      // In IE XHR is an ActiveX control so you can't augment it like this
+      if (!(document.all && !window.opera)) batch.req.batch = batch;
+    }
+    // Workaround for Safari 1.x POST bug
+    var indexSafari = navigator.userAgent.indexOf("Safari/");
+    if (indexSafari >= 0) {
+      var version = navigator.userAgent.substring(indexSafari + 7);
+      if (parseInt(version, 10) < 400) {
+        if (dwr.engine._allowGetForSafariButMakeForgeryEasier == "true") batch.httpMethod = "GET";
+        else dwr.engine._handleWarning(batch, { name:"dwr.engine.oldSafari", message:"Safari GET support disabled. See getahead.org/dwr/server/servlet and allowGetForSafariButMakeForgeryEasier." });
+      }
+    }
+    batch.mode = batch.isPoll ? dwr.engine._ModePlainPoll : dwr.engine._ModePlainCall;
+    request = dwr.engine._constructRequest(batch);
+    try {
+      batch.req.open(batch.httpMethod, request.url, batch.async);
+      try {
+        for (prop in batch.headers) {
+          var value = batch.headers[prop];
+          if (typeof value == "string") batch.req.setRequestHeader(prop, value);
+        }
+        if (!batch.headers["Content-Type"]) batch.req.setRequestHeader("Content-Type", "text/plain");
+      }
+      catch (ex) {
+        dwr.engine._handleWarning(batch, ex);
+      }
+      batch.req.send(request.body);
+      if (!batch.async) dwr.engine._stateChange(batch);
+    }
+    catch (ex) {
+      dwr.engine._handleError(batch, ex);
+    }
+  }
+  else if (batch.rpcType != dwr.engine.ScriptTag) {
+    var idname = batch.isPoll ? "dwr-if-poll-" + batch.map.batchId : "dwr-if-" + batch.map.batchId;
+    // Removed htmlfile implementation. Don't expect it to return before v3
+    batch.div = document.createElement("div");
+    // Add the div to the document first, otherwise IE 6 will ignore onload handler.
+    document.body.appendChild(batch.div);
+    batch.div.innerHTML = "";
+    batch.document = document;
+    batch.iframe = batch.document.getElementById(idname);
+    batch.iframe.batch = batch;
+    batch.mode = batch.isPoll ? dwr.engine._ModeHtmlPoll : dwr.engine._ModeHtmlCall;
+    if (batch.isPoll) dwr.engine._outstandingIFrames.push(batch.iframe);
+    request = dwr.engine._constructRequest(batch);
+    if (batch.httpMethod == "GET") {
+      batch.iframe.setAttribute("src", request.url);
+    }
+    else {
+      batch.form = batch.document.createElement("form");
+      batch.form.setAttribute("id", "dwr-form");
+      batch.form.setAttribute("action", request.url);
+      batch.form.setAttribute("style", "display:none;");
+      batch.form.setAttribute("target", idname);
+      batch.form.target = idname;
+      batch.form.setAttribute("method", batch.httpMethod);
+      for (prop in batch.map) {
+        var value = batch.map[prop];
+        if (typeof value != "function") {
+          var formInput = batch.document.createElement("input");
+          formInput.setAttribute("type", "hidden");
+          formInput.setAttribute("name", prop);
+          formInput.setAttribute("value", value);
+          batch.form.appendChild(formInput);
+        }
+      }
+      batch.document.body.appendChild(batch.form);
+      batch.form.submit();
+    }
+  }
+  else {
+    batch.httpMethod = "GET"; // There's no such thing as ScriptTag using POST
+    batch.mode = batch.isPoll ? dwr.engine._ModePlainPoll : dwr.engine._ModePlainCall;
+    request = dwr.engine._constructRequest(batch);
+    batch.script = document.createElement("script");
+    batch.script.id = "dwr-st-" + batch.map["c0-id"];
+    batch.script.src = request.url;
+    document.body.appendChild(batch.script);
+  }
+};
+
+dwr.engine._ModePlainCall = "/call/plaincall/";
+dwr.engine._ModeHtmlCall = "/call/htmlcall/";
+dwr.engine._ModePlainPoll = "/call/plainpoll/";
+dwr.engine._ModeHtmlPoll = "/call/htmlpoll/";
+
+/** @private Work out what the URL should look like */
+dwr.engine._constructRequest = function(batch) {
+  // A quick string to help people that use web log analysers
+  var request = { url:batch.path + batch.mode, body:null };
+  if (batch.isPoll == true) {
+    request.url += "ReverseAjax.dwr";
+  }
+  else if (batch.map.callCount == 1) {
+    request.url += batch.map["c0-scriptName"] + "." + batch.map["c0-methodName"] + ".dwr";
+  }
+  else {
+    request.url += "Multiple." + batch.map.callCount + ".dwr";
+  }
+  // Play nice with url re-writing
+  var sessionMatch = location.href.match(/jsessionid=([^?]+)/);
+  if (sessionMatch != null) {
+    request.url += ";jsessionid=" + sessionMatch[1];
+  }
+
+  var prop;
+  if (batch.httpMethod == "GET") {
+    // Some browsers (Opera/Safari2) seem to fail to convert the callCount value
+    // to a string in the loop below so we do it manually here.
+    batch.map.callCount = "" + batch.map.callCount;
+    request.url += "?";
+    for (prop in batch.map) {
+      if (typeof batch.map[prop] != "function") {
+        request.url += encodeURIComponent(prop) + "=" + encodeURIComponent(batch.map[prop]) + "&";
+      }
+    }
+    request.url = request.url.substring(0, request.url.length - 1);
+  }
+  else {
+    // PERFORMANCE: for iframe mode this is thrown away.
+    request.body = "";
+    if (document.all && !window.opera) {
+      // Use array joining on IE (fastest)
+      var buf = [];
+      for (prop in batch.map) {
+        if (typeof batch.map[prop] != "function") {
+          buf.push(prop + "=" + batch.map[prop] + dwr.engine._postSeperator);
+        }
+      }
+      request.body = buf.join("");
+    }
+    else {
+      // Use string concat on other browsers (fastest)
+      for (prop in batch.map) {
+        if (typeof batch.map[prop] != "function") {
+          request.body += prop + "=" + batch.map[prop] + dwr.engine._postSeperator;
+        }
+      }
+    }
+    request.body = dwr.engine._contentRewriteHandler(request.body);
+  }
+  request.url = dwr.engine._urlRewriteHandler(request.url);
+  return request;
+};
+
+/** @private Called by XMLHttpRequest to indicate that something has happened */
+dwr.engine._stateChange = function(batch) {
+  var toEval;
+
+  if (batch.completed) {
+    dwr.engine._debug("Error: _stateChange() with batch.completed");
+    return;
+  }
+
+  var req = batch.req;
+  try {
+    if (req.readyState != 4) return;
+  }
+  catch (ex) {
+    dwr.engine._handleWarning(batch, ex);
+    // It's broken - clear up and forget this call
+    dwr.engine._clearUp(batch);
+    return;
+  }
+
+  if (dwr.engine._unloading) {
+    dwr.engine._debug("Ignoring reply from server as page is unloading.");
+    return;
+  }
+  
+  try {
+    var reply = req.responseText;
+    reply = dwr.engine._replyRewriteHandler(reply);
+    var status = req.status; // causes Mozilla to except on page moves
+
+    if (reply == null || reply == "") {
+      dwr.engine._handleWarning(batch, { name:"dwr.engine.missingData", message:"No data received from server" });
+    }
+    else if (status != 200) {
+      dwr.engine._handleError(batch, { name:"dwr.engine.http." + status, message:req.statusText });
+    }
+    else {
+      var contentType = req.getResponseHeader("Content-Type");
+      if (!contentType.match(/^text\/plain/) && !contentType.match(/^text\/javascript/)) {
+        if (contentType.match(/^text\/html/) && typeof batch.textHtmlHandler == "function") {
+          batch.textHtmlHandler({ status:status, responseText:reply, contentType:contentType });
+        }
+        else {
+          dwr.engine._handleWarning(batch, { name:"dwr.engine.invalidMimeType", message:"Invalid content type: '" + contentType + "'" });
+        }
+      }
+      else {
+        // Comet replies might have already partially executed
+        if (batch.isPoll && batch.map.partialResponse == dwr.engine._partialResponseYes) {
+          dwr.engine._processCometResponse(reply, batch);
+        }
+        else {
+          if (reply.search("//#DWR") == -1) {
+            dwr.engine._handleWarning(batch, { name:"dwr.engine.invalidReply", message:"Invalid reply from server" });
+          }
+          else {
+            toEval = reply;
+          }
+        }
+      }
+    }
+  }
+  catch (ex) {
+    dwr.engine._handleWarning(batch, ex);
+  }
+
+  dwr.engine._callPostHooks(batch);
+
+  // Outside of the try/catch so errors propogate normally:
+  dwr.engine._receivedBatch = batch;
+  if (toEval != null) toEval = toEval.replace(dwr.engine._scriptTagProtection, "");
+  dwr.engine._eval(toEval);
+  dwr.engine._receivedBatch = null;
+  dwr.engine._validateBatch(batch);
+  if (!batch.completed) dwr.engine._clearUp(batch);
+};
+
+/**
+ * @private This function is invoked when a batch reply is received.
+ * It checks that there is a response for every call in the batch. Otherwise,
+ * an error will be signaled (a call without a response indicates that the 
+ * server failed to send complete batch response). 
+ */
+dwr.engine._validateBatch = function(batch) {
+  // If some call left unreplied, report an error.
+  if (!batch.completed) {
+    for (var i = 0; i < batch.map.callCount; i++) {
+      if (batch.handlers[i] != null) {
+        dwr.engine._handleWarning(batch, { name:"dwr.engine.incompleteReply", message:"Incomplete reply from server" });
+        break;
+      }
+    }
+  }
+}
+
+/** @private Called from iframe onload, check batch using batch-id */
+dwr.engine._iframeLoadingComplete = function(batchId) {
+  // dwr.engine._checkCometPoll();
+  var batch = dwr.engine._batches[batchId];
+  if (batch) dwr.engine._validateBatch(batch);
+}
+
+/** @private Called by the server: Execute a callback */
+dwr.engine._remoteHandleCallback = function(batchId, callId, reply) {
+  var batch = dwr.engine._batches[batchId];
+  if (batch == null) {
+    dwr.engine._debug("Warning: batch == null in remoteHandleCallback for batchId=" + batchId, true);
+    return;
+  }
+  // Error handlers inside here indicate an error that is nothing to do
+  // with DWR so we handle them differently.
+  try {
+    var handlers = batch.handlers[callId];
+    batch.handlers[callId] = null;
+    if (!handlers) {
+      dwr.engine._debug("Warning: Missing handlers. callId=" + callId, true);
+    }
+    else if (typeof handlers.callback == "function") handlers.callback(reply);
+  }
+  catch (ex) {
+    dwr.engine._handleError(batch, ex);
+  }
+};
+
+/** @private Called by the server: Handle an exception for a call */
+dwr.engine._remoteHandleException = function(batchId, callId, ex) {
+  var batch = dwr.engine._batches[batchId];
+  if (batch == null) { dwr.engine._debug("Warning: null batch in remoteHandleException", true); return; }
+  var handlers = batch.handlers[callId];
+  batch.handlers[callId] = null;
+  if (handlers == null) { dwr.engine._debug("Warning: null handlers in remoteHandleException", true); return; }
+  if (ex.message == undefined) ex.message = "";
+  if (typeof handlers.exceptionHandler == "function") handlers.exceptionHandler(ex.message, ex);
+  else if (typeof batch.errorHandler == "function") batch.errorHandler(ex.message, ex);
+};
+
+/** @private Called by the server: The whole batch is broken */
+dwr.engine._remoteHandleBatchException = function(ex, batchId) {
+  var searchBatch = (dwr.engine._receivedBatch == null && batchId != null);
+  if (searchBatch) {
+    dwr.engine._receivedBatch = dwr.engine._batches[batchId];
+  }
+  if (ex.message == undefined) ex.message = "";
+  dwr.engine._handleError(dwr.engine._receivedBatch, ex);
+  if (searchBatch) {
+    dwr.engine._receivedBatch = null;
+    dwr.engine._clearUp(dwr.engine._batches[batchId]);
+  }
+};
+
+/** @private Called by the server: Reverse ajax should not be used */
+dwr.engine._remotePollCometDisabled = function(ex, batchId) {
+  dwr.engine.setActiveReverseAjax(false);
+  var searchBatch = (dwr.engine._receivedBatch == null && batchId != null);
+  if (searchBatch) {
+    dwr.engine._receivedBatch = dwr.engine._batches[batchId];
+  }
+  if (ex.message == undefined) ex.message = "";
+  dwr.engine._handleError(dwr.engine._receivedBatch, ex);
+  if (searchBatch) {
+    dwr.engine._receivedBatch = null;
+    dwr.engine._clearUp(dwr.engine._batches[batchId]);
+  }
+};
+
+/** @private Called by the server: An IFrame reply is about to start */
+dwr.engine._remoteBeginIFrameResponse = function(iframe, batchId) {
+  if (iframe != null) dwr.engine._receivedBatch = iframe.batch;
+  dwr.engine._callPostHooks(dwr.engine._receivedBatch);
+};
+
+/** @private Called by the server: An IFrame reply is just completing */
+dwr.engine._remoteEndIFrameResponse = function(batchId) {
+  dwr.engine._clearUp(dwr.engine._receivedBatch);
+  dwr.engine._receivedBatch = null;
+};
+
+/** @private This is a hack to make the context be this window */
+dwr.engine._eval = function(script) {
+  if (script == null) return null;
+  if (script == "") { dwr.engine._debug("Warning: blank script", true); return null; }
+  // dwr.engine._debug("Exec: [" + script + "]", true);
+  return eval(script);
+};
+
+/** @private Called as a result of a request timeout */
+dwr.engine._abortRequest = function(batch) {
+  if (batch && !batch.completed) {
+    dwr.engine._clearUp(batch);
+    if (batch.req) batch.req.abort();
+    dwr.engine._handleError(batch, { name:"dwr.engine.timeout", message:"Timeout" });
+  }
+};
+
+/** @private call all the post hooks for a batch */
+dwr.engine._callPostHooks = function(batch) {
+  if (batch.postHooks) {
+    for (var i = 0; i < batch.postHooks.length; i++) {
+      batch.postHooks[i]();
+    }
+    batch.postHooks = null;
+  }
+};
+
+/** @private A call has finished by whatever means and we need to shut it all down. */
+dwr.engine._clearUp = function(batch) {
+  if (!batch) { dwr.engine._debug("Warning: null batch in dwr.engine._clearUp()", true); return; }
+  if (batch.completed) { dwr.engine._debug("Warning: Double complete", true); return; }
+
+  // IFrame tidyup
+  if (batch.div) batch.div.parentNode.removeChild(batch.div);
+  if (batch.iframe) {
+    // If this is a poll frame then stop comet polling
+    for (var i = 0; i < dwr.engine._outstandingIFrames.length; i++) {
+      if (dwr.engine._outstandingIFrames[i] == batch.iframe) {
+        dwr.engine._outstandingIFrames.splice(i, 1);
+      }
+    }
+    batch.iframe.parentNode.removeChild(batch.iframe);
+  }
+  if (batch.form) batch.form.parentNode.removeChild(batch.form);
+
+  // XHR tidyup: avoid IE handles increase
+  if (batch.req) {
+    // If this is a poll frame then stop comet polling
+    if (batch.req == dwr.engine._pollReq) dwr.engine._pollReq = null;
+    delete batch.req;
+  }
+
+  // Timeout tidyup
+  if (batch.timeoutId != null) {
+    clearTimeout(batch.timeoutId);
+    delete batch.timeoutId;
+  }
+
+  if (batch.map && (batch.map.batchId || batch.map.batchId == 0)) {
+    delete dwr.engine._batches[batch.map.batchId];
+    dwr.engine._batchesLength--;
+  }
+
+  batch.completed = true;
+
+  // If there is anything on the queue waiting to go out, then send it.
+  // We don't need to check for ordered mode, here because when ordered mode
+  // gets turned off, we still process *waiting* batches in an ordered way.
+  if (dwr.engine._batchQueue.length != 0) {
+    var sendbatch = dwr.engine._batchQueue.shift();
+    dwr.engine._sendData(sendbatch);
+  }
+};
+
+/** @private Abort any XHRs in progress at page unload (solves zombie socket problems in IE). */
+dwr.engine._unloader = function() {
+  dwr.engine._unloading = true;
+
+  // Empty queue of waiting ordered requests
+  dwr.engine._batchQueue.length = 0;
+
+  // Abort any ongoing XHRs and clear their batches
+  for (var batchId in dwr.engine._batches) {
+    var batch = dwr.engine._batches[batchId];
+    // Only process objects that look like batches (avoid prototype additions!)
+    if (batch && batch.map) {
+      if (batch.req) {
+        batch.req.abort();
+      }
+      dwr.engine._clearUp(batch);
+    }
+  }
+};
+// Now register the unload handler
+if (window.addEventListener) window.addEventListener('unload', dwr.engine._unloader, false);
+else if (window.attachEvent) window.attachEvent('onunload', dwr.engine._unloader);
+
+/** @private Generic error handling routing to save having null checks everywhere */
+dwr.engine._handleError = function(batch, ex) {
+  if (typeof ex == "string") ex = { name:"unknown", message:ex };
+  if (ex.message == null) ex.message = "";
+  if (ex.name == null) ex.name = "unknown";
+  if (batch && typeof batch.errorHandler == "function") batch.errorHandler(ex.message, ex);
+  else if (dwr.engine._errorHandler) dwr.engine._errorHandler(ex.message, ex);
+  if (batch) dwr.engine._clearUp(batch);
+};
+
+/** @private Generic error handling routing to save having null checks everywhere */
+dwr.engine._handleWarning = function(batch, ex) {
+  if (typeof ex == "string") ex = { name:"unknown", message:ex };
+  if (ex.message == null) ex.message = "";
+  if (ex.name == null) ex.name = "unknown";
+  if (batch && typeof batch.warningHandler == "function") batch.warningHandler(ex.message, ex);
+  else if (dwr.engine._warningHandler) dwr.engine._warningHandler(ex.message, ex);
+  if (batch) dwr.engine._clearUp(batch);
+};
+
+/**
+ * @private Marshall a data item
+ * @param batch A map of variables to how they have been marshalled
+ * @param referto An array of already marshalled variables to prevent recurrsion
+ * @param data The data to be marshalled
+ * @param name The name of the data being marshalled
+ */
+dwr.engine._serializeAll = function(batch, referto, data, name) {
+  if (data == null) {
+    batch.map[name] = "null:null";
+    return;
+  }
+
+  switch (typeof data) {
+  case "boolean":
+    batch.map[name] = "boolean:" + data;
+    break;
+  case "number":
+    batch.map[name] = "number:" + data;
+    break;
+  case "string":
+    batch.map[name] = "string:" + encodeURIComponent(data);
+    break;
+  case "object":
+    var objstr = Object.prototype.toString.call(data);
+    if (objstr == "[object String]") batch.map[name] = "String:" + encodeURIComponent(data);
+    else if (objstr == "[object Boolean]") batch.map[name] = "Boolean:" + data;
+    else if (objstr == "[object Number]") batch.map[name] = "Number:" + data;
+    else if (objstr == "[object Date]") batch.map[name] = "Date:" + data.getTime();
+    else if (objstr == "[object Array]") batch.map[name] = dwr.engine._serializeArray(batch, referto, data, name);
+    else batch.map[name] = dwr.engine._serializeObject(batch, referto, data, name);
+    break;
+  case "function":
+    // We just ignore functions.
+    break;
+  default:
+    dwr.engine._handleWarning(null, { name:"dwr.engine.unexpectedType", message:"Unexpected type: " + typeof data + ", attempting default converter." });
+    batch.map[name] = "default:" + data;
+    break;
+  }
+};
+
+/** @private Have we already converted this object? */
+dwr.engine._lookup = function(referto, data, name) {
+  var lookup;
+  // Can't use a map: getahead.org/ajax/javascript-gotchas
+  for (var i = 0; i < referto.length; i++) {
+    if (referto[i].data == data) {
+      lookup = referto[i];
+      break;
+    }
+  }
+  if (lookup) return "reference:" + lookup.name;
+  referto.push({ data:data, name:name });
+  return null;
+};
+
+/** @private Marshall an object */
+dwr.engine._serializeObject = function(batch, referto, data, name) {
+  var ref = dwr.engine._lookup(referto, data, name);
+  if (ref) return ref;
+
+  // This check for an HTML is not complete, but is there a better way?
+  // Maybe we should add: data.hasChildNodes typeof "function" == true
+  if (data.nodeName && data.nodeType) {
+    return dwr.engine._serializeXml(batch, referto, data, name);
+  }
+
+  // treat objects as an associative arrays
+  var reply = "Object_" + dwr.engine._getObjectClassName(data) + ":{";
+  var element;
+  for (element in data) {
+    if (typeof data[element] != "function") {
+      batch.paramCount++;
+      var childName = "c" + dwr.engine._batch.map.callCount + "-e" + batch.paramCount;
+      dwr.engine._serializeAll(batch, referto, data[element], childName);
+
+      reply += encodeURIComponent(element) + ":reference:" + childName + ", ";
+    }
+  }
+
+  if (reply.substring(reply.length - 2) == ", ") {
+    reply = reply.substring(0, reply.length - 2);
+  }
+  reply += "}";
+
+  return reply;
+};
+
+/** @private Returns the classname of supplied argument obj */
+dwr.engine._errorClasses = { "Error":Error, "EvalError":EvalError, "RangeError":RangeError, "ReferenceError":ReferenceError, "SyntaxError":SyntaxError, "TypeError":TypeError, "URIError":URIError };
+dwr.engine._getObjectClassName = function(obj) {
+  // Try to find the classname by stringifying the object's constructor
+  // and extract  from "function ".
+  if (obj && obj.constructor && obj.constructor.toString)
+  {
+    var str = obj.constructor.toString();
+    var regexpmatch = str.match(/function\s+(\w+)/);
+    if (regexpmatch && regexpmatch.length == 2) {
+      return regexpmatch[1];
+    }
+  }
+
+  // Now manually test against the core Error classes, as these in some 
+  // browsers successfully match to the wrong class in the 
+  // Object.toString() test we will do later
+  if (obj && obj.constructor) {
+    for (var errorname in dwr.engine._errorClasses) {
+      if (obj.constructor == dwr.engine._errorClasses[errorname]) return errorname;
+    }
+  }
+
+  // Try to find the classname by calling Object.toString() on the object
+  // and extracting  from "[object ]"
+  if (obj) {
+    var str = Object.prototype.toString.call(obj);
+    var regexpmatch = str.match(/\[object\s+(\w+)/);
+    if (regexpmatch && regexpmatch.length==2) {
+      return regexpmatch[1];
+    }
+  }
+
+  // Supplied argument was probably not an object, but what is better?
+  return "Object";
+};
+
+/** @private Marshall an object */
+dwr.engine._serializeXml = function(batch, referto, data, name) {
+  var ref = dwr.engine._lookup(referto, data, name);
+  if (ref) return ref;
+
+  var output;
+  if (window.XMLSerializer) output = new XMLSerializer().serializeToString(data);
+  else if (data.toXml) output = data.toXml;
+  else output = data.innerHTML;
+
+  return "XML:" + encodeURIComponent(output);
+};
+
+/** @private Marshall an array */
+dwr.engine._serializeArray = function(batch, referto, data, name) {
+  var ref = dwr.engine._lookup(referto, data, name);
+  if (ref) return ref;
+
+  if (document.all && !window.opera) {
+    // Use array joining on IE (fastest)
+    var buf = ["Array:["];
+    for (var i = 0; i < data.length; i++) {
+      if (i != 0) buf.push(",");
+      batch.paramCount++;
+      var childName = "c" + dwr.engine._batch.map.callCount + "-e" + batch.paramCount;
+      dwr.engine._serializeAll(batch, referto, data[i], childName);
+      buf.push("reference:");
+      buf.push(childName);
+    }
+    buf.push("]");
+    reply = buf.join("");
+  }
+  else {
+    // Use string concat on other browsers (fastest)
+    var reply = "Array:[";
+    for (var i = 0; i < data.length; i++) {
+      if (i != 0) reply += ",";
+      batch.paramCount++;
+      var childName = "c" + dwr.engine._batch.map.callCount + "-e" + batch.paramCount;
+      dwr.engine._serializeAll(batch, referto, data[i], childName);
+      reply += "reference:";
+      reply += childName;
+    }
+    reply += "]";
+  }
+
+  return reply;
+};
+
+/** @private Convert an XML string into a DOM object. */
+dwr.engine._unserializeDocument = function(xml) {
+  var dom;
+  if (window.DOMParser) {
+    var parser = new DOMParser();
+    dom = parser.parseFromString(xml, "text/xml");
+    if (!dom.documentElement || dom.documentElement.tagName == "parsererror") {
+      var message = dom.documentElement.firstChild.data;
+      message += "\n" + dom.documentElement.firstChild.nextSibling.firstChild.data;
+      throw message;
+    }
+    return dom;
+  }
+  else if (window.ActiveXObject) {
+    dom = dwr.engine._newActiveXObject(dwr.engine._DOMDocument);
+    dom.loadXML(xml); // What happens on parse fail with IE?
+    return dom;
+  }
+  else {
+    var div = document.createElement("div");
+    div.innerHTML = xml;
+    return div;
+  }
+};
+
+/** @param axarray An array of strings to attempt to create ActiveX objects from */
+dwr.engine._newActiveXObject = function(axarray) {
+  var returnValue;  
+  for (var i = 0; i < axarray.length; i++) {
+    try {
+      returnValue = new ActiveXObject(axarray[i]);
+      break;
+    }
+    catch (ex) { /* ignore */ }
+  }
+  return returnValue;
+};
+
+/** @private Used internally when some message needs to get to the programmer */
+dwr.engine._debug = function(message, stacktrace) {
+  var written = false;
+  try {
+    if (window.console) {
+      if (stacktrace && window.console.trace) window.console.trace();
+      window.console.log(message);
+      written = true;
+    }
+    else if (window.opera && window.opera.postError) {
+      window.opera.postError(message);
+      written = true;
+    }
+  }
+  catch (ex) { /* ignore */ }
+
+  if (!written) {
+    var debug = document.getElementById("dwr-debug");
+    if (debug) {
+      var contents = message + "
" + debug.innerHTML; + if (contents.length > 2048) contents = contents.substring(0, 2048); + debug.innerHTML = contents; + } + } +}; + +window.dwr = dwr; +window.DWREngine = DWREngine; +export default dwr; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/index.js b/gemma-web/src/main/webapp/scripts/api/dwr/index.js new file mode 100644 index 0000000000..ba03566a11 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/index.js @@ -0,0 +1,47 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +import dwr from './engine' +import './util' +import './models' +import './interface/AnnotationController' +import './interface/ArrayDesignController' +import './interface/ArrayDesignRepeatScanController' +import './interface/AuditController' +import './interface/BatchInfoFetchController' +import './interface/BibliographicReferenceController' +import './interface/BioAssayController' +import './interface/BioMaterialController' +import './interface/CharacteristicBrowserController' +import './interface/CoexpressionSearchController' +import './interface/CompositeSequenceController' +import './interface/DEDVController' +import './interface/DiffExMetaAnalyzerController' +import './interface/DifferentialExpressionAnalysisController' +import './interface/DifferentialExpressionSearchController' +import './interface/ExperimentalDesignController' +import './interface/ExpressionDataFileUploadController' +import './interface/ExpressionExperimentController' +import './interface/ExpressionExperimentDataFetchController' +import './interface/ExpressionExperimentLoadController' +import './interface/ExpressionExperimentReportGenerationController' +import './interface/ExpressionExperimentSetController' +import './interface/FeedReader' +import './interface/FileUploadController' +import './interface/GeneController' +import './interface/GenePickerController' +import './interface/GeneSetController' +import './interface/GeoRecordBrowserController' +import './interface/IndexService' +import './interface/JavascriptLogger' +import './interface/LinkAnalysisController' +import './interface/PreprocessController' +import './interface/ProgressStatusService' +import './interface/SearchService' +import './interface/SecurityController' +import './interface/SignupController' +import './interface/SvdController' +import './interface/SystemMonitorController' +import './interface/TaskCompletionController' +import './interface/TwoChannelMissingValueController' +import './interface/UserListController' +import './overrides' +export default dwr; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/AnnotationController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/AnnotationController.js new file mode 100644 index 0000000000..234a6aaa9a --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/AnnotationController.js @@ -0,0 +1,23 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var AnnotationController = {}; +AnnotationController._path = '/dwr'; +AnnotationController.createExperimentTag = function(p0, p1, callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'createExperimentTag', p0, p1, callback); +} +AnnotationController.reinitializeOntologyIndices = function(callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'reinitializeOntologyIndices', callback); +} +AnnotationController.removeExperimentTag = function(p0, p1, callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'removeExperimentTag', p0, p1, callback); +} +AnnotationController.findTerm = function(p0, p1, callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'findTerm', p0, p1, callback); +} +AnnotationController.getCategoryTerms = function(callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'getCategoryTerms', callback); +} +AnnotationController.getRelationTerms = function(callback) { + dwr.engine._execute(AnnotationController._path, 'AnnotationController', 'getRelationTerms', callback); +} +window.AnnotationController = AnnotationController; +export default AnnotationController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignController.js new file mode 100644 index 0000000000..0e932f6a4f --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignController.js @@ -0,0 +1,38 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ArrayDesignController = {}; +ArrayDesignController._path = '/dwr'; +ArrayDesignController.remove = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'remove', p0, callback); +} +ArrayDesignController.addAlternateName = function(p0, p1, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'addAlternateName', p0, p1, callback); +} +ArrayDesignController.getReportHtml = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'getReportHtml', p0, callback); +} +ArrayDesignController.getSummaryForArrayDesign = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'getSummaryForArrayDesign', p0, callback); +} +ArrayDesignController.loadArrayDesignsForShowAll = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'loadArrayDesignsForShowAll', p0, callback); +} +ArrayDesignController.getCsSummaries = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'getCsSummaries', p0, callback); +} +ArrayDesignController.loadArrayDesignsSummary = function(callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'loadArrayDesignsSummary', callback); +} +ArrayDesignController.updateReport = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'updateReport', p0, callback); +} +ArrayDesignController.updateReportById = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'updateReportById', p0, callback); +} +ArrayDesignController.getDetails = function(p0, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'getDetails', p0, callback); +} +ArrayDesignController.getArrayDesigns = function(p0, p1, p2, callback) { + dwr.engine._execute(ArrayDesignController._path, 'ArrayDesignController', 'getArrayDesigns', p0, p1, p2, callback); +} +window.ArrayDesignController = ArrayDesignController; +export default ArrayDesignController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignRepeatScanController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignRepeatScanController.js new file mode 100644 index 0000000000..d27f07cc8c --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ArrayDesignRepeatScanController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ArrayDesignRepeatScanController = {}; +ArrayDesignRepeatScanController._path = '/dwr'; +ArrayDesignRepeatScanController.run = function(p0, callback) { + dwr.engine._execute(ArrayDesignRepeatScanController._path, 'ArrayDesignRepeatScanController', 'run', p0, callback); +} +window.ArrayDesignRepeatScanController = ArrayDesignRepeatScanController; +export default ArrayDesignRepeatScanController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/AuditController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/AuditController.js new file mode 100644 index 0000000000..fac6d77d72 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/AuditController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var AuditController = {}; +AuditController._path = '/dwr'; +AuditController.addAuditEvent = function(p0, p1, p2, p3, callback) { + dwr.engine._execute(AuditController._path, 'AuditController', 'addAuditEvent', p0, p1, p2, p3, callback); +} +AuditController.getEvents = function(p0, callback) { + dwr.engine._execute(AuditController._path, 'AuditController', 'getEvents', p0, callback); +} +window.AuditController = AuditController; +export default AuditController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/BatchInfoFetchController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BatchInfoFetchController.js new file mode 100644 index 0000000000..2035b3e405 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BatchInfoFetchController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var BatchInfoFetchController = {}; +BatchInfoFetchController._path = '/dwr'; +BatchInfoFetchController.run = function(p0, callback) { + dwr.engine._execute(BatchInfoFetchController._path, 'BatchInfoFetchController', 'run', p0, callback); +} +window.BatchInfoFetchController = BatchInfoFetchController; +export default BatchInfoFetchController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/BibliographicReferenceController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BibliographicReferenceController.js new file mode 100644 index 0000000000..2f64fd6370 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BibliographicReferenceController.js @@ -0,0 +1,20 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var BibliographicReferenceController = {}; +BibliographicReferenceController._path = '/dwr'; +BibliographicReferenceController.update = function(p0, callback) { + dwr.engine._execute(BibliographicReferenceController._path, 'BibliographicReferenceController', 'update', p0, callback); +} +BibliographicReferenceController.load = function(p0, callback) { + dwr.engine._execute(BibliographicReferenceController._path, 'BibliographicReferenceController', 'load', p0, callback); +} +BibliographicReferenceController.search = function(p0, callback) { + dwr.engine._execute(BibliographicReferenceController._path, 'BibliographicReferenceController', 'search', p0, callback); +} +BibliographicReferenceController.loadFromPubmedID = function(p0, callback) { + dwr.engine._execute(BibliographicReferenceController._path, 'BibliographicReferenceController', 'loadFromPubmedID', p0, callback); +} +BibliographicReferenceController.browse = function(p0, callback) { + dwr.engine._execute(BibliographicReferenceController._path, 'BibliographicReferenceController', 'browse', p0, callback); +} +window.BibliographicReferenceController = BibliographicReferenceController; +export default BibliographicReferenceController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioAssayController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioAssayController.js new file mode 100644 index 0000000000..49b8a3b890 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioAssayController.js @@ -0,0 +1,14 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var BioAssayController = {}; +BioAssayController._path = '/dwr'; +BioAssayController.markOutlier = function(p0, callback) { + dwr.engine._execute(BioAssayController._path, 'BioAssayController', 'markOutlier', p0, callback); +} +BioAssayController.unmarkOutlier = function(p0, callback) { + dwr.engine._execute(BioAssayController._path, 'BioAssayController', 'unmarkOutlier', p0, callback); +} +BioAssayController.getBioAssays = function(p0, callback) { + dwr.engine._execute(BioAssayController._path, 'BioAssayController', 'getBioAssays', p0, callback); +} +window.BioAssayController = BioAssayController; +export default BioAssayController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioMaterialController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioMaterialController.js new file mode 100644 index 0000000000..194f537fe0 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/BioMaterialController.js @@ -0,0 +1,17 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var BioMaterialController = {}; +BioMaterialController._path = '/dwr'; +BioMaterialController.getAnnotation = function(p0, callback) { + dwr.engine._execute(BioMaterialController._path, 'BioMaterialController', 'getAnnotation', p0, callback); +} +BioMaterialController.addFactorValueTo = function(p0, p1, callback) { + dwr.engine._execute(BioMaterialController._path, 'BioMaterialController', 'addFactorValueTo', p0, p1, callback); +} +BioMaterialController.getFactorValues = function(p0, callback) { + dwr.engine._execute(BioMaterialController._path, 'BioMaterialController', 'getFactorValues', p0, callback); +} +BioMaterialController.getBioMaterials = function(p0, callback) { + dwr.engine._execute(BioMaterialController._path, 'BioMaterialController', 'getBioMaterials', p0, callback); +} +window.BioMaterialController = BioMaterialController; +export default BioMaterialController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/CharacteristicBrowserController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CharacteristicBrowserController.js new file mode 100644 index 0000000000..fb899ece0d --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CharacteristicBrowserController.js @@ -0,0 +1,23 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var CharacteristicBrowserController = {}; +CharacteristicBrowserController._path = '/dwr'; +CharacteristicBrowserController.count = function(callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'count', callback); +} +CharacteristicBrowserController.removeCharacteristics = function(p0, callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'removeCharacteristics', p0, callback); +} +CharacteristicBrowserController.updateCharacteristics = function(p0, callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'updateCharacteristics', p0, callback); +} +CharacteristicBrowserController.findCharacteristics = function(p0, callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'findCharacteristics', p0, callback); +} +CharacteristicBrowserController.findCharacteristicsCustom = function(p0, p1, p2, p3, p4, p5, p6, p7, callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'findCharacteristicsCustom', p0, p1, p2, p3, p4, p5, p6, p7, callback); +} +CharacteristicBrowserController.browse = function(p0, callback) { + dwr.engine._execute(CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'browse', p0, callback); +} +window.CharacteristicBrowserController = CharacteristicBrowserController; +export default CharacteristicBrowserController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/CoexpressionSearchController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CoexpressionSearchController.js new file mode 100644 index 0000000000..56de9c04f9 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CoexpressionSearchController.js @@ -0,0 +1,14 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var CoexpressionSearchController = {}; +CoexpressionSearchController._path = '/dwr'; +CoexpressionSearchController.doBackgroundCoexSearch = function(p0, callback) { + dwr.engine._execute(CoexpressionSearchController._path, 'CoexpressionSearchController', 'doBackgroundCoexSearch', p0, callback); +} +CoexpressionSearchController.doSearch = function(p0, callback) { + dwr.engine._execute(CoexpressionSearchController._path, 'CoexpressionSearchController', 'doSearch', p0, callback); +} +CoexpressionSearchController.doSearchQuickComplete = function(p0, p1, callback) { + dwr.engine._execute(CoexpressionSearchController._path, 'CoexpressionSearchController', 'doSearchQuickComplete', p0, p1, callback); +} +window.CoexpressionSearchController = CoexpressionSearchController; +export default CoexpressionSearchController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/CompositeSequenceController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CompositeSequenceController.js new file mode 100644 index 0000000000..a6c90b9500 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/CompositeSequenceController.js @@ -0,0 +1,17 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var CompositeSequenceController = {}; +CompositeSequenceController._path = '/dwr'; +CompositeSequenceController.search = function(p0, p1, callback) { + dwr.engine._execute(CompositeSequenceController._path, 'CompositeSequenceController', 'search', p0, p1, callback); +} +CompositeSequenceController.getCsSummaries = function(p0, callback) { + dwr.engine._execute(CompositeSequenceController._path, 'CompositeSequenceController', 'getCsSummaries', p0, callback); +} +CompositeSequenceController.getGeneCsSummaries = function(p0, callback) { + dwr.engine._execute(CompositeSequenceController._path, 'CompositeSequenceController', 'getGeneCsSummaries', p0, callback); +} +CompositeSequenceController.getGeneMappingSummary = function(p0, callback) { + dwr.engine._execute(CompositeSequenceController._path, 'CompositeSequenceController', 'getGeneMappingSummary', p0, callback); +} +window.CompositeSequenceController = CompositeSequenceController; +export default CompositeSequenceController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/DEDVController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DEDVController.js new file mode 100644 index 0000000000..01a45cbf9e --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DEDVController.js @@ -0,0 +1,29 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var DEDVController = {}; +DEDVController._path = '/dwr'; +DEDVController.getDEDVForDiffExVisualizationByExperiment = function(p0, p1, p2, p3, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualizationByExperiment', p0, p1, p2, p3, callback); +} +DEDVController.getDEDVForDiffExVisualizationByThreshold = function(p0, p1, p2, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualizationByThreshold', p0, p1, p2, callback); +} +DEDVController.getDEDVForPcaVisualization = function(p0, p1, p2, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForPcaVisualization', p0, p1, p2, callback); +} +DEDVController.getDEDVForVisualization = function(p0, p1, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForVisualization', p0, p1, callback); +} +DEDVController.getDEDVForVisualizationByProbe = function(p0, p1, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForVisualizationByProbe', p0, p1, callback); +} +DEDVController.getDEDV = function(p0, p1, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDV', p0, p1, callback); +} +DEDVController.getDEDVForDiffExVisualization = function(p0, p1, p2, p3, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualization', p0, p1, p2, p3, callback); +} +DEDVController.getDEDVForCoexpressionVisualization = function(p0, p1, p2, callback) { + dwr.engine._execute(DEDVController._path, 'DEDVController', 'getDEDVForCoexpressionVisualization', p0, p1, p2, callback); +} +window.DEDVController = DEDVController; +export default DEDVController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/DiffExMetaAnalyzerController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DiffExMetaAnalyzerController.js new file mode 100644 index 0000000000..d3916d021c --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DiffExMetaAnalyzerController.js @@ -0,0 +1,20 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var DiffExMetaAnalyzerController = {}; +DiffExMetaAnalyzerController._path = '/dwr'; +DiffExMetaAnalyzerController.analyzeResultSets = function(p0, callback) { + dwr.engine._execute(DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'analyzeResultSets', p0, callback); +} +DiffExMetaAnalyzerController.removeMetaAnalysis = function(p0, callback) { + dwr.engine._execute(DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'removeMetaAnalysis', p0, callback); +} +DiffExMetaAnalyzerController.saveResultSets = function(p0, p1, p2, callback) { + dwr.engine._execute(DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'saveResultSets', p0, p1, p2, callback); +} +DiffExMetaAnalyzerController.findDetailMetaAnalysisById = function(p0, callback) { + dwr.engine._execute(DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'findDetailMetaAnalysisById', p0, callback); +} +DiffExMetaAnalyzerController.loadAllMetaAnalyses = function(callback) { + dwr.engine._execute(DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'loadAllMetaAnalyses', callback); +} +window.DiffExMetaAnalyzerController = DiffExMetaAnalyzerController; +export default DiffExMetaAnalyzerController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionAnalysisController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionAnalysisController.js new file mode 100644 index 0000000000..a51ee1f816 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionAnalysisController.js @@ -0,0 +1,23 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var DifferentialExpressionAnalysisController = {}; +DifferentialExpressionAnalysisController._path = '/dwr'; +DifferentialExpressionAnalysisController.run = function(p0, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'run', p0, callback); +} +DifferentialExpressionAnalysisController.remove = function(p0, p1, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'remove', p0, p1, callback); +} +DifferentialExpressionAnalysisController.determineAnalysisType = function(p0, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'determineAnalysisType', p0, callback); +} +DifferentialExpressionAnalysisController.redo = function(p0, p1, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'redo', p0, p1, callback); +} +DifferentialExpressionAnalysisController.refreshStats = function(p0, p1, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'refreshStats', p0, p1, callback); +} +DifferentialExpressionAnalysisController.runCustom = function(p0, p1, p2, p3, callback) { + dwr.engine._execute(DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', 'runCustom', p0, p1, p2, p3, callback); +} +window.DifferentialExpressionAnalysisController = DifferentialExpressionAnalysisController; +export default DifferentialExpressionAnalysisController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionSearchController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionSearchController.js new file mode 100644 index 0000000000..fa4cfe703b --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/DifferentialExpressionSearchController.js @@ -0,0 +1,20 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var DifferentialExpressionSearchController = {}; +DifferentialExpressionSearchController._path = '/dwr'; +DifferentialExpressionSearchController.scheduleDiffExpSearchTask = function(p0, p1, p2, callback) { + dwr.engine._execute(DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', 'scheduleDiffExpSearchTask', p0, p1, p2, callback); +} +DifferentialExpressionSearchController.getDifferentialExpressionWithoutBatch = function(p0, p1, p2, callback) { + dwr.engine._execute(DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', 'getDifferentialExpressionWithoutBatch', p0, p1, p2, callback); +} +DifferentialExpressionSearchController.getFactors = function(p0, callback) { + dwr.engine._execute(DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', 'getFactors', p0, callback); +} +DifferentialExpressionSearchController.getDifferentialExpression = function(p0, p1, p2, callback) { + dwr.engine._execute(DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', 'getDifferentialExpression', p0, p1, p2, callback); +} +DifferentialExpressionSearchController.getDifferentialExpression = function(p0, p1, callback) { + dwr.engine._execute(DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', 'getDifferentialExpression', p0, p1, callback); +} +window.DifferentialExpressionSearchController = DifferentialExpressionSearchController; +export default DifferentialExpressionSearchController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExperimentalDesignController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExperimentalDesignController.js new file mode 100644 index 0000000000..3849f86a04 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExperimentalDesignController.js @@ -0,0 +1,59 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExperimentalDesignController = {}; +ExperimentalDesignController._path = '/dwr'; +ExperimentalDesignController.getBioMaterialCharacteristicCategories = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'getBioMaterialCharacteristicCategories', p0, callback); +} +ExperimentalDesignController.getFactorValuesWithCharacteristics = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'getFactorValuesWithCharacteristics', p0, callback); +} +ExperimentalDesignController.updateExperimentalFactors = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'updateExperimentalFactors', p0, callback); +} +ExperimentalDesignController.updateFactorValueCharacteristics = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'updateFactorValueCharacteristics', p0, callback); +} +ExperimentalDesignController.markFactorValuesAsNeedsAttention = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'markFactorValuesAsNeedsAttention', p0, p1, callback); +} +ExperimentalDesignController.clearFactorValuesNeedsAttention = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'clearFactorValuesNeedsAttention', p0, p1, callback); +} +ExperimentalDesignController.createDesignFromFile = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'createDesignFromFile', p0, p1, callback); +} +ExperimentalDesignController.createFactorValue = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'createFactorValue', p0, callback); +} +ExperimentalDesignController.createFactorValueCharacteristic = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'createFactorValueCharacteristic', p0, p1, callback); +} +ExperimentalDesignController.deleteExperimentalFactors = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteExperimentalFactors', p0, p1, callback); +} +ExperimentalDesignController.deleteFactorValueCharacteristics = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteFactorValueCharacteristics', p0, callback); +} +ExperimentalDesignController.duplicateFactorValue = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'duplicateFactorValue', p0, p1, callback); +} +ExperimentalDesignController.getExperimentalFactors = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'getExperimentalFactors', p0, callback); +} +ExperimentalDesignController.getFactorValues = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'getFactorValues', p0, callback); +} +ExperimentalDesignController.createExperimentalFactor = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'createExperimentalFactor', p0, p1, callback); +} +ExperimentalDesignController.deleteFactorValues = function(p0, p1, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteFactorValues', p0, p1, callback); +} +ExperimentalDesignController.getBioMaterials = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'getBioMaterials', p0, callback); +} +ExperimentalDesignController.updateBioMaterials = function(p0, callback) { + dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'updateBioMaterials', p0, callback); +} +window.ExperimentalDesignController = ExperimentalDesignController; +export default ExperimentalDesignController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionDataFileUploadController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionDataFileUploadController.js new file mode 100644 index 0000000000..85f2c6abc5 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionDataFileUploadController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionDataFileUploadController = {}; +ExpressionDataFileUploadController._path = '/dwr'; +ExpressionDataFileUploadController.validate = function(p0, callback) { + dwr.engine._execute(ExpressionDataFileUploadController._path, 'ExpressionDataFileUploadController', 'validate', p0, callback); +} +ExpressionDataFileUploadController.load = function(p0, callback) { + dwr.engine._execute(ExpressionDataFileUploadController._path, 'ExpressionDataFileUploadController', 'load', p0, callback); +} +window.ExpressionDataFileUploadController = ExpressionDataFileUploadController; +export default ExpressionDataFileUploadController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentController.js new file mode 100644 index 0000000000..ac9cad44a8 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentController.js @@ -0,0 +1,95 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionExperimentController = {}; +ExpressionExperimentController._path = '/dwr'; +ExpressionExperimentController.getAnnotation = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getAnnotation', p0, callback); +} +ExpressionExperimentController.find = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'find', p0, p1, callback); +} +ExpressionExperimentController.unmatchAllBioAssays = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'unmatchAllBioAssays', p0, callback); +} +ExpressionExperimentController.updateBasics = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'updateBasics', p0, callback); +} +ExpressionExperimentController.updatePubMed = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'updatePubMed', p0, p1, callback); +} +ExpressionExperimentController.getDesignMatrixRows = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getDesignMatrixRows', p0, callback); +} +ExpressionExperimentController.loadCountsForDataSummaryTable = function(callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadCountsForDataSummaryTable', callback); +} +ExpressionExperimentController.loadExpressionExperimentDetails = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadExpressionExperimentDetails', p0, callback); +} +ExpressionExperimentController.recalculateBatchConfound = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'recalculateBatchConfound', p0, callback); +} +ExpressionExperimentController.recalculateBatchEffect = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'recalculateBatchEffect', p0, callback); +} +ExpressionExperimentController.runGeeq = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'runGeeq', p0, p1, callback); +} +ExpressionExperimentController.loadExpressionExperiments = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadExpressionExperiments', p0, callback); +} +ExpressionExperimentController.loadExperimentsForPlatform = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadExperimentsForPlatform', p0, callback); +} +ExpressionExperimentController.loadDetailedExpressionExperiments = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadDetailedExpressionExperiments', p0, callback); +} +ExpressionExperimentController.loadExpressionExperimentsWithQcIssues = function(callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadExpressionExperimentsWithQcIssues', callback); +} +ExpressionExperimentController.loadQuantitationTypes = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadQuantitationTypes', p0, callback); +} +ExpressionExperimentController.loadStatusSummaries = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadStatusSummaries', p0, p1, p2, p3, p4, callback); +} +ExpressionExperimentController.removePrimaryPublication = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'removePrimaryPublication', p0, callback); +} +ExpressionExperimentController.browseByTaxon = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'browseByTaxon', p0, p1, callback); +} +ExpressionExperimentController.browseSpecificIds = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'browseSpecificIds', p0, p1, callback); +} +ExpressionExperimentController.canCurrentUserEditExperiment = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'canCurrentUserEditExperiment', p0, callback); +} +ExpressionExperimentController.clearFromCaches = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'clearFromCaches', p0, callback); +} +ExpressionExperimentController.deleteById = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'deleteById', p0, callback); +} +ExpressionExperimentController.searchExpressionExperiments = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'searchExpressionExperiments', p0, callback); +} +ExpressionExperimentController.getExperimentalFactors = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getExperimentalFactors', p0, callback); +} +ExpressionExperimentController.getFactorValues = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getFactorValues', p0, callback); +} +ExpressionExperimentController.browse = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'browse', p0, callback); +} +ExpressionExperimentController.getAllTaxonExperimentGroup = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getAllTaxonExperimentGroup', p0, callback); +} +ExpressionExperimentController.searchExperimentsAndExperimentGroups = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'searchExperimentsAndExperimentGroups', p0, p1, callback); +} +ExpressionExperimentController.getDescription = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', 'getDescription', p0, callback); +} +window.ExpressionExperimentController = ExpressionExperimentController; +export default ExpressionExperimentController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentDataFetchController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentDataFetchController.js new file mode 100644 index 0000000000..2aab950308 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentDataFetchController.js @@ -0,0 +1,17 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionExperimentDataFetchController = {}; +ExpressionExperimentDataFetchController._path = '/dwr'; +ExpressionExperimentDataFetchController.getMetadataFiles = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', 'getMetadataFiles', p0, callback); +} +ExpressionExperimentDataFetchController.getCoExpressionDataFile = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', 'getCoExpressionDataFile', p0, callback); +} +ExpressionExperimentDataFetchController.getDiffExpressionDataFile = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', 'getDiffExpressionDataFile', p0, callback); +} +ExpressionExperimentDataFetchController.getDataFile = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', 'getDataFile', p0, callback); +} +window.ExpressionExperimentDataFetchController = ExpressionExperimentDataFetchController; +export default ExpressionExperimentDataFetchController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentLoadController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentLoadController.js new file mode 100644 index 0000000000..f7ec128a50 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentLoadController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionExperimentLoadController = {}; +ExpressionExperimentLoadController._path = '/dwr'; +ExpressionExperimentLoadController.load = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentLoadController._path, 'ExpressionExperimentLoadController', 'load', p0, callback); +} +window.ExpressionExperimentLoadController = ExpressionExperimentLoadController; +export default ExpressionExperimentLoadController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentReportGenerationController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentReportGenerationController.js new file mode 100644 index 0000000000..68411cab83 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentReportGenerationController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionExperimentReportGenerationController = {}; +ExpressionExperimentReportGenerationController._path = '/dwr'; +ExpressionExperimentReportGenerationController.run = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentReportGenerationController._path, 'ExpressionExperimentReportGenerationController', 'run', p0, callback); +} +ExpressionExperimentReportGenerationController.runAll = function(callback) { + dwr.engine._execute(ExpressionExperimentReportGenerationController._path, 'ExpressionExperimentReportGenerationController', 'runAll', callback); +} +window.ExpressionExperimentReportGenerationController = ExpressionExperimentReportGenerationController; +export default ExpressionExperimentReportGenerationController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentSetController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentSetController.js new file mode 100644 index 0000000000..35b8df83fa --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ExpressionExperimentSetController.js @@ -0,0 +1,62 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ExpressionExperimentSetController = {}; +ExpressionExperimentSetController._path = '/dwr'; +ExpressionExperimentSetController.remove = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'remove', p0, callback); +} +ExpressionExperimentSetController.update = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'update', p0, callback); +} +ExpressionExperimentSetController.load = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'load', p0, callback); +} +ExpressionExperimentSetController.create = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'create', p0, callback); +} +ExpressionExperimentSetController.canCurrentUserEditGroup = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'canCurrentUserEditGroup', p0, callback); +} +ExpressionExperimentSetController.loadAllSessionGroups = function(callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadAllSessionGroups', callback); +} +ExpressionExperimentSetController.loadAllUserAndSessionGroups = function(callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadAllUserAndSessionGroups', callback); +} +ExpressionExperimentSetController.loadByName = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadByName', p0, callback); +} +ExpressionExperimentSetController.removeUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'removeUserAndSessionGroups', p0, callback); +} +ExpressionExperimentSetController.updateNameDesc = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateNameDesc', p0, callback); +} +ExpressionExperimentSetController.updateSessionGroups = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateSessionGroups', p0, callback); +} +ExpressionExperimentSetController.updateUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateUserAndSessionGroups', p0, callback); +} +ExpressionExperimentSetController.addSessionGroups = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'addSessionGroups', p0, p1, callback); +} +ExpressionExperimentSetController.addSessionGroup = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'addSessionGroup', p0, p1, callback); +} +ExpressionExperimentSetController.addUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'addUserAndSessionGroups', p0, callback); +} +ExpressionExperimentSetController.getExperimentsInSet = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'getExperimentsInSet', p0, p1, callback); +} +ExpressionExperimentSetController.getExperimentIdsInSet = function(p0, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'getExperimentIdsInSet', p0, callback); +} +ExpressionExperimentSetController.updateMembers = function(p0, p1, callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateMembers', p0, p1, callback); +} +ExpressionExperimentSetController.loadAll = function(callback) { + dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadAll', callback); +} +window.ExpressionExperimentSetController = ExpressionExperimentSetController; +export default ExpressionExperimentSetController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/FeedReader.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/FeedReader.js new file mode 100644 index 0000000000..efb3d632fa --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/FeedReader.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var FeedReader = {}; +FeedReader._path = '/dwr'; +FeedReader.getLatestNews = function(callback) { + dwr.engine._execute(FeedReader._path, 'FeedReader', 'getLatestNews', callback); +} +window.FeedReader = FeedReader; +export default FeedReader; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/FileUploadController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/FileUploadController.js new file mode 100644 index 0000000000..c8b3062bc7 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/FileUploadController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var FileUploadController = {}; +FileUploadController._path = '/dwr'; +FileUploadController.getUploadStatus = function(callback) { + dwr.engine._execute(FileUploadController._path, 'FileUploadController', 'getUploadStatus', callback); +} +FileUploadController.upload = function(p0, callback) { + dwr.engine._execute(FileUploadController._path, 'FileUploadController', 'upload', p0, callback); +} +window.FileUploadController = FileUploadController; +export default FileUploadController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneController.js new file mode 100644 index 0000000000..e65b7a1b4f --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneController.js @@ -0,0 +1,14 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var GeneController = {}; +GeneController._path = '/dwr'; +GeneController.loadGeneDetails = function(p0, callback) { + dwr.engine._execute(GeneController._path, 'GeneController', 'loadGeneDetails', p0, callback); +} +GeneController.getProducts = function(p0, callback) { + dwr.engine._execute(GeneController._path, 'GeneController', 'getProducts', p0, callback); +} +GeneController.findGOTerms = function(p0, callback) { + dwr.engine._execute(GeneController._path, 'GeneController', 'findGOTerms', p0, callback); +} +window.GeneController = GeneController; +export default GeneController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/GenePickerController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GenePickerController.js new file mode 100644 index 0000000000..41b478641f --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GenePickerController.js @@ -0,0 +1,41 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var GenePickerController = {}; +GenePickerController._path = '/dwr'; +GenePickerController.searchGenesWithNCBIId = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'searchGenesWithNCBIId', p0, p1, callback); +} +GenePickerController.getGeneSetByGOId = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getGeneSetByGOId', p0, p1, callback); +} +GenePickerController.getTaxa = function(callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getTaxa', callback); +} +GenePickerController.getGenes = function(p0, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getGenes', p0, callback); +} +GenePickerController.searchGenes = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'searchGenes', p0, p1, callback); +} +GenePickerController.searchGenesAndGeneGroups = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'searchGenesAndGeneGroups', p0, p1, callback); +} +GenePickerController.searchMultipleGenes = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'searchMultipleGenes', p0, p1, callback); +} +GenePickerController.searchMultipleGenesGetMap = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'searchMultipleGenesGetMap', p0, p1, callback); +} +GenePickerController.getTaxaWithGenes = function(callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getTaxaWithGenes', callback); +} +GenePickerController.getTaxaWithDatasets = function(callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getTaxaWithDatasets', callback); +} +GenePickerController.getTaxaWithArrays = function(callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getTaxaWithArrays', callback); +} +GenePickerController.getGenesByGOId = function(p0, p1, callback) { + dwr.engine._execute(GenePickerController._path, 'GenePickerController', 'getGenesByGOId', p0, p1, callback); +} +window.GenePickerController = GenePickerController; +export default GenePickerController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneSetController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneSetController.js new file mode 100644 index 0000000000..c4b2b13e96 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeneSetController.js @@ -0,0 +1,68 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var GeneSetController = {}; +GeneSetController._path = '/dwr'; +GeneSetController.remove = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'remove', p0, callback); +} +GeneSetController.update = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'update', p0, callback); +} +GeneSetController.load = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'load', p0, callback); +} +GeneSetController.create = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'create', p0, callback); +} +GeneSetController.canCurrentUserEditGroup = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'canCurrentUserEditGroup', p0, callback); +} +GeneSetController.removeSessionGroups = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'removeSessionGroups', p0, callback); +} +GeneSetController.removeUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'removeUserAndSessionGroups', p0, callback); +} +GeneSetController.updateNameDesc = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateNameDesc', p0, callback); +} +GeneSetController.updateSessionGroups = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateSessionGroups', p0, callback); +} +GeneSetController.updateUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateUserAndSessionGroups', p0, callback); +} +GeneSetController.addSessionGroups = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'addSessionGroups', p0, p1, callback); +} +GeneSetController.addSessionGroup = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'addSessionGroup', p0, p1, callback); +} +GeneSetController.addUserAndSessionGroups = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'addUserAndSessionGroups', p0, callback); +} +GeneSetController.getUserAndSessionGeneGroups = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'getUserAndSessionGeneGroups', p0, p1, callback); +} +GeneSetController.getUserSessionGeneGroups = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'getUserSessionGeneGroups', p0, p1, callback); +} +GeneSetController.updateSessionGroup = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateSessionGroup', p0, callback); +} +GeneSetController.findGeneSetsByName = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'findGeneSetsByName', p0, p1, callback); +} +GeneSetController.findGeneSetsByGene = function(p0, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'findGeneSetsByGene', p0, callback); +} +GeneSetController.getUsersGeneGroups = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'getUsersGeneGroups', p0, p1, callback); +} +GeneSetController.getGenesInGroup = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'getGenesInGroup', p0, p1, callback); +} +GeneSetController.updateMembers = function(p0, p1, callback) { + dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateMembers', p0, p1, callback); +} +window.GeneSetController = GeneSetController; +export default GeneSetController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeoRecordBrowserController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeoRecordBrowserController.js new file mode 100644 index 0000000000..89d154949b --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/GeoRecordBrowserController.js @@ -0,0 +1,14 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var GeoRecordBrowserController = {}; +GeoRecordBrowserController._path = '/dwr'; +GeoRecordBrowserController.getDetails = function(p0, callback) { + dwr.engine._execute(GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'getDetails', p0, callback); +} +GeoRecordBrowserController.toggleUsability = function(p0, callback) { + dwr.engine._execute(GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'toggleUsability', p0, callback); +} +GeoRecordBrowserController.browse = function(p0, p1, p2, callback) { + dwr.engine._execute(GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'browse', p0, p1, p2, callback); +} +window.GeoRecordBrowserController = GeoRecordBrowserController; +export default GeoRecordBrowserController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/IndexService.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/IndexService.js new file mode 100644 index 0000000000..3626ae7597 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/IndexService.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var IndexService = {}; +IndexService._path = '/dwr'; +IndexService.index = function(p0, callback) { + dwr.engine._execute(IndexService._path, 'IndexService', 'index', p0, callback); +} +window.IndexService = IndexService; +export default IndexService; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/JavascriptLogger.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/JavascriptLogger.js new file mode 100644 index 0000000000..6f170a1d94 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/JavascriptLogger.js @@ -0,0 +1,23 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var JavascriptLogger = {}; +JavascriptLogger._path = '/dwr'; +JavascriptLogger.writeToErrorLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToErrorLog', p0, p1, p2, p3, p4, callback); +} +JavascriptLogger.writeToWarnLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToWarnLog', p0, p1, p2, p3, p4, callback); +} +JavascriptLogger.writeToFatalLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToFatalLog', p0, p1, p2, p3, p4, callback); +} +JavascriptLogger.writeToInfoLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToInfoLog', p0, p1, p2, p3, p4, callback); +} +JavascriptLogger.writeToLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToLog', p0, p1, p2, p3, p4, callback); +} +JavascriptLogger.writeToDebugLog = function(p0, p1, p2, p3, p4, callback) { + dwr.engine._execute(JavascriptLogger._path, 'JavascriptLogger', 'writeToDebugLog', p0, p1, p2, p3, p4, callback); +} +window.JavascriptLogger = JavascriptLogger; +export default JavascriptLogger; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/LinkAnalysisController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/LinkAnalysisController.js new file mode 100644 index 0000000000..14b5cda286 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/LinkAnalysisController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var LinkAnalysisController = {}; +LinkAnalysisController._path = '/dwr'; +LinkAnalysisController.run = function(p0, callback) { + dwr.engine._execute(LinkAnalysisController._path, 'LinkAnalysisController', 'run', p0, callback); +} +window.LinkAnalysisController = LinkAnalysisController; +export default LinkAnalysisController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/PreprocessController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/PreprocessController.js new file mode 100644 index 0000000000..919415af35 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/PreprocessController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var PreprocessController = {}; +PreprocessController._path = '/dwr'; +PreprocessController.run = function(p0, callback) { + dwr.engine._execute(PreprocessController._path, 'PreprocessController', 'run', p0, callback); +} +PreprocessController.diagnostics = function(p0, callback) { + dwr.engine._execute(PreprocessController._path, 'PreprocessController', 'diagnostics', p0, callback); +} +window.PreprocessController = PreprocessController; +export default PreprocessController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/ProgressStatusService.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ProgressStatusService.js new file mode 100644 index 0000000000..61faadf86d --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/ProgressStatusService.js @@ -0,0 +1,20 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var ProgressStatusService = {}; +ProgressStatusService._path = '/dwr'; +ProgressStatusService.cancelJob = function(p0, callback) { + dwr.engine._execute(ProgressStatusService._path, 'ProgressStatusService', 'cancelJob', p0, callback); +} +ProgressStatusService.getProgressStatus = function(p0, callback) { + dwr.engine._execute(ProgressStatusService._path, 'ProgressStatusService', 'getProgressStatus', p0, callback); +} +ProgressStatusService.getSubmittedTask = function(p0, callback) { + dwr.engine._execute(ProgressStatusService._path, 'ProgressStatusService', 'getSubmittedTask', p0, callback); +} +ProgressStatusService.getSubmittedTasks = function(callback) { + dwr.engine._execute(ProgressStatusService._path, 'ProgressStatusService', 'getSubmittedTasks', callback); +} +ProgressStatusService.addEmailAlert = function(p0, callback) { + dwr.engine._execute(ProgressStatusService._path, 'ProgressStatusService', 'addEmailAlert', p0, callback); +} +window.ProgressStatusService = ProgressStatusService; +export default ProgressStatusService; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/SearchService.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SearchService.js new file mode 100644 index 0000000000..586316c8ff --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SearchService.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var SearchService = {}; +SearchService._path = '/dwr'; +SearchService.ajaxSearch = function(p0, callback) { + dwr.engine._execute(SearchService._path, 'SearchService', 'ajaxSearch', p0, callback); +} +window.SearchService = SearchService; +export default SearchService; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/SecurityController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SecurityController.js new file mode 100644 index 0000000000..68b7b00e93 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SecurityController.js @@ -0,0 +1,65 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var SecurityController = {}; +SecurityController._path = '/dwr'; +SecurityController.createGroup = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'createGroup', p0, callback); +} +SecurityController.removeGroupReadable = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'removeGroupReadable', p0, p1, callback); +} +SecurityController.removeGroupWriteable = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'removeGroupWriteable', p0, p1, callback); +} +SecurityController.removeUsersFromGroup = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'removeUsersFromGroup', p0, p1, callback); +} +SecurityController.updatePermission = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'updatePermission', p0, callback); +} +SecurityController.updatePermissions = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'updatePermissions', p0, callback); +} +SecurityController.getAvailableGroups = function(callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getAvailableGroups', callback); +} +SecurityController.getAvailablePrincipalSids = function(callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getAvailablePrincipalSids', callback); +} +SecurityController.getSecurityInfo = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getSecurityInfo', p0, callback); +} +SecurityController.getUsersData = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getUsersData', p0, p1, callback); +} +SecurityController.makeGroupReadable = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'makeGroupReadable', p0, p1, callback); +} +SecurityController.makeGroupWriteable = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'makeGroupWriteable', p0, p1, callback); +} +SecurityController.getGroupMembers = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getGroupMembers', p0, callback); +} +SecurityController.deleteGroup = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'deleteGroup', p0, callback); +} +SecurityController.addUserToGroup = function(p0, p1, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'addUserToGroup', p0, p1, callback); +} +SecurityController.makePrivate = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'makePrivate', p0, callback); +} +SecurityController.makePublic = function(p0, callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'makePublic', p0, callback); +} +SecurityController.getAuthenticatedUserCount = function(callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getAuthenticatedUserCount', callback); +} +SecurityController.getAuthenticatedUserNames = function(callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getAuthenticatedUserNames', callback); +} +SecurityController.getAvailableSids = function(callback) { + dwr.engine._execute(SecurityController._path, 'SecurityController', 'getAvailableSids', callback); +} +window.SecurityController = SecurityController; +export default SecurityController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/SignupController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SignupController.js new file mode 100644 index 0000000000..d3a3da33e5 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SignupController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var SignupController = {}; +SignupController._path = '/dwr'; +SignupController.loginCheck = function(callback) { + dwr.engine._execute(SignupController._path, 'SignupController', 'loginCheck', callback); +} +window.SignupController = SignupController; +export default SignupController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/SvdController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SvdController.js new file mode 100644 index 0000000000..05f89b8cbe --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SvdController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var SvdController = {}; +SvdController._path = '/dwr'; +SvdController.run = function(p0, callback) { + dwr.engine._execute(SvdController._path, 'SvdController', 'run', p0, callback); +} +window.SvdController = SvdController; +export default SvdController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/SystemMonitorController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SystemMonitorController.js new file mode 100644 index 0000000000..949435a947 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/SystemMonitorController.js @@ -0,0 +1,26 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var SystemMonitorController = {}; +SystemMonitorController._path = '/dwr'; +SystemMonitorController.clearCache = function(p0, callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'clearCache', p0, callback); +} +SystemMonitorController.clearAllCaches = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'clearAllCaches', callback); +} +SystemMonitorController.disableStatistics = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'disableStatistics', callback); +} +SystemMonitorController.getCacheStatus = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'getCacheStatus', callback); +} +SystemMonitorController.getHibernateStatus = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'getHibernateStatus', callback); +} +SystemMonitorController.resetHibernateStatus = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'resetHibernateStatus', callback); +} +SystemMonitorController.enableStatistics = function(callback) { + dwr.engine._execute(SystemMonitorController._path, 'SystemMonitorController', 'enableStatistics', callback); +} +window.SystemMonitorController = SystemMonitorController; +export default SystemMonitorController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/TaskCompletionController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/TaskCompletionController.js new file mode 100644 index 0000000000..003c930bb4 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/TaskCompletionController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var TaskCompletionController = {}; +TaskCompletionController._path = '/dwr'; +TaskCompletionController.checkResult = function(p0, callback) { + dwr.engine._execute(TaskCompletionController._path, 'TaskCompletionController', 'checkResult', p0, callback); +} +window.TaskCompletionController = TaskCompletionController; +export default TaskCompletionController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/TwoChannelMissingValueController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/TwoChannelMissingValueController.js new file mode 100644 index 0000000000..408ada07d1 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/TwoChannelMissingValueController.js @@ -0,0 +1,8 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var TwoChannelMissingValueController = {}; +TwoChannelMissingValueController._path = '/dwr'; +TwoChannelMissingValueController.run = function(p0, callback) { + dwr.engine._execute(TwoChannelMissingValueController._path, 'TwoChannelMissingValueController', 'run', p0, callback); +} +window.TwoChannelMissingValueController = TwoChannelMissingValueController; +export default TwoChannelMissingValueController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/interface/UserListController.js b/gemma-web/src/main/webapp/scripts/api/dwr/interface/UserListController.js new file mode 100644 index 0000000000..b8315993bd --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/interface/UserListController.js @@ -0,0 +1,11 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +var UserListController = {}; +UserListController._path = '/dwr'; +UserListController.saveUser = function(p0, callback) { + dwr.engine._execute(UserListController._path, 'UserListController', 'saveUser', p0, callback); +} +UserListController.getUsers = function(callback) { + dwr.engine._execute(UserListController._path, 'UserListController', 'getUsers', callback); +} +window.UserListController = UserListController; +export default UserListController; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/models.js b/gemma-web/src/main/webapp/scripts/api/dwr/models.js new file mode 100644 index 0000000000..ac2efd3bde --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/models.js @@ -0,0 +1,406 @@ +/* this code is generated, see generate-dwr-client.sh for details */ + +if (typeof ArrayDesignValueObjectExt != "function") { + function ArrayDesignValueObjectExt() { + this.hasSequenceAssociations = null; + this.isMergee = null; + this.isMerged = null; + this.technologyType = null; + this.numGenes = null; + this.lastUpdated = null; + this.noParentsAnnotationLink = null; + this.allParentsAnnotationLink = null; + this.hasBlatAssociations = null; + this.id = null; + this.isSubsumer = null; + this.externalReferences = null; + this.dateCached = null; + this.curationNote = null; + this.lastNeedsAttentionEvent = null; + this.mergees = null; + this.lastSequenceUpdate = null; + this.name = null; + this.isAffymetrixAltCdf = null; + this.lastGeneMapping = null; + this.shortName = null; + this.needsAttention = null; + this.subsumees = null; + this.color = null; + this.description = null; + this.lastRepeatMask = null; + this.lastTroubledEvent = null; + this.taxonObject = null; + this.expressionExperimentCount = null; + this.troubled = null; + this.lastNoteUpdateEvent = null; + this.subsumer = null; + this.colorString = null; + this.createDate = null; + this.bioProcessAnnotationLink = null; + this.releaseVersion = null; + this.alternative = null; + this.isSubsumed = null; + this.numProbeAlignments = null; + this.blackListed = null; + this.hasGeneAssociations = null; + this.switchedExpressionExperimentCount = null; + this.numProbeSequences = null; + this.alternateNames = null; + this.designElementCount = null; + this.lastSequenceAnalysis = null; + this.numProbesToGenes = null; + this.releaseUrl = null; + this.merger = null; + } +} + +if (typeof ExpressionExperimentValueObject != "function") { + function ExpressionExperimentValueObject() { + this.needsAttention = null; + this.metadata = null; + this.experimentalDesign = null; + this.numberOfBioAssays = null; + this.userOwned = false; + this.technologyType = null; + this.description = null; + this.accession = null; + this.externalDatabase = null; + this.source = null; + this.batchConfound = null; + this.processedExpressionVectorCount = null; + this.currentUserIsOwner = null; + this.lastUpdated = null; + this.bioMaterialCount = null; + this.lastTroubledEvent = null; + this.taxonObject = null; + this.isPublic = false; + this.troubled = null; + this.id = null; + this.currentUserHasWritePermission = null; + this.lastNoteUpdateEvent = null; + this.suitableForDEA = null; + this.batchEffect = null; + this.characteristics = null; + this.externalUri = null; + this.userCanWrite = false; + this.curationNote = null; + this.externalDatabaseUri = null; + this.lastNeedsAttentionEvent = null; + this.arrayDesignCount = null; + this.name = null; + this.geeq = null; + this.shortName = null; + this.batchEffectStatistics = null; + this.isShared = false; + } +} + +if (typeof DatabaseBackedGeneSetValueObject != "function") { + function DatabaseBackedGeneSetValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.name = null; + this.description = null; + this.isPublic = false; + this.taxon = null; + this.geneIds = null; + this.id = null; + this.isShared = false; + } +} + +if (typeof BlacklistedValueObject != "function") { + function BlacklistedValueObject() { + this.reason = null; + this.name = null; + this.accession = null; + this.externalDatabase = null; + this.id = null; + this.shortName = null; + this.type = null; + } +} + +if (typeof SessionBoundExpressionExperimentSetValueObject != "function") { + function SessionBoundExpressionExperimentSetValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.taxonName = null; + this.description = null; + this.numWithCoexpressionAnalysis = null; + this.expressionExperimentIds = null; + this.taxonId = null; + this.numWithDifferentialExpressionAnalysis = null; + this.size = null; + this.name = null; + this.isPublic = false; + this.modified = false; + this.id = null; + this.modifiable = false; + this.isShared = false; + } +} + +if (typeof FreeTextExpressionExperimentResultsValueObject != "function") { + function FreeTextExpressionExperimentResultsValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.taxonName = null; + this.description = null; + this.numWithCoexpressionAnalysis = null; + this.expressionExperimentIds = null; + this.queryString = null; + this.taxonId = null; + this.numWithDifferentialExpressionAnalysis = null; + this.size = null; + this.name = null; + this.isPublic = false; + this.modified = false; + this.id = null; + this.modifiable = false; + this.isShared = false; + } +} + +if (typeof GeneValueObject != "function") { + function GeneValueObject() { + this.associatedExperimentCount = null; + this.multifunctionalityRank = null; + this.ncbiId = null; + this.ensemblId = null; + this.aliases = null; + this.includeTaxon = false; + this.homologues = null; + this.nodeDegreeNegRanks = []; + this.description = null; + this.isQuery = null; + this.nodeDegreePosRanks = []; + this.officialName = null; + this.compositeSequenceCount = null; + this.nodeDegreesNeg = []; + this.numGoTerms = null; + this.score = null; + this.nodeDegreesPos = []; + this.accessions = null; + this.name = null; + this.platformCount = null; + this.taxon = null; + this.id = null; + this.geneSets = null; + this.officialSymbol = null; + } +} + +if (typeof GeneSetValueObject != "function") { + function GeneSetValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.name = null; + this.description = null; + this.isPublic = false; + this.taxon = null; + this.geneIds = null; + this.id = null; + this.isShared = false; + } +} + +if (typeof SessionBoundGeneSetValueObject != "function") { + function SessionBoundGeneSetValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.name = null; + this.description = null; + this.isPublic = false; + this.modified = false; + this.taxon = null; + this.geneIds = null; + this.id = null; + this.isShared = false; + } +} + +if (typeof GeeqValueObject != "function") { + function GeeqValueObject() { + this.batchCorrected = false; + this.corrMatIssues = 0; + this.noVectors = false; + this.id = null; + this.publicQualityScore = 0; + this.publicSuitabilityScore = 0; + this.replicatesIssues = 0; + } +} + +if (typeof CitationValueObject != "function") { + function CitationValueObject() { + this.retracted = false; + this.citation = null; + this.pubmedAccession = null; + this.id = null; + this.pubmedURL = null; + } +} + +if (typeof ArrayDesignValueObject != "function") { + function ArrayDesignValueObject() { + this.needsAttention = null; + this.color = null; + this.hasSequenceAssociations = null; + this.isMergee = null; + this.isMerged = null; + this.description = null; + this.numGenes = null; + this.lastRepeatMask = null; + this.lastUpdated = null; + this.hasBlatAssociations = null; + this.lastTroubledEvent = null; + this.taxonObject = null; + this.expressionExperimentCount = null; + this.troubled = null; + this.id = null; + this.isSubsumer = null; + this.lastNoteUpdateEvent = null; + this.createDate = null; + this.externalReferences = null; + this.dateCached = null; + this.releaseVersion = null; + this.curationNote = null; + this.isSubsumed = null; + this.numProbeAlignments = null; + this.blackListed = null; + this.hasGeneAssociations = null; + this.lastNeedsAttentionEvent = null; + this.switchedExpressionExperimentCount = null; + this.numProbeSequences = null; + this.designElementCount = null; + this.lastSequenceAnalysis = null; + this.lastSequenceUpdate = null; + this.numProbesToGenes = null; + this.name = null; + this.releaseUrl = null; + this.isAffymetrixAltCdf = null; + this.lastGeneMapping = null; + this.shortName = null; + } +} + +if (typeof ExpressionExperimentSetValueObject != "function") { + function ExpressionExperimentSetValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.taxonName = null; + this.description = null; + this.numWithCoexpressionAnalysis = null; + this.expressionExperimentIds = null; + this.taxonId = null; + this.numWithDifferentialExpressionAnalysis = null; + this.size = null; + this.name = null; + this.isPublic = false; + this.id = null; + this.modifiable = false; + this.isShared = false; + } +} + +if (typeof CharacteristicValueObject != "function") { + function CharacteristicValueObject() { + this.alreadyPresentOnGene = false; + this.valueId = null; + this.categoryUri = null; + this.originalValue = null; + this.valueUri = null; + this.ontologyUsed = null; + this.urlId = null; + this.numTimesUsed = 0; + this.publicGeneCount = 0; + this.root = false; + this.taxon = null; + this.id = null; + this.category = null; + this.alreadyPresentInDatabase = false; + this.privateGeneCount = 0; + this.value = null; + this.valueDefinition = null; + this.child = false; + } +} + +if (typeof FreeTextGeneResultsValueObject != "function") { + function FreeTextGeneResultsValueObject() { + this.userCanWrite = false; + this.userOwned = false; + this.name = null; + this.description = null; + this.isPublic = false; + this.modified = false; + this.taxon = null; + this.geneIds = null; + this.id = null; + this.queryString = null; + this.isShared = false; + } +} + +if (typeof GOGroupValueObject != "function") { + function GOGroupValueObject() { + this.goId = null; + this.searchTerm = null; + this.userCanWrite = false; + this.userOwned = false; + this.name = null; + this.description = null; + this.isPublic = false; + this.modified = false; + this.taxon = null; + this.geneIds = null; + this.id = null; + this.isShared = false; + } +} + +if (typeof GeeqAdminValueObject != "function") { + function GeeqAdminValueObject() { + this.manualHasStrongBatchEffect = false; + this.batchCorrected = false; + this.manualHasNoBatchEffect = false; + this.manualBatchConfoundActive = false; + this.QScoreBatchConfound = 0; + this.detectedSuitabilityScore = 0; + this.noVectors = false; + this.publicQualityScore = 0; + this.publicSuitabilityScore = 0; + this.manualQualityScore = 0; + this.manualSuitabilityScore = 0; + this.QScoreBatchEffect = 0; + this.manualHasBatchConfound = false; + this.corrMatIssues = 0; + this.id = null; + this.manualBatchEffectActive = false; + this.manualSuitabilityOverride = false; + this.replicatesIssues = 0; + this.otherIssues = null; + this.manualQualityOverride = false; + this.detectedQualityScore = 0; + } +} + +window.ArrayDesignValueObject = ArrayDesignValueObject +window.ArrayDesignValueObjectExt = ArrayDesignValueObjectExt +window.BlacklistedValueObject = BlacklistedValueObject +window.CharacteristicValueObject = CharacteristicValueObject +window.CitationValueObject = CitationValueObject +window.DatabaseBackedGeneSetValueObject = DatabaseBackedGeneSetValueObject +window.ExpressionExperimentSetValueObject = ExpressionExperimentSetValueObject +window.ExpressionExperimentValueObject = ExpressionExperimentValueObject +window.FreeTextExpressionExperimentResultsValueObject = FreeTextExpressionExperimentResultsValueObject +window.FreeTextGeneResultsValueObject = FreeTextGeneResultsValueObject +window.GOGroupValueObject = GOGroupValueObject +window.GeeqAdminValueObject = GeeqAdminValueObject +window.GeeqValueObject = GeeqValueObject +window.GeneSetValueObject = GeneSetValueObject +window.GeneValueObject = GeneValueObject +window.SessionBoundExpressionExperimentSetValueObject = SessionBoundExpressionExperimentSetValueObject +window.SessionBoundGeneSetValueObject = SessionBoundGeneSetValueObject +module.exports = {ArrayDesignValueObject, ArrayDesignValueObjectExt, BlacklistedValueObject, CharacteristicValueObject, CitationValueObject, DatabaseBackedGeneSetValueObject, ExpressionExperimentSetValueObject, ExpressionExperimentValueObject, FreeTextExpressionExperimentResultsValueObject, FreeTextGeneResultsValueObject, GOGroupValueObject, GeeqAdminValueObject, GeeqValueObject, GeneSetValueObject, GeneValueObject, SessionBoundExpressionExperimentSetValueObject, SessionBoundGeneSetValueObject}; diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/overrides.js b/gemma-web/src/main/webapp/scripts/api/dwr/overrides.js new file mode 100644 index 0000000000..5f4a54ed18 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/overrides.js @@ -0,0 +1,42 @@ +/* this file is *not* generated, use it to override any DWR definition generated by generate-dwr-client.sh */ + +// record page views for DWR calls in Google Analytics +if ( typeof gtag !== 'undefined' ) { + const originalExecute = dwr.engine._execute; + dwr.engine._execute = function( ...args ) { + args[0] = Gemma.CONTEXT_PATH + args[0]; + gtag( 'event', 'page_view', { + page_location : "/Gemma/" + args[1] + "/" + args[2] + } ); + originalExecute( ...args ); + } +} + +/* + * Set up inheritance structures for value objects see + * http://directwebremoting.org/dwr/documentation/server/configuration/dwrxml/converters/bean.html#interfacesAndAbstractClasses + */ + +GeneValueObject.prototype = new GeneValueObject(); +GeneValueObject.prototype.constructor = GeneValueObject; + +ExpressionExperimentValueObject.prototype = new ExpressionExperimentValueObject(); +ExpressionExperimentValueObject.prototype.constructor = ExpressionExperimentValueObject; + +SessionBoundExpressionExperimentSetValueObject.prototype = new ExpressionExperimentSetValueObject(); +SessionBoundExpressionExperimentSetValueObject.prototype.constructor = SessionBoundExpressionExperimentSetValueObject; + +FreeTextExpressionExperimentResultsValueObject.prototype = new SessionBoundExpressionExperimentSetValueObject(); +FreeTextExpressionExperimentResultsValueObject.prototype.constructor = FreeTextExpressionExperimentResultsValueObject; + +DatabaseBackedGeneSetValueObject.prototype = new GeneSetValueObject(); +DatabaseBackedGeneSetValueObject.prototype.constructor = DatabaseBackedGeneSetValueObject; + +SessionBoundGeneSetValueObject.prototype = new GeneSetValueObject(); +SessionBoundGeneSetValueObject.prototype.constructor = SessionBoundGeneSetValueObject; + +FreeTextGeneResultsValueObject.prototype = new SessionBoundGeneSetValueObject(); +FreeTextGeneResultsValueObject.prototype.constructor = FreeTextGeneResultsValueObject; + +GOGroupValueObject.prototype = new SessionBoundGeneSetValueObject(); +GOGroupValueObject.prototype.constructor = GOGroupValueObject; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/dwr/util.js b/gemma-web/src/main/webapp/scripts/api/dwr/util.js new file mode 100644 index 0000000000..b7dc4749d1 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/dwr/util.js @@ -0,0 +1,1490 @@ +/* this code is generated, see generate-dwr-client.sh for details */ +/* + * Copyright 2005 Joe Walker + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Declare an object to which we can add real functions. + */ + +dwr.util = {}; +var DWRUtil = dwr.util; + +/** @private The flag we use to decide if we should escape html */ +dwr.util._escapeHtml = true; + +/** + * Set the global escapeHtml flag + */ +dwr.util.setEscapeHtml = function(escapeHtml) { + dwr.util._escapeHtml = escapeHtml; +}; + +/** @private Work out from an options list and global settings if we should be esccaping */ +dwr.util._shouldEscapeHtml = function(options) { + if (options && options.escapeHtml != null) { + return options.escapeHtml; + } + return dwr.util._escapeHtml; +}; + +/** + * Return a string with &, < and > replaced with their entities + * @see TODO + */ +dwr.util.escapeHtml = function(original) { + return original.replace(/&/g,'&').replace(//g,'>'); +}; + +/** + * Replace common XML entities with characters (see dwr.util.escapeHtml()) + * @see TODO + */ +dwr.util.unescapeHtml = function(original) { + return original.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); +}; + +/** + * Replace characters dangerous for XSS reasons with visually similar characters + * @see TODO + */ +dwr.util.replaceXmlCharacters = function(original) { + original = original.replace("&", "+"); + original = original.replace("<", "\u2039"); + original = original.replace(">", "\u203A"); + original = original.replace("\'", "\u2018"); + original = original.replace("\"", "\u201C"); + return original; +}; + +/** + * Return true iff the input string contains any XSS dangerous characters + * @see TODO + */ +dwr.util.containsXssRiskyCharacters = function(original) { + return (original.indexOf('&') != -1 + || original.indexOf('<') != -1 + || original.indexOf('>') != -1 + || original.indexOf('\'') != -1 + || original.indexOf('\"') != -1); +}; + +/** + * Enables you to react to return being pressed in an input + * @see http://getahead.org/dwr/browser/util/selectrange + */ +dwr.util.onReturn = function(event, action) { + if (!event) event = window.event; + if (event && event.keyCode && event.keyCode == 13) action(); +}; + +/** + * Select a specific range in a text box. Useful for 'google suggest' type functions. + * @see http://getahead.org/dwr/browser/util/selectrange + */ +dwr.util.selectRange = function(ele, start, end) { + ele = dwr.util._getElementById(ele, "selectRange()"); + if (ele == null) return; + if (ele.setSelectionRange) { + ele.setSelectionRange(start, end); + } + else if (ele.createTextRange) { + var range = ele.createTextRange(); + range.moveStart("character", start); + range.moveEnd("character", end - ele.value.length); + range.select(); + } + ele.focus(); +}; + +/** + * Find the element in the current HTML document with the given id or ids + * @see http://getahead.org/dwr/browser/util/$ + */ +if (document.getElementById) { + dwr.util.byId = function() { + var elements = new Array(); + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') { + element = document.getElementById(element); + } + if (arguments.length == 1) { + return element; + } + elements.push(element); + } + return elements; + }; +} +else if (document.all) { + dwr.util.byId = function() { + var elements = new Array(); + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') { + element = document.all[element]; + } + if (arguments.length == 1) { + return element; + } + elements.push(element); + } + return elements; + }; +} + +/** + * Alias $ to dwr.util.byId + * @see http://getahead.org/dwr/browser/util/$ + */ +if (window['$'] == null) { + window['$'] = dwr.util.byId; +} + +/** + * This function pretty-prints simple data or whole object graphs, f ex as an aid in debugging. + * @see http://getahead.org/dwr/browser/util/todescriptivestring + */ +dwr.util.toDescriptiveString = function(data, showLevels, options) { + if (showLevels === undefined) showLevels = 1; + var opt = {}; + if (dwr.util._isObject(options)) opt = options; + var defaultoptions = { + escapeHtml:false, + baseIndent: "", + childIndent: "\u00A0\u00A0", + lineTerminator: "\n", + oneLineMaxItems: 5, + shortStringMaxLength: 13, + propertyNameMaxLength: 30 + }; + for (var p in defaultoptions) { + if (!(p in opt)) { + opt[p] = defaultoptions[p]; + } + } + + var skipDomProperties = { + document:true, ownerDocument:true, + all:true, + parentElement:true, parentNode:true, offsetParent:true, + children:true, firstChild:true, lastChild:true, + previousSibling:true, nextSibling:true, + innerHTML:true, outerHTML:true, + innerText:true, outerText:true, textContent:true, + attributes:true, + style:true, currentStyle:true, runtimeStyle:true, + parentTextEdit:true + }; + + function recursive(data, showLevels, indentDepth, options) { + var reply = ""; + try { + // string + if (typeof data == "string") { + var str = data; + if (showLevels == 0 && str.length > options.shortStringMaxLength) + str = str.substring(0, options.shortStringMaxLength-3) + "..."; + if (options.escapeHtml) { + // Do the escape separately for every line as escapeHtml() on some + // browsers (IE) will strip line breaks and we want to preserve them + var lines = str.split("\n"); + for (var i = 0; i < lines.length; i++) lines[i] = dwr.util.escapeHtml(lines[i]); + str = lines.join("\n"); + } + if (showLevels == 0) { // Short format + str = str.replace(/\n|\r|\t/g, function(ch) { + switch (ch) { + case "\n": return "\\n"; + case "\r": return ""; + case "\t": return "\\t"; + } + }); + } + else { // Long format + str = str.replace(/\n|\r|\t/g, function(ch) { + switch (ch) { + case "\n": return options.lineTerminator + indent(indentDepth+1, options); + case "\r": return ""; + case "\t": return "\\t"; + } + }); + } + reply = '"' + str + '"'; + } + + // function + else if (typeof data == "function") { + reply = "function"; + } + + // Array + else if (dwr.util._isArray(data)) { + if (showLevels == 0) { // Short format (don't show items) + if (data.length > 0) + reply = "[...]"; + else + reply = "[]"; + } + else { // Long format (show items) + var strarr = []; + strarr.push("["); + var count = 0; + for (var i = 0; i < data.length; i++) { + if (! (i in data)) continue; + var itemvalue = data[i]; + if (count > 0) strarr.push(", "); + if (showLevels == 1) { // One-line format + if (count == options.oneLineMaxItems) { + strarr.push("..."); + break; + } + } + else { // Multi-line format + strarr.push(options.lineTerminator + indent(indentDepth+1, options)); + } + if (i != count) { + strarr.push(i); + strarr.push(":"); + } + strarr.push(recursive(itemvalue, showLevels-1, indentDepth+1, options)); + count++; + } + if (showLevels > 1) strarr.push(options.lineTerminator + indent(indentDepth, options)); + strarr.push("]"); + reply = strarr.join(""); + } + } + + // Objects except Date + else if (dwr.util._isObject(data) && !dwr.util._isDate(data)) { + if (showLevels == 0) { // Short format (don't show properties) + reply = dwr.util._detailedTypeOf(data); + } + else { // Long format (show properties) + var strarr = []; + if (dwr.util._detailedTypeOf(data) != "Object") { + strarr.push(dwr.util._detailedTypeOf(data)); + if (typeof data.valueOf() != "object") { + strarr.push(":"); + strarr.push(recursive(data.valueOf(), 1, indentDepth, options)); + } + strarr.push(" "); + } + strarr.push("{"); + var isDomObject = dwr.util._isHTMLElement(data); + var count = 0; + for (var prop in data) { + var propvalue = data[prop]; + if (isDomObject) { + if (!propvalue) continue; + if (typeof propvalue == "function") continue; + if (skipDomProperties[prop]) continue; + if (prop.toUpperCase() == prop) continue; + } + if (count > 0) strarr.push(", "); + if (showLevels == 1) { // One-line format + if (count == options.oneLineMaxItems) { + strarr.push("..."); + break; + } + } + else { // Multi-line format + strarr.push(options.lineTerminator + indent(indentDepth+1, options)); + } + strarr.push(prop.length > options.propertyNameMaxLength ? prop.substring(0, options.propertyNameMaxLength-3) + "..." : prop); + strarr.push(":"); + strarr.push(recursive(propvalue, showLevels-1, indentDepth+1, options)); + count++; + } + if (showLevels > 1 && count > 0) strarr.push(options.lineTerminator + indent(indentDepth, options)); + strarr.push("}"); + reply = strarr.join(""); + } + } + + // undefined, null, number, boolean, Date + else { + reply = "" + data; + } + + return reply; + } + catch(err) { + return (err.message ? err.message : ""+err); + } + } + + function indent(count, options) { + var strarr = []; + strarr.push(options.baseIndent); + for (var i=0; i= 1) ele = nodes.item(0); + } + + if (ele == null) { + dwr.util._debug("setValue() can't find an element with id/name: " + orig + "."); + return; + } + + // All paths now lead to some update so we highlight a change + dwr.util.highlight(ele, options); + + if (dwr.util._isHTMLElement(ele, "select")) { + if (ele.type == "select-multiple" && dwr.util._isArray(val)) dwr.util._selectListItems(ele, val); + else dwr.util._selectListItem(ele, val); + return; + } + + if (dwr.util._isHTMLElement(ele, "input")) { + if (ele.type == "radio" || ele.type == "checkbox") { + if (nodes && nodes.length >= 1) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes.item(i); + if (node.type != ele.type) continue; + if (dwr.util._isArray(val)) { + node.checked = false; + for (var j = 0; j < val.length; j++) + if (val[j] == node.value) node.checked = true; + } + else { + node.checked = (node.value == val); + } + } + } + else { + ele.checked = (val == true); + } + } + else ele.value = val; + + return; + } + + if (dwr.util._isHTMLElement(ele, "textarea")) { + ele.value = val; + return; + } + + // If the value to be set is a DOM object then we try importing the node + // rather than serializing it out + if (val.nodeType) { + if (val.nodeType == 9 /*Node.DOCUMENT_NODE*/) val = val.documentElement; + val = dwr.util._importNode(ele.ownerDocument, val, true); + ele.appendChild(val); + return; + } + + // Fall back to innerHTML and friends + if (dwr.util._shouldEscapeHtml(options)) { + if ("textContent" in ele) ele.textContent = val.toString(); + else if ("innerText" in ele) ele.innerText = val.toString(); + else ele.innerHTML = dwr.util.escapeHtml(val.toString()); + } + else { + ele.innerHTML = val; + } +}; + +/** + * @private Find multiple items in a select list and select them. Used by setValue() + * @param ele The select list item + * @param val The array of values to select + */ +dwr.util._selectListItems = function(ele, val) { + // We deal with select list elements by selecting the matching option + // Begin by searching through the values + var found = false; + var i; + var j; + for (i = 0; i < ele.options.length; i++) { + ele.options[i].selected = false; + for (j = 0; j < val.length; j++) { + if (ele.options[i].value == val[j]) { + ele.options[i].selected = true; + } + } + } + // If that fails then try searching through the visible text + if (found) return; + + for (i = 0; i < ele.options.length; i++) { + for (j = 0; j < val.length; j++) { + if (ele.options[i].text == val[j]) { + ele.options[i].selected = true; + } + } + } +}; + +/** + * @private Find an item in a select list and select it. Used by setValue() + * @param ele The select list item + * @param val The value to select + */ +dwr.util._selectListItem = function(ele, val) { + // We deal with select list elements by selecting the matching option + // Begin by searching through the values + var found = false; + var i; + for (i = 0; i < ele.options.length; i++) { + if (ele.options[i].value == val) { + ele.options[i].selected = true; + found = true; + } + else { + ele.options[i].selected = false; + } + } + + // If that fails then try searching through the visible text + if (found) return; + + for (i = 0; i < ele.options.length; i++) { + ele.options[i].selected = (ele.options[i].text == val); + } +}; + +/** + * Read the current value for a given HTML element. + * @see http://getahead.org/dwr/browser/util/getvalue + */ +dwr.util.getValue = function(ele, options) { + if (options == null) options = {}; + var orig = ele; + if (typeof ele == "string") { + ele = dwr.util.byId(ele); + // We can work with names and need to sometimes for radio buttons, and IE has + // an annoying bug where getElementById() returns an element based on name if + // it doesn't find it by id. Here we don't want to do that, so: + if (ele && ele.id != orig) ele = null; + } + var nodes = null; + if (ele == null) { + // Now it is time to look by name + nodes = document.getElementsByName(orig); + if (nodes.length >= 1) ele = nodes.item(0); + } + if (ele == null) { + dwr.util._debug("getValue() can't find an element with id/name: " + orig + "."); + return ""; + } + + if (dwr.util._isHTMLElement(ele, "select")) { + // Using "type" property instead of "multiple" as "type" is an official + // client-side property since JS 1.1 + if (ele.type == "select-multiple") { + var reply = new Array(); + for (var i = 0; i < ele.options.length; i++) { + var item = ele.options[i]; + if (item.selected) { + var valueAttr = item.getAttributeNode("value"); + if (valueAttr && valueAttr.specified) { + reply.push(item.value); + } + else { + reply.push(item.text); + } + } + } + return reply; + } + else { + var sel = ele.selectedIndex; + if (sel != -1) { + var item = ele.options[sel]; + var valueAttr = item.getAttributeNode("value"); + if (valueAttr && valueAttr.specified) { + return item.value; + } + return item.text; + } + else { + return ""; + } + } + } + + if (dwr.util._isHTMLElement(ele, "input")) { + if (ele.type == "radio") { + if (nodes && nodes.length >= 1) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes.item(i); + if (node.type == ele.type) { + if (node.checked) return node.value; + } + } + } + return ele.checked; + } + if (ele.type == "checkbox") { + if (nodes && nodes.length >= 1) { + var reply = []; + for (var i = 0; i < nodes.length; i++) { + var node = nodes.item(i); + if (node.type == ele.type) { + if (node.checked) reply.push(node.value); + } + } + return reply; + } + return ele.checked; + } + return ele.value; + } + + if (dwr.util._isHTMLElement(ele, "textarea")) { + return ele.value; + } + + if (dwr.util._shouldEscapeHtml(options)) { + if (ele.textContent) return ele.textContent; + else if (ele.innerText) return ele.innerText; + } + return ele.innerHTML; +}; + +/** + * getText() is like getValue() except that it reads the text (and not the value) from select elements + * @see http://getahead.org/dwr/browser/util/gettext + */ +dwr.util.getText = function(ele) { + ele = dwr.util._getElementById(ele, "getText()"); + if (ele == null) return null; + if (!dwr.util._isHTMLElement(ele, "select")) { + dwr.util._debug("getText() can only be used with select elements. Attempt to use: " + dwr.util._detailedTypeOf(ele) + " from id: " + orig + "."); + return ""; + } + + // This is a bit of a scam because it assumes single select + // but I'm not sure how we should treat multi-select. + var sel = ele.selectedIndex; + if (sel != -1) { + return ele.options[sel].text; + } + else { + return ""; + } +}; + +/** + * Given a map, or a recursive structure consisting of arrays and maps, call + * setValue() for all leaf entries and use intermediate levels to form nested + * element ids. + * @see http://getahead.org/dwr/browser/util/setvalues + */ +dwr.util.setValues = function(data, options) { + var prefix = ""; + var depth = 100; + if (options && options.prefix) prefix = options.prefix; + if (options && options.idPrefix) prefix = options.idPrefix; + if (options && "depth" in options) depth = options.depth; + dwr.util._setValuesRecursive(data, prefix, depth, options); +}; + +/** + * @private Recursive helper for setValues() + */ +dwr.util._setValuesRecursive = function(data, idpath, depth, options) { + if (depth == 0) return; + // Array containing objects -> add "[n]" to prefix and make recursive call + // for each item object + if (dwr.util._isArray(data) && data.length > 0 && dwr.util._isObject(data[0])) { + for (var i = 0; i < data.length; i++) { + dwr.util._setValuesRecursive(data[i], idpath+"["+i+"]", depth-1, options); + } + } + // Object (not array) -> handle nested object properties + else if (dwr.util._isObject(data) && !dwr.util._isArray(data)) { + for (var prop in data) { + var subidpath = idpath ? idpath+"."+prop : prop; + // Object (not array), or array containing objects -> call ourselves recursively + if (dwr.util._isObject(data[prop]) && !dwr.util._isArray(data[prop]) && !dwr.util._isDate(data[prop]) + || dwr.util._isArray(data[prop]) && data[prop].length > 0 && dwr.util._isObject(data[prop][0])) { + dwr.util._setValuesRecursive(data[prop], subidpath, depth-1, options); + } + // Functions -> skip + else if (typeof data[prop] == "function") { + // NOP + } + // Only simple values left (or array of simple values, or empty array) + // -> call setValue() + else { + // Are there any elements with that id or name + if (dwr.util.byId(subidpath) != null || document.getElementsByName(subidpath).length >= 1) { + dwr.util.setValue(subidpath, data[prop], options); + } + } + } + } +}; + +/** + * Given a map, or a recursive structure consisting of arrays and maps, call + * getValue() for all leaf entries and use intermediate levels to form nested + * element ids. + * Given a string or element that refers to a form, create an object from the + * elements of the form. + * @see http://getahead.org/dwr/browser/util/getvalues + */ +dwr.util.getValues = function(data, options) { + if (typeof data == "string" || dwr.util._isHTMLElement(data)) { + return dwr.util.getFormValues(data); + } + else { + var prefix = ""; + var depth = 100; + if (options != null && options.prefix) prefix = options.prefix; + if (options != null && options.idPrefix) prefix = options.idPrefix; + if (options != null && "depth" in options) depth = options.depth; + dwr.util._getValuesRecursive(data, prefix, depth, options); + return data; + } +}; + +/** + * Given a string or element that refers to a form, create an object from the + * elements of the form. + * @see http://getahead.org/dwr/browser/util/getvalues + */ +dwr.util.getFormValues = function(eleOrNameOrId) { + var ele = null; + if (typeof eleOrNameOrId == "string") { + ele = document.forms[eleOrNameOrId]; + if (ele == null) ele = dwr.util.byId(eleOrNameOrId); + } + else if (dwr.util._isHTMLElement(eleOrNameOrId)) { + ele = eleOrNameOrId; + } + if (ele != null) { + if (ele.elements == null) { + alert("getFormValues() requires an object or reference to a form element."); + return null; + } + var reply = {}; + var name; + var value; + for (var i = 0; i < ele.elements.length; i++) { + if (ele[i].type in {button:0,submit:0,reset:0,image:0,file:0}) continue; + if (ele[i].name) { + name = ele[i].name; + value = dwr.util.getValue(name); + } + else { + if (ele[i].id) name = ele[i].id; + else name = "element" + i; + value = dwr.util.getValue(ele[i]); + } + reply[name] = value; + } + return reply; + } +}; + +/** + * @private Recursive helper for getValues(). + */ +dwr.util._getValuesRecursive = function(data, idpath, depth, options) { + if (depth == 0) return; + // Array containing objects -> add "[n]" to idpath and make recursive call + // for each item object + if (dwr.util._isArray(data) && data.length > 0 && dwr.util._isObject(data[0])) { + for (var i = 0; i < data.length; i++) { + dwr.util._getValuesRecursive(data[i], idpath+"["+i+"]", depth-1, options); + } + } + // Object (not array) -> handle nested object properties + else if (dwr.util._isObject(data) && !dwr.util._isArray(data)) { + for (var prop in data) { + var subidpath = idpath ? idpath+"."+prop : prop; + // Object, or array containing objects -> call ourselves recursively + if (dwr.util._isObject(data[prop]) && !dwr.util._isArray(data[prop]) + || dwr.util._isArray(data[prop]) && data[prop].length > 0 && dwr.util._isObject(data[prop][0])) { + dwr.util._getValuesRecursive(data[prop], subidpath, depth-1, options); + } + // Functions -> skip + else if (typeof data[prop] == "function") { + // NOP + } + // Only simple values left (or array of simple values, or empty array) + // -> call getValue() + else { + // Are there any elements with that id or name + if (dwr.util.byId(subidpath) != null || document.getElementsByName(subidpath).length >= 1) { + data[prop] = dwr.util.getValue(subidpath); + } + } + } + } +}; + +/** + * Add options to a list from an array or map. + * @see http://getahead.org/dwr/browser/lists + */ +dwr.util.addOptions = function(ele, data/*, options*/) { + ele = dwr.util._getElementById(ele, "addOptions()"); + if (ele == null) return; + var useOptions = dwr.util._isHTMLElement(ele, "select"); + var useLi = dwr.util._isHTMLElement(ele, ["ul", "ol"]); + if (!useOptions && !useLi) { + dwr.util._debug("addOptions() can only be used with select/ul/ol elements. Attempt to use: " + dwr.util._detailedTypeOf(ele)); + return; + } + if (data == null) return; + + var argcount = arguments.length; + var options = {}; + var lastarg = arguments[argcount - 1]; + if (argcount > 2 && dwr.util._isObject(lastarg)) { + options = lastarg; + argcount--; + } + var arg3 = null; if (argcount >= 3) arg3 = arguments[2]; + var arg4 = null; if (argcount >= 4) arg4 = arguments[3]; + if (!options.optionCreator && useOptions) options.optionCreator = dwr.util._defaultOptionCreator; + if (!options.optionCreator && useLi) options.optionCreator = dwr.util._defaultListItemCreator; + options.document = ele.ownerDocument; + + var text, value, li; + if (dwr.util._isArray(data)) { + // Loop through the data that we do have + for (var i = 0; i < data.length; i++) { + options.data = data[i]; + options.text = null; + options.value = null; + if (useOptions) { + if (arg3 != null) { + if (arg4 != null) { + options.text = dwr.util._getValueFrom(data[i], arg4); + options.value = dwr.util._getValueFrom(data[i], arg3); + } + else options.text = options.value = dwr.util._getValueFrom(data[i], arg3); + } + else options.text = options.value = dwr.util._getValueFrom(data[i]); + + if (options.text != null || options.value) { + var opt = options.optionCreator(options); + opt.text = options.text; + opt.value = options.value; + ele.options[ele.options.length] = opt; + } + } + else { + options.value = dwr.util._getValueFrom(data[i], arg3); + if (options.value != null) { + li = options.optionCreator(options); + if (dwr.util._shouldEscapeHtml(options)) { + options.value = dwr.util.escapeHtml(options.value); + } + li.innerHTML = options.value; + ele.appendChild(li); + } + } + } + } + else if (arg4 != null) { + if (!useOptions) { + alert("dwr.util.addOptions can only create select lists from objects."); + return; + } + for (var prop in data) { + options.data = data[prop]; + options.value = dwr.util._getValueFrom(data[prop], arg3); + options.text = dwr.util._getValueFrom(data[prop], arg4); + + if (options.text != null || options.value) { + var opt = options.optionCreator(options); + opt.text = options.text; + opt.value = options.value; + ele.options[ele.options.length] = opt; + } + } + } + else { + if (!useOptions) { + dwr.util._debug("dwr.util.addOptions can only create select lists from objects."); + return; + } + for (var prop in data) { + if (typeof data[prop] == "function") continue; + options.data = data[prop]; + if (!arg3) { + options.value = prop; + options.text = data[prop]; + } + else { + options.value = data[prop]; + options.text = prop; + } + if (options.text != null || options.value) { + var opt = options.optionCreator(options); + opt.text = options.text; + opt.value = options.value; + ele.options[ele.options.length] = opt; + } + } + } + + // All error routes through this function result in a return, so highlight now + dwr.util.highlight(ele, options); +}; + +/** + * @private Get the data from an array function for dwr.util.addOptions + */ +dwr.util._getValueFrom = function(data, method) { + if (method == null) return data; + else if (typeof method == 'function') return method(data); + else return data[method]; +}; + +/** + * @private Default option creation function + */ +dwr.util._defaultOptionCreator = function(options) { + return options.document.createElement("option"); +}; + +/** + * @private Default list item creation function + */ +dwr.util._defaultListItemCreator = function(options) { + return options.document.createElement("li"); +}; + +/** + * Remove all the options from a select list (specified by id) + * @see http://getahead.org/dwr/browser/lists + */ +dwr.util.removeAllOptions = function(ele) { + ele = dwr.util._getElementById(ele, "removeAllOptions()"); + if (ele == null) return; + var useOptions = dwr.util._isHTMLElement(ele, "select"); + var useLi = dwr.util._isHTMLElement(ele, ["ul", "ol"]); + if (!useOptions && !useLi) { + dwr.util._debug("removeAllOptions() can only be used with select, ol and ul elements. Attempt to use: " + dwr.util._detailedTypeOf(ele)); + return; + } + if (useOptions) { + ele.options.length = 0; + } + else { + while (ele.childNodes.length > 0) { + ele.removeChild(ele.firstChild); + } + } +}; + +/** + * Create rows inside a the table, tbody, thead or tfoot element (given by id). + * @see http://getahead.org/dwr/browser/tables + */ +dwr.util.addRows = function(ele, data, cellFuncs, options) { + ele = dwr.util._getElementById(ele, "addRows()"); + if (ele == null) return; + if (!dwr.util._isHTMLElement(ele, ["table", "tbody", "thead", "tfoot"])) { + dwr.util._debug("addRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: " + dwr.util._detailedTypeOf(ele)); + return; + } + if (!options) options = {}; + if (!options.rowCreator) options.rowCreator = dwr.util._defaultRowCreator; + if (!options.cellCreator) options.cellCreator = dwr.util._defaultCellCreator; + options.document = ele.ownerDocument; + var tr, rowNum; + if (dwr.util._isArray(data)) { + for (rowNum = 0; rowNum < data.length; rowNum++) { + options.rowData = data[rowNum]; + options.rowIndex = rowNum; + options.rowNum = rowNum; + options.data = null; + options.cellNum = -1; + tr = dwr.util._addRowInner(cellFuncs, options); + if (tr != null) ele.appendChild(tr); + } + } + else if (typeof data == "object") { + rowNum = 0; + for (var rowIndex in data) { + options.rowData = data[rowIndex]; + options.rowIndex = rowIndex; + options.rowNum = rowNum; + options.data = null; + options.cellNum = -1; + tr = dwr.util._addRowInner(cellFuncs, options); + if (tr != null) ele.appendChild(tr); + rowNum++; + } + } + + dwr.util.highlight(ele, options); +}; + +/** + * @private Internal function to draw a single row of a table. + */ +dwr.util._addRowInner = function(cellFuncs, options) { + var tr = options.rowCreator(options); + if (tr == null) return null; + for (var cellNum = 0; cellNum < cellFuncs.length; cellNum++) { + var func = cellFuncs[cellNum]; + if (typeof func == 'function') options.data = func(options.rowData, options); + else options.data = func || ""; + options.cellNum = cellNum; + var td = options.cellCreator(options); + if (td != null) { + if (options.data != null) { + if (dwr.util._isHTMLElement(options.data)) td.appendChild(options.data); + else { + if (dwr.util._shouldEscapeHtml(options) && typeof(options.data) == "string") { + td.innerHTML = dwr.util.escapeHtml(options.data); + } + else { + td.innerHTML = options.data; + } + } + } + tr.appendChild(td); + } + } + return tr; +}; + +/** + * @private Default row creation function + */ +dwr.util._defaultRowCreator = function(options) { + return options.document.createElement("tr"); +}; + +/** + * @private Default cell creation function + */ +dwr.util._defaultCellCreator = function(options) { + return options.document.createElement("td"); +}; + +/** + * Remove all the children of a given node. + * @see http://getahead.org/dwr/browser/tables + */ +dwr.util.removeAllRows = function(ele, options) { + ele = dwr.util._getElementById(ele, "removeAllRows()"); + if (ele == null) return; + if (!options) options = {}; + if (!options.filter) options.filter = function() { return true; }; + if (!dwr.util._isHTMLElement(ele, ["table", "tbody", "thead", "tfoot"])) { + dwr.util._debug("removeAllRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: " + dwr.util._detailedTypeOf(ele)); + return; + } + var child = ele.firstChild; + var next; + while (child != null) { + next = child.nextSibling; + if (options.filter(child)) { + ele.removeChild(child); + } + child = next; + } +}; + +/** + * dwr.util.byId(ele).className = "X", that we can call from Java easily. + */ +dwr.util.setClassName = function(ele, className) { + ele = dwr.util._getElementById(ele, "setClassName()"); + if (ele == null) return; + ele.className = className; +}; + +/** + * dwr.util.byId(ele).className += "X", that we can call from Java easily. + */ +dwr.util.addClassName = function(ele, className) { + ele = dwr.util._getElementById(ele, "addClassName()"); + if (ele == null) return; + ele.className += " " + className; +}; + +/** + * dwr.util.byId(ele).className -= "X", that we can call from Java easily + * From code originally by Gavin Kistner + */ +dwr.util.removeClassName = function(ele, className) { + ele = dwr.util._getElementById(ele, "removeClassName()"); + if (ele == null) return; + var regex = new RegExp("(^|\\s)" + className + "(\\s|$)", 'g'); + ele.className = ele.className.replace(regex, ''); +}; + +/** + * dwr.util.byId(ele).className |= "X", that we can call from Java easily. + */ +dwr.util.toggleClassName = function(ele, className) { + ele = dwr.util._getElementById(ele, "toggleClassName()"); + if (ele == null) return; + var regex = new RegExp("(^|\\s)" + className + "(\\s|$)"); + if (regex.test(ele.className)) { + ele.className = ele.className.replace(regex, ''); + } + else { + ele.className += " " + className; + } +}; + +/** + * Clone a node and insert it into the document just above the 'template' node + * @see http://getahead.org/dwr/??? + */ +dwr.util.cloneNode = function(ele, options) { + ele = dwr.util._getElementById(ele, "cloneNode()"); + if (ele == null) return null; + if (options == null) options = {}; + var clone = ele.cloneNode(true); + if (options.idPrefix || options.idSuffix) { + dwr.util._updateIds(clone, options); + } + else { + dwr.util._removeIds(clone); + } + ele.parentNode.insertBefore(clone, ele); + return clone; +}; + +/** + * @private Update all of the ids in an element tree + */ +dwr.util._updateIds = function(ele, options) { + if (options == null) options = {}; + if (ele.id) { + ele.setAttribute("id", (options.idPrefix || "") + ele.id + (options.idSuffix || "")); + } + var children = ele.childNodes; + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + if (child.nodeType == 1 /*Node.ELEMENT_NODE*/) { + dwr.util._updateIds(child, options); + } + } +}; + +/** + * @private Remove all the Ids from an element + */ +dwr.util._removeIds = function(ele) { + if (ele.id) ele.removeAttribute("id"); + var children = ele.childNodes; + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + if (child.nodeType == 1 /*Node.ELEMENT_NODE*/) { + dwr.util._removeIds(child); + } + } +}; + +/** + * Clone a template node and its embedded template child nodes according to + * cardinalities (of arrays) in supplied data. + */ +dwr.util.cloneNodeForValues = function(templateEle, data, options) { + templateEle = dwr.util._getElementById(templateEle, "cloneNodeForValues()"); + if (templateEle == null) return null; + if (options == null) options = {}; + var idpath; + if (options.idPrefix != null) + idpath = options.idPrefix; + else + idpath = templateEle.id || ""; + return dwr.util._cloneNodeForValuesRecursive(templateEle, data, idpath, options); +}; + +/** + * @private Recursive helper for cloneNodeForValues(). + */ +dwr.util._cloneNodeForValuesRecursive = function(templateEle, data, idpath, options) { + // Incoming array -> make an id for each item and call clone of the template + // for each of them + if (dwr.util._isArray(data)) { + var clones = []; + for (var i = 0; i < data.length; i++) { + var item = data[i]; + var clone = dwr.util._cloneNodeForValuesRecursive(templateEle, item, idpath + "[" + i + "]", options); + clones.push(clone); + } + return clones; + } + else + // Incoming object (not array) -> clone the template, add id prefixes, add + // clone to DOM, and then recurse into any array properties if they contain + // objects and there is a suitable template + if (dwr.util._isObject(data) && !dwr.util._isArray(data)) { + var clone = templateEle.cloneNode(true); + if (options.updateCloneStyle && clone.style) { + for (var propname in options.updateCloneStyle) { + clone.style[propname] = options.updateCloneStyle[propname]; + } + } + dwr.util._replaceIds(clone, templateEle.id, idpath); + templateEle.parentNode.insertBefore(clone, templateEle); + dwr.util._cloneSubArrays(data, idpath, options); + return clone; + } + + // It is an error to end up here so we return nothing + return null; +}; + +/** + * @private Substitute a leading idpath fragment with another idpath for all + * element ids tree, and remove ids that don't match the idpath. + */ +dwr.util._replaceIds = function(ele, oldidpath, newidpath) { + if (ele.id) { + var newId = null; + if (ele.id == oldidpath) { + newId = newidpath; + } + else if (ele.id.length > oldidpath.length) { + if (ele.id.substr(0, oldidpath.length) == oldidpath) { + var trailingChar = ele.id.charAt(oldidpath.length); + if (trailingChar == "." || trailingChar == "[") { + newId = newidpath + ele.id.substr(oldidpath.length); + } + } + } + if (newId) { + ele.setAttribute("id", newId); + } + else { + ele.removeAttribute("id"); + } + } + var children = ele.childNodes; + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + if (child.nodeType == 1 /*Node.ELEMENT_NODE*/) { + dwr.util._replaceIds(child, oldidpath, newidpath); + } + } +}; + +/** + * @private Finds arrays in supplied data and uses any corresponding template + * node to make a clone for each item in the array. + */ +dwr.util._cloneSubArrays = function(data, idpath, options) { + for (prop in data) { + var value = data[prop]; + // Look for potential recursive cloning in all array properties + if (dwr.util._isArray(value)) { + // Only arrays with objects are interesting for cloning + if (value.length > 0 && dwr.util._isObject(value[0])) { + var subTemplateId = idpath + "." + prop; + var subTemplateEle = dwr.util.byId(subTemplateId); + if (subTemplateEle != null) { + dwr.util._cloneNodeForValuesRecursive(subTemplateEle, value, subTemplateId, options); + } + } + } + // Continue looking for arrays in object properties + else if (dwr.util._isObject(value)) { + dwr.util._cloneSubArrays(value, idpath + "." + prop, options); + } + } +}; + +/** + * @private Helper to turn a string into an element with an error message + */ +dwr.util._getElementById = function(ele, source) { + var orig = ele; + ele = dwr.util.byId(ele); + if (ele == null) { + dwr.util._debug(source + " can't find an element with id: " + orig + "."); + } + return ele; +}; + +/** + * @private Is the given node an HTML element (optionally of a given type)? + * @param ele The element to test + * @param nodeName eg "input", "textarea" - check for node name (optional) + * if nodeName is an array then check all for a match. + */ +dwr.util._isHTMLElement = function(ele, nodeName) { + if (ele == null || typeof ele != "object" || ele.nodeName == null) { + return false; + } + if (nodeName != null) { + var test = ele.nodeName.toLowerCase(); + if (typeof nodeName == "string") { + return test == nodeName.toLowerCase(); + } + if (dwr.util._isArray(nodeName)) { + var match = false; + for (var i = 0; i < nodeName.length && !match; i++) { + if (test == nodeName[i].toLowerCase()) { + match = true; + } + } + return match; + } + dwr.util._debug("dwr.util._isHTMLElement was passed test node name that is neither a string or array of strings"); + return false; + } + return true; +}; + +/** + * @private Like typeOf except that more information for an object is returned other than "object" + */ +dwr.util._detailedTypeOf = function(x) { + var reply = typeof x; + if (reply == "object") { + reply = Object.prototype.toString.apply(x); // Returns "[object class]" + reply = reply.substring(8, reply.length-1); // Just get the class bit + } + return reply; +}; + +/** + * @private Object detector. Excluding null from objects. + */ +dwr.util._isObject = function(data) { + return (data && typeof data == "object"); +}; + +/** + * @private Array detector. Note: instanceof doesn't work with multiple frames. + */ +dwr.util._isArray = function(data) { + return (data && data.join); +}; + +/** + * @private Date detector. Note: instanceof doesn't work with multiple frames. + */ +dwr.util._isDate = function(data) { + return (data && data.toUTCString) ? true : false; +}; + +/** + * @private Used by setValue. Gets around the missing functionallity in IE. + */ +dwr.util._importNode = function(doc, importedNode, deep) { + var newNode; + + if (importedNode.nodeType == 1 /*Node.ELEMENT_NODE*/) { + newNode = doc.createElement(importedNode.nodeName); + + for (var i = 0; i < importedNode.attributes.length; i++) { + var attr = importedNode.attributes[i]; + if (attr.nodeValue != null && attr.nodeValue != '') { + newNode.setAttribute(attr.name, attr.nodeValue); + } + } + + if (importedNode.style != null) { + newNode.style.cssText = importedNode.style.cssText; + } + } + else if (importedNode.nodeType == 3 /*Node.TEXT_NODE*/) { + newNode = doc.createTextNode(importedNode.nodeValue); + } + + if (deep && importedNode.hasChildNodes()) { + for (i = 0; i < importedNode.childNodes.length; i++) { + newNode.appendChild(dwr.util._importNode(doc, importedNode.childNodes[i], true)); + } + } + + return newNode; +}; + +/** @private Used internally when some message needs to get to the programmer */ +dwr.util._debug = function(message, stacktrace) { + var written = false; + try { + if (window.console) { + if (stacktrace && window.console.trace) window.console.trace(); + window.console.log(message); + written = true; + } + else if (window.opera && window.opera.postError) { + window.opera.postError(message); + written = true; + } + } + catch (ex) { /* ignore */ } + + if (!written) { + var debug = document.getElementById("dwr-debug"); + if (debug) { + var contents = message + "
" + debug.innerHTML; + if (contents.length > 2048) contents = contents.substring(0, 2048); + debug.innerHTML = contents; + } + } +}; + +window.DWRUtil = DWRUtil; +export default dwr.util; diff --git a/gemma-web/src/main/webapp/scripts/api/dwrServices.js b/gemma-web/src/main/webapp/scripts/api/dwrServices.js deleted file mode 100755 index 4a4ff01ce5..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/dwrServices.js +++ /dev/null @@ -1,1245 +0,0 @@ -/** - * dwrServices.js - * - * Manual bundling of DWR interfaces into one file. This is necessary because DWR 2 does not support any bundling; and - * JAWR does not currently support DWR+Spring. - * - * See analytics.jsp for definition of googleAnalyticsTrackPageviewIfConfigured(). - * - */ -if ( typeof dwr === 'undefined' ) { - var dwr = {}; -} -if ( typeof dwr.engine === 'undefined' ) { - dwr.engine = {}; -} -// ==================================================================================== -if ( typeof AnnotationController === 'undefined' ) { - var AnnotationController = {}; -} -AnnotationController._path = ctxBasePath + '/dwr'; -AnnotationController.findTerm = function( p0, p1, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'findTerm', p0, p1, callback ); -}; -AnnotationController.createExperimentTag = function( p0, p1, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'createExperimentTag', p0, p1, callback ); -}; -AnnotationController.removeExperimentTag = function( p0, p1, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'removeExperimentTag', p0, p1, callback ); -}; -AnnotationController.createBioMaterialTag = function( p0, p1, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'createBioMaterialTag', p0, p1, callback ); -}; -AnnotationController.getCategoryTerms = function( callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'getCategoryTerms', callback ); -}; -AnnotationController.getRelationTerms = function( callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'getRelationTerms', callback ); -}; -AnnotationController.removeBioMaterialTag = function( p0, p1, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'removeBioMaterialTag', p0, p1, callback ); -}; -AnnotationController.reinitializeOntologyIndices = function( callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'reinitializeOntologyIndices', callback ); -}; -AnnotationController.validateTags = function( p0, callback ) { - dwr.engine._execute( AnnotationController._path, 'AnnotationController', 'validateTags', p0, callback ); -}; - -// ==================================================================================== -if ( typeof ArrayDesignController === 'undefined' ) { - var ArrayDesignController = {}; -} -ArrayDesignController._path = ctxBasePath + '/dwr'; -ArrayDesignController.remove = function( p0, callback ) { - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'remove', p0, callback ); -}; -ArrayDesignController.getDetails = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/getDetails" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'getDetails', p0, callback ); -}; -ArrayDesignController.getArrayDesigns = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/getArrayDesigns" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'getArrayDesigns', p0, p1, p2, callback ); -}; -ArrayDesignController.loadArrayDesignsForShowAll = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/loadArrayDesignsForShowAll" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'loadArrayDesignsForShowAll', p0, - callback ); -}; -ArrayDesignController.addAlternateName = function( p0, p1, callback ) { - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'addAlternateName', p0, p1, callback ); -}; -ArrayDesignController.getCsSummaries = function( p0, callback ) { - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'getCsSummaries', p0, callback ); -}; -ArrayDesignController.getReportHtml = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/getReportHtml" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'getReportHtml', p0, callback ); -}; -ArrayDesignController.updateReport = function( p0, callback ) { - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'updateReport', p0, callback ); -}; -ArrayDesignController.getSummaryForArrayDesign = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/getSummaryForArrayDesign" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'getSummaryForArrayDesign', p0, callback ); -}; -ArrayDesignController.loadArrayDesignsSummary = function( callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignController/loadArrayDesignsSummary" ); - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'loadArrayDesignsSummary', callback ); -}; -ArrayDesignController.updateReportById = function( p0, callback ) { - dwr.engine._execute( ArrayDesignController._path, 'ArrayDesignController', 'updateReportById', p0, callback ); -}; -// ==================================================================================== -if ( typeof ArrayDesignRepeatScanController === 'undefined' ) { - var ArrayDesignRepeatScanController = {}; -} -ArrayDesignRepeatScanController._path = ctxBasePath + '/dwr'; -ArrayDesignRepeatScanController.run = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ArrayDesignRepeatScanController/run" ); - dwr.engine._execute( ArrayDesignRepeatScanController._path, 'ArrayDesignRepeatScanController', 'run', p0, callback ); -}; -// ==================================================================================== -if ( typeof AuditController === 'undefined' ) { - var AuditController = {}; -} -AuditController._path = ctxBasePath + '/dwr'; -AuditController.addAuditEvent = function( p0, p1, p2, p3, callback ) { - dwr.engine._execute( AuditController._path, 'AuditController', 'addAuditEvent', p0, p1, p2, p3, callback ); -}; -AuditController.getEvents = function( p0, callback ) { - dwr.engine._execute( AuditController._path, 'AuditController', 'getEvents', p0, callback ); -}; - -// ==================================================================================== -if ( typeof BatchInfoFetchController === 'undefined' ) { - var BatchInfoFetchController = {}; -} -BatchInfoFetchController._path = ctxBasePath + '/dwr'; -BatchInfoFetchController.run = function( p0, callback ) { - dwr.engine._execute( BatchInfoFetchController._path, 'BatchInfoFetchController', 'run', p0, callback ); -}; -// ==================================================================================== -if ( typeof BibliographicReferenceController === 'undefined' ) { - var BibliographicReferenceController = {}; -} -BibliographicReferenceController._path = ctxBasePath + '/dwr'; -BibliographicReferenceController.update = function( p0, callback ) { - dwr.engine._execute( BibliographicReferenceController._path, 'BibliographicReferenceController', 'update', p0, - callback ); -}; -BibliographicReferenceController.browse = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/BibliographicReferenceController/browse" ); - dwr.engine._execute( BibliographicReferenceController._path, 'BibliographicReferenceController', 'browse', p0, - callback ); -}; -BibliographicReferenceController.load = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/BibliographicReferenceController/load" ); - dwr.engine._execute( BibliographicReferenceController._path, 'BibliographicReferenceController', 'load', p0, - callback ); -}; -BibliographicReferenceController.search = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/BibliographicReferenceController/search" ); - dwr.engine._execute( BibliographicReferenceController._path, 'BibliographicReferenceController', 'search', p0, - callback ); -}; -BibliographicReferenceController.loadFromPubmedID = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/BibliographicReferenceController/loadFromPubmedID" ); - dwr.engine._execute( BibliographicReferenceController._path, 'BibliographicReferenceController', 'loadFromPubmedID', - p0, callback ); -}; -// ==================================================================================== -if ( typeof BioAssayController === 'undefined' ) { - var BioAssayController = {}; -} -BioAssayController._path = ctxBasePath + '/dwr'; -BioAssayController.markOutlier = function( p0, callback ) { - dwr.engine._execute( BioAssayController._path, 'BioAssayController', 'markOutlier', p0, callback ); -}; -BioAssayController.unmarkOutlier = function( p0, callback ) { - dwr.engine._execute( BioAssayController._path, 'BioAssayController', 'unmarkOutlier', p0, callback ); -}; -BioAssayController.getBioAssays = function( p0, callback ) { - dwr.engine._execute( BioAssayController._path, 'BioAssayController', 'getBioAssays', p0, callback ); -}; -// BioAssayController.getIdentifiedOutliers = function( p0, callback ) { -// dwr.engine._execute( BioAssayController._path, 'BioAssayController', 'getIdentifiedOutliers', p0, callback ); -// }; - -// ==================================================================================== -if ( typeof BioMaterialController === 'undefined' ) { - var BioMaterialController = {}; -} -BioMaterialController._path = ctxBasePath + '/dwr'; -BioMaterialController.getAnnotation = function( p0, callback ) { - dwr.engine._execute( BioMaterialController._path, 'BioMaterialController', 'getAnnotation', p0, callback ); -}; -BioMaterialController.getFactorValues = function( p0, callback ) { - dwr.engine._execute( BioMaterialController._path, 'BioMaterialController', 'getFactorValues', p0, callback ); -}; -BioMaterialController.getBioMaterials = function( p0, callback ) { - dwr.engine._execute( BioMaterialController._path, 'BioMaterialController', 'getBioMaterials', p0, callback ); -}; -BioMaterialController.addFactorValueTo = function( p0, p1, callback ) { - dwr.engine._execute( BioMaterialController._path, 'BioMaterialController', 'addFactorValueTo', p0, p1, callback ); -}; -// ==================================================================================== -if ( typeof CharacteristicBrowserController === 'undefined' ) { - var CharacteristicBrowserController = {}; -} -CharacteristicBrowserController._path = ctxBasePath + '/dwr'; -CharacteristicBrowserController.findCharacteristics = function( p0, callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', - 'findCharacteristics', p0, callback ); -}; -CharacteristicBrowserController.findCharacteristicsCustom = function( p0, p1, p2, p3, p4, p5, p6, p7, callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', - 'findCharacteristicsCustom', p0, p1, p2, p3, p4, p5, p6, p7, callback ); -}; -CharacteristicBrowserController.removeCharacteristics = function( p0, callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', - 'removeCharacteristics', p0, callback ); -}; -CharacteristicBrowserController.updateCharacteristics = function( p0, callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', - 'updateCharacteristics', p0, callback ); -}; -CharacteristicBrowserController.browse = function( p0, callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'browse', p0, - callback ); -}; -CharacteristicBrowserController.count = function( callback ) { - dwr.engine._execute( CharacteristicBrowserController._path, 'CharacteristicBrowserController', 'count', callback ); -}; -// ==================================================================================== -if ( typeof CompositeSequenceController === 'undefined' ) { - var CompositeSequenceController = {}; -} -CompositeSequenceController._path = ctxBasePath + '/dwr'; -CompositeSequenceController.search = function( p0, p1, callback ) { - dwr.engine._execute( CompositeSequenceController._path, 'CompositeSequenceController', 'search', p0, p1, callback ); -}; -CompositeSequenceController.getCsSummaries = function( p0, callback ) { - dwr.engine._execute( CompositeSequenceController._path, 'CompositeSequenceController', 'getCsSummaries', p0, - callback ); -}; -CompositeSequenceController.getGeneCsSummaries = function( p0, callback ) { - dwr.engine._execute( CompositeSequenceController._path, 'CompositeSequenceController', 'getGeneCsSummaries', p0, - callback ); -}; -CompositeSequenceController.getGeneMappingSummary = function( p0, callback ) { - dwr.engine._execute( CompositeSequenceController._path, 'CompositeSequenceController', 'getGeneMappingSummary', p0, - callback ); -}; -// ==================================================================================== -if ( typeof IndexService === 'undefined' ) { - var IndexService = {}; -} -IndexService._path = ctxBasePath + '/dwr'; -IndexService.index = function( p0, callback ) { - dwr.engine._execute( IndexService._path, 'IndexService', 'index', p0, callback ); -}; -// ==================================================================================== -if ( typeof DEDVController === 'undefined' ) { - var DEDVController = {}; -} -DEDVController._path = ctxBasePath + '/dwr'; -DEDVController.getDEDV = function( p0, p1, callback ) { - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDV', p0, p1, callback ); -}; -DEDVController.getDEDVForCoexpressionVisualization = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForCoexpressionVisualization" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForCoexpressionVisualization', p0, p1, p2, - callback ); -}; -DEDVController.getDEDVForDiffExVisualization = function( p0, p1, p2, p3, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForDiffExVisualization" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualization', p0, p1, p2, p3, - callback ); -}; -DEDVController.getDEDVForVisualization = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForVisualization" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForVisualization', p0, p1, callback ); -}; -DEDVController.getDEDVForDiffExVisualizationByThreshold = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForDiffExVisualizationByThreshold" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualizationByThreshold', p0, p1, p2, - callback ); -}; -DEDVController.getDEDVForPcaVisualization = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForPcaVisualization" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForPcaVisualization', p0, p1, p2, callback ); -}; -DEDVController.getDEDVForDiffExVisualizationByExperiment = function( p0, p1, p2, p3, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DEDVController/getDEDVForDiffExVisualizationByExperiment" ); - dwr.engine._execute( DEDVController._path, 'DEDVController', 'getDEDVForDiffExVisualizationByExperiment', p0, p1, - p2, p3, callback ); -}; - -// ==================================================================================== -if ( typeof DifferentialExpressionAnalysisController === 'undefined' ) { - var DifferentialExpressionAnalysisController = {}; -} -DifferentialExpressionAnalysisController._path = ctxBasePath + '/dwr'; -DifferentialExpressionAnalysisController.run = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionAnalysisController/run" ); - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'run', p0, callback ); -}; -DifferentialExpressionAnalysisController.determineAnalysisType = function( p0, callback ) { - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'determineAnalysisType', p0, callback ); -}; -DifferentialExpressionAnalysisController.runCustom = function( p0, p1, p2, p3, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionAnalysisController/runCutom" ); - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'runCustom', p0, p1, p2, p3, callback ); -}; -DifferentialExpressionAnalysisController.remove = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionAnalysisController/remove" ); - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'remove', p0, p1, callback ); -}; -DifferentialExpressionAnalysisController.redo = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionAnalysisController/redo" ); - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'redo', p0, p1, callback ); -}; -DifferentialExpressionAnalysisController.refreshStats = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionAnalysisController/refreshStats" ); - dwr.engine._execute( DifferentialExpressionAnalysisController._path, 'DifferentialExpressionAnalysisController', - 'refreshStats', p0, p1, callback ); -}; -// ==================================================================================== -if ( typeof DifferentialExpressionSearchController === 'undefined' ) { - var DifferentialExpressionSearchController = {}; -} -DifferentialExpressionSearchController._path = ctxBasePath + '/dwr'; -DifferentialExpressionSearchController.getDifferentialExpression = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionSearchController/getDifferentialExpression" ); - dwr.engine._execute( DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', - 'getDifferentialExpression', p0, p1, p2, callback ); -}; -DifferentialExpressionSearchController.getDifferentialExpressionWithoutBatch = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionSearchController/getDifferentialExpressionWithoutBatch" ); - dwr.engine._execute( DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', - 'getDifferentialExpressionWithoutBatch', p0, p1, p2, callback ); -}; -DifferentialExpressionSearchController.getFactors = function( p0, callback ) { - dwr.engine._execute( DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', - 'getFactors', p0, callback ); -}; - -DifferentialExpressionSearchController.scheduleDiffExpSearchTask = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DifferentialExpressionSearchController/scheduleDiffExpSearchTask" ); - dwr.engine._execute( DifferentialExpressionSearchController._path, 'DifferentialExpressionSearchController', - 'scheduleDiffExpSearchTask', p0, p1, p2, callback ); -}; - -// ==================================================================================== -if ( typeof DiffExMetaAnalyzerController === 'undefined' ) { - var DiffExMetaAnalyzerController = {}; -} -DiffExMetaAnalyzerController._path = ctxBasePath + '/dwr'; -DiffExMetaAnalyzerController.analyzeResultSets = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DiffExMetaAnalyzerController/analyzeResultSets" ); - dwr.engine._execute( DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'analyzeResultSets', p0, - callback ); -}; -DiffExMetaAnalyzerController.findDetailMetaAnalysisById = function( p0, callback ) { - dwr.engine._execute( DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', - 'findDetailMetaAnalysisById', p0, callback ); -}; -DiffExMetaAnalyzerController.loadAllMetaAnalyses = function( callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DiffExMetaAnalyzerController/loadAllMetaAnalyses" ); - dwr.engine._execute( DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'loadAllMetaAnalyses', - callback ); -}; -DiffExMetaAnalyzerController.removeMetaAnalysis = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DiffExMetaAnalyzerController/removeMetaAnalysis" ); - dwr.engine._execute( DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'removeMetaAnalysis', p0, - callback ); -}; -DiffExMetaAnalyzerController.saveResultSets = function( p0, p1, p2, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/DiffExMetaAnalyzerController/saveResultSets" ); - dwr.engine._execute( DiffExMetaAnalyzerController._path, 'DiffExMetaAnalyzerController', 'saveResultSets', p0, p1, - p2, callback ); -}; - -// ==================================================================================== -if ( typeof ExperimentalDesignController === 'undefined' ) { - var ExperimentalDesignController = {}; -} -ExperimentalDesignController._path = ctxBasePath + '/dwr'; -ExperimentalDesignController.updateBioMaterials = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/updateBioMaterials" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'updateBioMaterials', p0, - callback ); -}; -ExperimentalDesignController.getFactorValues = function( p0, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'getFactorValues', p0, - callback ); -}; -ExperimentalDesignController.getExperimentalFactors = function( p0, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'getExperimentalFactors', - p0, callback ); -}; -ExperimentalDesignController.getBioMaterials = function( p0, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'getBioMaterials', p0, - callback ); -}; -ExperimentalDesignController.getBioMaterialCharacteristicCategories = function( p0, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'getBioMaterialCharacteristicCategories', p0, - callback ); -}; -ExperimentalDesignController.createDesignFromFile = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/createDesignFromFile" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'createDesignFromFile', p0, - p1, callback ); -}; -ExperimentalDesignController.createExperimentalFactor = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/createExperimentalFactor" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'createExperimentalFactor', - p0, p1, callback ); -}; -ExperimentalDesignController.createFactorValue = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/createFactorValue" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'createFactorValue', p0, - callback ); -}; -ExperimentalDesignController.createFactorValueCharacteristic = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/createFactorValueCharacteristic" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'createFactorValueCharacteristic', p0, p1, callback ); -}; -ExperimentalDesignController.deleteExperimentalFactors = function( pO, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/deleteExperimentalFactors" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'deleteExperimentalFactors', pO, p1, callback ); -}; -ExperimentalDesignController.deleteFactorValueCharacteristics = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/deleteFactorValueCharacteristics" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'deleteFactorValueCharacteristics', p0, callback ); -}; -ExperimentalDesignController.deleteFactorValues = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/deleteFactorValues" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteFactorValues', p0, - p1, callback ); -}; -ExperimentalDesignController.duplicateFactorValue = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/duplicateFactorValue" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'duplicateFactorValue', p0, - p1, callback ); -}; -ExperimentalDesignController.getFactorValuesWithCharacteristics = function( p0, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'getFactorValuesWithCharacteristics', p0, callback ); -}; -ExperimentalDesignController.updateExperimentalFactors = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/updateExperimentalFactors" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'updateExperimentalFactors', p0, callback ); -}; -ExperimentalDesignController.updateFactorValueCharacteristics = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/updateFactorValueCharacteristics" ); - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', - 'updateFactorValueCharacteristics', p0, callback ); -}; -ExperimentalDesignController.markFactorValuesAsNeedsAttention = function( p0, p1, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'markFactorValuesAsNeedsAttention', - p0, p1, callback ); -}; -ExperimentalDesignController.clearFactorValuesNeedsAttention = function( p0, p1, callback ) { - dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'clearFactorValuesNeedsAttention', - p0, p1, callback ); -}; -// ==================================================================================== -if ( typeof ExpressionDataFileUploadController === 'undefined' ) { - var ExpressionDataFileUploadController = {}; -} -ExpressionDataFileUploadController._path = ctxBasePath + '/dwr'; -ExpressionDataFileUploadController.load = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionDataFileUploadController/load" ); - dwr.engine._execute( ExpressionDataFileUploadController._path, 'ExpressionDataFileUploadController', 'load', p0, - callback ); -}; -ExpressionDataFileUploadController.validate = function( p0, callback ) { - dwr.engine._execute( ExpressionDataFileUploadController._path, 'ExpressionDataFileUploadController', 'validate', p0, - callback ); -}; -// ==================================================================================== -if ( typeof ExpressionExperimentController === 'undefined' ) { - var ExpressionExperimentController = {}; -} -ExpressionExperimentController._path = ctxBasePath + '/dwr'; -ExpressionExperimentController.getAnnotation = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'getAnnotation', p0, - callback ); -}; -ExpressionExperimentController.find = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/find" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'find', p0, p1, - callback ); -}; -ExpressionExperimentController.searchExpressionExperiments = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/searchExpressionExperiments" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'searchExpressionExperiments', p0, callback ); -}; -ExpressionExperimentController.getAllTaxonExperimentGroup = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'getAllTaxonExperimentGroup', p0, callback ); -}; -ExpressionExperimentController.searchExperimentsAndExperimentGroups = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/searchExperimentsAndExperimentGroups" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'searchExperimentsAndExperimentGroups', p0, p1, callback ); -}; -ExpressionExperimentController.getDescription = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'getDescription', p0, - callback ); -}; -ExpressionExperimentController.getFactorValues = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'getFactorValues', p0, - callback ); -}; -ExpressionExperimentController.getExperimentalFactors = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/getExperimentalFactors" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'getExperimentalFactors', p0, callback ); -}; -ExpressionExperimentController.updateReport = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/updateReport" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'updateReport', p0, - callback ); -}; -ExpressionExperimentController.updatePubMed = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/updatePubMed" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'updatePubMed', p0, p1, - callback ); -}; -ExpressionExperimentController.deleteById = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/deleteById" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'deleteById', p0, - callback ); -}; -ExpressionExperimentController.getDesignMatrixRows = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/getDesignMatrixRows" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'getDesignMatrixRows', - p0, callback ); -}; -ExpressionExperimentController.loadExpressionExperimentDetails = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadExpressionExperimentDetails?" - + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadExpressionExperimentDetails', p0, callback ); -}; -ExpressionExperimentController.loadQuantitationTypes = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadQuantitationTypes?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadQuantitationTypes', p0, callback ); -}; -ExpressionExperimentController.loadExpressionExperiments = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadExpressionExperiments?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadExpressionExperiments', p0, callback ); -}; -ExpressionExperimentController.loadDetailedExpressionExperiments = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadDetailedExpressionExperiments?" - + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadDetailedExpressionExperiments', p0, callback ); -}; - -ExpressionExperimentController.loadExperimentsForPlatform = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadExperimentsForPlatform?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadExperimentsForPlatform', p0, callback ); -}; - -ExpressionExperimentController.loadStatusSummaries = function( p0, p1, p2, p3, p4, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/loadStatusSummaries" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'loadStatusSummaries', - p0, p1, p2, p3, p4, callback ); -}; -ExpressionExperimentController.removePrimaryPublication = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/removePrimaryPublication?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'removePrimaryPublication', p0, callback ); -}; -ExpressionExperimentController.updateAllReports = function( callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/updateAllReports" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'updateAllReports', - callback ); -}; -ExpressionExperimentController.updateBasics = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/updateBasics" ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'updateBasics', p0, - callback ); -}; -// ExpressionExperimentController.clearFromCaches = function(p0, callback ) { -// dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', -// 'clearFromCaches', p0, callback); -// }; -// ExpressionExperimentController.updateBioMaterialMapping = function(callback) { -// dwr.engine._execute(ExpressionExperimentController._path, 'ExpressionExperimentController', -// 'updateBioMaterialMapping', callback); -// } -ExpressionExperimentController.unmatchAllBioAssays = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/unmatchAllBioAssays?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'unmatchAllBioAssays', - p0, callback ); -}; -ExpressionExperimentController.canCurrentUserEditExperiment = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'canCurrentUserEditExperiment', p0, callback ); -}; -ExpressionExperimentController.browse = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/browse?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'browse', p0, callback ); -}; -ExpressionExperimentController.browseSpecificIds = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/browseSpecificIds?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'browseSpecificIds', - p0, p1, callback ); -}; -ExpressionExperimentController.browseByTaxon = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentController/browseByTaxon?" + p0 ); - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', 'browseByTaxon', p0, - p1, callback ); -}; -ExpressionExperimentController.loadCountsForDataSummaryTable = function( callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadCountsForDataSummaryTable', callback ); -}; -ExpressionExperimentController.loadExpressionExperimentsWithQcIssues = function( callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'loadExpressionExperimentsWithQcIssues', callback ); -}; -ExpressionExperimentController.recalculateBatchConfound = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'recalculateBatchConfound', p0, callback ); -}; -ExpressionExperimentController.recalculateBatchEffect = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'recalculateBatchEffect', p0, callback ); -}; -ExpressionExperimentController.runGeeq = function( p0, p1, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'runGeeq', p0, p1, callback ); -}; -ExpressionExperimentController.setGeeqManualSettings = function( p0, p1, callback ) { - dwr.engine._execute( ExpressionExperimentController._path, 'ExpressionExperimentController', - 'setGeeqManualSettings', p0, p1, callback ); -}; - -// ==================================================================================== -if ( typeof ExpressionExperimentDataFetchController === 'undefined' ) { - var ExpressionExperimentDataFetchController = {}; -} -ExpressionExperimentDataFetchController._path = ctxBasePath + '/dwr'; -ExpressionExperimentDataFetchController.getDataFile = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentDataFetchController/getDataFile?" + p0 ); - dwr.engine._execute( ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', - 'getDataFile', p0, callback ); -}; -ExpressionExperimentDataFetchController.getMetadataFiles = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', - 'getMetadataFiles', p0, callback ); -}; -ExpressionExperimentDataFetchController.getDiffExpressionDataFile = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentDataFetchController/getDiffExpressionDataFile?" - + p0 ); - dwr.engine._execute( ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', - 'getDiffExpressionDataFile', p0, callback ); -}; -ExpressionExperimentDataFetchController.getCoExpressionDataFile = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentDataFetchController/getCoExpressionDataFile?" - + p0 ); - dwr.engine._execute( ExpressionExperimentDataFetchController._path, 'ExpressionExperimentDataFetchController', - 'getCoExpressionDataFile', p0, callback ); -}; -// ==================================================================================== -if ( typeof ExpressionExperimentLoadController === 'undefined' ) { - var ExpressionExperimentLoadController = {}; -} -ExpressionExperimentLoadController._path = ctxBasePath + '/dwr'; -ExpressionExperimentLoadController.load = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentLoadController._path, 'ExpressionExperimentLoadController', 'load', p0, - callback ); -}; - -// ==================================================================================== -if ( typeof ExpressionExperimentSetController === 'undefined' ) { - var ExpressionExperimentSetController = {}; -} -ExpressionExperimentSetController._path = ctxBasePath + '/dwr'; -ExpressionExperimentSetController.remove = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/remove?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'remove', p0, - callback ); -}; -ExpressionExperimentSetController.create = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/create?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'create', p0, - callback ); -}; -ExpressionExperimentSetController.update = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/update?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'update', p0, - callback ); -}; -ExpressionExperimentSetController.updateNameDesc = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/updateNameDesc?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateNameDesc', - p0, callback ); -}; -ExpressionExperimentSetController.updateMembers = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/updateMembers?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'updateMembers', - p0, p1, callback ); -}; -ExpressionExperimentSetController.loadAll = function( callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/loadAll" ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadAll', - callback ); -}; -ExpressionExperimentSetController.load = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/load?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'load', p0, - callback ); -}; -ExpressionExperimentSetController.loadByName = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExpressionExperimentSetController/loadByName?" + p0 ); - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'loadByName', p0, - callback ); -}; -ExpressionExperimentSetController.removeUserAndSessionGroups = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'removeUserAndSessionGroups', p0, callback ); -}; -ExpressionExperimentSetController.addUserAndSessionGroups = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'addUserAndSessionGroups', p0, callback ); -}; -ExpressionExperimentSetController.addSessionGroups = function( p0, p1, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'addSessionGroups', p0, p1, callback ); -}; -ExpressionExperimentSetController.addSessionGroup = function( p0, p1, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'addSessionGroup', p0, p1, callback ); -}; -ExpressionExperimentSetController.updateUserAndSessionGroups = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'updateUserAndSessionGroups', p0, callback ); -}; -ExpressionExperimentSetController.updateSessionGroups = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'updateSessionGroups', p0, callback ); -}; -ExpressionExperimentSetController.loadAllUserAndSessionGroups = function( callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'loadAllUserAndSessionGroups', callback ); -}; -ExpressionExperimentSetController.loadAllSessionGroups = function( callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'loadAllSessionGroups', callback ); -}; -// ExpressionExperimentSetController.getExperimentsInSetBySessionId = function( p0, callback ) { -// dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', -// 'getExperimentsInSetBySessionId', p0, callback ); -// }; -ExpressionExperimentSetController.getExperimentIdsInSet = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'getExperimentIdsInSet', p0, callback ); -}; -ExpressionExperimentSetController.getExperimentsInSet = function( p0, p1, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'getExperimentsInSet', p0, p1, callback ); -}; -ExpressionExperimentSetController.canCurrentUserEditGroup = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', - 'canCurrentUserEditGroup', p0, callback ); -}; - -// ==================================================================================== - -if ( typeof ExpressionExperimentReportGenerationController === 'undefined' ) { - var ExpressionExperimentReportGenerationController = {}; -} -ExpressionExperimentReportGenerationController._path = ctxBasePath + '/dwr'; - -ExpressionExperimentReportGenerationController.run = function( p0, callback ) { - dwr.engine._execute( ExpressionExperimentReportGenerationController._path, - 'ExpressionExperimentReportGenerationController', 'run', p0, callback ); -}; -ExpressionExperimentReportGenerationController.runAll = function( callback ) { - dwr.engine._execute( ExpressionExperimentReportGenerationController._path, - 'ExpressionExperimentReportGenerationController', 'runAll', callback ); -}; -// ==================================================================================== -if ( typeof CoexpressionSearchController === 'undefined' ) { - var CoexpressionSearchController = {}; -} -CoexpressionSearchController._path = ctxBasePath + '/dwr'; - -CoexpressionSearchController.doSearch = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/CoexpressionSearchController/doSearch" ); - dwr.engine._execute( CoexpressionSearchController._path, 'CoexpressionSearchController', 'doSearch', p0, callback ); -}; -CoexpressionSearchController.doSearchQuickComplete = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/CoexpressionSearchController/doSearchQuickComplete" ); - dwr.engine._execute( CoexpressionSearchController._path, 'CoexpressionSearchController', 'doSearchQuickComplete', - p0, p1, callback ); - -}; - -CoexpressionSearchController.doBackgroundCoexSearch = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/CoexpressionSearchController/doBackgroundCoexSearch" ); - dwr.engine._execute( CoexpressionSearchController._path, 'CoexpressionSearchController', 'doBackgroundCoexSearch', - p0, callback ); -}; -// ==================================================================================== -if ( typeof FileUploadController === 'undefined' ) { - var FileUploadController = {}; -} -FileUploadController._path = ctxBasePath + '/dwr'; -FileUploadController.upload = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/FileUploadController/upload" ); - dwr.engine._execute( FileUploadController._path, 'FileUploadController', 'upload', p0, callback ); -}; -FileUploadController.getUploadStatus = function( callback ) { - dwr.engine._execute( FileUploadController._path, 'FileUploadController', 'getUploadStatus', callback ); -}; -// ==================================================================================== -if ( typeof GeneController === 'undefined' ) { - var GeneController = {}; -} -GeneController._path = ctxBasePath + '/dwr'; -GeneController.getProducts = function( p0, callback ) { - // Not used? - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneController/getProducts" ); - dwr.engine._execute( GeneController._path, 'GeneController', 'getProducts', p0, callback ); -}; -GeneController.findGOTerms = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneController/findGOTerms" ); - dwr.engine._execute( GeneController._path, 'GeneController', 'findGOTerms', p0, callback ); -}; -GeneController.loadGeneDetails = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneController/loadGeneDetails" ); - dwr.engine._execute( GeneController._path, 'GeneController', 'loadGeneDetails', p0, callback ); -}; -// ==================================================================================== -if ( typeof GenePickerController === 'undefined' ) { - var GenePickerController = {}; -} -GenePickerController._path = ctxBasePath + '/dwr'; -GenePickerController.getGenes = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/getGenes" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getGenes', p0, callback ); -}; -GenePickerController.getGenesByGOId = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/getGenesByGOId" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getGenesByGOId', p0, p1, callback ); -}; -GenePickerController.searchGenes = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/searchGenes" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchGenes', p0, p1, callback ); -}; -GenePickerController.searchGenesAndGeneGroups = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/searchGenesAndGeneGroups" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchGenesAndGeneGroups', p0, p1, - callback ); -}; -GenePickerController.searchGenesAndGeneGroupsGetIds = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/searchGenesAndGeneGroupsGetIds" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchGenesAndGeneGroupsGetIds', p0, p1, - callback ); -}; -GenePickerController.searchGenesWithNCBIId = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GenePickerController/searchGenesWithNCBIId" ); - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchGenesWithNCBIId', p0, p1, callback ); -}; -GenePickerController.getTaxa = function( callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getTaxa', callback ); -}; -GenePickerController.getTaxaWithGenes = function( callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getTaxaWithGenes', callback ); -}; -GenePickerController.getTaxaWithDatasets = function( callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getTaxaWithDatasets', callback ); -}; -GenePickerController.getTaxaWithArrays = function( callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getTaxaWithArrays', callback ); -}; -GenePickerController.getTaxaWithEvidence = function( callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getTaxaWithEvidence', callback ); -}; -GenePickerController.searchMultipleGenes = function( p0, p1, callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchMultipleGenes', p0, p1, callback ); -}; -/** - * @param {Array} - * @param {Number} - * @param {Function} - */ -GenePickerController.searchMultipleGenesGetMap = function( p0, p1, callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'searchMultipleGenesGetMap', p0, p1, - callback ); -}; -GenePickerController.getGeneSetByGOId = function( p0, p1, callback ) { - dwr.engine._execute( GenePickerController._path, 'GenePickerController', 'getGeneSetByGOId', p0, p1, callback ); -}; -// ==================================================================================== -if ( typeof GeoRecordBrowserController === 'undefined' ) { - var GeoRecordBrowserController = {}; -} -GeoRecordBrowserController._path = ctxBasePath + '/dwr'; -GeoRecordBrowserController.browse = function( p0, p1, p2, callback ) { - dwr.engine._execute( GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'browse', p0, p1, p2, callback ); -}; -GeoRecordBrowserController.getDetails = function( p0, callback ) { - dwr.engine._execute( GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'getDetails', p0, callback ); -}; -GeoRecordBrowserController.toggleUsability = function( p0, callback ) { - dwr.engine - ._execute( GeoRecordBrowserController._path, 'GeoRecordBrowserController', 'toggleUsability', p0, callback ); -}; -// ==================================================================================== -if ( typeof SecurityController === 'undefined' ) { - var SecurityController = {}; -} -SecurityController._path = ctxBasePath + '/dwr'; -SecurityController.createGroup = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/createGroup" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'createGroup', p0, callback ); -}; -SecurityController.deleteGroup = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/deleteGroup" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'deleteGroup', p0, callback ); -}; -SecurityController.getAvailableGroups = function( callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getAvailableGroups', callback ); -}; -SecurityController.getAvailableSids = function( callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getAvailableSids', callback ); -}; -SecurityController.getUsersData = function( p0, p1, callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getUsersData', p0, p1, callback ); -}; -SecurityController.getSecurityInfo = function( p0, callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getSecurityInfo', p0, callback ); -}; -SecurityController.addUserToGroup = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/addUserToGroup" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'addUserToGroup', p0, p1, callback ); -}; -SecurityController.removeUsersFromGroup = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/removeUsersFromGroup" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'removeUsersFromGroup', p0, p1, callback ); -}; -SecurityController.makeGroupReadable = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/makeGroupReadable" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'makeGroupReadable', p0, p1, callback ); -}; -SecurityController.makeGroupWriteable = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/makeGroupWriteable" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'makeGroupWriteable', p0, p1, callback ); -}; -SecurityController.makePrivate = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/makePrivate" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'makePrivate', p0, callback ); -}; -SecurityController.makePublic = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/makePublic" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'makePublic', p0, callback ); -}; -SecurityController.removeGroupWriteable = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/removeGroupWriteable" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'removeGroupWriteable', p0, p1, callback ); -}; -SecurityController.removeGroupReadable = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/removeGroupReadable" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'removeGroupReadable', p0, p1, callback ); -}; -SecurityController.updatePermissions = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/updatePermissions" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'updatePermissions', p0, callback ); -}; -SecurityController.updatePermission = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SecurityController/updatePermission" ); - dwr.engine._execute( SecurityController._path, 'SecurityController', 'updatePermission', p0, callback ); -}; -SecurityController.getGroupMembers = function( p0, callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getGroupMembers', p0, callback ); -}; -SecurityController.getAvailablePrincipalSids = function( callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getAvailablePrincipalSids', callback ); -}; -SecurityController.getAuthenticatedUserNames = function( callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getAuthenticatedUserNames', callback ); -}; -SecurityController.getAuthenticatedUserCount = function( callback ) { - dwr.engine._execute( SecurityController._path, 'SecurityController', 'getAuthenticatedUserCount', callback ); -}; -// ============================================================================== -if ( typeof GeneSetController === 'undefined' ) { - var GeneSetController = {}; -} -GeneSetController._path = ctxBasePath + '/dwr'; -GeneSetController.getGenesInGroup = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getGenesInGroup', p0, p1, callback ); -}; -GeneSetController.getGenesIdsInGroup = function( p0, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getGeneIdsInGroup', p0, callback ); -}; -GeneSetController.load = function( p0, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'load', p0, callback ); -}; -GeneSetController.getGeneSetsByGOId = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getGeneSetsByGO', p0, p1, callback ); -}; -GeneSetController.update = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/update" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'update', p0, callback ); -}; -GeneSetController.updateNameDesc = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/updateNameDesc" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'updateNameDesc', p0, callback ); -}; -GeneSetController.updateMembers = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/updateMembers" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'updateMembers', p0, p1, callback ); -}; -GeneSetController.updateSessionGroups = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/updateSessionGroups" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'updateSessionGroups', p0, callback ); -}; -GeneSetController.updateSessionGroup = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/updateSessionGroup" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'updateSessionGroup', p0, callback ); -}; -GeneSetController.updateUserAndSessionGroups = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/updateUserAndSessionGroups" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'updateUserAndSessionGroups', p0, callback ); -}; -GeneSetController.create = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/create" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'create', p0, callback ); -}; -GeneSetController.addSessionGroups = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'addSessionGroups', p0, p1, callback ); -}; -GeneSetController.addSessionGroup = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'addSessionGroup', p0, p1, callback ); -}; -GeneSetController.addUserAndSessionGroups = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/addUserAndSessionGroups" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'addUserAndSessionGroups', p0, callback ); -}; -GeneSetController.remove = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/remove" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'remove', p0, callback ); -}; -GeneSetController.removeSessionGroups = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/removeSessionGroups" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'removeSessionGroups', p0, callback ); -}; -GeneSetController.removeUserAndSessionGroups = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/removeUserAndSessionGroups" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'removeUserAndSessionGroups', p0, callback ); -}; -GeneSetController.getUsersGeneGroups = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getUsersGeneGroups', p0, p1, callback ); -}; -GeneSetController.getUserSessionGeneGroups = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getUserSessionGeneGroups', p0, p1, callback ); -}; -GeneSetController.getUserAndSessionGeneGroups = function( p0, p1, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'getUserAndSessionGeneGroups', p0, p1, callback ); -}; -GeneSetController.findGeneSetsByGene = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/findGeneSetsByGene" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'findGeneSetsByGene', p0, callback ); -}; -GeneSetController.findGeneSetsByName = function( p0, p1, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/GeneSetController/findGeneSetsByName" ); - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'findGeneSetsByName', p0, p1, callback ); -}; -GeneSetController.canCurrentUserEditGroup = function( p0, callback ) { - dwr.engine._execute( GeneSetController._path, 'GeneSetController', 'canCurrentUserEditGroup', p0, callback ); -}; -// ==================================================================================== -if ( typeof SystemMonitorController === 'undefined' ) { - var SystemMonitorController = {}; -} -SystemMonitorController._path = ctxBasePath + '/dwr'; -SystemMonitorController.getHibernateStatus = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'getHibernateStatus', callback ); -}; -SystemMonitorController.getCacheStatus = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'getCacheStatus', callback ); -}; -SystemMonitorController.clearCache = function( p0, callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'clearCache', p0, callback ); -}; -SystemMonitorController.clearAllCaches = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'clearAllCaches', callback ); -}; -SystemMonitorController.enableStatistics = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'enableStatistics', callback ); -}; -SystemMonitorController.disableStatistics = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'disableStatistics', callback ); -}; -SystemMonitorController.resetHibernateStatus = function( callback ) { - dwr.engine._execute( SystemMonitorController._path, 'SystemMonitorController', 'resetHibernateStatus', callback ); -}; - -// ==================================================================================== -if ( typeof LinkAnalysisController === 'undefined' ) { - var LinkAnalysisController = {}; -} -LinkAnalysisController._path = ctxBasePath + '/dwr'; -LinkAnalysisController.run = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/LinkAnalysisController/run" ); - dwr.engine._execute( LinkAnalysisController._path, 'LinkAnalysisController', 'run', p0, callback ); -}; - -// ==================================================================================== -if ( typeof PreprocessController === 'undefined' ) { - var PreprocessController = {}; -} -PreprocessController._path = ctxBasePath + '/dwr'; -PreprocessController.run = function( p0, callback ) { - dwr.engine._execute( PreprocessController._path, - 'PreprocessController', 'run', p0, callback ); -}; -PreprocessController.diagnostics = function( p0, callback ) { - dwr.engine._execute( PreprocessController._path, - 'PreprocessController', 'diagnostics', p0, callback ); -}; -// ==================================================================================== -if ( typeof ProgressStatusService === 'undefined' ) { - var ProgressStatusService = {}; -} -ProgressStatusService._path = ctxBasePath + '/dwr'; -ProgressStatusService.getProgressStatus = function( p0, callback ) { - dwr.engine._execute( ProgressStatusService._path, 'ProgressStatusService', 'getProgressStatus', p0, callback ); -}; -ProgressStatusService.getSubmittedTask = function( p0, callback ) { - dwr.engine._execute( ProgressStatusService._path, 'ProgressStatusService', 'getSubmittedTask', p0, callback ); -}; -ProgressStatusService.cancelJob = function( p0, callback ) { - dwr.engine._execute( ProgressStatusService._path, 'ProgressStatusService', 'cancelJob', p0, callback ); -}; -ProgressStatusService.addEmailAlert = function( p0, callback ) { - dwr.engine._execute( ProgressStatusService._path, 'ProgressStatusService', 'addEmailAlert', p0, callback ); -}; -ProgressStatusService.getSubmittedTasks = function( callback ) { - dwr.engine._execute( ProgressStatusService._path, 'ProgressStatusService', 'getSubmittedTasks', callback ); -}; -// ==================================================================================== - -if ( typeof TwoChannelMissingValueController === 'undefined' ) { - var TwoChannelMissingValueController = {}; -} -TwoChannelMissingValueController._path = ctxBasePath + '/dwr'; -TwoChannelMissingValueController.run = function( p0, callback ) { - dwr.engine - ._execute( TwoChannelMissingValueController._path, 'TwoChannelMissingValueController', 'run', p0, callback ); -}; -TwoChannelMissingValueController.run = function( p0, callback ) { - dwr.engine - ._execute( TwoChannelMissingValueController._path, 'TwoChannelMissingValueController', 'run', p0, callback ); -}; -// ==================================================================================== -if ( typeof SvdController === 'undefined' ) { - var SvdController = {}; -} -SvdController._path = ctxBasePath + '/dwr'; -SvdController.run = function( p0, callback ) { - dwr.engine._execute( SvdController._path, 'SvdController', 'run', p0, callback ); -}; - -// ==================================================================================== -if ( typeof SearchService === 'undefined' ) { - var SearchService = {}; -} -SearchService._path = ctxBasePath + '/dwr'; -SearchService.ajaxSearch = function( p0, callback ) { - googleAnalyticsTrackPageviewIfConfigured( "/Gemma/SearchService/search" ); - dwr.engine._execute( SearchService._path, 'SearchService', 'ajaxSearch', p0, callback ); -}; -// ==================================================================================== -if ( typeof TaskCompletionController === 'undefined' ) { - var TaskCompletionController = {}; -} -TaskCompletionController._path = ctxBasePath + '/dwr'; -TaskCompletionController.checkResult = function( p0, callback ) { - dwr.engine._execute( TaskCompletionController._path, 'TaskCompletionController', 'checkResult', p0, callback ); -}; -// ==================================================================================== -if ( typeof FeedReader === 'undefined' ) { - var FeedReader = {}; -} -FeedReader._path = ctxBasePath + '/dwr'; -FeedReader.getLatestNews = function( callback ) { - dwr.engine._execute( FeedReader._path, 'FeedReader', 'getLatestNews', callback ); -}; -// ==================================================================================== -if ( typeof UserListController === 'undefined' ) { - var UserListController = {}; -} -UserListController._path = ctxBasePath + '/dwr'; -UserListController.getUsers = function( callback ) { - dwr.engine._execute( UserListController._path, 'UserListController', 'getUsers', callback ); -}; -UserListController.saveUser = function( p0, callback ) { - dwr.engine._execute( UserListController._path, 'UserListController', 'saveUser', p0, callback ); -}; -// ===================================================================================== -if ( typeof LinkOutController === 'undefined' ) { - var LinkOutController = {}; -} -LinkOutController._path = ctxBasePath + '/dwr'; -LinkOutController.getAllenBrainAtlasLink = function( p0, callback ) { - dwr.engine._execute( LinkOutController._path, 'LinkOutController', 'getAllenBrainAtlasLink', p0, callback ); -}; -// ===================================================================================== -// ===================================================================================== -if ( typeof JavascriptLogger === 'undefined' ) { - var JavascriptLogger = {}; -} -JavascriptLogger._path = ctxBasePath + '/dwr'; -JavascriptLogger.writeToLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToLog', p0, p1, p2, p3, p4, callback ); -}; -JavascriptLogger.writeToDebugLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToDebugLog', p0, p1, p2, p3, p4, callback ); -}; -JavascriptLogger.writeToInfoLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToInfoLog', p0, p1, p2, p3, p4, callback ); -}; -JavascriptLogger.writeToWarnLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToWarnLog', p0, p1, p2, p3, p4, callback ); -}; -JavascriptLogger.writeToErrorLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToErrorLog', p0, p1, p2, p3, p4, callback ); -}; -JavascriptLogger.writeToFatalLog = function( p0, p1, p2, p3, p4, callback ) { - dwr.engine._execute( JavascriptLogger._path, 'JavascriptLogger', 'writeToFatalLog', p0, p1, p2, p3, p4, callback ); -}; -// ==================================================================================== -if ( typeof SignupController === 'undefined' ) { - var SignupController = {}; -} -SignupController._path = ctxBasePath + '/dwr'; -SignupController.loginCheck = function( callback ) { - dwr.engine._execute( SignupController._path, 'SignupController', 'loginCheck', callback ); -}; - -// ==================================================================================== diff --git a/gemma-web/src/main/webapp/scripts/api/eeDesignMatrix.js b/gemma-web/src/main/webapp/scripts/api/eeDesignMatrix.js index 658bfbea9b..a4066a0200 100755 --- a/gemma-web/src/main/webapp/scripts/api/eeDesignMatrix.js +++ b/gemma-web/src/main/webapp/scripts/api/eeDesignMatrix.js @@ -5,7 +5,7 @@ * @author Luke, Paul * @type */ -var DesignMatrix = { +Gemma.DesignMatrix = { /** * @memberOf DesignMatrix diff --git a/gemma-web/src/main/webapp/scripts/api/entities/.sorting b/gemma-web/src/main/webapp/scripts/api/entities/.sorting deleted file mode 100755 index 743cacda61..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/entities/.sorting +++ /dev/null @@ -1,3 +0,0 @@ -TaxonCombo.js -gene/ - diff --git a/gemma-web/src/main/webapp/scripts/api/entities/AuditTrailGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/AuditTrailGrid.js index 273eeb0421..86a14106ed 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/AuditTrailGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/AuditTrailGrid.js @@ -125,13 +125,13 @@ Gemma.AuditTrailGrid = Ext.extend(Ext.grid.GridPanel, { }), tbar: [{ xtype: 'button', - icon: ctxBasePath + "/images/icons/add.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/add.png", tooltip: 'Add a comment', handler: this.showAddEventDialog, scope: this }, { xtype: 'button', - icon: ctxBasePath + "/images/icons/arrow_refresh_small.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/arrow_refresh_small.png", tooltip: 'Reload view from the database', handler: this.refreshGrid, scope: this diff --git a/gemma-web/src/main/webapp/scripts/api/entities/GemmaNavigationHeader.js b/gemma-web/src/main/webapp/scripts/api/entities/GemmaNavigationHeader.js index a6a07d1f27..3519057aca 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/GemmaNavigationHeader.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/GemmaNavigationHeader.js @@ -6,7 +6,7 @@ Ext.namespace( 'Gemma', 'Gemma.AjaxLogin', 'Gemma.Application' ); var externalDatabasesStore = new Ext.data.JsonStore( { autoLoad : true, - url : ctxBasePath + '/rest/v2', + url : Gemma.CONTEXT_PATH + '/rest/v2', root : 'data.externalDatabases', idProperty : 'id', fields : [ 'id', 'name', 'description', 'uri', 'releaseVersion', 'releaseUrl', 'lastUpdated', 'externalDatabases' ] @@ -29,7 +29,7 @@ Gemma.GemmaNavigationHeader = Ext }, doSearchQuery : function() { if ( this.inMenuSearchField.getValue().length > 1 ) { - location.href = ctxBasePath + '/searcher.html?query=' + this.inMenuSearchField.getValue(); // + + location.href = Gemma.CONTEXT_PATH + '/searcher.html?query=' + this.inMenuSearchField.getValue(); // + // '&scope=EG' } }, @@ -49,12 +49,12 @@ Gemma.GemmaNavigationHeader = Ext + 'sharing of gene expression profiling data. Gemma contains data from thousands ' + 'of public studies, referencing thousands of published papers. Users can search, access and visualize the data and differential' + ' expression results. For more information, see the ' - + 'help and documentation. ' + + 'help and documentation. ' + '

Gemma was developed by the Pavlidis group at UBC ' - + '(credits ). ' + + '(credits ). ' + '

To cite Gemma, please use:
' + 'Lim N., et al., Curation of over 10,000 transcriptomic studies to enable data reuse. Database, 2021.' - + ' link ' + + ' link ' + '

' } ], buttons : [ { @@ -76,7 +76,7 @@ Gemma.GemmaNavigationHeader = Ext summary += ed.data.description; if ( ed.data.uri !== null ) { - summary += ' link '; + summary += ' link '; } summary += '
'; if ( ed.data.releaseVersion != null ) { @@ -96,11 +96,11 @@ Gemma.GemmaNavigationHeader = Ext summary += Ext.util.Format.capitalize( relatedEd.name ); if ( relatedEd.lastUpdated != null ) { if ( relatedEd.releaseUrl != null ) { - summary += ' ' + relatedEd.releaseVersion + ' '; + summary += ' ' + relatedEd.releaseVersion + ' '; } summary += ' last updated on ' + new Date( relatedEd.lastUpdated ).toLocaleDateString() + '.'; if ( relatedEd.uri != null ) { - summary += ' link '; + summary += ' link '; } } } ); @@ -168,26 +168,26 @@ Gemma.GemmaNavigationHeader = Ext } ] }, /* - * { text : 'Search Analyses', href : ctxBasePath + "/analysesResultsSearch.html", tooltip : "Search for + * { text : 'Search Analyses', href : Gemma.CONTEXT_PATH + "/analysesResultsSearch.html", tooltip : "Search for * differential and coexpression patterns" }, '-', */ { text : 'Browse Datasets', - href : gemBrowUrl, + href : Gemma.GEMBROW_URL, tooltip : "View the list of Gemma's expression data sets" }, { text : 'Browse Datasets (legacy)', - href : ctxBasePath + "/expressionExperiment/showAllExpressionExperiments.html", + href : Gemma.CONTEXT_PATH + "/expressionExperiment/showAllExpressionExperiments.html", tooltip : "View the list of Gemma's expression data sets" },{ text : 'Browse Platforms', - href : ctxBasePath + "/arrays/showAllArrayDesigns.html", + href : Gemma.CONTEXT_PATH + "/arrays/showAllArrayDesigns.html", tooltip : "View the list of Gemma's platforms" } /*, { text : 'Search Annotated Papers', - href : ctxBasePath + "/bibRef/searchBibRefs.html", + href : Gemma.CONTEXT_PATH + "/bibRef/searchBibRefs.html", tooltip : "Search for papers the Gemma curators have annotated" } */ ], @@ -223,23 +223,23 @@ Gemma.GemmaNavigationHeader = Ext // clicked: { text : 'Load Data', - href : ctxBasePath + "/expressionExperiment/upload.html", + href : Gemma.CONTEXT_PATH + "/expressionExperiment/upload.html", tooltip : "Upload your expression data" }, { text : 'Dataset manager', - href : ctxBasePath + "/expressionExperiment/showAllExpressionExperimentLinkSummaries.html", + href : Gemma.CONTEXT_PATH + "/expressionExperiment/showAllExpressionExperimentLinkSummaries.html", tooltip : "Curate your data" }, { text : 'Gene Groups', - href : ctxBasePath + "/geneGroupManager.html", + href : Gemma.CONTEXT_PATH + "/geneGroupManager.html", tooltip : "Manage your gene groups" }, { text : 'Experiment Groups', - href : ctxBasePath + "/expressionExperimentSetManager.html", + href : Gemma.CONTEXT_PATH + "/expressionExperimentSetManager.html", tooltip : "Manage your dataset / expression experiment groups" }, '-', { text : 'Edit Profile', - href : ctxBasePath + "/userProfile.html", + href : Gemma.CONTEXT_PATH + "/userProfile.html", tooltip : "Edit your profile" } ], listeners : { @@ -275,16 +275,16 @@ Gemma.GemmaNavigationHeader = Ext }, scope : this }, { - text : 'Help and Documentation ', + text : 'Help and Documentation ', href : "https://pavlidislab.github.io/Gemma/", tooltip : "Gemma overview and general help", hrefTarget : "_blank" }/*, { text : 'Dataset citations', - href : ctxBasePath + "/bibRef/showAllEeBibRefs.html" + href : Gemma.CONTEXT_PATH + "/bibRef/showAllEeBibRefs.html" }, { text : 'QC updates', - href : ctxBasePath + "/expressionExperimentsWithQC.html" + href : Gemma.CONTEXT_PATH + "/expressionExperimentsWithQC.html" }*/ ], listeners : { mouseover : function() { @@ -319,7 +319,7 @@ Gemma.GemmaNavigationHeader = Ext tooltip : "Gemma documentation" }, { text : 'Contact Us', - href : ctxBasePath + "/contactUs.html", + href : Gemma.CONTEXT_PATH + "/contactUs.html", tooltip : "Contact Us" } ], listeners : { @@ -353,39 +353,39 @@ Gemma.GemmaNavigationHeader = Ext items : [// these items will render as dropdown menu items when the arrow is clicked: { text : 'Add Data', - href : ctxBasePath + "/admin/loadExpressionExperiment.html", + href : Gemma.CONTEXT_PATH + "/admin/loadExpressionExperiment.html", tooltip : "Import from GEO or ArrayExpress" }, { text : 'Browse GEO', - href : ctxBasePath + "/admin/geoRecordBrowser.html", + href : Gemma.CONTEXT_PATH + "/admin/geoRecordBrowser.html", tooltip : "Browse data sets in GEO" }, { text : 'Search Annotations', - href : ctxBasePath + "/characteristicBrowser.html", + href : Gemma.CONTEXT_PATH + "/characteristicBrowser.html", tooltip : "Search annotations" }, '-', { text : 'Manage Users', - href : ctxBasePath + "/admin/userManager.html", + href : Gemma.CONTEXT_PATH + "/admin/userManager.html", tooltip : "Manage users" }, { text : 'View Active Sessions', - href : ctxBasePath + "/admin/activeUsers.html", + href : Gemma.CONTEXT_PATH + "/admin/activeUsers.html", tooltip : "View active users" }, { text : 'System Monitoring', - href : ctxBasePath + "/admin/systemStats.html" + href : Gemma.CONTEXT_PATH + "/admin/systemStats.html" }, { text : 'Manage Search Indexes', - href : ctxBasePath + "/admin/indexer.html" + href : Gemma.CONTEXT_PATH + "/admin/indexer.html" }, { text : 'Manage Maintenance Mode', - href : ctxBasePath + "/admin/maintenanceMode.html" + href : Gemma.CONTEXT_PATH + "/admin/maintenanceMode.html" }, { text : 'Update "What\'s New"', - href : ctxBasePath + "/whatsnew/generateCache.html" + href : Gemma.CONTEXT_PATH + "/whatsnew/generateCache.html" }, { text : 'Widget Test Page', - href : ctxBasePath + "/admin/widgetTest.html" + href : Gemma.CONTEXT_PATH + "/admin/widgetTest.html" } ], listeners : { mouseover : function() { @@ -421,7 +421,7 @@ Gemma.GemmaNavigationHeader = Ext style : 'background:white', items : [ { text : 'Edit your profile', - href : ctxBasePath + "/userProfile.html", + href : Gemma.CONTEXT_PATH + "/userProfile.html", tooltip : "Change your password" }, { text : 'Log out', @@ -497,7 +497,7 @@ Gemma.GemmaNavigationHeader = Ext }, this ); /* - * this.userText = new Ext.Panel({ tpl:'Welcome {userName}', hidden: + * this.userText = new Ext.Panel({ tpl:'Welcome {userName}', hidden: * !userLoggedIn, data: {userName: loggedInAs}, border:false, style:'font-size:11px' }); */ @@ -523,8 +523,8 @@ Gemma.GemmaNavigationHeader = Ext xtype : 'box', autoEl : { tag : 'a', - href : ctxBasePath + '/home.html', - cn : 'Gemma Logo' + href : Gemma.CONTEXT_PATH + '/home.html', + cn : 'Gemma Logo' } }, '->', { ref : 'navToolbar', @@ -560,7 +560,7 @@ Gemma.GemmaNavigationHeader = Ext autoEl : { tag : 'a', href : 'https://www.ubc.ca/', - cn : 'UBC Logo', + cn : 'UBC Logo', style : 'padding-left:15px; padding-right:10px' } } ] ); diff --git a/gemma-web/src/main/webapp/scripts/api/entities/analysis/differentialExpression/DifferentialExpressionAnalysesSummaryTree.js b/gemma-web/src/main/webapp/scripts/api/entities/analysis/differentialExpression/DifferentialExpressionAnalysesSummaryTree.js index 9bba97b170..5765cca061 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/analysis/differentialExpression/DifferentialExpressionAnalysesSummaryTree.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/analysis/differentialExpression/DifferentialExpressionAnalysesSummaryTree.js @@ -1,5 +1,5 @@ Ext.namespace('Gemma'); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * This provides a summary of the differential analyses done for a particular dataset/expression experiment. It is @@ -298,7 +298,7 @@ Gemma.DifferentialExpressionAnalysesSummaryTree = Ext return String .format( " " + + + " onClick='Gemma.ExpressionExperimentDataFetch.fetchDiffExpressionData({0})' > " + "", analysis.id); }, @@ -472,13 +472,13 @@ Gemma.DifferentialExpressionAnalysesSummaryTree = Ext linkText += ''; /* provide link for visualization. */ var tipText = "View top differentially expressed genes for "" + factorString + """; - linkText += ' ' + ""; var pValueDistImageSize = 16; - var imageUrl = ctxBasePath + '/expressionExperiment/visualizePvalueDist.html?' + 'id=' + eeID + '&analysisId=' + var imageUrl = Gemma.CONTEXT_PATH + '/expressionExperiment/visualizePvalueDist.html?' + 'id=' + eeID + '&analysisId=' + resultSet.analysisId + '&rsid=' + resultSet.resultSetId; var placeholderImageUrl = imageUrl + '&size=' + pValueDistImageSize; // -8px -6px is used as background-position property because the image has gray border. @@ -741,7 +741,7 @@ Gemma.DifferentialExpressionAnalysesSummaryTree = Ext var eeInfoTitle = "P-value distribution for " + factorName + " in: " - + "" + this.ee.shortName + " (" + Ext.util.Format.ellipsis(this.ee.name, 35) + ")"; new Ext.Window({ @@ -765,14 +765,14 @@ Ext.reg('differentialExpressionAnalysesSummaryTree', Gemma.DifferentialExpressio * fix for now, should replace visualize 'button' with ext button that calls this function, and move function inside * Gemma.DifferentialExpressionAnalysesSummaryTree */ -function visualizeDiffExpressionHandler(eeid, diffResultId, factorDetails, factorId) { +Gemma.DifferentialExpressionAnalysesSummaryTree.visualizeDiffExpressionHandler = function(eeid, diffResultId, factorDetails, factorId) { var visDiffWindow = new Gemma.VisualizationWithThumbsWindow({ thumbnails: false, readMethod: DEDVController.getDEDVForDiffExVisualizationByThreshold, title: "Top diff. ex. probes for "" + factorDetails + """, showLegend: false, - downloadLink: String.format(ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&rs={1}&thresh={2}&diffex=1", eeid, + downloadLink: String.format(Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&rs={1}&thresh={2}&diffex=1", eeid, diffResultId, Gemma.DIFFEXVIS_QVALUE_THRESHOLD) }); diff --git a/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/bibliographicReferenceSearchResultGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/bibliographicReferenceSearchResultGrid.js index 84a376461a..53c9649d92 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/bibliographicReferenceSearchResultGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/bibliographicReferenceSearchResultGrid.js @@ -101,7 +101,7 @@ Gemma.BibliographicReference.ColumnModel = new Ext.grid.ColumnModel({ for (var i = 0; i < value.length; i++) { result = result + ' ' + value[i].shortName + ''; } return result; diff --git a/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/index.js b/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/index.js new file mode 100644 index 0000000000..beeb3d42b3 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/bibliographicReference/index.js @@ -0,0 +1,3 @@ +import './bibliographicReferenceDetails' +import './bibliographicReferencePage' +import './bibliographicReferenceSearchResultGrid' diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/BioAssayGridPanel.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/BioAssayGridPanel.js index 45383ea578..7b2384eeb1 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/BioAssayGridPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/BioAssayGridPanel.js @@ -163,7 +163,7 @@ Gemma.BioAssayGrid = Ext.extend(Gemma.GemmaGridPanel, { * @memberOf Gemma.BioAssayGrid */ nameRenderer: function (value, metadata, record, row, col, ds) { - return "" + record.get('name') + ""; }, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupEditor.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupEditor.js index d12729073d..bced8d86b6 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupEditor.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupEditor.js @@ -22,7 +22,7 @@ Gemma.DatasetGroupEditor = Ext.extend( Ext.Panel, { title : "Dataset Group Editor " - + "", + + "", isLoggedIn : false, /** @@ -53,7 +53,7 @@ Gemma.DatasetGroupEditor = Ext.extend( Ext.Panel, { }, tbar : [ '->', { text : "Delete selected", - icon : ctxBasePath + "/images/icons/cross.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/cross.png", handler : this.removeSelectedFromdatasetGroupMembersGrid, scope : this } ], @@ -195,7 +195,7 @@ Gemma.DatasetGroupEditor = Ext.extend( Ext.Panel, { ExpressionExperimentController.getDescription( record.id, { callback : function( data ) { Ext.DomHelper.overwrite( this.dataSetDetailsPanel.body, - '

' + '

' + record.get( 'shortName' ) + "

" + record.get( 'name' ) + "

" + data + "

" ); this.detailsmask.hide(); }.createDelegate( this ) diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupPanel.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupPanel.js index 29f3b2c22f..8690b5eeed 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/DatasetGroupPanel.js @@ -98,7 +98,7 @@ Gemma.DatasetGroupEditToolbar = Ext.extend( Ext.Toolbar, { this.newBut = new Ext.Button( { handler : this.initNew, scope : this, - icon : ctxBasePath + "/images/icons/add.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/add.png", disabled : false, // if they are logged in. tooltip : "Create a new set (click 'commit' when you are done)" } ); @@ -107,7 +107,7 @@ Gemma.DatasetGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.commit, disabled : true, scope : this, - icon : ctxBasePath + "/images/icons/database_save.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_save.png", tooltip : "Commit all changes to the database" } ); @@ -115,7 +115,7 @@ Gemma.DatasetGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.copy, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/arrow_branch.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_branch.png", tooltip : "Clone as a new set (click 'save' afterwards)" } ); @@ -123,7 +123,7 @@ Gemma.DatasetGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.reset, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/arrow_undo.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_undo.png", tooltip : "Reset selected set to stored version" } ); @@ -131,7 +131,7 @@ Gemma.DatasetGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.remove, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/database_delete.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_delete.png", tooltip : "Delete selected set" } ); @@ -381,7 +381,7 @@ Gemma.DatasetGroupGridPanel = Ext } ), renderer : function( value, metadata, record, rowIndex, colIndex, store ) { if ( record.data.id && record.data.id > 0 ) { - return '' + value + ''; } return value; @@ -426,7 +426,7 @@ Gemma.DatasetGroupGridPanel = Ext renderer : function( value, metaData, record, rowIndex, colIndex, store ) { var v = ""; if ( !value ) { - v = ""; } @@ -457,7 +457,7 @@ Gemma.DatasetGroupGridPanel = Ext width : 0.12, renderer : function( value, metaData, record, rowIndex, colIndex, store ) { if ( value ) { - return ""; + return ""; } else { return " "; } diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/EEManager.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/EEManager.js index 057a04b181..4e8618f028 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/EEManager.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/EEManager.js @@ -599,7 +599,7 @@ Gemma.EEManager = Ext.extend(Ext.Component, { readMethod: DEDVController.getDEDVForPcaVisualization, title: "Top loaded probes for PC" + component, showLegend: false, - downloadLink: String.format(ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&component={1}&thresh={2}&pca=1", eeid, + downloadLink: String.format(Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&component={1}&thresh={2}&pca=1", eeid, component, count) }); this.vispcaWindow.show({ @@ -1151,7 +1151,7 @@ Gemma.EEManager = Ext.extend(Ext.Component, { this.on('deleted', function (redirectHome) { if (redirectHome) { - window.location = ctxBasePath + '/home.html'; + window.location = Gemma.CONTEXT_PATH + '/home.html'; } else { /* after deletion, clear bottom details pane */ diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExperimentSetPreview.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExperimentSetPreview.js index db1da3bc8e..ee7247c39a 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExperimentSetPreview.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExperimentSetPreview.js @@ -35,7 +35,7 @@ Gemma.ExperimentSetPreview = Ext callback: function (ees) { this.loadPreview(ees, ids.length); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -70,7 +70,7 @@ Gemma.ExperimentSetPreview = Ext this.loadPreview(experiments, this.selectedSetValueObject.size); this.fireEvent('previewLoaded', experiments); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }]); } else { alert("Could not load"); @@ -118,7 +118,7 @@ Gemma.ExperimentSetPreview = Ext var numWithDiffex = selectedSet.numWithDifferentialExpressionAnalysis; if (!(selectedSet instanceof SessionBoundExpressionExperimentSetValueObject)) { - name = '' + selectedSet.name + ''; } else { name = selectedSet.name; @@ -168,7 +168,7 @@ Gemma.ExperimentSetPreview = Ext rvo.expressionExperimentIds = expIds; this._appendAndUpdate(combo, rvo); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } @@ -231,7 +231,7 @@ Gemma.ExperimentSetPreview = Ext this.fireEvent('doneModification'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } else { @@ -274,7 +274,7 @@ Gemma.ExperimentSetPreview = Ext this.fireEvent('doneModification'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } }, @@ -314,7 +314,7 @@ Gemma.ExperimentSetPreview = Ext '' + '' + '
' - + 'Has coexpression analysis  ' diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentDetails.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentDetails.js index c3235f3392..e5d93c7656 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentDetails.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentDetails.js @@ -1,5 +1,5 @@ Ext.namespace('Gemma'); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @@ -37,7 +37,7 @@ Gemma.ExpressionExperimentDetails = Ext var result = ''; for (var i = 0; i < arrayDesigns.length; i++) { var ad = arrayDesigns[i]; - result = result + '' + ad.shortName + result = result + '' + ad.shortName + ' - ' + ad.name; if (arrayDesigns[i].troubled) { @@ -61,7 +61,7 @@ Gemma.ExpressionExperimentDetails = Ext result = result + "
As originally submitted: "; for (var j = 0; j < ee.originalPlatforms.length; j++) { var op = ee.originalPlatforms[j]; - result = result + '' + op.shortName + ' - ' + op.name; + result = result + '' + op.shortName + ' - ' + op.name; if (j < ee.originalPlatforms.length - 1) { result = result + ', ' } @@ -84,7 +84,7 @@ Gemma.ExpressionExperimentDetails = Ext var downloadCoExpressionDataLink = String.format( "     ", + + "onClick='Gemma.ExpressionExperimentDataFetch.fetchCoExpressionData({0})' >     ", ee.id); var count; @@ -99,12 +99,12 @@ Gemma.ExpressionExperimentDetails = Ext if (ee.externalDatabase == 'GEO') { var acc = ee.accession; acc = acc.replace(/\.[1-9]$/, ''); // in case of multi-species. - logo = ctxBasePath + '/images/logo/geoTiny.png'; + logo = Gemma.CONTEXT_PATH + '/images/logo/geoTiny.png'; result = ''; } else if (ee.externalDatabase == 'ArrayExpress') { - logo = ctxBasePath + '/images/logo/arrayExpressTiny.png'; + logo = Gemma.CONTEXT_PATH + '/images/logo/arrayExpressTiny.png'; result = ''; } else { @@ -123,9 +123,9 @@ Gemma.ExpressionExperimentDetails = Ext var result = ee.bioAssayCount; if (this.editable) { result = result - + '  '; + + '">'; } return '' + result; // hack for possible problem with extjs 3.1 - bare // number not displayed, coerce to string. @@ -145,34 +145,34 @@ Gemma.ExpressionExperimentDetails = Ext } if (ee.needsAttention === true) { - result = result + getStatusBadge('exclamation-circle', 'gold', 'in curation', 'The curation of this experiment is not done yet, so the quality and suitability scores may change significantly.') + result = result + Gemma.GEEQ.getStatusBadge('exclamation-circle', 'gold', 'in curation', 'The curation of this experiment is not done yet, so the quality and suitability scores may change significantly.') } if (ee.geeq !== null) { - result = result + getGeeqBadges(ee.geeq.publicQualityScore, ee.geeq.publicSuitabilityScore); + result = result + Gemma.GEEQ.getGeeqBadges(ee.geeq.publicQualityScore, ee.geeq.publicSuitabilityScore); } if (ee.troubled) { - result = result + getStatusBadge('exclamation-triangle', 'red', 'unusable', + result = result + Gemma.GEEQ.getStatusBadge('exclamation-triangle', 'red', 'unusable', ee.troubleDetails) } if (ee.hasMultiplePreferredQuantitationTypes) { - result = result + getStatusBadge('exclamation-triangle', 'orange', 'multi-QT', + result = result + Gemma.GEEQ.getStatusBadge('exclamation-triangle', 'orange', 'multi-QT', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.statusMultiplePreferredQuantitationTypes) } if (ee.hasMultipleTechnologyTypes) { - result = result + getStatusBadge('exclamation-triangle', 'orange', 'multi-Tech', + result = result + Gemma.GEEQ.getStatusBadge('exclamation-triangle', 'orange', 'multi-Tech', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.statusMultipleTechnologyTypes) } - result = result + getBatchInfoBadges(ee); + result = result + Gemma.GEEQ.getBatchInfoBadges(ee); if (ee.reprocessedFromRawData) { - result = result + getStatusBadge('cog', 'gray-blue', 'reprocessed', + result = result + Gemma.GEEQ.getStatusBadge('cog', 'gray-blue', 'reprocessed', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.dataReprocessed) } else { - result = result + getStatusBadge('cloud-download', 'gray-blue', 'external', + result = result + Gemma.GEEQ.getStatusBadge('cloud-download', 'gray-blue', 'external', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.dataExternal) } @@ -188,7 +188,7 @@ Gemma.ExpressionExperimentDetails = Ext + id + '-eemanager\').doLinks(' + id - + ')">link analysis'; + + ')">link analysis'; if (ee.dateLinkAnalysis) { var type = ee.linkAnalysisEventType; var color = "#000"; @@ -217,7 +217,7 @@ Gemma.ExpressionExperimentDetails = Ext + id + '-eemanager\').doMissingValues(' + id - + ')">missing value computation'; + + ')">missing value computation'; /* * Offer missing value analysis if it's possible (this might need tweaking). @@ -252,7 +252,7 @@ Gemma.ExpressionExperimentDetails = Ext + id + '-eemanager\').doProcessedVectors(' + id - + ')">preprocess'; + + ')">preprocess'; if (ee.dateProcessedDataVectorComputation) { var type = ee.processedDataVectorComputationEventType; @@ -278,7 +278,7 @@ Gemma.ExpressionExperimentDetails = Ext + id + '-eemanager\').doDiagnostics(' + id - + ')">diagnostics'; + + ')">diagnostics'; // we don't have an appropriate date/event for this. // if (ee.dateProcessedDataVectorComputation) { // var type = ee.processedDataVectorComputationEventType; @@ -316,7 +316,7 @@ Gemma.ExpressionExperimentDetails = Ext for (i = 0; i < eeSets.length; i++) { if (eeSets[i] && eeSets[i].name && eeSets[i].id) { eeSetLinks - .push(' ' + eeSets[i].name + ''); } } @@ -336,7 +336,7 @@ Gemma.ExpressionExperimentDetails = Ext if (e.otherParts && e.otherParts.length > 0) { for(var i = 0; i < e.otherParts.length; i++) { var s = e.otherParts[i]; - h = h + ' ' + s.shortName +'' } } else { @@ -348,7 +348,7 @@ Gemma.ExpressionExperimentDetails = Ext html: h, listeners: { 'afterrender': function (c) { - jQuery('#otherPartsHelp').qtip({ + window.jQuery('#otherPartsHelp').qtip({ content: "If this experiment was originally part of a larger study, other parts that are retained in the system are listed here.", style: { name: 'cream' @@ -423,7 +423,7 @@ Gemma.ExpressionExperimentDetails = Ext var pubMedDelete = { xtype: 'button', text: 'Clear', - icon: ctxBasePath + '/images/icons/cross.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/cross.png', tooltip: 'Remove this experiment\'s association with this publication', bubbleEvents: ['changeMade'], handler: function () { @@ -692,18 +692,18 @@ Gemma.ExpressionExperimentDetails = Ext }); var editEEButton = new Ext.Button({ text: 'More edit options', - icon: ctxBasePath + '/images/icons/wrench.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/wrench.png', toolTip: 'Go to editor page for this experiment', disabled: !this.editable, handler: function () { - window.open(ctxBasePath + '/expressionExperiment/editExpressionExperiment.html?id=' + window.open(Gemma.CONTEXT_PATH + '/expressionExperiment/editExpressionExperiment.html?id=' + this.experimentDetails.id); }, scope: this }); var deleteEEButton = new Ext.Button({ text: 'Delete Experiment', - icon: ctxBasePath + '/images/icons/cross.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/cross.png', toolTip: 'Delete the experiment from the system', disabled: !this.editable, handler: function () { @@ -792,10 +792,10 @@ Gemma.ExpressionExperimentDetails = Ext html: '
' + this.renderProcessedExpressionVectorCount(e) + '  ' - + 'Downloads:    Filtered   ' - + 'Unfiltered   ' + '' @@ -803,7 +803,7 @@ Gemma.ExpressionExperimentDetails = Ext width: 400, listeners: { 'afterrender': function (c) { - jQuery('#downloads').find('i') + window.jQuery('#downloads').find('i') .qtip( { content: Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.profileDownloadTT, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentGrid.js index 47602d5c77..f021af7d55 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentGrid.js @@ -270,7 +270,7 @@ Gemma.ExpressionExperimentGrid = Ext.extend(Gemma.GemmaGridPanel, { formatAnalysisInfo: function (value, metadata, record, row, col, ds) { if (value) return ''; - // return ""; + // return ""; return ''; }, @@ -281,7 +281,7 @@ Gemma.ExpressionExperimentGrid = Ext.extend(Gemma.GemmaGridPanel, { formatEE: function (value, metadata, record, row, col, ds) { var eeTemplate = new Ext.XTemplate( - '{shortName}'); return this.experimentNameAsLink ? eeTemplate.apply(record.data) : value; }, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentManage.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentManage.js index 93b9e58518..2637bd95cb 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentManage.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentManage.js @@ -34,7 +34,7 @@ Gemma.MyDatasetsPanel = Ext.extend(Ext.Panel, + Gemma.EEReportGridColumnRenderers.shortNameRenderer(record.get('shortName'), null, record) + '  ' + record.get('name') + "

" + data + "

" + ''); + + ');" >'); detailsMask.hide(); }.createDelegate(this) }); @@ -353,14 +353,14 @@ Gemma.EEReportGridColumnRenderers = { }, shortNameRenderer: function (value, metadata, record, rowIndex, colIndex, store) { - return '' + value + ''; }, experimentalDesignEditRenderer: function (value, metadata, record, rowIndex, colIndex, store) { var id = record.get('id'); - var url = ''; return value + ' ' + url; @@ -975,7 +975,7 @@ Gemma.EEReportGridToolbar = Ext.extend(Ext.Toolbar, xtype: 'button', minWidth: 20, cls: 'x-btn-icon', - icon: ctxBasePath + '/images/icons/cross.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/cross.png', handler: this.refresh, tooltip: "Clear filters", scope: this @@ -983,7 +983,7 @@ Gemma.EEReportGridToolbar = Ext.extend(Ext.Toolbar, xtype: 'button', minWidth: 20, cls: 'x-btn-icon', - icon: ctxBasePath + '/images/icons/link.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/link.png', handler: this.getBookmark, tooltip: "Bookmarkable link", scope: this @@ -991,7 +991,7 @@ Gemma.EEReportGridToolbar = Ext.extend(Ext.Toolbar, xtype: 'button', minWidth: 20, cls: 'x-btn-icon', - icon: ctxBasePath + '/images/icons/disk.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/disk.png', handler: function () { this.fireEvent('showAsText', []); }.createDelegate(this), diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentMembersGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentMembersGrid.js index 01aa8434a5..4fe605e3e4 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentMembersGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentMembersGrid.js @@ -147,7 +147,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext } this.fireEvent('experimentsLoaded'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -180,7 +180,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext this.hideLoadMask(); }.createDelegate(this), errorHandler: function (err, exception) { - Gemma.genericErrorHandler(err, exception); + Gemma.Error.genericErrorHandler(err, exception); this.hideLoadMask(); }.createDelegate(this) }); @@ -199,7 +199,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext this.hideLoadMask(); }.createDelegate(this), errorHandler: function (err, exception) { - Gemma.genericErrorHandler(err, exception); + Gemma.Error.genericErrorHandler(err, exception); this.hideLoadMask(); }.createDelegate(this) }); @@ -235,7 +235,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext if (this.allowRemovals) { var removeSelectedBtn = new Ext.Button({ text: 'Remove Selected', - icon: ctxBasePath + "/images/icons/cross.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/cross.png", hidden: true, handler: function (button) { debugger; @@ -274,7 +274,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext renderer: function (value, metadata, record, row, col, ds) { return String .format( - "{1}", + "{1}", record.data.id, record.data.shortName); }, sortable: true, @@ -321,7 +321,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext renderer: function (value, metadata, record, row, col, ds) { return String .format( - "{1}" + "{1}" + " {3} {4}" + "
{2}", record.data.id, record.data.shortName, record.data.name, record.data.hasCoexpressionAnalysis ? 'C' : '', record.data.hasDifferentialExpressionAnalysis ? 'D' : ''); @@ -410,7 +410,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext disabled: (this.allowSaveToSession || this.hideOkCancel) }); this.exportButton = new Ext.Button({ - icon: ctxBasePath + "/images/download.gif", + icon: Gemma.CONTEXT_PATH + "/images/download.gif", tooltip: "Export to text", handler: this.exportToTxt, scope: this @@ -613,7 +613,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext }, login: function () { - window.open(ctxBasePath + "/login.jsp"); + window.open(Gemma.CONTEXT_PATH + "/login.jsp"); }, okHandler: function () { // if user has made changes, save to session @@ -648,7 +648,7 @@ Gemma.ExpressionExperimentMembersGrid = Ext exportToTxt: function () { // make download link var downloadLink = String.format( - ctxBasePath + "/expressionExperiment/downloadExpressionExperimentList.html?e={0}", this.getEEIds()); + Gemma.CONTEXT_PATH + "/expressionExperiment/downloadExpressionExperimentList.html?e={0}", this.getEEIds()); window.open(downloadLink); }, @@ -1029,7 +1029,7 @@ Gemma.ExperimentAndGroupAdderToolbar = Ext.extend(Ext.Toolbar, { }); this.addBtn = new Ext.Toolbar.Button({ - icon: ctxBasePath + "/images/icons/add.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/add.png", cls: "x-btn-text-icon", tooltip: "Add selected experiment(s) to the list", text: 'Add', diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPage.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPage.js index 8a4451293b..6b71cd0bad 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPage.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPage.js @@ -1,126 +1,5 @@ -Ext.namespace('Gemma'); - -function scoreToColor(i) { - // normalize from [-1,1] to [0,1] - i = i + 1; - i = i / 2; - // hsl red = 0° and green = 120° - var hue = i * 120; - return 'hsl(' + hue + ', 100%, 70%)'; -} - -function scoreToColorNormalized(i) { - // < 0.1 -> 0; > 0.6 -> 1; 0.3 -> middle; - i = i * 1.6; // Puts 0.3 almost in the middle (close enough) - - // Cut off anything > 1 - i = i > 1 ? 1 : i; - - // Cut off negative values - i = i < 0 ? 0 : i; - - // hsl red = 0° and green = 120° - var hue = i * 120; - return 'hsl(' + hue + ', 100%, 70%)'; -} - -function getStatusBadge(faIconClass, colorClass, title, qTip) { - return '' + - ' ' + title + ''; -} - -function getGeeqBadges(quality, suitability) { - var val = ''; - val = val + - '' + - getGeeqIcon(Number(quality)) + "" + - ''; - - var isUserAdmin = (Ext.get('hasAdmin') && Ext.get('hasAdmin').getValue() === 'true') ? true : false; - if (isUserAdmin) { - val = val + '' + - getGeeqIcon(Number(suitability)) + "" + - ''; - } - return val; -} - -function getGeeqIcon(score) { - return ""; -} - -function getGeeqIconColored(score) { // PP removed ext:qtip="Suitability: ' + roundScore(score, 1) + - return '' + - '' + - ' ' + - ' ' - + ' ' -} +Ext.namespace( 'Gemma' ); -/** - * Translation of Quality or Suitability scores into emoticons. Thresholds are set here! - * @param score - * @returns {string} - */ -function getSmileyCls(score) { - return score > 0.45 ? "fa-smile-o" : score > 0.1 ? "fa-meh-o" : "fa-frown-o"; -} - -function roundScore(value, valDecimals) { - return (Math.round(Number(value) * (Math.pow(10, valDecimals))) / Math.pow(10, valDecimals)).toFixed(valDecimals); -} - -function getBatchInfoBadges(ee) { - var result = ""; - - var hasBatchConfound = ee.batchConfound !== null && ee.batchConfound !== ""; - - if (hasBatchConfound) { - result = result + getStatusBadge('exclamation-triangle', 'dark-yellow', 'batch confound', - ee.batchConfound); - } - - // batch status, shown whether we have batch information or not. - if (!hasBatchConfound && ee.batchEffect !== null) { - if (ee.batchEffect === "SINGLETON_BATCHES_FAILURE") { - result = result + getStatusBadge('exclamation-triangle', 'dark-yellow', 'unable to batch', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchesSingletons); - } else if (ee.batchEffect === "UNINFORMATIVE_HEADERS_FAILURE" || ee.batchEffect === "PROBLEMATIC_BATCH_INFO_FAILURE") { - result = result + getStatusBadge('exclamation-triangle', 'dark-yellow', 'no batch info', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchesBadHeaders); - } else if (ee.batchEffect === "BATCH_CORRECTED_SUCCESS") { // ExpressionExperimentServiceImpl::getBatchEffectDescription() - result = result + getStatusBadge('cogs', 'green', 'batch corrected', ee.batchEffectStatistics) - } else if (ee.batchEffect === "NO_BATCH_EFFECT_SUCCESS" ) { - // if there is also a batch confound, don't show this. - if (ee.batchConfound !== null && ee.batchConfound !== "") { - // no-op. - } else { - result = result + getStatusBadge('cogs', 'green', 'negligible batch effect', "Batch information is present, but the batch effect was considered below the threshold for warranting correction") - } - } else if (ee.batchEffect === "SINGLE_BATCH_SUCCESS" ) { - result = result + getStatusBadge('cogs', 'green', 'single batch', "Samples were run in a single batch as far as we can tell"); - } else if (ee.batchEffect === "NO_BATCH_INFO") { - result = result + getStatusBadge('exclamation-triangle', 'dark-yellow', 'no batch info', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchInfo); - } else if (ee.batchEffect === "BATCH_EFFECT_FAILURE") { - // FIXME I'm not sure we should use this. It just indicates there was a batch effect, but it wasn't corrected for some reason. - result = result + getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'uncorrectable batch effect', "Batch effect may be present but could not be corrected: " + ee.batchConfound ) - } else if (ee.batchEffect === "BATCH_EFFECT_UNDETERMINED_FAILURE") { - result = result + getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'undetermined batch effect', 'Batch effect could not be determined.'); - } else { - // unsupported batch effect type - result = result + getStatusBadge('exclamation-triangle', 'dark-yellow', ee.batchEffect, 'Some other batch effect situation') - } - } - - if (!ee.suitableForDEA) { - result = result + getStatusBadge('exclamation-triangle', 'orange', 'Unsuitable for diff. ex.', - Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.statusUnsuitableForDEA); - } - - return result; -} /** * @@ -135,376 +14,376 @@ function getBatchInfoBadges(ee) { * @extends Ext.TabPanel * */ -Gemma.ExpressionExperimentPage = Ext.extend(Ext.TabPanel, { - - height: 600, - defaults: { - autoScroll: true, - width: 850 - }, - initialTab: 'details', - deferredRender: true, - listeners: { - 'tabchange': function (tabPanel, newTab) { - newTab.fireEvent('tabChanged'); - }, - 'beforetabchange': function (tabPanel, newTab, currTab) { - // if false is returned, tab isn't changed - if (currTab) { - return currTab.fireEvent('leavingTab'); - } - return true; - } - }, - - checkURLforInitialTab: function () { - this.loadSpecificTab = (document.URL.indexOf("?") > -1 && (document.URL.indexOf("tab=") > -1)); - if (this.loadSpecificTab) { - var param = Ext.urlDecode(document.URL.substr(document.URL.indexOf("?") + 1)); - if (param.tab) { - if (this.getComponent(param.tab) !== undefined) { - this.initialTab = param.tab; - } - } - } - }, - - /** - * @memberOf Gemma.ExpressionExperimentPage - */ - initComponent: function () { - - var eeId = this.eeId; - - var isAdmin = Ext.get("hasAdmin").getValue() == 'true'; - - Gemma.ExpressionExperimentPage.superclass.initComponent.call(this); - this.on('render', function () { - if (!this.loadMask) { - this.loadMask = new Ext.LoadMask(this.getEl(), { - msg: Gemma.StatusText.Loading.generic, - msgCls: 'absolute-position-loading-mask ext-el-mask-msg x-mask-loading' - }); +Gemma.ExpressionExperimentPage = Ext.extend( Ext.TabPanel, { + + height : 600, + defaults : { + autoScroll : true, + width : 850 + }, + initialTab : 'details', + deferredRender : true, + listeners : { + 'tabchange' : function( tabPanel, newTab ) { + newTab.fireEvent( 'tabChanged' ); + }, + 'beforetabchange' : function( tabPanel, newTab, currTab ) { + // if false is returned, tab isn't changed + if ( currTab ) { + return currTab.fireEvent( 'leavingTab' ); + } + return true; + } + }, + + checkURLforInitialTab : function() { + this.loadSpecificTab = (document.URL.indexOf( "?" ) > -1 && (document.URL.indexOf( "tab=" ) > -1)); + if ( this.loadSpecificTab ) { + var param = Ext.urlDecode( document.URL.substr( document.URL.indexOf( "?" ) + 1 ) ); + if ( param.tab ) { + if ( this.getComponent( param.tab ) !== undefined ) { + this.initialTab = param.tab; } - this.loadMask.show(); - }); - - ExpressionExperimentController.loadExpressionExperimentDetails(eeId, { - callback: function (experimentDetails) { - if (experimentDetails === null) throw "Experiment can not be accessed, please log in first."; - this.initFromExperimentValueObject(experimentDetails, isAdmin); - - this.checkURLforInitialTab(); - this.setActiveTab(this.initialTab); - }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler - }); - - Gemma.Application.currentUser.on("logIn", function (userName, isAdmin) { - var appScope = this; - ExpressionExperimentController.canCurrentUserEditExperiment(this.experimentDetails.id, { - callback: function (editable) { - // console.log(this); - appScope.adjustForIsAdmin(isAdmin, editable); - }, - scope: appScope - }); - - }, this); - - Gemma.Application.currentUser.on("logOut", function () { - - this.adjustForIsAdmin(false, false); - - }, this); - }, - - initFromExperimentValueObject: function (experimentDetails, isAdmin) { - - /** - * The ExpressionExperimentValueObject - see the Java object for details. - * - * The following is here to hide JS warnings for unresolved variables. - * @param experimentDetails.id - * @param experimentDetails.currentUserHasWritePermission - * @param experimentDetails.currentUserIsOwner - * @param experimentDetails.hasBatchInformation - * @param experimentDetails.batchConfound - * @param experimentDetails.batchEffect - * @param experimentDetails.troubled - * @param experimentDetails.troubleDetails - * @param experimentDetails.reprocessedFromRawData - * @param experimentDetails.QChtml - * @param experimentDetails.hasMultiplePreferredQuantitationTypes - * @param experimentDetails.hasMultipleTechnologyTypes - * @param experimentDetails.externalDatabase - * @param experimentDetails.coexpressionLinkCount - * @param experimentDetails.bioAssayCount - * @param experimentDetails.dateLinkAnalysis - * @param experimentDetails.technologyType - * @param experimentDetails.hasEitherIntensity - * @param experimentDetails.dateMissingValueAnalysis - * @param experimentDetails.dateProcessedDataVectorComputation - * @param experimentDetails.dateDifferentialAnalysis - * @param experimentDetails.differentialAnalysisEventType - * @param experimentDetails.pubmedId - * @param experimentDetails.expressionExperimentSets - * @param experimentDetails.lastArrayDesignUpdateDate - * @param experimentDetails.needsAttention - * @param experimentDetails.geeq - * @param experimentDetails.geeq.publicQualityScore - * @param experimentDetails.geeq.publicSuitabilityScore - * @param experimentDetails.isRNASeq - */ - this.experimentDetails = experimentDetails; - this.editable = experimentDetails.currentUserHasWritePermission || isAdmin; - this.ownedByCurrentUser = experimentDetails.currentUserIsOwner; - - if (this.loadMask) { - this.loadMask.hide(); - } - - // DETAILS TAB - this.add(this.makeDetailsTab(experimentDetails)); - - // EXPERIMENT DESIGN TAB - this.add(this.makeDesignTab(experimentDetails)); - - // VISUALISATION TAB - this.add(this.makeVisualisationTab(experimentDetails, isAdmin)); - - // DIAGNOSTICS TAB - this.add(this.makeDiagnosticsTab(experimentDetails, isAdmin)); - - this.adjustForIsAdmin(isAdmin, this.editable); - - }, - - makeDetailsTab: function (experimentDetails) { - return new Gemma.ExpressionExperimentDetails({ - title: 'Overview', - itemId: 'details', - id: 'ee-details-panel', - experimentDetails: experimentDetails, - editable: this.editable, - owned: this.ownedByCurrentUser, - admin: this.admin, - listeners: { - 'experimentDetailsReloadRequired': function () { - var myMask = new Ext.LoadMask(Ext.getBody(), { - msg: "Refreshing..." - }); - myMask.show(); - window.location.reload(false); // could do something fancier like reloading just - // the component - }, - scope: this + } + } + }, + + /** + * @memberOf Gemma.ExpressionExperimentPage + */ + initComponent : function() { + + var eeId = this.eeId; + + var isAdmin = Ext.get( "hasAdmin" ).getValue() == 'true'; + + Gemma.ExpressionExperimentPage.superclass.initComponent.call( this ); + this.on( 'render', function() { + if ( !this.loadMask ) { + this.loadMask = new Ext.LoadMask( this.getEl(), { + msg : Gemma.StatusText.Loading.generic, + msgCls : 'absolute-position-loading-mask ext-el-mask-msg x-mask-loading' + } ); + } + this.loadMask.show(); + } ); + + ExpressionExperimentController.loadExpressionExperimentDetails( eeId, { + callback : function( experimentDetails ) { + if ( experimentDetails === null ) throw "Experiment can not be accessed, please log in first."; + this.initFromExperimentValueObject( experimentDetails, isAdmin ); + + this.checkURLforInitialTab(); + this.setActiveTab( this.initialTab ); + }.createDelegate( this ), + errorHandler : Gemma.Error.genericErrorHandler + } ); + + Gemma.Application.currentUser.on( "logIn", function( userName, isAdmin ) { + var appScope = this; + ExpressionExperimentController.canCurrentUserEditExperiment( this.experimentDetails.id, { + callback : function( editable ) { + // console.log(this); + appScope.adjustForIsAdmin( isAdmin, editable ); + }, + scope : appScope + } ); + + }, this ); + + Gemma.Application.currentUser.on( "logOut", function() { + + this.adjustForIsAdmin( false, false ); + + }, this ); + }, + + initFromExperimentValueObject : function( experimentDetails, isAdmin ) { + + /** + * The ExpressionExperimentValueObject - see the Java object for details. + * + * The following is here to hide JS warnings for unresolved variables. + * @param experimentDetails.id + * @param experimentDetails.currentUserHasWritePermission + * @param experimentDetails.currentUserIsOwner + * @param experimentDetails.hasBatchInformation + * @param experimentDetails.batchConfound + * @param experimentDetails.batchEffect + * @param experimentDetails.troubled + * @param experimentDetails.troubleDetails + * @param experimentDetails.reprocessedFromRawData + * @param experimentDetails.QChtml + * @param experimentDetails.hasMultiplePreferredQuantitationTypes + * @param experimentDetails.hasMultipleTechnologyTypes + * @param experimentDetails.externalDatabase + * @param experimentDetails.coexpressionLinkCount + * @param experimentDetails.bioAssayCount + * @param experimentDetails.dateLinkAnalysis + * @param experimentDetails.technologyType + * @param experimentDetails.hasEitherIntensity + * @param experimentDetails.dateMissingValueAnalysis + * @param experimentDetails.dateProcessedDataVectorComputation + * @param experimentDetails.dateDifferentialAnalysis + * @param experimentDetails.differentialAnalysisEventType + * @param experimentDetails.pubmedId + * @param experimentDetails.expressionExperimentSets + * @param experimentDetails.lastArrayDesignUpdateDate + * @param experimentDetails.needsAttention + * @param experimentDetails.geeq + * @param experimentDetails.geeq.publicQualityScore + * @param experimentDetails.geeq.publicSuitabilityScore + * @param experimentDetails.isRNASeq + */ + this.experimentDetails = experimentDetails; + this.editable = experimentDetails.currentUserHasWritePermission || isAdmin; + this.ownedByCurrentUser = experimentDetails.currentUserIsOwner; + + if ( this.loadMask ) { + this.loadMask.hide(); + } + + // DETAILS TAB + this.add( this.makeDetailsTab( experimentDetails ) ); + + // EXPERIMENT DESIGN TAB + this.add( this.makeDesignTab( experimentDetails ) ); + + // VISUALISATION TAB + this.add( this.makeVisualisationTab( experimentDetails, isAdmin ) ); + + // DIAGNOSTICS TAB + this.add( this.makeDiagnosticsTab( experimentDetails, isAdmin ) ); + + this.adjustForIsAdmin( isAdmin, this.editable ); + + }, + + makeDetailsTab : function( experimentDetails ) { + return new Gemma.ExpressionExperimentDetails( { + title : 'Overview', + itemId : 'details', + id : 'ee-details-panel', + experimentDetails : experimentDetails, + editable : this.editable, + owned : this.ownedByCurrentUser, + admin : this.admin, + listeners : { + 'experimentDetailsReloadRequired' : function() { + var myMask = new Ext.LoadMask( Ext.getBody(), { + msg : "Refreshing..." + } ); + myMask.show(); + window.location.reload( false ); // could do something fancier like reloading just + // the component + }, + scope : this + } + } ); + }, + + makeDesignTab : function( experimentDetails ) { + var batchInfo = '
' + Gemma.GEEQ.getBatchInfoBadges( experimentDetails ) + '
'; + + return { + title : 'Experimental Design', + tbar : [ { + text : 'Show Details', + itemId : 'design', + tooltip : 'Go to the design details', + icon : Gemma.CONTEXT_PATH + '/images/magnifier.png', + handler : function() { + window.open( Gemma.CONTEXT_PATH + "/experimentalDesign/showExperimentalDesign.html?eeid=" + experimentDetails.id ); } - }); - }, - - makeDesignTab: function (experimentDetails) { - var batchInfo = '
' + getBatchInfoBadges(experimentDetails) + '
'; - - return { - title: 'Experimental Design', - tbar: [{ - text: 'Show Details', - itemId: 'design', - tooltip: 'Go to the design details', - icon: ctxBasePath + '/images/magnifier.png', - handler: function () { - window.open(ctxBasePath + "/experimentalDesign/showExperimentalDesign.html?eeid=" + experimentDetails.id); - } - }], - html: batchInfo + "Continuous factors are not shown in this view " + '
Loading...
', - layout: 'absolute', - listeners: { - render: function () { - DesignMatrix.init({ - id: experimentDetails.id - }); - } + } ], + html : batchInfo + "Continuous factors are not shown in this view " + '
Loading...
', + layout : 'absolute', + listeners : { + render : function() { + Gemma.DesignMatrix.init( { + id : experimentDetails.id + } ); } - }; - }, - - makeVisualisationTab: function (experimentDetails, isAdmin) { - var eeId = this.eeId; - var title = "Data for a 'random' sampling of probes"; - var geneList = []; - var downloadLink = String.format(ctxBasePath + "/dedv/downloadDEDV.html?ee={0}", eeId); - var viz = new Gemma.VisualizationWithThumbsPanel({ - thumbnails: false, - downloadLink: downloadLink, - params: [[eeId], geneList] - }); - viz.on('render', function () { - viz.loadFromParam({ - params: [[eeId], geneList] - }); - }); - - var geneTBar = new Gemma.VisualizationWidgetGeneSelectionToolbar({ - eeId: eeId, - visPanel: viz - , taxonId : experimentDetails.taxonId - // ,showRefresh : (isAdmin || this.editable) - }); - geneTBar.on('refreshVisualisation', function () { - viz.loadFromParam({ - params: [[eeId], geneList] - }); - }); - return { - items: viz, - itemId: 'visualize', - layout: 'fit', - padding: 0, - title: 'Visualize Expression', - tbar: geneTBar - }; - }, - - - makeDiagnosticsTab: function (experimentDetails, isAdmin) { - - var metaRow = new Ext.Panel( + } + }; + }, + + makeVisualisationTab : function( experimentDetails, isAdmin ) { + var eeId = this.eeId; + var title = "Data for a 'random' sampling of probes"; + var geneList = []; + var downloadLink = String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}", eeId ); + var viz = new Gemma.VisualizationWithThumbsPanel( { + thumbnails : false, + downloadLink : downloadLink, + params : [ [ eeId ], geneList ] + } ); + viz.on( 'render', function() { + viz.loadFromParam( { + params : [ [ eeId ], geneList ] + } ); + } ); + + var geneTBar = new Gemma.VisualizationWidgetGeneSelectionToolbar( { + eeId : eeId, + visPanel : viz + , taxonId : experimentDetails.taxonId + // ,showRefresh : (isAdmin || this.editable) + } ); + geneTBar.on( 'refreshVisualisation', function() { + viz.loadFromParam( { + params : [ [ eeId ], geneList ] + } ); + } ); + return { + items : viz, + itemId : 'visualize', + layout : 'fit', + padding : 0, + title : 'Visualize Expression', + tbar : geneTBar + }; + }, + + + makeDiagnosticsTab : function( experimentDetails, isAdmin ) { + + var metaRow = new Ext.Panel( + { + fieldLabel : 'Preprocessing metadata', + id : 'metadata-row', + border : false + } + ); + + this.renderMetadata( experimentDetails, metaRow ); + + return { + title : 'Diagnostics', + itemId : 'diagnostics', + items : [ + // this.refreshDiagnosticsBtn, { - fieldLabel: 'Preprocessing metadata', - id: 'metadata-row', - border: false + baseCls : 'x-plain-panel', + bodyStyle : 'padding:10px', + html : experimentDetails.QChtml, + border : false + }, + new Ext.Panel( { + baseCls : 'x-plain-panel', + bodyStyle : 'padding:10px', + ref : 'metadataPanel', + border : false, + items : [ + { + layout : 'form', + defaults : { + border : false + }, + items : [ + metaRow + ] + } + ] + } ) + ] + }; + + }, + + renderMetadata : function( ee, metaRow ) { + + ExpressionExperimentDataFetchController.getMetadataFiles( ee.id, { + callback : function( files ) { + var result = ""; + var hasFiles = false; + + files.forEach( function( file ) { + if ( file != null ) { + hasFiles = true; + result += + ""; + } + } ); + + + if ( !hasFiles ) { + result = " Not available for this experiment "; } - ); - - this.renderMetadata(experimentDetails, metaRow); - - return { - title: 'Diagnostics', - itemId: 'diagnostics', - items: [ - // this.refreshDiagnosticsBtn, - { - baseCls: 'x-plain-panel', - bodyStyle: 'padding:10px', - html: experimentDetails.QChtml, - border: false - }, - new Ext.Panel({ - baseCls: 'x-plain-panel', - bodyStyle: 'padding:10px', - ref: 'metadataPanel', - border: false, - items: [ - { - layout: 'form', - defaults: { - border: false - }, - items: [ - metaRow - ] - } - ] - }) - ] - }; - - }, - - renderMetadata: function (ee, metaRow) { - - ExpressionExperimentDataFetchController.getMetadataFiles(ee.id, { - callback: function (files) { - var result = ""; - var hasFiles = false; - - files.forEach(function (file) { - if (file != null) { - hasFiles = true; - result += - ""; - } - }); - - - if (!hasFiles) { - result = " Not available for this experiment "; - } - - metaRow.html = result; + + metaRow.html = result; + } + } ); + + return ""; + }, + + adjustForIsAdmin : function( isAdmin, isEditable ) { + + // QUANTITATION TYPES TAB + if ( (isAdmin || isEditable) && !this.qtTab ) { + this.qtTab = new Gemma.ExpressionExperimentQuantitationTypeGrid( { + title : 'Quantitation Types', + itemId : 'quantitation', + eeid : this.experimentDetails.id + } ); + this.add( this.qtTab ); + } else if ( this.qtTab ) { + this.qtTab.setVisible( (isAdmin || isEditable) ); + } + + /* HISTORY TAB */ + if ( (isAdmin || isEditable) && !this.historyTab ) { + this.historyTab = new Gemma.AuditTrailGrid( { + title : 'History', + itemId : 'history', + bodyBorder : false, + collapsible : false, + viewConfig : { + forceFit : true + }, + auditable : { + id : this.experimentDetails.id, + classDelegatingFor : "ubic.gemma.model.expression.experiment.ExpressionExperiment" + }, + loadOnlyOnRender : true + } ); + this.add( this.historyTab ); + } else if ( this.historyTab ) { + this.historyTab.setVisible( (isAdmin || isEditable) ); + } + + /* ADMIN TOOLS TAB */ + if ( (isAdmin || isEditable) && !this.toolTab ) { + this.toolTab = new Gemma.ExpressionExperimentTools( { + experimentDetails : this.experimentDetails, + title : 'Admin & Curation', + itemId : 'admin', + editable : isEditable, + listeners : { + 'reloadNeeded' : function() { + var myMask = new Ext.LoadMask( Ext.getBody(), { + msg : "Refreshing..." + } ); + myMask.show(); + var reloadToAdminTab = document.URL; + reloadToAdminTab = reloadToAdminTab.replace( /&*tab=\w*/, '' ); + reloadToAdminTab += '&tab=admin'; + window.location.href = reloadToAdminTab; + + } } - }); - - return ""; - }, - - adjustForIsAdmin: function (isAdmin, isEditable) { - - // QUANTITATION TYPES TAB - if ((isAdmin || isEditable) && !this.qtTab) { - this.qtTab = new Gemma.ExpressionExperimentQuantitationTypeGrid({ - title: 'Quantitation Types', - itemId: 'quantitation', - eeid: this.experimentDetails.id - }); - this.add(this.qtTab); - } else if (this.qtTab) { - this.qtTab.setVisible((isAdmin || isEditable)); - } - - /* HISTORY TAB */ - if ((isAdmin || isEditable) && !this.historyTab) { - this.historyTab = new Gemma.AuditTrailGrid({ - title: 'History', - itemId: 'history', - bodyBorder: false, - collapsible: false, - viewConfig: { - forceFit: true - }, - auditable: { - id: this.experimentDetails.id, - classDelegatingFor: "ubic.gemma.model.expression.experiment.ExpressionExperiment" - }, - loadOnlyOnRender: true - }); - this.add(this.historyTab); - } else if (this.historyTab) { - this.historyTab.setVisible((isAdmin || isEditable)); - } - - /* ADMIN TOOLS TAB */ - if ((isAdmin || isEditable) && !this.toolTab) { - this.toolTab = new Gemma.ExpressionExperimentTools({ - experimentDetails: this.experimentDetails, - title: 'Admin & Curation', - itemId: 'admin', - editable: isEditable, - listeners: { - 'reloadNeeded': function () { - var myMask = new Ext.LoadMask(Ext.getBody(), { - msg: "Refreshing..." - }); - myMask.show(); - var reloadToAdminTab = document.URL; - reloadToAdminTab = reloadToAdminTab.replace(/&*tab=\w*/, ''); - reloadToAdminTab += '&tab=admin'; - window.location.href = reloadToAdminTab; - - } - } - }); - this.add(this.toolTab); - } else if (this.toolTab) { - this.toolTab.setVisible((isAdmin || isEditable)); - } - } -}); + } ); + this.add( this.toolTab ); + } else if ( this.toolTab ) { + this.toolTab.setVisible( (isAdmin || isEditable) ); + } + } +} ); /** * Used to make the correlation heatmap clickable. See ExperimentQCTag.java @@ -512,17 +391,17 @@ Gemma.ExpressionExperimentPage = Ext.extend(Ext.TabPanel, { * @param {Object} * bigImageUrl */ -var popupImage = function (url, width, height) { - url = url + "&nocache=" + Math.floor(Math.random() * 1000); - var b = new Ext.Window({ - modal: true, - stateful: false, - resizable: true, - autoScroll: true, - height: height, // or false. - width: width || 200, - padding: 10, - html: '' - }); - b.show(); +var popupImage = function( url, width, height ) { + url = url + "&nocache=" + Math.floor( Math.random() * 1000 ); + var b = new Ext.Window( { + modal : true, + stateful : false, + resizable : true, + autoScroll : true, + height : height, // or false. + width : width || 200, + padding : 10, + html : '' + } ); + b.show(); }; diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPagingGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPagingGrid.js index 1e1c0073c3..b42d98c1cb 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPagingGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentPagingGrid.js @@ -169,7 +169,7 @@ Gemma.ExperimentPagingGrid = Ext.extend(Ext.grid.GridPanel, sortable: true, width: 1, // viewConfig.forceFit resizes based on relative widths, renderer: function (value, metaData, record, rowIndex, colIndex, store) { - return (value && record) ? '' + value + '' : ''; } }, @@ -244,7 +244,7 @@ Gemma.ExperimentPagingGrid = Ext.extend(Ext.grid.GridPanel, width: 0.1, tooltip: "View bioassays", renderer: function (value, metaData, record, rowIndex, colIndex, store) { - return (value && record) ? '' + value + '' : ''; } @@ -568,7 +568,7 @@ Gemma.ExperimentPagingGrid = Ext.extend(Ext.grid.GridPanel, text: 'Dataset manager', cls: 'x-toolbar-standardbutton', handler: function () { - window.location = ctxBasePath + "/expressionExperiment/showAllExpressionExperimentLinkSummaries.html"; + window.location = Gemma.CONTEXT_PATH + "/expressionExperiment/showAllExpressionExperimentLinkSummaries.html"; }, hidden: true }); @@ -585,7 +585,7 @@ Gemma.ExperimentPagingGrid = Ext.extend(Ext.grid.GridPanel, text: 'Show All Experiments', cls: 'x-toolbar-standardbutton', handler: function () { - window.location = ctxBasePath + "/expressionExperiment/showAllExpressionExperiments.html"; + window.location = Gemma.CONTEXT_PATH + "/expressionExperiment/showAllExpressionExperiments.html"; }, hidden: this.showAll }); @@ -594,13 +594,13 @@ Gemma.ExperimentPagingGrid = Ext.extend(Ext.grid.GridPanel, text: 'Experiment QC', cls: 'x-toolbar-standardbutton', handler: function () { - window.location = ctxBasePath + "/expressionExperimentsWithQC.html"; + window.location = Gemma.CONTEXT_PATH + "/expressionExperimentsWithQC.html"; } }); // Button for downloading the shortNames of all or selected experiments as text var asTextButton = new Ext.Button({ - icon: ctxBasePath + '/images/icons/disk.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/disk.png', handler: function () { this.showAsText(); }.createDelegate(this), diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentQuantitationTypeGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentQuantitationTypeGrid.js index 70dbc9f51f..e8dbacb280 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentQuantitationTypeGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentQuantitationTypeGrid.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * * Panel containing the most interesting info about an experiment. Used as one tab of the EE page @@ -81,9 +81,11 @@ Gemma.ExpressionExperimentQuantitationTypeGrid = Ext.extend( Ext.grid.GridPanel, renderer : function( value, metadata, record, rowIndex, colIndex, store ) { var downloadQuantitationUrl; if ( record.data.vectorType === 'ubic.gemma.model.expression.bioAssayData.ProcessedExpressionDataVector' ) { - downloadQuantitationUrl = ctxBasePath + '/rest/v2/datasets/' + record.data.expressionExperimentId + '/data/processed'; + downloadQuantitationUrl = Gemma.CONTEXT_PATH + '/rest/v2/datasets/' + record.data.expressionExperimentId + '/data/processed?download=true'; } else if ( record.data.vectorType === 'ubic.gemma.model.expression.bioAssayData.RawExpressionDataVector' ) { - downloadQuantitationUrl = ctxBasePath + '/rest/v2/datasets/' + record.data.expressionExperimentId + '/data/raw?quantitationType=' + record.data.id; + downloadQuantitationUrl = Gemma.CONTEXT_PATH + '/rest/v2/datasets/' + record.data.expressionExperimentId + '/data/raw?quantitationType=' + record.data.id + '&download=true'; + } else if ( record.data.vectorType === 'ubic.gemma.model.expression.bioAssayData.SingleCellExpressionDataVector' ) { + downloadQuantitationUrl = Gemma.CONTEXT_PATH + '/rest/v2/datasets/' + record.data.expressionExperimentId + '/data/singleCell?quantitationType=' + record.data.id + '&download=true'; } if ( downloadQuantitationUrl ) { return '' + value + ""; diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentSetSummary.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentSetSummary.js index 0cc41797bc..1347078488 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentSetSummary.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentSetSummary.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * * Panel containing the most interesting info about an experiment set. @@ -40,7 +40,7 @@ Gemma.ExpressionExperimentSetSummary = Ext renderStatus : function( e ) { var statusString = ""; if ( !e.modifiable ) { - statusString += " "; } var sl = Gemma.SecurityManager.getSecurityLink( @@ -204,7 +204,7 @@ Gemma.ExpressionExperimentSetSummary = Ext var deleteEEButton = new Ext.Button( { text : 'Delete Experiment Group', - icon : ctxBasePath + '/images/icons/cross.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/cross.png', toolTip : 'Delete the experiment from the system', disabled : !this.editable, handler : this.deleteExperimentSet, @@ -303,7 +303,7 @@ Gemma.ExpressionExperimentSetSummary = Ext experimentMembersGrid.on( 'experimentListCreated', function( eesvo ) { Ext.getBody().mask( 'Loading new set' ); - window.location = ctxBasePath + "/expressionExperimentSet/showExpressionExperimentSet.html?id=" + eesvo.id; + window.location = Gemma.CONTEXT_PATH + "/expressionExperimentSet/showExpressionExperimentSet.html?id=" + eesvo.id; } ); experimentMembersGrid.on( 'afterrender', function() { @@ -359,7 +359,7 @@ Gemma.ExpressionExperimentSetSummary = Ext this.deleteMask.show(); callParams.push( { callback : function( data ) { - window.location = ctxBasePath + '/home.html'; + window.location = Gemma.CONTEXT_PATH + '/home.html'; }.createDelegate( this ), errorHandler : function( error ) { Ext.Msg.alert( "Deletion failed", error ); diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentTools.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentTools.js index 34d304d3eb..b469704215 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentTools.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentTools.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @@ -720,7 +720,7 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { cls : "gq-override-value-wrap", html : " " @@ -741,7 +741,7 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { change : function( el, val ) { var nr = document.getElementById( 'gq-qual-override-value' ); nr.value = (Math.round( val ) / 10 - 1).toFixed( 1 ); - nr.style.background = scoreToColor( Number( nr.value ) ); + nr.style.background = Gemma.GEEQ.scoreToColor( Number( nr.value ) ); ee.geeq.manualQualityScore = nr.value; } } @@ -828,7 +828,7 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { cls : "gq-override-value-wrap", html : " " @@ -849,7 +849,7 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { change : function( el, val ) { var nr = document.getElementById( 'gq-suit-override-value' ); nr.value = (Math.round( val ) / 10 - 1).toFixed( 1 ); - nr.style.background = scoreToColor( Number( nr.value ) ); + nr.style.background = Gemma.GEEQ.scoreToColor( Number( nr.value ) ); ee.geeq.manualSuitabilityScore = nr.value; } } @@ -899,8 +899,8 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { geeqRowRenderer : function( label, value, labelDesc, valueDesc, valDecimals, warning, extra, normalizeColor ) { if ( valDecimals === undefined ) valDecimals = 1; - var valColor = normalizeColor ? scoreToColorNormalized( Number( value ) ) : scoreToColor( Number( value ) ); - var valNumber = roundScore( value, valDecimals ); + var valColor = normalizeColor ? Gemma.GEEQ.scoreToColorNormalized( Number( value ) ) : Gemma.GEEQ.scoreToColor( Number( value ) ); + var valNumber = Gemma.GEEQ.roundScore( value, valDecimals ); var cls = valNumber < 0 ? "negative" : "positive"; var html = '
' + @@ -980,7 +980,7 @@ Gemma.ExpressionExperimentTools = Ext.extend( Gemma.CurationTools, { if ( ee.batchEffect === "SINGLE_BATCH_SUCCESS" ) { panelBC.add( { - html : getStatusBadge( 'cogs', 'green', 'single batch', "Samples were run in a single batch as far as we can tell" ) + html : Gemma.GEEQ.getStatusBadge( 'cogs', 'green', 'single batch', "Samples were run in a single batch as far as we can tell" ) } ); } else { diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentsSummaryPanel.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentsSummaryPanel.js index bc8eee3244..acc3a61935 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentsSummaryPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/ExpressionExperimentsSummaryPanel.js @@ -76,7 +76,7 @@ Gemma.ExpressionExperimentsSummaryPanel = Ext.extend( Ext.Panel, + '' + 'Data sets:' + '' - + '{expressionExperimentCount}' + + '{expressionExperimentCount}' + '' + '' + '{updatedExpressionExperimentCount}' @@ -89,7 +89,7 @@ Gemma.ExpressionExperimentsSummaryPanel = Ext.extend( Ext.Panel, + '' + ' {taxonCommonName}' + '' - + '{totalCount}' + + '{totalCount}' + '' + '' + '{updatedCount}' @@ -102,7 +102,7 @@ Gemma.ExpressionExperimentsSummaryPanel = Ext.extend( Ext.Panel, + '' + 'Platforms:' + '' - + '{arrayDesignCount}' + + '{arrayDesignCount}' + '{updatedArrayDesignCount}' + '{newArrayDesignCount}' + '' diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/GEEQ.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/GEEQ.js new file mode 100644 index 0000000000..7a2739abbb --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/GEEQ.js @@ -0,0 +1,123 @@ +Gemma.GEEQ = {}; + +Gemma.GEEQ.scoreToColor = function( i ) { + // normalize from [-1,1] to [0,1] + i = i + 1; + i = i / 2; + // hsl red = 0° and green = 120° + var hue = i * 120; + return 'hsl(' + hue + ', 100%, 70%)'; +} + +Gemma.GEEQ.scoreToColorNormalized = function( i ) { + // < 0.1 -> 0; > 0.6 -> 1; 0.3 -> middle; + i = i * 1.6; // Puts 0.3 almost in the middle (close enough) + + // Cut off anything > 1 + i = i > 1 ? 1 : i; + + // Cut off negative values + i = i < 0 ? 0 : i; + + // hsl red = 0° and green = 120° + var hue = i * 120; + return 'hsl(' + hue + ', 100%, 70%)'; +} + +Gemma.GEEQ.getStatusBadge = function( faIconClass, colorClass, title, qTip ) { + return '' + + ' ' + title + ''; +} + +Gemma.GEEQ.getGeeqBadges = function( quality, suitability ) { + var val = ''; + val = val + + '' + + Gemma.GEEQ.getGeeqIcon( Number( quality ) ) + "" + + ''; + + var isUserAdmin = (Ext.get( 'hasAdmin' ) && Ext.get( 'hasAdmin' ).getValue() === 'true') ? true : false; + if ( isUserAdmin ) { + val = val + '' + + Gemma.GEEQ.getGeeqIcon( Number( suitability ) ) + "" + + ''; + } + return val; +} + +Gemma.GEEQ.getGeeqIcon = function( score ) { + return ""; +} + +Gemma.GEEQ.getGeeqIconColored = function( score ) { // PP removed ext:qtip="Suitability: ' + roundScore(score, 1) + + return '' + + '' + + ' ' + + ' ' + + ' ' +} + +/** + * Translation of Quality or Suitability scores into emoticons. Thresholds are set here! + * @param score + * @returns {string} + */ +Gemma.GEEQ.getSmileyCls = function( score ) { + return score > 0.45 ? "fa-smile-o" : score > 0.1 ? "fa-meh-o" : "fa-frown-o"; +} + +Gemma.GEEQ.roundScore = function( value, valDecimals ) { + return (Math.round( Number( value ) * (Math.pow( 10, valDecimals )) ) / Math.pow( 10, valDecimals )).toFixed( valDecimals ); +} + +Gemma.GEEQ.getBatchInfoBadges = function( ee ) { + var result = ""; + + var hasBatchConfound = ee.batchConfound !== null && ee.batchConfound !== ""; + + if ( hasBatchConfound ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'batch confound', + ee.batchConfound ); + } + + // batch status, shown whether we have batch information or not. + if ( !hasBatchConfound && ee.batchEffect !== null ) { + if ( ee.batchEffect === "SINGLETON_BATCHES_FAILURE" ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'unable to batch', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchesSingletons ); + } else if ( ee.batchEffect === "UNINFORMATIVE_HEADERS_FAILURE" || ee.batchEffect === "PROBLEMATIC_BATCH_INFO_FAILURE" ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'no batch info', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchesBadHeaders ); + } else if ( ee.batchEffect === "BATCH_CORRECTED_SUCCESS" ) { // ExpressionExperimentServiceImpl::getBatchEffectDescription() + result = result + Gemma.GEEQ.getStatusBadge( 'cogs', 'green', 'batch corrected', ee.batchEffectStatistics ) + } else if ( ee.batchEffect === "NO_BATCH_EFFECT_SUCCESS" ) { + // if there is also a batch confound, don't show this. + if ( ee.batchConfound !== null && ee.batchConfound !== "" ) { + // no-op. + } else { + result = result + Gemma.GEEQ.getStatusBadge( 'cogs', 'green', 'negligible batch effect', "Batch information is present, but the batch effect was considered below the threshold for warranting correction" ) + } + } else if ( ee.batchEffect === "SINGLE_BATCH_SUCCESS" ) { + result = result + Gemma.GEEQ.getStatusBadge( 'cogs', 'green', 'single batch', "Samples were run in a single batch as far as we can tell" ); + } else if ( ee.batchEffect === "NO_BATCH_INFO" ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'no batch info', Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.noBatchInfo ); + } else if ( ee.batchEffect === "BATCH_EFFECT_FAILURE" ) { + // FIXME I'm not sure we should use this. It just indicates there was a batch effect, but it wasn't corrected for some reason. + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'uncorrectable batch effect', "Batch effect may be present but could not be corrected: " + ee.batchConfound ) + } else if ( ee.batchEffect === "BATCH_EFFECT_UNDETERMINED_FAILURE" ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', 'undetermined batch effect', 'Batch effect could not be determined.' ); + } else { + // unsupported batch effect type + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'dark-yellow', ee.batchEffect, 'Some other batch effect situation' ) + } + } + + if ( !ee.suitableForDEA ) { + result = result + Gemma.GEEQ.getStatusBadge( 'exclamation-triangle', 'orange', 'Unsuitable for diff. ex.', + Gemma.HelpText.WidgetDefaults.ExpressionExperimentDetails.statusUnsuitableForDEA ); + } + + return result; +} \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/entities/experiment/index.js b/gemma-web/src/main/webapp/scripts/api/entities/experiment/index.js new file mode 100644 index 0000000000..837d25fbcf --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/experiment/index.js @@ -0,0 +1,27 @@ +import './BioAssayGridPanel' +import './DataFilterCombo' +import './DatasetGroupCombo' +import './DatasetGroupComboPanel' +import './DatasetGroupEditor' +import './DatasetGroupPanel' +import './DatasetGroupStore' +import './DatasetSearchField' +import './DatasetSearchToolbar' +import './EEManager' +import './ExperimentAndExperimentGroupCombo' +import './ExperimentSearchAndPreview' +import './ExperimentSetPreview' +import './ExpressionExperimentDetails' +import './ExpressionExperimentExperimentalFactorGrid' +import './ExpressionExperimentGrid' +import './ExpressionExperimentManage' +import './ExpressionExperimentMembersGrid' +import './ExpressionExperimentPage' +import './ExpressionExperimentPagingGrid' +import './ExpressionExperimentQuantitationTypeGrid' +import './ExpressionExperimentSetPage' +import './ExpressionExperimentSetSummary' +import './ExpressionExperimentTools' +import './ExpressionExperimentsSummaryPanel' +import './GEEQ' +import './QuantitationTypePanel' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/.sorting b/gemma-web/src/main/webapp/scripts/api/entities/gene/.sorting deleted file mode 100644 index 8db527a456..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/.sorting +++ /dev/null @@ -1,2 +0,0 @@ -GeneCombo.js -GeneChooserPanel.js \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneAndGeneGroupCombo.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneAndGeneGroupCombo.js index 7628ea80c0..2a545513fd 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneAndGeneGroupCombo.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneAndGeneGroupCombo.js @@ -234,7 +234,7 @@ Gemma.GeneAndGeneGroupCombo = Ext.extend(Ext.form.ComboBox, { store: { reader: new Ext.data.ListRangeReader({}, Gemma.GeneAndGeneGroupComboRecord), proxy: new Ext.data.DWRProxy(GenePickerController.searchGenesAndGeneGroups, - Gemma.genericErrorHandler), + Gemma.Error.genericErrorHandler), autoLoad: false } }); diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneChooserPanel.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneChooserPanel.js index 4602447aa4..923270fb8e 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneChooserPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneChooserPanel.js @@ -44,7 +44,7 @@ Gemma.GeneGrid = Ext.extend(Ext.grid.GridPanel, { width: 75, sortable: true, renderer: function (value, metadata, record, row, col, ds) { - return String.format("{1} ", + return String.format("{1} ", record.data.id, record.data.officialSymbol); } }, { @@ -468,7 +468,7 @@ Gemma.GeneChooserToolBar = Ext.extend(Ext.Toolbar, { }); this.addButton = new Ext.Toolbar.Button({ - icon: ctxBasePath + "images/icons/add.png", + icon: Gemma.CONTEXT_PATH + "images/icons/add.png", cls: "x-btn-icon", tooltip: "Add a gene to the list", disabled: true, @@ -480,7 +480,7 @@ Gemma.GeneChooserToolBar = Ext.extend(Ext.Toolbar, { }); this.removeButton = new Ext.Toolbar.Button({ - icon: ctxBasePath + "images/icons/subtract.png", + icon: Gemma.CONTEXT_PATH + "images/icons/subtract.png", cls: "x-btn-icon", tooltip: "Remove the selected gene from the list", disabled: true, @@ -500,7 +500,7 @@ Gemma.GeneChooserToolBar = Ext.extend(Ext.Toolbar, { }); this.multiButton = new Ext.Toolbar.Button({ - icon: ctxBasePath + "images/icons/page_white_put.png", + icon: Gemma.CONTEXT_PATH + "images/icons/page_white_put.png", cls: "x-btn-icon", tooltip: "Import multiple genes", disabled: false, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneCombo.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneCombo.js index 20f4d1c5fe..75e823a661 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneCombo.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneCombo.js @@ -245,9 +245,9 @@ Gemma.GeneSearch = Ext.extend( Ext.FormPanel, { if ( msg.length === 0 ) { if ( typeof pageTracker !== 'undefined' ) { - pageTracker._trackPageview( ctxBasePath + "/gene/showGene" ); + pageTracker._trackPageview( Gemma.CONTEXT_PATH + "/gene/showGene" ); } - document.location.href = String.format( ctxBasePath + "/gene/showGene.html?id={0}", this.geneCombo.getValue() ); + document.location.href = String.format( Gemma.CONTEXT_PATH + "/gene/showGene.html?id={0}", this.geneCombo.getValue() ); } else { this.handleError( msg ); } @@ -262,9 +262,9 @@ Gemma.GeneSearch = Ext.extend( Ext.FormPanel, { if ( msg.length === 0 ) { if ( typeof pageTracker !== 'undefined' ) { - pageTracker._trackPageview( ctxBasePath + "/gene/showGene" ); + pageTracker._trackPageview( Gemma.CONTEXT_PATH + "/gene/showGene" ); } - document.location.href = String.format( ctxBasePath + "/gene/showGene.html?id={0}", this.geneCombo.getValue() ); + document.location.href = String.format( Gemma.CONTEXT_PATH + "/gene/showGene.html?id={0}", this.geneCombo.getValue() ); } else { this.handleError( msg ); } @@ -293,7 +293,7 @@ Gemma.GeneSearch = Ext.extend( Ext.FormPanel, { handleError : function( msg, e ) { Ext.DomHelper.overwrite( "geneSearchMessages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "geneSearchMessages", { tag : 'span', diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneDetailsTab.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneDetailsTab.js index bcfd923601..bc5befedc9 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneDetailsTab.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneDetailsTab.js @@ -37,7 +37,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { var j, homologue; for (j = 0; j < homologues.length; j++) { homologue = homologues[j]; - homologueStr += "" + homologue.officialSymbol @@ -71,7 +71,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { for (var i = 0; i < geneSets.length; i++) { if (geneSets[i] && geneSets[i].name && geneSets[i].id) { - geneSetLinks.push('' + geneSets[i].name + ''); } } @@ -92,7 +92,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { if (geneDetails.multifunctionalityRank) { text = geneDetails.numGoTerms + " GO Terms; Overall multifunctionality " + geneDetails.multifunctionalityRank.toFixed(2); - // text += " "; } else { text = "[ Not available ]"; @@ -103,7 +103,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { html: text, listeners: { 'afterrender': function (c) { - jQuery('#multifuncHelp').qtip({ + window.jQuery('#multifuncHelp').qtip({ content: Gemma.HelpText.WidgetDefaults.GeneDetails.multifuncTT, style: { name: 'cream' @@ -146,7 +146,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { if (limit < phenotypes.length) { text += ', ' + (phenotypes.length - limit) + ' more'; } - text += " "; } else { @@ -158,7 +158,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { html: text, listeners: { 'afterrender': function (c) { - jQuery('#phenotypeHelp').qtip({ + window.jQuery('#phenotypeHelp').qtip({ content: Gemma.HelpText.WidgetDefaults.GeneDetails.phenotypeTT, style: { name: 'cream' @@ -188,7 +188,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { border: false, html: '... Max support ' + (geneDetails.nodeDegreesPos.length - 1) - + " ", listeners: { 'afterrender': function (c) { @@ -278,7 +278,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { } }); } - jQuery("#nodeDegreeHelp").qtip({ + window.jQuery("#nodeDegreeHelp").qtip({ content: Gemma.HelpText.WidgetDefaults.GeneDetails.nodeDegreeTT, style: { name: 'cream' @@ -295,7 +295,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { html: "[ Not available ]", listeners: { 'afterrender': function (c) { - jQuery("#nodeDegreeHelp").qtip({ + window.jQuery("#nodeDegreeHelp").qtip({ content: Gemma.HelpText.WidgetDefaults.GeneDetails.nodeDegreeTT, style: { name: 'cream' @@ -344,7 +344,7 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { + '  NCBI Gene Link' + + '">NCBI Gene Link' + '
' }, @@ -408,12 +408,12 @@ Gemma.GeneDetails = Ext.extend(Ext.Panel, { + " on " + geneDetails.platformCount + " different platforms " - + " ", listeners: { 'afterrender': function (c) { - jQuery('#elementsHelp') + window.jQuery('#elementsHelp') .qtip( { content: Gemma.HelpText.WidgetDefaults.GeneDetails.probesTT, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupEditToolbar.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupEditToolbar.js index c872caad3a..518663af97 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupEditToolbar.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupEditToolbar.js @@ -112,7 +112,7 @@ Gemma.GeneGroupEditToolbar = Ext.extend( Ext.Toolbar, { this.newBut = new Ext.Button( { handler : this.initNew, scope : this, - icon : ctxBasePath + "/images/icons/add.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/add.png", disabled : false, // if they are logged in. tooltip : "Create a new set (click 'commit' when you are done)" } ); @@ -121,7 +121,7 @@ Gemma.GeneGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.commit, disabled : true, scope : this, - icon : ctxBasePath + "/images/icons/database_save.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_save.png", tooltip : "Commit all changes to the database" } ); @@ -129,7 +129,7 @@ Gemma.GeneGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.copy, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/arrow_branch.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_branch.png", tooltip : "Clone as a new set (click 'save' afterwards)" } ); @@ -137,7 +137,7 @@ Gemma.GeneGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.reset, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/arrow_undo.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_undo.png", tooltip : "Reset selected set to stored version" } ); @@ -145,14 +145,14 @@ Gemma.GeneGroupEditToolbar = Ext.extend( Ext.Toolbar, { handler : this.remove, scope : this, disabled : true, - icon : ctxBasePath + "/images/icons/database_delete.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_delete.png", tooltip : "Delete selected set" } ); this.publicOrPrivateBut = new Ext.Button( { tooltip : "Show/hide public data", enableToggle : true, - icon : ctxBasePath + "/images/icons/world_add.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/world_add.png", handler : this.refreshData, pressed : true, // has to match default value in store. scope : this diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupGrid.js index 4ab3256b2b..d8e311bc16 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneGroupGrid.js @@ -74,8 +74,8 @@ Gemma.GeneGroupPanel = Ext.extend(Ext.grid.EditorGridPanel, { sortable: false, renderer: function (value, metadata, record, rowIndex, colIndex, store) { return ''; + + 'href="' + Gemma.CONTEXT_PATH + '/geneSet/showGeneSet.html?id=' + record.data.id + + '">'; } }, { diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneMembersGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneMembersGrid.js index f2c124ffa7..23da6fb266 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneMembersGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneMembersGrid.js @@ -98,7 +98,7 @@ Gemma.GeneMembersGrid = Ext.extend(Ext.grid.GridPanel, } else { GeneSetController.getGenesInGroup(gsvo.id, -1, { callback: this._loadGeneRecords.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } @@ -130,7 +130,7 @@ Gemma.GeneMembersGrid = Ext.extend(Ext.grid.GridPanel, GenePickerController.getGenes(geneIds, { callback: this._loadGeneRecords.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -249,7 +249,7 @@ Gemma.GeneMembersGrid = Ext.extend(Ext.grid.GridPanel, width: 75, renderer: function (value, metadata, record, row, col, ds) { return String.format( - "{1}
" + "{1}
" + "{2} ", record.data.id, record.data.officialSymbol, record.data.officialName); } @@ -373,7 +373,7 @@ Gemma.GeneMembersGrid = Ext.extend(Ext.grid.GridPanel, exportToTxt: function () { // make download link - var downloadLink = String.format(ctxBasePath + "/gene/downloadGeneList.html?g={0}", this.getGeneIds()); + var downloadLink = String.format(Gemma.CONTEXT_PATH + "/gene/downloadGeneList.html?g={0}", this.getGeneIds()); window.open(downloadLink); } @@ -438,7 +438,7 @@ Gemma.GeneMembersSaveGrid = Ext if (this.allowRemovals) { var removeSelectedBtn = new Ext.Button({ text: 'Remove Selected', - icon: ctxBasePath + "/images/icons/cross.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/cross.png", hidden: true, handler: function (button) { var records = this.getSelectionModel().getSelections(); @@ -481,7 +481,7 @@ Gemma.GeneMembersSaveGrid = Ext width: 75, renderer: function (value, metadata, record, row, col, ds) { return String.format( - "{1}", + "{1}", record.data.id, record.data.officialSymbol); } }, { @@ -497,7 +497,7 @@ Gemma.GeneMembersSaveGrid = Ext dataIndex: 'officialSymbol', width: 35, renderer: function (value, metadata, record, row, col, ds) { - return String.format("{1}
" + return String.format("{1}
" + "{2} ", record.data.id, record.data.officialSymbol, record.data.officialName); } @@ -576,7 +576,7 @@ Gemma.GeneMembersSaveGrid = Ext disabled: (this.allowSaveToSession || this.hideOkCancel) }); this.exportButton = new Ext.Button({ - icon: ctxBasePath + "/images/download.gif", + icon: Gemma.CONTEXT_PATH + "/images/download.gif", tooltip: Gemma.HelpText.WidgetDefaults.GeneMembersSaveGrid.exportTT, handler: this.exportToTxt, scope: this @@ -761,7 +761,7 @@ Gemma.GeneMembersSaveGrid = Ext exportToTxt: function () { // make download link - var downloadLink = String.format(ctxBasePath + "/gene/downloadGeneList.html?g={0}", this.getGeneIds()); + var downloadLink = String.format(Gemma.CONTEXT_PATH + "/gene/downloadGeneList.html?g={0}", this.getGeneIds()); window.open(downloadLink); }, @@ -826,7 +826,7 @@ Gemma.GeneMembersSaveGrid = Ext this.promptLoginForSave('save'); } }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -922,7 +922,7 @@ Gemma.GeneMembersSaveGrid = Ext this.saveAsHandler(); } }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } else { @@ -979,7 +979,7 @@ Gemma.GeneMembersSaveGrid = Ext this.fireEvent('doneModification'); } }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -1015,7 +1015,7 @@ Gemma.GeneMembersSaveGrid = Ext this.fireEvent('doneModification'); } }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -1031,7 +1031,7 @@ Gemma.GeneMembersSaveGrid = Ext this.fireEvent('geneListSavedOver'); this.fireEvent('doneModification'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } }); @@ -1070,7 +1070,7 @@ Gemma.GeneAndGroupAdderToolbar = Ext.extend(Ext.Toolbar, { }); this.addBtn = new Ext.Toolbar.Button({ - icon: ctxBasePath + "/images/icons/add.png", + icon: Gemma.CONTEXT_PATH + "/images/icons/add.png", cls: "x-btn-text-icon", tooltip: "Add selected genes(s) to the list", text: 'Add', @@ -1111,7 +1111,7 @@ Gemma.GeneGroupMemberPanelClassic = Ext.extend(Gemma.GeneGrid, { this.getEl().mask("Loading genes ..."); GeneSetController.getGenesInGroup.apply(this, [groupRecord.get('id'), -1, { callback: this.afterLoadGenes.createDelegate(this, [groupRecord], true), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }]); }, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSearchAndPreview.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSearchAndPreview.js index 0f99d89e32..cb903748c1 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSearchAndPreview.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSearchAndPreview.js @@ -407,7 +407,7 @@ Gemma.GeneSearchAndPreview = Ext this.relayEvents( this.geneCombo, [ 'select' ] ); this.symbolListButton = new Ext.Button( { - icon : ctxBasePath + "/images/icons/page_upload.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/page_upload.png", cls : "x-btn-icon", tooltip : Gemma.HelpText.WidgetDefaults.GeneSearchAndPreview.symbolListButtonInstructions, disabled : false, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetPreview.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetPreview.js index f3fb0ea512..6a1fd48426 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetPreview.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetPreview.js @@ -36,7 +36,7 @@ Gemma.GeneSetPreview = Ext.extend(Gemma.SetPreview, { // this.updateTitle(); // this is extra. this.fireEvent('previewLoaded', genes); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); }, @@ -68,7 +68,7 @@ Gemma.GeneSetPreview = Ext.extend(Gemma.SetPreview, { // this.updateTitle(); // this is extra. this.fireEvent('previewLoaded', genes); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }]); } else { alert("Could not load"); @@ -201,7 +201,7 @@ Gemma.GeneSetPreview = Ext.extend(Gemma.SetPreview, { this.fireEvent('doneModification'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } else /* the previous selection was another type of set - dbbound */{ @@ -237,7 +237,7 @@ Gemma.GeneSetPreview = Ext.extend(Gemma.SetPreview, { this.fireEvent('doneModification'); }.createDelegate(this), - errorHandler: Gemma.genericErrorHandler + errorHandler: Gemma.Error.genericErrorHandler }); } }, @@ -273,7 +273,7 @@ Gemma.GeneSetPreview = Ext.extend(Gemma.SetPreview, { frame: false }), defaultTpl: new Ext.Template('
' - + '{officialSymbol} {officialName} ' + + '{officialSymbol} {officialName} ' + '({taxonCommonName})
'), defaultPreviewTitle: "Gene Selection Preview", diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetSummary.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetSummary.js index 12f6ac4041..b474e08b96 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetSummary.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/GeneSetSummary.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * * Panel containing the most interesting info about a gene group. Used as one tab of the EE page @@ -42,7 +42,7 @@ Gemma.GeneSetSummary = Ext renderStatus : function( g ) { var statusString = ""; if ( g.modifiable ) { - statusString += " "; } var sl = Gemma.SecurityManager.getSecurityLink( "ubic.gemma.model.genome.gene.GeneSet", g.id, @@ -202,7 +202,7 @@ Gemma.GeneSetSummary = Ext var deleteEEButton = new Ext.Button( { text : 'Delete Gene Group', - icon : ctxBasePath + '/images/icons/cross.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/cross.png', toolTip : 'Delete the gene group from the system', disabled : !this.editable, handler : this.deleteGeneSet, @@ -298,7 +298,7 @@ Gemma.GeneSetSummary = Ext geneMembersGrid.on( 'geneSetCreated', function( geneSet ) { Ext.getBody().mask( 'Loading new set' ); - window.location = ctxBasePath + "/geneSet/showGeneSet.html?id=" + geneSet.id; + window.location = Gemma.CONTEXT_PATH + "/geneSet/showGeneSet.html?id=" + geneSet.id; } ); this.add( geneMembersGrid ); @@ -348,7 +348,7 @@ Gemma.GeneSetSummary = Ext this.deleteMask.show(); callParams.push( { callback : function( data ) { - window.location = ctxBasePath + '/home.html'; + window.location = Gemma.CONTEXT_PATH + '/home.html'; }.createDelegate( this ), errorHandler : function( error ) { Ext.Msg.alert( "Deletion failed", error ); diff --git a/gemma-web/src/main/webapp/scripts/api/entities/gene/index.js b/gemma-web/src/main/webapp/scripts/api/entities/gene/index.js new file mode 100644 index 0000000000..6b271affdf --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/gene/index.js @@ -0,0 +1,16 @@ +import './GeneAndGeneGroupCombo' +import './GeneChooserPanel' +import './GeneCombo' +import './GeneDetailsTab' +import './GeneElementsPanel' +import './GeneGoGrid' +import './GeneGroupCombo' +import './GeneGroupEditToolbar' +import './GeneGroupGrid' +import './GeneGroupManager' +import './GeneMembersGrid' +import './GenePage' +import './GeneSearchAndPreview' +import './GeneSetPage' +import './GeneSetPreview' +import './GeneSetSummary' diff --git a/gemma-web/src/main/webapp/scripts/api/entities/index.js b/gemma-web/src/main/webapp/scripts/api/entities/index.js new file mode 100644 index 0000000000..59dbf61e3a --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/index.js @@ -0,0 +1,11 @@ +import './AuditTrailGrid' +import './CreateSetDetailsWindow' +import './CurationTools' +import './GemmaNavigationHeader' +import './GemmaViewPort' +import './TaxonCombo' +import './analysis/differentialExpression/DifferentialExpressionAnalysesSummaryTree' +import './bibliographicReference' +import './experiment' +import './gene' +import './platform' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/ArrayDesignsNonPagingGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/ArrayDesignsNonPagingGrid.js index 27c3216d09..cd97d75b1e 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/platform/ArrayDesignsNonPagingGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/ArrayDesignsNonPagingGrid.js @@ -268,7 +268,7 @@ Gemma.ArrayDesignsNonPagingGrid = Ext } } ); } else if ( action === 'icon-refresh' ) { - updateArrayDesignReport( record.id, grid ); // function in arrayDesign.js + Gemma.ArrayDesign.updateArrayDesignReport( record.id, grid ); // function in arrayDesign.js } }, // You can cancel the action by returning false from this @@ -324,7 +324,7 @@ Gemma.ArrayDesignsNonPagingGrid = Ext dataIndex : 'name', width : 0.3, // viewConfig.forceFit resizes based on relative widths, renderer : function( value, metaData, record, rowIndex, colIndex, store ) { - return (value && record) ? '' + value + '' : ''; } }, @@ -347,22 +347,22 @@ Gemma.ArrayDesignsNonPagingGrid = Ext if ( record.get( 'isMerged' ) ) { statusString += ' '; + + ' src="' + Gemma.CONTEXT_PATH + '/images/icons/merging_result.png"/> '; } if ( record.get( 'isMergee' ) ) { statusString += ' '; + + ' src="' + Gemma.CONTEXT_PATH + '/images/icons/arrow_merge.png"/> '; } if ( record.get( 'isSubsumed' ) ) { statusString += ' '; + + ' src="' + Gemma.CONTEXT_PATH + '/images/icons/subsumed.png"/> '; } if ( record.get( 'isSubsumer' ) ) { statusString += ''; + + ' src="' + Gemma.CONTEXT_PATH + '/images/icons/subsumer.png"/>'; } if (record.get('isAffymetrixAltCdf')) { statusString += ' Regenerate this report

' + Gemma.Widget.tpl.ArrayDesignsNonPagingGrid.rowDetails, padding : 7, diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/GenomeAlignmentsGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/GenomeAlignmentsGrid.js index 14f1076d9d..6a2df5c45b 100644 --- a/gemma-web/src/main/webapp/scripts/api/entities/platform/GenomeAlignmentsGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/GenomeAlignmentsGrid.js @@ -1,9 +1,9 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; -Gemma.UCSC_ICON = ctxBasePath + "/images/logo/ucsc.gif"; -Gemma.NCBI_ICON = ctxBasePath + "/images/logo/ncbi.gif"; +Gemma.UCSC_ICON = Gemma.CONTEXT_PATH + "/images/logo/ucsc.gif"; +Gemma.NCBI_ICON = Gemma.CONTEXT_PATH + "/images/logo/ncbi.gif"; UCSC_TRACKS = 'https://genome.ucsc.edu/cgi-bin/hgTracks'; /** * @@ -59,7 +59,7 @@ Gemma.GenomeAlignmentsGrid = Ext.extend( Ext.grid.GridPanel, { for ( var i in data) { if ( data[i].id ) { res = res - + "" + data[i].officialSymbol + "
"; } } diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformDetailsTab.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformDetailsTab.js index 138d7eaf5a..7b53ab5ca5 100644 --- a/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformDetailsTab.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformDetailsTab.js @@ -30,7 +30,7 @@ Gemma.PlatformDetails = Ext html: platformDetails.taxon, listeners: { 'afterrender': function (c) { - jQuery('#taxonHelp').qtip({ + window.jQuery('#taxonHelp').qtip({ content: "The primary taxon for sequences on this platform (i.e., what it was designed for).", style: { name: 'cream' @@ -117,7 +117,7 @@ Gemma.PlatformDetails = Ext var updateT = ''; var isAdmin = Ext.get("hasAdmin").getValue() == 'true'; if (isAdmin) { - updateT = ' '; } @@ -245,14 +245,14 @@ Gemma.PlatformDetails = Ext if (db == "GEO") { text = text + ac + " "; } else if (db == "ArrayExpress") { text = text + ac + " "; } else { @@ -340,7 +340,7 @@ Gemma.PlatformDetails = Ext renderExperimentLink: function (platformDetails) { var text = platformDetails.expressionExperimentCount + ""; if (platformDetails.expressionExperimentCount > 0) { - text += " "; } @@ -400,7 +400,7 @@ Gemma.PlatformDetails = Ext text = 'Raw sequencing platform; no elements defined'; } else { var text = platformDetails.designElementCount; - text += " "; } @@ -424,7 +424,7 @@ Gemma.PlatformDetails = Ext if (isAdmin) { text = text + ' '; } return new Ext.Panel({ diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformElementGrid.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformElementGrid.js index 8036f55080..b5f0839b13 100644 --- a/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformElementGrid.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/PlatformElementGrid.js @@ -1,7 +1,7 @@ Ext.namespace( 'Gemma' ); /** - * + * * @class Gemma.PlatformElementGrid * @extends Ext.grid.GridPanel */ @@ -26,7 +26,7 @@ Gemma.PlatformElementGrid = Ext /** * Show first batch of data. - * + * * @param {Object} * isArrayDesign * @param {Object} @@ -52,7 +52,7 @@ Gemma.PlatformElementGrid = Ext arraylink : function( data, metadata, record, row, column, store ) { return "" + record.get( "arrayDesignName" ) + ""; }, @@ -73,7 +73,7 @@ Gemma.PlatformElementGrid = Ext for ( var g in d) { if ( d[g].id ) { r = r - + " " + d[g].officialSymbol + ","; ++count; } @@ -168,6 +168,9 @@ Gemma.PlatformElementGrid = Ext header : "Element Name", width : 130, dataIndex : "compositeSequenceName", + renderer : ( data, metadata, record ) => { + return '' + data + ''; + }, tooltip : "Element or probe name" }, { @@ -269,7 +272,7 @@ Gemma.PlatformElementGrid = Ext /** * Event handler for searches. Update the lower grid. - * + * * @param {Object} * event */ @@ -335,7 +338,7 @@ Gemma.PlatformElementGrid = Ext handleLoadError : function( scope, b, message, exception ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/iconWarning.gif' + src : Gemma.CONTEXT_PATH + '/images/iconWarning.gif' } ); Ext.DomHelper.overwrite( "messages", { tag : 'span', diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/arrayDesign.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/arrayDesign.js index 3e91a24902..6df2cdbaff 100755 --- a/gemma-web/src/main/webapp/scripts/api/entities/platform/arrayDesign.js +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/arrayDesign.js @@ -15,7 +15,7 @@ function reportFeedback( type, text, e ) { if ( messagesDiv ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', @@ -34,7 +34,7 @@ function reportFeedback( type, text, e ) { if ( messagesDiv ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); } } else if ( type === "success" ) { @@ -76,7 +76,10 @@ function handleDoneUpdateReport( id, callerScope, callback ) { } -function updateArrayDesignReport( id, callerScope ) { +if ( Gemma.ArrayDesign === undefined ) { + Gemma.ArrayDesign = {}; +} +Gemma.ArrayDesign.updateArrayDesignReport = function( id, callerScope ) { var callParams = []; callParams.push( { diff --git a/gemma-web/src/main/webapp/scripts/api/entities/platform/index.js b/gemma-web/src/main/webapp/scripts/api/entities/platform/index.js new file mode 100644 index 0000000000..cdd682cbeb --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/entities/platform/index.js @@ -0,0 +1,9 @@ +import './ArrayDesignCombo' +import './ArrayDesignsNonPagingGrid' +import './GenomeAlignmentsGrid' +import './PlatformDetailsTab' +import './PlatformElementGrid' +import './PlatformElementsPanel' +import './PlatformPage' +import './SequenceDetailsPanel' +import './arrayDesign' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/ext/data/DwrProxy.js b/gemma-web/src/main/webapp/scripts/api/ext/data/DwrProxy.js index 373b886e76..37d9d15cce 100755 --- a/gemma-web/src/main/webapp/scripts/api/ext/data/DwrProxy.js +++ b/gemma-web/src/main/webapp/scripts/api/ext/data/DwrProxy.js @@ -86,7 +86,7 @@ Ext.ux.data.DwrProxy = function( configOrMethod, errorHandler ) { if ( typeof errorHandler == 'function' ) { this.errorHandler = errorHandler; } else { - this.errorHandler = Gemma.genericErrorHandler; + this.errorHandler = Gemma.Error.genericErrorHandler; } }; diff --git a/gemma-web/src/main/webapp/scripts/api/ext/index.js b/gemma-web/src/main/webapp/scripts/api/ext/index.js new file mode 100644 index 0000000000..a003782923 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/ext/index.js @@ -0,0 +1,5 @@ +import './data/DwrProxy' +import './data/ListRangeReader' +import './data/PagingMemoryProxy' +import './CollapsedPanelTitlePlugin' +import './DwrTreeLoader' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/lib/globals.js b/gemma-web/src/main/webapp/scripts/api/globals.js similarity index 58% rename from gemma-web/src/main/webapp/scripts/lib/globals.js rename to gemma-web/src/main/webapp/scripts/api/globals.js index 8de2a9401b..73e1fa3578 100644 --- a/gemma-web/src/main/webapp/scripts/lib/globals.js +++ b/gemma-web/src/main/webapp/scripts/api/globals.js @@ -1,4 +1,4 @@ -Ext.namespace('Gemma'); +Ext.namespace( 'Gemma' ); Gemma.APPNAME = 'Gemma'; Gemma.HOST = 'https://gemma.msl.ubc.ca/'; Gemma.CONTEXT = ''; @@ -6,4 +6,6 @@ Gemma.BASEURL = Gemma.HOST + Gemma.CONTEXT; Gemma.WIKI = 'https://wiki.pavlab.msl.ubc.ca/display/PavLab/Gemma'; Gemma.IMAGEURL = Gemma.CONTEXT + "/images/"; Gemma.ICONURL = Gemma.CONTEXT + "/images/icons/"; -Gemma.RECAPTCHA_PUBLIC_KEY = recaptchaPublicKey; +Gemma.RECAPTCHA_PUBLIC_KEY = window.recaptchaPublicKey; +Gemma.CONTEXT_PATH = window.Gemma.CONTEXT_PATH || ""; +Gemma.GEMBROW_URL = window.gemBrowUrl || "https://gemma.msl.ubc.ca/browse"; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/index.js b/gemma-web/src/main/webapp/scripts/api/index.js new file mode 100644 index 0000000000..d528e0b964 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/index.js @@ -0,0 +1,24 @@ +import './globals' + +import './dwr' + +import './ext' + +import './userHelpMessages' + +import './DownloadWindow' +import './Eventbus' +import './eeDesignMatrix' + +import './util' + +import './analysisSearch' +import './annotation' +import './coexpression' +import './diff' +import './entities' +import './search' +import './security' +import './visualization' + +export default Gemma; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/search/generalSearchSimple.js b/gemma-web/src/main/webapp/scripts/api/search/generalSearchSimple.js index 0fc62ce4bd..85e81cdfe6 100755 --- a/gemma-web/src/main/webapp/scripts/api/search/generalSearchSimple.js +++ b/gemma-web/src/main/webapp/scripts/api/search/generalSearchSimple.js @@ -1,5 +1,5 @@ Ext.namespace( "Gemma.Search" ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Gemma.Search.GeneralSearchSimple = Ext.extend( Ext.Panel, { layout : 'hbox', @@ -64,7 +64,7 @@ Gemma.Search.GeneralSearchSimple = Ext.extend( Ext.Panel, { getSearchURL : function() { var scopeLetterArr = this.searchTypeCombo.getURLScopeLetters(); var query = this.queryField.getValue(); - var url = ctxBasePath + "/searcher.html?query=" + query + "&scope=" + scopeLetterArr.join(); + var url = Gemma.CONTEXT_PATH + "/searcher.html?query=" + query + "&scope=" + scopeLetterArr.join(); return url; } } ); diff --git a/gemma-web/src/main/webapp/scripts/api/search/index.js b/gemma-web/src/main/webapp/scripts/api/search/index.js new file mode 100644 index 0000000000..a902e29cc9 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/search/index.js @@ -0,0 +1,2 @@ +import './generalSearchSimple' +import './search' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/search/search.js b/gemma-web/src/main/webapp/scripts/api/search/search.js index f04db5c3a9..5472a3601b 100755 --- a/gemma-web/src/main/webapp/scripts/api/search/search.js +++ b/gemma-web/src/main/webapp/scripts/api/search/search.js @@ -5,7 +5,7 @@ * */ Ext.namespace( "Gemma.Search" ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Gemma.Search.SEARCH_RESULT_CLASS_METAS = { "ArrayDesign" : {title : "Platform", sortBy : "shortName"}, @@ -57,13 +57,13 @@ Gemma.Search.GeneralSearch = Ext.extend( Ext.Panel, { this.messagePanel = new Ext.Panel( { xtype : 'panel', - tpl : '{msg}', + tpl : '{msg}', border : false, flex : 1 } ); this.bookmarkPanel = new Ext.Panel( { xtype : 'panel', - tpl : 'Bookmarkable link', + tpl : 'Bookmarkable link', border : false, flex : 0, height : 25, @@ -204,7 +204,7 @@ Gemma.Search.GeneralSearch = Ext.extend( Ext.Panel, { } ); if ( typeof pageTracker !== 'undefined' ) { - pageTracker._trackPageview( ctxBasePath + "/searcher.search?query=" + escape( query ) + scopes ); + pageTracker._trackPageview( Gemma.CONTEXT_PATH + "/searcher.search?query=" + escape( query ) + scopes ); } this.messagePanel.update( { msg : "" @@ -757,7 +757,7 @@ Gemma.SearchGrid = Ext.extend( Ext.grid.GridPanel, { this.fireEvent( "loadError", message ); Ext.DomHelper.overwrite( 'messages', { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( 'messages', { tag : 'span', @@ -794,14 +794,14 @@ Gemma.SearchGrid = Ext.extend( Ext.grid.GridPanel, { + (data.sourceExperiment ? data.sourceExperiment : data.id) + "\">" + data.shortName + " - " + data.name; } else if ( clazz === "CompositeSequence" ) { - return "" + data.name + " - " + return "" + data.name + " - " + (data.description ? data.description : "") + (data.arrayDesign ? "; Platform: " + data.arrayDesign.shortName : ''); } else if ( clazz === "ArrayDesign" ) { - return "" + data.shortName + " " + return "" + data.shortName + " " + data.name; } else if ( clazz === "BioSequence" ) { - return "" + data.name + return "" + data.name + " - " + data.taxon.commonName + " " + (data.description ? data.description : ""); } else if ( clazz === "Gene" ) { return "" + data.officialSymbol diff --git a/gemma-web/src/main/webapp/scripts/api/security/AjaxLogin.js b/gemma-web/src/main/webapp/scripts/api/security/AjaxLogin.js index 35578c0d30..50f5ab9d7c 100755 --- a/gemma-web/src/main/webapp/scripts/api/security/AjaxLogin.js +++ b/gemma-web/src/main/webapp/scripts/api/security/AjaxLogin.js @@ -27,7 +27,7 @@ Gemma.Application.currentUser.addEvents( 'logIn', 'logOut' ); Gemma.AjaxLogin.logoutFn = function() { Ext.Ajax.request( { - url : ctxBasePath + '/j_spring_security_logout', + url : Gemma.CONTEXT_PATH + '/j_spring_security_logout', method : 'GET', /** @@ -254,7 +254,7 @@ Gemma.AjaxLogin.AjaxLoginWindow = Ext.extend( Ext.Window, { inputType : 'checkbox' }, { - html : '' + html : '' + Gemma.HelpText.WidgetDefaults.AjaxLogin_AjaxLoginWindow.passwordHintLink + '', name : 'passwordHint', @@ -310,7 +310,7 @@ Gemma.AjaxLogin.AjaxLoginWindow = Ext.extend( Ext.Window, { var sb = Ext.getCmp( 'my-status_ajax' ); sb.showBusy(); Ext.getCmp( "_loginForm" ).getForm().submit( { - url : ctxBasePath + '/j_spring_security_check', + url : Gemma.CONTEXT_PATH + '/j_spring_security_check', success : function( form, action ) { var sb = Ext.getCmp( 'my-status_ajax' ); @@ -320,7 +320,7 @@ Gemma.AjaxLogin.AjaxLoginWindow = Ext.extend( Ext.Window, { var link = Ext.getDom( 'footer-login-link' ); if ( link ) { - link.href = ctxBasePath + "/j_spring_security_logout"; + link.href = Gemma.CONTEXT_PATH + "/j_spring_security_logout"; link.innerHTML = "Logout"; } diff --git a/gemma-web/src/main/webapp/scripts/api/security/AjaxRegister.js b/gemma-web/src/main/webapp/scripts/api/security/AjaxRegister.js index 2818f15ddc..121dba28ad 100755 --- a/gemma-web/src/main/webapp/scripts/api/security/AjaxRegister.js +++ b/gemma-web/src/main/webapp/scripts/api/security/AjaxRegister.js @@ -29,7 +29,7 @@ Gemma.AjaxLogin.AjaxRegister = Ext { id: '_registerForm', labelWidth: 140, // label settings here cascade unless overridden - url: ctxBasePath + '/signup.html', + url: Gemma.CONTEXT_PATH + '/signup.html', frame: true, monitorValid: true, // use with formBind in Button for client side validation bodyStyle: 'padding:5px 5px 0', diff --git a/gemma-web/src/main/webapp/scripts/api/security/SecurityManager.js b/gemma-web/src/main/webapp/scripts/api/security/SecurityManager.js index ca5c02f728..d6fe8f609a 100755 --- a/gemma-web/src/main/webapp/scripts/api/security/SecurityManager.js +++ b/gemma-web/src/main/webapp/scripts/api/security/SecurityManager.js @@ -41,7 +41,7 @@ Gemma.SecurityManager.managePermissions = function( elid, clazz, id, securityFor Ext.DomHelper.overwrite( elid, { tag : 'img', - src : ctxBasePath + "/images/loading.gif" + src : Gemma.CONTEXT_PATH + "/images/loading.gif" } ); /* diff --git a/gemma-web/src/main/webapp/scripts/api/security/index.js b/gemma-web/src/main/webapp/scripts/api/security/index.js new file mode 100644 index 0000000000..f7f11aaca2 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/security/index.js @@ -0,0 +1,3 @@ +import './AjaxLogin' +import './AjaxRegister' +import './SecurityManager' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/userHelpMessages.js b/gemma-web/src/main/webapp/scripts/api/userHelpMessages.js index 32eec7a558..16871af47b 100755 --- a/gemma-web/src/main/webapp/scripts/api/userHelpMessages.js +++ b/gemma-web/src/main/webapp/scripts/api/userHelpMessages.js @@ -7,7 +7,7 @@ Gemma.PHENOCARTA_CITATION = "If you use this file for your research, please cite (function() { Gemma.helpTip = function(selecter, message, theme) { return function(c) { - jQuery(selecter).qtip({ + window.jQuery(selecter).qtip({ content: message, style: { name: theme ? theme : 'cream' @@ -357,7 +357,7 @@ Gemma.HelpText.WidgetDefaults = { visualizaButtonTT: "Click to display data for selected genes, or a 'random' selection of data from this experiment", instructions: 'Use the search fields to find individual genes, or groups of genes. ' + 'Gene group searches work for GO terms and other groups in Gemma. ' - + 'To create groups use the gene group manager.' + + 'To create groups use the gene group manager.' + ' Click "show" to view the data for those genes. ' + 'Note that when viewing gene groups, not all genes in the group are necessarily in the data set.', GoButtonText: { @@ -421,7 +421,7 @@ Gemma.HelpText.WidgetDefaults = { ExpressionDataUpload: { instructions: '
    ' + '
  • Is your data available on GEO? If so, it is probably already loaded for you. ' - + 'Check here.
  • ' + + 'Check here.' + '
  • Complete all sections of the form, upload your data file (compress it first to speed things up)' + ', and click "Validate data"; once validation is complete you will be able to click "Submit data".
  • ' + '
  • Most of the descriptive text you enter can be modified later. ' @@ -434,7 +434,7 @@ Gemma.HelpText.WidgetDefaults = { loadingGEOWarningTitle: 'GEO Dataset Check', loadingGEOWarningText: 'It looks like you\'re trying to load a GEO dataset. ' + 'Please check that it is not already loaded in Gemma. ' - + '\nTry looking here.' + + '\nTry looking here.' }, ExpressionExperimentDetails: { statusMultiplePreferredQuantitationTypes: 'This experiment has multiple \'preferred\' quantitation types. ' @@ -581,11 +581,11 @@ Gemma.HelpText.WidgetDefaults = { + 'geneStoreProxy, evidenceStoreProxy and getGeneLink
    ' + 'should not be set in config. Otherwise, all of them should be set.
    ' + '', modifyPhenotypeAssociationOutsideOfGemmaTitle: "Add new phenotype association", - modifyPhenotypeAssociationOutsideOfGemmaText: "To add, edit or remove gene-phenotype associatons, please go to the Gemma website.", + modifyPhenotypeAssociationOutsideOfGemmaText: "To add, edit or remove gene-phenotype associatons, please go to the Gemma website.", viewBibliographicReferenceOutsideOfGemmaTitle: "View bibliographic reference", - viewBibliographicReferenceOutsideOfGemmaText: "To view bibliographic reference, please go to the Gemma website.", + viewBibliographicReferenceOutsideOfGemmaText: "To view bibliographic reference, please go to the Gemma website.", filterMyAnnotationsOutsideOfGemmaTitle: "Filter by my annotations", - filterMyAnnotationsOutsideOfGemmaText: "To filter by my annotations, please go to the Gemma website." + filterMyAnnotationsOutsideOfGemmaText: "To filter by my annotations, please go to the Gemma website." }, PhenotypeAssociationForm: { ErrorMessage: { @@ -613,7 +613,7 @@ Gemma.HelpText.WidgetDefaults = { }, SecurityManager: { noGroupsToShareWith: 'You cannot share this entity because you do not belong to any user groups.' - + '
    Would you like to create one? ', + + '
    Would you like to create one? ', publicWarning: 'Please note: setting the read permissions to "public" means that all ' + 'users of Gemma (registered and anonymous) will be able to view this entity and use it in analyses.' }, diff --git a/gemma-web/src/main/webapp/scripts/api/util/Error.js b/gemma-web/src/main/webapp/scripts/api/util/Error.js index 709b08669b..2b606f73b2 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/Error.js +++ b/gemma-web/src/main/webapp/scripts/api/util/Error.js @@ -1,20 +1,22 @@ Ext.namespace( 'Gemma' ); -Gemma.genericErrorHandler = function( err, exception ) { +Gemma.Error = {}; + +Gemma.Error.genericErrorHandler = function( err, exception ) { if ( typeof this.getEl == 'function' && this.getEl() != null && typeof this.getEl().unmask == 'function' ) { this.getEl().unmask(); } console.log( exception ); if ( err.stack ) { - var f = Gemma.parseException( err.stack ); + var f = Gemma.Error.parseException( err.stack ); console.log( f ); Ext.Msg.alert( "There was an error", err + ":
    " + f ); } else if ( exception.stackTrace ) { var c = exception.javaClassName; var m = exception.message; - var f = Gemma.parseException( exception.stackTrace ); + var f = Gemma.Error.parseException( exception.stackTrace ); console.log( c + ": " + m + "
    " + f ); Ext.Msg.alert( "There was an error", err + "
    " + c + (m ? ":
    Message: " + m : "") + (f ? "
    Details:
    " + f : 'No details') ); @@ -27,7 +29,7 @@ Gemma.genericErrorHandler = function( err, exception ) { } }; -Gemma.alertUserToError = function( baseValueObject, title ) { +Gemma.Error.alertUserToError = function( baseValueObject, title ) { // Set the minimum width of message box so that title is not wrapped if it is longer than message box body text. Ext.MessageBox.minWidth = 250; @@ -44,11 +46,11 @@ Gemma.alertUserToError = function( baseValueObject, title ) { } }; -Gemma.parseException = function( ex ) { +Gemma.Error.parseException = function( ex ) { if ( ex.constructor === Array ) { var s = ""; try { - for (var i = 0; i < ex.length; i++) { + for ( var i = 0; i < ex.length; i++ ) { var l = ex[i]; if ( l.fileName == "" || l.lineNumber < 0 ) { continue; @@ -60,7 +62,7 @@ Gemma.parseException = function( ex ) { } } return s; - } catch (e) { + } catch ( e ) { return "Error stack trace could not be parsed"; } } else { diff --git a/gemma-web/src/main/webapp/scripts/api/util/Evidence.js b/gemma-web/src/main/webapp/scripts/api/util/Evidence.js index 58e567de49..d1fda879b2 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/Evidence.js +++ b/gemma-web/src/main/webapp/scripts/api/util/Evidence.js @@ -1,12 +1,14 @@ Ext.namespace( 'Gemma' ); -Gemma.isRunningOutsideOfGemma = function() { +Gemma.Evidence = {} + +function isRunningOutsideOfGemma() { var hostname = window.location.hostname; return (hostname.indexOf( 'msl.ubc.ca' ) < 0 && hostname.indexOf( 'chibi.ubc.ca' ) < 0 && hostname.indexOf( 'localhost' ) < 0); }; -Gemma.convertToEvidenceError = function( validateEvidenceValueObject ) { +Gemma.Evidence.convertToEvidenceError = function( validateEvidenceValueObject ) { var isWarning = false; var errorMessage = ''; diff --git a/gemma-web/src/main/webapp/scripts/api/util/FileUploadForm.js b/gemma-web/src/main/webapp/scripts/api/util/FileUploadForm.js index 06a0b33878..2f7336b02e 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/FileUploadForm.js +++ b/gemma-web/src/main/webapp/scripts/api/util/FileUploadForm.js @@ -31,7 +31,7 @@ Gemma.FileUploadForm = Ext.extend( Ext.Panel, { header : false, method : 'POST', frame : true, - url : ctxBasePath + '/uploadFile.html', // FileUploadController + url : Gemma.CONTEXT_PATH + '/uploadFile.html', // FileUploadController timeout : 15000, defaults : { anchor : '95%', diff --git a/gemma-web/src/main/webapp/scripts/api/util/GemmaLinkRoots.js b/gemma-web/src/main/webapp/scripts/api/util/GemmaLinkRoots.js index a70408ce31..35671bbf7a 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/GemmaLinkRoots.js +++ b/gemma-web/src/main/webapp/scripts/api/util/GemmaLinkRoots.js @@ -1,17 +1,17 @@ Ext.namespace( 'Gemma.LinkRoots' ); Gemma.LinkRoots = { - expressionExperimentPage : ctxBasePath + "/expressionExperiment/showExpressionExperiment.html?id=", - expressionExperimentSetPage : ctxBasePath + "/expressionExperimentSet/showExpressionExperimentSet.html?id=", - geneSetPage : ctxBasePath + "/geneSet/showGeneSet.html?id=", - genePage : ctxBasePath + "/gene/showGene.html?id=", - genePageNCBI : ctxBasePath + "/gene/showGene.html?ncbiid=", - phenotypePage : ctxBasePath + "/phenotypes.html?phenotypeUrlId=" + expressionExperimentPage : Gemma.CONTEXT_PATH + "/expressionExperiment/showExpressionExperiment.html?id=", + expressionExperimentSetPage : Gemma.CONTEXT_PATH + "/expressionExperimentSet/showExpressionExperimentSet.html?id=", + geneSetPage : Gemma.CONTEXT_PATH + "/geneSet/showGeneSet.html?id=", + genePage : Gemma.CONTEXT_PATH + "/gene/showGene.html?id=", + genePageNCBI : Gemma.CONTEXT_PATH + "/gene/showGene.html?ncbiid=", + phenotypePage : Gemma.CONTEXT_PATH + "/phenotypes.html?phenotypeUrlId=" }; (function() { Gemma.arrayDesignLink = function( ad ) { - return "" + return "" + ad.shortName + ""; }; })(); diff --git a/gemma-web/src/main/webapp/scripts/api/util/GemmaTemplates.js b/gemma-web/src/main/webapp/scripts/api/util/GemmaTemplates.js index 4388098049..ea9aebff4b 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/GemmaTemplates.js +++ b/gemma-web/src/main/webapp/scripts/api/util/GemmaTemplates.js @@ -13,8 +13,8 @@ Gemma.Widget.tpl = { Gemma.Common.tpl = { pubmedLink : { - simple : '', + simple : '', complex : '' + '{primaryCitationStr}' + '    ' + '' + '' + 'Not Available' + '' + + ' href="{pubmedURL}">  ' + '' + '' + 'Not Available' + '' } }; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/util/InlineHelpFormLayout.js b/gemma-web/src/main/webapp/scripts/api/util/InlineHelpFormLayout.js index 7e86c7c0ac..eec83c127a 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/InlineHelpFormLayout.js +++ b/gemma-web/src/main/webapp/scripts/api/util/InlineHelpFormLayout.js @@ -24,7 +24,7 @@ if ( Ext.isIE ) { '
    ', '', '
    ', - '', + '', '
    ', '
    ', { disableFormats : true } ), @@ -60,7 +60,7 @@ if ( Ext.isIE ) { '
    ', '', '
    ', - '', + '', '
    ', '
    ', { disableFormats : true } ), diff --git a/gemma-web/src/main/webapp/scripts/api/util/InlineHelpIcon.js b/gemma-web/src/main/webapp/scripts/api/util/InlineHelpIcon.js index 684538bf6a..37eafe90d0 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/InlineHelpIcon.js +++ b/gemma-web/src/main/webapp/scripts/api/util/InlineHelpIcon.js @@ -11,7 +11,7 @@ */ Gemma.InlineHelpIcon = Ext.extend( Ext.Button, { - icon : ctxBasePath + "/images/icons/question_blue.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/question_blue.png", padding : '3px', cls : 'transparent-btn', initComponent : function() { diff --git a/gemma-web/src/main/webapp/scripts/api/util/JavascriptLogger.js b/gemma-web/src/main/webapp/scripts/api/util/JavascriptLogger.js new file mode 100644 index 0000000000..81c1a9c56c --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/util/JavascriptLogger.js @@ -0,0 +1,9 @@ +// log javascript errors +window.onerror = function( errorMessage, url, line ) { + // message == text-based error description + // url == url which exhibited the script error + // line == the line number being executed when the error occurred + if ( typeof JavascriptLogger !== 'undefined' ) { + JavascriptLogger.writeToErrorLog( errorMessage, url, line, document.location.href, navigator.userAgent ); + } +}; diff --git a/gemma-web/src/main/webapp/scripts/api/util/ObservableSubmittedTask.js b/gemma-web/src/main/webapp/scripts/api/util/ObservableSubmittedTask.js index 972255ebc3..11aac374e9 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/ObservableSubmittedTask.js +++ b/gemma-web/src/main/webapp/scripts/api/util/ObservableSubmittedTask.js @@ -75,7 +75,7 @@ Gemma.ObservableSubmittedTask = Ext.extend( Ext.util.Observable, { */ var id = Ext.id(); Ext.DomHelper - .append( element, '' ); + .append( element, '' ); this.on( 'task-completed', function() { Ext.DomHelper.overwrite( id, "" ); diff --git a/gemma-web/src/main/webapp/scripts/api/util/Renderers.js b/gemma-web/src/main/webapp/scripts/api/util/Renderers.js index 7c0e289f3d..b327776f37 100644 --- a/gemma-web/src/main/webapp/scripts/api/util/Renderers.js +++ b/gemma-web/src/main/webapp/scripts/api/util/Renderers.js @@ -54,14 +54,14 @@ Gemma.Renderers = { qualityRenderer: function (value, metadata, record, rowIndex, colIndex, store) { if (record.get('geeq')) { var geeq = record.get('geeq'); - return getGeeqIconColored(geeq.publicQualityScore); + return Gemma.GEEQ.getGeeqIconColored(geeq.publicQualityScore); } }, suitabilityRenderer: function (value, metadata, record, rowIndex, colIndex, store) { if (record.get('geeq')) { var geeq = record.get('geeq'); - return getGeeqIconColored(geeq.publicSuitabilityScore); + return Gemma.GEEQ.getGeeqIconColored(geeq.publicSuitabilityScore); } }, diff --git a/gemma-web/src/main/webapp/scripts/api/util/TutorialQtips.js b/gemma-web/src/main/webapp/scripts/api/util/TutorialQtips.js index e2805b4cfc..c70b0b4bce 100755 --- a/gemma-web/src/main/webapp/scripts/api/util/TutorialQtips.js +++ b/gemma-web/src/main/webapp/scripts/api/util/TutorialQtips.js @@ -71,7 +71,7 @@ Gemma.Tutorial.ControlPanel = Ext.extend( Ext.Panel, { xtype : 'button', cls : 'transparent-btn', tooltip : 'Close this tutorial', - icon : ctxBasePath + '/images/icons/cross.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/cross.png', handler : this.hideTutorial, scope : this, flex : 0 @@ -118,13 +118,13 @@ Gemma.Tutorial.ControlPanel = Ext.extend( Ext.Panel, { this.controlBtns.insert( index + 1, { xtype : 'button', ref : 'progBtn' + index, - icon : ctxBasePath + '/images/icons/bullet_black.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/bullet_black.png', cls : 'transparent-btn', toggleHandler : function( button, state ) { if ( state ) { - button.setIcon( ctxBasePath + '/images/icons/bullet_blue.png' ); + button.setIcon( Gemma.CONTEXT_PATH + '/images/icons/bullet_blue.png' ); } else { - button.setIcon( ctxBasePath + '/images/icons/bullet_black.png' ); + button.setIcon( Gemma.CONTEXT_PATH + '/images/icons/bullet_black.png' ); } }, enableToggle : true, diff --git a/gemma-web/src/main/webapp/scripts/api/util/index.js b/gemma-web/src/main/webapp/scripts/api/util/index.js new file mode 100644 index 0000000000..af1750a48f --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/util/index.js @@ -0,0 +1,17 @@ +import './Error' +import './Evidence' +import './FileUploadForm' +import './GemmaGridPanel' +import './GemmaLinkRoots' +import './GemmaTemplates' +import './InlineHelpFormLayout' +import './InlineHelpIcon' +import './JavascriptLogger' +import './ObservableSubmittedTask' +import './ProgressWidget' +import './Renderers' +import './SetPreview' +import './StatefulRemoteCombo' +import './TutorialQtips' +import './WizardTabPanel' +import './WizardTabPanelItemPanel' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/valueObjectsInheritanceStructure.js b/gemma-web/src/main/webapp/scripts/api/valueObjectsInheritanceStructure.js deleted file mode 100755 index 536dc2ef36..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/valueObjectsInheritanceStructure.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * - * Set up inheritance structures for value objects see - * http://directwebremoting.org/dwr/documentation/server/configuration/dwrxml/converters/bean.html#interfacesAndAbstractClasses - * - * - * - */ - -if ( typeof ExpressionExperimentSetValueObject === 'undefined' ) { - var ExpressionExperimentSetValueObject = function() { - }; -} -if ( typeof SessionBoundExpressionExperimentSetValueObject === 'undefined' ) { - var SessionBoundExpressionExperimentSetValueObject = function() { - }; -} -if ( typeof FreeTextExpressionExperimentResultsValueObject === 'undefined' ) { - var FreeTextExpressionExperimentResultsValueObject = function() { - }; -} -if ( typeof DatabaseBackedGeneSetValueObject === 'undefined' ) { - var DatabaseBackedGeneSetValueObject = function() { - }; -} -if ( typeof GeneSetValueObject === 'undefined' ) { - var GeneSetValueObject = function() { - }; -} -if ( typeof FreeTextGeneResultsValueObject === 'undefined' ) { - var FreeTextGeneResultsValueObject = function() { - }; -} -if ( typeof GOGroupValueObject === 'undefined' ) { - var GOGroupValueObject = function() { - }; -} -if ( typeof PhenotypeGroupValueObject === 'undefined' ) { - var PhenotypeGroupValueObject = function() { - }; -} -if ( typeof SessionBoundGeneSetValueObject === 'undefined' ) { - var SessionBoundGeneSetValueObject = function() { - }; -} -if ( typeof EvidenceValueObject === 'undefined' ) { - var EvidenceValueObject = function() { - }; -} -if ( typeof LiteratureEvidenceValueObject === 'undefined' ) { - var LiteratureEvidenceValueObject = function() { - }; -} -if ( typeof ExperimentalEvidenceValueObject === 'undefined' ) { - var ExperimentalEvidenceValueObject = function() { - }; -} -if ( typeof GeneValueObject === 'undefined' ) { - var GeneValueObject = function() { - }; -} - -if (typeof ExpressionExperimentValueObject == 'undefined') { - var ExpressionExperimentValueObject = function() { - }; -} - -GeneValueObject.prototype = new GeneValueObject(); -GeneValueObject.prototype.constructor = GeneValueObject; - -ExpressionExperimentValueObject.prototype = new ExpressionExperimentValueObject(); -ExpressionExperimentValueObject.prototype.constructor = ExpressionExperimentValueObject; - -SessionBoundExpressionExperimentSetValueObject.prototype = new ExpressionExperimentSetValueObject(); -SessionBoundExpressionExperimentSetValueObject.prototype.constructor = SessionBoundExpressionExperimentSetValueObject; - -FreeTextExpressionExperimentResultsValueObject.prototype = new SessionBoundExpressionExperimentSetValueObject(); -FreeTextExpressionExperimentResultsValueObject.prototype.constructor = FreeTextExpressionExperimentResultsValueObject; - -DatabaseBackedGeneSetValueObject.prototype = new GeneSetValueObject(); -DatabaseBackedGeneSetValueObject.prototype.constructor = DatabaseBackedGeneSetValueObject; - -SessionBoundGeneSetValueObject.prototype = new GeneSetValueObject(); -SessionBoundGeneSetValueObject.prototype.constructor = SessionBoundGeneSetValueObject; - -FreeTextGeneResultsValueObject.prototype = new SessionBoundGeneSetValueObject(); -FreeTextGeneResultsValueObject.prototype.constructor = FreeTextGeneResultsValueObject; - -GOGroupValueObject.prototype = new SessionBoundGeneSetValueObject(); -GOGroupValueObject.prototype.constructor = GOGroupValueObject; - -PhenotypeGroupValueObject.prototype = new SessionBoundGeneSetValueObject(); -PhenotypeGroupValueObject.prototype.constructor = PhenotypeGroupValueObject; - -ExperimentalEvidenceValueObject.prototype = new EvidenceValueObject(); -ExperimentalEvidenceValueObject.prototype.constructor = ExperimentalEvidenceValueObject; - -LiteratureEvidenceValueObject.prototype = new EvidenceValueObject(); -LiteratureEvidenceValueObject.prototype.constructor = LiteratureEvidenceValueObject; diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/.sorting b/gemma-web/src/main/webapp/scripts/api/visualization/.sorting deleted file mode 100755 index 726ea2295f..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/visualization/.sorting +++ /dev/null @@ -1,2 +0,0 @@ -Heatmap.js -VisualizationWidget.js diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/EEDetailsVisualizationWidget.js b/gemma-web/src/main/webapp/scripts/api/visualization/EEDetailsVisualizationWidget.js index f149904a04..2c130f981e 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/EEDetailsVisualizationWidget.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/EEDetailsVisualizationWidget.js @@ -76,7 +76,7 @@ Gemma.EEDetailsVisualizationWidget = Ext.extend( Gemma.GeneGrid, { scope : this, cls : 'x-toolbar-standardbutton' } ), new Ext.Button( { - icon : ctxBasePath + '/images/icons/information.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/information.png', // text : 'help', tootltip : "Get help", handler : function() { @@ -124,11 +124,11 @@ Gemma.EEDetailsVisualizationWidget = Ext.extend( Gemma.GeneGrid, { var downloadLink = ''; if ( geneList.length > 0 ) { title = "Data for selected genes"; - downloadLink = String.format( ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&g={1}", eeId, geneList.join( ',' ) ); + downloadLink = String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&g={1}", eeId, geneList.join( ',' ) ); } else { geneList = []; title = "Data for a 'random' sampling of probes"; - downloadLink = String.format( ctxBasePath + "/dedv/downloadDEDV.html?ee={0}", eeId ); + downloadLink = String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}", eeId ); } this.visWindow = new Gemma.VisualizationWithThumbsWindow( { title : title, @@ -246,7 +246,7 @@ Gemma.VisualizationWidgetGeneSelectionToolbar = Ext.extend( Ext.Toolbar, { // this.refreshButton = { // xtype : "button", // text: "Refresh", - // icon: ctxBasePath + '/images/icons/arrow_refresh_small.png', + // icon: Gemma.CONTEXT_PATH + '/images/icons/arrow_refresh_small.png', // tooltip: "Refresh the caches for this experiment", // handler:function(){ // if(this.eeId && this.eeId > 0){ @@ -417,11 +417,11 @@ Gemma.VisualizationWidgetGeneSelectionToolbar = Ext.extend( Ext.Toolbar, { var downloadLink = ''; if ( geneList.length > 0 ) { title = "Data for selected genes"; - downloadLink = String.format( ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&g={1}", eeId, geneList.join( ',' ) ); + downloadLink = String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&g={1}", eeId, geneList.join( ',' ) ); } else { geneList = []; title = "Data for a 'random' sampling of probes"; - downloadLink = String.format( ctxBasePath + "/dedv/downloadDEDV.html?ee={0}", eeId ); + downloadLink = String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}", eeId ); this.editBtn.disable(); } Ext.apply( this.visPanel, { diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/Heatmap.js b/gemma-web/src/main/webapp/scripts/api/visualization/Heatmap.js index 849ba64445..efe6249a28 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/Heatmap.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/Heatmap.js @@ -19,7 +19,7 @@ * @author Kelsey */ -var Heatmap = function() { +Gemma.Heatmap = function() { // row labels var MAX_LABEL_LENGTH_PIXELS = 400; diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/LinePlot.js b/gemma-web/src/main/webapp/scripts/api/visualization/LinePlot.js index 03d6c0454e..7affac610d 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/LinePlot.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/LinePlot.js @@ -20,7 +20,7 @@ * * @author Paul */ -var LinePlot = (function() { +Gemma.LinePlot = (function() { var MAX_SAMPLE_LABEL_HEIGHT_PIXELS = 120; var TRIM = 5; diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/VisualizationWidget.js b/gemma-web/src/main/webapp/scripts/api/visualization/VisualizationWidget.js index 2f5d107560..e6b1edde14 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/VisualizationWidget.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/VisualizationWidget.js @@ -149,7 +149,7 @@ Gemma.prepareProfiles = function( data, showPValues ) { } } } else { - orderedGeneLinksArr.push( "Unmapped" ); orderedGeneNamesArr.push( "" ); } @@ -265,7 +265,7 @@ Gemma.ProfileTemplate = Ext.extend( Ext.XTemplate, { /* * Note: passing in 'newDiv' works in FF but not in IE. (flotr, anyway) */ - LinePlot.draw( Ext.get( shortName + "_vis" + randomnumber ), record.profiles, this.graphConfig, null, + Gemma.LinePlot.draw( Ext.get( shortName + "_vis" + randomnumber ), record.profiles, this.graphConfig, null, record.factorValuesToNames ); // no // sample // names @@ -302,7 +302,7 @@ Gemma.HeatmapTemplate = Ext.extend( Ext.XTemplate, { /* * Note: 'newDiv' works in FF but not in IE. */ - Heatmap.draw( Ext.get( shortName + "_vis_" + randomnumber ), record.profiles, this.graphConfig, null, + Gemma.Heatmap.draw( Ext.get( shortName + "_vis_" + randomnumber ), record.profiles, this.graphConfig, null, record.factorValuesToNames, null ); // no // sample // names @@ -427,7 +427,7 @@ Gemma.VisualizationZoomPanel = Ext var eeInfoTitle = ""; eeInfoTitle = "" + eevo.shortName @@ -488,7 +488,7 @@ Gemma.VisualizationZoomPanel = Ext if ( doHeatmap ) { graphConfig.legend.container = this.legendDiv ? this.legendDiv : this.body.id; profiles.sort( Gemma.sortByImportance ); - Heatmap.draw( Ext.get( this.body.id ), profiles, graphConfig, sampleNames, conditionLabels, + Gemma.Heatmap.draw( Ext.get( this.body.id ), profiles, graphConfig, sampleNames, conditionLabels, conditionLabelKey ); } else { profiles.sort( Gemma.sortByImportance ); @@ -498,7 +498,7 @@ Gemma.VisualizationZoomPanel = Ext Ext.DomHelper.overwrite( this.legendDiv, '' ); } - LinePlot.draw( Ext.get( this.body.id ), profiles, graphConfig, sampleNames, conditionLabels, + Gemma.LinePlot.draw( Ext.get( this.body.id ), profiles, graphConfig, sampleNames, conditionLabels, conditionLabelKey ); // make the line chart legend clickable. Selector is based on @@ -997,7 +997,7 @@ Gemma.VisualizationWithThumbsPanel = Ext.extend( Ext.Panel, { xtype : 'button', ref : 'downloadDataBtn', // border : true, - icon : ctxBasePath + '/images/download.gif', + icon : Gemma.CONTEXT_PATH + '/images/download.gif', // iconCls : 'fa fa-download fa-lg', // uses extension. // glyph : 'xf0192FontAwesome', // ext 4 cls : 'x-btn-text-icon', diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/.sorting b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/.sorting deleted file mode 100755 index 63372c8b33..0000000000 --- a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/.sorting +++ /dev/null @@ -1,3 +0,0 @@ -CytoscapeSettings.js -CytoscapePanelUtil.js -CytoscapePanel.js \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeControlBar.js b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeControlBar.js index 1c58da2e1e..349bae930e 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeControlBar.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeControlBar.js @@ -133,7 +133,7 @@ Gemma.CytoscapeControlBar = Ext xtype : 'label', html : '  ', + + '" src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/>', height : 15 }, ' ', @@ -237,7 +237,7 @@ Gemma.CytoscapeControlBar = Ext xtype : 'label', html : '   ', + + '" src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/> ', height : 15 } ] } ); diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSDisplay.js b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSDisplay.js index 10803ae222..a1c277d8df 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSDisplay.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSDisplay.js @@ -110,7 +110,7 @@ Gemma.CytoscapeJSDisplay = Ext.extend( Ext.BoxComponent, { this.applyDefaultGraphStyle(); this.applyGeneListOverlay(); } catch (err) { - Gemma.genericErrorHandler( err ); + Gemma.Error.genericErrorHandler( err ); } }, diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSPanel.js b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSPanel.js index 74e4ce3ece..1f8a6074ec 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/CytoscapeJSPanel.js @@ -119,14 +119,14 @@ Gemma.CytoscapeJSPanel = Ext.extend( Ext.Panel, { xtype : 'label', id : 'tooltipMenuNotEnabled', html : '   ', + + '" src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/> ', height : 15 }, { xtype : 'label', id : 'tooltipMenuEnabled', html : '   ', + + '" src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/> ', height : 15 } ] diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/GeneSetOverlayPicker.js b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/GeneSetOverlayPicker.js index 3b3ec38958..c2794f075c 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/GeneSetOverlayPicker.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/GeneSetOverlayPicker.js @@ -122,7 +122,7 @@ Gemma.GeneSetOverlayPicker = Ext.extend( Ext.Window, { // change previous button to 'remove' if ( typeof this.geneChooser !== 'undefined' ) { // Ext.getCmp( 'geneOverlayChooser' + (this.geneChooserIndex - 1) + 'Button' ).show().setIcon( - // ctxBasePath + '/images/icons/delete.png' ).setTooltip( 'Remove this gene or group from your search' ).setHandler( + // Gemma.CONTEXT_PATH + '/images/icons/delete.png' ).setTooltip( 'Remove this gene or group from your search' ).setHandler( // this.reset.createDelegate( this ) ); } this.geneChooser.doLayout(); diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/index.js b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/index.js new file mode 100644 index 0000000000..1e2d0b8194 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/visualization/cytoscape/index.js @@ -0,0 +1,10 @@ +import './CoexGraphData' +import './CoexpressionJSONUtils' +import './CytoscapeControlBar' +import './CytoscapeDownloadPanel' +import './CytoscapeJSCoexGraphInitializer' +import './CytoscapeJSDisplay' +import './CytoscapeJSPanel' +import './CytoscapePanelUtil' +import './CytoscapeSettings' +import './GeneSetOverlayPicker' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/index.js b/gemma-web/src/main/webapp/scripts/api/visualization/index.js new file mode 100644 index 0000000000..fee27dc52a --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/visualization/index.js @@ -0,0 +1,6 @@ +import './EEDetailsVisualizationWidget' +import './Heatmap' +import './LinePlot' +import './VisualizationWidget' +import './cytoscape' +import './metaheatmap' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapApplication.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapApplication.js index 537f83dc88..8d71bf46d9 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapApplication.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapApplication.js @@ -236,7 +236,7 @@ Gemma.Metaheatmap.Application = Ext xtype : 'button', ref : 'saveSelectedButton', text : 'Save Selected', - icon : ctxBasePath + '/images/icons/disk.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/disk.png', cls : 'x-btn-text-icon', tooltip : 'Select genes or experiments by holding down the "Ctrl" key and clicking on row or column labels.', scope : this, @@ -315,11 +315,11 @@ Gemma.Metaheatmap.Application = Ext xtype : 'button', text : 'Download', ref : 'downloadButton', - icon : ctxBasePath + '/images/download.gif', + icon : Gemma.CONTEXT_PATH + '/images/download.gif', menu : new Ext.menu.Menu( { items : [ { text : 'As text', - icon : ctxBasePath + '/images/icons/page_white_text.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/page_white_text.png', tooltip : 'Download a formatted text version of your search results', handler : function() { var textWindow = new Gemma.Metaheatmap.DownloadWindow( { @@ -334,7 +334,7 @@ Gemma.Metaheatmap.Application = Ext scope : this }, { text : 'As image', - icon : ctxBasePath + '/images/icons/picture.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/picture.png', tooltip : 'Download heatmap image', handler : function() { this.visualizationPanel.downloadImage(); @@ -346,7 +346,7 @@ Gemma.Metaheatmap.Application = Ext '-', { xtype : 'button', - icon : ctxBasePath + '/images/icons/question_blue.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/question_blue.png', cls : 'x-btn-icon', tooltip : 'Click here for documentation on how to use this visualizer.', handler : function() { diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapControlPanel.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapControlPanel.js index 43dc4b8fa7..8212062c4f 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapControlPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapControlPanel.js @@ -128,7 +128,7 @@ Gemma.Metaheatmap.ControlPanel = Ext // '+ // 'Allows you to hide a gene based on how many conditions it\'s missing // data for" - // src=ctxBasePath + "/images/icons/question_blue.png"/>:', + // src=Gemma.CONTEXT_PATH + "/images/icons/question_blue.png"/>:', html : 'Missing data filter:', height : 15 }, @@ -246,7 +246,7 @@ Gemma.Metaheatmap.ControlPanel = Ext // '+ // 'Allows you to hide a condition based on how many genes it\'s missing // data for" - // src=ctxBasePath + "/images/icons/question_blue.png"/>:', + // src=Gemma.CONTEXT_PATH + "/images/icons/question_blue.png"/>:', height : 15 }, { @@ -284,7 +284,7 @@ Gemma.Metaheatmap.ControlPanel = Ext html : 'Specificity filter :', + + 'number of probes expressed. " src="' + Gemma.CONTEXT_PATH + '/images/icons/question_blue.png"/>:', // text : 'Specificity filter', height : 15 }, diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapDetailsPopups.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapDetailsPopups.js index 83677f6d04..9ed0cbccf0 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapDetailsPopups.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapDetailsPopups.js @@ -16,13 +16,13 @@ Gemma.MetaVisualizationPopups.makeGeneInfoWindow = function( geneName, geneId ) closeAction : 'hide', bodyStyle : 'padding: 7px; font-size: 12px; line-height: 18px; ', title : "Details for gene: " + geneName, - html : '

    ' + html : '

    ' + gene.officialSymbol + ' ' + gene.officialName + '

    ' + 'Taxon: ' + gene.taxonCommonName + '
    ' + 'Aliases: ' + gene.aliases + ' ' + 'NCBI Gene Link ' + '
    ' + + gene.ncbiId + '">' + 'NCBI Gene Link ' + '
    ' + 'Description: ' + gene.description + '
    ' - + '
    More about this gene' + + '
    More about this gene' } ); } popup.show(); @@ -48,9 +48,9 @@ Gemma.MetaVisualizationPopups.makeDatasetInfoWindow = function( datasetName, dat frame : true, // gives blue background tpl : new Ext.XTemplate( '

    ', - '{datasetShortName}: {datasetName}


    Description: {description}

    ', - 'More about this experiment' ), tplWriteMode : 'overwrite' } ); diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapFilter.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapFilter.js index a37b83b232..c1cf96e7f2 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapFilter.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapFilter.js @@ -1,6 +1,6 @@ Ext.namespace( 'Gemma' ); -function GemmaMetaheatmapFilter() { +Gemma.MetaheatmapFilter = function() { this._filterId = 1; // used to generate filter ids (private) this._length = 0; // number of filters (private) this._order = []; // array of filter ids storing the order the filters should be applied in (private) diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapVisualizationPanel.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapVisualizationPanel.js index b912f894de..44a7c65e78 100755 --- a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapVisualizationPanel.js +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/MetaheatmapVisualizationPanel.js @@ -825,7 +825,7 @@ Gemma.Metaheatmap.VisualizationPanel = Ext title : 'Gene Expression', thumbnails : false, closableAction : 'hide', - downloadLink : String.format( ctxBasePath + "/dedv/downloadDEDV.html?ee={0}&g={1}", + downloadLink : String.format( Gemma.CONTEXT_PATH + "/dedv/downloadDEDV.html?ee={0}&g={1}", cell.condition.datasetId, cell.gene.id ) } ); expressionDetailsWindow.show( { diff --git a/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/index.js b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/index.js new file mode 100644 index 0000000000..ac536b44f0 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/api/visualization/metaheatmap/index.js @@ -0,0 +1,15 @@ +import './GemmaStatUtils' +import './MetaheatmapApplication' +import './MetaheatmapColorLegend' +import './MetaheatmapConfiguration' +import './MetaheatmapControlPanel' +import './MetaheatmapDetailsPopups' +import './MetaheatmapDownload' +import './MetaheatmapFactorTree' +import './MetaheatmapFilter' +import './MetaheatmapHoverWindow' +import './MetaheatmapLabelPanel' +import './MetaheatmapMainArea' +import './MetaheatmapSortFilter' +import './MetaheatmapUtils' +import './MetaheatmapVisualizationPanel' \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/app/CharacteristicBrowser.js b/gemma-web/src/main/webapp/scripts/app/CharacteristicBrowser.js index 3f4a977c09..83e132a903 100644 --- a/gemma-web/src/main/webapp/scripts/app/CharacteristicBrowser.js +++ b/gemma-web/src/main/webapp/scripts/app/CharacteristicBrowser.js @@ -1,4 +1,4 @@ -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Ext.namespace( 'Gemma.CharacteristicBrowser' ); Ext.onReady( function() { Ext.QuickTips.init(); @@ -25,7 +25,7 @@ Ext.onReady( function() { Gemma.CharacteristicBrowser.handleError = function( msg, e ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', diff --git a/gemma-web/src/main/webapp/scripts/app/ExperimentalDesign.js b/gemma-web/src/main/webapp/scripts/app/ExperimentalDesign.js index 3988c5c7b6..c20d38a328 100644 --- a/gemma-web/src/main/webapp/scripts/app/ExperimentalDesign.js +++ b/gemma-web/src/main/webapp/scripts/app/ExperimentalDesign.js @@ -2,7 +2,7 @@ * Experimental design editor application. */ -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; var serverFilePath = ""; diff --git a/gemma-web/src/main/webapp/scripts/app/HomePageAnalysisSearch.js b/gemma-web/src/main/webapp/scripts/app/HomePageAnalysisSearch.js index 666ded8c73..b1cb596af3 100755 --- a/gemma-web/src/main/webapp/scripts/app/HomePageAnalysisSearch.js +++ b/gemma-web/src/main/webapp/scripts/app/HomePageAnalysisSearch.js @@ -4,7 +4,7 @@ */ Ext.namespace( 'Gemma' ); Gemma.SEARCH_FORM_WIDTH = 900; -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Ext .onReady( function() { diff --git a/gemma-web/src/main/webapp/scripts/app/UserExpressionDataUpload.js b/gemma-web/src/main/webapp/scripts/app/UserExpressionDataUpload.js index 631e5863fd..92a5e2c422 100644 --- a/gemma-web/src/main/webapp/scripts/app/UserExpressionDataUpload.js +++ b/gemma-web/src/main/webapp/scripts/app/UserExpressionDataUpload.js @@ -1,6 +1,6 @@ Ext.namespace( 'Gemma' ); Ext.form.Field.prototype.msgTarget = 'side'; -Ext.BLANK_IMAGE_URL = ctxBasePath + "/images/s.gif"; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + "/images/s.gif"; // Ext.Require( 'Ext.util.Observable', 'ExpressionDataFileUploadController' ); // Ext 3 doesn't support. Gemma.DatasetUploadTool = Ext @@ -95,7 +95,7 @@ Gemma.DatasetUploadTool = Ext handler : function( button ) { w.hide(); w.destroy(); - window.location = ctxBasePath + "/expressionExperiment/showExpressionExperiment.html?id=" + window.location = Gemma.CONTEXT_PATH + "/expressionExperiment/showExpressionExperiment.html?id=" + payload.taskId; } @@ -409,7 +409,7 @@ Ext { xtype : 'label', html : "Don't see your platform listed? Please see " - + "the platform list" + + "the platform list" + " for more information, " + "or let us know about your platform." } ] @@ -449,7 +449,7 @@ Ext enabled : false, handler : tool.agree, scope : tool, - fieldLabel : "I have read the 'terms and conditions'" + fieldLabel : "I have read the 'terms and conditions'" } ] } ] @@ -492,7 +492,7 @@ Ext Ext.DomHelper .overwrite( 'array-design-info-inner-html', - "
    " + arrayDesign.data.shortName diff --git a/gemma-web/src/main/webapp/scripts/app/bioassay.draganddrop.js b/gemma-web/src/main/webapp/scripts/app/bioassay.draganddrop.js index e5f6826d3c..734a900614 100644 --- a/gemma-web/src/main/webapp/scripts/app/bioassay.draganddrop.js +++ b/gemma-web/src/main/webapp/scripts/app/bioassay.draganddrop.js @@ -3,7 +3,7 @@ */ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Ext.onReady( function() { Ext.QuickTips.init(); diff --git a/gemma-web/src/main/webapp/scripts/app/editUser.js b/gemma-web/src/main/webapp/scripts/app/editUser.js index 995200f9e4..b6ccac753e 100644 --- a/gemma-web/src/main/webapp/scripts/app/editUser.js +++ b/gemma-web/src/main/webapp/scripts/app/editUser.js @@ -1,5 +1,5 @@ Ext.namespace('Gemma'); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @author keshav diff --git a/gemma-web/src/main/webapp/scripts/app/eeDataFetch.js b/gemma-web/src/main/webapp/scripts/app/eeDataFetch.js index 06d0bd9616..d992fca880 100644 --- a/gemma-web/src/main/webapp/scripts/app/eeDataFetch.js +++ b/gemma-web/src/main/webapp/scripts/app/eeDataFetch.js @@ -2,7 +2,7 @@ function handleFailure( data, e ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', @@ -17,7 +17,8 @@ function handleDoneGeneratingFile( url ) { window.location = url; } -function fetchData( filter, eeId, formatType, qtId, eeDId ) { +Gemma.ExpressionExperimentDataFetch = {} +Gemma.ExpressionExperimentDataFetch.fetchData = function( filter, eeId, formatType, qtId, eeDId ) { // Get the parameters from the form. var commandObj = { @@ -30,7 +31,7 @@ function fetchData( filter, eeId, formatType, qtId, eeDId ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); Ext.DomHelper.append( "messages", " Fetching ..." ); @@ -53,11 +54,11 @@ function fetchData( filter, eeId, formatType, qtId, eeDId ) { } ); } -function fetchCoExpressionData( eeId ) { +Gemma.ExpressionExperimentDataFetch.fetchCoExpressionData = function( eeId ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); Ext.DomHelper.append( "messages", " Fetching ..." ); @@ -80,11 +81,11 @@ function fetchCoExpressionData( eeId ) { } ); } -function fetchDiffExpressionData( analysisId ) { +Gemma.ExpressionExperimentDataFetch.fetchDiffExpressionData = function( analysisId ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); Ext.DomHelper.append( "messages", " Fetching ..." ); diff --git a/gemma-web/src/main/webapp/scripts/app/geoBrowse.js b/gemma-web/src/main/webapp/scripts/app/geoBrowse.js index ef7e7a72a6..f119861b14 100644 --- a/gemma-web/src/main/webapp/scripts/app/geoBrowse.js +++ b/gemma-web/src/main/webapp/scripts/app/geoBrowse.js @@ -281,7 +281,7 @@ Gemma.GeoBrowseGrid = Ext var r = ""; for (var i = 0; i < record.get('correspondingExperiments').length; i++) { var ee = record.get('correspondingExperiments')[i]; - r = r + "" + r = r + "" + record.get('geoAccession') + ""; } @@ -301,20 +301,20 @@ Gemma.GeoBrowseGrid = Ext usableRenderer: function (value, metadata, record, row, col, ds) { if (record.get('correspondingExperiments').length > 0) { - return "Already loaded"; + return "Already loaded"; } if (record.get('usable')) { return "Usable, click to toggle"; + + "')\">Usable, click to toggle"; } else { return "Judged unusable, click to toggle"; + + "')\" >Judged unusable, click to toggle"; } }, @@ -333,7 +333,7 @@ Gemma.GeoBrowseGrid = Ext GeoRecordBrowserController.getDetails.apply(this, callParams); Ext.DomHelper.overwrite("messages", { tag: 'img', - src: ctxBasePath + '/images/default/tree/loading.gif' + src: Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' }); Ext.DomHelper.append("messages", { tag: 'span', @@ -356,12 +356,12 @@ function handleUsabilitySuccess(data, accession) { if (data) { Ext.DomHelper.overwrite(accession + "-rating", { tag: 'img', - src: ctxBasePath + '/images/icons/thumbsup.png' + src: Gemma.CONTEXT_PATH + '/images/icons/thumbsup.png' }); } else { Ext.DomHelper.overwrite(accession + "-rating", { tag: 'img', - src: ctxBasePath + '/images/icons/thumbsdown-red.png' + src: Gemma.CONTEXT_PATH + '/images/icons/thumbsdown-red.png' }); } @@ -371,7 +371,7 @@ function handleFailure(data, e) { Ext.DomHelper.overwrite("taskId", ""); Ext.DomHelper.overwrite("messages", { tag: 'img', - src: ctxBasePath + '/images/icons/warning.png' + src: Gemma.CONTEXT_PATH + '/images/icons/warning.png' }); Ext.DomHelper.append("messages", { tag: 'span', @@ -379,7 +379,8 @@ function handleFailure(data, e) { }); } -function toggleUsability(accession) { +Gemma.GeoBrowse = {}; +Gemma.GeoBrowse.toggleUsability = function(accession) { var callParams = []; callParams.push(accession); @@ -394,7 +395,7 @@ function toggleUsability(accession) { GeoRecordBrowserController.toggleUsability.apply(this, callParams); Ext.DomHelper.overwrite(accession + "-rating", { tag: 'img', - src: ctxBasePath + '/images/default/tree/loading.gif' + src: Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' }); } @@ -417,7 +418,7 @@ function load(accession) { Ext.DomHelper.overwrite("messages", { tag: 'img', - src: ctxBasePath + '/images/default/tree/loading.gif' + src: Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' }); Ext.DomHelper.append("messages", " Submitting job..."); @@ -488,7 +489,7 @@ Gemma.GeoBrowseToolbar = Ext.extend(Ext.Toolbar, { }, { id: 'show-as-text', xtype: 'button', - icon: ctxBasePath + '/images/icons/disk.png', + icon: Gemma.CONTEXT_PATH + '/images/icons/disk.png', handler: function () { this.fireEvent('showText'); }.createDelegate(this) diff --git a/gemma-web/src/main/webapp/scripts/app/indexer.js b/gemma-web/src/main/webapp/scripts/app/indexer.js index 964ace658c..f5c13a2c2b 100644 --- a/gemma-web/src/main/webapp/scripts/app/indexer.js +++ b/gemma-web/src/main/webapp/scripts/app/indexer.js @@ -21,7 +21,7 @@ function handleFailure( data, e ) { Ext.DomHelper.overwrite( "taskId", "" ); Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', @@ -74,7 +74,7 @@ function index( event ) { // this should return quickly, with the task id. Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); Ext.DomHelper.append( "messages", " Submitting job..." ); IndexService.index.apply( this, callParams ); diff --git a/gemma-web/src/main/webapp/scripts/app/jobmonitoring.js b/gemma-web/src/main/webapp/scripts/app/jobmonitoring.js index f11191980a..c408a86217 100644 --- a/gemma-web/src/main/webapp/scripts/app/jobmonitoring.js +++ b/gemma-web/src/main/webapp/scripts/app/jobmonitoring.js @@ -86,11 +86,11 @@ Ext.onReady( function() { var emailAlert = record.get( "emailAlert" ); if ( !completed ) { actions += ''; + + value + '\')">'; } if ( !emailAlert && !completed ) { actions += ''; + + value + '\')">'; } return actions; diff --git a/gemma-web/src/main/webapp/scripts/app/loadExpressionExperiment.js b/gemma-web/src/main/webapp/scripts/app/loadExpressionExperiment.js index caca9d0489..cadef66fa7 100644 --- a/gemma-web/src/main/webapp/scripts/app/loadExpressionExperiment.js +++ b/gemma-web/src/main/webapp/scripts/app/loadExpressionExperiment.js @@ -57,7 +57,7 @@ function submitForm() { // this should return quickly, with the task id. Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/loading.gif' } ); Ext.DomHelper.append( "messages", " Submitting job..." ); @@ -89,7 +89,7 @@ function submitForm() { function handleFailure( data ) { Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', diff --git a/gemma-web/src/main/webapp/scripts/app/manageGroups.js b/gemma-web/src/main/webapp/scripts/app/manageGroups.js index 55272364af..e624eed134 100644 --- a/gemma-web/src/main/webapp/scripts/app/manageGroups.js +++ b/gemma-web/src/main/webapp/scripts/app/manageGroups.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @author keshav @@ -132,7 +132,7 @@ Ext tbar : { items : [ { - icon : ctxBasePath + "/images/icons/group_add.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/group_add.png", tooltip : "Add a group", handler : function() { @@ -173,7 +173,7 @@ Ext } }, { - icon : ctxBasePath + "/images/icons/group_delete.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/group_delete.png", tooltip : "Delete a group", // disabled : true, // hidden : true, @@ -308,7 +308,7 @@ Ext disabled : true, items : [ { - icon : ctxBasePath + "/images/icons/user_add.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/user_add.png", tooltip : "Invite new member", handler : function() { @@ -330,7 +330,7 @@ Ext } }, { tooltip : "Save changes", - icon : ctxBasePath + "/images/icons/database_save.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_save.png", id : 'manager-group-members-panel-save-btn', handler : function( b, e ) { /* @@ -369,7 +369,7 @@ Ext } }, { tooltip : "Refresh from the database", - icon : ctxBasePath + "/images/icons/arrow_refresh_small.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_refresh_small.png", handler : function() { refreshGroupMembers( currentGroup ); } @@ -435,7 +435,7 @@ Ext disabled : true, items : [ { tooltip : "Save changes", - icon : ctxBasePath + "/images/icons/database_save.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_save.png", id : 'manager-data-panel-save-btn', handler : function( b, e ) { /* @@ -484,7 +484,7 @@ Ext } }, { tooltip : "Refresh from the database", - icon : ctxBasePath + "/images/icons/arrow_refresh_small.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/arrow_refresh_small.png", handler : function() { refreshData( currentGroup ); } diff --git a/gemma-web/src/main/webapp/scripts/app/ontologyReIndexer.js b/gemma-web/src/main/webapp/scripts/app/ontologyReIndexer.js index 5c8ac652f0..eed7e3c21c 100755 --- a/gemma-web/src/main/webapp/scripts/app/ontologyReIndexer.js +++ b/gemma-web/src/main/webapp/scripts/app/ontologyReIndexer.js @@ -2,7 +2,7 @@ function handleFailure( data, e ) { Ext.DomHelper.overwrite( "taskId", "" ); Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/icons/warning.png' + src : Gemma.CONTEXT_PATH + '/images/icons/warning.png' } ); Ext.DomHelper.append( "messages", { tag : 'span', @@ -41,7 +41,7 @@ function reinitializeOntologyIndices( event ) { // this should return quickly, with the task id. Ext.DomHelper.overwrite( "messages", { tag : 'img', - src : ctxBasePath + '/images/default/tree/loading.gif' + src : Gemma.CONTEXT_PATH + '/images/default/tree/loading.gif' } ); Ext.DomHelper.append( "messages", " Submitting job..." ); AnnotationController.reinitializeOntologyIndices.apply( this, callParams ); diff --git a/gemma-web/src/main/webapp/scripts/app/resetPassword.js b/gemma-web/src/main/webapp/scripts/app/resetPassword.js index 2fced23506..c9f684b4f8 100644 --- a/gemma-web/src/main/webapp/scripts/app/resetPassword.js +++ b/gemma-web/src/main/webapp/scripts/app/resetPassword.js @@ -1,5 +1,5 @@ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @author keshav diff --git a/gemma-web/src/main/webapp/scripts/app/signup.js b/gemma-web/src/main/webapp/scripts/app/signup.js index 2b7e643855..96bc63d243 100644 --- a/gemma-web/src/main/webapp/scripts/app/signup.js +++ b/gemma-web/src/main/webapp/scripts/app/signup.js @@ -1,5 +1,5 @@ Ext.namespace('Gemma'); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; /** * @author keshav diff --git a/gemma-web/src/main/webapp/scripts/app/test/datasetchooserapp.js b/gemma-web/src/main/webapp/scripts/app/test/datasetchooserapp.js index c44a0fbb8f..57175350c7 100644 --- a/gemma-web/src/main/webapp/scripts/app/test/datasetchooserapp.js +++ b/gemma-web/src/main/webapp/scripts/app/test/datasetchooserapp.js @@ -1,4 +1,4 @@ -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Ext.namespace('Gemma.DatasetChooser'); diff --git a/gemma-web/src/main/webapp/scripts/app/userManager.js b/gemma-web/src/main/webapp/scripts/app/userManager.js index 5fed13ce5b..bd731cc8b1 100644 --- a/gemma-web/src/main/webapp/scripts/app/userManager.js +++ b/gemma-web/src/main/webapp/scripts/app/userManager.js @@ -5,7 +5,7 @@ * */ Ext.namespace( 'Gemma' ); -Ext.BLANK_IMAGE_URL = ctxBasePath + '/images/default/s.gif'; +Ext.BLANK_IMAGE_URL = Gemma.CONTEXT_PATH + '/images/default/s.gif'; Gemma.USER_PAGE_SIZE = 10; @@ -108,7 +108,7 @@ Ext.onReady( function() { text : 'Add', tooltip : 'Add a new user', disabled : true, - icon : ctxBasePath + '/images/icons/add.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/add.png', cls : 'x-btn-text-icon', handler : function() { userGrid.getStore().insert( 0, new record( { @@ -125,7 +125,7 @@ Ext.onReady( function() { text : 'Remove', disabled : true, tooltip : 'Remove selected user', - icon : ctxBasePath + '/images/icons/delete.png', + icon : Gemma.CONTEXT_PATH + '/images/icons/delete.png', cls : 'x-btn-text-icon', handler : function() { var sm = userGrid.getSelectionModel(); @@ -148,7 +148,7 @@ Ext.onReady( function() { { text : 'Save', tooltip : 'Save the selected user', - icon : ctxBasePath + "/images/icons/database_save.png", + icon : Gemma.CONTEXT_PATH + "/images/icons/database_save.png", cls : 'x-btn-text-icon', handler : function() { var sm = userGrid.getSelectionModel(); diff --git a/gemma-web/src/main/webapp/scripts/lib/.sorting b/gemma-web/src/main/webapp/scripts/lib/.sorting deleted file mode 100644 index 38b3bdddd6..0000000000 --- a/gemma-web/src/main/webapp/scripts/lib/.sorting +++ /dev/null @@ -1,12 +0,0 @@ -jquery-2.1.1.js -ext/ -globals.js -excanvas.js -typeface.js -excanvas-text.js -faces/ -jquery.qtip.js -jquery-ui-1.10.4.custom.js -jquery.sparkline.js -jquery.jshowoff.js -cytoscapejs/ diff --git a/gemma-web/src/main/webapp/scripts/scriptsnonjawr/arbor.js b/gemma-web/src/main/webapp/scripts/lib/arbor.js similarity index 99% rename from gemma-web/src/main/webapp/scripts/scriptsnonjawr/arbor.js rename to gemma-web/src/main/webapp/scripts/lib/arbor.js index 9c180fcbf2..d288601463 100644 --- a/gemma-web/src/main/webapp/scripts/scriptsnonjawr/arbor.js +++ b/gemma-web/src/main/webapp/scripts/lib/arbor.js @@ -64,4 +64,4 @@ } }) -})(this.jQuery) \ No newline at end of file +})(jQuery) \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/lib/color.js b/gemma-web/src/main/webapp/scripts/lib/color.js index 9f1c6fb48a..b2f65519a2 100644 --- a/gemma-web/src/main/webapp/scripts/lib/color.js +++ b/gemma-web/src/main/webapp/scripts/lib/color.js @@ -35,7 +35,7 @@ // create namespaces /*global net */ if ( "undefined" == typeof net ) { - var net = {}; + net = {}; } if ( !net.brehaut ) { net.brehaut = {}; diff --git a/gemma-web/src/main/webapp/scripts/lib/discrete-color-range.js b/gemma-web/src/main/webapp/scripts/lib/discrete-color-range.js index 7010a141f4..054f0485e7 100644 --- a/gemma-web/src/main/webapp/scripts/lib/discrete-color-range.js +++ b/gemma-web/src/main/webapp/scripts/lib/discrete-color-range.js @@ -18,8 +18,8 @@ */ // setup namespace if not already defined -if ( !org ) - var org = {}; +if ( typeof org === 'undefined' ) + org = {}; if ( !org.systemsbiology ) org.systemsbiology = {}; if ( !org.systemsbiology.visualization ) diff --git a/gemma-web/src/main/webapp/scripts/lib/ext/.sorting b/gemma-web/src/main/webapp/scripts/lib/ext/.sorting deleted file mode 100644 index e6d2081743..0000000000 --- a/gemma-web/src/main/webapp/scripts/lib/ext/.sorting +++ /dev/null @@ -1,3 +0,0 @@ -adapter/ -ext-all-debug.js -extensions/ diff --git a/gemma-web/src/main/webapp/scripts/lib/ext/index.js b/gemma-web/src/main/webapp/scripts/lib/ext/index.js new file mode 100644 index 0000000000..833a6f7047 --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/lib/ext/index.js @@ -0,0 +1,25 @@ +import './adapter/jquery/ext-jquery-adapter-debug' +import './ext-all-debug' +import './extensions/BrowseButton' +import './extensions/CellToolTips' +import './extensions/CenterLayout' +import './extensions/CheckColumn' +import './extensions/ContainerMask' +import './extensions/Ext.ux.tot2ivn.AccordionVboxLayout' +import './extensions/extjs_fontawesome' +import './extensions/FileUploadField' +import './extensions/InitialTextGridView' +import './extensions/LockingGridView' +import './extensions/Overrides' +import './extensions/PageSizePlugin' +import './extensions/PagingDataStore' +import './extensions/RadioFieldSet' +import './extensions/RowActions' +import './extensions/RowExpander' +import './extensions/SearchField' +import './extensions/Spinner' +import './extensions/SpinnerField' +import './extensions/StatusBar' +import './extensions/TreeGrid' + +export default Ext; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/lib/flotr2.js b/gemma-web/src/main/webapp/scripts/lib/flotr2.js deleted file mode 100644 index dbde18db58..0000000000 --- a/gemma-web/src/main/webapp/scripts/lib/flotr2.js +++ /dev/null @@ -1,7254 +0,0 @@ -/*! - * bean.js - copyright Jacob Thornton 2011 - * https://github.com/fat/bean - * MIT License - * special thanks to: - * dean edwards: http://dean.edwards.name/ - * dperini: https://github.com/dperini/nwevents - * the entire mootools team: github.com/mootools/mootools-core - */ -/*global module:true, define:true*/ -!function (name, context, definition) { - if (typeof module !== 'undefined') module.exports = definition(name, context); - else if (typeof define === 'function' && typeof define.amd === 'object') define(definition); - else context[name] = definition(name, context); -}('bean', this, function (name, context) { - var win = window - , old = context[name] - , overOut = /over|out/ - , namespaceRegex = /[^\.]*(?=\..*)\.|.*/ - , nameRegex = /\..*/ - , addEvent = 'addEventListener' - , attachEvent = 'attachEvent' - , removeEvent = 'removeEventListener' - , detachEvent = 'detachEvent' - , doc = document || {} - , root = doc.documentElement || {} - , W3C_MODEL = root[addEvent] - , eventSupport = W3C_MODEL ? addEvent : attachEvent - , slice = Array.prototype.slice - , mouseTypeRegex = /click|mouse|menu|drag|drop/i - , touchTypeRegex = /^touch|^gesture/i - , ONE = { one: 1 } // singleton for quick matching making add() do one() - - , nativeEvents = (function (hash, events, i) { - for (i = 0; i < events.length; i++) - hash[events[i]] = 1 - return hash - })({}, ( - 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons - 'mousewheel DOMMouseScroll ' + // mouse wheel - 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement - 'keydown keypress keyup ' + // keyboard - 'orientationchange ' + // mobile - 'focus blur change reset select submit ' + // form elements - 'load unload beforeunload resize move DOMContentLoaded readystatechange ' + // window - 'error abort scroll ' + // misc - (W3C_MODEL ? // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event - // that doesn't actually exist, so make sure we only do these on newer browsers - 'show ' + // mouse buttons - 'input invalid ' + // form elements - 'touchstart touchmove touchend touchcancel ' + // touch - 'gesturestart gesturechange gestureend ' + // gesture - 'message readystatechange pageshow pagehide popstate ' + // window - 'hashchange offline online ' + // window - 'afterprint beforeprint ' + // printing - 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd - 'loadstart progress suspend emptied stalled loadmetadata ' + // media - 'loadeddata canplay canplaythrough playing waiting seeking ' + // media - 'seeked ended durationchange timeupdate play pause ratechange ' + // media - 'volumechange cuechange ' + // media - 'checking noupdate downloading cached updateready obsolete ' + // appcache - '' : '') - ).split(' ') - ) - - , customEvents = (function () { - function isDescendant(parent, node) { - while ((node = node.parentNode) !== null) { - if (node === parent) return true - } - return false - } - - function check(event) { - var related = event.relatedTarget - if (!related) return related === null - return (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString()) && !isDescendant(this, related)) - } - - return { - mouseenter: { base: 'mouseover', condition: check } - , mouseleave: { base: 'mouseout', condition: check } - , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' } - } - })() - - , fixEvent = (function () { - var commonProps = 'altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which'.split(' ') - , mouseProps = commonProps.concat('button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' ')) - , keyProps = commonProps.concat('char charCode key keyCode'.split(' ')) - , touchProps = commonProps.concat('touches targetTouches changedTouches scale rotation'.split(' ')) - , preventDefault = 'preventDefault' - , createPreventDefault = function (event) { - return function () { - if (event[preventDefault]) - event[preventDefault]() - else - event.returnValue = false - } - } - , stopPropagation = 'stopPropagation' - , createStopPropagation = function (event) { - return function () { - if (event[stopPropagation]) - event[stopPropagation]() - else - event.cancelBubble = true - } - } - , createStop = function (synEvent) { - return function () { - synEvent[preventDefault]() - synEvent[stopPropagation]() - synEvent.stopped = true - } - } - , copyProps = function (event, result, props) { - var i, p - for (i = props.length; i--;) { - p = props[i] - if (!(p in result) && p in event) result[p] = event[p] - } - } - - return function (event, isNative) { - var result = { originalEvent: event, isNative: isNative } - if (!event) - return result - - var props - , type = event.type - , target = event.target || event.srcElement - - result[preventDefault] = createPreventDefault(event) - result[stopPropagation] = createStopPropagation(event) - result.stop = createStop(result) - result.target = target && target.nodeType === 3 ? target.parentNode : target - - if (isNative) { // we only need basic augmentation on custom events, the rest is too expensive - if (type.indexOf('key') !== -1) { - props = keyProps - result.keyCode = event.which || event.keyCode - } else if (mouseTypeRegex.test(type)) { - props = mouseProps - result.rightClick = event.which === 3 || event.button === 2 - result.pos = { x: 0, y: 0 } - if (event.pageX || event.pageY) { - result.clientX = event.pageX - result.clientY = event.pageY - } else if (event.clientX || event.clientY) { - result.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft - result.clientY = event.clientY + doc.body.scrollTop + root.scrollTop - } - if (overOut.test(type)) - result.relatedTarget = event.relatedTarget || event[(type === 'mouseover' ? 'from' : 'to') + 'Element'] - } else if (touchTypeRegex.test(type)) { - props = touchProps - } - copyProps(event, result, props || commonProps) - } - return result - } - })() - - // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both - , targetElement = function (element, isNative) { - return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element - } - - // we use one of these per listener, of any type - , RegEntry = (function () { - function entry(element, type, handler, original, namespaces) { - this.element = element - this.type = type - this.handler = handler - this.original = original - this.namespaces = namespaces - this.custom = customEvents[type] - this.isNative = nativeEvents[type] && element[eventSupport] - this.eventType = W3C_MODEL || this.isNative ? type : 'propertychange' - this.customType = !W3C_MODEL && !this.isNative && type - this.target = targetElement(element, this.isNative) - this.eventSupport = this.target[eventSupport] - } - - entry.prototype = { - // given a list of namespaces, is our entry in any of them? - inNamespaces: function (checkNamespaces) { - var i, j - if (!checkNamespaces) - return true - if (!this.namespaces) - return false - for (i = checkNamespaces.length; i--;) { - for (j = this.namespaces.length; j--;) { - if (checkNamespaces[i] === this.namespaces[j]) - return true - } - } - return false - } - - // match by element, original fn (opt), handler fn (opt) - , matches: function (checkElement, checkOriginal, checkHandler) { - return this.element === checkElement && - (!checkOriginal || this.original === checkOriginal) && - (!checkHandler || this.handler === checkHandler) - } - } - - return entry - })() - - , registry = (function () { - // our map stores arrays by event type, just because it's better than storing - // everything in a single array. uses '$' as a prefix for the keys for safety - var map = {} - - // generic functional search of our registry for matching listeners, - // `fn` returns false to break out of the loop - , forAll = function (element, type, original, handler, fn) { - if (!type || type === '*') { - // search the whole registry - for (var t in map) { - if (t.charAt(0) === '$') - forAll(element, t.substr(1), original, handler, fn) - } - } else { - var i = 0, l, list = map['$' + type], all = element === '*' - if (!list) - return - for (l = list.length; i < l; i++) { - if (all || list[i].matches(element, original, handler)) - if (!fn(list[i], list, i, type)) - return - } - } - } - - , has = function (element, type, original) { - // we're not using forAll here simply because it's a bit slower and this - // needs to be fast - var i, list = map['$' + type] - if (list) { - for (i = list.length; i--;) { - if (list[i].matches(element, original, null)) - return true - } - } - return false - } - - , get = function (element, type, original) { - var entries = [] - forAll(element, type, original, null, function (entry) { return entries.push(entry) }) - return entries - } - - , put = function (entry) { - (map['$' + entry.type] || (map['$' + entry.type] = [])).push(entry) - return entry - } - - , del = function (entry) { - forAll(entry.element, entry.type, null, entry.handler, function (entry, list, i) { - list.splice(i, 1) - if (list.length === 0) - delete map['$' + entry.type] - return false - }) - } - - // dump all entries, used for onunload - , entries = function () { - var t, entries = [] - for (t in map) { - if (t.charAt(0) === '$') - entries = entries.concat(map[t]) - } - return entries - } - - return { has: has, get: get, put: put, del: del, entries: entries } - })() - - // add and remove listeners to DOM elements - , listener = W3C_MODEL ? function (element, type, fn, add) { - element[add ? addEvent : removeEvent](type, fn, false) - } : function (element, type, fn, add, custom) { - if (custom && add && element['_on' + custom] === null) - element['_on' + custom] = 0 - element[add ? attachEvent : detachEvent]('on' + type, fn) - } - - , nativeHandler = function (element, fn, args) { - return function (event) { - event = fixEvent(event || ((this.ownerDocument || this.document || this).parentWindow || win).event, true) - return fn.apply(element, [event].concat(args)) - } - } - - , customHandler = function (element, fn, type, condition, args, isNative) { - return function (event) { - if (condition ? condition.apply(this, arguments) : W3C_MODEL ? true : event && event.propertyName === '_on' + type || !event) { - if (event) - event = fixEvent(event || ((this.ownerDocument || this.document || this).parentWindow || win).event, isNative) - fn.apply(element, event && (!args || args.length === 0) ? arguments : slice.call(arguments, event ? 0 : 1).concat(args)) - } - } - } - - , once = function (rm, element, type, fn, originalFn) { - // wrap the handler in a handler that does a remove as well - return function () { - rm(element, type, originalFn) - fn.apply(this, arguments) - } - } - - , removeListener = function (element, orgType, handler, namespaces) { - var i, l, entry - , type = (orgType && orgType.replace(nameRegex, '')) - , handlers = registry.get(element, type, handler) - - for (i = 0, l = handlers.length; i < l; i++) { - if (handlers[i].inNamespaces(namespaces)) { - if ((entry = handlers[i]).eventSupport) - listener(entry.target, entry.eventType, entry.handler, false, entry.type) - // TODO: this is problematic, we have a registry.get() and registry.del() that - // both do registry searches so we waste cycles doing this. Needs to be rolled into - // a single registry.forAll(fn) that removes while finding, but the catch is that - // we'll be splicing the arrays that we're iterating over. Needs extra tests to - // make sure we don't screw it up. @rvagg - registry.del(entry) - } - } - } - - , addListener = function (element, orgType, fn, originalFn, args) { - var entry - , type = orgType.replace(nameRegex, '') - , namespaces = orgType.replace(namespaceRegex, '').split('.') - - if (registry.has(element, type, fn)) - return element // no dupe - if (type === 'unload') - fn = once(removeListener, element, type, fn, originalFn) // self clean-up - if (customEvents[type]) { - if (customEvents[type].condition) - fn = customHandler(element, fn, type, customEvents[type].condition, true) - type = customEvents[type].base || type - } - entry = registry.put(new RegEntry(element, type, fn, originalFn, namespaces[0] && namespaces)) - entry.handler = entry.isNative ? - nativeHandler(element, entry.handler, args) : - customHandler(element, entry.handler, type, false, args, false) - if (entry.eventSupport) - listener(entry.target, entry.eventType, entry.handler, true, entry.customType) - } - - , del = function (selector, fn, $) { - return function (e) { - var target, i, array = typeof selector === 'string' ? $(selector, this) : selector - for (target = e.target; target && target !== this; target = target.parentNode) { - for (i = array.length; i--;) { - if (array[i] === target) { - return fn.apply(target, arguments) - } - } - } - } - } - - , remove = function (element, typeSpec, fn) { - var k, m, type, namespaces, i - , rm = removeListener - , isString = typeSpec && typeof typeSpec === 'string' - - if (isString && typeSpec.indexOf(' ') > 0) { - // remove(el, 't1 t2 t3', fn) or remove(el, 't1 t2 t3') - typeSpec = typeSpec.split(' ') - for (i = typeSpec.length; i--;) - remove(element, typeSpec[i], fn) - return element - } - type = isString && typeSpec.replace(nameRegex, '') - if (type && customEvents[type]) - type = customEvents[type].type - if (!typeSpec || isString) { - // remove(el) or remove(el, t1.ns) or remove(el, .ns) or remove(el, .ns1.ns2.ns3) - if (namespaces = isString && typeSpec.replace(namespaceRegex, '')) - namespaces = namespaces.split('.') - rm(element, type, fn, namespaces) - } else if (typeof typeSpec === 'function') { - // remove(el, fn) - rm(element, null, typeSpec) - } else { - // remove(el, { t1: fn1, t2, fn2 }) - for (k in typeSpec) { - if (typeSpec.hasOwnProperty(k)) - remove(element, k, typeSpec[k]) - } - } - return element - } - - , add = function (element, events, fn, delfn, $) { - var type, types, i, args - , originalFn = fn - , isDel = fn && typeof fn === 'string' - - if (events && !fn && typeof events === 'object') { - for (type in events) { - if (events.hasOwnProperty(type)) - add.apply(this, [ element, type, events[type] ]) - } - } else { - args = arguments.length > 3 ? slice.call(arguments, 3) : [] - types = (isDel ? fn : events).split(' ') - isDel && (fn = del(events, (originalFn = delfn), $)) && (args = slice.call(args, 1)) - // special case for one() - this === ONE && (fn = once(remove, element, events, fn, originalFn)) - for (i = types.length; i--;) addListener(element, types[i], fn, originalFn, args) - } - return element - } - - , one = function () { - return add.apply(ONE, arguments) - } - - , fireListener = W3C_MODEL ? function (isNative, type, element) { - var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents') - evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1) - element.dispatchEvent(evt) - } : function (isNative, type, element) { - element = targetElement(element, isNative) - // if not-native then we're using onpropertychange so we just increment a custom property - isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++ - } - - , fire = function (element, type, args) { - var i, j, l, names, handlers - , types = type.split(' ') - - for (i = types.length; i--;) { - type = types[i].replace(nameRegex, '') - if (names = types[i].replace(namespaceRegex, '')) - names = names.split('.') - if (!names && !args && element[eventSupport]) { - fireListener(nativeEvents[type], type, element) - } else { - // non-native event, either because of a namespace, arguments or a non DOM element - // iterate over all listeners and manually 'fire' - handlers = registry.get(element, type) - args = [false].concat(args) - for (j = 0, l = handlers.length; j < l; j++) { - if (handlers[j].inNamespaces(names)) - handlers[j].handler.apply(element, args) - } - } - } - return element - } - - , clone = function (element, from, type) { - var i = 0 - , handlers = registry.get(from, type) - , l = handlers.length - - for (;i < l; i++) - handlers[i].original && add(element, handlers[i].type, handlers[i].original) - return element - } - - , bean = { - add: add - , one: one - , remove: remove - , clone: clone - , fire: fire - , noConflict: function () { - context[name] = old - return this - } - } - - if (win[attachEvent]) { - // for IE, clean up on unload to avoid leaks - var cleanup = function () { - var i, entries = registry.entries() - for (i in entries) { - if (entries[i].type && entries[i].type !== 'unload') - remove(entries[i].element, entries[i].type) - } - win[detachEvent]('onunload', cleanup) - win.CollectGarbage && win.CollectGarbage() - } - win[attachEvent]('onunload', cleanup) - } - - return bean -}); -// Underscore.js 1.1.7 -// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore is freely distributable under the MIT license. -// Portions of Underscore are inspired or borrowed from Prototype, -// Oliver Steele's Functional, and John Resig's Micro-Templating. -// For all details and documentation: -// http://documentcloud.github.com/underscore - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `global` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var slice = ArrayProto.slice, - unshift = ArrayProto.unshift, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { return new wrapper(obj); }; - - // Export the Underscore object for **CommonJS**, with backwards-compatibility - // for the old `require()` API. If we're not in CommonJS, add `_` to the - // global object. - if (typeof module !== 'undefined' && module.exports) { - module.exports = _; - _._ = _; - } else { - // Exported as a string, for Closure Compiler "advanced" mode. - root['_'] = _; - } - - // Current version. - _.VERSION = '1.1.7'; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - for (var key in obj) { - if (hasOwnProperty.call(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } - } - } - }; - - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); - }); - return results; - }; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = memo !== void 0; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); - } - }); - if (!initial) throw new TypeError("Reduce of empty array with no initial value"); - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return memo !== void 0 ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var reversed = (_.isArray(obj) ? obj.slice() : _.toArray(obj)).reverse(); - return _.reduce(reversed, iterator, memo, context); - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { - var result; - any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. - // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); - each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - each(obj, function(value, index, list) { - if (!iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. - // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); - each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; - }); - return result; - }; - - // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. - // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator = iterator || _.identity; - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); - each(obj, function(value, index, list) { - if (result |= iterator.call(context, value, index, list)) return breaker; - }); - return !!result; - }; - - // Determine if a given value is included in the array or object using `===`. - // Aliased as `contains`. - _.include = _.contains = function(obj, target) { - var found = false; - if (obj == null) return found; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - any(obj, function(value) { - if (found = value === target) return true; - }); - return found; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - return _.map(obj, function(value) { - return (method.call ? method || value : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); - }; - - // Return the maximum element or (element-based computation). - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj); - var result = {computed : -Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj); - var result = {computed : Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, iterator, context) { - return _.pluck(_.map(obj, function(value, index, list) { - return { - value : value, - criteria : iterator.call(context, value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }), 'value'); - }; - - // Groups the object's values by a criterion produced by an iterator - _.groupBy = function(obj, iterator) { - var result = {}; - each(obj, function(value, index) { - var key = iterator(value, index); - (result[key] || (result[key] = [])).push(value); - }); - return result; - }; - - // Use a comparator function to figure out at what index an object should - // be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator) { - iterator || (iterator = _.identity); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >> 1; - iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; - } - return low; - }; - - // Safely convert anything iterable into a real, live array. - _.toArray = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) return iterable.toArray(); - if (_.isArray(iterable)) return slice.call(iterable); - if (_.isArguments(iterable)) return slice.call(iterable); - return _.values(iterable); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - return _.toArray(obj).length; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head`. The **guard** check allows it to work - // with `_.map`. - _.first = _.head = function(array, n, guard) { - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; - }; - - // Returns everything but the first entry of the array. Aliased as `tail`. - // Especially useful on the arguments object. Passing an **index** will return - // the rest of the values in the array from that index onward. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = function(array, index, guard) { - return slice.call(array, (index == null) || guard ? 1 : index); - }; - - // Get the last element of an array. - _.last = function(array) { - return array[array.length - 1]; - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, function(value){ return !!value; }); - }; - - // Return a completely flattened version of an array. - _.flatten = function(array) { - return _.reduce(array, function(memo, value) { - if (_.isArray(value)) return memo.concat(_.flatten(value)); - memo[memo.length] = value; - return memo; - }, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted) { - return _.reduce(array, function(memo, el, i) { - if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) memo[memo.length] = el; - return memo; - }, []); - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(_.flatten(arguments)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. (Aliased as "intersect" for back-compat.) - _.intersection = _.intersect = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; - }); - }); - }; - - // Take the difference between one array and another. - // Only the elements present in just the first array will remain. - _.difference = function(array, other) { - return _.filter(array, function(value){ return !_.include(other, value); }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); - var results = new Array(length); - for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i); - return results; - }; - - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i, l; - if (isSorted) { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item); - for (i = 0, l = array.length; i < l; i++) if (array[i] === item) return i; - return -1; - }; - - - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. - _.lastIndexOf = function(array, item) { - if (array == null) return -1; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item); - var i = array.length; - while (i--) if (array[i] === item) return i; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = arguments[2] || 1; - - var len = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(len); - - while(idx < len) { - range[idx++] = start; - start += step; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Binding with arguments is also known as `curry`. - // Delegates to **ECMAScript 5**'s native `Function.bind` if available. - // We check for `func.bind` first, to fail fast when `func` is undefined. - _.bind = function(func, obj) { - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - var args = slice.call(arguments, 2); - return function() { - return func.apply(obj, args.concat(slice.call(arguments))); - }; - }; - - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. - _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length == 0) funcs = _.functions(obj); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return hasOwnProperty.call(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); - }; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(func, args); }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Internal function used to implement `_.throttle` and `_.debounce`. - var limit = function(func, wait, debounce) { - var timeout; - return function() { - var context = this, args = arguments; - var throttler = function() { - timeout = null; - func.apply(context, args); - }; - if (debounce) clearTimeout(timeout); - if (debounce || !timeout) timeout = setTimeout(throttler, wait); - }; - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - return limit(func, wait, false); - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. - _.debounce = function(func, wait) { - return limit(func, wait, true); - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - return memo = func.apply(this, arguments); - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return function() { - var args = [func].concat(slice.call(arguments)); - return wrapper.apply(this, args); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var funcs = slice.call(arguments); - return function() { - var args = slice.call(arguments); - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - return function() { - if (--times < 1) { return func.apply(this, arguments); } - }; - }; - - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); - var keys = []; - for (var key in obj) if (hasOwnProperty.call(obj, key)) keys[keys.length] = key; - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - return _.map(obj, _.identity); - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - for (var prop in source) { - if (source[prop] !== void 0) obj[prop] = source[prop]; - } - }); - return obj; - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; - } - }); - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - // Check object identity. - if (a === b) return true; - // Different types? - var atype = typeof(a), btype = typeof(b); - if (atype != btype) return false; - // Basic equality test (watch out for coercions). - if (a == b) return true; - // One is falsy and the other truthy. - if ((!a && b) || (a && !b)) return false; - // Unwrap any wrapped objects. - if (a._chain) a = a._wrapped; - if (b._chain) b = b._wrapped; - // One of them implements an isEqual()? - if (a.isEqual) return a.isEqual(b); - if (b.isEqual) return b.isEqual(a); - // Check dates' integer values. - if (_.isDate(a) && _.isDate(b)) return a.getTime() === b.getTime(); - // Both are NaN? - if (_.isNaN(a) && _.isNaN(b)) return false; - // Compare regular expressions. - if (_.isRegExp(a) && _.isRegExp(b)) - return a.source === b.source && - a.global === b.global && - a.ignoreCase === b.ignoreCase && - a.multiline === b.multiline; - // If a is not an object by this point, we can't handle it. - if (atype !== 'object') return false; - // Check for different array lengths before comparing contents. - if (a.length && (a.length !== b.length)) return false; - // Nothing else worked, deep compare the contents. - var aKeys = _.keys(a), bKeys = _.keys(b); - // Different object sizes? - if (aKeys.length != bKeys.length) return false; - // Recursive comparison of contents. - for (var key in a) if (!(key in b) || !_.isEqual(a[key], b[key])) return false; - return true; - }; - - // Is a given array or object empty? - _.isEmpty = function(obj) { - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (hasOwnProperty.call(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType == 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) === '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - return obj === Object(obj); - }; - - // Is a given variable an arguments object? - _.isArguments = function(obj) { - return !!(obj && hasOwnProperty.call(obj, 'callee')); - }; - - // Is a given value a function? - _.isFunction = function(obj) { - return !!(obj && obj.constructor && obj.call && obj.apply); - }; - - // Is a given value a string? - _.isString = function(obj) { - return !!(obj === '' || (obj && obj.charCodeAt && obj.substr)); - }; - - // Is a given value a number? - _.isNumber = function(obj) { - return !!(obj === 0 || (obj && obj.toExponential && obj.toFixed)); - }; - - // Is the given value `NaN`? `NaN` happens to be the only value in JavaScript - // that does not equal itself. - _.isNaN = function(obj) { - return obj !== obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false; - }; - - // Is a given value a date? - _.isDate = function(obj) { - return !!(obj && obj.getTimezoneOffset && obj.setUTCFullYear); - }; - - // Is the given value a regular expression? - _.isRegExp = function(obj) { - return !!(obj && obj.test && obj.exec && (obj.ignoreCase || obj.ignoreCase === false)); - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iterators. - _.identity = function(value) { - return value; - }; - - // Run a function **n** times. - _.times = function (n, iterator, context) { - for (var i = 0; i < n; i++) iterator.call(context, i); - }; - - // Add your own custom functions to the Underscore object, ensuring that - // they're correctly added to the OOP wrapper as well. - _.mixin = function(obj) { - each(_.functions(obj), function(name){ - addToWrapper(name, _[name] = obj[name]); - }); - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = idCounter++; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(str, data) { - var c = _.templateSettings; - var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' + - 'with(obj||{}){__p.push(\'' + - str.replace(/\\/g, '\\\\') - .replace(/'/g, "\\'") - .replace(c.interpolate, function(match, code) { - return "'," + code.replace(/\\'/g, "'") + ",'"; - }) - .replace(c.evaluate || null, function(match, code) { - return "');" + code.replace(/\\'/g, "'") - .replace(/[\r\n\t]/g, ' ') + "__p.push('"; - }) - .replace(/\r/g, '\\r') - .replace(/\n/g, '\\n') - .replace(/\t/g, '\\t') - + "');}return __p.join('');"; - var func = new Function('obj', tmpl); - return data ? func(data) : func; - }; - - // The OOP Wrapper - // --------------- - - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - var wrapper = function(obj) { this._wrapped = obj; }; - - // Expose `wrapper.prototype` as `_.prototype` - _.prototype = wrapper.prototype; - - // Helper function to continue chaining intermediate results. - var result = function(obj, chain) { - return chain ? _(obj).chain() : obj; - }; - - // A method to easily add functions to the OOP wrapper. - var addToWrapper = function(name, func) { - wrapper.prototype[name] = function() { - var args = slice.call(arguments); - unshift.call(args, this._wrapped); - return result(func.apply(_, args), this._chain); - }; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - wrapper.prototype[name] = function() { - method.apply(this._wrapped, arguments); - return result(this._wrapped, this._chain); - }; - }); - - // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - wrapper.prototype[name] = function() { - return result(method.apply(this._wrapped, arguments), this._chain); - }; - }); - - // Start chaining a wrapped Underscore object. - wrapper.prototype.chain = function() { - this._chain = true; - return this; - }; - - // Extracts the result from a wrapped and chained object. - wrapper.prototype.value = function() { - return this._wrapped; - }; - -})(); -/** - * Flotr2 (c) 2012 Carl Sutherland MIT License Special thanks to: Flotr: http://code.google.com/p/flotr/ (fork) Flot: - * https://github.com/flot/flot (original fork) - */ -(function () { - -var - global = this, - previousFlotr = this.Flotr, - Flotr; - -Flotr = { - _: _, - bean: bean, - isIphone: /iphone/i.test(navigator.userAgent), - isIE: (navigator.appVersion.indexOf("MSIE") != -1 ? parseFloat(navigator.appVersion.split("MSIE")[1]) : false), - - /** - * An object of the registered graph types. Use Flotr.addType(type, object) to add your own type. - */ - graphTypes: {}, - - /** - * The list of the registered plugins - */ - plugins: {}, - - /** - * Can be used to add your own chart type. - * - * @param {String} - * name - Type of chart, like 'pies', 'bars' etc. - * @param {String} - * graphType - The object containing the basic drawing functions (draw, etc) - */ - addType: function(name, graphType){ - Flotr.graphTypes[name] = graphType; - Flotr.defaultOptions[name] = graphType.options || {}; - Flotr.defaultOptions.defaultType = Flotr.defaultOptions.defaultType || name; - }, - - /** - * Can be used to add a plugin - * - * @param {String} - * name - The name of the plugin - * @param {String} - * plugin - The object containing the plugin's data (callbacks, options, function1, function2, ...) - */ - addPlugin: function(name, plugin){ - Flotr.plugins[name] = plugin; - Flotr.defaultOptions[name] = plugin.options || {}; - }, - - /** - * Draws the graph. This function is here for backwards compatibility with Flotr version 0.1.0alpha. You could also - * draw graphs by directly calling Flotr.Graph(element, data, options). - * - * @param {Element} - * el - element to insert the graph into - * @param {Object} - * data - an array or object of dataseries - * @param {Object} - * options - an object containing options - * @param {Class} - * _GraphKlass_ - (optional) Class to pass the arguments to, defaults to Flotr.Graph - * @return {Object} returns a new graph object and of course draws the graph. - */ - draw: function(el, data, options, GraphKlass){ - GraphKlass = GraphKlass || Flotr.Graph; - return new GraphKlass(el, data, options); - }, - - /** - * Recursively merges two objects. - * - * @param {Object} - * src - source object (likely the object with the least properties) - * @param {Object} - * dest - destination object (optional, object with the most properties) - * @return {Object} recursively merged Object - * @TODO See if we can't remove this. - */ - merge: function(src, dest){ - var i, v, result = dest || {}; - - for (i in src) { - v = src[i]; - if (v && typeof(v) === 'object') { - if (v.constructor === Array) { - result[i] = this._.clone(v); - } else if ( - v.constructor !== RegExp && - !this._.isElement(v) && - !v.jquery - ) { - result[i] = Flotr.merge(v, (dest ? dest[i] : undefined)); - } else { - result[i] = v; - } - } else { - result[i] = v; - } - } - - return result; - }, - - /** - * Recursively clones an object. - * - * @param {Object} - * object - The object to clone - * @return {Object} the clone - * @TODO See if we can't remove this. - */ - clone: function(object){ - return Flotr.merge(object, {}); - }, - - /** - * Function calculates the ticksize and returns it. - * - * @param {Integer} - * noTicks - number of ticks - * @param {Integer} - * min - lower bound integer value for the current axis - * @param {Integer} - * max - upper bound integer value for the current axis - * @param {Integer} - * decimals - number of decimals for the ticks - * @return {Integer} returns the ticksize in pixels - */ - getTickSize: function(noTicks, min, max, decimals){ - var delta = (max - min) / noTicks, - magn = Flotr.getMagnitude(delta), - tickSize = 10, - norm = delta / magn; // Norm is between 1.0 and 10.0. - - if(norm < 1.5) tickSize = 1; - else if(norm < 2.25) tickSize = 2; - else if(norm < 3) tickSize = ((decimals === 0) ? 2 : 2.5); - else if(norm < 7.5) tickSize = 5; - - return tickSize * magn; - }, - - /** - * Default tick formatter. - * - * @param {String, - * Integer} val - tick value integer - * @param {Object} - * axisOpts - the axis' options - * @return {String} formatted tick string - */ - defaultTickFormatter: function(val, axisOpts){ - return val+''; - }, - - /** - * Formats the mouse tracker values. - * - * @param {Object} - * obj - Track value Object {x:..,y:..} - * @return {String} Formatted track string - */ - defaultTrackFormatter: function(obj){ - return '('+obj.x+', '+obj.y+')'; - }, - - /** - * Utility function to convert file size values in bytes to kB, MB, ... - * - * @param value - * {Number} - The value to convert - * @param precision - * {Number} - The number of digits after the comma (default: 2) - * @param base - * {Number} - The base (default: 1000) - */ - engineeringNotation: function(value, precision, base){ - var sizes = ['Y','Z','E','P','T','G','M','k',''], - fractionSizes = ['y','z','a','f','p','n','µ','m',''], - total = sizes.length; - - base = base || 1000; - precision = Math.pow(10, precision || 2); - - if (value === 0) return 0; - - if (value > 1) { - while (total-- && (value >= base)) value /= base; - } - else { - sizes = fractionSizes; - total = sizes.length; - while (total-- && (value < 1)) value *= base; - } - - return (Math.round(value * precision) / precision) + sizes[total]; - }, - - /** - * Returns the magnitude of the input value. - * - * @param {Integer, - * Float} x - integer or float value - * @return {Integer, Float} returns the magnitude of the input value - */ - getMagnitude: function(x){ - return Math.pow(10, Math.floor(Math.log(x) / Math.LN10)); - }, - toPixel: function(val){ - return Math.floor(val)+0.5;// ((val-Math.round(val) < 0.4) ? (Math.floor(val)-0.5) : val); - }, - toRad: function(angle){ - return -angle * (Math.PI/180); - }, - floorInBase: function(n, base) { - return base * Math.floor(n / base); - }, - drawText: function(ctx, text, x, y, style) { - if (!ctx.fillText) { - ctx.drawText(text, x, y, style); - return; - } - - style = this._.extend({ - size: Flotr.defaultOptions.fontSize, - color: '#000000', - textAlign: 'left', - textBaseline: 'bottom', - weight: 1, - angle: 0 - }, style); - - ctx.save(); - ctx.translate(x, y); - ctx.rotate(style.angle); - ctx.fillStyle = style.color; - ctx.font = (style.weight > 1 ? "bold " : "") + (style.size*1.3) + "px sans-serif"; - ctx.textAlign = style.textAlign; - ctx.textBaseline = style.textBaseline; - ctx.fillText(text, 0, 0); - ctx.restore(); - }, - getBestTextAlign: function(angle, style) { - style = style || {textAlign: 'center', textBaseline: 'middle'}; - angle += Flotr.getTextAngleFromAlign(style); - - if (Math.abs(Math.cos(angle)) > 10e-3) - style.textAlign = (Math.cos(angle) > 0 ? 'right' : 'left'); - - if (Math.abs(Math.sin(angle)) > 10e-3) - style.textBaseline = (Math.sin(angle) > 0 ? 'top' : 'bottom'); - - return style; - }, - alignTable: { - 'right middle' : 0, - 'right top' : Math.PI/4, - 'center top' : Math.PI/2, - 'left top' : 3*(Math.PI/4), - 'left middle' : Math.PI, - 'left bottom' : -3*(Math.PI/4), - 'center bottom': -Math.PI/2, - 'right bottom' : -Math.PI/4, - 'center middle': 0 - }, - getTextAngleFromAlign: function(style) { - return Flotr.alignTable[style.textAlign+' '+style.textBaseline] || 0; - }, - noConflict : function () { - global.Flotr = previousFlotr; - return this; - } -}; - -global.Flotr = Flotr; - -})(); - -/** - * Flotr Defaults - */ -Flotr.defaultOptions = { - colors: ['#00A8F0', '#C0D800', '#CB4B4B', '#4DA74D', '#9440ED'], // => The default colorscheme. When there are > 5 - // series, additional colors are generated. - ieBackgroundColor: '#FFFFFF', // Background color for excanvas clipping - title: null, // => The graph's title - subtitle: null, // => The graph's subtitle - shadowSize: 4, // => size of the 'fake' shadow - defaultType: null, // => default series type - HtmlText: true, // => wether to draw the text using HTML or on the canvas - fontColor: '#545454', // => default font color - fontSize: 7.5, // => canvas' text font size - resolution: 1, // => resolution of the graph, to have printer-friendly graphs ! - parseFloat: true, // => whether to preprocess data for floats (ie. if input is string) - preventDefault: true, // => preventDefault by default for mobile events. Turn off to enable scroll. - xaxis: { - ticks: null, // => format: either [1, 3] or [[1, 'a'], 3] - minorTicks: null, // => format: either [1, 3] or [[1, 'a'], 3] - showLabels: true, // => setting to true will show the axis ticks labels, hide otherwise - showMinorLabels: false,// => true to show the axis minor ticks labels, false to hide - labelsAngle: 0, // => labels' angle, in degrees - title: null, // => axis title - titleAngle: 0, // => axis title's angle, in degrees - noTicks: 5, // => number of ticks for automagically generated ticks - minorTickFreq: null, // => number of minor ticks between major ticks for autogenerated ticks - tickFormatter: Flotr.defaultTickFormatter, // => fn: number, Object -> string - tickDecimals: null, // => no. of decimals, null means auto - min: null, // => min. value to show, null means set automatically - max: null, // => max. value to show, null means set automatically - autoscale: false, // => Turns autoscaling on with true - autoscaleMargin: 0, // => margin in % to add if auto-setting min/max - color: null, // => color of the ticks - mode: 'normal', // => can be 'time' or 'normal' - timeFormat: null, - timeMode:'UTC', // => For UTC time ('local' for local time). - timeUnit:'millisecond',// => Unit for time (millisecond, second, minute, hour, day, month, year) - scaling: 'linear', // => Scaling, can be 'linear' or 'logarithmic' - base: Math.E, - titleAlign: 'center', - margin: true // => Turn off margins with false - }, - x2axis: {}, - yaxis: { - ticks: null, // => format: either [1, 3] or [[1, 'a'], 3] - minorTicks: null, // => format: either [1, 3] or [[1, 'a'], 3] - showLabels: true, // => setting to true will show the axis ticks labels, hide otherwise - showMinorLabels: false,// => true to show the axis minor ticks labels, false to hide - labelsAngle: 0, // => labels' angle, in degrees - title: null, // => axis title - titleAngle: 90, // => axis title's angle, in degrees - noTicks: 5, // => number of ticks for automagically generated ticks - minorTickFreq: null, // => number of minor ticks between major ticks for autogenerated ticks - tickFormatter: Flotr.defaultTickFormatter, // => fn: number, Object -> string - tickDecimals: null, // => no. of decimals, null means auto - min: null, // => min. value to show, null means set automatically - max: null, // => max. value to show, null means set automatically - autoscale: false, // => Turns autoscaling on with true - autoscaleMargin: 0, // => margin in % to add if auto-setting min/max - color: null, // => The color of the ticks - scaling: 'linear', // => Scaling, can be 'linear' or 'logarithmic' - base: Math.E, - titleAlign: 'center', - margin: true // => Turn off margins with false - }, - y2axis: { - titleAngle: 270 - }, - grid: { - color: '#545454', // => primary color used for outline and labels - backgroundColor: null, // => null for transparent, else color - backgroundImage: null, // => background image. String or object with src, left and top - watermarkAlpha: 0.4, // => - tickColor: '#DDDDDD', // => color used for the ticks - labelMargin: 3, // => margin in pixels - verticalLines: true, // => whether to show gridlines in vertical direction - minorVerticalLines: null, // => whether to show gridlines for minor ticks in vertical dir. - horizontalLines: true, // => whether to show gridlines in horizontal direction - minorHorizontalLines: null, // => whether to show gridlines for minor ticks in horizontal dir. - outlineWidth: 1, // => width of the grid outline/border in pixels - outline : 'nsew', // => walls of the outline to display - circular: false // => if set to true, the grid will be circular, must be used when radars are drawn - }, - mouse: { - track: false, // => true to track the mouse, no tracking otherwise - trackAll: false, - position: 'se', // => position of the value box (default south-east). False disables. - relative: false, // => next to the mouse cursor - trackFormatter: Flotr.defaultTrackFormatter, // => formats the values in the value box - margin: 5, // => margin in pixels of the valuebox - lineColor: '#FF3F19', // => line color of points that are drawn when mouse comes near a value of a series - trackDecimals: 1, // => decimals for the track values - sensibility: 2, // => the lower this number, the more precise you have to aim to show a value - trackY: true, // => whether or not to track the mouse in the y axis - radius: 3, // => radius of the track point - fillColor: null, // => color to fill our select bar with only applies to bar and similar graphs (only bars for - // now) - fillOpacity: 0.4 // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - } -}; - -/** - * Flotr Color - */ - -(function () { - -var - _ = Flotr._; - -// Constructor -function Color (r, g, b, a) { - this.rgba = ['r','g','b','a']; - var x = 4; - while(-1<--x){ - this[this.rgba[x]] = arguments[x] || ((x==3) ? 1.0 : 0); - } - this.normalize(); -} - -// Constants -var COLOR_NAMES = { - aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255], - brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169], - darkgreen:[0,100,0],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], - darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130], - khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144], - lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255], - maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128], - violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0] -}; - -Color.prototype = { - scale: function(rf, gf, bf, af){ - var x = 4; - while (-1 < --x) { - if (!_.isUndefined(arguments[x])) this[this.rgba[x]] *= arguments[x]; - } - return this.normalize(); - }, - alpha: function(alpha) { - if (!_.isUndefined(alpha) && !_.isNull(alpha)) { - this.a = alpha; - } - return this.normalize(); - }, - clone: function(){ - return new Color(this.r, this.b, this.g, this.a); - }, - limit: function(val,minVal,maxVal){ - return Math.max(Math.min(val, maxVal), minVal); - }, - normalize: function(){ - var limit = this.limit; - this.r = limit(parseInt(this.r, 10), 0, 255); - this.g = limit(parseInt(this.g, 10), 0, 255); - this.b = limit(parseInt(this.b, 10), 0, 255); - this.a = limit(this.a, 0, 1); - return this; - }, - distance: function(color){ - if (!color) return; - color = new Color.parse(color); - var dist = 0, x = 3; - while(-1<--x){ - dist += Math.abs(this[this.rgba[x]] - color[this.rgba[x]]); - } - return dist; - }, - toString: function(){ - return (this.a >= 1.0) ? 'rgb('+[this.r,this.g,this.b].join(',')+')' : 'rgba('+[this.r,this.g,this.b,this.a].join(',')+')'; - }, - contrast: function () { - var - test = 1 - ( 0.299 * this.r + 0.587 * this.g + 0.114 * this.b) / 255; - return (test < 0.5 ? '#000000' : '#ffffff'); - } -}; - -_.extend(Color, { - /** - * Parses a color string and returns a corresponding Color. The different tests are in order of probability to - * improve speed. - * - * @param {String, - * Color} str - string thats representing a color - * @return {Color} returns a Color object or false - */ - parse: function(color){ - if (color instanceof Color) return color; - - var result; - - // #a0b1c2 - if((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))) - return new Color(parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)); - - // rgb(num,num,num) - if((result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))) - return new Color(parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10)); - - // #fff - if((result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))) - return new Color(parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)); - - // rgba(num,num,num,num) - if((result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(color))) - return new Color(parseInt(result[1], 10), parseInt(result[2], 10), parseInt(result[3], 10), parseFloat(result[4])); - - // rgb(num%,num%,num%) - if((result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))) - return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55); - - // rgba(num%,num%,num%,num) - if((result = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(color))) - return new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4])); - - // Otherwise, we're most likely dealing with a named color. - var name = (color+'').replace(/^\s*([\S\s]*?)\s*$/, '$1').toLowerCase(); - if(name == 'transparent'){ - return new Color(255, 255, 255, 0); - } - return (result = COLOR_NAMES[name]) ? new Color(result[0], result[1], result[2]) : new Color(0, 0, 0, 0); - }, - - /** - * Process color and options into color style. - */ - processColor: function(color, options) { - - var opacity = options.opacity; - if (!color) return 'rgba(0, 0, 0, 0)'; - if (color instanceof Color) return color.alpha(opacity).toString(); - if (_.isString(color)) return Color.parse(color).alpha(opacity).toString(); - - var grad = color.colors ? color : {colors: color}; - - if (!options.ctx) { - if (!_.isArray(grad.colors)) return 'rgba(0, 0, 0, 0)'; - return Color.parse(_.isArray(grad.colors[0]) ? grad.colors[0][1] : grad.colors[0]).alpha(opacity).toString(); - } - grad = _.extend({start: 'top', end: 'bottom'}, grad); - - if (/top/i.test(grad.start)) options.x1 = 0; - if (/left/i.test(grad.start)) options.y1 = 0; - if (/bottom/i.test(grad.end)) options.x2 = 0; - if (/right/i.test(grad.end)) options.y2 = 0; - - var i, c, stop, gradient = options.ctx.createLinearGradient(options.x1, options.y1, options.x2, options.y2); - for (i = 0; i < grad.colors.length; i++) { - c = grad.colors[i]; - if (_.isArray(c)) { - stop = c[0]; - c = c[1]; - } - else stop = i / (grad.colors.length-1); - gradient.addColorStop(stop, Color.parse(c).alpha(opacity)); - } - return gradient; - } -}); - -Flotr.Color = Color; - -})(); - -/** - * Flotr Date - */ -Flotr.Date = { - - set : function (date, name, mode, value) { - mode = mode || 'UTC'; - name = 'set' + (mode === 'UTC' ? 'UTC' : '') + name; - date[name](value); - }, - - get : function (date, name, mode) { - mode = mode || 'UTC'; - name = 'get' + (mode === 'UTC' ? 'UTC' : '') + name; - return date[name](); - }, - - format: function(d, format, mode) { - if (!d) return; - - // We should maybe use an "official" date format spec, like PHP date() or ColdFusion - // http://fr.php.net/manual/en/function.date.php - // http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_c-d_29.html - var - get = this.get, - tokens = { - h: get(d, 'Hours', mode).toString(), - H: leftPad(get(d, 'Hours', mode)), - M: leftPad(get(d, 'Minutes', mode)), - S: leftPad(get(d, 'Seconds', mode)), - s: get(d, 'Milliseconds', mode), - d: get(d, 'Date', mode).toString(), - m: (get(d, 'Month', mode) + 1).toString(), - y: get(d, 'FullYear', mode).toString(), - b: Flotr.Date.monthNames[get(d, 'Month', mode)] - }; - - function leftPad(n){ - n += ''; - return n.length == 1 ? "0" + n : n; - } - - var r = [], c, - escape = false; - - for (var i = 0; i < format.length; ++i) { - c = format.charAt(i); - - if (escape) { - r.push(tokens[c] || c); - escape = false; - } - else if (c == "%") - escape = true; - else - r.push(c); - } - return r.join(''); - }, - getFormat: function(time, span) { - var tu = Flotr.Date.timeUnits; - if (time < tu.second) return "%h:%M:%S.%s"; - else if (time < tu.minute) return "%h:%M:%S"; - else if (time < tu.day) return (span < 2 * tu.day) ? "%h:%M" : "%b %d %h:%M"; - else if (time < tu.month) return "%b %d"; - else if (time < tu.year) return (span < tu.year) ? "%b" : "%b %y"; - else return "%y"; - }, - formatter: function (v, axis) { - var - options = axis.options, - scale = Flotr.Date.timeUnits[options.timeUnit], - d = new Date(v * scale); - - // first check global format - if (axis.options.timeFormat) - return Flotr.Date.format(d, options.timeFormat, options.timeMode); - - var span = (axis.max - axis.min) * scale, - t = axis.tickSize * Flotr.Date.timeUnits[axis.tickUnit]; - - return Flotr.Date.format(d, Flotr.Date.getFormat(t, span), options.timeMode); - }, - generator: function(axis) { - - var - set = this.set, - get = this.get, - timeUnits = this.timeUnits, - spec = this.spec, - options = axis.options, - mode = options.timeMode, - scale = timeUnits[options.timeUnit], - min = axis.min * scale, - max = axis.max * scale, - delta = (max - min) / options.noTicks, - ticks = [], - tickSize = axis.tickSize, - tickUnit, - formatter, i; - - // Use custom formatter or time tick formatter - formatter = (options.tickFormatter === Flotr.defaultTickFormatter ? - this.formatter : options.tickFormatter - ); - - for (i = 0; i < spec.length - 1; ++i) { - var d = spec[i][0] * timeUnits[spec[i][1]]; - if (delta < (d + spec[i+1][0] * timeUnits[spec[i+1][1]]) / 2 && d >= tickSize) - break; - } - tickSize = spec[i][0]; - tickUnit = spec[i][1]; - - // special-case the possibility of several years - if (tickUnit == "year") { - tickSize = Flotr.getTickSize(options.noTicks*timeUnits.year, min, max, 0); - - // Fix for 0.5 year case - if (tickSize == 0.5) { - tickUnit = "month"; - tickSize = 6; - } - } - - axis.tickUnit = tickUnit; - axis.tickSize = tickSize; - - var step = tickSize * timeUnits[tickUnit]; - d = new Date(min); - - function setTick (name) { - set(d, name, mode, Flotr.floorInBase( - get(d, name, mode), tickSize - )); - } - - switch (tickUnit) { - case "millisecond": setTick('Milliseconds'); break; - case "second": setTick('Seconds'); break; - case "minute": setTick('Minutes'); break; - case "hour": setTick('Hours'); break; - case "month": setTick('Month'); break; - case "year": setTick('FullYear'); break; - } - - // reset smaller components - if (step >= timeUnits.second) set(d, 'Milliseconds', mode, 0); - if (step >= timeUnits.minute) set(d, 'Seconds', mode, 0); - if (step >= timeUnits.hour) set(d, 'Minutes', mode, 0); - if (step >= timeUnits.day) set(d, 'Hours', mode, 0); - if (step >= timeUnits.day * 4) set(d, 'Date', mode, 1); - if (step >= timeUnits.year) set(d, 'Month', mode, 0); - - var carry = 0, v = NaN, prev; - do { - prev = v; - v = d.getTime(); - ticks.push({ v: v / scale, label: formatter(v / scale, axis) }); - if (tickUnit == "month") { - if (tickSize < 1) { - /* - * a bit complicated - we'll divide the month up but we need to take care of fractions so we don't end up in - * the middle of a day - */ - set(d, 'Date', mode, 1); - var start = d.getTime(); - set(d, 'Month', mode, get(d, 'Month', mode) + 1); - var end = d.getTime(); - d.setTime(v + carry * timeUnits.hour + (end - start) * tickSize); - carry = get(d, 'Hours', mode); - set(d, 'Hours', mode, 0); - } - else - set(d, 'Month', mode, get(d, 'Month', mode) + tickSize); - } - else if (tickUnit == "year") { - set(d, 'FullYear', mode, get(d, 'FullYear', mode) + tickSize); - } - else - d.setTime(v + step); - - } while (v < max && v != prev); - - return ticks; - }, - timeUnits: { - millisecond: 1, - second: 1000, - minute: 1000 * 60, - hour: 1000 * 60 * 60, - day: 1000 * 60 * 60 * 24, - month: 1000 * 60 * 60 * 24 * 30, - year: 1000 * 60 * 60 * 24 * 365.2425 - }, - // the allowed tick sizes, after 1 year we use an integer algorithm - spec: [ - [1, "millisecond"], [20, "millisecond"], [50, "millisecond"], [100, "millisecond"], [200, "millisecond"], [500, "millisecond"], - [1, "second"], [2, "second"], [5, "second"], [10, "second"], [30, "second"], - [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"], [30, "minute"], - [1, "hour"], [2, "hour"], [4, "hour"], [8, "hour"], [12, "hour"], - [1, "day"], [2, "day"], [3, "day"], - [0.25, "month"], [0.5, "month"], [1, "month"], [2, "month"], [3, "month"], [6, "month"], - [1, "year"] - ], - monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] -}; - -(function () { - -var _ = Flotr._; - -function getEl (el) { - return (el && el.jquery) ? el[0] : el; -} - -Flotr.DOM = { - addClass: function(element, name){ - element = getEl(element); - var classList = (element.className ? element.className : ''); - if (_.include(classList.split(/\s+/g), name)) return; - element.className = (classList ? classList + ' ' : '') + name; - }, - /** - * Create an element. - */ - create: function(tag){ - return document.createElement(tag); - }, - node: function(html) { - var div = Flotr.DOM.create('div'), n; - div.innerHTML = html; - n = div.children[0]; - div.innerHTML = ''; - return n; - }, - /** - * Remove all children. - */ - empty: function(element){ - element = getEl(element); - element.innerHTML = ''; - /* - * if (!element) return; _.each(element.childNodes, function (e) { Flotr.DOM.empty(e); element.removeChild(e); }); - */ - }, - remove: function (element) { - element = getEl(element); - element.parentNode.removeChild(element); - }, - hide: function(element){ - element = getEl(element); - Flotr.DOM.setStyles(element, {display:'none'}); - }, - /** - * Insert a child. - * - * @param {Element} - * element - * @param {Element|String} - * Element or string to be appended. - */ - insert: function(element, child){ - element = getEl(element); - if(_.isString(child)) - element.innerHTML += child; - else if (_.isElement(child)) - element.appendChild(child); - }, - // @TODO find xbrowser implementation - opacity: function(element, opacity) { - element = getEl(element); - element.style.opacity = opacity; - }, - position: function(element, p){ - element = getEl(element); - if (!element.offsetParent) - return {left: (element.offsetLeft || 0), top: (element.offsetTop || 0)}; - - p = this.position(element.offsetParent); - p.left += element.offsetLeft; - p.top += element.offsetTop; - return p; - }, - removeClass: function(element, name) { - var classList = (element.className ? element.className : ''); - element = getEl(element); - element.className = _.filter(classList.split(/\s+/g), function (c) { - if (c != name) return true; } - ).join(' '); - }, - setStyles: function(element, o) { - element = getEl(element); - _.each(o, function (value, key) { - element.style[key] = value; - }); - }, - show: function(element){ - element = getEl(element); - Flotr.DOM.setStyles(element, {display:''}); - }, - /** - * Return element size. - */ - size: function(element){ - element = getEl(element); - return { - height : element.offsetHeight, - width : element.offsetWidth }; - } -}; - -})(); - -/** - * Flotr Event Adapter - */ -(function () { -var - F = Flotr, - bean = F.bean; -F.EventAdapter = { - observe: function(object, name, callback) { - bean.add(object, name, callback); - return this; - }, - fire: function(object, name, args) { - bean.fire(object, name, args); - if (typeof(Prototype) != 'undefined') - Event.fire(object, name, args); - // @TODO Someone who uses mootools, add mootools adapter for existing applciations. - return this; - }, - stopObserving: function(object, name, callback) { - bean.remove(object, name, callback); - return this; - }, - eventPointer: function(e) { - if (!F._.isUndefined(e.touches) && e.touches.length > 0) { - return { - x : e.touches[0].pageX, - y : e.touches[0].pageY - }; - } else if (!F._.isUndefined(e.changedTouches) && e.changedTouches.length > 0) { - return { - x : e.changedTouches[0].pageX, - y : e.changedTouches[0].pageY - }; - } else if (e.pageX || e.pageY) { - return { - x : e.pageX, - y : e.pageY - }; - } else if (e.clientX || e.clientY) { - var - d = document, - b = d.body, - de = d.documentElement; - return { - x: e.clientX + b.scrollLeft + de.scrollLeft, - y: e.clientY + b.scrollTop + de.scrollTop - }; - } - } -}; -})(); - -/** - * Text Utilities - */ -(function () { - -var - F = Flotr, - D = F.DOM, - _ = F._, - -Text = function (o) { - this.o = o; -}; - -Text.prototype = { - - dimensions : function (text, canvasStyle, htmlStyle, className) { - - if (!text) return { width : 0, height : 0 }; - - return (this.o.html) ? - this.html(text, this.o.element, htmlStyle, className) : - this.canvas(text, canvasStyle); - }, - - canvas : function (text, style) { - - if (!this.o.textEnabled) return; - style = style || {}; - - var - metrics = this.measureText(text, style), - width = metrics.width, - height = style.size || F.defaultOptions.fontSize, - angle = style.angle || 0, - cosAngle = Math.cos(angle), - sinAngle = Math.sin(angle), - widthPadding = 2, - heightPadding = 6, - bounds; - - bounds = { - width: Math.abs(cosAngle * width) + Math.abs(sinAngle * height) + widthPadding, - height: Math.abs(sinAngle * width) + Math.abs(cosAngle * height) + heightPadding - }; - - return bounds; - }, - - html : function (text, element, style, className) { - - var div = D.create('div'); - - D.setStyles(div, { 'position' : 'absolute', 'top' : '-10000px' }); - D.insert(div, '
    ' + text + '
    '); - D.insert(this.o.element, div); - - return D.size(div); - }, - - measureText : function (text, style) { - - var - context = this.o.ctx, - metrics; - - if (!context.fillText || (F.isIphone && context.measure)) { - return { width : context.measure(text, style)}; - } - - style = _.extend({ - size: F.defaultOptions.fontSize, - weight: 1, - angle: 0 - }, style); - - context.save(); - context.font = (style.weight > 1 ? "bold " : "") + (style.size*1.3) + "px sans-serif"; - metrics = context.measureText(text); - context.restore(); - - return metrics; - } -}; - -Flotr.Text = Text; - -})(); - -/** - * Flotr Graph class that plots a graph on creation. - */ -(function () { - -var - D = Flotr.DOM, - E = Flotr.EventAdapter, - _ = Flotr._, - flotr = Flotr; -/** - * Flotr Graph constructor. - * - * @param {Element} - * el - element to insert the graph into - * @param {Object} - * data - an array or object of dataseries - * @param {Object} - * options - an object containing options - */ -Graph = function(el, data, options){ -// Let's see if we can get away with out this [JS] -// try { - this._setEl(el); - this._initMembers(); - this._initPlugins(); - - E.fire(this.el, 'flotr:beforeinit', [this]); - - this.data = data; - this.series = flotr.Series.getSeries(data); - this._initOptions(options); - this._initGraphTypes(); - this._initCanvas(); - this._text = new flotr.Text({ - element : this.el, - ctx : this.ctx, - html : this.options.HtmlText, - textEnabled : this.textEnabled - }); - E.fire(this.el, 'flotr:afterconstruct', [this]); - this._initEvents(); - - this.findDataRanges(); - this.calculateSpacing(); - - this.draw(_.bind(function() { - E.fire(this.el, 'flotr:afterinit', [this]); - }, this)); -/* - * try { } catch (e) { try { console.error(e); } catch (e2) {} } - */ -}; - -function observe (object, name, callback) { - E.observe.apply(this, arguments); - this._handles.push(arguments); - return this; -} - -Graph.prototype = { - - destroy: function () { - E.fire(this.el, 'flotr:destroy'); - _.each(this._handles, function (handle) { - E.stopObserving.apply(this, handle); - }); - this._handles = []; - this.el.graph = null; - }, - - observe : observe, - - /** - * @deprecated - */ - _observe : observe, - - processColor: function(color, options){ - var o = { x1: 0, y1: 0, x2: this.plotWidth, y2: this.plotHeight, opacity: 1, ctx: this.ctx }; - _.extend(o, options); - return flotr.Color.processColor(color, o); - }, - /** - * Function determines the min and max values for the xaxis and yaxis. - * - * TODO logarithmic range validation (consideration of 0) - */ - findDataRanges: function(){ - var a = this.axes, - xaxis, yaxis, range; - - _.each(this.series, function (series) { - range = series.getRange(); - if (range) { - xaxis = series.xaxis; - yaxis = series.yaxis; - xaxis.datamin = Math.min(range.xmin, xaxis.datamin); - xaxis.datamax = Math.max(range.xmax, xaxis.datamax); - yaxis.datamin = Math.min(range.ymin, yaxis.datamin); - yaxis.datamax = Math.max(range.ymax, yaxis.datamax); - xaxis.used = (xaxis.used || range.xused); - yaxis.used = (yaxis.used || range.yused); - } - }, this); - - // Check for empty data, no data case (none used) - if (!a.x.used && !a.x2.used) a.x.used = true; - if (!a.y.used && !a.y2.used) a.y.used = true; - - _.each(a, function (axis) { - axis.calculateRange(); - }); - - var - types = _.keys(flotr.graphTypes), - drawn = false; - - _.each(this.series, function (series) { - if (series.hide) return; - _.each(types, function (type) { - if (series[type] && series[type].show) { - this.extendRange(type, series); - drawn = true; - } - }, this); - if (!drawn) { - this.extendRange(this.options.defaultType, series); - } - }, this); - }, - - extendRange : function (type, series) { - if (this[type].extendRange) this[type].extendRange(series, series.data, series[type], this[type]); - if (this[type].extendYRange) this[type].extendYRange(series.yaxis, series.data, series[type], this[type]); - if (this[type].extendXRange) this[type].extendXRange(series.xaxis, series.data, series[type], this[type]); - }, - - /** - * Calculates axis label sizes. - */ - calculateSpacing: function(){ - - var a = this.axes, - options = this.options, - series = this.series, - margin = options.grid.labelMargin, - T = this._text, - x = a.x, - x2 = a.x2, - y = a.y, - y2 = a.y2, - maxOutset = options.grid.outlineWidth, - i, j, l, dim; - - // TODO post refactor, fix this - _.each(a, function (axis) { - axis.calculateTicks(); - axis.calculateTextDimensions(T, options); - }); - - // Title height - dim = T.dimensions( - options.title, - {size: options.fontSize*1.5}, - 'font-size:1em;font-weight:bold;', - 'flotr-title' - ); - this.titleHeight = dim.height; - - // Subtitle height - dim = T.dimensions( - options.subtitle, - {size: options.fontSize}, - 'font-size:smaller;', - 'flotr-subtitle' - ); - this.subtitleHeight = dim.height; - - for(j = 0; j < options.length; ++j){ - if (series[j].points.show){ - maxOutset = Math.max(maxOutset, series[j].points.radius + series[j].points.lineWidth/2); - } - } - - var p = this.plotOffset; - if (x.options.margin === false) { - p.bottom = 0; - p.top = 0; - } else - if (x.options.margin === true) { - p.bottom += (options.grid.circular ? 0 : (x.used && x.options.showLabels ? (x.maxLabel.height + margin) : 0)) + - (x.used && x.options.title ? (x.titleSize.height + margin) : 0) + maxOutset; - - p.top += (options.grid.circular ? 0 : (x2.used && x2.options.showLabels ? (x2.maxLabel.height + margin) : 0)) + - (x2.used && x2.options.title ? (x2.titleSize.height + margin) : 0) + this.subtitleHeight + this.titleHeight + maxOutset; - } else { - p.bottom = x.options.margin; - p.top = x.options.margin; - } - if (y.options.margin === false) { - p.left = 0; - p.right = 0; - } else - if (y.options.margin === true) { - p.left += (options.grid.circular ? 0 : (y.used && y.options.showLabels ? (y.maxLabel.width + margin) : 0)) + - (y.used && y.options.title ? (y.titleSize.width + margin) : 0) + maxOutset; - - p.right += (options.grid.circular ? 0 : (y2.used && y2.options.showLabels ? (y2.maxLabel.width + margin) : 0)) + - (y2.used && y2.options.title ? (y2.titleSize.width + margin) : 0) + maxOutset; - } else { - p.left = y.options.margin; - p.right = y.options.margin; - } - - p.top = Math.floor(p.top); // In order the outline not to be blured - - this.plotWidth = this.canvasWidth - p.left - p.right; - this.plotHeight = this.canvasHeight - p.bottom - p.top; - - // TODO post refactor, fix this - x.length = x2.length = this.plotWidth; - y.length = y2.length = this.plotHeight; - y.offset = y2.offset = this.plotHeight; - x.setScale(); - x2.setScale(); - y.setScale(); - y2.setScale(); - }, - /** - * Draws grid, labels, series and outline. - */ - draw: function(after) { - - var - context = this.ctx, - i; - - E.fire(this.el, 'flotr:beforedraw', [this.series, this]); - - if (this.series.length) { - - context.save(); - context.translate(this.plotOffset.left, this.plotOffset.top); - - for (i = 0; i < this.series.length; i++) { - if (!this.series[i].hide) this.drawSeries(this.series[i]); - } - - context.restore(); - this.clip(); - } - - E.fire(this.el, 'flotr:afterdraw', [this.series, this]); - if (after) after(); - }, - /** - * Actually draws the graph. - * - * @param {Object} - * series - series to draw - */ - drawSeries: function(series){ - - function drawChart (series, typeKey) { - var options = this.getOptions(series, typeKey); - this[typeKey].draw(options); - } - - var drawn = false; - series = series || this.series; - - _.each(flotr.graphTypes, function (type, typeKey) { - if (series[typeKey] && series[typeKey].show && this[typeKey]) { - drawn = true; - drawChart.call(this, series, typeKey); - } - }, this); - - if (!drawn) drawChart.call(this, series, this.options.defaultType); - }, - - getOptions : function (series, typeKey) { - var - type = series[typeKey], - graphType = this[typeKey], - xaxis = series.xaxis, - yaxis = series.yaxis, - options = { - context : this.ctx, - width : this.plotWidth, - height : this.plotHeight, - fontSize : this.options.fontSize, - fontColor : this.options.fontColor, - textEnabled : this.textEnabled, - htmlText : this.options.HtmlText, - text : this._text, // TODO Is this necessary? - element : this.el, - data : series.data, - color : series.color, - shadowSize : series.shadowSize, - xScale : xaxis.d2p, - yScale : yaxis.d2p, - xInverse : xaxis.p2d, - yInverse : yaxis.p2d - }; - - options = flotr.merge(type, options); - - // Fill - options.fillStyle = this.processColor( - type.fillColor || series.color, - {opacity: type.fillOpacity} - ); - - return options; - }, - /** - * Calculates the coordinates from a mouse event object. - * - * @param {Event} - * event - Mouse Event object. - * @return {Object} Object with coordinates of the mouse. - */ - getEventPosition: function (e){ - - var - d = document, - b = d.body, - de = d.documentElement, - axes = this.axes, - plotOffset = this.plotOffset, - lastMousePos = this.lastMousePos, - pointer = E.eventPointer(e), - dx = pointer.x - lastMousePos.pageX, - dy = pointer.y - lastMousePos.pageY, - r, rx, ry; - - if ('ontouchstart' in this.el) { - r = D.position(this.overlay); - rx = pointer.x - r.left - plotOffset.left; - ry = pointer.y - r.top - plotOffset.top; - } else { - r = this.overlay.getBoundingClientRect(); - rx = e.clientX - r.left - plotOffset.left - b.scrollLeft - de.scrollLeft; - ry = e.clientY - r.top - plotOffset.top - b.scrollTop - de.scrollTop; - } - - return { - x: axes.x.p2d(rx), - x2: axes.x2.p2d(rx), - y: axes.y.p2d(ry), - y2: axes.y2.p2d(ry), - relX: rx, - relY: ry, - dX: dx, - dY: dy, - absX: pointer.x, - absY: pointer.y, - pageX: pointer.x, - pageY: pointer.y - }; - }, - /** - * Observes the 'click' event and fires the 'flotr:click' event. - * - * @param {Event} - * event - 'click' Event object. - */ - clickHandler: function(event){ - if(this.ignoreClick){ - this.ignoreClick = false; - return this.ignoreClick; - } - E.fire(this.el, 'flotr:click', [this.getEventPosition(event), this]); - }, - /** - * Observes mouse movement over the graph area. Fires the 'flotr:mousemove' event. - * - * @param {Event} - * event - 'mousemove' Event object. - */ - mouseMoveHandler: function(event){ - if (this.mouseDownMoveHandler) return; - var pos = this.getEventPosition(event); - E.fire(this.el, 'flotr:mousemove', [event, pos, this]); - this.lastMousePos = pos; - }, - /** - * Observes the 'mousedown' event. - * - * @param {Event} - * event - 'mousedown' Event object. - */ - mouseDownHandler: function (event){ - - /* - * // @TODO Context menu? if(event.isRightClick()) { event.stop(); - * - * var overlay = this.overlay; overlay.hide(); - * - * function cancelContextMenu () { overlay.show(); E.stopObserving(document, 'mousemove', cancelContextMenu); } - * E.observe(document, 'mousemove', cancelContextMenu); return; } - */ - - if (this.mouseUpHandler) return; - this.mouseUpHandler = _.bind(function (e) { - E.stopObserving(document, 'mouseup', this.mouseUpHandler); - E.stopObserving(document, 'mousemove', this.mouseDownMoveHandler); - this.mouseDownMoveHandler = null; - this.mouseUpHandler = null; - // @TODO why? - // e.stop(); - E.fire(this.el, 'flotr:mouseup', [e, this]); - }, this); - this.mouseDownMoveHandler = _.bind(function (e) { - var pos = this.getEventPosition(e); - E.fire(this.el, 'flotr:mousemove', [event, pos, this]); - this.lastMousePos = pos; - }, this); - E.observe(document, 'mouseup', this.mouseUpHandler); - E.observe(document, 'mousemove', this.mouseDownMoveHandler); - E.fire(this.el, 'flotr:mousedown', [event, this]); - this.ignoreClick = false; - }, - drawTooltip: function(content, x, y, options) { - var mt = this.getMouseTrack(), - style = 'opacity:0.7;background-color:#000;color:#fff;display:none;position:absolute;padding:2px 8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;', - p = options.position, - m = options.margin, - plotOffset = this.plotOffset; - - if(x !== null && y !== null){ - if (!options.relative) { // absolute to the canvas - if(p.charAt(0) == 'n') style += 'top:' + (m + plotOffset.top) + 'px;bottom:auto;'; - else if(p.charAt(0) == 's') style += 'bottom:' + (m + plotOffset.bottom) + 'px;top:auto;'; - if(p.charAt(1) == 'e') style += 'right:' + (m + plotOffset.right) + 'px;left:auto;'; - else if(p.charAt(1) == 'w') style += 'left:' + (m + plotOffset.left) + 'px;right:auto;'; - } - else { // relative to the mouse - if(p.charAt(0) == 'n') style += 'bottom:' + (m - plotOffset.top - y + this.canvasHeight) + 'px;top:auto;'; - else if(p.charAt(0) == 's') style += 'top:' + (m + plotOffset.top + y) + 'px;bottom:auto;'; - if(p.charAt(1) == 'e') style += 'left:' + (m + plotOffset.left + x) + 'px;right:auto;'; - else if(p.charAt(1) == 'w') style += 'right:' + (m - plotOffset.left - x + this.canvasWidth) + 'px;left:auto;'; - } - - mt.style.cssText = style; - D.empty(mt); - D.insert(mt, content); - D.show(mt); - } - else { - D.hide(mt); - } - }, - - clip: function (ctx) { - - var - o = this.plotOffset, - w = this.canvasWidth, - h = this.canvasHeight; - - ctx = ctx || this.ctx; - - if ( - flotr.isIE && flotr.isIE < 9 && // IE w/o canvas - !flotr.isFlashCanvas // But not flash canvas - ) { - - // Do not clip excanvas on overlay context - // Allow hits to overflow. - if (ctx === this.octx) { - return; - } - - // Clipping for excanvas :-( - ctx.save(); - ctx.fillStyle = this.processColor(this.options.ieBackgroundColor); - ctx.fillRect(0, 0, w, o.top); - ctx.fillRect(0, 0, o.left, h); - ctx.fillRect(0, h - o.bottom, w, o.bottom); - ctx.fillRect(w - o.right, 0, o.right,h); - ctx.restore(); - } else { - ctx.clearRect(0, 0, w, o.top); - ctx.clearRect(0, 0, o.left, h); - ctx.clearRect(0, h - o.bottom, w, o.bottom); - ctx.clearRect(w - o.right, 0, o.right,h); - } - }, - - _initMembers: function() { - this._handles = []; - this.lastMousePos = {pageX: null, pageY: null }; - this.plotOffset = {left: 0, right: 0, top: 0, bottom: 0}; - this.ignoreClick = true; - this.prevHit = null; - }, - - _initGraphTypes: function() { - _.each(flotr.graphTypes, function(handler, graphType){ - this[graphType] = flotr.clone(handler); - }, this); - }, - - _initEvents: function () { - - var - el = this.el, - touchendHandler, movement, touchend; - - if ('ontouchstart' in el) { - - touchendHandler = _.bind(function (e) { - touchend = true; - E.stopObserving(document, 'touchend', touchendHandler); - E.fire(el, 'flotr:mouseup', [event, this]); - this.multitouches = null; - - if (!movement) { - this.clickHandler(e); - } - }, this); - - this.observe(this.overlay, 'touchstart', _.bind(function (e) { - movement = false; - touchend = false; - this.ignoreClick = false; - - if (e.touches && e.touches.length > 1) { - this.multitouches = e.touches; - } - - E.fire(el, 'flotr:mousedown', [event, this]); - this.observe(document, 'touchend', touchendHandler); - }, this)); - - this.observe(this.overlay, 'touchmove', _.bind(function (e) { - - var pos = this.getEventPosition(e); - - if (this.options.preventDefault) { - e.preventDefault(); - } - - movement = true; - - if (this.multitouches || (e.touches && e.touches.length > 1)) { - this.multitouches = e.touches; - } else { - if (!touchend) { - E.fire(el, 'flotr:mousemove', [event, pos, this]); - } - } - this.lastMousePos = pos; - }, this)); - - } else { - this. - observe(this.overlay, 'mousedown', _.bind(this.mouseDownHandler, this)). - observe(el, 'mousemove', _.bind(this.mouseMoveHandler, this)). - observe(this.overlay, 'click', _.bind(this.clickHandler, this)). - observe(el, 'mouseout', function (e) { - E.fire(el, 'flotr:mouseout', e); - }); - } - }, - - /** - * Initializes the canvas and it's overlay canvas element. When the browser is IE, this makes use of excanvas. The - * overlay canvas is inserted for displaying interactions. After the canvas elements are created, the elements are - * inserted into the container element. - */ - _initCanvas: function(){ - var el = this.el, - o = this.options, - children = el.children, - removedChildren = [], - child, i, - size, style; - - // Empty the el - for (i = children.length; i--;) { - child = children[i]; - if (!this.canvas && child.className === 'flotr-canvas') { - this.canvas = child; - } else if (!this.overlay && child.className === 'flotr-overlay') { - this.overlay = child; - } else { - removedChildren.push(child); - } - } - for (i = removedChildren.length; i--;) { - el.removeChild(removedChildren[i]); - } - - D.setStyles(el, {position: 'relative'}); // For positioning labels and overlay. - size = {}; - size.width = el.clientWidth; - size.height = el.clientHeight; - - if(size.width <= 0 || size.height <= 0 || o.resolution <= 0){ - throw 'Invalid dimensions for plot, width = ' + size.width + ', height = ' + size.height + ', resolution = ' + o.resolution; - } - - // Main canvas for drawing graph types - this.canvas = getCanvas(this.canvas, 'canvas'); - // Overlay canvas for interactive features - this.overlay = getCanvas(this.overlay, 'overlay'); - this.ctx = getContext(this.canvas); - this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); - this.octx = getContext(this.overlay); - this.octx.clearRect(0, 0, this.overlay.width, this.overlay.height); - this.canvasHeight = size.height; - this.canvasWidth = size.width; - this.textEnabled = !!this.ctx.drawText || !!this.ctx.fillText; // Enable text functions - - function getCanvas(canvas, name){ - if(!canvas){ - canvas = D.create('canvas'); - if (typeof FlashCanvas != "undefined" && typeof canvas.getContext === 'function') { - FlashCanvas.initElement(canvas); - this.isFlashCanvas = true; - } - canvas.className = 'flotr-'+name; - canvas.style.cssText = 'position:absolute;left:0px;top:0px;'; - D.insert(el, canvas); - } - _.each(size, function(size, attribute){ - D.show(canvas); - if (name == 'canvas' && canvas.getAttribute(attribute) === size) { - return; - } - canvas.setAttribute(attribute, size * o.resolution); - canvas.style[attribute] = size + 'px'; - }); - canvas.context_ = null; // Reset the ExCanvas context - return canvas; - } - - function getContext(canvas){ - if(window.G_vmlCanvasManager) window.G_vmlCanvasManager.initElement(canvas); // For ExCanvas - var context = canvas.getContext('2d'); - if(!window.G_vmlCanvasManager) context.scale(o.resolution, o.resolution); - return context; - } - }, - - _initPlugins: function(){ - // TODO Should be moved to flotr and mixed in. - _.each(flotr.plugins, function(plugin, name){ - _.each(plugin.callbacks, function(fn, c){ - this.observe(this.el, c, _.bind(fn, this)); - }, this); - this[name] = flotr.clone(plugin); - _.each(this[name], function(fn, p){ - if (_.isFunction(fn)) - this[name][p] = _.bind(fn, this); - }, this); - }, this); - }, - - /** - * Sets options and initializes some variables and color specific values, used by the constructor. - * - * @param {Object} - * opts - options object - */ - _initOptions: function(opts){ - var options = flotr.clone(flotr.defaultOptions); - options.x2axis = _.extend(_.clone(options.xaxis), options.x2axis); - options.y2axis = _.extend(_.clone(options.yaxis), options.y2axis); - this.options = flotr.merge(opts || {}, options); - - if (this.options.grid.minorVerticalLines === null && - this.options.xaxis.scaling === 'logarithmic') { - this.options.grid.minorVerticalLines = true; - } - if (this.options.grid.minorHorizontalLines === null && - this.options.yaxis.scaling === 'logarithmic') { - this.options.grid.minorHorizontalLines = true; - } - - E.fire(this.el, 'flotr:afterinitoptions', [this]); - - this.axes = flotr.Axis.getAxes(this.options); - - // Initialize some variables used throughout this function. - var assignedColors = [], - colors = [], - ln = this.series.length, - neededColors = this.series.length, - oc = this.options.colors, - usedColors = [], - variation = 0, - c, i, j, s; - - // Collect user-defined colors from series. - for(i = neededColors - 1; i > -1; --i){ - c = this.series[i].color; - if(c){ - --neededColors; - if(_.isNumber(c)) assignedColors.push(c); - else usedColors.push(flotr.Color.parse(c)); - } - } - - // Calculate the number of colors that need to be generated. - for(i = assignedColors.length - 1; i > -1; --i) - neededColors = Math.max(neededColors, assignedColors[i] + 1); - - // Generate needed number of colors. - for(i = 0; colors.length < neededColors;){ - c = (oc.length == i) ? new flotr.Color(100, 100, 100) : flotr.Color.parse(oc[i]); - - // Make sure each serie gets a different color. - var sign = variation % 2 == 1 ? -1 : 1, - factor = 1 + sign * Math.ceil(variation / 2) * 0.2; - c.scale(factor, factor, factor); - - /** - * @todo if we're getting too close to something else, we should probably skip this one - */ - colors.push(c); - - if(++i >= oc.length){ - i = 0; - ++variation; - } - } - - // Fill the options with the generated colors. - for(i = 0, j = 0; i < ln; ++i){ - s = this.series[i]; - - // Assign the color. - if (!s.color){ - s.color = colors[j++].toString(); - }else if(_.isNumber(s.color)){ - s.color = colors[s.color].toString(); - } - - // Every series needs an axis - if (!s.xaxis) s.xaxis = this.axes.x; - if (s.xaxis == 1) s.xaxis = this.axes.x; - else if (s.xaxis == 2) s.xaxis = this.axes.x2; - - if (!s.yaxis) s.yaxis = this.axes.y; - if (s.yaxis == 1) s.yaxis = this.axes.y; - else if (s.yaxis == 2) s.yaxis = this.axes.y2; - - // Apply missing options to the series. - for (var t in flotr.graphTypes){ - s[t] = _.extend(_.clone(this.options[t]), s[t]); - } - s.mouse = _.extend(_.clone(this.options.mouse), s.mouse); - - if (_.isUndefined(s.shadowSize)) s.shadowSize = this.options.shadowSize; - } - }, - - _setEl: function(el) { - if (!el) throw 'The target container doesn\'t exist'; - else if (el.graph instanceof Graph) el.graph.destroy(); - else if (!el.clientWidth) throw 'The target container must be visible'; - - el.graph = this; - this.el = el; - } -}; - -Flotr.Graph = Graph; - -})(); - -/** - * Flotr Axis Library - */ - -(function () { - -var - _ = Flotr._, - LOGARITHMIC = 'logarithmic'; - -function Axis (o) { - - this.orientation = 1; - this.offset = 0; - this.datamin = Number.MAX_VALUE; - this.datamax = -Number.MAX_VALUE; - - _.extend(this, o); -} - - -// Prototype -Axis.prototype = { - - setScale : function () { - var - length = this.length, - max = this.max, - min = this.min, - offset = this.offset, - orientation = this.orientation, - options = this.options, - logarithmic = options.scaling === LOGARITHMIC, - scale; - - if (logarithmic) { - scale = length / (log(max, options.base) - log(min, options.base)); - } else { - scale = length / (max - min); - } - this.scale = scale; - - // Logarithmic? - if (logarithmic) { - this.d2p = function (dataValue) { - return offset + orientation * (log(dataValue, options.base) - log(min, options.base)) * scale; - }; - this.p2d = function (pointValue) { - return exp((offset + orientation * pointValue) / scale + log(min, options.base), options.base); - }; - } else { - this.d2p = function (dataValue) { - return offset + orientation * (dataValue - min) * scale; - }; - this.p2d = function (pointValue) { - return (offset + orientation * pointValue) / scale + min; - }; - } - }, - - calculateTicks : function () { - var options = this.options; - - this.ticks = []; - this.minorTicks = []; - - // User Ticks - if(options.ticks){ - this._cleanUserTicks(options.ticks, this.ticks); - this._cleanUserTicks(options.minorTicks || [], this.minorTicks); - } - else { - if (options.mode == 'time') { - this._calculateTimeTicks(); - } else if (options.scaling === 'logarithmic') { - this._calculateLogTicks(); - } else { - this._calculateTicks(); - } - } - - // Ticks to strings - _.each(this.ticks, function (tick) { tick.label += ''; }); - _.each(this.minorTicks, function (tick) { tick.label += ''; }); - }, - - /** - * Calculates the range of an axis to apply autoscaling. - */ - calculateRange: function () { - - if (!this.used) return; - - var axis = this, - o = axis.options, - min = o.min !== null ? o.min : axis.datamin, - max = o.max !== null ? o.max : axis.datamax, - margin = o.autoscaleMargin; - - if (o.scaling == 'logarithmic') { - if (min <= 0) min = axis.datamin; - - // Let it widen later on - if (max <= 0) max = min; - } - - if (max == min) { - var widen = max ? 0.01 : 1.00; - if (o.min === null) min -= widen; - if (o.max === null) max += widen; - } - - if (o.scaling === 'logarithmic') { - if (min < 0) min = max / o.base; // Could be the result of widening - - var maxexp = Math.log(max); - if (o.base != Math.E) maxexp /= Math.log(o.base); - maxexp = Math.ceil(maxexp); - - var minexp = Math.log(min); - if (o.base != Math.E) minexp /= Math.log(o.base); - minexp = Math.ceil(minexp); - - axis.tickSize = Flotr.getTickSize(o.noTicks, minexp, maxexp, o.tickDecimals === null ? 0 : o.tickDecimals); - - // Try to determine a suitable amount of miniticks based on the length of a decade - if (o.minorTickFreq === null) { - if (maxexp - minexp > 10) - o.minorTickFreq = 0; - else if (maxexp - minexp > 5) - o.minorTickFreq = 2; - else - o.minorTickFreq = 5; - } - } else { - axis.tickSize = Flotr.getTickSize(o.noTicks, min, max, o.tickDecimals); - } - - axis.min = min; - axis.max = max; // extendRange may use axis.min or axis.max, so it should be set before it is caled - - // Autoscaling. @todo This probably fails with log scale. Find a testcase and fix it - if(o.min === null && o.autoscale){ - axis.min -= axis.tickSize * margin; - // Make sure we don't go below zero if all values are positive. - if(axis.min < 0 && axis.datamin >= 0) axis.min = 0; - axis.min = axis.tickSize * Math.floor(axis.min / axis.tickSize); - } - - if(o.max === null && o.autoscale){ - axis.max += axis.tickSize * margin; - if(axis.max > 0 && axis.datamax <= 0 && axis.datamax != axis.datamin) axis.max = 0; - axis.max = axis.tickSize * Math.ceil(axis.max / axis.tickSize); - } - - if (axis.min == axis.max) axis.max = axis.min + 1; - }, - - calculateTextDimensions : function (T, options) { - - var maxLabel = '', - length, - i; - - if (this.options.showLabels) { - for (i = 0; i < this.ticks.length; ++i) { - length = this.ticks[i].label.length; - if (length > maxLabel.length){ - maxLabel = this.ticks[i].label; - } - } - } - - this.maxLabel = T.dimensions( - maxLabel, - {size:options.fontSize, angle: Flotr.toRad(this.options.labelsAngle)}, - 'font-size:smaller;', - 'flotr-grid-label' - ); - - this.titleSize = T.dimensions( - this.options.title, - {size:options.fontSize*1.2, angle: Flotr.toRad(this.options.titleAngle)}, - 'font-weight:bold;', - 'flotr-axis-title' - ); - }, - - _cleanUserTicks : function (ticks, axisTicks) { - - var axis = this, options = this.options, - v, i, label, tick; - - if(_.isFunction(ticks)) ticks = ticks({min : axis.min, max : axis.max}); - - for(i = 0; i < ticks.length; ++i){ - tick = ticks[i]; - if(typeof(tick) === 'object'){ - v = tick[0]; - label = (tick.length > 1) ? tick[1] : options.tickFormatter(v, {min : axis.min, max : axis.max}); - } else { - v = tick; - label = options.tickFormatter(v, {min : this.min, max : this.max}); - } - axisTicks[i] = { v: v, label: label }; - } - }, - - _calculateTimeTicks : function () { - this.ticks = Flotr.Date.generator(this); - }, - - _calculateLogTicks : function () { - - var axis = this, - o = axis.options, - v, - decadeStart; - - var max = Math.log(axis.max); - if (o.base != Math.E) max /= Math.log(o.base); - max = Math.ceil(max); - - var min = Math.log(axis.min); - if (o.base != Math.E) min /= Math.log(o.base); - min = Math.ceil(min); - - for (i = min; i < max; i += axis.tickSize) { - decadeStart = (o.base == Math.E) ? Math.exp(i) : Math.pow(o.base, i); - // Next decade begins here: - var decadeEnd = decadeStart * ((o.base == Math.E) ? Math.exp(axis.tickSize) : Math.pow(o.base, axis.tickSize)); - var stepSize = (decadeEnd - decadeStart) / o.minorTickFreq; - - axis.ticks.push({v: decadeStart, label: o.tickFormatter(decadeStart, {min : axis.min, max : axis.max})}); - for (v = decadeStart + stepSize; v < decadeEnd; v += stepSize) - axis.minorTicks.push({v: v, label: o.tickFormatter(v, {min : axis.min, max : axis.max})}); - } - - // Always show the value at the would-be start of next decade (end of this decade) - decadeStart = (o.base == Math.E) ? Math.exp(i) : Math.pow(o.base, i); - axis.ticks.push({v: decadeStart, label: o.tickFormatter(decadeStart, {min : axis.min, max : axis.max})}); - }, - - _calculateTicks : function () { - - var axis = this, - o = axis.options, - tickSize = axis.tickSize, - min = axis.min, - max = axis.max, - start = tickSize * Math.ceil(min / tickSize), // Round to nearest multiple of tick size. - decimals, - minorTickSize, - v, v2, - i, j; - - if (o.minorTickFreq) - minorTickSize = tickSize / o.minorTickFreq; - - // Then store all possible ticks. - for (i = 0; (v = v2 = start + i * tickSize) <= max; ++i){ - - // Round (this is always needed to fix numerical instability). - decimals = o.tickDecimals; - if (decimals === null) decimals = 1 - Math.floor(Math.log(tickSize) / Math.LN10); - if (decimals < 0) decimals = 0; - - v = v.toFixed(decimals); - axis.ticks.push({ v: v, label: o.tickFormatter(v, {min : axis.min, max : axis.max}) }); - - if (o.minorTickFreq) { - for (j = 0; j < o.minorTickFreq && (i * tickSize + j * minorTickSize) < max; ++j) { - v = v2 + j * minorTickSize; - axis.minorTicks.push({ v: v, label: o.tickFormatter(v, {min : axis.min, max : axis.max}) }); - } - } - } - - } -}; - - -// Static Methods -_.extend(Axis, { - getAxes : function (options) { - return { - x: new Axis({options: options.xaxis, n: 1, length: this.plotWidth}), - x2: new Axis({options: options.x2axis, n: 2, length: this.plotWidth}), - y: new Axis({options: options.yaxis, n: 1, length: this.plotHeight, offset: this.plotHeight, orientation: -1}), - y2: new Axis({options: options.y2axis, n: 2, length: this.plotHeight, offset: this.plotHeight, orientation: -1}) - }; - } -}); - - -// Helper Methods - - -function log (value, base) { - value = Math.log(Math.max(value, Number.MIN_VALUE)); - if (base !== Math.E) - value /= Math.log(base); - return value; -} - -function exp (value, base) { - return (base === Math.E) ? Math.exp(value) : Math.pow(base, value); -} - -Flotr.Axis = Axis; - -})(); - -/** - * Flotr Series Library - */ - -(function () { - -var - _ = Flotr._; - -function Series (o) { - _.extend(this, o); -} - -Series.prototype = { - - getRange: function () { - - var - data = this.data, - length = data.length, - xmin = Number.MAX_VALUE, - ymin = Number.MAX_VALUE, - xmax = -Number.MAX_VALUE, - ymax = -Number.MAX_VALUE, - xused = false, - yused = false, - x, y, i; - - if (length < 0 || this.hide) return false; - - for (i = 0; i < length; i++) { - x = data[i][0]; - y = data[i][1]; - if (x !== null) { - if (x < xmin) { xmin = x; xused = true; } - if (x > xmax) { xmax = x; xused = true; } - } - if (y !== null) { - if (y < ymin) { ymin = y; yused = true; } - if (y > ymax) { ymax = y; yused = true; } - } - } - - return { - xmin : xmin, - xmax : xmax, - ymin : ymin, - ymax : ymax, - xused : xused, - yused : yused - }; - } -}; - -_.extend(Series, { - /** - * Collects dataseries from input and parses the series into the right format. It returns an Array of Objects each - * having at least the 'data' key set. - * - * @param {Array, - * Object} data - Object or array of dataseries - * @return {Array} Array of Objects parsed into the right format ({(...,) data: [[x1,y1], [x2,y2], ...] (, ...)}) - */ - getSeries: function(data){ - return _.map(data, function(s){ - var series; - if (s.data) { - series = new Series(); - _.extend(series, s); - } else { - series = new Series({data:s}); - } - return series; - }); - } -}); - -Flotr.Series = Series; - -})(); - -/** Lines * */ -Flotr.addType('lines', { - options: { - show: false, // => setting to true will show lines, false will hide - lineWidth: 2, // => line width in pixels - fill: false, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillBorder: false, // => draw a border around the fill - fillColor: null, // => fill color - fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - steps: false, // => draw steps - stacked: false // => setting to true will show stacked lines, false will show normal lines - }, - - stack : { - values : [] - }, - - /** - * Draws lines series in the canvas element. - * - * @param {Object} - * options - */ - draw : function (options) { - - var - context = options.context, - lineWidth = options.lineWidth, - shadowSize = options.shadowSize, - offset; - - context.save(); - context.lineJoin = 'round'; - - if (shadowSize) { - - context.lineWidth = shadowSize / 2; - offset = lineWidth / 2 + context.lineWidth / 2; - - // @TODO do this instead with a linear gradient - context.strokeStyle = "rgba(0,0,0,0.1)"; - this.plot(options, offset + shadowSize / 2, false); - - context.strokeStyle = "rgba(0,0,0,0.2)"; - this.plot(options, offset, false); - } - - context.lineWidth = lineWidth; - context.strokeStyle = options.color; - - this.plot(options, 0, true); - - context.restore(); - }, - - plot : function (options, shadowOffset, incStack) { - - var - context = options.context, - width = options.width, - height = options.height, - xScale = options.xScale, - yScale = options.yScale, - data = options.data, - stack = options.stacked ? this.stack : false, - length = data.length - 1, - prevx = null, - prevy = null, - zero = yScale(0), - start = null, - x1, x2, y1, y2, stack1, stack2, i; - - if (length < 1) return; - - context.beginPath(); - - for (i = 0; i < length; ++i) { - - // To allow empty values - if (data[i][1] === null || data[i+1][1] === null) { - if (options.fill) { - if (i > 0 && data[i][1] !== null) { - context.stroke(); - fill(); - start = null; - context.closePath(); - context.beginPath(); - } - } - continue; - } - - // Zero is infinity for log scales - // TODO handle zero for logarithmic - // if (xa.options.scaling === 'logarithmic' && (data[i][0] <= 0 || data[i+1][0] <= 0)) continue; - // if (ya.options.scaling === 'logarithmic' && (data[i][1] <= 0 || data[i+1][1] <= 0)) continue; - - x1 = xScale(data[i][0]); - x2 = xScale(data[i+1][0]); - - if (start === null) start = data[i]; - - if (stack) { - stack1 = stack.values[data[i][0]] || 0; - stack2 = stack.values[data[i+1][0]] || stack.values[data[i][0]] || 0; - y1 = yScale(data[i][1] + stack1); - y2 = yScale(data[i+1][1] + stack2); - if (incStack) { - data[i].y0 = stack1; - stack.values[data[i][0]] = data[i][1] + stack1; - if (i == length-1) { - data[i+1].y0 = stack2; - stack.values[data[i+1][0]] = data[i+1][1] + stack2; - } - } - } else { - y1 = yScale(data[i][1]); - y2 = yScale(data[i+1][1]); - } - - if ( - (y1 > height && y2 > height) || - (y1 < 0 && y2 < 0) || - (x1 < 0 && x2 < 0) || - (x1 > width && x2 > width) - ) continue; - - if ((prevx != x1) || (prevy != y1 + shadowOffset)) { - context.moveTo(x1, y1 + shadowOffset); - } - - prevx = x2; - prevy = y2 + shadowOffset; - if (options.steps) { - context.lineTo(prevx + shadowOffset / 2, y1 + shadowOffset); - context.lineTo(prevx + shadowOffset / 2, prevy); - } else { - context.lineTo(prevx, prevy); - } - } - - if (!options.fill || options.fill && !options.fillBorder) context.stroke(); - - fill(); - - function fill () { - // TODO stacked lines - if(!shadowOffset && options.fill && start){ - x1 = xScale(start[0]); - context.fillStyle = options.fillStyle; - context.lineTo(x2, zero); - context.lineTo(x1, zero); - context.lineTo(x1, yScale(start[1])); - context.fill(); - if (options.fillBorder) { - context.stroke(); - } - } - } - - context.closePath(); - }, - - // Perform any pre-render precalculations (this should be run on data first) - // - Pie chart total for calculating measures - // - Stacks for lines and bars - // precalculate : function () { - // } - // - // - // Get any bounds after pre calculation (axis can fetch this if does not have explicit min/max) - // getBounds : function () { - // } - // getMin : function () { - // } - // getMax : function () { - // } - // - // - // Padding around rendered elements - // getPadding : function () { - // } - - extendYRange : function (axis, data, options, lines) { - - var o = axis.options; - - // If stacked and auto-min - if (options.stacked && ((!o.max && o.max !== 0) || (!o.min && o.min !== 0))) { - - var - newmax = axis.max, - newmin = axis.min, - positiveSums = lines.positiveSums || {}, - negativeSums = lines.negativeSums || {}, - x, j; - - for (j = 0; j < data.length; j++) { - - x = data[j][0] + ''; - - // Positive - if (data[j][1] > 0) { - positiveSums[x] = (positiveSums[x] || 0) + data[j][1]; - newmax = Math.max(newmax, positiveSums[x]); - } - - // Negative - else { - negativeSums[x] = (negativeSums[x] || 0) + data[j][1]; - newmin = Math.min(newmin, negativeSums[x]); - } - } - - lines.negativeSums = negativeSums; - lines.positiveSums = positiveSums; - - axis.max = newmax; - axis.min = newmin; - } - - if (options.steps) { - - this.hit = function (options) { - var - data = options.data, - args = options.args, - yScale = options.yScale, - mouse = args[0], - length = data.length, - n = args[1], - x = options.xInverse(mouse.relX), - relY = mouse.relY, - i; - - for (i = 0; i < length - 1; i++) { - if (x >= data[i][0] && x <= data[i+1][0]) { - if (Math.abs(yScale(data[i][1]) - relY) < 8) { - n.x = data[i][0]; - n.y = data[i][1]; - n.index = i; - n.seriesIndex = options.index; - } - break; - } - } - }; - - this.drawHit = function (options) { - var - context = options.context, - args = options.args, - data = options.data, - xScale = options.xScale, - index = args.index, - x = xScale(args.x), - y = options.yScale(args.y), - x2; - - if (data.length - 1 > index) { - x2 = options.xScale(data[index + 1][0]); - context.save(); - context.strokeStyle = options.color; - context.lineWidth = options.lineWidth; - context.beginPath(); - context.moveTo(x, y); - context.lineTo(x2, y); - context.stroke(); - context.closePath(); - context.restore(); - } - }; - - this.clearHit = function (options) { - var - context = options.context, - args = options.args, - data = options.data, - xScale = options.xScale, - width = options.lineWidth, - index = args.index, - x = xScale(args.x), - y = options.yScale(args.y), - x2; - - if (data.length - 1 > index) { - x2 = options.xScale(data[index + 1][0]); - context.clearRect(x - width, y - width, x2 - x + 2 * width, 2 * width); - } - }; - } - } - -}); - -/** Bars * */ -Flotr.addType('bars', { - - options: { - show: false, // => setting to true will show bars, false will hide - lineWidth: 2, // => in pixels - barWidth: 1, // => in units of the x axis - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillColor: null, // => fill color - fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - horizontal: false, // => horizontal bars (x and y inverted) - stacked: false, // => stacked bar charts - centered: true, // => center the bars to their x axis value - topPadding: 0.1, // => top padding in percent - grouped: false // => groups bars together which share x value, hit not supported. - }, - - stack : { - positive : [], - negative : [], - _positive : [], // Shadow - _negative : [] // Shadow - }, - - draw : function (options) { - var - context = options.context; - - this.current += 1; - - context.save(); - context.lineJoin = 'miter'; - // @TODO linewidth not interpreted the right way. - context.lineWidth = options.lineWidth; - context.strokeStyle = options.color; - if (options.fill) context.fillStyle = options.fillStyle; - - this.plot(options); - - context.restore(); - }, - - plot : function (options) { - - var - data = options.data, - context = options.context, - shadowSize = options.shadowSize, - i, geometry, left, top, width, height; - - if (data.length < 1) return; - - this.translate(context, options.horizontal); - - for (i = 0; i < data.length; i++) { - - geometry = this.getBarGeometry(data[i][0], data[i][1], options); - if (geometry === null) continue; - - left = geometry.left; - top = geometry.top; - width = geometry.width; - height = geometry.height; - - if (options.fill) context.fillRect(left, top, width, height); - if (shadowSize) { - context.save(); - context.fillStyle = 'rgba(0,0,0,0.05)'; - context.fillRect(left + shadowSize, top + shadowSize, width, height); - context.restore(); - } - if (options.lineWidth) { - context.strokeRect(left, top, width, height); - } - } - }, - - translate : function (context, horizontal) { - if (horizontal) { - context.rotate(-Math.PI / 2); - context.scale(-1, 1); - } - }, - - getBarGeometry : function (x, y, options) { - - var - horizontal = options.horizontal, - barWidth = options.barWidth, - centered = options.centered, - stack = options.stacked ? this.stack : false, - lineWidth = options.lineWidth, - bisection = centered ? barWidth / 2 : 0, - xScale = horizontal ? options.yScale : options.xScale, - yScale = horizontal ? options.xScale : options.yScale, - xValue = horizontal ? y : x, - yValue = horizontal ? x : y, - stackOffset = 0, - stackValue, left, right, top, bottom; - - if (options.grouped) { - this.current / this.groups; - xValue = xValue - bisection; - barWidth = barWidth / this.groups; - bisection = barWidth / 2; - xValue = xValue + barWidth * this.current - bisection; - } - - // Stacked bars - if (stack) { - stackValue = yValue > 0 ? stack.positive : stack.negative; - stackOffset = stackValue[xValue] || stackOffset; - stackValue[xValue] = stackOffset + yValue; - } - - left = xScale(xValue - bisection); - right = xScale(xValue + barWidth - bisection); - top = yScale(yValue + stackOffset); - bottom = yScale(stackOffset); - - // TODO for test passing... probably looks better without this - if (bottom < 0) bottom = 0; - - // TODO Skipping... - // if (right < xa.min || left > xa.max || top < ya.min || bottom > ya.max) continue; - - return (x === null || y === null) ? null : { - x : xValue, - y : yValue, - xScale : xScale, - yScale : yScale, - top : top, - left : Math.min(left, right) - lineWidth / 2, - width : Math.abs(right - left) - lineWidth, - height : bottom - top - }; - }, - - hit : function (options) { - var - data = options.data, - args = options.args, - mouse = args[0], - n = args[1], - x = options.xInverse(mouse.relX), - y = options.yInverse(mouse.relY), - hitGeometry = this.getBarGeometry(x, y, options), - width = hitGeometry.width / 2, - left = hitGeometry.left, - height = hitGeometry.y, - geometry, i; - - for (i = data.length; i--;) { - geometry = this.getBarGeometry(data[i][0], data[i][1], options); - if ( - // Height: - ( - // Positive Bars: - (height > 0 && height < geometry.y) || - // Negative Bars: - (height < 0 && height > geometry.y) - ) && - // Width: - (Math.abs(left - geometry.left) < width) - ) { - n.x = data[i][0]; - n.y = data[i][1]; - n.index = i; - n.seriesIndex = options.index; - } - } - }, - - drawHit : function (options) { - // TODO hits for stacked bars; implement using calculateStack option? - var - context = options.context, - args = options.args, - geometry = this.getBarGeometry(args.x, args.y, options), - left = geometry.left, - top = geometry.top, - width = geometry.width, - height = geometry.height; - - context.save(); - context.strokeStyle = options.color; - context.lineWidth = options.lineWidth; - this.translate(context, options.horizontal); - - // Draw highlight - context.beginPath(); - context.moveTo(left, top + height); - context.lineTo(left, top); - context.lineTo(left + width, top); - context.lineTo(left + width, top + height); - if (options.fill) { - context.fillStyle = options.fillStyle; - context.fill(); - } - context.stroke(); - context.closePath(); - - context.restore(); - }, - - clearHit: function (options) { - var - context = options.context, - args = options.args, - geometry = this.getBarGeometry(args.x, args.y, options), - left = geometry.left, - width = geometry.width, - top = geometry.top, - height = geometry.height, - lineWidth = 2 * options.lineWidth; - - context.save(); - this.translate(context, options.horizontal); - context.clearRect( - left - lineWidth, - Math.min(top, top + height) - lineWidth, - width + 2 * lineWidth, - Math.abs(height) + 2 * lineWidth - ); - context.restore(); - }, - - extendXRange : function (axis, data, options, bars) { - this._extendRange(axis, data, options, bars); - this.groups = (this.groups + 1) || 1; - this.current = 0; - }, - - extendYRange : function (axis, data, options, bars) { - this._extendRange(axis, data, options, bars); - }, - _extendRange: function (axis, data, options, bars) { - - var - max = axis.options.max; - - if (_.isNumber(max) || _.isString(max)) return; - - var - newmin = axis.min, - newmax = axis.max, - horizontal = options.horizontal, - orientation = axis.orientation, - positiveSums = this.positiveSums || {}, - negativeSums = this.negativeSums || {}, - value, datum, index, j; - - // Sides of bars - if ((orientation == 1 && !horizontal) || (orientation == -1 && horizontal)) { - if (options.centered) { - newmax = Math.max(axis.datamax + options.barWidth, newmax); - newmin = Math.min(axis.datamin - options.barWidth, newmin); - } - } - - if (options.stacked && - ((orientation == 1 && horizontal) || (orientation == -1 && !horizontal))){ - - for (j = data.length; j--;) { - value = data[j][(orientation == 1 ? 1 : 0)]+''; - datum = data[j][(orientation == 1 ? 0 : 1)]; - - // Positive - if (datum > 0) { - positiveSums[value] = (positiveSums[value] || 0) + datum; - newmax = Math.max(newmax, positiveSums[value]); - } - - // Negative - else { - negativeSums[value] = (negativeSums[value] || 0) + datum; - newmin = Math.min(newmin, negativeSums[value]); - } - } - } - - // End of bars - if ((orientation == 1 && horizontal) || (orientation == -1 && !horizontal)) { - if (options.topPadding && (axis.max === axis.datamax || (options.stacked && this.stackMax !== newmax))) { - newmax += options.topPadding * (newmax - newmin); - } - } - - this.stackMin = newmin; - this.stackMax = newmax; - this.negativeSums = negativeSums; - this.positiveSums = positiveSums; - - axis.max = newmax; - axis.min = newmin; - } - -}); - -/** Bubbles * */ -Flotr.addType('bubbles', { - options: { - show: false, // => setting to true will show radar chart, false will hide - lineWidth: 2, // => line width in pixels - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - baseRadius: 2 // => ratio of the radar, against the plot size - }, - draw : function (options) { - var - context = options.context, - shadowSize = options.shadowSize; - - context.save(); - context.lineWidth = options.lineWidth; - - // Shadows - context.fillStyle = 'rgba(0,0,0,0.05)'; - context.strokeStyle = 'rgba(0,0,0,0.05)'; - this.plot(options, shadowSize / 2); - context.strokeStyle = 'rgba(0,0,0,0.1)'; - this.plot(options, shadowSize / 4); - - // Chart - context.strokeStyle = options.color; - context.fillStyle = options.fillStyle; - this.plot(options); - - context.restore(); - }, - plot : function (options, offset) { - - var - data = options.data, - context = options.context, - geometry, - i, x, y, z; - - offset = offset || 0; - - for (i = 0; i < data.length; ++i){ - - geometry = this.getGeometry(data[i], options); - - context.beginPath(); - context.arc(geometry.x + offset, geometry.y + offset, geometry.z, 0, 2 * Math.PI, true); - context.stroke(); - if (options.fill) context.fill(); - context.closePath(); - } - }, - getGeometry : function (point, options) { - return { - x : options.xScale(point[0]), - y : options.yScale(point[1]), - z : point[2] * options.baseRadius - }; - }, - hit : function (options) { - var - data = options.data, - args = options.args, - mouse = args[0], - n = args[1], - relX = mouse.relX, - relY = mouse.relY, - distance, - geometry, - dx, dy; - - n.best = n.best || Number.MAX_VALUE; - - for (i = data.length; i--;) { - geometry = this.getGeometry(data[i], options); - - dx = geometry.x - relX; - dy = geometry.y - relY; - distance = Math.sqrt(dx * dx + dy * dy); - - if (distance < geometry.z && geometry.z < n.best) { - n.x = data[i][0]; - n.y = data[i][1]; - n.index = i; - n.seriesIndex = options.index; - n.best = geometry.z; - } - } - }, - drawHit : function (options) { - - var - context = options.context, - geometry = this.getGeometry(options.data[options.args.index], options); - - context.save(); - context.lineWidth = options.lineWidth; - context.fillStyle = options.fillStyle; - context.strokeStyle = options.color; - context.beginPath(); - context.arc(geometry.x, geometry.y, geometry.z, 0, 2 * Math.PI, true); - context.fill(); - context.stroke(); - context.closePath(); - context.restore(); - }, - clearHit : function (options) { - - var - context = options.context, - geometry = this.getGeometry(options.data[options.args.index], options), - offset = geometry.z + options.lineWidth; - - context.save(); - context.clearRect( - geometry.x - offset, - geometry.y - offset, - 2 * offset, - 2 * offset - ); - context.restore(); - } - // TODO Add a hit calculation method (like pie) -}); - -/** Candles * */ -Flotr.addType('candles', { - options: { - show: false, // => setting to true will show candle sticks, false will hide - lineWidth: 1, // => in pixels - wickLineWidth: 1, // => in pixels - candleWidth: 0.6, // => in units of the x axis - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - upFillColor: '#00A8F0',// => up sticks fill color - downFillColor: '#CB4B4B',// => down sticks fill color - fillOpacity: 0.5, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - barcharts: false // => draw as barcharts (not standard bars but financial barcharts) - }, - - draw : function (options) { - - var - context = options.context; - - context.save(); - context.lineJoin = 'miter'; - context.lineCap = 'butt'; - // @TODO linewidth not interpreted the right way. - context.lineWidth = options.wickLineWidth || options.lineWidth; - - this.plot(options); - - context.restore(); - }, - - plot : function (options) { - - var - data = options.data, - context = options.context, - xScale = options.xScale, - yScale = options.yScale, - width = options.candleWidth / 2, - shadowSize = options.shadowSize, - lineWidth = options.lineWidth, - wickLineWidth = options.wickLineWidth, - pixelOffset = (wickLineWidth % 2) / 2, - color, - datum, x, y, - open, high, low, close, - left, right, bottom, top, bottom2, top2, reverseLines, - i; - - if (data.length < 1) return; - - for (i = 0; i < data.length; i++) { - datum = data[i]; - x = datum[0]; - open = datum[1]; - high = datum[2]; - low = datum[3]; - close = datum[4]; - left = xScale(x - width); - right = xScale(x + width); - bottom = yScale(low); - top = yScale(high); - bottom2 = yScale(Math.min(open, close)); - top2 = yScale(Math.max(open, close)); - - /* - * // TODO skipping if(right < xa.min || left > xa.max || top < ya.min || bottom > ya.max) continue; - */ - - color = options[open > close ? 'downFillColor' : 'upFillColor']; - - // Fill the candle. - if (options.fill && !options.barcharts) { - context.fillStyle = 'rgba(0,0,0,0.05)'; - context.fillRect(left + shadowSize, top2 + shadowSize, right - left, bottom2 - top2); - context.save(); - context.globalAlpha = options.fillOpacity; - context.fillStyle = color; - context.fillRect(left, top2 + lineWidth, right - left, bottom2 - top2); - context.restore(); - } - - // Draw candle outline/border, high, low. - if (lineWidth || wickLineWidth) { - - x = Math.floor((left + right) / 2) + pixelOffset; - - context.strokeStyle = color; - context.beginPath(); - - if (options.barcharts) { - context.moveTo(x, Math.floor(top + lineWidth)); - context.lineTo(x, Math.floor(bottom + lineWidth)); - - reverseLines = open < close; - context.moveTo(reverseLines ? right : left, Math.floor(top2 + lineWidth)); - context.lineTo(x, Math.floor(top2 + lineWidth)); - context.moveTo(x, Math.floor(bottom2 + lineWidth)); - context.lineTo(reverseLines ? left : right, Math.floor(bottom2 + lineWidth)); - } else { - context.strokeRect(left, top2 + lineWidth, right - left, bottom2 - top2); - context.moveTo(x, Math.floor(top2 + lineWidth)); - context.lineTo(x, Math.floor(top + lineWidth)); - context.moveTo(x, Math.floor(bottom2 + lineWidth)); - context.lineTo(x, Math.floor(bottom + lineWidth)); - } - - context.closePath(); - context.stroke(); - } - } - }, - - hit : function (options) { - var - xScale = options.xScale, - yScale = options.yScale, - data = options.data, - args = options.args, - mouse = args[0], - width = options.candleWidth / 2, - n = args[1], - x = mouse.relX, - y = mouse.relY, - length = data.length, - i, datum, - high, low, - left, right, top, bottom; - - for (i = 0; i < length; i++) { - datum = data[i], - high = datum[2]; - low = datum[3]; - left = xScale(datum[0] - width); - right = xScale(datum[0] + width); - bottom = yScale(low); - top = yScale(high); - - if (x > left && x < right && y > top && y < bottom) { - n.x = datum[0]; - n.index = i; - n.seriesIndex = options.index; - return; - } - } - }, - - drawHit : function (options) { - var - context = options.context; - context.save(); - this.plot( - _.defaults({ - fill : !!options.fillColor, - upFillColor : options.color, - downFillColor : options.color, - data : [options.data[options.args.index]] - }, options) - ); - context.restore(); - }, - - clearHit : function (options) { - var - args = options.args, - context = options.context, - xScale = options.xScale, - yScale = options.yScale, - lineWidth = options.lineWidth, - width = options.candleWidth / 2, - bar = options.data[args.index], - left = xScale(bar[0] - width) - lineWidth, - right = xScale(bar[0] + width) + lineWidth, - top = yScale(bar[2]), - bottom = yScale(bar[3]) + lineWidth; - context.clearRect(left, top, right - left, bottom - top); - }, - - extendXRange: function (axis, data, options) { - if (axis.options.max === null) { - axis.max = Math.max(axis.datamax + 0.5, axis.max); - axis.min = Math.min(axis.datamin - 0.5, axis.min); - } - } -}); - -/*********************************************************************************************************************** - * Gantt Base on data in form [s,y,d] where: y - executor or simply y value s - task start value d - task duration - **********************************************************************************************************************/ -Flotr.addType('gantt', { - options: { - show: false, // => setting to true will show gantt, false will hide - lineWidth: 2, // => in pixels - barWidth: 1, // => in units of the x axis - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillColor: null, // => fill color - fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - centered: true // => center the bars to their x axis value - }, - /** - * Draws gantt series in the canvas element. - * - * @param {Object} - * series - Series with options.gantt.show = true. - */ - draw: function(series) { - var ctx = this.ctx, - bw = series.gantt.barWidth, - lw = Math.min(series.gantt.lineWidth, bw); - - ctx.save(); - ctx.translate(this.plotOffset.left, this.plotOffset.top); - ctx.lineJoin = 'miter'; - - /** - * @todo linewidth not interpreted the right way. - */ - ctx.lineWidth = lw; - ctx.strokeStyle = series.color; - - ctx.save(); - this.gantt.plotShadows(series, bw, 0, series.gantt.fill); - ctx.restore(); - - if(series.gantt.fill){ - var color = series.gantt.fillColor || series.color; - ctx.fillStyle = this.processColor(color, {opacity: series.gantt.fillOpacity}); - } - - this.gantt.plot(series, bw, 0, series.gantt.fill); - ctx.restore(); - }, - plot: function(series, barWidth, offset, fill){ - var data = series.data; - if(data.length < 1) return; - - var xa = series.xaxis, - ya = series.yaxis, - ctx = this.ctx, i; - - for(i = 0; i < data.length; i++){ - var y = data[i][0], - s = data[i][1], - d = data[i][2], - drawLeft = true, drawTop = true, drawRight = true; - - if (s === null || d === null) continue; - - var left = s, - right = s + d, - bottom = y - (series.gantt.centered ? barWidth/2 : 0), - top = y + barWidth - (series.gantt.centered ? barWidth/2 : 0); - - if(right < xa.min || left > xa.max || top < ya.min || bottom > ya.max) - continue; - - if(left < xa.min){ - left = xa.min; - drawLeft = false; - } - - if(right > xa.max){ - right = xa.max; - if (xa.lastSerie != series) - drawTop = false; - } - - if(bottom < ya.min) - bottom = ya.min; - - if(top > ya.max){ - top = ya.max; - if (ya.lastSerie != series) - drawTop = false; - } - - /** - * Fill the bar. - */ - if(fill){ - ctx.beginPath(); - ctx.moveTo(xa.d2p(left), ya.d2p(bottom) + offset); - ctx.lineTo(xa.d2p(left), ya.d2p(top) + offset); - ctx.lineTo(xa.d2p(right), ya.d2p(top) + offset); - ctx.lineTo(xa.d2p(right), ya.d2p(bottom) + offset); - ctx.fill(); - ctx.closePath(); - } - - /** - * Draw bar outline/border. - */ - if(series.gantt.lineWidth && (drawLeft || drawRight || drawTop)){ - ctx.beginPath(); - ctx.moveTo(xa.d2p(left), ya.d2p(bottom) + offset); - - ctx[drawLeft ?'lineTo':'moveTo'](xa.d2p(left), ya.d2p(top) + offset); - ctx[drawTop ?'lineTo':'moveTo'](xa.d2p(right), ya.d2p(top) + offset); - ctx[drawRight?'lineTo':'moveTo'](xa.d2p(right), ya.d2p(bottom) + offset); - - ctx.stroke(); - ctx.closePath(); - } - } - }, - plotShadows: function(series, barWidth, offset){ - var data = series.data; - if(data.length < 1) return; - - var i, y, s, d, - xa = series.xaxis, - ya = series.yaxis, - ctx = this.ctx, - sw = this.options.shadowSize; - - for(i = 0; i < data.length; i++){ - y = data[i][0]; - s = data[i][1]; - d = data[i][2]; - - if (s === null || d === null) continue; - - var left = s, - right = s + d, - bottom = y - (series.gantt.centered ? barWidth/2 : 0), - top = y + barWidth - (series.gantt.centered ? barWidth/2 : 0); - - if(right < xa.min || left > xa.max || top < ya.min || bottom > ya.max) - continue; - - if(left < xa.min) left = xa.min; - if(right > xa.max) right = xa.max; - if(bottom < ya.min) bottom = ya.min; - if(top > ya.max) top = ya.max; - - var width = xa.d2p(right)-xa.d2p(left)-((xa.d2p(right)+sw <= this.plotWidth) ? 0 : sw); - var height = ya.d2p(bottom)-ya.d2p(top)-((ya.d2p(bottom)+sw <= this.plotHeight) ? 0 : sw ); - - ctx.fillStyle = 'rgba(0,0,0,0.05)'; - ctx.fillRect(Math.min(xa.d2p(left)+sw, this.plotWidth), Math.min(ya.d2p(top)+sw, this.plotHeight), width, height); - } - }, - extendXRange: function(axis) { - if(axis.options.max === null){ - var newmin = axis.min, - newmax = axis.max, - i, j, x, s, g, - stackedSumsPos = {}, - stackedSumsNeg = {}, - lastSerie = null; - - for(i = 0; i < this.series.length; ++i){ - s = this.series[i]; - g = s.gantt; - - if(g.show && s.xaxis == axis) { - for (j = 0; j < s.data.length; j++) { - if (g.show) { - y = s.data[j][0]+''; - stackedSumsPos[y] = Math.max((stackedSumsPos[y] || 0), s.data[j][1]+s.data[j][2]); - lastSerie = s; - } - } - for (j in stackedSumsPos) { - newmax = Math.max(stackedSumsPos[j], newmax); - } - } - } - axis.lastSerie = lastSerie; - axis.max = newmax; - axis.min = newmin; - } - }, - extendYRange: function(axis){ - if(axis.options.max === null){ - var newmax = Number.MIN_VALUE, - newmin = Number.MAX_VALUE, - i, j, s, g, - stackedSumsPos = {}, - stackedSumsNeg = {}, - lastSerie = null; - - for(i = 0; i < this.series.length; ++i){ - s = this.series[i]; - g = s.gantt; - - if (g.show && !s.hide && s.yaxis == axis) { - var datamax = Number.MIN_VALUE, datamin = Number.MAX_VALUE; - for(j=0; j < s.data.length; j++){ - datamax = Math.max(datamax,s.data[j][0]); - datamin = Math.min(datamin,s.data[j][0]); - } - - if (g.centered) { - newmax = Math.max(datamax + 0.5, newmax); - newmin = Math.min(datamin - 0.5, newmin); - } - else { - newmax = Math.max(datamax + 1, newmax); - newmin = Math.min(datamin, newmin); - } - // For normal horizontal bars - if (g.barWidth + datamax > newmax){ - newmax = axis.max + g.barWidth; - } - } - } - axis.lastSerie = lastSerie; - axis.max = newmax; - axis.min = newmin; - axis.tickSize = Flotr.getTickSize(axis.options.noTicks, newmin, newmax, axis.options.tickDecimals); - } - } -}); - -/** Markers * */ -/** - * Formats the marker labels. - * - * @param {Object} - * obj - Marker value Object {x:..,y:..} - * @return {String} Formatted marker string - */ -(function () { - -Flotr.defaultMarkerFormatter = function(obj){ - return (Math.round(obj.y*100)/100)+''; -}; - -Flotr.addType('markers', { - options: { - show: false, // => setting to true will show markers, false will hide - lineWidth: 1, // => line width of the rectangle around the marker - color: '#000000', // => text color - fill: false, // => fill or not the marekers' rectangles - fillColor: "#FFFFFF", // => fill color - fillOpacity: 0.4, // => fill opacity - stroke: false, // => draw the rectangle around the markers - position: 'ct', // => the markers position (vertical align: b, m, t, horizontal align: l, c, r) - verticalMargin: 0, // => the margin between the point and the text. - labelFormatter: Flotr.defaultMarkerFormatter, - fontSize: Flotr.defaultOptions.fontSize, - stacked: false, // => true if markers should be stacked - stackingType: 'b', // => define staching behavior, (b- bars like, a - area like) (see Issue 125 for details) - horizontal: false // => true if markers should be horizontal (For now only in a case on horizontal stacked - // bars, stacks should be calculated horizontaly) - }, - - // TODO test stacked markers. - stack : { - positive : [], - negative : [], - values : [] - }, - - draw : function (options) { - - var - data = options.data, - context = options.context, - stack = options.stacked ? options.stack : false, - stackType = options.stackingType, - stackOffsetNeg, - stackOffsetPos, - stackOffset, - i, x, y, label; - - context.save(); - context.lineJoin = 'round'; - context.lineWidth = options.lineWidth; - context.strokeStyle = 'rgba(0,0,0,0.5)'; - context.fillStyle = options.fillStyle; - - function stackPos (a, b) { - stackOffsetPos = stack.negative[a] || 0; - stackOffsetNeg = stack.positive[a] || 0; - if (b > 0) { - stack.positive[a] = stackOffsetPos + b; - return stackOffsetPos + b; - } else { - stack.negative[a] = stackOffsetNeg + b; - return stackOffsetNeg + b; - } - } - - for (i = 0; i < data.length; ++i) { - - x = data[i][0]; - y = data[i][1]; - - if (stack) { - if (stackType == 'b') { - if (options.horizontal) y = stackPos(y, x); - else x = stackPos(x, y); - } else if (stackType == 'a') { - stackOffset = stack.values[x] || 0; - stack.values[x] = stackOffset + y; - y = stackOffset + y; - } - } - - label = options.labelFormatter({x: x, y: y, index: i, data : data}); - this.plot(options.xScale(x), options.yScale(y), label, options); - } - context.restore(); - }, - plot: function(x, y, label, options) { - var context = options.context; - if (isImage(label) && !label.complete) { - throw 'Marker image not loaded.'; - } else { - this._plot(x, y, label, options); - } - }, - - _plot: function(x, y, label, options) { - var context = options.context, - margin = 2, - left = x, - top = y, - dim; - - if (isImage(label)) - dim = {height : label.height, width: label.width}; - else - dim = options.text.canvas(label); - - dim.width = Math.floor(dim.width+margin*2); - dim.height = Math.floor(dim.height+margin*2); - - if (options.position.indexOf('c') != -1) left -= dim.width/2 + margin; - else if (options.position.indexOf('l') != -1) left -= dim.width; - - if (options.position.indexOf('m') != -1) top -= dim.height/2 + margin; - else if (options.position.indexOf('t') != -1) top -= dim.height + options.verticalMargin; - else top += options.verticalMargin; - - left = Math.floor(left)+0.5; - top = Math.floor(top)+0.5; - - if(options.fill) - context.fillRect(left, top, dim.width, dim.height); - - if(options.stroke) - context.strokeRect(left, top, dim.width, dim.height); - - if (isImage(label)) - context.drawImage(label, parseInt(left+margin, 10), parseInt(top+margin, 10)); - else - Flotr.drawText(context, label, left+margin, top+margin, {textBaseline: 'top', textAlign: 'left', size: options.fontSize, color: options.color}); - } -}); - -function isImage (i) { - return typeof i === 'object' && i.constructor && (Image ? true : i.constructor === Image); -} - -})(); - -/** - * Pie - * - * Formats the pies labels. - * - * @param {Object} - * slice - Slice object - * @return {String} Formatted pie label string - */ -(function () { - -var - _ = Flotr._; - -Flotr.defaultPieLabelFormatter = function (total, value) { - return (100 * value / total).toFixed(2)+'%'; -}; - -Flotr.addType('pie', { - options: { - show: false, // => setting to true will show bars, false will hide - lineWidth: 1, // => in pixels - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillColor: null, // => fill color - fillOpacity: 0.6, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - explode: 6, // => the number of pixels the splices will be far from the center - sizeRatio: 0.6, // => the size ratio of the pie relative to the plot - startAngle: Math.PI/4, // => the first slice start angle - labelFormatter: Flotr.defaultPieLabelFormatter, - pie3D: false, // => whether to draw the pie in 3 dimenstions or not (ineffective) - pie3DviewAngle: (Math.PI/2 * 0.8), - pie3DspliceThickness: 20, - epsilon: 0.1 // => how close do you have to get to hit empty slice - }, - - draw : function (options) { - - // TODO 3D charts what? - var - data = options.data, - context = options.context, - lineWidth = options.lineWidth, - shadowSize = options.shadowSize, - sizeRatio = options.sizeRatio, - height = options.height, - width = options.width, - explode = options.explode, - color = options.color, - fill = options.fill, - fillStyle = options.fillStyle, - radius = Math.min(width, height) * sizeRatio / 2, - value = data[0][1], - html = [], - vScale = 1,// Math.cos(series.pie.viewAngle); - measure = Math.PI * 2 * value / this.total, - startAngle = this.startAngle || (2 * Math.PI * options.startAngle), // TODO: this initial startAngle is - // already in radians (fixing will be - // test-unstable) - endAngle = startAngle + measure, - bisection = startAngle + measure / 2, - label = options.labelFormatter(this.total, value), - // plotTickness = Math.sin(series.pie.viewAngle)*series.pie.spliceThickness / vScale; - explodeCoeff = explode + radius + 4, - distX = Math.cos(bisection) * explodeCoeff, - distY = Math.sin(bisection) * explodeCoeff, - textAlign = distX < 0 ? 'right' : 'left', - textBaseline = distY > 0 ? 'top' : 'bottom', - style, - x, y; - - context.save(); - context.translate(width / 2, height / 2); - context.scale(1, vScale); - - x = Math.cos(bisection) * explode; - y = Math.sin(bisection) * explode; - - // Shadows - if (shadowSize > 0) { - this.plotSlice(x + shadowSize, y + shadowSize, radius, startAngle, endAngle, context); - if (fill) { - context.fillStyle = 'rgba(0,0,0,0.1)'; - context.fill(); - } - } - - this.plotSlice(x, y, radius, startAngle, endAngle, context); - if (fill) { - context.fillStyle = fillStyle; - context.fill(); - } - context.lineWidth = lineWidth; - context.strokeStyle = color; - context.stroke(); - - style = { - size : options.fontSize * 1.2, - color : options.fontColor, - weight : 1.5 - }; - - if (label) { - if (options.htmlText || !options.textEnabled) { - divStyle = 'position:absolute;' + textBaseline + ':' + (height / 2 + (textBaseline === 'top' ? distY : -distY)) + 'px;'; - divStyle += textAlign + ':' + (width / 2 + (textAlign === 'right' ? -distX : distX)) + 'px;'; - html.push('
    ', label, '
    '); - } - else { - style.textAlign = textAlign; - style.textBaseline = textBaseline; - Flotr.drawText(context, label, distX, distY, style); - } - } - - if (options.htmlText || !options.textEnabled) { - var div = Flotr.DOM.node('
    '); - Flotr.DOM.insert(div, html.join('')); - Flotr.DOM.insert(options.element, div); - } - - context.restore(); - - // New start angle - this.startAngle = endAngle; - this.slices = this.slices || []; - this.slices.push({ - radius : radius, - x : x, - y : y, - explode : explode, - start : startAngle, - end : endAngle - }); - }, - plotSlice : function (x, y, radius, startAngle, endAngle, context) { - context.beginPath(); - context.moveTo(x, y); - context.arc(x, y, radius, startAngle, endAngle, false); - context.lineTo(x, y); - context.closePath(); - }, - hit : function (options) { - - var - data = options.data[0], - args = options.args, - index = options.index, - mouse = args[0], - n = args[1], - slice = this.slices[index], - x = mouse.relX - options.width / 2, - y = mouse.relY - options.height / 2, - r = Math.sqrt(x * x + y * y), - theta = Math.atan(y / x), - circle = Math.PI * 2, - explode = slice.explode || options.explode, - start = slice.start % circle, - end = slice.end % circle, - epsilon = options.epsilon; - - if (x < 0) { - theta += Math.PI; - } else if (x > 0 && y < 0) { - theta += circle; - } - - if (r < slice.radius + explode && r > explode) { - if ( - (theta > start && theta < end) || // Normal Slice - (start > end && (theta < end || theta > start)) || // First slice - // TODO: Document the two cases at the end: - (start === end && ((slice.start === slice.end && Math.abs(theta - start) < epsilon) || (slice.start !== slice.end && Math.abs(theta-start) > epsilon))) - ) { - - // TODO Decouple this from hit plugin (chart shouldn't know what n means) - n.x = data[0]; - n.y = data[1]; - n.sAngle = start; - n.eAngle = end; - n.index = 0; - n.seriesIndex = index; - n.fraction = data[1] / this.total; - } - } - }, - drawHit: function (options) { - var - context = options.context, - slice = this.slices[options.args.seriesIndex]; - - context.save(); - context.translate(options.width / 2, options.height / 2); - this.plotSlice(slice.x, slice.y, slice.radius, slice.start, slice.end, context); - context.stroke(); - context.restore(); - }, - clearHit : function (options) { - var - context = options.context, - slice = this.slices[options.args.seriesIndex], - padding = 2 * options.lineWidth, - radius = slice.radius + padding; - - context.save(); - context.translate(options.width / 2, options.height / 2); - context.clearRect( - slice.x - radius, - slice.y - radius, - 2 * radius + padding, - 2 * radius + padding - ); - context.restore(); - }, - extendYRange : function (axis, data) { - this.total = (this.total || 0) + data[0][1]; - } -}); -})(); - -/** Points * */ -Flotr.addType('points', { - options: { - show: false, // => setting to true will show points, false will hide - radius: 3, // => point radius (pixels) - lineWidth: 2, // => line width in pixels - fill: true, // => true to fill the points with a color, false for (transparent) no fill - fillColor: '#FFFFFF', // => fill color. Null to use series color. - fillOpacity: 1, // => opacity of color inside the points - hitRadius: null // => override for points hit radius - }, - - draw : function (options) { - var - context = options.context, - lineWidth = options.lineWidth, - shadowSize = options.shadowSize; - - context.save(); - - if (shadowSize > 0) { - context.lineWidth = shadowSize / 2; - - context.strokeStyle = 'rgba(0,0,0,0.1)'; - this.plot(options, shadowSize / 2 + context.lineWidth / 2); - - context.strokeStyle = 'rgba(0,0,0,0.2)'; - this.plot(options, context.lineWidth / 2); - } - - context.lineWidth = options.lineWidth; - context.strokeStyle = options.color; - if (options.fill) context.fillStyle = options.fillStyle; - - this.plot(options); - context.restore(); - }, - - plot : function (options, offset) { - var - data = options.data, - context = options.context, - xScale = options.xScale, - yScale = options.yScale, - i, x, y; - - for (i = data.length - 1; i > -1; --i) { - y = data[i][1]; - if (y === null) continue; - - x = xScale(data[i][0]); - y = yScale(y); - - if (x < 0 || x > options.width || y < 0 || y > options.height) continue; - - context.beginPath(); - if (offset) { - context.arc(x, y + offset, options.radius, 0, Math.PI, false); - } else { - context.arc(x, y, options.radius, 0, 2 * Math.PI, true); - if (options.fill) context.fill(); - } - context.stroke(); - context.closePath(); - } - } -}); - -/** Radar * */ -Flotr.addType('radar', { - options: { - show: false, // => setting to true will show radar chart, false will hide - lineWidth: 2, // => line width in pixels - fill: true, // => true to fill the area from the line to the x axis, false for (transparent) no fill - fillOpacity: 0.4, // => opacity of the fill color, set to 1 for a solid fill, 0 hides the fill - radiusRatio: 0.90, // => ratio of the radar, against the plot size - sensibility: 2 // => the lower this number, the more precise you have to aim to show a value. - }, - draw : function (options) { - var - context = options.context, - shadowSize = options.shadowSize; - - context.save(); - context.translate(options.width / 2, options.height / 2); - context.lineWidth = options.lineWidth; - - // Shadow - context.fillStyle = 'rgba(0,0,0,0.05)'; - context.strokeStyle = 'rgba(0,0,0,0.05)'; - this.plot(options, shadowSize / 2); - context.strokeStyle = 'rgba(0,0,0,0.1)'; - this.plot(options, shadowSize / 4); - - // Chart - context.strokeStyle = options.color; - context.fillStyle = options.fillStyle; - this.plot(options); - - context.restore(); - }, - plot : function (options, offset) { - var - data = options.data, - context = options.context, - radius = Math.min(options.height, options.width) * options.radiusRatio / 2, - step = 2 * Math.PI / data.length, - angle = -Math.PI / 2, - i, ratio; - - offset = offset || 0; - - context.beginPath(); - for (i = 0; i < data.length; ++i) { - ratio = data[i][1] / this.max; - - context[i === 0 ? 'moveTo' : 'lineTo']( - Math.cos(i * step + angle) * radius * ratio + offset, - Math.sin(i * step + angle) * radius * ratio + offset - ); - } - context.closePath(); - if (options.fill) context.fill(); - context.stroke(); - }, - getGeometry : function (point, options) { - var - radius = Math.min(options.height, options.width) * options.radiusRatio / 2, - step = 2 * Math.PI / options.data.length, - angle = -Math.PI / 2, - ratio = point[1] / this.max; - - return { - x : (Math.cos(point[0] * step + angle) * radius * ratio) + options.width / 2, - y : (Math.sin(point[0] * step + angle) * radius * ratio) + options.height / 2 - }; - }, - hit : function (options) { - var - args = options.args, - mouse = args[0], - n = args[1], - relX = mouse.relX, - relY = mouse.relY, - distance, - geometry, - dx, dy; - - for (var i = 0; i < n.series.length; i++) { - var serie = n.series[i]; - var data = serie.data; - - for (var j = data.length; j--;) { - geometry = this.getGeometry(data[j], options); - - dx = geometry.x - relX; - dy = geometry.y - relY; - distance = Math.sqrt(dx * dx + dy * dy); - - if (distance < options.sensibility*2) { - n.x = data[j][0]; - n.y = data[j][1]; - n.index = j; - n.seriesIndex = i; - return n; - } - } - } - }, - drawHit : function (options) { - var step = 2 * Math.PI / options.data.length; - var angle = -Math.PI / 2; - var radius = Math.min(options.height, options.width) * options.radiusRatio / 2; - - var s = options.args.series; - var point_radius = s.points.hitRadius || s.points.radius || s.mouse.radius; - - var context = options.context; - - context.translate(options.width / 2, options.height / 2); - - var j = options.args.index; - var ratio = options.data[j][1] / this.max; - var x = Math.cos(j * step + angle) * radius * ratio; - var y = Math.sin(j * step + angle) * radius * ratio; - context.beginPath(); - context.arc(x, y, point_radius , 0, 2 * Math.PI, true); - context.closePath(); - context.stroke(); - }, - clearHit : function (options) { - var step = 2 * Math.PI / options.data.length; - var angle = -Math.PI / 2; - var radius = Math.min(options.height, options.width) * options.radiusRatio / 2; - - var context = options.context; - - var - s = options.args.series, - lw = (s.points ? s.points.lineWidth : 1); - offset = (s.points.hitRadius || s.points.radius || s.mouse.radius) + lw; - - context.translate(options.width / 2, options.height / 2); - - var j = options.args.index; - var ratio = options.data[j][1] / this.max; - var x = Math.cos(j * step + angle) * radius * ratio; - var y = Math.sin(j * step + angle) * radius * ratio; - context.clearRect(x-offset,y-offset,offset*2,offset*2); - }, - extendYRange : function (axis, data) { - this.max = Math.max(axis.max, this.max || -Number.MAX_VALUE); - } -}); - -Flotr.addType('timeline', { - options: { - show: false, - lineWidth: 1, - barWidth: 0.2, - fill: true, - fillColor: null, - fillOpacity: 0.4, - centered: true - }, - - draw : function (options) { - - var - context = options.context; - - context.save(); - context.lineJoin = 'miter'; - context.lineWidth = options.lineWidth; - context.strokeStyle = options.color; - context.fillStyle = options.fillStyle; - - this.plot(options); - - context.restore(); - }, - - plot : function (options) { - - var - data = options.data, - context = options.context, - xScale = options.xScale, - yScale = options.yScale, - barWidth = options.barWidth, - lineWidth = options.lineWidth, - i; - - Flotr._.each(data, function (timeline) { - - var - x = timeline[0], - y = timeline[1], - w = timeline[2], - h = barWidth, - - xt = Math.ceil(xScale(x)), - wt = Math.ceil(xScale(x + w)) - xt, - yt = Math.round(yScale(y)), - ht = Math.round(yScale(y - h)) - yt, - - x0 = xt - lineWidth / 2, - y0 = Math.round(yt - ht / 2) - lineWidth / 2; - - context.strokeRect(x0, y0, wt, ht); - context.fillRect(x0, y0, wt, ht); - - }); - }, - - extendRange : function (series) { - - var - data = series.data, - xa = series.xaxis, - ya = series.yaxis, - w = series.timeline.barWidth; - - if (xa.options.min === null) - xa.min = xa.datamin - w / 2; - - if (xa.options.max === null) { - - var - max = xa.max; - - Flotr._.each(data, function (timeline) { - max = Math.max(max, timeline[0] + timeline[2]); - }, this); - - xa.max = max + w / 2; - } - - if (ya.options.min === null) - ya.min = ya.datamin - w; - if (ya.options.min === null) - ya.max = ya.datamax + w; - } - -}); - -(function () { - -var D = Flotr.DOM; - -Flotr.addPlugin('crosshair', { - options: { - mode: null, // => one of null, 'x', 'y' or 'xy' - color: '#FF0000', // => crosshair color - hideCursor: true // => hide the cursor when the crosshair is shown - }, - callbacks: { - 'flotr:mousemove': function(e, pos) { - if (this.options.crosshair.mode) { - this.crosshair.clearCrosshair(); - this.crosshair.drawCrosshair(pos); - } - } - }, - /** - * Draws the selection box. - */ - drawCrosshair: function(pos) { - var octx = this.octx, - options = this.options.crosshair, - plotOffset = this.plotOffset, - x = plotOffset.left + Math.round(pos.relX) + 0.5, - y = plotOffset.top + Math.round(pos.relY) + 0.5; - - if (pos.relX < 0 || pos.relY < 0 || pos.relX > this.plotWidth || pos.relY > this.plotHeight) { - this.el.style.cursor = null; - D.removeClass(this.el, 'flotr-crosshair'); - return; - } - - if (options.hideCursor) { - this.el.style.cursor = 'none'; - D.addClass(this.el, 'flotr-crosshair'); - } - - octx.save(); - octx.strokeStyle = options.color; - octx.lineWidth = 1; - octx.beginPath(); - - if (options.mode.indexOf('x') != -1) { - octx.moveTo(x, plotOffset.top); - octx.lineTo(x, plotOffset.top + this.plotHeight); - } - - if (options.mode.indexOf('y') != -1) { - octx.moveTo(plotOffset.left, y); - octx.lineTo(plotOffset.left + this.plotWidth, y); - } - - octx.stroke(); - octx.restore(); - }, - /** - * Removes the selection box from the overlay canvas. - */ - clearCrosshair: function() { - - var - plotOffset = this.plotOffset, - position = this.lastMousePos, - context = this.octx; - - if (position) { - context.clearRect( - Math.round(position.relX) + plotOffset.left, - plotOffset.top, - 1, - this.plotHeight + 1 - ); - context.clearRect( - plotOffset.left, - Math.round(position.relY) + plotOffset.top, - this.plotWidth + 1, - 1 - ); - } - } -}); -})(); - -(function() { - -var - D = Flotr.DOM, - _ = Flotr._; - -function getImage (type, canvas, context, width, height, background) { - - // TODO add scaling for w / h - var - mime = 'image/'+type, - data = context.getImageData(0, 0, width, height), - image = new Image(); - - context.save(); - context.globalCompositeOperation = 'destination-over'; - context.fillStyle = background; - context.fillRect(0, 0, width, height); - image.src = canvas.toDataURL(mime); - context.restore(); - - context.clearRect(0, 0, width, height); - context.putImageData(data, 0, 0); - - return image; -} - -Flotr.addPlugin('download', { - - saveImage: function (type, width, height, replaceCanvas) { - var - grid = this.options.grid, - image; - - if (Flotr.isIE && Flotr.isIE < 9) { - image = ''+this.canvas.firstChild.innerHTML+''; - return window.open().document.write(image); - } - - if (type !== 'jpeg' && type !== 'png') return; - - image = getImage( - type, this.canvas, this.ctx, - this.canvasWidth, this.canvasHeight, - grid && grid.backgroundColor || '#ffffff' - ); - - if (_.isElement(image) && replaceCanvas) { - this.download.restoreCanvas(); - D.hide(this.canvas); - D.hide(this.overlay); - D.setStyles({position: 'absolute'}); - D.insert(this.el, image); - this.saveImageElement = image; - } else { - return window.open(image.src); - } - }, - - restoreCanvas: function() { - D.show(this.canvas); - D.show(this.overlay); - if (this.saveImageElement) this.el.removeChild(this.saveImageElement); - this.saveImageElement = null; - } -}); - -})(); - -(function () { - -var E = Flotr.EventAdapter, - _ = Flotr._; - -Flotr.addPlugin('graphGrid', { - - callbacks: { - 'flotr:beforedraw' : function () { - this.graphGrid.drawGrid(); - }, - 'flotr:afterdraw' : function () { - this.graphGrid.drawOutline(); - } - }, - - drawGrid: function(){ - - var - ctx = this.ctx, - options = this.options, - grid = options.grid, - verticalLines = grid.verticalLines, - horizontalLines = grid.horizontalLines, - minorVerticalLines = grid.minorVerticalLines, - minorHorizontalLines = grid.minorHorizontalLines, - plotHeight = this.plotHeight, - plotWidth = this.plotWidth, - a, v, i, j; - - if(verticalLines || minorVerticalLines || - horizontalLines || minorHorizontalLines){ - E.fire(this.el, 'flotr:beforegrid', [this.axes.x, this.axes.y, options, this]); - } - ctx.save(); - ctx.lineWidth = 1; - ctx.strokeStyle = grid.tickColor; - - function circularHorizontalTicks (ticks) { - for(i = 0; i < ticks.length; ++i){ - var ratio = ticks[i].v / a.max; - for(j = 0; j <= sides; ++j){ - ctx[j === 0 ? 'moveTo' : 'lineTo']( - Math.cos(j*coeff+angle)*radius*ratio, - Math.sin(j*coeff+angle)*radius*ratio - ); - } - } - } - function drawGridLines (ticks, callback) { - _.each(_.pluck(ticks, 'v'), function(v){ - // Don't show lines on upper and lower bounds. - if ((v <= a.min || v >= a.max) || - (v == a.min || v == a.max) && grid.outlineWidth) - return; - callback(Math.floor(a.d2p(v)) + ctx.lineWidth/2); - }); - } - function drawVerticalLines (x) { - ctx.moveTo(x, 0); - ctx.lineTo(x, plotHeight); - } - function drawHorizontalLines (y) { - ctx.moveTo(0, y); - ctx.lineTo(plotWidth, y); - } - - if (grid.circular) { - ctx.translate(this.plotOffset.left+plotWidth/2, this.plotOffset.top+plotHeight/2); - var radius = Math.min(plotHeight, plotWidth)*options.radar.radiusRatio/2, - sides = this.axes.x.ticks.length, - coeff = 2*(Math.PI/sides), - angle = -Math.PI/2; - - // Draw grid lines in vertical direction. - ctx.beginPath(); - - a = this.axes.y; - - if(horizontalLines){ - circularHorizontalTicks(a.ticks); - } - if(minorHorizontalLines){ - circularHorizontalTicks(a.minorTicks); - } - - if(verticalLines){ - _.times(sides, function(i){ - ctx.moveTo(0, 0); - ctx.lineTo(Math.cos(i*coeff+angle)*radius, Math.sin(i*coeff+angle)*radius); - }); - } - ctx.stroke(); - } - else { - ctx.translate(this.plotOffset.left, this.plotOffset.top); - - // Draw grid background, if present in options. - if(grid.backgroundColor){ - ctx.fillStyle = this.processColor(grid.backgroundColor, {x1: 0, y1: 0, x2: plotWidth, y2: plotHeight}); - ctx.fillRect(0, 0, plotWidth, plotHeight); - } - - ctx.beginPath(); - - a = this.axes.x; - if (verticalLines) drawGridLines(a.ticks, drawVerticalLines); - if (minorVerticalLines) drawGridLines(a.minorTicks, drawVerticalLines); - - a = this.axes.y; - if (horizontalLines) drawGridLines(a.ticks, drawHorizontalLines); - if (minorHorizontalLines) drawGridLines(a.minorTicks, drawHorizontalLines); - - ctx.stroke(); - } - - ctx.restore(); - if(verticalLines || minorVerticalLines || - horizontalLines || minorHorizontalLines){ - E.fire(this.el, 'flotr:aftergrid', [this.axes.x, this.axes.y, options, this]); - } - }, - - drawOutline: function(){ - var - that = this, - options = that.options, - grid = options.grid, - outline = grid.outline, - ctx = that.ctx, - backgroundImage = grid.backgroundImage, - plotOffset = that.plotOffset, - leftOffset = plotOffset.left, - topOffset = plotOffset.top, - plotWidth = that.plotWidth, - plotHeight = that.plotHeight, - v, img, src, left, top, globalAlpha; - - if (!grid.outlineWidth) return; - - ctx.save(); - - if (grid.circular) { - ctx.translate(leftOffset + plotWidth / 2, topOffset + plotHeight / 2); - var radius = Math.min(plotHeight, plotWidth) * options.radar.radiusRatio / 2, - sides = this.axes.x.ticks.length, - coeff = 2*(Math.PI/sides), - angle = -Math.PI/2; - - // Draw axis/grid border. - ctx.beginPath(); - ctx.lineWidth = grid.outlineWidth; - ctx.strokeStyle = grid.color; - ctx.lineJoin = 'round'; - - for(i = 0; i <= sides; ++i){ - ctx[i === 0 ? 'moveTo' : 'lineTo'](Math.cos(i*coeff+angle)*radius, Math.sin(i*coeff+angle)*radius); - } - // ctx.arc(0, 0, radius, 0, Math.PI*2, true); - - ctx.stroke(); - } - else { - ctx.translate(leftOffset, topOffset); - - // Draw axis/grid border. - var lw = grid.outlineWidth, - orig = 0.5-lw+((lw+1)%2/2), - lineTo = 'lineTo', - moveTo = 'moveTo'; - ctx.lineWidth = lw; - ctx.strokeStyle = grid.color; - ctx.lineJoin = 'miter'; - ctx.beginPath(); - ctx.moveTo(orig, orig); - plotWidth = plotWidth - (lw / 2) % 1; - plotHeight = plotHeight + lw / 2; - ctx[outline.indexOf('n') !== -1 ? lineTo : moveTo](plotWidth, orig); - ctx[outline.indexOf('e') !== -1 ? lineTo : moveTo](plotWidth, plotHeight); - ctx[outline.indexOf('s') !== -1 ? lineTo : moveTo](orig, plotHeight); - ctx[outline.indexOf('w') !== -1 ? lineTo : moveTo](orig, orig); - ctx.stroke(); - ctx.closePath(); - } - - ctx.restore(); - - if (backgroundImage) { - - src = backgroundImage.src || backgroundImage; - left = (parseInt(backgroundImage.left, 10) || 0) + plotOffset.left; - top = (parseInt(backgroundImage.top, 10) || 0) + plotOffset.top; - img = new Image(); - - img.onload = function() { - ctx.save(); - if (backgroundImage.alpha) ctx.globalAlpha = backgroundImage.alpha; - ctx.globalCompositeOperation = 'destination-over'; - ctx.drawImage(img, 0, 0, img.width, img.height, left, top, plotWidth, plotHeight); - ctx.restore(); - }; - - img.src = src; - } - } -}); - -})(); - -(function () { - -var - D = Flotr.DOM, - _ = Flotr._, - flotr = Flotr, - S_MOUSETRACK = 'opacity:0.7;background-color:#000;color:#fff;position:absolute;padding:2px 8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;'; - -Flotr.addPlugin('hit', { - callbacks: { - 'flotr:mousemove': function(e, pos) { - this.hit.track(pos); - }, - 'flotr:click': function(pos) { - var - hit = this.hit.track(pos); - if (hit && !_.isUndefined(hit.index)) pos.hit = hit; - }, - 'flotr:mouseout': function(e) { - if (e.relatedTarget !== this.mouseTrack) { - this.hit.clearHit(); - } - }, - 'flotr:destroy': function() { - if (this.options.mouse.container) { - D.remove(this.mouseTrack); - } - this.mouseTrack = null; - } - }, - track : function (pos) { - if (this.options.mouse.track || _.any(this.series, function(s){return s.mouse && s.mouse.track;})) { - return this.hit.hit(pos); - } - }, - /** - * Try a method on a graph type. If the method exists, execute it. - * - * @param {Object} - * series - * @param {String} - * method Method name. - * @param {Array} - * args Arguments applied to method. - * @return executed successfully or failed. - */ - executeOnType: function(s, method, args){ - var - success = false, - options; - - if (!_.isArray(s)) s = [s]; - - function e(s, index) { - _.each(_.keys(flotr.graphTypes), function (type) { - if (s[type] && s[type].show && !s.hide && this[type][method]) { - options = this.getOptions(s, type); - - options.fill = !!s.mouse.fillColor; - options.fillStyle = this.processColor(s.mouse.fillColor || '#ffffff', {opacity: s.mouse.fillOpacity}); - options.color = s.mouse.lineColor; - options.context = this.octx; - options.index = index; - - if (args) options.args = args; - this[type][method].call(this[type], options); - success = true; - } - }, this); - } - _.each(s, e, this); - - return success; - }, - /** - * Updates the mouse tracking point on the overlay. - */ - drawHit: function(n){ - var octx = this.octx, - s = n.series; - - if (s.mouse.lineColor) { - octx.save(); - octx.lineWidth = (s.points ? s.points.lineWidth : 1); - octx.strokeStyle = s.mouse.lineColor; - octx.fillStyle = this.processColor(s.mouse.fillColor || '#ffffff', {opacity: s.mouse.fillOpacity}); - octx.translate(this.plotOffset.left, this.plotOffset.top); - - if (!this.hit.executeOnType(s, 'drawHit', n)) { - var - xa = n.xaxis, - ya = n.yaxis; - - octx.beginPath(); - // TODO fix this (points) should move to general testable graph mixin - octx.arc(xa.d2p(n.x), ya.d2p(n.y), s.points.hitRadius || s.points.radius || s.mouse.radius, 0, 2 * Math.PI, true); - octx.fill(); - octx.stroke(); - octx.closePath(); - } - octx.restore(); - this.clip(octx); - } - this.prevHit = n; - }, - /** - * Removes the mouse tracking point from the overlay. - */ - clearHit: function(){ - var prev = this.prevHit, - octx = this.octx, - plotOffset = this.plotOffset; - octx.save(); - octx.translate(plotOffset.left, plotOffset.top); - if (prev) { - if (!this.hit.executeOnType(prev.series, 'clearHit', this.prevHit)) { - // TODO fix this (points) should move to general testable graph mixin - var - s = prev.series, - lw = (s.points ? s.points.lineWidth : 1); - offset = (s.points.hitRadius || s.points.radius || s.mouse.radius) + lw; - octx.clearRect( - prev.xaxis.d2p(prev.x) - offset, - prev.yaxis.d2p(prev.y) - offset, - offset*2, - offset*2 - ); - } - D.hide(this.mouseTrack); - this.prevHit = null; - } - octx.restore(); - }, - /** - * Retrieves the nearest data point from the mouse cursor. If it's within a certain range, draw a point on the - * overlay canvas and display the x and y value of the data. - * - * @param {Object} - * mouse - Object that holds the relative x and y coordinates of the cursor. - */ - hit : function (mouse) { - - var - options = this.options, - prevHit = this.prevHit, - closest, sensibility, dataIndex, seriesIndex, series, value, xaxis, yaxis, n; - - if (this.series.length === 0) return; - - // Nearest data element. - // dist, x, y, relX, relY, absX, absY, sAngle, eAngle, fraction, mouse, - // xaxis, yaxis, series, index, seriesIndex - n = { - relX : mouse.relX, - relY : mouse.relY, - absX : mouse.absX, - absY : mouse.absY, - series: this.series - }; - - if (options.mouse.trackY && - !options.mouse.trackAll && - this.hit.executeOnType(this.series, 'hit', [mouse, n]) && - !_.isUndefined(n.seriesIndex)) - { - series = this.series[n.seriesIndex]; - n.series = series; - n.mouse = series.mouse; - n.xaxis = series.xaxis; - n.yaxis = series.yaxis; - } else { - - closest = this.hit.closest(mouse); - - if (closest) { - - closest = options.mouse.trackY ? closest.point : closest.x; - seriesIndex = closest.seriesIndex; - series = this.series[seriesIndex]; - xaxis = series.xaxis; - yaxis = series.yaxis; - sensibility = 2 * series.mouse.sensibility; - - if - (options.mouse.trackAll || - (closest.distanceX < sensibility / xaxis.scale && - (!options.mouse.trackY || closest.distanceY < sensibility / yaxis.scale))) - { - n.series = series; - n.xaxis = series.xaxis; - n.yaxis = series.yaxis; - n.mouse = series.mouse; - n.x = closest.x; - n.y = closest.y; - n.dist = closest.distance; - n.index = closest.dataIndex; - n.seriesIndex = seriesIndex; - } - } - } - - if (!prevHit || (prevHit.index !== n.index || prevHit.seriesIndex !== n.seriesIndex)) { - this.hit.clearHit(); - if (n.series && n.mouse && n.mouse.track) { - this.hit.drawMouseTrack(n); - this.hit.drawHit(n); - Flotr.EventAdapter.fire(this.el, 'flotr:hit', [n, this]); - } - } - - return n; - }, - - closest : function (mouse) { - - var - series = this.series, - options = this.options, - relX = mouse.relX, - relY = mouse.relY, - compare = Number.MAX_VALUE, - compareX = Number.MAX_VALUE, - closest = {}, - closestX = {}, - check = false, - serie, data, - distance, distanceX, distanceY, - mouseX, mouseY, - x, y, i, j; - - function setClosest (o) { - o.distance = distance; - o.distanceX = distanceX; - o.distanceY = distanceY; - o.seriesIndex = i; - o.dataIndex = j; - o.x = x; - o.y = y; - check = true; - } - - for (i = 0; i < series.length; i++) { - - serie = series[i]; - data = serie.data; - mouseX = serie.xaxis.p2d(relX); - mouseY = serie.yaxis.p2d(relY); - - if (serie.hide) continue; - - for (j = data.length; j--;) { - - x = data[j][0]; - y = data[j][1]; - // Add stack offset if exists - if (data[j].y0) y += data[j].y0; - - if (x === null || y === null) continue; - - // don't check if the point isn't visible in the current range - if (x < serie.xaxis.min || x > serie.xaxis.max) continue; - - distanceX = Math.abs(x - mouseX); - distanceY = Math.abs(y - mouseY); - - // Skip square root for speed - distance = distanceX * distanceX + distanceY * distanceY; - - if (distance < compare) { - compare = distance; - setClosest(closest); - } - - if (distanceX < compareX) { - compareX = distanceX; - setClosest(closestX); - } - } - } - - return check ? { - point : closest, - x : closestX - } : false; - }, - - drawMouseTrack : function (n) { - - var - pos = '', - s = n.series, - p = n.mouse.position, - m = n.mouse.margin, - x = n.x, - y = n.y, - elStyle = S_MOUSETRACK, - mouseTrack = this.mouseTrack, - plotOffset = this.plotOffset, - left = plotOffset.left, - right = plotOffset.right, - bottom = plotOffset.bottom, - top = plotOffset.top, - decimals = n.mouse.trackDecimals, - options = this.options, - container = options.mouse.container, - oTop = 0, - oLeft = 0, - offset, size, content; - - // Create - if (!mouseTrack) { - mouseTrack = D.node('
    '); - this.mouseTrack = mouseTrack; - D.insert(container || this.el, mouseTrack); - } - - // Fill tracker: - if (!decimals || decimals < 0) decimals = 0; - if (x && x.toFixed) x = x.toFixed(decimals); - if (y && y.toFixed) y = y.toFixed(decimals); - content = n.mouse.trackFormatter({ - x: x, - y: y, - series: n.series, - index: n.index, - nearest: n, - fraction: n.fraction - }); - if (_.isNull(content) || _.isUndefined(content)) { - D.hide(mouseTrack); - return; - } else { - mouseTrack.innerHTML = content; - D.show(mouseTrack); - } - - // Positioning - if (!p) { - return; - } - size = D.size(mouseTrack); - if (container) { - offset = D.position(this.el); - oTop = offset.top; - oLeft = offset.left; - } - - if (!n.mouse.relative) { // absolute to the canvas - pos += 'top:'; - if (p.charAt(0) == 'n') pos += (oTop + m + top); - else if (p.charAt(0) == 's') pos += (oTop - m + top + this.plotHeight - size.height); - pos += 'px;bottom:auto;left:'; - if (p.charAt(1) == 'e') pos += (oLeft - m + left + this.plotWidth - size.width); - else if (p.charAt(1) == 'w') pos += (oLeft + m + left); - pos += 'px;right:auto;'; - - // Pie - } else if (s.pie && s.pie.show) { - var center = { - x: (this.plotWidth)/2, - y: (this.plotHeight)/2 - }, - radius = (Math.min(this.canvasWidth, this.canvasHeight) * s.pie.sizeRatio) / 2, - bisection = n.sAngle one of null, 'x', 'y' or 'xy' - color: '#B6D9FF', // => selection box color - fps: 20 // => frames-per-second - }, - - callbacks: { - 'flotr:mouseup' : function (event) { - - var - options = this.options.selection, - selection = this.selection, - pointer = this.getEventPosition(event); - - if (!options || !options.mode) return; - if (selection.interval) clearInterval(selection.interval); - - if (this.multitouches) { - selection.updateSelection(); - } else - if (!options.pinchOnly) { - selection.setSelectionPos(selection.selection.second, pointer); - } - selection.clearSelection(); - - if(selection.selecting && selection.selectionIsSane()){ - selection.drawSelection(); - selection.fireSelectEvent(); - this.ignoreClick = true; - } - }, - 'flotr:mousedown' : function (event) { - - var - options = this.options.selection, - selection = this.selection, - pointer = this.getEventPosition(event); - - if (!options || !options.mode) return; - if (!options.mode || (!isLeftClick(event) && _.isUndefined(event.touches))) return; - if (!options.pinchOnly) selection.setSelectionPos(selection.selection.first, pointer); - if (selection.interval) clearInterval(selection.interval); - - this.lastMousePos.pageX = null; - selection.selecting = false; - selection.interval = setInterval( - _.bind(selection.updateSelection, this), - 1000 / options.fps - ); - }, - 'flotr:destroy' : function (event) { - clearInterval(this.selection.interval); - } - }, - - // TODO This isn't used. Maybe it belongs in the draw area and fire select event methods? - getArea: function() { - - var - s = this.selection.selection, - a = this.axes, - first = s.first, - second = s.second, - x1, x2, y1, y2; - - x1 = a.x.p2d(s.first.x); - x2 = a.x.p2d(s.second.x); - y1 = a.y.p2d(s.first.y); - y2 = a.y.p2d(s.second.y); - - return { - x1 : Math.min(x1, x2), - y1 : Math.min(y1, y2), - x2 : Math.max(x1, x2), - y2 : Math.max(y1, y2), - xfirst : x1, - xsecond : x2, - yfirst : y1, - ysecond : y2 - }; - }, - - selection: {first: {x: -1, y: -1}, second: {x: -1, y: -1}}, - prevSelection: null, - interval: null, - - /** - * Fires the 'flotr:select' event when the user made a selection. - */ - fireSelectEvent: function(name){ - var - area = this.selection.getArea(); - name = name || 'select'; - area.selection = this.selection.selection; - E.fire(this.el, 'flotr:'+name, [area, this]); - }, - - /** - * Allows the user the manually select an area. - * - * @param {Object} - * area - Object with coordinates to select. - */ - setSelection: function(area, preventEvent){ - var options = this.options, - xa = this.axes.x, - ya = this.axes.y, - vertScale = ya.scale, - hozScale = xa.scale, - selX = options.selection.mode.indexOf('x') != -1, - selY = options.selection.mode.indexOf('y') != -1, - s = this.selection.selection; - - this.selection.clearSelection(); - - s.first.y = boundY((selX && !selY) ? 0 : (ya.max - area.y1) * vertScale, this); - s.second.y = boundY((selX && !selY) ? this.plotHeight - 1: (ya.max - area.y2) * vertScale, this); - s.first.x = boundX((selY && !selX) ? 0 : (area.x1 - xa.min) * hozScale, this); - s.second.x = boundX((selY && !selX) ? this.plotWidth : (area.x2 - xa.min) * hozScale, this); - - this.selection.drawSelection(); - if (!preventEvent) - this.selection.fireSelectEvent(); - }, - - /** - * Calculates the position of the selection. - * - * @param {Object} - * pos - Position object. - * @param {Event} - * event - Event object. - */ - setSelectionPos: function(pos, pointer) { - var mode = this.options.selection.mode, - selection = this.selection.selection; - - if(mode.indexOf('x') == -1) { - pos.x = (pos == selection.first) ? 0 : this.plotWidth; - }else{ - pos.x = boundX(pointer.relX, this); - } - - if (mode.indexOf('y') == -1) { - pos.y = (pos == selection.first) ? 0 : this.plotHeight - 1; - }else{ - pos.y = boundY(pointer.relY, this); - } - }, - /** - * Draws the selection box. - */ - drawSelection: function() { - - this.selection.fireSelectEvent('selecting'); - - var s = this.selection.selection, - octx = this.octx, - options = this.options, - plotOffset = this.plotOffset, - prevSelection = this.selection.prevSelection; - - if (prevSelection && - s.first.x == prevSelection.first.x && - s.first.y == prevSelection.first.y && - s.second.x == prevSelection.second.x && - s.second.y == prevSelection.second.y) { - return; - } - - octx.save(); - octx.strokeStyle = this.processColor(options.selection.color, {opacity: 0.8}); - octx.lineWidth = 1; - octx.lineJoin = 'miter'; - octx.fillStyle = this.processColor(options.selection.color, {opacity: 0.4}); - - this.selection.prevSelection = { - first: { x: s.first.x, y: s.first.y }, - second: { x: s.second.x, y: s.second.y } - }; - - var x = Math.min(s.first.x, s.second.x), - y = Math.min(s.first.y, s.second.y), - w = Math.abs(s.second.x - s.first.x), - h = Math.abs(s.second.y - s.first.y); - - octx.fillRect(x + plotOffset.left+0.5, y + plotOffset.top+0.5, w, h); - octx.strokeRect(x + plotOffset.left+0.5, y + plotOffset.top+0.5, w, h); - octx.restore(); - }, - - /** - * Updates (draws) the selection box. - */ - updateSelection: function(){ - if (!this.lastMousePos.pageX) return; - - this.selection.selecting = true; - - if (this.multitouches) { - this.selection.setSelectionPos(this.selection.selection.first, this.getEventPosition(this.multitouches[0])); - this.selection.setSelectionPos(this.selection.selection.second, this.getEventPosition(this.multitouches[1])); - } else - if (this.options.selection.pinchOnly) { - return; - } else { - this.selection.setSelectionPos(this.selection.selection.second, this.lastMousePos); - } - - this.selection.clearSelection(); - - if(this.selection.selectionIsSane()) { - this.selection.drawSelection(); - } - }, - - /** - * Removes the selection box from the overlay canvas. - */ - clearSelection: function() { - if (!this.selection.prevSelection) return; - - var prevSelection = this.selection.prevSelection, - lw = 1, - plotOffset = this.plotOffset, - x = Math.min(prevSelection.first.x, prevSelection.second.x), - y = Math.min(prevSelection.first.y, prevSelection.second.y), - w = Math.abs(prevSelection.second.x - prevSelection.first.x), - h = Math.abs(prevSelection.second.y - prevSelection.first.y); - - this.octx.clearRect(x + plotOffset.left - lw + 0.5, - y + plotOffset.top - lw, - w + 2 * lw + 0.5, - h + 2 * lw + 0.5); - - this.selection.prevSelection = null; - }, - /** - * Determines whether or not the selection is sane and should be drawn. - * - * @return {Boolean} - True when sane, false otherwise. - */ - selectionIsSane: function(){ - var s = this.selection.selection; - return Math.abs(s.second.x - s.first.x) >= 5 || - Math.abs(s.second.y - s.first.y) >= 5; - } - -}); - -})(); - -(function () { - -var D = Flotr.DOM; - -Flotr.addPlugin('labels', { - - callbacks : { - 'flotr:afterdraw' : function () { - this.labels.draw(); - } - }, - - draw: function(){ - // Construct fixed width label boxes, which can be styled easily. - var - axis, tick, left, top, xBoxWidth, - radius, sides, coeff, angle, - div, i, html = '', - noLabels = 0, - options = this.options, - ctx = this.ctx, - a = this.axes, - style = { size: options.fontSize }; - - for (i = 0; i < a.x.ticks.length; ++i){ - if (a.x.ticks[i].label) { ++noLabels; } - } - xBoxWidth = this.plotWidth / noLabels; - - if (options.grid.circular) { - ctx.save(); - ctx.translate(this.plotOffset.left + this.plotWidth / 2, - this.plotOffset.top + this.plotHeight / 2); - - radius = this.plotHeight * options.radar.radiusRatio / 2 + options.fontSize; - sides = this.axes.x.ticks.length; - coeff = 2 * (Math.PI / sides); - angle = -Math.PI / 2; - - drawLabelCircular(this, a.x, false); - drawLabelCircular(this, a.x, true); - drawLabelCircular(this, a.y, false); - drawLabelCircular(this, a.y, true); - ctx.restore(); - } - - if (!options.HtmlText && this.textEnabled) { - drawLabelNoHtmlText(this, a.x, 'center', 'top'); - drawLabelNoHtmlText(this, a.x2, 'center', 'bottom'); - drawLabelNoHtmlText(this, a.y, 'right', 'middle'); - drawLabelNoHtmlText(this, a.y2, 'left', 'middle'); - - } else if (( - a.x.options.showLabels || - a.x2.options.showLabels || - a.y.options.showLabels || - a.y2.options.showLabels) && - !options.grid.circular - ) { - - html = ''; - - drawLabelHtml(this, a.x); - drawLabelHtml(this, a.x2); - drawLabelHtml(this, a.y); - drawLabelHtml(this, a.y2); - - ctx.stroke(); - ctx.restore(); - div = D.create('div'); - D.setStyles(div, { - fontSize: 'smaller', - color: options.grid.color - }); - div.className = 'flotr-labels'; - D.insert(this.el, div); - D.insert(div, html); - } - - function drawLabelCircular (graph, axis, minorTicks) { - var - ticks = minorTicks ? axis.minorTicks : axis.ticks, - isX = axis.orientation === 1, - isFirst = axis.n === 1, - style, offset; - - style = { - color : axis.options.color || options.grid.color, - angle : Flotr.toRad(axis.options.labelsAngle), - textBaseline : 'middle' - }; - - for (i = 0; i < ticks.length && - (minorTicks ? axis.options.showMinorLabels : axis.options.showLabels); ++i){ - tick = ticks[i]; - tick.label += ''; - if (!tick.label || !tick.label.length) { continue; } - - x = Math.cos(i * coeff + angle) * radius; - y = Math.sin(i * coeff + angle) * radius; - - style.textAlign = isX ? (Math.abs(x) < 0.1 ? 'center' : (x < 0 ? 'right' : 'left')) : 'left'; - - Flotr.drawText( - ctx, tick.label, - isX ? x : 3, - isX ? y : -(axis.ticks[i].v / axis.max) * (radius - options.fontSize), - style - ); - } - } - - function drawLabelNoHtmlText (graph, axis, textAlign, textBaseline) { - var - isX = axis.orientation === 1, - isFirst = axis.n === 1, - style, offset; - - style = { - color : axis.options.color || options.grid.color, - textAlign : textAlign, - textBaseline : textBaseline, - angle : Flotr.toRad(axis.options.labelsAngle) - }; - style = Flotr.getBestTextAlign(style.angle, style); - - for (i = 0; i < axis.ticks.length && continueShowingLabels(axis); ++i) { - - tick = axis.ticks[i]; - if (!tick.label || !tick.label.length) { continue; } - - offset = axis.d2p(tick.v); - if (offset < 0 || - offset > (isX ? graph.plotWidth : graph.plotHeight)) { continue; } - - Flotr.drawText( - ctx, tick.label, - leftOffset(graph, isX, isFirst, offset), - topOffset(graph, isX, isFirst, offset), - style - ); - - // Only draw on axis y2 - if (!isX && !isFirst) { - ctx.save(); - ctx.strokeStyle = style.color; - ctx.beginPath(); - ctx.moveTo(graph.plotOffset.left + graph.plotWidth - 8, graph.plotOffset.top + axis.d2p(tick.v)); - ctx.lineTo(graph.plotOffset.left + graph.plotWidth, graph.plotOffset.top + axis.d2p(tick.v)); - ctx.stroke(); - ctx.restore(); - } - } - - function continueShowingLabels (axis) { - return axis.options.showLabels && axis.used; - } - function leftOffset (graph, isX, isFirst, offset) { - return graph.plotOffset.left + - (isX ? offset : - (isFirst ? - -options.grid.labelMargin : - options.grid.labelMargin + graph.plotWidth)); - } - function topOffset (graph, isX, isFirst, offset) { - return graph.plotOffset.top + - (isX ? options.grid.labelMargin : offset) + - ((isX && isFirst) ? graph.plotHeight : 0); - } - } - - function drawLabelHtml (graph, axis) { - var - isX = axis.orientation === 1, - isFirst = axis.n === 1, - name = '', - left, style, top, - offset = graph.plotOffset; - - if (!isX && !isFirst) { - ctx.save(); - ctx.strokeStyle = axis.options.color || options.grid.color; - ctx.beginPath(); - } - - if (axis.options.showLabels && (isFirst ? true : axis.used)) { - for (i = 0; i < axis.ticks.length; ++i) { - tick = axis.ticks[i]; - if (!tick.label || !tick.label.length || - ((isX ? offset.left : offset.top) + axis.d2p(tick.v) < 0) || - ((isX ? offset.left : offset.top) + axis.d2p(tick.v) > (isX ? graph.canvasWidth : graph.canvasHeight))) { - continue; - } - top = offset.top + - (isX ? - ((isFirst ? 1 : -1 ) * (graph.plotHeight + options.grid.labelMargin)) : - axis.d2p(tick.v) - axis.maxLabel.height / 2); - left = isX ? (offset.left + axis.d2p(tick.v) - xBoxWidth / 2) : 0; - - name = ''; - if (i === 0) { - name = ' first'; - } else if (i === axis.ticks.length - 1) { - name = ' last'; - } - name += isX ? ' flotr-grid-label-x' : ' flotr-grid-label-y'; - - html += [ - '
    ' + tick.label + '
    ' - ].join(' '); - - if (!isX && !isFirst) { - ctx.moveTo(offset.left + graph.plotWidth - 8, offset.top + axis.d2p(tick.v)); - ctx.lineTo(offset.left + graph.plotWidth, offset.top + axis.d2p(tick.v)); - } - } - } - } - } - -}); -})(); - -(function () { - -var - D = Flotr.DOM, - _ = Flotr._; - -Flotr.addPlugin('legend', { - options: { - show: true, // => setting to true will show the legend, hide otherwise - noColumns: 1, // => number of colums in legend table // @todo: doesn't work for HtmlText = false - labelFormatter: function(v){return v;}, // => fn: string -> string - labelBoxBorderColor: '#CCCCCC', // => border color for the little label boxes - labelBoxWidth: 14, - labelBoxHeight: 10, - labelBoxMargin: 5, - container: null, // => container (as jQuery object) to put legend in, null means default on top of graph - position: 'nw', // => position of default legend container within plot - margin: 5, // => distance from grid edge to default legend container within plot - backgroundColor: '#F0F0F0', // => Legend background color. - backgroundOpacity: 0.85// => set to 0 to avoid background, set to 1 for a solid background - }, - callbacks: { - 'flotr:afterinit': function() { - this.legend.insertLegend(); - }, - 'flotr:destroy': function() { - var markup = this.legend.markup; - if (markup) { - this.legend.markup = null; - D.remove(markup); - } - } - }, - /** - * Adds a legend div to the canvas container or draws it on the canvas. - */ - insertLegend: function(){ - - if(!this.options.legend.show) - return; - - var series = this.series, - plotOffset = this.plotOffset, - options = this.options, - legend = options.legend, - fragments = [], - rowStarted = false, - ctx = this.ctx, - itemCount = _.filter(series, function(s) {return (s.label && !s.hide);}).length, - p = legend.position, - m = legend.margin, - opacity = legend.backgroundOpacity, - i, label, color; - - if (itemCount) { - - var lbw = legend.labelBoxWidth, - lbh = legend.labelBoxHeight, - lbm = legend.labelBoxMargin, - offsetX = plotOffset.left + m, - offsetY = plotOffset.top + m, - labelMaxWidth = 0, - style = { - size: options.fontSize*1.1, - color: options.grid.color - }; - - // We calculate the labels' max width - for(i = series.length - 1; i > -1; --i){ - if(!series[i].label || series[i].hide) continue; - label = legend.labelFormatter(series[i].label); - labelMaxWidth = Math.max(labelMaxWidth, this._text.measureText(label, style).width); - } - - var legendWidth = Math.round(lbw + lbm*3 + labelMaxWidth), - legendHeight = Math.round(itemCount*(lbm+lbh) + lbm); - - // Default Opacity - if (!opacity && opacity !== 0) { - opacity = 0.1; - } - - if (!options.HtmlText && this.textEnabled && !legend.container) { - - if(p.charAt(0) == 's') offsetY = plotOffset.top + this.plotHeight - (m + legendHeight); - if(p.charAt(0) == 'c') offsetY = plotOffset.top + (this.plotHeight/2) - (m + (legendHeight/2)); - if(p.charAt(1) == 'e') offsetX = plotOffset.left + this.plotWidth - (m + legendWidth); - - // Legend box - color = this.processColor(legend.backgroundColor, { opacity : opacity }); - - ctx.fillStyle = color; - ctx.fillRect(offsetX, offsetY, legendWidth, legendHeight); - ctx.strokeStyle = legend.labelBoxBorderColor; - ctx.strokeRect(Flotr.toPixel(offsetX), Flotr.toPixel(offsetY), legendWidth, legendHeight); - - // Legend labels - var x = offsetX + lbm; - var y = offsetY + lbm; - for(i = 0; i < series.length; i++){ - if(!series[i].label || series[i].hide) continue; - label = legend.labelFormatter(series[i].label); - - ctx.fillStyle = series[i].color; - ctx.fillRect(x, y, lbw-1, lbh-1); - - ctx.strokeStyle = legend.labelBoxBorderColor; - ctx.lineWidth = 1; - ctx.strokeRect(Math.ceil(x)-1.5, Math.ceil(y)-1.5, lbw+2, lbh+2); - - // Legend text - Flotr.drawText(ctx, label, x + lbw + lbm, y + lbh, style); - - y += lbh + lbm; - } - } - else { - for(i = 0; i < series.length; ++i){ - if(!series[i].label || series[i].hide) continue; - - if(i % legend.noColumns === 0){ - fragments.push(rowStarted ? '' : ''); - rowStarted = true; - } - - var s = series[i], - boxWidth = legend.labelBoxWidth, - boxHeight = legend.labelBoxHeight; - - label = legend.labelFormatter(s.label); - color = 'background-color:' + ((s.bars && s.bars.show && s.bars.fillColor && s.bars.fill) ? s.bars.fillColor : s.color) + ';'; - - fragments.push( - '', - '
    ', - '
    ', // Border - '
    ', // Background - '
    ', - '
    ', - '', - '', label, '' - ); - } - if(rowStarted) fragments.push(''); - - if(fragments.length > 0){ - var table = '' + fragments.join('') + '
    '; - if(legend.container){ - table = D.node(table); - this.legend.markup = table; - D.insert(legend.container, table); - } - else { - var styles = {position: 'absolute', 'zIndex': '2', 'border' : '1px solid ' + legend.labelBoxBorderColor}; - - if(p.charAt(0) == 'n') { styles.top = (m + plotOffset.top) + 'px'; styles.bottom = 'auto'; } - else if(p.charAt(0) == 'c') { styles.top = (m + (this.plotHeight - legendHeight) / 2) + 'px'; styles.bottom = 'auto'; } - else if(p.charAt(0) == 's') { styles.bottom = (m + plotOffset.bottom) + 'px'; styles.top = 'auto'; } - if(p.charAt(1) == 'e') { styles.right = (m + plotOffset.right) + 'px'; styles.left = 'auto'; } - else if(p.charAt(1) == 'w') { styles.left = (m + plotOffset.left) + 'px'; styles.right = 'auto'; } - - var div = D.create('div'), size; - div.className = 'flotr-legend'; - D.setStyles(div, styles); - D.insert(div, table); - D.insert(this.el, div); - - if (!opacity) return; - - var c = legend.backgroundColor || options.grid.backgroundColor || '#ffffff'; - - _.extend(styles, D.size(div), { - 'backgroundColor': c, - 'zIndex' : '', - 'border' : '' - }); - styles.width += 'px'; - styles.height += 'px'; - - // Put in the transparent background separately to avoid blended labels and - div = D.create('div'); - div.className = 'flotr-legend-bg'; - D.setStyles(div, styles); - D.opacity(div, opacity); - D.insert(div, ' '); - D.insert(this.el, div); - } - } - } - } - } -}); -})(); - -/** Spreadsheet * */ -(function() { - -function getRowLabel(value){ - if (this.options.spreadsheet.tickFormatter){ - // TODO maybe pass the xaxis formatter to the custom tick formatter as an opt-out? - return this.options.spreadsheet.tickFormatter(value); - } - else { - var t = _.find(this.axes.x.ticks, function(t){return t.v == value;}); - if (t) { - return t.label; - } - return value; - } -} - -var - D = Flotr.DOM, - _ = Flotr._; - -Flotr.addPlugin('spreadsheet', { - options: { - show: false, // => show the data grid using two tabs - tabGraphLabel: 'Graph', - tabDataLabel: 'Data', - toolbarDownload: 'Download CSV', // @todo: add better language support - toolbarSelectAll: 'Select all', - csvFileSeparator: ',', - decimalSeparator: '.', - tickFormatter: null, - initialTab: 'graph' - }, - /** - * Builds the tabs in the DOM - */ - callbacks: { - 'flotr:afterconstruct': function(){ - // @TODO necessary? - // this.el.select('.flotr-tabs-group,.flotr-datagrid-container').invoke('remove'); - - if (!this.options.spreadsheet.show) return; - - var ss = this.spreadsheet, - container = D.node('
    '), - graph = D.node('
    '+this.options.spreadsheet.tabGraphLabel+'
    '), - data = D.node('
    '+this.options.spreadsheet.tabDataLabel+'
    '), - offset; - - ss.tabsContainer = container; - ss.tabs = { graph : graph, data : data }; - - D.insert(container, graph); - D.insert(container, data); - D.insert(this.el, container); - - offset = D.size(data).height + 2; - this.plotOffset.bottom += offset; - - D.setStyles(container, {top: this.canvasHeight-offset+'px'}); - - this. - observe(graph, 'click', function(){ss.showTab('graph');}). - observe(data, 'click', function(){ss.showTab('data');}); - if (this.options.spreadsheet.initialTab !== 'graph'){ - ss.showTab(this.options.spreadsheet.initialTab); - } - } - }, - /** - * Builds a matrix of the data to make the correspondance between the x values and the y values : X value => Y values - * from the axes - * - * @return {Array} The data grid - */ - loadDataGrid: function(){ - if (this.seriesData) return this.seriesData; - - var s = this.series, - rows = {}; - - /* - * The data grid is a 2 dimensions array. There is a row for each X value. Each row contains the x value and the - * corresponding y value for each serie ('undefined' if there isn't one) - */ - _.each(s, function(serie, i){ - _.each(serie.data, function (v) { - var x = v[0], - y = v[1], - r = rows[x]; - if (r) { - r[i+1] = y; - } else { - var newRow = []; - newRow[0] = x; - newRow[i+1] = y; - rows[x] = newRow; - } - }); - }); - - // The data grid is sorted by x value - this.seriesData = _.sortBy(rows, function(row, x){ - return parseInt(x, 10); - }); - return this.seriesData; - }, - /** - * Constructs the data table for the spreadsheet - * - * @todo make a spreadsheet manager (Flotr.Spreadsheet) - * @return {Element} The resulting table element - */ - constructDataGrid: function(){ - // If the data grid has already been built, nothing to do here - if (this.spreadsheet.datagrid) return this.spreadsheet.datagrid; - - var s = this.series, - datagrid = this.spreadsheet.loadDataGrid(), - colgroup = [''], - buttonDownload, buttonSelect, t; - - // First row : series' labels - var html = ['']; - html.push(''); - _.each(s, function(serie,i){ - html.push(''); - colgroup.push(''); - }); - html.push(''); - // Data rows - _.each(datagrid, function(row){ - html.push(''); - _.times(s.length+1, function(i){ - var tag = 'td', - value = row[i], - // TODO: do we really want to handle problems with floating point - // precision here? - content = (!_.isUndefined(value) ? Math.round(value*100000)/100000 : ''); - if (i === 0) { - tag = 'th'; - var label = getRowLabel.call(this, content); - if (label) content = label; - } - - html.push('<'+tag+(tag=='th'?' scope="row"':'')+'>'+content+''); - }, this); - html.push(''); - }, this); - colgroup.push(''); - t = D.node(html.join('')); - - /** - * @TODO disabled this if (!Flotr.isIE || Flotr.isIE == 9) { function handleMouseout(){ t.select('colgroup - * col.hover, th.hover').invoke('removeClassName', 'hover'); } function handleMouseover(e){ var td = - * e.element(), siblings = td.previousSiblings(); - * t.select('th[scope=col]')[siblings.length-1].addClassName('hover'); t.select('colgroup - * col')[siblings.length].addClassName('hover'); } _.each(t.select('td'), function(td) { Flotr.EventAdapter. - * observe(td, 'mouseover', handleMouseover). observe(td, 'mouseout', handleMouseout); }); } - */ - - buttonDownload = D.node( - ''); - - buttonSelect = D.node( - ''); - - this. - observe(buttonDownload, 'click', _.bind(this.spreadsheet.downloadCSV, this)). - observe(buttonSelect, 'click', _.bind(this.spreadsheet.selectAllData, this)); - - var toolbar = D.node('
    '); - D.insert(toolbar, buttonDownload); - D.insert(toolbar, buttonSelect); - - var containerHeight =this.canvasHeight - D.size(this.spreadsheet.tabsContainer).height-2, - container = D.node('
    '); - - D.insert(container, toolbar); - D.insert(container, t); - D.insert(this.el, container); - this.spreadsheet.datagrid = t; - this.spreadsheet.container = container; - - return t; - }, - /** - * Shows the specified tab, by its name - * - * @todo make a tab manager (Flotr.Tabs) - * @param {String} - * tabName - The tab name - */ - showTab: function(tabName){ - if (this.spreadsheet.activeTab === tabName){ - return; - } - switch(tabName) { - case 'graph': - D.hide(this.spreadsheet.container); - D.removeClass(this.spreadsheet.tabs.data, 'selected'); - D.addClass(this.spreadsheet.tabs.graph, 'selected'); - break; - case 'data': - if (!this.spreadsheet.datagrid) - this.spreadsheet.constructDataGrid(); - D.show(this.spreadsheet.container); - D.addClass(this.spreadsheet.tabs.data, 'selected'); - D.removeClass(this.spreadsheet.tabs.graph, 'selected'); - break; - default: - throw 'Illegal tab name: ' + tabName; - } - this.spreadsheet.activeTab = tabName; - }, - /** - * Selects the data table in the DOM for copy/paste - */ - selectAllData: function(){ - if (this.spreadsheet.tabs) { - var selection, range, doc, win, node = this.spreadsheet.constructDataGrid(); - - this.spreadsheet.showTab('data'); - - // deferred to be able to select the table - setTimeout(function () { - if ((doc = node.ownerDocument) && (win = doc.defaultView) && - win.getSelection && doc.createRange && - (selection = window.getSelection()) && - selection.removeAllRanges) { - range = doc.createRange(); - range.selectNode(node); - selection.removeAllRanges(); - selection.addRange(range); - } - else if (document.body && document.body.createTextRange && - (range = document.body.createTextRange())) { - range.moveToElementText(node); - range.select(); - } - }, 0); - return true; - } - else return false; - }, - /** - * Converts the data into CSV in order to download a file - */ - downloadCSV: function(){ - var csv = '', - series = this.series, - options = this.options, - dg = this.spreadsheet.loadDataGrid(), - separator = encodeURIComponent(options.spreadsheet.csvFileSeparator); - - if (options.spreadsheet.decimalSeparator === options.spreadsheet.csvFileSeparator) { - throw "The decimal separator is the same as the column separator ("+options.spreadsheet.decimalSeparator+")"; - } - - // The first row - _.each(series, function(serie, i){ - csv += separator+'"'+(serie.label || String.fromCharCode(65+i)).replace(/\"/g, '\\"')+'"'; - }); - - csv += "%0D%0A"; // \r\n - - // For each row - csv += _.reduce(dg, function(memo, row){ - var rowLabel = getRowLabel.call(this, row[0]) || ''; - rowLabel = '"'+(rowLabel+'').replace(/\"/g, '\\"')+'"'; - var numbers = row.slice(1).join(separator); - if (options.spreadsheet.decimalSeparator !== '.') { - numbers = numbers.replace(/\./g, options.spreadsheet.decimalSeparator); - } - return memo + rowLabel+separator+numbers+"%0D%0A"; // \t and \r\n - }, '', this); - - if (Flotr.isIE && Flotr.isIE < 9) { - csv = csv.replace(new RegExp(separator, 'g'), decodeURIComponent(separator)).replace(/%0A/g, '\n').replace(/%0D/g, '\r'); - window.open().document.write(csv); - } - else window.open('data:text/csv,'+csv); - } -}); -})(); - -(function () { - -var D = Flotr.DOM; - -Flotr.addPlugin('titles', { - callbacks: { - 'flotr:afterdraw': function() { - this.titles.drawTitles(); - } - }, - /** - * Draws the title and the subtitle - */ - drawTitles : function () { - var html, - options = this.options, - margin = options.grid.labelMargin, - ctx = this.ctx, - a = this.axes; - - if (!options.HtmlText && this.textEnabled) { - var style = { - size: options.fontSize, - color: options.grid.color, - textAlign: 'center' - }; - - // Add subtitle - if (options.subtitle){ - Flotr.drawText( - ctx, options.subtitle, - this.plotOffset.left + this.plotWidth/2, - this.titleHeight + this.subtitleHeight - 2, - style - ); - } - - style.weight = 1.5; - style.size *= 1.5; - - // Add title - if (options.title){ - Flotr.drawText( - ctx, options.title, - this.plotOffset.left + this.plotWidth/2, - this.titleHeight - 2, - style - ); - } - - style.weight = 1.8; - style.size *= 0.8; - - // Add x axis title - if (a.x.options.title && a.x.used){ - style.textAlign = a.x.options.titleAlign || 'center'; - style.textBaseline = 'top'; - style.angle = Flotr.toRad(a.x.options.titleAngle); - style = Flotr.getBestTextAlign(style.angle, style); - Flotr.drawText( - ctx, a.x.options.title, - this.plotOffset.left + this.plotWidth/2, - this.plotOffset.top + a.x.maxLabel.height + this.plotHeight + 2 * margin, - style - ); - } - - // Add x2 axis title - if (a.x2.options.title && a.x2.used){ - style.textAlign = a.x2.options.titleAlign || 'center'; - style.textBaseline = 'bottom'; - style.angle = Flotr.toRad(a.x2.options.titleAngle); - style = Flotr.getBestTextAlign(style.angle, style); - Flotr.drawText( - ctx, a.x2.options.title, - this.plotOffset.left + this.plotWidth/2, - this.plotOffset.top - a.x2.maxLabel.height - 2 * margin, - style - ); - } - - // Add y axis title - if (a.y.options.title && a.y.used){ - style.textAlign = a.y.options.titleAlign || 'right'; - style.textBaseline = 'middle'; - style.angle = Flotr.toRad(a.y.options.titleAngle); - style = Flotr.getBestTextAlign(style.angle, style); - Flotr.drawText( - ctx, a.y.options.title, - this.plotOffset.left - a.y.maxLabel.width - 2 * margin, - this.plotOffset.top + this.plotHeight / 2, - style - ); - } - - // Add y2 axis title - if (a.y2.options.title && a.y2.used){ - style.textAlign = a.y2.options.titleAlign || 'left'; - style.textBaseline = 'middle'; - style.angle = Flotr.toRad(a.y2.options.titleAngle); - style = Flotr.getBestTextAlign(style.angle, style); - Flotr.drawText( - ctx, a.y2.options.title, - this.plotOffset.left + this.plotWidth + a.y2.maxLabel.width + 2 * margin, - this.plotOffset.top + this.plotHeight / 2, - style - ); - } - } - else { - html = []; - - // Add title - if (options.title) - html.push( - '
    ', options.title, '
    ' - ); - - // Add subtitle - if (options.subtitle) - html.push( - '
    ', options.subtitle, '
    ' - ); - - html.push(''); - - html.push('
    '); - - // Add x axis title - if (a.x.options.title && a.x.used) - html.push( - '
    ', a.x.options.title, '
    ' - ); - - // Add x2 axis title - if (a.x2.options.title && a.x2.used) - html.push( - '
    ', a.x2.options.title, '
    ' - ); - - // Add y axis title - if (a.y.options.title && a.y.used) - html.push( - '
    ', a.y.options.title, '
    ' - ); - - // Add y2 axis title - if (a.y2.options.title && a.y2.used) - html.push( - '
    ', a.y2.options.title, '
    ' - ); - - html = html.join(''); - - var div = D.create('div'); - D.setStyles({ - color: options.grid.color - }); - div.className = 'flotr-titles'; - D.insert(this.el, div); - D.insert(div, html); - } - } -}); -})(); \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/lib/index.js b/gemma-web/src/main/webapp/scripts/lib/index.js new file mode 100644 index 0000000000..264eb16a4e --- /dev/null +++ b/gemma-web/src/main/webapp/scripts/lib/index.js @@ -0,0 +1,27 @@ +import jQuery from 'jquery' +import 'jquery-ui/ui/widgets/draggable' +import 'jquery-ui/ui/widgets/droppable' +import 'jquery-sparkline' +import './jquery.jshowoff' +import 'qtip2' + +import './ext' + +import './cytoscapejs/cytoscape' +import './cytoscapejs/cytoscape.js-qtip' +import './cytoscapejs/cytoscape.js-panzoom/jquery.cytoscape.js-panzoom' +import './cytoscapejs/cytoscape.js-cxtmenu/jquery.cytoscape.js-cxtmenu' + +import './color' +import './canvas-text-functions' +import './discrete-color-range' +import './excanvas' +import './excanvas-text' +import 'flotr2' +import './faces/helvetiker-normal-normal' +import './rsvp' +import './sprintf' +import './arbor' + +window.jQuery = jQuery; +window.$ = jQuery; \ No newline at end of file diff --git a/gemma-web/src/main/webapp/scripts/lib/jquery-2.1.1.js b/gemma-web/src/main/webapp/scripts/lib/jquery-2.1.1.js deleted file mode 100644 index 6e995bdc8f..0000000000 --- a/gemma-web/src/main/webapp/scripts/lib/jquery-2.1.1.js +++ /dev/null @@ -1,9188 +0,0 @@ -/*! - * jQuery JavaScript Library v2.1.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-05-01T17:11Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -// - -var arr = []; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.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; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( i === length ) { - 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 && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android < 4.0, iOS < 6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v1.10.19 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-04-18 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "
    "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android < 4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Math.random(); -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android < 4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -/* - Implementation Summary - - 1. Enforce API surface and semantic compatibility with 1.9.x branch - 2. Improve the module's maintainability by reducing the storage - paths to a single mechanism. - 3. Use the same single mechanism to support "private" and "user" data. - 4. _Never_ expose "private" data to user code - 5. Avoid exposing implementation details on user objects (eg. expando properties) - 6. Provide a clear path for implementation upgrade to WeakMap in 2014 -*/ -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - // Support: Windows Web Apps (WWA) - // `name` and `type` need .setAttribute for WWA - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE9-IE11+ - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome < 28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.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.defaultPrevented === undefined && - // Support: Android < 4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = 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 -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// Create "bubbling" focus and blur events -// Support: Firefox, Chrome, Safari -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE 9 - option: [ 1, "" ], - - thead: [ 1, "
     '+(serie.label || String.fromCharCode(65+i))+'
    ", "
    " ], - col: [ 2, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - _default: [ 0, "", "" ] - }; - -// Support: IE 9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute("type"); - } - - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Support: IE >= 9 -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Support: IE >= 9 - // Fix Cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Fixes #12346 - // Support: Webkit, IE - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - }); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optmization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "